Ignore:
Timestamp:
Mar 24, 2010, 7:59:47 AM (15 years ago)
Author:
george
Message:
  • Odebráno: Zobrazování odhadu dokončení přeložení ve zobrzení stavu dokončení. Počítání odhadu podle textového sloupce v Logu je značně neefektivní.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/img_statistic.php

    r383 r402  
    2424if($BuildNumber_max == '') $BuildNumber_max = 0; // Empty result, no items in this group
    2525
    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;
    2727$ID = mysql_fetch_row($Database->SQLCommand('SELECT COUNT(DISTINCT(`Entry`)) FROM `'.$Group['TablePrefix'].'` WHERE '.$where));
    2828$NumberTranslate = $ID[0];
    2929 
    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)');
    3131$ID = mysql_fetch_row($DbResult);
    3232$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")
    3733
    3834if($NumberAJ > 0) $Percent = ($NumberTranslate / $NumberAJ) * 100;
     
    5046imagefilledrectangle($Image, 0, 0, $PercentBar, 59, $Color2);
    5147$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 }
    5848ImageTTFText($Image, $FontSize, 0, 140, 13, $Color3, $FontFile, $NumberTranslate.'/'.$NumberAJ);
    5949ImageTTFText($Image, $FontSize, 0, 240, 13, $Color3, $FontFile, $Group['Name']);
Note: See TracChangeset for help on using the changeset viewer.