Remove spaces at EOL.
darkmorford -
f4cda9e28354
Not Reviewed
Show More
Add another comment
TODOs: 0 unresolved 0 Resolved
COMMENTS: 0 General 0 Inline
@@ -28,7 +28,7 if(isset($_REQUEST['list_by']) && $_REQUEST['list_by'] == "date")
28 28 $comics = mysqli_query($link,"SELECT distinct id, title,
29 29 DATE_FORMAT(published, '%M %D, %Y') AS pubdate
30 30 FROM strip WHERE published < NOW() ORDER BY id") or die(mysqli_error($link));
31
31
32 32 echo '<div class="content"><h2>Comics by Date</h2><div><ul>';
33 33
34 34 while($comic = mysqli_fetch_assoc($comics))
@@ -8,7 +8,7 pagehead('characters', 'Characters');
8 8 <p><q>All right, all right! I still don't feel like finishing these sections, but whatever (grumble)...</q><br />
9 9 piro - fall 2007</p>
10 10
11 <p>Believe it or not, the (page) is in production and will be incorporated into the new site launch. We just are not including them as part of this beta test
11 <p>Believe it or not, the (page) is in production and will be incorporated into the new site launch. We just are not including them as part of this beta test
12 12 (because they still need some work).</p>
13 13
14 14 </div></div>
@@ -4,20 +4,20 require_once 'frontend.inc.php';
4 4
5 5 class MTAPIi
6 6 {
7
7
8 8 private static $db_conn;
9
9
10 10 static function construct($db)
11 11 {
12 12 $db_conn = $db;
13 13 return mysqli_ping($db_conn);
14 14 }
15
15
16 16 static function destruct()
17 17 {
18 18 $db_conn = NULL;
19 19 }
20
20
21 21 #This just returns the current maximum comic
22 22 static function getNumStrips()
23 23 {
@@ -36,7 +36,7 class MTAPIi
36 36 die("Invalid args: $comic $panel\n");
37 37 return false;
38 38 }
39
39
40 40 $script = build_panel_transcript($comic, $panel);
41 41 if(!$xml)
42 42 {
@@ -88,9 +88,9 class MTAPIi
88 88 {
89 89 return false;
90 90 }
91
91
92 92 $panels = MTAPIi::getNumPanels($comic);
93
93
94 94 $query = 'SELECT DISTINCT speaker FROM transcript WHERE strip = '.(int)$comic;
95 95 $query .= ' AND panel = '.(int)$panel;
96 96 $query .= ' AND speaker NOT LIKE "#%" ';
@@ -99,7 +99,7 class MTAPIi
99 99 $query .= " AND search != '' ";
100 100 }
101 101 $query .= 'ORDER BY speaker';
102
102
103 103 return query_to_array($query);
104 104 }
105 105
@@ -109,7 +109,7 class MTAPIi
109 109 {
110 110 return false;
111 111 }
112
112
113 113 $query = 'SELECT DISTINCT speaker FROM transcript WHERE strip = '.(int)$comic;
114 114 $query .= ' AND speaker NOT LIKE "#%" ';
115 115 if($speakersOnly)
@@ -117,7 +117,7 class MTAPIi
117 117 $query .= " AND search != '' ";
118 118 }
119 119 $query .= 'ORDER BY speaker';
120
120
121 121 return query_to_array($query);
122 122 }
123 123
@@ -161,7 +161,7 class MTAPIi
161 161 $query = 'SELECT description FROM strip_t
162 162 JOIN strip ON strip.type = strip_t.id
163 163 WHERE strip.id = '.(int)$comic;
164
164
165 165 $qr = query_to_array($query);
166 166 return $qr[0];
167 167 }
@@ -178,11 +178,11 class MTAPIi
178 178 JOIN strip_t ON meta.type = strip_t.id
179 179 JOIN strip ON strip.type = strip_t.id
180 180 WHERE strip.id = '.(int)$comic.' ORDER BY meta_t.id';
181
181
182 182 $qr = query_to_array($query);
183 183 return $qr;
184 184 }
185
185
186 186 static function getStrip($comic)
187 187 {
188 188 if(!validate_comic_id($comic))
@@ -192,26 +192,26 class MTAPIi
192 192 $strip = load_strip($comic);
193 193 $strip['type'] = self::getStripTypeName($strip['type']);
194 194 $strip['number'] = self::getStripNumberInType($comic);
195
195
196 196 unset($strip['udate']);
197
197
198 198 return $strip;
199 199 }
200
200
201 201 static function getStripNumberInType($comic)
202 202 {
203 203 if(!validate_comic_id($comic))
204 204 {
205 205 return false;
206 206 }
207
207
208 208 $type = self::getStripType($comic);
209
209
210 210 $query = "SELECT count(*)
211 211 FROM strip_t JOIN strip ON strip_t.id = strip.type
212 212 WHERE strip.id < {$comic}+1
213 213 AND strip.type = {$type}";
214
214
215 215 $qr = query_to_array($query);
216 216 return $qr[0];
217 217 }
@@ -227,7 +227,7 class MTAPIi
227 227 JOIN strip_t ON meta.type = strip_t.id
228 228 JOIN strip ON strip.type = strip_t.id
229 229 WHERE strip.id = '.(int)$comic.' ORDER BY meta_t.name';
230
230
231 231 $qr = query_to_array($query);
232 232 return $qr;
233 233 }
@@ -238,12 +238,12 class MTAPIi
238 238 {
239 239 return false;
240 240 }
241
241
242 242 $query = 'SELECT meta_t.id FROM meta_t
243 243 JOIN meta ON meta_t.id = meta.meta
244 244 JOIN strip_t ON meta.type = strip_t.id
245 245 WHERE strip_t.id = '.(int)$type.' ORDER BY meta_t.id';
246
246
247 247 $qr = query_to_array($query);
248 248 return $qr;
249 249 }
@@ -254,12 +254,12 class MTAPIi
254 254 {
255 255 return false;
256 256 }
257
257
258 258 $query = 'SELECT meta_t.name FROM meta_t
259 259 JOIN meta ON meta_t.id = meta.meta
260 260 JOIN strip_t ON meta.type = strip_t.id
261 261 WHERE strip_t.id = '.(int)$type.' ORDER BY meta_t.name';
262
262
263 263 $qr = query_to_array($query);
264 264 return $qr;
265 265 }
@@ -270,7 +270,7 class MTAPIi
270 270 {
271 271 return false;
272 272 }
273
273
274 274 $query = 'SELECT strip.id FROM strip WHERE strip.type = '.(int)$type.' ORDER BY strip.id';
275 275 $qr = query_to_array($query);
276 276 return $qr;
@@ -283,7 +283,7 class MTAPIi
283 283 {
284 284 return false;
285 285 }
286
286
287 287 $query = 'SELECT strip.id FROM strip
288 288 JOIN strip_t ON strip.type = strip_t.id
289 289 JOIN meta ON strip_t.id = meta.type
@@ -40,7 +40,7 function get_num_panels($comic)
40 40 {
41 41 return false;
42 42 }
43
43
44 44 $rs = mysqli_query($link,'SELECT MAX(panel) FROM transcript WHERE strip = '.(int)$comic);
45 45 return current(mysqli_fetch_row($rs));
46 46 }
@@ -48,9 +48,9 function get_num_panels($comic)
48 48 function build_panel_transcript($comic, $panel)
49 49 {
50 50 $query = 'SELECT speaker, speech FROM transcript
51 WHERE strip = '.(int)$comic.' AND panel = '.(int)$panel.'
51 WHERE strip = '.(int)$comic.' AND panel = '.(int)$panel.'
52 52 AND speaker NOT LIKE "#%" ORDER BY line';
53
53
54 54 $qr = query_to_nested($query);
55 55 return $qr;
56 56 }
@@ -65,7 +65,7 function query_to_nested($query)
65 65 $ret[]= $row;
66 66 }
67 67 mysqli_free_result($rs);
68
68
69 69 return $ret;
70 70 }
71 71
@@ -81,7 +81,7 function query_to_array($query, $col=0)
81 81 $ret[]= $row[0];
82 82 }
83 83 mysqli_free_result($rs);
84
84
85 85 return $ret;
86 86 }
87 87
@@ -141,7 +141,7 function conditional_exit($mtime)
141 141 {
142 142 if(!PERFORM_CONDITIONAL_CACHE)
143 143 return;
144
144
145 145 $f_date = gmdate( 'D, d M Y H:i:s T', $mtime );
146 146 header("Last-Modified: $f_date");
147 147
@@ -183,17 +183,17 function mtdie($errno, $errstr, $errfile, $errline, $errcontext) {
183 183 }
184 184
185 185 error_log( $message, 0 ); // Log to Syslog
186
186
187 187 $message .= "\r\n\r\nBacktrace:";
188 188 $backtrace = array_reverse(debug_backtrace());
189 189 $i=2;
190 190 $message .= "\r\n1: " . $err_context . " at $errfile:$errline";
191 191 foreach($backtrace as $k=>$call) {
192 $message .= "\r\n" . str_pad("$i:", $i+4 ) . $call['function'] . '( ' . implode(', ', $call['args']) . ' ) at ' . $call['file'] . ':' . $call['line'];
192 $message .= "\r\n" . str_pad("$i:", $i+4 ) . $call['function'] . '( ' . implode(', ', $call['args']) . ' ) at ' . $call['file'] . ':' . $call['line'];
193 193 $i++;
194 194 }
195 195 $message .= "\r\n";
196
196
197 197 $message .= "\r\nRequest Details:"
198 198 . "\r\nscript_url: " . $_SERVER["SCRIPT_URL"]
199 199 . "\r\nquery_string: " . $_SERVER["QUERY_STRING"]
@@ -300,7 +300,7 function pagehead($caller, $title = 'relax, we understand j00', $style='')
300 300 <link type="image/x-icon" rel="shortcut icon" href="favicon.ico" />
301 301 <link type="text/css" rel="stylesheet" href="main.css" />
302 302 <link type="text/css" rel="stylesheet" href="<?php echo $caller ?>.css" />
303
303
304 304 <?php
305 305 if($style != '')
306 306 {
@@ -312,10 +312,10 function pagehead($caller, $title = 'relax, we understand j00', $style='')
312 312 <link type="application/rss+xml" rel="alternate" title="Strips Only" href="rss/strips.xml" />
313 313 <link type="application/rss+xml" rel="alternate" title="Rants Only" href="rss/rants.xml" />
314 314 <link type="application/rss+xml" rel="alternate" title="Strips and Rants" href="rss/megatokyo.xml" />
315
315
316 316 <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
317 317 <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
318
318
319 319 <script type="text/javascript" src="index.js"></script><?php /*
320 320 <script type='text/javascript' src='<?php echo ADS_HOST, ADS_PATH ?>/www/delivery/spcjs.php?id=1'></script> */ ?>
321 321 <script type="text/javascript" src="resources.js"></script>
@@ -361,7 +361,7 function pagefoot()
361 361 all rights reserved.</p>
362 362 <p>'megatokyo' is a registered trademark of
363 363 <a href="http://www.fredart.com">fredart studios llc</a>.</p>
364 </div><?php
364 </div><?php
365 365 }
366 366
367 367
@@ -94,11 +94,11 else
94 94 $tmp = explode(':', $qr[0]);
95 95 $tooltip .= $tmp[0].", Number ".$qr[1].", ".$STRIP['pubdate'];
96 96 }
97
97
98 98 $alttext = "Strip ".$EFFECTIVE_ID;
99 99 if($STRIP['book'])
100 100 $alttext .= ", Volume ".$STRIP['book'];
101
101
102 102 if($STRIP['page'])
103 103 $alttext .= ", Page ".$STRIP['page'];
104 104
@@ -25,7 +25,7 function toXML($data)
25 25 }
26 26 }
27 27 write($xml, $data);
28
28
29 29 $xml->endElement();
30 30 return $xml->outputMemory(true);
31 31 }
@@ -35,7 +35,7 $API = new ReflectionClass('MTAPIi');
35 35 if( $API->hasMethod($_GET['method']) ) {
36 36 $method = $API->getMethod($_GET['method']);
37 37 $parameters = $method->getParameters();
38
38
39 39 $method_parameters = Array();
40 40 foreach($parameters as $parameter) {
41 41 $param = (Array) $parameter;
@@ -51,9 +51,9 if( $API->hasMethod($_GET['method']) ) {
51 51 printf( 'Parameter %s is required but not supplied', $parameter_name );
52 52 }
53 53 }
54
54
55 55 $result = $method->invokeArgs($API, $method_parameters);
56
56
57 57 switch($_GET['output-type']) {
58 58 case 'json':
59 59 $result = json_encode($result);
@@ -17,13 +17,13 function navinit() {
17 17 f = document.getElementById('searchprevnext');
18 18 f.style.display="none";
19 19
20 b = document.getElementById('q');
20 b = document.getElementById('q');
21 21 for( i=0; i<b.form.elements.length; i++ ) {
22 22 if( b.form.elements[i].type=="checkbox" ) {
23 23 b.form.elements[i].onclick = navrecheck;
24 24 }
25 25 }
26
26
27 27 b.onblur = navrecheck;
28 28 b.onchange = navrecheck;
29 29 b.onkeyup = navrecheck;
@@ -35,7 +35,7 function navrecheck() {
35 35 b = document.getElementById('q');
36 36 n = document.getElementById('normalprevnext');
37 37 f = document.getElementById('searchprevnext');
38
38
39 39 find = b.value;
40 40 if(!find ) {
41 41 for( i=0; i<b.form.elements.length; i++ ) {
@@ -43,9 +43,9 function navrecheck() {
43 43 find = 1;
44 44 break;
45 45 }
46 }
46 }
47 47 }
48
48
49 49 if( find ) {
50 50 n.style.display="none";
51 51 f.style.display="";
@@ -53,7 +53,7 function navrecheck() {
53 53 n.style.display="";
54 54 f.style.display="none";
55 55 }
56
56
57 57 }
58 58
59 59 navwait('q');
@@ -30,13 +30,13 if(isset($_REQUEST['list_by']) && $_REQUEST['list_by'] == "date")
30 30 AND rant.status = 'published' ORDER BY rant.published") or die(mysqli_error($link));
31 31
32 32 echo '<div class="content"><h2>Rants by Date</h2><div><ol>';
33
33
34 34 while($rant = mysqli_fetch_assoc($rants))
35 35 {
36 36 printf('<li><a title="%s" name="%d" href="./rant/%d">%s - %s</a></li>', $rant['pubdate'], $rant['id'], $rant['id'],
37 37 $rant['author'], utfentities($rant['title']));
38 38 }
39
39
40 40 echo '</ol></div></div>';
41 41 }
42 42 else
@@ -55,7 +55,7 else
55 55 ?></ul></div>
56 56 </div>
57 57 <?php
58
58
59 59 mysqli_data_seek($AUTHORS, 0);
60 60 while ($author = mysqli_fetch_assoc($AUTHORS)) {
61 61 $rants = mysqli_query($link,"SELECT distinct id, title,
@@ -64,7 +64,7 else
64 64 if (mysqli_num_rows($rants) <= 0)
65 65 continue;
66 66 echo '<div class="content"><h2><a id="', $author['name'], '">', utfentities($author['name']), '</a></h2><div><ol>';
67
67
68 68 while($rant = mysqli_fetch_assoc($rants))
69 69 {
70 70 printf('<li><a title="%s" name="%d" href="./rant/%d">%s</a></li>', $rant['pubdate'], $rant['id'], $rant['id'],
@@ -10,7 +10,7 while(match = metarx.exec(textbox.value)) {
10 10 var t = checks[4].checked;
11 11 checks[4].checked = true;
12 12 checks[4].checked = false;
13 checks[4].checked = t;
13 checks[4].checked = t;
14 14
15 15 for(i=0; i<checks.length; i++) {
16 16 if( checks[i].value == match[1] ) {
@@ -68,4 +68,4 out for the ninjas.<br><br>
68 68
69 69 <?php pagefoot(); ?>
70 70 </body>
71 </html> No newline at end of file
71 </html>
@@ -55,19 +55,19 if($date_f && $date)
55 55 if(isset($_REQUEST['q']))
56 56 {
57 57
58 if( isset($_GET['method-fp_x']) || isset($_GET['method-fp_y'])
58 if( isset($_GET['method-fp_x']) || isset($_GET['method-fp_y'])
59 59 || isset($_GET['method-fp.x']) || isset($_GET['method-fp.y']) ) {
60 60 array_push($magic, 'max');
61 61 array_push($value, $_GET['current'] - 1);
62
62
63 63 array_push($magic, 'method');
64 array_push($value, 'Find Previous');
64 array_push($value, 'Find Previous');
65 65 }
66 if( isset($_GET['method-fn_x']) || isset($_GET['method-fn_y'])
66 if( isset($_GET['method-fn_x']) || isset($_GET['method-fn_y'])
67 67 || isset($_GET['method-fn.x']) || isset($_GET['method-fn.y']) ) {
68 68 array_push($magic, 'min');
69 69 array_push($value, $_GET['current'] + 1);
70
70
71 71 array_push($magic, 'method');
72 72 array_push($value, 'Find Next');
73 73 }
@@ -85,15 +85,15 if(isset($_REQUEST['q']))
85 85 $_REQUEST['q'] = trim("$_REQUEST[q] $k:\"$v\"");
86 86 }
87 87 }
88
88
89 89 if(get_magic_quotes_gpc())
90 90 $_REQUEST['q'] = stripslashes($_REQUEST['q']);
91
91
92 92 $tokens = tpw_parse_line('\s+', $_REQUEST['q']);
93 93
94 94 # Protect against SQL injection in the event of Register Globals being on.
95 95 $SEARCH_MIN = $SEARCH_MAX = null;
96
96
97 97 foreach($tokens as $token) {
98 98 $token = strtolower($token);
99 99
@@ -108,17 +108,17 if(isset($_REQUEST['q']))
108 108 }
109 109
110 110 $subtokens = preg_match('/(?:\w+|[#*]):/', $token) ? preg_split('/:/', $token, 2) : Array( false, $token );
111
111
112 112 # Magic values are easy, just throw them on the list
113 113 array_push($loop_magic, $subtokens[0]);
114
114
115 115 # Values, however, need a bit more cleaning up first
116 116 if('""' == $subtokens[1])
117 117 array_push($loop_value, '""');
118 118 else
119 119 array_push($loop_value, preg_replace('/[[:punct:]]|(?<=\s)\s+/', '', $subtokens[1]));
120 120 }
121
121
122 122 #DEBUG
123 123 #print_r($magic);
124 124 #echo "<br>";
@@ -139,9 +139,9 if(isset($_REQUEST['q']))
139 139 WHERE (strip.published < NOW())
140 140 AND (transcript.speaker NOT LIKE \"#%\"
141 141 OR transcript.speaker IS NULL) ";
142
142
143 143 $flag = false;
144
144
145 145 if($m) #attempt to short-circuit on no magic
146 146 {
147 147 # well, we have magic
@@ -177,7 +177,7 if(isset($_REQUEST['q']))
177 177 $flag = true;
178 178 }
179 179 }
180
180
181 181 #now, handle the $value portion of the string
182 182 # first, handle for ""
183 183 switch($sub_value[$i]) {
@@ -199,21 +199,21 if(isset($_REQUEST['q']))
199 199 }
200 200 $query.=") ";
201 201 }
202
202
203 203 array_push($sub_queries, $query);
204 204 }
205
205
206 206 foreach($sub_queries as $q)
207 207 {
208 208 #DEBUG: run the search
209 209 #echo $q;
210 210 $result = mysqli_query($link,$q);
211
211
212 212 if(!$result)
213 213 {
214 214 continue;
215 215 }
216
216
217 217 while($row = mysqli_fetch_row($result))
218 218 {
219 219 #and put all the hits onto an array
@@ -232,9 +232,9 if(isset($_REQUEST['q']))
232 232 WHERE (strip.published < NOW())
233 233 AND (transcript.speaker NOT LIKE \"#%\"
234 234 OR transcript.speaker IS NULL) ";
235
235
236 236 $flag = false;
237
237
238 238 if($m) #attempt to short-circuit on no magic
239 239 {
240 240 # well, we have magic
@@ -319,7 +319,7 if(isset($_REQUEST['q']))
319 319 $flag = true;
320 320 }
321 321 }
322
322
323 323 #now, handle the $value portion of the string
324 324 # first, handle for ""
325 325 switch($value[$i]) {
@@ -341,10 +341,10 if(isset($_REQUEST['q']))
341 341 }
342 342 $query.=") ";
343 343 }
344
344
345 345 array_push($queries, $query);
346 346 }
347
347
348 348 if(count($queries) == 0)
349 349 {
350 350 array_push($queries, $query);
@@ -364,7 +364,7 if(isset($_REQUEST['q']))
364 364 #second, collapse them into one clause
365 365 $modifier .= " AND (" . implode(" OR ", $SEARCH_TEMP) . ") ";
366 366 }
367
367
368 368 #now the metatypes, just like the types
369 369 if(count($META_TYPES) > 0)
370 370 {
@@ -377,7 +377,7 if(isset($_REQUEST['q']))
377 377 #second, collapse them into one clause
378 378 $modifier .= " AND (" . implode(" OR ", $META_TEMP) . ") ";
379 379 }
380
380
381 381 #now do min and max
382 382 if(isset($SEARCH_MIN))
383 383 {
@@ -387,7 +387,7 if(isset($_REQUEST['q']))
387 387 {
388 388 $modifier .= "AND (strip.id <= $SEARCH_MAX) ";
389 389 }
390
390
391 391 #and now book and page
392 392 if(isset($BOOK))
393 393 {
@@ -397,7 +397,7 if(isset($_REQUEST['q']))
397 397 {
398 398 $modifier .= $PAGE;
399 399 }
400
400
401 401 foreach($queries as $q)
402 402 {
403 403 #apply modifiers
@@ -408,12 +408,12 if(isset($_REQUEST['q']))
408 408 continue;
409 409 }
410 410 $result = mysqli_query($link,$q);
411
411
412 412 if(!$result)
413 413 {
414 414 continue;
415 415 }
416
416
417 417 while($row = mysqli_fetch_row($result))
418 418 {
419 419 #and put all the hits onto an array
@@ -423,7 +423,7 if(isset($_REQUEST['q']))
423 423
424 424 #so, now all the raw hits are in the same spot
425 425 #now comes The Magic
426
426
427 427 # if book and page are used, break out
428 428 if(isset($BOOK) && isset($PAGE) && count($rhits) != 0)
429 429 {
@@ -431,16 +431,16 if(isset($_REQUEST['q']))
431 431 header('Location: ' . SITE_HOST . SITE_PATH . "/strip/$rhits[0]");
432 432 exit(0);
433 433 }
434
434
435 435 #first, reverse sort and uniquify a copy
436 436 rsort($rhits);
437 437 $uhits = array_unique($rhits);
438 438 #do the same for the subtraction hits
439 439 $sub_uhits = array_unique($sub_rhits);
440
440
441 441 #now... the subtraction!
442 442 $uhits = array_diff($uhits, $sub_uhits);
443
443
444 444 #if we're redirecting, break out of the normal search logic here
445 445 if(isset($METHOD) && count($uhits) > 0)
446 446 {
@@ -453,26 +453,26 if(isset($_REQUEST['q']))
453 453 {
454 454 $target = $rhits[0];
455 455 }
456
456
457 457 //die($METHOD);
458
458
459 459 header('HTTP/1.0 301 Moved Permanently');
460 460 header('Location: ' . SITE_HOST . SITE_PATH . "/index.php?strip_id=$target" . "&q=" . urlencode($_REQUEST['q']));
461 461 exit(0);
462 462 }
463
463
464 464 $revhits = array_reverse($rhits);
465 465 #now create a count for each unique hit
466 466 foreach($uhits as $key => $value)
467 467 {
468 468 $first = array_search($value, $rhits);
469 469 $last = array_search($value, $revhits);
470
470
471 471 $numhits = count($rhits) - $first - $last;
472
472
473 473 array_push($hcount, $numhits);
474 474 }
475
475
476 476 if(count($uhits) > 0) {
477 477 if($random)
478 478 {
@@ -486,7 +486,7 if(isset($_REQUEST['q']))
486 486 $entry.= " - ". htmlentities($result[1]) . "</a></li>";
487 487 array_push($strings, $entry);
488 488 }
489
489
490 490 #now, a clever multisort...
491 491 array_multisort($hcount, SORT_DESC, SORT_NUMERIC,
492 492 $uhits, SORT_DESC, SORT_NUMERIC,
@@ -502,7 +502,7 pagehead('search', 'Search');
502 502 <input type="submit" value="Search" />
503 503 </div></form>
504 504
505 <?php if(count($uhits) > 0) {
505 <?php if(count($uhits) > 0) {
506 506 echo '<div class="content"><div><ol class="results">';
507 507 /*$qsearch = mysqli_query($link,'SELECT id, title FROM strip WHERE id IN(' . implode(', ', $uhits) . ')');
508 508 while($result = mysqli_fetch_array($qsearch))
@@ -514,12 +514,12 pagehead('search', 'Search');
514 514 }
515 515 echo '</ol></div>';
516 516 echo '<div><p class="results"><a href="search_help">Learn to direct search ninjas!</a></p></div></div>';
517
517
518 518 ?>
519 519 <form class="search" action="search.php" method="get"><div>
520 520 <input type="text" name="q" <?php if( $_REQUEST['q'] ) { printf('value="%s"', utfentities($_REQUEST['q']) ); } ?> />
521 521 <input type="submit" value="Search" />
522 </div></form>
522 </div></form>
523 523 <?php
524 524 } elseif(isset($_REQUEST['q']) && (strlen($_REQUEST['q']) > 0)) {
525 525 echo '<div class="content"><div><p class="results">So sorry. Search ninjas obey without fail, yet find nothing.</p></div>';
@@ -529,7 +529,7 pagehead('search', 'Search');
529 529 echo '<div class="content"><div><p class="results"><a href="search_help">Learn to direct search ninjas!</a></p></div></div>';
530 530 }
531 531 #search_help();
532
532
533 533 ?>
534 534
535 535 <?php pagefoot() ?>
Comments 0
You need to be logged in to leave comments. Login now