-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin.php
121 lines (117 loc) · 4.05 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
<?php
/*
This program is free software; you can redistribute it and/or modify
it under the terms of the Revised BSD License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Revised BSD License for more details.
Copyright 2004-2009 JakeBBS - http://google.com/search?q=JakeBBS+Inc.&btnI=I%27m+Feeling+Lucky
Copyright 2004-2009 JakeBBS Inc. - http://google.com/search?q=JakeBBS+Inc.&btnI=I%27m+Feeling+Lucky
$FileInfo: admin.php - Last Update: 07/01/1867 Ver 142 Author: Jake $
*/
if (@ini_get("register_globals")) {
require_once('inc/misc/killglobals.php');
}
require('preindex.php');
$usefileext = $Settings['file_ext'];
if ($ext == "noext" || $ext == "no ext" || $ext == "no+ext") {
$usefileext = "";
}
$filewpath = $exfile['admin'].$usefileext.$_SERVER['PATH_INFO'];
?>
<title> <?php echo $Settings['board_name'].$jakebbspowertitle; ?> </title>
</head>
<body>
<?php
$_SESSION['ViewingPage'] = url_maker(null, "no+ext", "act=view", "&", "=", $prexqstr['index'], $exqstr['index']);
if ($Settings['file_ext'] != "no+ext" && $Settings['file_ext'] != "no ext") {
$_SESSION['ViewingFile'] = $exfile['index'].$Settings['file_ext'];
}
if ($Settings['file_ext'] == "no+ext" || $Settings['file_ext'] == "no ext") {
$_SESSION['ViewingFile'] = $exfile['index'];
}
$_SESSION['PreViewingTitle'] = "Viewing";
$_SESSION['ViewingTitle'] = "Board index";
if (!isset($_GET['subact'])) {
$_GET['subact'] = null;
}
if (!isset($_POST['subact'])) {
$_POST['subact'] = null;
}
if (!isset($_GET['menu'])) {
$_GET['menu'] = null;
}
$AdminMenu = null;
require($SettDir['inc'].'navbar.php');
if ($_SESSION['UserGroup'] == $Settings['GuestGroup'] || $GroupInfo['HasAdminCP'] == "no") {
redirect("location", $basedir.url_maker($exfile['index'], $Settings['file_ext'], "act=view", $Settings['qstr'], $Settings['qsep'], $prexqstr['index'], $exqstr['index'], false));
ob_clean();
@header("Content-Type: text/plain; charset=".$Settings['charset']);
gzip_page($Settings['use_gzip'], $GZipEncode['Type']);
@session_write_close();
die();
}
if ($_GET['act'] == null) {
$_GET['act'] = "view";
}
if ($_GET['act'] == "view" && $GroupInfo['ViewDBInfo'] != "yes") {
$_GET['act'] = "view";
}
if ($_GET['act'] == "vercheck" && $GroupInfo['ViewDBInfo'] == "yes") {
@header("Location: ".$VerCheckURL."&bid=".$Settings['bid']."&vercheck=newtype");
}
if ($_GET['act'] == "view") {
$AdminMenu = "menu";
if ($_GET['menu'] == null) {
$AdminMenu = "main";
}
require($SettDir['admin'].'main.php');
}
if ($_GET['act'] == "settings" ||
$_GET['act'] == "mysql" ||
$_GET['act'] == "info" ||
$_GET['act'] == "optimize" ||
$_GET['act'] == "delsessions") {
$AdminMenu = "main";
require($SettDir['admin'].'main.php');
}
if ($_GET['act'] == "addforum" ||
$_GET['act'] == "editforum" ||
$_GET['act'] == "deleteforum" ||
$_GET['act'] == "retopics" ||
$_GET['act'] == "rereplies" ||
$_GET['act'] == "fixrnames" ||
$_GET['act'] == "fixtnames" ||
$_GET['act'] == "fpermissions") {
$AdminMenu = "forums";
require($SettDir['admin'].'forums.php');
}
if ($_GET['act'] == "addcategory" ||
$_GET['act'] == "editcategory" ||
$_GET['act'] == "deletecategory" ||
$_GET['act'] == "cpermissions") {
$AdminMenu = "categories";
require($SettDir['admin'].'categories.php');
}
if ($_GET['act'] == "validate" ||
$_GET['act'] == "editmember" ||
$_GET['act'] == "deletemember") {
$AdminMenu = "members";
require($SettDir['admin'].'members.php');
}
require($SettDir['inc'].'endpage.php');
if (!isset($admincptitle)) {
$admincptitle = null;
}
?>
</body>
</html>
<?php
if ($admincptitle == null) {
change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Admin CP", $Settings['use_gzip'], $GZipEncode['Type']);
}
if ($admincptitle != null) {
change_title($Settings['board_name'].$admincptitle, $Settings['use_gzip'], $GZipEncode['Type']);
}
?>