Small bug fix to calendars.php :P
[iDB.git] / forum.php
blobf7a6d604c7620585f7d0e65b73fd4b026bd5a10c
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: forum.php - Last Update: 12/07/2010 SVN 600 - 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['forum'].$usefileext.$_SERVER['PATH_INFO'];
23 if(!is_numeric($_GET['id'])) { $_GET['id']="1"; }
24 if($Settings['enable_rss']=="on") {
27 <link rel="alternate" type="application/xml" title="Forum Topics RSS 1.0 Feed" href="<?php echo url_maker($exfile['rss'],$Settings['rss_ext'],"act=oldrss&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['rss'],$exqstr['rss']); ?>" />
28 <link rel="alternate" type="application/rss+xml" title="Forum 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']); ?>" />
29 <link rel="alternate" type="application/atom+xml" title="Forum 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']); ?>" />
30 <?php } ?>
31 <title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
32 </head>
33 <body>
34 <?php if($_GET['act']!="lowview") {
35 require($SettDir['inc'].'navbar.php'); }
36 $ForumCheck = null;
37 if($_GET['act']==null)
38 { $_GET['act']="view"; }
39 if(!is_numeric($_GET['id'])) { $_GET['id']="1"; }
40 if($_GET['act']=="view"||$_GET['act']=="create"||
41 $_GET['act']=="maketopic"||$_POST['act']=="maketopics")
42 { require($SettDir['inc'].'topics.php'); }
43 if($_GET['act']=="lowview")
44 { require($SettDir['inc'].'lowtopics.php'); }
45 if($_GET['act']=="oldrss"||$_GET['act']=="rss"||$_GET['act']=="atom") {
46 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));
47 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']);
48 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
49 require($SettDir['inc'].'endpage.php');
50 if(!isset($ForumName)) { $ForumName = null; }
53 </body>
54 </html>
55 <?php
56 if($_GET['act']=="view"||$_GET['act']=="lowview") {
57 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." ".$ForumName,$Settings['use_gzip'],$GZipEncode['Type']); }
58 if($_GET['act']=="create") {
59 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Making a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
60 if($_GET['act']=="maketopic"&&$_POST['act']=="maketopics") {
61 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Making a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }