Changeset 682 for trunk/index.php
- Timestamp:
- Jan 23, 2010, 4:03:37 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/index.php
r674 r682 18 18 $_COOKIE['RealmIndex'] = $_GET['RealmIndex']; 19 19 } 20 $RealmList = $Config['Mangos']['RealmList']; 21 $FirstRealm = array_shift($RealmList); 22 if(!array_key_exists('RealmIndex', $_COOKIE)) $_COOKIE['RealmIndex'] = $FirstRealm['Id']; 23 else 24 { 25 if(!array_key_exists($_COOKIE['RealmIndex'], $Config['Mangos']['RealmList'])) 26 $_COOKIE['RealmIndex'] = $FirstRealm['Id']; 27 } 28 20 29 21 session_start(); 30 22 include_once('inc/error.php'); … … 45 37 if(isset($_COOKIE['hof-random']) and $_COOKIE['hof-random'] == 'no') $num_headers = 1; 46 38 else $num_headers = 8; 39 40 // Check right RealmIndex 41 if(!array_key_exists('RealmIndex', $_COOKIE)) 42 { 43 $_COOKIE['RealmIndex'] = $Config['Web']['DefaultRealmIndex']; 44 } else 45 { 46 $DbResult = $System->Database->query('SELECT Id FROM Realm WHERE Id='.$_COOKIE['RealmIndex']); 47 if($DbResult->num_rows == 0) $_COOKIE['RealmIndex'] = $Config['Web']['DefaultRealmIndex']; 48 } 47 49 48 50 echo('<div id="page">'. … … 69 71 array('link' => '?page=teamspeak', 'Text' => 'Team speak'), 70 72 array('link' => '?page=client', 'Text' => 'HoF Client'), 71 array('link' => '?page=test-server', 'Text' => 'Test Server'),72 73 array('link' => '?page=search', 'Text' => 'Vyhledávání'), 73 74 array('link' => '?page=realmlist', 'Text' => 'Světy'),
Note:
See TracChangeset
for help on using the changeset viewer.