Small update
[iDB.git] / index.php
blobf29df4cb5cce6d5a125484ed721d78e8f01a401b
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.
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.
11 Copyright 2004-2019 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
12 Copyright 2004-2019 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
14 $FileInfo: index.php - Last Update: 08/02/2019 SVN 905 - Author: cooldude2k $
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 $idbactcheck = array("view", "lowview", "stats");
25 if(isset($_GET['showcategory'])&&is_numeric($_GET['showcategory'])) {
26 $showact = "view";
27 if($_GET['act']=="lowview") { $showact = "lowview"; }
28 redirect("location",$rbasedir.url_maker($exfile['category'],$Settings['file_ext'],"act=".$showact."&id=".$_GET['showcategory'],$Settings['qstr'],$Settings['qsep'],$prexqstr['category'],$exqstr['category'],FALSE));
29 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
30 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
32 if(isset($_GET['showforum'])&&is_numeric($_GET['showforum'])) {
33 $showact = "view";
34 if($_GET['act']=="lowview") { $showact = "lowview"; }
35 redirect("location",$rbasedir.url_maker($exfile['forum'],$Settings['file_ext'],"act=".$showact."&id=".$_GET['showforum'],$Settings['qstr'],$Settings['qsep'],$prexqstr['forum'],$exqstr['forum'],FALSE));
36 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
37 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
39 if(isset($_GET['showtopic'])&&is_numeric($_GET['showtopic'])) {
40 $showact = "view";
41 if($_GET['act']=="lowview") { $showact = "lowview"; }
42 if(isset($_GET['showpost'])&&is_numeric($_GET['showpost'])) {
43 redirect("location",$rbasedir.url_maker($exfile['topic'],$Settings['file_ext'],"act=".$showact."&id=".$_GET['showtopic']."&post=".$_GET['showpost'],$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'],FALSE));
44 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); }
45 if(!isset($_GET['showpost'])) { $_GET['showpost'] = null; }
46 if(!isset($_GET['showpost'])||!is_numeric($_GET['showpost'])) {
47 if(!isset($_GET['showpage'])) { $_GET['showpage'] = 1; }
48 if(!isset($_GET['showpage'])||!is_numeric($_GET['showpage'])) { $_GET['showpage'] = 1; } $urlstatus = 302;
49 redirect("location",$rbasedir.url_maker($exfile['topic'],$Settings['file_ext'],"act=".$showact."&id=".$_GET['showtopic']."&page=".$_GET['showpage'],$Settings['qstr'],$Settings['qsep'],$prexqstr['topic'],$exqstr['topic'],FALSE));
50 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); }
51 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
53 if(isset($_GET['showuser'])&&is_numeric($_GET['showuser'])) {
54 redirect("location",$rbasedir.url_maker($exfile['member'],$Settings['file_ext'],"act=view&id=".$_GET['showuser'],$Settings['qstr'],$Settings['qsep'],$prexqstr['member'],$exqstr['member'],FALSE));
55 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
56 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
58 if(isset($_GET['showevent'])&&is_numeric($_GET['showevent'])) {
59 redirect("location",$rbasedir.url_maker($exfile['event'],$Settings['file_ext'],"act=view&id=".$_GET['showevent'],$Settings['qstr'],$Settings['qsep'],$prexqstr['event'],$exqstr['event'],FALSE));
60 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
61 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
64 <?php $iWrappers['EXTRALINKS'] = null;
65 ob_start("idb_suboutput_handler"); ?>
66 <title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
67 <?php $iWrappers['TITLETAG'] = ob_get_clean();
68 ob_start("idb_suboutput_handler"); ?>
69 </head>
70 <body>
71 <?php $iWrappers['BODYTAG'] = ob_get_clean();
72 ob_start("idb_suboutput_handler");
73 if($_GET['act']!="lowview") {
74 require($SettDir['inc'].'navbar.php'); }
75 $iWrappers['NAVBAR'] = ob_get_clean();
76 ob_start("idb_suboutput_handler");
77 if($_GET['act']==null)
78 { $_GET['act']="view"; }
79 if(!in_array($_GET['act'], $idbactcheck))
80 { $_GET['act']="view"; }
81 if($_GET['act']=="view")
82 { require($SettDir['inc'].'forums.php'); }
83 if($_GET['act']=="lowview")
84 { require($SettDir['inc'].'lowforums.php'); }
85 if($_GET['act']=="view"||$_GET['act']=="stats")
86 { require($SettDir['inc'].'stats.php'); }
87 $iWrappers['CONTENT'] = ob_get_clean();
88 ob_start("idb_suboutput_handler");
89 require($SettDir['inc'].'endpage.php');
90 $iWrappers['COPYRIGHT'] = ob_get_clean();
91 ob_start("idb_suboutput_handler");
93 </body>
94 </html>
95 <?php $iWrappers['HTMLEND'] = ob_get_clean();
96 require($SettDir['inc'].'iwrapper.php');
97 fix_amp($Settings['use_gzip'],$GZipEncode['Type']); ?>