OSDN Git Service

Yet another bug fix.
[idb/iDB.git.git] / admin.php
1 <?php
2 /*
3     This program is free software; you can redistribute it and/or modify
4     it under the terms of the Revised BSD License.
5
6     This program is distributed in the hope that it will be useful,
7     but WITHOUT ANY WARRANTY; without even the implied warranty of
8     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
9     Revised BSD License for more details.
10
11     Copyright 2004-2009 iDB Support - http://idb.berlios.de/
12     Copyright 2004-2009 Game Maker 2k - http://gamemaker2k.org/
13
14     $FileInfo: admin.php - Last Update: 8/6/2009 SVN 296 - Author: cooldude2k $
15 */
16 if(@ini_get("register_globals")) {
17 require_once('inc/misc/killglobals.php'); }
18 require('preindex.php');
19 $usefileext = $Settings['file_ext'];
20 if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; }
21 $filewpath = $exfile['admin'].$usefileext.$_SERVER['PATH_INFO'];
22 ?>
23
24 <title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
25 </head>
26 <body>
27 <?php
28 $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']);
29 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
30 $_SESSION['ViewingFile'] = $exfile['index'].$Settings['file_ext']; }
31 if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
32 $_SESSION['ViewingFile'] = $exfile['index']; }
33 $_SESSION['PreViewingTitle'] = "Viewing";
34 $_SESSION['ViewingTitle'] = "Board index";
35 if(!isset($_GET['subact'])) { $_GET['subact'] = null; }
36 if(!isset($_POST['subact'])) { $_POST['subact'] = null; }
37 require($SettDir['inc'].'navbar.php');
38 if($_SESSION['UserGroup']==$Settings['GuestGroup']||$GroupInfo['HasAdminCP']=="no") {
39 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
40 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
41 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @session_write_close(); die(); }
42 if($_GET['act']==null) {
43         $_GET['act']="view"; }
44 if($_GET['act']=="view"&&$GroupInfo['ViewDBInfo']!="yes") {
45         $_GET['act']="view"; }
46 if($_GET['act']=="vercheck"&&$GroupInfo['ViewDBInfo']=="yes") {
47         @header("Location: ".$VerCheckURL."&bid=".$Settings['bid']); }
48 if($_GET['act']=="view"||
49         $_GET['act']=="settings"||
50         $_GET['act']=="mysql"||
51         $_GET['act']=="info"||
52         $_GET['act']=="delsessions")
53 { require($SettDir['admin'].'main.php'); }
54 if($_GET['act']=="addforum"||
55         $_GET['act']=="editforum"||
56         $_GET['act']=="deleteforum"||
57         $_GET['act']=="fpermissions")
58 { require($SettDir['admin'].'forums.php'); }
59 if($_GET['act']=="addcategory"||
60         $_GET['act']=="editcategory"||
61         $_GET['act']=="deletecategory"||
62         $_GET['act']=="cpermissions")
63 { require($SettDir['admin'].'categories.php'); }
64 require($SettDir['inc'].'endpage.php'); 
65 if(!isset($admincptitle)) { $admincptitle = null; }
66 ?>
67 </body>
68 </html>
69 <?php
70 if($admincptitle==null) {
71 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Admin CP",$Settings['use_gzip'],$GZipEncode['Type']); }
72 if($admincptitle!=null) {
73 change_title($Settings['board_name'].$admincptitle,$Settings['use_gzip'],$GZipEncode['Type']); }
74 ?>