Ignore:
Timestamp:
Jun 25, 2009, 1:18:16 PM (15 years ago)
Author:
maron
Message:

Statistika vyberu uzivatele po exportu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/img_statistic.php

    r168 r217  
    1313        $language = ' AND Language = '.$_GET['language'].'';
    1414} else $language = '';
     15if (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 = '';
    1525
    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));
    1728$NumberTranslate = $ID[0];
    1829 
     
    3748imagefilledrectangle($Image, 0, 0, $PercentBar, 59, $Color2);
    3849$FontSize = 10;
    39 if (($NumberPerDay > 0) and ($team == '') and ($language == '') and ($NotTran>0)) {
     50if (($NumberPerDay > 0) and ($team == '') and ($language == '') and ($user_sql == '') and ($NotTran>0)) {
    4051        $TimeToTranslate = ($NotTran  / $NumberPerDay)* $Days;
    4152        ImageTTFText($Image, $FontSize, 0, 5, 13, $Color3, $FontFile, 'Čas do dokončení');
    4253        ImageTTFText($Image, $FontSize, 0, 5, 29, $Color3, $FontFile, getmonthyears($TimeToTranslate) );
     54}
     55if ($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'] );
    4358}
    4459ImageTTFText($Image, $FontSize, 0, 140, 13, $Color3, $FontFile, $NumberTranslate.'/'.$NumberAJ);
Note: See TracChangeset for help on using the changeset viewer.