Changeset 402 for trunk


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í.
Location:
trunk
Files:
2 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']);
  • trunk/statistic.php

    r365 r402  
    1111echo('<strong>Statistika:</strong> <a href="statistic.php">Všechny</a>');
    1212foreach($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>');
    1414
    1515
    1616foreach($TranslationTree as $Group)
    1717  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>');
    2019
    2120echo('<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.