OSDN Git Service

More bug fixes.
[idb/iDB.git.git] / topic.php
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.
5
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.
10
11     Copyright 2004-2009 Cool Dude 2k - http://idb.berlios.de/
12     Copyright 2004-2009 Game Maker 2k - http://intdb.sourceforge.net/
13
14     $FileInfo: topic.php - Last Update: 5/04/2009 SVN 249 - Author: cooldude2k $
15 */
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 ?>
24
25 <title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
26 </head>
27 <body>
28 <?php if($_GET['act']!="lowview") {
29 require($SettDir['inc'].'navbar.php'); }
30 if($_GET['act']==null)
31 { $_GET['act']="view"; }
32 if(!is_numeric($_GET['id']))
33 { $_GET['id']="1"; }
34 if($_GET['act']=="view"||$_GET['act']=="create"||$_GET['act']=="delete"||
35         $_GET['act']=="pin"||$_GET['act']=="unpin"||
36         $_GET['act']=="open"||$_GET['act']=="close")
37 { require($SettDir['inc'].'replies.php'); }
38 if($_GET['act']=="edit"||$_GET['act']=="makereply"||$_POST['act']=="makereplies"||
39         $_GET['act']=="editreply"||$_POST['act']=="editreplies")
40 { require($SettDir['inc'].'replies.php'); }
41 if($_GET['act']=="lowview")
42 { require($SettDir['inc'].'lowreplies.php'); }
43 require($SettDir['inc'].'endpage.php');
44 if(!isset($TopicName)) { $TopicName = null; }
45 ?>
46
47 </body>
48 </html>
49 <?php 
50 if($_GET['act']=="view") {
51 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." ".$TopicName,$Settings['use_gzip'],$GZipEncode['Type']); } 
52 if($_GET['act']=="lowview") {
53 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." ".$TopicName,$Settings['use_gzip'],$GZipEncode['Type']); }
54 if($_GET['act']=="create") {
55 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Replying to ".$TopicName,$Settings['use_gzip'],$GZipEncode['Type']); }
56 if($_GET['act']=="delete") {
57 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Deleting a Post",$Settings['use_gzip'],$GZipEncode['Type']); }
58 if($_GET['act']=="edit") {
59 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Editing a Post",$Settings['use_gzip'],$GZipEncode['Type']); }
60 if($_GET['act']=="editreply"&&$_POST['act']=="editreplies") {
61 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Editing a Post",$Settings['use_gzip'],$GZipEncode['Type']); }
62 if($_GET['act']=="pin") {
63 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Pinning a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
64 if($_GET['act']=="unpin") {
65 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Unpinning a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
66 if($_GET['act']=="open") {
67 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Opening a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
68 if($_GET['act']=="close") {
69 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Closing a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
70 if($_GET['act']=="makereply"&&$_POST['act']=="makereplies") {
71 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Replying to ".$TopicName,$Settings['use_gzip'],$GZipEncode['Type']); }
72 ?>