Changeset 402
- Timestamp:
- Mar 24, 2010, 7:59:47 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/img_statistic.php
r383 r402 24 24 if($BuildNumber_max == '') $BuildNumber_max = 0; // Empty result, no items in this group 25 25 26 $where = ' VersionEnd = '.$BuildNumber_max.'AND (`Language` <> 0) AND (`Complete` = 1) '.$team.$language;26 $where = '(`VersionEnd` = '.$BuildNumber_max.') AND (`Language` <> 0) AND (`Complete` = 1) '.$team.$language; 27 27 $ID = mysql_fetch_row($Database->SQLCommand('SELECT COUNT(DISTINCT(`Entry`)) FROM `'.$Group['TablePrefix'].'` WHERE '.$where)); 28 28 $NumberTranslate = $ID[0]; 29 29 30 $DbResult = $Database->SQLCommand('SELECT COUNT(DISTINCT(`Entry`)) FROM `'.$Group['TablePrefix'].'` WHERE `VersionEnd` = '.$BuildNumber_max.'AND (`Language` = 0)');30 $DbResult = $Database->SQLCommand('SELECT COUNT(DISTINCT(`Entry`)) FROM `'.$Group['TablePrefix'].'` WHERE (`VersionEnd` = '.$BuildNumber_max.') AND (`Language` = 0)'); 31 31 $ID = mysql_fetch_row($DbResult); 32 32 $NumberAJ = $ID[0]; 33 34 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `Log` WHERE (`Type` = 1) AND (`Date` >= CURRENT_DATE - INTERVAL '.$Days.' DAY) AND (`Text` LIKE "%'.$Group['Name'].'%")');35 $ID = mysql_fetch_row($DbResult);36 $NumberPerDay = $ID[0]; //date ("Y-m-d H:i:s")37 33 38 34 if($NumberAJ > 0) $Percent = ($NumberTranslate / $NumberAJ) * 100; … … 50 46 imagefilledrectangle($Image, 0, 0, $PercentBar, 59, $Color2); 51 47 $FontSize = 10; 52 if(($NumberPerDay > 0) and ($team == '') and ($language == '') and ($NotTran > 0))53 {54 $TimeToTranslate = ($NotTran / $NumberPerDay) * $Days;55 ImageTTFText($Image, $FontSize, 0, 5, 13, $Color3, $FontFile, 'Čas do dokončení');56 ImageTTFText($Image, $FontSize, 0, 5, 29, $Color3, $FontFile, getmonthyears($TimeToTranslate));57 }58 48 ImageTTFText($Image, $FontSize, 0, 140, 13, $Color3, $FontFile, $NumberTranslate.'/'.$NumberAJ); 59 49 ImageTTFText($Image, $FontSize, 0, 240, 13, $Color3, $FontFile, $Group['Name']); -
trunk/statistic.php
r365 r402 11 11 echo('<strong>Statistika:</strong> <a href="statistic.php">Všechny</a>'); 12 12 foreach($LanguageList as $Language) 13 if($Language['Enabled'] == 1) echo(' <a href="?language='.$Language['Id'].'">'.$Language['Name'].'</a>');13 if($Language['Enabled'] == 1) echo(' <a href="?language='.$Language['Id'].'">'.$Language['Name'].'</a>'); 14 14 15 15 16 16 foreach($TranslationTree as $Group) 17 17 if($Group['TablePrefix'] != '') 18 echo('<div class="state-image"> 19 <img alt="'.$Group['TablePrefix'].'" src="img_statistic.php?group='.$Group['Id'].$language.'" title="statistika překladů '.$Group['Name'].'"/></div>'); 18 echo('<div class="state-image"><img alt="'.$Group['TablePrefix'].'" src="img_statistic.php?group='.$Group['Id'].$language.'" title="Statistika překladů '.$Group['Name'].'"/></div>'); 20 19 21 20 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>
Note:
See TracChangeset
for help on using the changeset viewer.