-
Notifications
You must be signed in to change notification settings - Fork 66
/
index.php
59 lines (52 loc) · 1.79 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
<?php
session_start();
// Disable Notices
// Is MapleBit installed?
if (!file_exists('assets/config/install/installdone.txt')) {
header('Location: assets/config/install/install.php');
exit;
} else {
// Get Database Information
require_once 'assets/config/database.php';
// Import Essential Files
require_once 'assets/config/properties.php';
require_once 'assets/config/funcs.php';
// Define $getbase variable
$getbase = isset($_GET['base']) ? $_GET['base'] : '';
$getslug = $mysqli->query('SELECT slug, title, visible from '.$prefix.'pages');
while ($fetchslug = $getslug->fetch_assoc()) {
$slugs[] = $fetchslug['slug'];
$slugarray[] = [$fetchslug['slug'], $fetchslug['title'], $fetchslug['visible']];
}
switch ($getbase) {
case null:
case 'main':
include 'sources/structure/header.php';
include 'sources/public/main.php';
include 'sources/structure/footer.php';
break;
case 'ucp':
include 'sources/structure/header.php';
include 'sources/ucp/main.php';
include 'sources/structure/footer.php';
break;
case 'admin':
include 'sources/structure/admin/header.php';
include 'sources/admin/main.php';
break;
case 'gmcp':
include 'sources/structure/header.php';
include 'sources/gmcp/main.php';
include 'sources/structure/footer.php';
break;
case 'misc':
include 'sources/misc/main.php';
break;
default:
include 'sources/structure/header.php';
include 'sources/public/main.php';
include 'sources/structure/footer.php';
break;
}
}
$mysqli->close();