OSDN Git Service

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