OSDN Git Service

Add files via upload
[idb/iDB.git.git] / forum.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-2019 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
12     Copyright 2004-2019 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
13
14     $FileInfo: forum.php - Last Update: 08/02/2019 SVN 905 - 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['forum'].$usefileext.$_SERVER['PATH_INFO'];
23 if(!is_numeric($_GET['id'])) { $_GET['id']="1"; }
24 $idbactcheck = array("view", "create", "maketopic", "lowview", "oldrss", "rss", "atom", "opml");
25 $iWrappers['EXTRALINKS'] = null;
26 if($Settings['enable_rss']=="on") {
27 ob_start("idb_suboutput_handler");
28 ?>
29 <link rel="alternate" type="application/xml" title="Forum Topics RSS 1.0 Feed" href="<?php echo url_maker($exfile['rss'],$Settings['rss_ext'],"act=oldrss&id=".$_GET['id'],$Settings['qstr'],$Settings['qsep'],$prexqstr['rss'],$exqstr['rss']); ?>" />
30 <link rel="alternate" type="application/rss+xml" title="Forum 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']); ?>" />
31 <link rel="alternate" type="application/atom+xml" title="Forum 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']); ?>" />
32 <?php $iWrappers['EXTRALINKS'] = ob_get_clean(); } ?>
33 <?php ob_start("idb_suboutput_handler");
34 $title_html = htmlentities($Settings['board_name'].$idbpowertitle, ENT_QUOTES, $Settings['charset']);
35 ?>
36 <meta itemprop="title" property="og:title" content="<?php echo $title_html; ?>" />
37 <meta itemprop="sitename" property="og:site_name" content="<?php echo $title_html; ?>" />
38 <meta itemprop="title" property="twitter:title" content="<?php echo $title_html; ?>" />
39 <title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
40 <?php $iWrappers['TITLETAG'] = ob_get_clean(); 
41 ob_start("idb_suboutput_handler"); ?>
42 </head>
43 <body>
44 <?php $iWrappers['BODYTAG'] = ob_get_clean();
45 ob_start("idb_suboutput_handler");
46 if($_GET['act']!="lowview") {
47 require($SettDir['inc'].'navbar.php'); }
48 $iWrappers['NAVBAR'] = ob_get_clean();
49 ob_start("idb_suboutput_handler");
50 $ForumCheck = null;
51 if($_GET['act']==null)
52 { $_GET['act']="view"; }
53 if(!in_array($_GET['act'], $idbactcheck))
54 { $_GET['act']="view"; }
55 if(!is_numeric($_GET['id'])) { $_GET['id']="1"; }
56 if($_GET['act']=="view"||$_GET['act']=="create"||
57         $_GET['act']=="maketopic"||$_POST['act']=="maketopics")
58 { require($SettDir['inc'].'topics.php'); } 
59 if($_GET['act']=="lowview")
60 { require($SettDir['inc'].'lowtopics.php'); }
61 if($_GET['act']=="oldrss"||$_GET['act']=="rss"||$_GET['act']=="atom"||$_GET['act']=="opml") {
62 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));
63 ob_clean(); header("Content-Type: text/plain; charset=".$Settings['charset']); $urlstatus = 302;
64 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die(); }
65 $iWrappers['CONTENT'] = ob_get_clean();
66 ob_start("idb_suboutput_handler");
67 require($SettDir['inc'].'endpage.php');
68 $iWrappers['COPYRIGHT'] = ob_get_clean();
69 ob_start("idb_suboutput_handler");
70 if(!isset($ForumName)) { $ForumName = null; }
71 ?>
72 </body>
73 </html>
74 <?php 
75 $iWrappers['HTMLEND'] = ob_get_clean();
76 require($SettDir['inc'].'iwrapper.php');
77 if($_GET['act']=="view"||$_GET['act']=="lowview") {
78 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." ".$ForumName,$Settings['use_gzip'],$GZipEncode['Type']); } 
79 if($_GET['act']=="create") {
80 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Making a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
81 if($_GET['act']=="maketopic"&&$_POST['act']=="maketopics") {
82 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Making a Topic",$Settings['use_gzip'],$GZipEncode['Type']); }
83 ?>