Changeset 609 for trunk/index.php
- Timestamp:
- Aug 7, 2009, 10:03:50 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/index.php
r599 r609 5 5 foreach($_GET as $Index => $Item) $_GET[$Index] = addslashes($Item); 6 6 7 if(array_key_exists('RealmIndex', $_POST)) 8 { 9 setcookie('RealmIndex', $_POST['RealmIndex']); 10 $_COOKIE['RealmIndex'] = $_POST['RealmIndex']; 11 } 12 if(!array_key_exists('RealmIndex', $_COOKIE)) $_COOKIE['RealmIndex'] = 1; 13 else 14 { 15 if(!array_key_exists($_COOKIE['RealmIndex'], $Config['Mangos']['RealmList'])) 16 $_COOKIE['RealmIndex'] = 1; 17 } 18 7 19 session_start(); 8 20 include_once('inc/config.php'); 21 include_once('inc/error.php'); 9 22 include_once('inc/db.php'); 10 23 include_once('inc/html.php'); … … 25 38 '<div id="menu">'); 26 39 27 $ MenuItems = array(40 $ServerMenuItems = array( 28 41 array('link' => '?page=main', 'Text' => 'Úvod'), 29 42 array('link' => '?page=begin', 'Text' => 'Jak začít'), … … 37 50 array('link' => '?page=download', 'Text' => 'Stahování'), 38 51 array('link' => '?page=links', 'Text' => 'Odkazy'), 52 array('link' => '?page=banlist', 'Text' => 'Bany'), 53 array('link' => '?page=dotation', 'Text' => 'Dotace'), 54 array('link' => '?page=teamspeak', 'Text' => 'Team speak'), 55 array('link' => '?page=client', 'Text' => 'HoF Client'), 56 array('link' => '?page=search', 'Text' => 'Vyhledávání'), 57 array('link' => '?page=realmlist', 'Text' => 'Světy'), 58 ); 59 60 $RealmMenuItems = array( 39 61 array('link' => '?page=online', 'Text' => 'Online hráči'), 40 62 array('link' => '#', 'Text' => 'Mapa hráčů', 'OnClick' => "popup('../minimanager/pomm/pomm.php?realmid=1', 1000, 800); return false;"), 41 63 array('link' => '?page=tophraci', 'Text' => 'Nej hráči'), 42 array('link' => '?page=banlist', 'Text' => 'Bany'),43 64 array('link' => '?page=guildy', 'Text' => 'Spolky'), 44 65 array('link' => '?page=gh', 'Text' => 'Domky spolků'), 45 66 array('link' => '?page=arena', 'Text' => 'Arény'), 46 67 array('link' => '?page=events', 'Text' => 'Události'), 47 array('link' => '?page=dotation', 'Text' => 'Dotace'),48 array('link' => '?page=teamspeak', 'Text' => 'Team speak'),49 array('link' => '?page=client', 'Text' => 'HoF Client'),50 68 array('link' => '?page=gmlog', 'Text' => 'GM log'), 51 array('link' => '?page=search', 'Text' => 'Vyhledávání'),52 69 ); 53 70 54 echo('<div id="mainmenu"><br /><br />'); 55 foreach($MenuItems as $Item) 71 echo('<br /><br />'); 72 echo('<div id="mainmenu">'); 73 foreach($ServerMenuItems as $Item) 74 { 75 if(array_key_exists('OnClick', $Item)) $OnClick = ' onclick="'.$Item['OnClick'].'"'; 76 else $OnClick = ''; 77 if(array_key_exists('Target', $Item)) $Target = ' target="'.$Item['Target'].'"'; 78 else $Target = ''; 79 80 echo('<a href="'.$Item['link'].'"'.$OnClick.$Target.'>'.$Item['Text'].'</a><br />'); 81 } 82 echo('</div>'); 83 84 if(count($Config['Mangos']['RealmList']) > 1) 85 { 86 echo('Výběr světa:'); 87 echo('<form name="realm_selection" action="" method="post">'. 88 '<select name="RealmIndex" style="width: 100%" onchange="document.realm_selection.submit()">'); 89 foreach($Config['Mangos']['RealmList'] as $Index => $Realm) 90 { 91 if($_COOKIE['RealmIndex'] == $Index) $Selected = ' selected="selected"'; 92 else $Selected = ''; 93 echo('<option value="'.$Index.'"'.$Selected.'>'.$Realm['Name'].'</option>'); 94 } 95 echo('</select>'. 96 '</form>'); 97 } 98 99 echo('<br /><br />'); 100 echo('<div id="mainmenu">'); 101 foreach($RealmMenuItems as $Item) 56 102 { 57 103 if(array_key_exists('OnClick', $Item)) $OnClick = ' onclick="'.$Item['OnClick'].'"';
Note:
See TracChangeset
for help on using the changeset viewer.