Changeset 630
- Timestamp:
- Aug 26, 2009, 3:07:07 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 2 deleted
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Readme.txt
r600 r630 26 26 pages - složka se stránkami webu 27 27 mangos_debug - záznam a zobrazování logů mangosu 28 minimanager - webová správa databáze MaNGOSu29 28 30 29 Neverzované … … 35 34 36 35 Každých 5 minut spouštět skript inc/registration_update.php 36 37 38 5) Stažení podsložek jiných projektů 39 40 Stáhněte projekt Minimanager for Mangos pomocí: 41 svn co https://mmfpm.svn.sourceforge.net/svnroot/mmfpm/trunk minimanager 42 Zkopírujte a nastavte konfigurační soubor minimanager/scripts/config.php -
trunk/inc/config.sample.php
r627 r630 20 20 'ScriptDev2Revision' => '137', 21 21 'ClientVersion' => '3.1.3', 22 'DatabaseHost' => 'localhost', 23 'DatabaseUser' => 'server1', 24 'DatabasePassword' => 'server1', 22 25 'DatabaseRealmd' => 'realmd', 23 26 'RequiredOnlinePlayers' => 70, … … 35 38 'Id' => 7, 36 39 'Name' => 'Realm 1' 40 'DatabaseHost' => 'localhost', 41 'DatabaseUser' => 'server1', 42 'DatabasePassword' => 'server1', 37 43 'DatabaseCharacters' => 'realm1_characters', 38 44 'DatabaseMangos' => 'realm1_mangos', 39 45 'DatabaseScriptDev2' => 'realm1_scriptdev2', 46 'Server' => 1, 40 47 'MaxOnlinePlayers' => 100, 41 48 'XPRate' => 1, … … 63 70 'BankAccount' => '670100-2202937132/6210', 64 71 'ServerList' => array( 65 array(72 1 => array( 66 73 'OS' => 'GNU/Linux', 67 74 'CPU' => 'AMD Athlon 64 X2 5600+, 2,8 GHz', … … 70 77 'Address' => 'localhost', 71 78 'Internet' => '16/16 Mbit/s, agregace 1:32', 72 'Realms' => array(1),73 79 'Statistic' => 'http://localhost/stat/', 74 80 }, -
trunk/inc/html.php
r614 r630 284 284 function QuickNew() 285 285 { 286 global $server, $Config ;286 global $server, $Config, $System; 287 287 288 288 if(isset($_COOKIE['hof-quick']) AND $_COOKIE['hof-quick'] == 'no') … … 297 297 '<tr>'. 298 298 '<td colspan="2">'. 299 '<strong>Server : </strong>'.$server-> ServerImg($server->ServerOnline($Config['Web']['WoWServerAddr'], 3724)).'<b> (<a href="?page=realmlist">'.$server->ServerMangosOnline().' hráčů celkem</a>) | Patch '.$Config['Mangos']['ClientVersion'].' | <a href="'.$Config['Web']['BaseURL'].'/pages/realmlist.wtf">Realmlist</a> | <a href="?page=server">Server info</a> | <a href="?page=realmlist">Seznam světů</a></b>'.299 '<strong>Server : </strong>'.$server->OnlineStateImage($System->NetworkPortState($Config['Web']['WoWServerAddr'], 3724)).'<b> (<a href="?page=realmlist">'.$server->OnlineCharactersCount().' hráčů celkem</a>) | Patch '.$Config['Mangos']['ClientVersion'].' | <a href="'.$Config['Web']['BaseURL'].'/pages/realmlist.wtf">Realmlist</a> | <a href="?page=server">Server info</a> | <a href="?page=realmlist">Seznam světů</a></b>'. 300 300 '</td></tr></table><br />'); 301 301 } -
trunk/inc/server.php
r627 r630 5 5 } 6 6 7 class Server 7 class Server extends Module 8 8 { 9 private $db; 10 11 public function __construct($db) 12 { 13 $this->db = $db; 14 } 15 16 public function HumanDate($date, $time = 1) 9 function __construct($System, $Id) 10 { 11 parent::__construct($System); 12 $this->Id = $Id; 13 } 14 15 function HumanDate($date, $time = 1) 17 16 { 18 17 // input date is 0000-00-00 00:00:00 … … 27 26 } 28 27 29 public function RealmOnline() 30 { 31 global $Config; 32 33 $this->db->select_db($Config['Mangos']['DatabaseRealmd']); 34 $DbResult = $this->db->query('SELECT COUNT(*) FROM `account` WHERE `online` = 1'); 28 function OnlineAccountCount() 29 { 30 $this->Database->select_db($this->Config['Mangos']['DatabaseRealmd']); 31 $DbResult = $this->Database->query('SELECT COUNT(*) FROM `account` WHERE `online` = 1'); 35 32 $DbRow = $DbResult->fetch_row(); 36 33 return($DbRow[0]); 37 34 } 38 35 39 publicfunction ParseCopper($copper_in)36 function ParseCopper($copper_in) 40 37 { 41 38 $copper = $copper_in; … … 50 47 } 51 48 52 public function MangosOnline($RealmId) 53 { 54 global $Config; 55 56 $this->db->select_db($Config['Mangos']['RealmList'][$RealmId]['DatabaseCharacters']); 57 $DbResult = $this->db->query('SELECT COUNT(*) FROM `characters` WHERE `online` = 1'); 58 $DbRow = $DbResult->fetch_row(); 59 return($DbRow[0]); 60 } 61 62 public function ServerMangosOnline() 63 { 64 global $Config; 65 49 function OnlineCharactersCount() 50 { 66 51 $TotalCount = 0; 67 foreach($ Config['Mangos']['RealmList'] as $Index => $Realm)52 foreach($this->Config['Mangos']['RealmList'] as $Index => $Realm) 68 53 { 69 $TotalCount += $this->MangosOnline($Index); 54 $Realm = new Realm($this->System, $Index); 55 $TotalCount += $Realm->OnlineCharactersCount(); 70 56 } 71 57 return($TotalCount); 72 58 } 73 59 74 public function ServerOnline($Address, $Port, $Timeout = 0.5) 75 { 76 set_error_handler('NullErrorHandler'); 77 if($Socket = @fsockopen($Address, $Port, $ERROR_NO, $ERROR_STR, (float)$Timeout)) 60 function OnlineStateImage($Status) 61 { 62 if($Status) return('<img src="imgs/inc/on.gif" alt="online" /> <span style="text-color: #234303; text-size: 4;">Online</span>'); 63 else return('<img src="imgs/inc/off.gif" alt="offline" /> <span style="text-color: #990000; text-size: 4;">Offline</span>'); 64 } 65 66 function CharacterCount() 67 { 68 $TotalCount = 0; 69 foreach($this->Config['Mangos']['RealmList'] as $Index => $Realm) 78 70 { 79 fclose($Socket); 80 $Result = true; 81 } else $Result = false; 82 restore_error_handler(); 83 return($Result); } 84 85 public function ServerImg($status) 86 { 87 if($status) return('<img src="imgs/inc/on.gif" alt="online" /> <span style="text-color: #234303; text-size: 4;">Online</span>'); 88 else return('<img src="imgs/inc/off.gif" alt="offline" /> <span style="text-color: #990000; text-size: 4;">Offline</span>'); 89 } 90 91 public function ServerUptime() 92 { 93 global $Config; 94 95 $this->db->select_db($Config['Mangos']['DatabaseRealmd']); 96 $row = $this->db->query('SELECT `starttime`, `uptime` FROM `uptime` ORDER BY `starttime` DESC LIMIT 1') 97 ->fetch_array(); 98 $uptime = round($row['uptime'] / 3600); 99 return($uptime); 100 } 101 102 public function CharacterCount($RealmId) 103 { 104 global $Config; 105 106 $this->db->select_db($Config['Mangos']['RealmList'][$RealmId]['DatabaseCharacters']); 107 $DbResult = $this->db->query('SELECT COUNT(*) FROM `characters`'); 108 $DbRow = $DbResult->fetch_row(); 109 return($DbRow[0]); 110 } 111 112 public function ServerCharacterCount() 113 { 114 global $Config; 115 116 $TotalCount = 0; 117 foreach($Config['Mangos']['RealmList'] as $Index => $Realm) 118 { 119 $TotalCount += $this->CharacterCount($Index); 71 $Realm = new Realm($this->System, $Index); 72 $TotalCount += $Realm->CharacterCount($Index); 120 73 } 121 74 return($TotalCount); … … 124 77 public function AccountCount() 125 78 { 126 global $Config; 127 128 $this->db->select_db($Config['Mangos']['DatabaseRealmd']); 129 $row = $this->db->query('SELECT COUNT(*) FROM account')->fetch_row(); 79 $this->Database->select_db($this->Config['Mangos']['DatabaseRealmd']); 80 $row = $this->Database->query('SELECT COUNT(*) FROM account')->fetch_row(); 130 81 return($row[0]); 131 }132 133 public function GuidToCharName($guid)134 {135 global $Config;136 137 $this->db->select_db($Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseCharacters']);138 $row = $this->db->query('SELECT `name` FROM `characters` WHERE `guid` = "'.$guid.'" LIMIT 1')->fetch_array();139 return($row['name']);140 }141 142 public function ShowGmLog($log)143 {144 echo('<table border="1" width="540">'.145 '<tr>146 <th>Čas</th>147 <th>GM</th>148 <th>Příkaz</th>149 <th>Vybrán</th>150 </tr>');151 $gm_log = ereg_replace("\n",";",$log);152 $gm_log = explode(";",$gm_log);153 $gm_log = array_reverse($gm_log);154 foreach($gm_log as $row)155 {156 if (strpos($row,"Command:") == true)157 {158 $edited = str_replace(" Command: ", ";", $row); // 0 - time159 $edited = str_replace(" (Account: ", ";", $edited); // 1 - command160 $edited = str_replace(" [Player: ", ";", $edited); // 2 - gm161 $edited = str_replace(" Selected: ", ";", $edited); // 3 - position162 $edited = str_replace(" (GUID: ", ";", $edited); // 4 - selected163 $edited = str_replace(")]", ";", $edited); // 5 - selected guid164 $edited_arr = explode(";",$edited);165 if($edited_arr[4] == "player") $sel_name = " - ".$this -> GuidToCharName($edited_arr[5]);166 else $sel_name = '';167 $human_date = $this -> HumanDate ($edited_arr[0]);168 echo('<tr>169 <td><font size="2">'.$human_date.'</font></td>170 <td>'.$edited_arr[2].'</td>171 <td>'.$edited_arr[1].'</td>172 <td>'.$edited_arr[4].$sel_name.'</td>173 </tr>');174 }175 if(strpos($row, 'mail item:') == true)176 {177 $edited = str_replace(" GM ", ";", $row);178 $edited = str_replace(" (Account: ", ";", $edited);179 $edited = str_replace(") mail item: ", ";", $edited);180 $edited = str_replace(" (Account: ", ";", $edited);181 $edited = str_replace(")", "", $edited);182 $edited_arr = explode(";",$edited);183 $human_date = $this -> HumanDate ($edited_arr[0]);184 echo('<tr>185 <td><font size="2">'.$human_date.'</font></td>186 <td>'.$edited_arr[1].'</td>187 <td>Send : '.$edited_arr[3].')</td>188 <td>-</td>189 </tr>');190 }191 if(strpos($row,"trade:") == true)192 {193 $edited = str_replace(" GM ", ";", $row);194 $edited = str_replace(" (Account: ", ";", $edited);195 $edited = str_replace(") trade: ", ";", $edited);196 $edited = str_replace(" (Account: ", ";", $edited);197 $edited = str_replace(")", "", $edited);198 $edited_arr = explode(";",$edited);199 200 $human_date = $this -> HumanDate ($edited_arr[0]);201 echo('<tr>202 <td><font size="2">'.$human_date.'</font></td>203 <td>'.$edited_arr[1].'</td>204 <td>Trade : '.$edited_arr[3].')</td>205 <td>-</td>206 </tr>');207 }208 }209 echo('</table>');210 }211 212 public function SeoUrl($title)213 {214 $address = $title;215 $diakritika = array("á","ä","č","ď","é","ě","ë","í","ň","ó","ö","ř","š","ť","ú","ů","ü","ý","ž","Á","Ä","Č","Ď","É","Ě","Ë","Í","Ň","Ó","Ö","Ř","Š","Ť","Ú","Ů","Ü","Ý","Ž");216 $nediakritika = array("a","a","c","d","e","e","e","i","n","o","o","r","s","t","u","u","u","y","z","A","A","C","D","E","E","E","I","N","O","O","R","S","T","U","U","U","Y","Z");217 $address = str_replace($diakritika, $nediakritika, $address);218 $address = strtolower ($address);219 $address = preg_replace ("/[^[:alpha:][:digit:]]/", "-", $address);220 $address = trim ($address, "-");221 $address = preg_replace ("/[-]+/", "-", $address);222 return($address);223 82 } 224 83 … … 372 231 function RealmSelection($FormNameSufix = '') 373 232 { 374 global $Config;375 376 377 233 $Output = ''; 378 if(count($ Config['Mangos']['RealmList']) > 1)234 if(count($this->Config['Mangos']['RealmList']) > 1) 379 235 { 380 236 if(array_key_exists('page', $_GET)) $Target = '?page='.$_GET['page']; … … 382 238 $Output .= '<div style="text-align: center;"><form name="RealmSelection'.$FormNameSufix.'" action="'.$Target.'" method="post">'. 383 239 '<div>Výběr světa <select name="RealmIndex" onchange="document.RealmSelection'.$FormNameSufix.'.submit()">'; 384 foreach($ Config['Mangos']['RealmList'] as $Index => $Realm)240 foreach($this->Config['Mangos']['RealmList'] as $Index => $Realm) 385 241 { 386 242 if($_COOKIE['RealmIndex'] == $Index) $Selected = ' selected="selected"'; -
trunk/index.php
r628 r630 5 5 foreach($_GET as $Index => $Item) $_GET[$Index] = addslashes($Item); 6 6 7 include_once('inc/config.php'); 7 if(file_exists('inc/config.php')) include_once('inc/config.php'); 8 else die('Nenalezen soubor inc/config.php. Vytvořte jej z předlohy config.sample.php.'); 8 9 9 10 if(array_key_exists('RealmIndex', $_POST)) … … 28 29 session_start(); 29 30 include_once('inc/error.php'); 30 include_once('inc/db.php'); 31 include_once('inc/database.php'); 32 include_once('inc/module.php'); 31 33 include_once('inc/html.php'); 34 include_once('inc/system.php'); 32 35 include_once('inc/player.php'); 33 36 include_once('inc/server.php'); 37 include_once('inc/realm.php'); 34 38 35 39 // classes start 40 $System = new System($Config); 41 $db = $System->Database; 36 42 $player = new Player($db); 37 $server = new Server($ db);43 $server = new Server($System, 1); 38 44 $html = new Html(0, $db); 39 45 $html->Start(); -
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.