Changeset 681 for trunk/pages/realmlist.php
- Timestamp:
- Jan 23, 2010, 1:32:45 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 mm 2 Thumbs.db 1 gallery 2 armory 3 tester 4 test 5 minimanager 6 mmfpm
-
- Property svn:ignore
-
trunk/pages/realmlist.php
r677 r681 1 1 <?php 2 2 3 $Output = '<h2 align="center">Seznam světů</h2>'; 4 5 $Output .= '<table class="BaseTable">'. 6 '<tr>'. 7 '<th>Název</th>'. 8 '<th>Násobek XP</th>'. 9 '<th>Zaměření</th>'. 10 '<th>Stav</th>'. 11 '<th>Hráči online / max. online / celkem</th>'. 12 '</tr>'; 13 14 foreach($Config['Mangos']['RealmList'] as $Index => $RealmConfig) 3 if(array_key_exists('Server', $_GET)) 15 4 { 16 $db->select_db($Config['Mangos']['DatabaseRealmd']); 17 $DbResult = $db->query('SELECT * FROM `realmlist` WHERE id='.$RealmConfig['Id']); 5 $DbResult = $System->Database->query('SELECT Logon.Id, Host.Address, Logon.Port FROM Logon JOIN Host ON Host.Id=Logon.Host WHERE Logon.Id='.$_GET['Server']); 18 6 if($DbResult->num_rows > 0) 19 7 { 20 $Realm = new Realm($System, $Index); 21 $DbRow = $DbResult->fetch_assoc(); 22 $Output .= '<tr><td><a href="?page=online&RealmIndex='.$Index.'">'.$RealmConfig['Name'].'</a></td><td>'.$RealmConfig['XPRate'].'</td><td>'.$RealmConfig['Type'].'</td><td>'.$server->OnlineStateImage($System->NetworkPortState($DbRow['address'], $DbRow['port'])).'</td><td>'.$Realm->OnlineCharactersCount($Index).' / '.$RealmConfig['MaxOnlinePlayers'].' / '.$Realm->CharacterCount($Index).'</td></tr>'; 23 $Output .= '<tr><td colspan="5">'.$RealmConfig['Description'].'</td></tr>'; 24 //if(array_key_exists($Index + 1, $Config['Mangos']['RealmList'])) 25 $Output .= '<tr><td colspan="5"> </td></tr>'; 8 $Realm = $DbResult->fetch_assoc(); 9 echo('set realmlist '.$Realm['Address']); 10 if($Realm['Port'] != 3724) echo(':'.$Realm['Port']); 11 echo('</div>'); 12 } else echo('Neznámé Id serveru'); 13 } else 14 { 15 $Output = '<h2 align="center">Seznam světů</h2>'; 16 17 $DbResult = $System->Database->query('SELECT Logon.Id, Host.Address, Logon.Port FROM Logon JOIN Host ON Host.Id=Logon.Host'); 18 while($DbRow = $DbResult->fetch_assoc()) 19 { 20 $Server = new Server($System, $DbRow['Id']); 21 $Output .= '<div style="text-align: center">Realmlist <a href="?page=realmlist&Server='.$DbRow['Id'].'">'.$DbRow['Address']; 22 if($DbRow['Port'] != 3724) $Output .= ':'.$DbRow['Port']; 23 $Output .= '</a></div>'; 24 $Output .= '<table class="BaseTable">'. 25 '<tr>'. 26 '<th>Název</th>'. 27 '<th>Násobek XP</th>'. 28 '<th>Zaměření</th>'. 29 '<th>Stav</th>'. 30 '<th>Hráči online / max. online / celkem</th>'. 31 '</tr>'; 32 33 $DbResult2 = $System->Database->query('SELECT * FROM Realm WHERE Logon='.$Server->Id.' ORDER BY Name'); 34 while($DbRow = $DbResult2->fetch_assoc()) 35 { 36 $Realm = new Realm($System, $DbRow['Id']); 37 $Output .= '<tr><td><a href="?page=online&RealmIndex='.$Realm->Id.'">'.$Realm->Data['Name'].'</a></td><td>'.$Realm->Data['Rate'].'</td><td>'.$Realm->Data['Type'].'</td><td>'.$Server->OnlineStateImage($Realm->Data['Online']).'</td><td>'.$Realm->OnlineCharactersCount().' / '.$Realm->Data['MaxOnlinePlayers'].' / '.$Realm->CharacterCount().'</td></tr>'; 38 $Output .= '<tr><td colspan="5">'.$Realm->Data['Description'].'</td></tr>'; 39 //if(array_key_exists($Index + 1, $Config['Mangos']['RealmList'])) 40 $Output .= '<tr><td colspan="5"> </td></tr>'; 41 } 42 $Output .= '</table><br/>'; 26 43 } 44 echo($Output); 27 45 } 28 $Output .= '</table>';29 echo($Output);30 46 31 47 ?>
Note:
See TracChangeset
for help on using the changeset viewer.