Small update
[iDB.git] / topic.php
blob931a96c5fd20cce7ef24024cfbc70cbd4d75b608
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-2024 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
12 Copyright 2004-2024 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
14 $FileInfo: topic.php - Last Update: 8/23/2024 SVN 1023 - Author: cooldude2k $
16 if (ini_get("register_globals")) {
17 require_once('inc/misc/killglobals.php');
19 $checklowview = true;
20 require('preindex.php');
21 $usefileext = $Settings['file_ext'];
22 if ($ext == "noext" || $ext == "no ext" || $ext == "no+ext") {
23 $usefileext = "";
25 $filewpath = $exfile['topic'].$usefileext.$_SERVER['PATH_INFO'];
26 $idbactcheck = array("view", "create", "delete", "pin", "unpin", "move", "open", "close", "announce", "edit", "makereply", "editreply", "lowview");
28 <?php $iWrappers['EXTRALINKS'] = null;
29 ob_start("idb_suboutput_handler");
30 $title_html = htmlentities($Settings['board_name'].$idbpowertitle, ENT_QUOTES, $Settings['charset']);
32 <meta itemprop="title" property="og:title" content="<?php echo $title_html; ?>" />
33 <meta itemprop="sitename" property="og:site_name" content="<?php echo $title_html; ?>" />
34 <meta itemprop="title" property="twitter:title" content="<?php echo $title_html; ?>" />
35 <meta name="title" content="<?php echo $title_html; ?>" />
36 <title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
37 <?php $iWrappers['TITLETAG'] = ob_get_clean();
38 ob_start("idb_suboutput_handler"); ?>
39 </head>
40 <body>
41 <?php $iWrappers['BODYTAG'] = ob_get_clean();
42 ob_start("idb_suboutput_handler");
43 if ($_GET['act'] != "lowview") {
44 require($SettDir['inc'].'navbar.php');
46 $iWrappers['NAVBAR'] = ob_get_clean();
47 ob_start("idb_suboutput_handler");
48 $ForumCheck = null;
49 if ($_GET['act'] == null) {
50 $_GET['act'] = "view";
52 if (!in_array($_GET['act'], $idbactcheck)) {
53 $_GET['act'] = "view";
55 if (!is_numeric($_GET['id'])) {
56 $_GET['id'] = "1";
58 if ($_GET['act'] == "view" ||
59 $_GET['act'] == "lowview" ||
60 $_GET['act'] == "create" ||
61 $_GET['act'] == "delete" ||
62 $_GET['act'] == "pin" ||
63 $_GET['act'] == "unpin" ||
64 $_GET['act'] == "move" ||
65 $_GET['act'] == "open" ||
66 $_GET['act'] == "close" ||
67 $_GET['act'] == "announce") {
68 require($SettDir['inc'].'replies.php');
70 if ($_GET['act'] == "edit" ||
71 $_GET['act'] == "makereply" ||
72 $_POST['act'] == "makereplies" ||
73 $_GET['act'] == "editreply" ||
74 $_POST['act'] == "editreplies") {
75 require($SettDir['inc'].'replies.php');
77 $iWrappers['CONTENT'] = ob_get_clean();
78 ob_start("idb_suboutput_handler");
79 require($SettDir['inc'].'endpage.php');
80 $iWrappers['COPYRIGHT'] = ob_get_clean();
81 ob_start("idb_suboutput_handler");
82 if (!isset($TopicName)) {
83 $TopicName = null;
86 </body>
87 </html>
88 <?php
89 $iWrappers['HTMLEND'] = ob_get_clean();
90 require($SettDir['inc'].'iwrapper.php');
91 if ($_GET['act'] == "view") {
92 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." ".$TopicName, $Settings['use_gzip'], $GZipEncode['Type']);
94 if ($_GET['act'] == "lowview") {
95 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." ".$TopicName, $Settings['use_gzip'], $GZipEncode['Type']);
97 if ($_GET['act'] == "create") {
98 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Replying to ".$TopicName, $Settings['use_gzip'], $GZipEncode['Type']);
100 if ($_GET['act'] == "delete") {
101 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Deleting a Post", $Settings['use_gzip'], $GZipEncode['Type']);
103 if ($_GET['act'] == "edit") {
104 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Editing a Post", $Settings['use_gzip'], $GZipEncode['Type']);
106 if ($_GET['act'] == "editreply" && $_POST['act'] == "editreplies") {
107 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Editing a Post", $Settings['use_gzip'], $GZipEncode['Type']);
109 if ($_GET['act'] == "pin") {
110 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Pinning a Topic", $Settings['use_gzip'], $GZipEncode['Type']);
112 if ($_GET['act'] == "unpin") {
113 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Unpinning a Topic", $Settings['use_gzip'], $GZipEncode['Type']);
115 if ($_GET['act'] == "open") {
116 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Opening a Topic", $Settings['use_gzip'], $GZipEncode['Type']);
118 if ($_GET['act'] == "close") {
119 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Closing a Topic", $Settings['use_gzip'], $GZipEncode['Type']);
121 if ($_GET['act'] == "move") {
122 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Moving a Topic", $Settings['use_gzip'], $GZipEncode['Type']);
124 if ($_GET['act'] == "makereply" && $_POST['act'] == "makereplies") {
125 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Replying to ".$TopicName, $Settings['use_gzip'], $GZipEncode['Type']);