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: search.php - Last Update: 8/23/2024 SVN 1023 - Author: cooldude2k $
16 if (ini_get("register_globals")) {
17 require_once('inc/misc/killglobals.php');
19 require('preindex.php');
20 $usefileext = $Settings['file_ext'];
21 if ($ext == "noext" ||
$ext == "no ext" ||
$ext == "no+ext") {
24 $filewpath = $exfile['search'].$usefileext.$_SERVER['PATH_INFO'];
25 $idbactcheck = array("topic", "topics", "getactive");
26 ob_start("idb_suboutput_handler");
28 <link rel
="search" type
="application/opensearchdescription+xml" title
="<?php echo $Settings['board_name']." ".$ThemeSet['TitleDivider']; ?> Search" href
="<?php echo url_maker($exfile['rss'], $Settings['rss_ext'], "act
=opensearch
", $Settings['qstr'], $Settings['qsep'], $prexqstr['rss'], $exqstr['rss']); ?>" />
29 <?php
$iWrappers['EXTRALINKS'] = ob_get_clean();
30 ob_start("idb_suboutput_handler");
31 $title_html = htmlentities($Settings['board_name'].$idbpowertitle, ENT_QUOTES
, $Settings['charset']);
33 <meta itemprop
="title" property
="og:title" content
="<?php echo $title_html; ?>" />
34 <meta itemprop
="sitename" property
="og:site_name" content
="<?php echo $title_html; ?>" />
35 <meta itemprop
="title" property
="twitter:title" content
="<?php echo $title_html; ?>" />
36 <meta name
="title" content
="<?php echo $title_html; ?>" />
37 <title
> <?php
echo $Settings['board_name'].$idbpowertitle; ?
> </title
>
38 <?php
$iWrappers['TITLETAG'] = ob_get_clean();
39 ob_start("idb_suboutput_handler"); ?
>
42 <?php
$iWrappers['BODYTAG'] = ob_get_clean();
43 ob_start("idb_suboutput_handler");
44 require($SettDir['inc'].'navbar.php');
45 $iWrappers['NAVBAR'] = ob_get_clean();
46 ob_start("idb_suboutput_handler");
47 if ($Settings['enable_search'] == "off" ||
48 $GroupInfo['CanSearch'] == "no") {
49 redirect("location", $rbasedir.url_maker($exfile['index'], $Settings['file_ext'], "act=view", $Settings['qstr'], $Settings['qsep'], $prexqstr['index'], $exqstr['index'], false));
50 header("Content-Type: text/plain; charset=".$Settings['charset']);
52 echo "Sorry you do not have permission to do a search.";
54 gzip_page($Settings['use_gzip'], $GZipEncode['Type']);
55 session_write_close();
58 if ($Settings['enable_search'] == "on" ||
$GroupInfo['CanSearch'] == "yes") {
59 if ($_GET['act'] == "getactive") {
60 $_GET['act'] = "topics";
61 $_GET['type'] = "getactive";
63 if (isset($_GET['type']) && $_GET['type'] == "getactive") {
64 $_POST['type'] = "getactive";
66 if (!isset($_GET['search'])) {
67 $_GET['search'] = null;
69 if (!isset($_POST['search'])) {
70 $_POST['search'] = null;
72 if ($_GET['search'] == null &&
73 $_POST['search'] != null) {
74 $_GET['search'] = $_POST['search'];
76 if (!isset($_GET['type'])) {
79 if (!isset($_POST['type'])) {
80 $_POST['type'] = null;
82 if ($_GET['type'] == null &&
83 $_POST['type'] != null) {
84 $_GET['type'] = $_POST['type'];
86 if (!isset($_POST['act'])) {
89 if ($_GET['act'] == null ||
$_GET['act'] == "topic" ||
90 $_POST['act'] == "topic" ||
$_POST['act'] == "topics") {
91 $_GET['act'] = "topics";
93 if (!in_array($_GET['act'], $idbactcheck)) {
94 $_GET['act'] = "topics";
96 if (!isset($_GET['msearch'])) {
97 $_GET['msearch'] = null;
99 if (!isset($_POST['msearch'])) {
100 $_POST['msearch'] = null;
102 if ($_GET['msearch'] == null &&
103 $_POST['msearch'] != null) {
104 $_GET['msearch'] = $_POST['msearch'];
106 if ($_GET['act'] == "topics") {
107 require($SettDir['inc'].'searches.php');
110 if ($_GET['act'] == "opensearch") {
111 redirect("location", $rbasedir.url_maker($exfile['rss'], $Settings['file_ext'], "act=".$_GET['act'], $Settings['qstr'], $Settings['qsep'], $prexqstr['rss'], $exqstr['rss'], false));
113 header("Content-Type: text/plain; charset=".$Settings['charset']);
115 gzip_page($Settings['use_gzip'], $GZipEncode['Type']);
116 session_write_close();
119 $iWrappers['CONTENT'] = ob_get_clean();
120 ob_start("idb_suboutput_handler");
121 require($SettDir['inc'].'endpage.php');
122 $iWrappers['COPYRIGHT'] = ob_get_clean();
123 ob_start("idb_suboutput_handler");
124 if (!isset($_GET['search'])) {
125 $_GET['search'] = null;
131 $iWrappers['HTMLEND'] = ob_get_clean();
132 require($SettDir['inc'].'iwrapper.php');
133 if ($_GET['search'] == null && $_GET['type'] == null) {
134 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Searching", $Settings['use_gzip'], $GZipEncode['Type']);
136 if ($_GET['search'] != null && $_GET['type'] != null) {
137 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." ".$_GET['search'], $Settings['use_gzip'], $GZipEncode['Type']);
139 if ($_GET['type'] == "getactive") {
140 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Todays Active Topics", $Settings['use_gzip'], $GZipEncode['Type']);