Changeset 433
- Timestamp:
- Apr 8, 2010, 10:43:50 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/export/index.php
r417 r433 162 162 array('Name' => 'TranslatedCount', 'Title' => 'Překladů'), 163 163 array('Name' => 'XP', 'Title' => 'Úroveň'), 164 array('Name' => 'XP', 'Title' => 'Zkušenost'), 164 165 array('Name' => '', 'Title' => 'Výběr'), 165 166 array('Name' => 'Sequence2', 'Title' => 'Pořadí'), … … 197 198 while($UserLine = mysql_fetch_assoc($DbResult)) 198 199 { 200 $XP = GetLevelMinMax($UserLine['XP']); 199 201 $Checked = $UserLine['Sequence'] != ''; 200 202 $Selection = CheckBox('sel'.$UserLine['ID'], $Checked, '', 'CheckBox', !$Editable); 201 203 $Sequence = '<input type="text" name="seq'.$UserLine['ID'].'" style="text-align: center; width: 40px;" value="'.$UserLine['Sequence2'].'"'.$DisabledInput[$Editable].'/>'; 202 echo('<tr> 203 <td><a href="'.$System->Link('/TranslationList.php?user='.$UserLine['ID'].'&action=userall').'" title="Zobrazit všechny jeho přeložené texty">'.$UserLine['Name'].'</a></td> 204 <td>'.$UserLine['TranslatedCount'].'</td> 205 <td><img src="'.$Config['Web']['TempFolder'].'/user/'.$UserLine['Name'].'/level.png" alt="Úroveň uživatele" /></td> 206 <td>'.$Selection.'</td><td>'.$Sequence.'</td></tr>'); 204 echo('<tr>'. 205 '<td><a href="'.$System->Link('/TranslationList.php?user='.$UserLine['ID'].'&action=userall').'" title="Zobrazit všechny jeho přeložené texty">'.$UserLine['Name'].'</a></td>'. 206 '<td>'.$UserLine['TranslatedCount'].'</td>'. 207 '<td>'.$XP['Level'].'</td>'. 208 '<td>'.ProgressBar(150, round($XP['XP'] / $XP['MaxXP'] * 100, 2), $XP['XP'].' / '.$XP['MaxXP']).'</td>'. 209 '<td>'.$Selection.'</td><td>'.$Sequence.'</td></tr>'); 207 210 } 208 211 echo('</table>'); … … 539 542 $Export->LoadFilters(); 540 543 544 if($Export->ClientVersion['BuildNumber'] == '') ErrorMessage('Nebyla vybrána verze klienta'); 541 545 $GroupListQuery = 'SELECT `Group`.* FROM `Group` '. 542 546 ' JOIN `ExportGroup` ON (`ExportGroup`.`Export`='.$Export->Id.') AND (`ExportGroup`.`Group`=`Group`.`Id`)'; 543 547 $Query = ''; 548 $UnionItems = array(); 544 549 $DbResult = $Database->SQLCommand($GroupListQuery); 545 550 while($DbRow = mysql_fetch_assoc($DbResult)) 546 551 { 547 $ Query .= 'SELECT (SELECT COUNT(DISTINCT(`Entry`)) FROM ('.552 $UnionItems[] = 'SELECT (SELECT COUNT(DISTINCT(`Entry`)) FROM ('. 548 553 ' SELECT `T`.* FROM `'.$DbRow['TablePrefix'].'` AS `T`'. 549 554 ' JOIN `ExportUser` ON (`ExportUser`.`User`=`T`.`User`) AND (`ExportUser`.`Export`='.$Export->Id.') '. … … 554 559 ' SELECT `T`.* FROM `'.$DbRow['TablePrefix'].'` AS `T`'. 555 560 ' WHERE (`Language` = 0) AND (`VersionStart` <= '.$Export->ClientVersion['BuildNumber'].') AND (`VersionEnd` >= '.$Export->ClientVersion['BuildNumber'].')'. 556 ') AS `C2`) AS `Total`, "'.$DbRow['Name'].'" AS `Name` UNION';561 ') AS `C2`) AS `Total`, "'.$DbRow['Name'].'" AS `Name`'; 557 562 } 558 563 $Query = substr($Query, 0, - 6); … … 577 582 $Translated = 0; 578 583 $Total = 0; 579 $ID = $Database->SQLCommand('SELECT *, ROUND(`Translated` / `Total` * 100, 2) AS `Percent` FROM ('.$Query.') AS `C3` '.$Order['SQL'].$PageList['SQLLimit']); 580 while($Group = mysql_fetch_assoc($ID)) 581 { 582 echo('<tr><td>'.$Group['Name'].'</td><td>'.$Group['Translated'].'</td><td>'.$Group['Total'].'</td><td>'.ProgressBar(150, $Group['Percent']).'</td></tr>'); 583 $Translated += $Group['Translated']; 584 $Total += $Group['Total']; 585 } 586 echo('<tr><td><strong>Celkem</strong></td><td><strong>'.$Translated.'</strong></td><td><strong>'.$Total.'</strong></td><td><strong>'.ProgressBar(150, round($Translated / $Total * 100, 2)).'</strong></td></tr>'); 584 if(count($UnionItems) > 0) 585 { 586 $ID = $Database->SQLCommand('SELECT *, ROUND(`Translated` / `Total` * 100, 2) AS `Percent` FROM ('.implode(' UNION ALL ', $UnionItems).') AS `C3` '.$Order['SQL'].$PageList['SQLLimit']); 587 while($Group = mysql_fetch_assoc($ID)) 588 { 589 echo('<tr><td>'.$Group['Name'].'</td><td>'.$Group['Translated'].'</td><td>'.$Group['Total'].'</td><td>'.ProgressBar(150, $Group['Percent']).'</td></tr>'); 590 $Translated += $Group['Translated']; 591 $Total += $Group['Total']; 592 } 593 } 594 if($Total > 0) $Percent = $Translated / $Total * 100; 595 else $Percent = 100; 596 597 echo('<tr><td><strong>Celkem</strong></td><td><strong>'.$Translated.'</strong></td><td><strong>'.$Total.'</strong></td><td><strong>'.ProgressBar(150, round($Percent, 2)).'</strong></td></tr>'); 587 598 echo('</table>'); 588 599 } -
trunk/index.php
r429 r433 10 10 $DbResult = $Database->SQLCommand('SELECT `News`.`Time`, `User`.`Name`, `News`.`Text` FROM `News` JOIN `User` ON `User`.`ID` = `News`.`User` ORDER BY `Time` DESC LIMIT 10'); 11 11 while($DbRow = mysql_fetch_assoc($DbResult)) 12 $Output .= '<div><strong>'.$DbRow['Name'].' ('. date('d.m.Y', MysqlDateTimeToTime($DbRow['Time'])).')</strong> <br />'.$DbRow['Text'].'</div>';12 $Output .= '<div><strong>'.$DbRow['Name'].' ('.HumanDate($DbRow['Time']).')</strong> <br />'.$DbRow['Text'].'</div>'; 13 13 $Output .= '<a href="action.php?action=news">Všechny zprávy</a>'; 14 14 $Output .= '</div>'; -
trunk/sql/updates/428.sql
r428 r433 4 4 UPDATE `Group` SET `Name` = 'EventAI' WHERE `Group`.`Id` =11; 5 5 UPDATE `Group` SET `Name` = 'Skripty ScriptDev2' WHERE `Group`.`Id` =10; 6 7 UPDATE `GroupItem` SET `Name` = 'Podrobnosti' WHERE `GroupItem`.`Id` =2;
Note:
See TracChangeset
for help on using the changeset viewer.