Changeset 131 for trunk/img_level.php
- Timestamp:
- Feb 24, 2009, 4:44:44 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/img_level.php
r130 r131 97 97 } 98 98 99 //hlavní kod 99 //hlavní kod pro uživatele 100 100 if ($nothide) $ID = $Database->SQLCommand('SELECT ID,user FROM user'); 101 101 else $ID = $Database->SQLCommand('SELECT ID,user FROM user WHERE NeedUpdate = 1'); 102 103 102 while ($LineUser = mysql_fetch_array($ID)) { 104 103 $xp = GetXPFromTranslation($LineUser['ID']); //načítání XP 105 104 $Database->SQLCommand('UPDATE user SET XP = '.$xp.' WHERE ID = '.$LineUser['ID']); //ukládání XP pro řazení 106 105 CreateImg($LineUser['user'],$xp); //vytváření obrázku 107 if ($nothide) echo ('<img src="tmp/'.$LineUser['user'].'/level.png" /><br>'); 106 if ($nothide) echo ('<img src="tmp/'.$LineUser['user'].'/level.png" /><br />'); 107 } 108 //hlavní kod pro překladatelské týmy 109 if ($nothide) $ID = $Database->SQLCommand('SELECT ID,name,(SELECT avg(XP) FROM user WHERE team = team.ID) as average FROM team'); 110 else $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)'); 111 while ($LineTeam = mysql_fetch_array($ID)) { 112 CreateImg($LineTeam['name'],$LineTeam['average']); //vytváření obrázku 113 if ($nothide) echo ('<img src="tmp/'.$LineTeam['name'].'/level.png" /><br />'); 108 114 } 109 115 $Database->SQLCommand('UPDATE user SET NeedUpdate = 0');
Note:
See TracChangeset
for help on using the changeset viewer.