Small update
[iDB.git] / subforum.php
blob6023f35233e8c2822a9a1cb4e92a2078e41d66df
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: subforum.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['subforum'].$usefileext.$_SERVER['PATH_INFO'];
23 if(!is_numeric($_GET['id'])) { $_GET['id']="1"; }
24 $idbactcheck = array("view", "lowview", "oldrss", "rss", "atom", "opml");
25 $iWrappers['EXTRALINKS'] = null;
26 if($Settings['enable_rss']=="on") {
27 ob_start("idb_suboutput_handler");
29 <link rel="alternate" type="application/xml" title="SubForum Topics RSS 1.0 Feed" href="<?php echo url_maker($exfile['rss'],$Settings['rss_ext'],"act=rss&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['rss'],$exqstr['rss']); ?>" />
30 <link rel="alternate" type="application/rss+xml" title="SubForum Topics RSS 2.0 Feed" href="<?php echo url_maker($exfile['rss'],$Settings['rss_ext'],"act=rss&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['rss'],$exqstr['rss']); ?>" />
31 <link rel="alternate" type="application/atom+xml" title="SubForum Topics Atom Feed" href="<?php echo url_maker($exfile['rss'],$Settings['rss_ext'],"act=atom&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['rss'],$exqstr['rss']); ?>" />
32 <?php $iWrappers['EXTRALINKS'] = ob_get_clean(); } ?>
33 <?php ob_start("idb_suboutput_handler"); ?>
34 <title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
35 <?php $iWrappers['TITLETAG'] = ob_get_clean();
36 ob_start("idb_suboutput_handler"); ?>
37 </head>
38 <body>
39 <?php $iWrappers['BODYTAG'] = ob_get_clean();
40 ob_start("idb_suboutput_handler");
41 if($_GET['act']!="lowview") {
42 require($SettDir['inc'].'navbar.php'); }
43 $iWrappers['NAVBAR'] = ob_get_clean();
44 ob_start("idb_suboutput_handler");
45 $ForumCheck = null;
46 if($_GET['act']==null)
47 { $_GET['act']="view"; }
48 if(!in_array($_GET['act'], $idbactcheck))
49 { $_GET['act']="view"; }
50 if(!is_numeric($_GET['id'])) { $_GET['id']="1"; }
51 if($_GET['act']=="view")
52 { require($SettDir['inc'].'subforums.php'); }
53 if($_GET['act']=="lowview")
54 { require($SettDir['inc'].'lowsubforums.php'); }
55 if($_GET['act']=="oldrss"||$_GET['act']=="rss"||$_GET['act']=="atom"||$_GET['act']=="opml") {
56 redirect("location",$rbasedir.url_maker($exfile['rss'],$Settings['file_ext'],"act=".$_GET['act']."&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['rss'],$exqstr['rss'],FALSE));
57 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
58 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
59 $iWrappers['CONTENT'] = ob_get_clean();
60 ob_start("idb_suboutput_handler");
61 require($SettDir['inc'].'endpage.php');
62 $iWrappers['COPYRIGHT'] = ob_get_clean();
63 ob_start("idb_suboutput_handler");
64 if(!isset($ForumName)) { $ForumName = null; }
66 </body>
67 </html>
68 <?php
69 $iWrappers['HTMLEND'] = ob_get_clean();
70 require($SettDir['inc'].'iwrapper.php');
71 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." ".$ForumName,$Settings['use_gzip'],$GZipEncode['Type']);