| 1 | 1 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,339 @@ |
| 1 |
+<?php |
|
| 2 |
+// ---------------------------------------------------------------------- |
|
| 3 |
+// Copyright (c) 2007 by Tammy Keefer |
|
| 4 |
+// Valid HTML 4.01 Transitional |
|
| 5 |
+// Based on eFiction 1.1 |
|
| 6 |
+// Copyright (C) 2003 by Rebecca Smallwood. |
|
| 7 |
+// http://efiction.sourceforge.net/ |
|
| 8 |
+// ---------------------------------------------------------------------- |
|
| 9 |
+// LICENSE |
|
| 10 |
+// |
|
| 11 |
+// This program is free software; you can redistribute it and/or |
|
| 12 |
+// modify it under the terms of the GNU General Public License (GPL) |
|
| 13 |
+// as published by the Free Software Foundation; either version 2 |
|
| 14 |
+// of the License, or (at your option) any later version. |
|
| 15 |
+// |
|
| 16 |
+// This program is distributed in the hope that it will be useful, |
|
| 17 |
+// but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 18 |
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 19 |
+// GNU General Public License for more details. |
|
| 20 |
+// |
|
| 21 |
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html |
|
| 22 |
+// ---------------------------------------------------------------------- |
|
| 23 |
+ |
|
| 24 |
+ |
|
| 25 |
+// Page Setup |
|
| 26 |
+// Set the current page id. Because search does multiple things there are multiple possibilities |
|
| 27 |
+if(isset($_POST['submit']) || isset($_GET['offset'])) $current = "searchresults"; |
|
| 28 |
+else $current = "search"; |
|
| 29 |
+if(isset($_GET['action']) && $_GET['action'] == "advanced") $displayform = 1; |
|
| 30 |
+// Now set up the page |
|
| 31 |
+ |
|
| 32 |
+$displayform = 1; |
|
| 33 |
+ |
|
| 34 |
+ |
|
| 35 |
+include ("header.php");
|
|
| 36 |
+ |
|
| 37 |
+if(file_exists("$skindir/browse.tpl")) $tpl = new TemplatePower( "$skindir/browse.tpl" );
|
|
| 38 |
+else $tpl = new TemplatePower("default_tpls/browse.tpl");
|
|
| 39 |
+if(file_exists("$skindir/listings.tpl")) $tpl->assignInclude( "listings", "./$skindir/listings.tpl" );
|
|
| 40 |
+else $tpl->assignInclude( "listings", "./default_tpls/listings.tpl" ); |
|
| 41 |
+ |
|
| 42 |
+include("includes/pagesetup.php");
|
|
| 43 |
+ |
|
| 44 |
+ |
|
| 45 |
+$searchtype = (isset($_REQUEST['searchtype']) ? $_REQUEST['searchtype'] : "simple"); |
|
| 46 |
+$searchterm = (isset($_REQUEST['searchterm']) ? escapestring($_REQUEST['searchterm']) : false); |
|
| 47 |
+ |
|
| 48 |
+if(isset($_POST['submit']) || isset($_GET['offset'])) {
|
|
| 49 |
+ $output .= "<div id=\"pagetitle\">"._RESULTS."</div>"; |
|
| 50 |
+ $query = array(); |
|
| 51 |
+ $countquery = array(); |
|
| 52 |
+ $scountquery = array(); |
|
| 53 |
+ if($searchtype == "fulltext") {
|
|
| 54 |
+ $query = "SELECT stories.*, "._PENNAMEFIELD." as penname, UNIX_TIMESTAMP(stories.date) as date, UNIX_TIMESTAMP(stories.updated) as updated FROM "._AUTHORTABLE.", ".TABLEPREFIX."fanfiction_stories as stories, ".TABLEPREFIX."fanfiction_chapters as chapter WHERE chapter.storytext LIKE '%$searchterm%' AND chapter.sid = stories.sid AND stories.uid = "._UIDFIELD; |
|
| 55 |
+ $countquery = "SELECT count(stories.sid) FROM ".TABLEPREFIX."fanfiction_stories as stories, ".TABLEPREFIX."fanfiction_chapters as chapter WHERE chapter.storytext LIKE '%$searchterm%' AND chapter.sid = stories.sid GROUP BY stories.sid"; |
|
| 56 |
+ $query .= " "._ORDERBY; |
|
| 57 |
+ search($query, $countquery); |
|
| 58 |
+ $tpl->assign("output", $output);
|
|
| 59 |
+ $tpl->printToScreen(); |
|
| 60 |
+ dbclose( ); |
|
| 61 |
+ exit( ); |
|
| 62 |
+ } |
|
| 63 |
+ if($searchterm && strlen($searchterm) < 3) {
|
|
| 64 |
+ errorExit(_SEARCHTERMTOOSHORT); |
|
| 65 |
+ } |
|
| 66 |
+ if($searchterm) {
|
|
| 67 |
+ if($searchtype == "title") {
|
|
| 68 |
+ $query[] = "stories.title LIKE '%$searchterm%'"; |
|
| 69 |
+ $countquery[] = "stories.title LIKE '%$searchterm%'"; |
|
| 70 |
+ $scountquery[] = "series.title LIKE '%$searchterm%'"; |
|
| 71 |
+ } |
|
| 72 |
+ if($searchtype == "summary") {
|
|
| 73 |
+ $query[] = "stories.summary LIKE '%$searchterm%'"; |
|
| 74 |
+ $countquery[] = "stories.summary LIKE '%$searchterm%'"; |
|
| 75 |
+ $scountquery[] = "series.summary LIKE '%$searchterm%'"; |
|
| 76 |
+ } |
|
| 77 |
+ if($searchtype == "penname") {
|
|
| 78 |
+ $authorquery = dbquery(_MEMBERLIST." WHERE "._PENNAMEFIELD." LIKE '%$searchterm%' GROUP BY "._UIDFIELD); |
|
| 79 |
+ $authorlist = array(); |
|
| 80 |
+ while($auth = dbassoc($authorquery)) {
|
|
| 81 |
+ $authorlist[] = $auth['uid']; |
|
| 82 |
+ } |
|
| 83 |
+ if(count($authorlist) > 0) {
|
|
| 84 |
+ $authors = implode(",",$authorlist);
|
|
| 85 |
+ $query = "SELECT stories.*, "._PENNAMEFIELD." as penname, UNIX_TIMESTAMP(stories.date) as date, UNIX_TIMESTAMP(stories.updated) as updated FROM ("._AUTHORTABLE.", ".TABLEPREFIX."fanfiction_stories as stories) LEFT JOIN ".TABLEPREFIX."fanfiction_coauthors as coauth ON coauth.sid = stories.sid WHERE "._UIDFIELD." = stories.uid AND stories.validated > 0 AND (FIND_IN_SET(stories.uid, '$authors') > 0 OR FIND_IN_SET(coauth.uid, '$authors') > 0) ";
|
|
| 86 |
+ $countquery = "SELECT COUNT(stories.sid) FROM ".TABLEPREFIX."fanfiction_stories as stories LEFT JOIN ".TABLEPREFIX."fanfiction_coauthors as coauth ON coauth.sid = stories.sid WHERE stories.validated > 0 AND (FIND_IN_SET(stories.uid, '$authors') > 0 OR FIND_IN_SET(coauth.uid, '$authors') > 0)"; |
|
| 87 |
+ search($query, $countquery); |
|
| 88 |
+ $tpl->assign("output", $output);
|
|
| 89 |
+ $tpl->printToScreen(); |
|
| 90 |
+ dbclose( ); |
|
| 91 |
+ exit( ); |
|
| 92 |
+ } |
|
| 93 |
+ else {
|
|
| 94 |
+ $query[] = "1 = 0"; |
|
| 95 |
+ $countquery[] = "1 = 0"; |
|
| 96 |
+ $scountquery[] = "1 = 0"; |
|
| 97 |
+ } |
|
| 98 |
+ } |
|
| 99 |
+ if($searchtype == "advanced") {
|
|
| 100 |
+ $query[] = "(stories.summary LIKE '%$searchterm%' OR stories.title LIKE '%$searchterm%') "; |
|
| 101 |
+ $countquery[] = "(stories.summary LIKE '%$searchterm%' OR stories.title LIKE '%$searchterm%') "; |
|
| 102 |
+ $scountquery[] = "(summary LIKE '%$searchterm%' OR title LIKE '%$searchterm%') "; |
|
| 103 |
+ } |
|
| 104 |
+ } |
|
| 105 |
+ if(isset($_REQUEST['authors'])) {
|
|
| 106 |
+ $authors = isarray($_REQUEST['authors']) ? $_REQUEST['authors'] : explode(",", $_REQUEST['authors']);
|
|
| 107 |
+ $authors = array_filter($authors, "isNumber"); |
|
| 108 |
+ if($authors) {
|
|
| 109 |
+ $authors = implode(",", $authors);
|
|
| 110 |
+ $query[] = "FIND_IN_SET(stories.uid, '$authors') > 0"; |
|
| 111 |
+ $countquery[] = "FIND_IN_SET(stories.uid, '$authors') > 0"; |
|
| 112 |
+ $scountquery[] = "FIND_IN_SET(series.uid, '$authors') > 0"; |
|
| 113 |
+ } |
|
| 114 |
+ else {
|
|
| 115 |
+ $query[] = "1 = 0"; |
|
| 116 |
+ $countquery[] = "1 = 0"; |
|
| 117 |
+ $scountquery[] = "1 = 0"; |
|
| 118 |
+ } |
|
| 119 |
+ } |
|
| 120 |
+ if(isset($_REQUEST['catid'])) {
|
|
| 121 |
+ $catid = is_array($_REQUEST['catid']) ? $_REQUEST['catid'] : explode(",", $_REQUEST['catid']);
|
|
| 122 |
+ $catid = array_filter($catid, "isNumber"); |
|
| 123 |
+ } |
|
| 124 |
+ if(!isset($catid)) $catid = array("false");
|
|
| 125 |
+ $categories = array( ); |
|
| 126 |
+ // Get the recursive list. |
|
| 127 |
+ foreach($catid as $cat) {
|
|
| 128 |
+ if($cat == "false" || empty($cat)) continue; |
|
| 129 |
+ $categories = array_merge($categories, recurseCategories($cat)); |
|
| 130 |
+ } |
|
| 131 |
+ // Now format the SQL |
|
| 132 |
+ foreach($categories as $cat) {
|
|
| 133 |
+ $catstories[] = "FIND_IN_SET($cat, stories.catid) > 0 "; |
|
| 134 |
+ $catseries[] = "FIND_IN_SET($cat, series.catid) > 0 "; |
|
| 135 |
+ } |
|
| 136 |
+ // Now implode the SQL list |
|
| 137 |
+ if(!empty($catstories)) {
|
|
| 138 |
+ $query[] = "(".implode(" OR ", $catstories).")";
|
|
| 139 |
+ $countquery[] = "(".implode(" OR ", $catstories).")";
|
|
| 140 |
+ $scountquery[] = "(".implode(" OR ", $catseries).")";
|
|
| 141 |
+ } |
|
| 142 |
+ if(isset($_REQUEST['charid'])) {
|
|
| 143 |
+ $charid = is_array($_REQUEST['charid']) ? $_REQUEST['charid'] : explode(",", $_REQUEST['charid']);
|
|
| 144 |
+ } |
|
| 145 |
+ else $charid = array( ); |
|
| 146 |
+ if(isset($_REQUEST['charlist1'])) $charid[] = $_REQUEST['charlist1']; |
|
| 147 |
+ if(isset($_REQUEST['charlist2'])) $charid[] = $_REQUEST['charlist2']; |
|
| 148 |
+ $charid = array_filter($charid, "isNumber"); |
|
| 149 |
+ if(count($charid) > 0) {
|
|
| 150 |
+ foreach($charid as $c) {
|
|
| 151 |
+ if(!empty($c)) {
|
|
| 152 |
+ $charstories[] = "FIND_IN_SET($c, stories.charid) > 0 "; |
|
| 153 |
+ $charseries[] = "FIND_IN_SET($c, series.characters) > 0 "; |
|
| 154 |
+ } |
|
| 155 |
+ } |
|
| 156 |
+ if(count($charstories) > 0) {
|
|
| 157 |
+ $query[] = "(".implode(" AND ", $charstories).")";
|
|
| 158 |
+ $countquery[] = "(".implode(" AND ", $charstories).")";
|
|
| 159 |
+ } |
|
| 160 |
+ if(count($charseries) > 0) $scountquery[] = "(".implode(" AND ", $charseries).")";
|
|
| 161 |
+ } |
|
| 162 |
+ |
|
| 163 |
+ if(isset($_REQUEST['rid'])) $rid = is_array($_REQUEST['rid']) ? $_REQUEST['rid'] : explode(",", $_REQUEST['rid']);
|
|
| 164 |
+ else $rid = array(); |
|
| 165 |
+ if(count($rid) > 0) {
|
|
| 166 |
+ $rid = array_filter($rid, "isNumber"); |
|
| 167 |
+ $query[] = findclause('rid', $rid);
|
|
| 168 |
+ $countquery[] = findclause('rid', $rid);
|
|
| 169 |
+ } |
|
| 170 |
+ if(isset($_REQUEST['complete'])) {
|
|
| 171 |
+ $query[] = "stories.completed = '1'"; |
|
| 172 |
+ $countquery[] = "stories.completed = '1'"; |
|
| 173 |
+ } |
|
| 174 |
+ $classin = array( ); |
|
| 175 |
+ $classex = array( ); |
|
| 176 |
+ foreach($classtypelist as $id => $vars) {
|
|
| 177 |
+ $opts = array( ); |
|
| 178 |
+ $exopts = array( ); |
|
| 179 |
+ if(isset($_POST["class_".$id])) $opts = array_filter($_POST["class_".$id], "isNumber"); |
|
| 180 |
+ else if(isset($_GET["class_".$id])) {
|
|
| 181 |
+ $opts = array_merge($opts, explode(",", $_GET["class_".$id]));
|
|
| 182 |
+ $opts = array_filter($opts, "isNumber"); |
|
| 183 |
+ } |
|
| 184 |
+ else if(isset($_REQUEST[$vars["name"]])) $opts[] = array($_REQUEST[$vars["name"]]); |
|
| 185 |
+ $classin = array_merge($classin, $opts); |
|
| 186 |
+ if(isset($_POST["exclass_".$id])) $exopts = array_filter($_POST["exclass_".$id], "isNumber"); |
|
| 187 |
+ else if(isset($_GET["exclass_".$id])) {
|
|
| 188 |
+ $exopts = array_merge($exopts, explode(",", $_GET["exclass_".$id]));
|
|
| 189 |
+ $exopts = array_filter($exopts, "isNumber"); |
|
| 190 |
+ } |
|
| 191 |
+ $classex = array_merge($classex, $exopts); |
|
| 192 |
+ unset($opts, $exopts); |
|
| 193 |
+ } |
|
| 194 |
+ if($classin) {
|
|
| 195 |
+ foreach($classin as $class) {
|
|
| 196 |
+ $query[] = "FIND_IN_SET($class, stories.classes) > 0"; |
|
| 197 |
+ $countquery[] = "FIND_IN_SET($class, stories.classes) > 0"; |
|
| 198 |
+ $scountquery[] = "FIND_IN_SET($class, series.classes) > 0"; |
|
| 199 |
+ } |
|
| 200 |
+ } |
|
| 201 |
+ if($classex) {
|
|
| 202 |
+ foreach($classex as $class) {
|
|
| 203 |
+ $query[] = "FIND_IN_SET($class, stories.classes) = 0"; |
|
| 204 |
+ $countquery[] = "FIND_IN_SET($class, stories.classes) = 0"; |
|
| 205 |
+ $scountquery[] = "FIND_IN_SET($class, series.classes) = 0"; |
|
| 206 |
+ } |
|
| 207 |
+ } |
|
| 208 |
+ // Begin story length |
|
| 209 |
+ unset($wordcount); |
|
| 210 |
+ $wordlow = isset($_REQUEST['wordlow']) && isNumber($_REQUEST['wordlow']) ? $_REQUEST['wordlow'] : "-500"; |
|
| 211 |
+ $wordhigh = isset($_REQUEST['wordhigh']) && isNumber($_REQUEST['wordhigh']) ? $_REQUEST['wordhigh'] : "1000000"; |
|
| 212 |
+ if($wordlow != "-500") $wordcount = "stories.wordcount > ".$wordlow; |
|
| 213 |
+ if($wordhigh != "1000000") |
|
| 214 |
+ {
|
|
| 215 |
+ if($wordcount) $wordcount .= " AND stories.wordcount < ".$wordhigh; |
|
| 216 |
+ else $wordcount = "stories.wordcount < ".$wordhigh; |
|
| 217 |
+ } |
|
| 218 |
+ if($wordhigh < $wordlow) $wordcount = "stories.wordcount < ".$wordlow; |
|
| 219 |
+ if(!empty($wordcount)) {
|
|
| 220 |
+ $query[] = "($wordcount)"; |
|
| 221 |
+ $countquery[] = "($wordcount)"; |
|
| 222 |
+ } |
|
| 223 |
+ // End wordcount |
|
| 224 |
+ |
|
| 225 |
+ $codeblocks = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_codeblocks WHERE code_type = 'browseterms'");
|
|
| 226 |
+ while($code = dbassoc($codeblocks)) {
|
|
| 227 |
+ eval($code['code_text']); |
|
| 228 |
+ } |
|
| 229 |
+ |
|
| 230 |
+ $query = (count($query) > 0 ? " AND ".implode(" AND ", $query) : "")." "._ORDERBY;
|
|
| 231 |
+ $countquery = count($countquery) > 0 ? " AND ".implode(" AND ", $countquery) : "";
|
|
| 232 |
+ if(count($scountquery) > 0) $scountquery = " WHERE ".implode(" AND ", $scountquery);
|
|
| 233 |
+ search(_STORYQUERY.$query, _STORYCOUNT.$countquery); |
|
| 234 |
+ $otherresults = array( ); |
|
| 235 |
+ $termArray = array_merge($_GET, $_POST); |
|
| 236 |
+ $termsList = array(); |
|
| 237 |
+ foreach($termArray as $term => $value) {
|
|
| 238 |
+ if($term == "submit" || $term == "wordhigh" || $term == "wordlow" || empty($value) || $term == "formname" || $term == "searchtype") continue; |
|
| 239 |
+ $termsList[$term] = "$term=".(is_array($value) ? implode(",", $value) : $value);
|
|
| 240 |
+ } |
|
| 241 |
+ $terms = implode("&", $termsList);
|
|
| 242 |
+ if(!empty($scountquery)) {
|
|
| 243 |
+ $seriesresults = dbquery(_SERIESCOUNT.$scountquery); |
|
| 244 |
+ list($scount) = dbrow($seriesresults); |
|
| 245 |
+ if($scount > 0) $otherresults[] = "<a href='browse.php?type=series$terms'>$scount "._SERIES."</a>"; |
|
| 246 |
+ } |
|
| 247 |
+ $codeblocks = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_codeblocks WHERE code_type = 'otherresults'");
|
|
| 248 |
+ while($code = dbassoc($codeblocks)) {
|
|
| 249 |
+ eval($code['code_text']); |
|
| 250 |
+ } |
|
| 251 |
+ if(count($otherresults) > 0) $tpl->assign("otherresults", "<div id='otherresults'><span class='label'>"._OTHERRESULTS.":</span> ".implode(", ", $otherresults)."</div>");
|
|
| 252 |
+} |
|
| 253 |
+else {
|
|
| 254 |
+ if($searchtype == "simple") {
|
|
| 255 |
+ $output .= "<div id=\"pagetitle\">"._SIMPLE."</div><div style='text-align: center;'><form method=\"post\" enctype=\"multipart/form-data\" action=\"search.php\"> |
|
| 256 |
+ <div class=\"tblborder\" style=\"width: 320px; padding: 5px; margin: 0 auto;\"> |
|
| 257 |
+ <select name=\"searchtype\"> |
|
| 258 |
+ <option value=\"penname\">"._PENNAME."</option> |
|
| 259 |
+ <option value=\"title\">"._TITLE."</option> |
|
| 260 |
+ <option value=\"summary\">"._SUMMARY."</option>"; |
|
| 261 |
+ if($store == "mysql") |
|
| 262 |
+ $output .= "<option value=\"fulltext\">"._FULLTEXT."</option>"; |
|
| 263 |
+ $output .= "</select> <INPUT type=\"text\" class=\"textbox\" name=\"searchterm\" size=\"20\"> "; |
|
| 264 |
+ $output .= "<INPUT type=\"submit\" class=\"button\" name=\"submit\" value=\""._SUBMIT."\" size=\"20\"> |
|
| 265 |
+ <div style=\"font-size: 8pt; text-align: right;\"><a href=\"search.php?searchtype=advanced\">"._ADVANCED."</a></div></div></form></div>"; |
|
| 266 |
+ } |
|
| 267 |
+ else {
|
|
| 268 |
+ $output .= "<div id=\"pagetitle\">"._ADVANCED."</div><div> |
|
| 269 |
+ <form method=\"POST\" name=\"form\" enctype=\"multipart/form-data\" action=\"search.php?searchtype=advanced\"> |
|
| 270 |
+ <div class=\"tblborder\" style=\"width: 90%; margin: 0 auto; padding: 10px;\">"; |
|
| 271 |
+ if($multiplecats) {
|
|
| 272 |
+ include("includes/categories.php");
|
|
| 273 |
+ $output .= "<input type=\"hidden\" name=\"formname\" value=\"search\">"; |
|
| 274 |
+ } |
|
| 275 |
+ $output .= "<div style='float: left; width: 99%;'>"; |
|
| 276 |
+ if(count($charlist) > 0) {
|
|
| 277 |
+ $output .= "<div style=\"float: left; width: 49%;\"><label for=\"charname\">"._CHARACTERS.": </label><br />\n"; |
|
| 278 |
+ $output .= "<select name=\"charid[]\" style=\"width: 90%;\" multiple size=\"5\" id=\"charid\">"; |
|
| 279 |
+ foreach($charlist as $charid => $info) {
|
|
| 280 |
+ if($info['catid'] != -1) continue; |
|
| 281 |
+ $output .= "<option value=\"".$charid."\">" .stripslashes($info['name'] ). "</option>\n"; |
|
| 282 |
+ } |
|
| 283 |
+ $output .= "</select></div>"; |
|
| 284 |
+ } |
|
| 285 |
+ $result = dbquery("SELECT rid, rating FROM ".TABLEPREFIX."fanfiction_ratings ORDER BY rating");
|
|
| 286 |
+ if(dbnumrows($result)) {
|
|
| 287 |
+ $output .= "<div style=\"float: left; width: 49%;\"><label for=\"rid\">"._RATINGS.":</label><br /><select id=\"rid\" style=\"width: 90%;\" multiple size=\"5\"name=\"rid[]\"><option value=\"-1\">"._ALL."</option>"; |
|
| 288 |
+ while ($ratingresults = dbassoc($result)) |
|
| 289 |
+ {
|
|
| 290 |
+ $output .= "<option value=\"".$ratingresults['rid']."\">".$ratingresults['rating']."</option>\n"; |
|
| 291 |
+ } |
|
| 292 |
+ $output .= "</select></div>"; |
|
| 293 |
+ } |
|
| 294 |
+ $output .= "<div style=\"clear: both;\"> </div>"; |
|
| 295 |
+ $output .= " <div style=\"text-align: center;\">"._MULTIPLESELECT."</div>"; |
|
| 296 |
+ $result = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_classtypes ORDER BY classtype_name");
|
|
| 297 |
+ while($type = dbassoc($result)) {
|
|
| 298 |
+ $result2 = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_classes WHERE class_type = '".$type['classtype_id']."' ORDER BY class_name");
|
|
| 299 |
+ $select = ""; |
|
| 300 |
+ while ($class = dbassoc($result2)) {
|
|
| 301 |
+ $select .= "<option value=\"".$class['class_id']."\">".$class['class_name']."</option>"; |
|
| 302 |
+ } |
|
| 303 |
+ $output .= "<div> |
|
| 304 |
+ <div style=\"float: left; width: 49%; margin-bottom: 1em;\"><label for=\"class_".$type['classtype_id']."\">".$type['classtype_title']." "._INCLUDE.":</label><br /> |
|
| 305 |
+ <select name=\"class_".$type['classtype_id']."[]\" id=\"class_".$type['classtype_id']."\" style=\"width: 95%;\" multiple size=\"5\">$select</select></div> |
|
| 306 |
+ <div style=\"float: left; width: 49%; margin-bottom: 1em;\"><label for=\"exclass_".$type['classtype_id']."\">".$type['classtype_title']." "._EXCLUDE.":</label><br /> |
|
| 307 |
+ <select name=\"exclass_".$type['classtype_id']."[]\" id=\"exclass_".$type['classtype_id']."\" style=\"width: 95%;\" multiple size=\"5\">$select</select></div> |
|
| 308 |
+ </div>"; |
|
| 309 |
+ } |
|
| 310 |
+ $output .= "</div><label for=\"completed\">"._COMPLETEONLY.":</label> <input type=\"checkbox\" class=\"checkbox\" id=\"completed\" name=\"completed\" value=\"ON\"><label for=\"wordlow\">"._WORDCOUNT.":</label> <select size=\"1\" id=\"wordlow\" name=\"wordlow\"> |
|
| 311 |
+ <option value='-500'>< 500</option> |
|
| 312 |
+ <option>1000</option> |
|
| 313 |
+ <option>5000</option> |
|
| 314 |
+ <option>10000</option> |
|
| 315 |
+ <option>50000</option> |
|
| 316 |
+ <option>100000</option> |
|
| 317 |
+ <option value='1000000'>100000+</option> |
|
| 318 |
+ </select> - <select size=\"1\" name=\"wordhigh\"> |
|
| 319 |
+ <option value='1000000'>100000+</option> |
|
| 320 |
+ <option>100000</option> |
|
| 321 |
+ <option>50000</option> |
|
| 322 |
+ <option>10000</option> |
|
| 323 |
+ <option>5000</option> |
|
| 324 |
+ <option>1000</option> |
|
| 325 |
+ <option value='-500'>< 500</option> |
|
| 326 |
+ </select><br /><br /><label for=\"searchterm\">"._SEARCHTERM.": </label><INPUT type=\"text\" class=\"textbox\" name=\"searchterm\" id=\"searchterm\" size=\"20\"> |
|
| 327 |
+ |
|
| 328 |
+ <label for=\"sortorder\">"._SORT.":</label> <select name=\"sortorder\" id=\"sortorder\"><option value=\"alpha\">"._ALPHA."</option><option value=\"update\">"._MOSTRECENT."</option></select>"; |
|
| 329 |
+ $codequery = dbquery("SELECT * FROM ".TABLEPREFIX."fanfiction_codeblocks WHERE code_type = 'searchform'");
|
|
| 330 |
+ while($code = dbassoc($codequery)) {
|
|
| 331 |
+ eval($code['code_text']); |
|
| 332 |
+ } |
|
| 333 |
+$output .= "<div id='submitdiv'><input name=\"submit\" id=\"submit\" value=\""._SUBMIT."\" type=\"submit\" class=\"button\"></div></div></form></div>"; |
|
| 334 |
+ } |
|
| 335 |
+} |
|
| 336 |
+$tpl->assign("output", $output);
|
|
| 337 |
+$tpl->printToScreen(); |
|
| 338 |
+dbclose( ); |
|
| 339 |
+?> |
|
| 0 | 340 |
\ No newline at end of file |