Small update
[iDB.git] / subforum.php
blobf99bae86ab949ca17efbfcc316030cff1ca46ce2
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: subforum.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['subforum'].$usefileext.$_SERVER['PATH_INFO'];
26 if (!is_numeric($_GET['id'])) {
27 $_GET['id'] = "1";
29 $idbactcheck = array("view", "lowview", "oldrss", "rss", "atom", "opml");
30 $iWrappers['EXTRALINKS'] = null;
31 if ($Settings['enable_rss'] == "on") {
32 ob_start("idb_suboutput_handler");
34 <link rel="alternate" type="application/xml" title="SubForum Topics RSS 1.0 Feed" href="<?php echo url_maker($exfile['rss'], $Settings['rss_ext'], "act=rss&id=".$_GET['id'], $Settings['qstr'], $Settings['qsep'], $prexqstr['rss'], $exqstr['rss']); ?>" />
35 <link rel="alternate" type="application/rss+xml" title="SubForum Topics RSS 2.0 Feed" href="<?php echo url_maker($exfile['rss'], $Settings['rss_ext'], "act=rss&id=".$_GET['id'], $Settings['qstr'], $Settings['qsep'], $prexqstr['rss'], $exqstr['rss']); ?>" />
36 <link rel="alternate" type="application/atom+xml" title="SubForum Topics Atom Feed" href="<?php echo url_maker($exfile['rss'], $Settings['rss_ext'], "act=atom&id=".$_GET['id'], $Settings['qstr'], $Settings['qsep'], $prexqstr['rss'], $exqstr['rss']); ?>" />
37 <?php $iWrappers['EXTRALINKS'] = ob_get_clean();
38 } ?>
39 <?php ob_start("idb_suboutput_handler");
40 $title_html = htmlentities($Settings['board_name'].$idbpowertitle, ENT_QUOTES, $Settings['charset']);
42 <meta itemprop="title" property="og:title" content="<?php echo $title_html; ?>" />
43 <meta itemprop="sitename" property="og:site_name" content="<?php echo $title_html; ?>" />
44 <meta itemprop="title" property="twitter:title" content="<?php echo $title_html; ?>" />
45 <meta name="title" content="<?php echo $title_html; ?>" />
46 <title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
47 <?php $iWrappers['TITLETAG'] = ob_get_clean();
48 ob_start("idb_suboutput_handler"); ?>
49 </head>
50 <body>
51 <?php $iWrappers['BODYTAG'] = ob_get_clean();
52 ob_start("idb_suboutput_handler");
53 if ($_GET['act'] != "lowview") {
54 require($SettDir['inc'].'navbar.php');
56 $iWrappers['NAVBAR'] = ob_get_clean();
57 ob_start("idb_suboutput_handler");
58 $ForumCheck = null;
59 if ($_GET['act'] == null) {
60 $_GET['act'] = "view";
62 if (!in_array($_GET['act'], $idbactcheck)) {
63 $_GET['act'] = "view";
65 if (!is_numeric($_GET['id'])) {
66 $_GET['id'] = "1";
68 if ($_GET['act'] == "view" ||
69 $_GET['act'] == "lowview") {
70 require($SettDir['inc'].'subforums.php');
72 if ($_GET['act'] == "oldrss" || $_GET['act'] == "rss" || $_GET['act'] == "atom" || $_GET['act'] == "opml") {
73 redirect("location", $rbasedir.url_maker($exfile['rss'], $Settings['file_ext'], "act=".$_GET['act']."&id=".$_GET['id'], $Settings['qstr'], $Settings['qsep'], $prexqstr['rss'], $exqstr['rss'], false));
74 ob_clean();
75 header("Content-Type: text/plain; charset=".$Settings['charset']);
76 $urlstatus = 302;
77 gzip_page($Settings['use_gzip'], $GZipEncode['Type']);
78 session_write_close();
79 die();
81 $iWrappers['CONTENT'] = ob_get_clean();
82 ob_start("idb_suboutput_handler");
83 require($SettDir['inc'].'endpage.php');
84 $iWrappers['COPYRIGHT'] = ob_get_clean();
85 ob_start("idb_suboutput_handler");
86 if (!isset($ForumName)) {
87 $ForumName = null;
90 </body>
91 </html>
92 <?php
93 $iWrappers['HTMLEND'] = ob_get_clean();
94 require($SettDir['inc'].'iwrapper.php');
95 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." ".$ForumName, $Settings['use_gzip'], $GZipEncode['Type']);