OSDN Git Service

Added (Fix Topic User Names) and (Fix Reply User Names) to AdminCP.
[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: 11/11/2009 SVN 339 - 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 if(!isset($_GET['menu'])) { $_GET['menu'] = null; }
38 $AdminMenu = null;
39 require($SettDir['inc'].'navbar.php');
40 if($_SESSION['UserGroup']==$Settings['GuestGroup']||$GroupInfo['HasAdminCP']=="no") {
41 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
42 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
43 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @session_write_close(); die(); }
44 if($_GET['act']==null) {
45         $_GET['act']="view"; }
46 if($_GET['act']=="view"&&$GroupInfo['ViewDBInfo']!="yes") {
47         $_GET['act']="view"; }
48 if($_GET['act']=="vercheck"&&$GroupInfo['ViewDBInfo']=="yes") {
49         @header("Location: ".$VerCheckURL."&bid=".$Settings['bid']."&vercheck=newtype"); }
50 if($_GET['act']=="view")
51 { $AdminMenu = "menu";
52 if($_GET['menu']==null) {
53    $AdminMenu = "main"; }
54 require($SettDir['admin'].'main.php'); }
55 if($_GET['act']=="settings"||
56         $_GET['act']=="mysql"||
57         $_GET['act']=="info"||
58         $_GET['act']=="delsessions")
59 { $AdminMenu = "main";
60 require($SettDir['admin'].'main.php'); }
61 if($_GET['act']=="addforum"||
62         $_GET['act']=="editforum"||
63         $_GET['act']=="deleteforum"||
64         $_GET['act']=="retopics"||
65         $_GET['act']=="rereplies"||
66         $_GET['act']=="fixrnames"||
67         $_GET['act']=="fixtnames"||
68         $_GET['act']=="fpermissions")
69 { $AdminMenu = "forums";
70 require($SettDir['admin'].'forums.php'); }
71 if($_GET['act']=="addcategory"||
72         $_GET['act']=="editcategory"||
73         $_GET['act']=="deletecategory"||
74         $_GET['act']=="cpermissions")
75 { $AdminMenu = "categories";
76 require($SettDir['admin'].'categories.php'); }
77 if($_GET['act']=="validate")
78 { $AdminMenu = "members";
79 require($SettDir['admin'].'members.php'); }
80 require($SettDir['inc'].'endpage.php'); 
81 if(!isset($admincptitle)) { $admincptitle = null; }
82 ?>
83 </body>
84 </html>
85 <?php
86 if($admincptitle==null) {
87 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Admin CP",$Settings['use_gzip'],$GZipEncode['Type']); }
88 if($admincptitle!=null) {
89 change_title($Settings['board_name'].$admincptitle,$Settings['use_gzip'],$GZipEncode['Type']); }
90 ?>