1 | <?php
|
---|
2 |
|
---|
3 | // SQL injection hack protection
|
---|
4 | foreach($_POST as $Index => $Item) $_POST[$Index] = addslashes($Item);
|
---|
5 | foreach($_GET as $Index => $Item) $_GET[$Index] = addslashes($Item);
|
---|
6 |
|
---|
7 | session_start();
|
---|
8 | include_once('inc/config.php');
|
---|
9 | include_once('inc/db.php');
|
---|
10 | include_once('inc/html.php');
|
---|
11 | include_once('inc/player.php');
|
---|
12 | include_once('inc/server.php');
|
---|
13 |
|
---|
14 | // classes start
|
---|
15 | $player = new Player($db);
|
---|
16 | $server = new Server($db);
|
---|
17 | $html = new Html(0, $db);
|
---|
18 | $html->Start();
|
---|
19 | if(isset($_COOKIE['hof-random']) and $_COOKIE['hof-random'] == 'no') $num_headers = 1;
|
---|
20 | else $num_headers = 8;
|
---|
21 |
|
---|
22 | echo('<div id="page">'.
|
---|
23 | '<div id="header" style="background-image: url(imgs/web/headers/header'.rand(0, $num_headers - 1).'.jpg);"></div>'.
|
---|
24 | '<div id="top"></div>'.
|
---|
25 | '<div id="menu">');
|
---|
26 |
|
---|
27 | $MenuItems = array(
|
---|
28 | array('link' => '?page=main', 'Text' => 'Úvod'),
|
---|
29 | array('link' => '?page=server', 'Text' => 'Server'),
|
---|
30 | array('link' => '?page=register', 'Text' => 'Registrace'),
|
---|
31 | array('link' => '?page=begin', 'Text' => 'Jak začít'),
|
---|
32 | array('link' => 'forum/', 'Text' => 'Fórum'),
|
---|
33 | array('link' => '?page=gmteam', 'Text' => 'GM Tým'),
|
---|
34 | array('link' => '?page=acc', 'Text' => 'Správa účtu'),
|
---|
35 | array('link' => 'bug_tracker/', 'Text' => 'Nahlaš Bug'),
|
---|
36 | array('link' => 'gallery/', 'Text' => 'Galerie'),
|
---|
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=tophraci', 'Text' => 'TopHráči'),
|
---|
42 | array('link' => '?page=banlist', 'Text' => 'Ban List'),
|
---|
43 | array('link' => '?page=guildy', 'Text' => 'Guildy'),
|
---|
44 | array('link' => '?page=gh', 'Text' => 'Domky Guild'),
|
---|
45 | array('link' => '?page=arena', 'Text' => 'Arény'),
|
---|
46 | array('link' => '?page=events', 'Text' => 'Eventy'),
|
---|
47 | array('link' => '?page=dotation', 'Text' => 'Dotace'),
|
---|
48 | array('link' => '?page=teamspeak', 'Text' => 'Team speak'),
|
---|
49 | array('link' => '?page=client', 'Text' => 'HoF Client'),
|
---|
50 | array('link' => '?page=gmlog', 'Text' => 'GM log'),
|
---|
51 | array('link' => '?page=search', 'Text' => 'Vyhledávání'),
|
---|
52 | );
|
---|
53 |
|
---|
54 | echo('<div id="mainmenu"><br /><br />');
|
---|
55 | foreach($MenuItems as $Item)
|
---|
56 | {
|
---|
57 | if(array_key_exists('OnClick', $Item)) $OnClick = ' onclick="'.$Item['OnClick'].'"';
|
---|
58 | else $OnClick = '';
|
---|
59 | if(array_key_exists('Target', $Item)) $Target = ' target="'.$Item['Target'].'"';
|
---|
60 | else $Target = '';
|
---|
61 |
|
---|
62 | echo('<a href="'.$Item['link'].'"'.$OnClick.$Target.'>'.$Item['Text'].'</a><br />');
|
---|
63 | }
|
---|
64 | echo('</div>');
|
---|
65 |
|
---|
66 | echo('<div class="Banners">'.
|
---|
67 | '<strong>Naše ikonka :</strong><br />'.
|
---|
68 | '<a href="'.$Config['Web']['BaseURL'].'"><img src="imgs/web/hof_ban.png" alt="WoW Server Heroes of Fantasy" /></a><br />'.
|
---|
69 | '<strong>Odkazy :</strong><br />'.
|
---|
70 | '<a href="http://servery.wowresource.eu/"><img src="http://servery.wowresource.eu/templates/img/bannery/banner_maly.gif" alt="WoW Server status" /></a><br />'.
|
---|
71 | '<a href="http://www.wowhead.com"><img src="http://www.wowhead.com/images/badge_88x31.gif" width="88" height="31" alt="" /></a><br />'.
|
---|
72 | '<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><br />'.
|
---|
73 | '<strong>Statistika :</strong><br />'.
|
---|
74 | '<a href="http://www.toplist.cz/"><img src="http://toplist.cz/count.asp?logo=mc&ID=324802" width="88" height="60" alt="counter" /></a><br /><br />'.
|
---|
75 | 'Počet přístupů: <br /><a href="http://counter.cnw.cz/">'.
|
---|
76 | '<img src="http://counter.cnw.cz/monika.cgi?wowzdechov&7&000000&FFFFFF&on" alt="CNW:Counter" /></a>'.
|
---|
77 | '<script type="text/javascript">
|
---|
78 | <!--
|
---|
79 | document.write("<a href=\"http://counter.cnw.cz\" target=\"_parent\"><img src=\"http://counter.cnw.cz/trackit.cgi?wowzdechov&t4&" + escape(top.document.referrer) + "\" alt=\"CNW:Tracker\" border=\"0\" width=\"0\" height=\"0\"></a>");
|
---|
80 | // -->
|
---|
81 | </script>'.
|
---|
82 | '</div>'.
|
---|
83 | '</div>'.
|
---|
84 | '<div id="content">');
|
---|
85 |
|
---|
86 | // obsah start
|
---|
87 | $include = 1;
|
---|
88 | if(isset($_GET['logout']) and $player->Check())
|
---|
89 | {
|
---|
90 | echo('<center>');
|
---|
91 | $player->Logout();
|
---|
92 | echo('</center>');
|
---|
93 | $include = 0;
|
---|
94 | }
|
---|
95 | if($include == 1)
|
---|
96 | {
|
---|
97 | if(isset($_GET['page'])) include_once($html->Pager($_GET['page'], 'pages', 'main'));
|
---|
98 | else include_once('pages/main.php');
|
---|
99 | }
|
---|
100 | echo('</div><div id="footer"><br /><div id="copyright"><a href="?page=autori">Vývoj webu</a></div></div></div>');
|
---|
101 |
|
---|
102 | $html->Stop();
|
---|
103 | $db->close();
|
---|
104 |
|
---|
105 | ?>
|
---|