<?php

include('includes/global.php');

ShowPage();

if (array_key_exists('language', $_GET)) 
{
	$language = '&amp;language='.$_GET['language'];
} else $language = '';

echo('<strong>Statistika:</strong> <a href="statistic.php">Všechny</a>');
foreach($LanguageList as $Language) 
if($Language['Enabled'] == 1) echo(' <a href="?language='.$Language['Id'].'">'.$Language['Name'].'</a>');

foreach($TranslationTree as $Group)
  if($Group['TablePrefix'] != '') 
	echo('<div class="state-image">
	<img alt="'.$Group['TablePrefix'].'" src="img_statistic.php?group='.$Group['Id'].$language.'" title="statistika překladů '.$Group['Name'].'"/></div>');

echo('<p><strong>Celková statistika v závislosti na čase: </strong><a href="http://stat.zdechov.net/game/?Measure=18">Počet přeložených textů</a></p>
<div>Počet stáhnutí přeložených textů v SQL souboru: <strong>');
       
$ID = $Database->SQLCommand('SELECT count(distinct(IP)) FROM log WHERE type = 2');
$Line = mysql_fetch_row($ID);
echo($Line[0]);

echo('</strong></div>
<div>Počet stáhnutí: <strong>');
      
$ID = $Database->SQLCommand('SELECT count(distinct(IP)) FROM log WHERE type = 0');
$Line = mysql_fetch_row($ID);
echo($Line[0]);

echo('</strong></div>');

ShowFooter();      

?>
