OSDN Git Service

Fixed some bugs and also started work on admin cp. :P
[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-2007 Cool Dude 2k - http://intdb.sourceforge.net/
12     Copyright 2004-2007 Game Maker 2k - http://upload.idb.s1.jcink.com/
13
14     $FileInfo: admin.php - Last Update: 08/31/2007 SVN 93 - 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 { require($SettDir['admin'].'main.php'); }
36 require($SettDir['inc'].'endpage.php'); 
37 ?>
38 </body>
39 </html>
40 <?php
41 if($_GET['act']=="view") {
42 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Admin CP",$Settings['use_gzip'],$GZipEncode['Type']); }
43 ?>