OSDN Git Service

Add files via upload
[idb/iDB.git.git] / inc / searches.php
index 5c6b403..1226270 100644 (file)
@@ -8,10 +8,10 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     Revised BSD License for more details.
 
-    Copyright 2004-2017 iDB Support - http://idb.berlios.de/
-    Copyright 2004-2017 Game Maker 2k - http://gamemaker2k.org/
+    Copyright 2004-2019 iDB Support - https://idb.osdn.jp/support/category.php?act=view&id=1
+    Copyright 2004-2019 Game Maker 2k - https://idb.osdn.jp/support/category.php?act=view&id=2
 
-    $FileInfo: searches.php - Last Update: 01/26/2017 SVN 810 - Author: cooldude2k $
+    $FileInfo: searches.php - Last Update: 4/8/2022 SVN 951 - Author: cooldude2k $
 */
 $File3Name = basename($_SERVER['SCRIPT_NAME']);
 if ($File3Name=="searches.php"||$File3Name=="/searches.php") {
@@ -26,6 +26,24 @@ gzip_page($Settings['use_gzip'],$GZipEncode['Type']); session_write_close(); die
 $pagenum = null;
 if($Settings['enable_search']=="on"||
        $GroupInfo['CanSearch']=="yes") {
+if(isset($_SESSION['OldViewingPage'])) { $_SESSION['AncientViewingPage'] = $_SESSION['OldViewingPage']; } else { $_SESSION['AncientViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
+if(isset($_SESSION['OldViewingFile'])) { $_SESSION['AncientViewingFile'] = $_SESSION['OldViewingFile']; } else { 
+        if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
+           $_SESSION['AncientViewingFile'] = $exfile['index'].$Settings['file_ext']; }
+        if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
+           $_SESSION['AncientViewingFile'] = $exfile['index']; } }
+if(isset($_SESSION['OldPreViewingTitle'])) { $_SESSION['AncientPreViewingTitle'] = $_SESSION['OldPreViewingTitle']; } else { $_SESSION['AncientPreViewingTitle'] = "Viewing"; }
+if(isset($_SESSION['OldViewingTitle'])) { $_SESSION['AncientViewingTitle'] = $_SESSION['OldViewingTitle']; } else { $_SESSION['AncientViewingTitle'] = "Board index"; }
+if(isset($_SESSION['OldExtraData'])) { $_SESSION['AncientExtraData'] = $_SESSION['OldExtraData']; } else { $_SESSION['AncientExtraData'] = "currentact:view; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;"; }
+if(isset($_SESSION['ViewingPage'])) { $_SESSION['OldViewingPage'] = $_SESSION['ViewingPage']; } else { $_SESSION['OldViewingPage'] = url_maker(null,"no+ext","act=view","&","=",$prexqstr['index'],$exqstr['index']); }
+if(isset($_SESSION['ViewingFile'])) { $_SESSION['OldViewingFile'] = $_SESSION['ViewingFile']; } else { 
+        if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
+           $_SESSION['OldViewingFile'] = $exfile['index'].$Settings['file_ext']; }
+        if($Settings['file_ext']=="no+ext"||$Settings['file_ext']=="no ext") {
+           $_SESSION['OldViewingFile'] = $exfile['index']; } }
+if(isset($_SESSION['PreViewingTitle'])) { $_SESSION['OldPreViewingTitle'] = $_SESSION['PreViewingTitle']; } else { $_SESSION['OldPreViewingTitle'] = "Viewing"; }
+if(isset($_SESSION['ViewingTitle'])) { $_SESSION['OldViewingTitle'] = $_SESSION['ViewingTitle']; } else { $_SESSION['OldViewingTitle'] = "Board index"; }
+if(isset($_SESSION['ExtraData'])) { $_SESSION['OldExtraData'] = $_SESSION['ExtraData']; } else { $_SESSION['OldExtraData'] = "currentact:view; currentcategoryid:0; currentforumid:0; currenttopicid:0; currentmessageid:0; currenteventid:0; currentmemberid:0;"; }
 $_SESSION['ViewingPage'] = url_maker(null,"no+ext","act=topics","&","=",$prexqstr['search'],$exqstr['search']);
 if($Settings['file_ext']!="no+ext"&&$Settings['file_ext']!="no ext") {
 $_SESSION['ViewingFile'] = $exfile['search'].$Settings['file_ext']; }
@@ -61,10 +79,10 @@ if($_GET['act']=="topics") {
 <table style="text-align: left;">
 <tr style="text-align: left;">
        <td style="width: 30%;"><label class="TextBoxLabel" for="search">Enter SearchTerm: </label></td>
-       <td style="width: 70%;"><input maxlength="35" class="TextBox" id="search" type="text" name="search" /></td>
+       <td style="width: 70%;"><input maxlength="35" class="TextBox" id="search" type="search" name="search" /></td>
 </tr><tr style="text-align: left;">
        <td style="width: 30%;"><label class="TextBoxLabel" for="msearch">Filter by Member (optional): </label></td>
-       <td style="width: 70%;"><input maxlength="25" class="TextBox" id="msearch" type="text" name="msearch" /></td>
+       <td style="width: 70%;"><input maxlength="25" class="TextBox" id="msearch" type="search" name="msearch" /></td>
 </tr><tr style="text-align: left;">
        <td style="width: 30%;"><label class="TextBoxLabel" title="Wildcard is %" for="type">Search Type: </label></td>
        <td style="width: 70%;"><select id="type" name="type" class="TextBox">
@@ -162,7 +180,7 @@ if($nums<$num) { $nextpage = $_GET['page'] + 1; }
 if($nums>=$num) { $nextpage = $_GET['page']; }
 if($numz>=$Settings['max_topics']) { $backpage = $_GET['page'] - 1; }
 if($_GET['page']<=1) { $backpage = 1; }
-$pnum = $num; $l = 1; $Pages = null;
+$pnum = $num; $l = 1; $Pages = array();;
 while ($pnum>0) {
 if($pnum>=$Settings['max_topics']) { 
        $pnum = $pnum - $Settings['max_topics'];