Changeset 630 for trunk/pages
- Timestamp:
- Aug 26, 2009, 3:07:07 PM (15 years ago)
- Location:
- trunk/pages
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/pages/arena.php
r614 r630 18 18 } 19 19 20 $db->select_db($Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters']); 20 $Realm = new Realm($System, $_COOKIE['RealmIndex']); 21 $db = $Realm->Database; 22 $db->select_db($Config['Mangos']['RealmList'][$Realm->Id]['DatabaseCharacters']); 23 21 24 $count = $db->query('SELECT COUNT(*) FROM arena_team')->fetch_row(); 22 25 $all_record = $count[0]; -
trunk/pages/commands.php
r614 r630 4 4 $Output .= $server->RealmSelection(); 5 5 6 $db->select_db($Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseMangos']); 6 $Realm = new Realm($System, $_COOKIE['RealmIndex']); 7 $db = $Realm->Database; 8 $db->select_db($Config['Mangos']['RealmList'][$Realm->Id]['DatabaseMangos']); 7 9 8 10 $Output .= '<ul>'; -
trunk/pages/events.php
r614 r630 90 90 echo('<h3 class="PageTitle">Události ve hře</h3>'); 91 91 echo($server->RealmSelection()); 92 $Realm = new Realm($System, $_COOKIE['RealmIndex']); 93 $db = $Realm->Database; 94 $db->select_db($Config['Mangos']['RealmList'][$Realm->Id]['DatabaseMangos']); 92 95 93 96 $Events = Events(); -
trunk/pages/gmteam.php
r627 r630 3 3 function ShowGMList($Realm) 4 4 { 5 global $db, $ Config;5 global $db, $db2, $Config; 6 6 7 7 $Result = $db->query('SELECT * FROM `GmTeam` WHERE (`RealmId` = '.$Realm['Id'].') AND (`TimeTo` IS NULL) ORDER BY `RealmId`, `Nick`'); … … 21 21 $Output .= '<td>'; 22 22 $Characters = array(); 23 $ResultMangos = $db ->query('SELECT * FROM `'.$Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters'].'`.`characters` WHERE `account` = "'.$Line['AccountId'].'"');23 $ResultMangos = $db2->query('SELECT * FROM `characters` WHERE `account` = "'.$Line['AccountId'].'"'); 24 24 while($LineMangos = $ResultMangos->fetch_array()) 25 25 { … … 49 49 //$_COOKIE['RealmIndex'] 50 50 51 $Realm = new Realm($System, $_COOKIE['RealmIndex']); 52 $db2 = $Realm->Database; 53 $db2->select_db($Config['Mangos']['RealmList'][$Realm->Id]['DatabaseCharacters']); 54 51 55 $db->select_db($Config['Database']['Database']); 52 56 $Output = '<h2 class="PageTitle">GM tým</h3>'; -
trunk/pages/guilda.php
r609 r630 10 10 } 11 11 12 $db->select_db($Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters']); 12 $Realm = new Realm($System, $_COOKIE['RealmIndex']); 13 $db = $Realm->Database; 14 $db->select_db($Config['Mangos']['RealmList'][$Realm->Id]['DatabaseCharacters']); 13 15 $id = (isset($_GET['id'])) ? $_GET['id'] : 0; 14 16 if($id != 0) -
trunk/pages/guildy.php
r614 r630 43 43 </tr>'); 44 44 45 $db->select_db($Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters']); 45 $Realm = new Realm($System, $_COOKIE['RealmIndex']); 46 $db = $Realm->Database; 47 $db->select_db($Config['Mangos']['RealmList'][$Realm->Id]['DatabaseCharacters']); 46 48 47 49 $sql = $db->query('SELECT `guild`.homepage, `guild`.name, `guild`.guildid, `guild`.createdate, COUNT(`guild_member`.`guildid`) AS member_count ,`leader`.`race` IN (1, 3, 4, 7, 11) AS fraction , `leader`.`guid` AS leader FROM `guild` JOIN `guild_member` ON `guild_member`.`guildid` = `guild`.`guildid` JOIN `characters` AS `memebers` ON `memebers`.`guid`= `guild_member`.`guid` JOIN `characters` AS `leader` ON `leader`.`guid`= `guild`.`leaderguid` GROUP BY guild.name ORDER BY '.$order_by.' '.$order_dir.';'); -
trunk/pages/online.php
r615 r630 24 24 echo($server->RealmSelection()); 25 25 26 echo('<div style="text-align: center">Celkem '.$server->MangosOnline($_COOKIE['RealmIndex']).' hráčů.</div>'. 26 $Realm = new Realm($System, $_COOKIE['RealmIndex']); 27 echo('<div style="text-align: center">Celkem '.$Realm->OnlineCharactersCount().' hráčů.</div>'. 27 28 '<table class="BaseTable"> 28 29 <tr> … … 36 37 MakeLink('Aréna body', 'arena_points').'</th></tr>'); 37 38 38 $ db->select_db($Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters']);39 $sql = $ db->query('SELECT guid, name, race, class, zone, map, '.39 $Realm->Database->select_db($Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters']); 40 $sql = $Realm->Database->query('SELECT guid, name, race, class, zone, map, '. 40 41 'CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, " ", '.$Config['Mangos']['CharacterDataOffset']['HonorPoints'].'+1), " ", -1) AS UNSIGNED) AS highest_rank, '. 41 42 'CAST( SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, " ", '.$Config['Mangos']['CharacterDataOffset']['Level'].' + 1), " ", -1) AS UNSIGNED) AS level, '. -
trunk/pages/realmlist.php
r616 r630 18 18 if($DbResult->num_rows > 0) 19 19 { 20 $Realm = new Realm($System, $Index); 20 21 $DbRow = $DbResult->fetch_assoc(); 21 $Output .= '<tr><td><a href="?page=online&RealmIndex='.$Index.'">'.$RealmConfig['Name'].'</a></td><td>'.$RealmConfig['XPRate'].'x</td><td>'.$RealmConfig['Type'].'</td><td>'.$server-> ServerImg($server->ServerOnline($DbRow['address'], $DbRow['port'])).'</td><td>'.$server->MangosOnline($Index).' / '.$RealmConfig['MaxOnlinePlayers'].' / '.$server->CharacterCount($Index).'</td></tr>';22 $Output .= '<tr><td><a href="?page=online&RealmIndex='.$Index.'">'.$RealmConfig['Name'].'</a></td><td>'.$RealmConfig['XPRate'].'x</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>'; 22 23 $Output .= '<tr><td colspan="5">'.$RealmConfig['Description'].'</td></tr>'; 23 24 if(array_key_exists($Index + 1, $Config['Mangos']['RealmList'])) $Output .= '<tr><td colspan="5"> </td></tr>'; -
trunk/pages/server.php
r628 r630 8 8 <tr> 9 9 <td>Přihlašovací server je</td> 10 <td>'.$server-> ServerImg($server->ServerOnline($Config['Web']['WoWServerAddr'], 3724)).'</td>10 <td>'.$server->OnlineStateImage($System->NetworkPortState($Config['Web']['WoWServerAddr'], 3724)).'</td> 11 11 </tr> 12 12 <tr> … … 16 16 <tr> 17 17 <td>Ve všech světech přítomno</td> 18 <td>'.$server->ServerMangosOnline().' hráčů</td> 19 </tr> 20 <tr> 21 <td>Server beží bez restartu</td> 22 <td>'.$server->ServerUptime().' (hodiny)</td> 18 <td>'.$server->OnlineAccountCount().' hráčů</td> 23 19 </tr> 24 20 <tr> … … 28 24 <tr> 29 25 <td>Ve všech světech uloženo</td> 30 <td>'.$server-> ServerCharacterCount().' postav</td>26 <td>'.$server->CharacterCount().' postav</td> 31 27 </tr> 32 28 <tr> 33 29 <td><a href="?page=teamspeak">TeamSpeak</a> server je</td> 34 <td>'.$server-> ServerImg($server->ServerOnline($Config['Web']['WoWServerAddr'], 51234)).'</td>30 <td>'.$server->OnlineStateImage($System->NetworkPortState($Config['Web']['WoWServerAddr'], 51234)).'</td> 35 31 </tr> 36 32 <tr> 37 33 <td><a href="http://www.heroesoffantasy.cz:6969/">Torrent</a> server je</td> 38 <td>'.$server-> ServerImg($server->ServerOnline($Config['Web']['WoWServerAddr'], 6969)).'</td>34 <td>'.$server->OnlineStateImage($System->NetworkPortState($Config['Web']['WoWServerAddr'], 6969)).'</td> 39 35 </tr> 40 36 <tr> … … 65 61 { 66 62 $Realms = array(); 67 foreach($Server['Realms'] as $Realm) 68 $Realms[] = $Config['Mangos']['RealmList'][$Realm]['Name']; 63 foreach($Config['Mangos']['RealmList'] as $RealmIndex => $Realm) 64 { 65 if($Realm['Server'] == $Index) $Realms[] = $Realm['Name']; 66 } 69 67 70 68 $Output .= '<table class="BaseTable" style="width: 100%; margin: 5px;"> -
trunk/pages/tophraci.php
r614 r630 21 21 } 22 22 23 $db->select_db($Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters']); 23 $Realm = new Realm($System, $_COOKIE['RealmIndex']); 24 $db = $Realm->Database; 25 $db->select_db($Config['Mangos']['RealmList'][$Realm->Id]['DatabaseCharacters']); 26 24 27 $sql = 'SELECT name, totaltime, online FROM characters ORDER BY totaltime DESC LIMIT '.$top; 25 28 $result = $db->query($sql);
Note:
See TracChangeset
for help on using the changeset viewer.