Changeset 614
- Timestamp:
- Aug 7, 2009, 11:38:12 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/inc/html.php
r613 r614 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> a></b>'.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>'. 300 300 '</td></tr></table><br />'); 301 301 } -
trunk/inc/server.php
r611 r614 368 368 else return('-'); 369 369 } 370 371 function RealmSelection($FormNameSufix = '') 372 { 373 global $Config; 374 375 $Output = ''; 376 if(count($Config['Mangos']['RealmList']) > 1) 377 { 378 $Output .= '<div align="center"><form name="RealmSelection'.$FormNameSufix.'" action="" method="post">'. 379 'Svět <select name="RealmIndex" onchange="document.RealmSelection'.$FormNameSufix.'.submit()">'; 380 foreach($Config['Mangos']['RealmList'] as $Index => $Realm) 381 { 382 if($_COOKIE['RealmIndex'] == $Index) $Selected = ' selected="selected"'; 383 else $Selected = ''; 384 $Output .= '<option value="'.$Index.'"'.$Selected.'>'.$Realm['Name'].'</option>'; 385 } 386 $Output .= '</select>'. 387 '</form></div>'; 388 } 389 return($Output); 390 } 370 391 } 371 392 -
trunk/index.php
r612 r614 89 89 echo('</div>'); 90 90 91 if(count($Config['Mangos']['RealmList']) > 1) 92 { 93 echo('Výběr světa:'); 94 echo('<form name="realm_selection" action="" method="post">'. 95 '<select name="RealmIndex" style="width: 100%" onchange="document.realm_selection.submit()">'); 96 foreach($Config['Mangos']['RealmList'] as $Index => $Realm) 97 { 98 if($_COOKIE['RealmIndex'] == $Index) $Selected = ' selected="selected"'; 99 else $Selected = ''; 100 echo('<option value="'.$Index.'"'.$Selected.'>'.$Realm['Name'].'</option>'); 101 } 102 echo('</select>'. 103 '</form>'); 104 } 91 echo($server->RealmSelection()); 105 92 106 93 echo('<br /><br />'); -
trunk/pages/arena.php
r609 r614 21 21 $count = $db->query('SELECT COUNT(*) FROM arena_team')->fetch_row(); 22 22 $all_record = $count[0]; 23 echo('<h3 class="PageTitle">Arénové týmy :</h3> 24 Celkem týmů : <strong>'.$all_record.'</strong> 23 echo('<h3 class="PageTitle">Arénové týmy :</h3>'); 24 echo($server->RealmSelection()); 25 echo('Celkem týmů : <strong>'.$all_record.'</strong> 25 26 <table class="BaseTable"> 26 27 <tr> -
trunk/pages/chars.php
r576 r614 2 2 3 3 $html->PrgStart(); 4 echo($server->RealmSelection()); 4 5 echo(' <a href="?page=acc"><- Zpět do správy účtu</a>'); 5 6 -
trunk/pages/commands.php
r613 r614 2 2 3 3 $Output = '<h2 align="center">Herní příkazy</h2>'; 4 $Output .= $server->RealmSelection(); 4 5 5 6 $db->select_db($Config['Mangos']['RealmList'][$_COOKIE['RealmIndex']]['DatabaseMangos']); -
trunk/pages/events.php
r609 r614 89 89 90 90 echo('<h3 class="PageTitle">Události ve hře</h3>'); 91 echo($server->RealmSelection()); 91 92 92 93 $Events = Events(); -
trunk/pages/gmlog.php
r609 r614 5 5 6 6 echo('<img src="imgs/gm.jpg" alt="gm" /><br />'); 7 echo($server->RealmSelection()); 7 8 echo('<table class="BaseTable"><tr><th>Čas</th><th>Příkaz</th><th>GM</th><th>Vybrán</th></tr>'); 8 9 -
trunk/pages/guildy.php
r609 r614 31 31 32 32 echo('<h3 class="PageTitle">Seznam spolků</h3>'); 33 echo($server->RealmSelection()); 33 34 echo('<table class="BaseTable"> 34 35 <tr> -
trunk/pages/online.php
r609 r614 22 22 23 23 echo('<h3 class="PageTitle">Online hráči</h3>'); 24 echo($server->RealmSelection('Menu')); 25 24 26 echo('<div style="text-align: center">Celkem '.$server->MangosOnline($_COOKIE['RealmIndex']).' hráčů.</div>'. 25 27 '<table class="BaseTable"> -
trunk/pages/register.php
r597 r614 39 39 '<br />'); 40 40 41 if($RegistrationLimit->GetFreeRegistrationCount() == 0) 41 //if($RegistrationLimit->GetFreeRegistrationCount() == 0) 42 //{ 43 // echo('<div class="h10">Registrace pro dnešní den vyčerpány</div>'); 44 // echo('<div class="h10">Dnes bylo '.$RegistrationLimit->GetPerDeyRegistrationCount().' volných registrací</div>'); 45 //} else 42 46 { 43 echo('<div class="h10">Registrace pro dnešní den vyčerpány</div>'); 44 echo('<div class="h10">Dnes bylo '.$RegistrationLimit->GetPerDeyRegistrationCount().' volných registrací</div>'); 45 } else 46 { 47 echo('<div class="h11">Pro tento den je povoleno '.$RegistrationLimit->GetPerDeyRegistrationCount().' volných registrací</div>'); 48 echo('<div class="h11">Zbývá ještě '.$RegistrationLimit->GetFreeRegistrationCount().' volných registrací</div>'); 47 //echo('<div class="h11">Pro tento den je povoleno '.$RegistrationLimit->GetPerDeyRegistrationCount().' volných registrací</div>'); 48 //echo('<div class="h11">Zbývá ještě '.$RegistrationLimit->GetFreeRegistrationCount().' volných registrací</div>'); 49 49 echo('<br />'); 50 50 -
trunk/pages/tophraci.php
r609 r614 27 27 $i = 0; 28 28 echo('<h3 class="PageTitle">Nejlepších '.$top.' herních časů</h3>'); 29 echo($server->RealmSelection()); 29 30 30 31 echo('<table class="SimpleTable">'); -
trunk/pages/xpreset.php
r576 r614 2 2 3 3 $html->PrgStart(); 4 echo($server->RealmSelection()); 4 5 if($player->Check()) 5 6 { -
trunk/stat/stat.php
r591 r614 5 5 $Username = $Config['Database']['User']; 6 6 $Password = $Config['Database']['Password']; 7 $Database = $Config['Mangos'][' DatabaseMangos']; // must contains characters table7 $Database = $Config['Mangos']['RealmList'][1]['DatabaseMangos']; // must contains characters table 8 8 $RealmHostname = $Hostname; 9 9 $RealmUsername = $Username; 10 10 $RealmPassword = $Password; 11 11 $RealmDatabase = $Config['Mangos']['DatabaseRealmd']; // must contains zone_coordinates and accounts table 12 $CharactersDatabase = $Config['Mangos'][' DatabaseCharacters']; // must contains zone_coordinates and accounts table12 $CharactersDatabase = $Config['Mangos']['RealmList'][1]['DatabaseCharacters']; // must contains zone_coordinates and accounts table 13 13 $EmuVersion = $Config['Mangos']['ClientVersion']; 14 14 $Owner = $Config['Web']['Admin']; … … 52 52 " <players>\r\n"; 53 53 54 55 54 $realm_db = mysql_connect($RealmHostname, $RealmUsername, $RealmPassword); 55 mysql_select_db($RealmDatabase, $realm_db); 56 56 $db_result = mysql_query("SET NAMES $DatabaseEncoding", $realm_db); 57 57 58 59 58 $mangos_db = mysql_connect($Hostname, $Username, $Password, TRUE); 59 mysql_select_db($Database, $mangos_db); 60 60 $db_result = mysql_query("SET NAMES $DatabaseEncoding", $mangos_db); 61 61 62 63 62 $characters_db = mysql_connect($RealmHostname, $RealmUsername, $RealmPassword); 63 mysql_select_db($CharactersDatabase, $characters_db); 64 64 $db_result = mysql_query("SET NAMES $DatabaseEncoding", $characters_db); 65 65 66 66 $db_result = mysql_query("SELECT * FROM `characters` WHERE `online`='1' ORDER BY `name`", $characters_db); 67 68 67 while($result = mysql_fetch_array($db_result)) 68 { 69 69 // Get GM level by character 70 70 $db_result2 = mysql_query("SELECT gmlevel FROM `account` WHERE `id`='".$result['account']."'", $realm_db); … … 73 73 74 74 $char_data = explode(' ',$result['data']); 75 75 $Result .= " <player>\r\n". 76 76 " <name>".$result['name']."</name>\r\n". 77 77 " <race>".$result['race']."</race>\r\n". … … 92 92 function get_zone_name($mapid, $x, $y) 93 93 { 94 95 96 97 98 99 100 101 94 global $realm_db; 95 $query = mysql_query("SELECT * FROM `zone_coordinates` ORDER BY `priory`", $realm_db); 96 $zmap = 0; 97 while($result = mysql_fetch_array($query)) 98 { 99 if ($result['map']==$mapid AND $result['y_min'] < $x AND $result['y_max'] > $x AND $result['x_max'] < $y AND $result['x_min'] > $y) $zmap=$result['zone_id']; 100 } 101 return $zmap; 102 102 } 103 103
Note:
See TracChangeset
for help on using the changeset viewer.