Changeset 161 for trunk/img_statistic.php
- Timestamp:
- Mar 18, 2009, 10:34:36 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/img_statistic.php
r159 r161 3 3 include('includes/global.php'); 4 4 5 $Days = 7; 5 6 $FontFile = 'images/FRIZQT__.ttf'; 6 7 $TranslationTree = GetTranslationTree(); … … 19 20 $NumberAJ = $ID[0]; 20 21 22 $ID = mysql_fetch_row($Database->SQLCommand('SELECT count(*) FROM log WHERE date >= CURRENT_DATE - INTERVAL '.$Days.' DAY 23 AND text LIKE "%'.$Group['Name'].'%"')); 24 $NumberPerDay = $ID[0]; //date ("Y-m-d H:i:s") 25 21 26 if($NumberAJ > 0) $Percent = ($NumberTranslate / $NumberAJ) * 100; else $Percent = 0; 22 27 $Percent = substr($Percent, 0, 5); 23 28 24 29 $PercentBar = $Percent * 4; 30 $NotTran = $NumberAJ - $NumberTranslate; 31 25 32 $Image = ImageCreateTrueColor(400, 32); 26 33 $Color1 = imagecolorallocate($Image, 214, 214, 214); … … 30 37 imagefilledrectangle($Image, 0, 0, $PercentBar, 59, $Color2); 31 38 $FontSize = 10; 32 ImageTTFText($Image, $FontSize, 0, 120, 13, $Color3, $FontFile, $NumberTranslate.'/'.$NumberAJ); 39 if (($NumberPerDay > 0) and ($team == '') and ($language == '') and ($NotTran>0)) { 40 $TimeToTranslate = ($NotTran / $NumberPerDay)* $Days; 41 ImageTTFText($Image, $FontSize, 0, 5, 13, $Color3, $FontFile, 'Čas do dokončení'); 42 ImageTTFText($Image, $FontSize, 0, 5, 29, $Color3, $FontFile, getmonthyears($TimeToTranslate) ); 43 } 44 ImageTTFText($Image, $FontSize, 0, 140, 13, $Color3, $FontFile, $NumberTranslate.'/'.$NumberAJ); 33 45 ImageTTFText($Image, $FontSize, 0, 240, 13, $Color3, $FontFile, $Group['Name']); 34 ImageTTFText($Image, $FontSize, 0, 1 20, 29, $Color3, $FontFile, $Percent.'%');46 ImageTTFText($Image, $FontSize, 0, 140, 29, $Color3, $FontFile, $Percent.'%'); 35 47 $FontSize = 6; 36 48 ImageTTFText($Image, $FontSize, 0, 240, 28, $Color3, $FontFile, 'Aktualizace: '.date("m.d.y H:i"));
Note:
See TracChangeset
for help on using the changeset viewer.