Interesting things said in my presence
20)) ? "" : $_REQUEST["topic"] ;
$source = (empty($_REQUEST["source"])) ? "" : $_REQUEST["source"] ;
$start_quote = (empty($_REQUEST["start_quote"])) ? "" : $_REQUEST["start_quote"] ;
$search = (empty($_REQUEST["search"])) ? "" : $_REQUEST["search"] ;
$search = ""; # disable searching until I can get it to work :(
$rating = (empty($_REQUEST["rating"])) ? "" : $_REQUEST["rating"] ;
$heard = (empty($_REQUEST["heard"])) ? "" : $_REQUEST["heard"] ;
$added = (empty($_REQUEST["added"])) ? "" : $_REQUEST["added"] ;
$offset = (empty($_REQUEST["offset"])) ? "" : $_REQUEST["offset"] ;
$limit = (empty($_REQUEST["limit"])) ? "" : $_REQUEST["limit"] ;
$by = (empty($_REQUEST["by"])) ? "" : $_REQUEST["by"] ;
$order = (empty($_REQUEST["order"])) ? "" : $_REQUEST["order"] ;
if ($offset=="")
$offset = 0;
function get_sep($cur_url) {
if ($cur_url!="")
$sep = "&";
else
$sep = "?";
return $sep;
}
function get_cur_url($elems) {
$cur_url = "";
foreach($elems as $elem) {
if (!empty($_REQUEST[$elem])) {
if ($_REQUEST[$elem]!="") {
$cur_url .= get_sep($cur_url);
$cur_url .= $elem."=";
$cur_url .= $_REQUEST[$elem];
}}
}
return $cur_url;
}
if ($who!=""||$topic!="")
$order="DESC";
if ($by=="")
$by="date";
if ($order=="")
$order="ASC";
if ($by!="") {
if ($by=="rating")
$sort = "quotes.ranking";
if ($by=="date")
$sort = "quotes.date_said";
if ($order!="") {
if ($order=="DESC")
$sort .= " DESC";
if ($order=="ASC")
$sort .= " ASC";
} else {
$sort .= " DESC";
}
} else {
$sort = "id DESC";
}
include("inc_search.php");
if ($id!="") {
list($header, $footer, $result_quotes) = search_id($id, $link);
# JNW disable searching
#} elseif ($search!="") {
# list($header, $footer, $result_quotes) = search_search($search, $sort, $link);
} elseif ($rating!="") {
list($header, $footer, $result_quotes) = search_rating($rating, $offset, $lq, $link);
} elseif ($heard!=""||$added!="") {
list($header, $footer, $result_quotes) = search_date($heard, $added, $sort, $link);
} elseif ($who!="") {
if ($topic!="") {
list($header, $footer, $result_quotes) = search_whotopic($who, $topic, $sort, $link);
} else {
list($header, $footer, $result_quotes) = search_who($who, $sort, $link);
}
} elseif ($topic!="") {
list($header, $footer, $result_quotes) = search_topic($topic, $sort, $link);
} elseif ($topic=="") {
list($header, $footer, $result_quotes) = search_other($start_quote, $how_many, $last_quote, $link);
setcookie("highest_quote",$last_quote,mktime(0,0,0,1,1,2008),"/","firespeaker.org");
}
print $header."\n
\n";
#$num_total = mysql_fetch_array(mysql_query("SELECT FOUND_ROWS();", $link));
$num_total = mysql_fetch_array(mysql_query("SELECT COUNT(*) as count FROM quotes;", $link));
$num_results = mysql_num_rows($result_quotes);
print "
\n";
print "Viewing ".$num_results." of ".$num_total['count']." Result(s)
\n";
print "".$display_sortby."\n";
print "
\n";
print "\n";
while ($quotes = mysql_fetch_array($result_quotes)) {
print display_quote_wrap($quotes['date_said'], $quotes['date_added'], $quotes['quote'], $quotes['who'], $quotes['comment'], (empty($quotes['categories'])) ? "" : $quotes['categories'], $quotes['id'], $quotes['ranking'], $link);
}
print "\n";
print "
".$footer."\n
\n";
?>