| 1 | <?php
|
|---|
| 2 |
|
|---|
| 3 | $DbResult = $System->Database->query('SELECT COUNT(*) FROM Realm WHERE Enabled=1');
|
|---|
| 4 | $DbRow = $DbResult->fetch_row();
|
|---|
| 5 | $RealmCount = $DbRow[0];
|
|---|
| 6 |
|
|---|
| 7 | // Check servers online state.
|
|---|
| 8 | $DbResult = $System->Database->query('SELECT COUNT(*) FROM Logon WHERE Online = 1 AND Enabled=1');
|
|---|
| 9 | $DbRow = $DbResult->fetch_row();
|
|---|
| 10 | $OnlineState = $DbRow[0] > 0; // Report online state if one of all servers is online.
|
|---|
| 11 |
|
|---|
| 12 | $Output = '<h2 class="PageTitle">O serveru</h2>'.
|
|---|
| 13 | '<table class="BaseTable">
|
|---|
| 14 | <tr>
|
|---|
| 15 | <th colspan="2">Statistiky</th>
|
|---|
| 16 | </tr>
|
|---|
| 17 | <tr>
|
|---|
| 18 | <td>Přihlašovací server je</td>
|
|---|
| 19 | <td>'.$server->OnlineStateImage($OnlineState).'</td>
|
|---|
| 20 | </tr>
|
|---|
| 21 | <tr>
|
|---|
| 22 | <td>Celkem světů</td>
|
|---|
| 23 | <td>'.$RealmCount.'</td>
|
|---|
| 24 | </tr>
|
|---|
| 25 | <tr>
|
|---|
| 26 | <td>Ve všech světech přítomno</td>
|
|---|
| 27 | <td>'.$server->OnlineCharactersCount().' hráčů</td>
|
|---|
| 28 | </tr>
|
|---|
| 29 | <tr>
|
|---|
| 30 | <td>V databázi uloženo</td>
|
|---|
| 31 | <td>'.$server->AccountCount().' účtů</td>
|
|---|
| 32 | </tr>
|
|---|
| 33 | <tr>
|
|---|
| 34 | <td>Ve všech světech uloženo</td>
|
|---|
| 35 | <td>'.$server->CharacterCount().' postav</td>
|
|---|
| 36 | </tr>
|
|---|
| 37 | <tr>
|
|---|
| 38 | <td><a href="'.$html->Link('/teamspeak/').'">TeamSpeak</a> server je</td>
|
|---|
| 39 | <td>'.$server->OnlineStateImage($System->NetworkPortState($Config['Web']['WoWServerAddr'], 9987)).'</td>
|
|---|
| 40 | </tr>
|
|---|
| 41 | <tr>
|
|---|
| 42 | <td><a href="http://www.heroesoffantasy.cz:6969/">Torrent</a> server je</td>
|
|---|
| 43 | <td>'.$server->OnlineStateImage($System->NetworkPortState($Config['Web']['WoWServerAddr'], 6969)).'</td>
|
|---|
| 44 | </tr>
|
|---|
| 45 | <tr>
|
|---|
| 46 | <td>Datum založení</td>
|
|---|
| 47 | <td>'.$Config['Web']['ServerFounded'].'</td>
|
|---|
| 48 | </tr>
|
|---|
| 49 | <tr>
|
|---|
| 50 | <th colspan="2">Software</th>
|
|---|
| 51 | </tr>
|
|---|
| 52 | <tr>
|
|---|
| 53 | <td>Aktuální WoW emulátor</td>
|
|---|
| 54 | <td>MaNGOS rev.'.$Config['Mangos']['Revision'].'</td>
|
|---|
| 55 | </tr>
|
|---|
| 56 | <tr>
|
|---|
| 57 | <td>Aktuální WoW databáze</td>
|
|---|
| 58 | <td>UDB '.$Config['Mangos']['UDBVersion'].' rev. '.$Config['Mangos']['UDBRevision'].'</td>
|
|---|
| 59 | </tr>
|
|---|
| 60 | <tr>
|
|---|
| 61 | <td>ScriptDev2</td>
|
|---|
| 62 | <td>Scriptdev2 rev. '.$Config['Mangos']['ScriptDev2Revision'].'</td>
|
|---|
| 63 | </tr>
|
|---|
| 64 | <tr>
|
|---|
| 65 | <th colspan="2">Servery</th>
|
|---|
| 66 | </tr>
|
|---|
| 67 | <tr><td colspan="2" style="padding: 5px;">';
|
|---|
| 68 |
|
|---|
| 69 | $DbResult = $System->Database->query('SELECT * FROM Host');
|
|---|
| 70 | while($Host = $DbResult->fetch_assoc())
|
|---|
| 71 | {
|
|---|
| 72 | $Realms = array();
|
|---|
| 73 | $DbResult2 = $System->Database->query('SELECT * FROM Realm');
|
|---|
| 74 | while($Realm = $DbResult2->fetch_assoc())
|
|---|
| 75 | {
|
|---|
| 76 | if($Realm['Host'] == $Host['Id']) $Realms[] = $Realm['Name'];
|
|---|
| 77 | }
|
|---|
| 78 |
|
|---|
| 79 | $Output .= '<table class="BaseTable" style="width: 100%; margin: 5px;">
|
|---|
| 80 | <tr>
|
|---|
| 81 | <th colspan="2">Server '.$Index.'</td>
|
|---|
| 82 | </tr>
|
|---|
| 83 | <tr>
|
|---|
| 84 | <td>Operační systém</td>
|
|---|
| 85 | <td>'.$Host['OS'].'</td>
|
|---|
| 86 | </tr>
|
|---|
| 87 | <tr>
|
|---|
| 88 | <td>Procesor</td>
|
|---|
| 89 | <td>'.$Host['CPU'].'</td>
|
|---|
| 90 | </tr>
|
|---|
| 91 | <tr>
|
|---|
| 92 | <td>Operační paměť</td>
|
|---|
| 93 | <td>'.$Host['Memory'].'</td>
|
|---|
| 94 | </tr>
|
|---|
| 95 | <tr>
|
|---|
| 96 | <td>Pevný disk</td>
|
|---|
| 97 | <td>'.$Host['HDD'].'</td>
|
|---|
| 98 | </tr>
|
|---|
| 99 | <tr>
|
|---|
| 100 | <td>Adresa serveru</td>
|
|---|
| 101 | <td>'.$Host['Address'].'</td>
|
|---|
| 102 | </tr>
|
|---|
| 103 | <tr>
|
|---|
| 104 | <td>Internetová linka</td>
|
|---|
| 105 | <td>'.$Host['Internet'].'</td>
|
|---|
| 106 | </tr>
|
|---|
| 107 | <tr>
|
|---|
| 108 | <td>Světy</td>
|
|---|
| 109 | <td>'.implode(', ', $Realms).'</td>
|
|---|
| 110 | </tr>
|
|---|
| 111 | <tr>
|
|---|
| 112 | <td>Grafy</td>
|
|---|
| 113 | <td><a href="'.$Host['Statistic'].'">'.$Host['Statistic'].'</a></td>
|
|---|
| 114 | </tr>
|
|---|
| 115 | </table>';
|
|---|
| 116 | }
|
|---|
| 117 | $Output .= '</td></tr>
|
|---|
| 118 | </table>';
|
|---|
| 119 |
|
|---|
| 120 | echo($Output);
|
|---|
| 121 |
|
|---|
| 122 | ?>
|
|---|