-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
63 lines (58 loc) · 1.69 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL & ~E_NOTICE);
/*
** a quick hack for the
**
** The Perfekte Minute
**
** Christian Lorenz
*/
include_once 'inc/settings.inc.php';
include_once 'inc/common.inc.php';
include_once 'inc/html.inc.php';
include_once 'inc/util.inc.php';
include_once 'inc/database.inc.php';
include_once 'inc/numbers.inc.php';
/*
** the available pages
*/
$pages = array(
'start' => array( 'title' => '', 'show' => 1, 'admin' => 1, 'separator' => 0 ),
'login' => array( 'title' => 'Login', 'show' => 0, 'admin' => 0, 'separator' => 0 ),
'admin-settings' => array( 'title' => 'Einstellungen', 'show' => 1, 'admin' => 1, 'separator' => 0 ),
'play' => array( 'title' => '', 'show' => 0, 'admin' => 0, 'separator' => 0, 'button' => 'Los geht\'s!', ),
'name' => array( 'title' => '', 'show' => 1, 'admin' => 0, 'separator' => 0, 'button' => 'Los geht\'s!', ),
'scoreboard' => array( 'title' => '', 'show' => 1, 'admin' => 0, 'separator' => 0, 'button' => 'Rangliste', ),
);
/*
** call the page -- with output buffering
*/
if (!($page = @$pages[$pageid = @$_GET['page']]))
$page = $pages[$pageid = 'start'];
$_title = $page['title'];
ob_start();
include 'pages/'.$pageid.'.inc.php';
$content = ob_get_clean();
/*
** output the content and use the title
*/
html_header($pageid,$_title);
print $content;
if (ADMIN) {
/*
** admin will have some more functions
*/
?></div><div class=adminfooter><?php
foreach ($pages as $pageid => $page) {
if ($page['title'] && $page['show'] && $page['admin']) {
html_button_href($page['title'],'?page='.$pageid,-1);
}
}
?></div><div><?php
}
/*
** close the page
*/
html_footer();