Changeset 161


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

čas do dokončení

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/dictionary.php

    r160 r161  
    77  global $Database;
    88 
    9         echo('Přeložené názvy věci, postav, a herních objektů k tomuto překladu
     9        echo('Přeložené názvy věci, postav, a herních objektů a další k tomuto překladu
    1010        <div style="overflow: auto; width: 100%; height: 345px;"><table width="98%" class="BaseTable">');
    1111        echo('<tr><th>Originál</th>'.'<th>Překlad</th>');
    12  $Tables = array('gameobject' => 'Name', 'creature' => 'name', 'item' => 'Name');
     12 $Tables = array('gameobject' => 'Name',
     13  'creature' => 'name',
     14  'item' => 'Name',
     15  'transports' => 'Name',
     16  'areatrigger_teleport' => 'Name',
     17  'areatrigger_tavern' => 'Name',);
    1318 foreach($Tables as $Table => $Column) {
    1419 
    15   $sql = 'SELECT *,(SELECT Name FROM '.$Table.' as T WHERE O.entry = T.entry AND Language <> 0 LIMIT 1) as tran
     20  $sql = 'SELECT '.$Column.',(SELECT Name FROM '.$Table.' as T WHERE O.entry = T.entry AND Language <> 0 LIMIT 1) as tran
    1621   FROM '.$Table.' as O WHERE ';
    1722  $groupby = ' GROUP BY '.$Column;
  • trunk/form.php

    r160 r161  
    6969  if(Licence(LICENCE_USER))
    7070  {
    71         if(Licence(LICENCE_MODERATOR) and ($GroupId < 4)) echo ('<a href="" onclick="javascript:window.open(\'dictionary.php?group='.$GroupId.'&amp;ID='.$LineAJ['ID'].'\', \'Slovník\', \'width=400, height=390\'); return false;" Title="Zobrazit přeložené názvy věci, postav, a herních objektů k tomuto překladu">Vyhledat v názvech</a>');
     71        if(Licence(LICENCE_MODERATOR) and (($GroupId < 4) or ($GroupId = 10) or ($GroupId = 11))) echo ('<a href="" onclick="javascript:window.open(\'dictionary.php?group='.$GroupId.'&amp;ID='.$LineAJ['ID'].'\', \'Slovník\', \'width=400, height=390\'); return false;" Title="Zobrazit přeložené názvy věci, postav, a herních objektů k tomuto překladu">Vyhledat v názvech</a>');
    7272    echo(' <input type="submit" value="Uložit do rozepsaných" name="save" title="Klikněte na uložit pro pozdější dokončení překladu" />
    7373    <input type="submit" value="Dokončeno" name="End" title="Klikněte na Dokončeno jesli jsou všechny texty hotové a chcete již publikovat" /> ');
  • 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"));
  • trunk/includes/global_function.php

    r158 r161  
    1616  //$return = StrToLower($return); // velká písmena nahradí malými.
    1717  return($return);
     18}
     19
     20function getmonthyears($Days) {
     21       
     22        $month = floor($Days/30);
     23        $year = floor($month/12);
     24        $Days = $Days - $month*30;
     25        $$month = $month - $year*12;
     26       
     27        return $year.'r '.$month.'m '.$Days.'d';
    1828}
    1929
Note: See TracChangeset for help on using the changeset viewer.