Changeset 365 for trunk/img_level.php
- Timestamp:
- Mar 9, 2010, 11:29:05 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/img_level.php
r357 r365 72 72 else $groupby .= ', '.$TextItem['Column']; 73 73 } 74 $IDtran = $Database->SQLCommand('SELECT * FROM `'.$Group['TablePrefix'].'` WHERE User = '.$user_ID.' AND Complete= 1 '.$groupby);74 $IDtran = $Database->SQLCommand('SELECT * FROM `'.$Group['TablePrefix'].'` WHERE `User` = '.$user_ID.' AND `Complete` = 1 '.$groupby); 75 75 while($Line = mysql_fetch_array($IDtran)) 76 76 { //jednotlivé překlady … … 106 106 107 107 // Hlavní kod pro uživatele 108 $ID = $Database->SQLCommand('SELECT `ID`, ` user` FROM `user` WHERE `NeedUpdate` = 1');108 $ID = $Database->SQLCommand('SELECT `ID`, `Name` FROM `User` WHERE `NeedUpdate` = 1'); 109 109 while($LineUser = mysql_fetch_array($ID)) 110 110 { … … 120 120 121 121 $xp = GetXPFromTranslation($LineUser['ID']); 122 $Database->SQLCommand('UPDATE ` user` SET `XP` = '.$xp.', `TranslatedCount` = '.$TranslatedCount.' WHERE `user`.`ID` = '.$LineUser['ID']);123 CreateImg('user', $LineUser[' user'], $xp);122 $Database->SQLCommand('UPDATE `User` SET `XP` = '.$xp.', `TranslatedCount` = '.$TranslatedCount.' WHERE `User`.`ID` = '.$LineUser['ID']); 123 CreateImg('user', $LineUser['Name'], $xp); 124 124 } 125 125 126 126 // Hlavní kod pro překladatelské týmy 127 $ID = $Database->SQLCommand('SELECT `ID`, ` name`, (SELECT AVG(`XP`) FROM `user` WHERE `team` = `Team`.`Id`) AS `average` FROM `Team` WHERE `ID` IN (SELECT `Team` FROM `user` WHERE `NeedUpdate` = 1)');127 $ID = $Database->SQLCommand('SELECT `ID`, `Name`, (SELECT AVG(`XP`) FROM `User` WHERE `Team` = `Team`.`Id`) AS `Average` FROM `Team` WHERE `ID` IN (SELECT `Team` FROM `User` WHERE `NeedUpdate` = 1)'); 128 128 while($LineTeam = mysql_fetch_array($ID)) 129 129 { 130 CreateImg('team', $LineTeam[' name'], substr($LineTeam['average'], 0, strpos($LineTeam['average'],'.'))); //vytváření obrázku130 CreateImg('team', $LineTeam['Name'], substr($LineTeam['Average'], 0, strpos($LineTeam['Average'],'.'))); //vytváření obrázku 131 131 } 132 $Database->SQLCommand('UPDATE ` user` SET `NeedUpdate` = 0');132 $Database->SQLCommand('UPDATE `User` SET `NeedUpdate` = 0'); 133 133 } 134 134 … … 138 138 139 139 // Do update for all users 140 $Database->SQLCommand('UPDATE ` user` SET `NeedUpdate` = 1');140 $Database->SQLCommand('UPDATE `User` SET `NeedUpdate` = 1'); 141 141 ImgLevelUpdate(); 142 142 143 143 echo('<strong>Uživatelé</strong><br/>'); 144 $ID = $Database->SQLCommand('SELECT `ID`, ` user` FROM `user`');144 $ID = $Database->SQLCommand('SELECT `ID`, `Name` FROM `User`'); 145 145 while($LineUser = mysql_fetch_array($ID)) 146 146 { 147 echo('<img src="tmp/user/'.$LineUser[' user'].'/level.png" /> '.$LineUser['user'].'<br />');147 echo('<img src="tmp/user/'.$LineUser['Name'].'/level.png" /> '.$LineUser['Name'].'<br />'); 148 148 } 149 149 150 150 echo('<br/><strong>Týmy</strong><br/>'); 151 $ID = $Database->SQLCommand('SELECT ID, Name FROM Team');151 $ID = $Database->SQLCommand('SELECT `ID`, `Name` FROM `Team`'); 152 152 while($LineTeam = mysql_fetch_array($ID)) 153 153 {
Note:
See TracChangeset
for help on using the changeset viewer.