-
Notifications
You must be signed in to change notification settings - Fork 0
/
admin.php
executable file
·149 lines (140 loc) · 4.33 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?php
# Begin output buffering
ob_start();
# Include Code
include("assets/member.inc.php");
# Is an Action set?
if(isset($_GET['action']))
{
$action=$_GET['action'];
}
else
{
$action=NULL;
}
if($action == 'list-users')
{
$member->LoggedIn();
$title='Users';
$content=$member->showPrivHeader().$admin->listUsers().$member->showPrivFooter();
}
elseif($action=="view-user")
{
$member->LoggedIn();
$title="View User";
$content=$member->showPrivHeader().$admin->viewUser().$member->showPrivFooter();
}
elseif($action=="add-user")
{
$member->LoggedIn();
$title="Add User";
$content=$member->showPrivHeader().$admin->addUser().$member->showPrivFooter();
}
elseif($action=="list-emails")
{
$member->LoggedIn();
$title="Emails";
$content=$member->showPrivHeader().$EmailHandler->listEmails().$member->showPrivFooter();
}
elseif($action=="view-email")
{
$member->LoggedIn();
$title="View Email";
$content=$member->showPrivHeader().$EmailHandler->viewEmail().$member->showPrivFooter();
}
elseif($action=="settings")
{
$member->LoggedIn();
$title="Settings";
$content=$member->showPrivHeader().$admin->viewSettings().$member->showPrivFooter();
}
elseif($action=="site_settings")
{
$member->LoggedIn();
$title="Site Settings";
$content=$member->showPrivHeader().$admin->viewSiteSettings().$member->showPrivFooter();
}
elseif($action=="policy_setting")
{
$member->LoggedIn();
$title="Policy Settings";
$content=$member->showPrivHeader().$admin->viewPolicySettings().$member->showPrivFooter();
}
elseif($action=="policy_add" || $action=="policy_edit")
{
$member->LoggedIn();
$title="Add / Edit Policies";
$content=$member->showPrivHeader().$admin->addPolicy().$member->showPrivFooter();
}
elseif($action=="forum_setting")
{
$member->LoggedIn();
$title="Forum Settings";
$content=$member->showPrivHeader().$forum->viewForumSettings().$member->showPrivFooter();
}
elseif($action=="forum_cat_add" || $action=="forum_cat_edit")
{
$member->LoggedIn();
$title="Edit Forum Category";
$content=$member->showPrivHeader().$forum->addCategory().$member->showPrivFooter();
}
elseif($action=="google_drive")
{
$member->LoggedIn();
$title="Google Drive Files";
$content=$member->showPrivHeader().$admin->googleDrive().$member->showPrivFooter();
}
elseif($action=="file_add" || $action=="file_edit")
{
$member->LoggedIn();
$title="Add / Edit Google Drive Files";
$content=$member->showPrivHeader().$admin->addFile().$member->showPrivFooter();
}
elseif($action=="forum_bbcode_add" || $action=="forum_bbcode_edit")
{
$member->LoggedIn();
$title="Add / Edit BBCode";
$content=$member->showPrivHeader().$forum->addBBCode().$member->showPrivFooter();
}
elseif($action=="forum_smiley_add" || $action=="forum_smiley_edit")
{
$member->LoggedIn();
$title="Add / Edit Smiley";
$content=$member->showPrivHeader().$forum->addSmiley().$member->showPrivFooter();
}
else
{
$title='Please authenticate yourself';
$content=$member->login();
}
?>
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title><?php echo $title; ?></title>
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="assets/css/normalize.css">
<link rel="stylesheet" href="assets/css/main.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="assets/js/vendor/jquery-1.8.0.min.js"><\/script>')</script>
<script src="assets/js/jquery.badbrowser.js"></script>
<script src="assets/js/plugins.js"></script>
<script src="assets/js/main.js"></script>
<script src="assets/js/vendor/modernizr-2.6.1.min.js"></script>
</head>
<body class="bodymain">
<!--[if lt IE 7]>
<p class="chromeframe">You are using an outdated browser. <a href="http://browsehappy.com/">Upgrade your browser today</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to better experience this site.</p>
<![endif]-->
<?php echo $content; ?>
</body>
</html>
<?php
# Send the buffer to the user's browser.
ob_end_flush();
?>