Ignore:
Timestamp:
Mar 18, 2009, 10:34:36 PM (16 years ago)
Author:
maron
Message:

čas do dokončení

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/img_statistic.php

    r159 r161  
    33include('includes/global.php');
    44
     5$Days = 7;
    56$FontFile = 'images/FRIZQT__.ttf';
    67$TranslationTree = GetTranslationTree();
     
    1920$NumberAJ = $ID[0];
    2021
     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
    2126if($NumberAJ > 0) $Percent = ($NumberTranslate / $NumberAJ) * 100; else $Percent = 0;
    2227$Percent = substr($Percent, 0, 5);
    2328
    2429$PercentBar = $Percent * 4;
     30$NotTran = $NumberAJ - $NumberTranslate;
     31
    2532$Image = ImageCreateTrueColor(400, 32);
    2633$Color1 = imagecolorallocate($Image, 214, 214, 214);
     
    3037imagefilledrectangle($Image, 0, 0, $PercentBar, 59, $Color2);
    3138$FontSize = 10;
    32 ImageTTFText($Image, $FontSize, 0, 120, 13, $Color3, $FontFile, $NumberTranslate.'/'.$NumberAJ);
     39if (($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}
     44ImageTTFText($Image, $FontSize, 0, 140, 13, $Color3, $FontFile, $NumberTranslate.'/'.$NumberAJ);
    3345ImageTTFText($Image, $FontSize, 0, 240, 13, $Color3, $FontFile, $Group['Name']);
    34 ImageTTFText($Image, $FontSize, 0, 120, 29, $Color3, $FontFile, $Percent.'%');
     46ImageTTFText($Image, $FontSize, 0, 140, 29, $Color3, $FontFile, $Percent.'%');
    3547$FontSize = 6;
    3648ImageTTFText($Image, $FontSize, 0, 240, 28, $Color3, $FontFile, 'Aktualizace: '.date("m.d.y  H:i"));
Note: See TracChangeset for help on using the changeset viewer.