Small bug fix. :o
[iDB.git] / subforum.php
blobfab6537649e3e290611d3ecd47f8abc83081b8c0
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-2011 iDB Support - http://idb.berlios.de/
12 Copyright 2004-2011 Game Maker 2k - http://gamemaker2k.org/
14 $FileInfo: subforum.php - Last Update: 07/21/2011 SVN 725 - 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 if($Settings['enable_rss']=="on") {
28 <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']); ?>" />
29 <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']); ?>" />
30 <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']); ?>" />
31 <?php } ?>
32 <title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
33 </head>
34 <body>
35 <?php if($_GET['act']!="lowview") {
36 require($SettDir['inc'].'navbar.php'); }
37 $ForumCheck = null;
38 if($_GET['act']==null)
39 { $_GET['act']="view"; }
40 if(!in_array($_GET['act'], $idbactcheck))
41 { $_GET['act']="view"; }
42 if(!is_numeric($_GET['id'])) { $_GET['id']="1"; }
43 if($_GET['act']=="view")
44 { require($SettDir['inc'].'subforums.php'); }
45 if($_GET['act']=="lowview")
46 { require($SettDir['inc'].'lowsubforums.php'); }
47 if($_GET['act']=="oldrss"||$_GET['act']=="rss"||$_GET['act']=="atom"||$_GET['act']=="opml") {
48 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));
49 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
50 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
51 require($SettDir['inc'].'endpage.php');
52 if(!isset($ForumName)) { $ForumName = null; }
53 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." ".$ForumName,$Settings['use_gzip'],$GZipEncode['Type']);