OSDN Git Service

Small bug fix to Low View (Lo-Fi).
[idb/iDB.git.git] / search.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-2009 Cool Dude 2k - http://idb.berlios.de/
12     Copyright 2004-2009 Game Maker 2k - http://intdb.sourceforge.net/
13
14     $FileInfo: search.php - Last Update: 5/01/2009 SVN 247 - Author: cooldude2k $
15 */
16 if(@ini_get("register_globals")) {
17 require_once('inc/misc/killglobals.php'); }
18 require('preindex.php');
19 $usefileext = $Settings['file_ext'];
20 if($ext=="noext"||$ext=="no ext"||$ext=="no+ext") { $usefileext = ""; }
21 $filewpath = $exfile['search'].$usefileext.$_SERVER['PATH_INFO'];
22 ?>
23
24 <title> <?php echo $Settings['board_name'].$idbpowertitle; ?> </title>
25 </head>
26 <body>
27 <?php require($SettDir['inc'].'navbar.php');
28 if($Settings['enable_search']=="off"||
29         $GroupInfo['CanSearch']=="no") {
30 redirect("location",$basedir.url_maker($exfile['index'],$Settings['file_ext'],"act=view",$Settings['qstr'],$Settings['qsep'],$prexqstr['index'],$exqstr['index'],false));
31 @header("Content-Type: text/plain; charset=".$Settings['charset']);
32 ob_clean(); echo "Sorry you do not have permission to do a search."; 
33 gzip_page($Settings['use_gzip'],$GZipEncode['Type']); @mysql_close(); die(); }
34 if($Settings['enable_search']=="on"||$GroupInfo['CanSearch']=="yes") {
35 if(!isset($_GET['search'])) { $_GET['search'] = null; }
36 if(!isset($_POST['search'])) { $_POST['search'] = null; }
37 if($_GET['search']==null&&
38         $_POST['search']!=null) { 
39                 $_GET['search'] = $_POST['search']; }
40 if(!isset($_GET['type'])) { $_GET['type'] = null; }
41 if(!isset($_POST['type'])) { $_POST['type'] = null; }
42 if($_GET['type']==null&&
43         $_POST['type']!=null) { 
44                 $_GET['type'] = $_POST['type']; }
45 if(!isset($_POST['act'])) { $_POST['act'] = null; }
46 if($_GET['act']==null||$_GET['act']=="topic"||
47         $_POST['act']=="topic"||$_POST['act']=="topics")
48         {       $_GET['act']="topics";  }
49 if(!isset($_GET['msearch'])) { $_GET['msearch'] = null; }
50 if(!isset($_POST['msearch'])) { $_POST['msearch'] = null; }
51 if($_GET['msearch']==null&&
52         $_POST['msearch']!=null) { 
53                 $_GET['msearch'] = $_POST['msearch']; }
54 if($_GET['act']=="topics") { 
55 require($SettDir['inc'].'searchs.php'); } }
56 require($SettDir['inc'].'endpage.php');
57 if(!isset($_GET['search'])) { $_GET['search'] = null; }
58 ?>
59 </body>
60 </html>
61 <?php 
62 if($_GET['search']==null&&$_GET['type']==null) {
63 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." Searching",$Settings['use_gzip'],$GZipEncode['Type']); }
64 if($_GET['search']!=null&&$_GET['type']!=null) {
65 change_title($Settings['board_name']." ".$ThemeSet['TitleDivider']." ".$_GET['search'],$Settings['use_gzip'],$GZipEncode['Type']); }
66 ?>