Changeset 695 for trunk/pages/svety.php
- Timestamp:
- Mar 20, 2010, 9:10:18 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pages/svety.php
r693 r695 1 1 <?php 2 2 3 function RealmList() 4 { 5 global $System, $html; 6 3 7 if(array_key_exists('Server', $_GET)) 4 8 { … … 31 35 '</tr>'; 32 36 33 $DbResult2 = $System->Database->query('SELECT * FROM Realm WHERE Logon='.$Server->Id.' AND Enabled=1 ORDER BY Name');37 $DbResult2 = $System->Database->query('SELECT *, '.$System->SQLURLName('Name').' AS URLName FROM Realm WHERE Logon='.$Server->Id.' AND Enabled=1 ORDER BY Name'); 34 38 while($DbRow = $DbResult2->fetch_assoc()) 35 39 { 36 40 $Realm = new Realm($System, $DbRow['Id']); 37 $Output .= '<tr><td><a href="'.$html->Link('/ online-hraci/?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>';41 $Output .= '<tr><td><a href="'.$html->Link('/svety/'.$DbRow['URLName'].'/').'">'.$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 42 $Output .= '<tr><td colspan="5">'.$Realm->Data['Description'].'</td></tr>'; 39 43 //if(array_key_exists($Index + 1, $Config['Mangos']['RealmList'])) … … 44 48 echo($Output); 45 49 } 50 } 51 52 function RealmInfo() 53 { 54 global $System; 55 56 $DbResult = $System->Database->query('SELECT * FROM Realm WHERE Id='.$_COOKIE['RealmIndex']); 57 $Realm = $DbResult->fetch_assoc(); 58 echo('<h2 align="center">'.$Realm['Name'].'</h2>'); 59 echo($Realm['Information']); 60 } 61 62 if(count($QueryItems) > 1) 63 { 64 $RealmName = $QueryItems[1]; 65 $DbResult = $System->Database->query('SELECT Id FROM Realm WHERE '.$System->SQLURLName('Name').'="'.$RealmName.'"'); 66 $DbRow = $DbResult->fetch_assoc(); 67 $_COOKIE['RealmIndex'] = $DbRow['Id']; 68 69 if(count($QueryItems) > 2) 70 { 71 if($QueryItems[2] == 'online-hraci') include('online-hraci.php'); 72 else if($QueryItems[2] == 'prikazy') include('prikazy.php'); 73 else if($QueryItems[2] == 'akce') include('akce.php'); 74 else if($QueryItems[2] == 'arena') include('arena.php'); 75 else if($QueryItems[2] == 'nej-hraci') include('nej-hraci.php'); 76 else if($QueryItems[2] == 'mapa') include('mapa.php'); 77 else if($QueryItems[2] == 'spolek') include('spolek.php'); 78 else if($QueryItems[2] == 'spolky') include('spolky.php'); 79 else RealmInfo(); 80 } else RealmInfo(); 81 } else RealmList(); 46 82 47 83 ?>
Note:
See TracChangeset
for help on using the changeset viewer.