-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin.php
42 lines (42 loc) · 1.12 KB
/
admin.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
<?php session_start() ?>
<!DOCTYPE HTML>
<html>
<head>
<title>The Duke's Herald - Admin Panel</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="styles/all.css">
<link rel="stylesheet" type="text/css" href="styles/admin.css">
<?php
require('functions.php');
require('dbconfig.php');
if (isset($_GET['page'])) {
$page = $_GET['page'];
} else {
$page = 'creation';
}
if (!is_file('admin/'.$page.'.php') || !is_readable('admin/'.$page.'.php')) {
$page = '../404';
}
elseif ($page == 'management') {
echo " <link rel='stylesheet' type='text/css' href='../styles/main.css'>";
}
elseif ($page == 'moderation') {
echo " <link rel='stylesheet' type='text/css' href='../styles/thread.css'>";
}
?>
</head>
<body>
<?php
require("header.php");
if(allow('acp_view')) {
echo '<div id="main">';
require('admin/header.php');
require('admin/'.$page.'.php');
echo '<br /></div>';
} else {
echo "You are not allowed to view this page";
}
require("footer.php");
?>
</body>
</html>