OSDN Git Service

Small bug fix and added more to admin cp.
[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-2008 Cool Dude 2k - http://idb.berlios.de/
12     Copyright 2004-2008 Game Maker 2k - http://intdb.sourceforge.net/
13
14     $FileInfo: admin.php - Last Update: 02/15/2008 SVN 148 - Author: cooldude2k $
15 */
16 require('preindex.php');
17 $usefileext = $Settings['file_ext'];
18 if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; }
19 $filewpath = $exfile['admin'].$usefileext.$_SERVER['PATH_INFO'];
20 ?>
21
22 <title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
23 </head>
24 <body>
25 <?php
26 if(!isset($_GET['subact'])) { $_GET['subact'] = null; }
27 require($SettDir['inc'].'navbar.php');
28 if($_SESSION['UserGroup']==$Settings['GuestGroup']||$GroupInfo['HasAdminCP']=="no") {
29 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
30 ob_clean(); @header("Content-Type: text/plain; charset=".$Settings['charset']);
31 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
32 if($_GET['act']==null) {
33 $_GET['act']="view"; }
34 if($_GET['act']=="view"||
35         $_GET['act']=="settings"||
36         $_GET['act']=="mysql"||
37         $_GET['act']=="info")
38 { require($SettDir['admin'].'main.php'); }
39 require($SettDir['inc'].'endpage.php'); 
40 if(!isset($admincptitle)) { $admincptitle = null; }
41 ?>
42 </body>
43 </html>
44 <?php
45 if($admincptitle==null) {
46 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Admin CP",$Settings['use_gzip'],$GZipEncode['Type']); }
47 if($admincptitle!=null) {
48 change_title($Settings['board_name'].$admincptitle,$Settings['use_gzip'],$GZipEncode['Type']); }
49 ?>