source: trunk/statistic.php@ 253

Last change on this file since 253 was 253, checked in by maron, 16 years ago

Možnost zobrazení statistiky vlastního výběru. Oprava defaultního natavení exportu

File size: 1.7 KB
Line 
1<?php
2
3include('includes/global.php');
4
5ShowPage();
6
7if (array_key_exists('language', $_GET))
8{
9 $language = '&amp;language='.$_GET['language'];
10} else $language = '';
11if (array_key_exists('user', $_GET))
12{
13 $user_stat = '&amp;user='.$_SESSION['UserID'];
14} else $user_stat = '';
15
16
17echo('<strong>Statistika:</strong> <a href="statistic.php">Všechny</a>');
18foreach($LanguageList as $Language)
19if($Language['Enabled'] == 1) echo(' <a href="?language='.$Language['Id'].'">'.$Language['Name'].'</a>');
20if(Licence(LICENCE_USER))
21{
22 $DbResult = mysql_fetch_assoc($Database->SQLCommand('SELECT ExportSetting FROM `user` WHERE ID='.$_SESSION['UserID']));
23 if ($DbResult['ExportSetting'] != '')
24 echo(' <a href="?user">Statistika výběru uživatele</a>');
25}
26
27foreach($TranslationTree as $Group)
28 if($Group['TablePrefix'] != '')
29 echo('<div class="state-image">
30 <img alt="'.$Group['TablePrefix'].'" src="img_statistic.php?group='.$Group['Id'].$language.$user_stat.'" title="statistika překladů '.$Group['Name'].'"/></div>');
31
32echo('<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>
33<div>Počet stáhnutí přeložených textů v SQL souboru: <strong>');
34
35$ID = $Database->SQLCommand('SELECT count(distinct(IP)) FROM log WHERE type = 2');
36$Line = mysql_fetch_row($ID);
37echo($Line[0]);
38
39echo('</strong></div>
40<div>Počet stáhnutí: <strong>');
41
42$ID = $Database->SQLCommand('SELECT count(distinct(IP)) FROM log WHERE type = 0');
43$Line = mysql_fetch_row($ID);
44echo($Line[0]);
45
46echo('</strong></div>');
47
48ShowFooter();
49
50?>
Note: See TracBrowser for help on using the repository browser.