source: trunk/index.php@ 562

Last change on this file since 562 was 562, checked in by barny, 16 years ago

úprava index.php přidáno banlist

File size: 3.9 KB
Line 
1<?php
2
3session_start();
4include_once("./inc/db.php");
5include_once("./inc/html.php");
6include_once("./inc/player.php");
7include_once("./inc/server.php");
8
9// classes start
10$player = new Player($db);
11$server = new Server($db);
12$html = new Html(0, $db);
13include_once('./functions.php');
14$html -> Start();
15if(isset($_COOKIE['hof-random']) AND $_COOKIE['hof-random'] == 'no') $num_headers = 1;
16 else $num_headers = 8;
17
18echo('<div id="page">'.
19 '<div id="header" style="background-image: url(imgs/web/headers/header'.rand(0, $num_headers - 1).'.jpg);"></div>'.
20 '<div id="top"></div>'.
21 '<div id="menu">');
22
23$MenuItems = array(
24 array('link' => '?page=main', 'Text' => 'Úvod'),
25 array('link' => '?page=server', 'Text' => 'Server'),
26 array('link' => '?page=register', 'Text' => 'Registrace'),
27 array('link' => '?page=begin', 'Text' => 'Jak začít'),
28 array('link' => 'forum/', 'Text' => 'Fórum'),
29 array('link' => '?page=gmteam', 'Text' => 'GM Tým'),
30 array('link' => '?page=acc', 'Text' => 'Správa účtu'),
31 array('link' => 'bug_tracker/', 'Text' => 'Nahlaš Bug'),
32 array('link' => '?page=download', 'Text' => 'Stahování'),
33 array('link' => '?page=links', 'Text' => 'Odkazy'),
34 array('link' => '?page=online', 'Text' => 'Online hráči'),
35 array('link' => '#', 'Text' => 'Mapa hráčů', 'OnClick' => "popup('../mmadmin/pomm_public/pomm.php', 758, 525); return false;"),
36 array('link' => '?page=banlist', 'Text' => 'Ban List'),
37 array('link' => '?page=guildy', 'Text' => 'Guildy'),
38 array('link' => '?page=gh', 'Text' => 'Domky Guild'),
39 array('link' => '?page=arena', 'Text' => 'Arény'),
40 array('link' => '?page=events', 'Text' => 'Eventy'),
41 array('link' => '?page=dotation', 'Text' => 'Dotace'),
42 array('link' => '?page=teamspeak', 'Text' => 'Team speak'),
43 array('link' => '?page=gmlog', 'Text' => 'GM log'),
44 array('link' => '?page=search', 'Text' => 'Vyhledávání'),
45);
46
47echo('<div id="mainmenu"><br /><br />');
48foreach($MenuItems as $Item)
49{
50 if(array_key_exists('OnClick', $Item)) $OnClick = ' onclick="'.$Item['OnClick'].'"';
51 else $OnClick = '';
52 if(array_key_exists('Target', $Item)) $Target = ' target="'.$Item['Target'].'"';
53 else $Target = '';
54
55 echo('<a href="'.$Item['link'].'"'.$OnClick.$Target.'>'.$Item['Text'].'</a><br />');
56}
57echo('</div>');
58
59
60echo('<div class="Banners">'.
61 '<strong>Naše ikonka :</strong><br />'.
62 '<a href="http://wow.zdechov.net/"><img src="imgs/web/hof_ban.png" alt="WoW Server Heroes of Fantasy" /></a><br />'.
63 '<strong>Odkazy :</strong><br />'.
64 '<a href="http://servery.wowresource.eu/"><img src="http://servery.wowresource.eu/templates/img/bannery/banner_maly.gif" alt="WoW Server status" /></a><br />'.
65 '<a href="http://www.wowhead.com"><img src="http://www.wowhead.com/images/badge_88x31.gif" width="88" height="31" alt="" /></a><br />'.
66 '<a href="http://wowpreklad.zdechov.net/"><img src="http://wowpreklad.zdechov.net/banners/baner_88_31.jpg" alt="baner_http://wowpreklad.zdechov.net/" height="31" width="88" /></a>'.
67 '<strong>Statistika :</strong><br />'.
68 '<a href="http://www.toplist.cz/"><img src="http://toplist.cz/count.asp?logo=mc&amp;ID=324802" width="88" height="60" alt="counter" /></a><br /><br />'.
69 'Počet přístupů: <br /><a href="http://counter.cnw.cz/">'.
70 '<img src="http://counter.cnw.cz/monika.cgi?wowzdechov&amp;7&amp;000000&amp;FFFFFF&amp;on" alt="CNW:Counter" /></a>'.
71 '</div>'.
72 '</div>'.
73 '<div id="content">');
74
75// obsah start
76$include = 1;
77if(isset($_GET["logout"]) AND $player->Check())
78{
79 echo('<center>');
80 $player->Logout();
81 echo('</center>');
82 $include = 0;
83}
84if($include == 1)
85{
86 if(isset($_GET['page'])) include_once($html -> Pager($_GET['page'], 'pages', 'main'));
87 else include_once('pages/main.php');
88}
89echo('</div><div id="footer"><p><br /></p><div id="copyright"><a href="?page=autori">Vývoj webu</a></div></div></div>');
90
91$html->Stop();
92$db->close();
93
94?>
Note: See TracBrowser for help on using the repository browser.