Changeset 217 for trunk/img_statistic.php
- Timestamp:
- Jun 25, 2009, 1:18:16 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/img_statistic.php
r168 r217 13 13 $language = ' AND Language = '.$_GET['language'].''; 14 14 } else $language = ''; 15 if (array_key_exists('user', $_GET)) { 16 $DbResult = $Database->SQLCommand('SELECT user,ExportSetting FROM `user` WHERE ID='.$_GET['user']); 17 $User = mysql_fetch_assoc($DbResult); 18 $ExportSetting = unserialize($User['ExportSetting']); 19 $SelectedUsers = ''; 20 foreach($ExportSetting['users-selection'] as $Item) 21 $SelectedUsers .= ','.$Item; 22 $SelectedUsers = substr($SelectedUsers, 1); 23 $user_sql = ' AND User IN ('.$SelectedUsers.')'; 24 } else $user_sql = ''; 15 25 16 $ID = mysql_fetch_row($Database->SQLCommand('SELECT count(distinct(entry)) FROM '.$Group['TablePrefix'].' WHERE (Language <> 0) AND (Complete = 1) '.$team.$language)); 26 $where = ' (Language <> 0) AND (Complete = 1) '.$team.$language.$user_sql; 27 $ID = mysql_fetch_row($Database->SQLCommand('SELECT count(distinct(entry)) FROM '.$Group['TablePrefix'].' WHERE '.$where)); 17 28 $NumberTranslate = $ID[0]; 18 29 … … 37 48 imagefilledrectangle($Image, 0, 0, $PercentBar, 59, $Color2); 38 49 $FontSize = 10; 39 if (($NumberPerDay > 0) and ($team == '') and ($language == '') and ($ NotTran>0)) {50 if (($NumberPerDay > 0) and ($team == '') and ($language == '') and ($user_sql == '') and ($NotTran>0)) { 40 51 $TimeToTranslate = ($NotTran / $NumberPerDay)* $Days; 41 52 ImageTTFText($Image, $FontSize, 0, 5, 13, $Color3, $FontFile, 'Čas do dokončení'); 42 53 ImageTTFText($Image, $FontSize, 0, 5, 29, $Color3, $FontFile, getmonthyears($TimeToTranslate) ); 54 } 55 if ($user_sql <> '') { 56 ImageTTFText($Image, $FontSize, 0, 5, 13, $Color3, $FontFile, 'Statistika výběru'); 57 ImageTTFText($Image, $FontSize, 0, 5, 29, $Color3, $FontFile, 'uživatele: '.$User['user'] ); 43 58 } 44 59 ImageTTFText($Image, $FontSize, 0, 140, 13, $Color3, $FontFile, $NumberTranslate.'/'.$NumberAJ);
Note:
See TracChangeset
for help on using the changeset viewer.