Small bug fix. :o
[iDB.git] / topic.php
blob980b4c5f5d8ebaf714f338391a21403635e19f62
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: topic.php - Last Update: 06/17/2011 SVN 676 - 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['topic'].$usefileext.$_SERVER['PATH_INFO'];
23 $idbactcheck = array("view", "create", "delete", "pin", "unpin", "move", "open", "close", "announce", "edit", "makereply", "editreply", "lowview");
26 <title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
27 </head>
28 <body>
29 <?php if($_GET['act']!="lowview") {
30 require($SettDir['inc'].'navbar.php'); }
31 $ForumCheck = null;
32 if($_GET['act']==null)
33 { $_GET['act']="view"; }
34 if(!in_array($_GET['act'], $idbactcheck))
35 { $_GET['act']="view"; }
36 if(!is_numeric($_GET['id']))
37 { $_GET['id']="1"; }
38 if($_GET['act']=="view"||$_GET['act']=="create"||$_GET['act']=="delete"||
39 $_GET['act']=="pin"||$_GET['act']=="unpin"||$_GET['act']=="move"||
40 $_GET['act']=="open"||$_GET['act']=="close"||$_GET['act']=="announce")
41 { require($SettDir['inc'].'replies.php'); }
42 if($_GET['act']=="edit"||$_GET['act']=="makereply"||$_POST['act']=="makereplies"||
43 $_GET['act']=="editreply"||$_POST['act']=="editreplies")
44 { require($SettDir['inc'].'replies.php'); }
45 if($_GET['act']=="lowview")
46 { require($SettDir['inc'].'lowreplies.php'); }
47 require($SettDir['inc'].'endpage.php');
48 if(!isset($TopicName)) { $TopicName = null; }
51 </body>
52 </html>
53 <?php
54 if($_GET['act']=="view") {
55 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." ".$TopicName,$Settings['use_gzip'],$GZipEncode['Type']); }
56 if($_GET['act']=="lowview") {
57 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." ".$TopicName,$Settings['use_gzip'],$GZipEncode['Type']); }
58 if($_GET['act']=="create") {
59 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Replying to ".$TopicName,$Settings['use_gzip'],$GZipEncode['Type']); }
60 if($_GET['act']=="delete") {
61 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Deleting a Post",$Settings['use_gzip'],$GZipEncode['Type']); }
62 if($_GET['act']=="edit") {
63 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Editing a Post",$Settings['use_gzip'],$GZipEncode['Type']); }
64 if($_GET['act']=="editreply"&&$_POST['act']=="editreplies") {
65 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Editing a Post",$Settings['use_gzip'],$GZipEncode['Type']); }
66 if($_GET['act']=="pin") {
67 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Pinning a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
68 if($_GET['act']=="unpin") {
69 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Unpinning a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
70 if($_GET['act']=="open") {
71 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Opening a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
72 if($_GET['act']=="close") {
73 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Closing a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
74 if($_GET['act']=="move") {
75 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Moving a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
76 if($_GET['act']=="makereply"&&$_POST['act']=="makereplies") {
77 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Replying to ".$TopicName,$Settings['use_gzip'],$GZipEncode['Type']); }