Update killglobals.php
[iDB.git] / index.php
blob36176f99c27dfa9ee90500cbcb35a934014e83fd
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-2023 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
12 Copyright 2004-2023 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
14 $FileInfo: index.php - Last Update: 6/22/2023 SVN 984 - 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_html = htmlentities($Settings['board_name'].$idbpowertitle, ENT_QUOTES, $Settings['charset']);
68 <meta itemprop="title" property="og:title" content="<?php echo $title_html; ?>" />
69 <meta itemprop="sitename" property="og:site_name" content="<?php echo $title_html; ?>" />
70 <meta itemprop="title" property="twitter:title" content="<?php echo $title_html; ?>" />
71 <meta name="title" content="<?php echo $title_html; ?>" />
72 <title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
73 <?php $iWrappers['TITLETAG'] = ob_get_clean();
74 ob_start("idb_suboutput_handler"); ?>
75 </head>
76 <body>
77 <?php $iWrappers['BODYTAG'] = ob_get_clean();
78 ob_start("idb_suboutput_handler");
79 if($_GET['act']!="lowview") {
80 require($SettDir['inc'].'navbar.php'); }
81 $iWrappers['NAVBAR'] = ob_get_clean();
82 ob_start("idb_suboutput_handler");
83 if($_GET['act']==null)
84 { $_GET['act']="view"; }
85 if(!in_array($_GET['act'], $idbactcheck))
86 { $_GET['act']="view"; }
87 if($_GET['act']=="view")
88 { require($SettDir['inc'].'forums.php'); }
89 if($_GET['act']=="lowview")
90 { require($SettDir['inc'].'lowforums.php'); }
91 if($_GET['act']=="view"||$_GET['act']=="stats")
92 { require($SettDir['inc'].'stats.php'); }
93 $iWrappers['CONTENT'] = ob_get_clean();
94 ob_start("idb_suboutput_handler");
95 require($SettDir['inc'].'endpage.php');
96 $iWrappers['COPYRIGHT'] = ob_get_clean();
97 ob_start("idb_suboutput_handler");
99 </body>
100 </html>
101 <?php $iWrappers['HTMLEND'] = ob_get_clean();
102 require($SettDir['inc'].'iwrapper.php');
103 fix_amp($Settings['use_gzip'],$GZipEncode['Type']); ?>