Small update.
[iDB.git] / topic.php
blob7d95b658278b6247c2c11594d996bfa8386b9463
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: 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['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; }
49 if($_GET['act']=="view") {
50 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." ".$TopicName,$Settings['use_gzip'],$GZipEncode['Type']); }
51 if($_GET['act']=="lowview") {
52 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." ".$TopicName,$Settings['use_gzip'],$GZipEncode['Type']); }
53 if($_GET['act']=="create") {
54 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Replying to ".$TopicName,$Settings['use_gzip'],$GZipEncode['Type']); }
55 if($_GET['act']=="delete") {
56 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Deleting a Post",$Settings['use_gzip'],$GZipEncode['Type']); }
57 if($_GET['act']=="edit") {
58 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Editing a Post",$Settings['use_gzip'],$GZipEncode['Type']); }
59 if($_GET['act']=="editreply"&&$_POST['act']=="editreplies") {
60 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Editing a Post",$Settings['use_gzip'],$GZipEncode['Type']); }
61 if($_GET['act']=="pin") {
62 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Pinning a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
63 if($_GET['act']=="unpin") {
64 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Unpinning a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
65 if($_GET['act']=="open") {
66 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Opening a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
67 if($_GET['act']=="close") {
68 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Closing a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
69 if($_GET['act']=="move") {
70 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Moving a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
71 if($_GET['act']=="makereply"&&$_POST['act']=="makereplies") {
72 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Replying to ".$TopicName,$Settings['use_gzip'],$GZipEncode['Type']); }