Changeset 550 for trunk/index.php
- Timestamp:
- Mar 29, 2009, 11:57:40 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/index.php
r546 r550 1 1 <?php 2 2 3 session_start(); 3 4 include_once("./inc/db.php"); … … 5 6 include_once("./inc/player.php"); 6 7 include_once("./inc/server.php"); 8 7 9 // classes start 8 $player = new Player($db);9 $server = new Server($db);10 $html = new Html("0",$db);11 include_once ("./functions.php");10 $player = new Player($db); 11 $server = new Server($db); 12 $html = new Html(0, $db); 13 include_once('./functions.php'); 12 14 $html -> Start(); 13 if (isset($_COOKIE["hof-random"]) AND $_COOKIE["hof-random"] == "no") 14 { 15 $num_headers = 1; 16 } 17 else 18 { 19 $num_headers = 8; 20 } 21 echo " 22 <div id=\"page\"> 23 <style> 24 #header{height: 174px;background-image: url(imgs/web/headers/header".rand(0,$num_headers-1).".jpg);} 25 a {font-family: Times New Roman; color: #4c4c4c; text-decoration: none; } 26 a:hover {font-family: Times New Roman; color: black; text-decoration: underline; } 27 </style> 28 <div id=\"header\"></div> 29 <div id=\"top\"></div> 30 <div id=\"menu\"> 31 "; 15 if(isset($_COOKIE['hof-random']) AND $_COOKIE['hof-random'] == 'no') $num_headers = 1; 16 else $num_headers = 8; 32 17 33 // menu start 34 echo "<div id=\"mainmenu\"><br /><br />"; 35 echo "<a href=\"?page=main\">Úvod</a><br />"; 36 echo "<a href=\"?page=server\">Server</a><br />"; 37 echo "<a href=\"?page=register\">Registrace</a><br />"; 38 // echo "<a href=\"?page=register\">Komunikace hráčů</a><br />"; 39 echo "<a href=\"?page=begin\">Jak začít</a><br />"; 40 echo "<a href=\"http://wow.zdechov.net/forum/\" target=\"_blank\">Fórum</a><br />"; 41 echo "<a href=\"?page=gmteam\">GM Tým</a><br />"; 42 echo "<a href=\"?page=acc\">Správa účtu</a><br />"; 43 echo "<a href=\"/bug_tracker\">Nahlaš Bug</a><br />"; 44 //echo "<a href=\"http://wow.zdechov.net/databaze/\" target=\"_blank\">Databáze</a><br />"; 45 echo "<a href=\"?page=download\">Stahování</a><br />"; 46 echo "<a href=\"?page=links\">Odkazy</a><br />"; 47 echo "<a href=\"?page=online\">Online hráči</a><br />"; 48 echo "<a href=\"#\" onclick=\"popup('../mmadmin/pomm_public/pomm.php', 758, 525);return false;\">Mapa hráčů</a><br />"; 49 echo "<a href=\"?page=guildy\">Guildy</a><br />"; 50 echo "<a href=\"?page=gh\">Domky Guild</a><br />"; 51 echo "<a href=\"?page=arena\">Arény</a><br />"; 52 echo "<a href=\"?page=aukce\">Aukce</a><br />"; 53 echo "<a href=\"?page=events\">Eventy</a><br />"; 54 echo "<a href=\"?page=dotation\">Dotace</a><br />"; 55 echo "<a href=\"?page=teamspeak\">Team speak</a><br />"; 56 echo "<a href=\"?page=gmlog\">GM log</a><br />"; 57 // echo "<a href=\"?page=admins\">Admin tým</a><br />"; 58 59 60 echo "<a href=\"?page=search\">Vyhledávání</a><br />"; 61 echo "</div>"; 18 echo('<div id="page">'. 19 '<style>'. 20 '#header{height: 174px;background-image: url(imgs/web/headers/header'.rand(0, $num_headers - 1).'.jpg);}'. 21 'a {font-family: Times New Roman; color: #4c4c4c; text-decoration: none; }'. 22 'a:hover {font-family: Times New Roman; color: black; text-decoration: underline; } '. 23 '</style>'. 24 '<div id="header"></div>'. 25 '<div id="top"></div>'. 26 '<div id="menu">'); 27 28 $MenuItems = array( 29 array('link' => '?page=main', 'Text' => 'Úvod'), 30 array('link' => '?page=server', 'Text' => 'Server'), 31 array('link' => '?page=register', 'Text' => 'Registrace'), 32 array('link' => '?page=begin', 'Text' => 'Jak začít'), 33 array('link' => 'forum/', 'Text' => 'Fórum', 'Target' => '_blank'), 34 array('link' => '?page=gmteam', 'Text' => 'GM Tým'), 35 array('link' => '?page=acc', 'Text' => 'Správa účtu'), 36 array('link' => 'bug_tracker/', 'Text' => 'Nahlaš Bug'), 37 array('link' => '?page=download', 'Text' => 'Stahování'), 38 array('link' => '?page=links', 'Text' => 'Odkazy'), 39 array('link' => '?page=online', 'Text' => 'Online hráči'), 40 array('link' => '#', 'Text' => 'Mapa hráčů', 'OnClick' => "popup('../mmadmin/pomm_public/pomm.php', 758, 525); return false;"), 41 array('link' => '?page=guildy', 'Text' => 'Guildy'), 42 array('link' => '?page=gh', 'Text' => 'Domky Guild'), 43 array('link' => '?page=arena', 'Text' => 'Arény'), 44 array('link' => '?page=events', 'Text' => 'Eventy'), 45 array('link' => '?page=dotation', 'Text' => 'Dotace'), 46 array('link' => '?page=teamspeak', 'Text' => 'Team speak'), 47 array('link' => '?page=gmlog', 'Text' => 'GM log'), 48 array('link' => '?page=search', 'Text' => 'Vyhledávání'), 49 ); 50 51 echo('<div id="mainmenu"><br /><br />'); 52 foreach($MenuItems as $Item) 53 { 54 if(array_key_exists('OnClick', $Item)) $OnClick = ' onclick="'.$Item['OnClick'].'"'; 55 else $OnClick = ''; 56 if(array_key_exists('Target', $Item)) $Target = ' target="'.$Item['Target'].'"'; 57 else $Target = ''; 58 59 echo('<a href="'.$Item['link'].'"'.$OnClick.$Target.'>'.$Item['Text'].'</a><br />'); 60 } 61 echo('</div>'); 62 63 62 64 echo " 63 65 <center> … … 77 79 </div> 78 80 <div id=\"content\">"; 81 79 82 // obsah start 80 83 $include = 1; 81 if (isset($_GET["logout"]) AND $player ->Check())84 if(isset($_GET["logout"]) AND $player->Check()) 82 85 { 83 86 echo "<center>"; 84 $player ->Logout();87 $player->Logout(); 85 88 echo "</center>"; 86 89 $include = 0; 87 90 } 88 if 91 if($include == 1) 89 92 { 90 if (isset($_GET["page"])) 91 { 92 include_once ($html -> Pager($_GET["page"],"pages","main")); 93 } 94 else 95 { 96 include_once("./pages/main.php"); 97 } 93 if(isset($_GET['page'])) include_once($html -> Pager($_GET['page'], 'pages', 'main')); 94 else include_once('pages/main.php'); 98 95 } 99 96 echo('</div><div id="footer"><p align="center"><br></p><div id="copyright"><a href="?page=autori">Vývoj webu</a></div></div></div>');
Note:
See TracChangeset
for help on using the changeset viewer.