Changeset 699
- Timestamp:
- Mar 22, 2010, 7:42:20 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/player.php
r693 r699 98 98 } 99 99 100 public function GetPlayerLvl($guid )100 public function GetPlayerLvl($guid, $RealmId) 101 101 { 102 102 global $Config, $System; 103 103 104 $Realm = new Realm($System, $ _COOKIE['RealmIndex']);104 $Realm = new Realm($System, $RealmId); 105 105 $DbResult = $Realm->CharactersDatabase->query('SELECT CAST(SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, " ", '.($Config['Mangos']['CharacterDataOffset']['Level'] + 1).'), " ", -1) AS UNSIGNED) AS `level` FROM `characters` WHERE `guid` = "'.$guid.'" LIMIT 1;'); 106 106 $row = $DbResult->fetch_assoc(); … … 329 329 global $Config, $System, $html; 330 330 331 echo('<table class="BaseTable"> 331 $DbResult = $System->Database->query('SELECT Name,Id FROM Realm WHERE Enabled=1'); 332 while($DbRealm = $DbResult->fetch_array()) 333 { 334 echo('<div>'.$DbRealm['Name'].'</div>'); 335 echo('<table class="BaseTable"> 332 336 <tr> 333 337 <th>Jméno</th> … … 337 341 <th>Nahráno</th> 338 342 </tr>'); 339 $Realm = new Realm($System, $_COOKIE['RealmIndex']);340 $sql = $Realm->CharactersDatabase->query('SELECT `guid`,`name`,`race`,`totaltime`,`class`, mid(lpad( hex( CAST(substring_index(substring_index(data, " ", '.($Config['Mangos']['CharacterDataOffset']['Gender'] + 1).'), " ",-1) AS unsigned) ), 8, 0), 4, 1) AS gender FROM `characters` WHERE `account`='.$accid.' ORDER BY `totaltime` DESC LIMIT 0, 10');341 while($row = $sql->fetch_array())342 {343 $gender = ($row['gender'] == 0) ? '0' : '1';344 echo('<tr>'.343 $Realm = new Realm($System, $DbRealm['Id']); 344 $sql = $Realm->CharactersDatabase->query('SELECT `guid`,`name`,`race`,`totaltime`,`class`, mid(lpad( hex( CAST(substring_index(substring_index(data, " ", '.($Config['Mangos']['CharacterDataOffset']['Gender'] + 1).'), " ",-1) AS unsigned) ), 8, 0), 4, 1) AS gender FROM `characters` WHERE `account`='.$accid.' ORDER BY `totaltime` DESC LIMIT 0, 10'); 345 while($row = $sql->fetch_array()) 346 { 347 $gender = ($row['gender'] == 0) ? '0' : '1'; 348 echo('<tr>'. 345 349 '<td>'.$row['name'].'</td>'. 346 '<td>'.$this->GetPlayerLvl($row['guid'] ).'</td>'.347 '<td><img src="'.$html->Link(' imgs/icons/'.$row['race'].'-'.$gender.'.gif').'" alt="rasa" /></td>'.350 '<td>'.$this->GetPlayerLvl($row['guid'], $DbRealm['Id']).'</td>'. 351 '<td><img src="'.$html->Link('/imgs/icons/'.$row['race'].'-'.$gender.'.gif').'" alt="rasa" /></td>'. 348 352 '<td><img src="'.$html->Link('/imgs/icons/'.$row['class'].'.gif').'" alt="trida" /></td>'. 349 353 '<td>'.round($row['totaltime'] / 3600).' h</td>'. 350 354 '</tr>'); 351 } 352 echo('</table>'); 355 } 356 echo('</table>'); 357 } 353 358 } 354 359 } -
trunk/pages/ucet-postavy.php
r692 r699 2 2 3 3 $html->PrgStart(); 4 echo($server->RealmSelection()); 5 echo(' <a href="'.$html->Link('/ucet/').'"><- Zpět do správy účtu</a>'); 4 //echo(' <a href="'.$html->Link('/ucet/').'"><- Zpět do správy účtu</a>'); 6 5 7 6 $player->CharsOnAcc($_SESSION['UserId']);
Note:
See TracChangeset
for help on using the changeset viewer.