OSDN Git Service

Yet another small update. :P
[idb/iDB.git.git] / index.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-2010 iDB Support - http://idb.berlios.de/
12     Copyright 2004-2010 Game Maker 2k - http://gamemaker2k.org/
13
14     $FileInfo: index.php - Last Update: 09/05/2010 SVN 576 - Author: cooldude2k $
15 */
16 if(ini_get("register_globals")) {
17 require_once('inc/misc/killglobals.php'); }
18 $checklowview = true;
19 require('preindex.php');
20 $usefileext = $Settings['file_ext'];
21 if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; }
22 $filewpath = $exfile['index'].$usefileext.$_SERVER['PATH_INFO'];
23
24 if(isset($_GET['showcategory'])&&is_numeric($_GET['showcategory'])) {
25 redirect("location",$rbasedir.url_maker($exfile['category'],$Settings['file_ext'],"act=view&id=".$_GET['showcategory'],$Settings['qstr'],$Settings['qsep'],$prexqstr['category'],$exqstr['category'],FALSE));
26 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
27 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
28
29 if(isset($_GET['showforum'])&&is_numeric($_GET['showforum'])) {
30 redirect("location",$rbasedir.url_maker($exfile['forum'],$Settings['file_ext'],"act=view&id=".$_GET['showforum'],$Settings['qstr'],$Settings['qsep'],$prexqstr['forum'],$exqstr['forum'],FALSE));
31 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
32 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
33
34 if(isset($_GET['showtopic'])&&is_numeric($_GET['showtopic'])) {
35 if(isset($_GET['showpost'])&&is_numeric($_GET['showpost'])) {
36 redirect("location",$rbasedir.url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$_GET['showtopic']."&post=".$_GET['showpost'],$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'],FALSE));
37 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); }
38 if(!isset($_GET['showpost'])) { $_GET['showpost'] = null; }
39 if(!isset($_GET['showpost'])||!is_numeric($_GET['showpost'])) {
40 if(!isset($_GET['showpage'])) { $_GET['showpage'] = 1; }
41 if(!isset($_GET['showpage'])||!is_numeric($_GET['showpage'])) { $_GET['showpage'] = 1; }
42 redirect("location",$rbasedir.url_maker($exfile['topic'],$Settings['file_ext'],"act=view&id=".$_GET['showtopic']."&page=".$_GET['showpage'],$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'],FALSE));
43 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); }
44 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
45
46 if(isset($_GET['showuser'])&&is_numeric($_GET['showuser'])) {
47 redirect("location",$rbasedir.url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$_GET['showuser'],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],FALSE));
48 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
49 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
50
51 if(isset($_GET['showevent'])&&is_numeric($_GET['showevent'])) {
52 redirect("location",$rbasedir.url_maker($exfile['event'],$Settings['file_ext'],"act=view&id=".$_GET['showevent'],$Settings['qstr'],$Settings['qsep'],$prexqstr['event'],$exqstr['event'],FALSE));
53 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
54 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
55 ?>
56
57 <title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
58 </head>
59 <body>
60 <?php if($_GET['act']!="lowview") {
61 require($SettDir['inc'].'navbar.php'); }
62
63 if($_GET['act']==null)
64 { $_GET['act']="view"; }
65 if($_GET['act']=="view")
66 { require($SettDir['inc'].'forums.php'); }
67 if($_GET['act']=="lowview")
68 { require($SettDir['inc'].'lowforums.php'); }
69 if($_GET['act']=="view"||$_GET['act']=="stats")
70 { require($SettDir['inc'].'stats.php'); }
71 require($SettDir['inc'].'endpage.php');
72 ?>
73 </body>
74 </html>
75 <?php fix_amp($Settings['use_gzip'],$GZipEncode['Type']); ?>