Update killglobals.php
[iDB.git] / topic.php
blobc73da4965615727c44a38b69d3edca193617bd38
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-2023 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
12 Copyright 2004-2023 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
14 $FileInfo: topic.php - Last Update: 6/22/2023 SVN 984 - 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");
25 <?php $iWrappers['EXTRALINKS'] = null;
26 ob_start("idb_suboutput_handler");
27 $title_html = htmlentities($Settings['board_name'].$idbpowertitle, ENT_QUOTES, $Settings['charset']);
29 <meta itemprop="title" property="og:title" content="<?php echo $title_html; ?>" />
30 <meta itemprop="sitename" property="og:site_name" content="<?php echo $title_html; ?>" />
31 <meta itemprop="title" property="twitter:title" content="<?php echo $title_html; ?>" />
32 <meta name="title" content="<?php echo $title_html; ?>" />
33 <title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
34 <?php $iWrappers['TITLETAG'] = ob_get_clean();
35 ob_start("idb_suboutput_handler"); ?>
36 </head>
37 <body>
38 <?php $iWrappers['BODYTAG'] = ob_get_clean();
39 ob_start("idb_suboutput_handler");
40 if($_GET['act']!="lowview") {
41 require($SettDir['inc'].'navbar.php'); }
42 $iWrappers['NAVBAR'] = ob_get_clean();
43 ob_start("idb_suboutput_handler");
44 $ForumCheck = null;
45 if($_GET['act']==null)
46 { $_GET['act']="view"; }
47 if(!in_array($_GET['act'], $idbactcheck))
48 { $_GET['act']="view"; }
49 if(!is_numeric($_GET['id']))
50 { $_GET['id']="1"; }
51 if($_GET['act']=="view"||$_GET['act']=="create"||$_GET['act']=="delete"||
52 $_GET['act']=="pin"||$_GET['act']=="unpin"||$_GET['act']=="move"||
53 $_GET['act']=="open"||$_GET['act']=="close"||$_GET['act']=="announce")
54 { require($SettDir['inc'].'replies.php'); }
55 if($_GET['act']=="edit"||$_GET['act']=="makereply"||$_POST['act']=="makereplies"||
56 $_GET['act']=="editreply"||$_POST['act']=="editreplies")
57 { require($SettDir['inc'].'replies.php'); }
58 if($_GET['act']=="lowview")
59 { require($SettDir['inc'].'lowreplies.php'); }
60 $iWrappers['CONTENT'] = ob_get_clean();
61 ob_start("idb_suboutput_handler");
62 require($SettDir['inc'].'endpage.php');
63 $iWrappers['COPYRIGHT'] = ob_get_clean();
64 ob_start("idb_suboutput_handler");
65 if(!isset($TopicName)) { $TopicName = null; }
67 </body>
68 </html>
69 <?php
70 $iWrappers['HTMLEND'] = ob_get_clean();
71 require($SettDir['inc'].'iwrapper.php');
72 if($_GET['act']=="view") {
73 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." ".$TopicName,$Settings['use_gzip'],$GZipEncode['Type']); }
74 if($_GET['act']=="lowview") {
75 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." ".$TopicName,$Settings['use_gzip'],$GZipEncode['Type']); }
76 if($_GET['act']=="create") {
77 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Replying to ".$TopicName,$Settings['use_gzip'],$GZipEncode['Type']); }
78 if($_GET['act']=="delete") {
79 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Deleting a Post",$Settings['use_gzip'],$GZipEncode['Type']); }
80 if($_GET['act']=="edit") {
81 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Editing a Post",$Settings['use_gzip'],$GZipEncode['Type']); }
82 if($_GET['act']=="editreply"&&$_POST['act']=="editreplies") {
83 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Editing a Post",$Settings['use_gzip'],$GZipEncode['Type']); }
84 if($_GET['act']=="pin") {
85 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Pinning a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
86 if($_GET['act']=="unpin") {
87 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Unpinning a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
88 if($_GET['act']=="open") {
89 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Opening a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
90 if($_GET['act']=="close") {
91 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Closing a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
92 if($_GET['act']=="move") {
93 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Moving a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
94 if($_GET['act']=="makereply"&&$_POST['act']=="makereplies") {
95 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Replying to ".$TopicName,$Settings['use_gzip'],$GZipEncode['Type']); }