//session_register("in_category"); include_once "./likelikeconstants.php"; foreach ($_REQUEST as $key => $val) { $$key = $val; } if (substr($_SERVER['REQUEST_URI'],0,9) == "/results/") { $poll_id = urldecode(substr($REQUEST_URI,9)); $poll_id = preg_replace("/\?PHPSESSID.*/","",$poll_id); $pollurl = "/poll/"; $pollcommentaryurl = "/pollcommentary/"; $altpollurl = "/poll.elephant?poll_id="; $altpollcommentaryurl = "/pollcommentary.rhinoceros?poll_id="; } else { $pollurl = "/poll.elephant?poll_id="; $pollcommentaryurl = "/pollcommentary.rhinoceros?poll_id="; $altpollurl = "/poll/"; $altpollcommentaryurl = "/pollcommentary/"; } //session_register("in_category"); //include "./likelikeconstants.php"; if (! $category) {$category = $in_category;} function resultsErrorPage($message) { echo "
$message
Use the \"Back\" feature in your browser to fix your problem. "; exit(); } # there must be a poll if ($poll_id == "") { resultsErrorPage("No poll was specified."); } //$poll_table = "poll_$poll_id"; mysql_connect("db1.likelike.com","likelike","3927%nN$!Hz4N"); $query = "select *,UNIX_TIMESTAMP(created_time) unix_time from poll_details where poll_id=$poll_id"; $results = mysql_db_query("likelike",$query); if ($row = mysql_fetch_array($results)) { $poll_details = $row; } else { mysql_free_result($results); resultsErrorPage("There was an unknown error. Sorry."); } mysql_free_result($results); # get the choices if ($poll_details['poll_type'] == 2) { $query = "select choice_text,votes from poll_choices where poll_id='$poll_id' order by votes desc,choice_text"; } else { $query = "select choice_text,votes from poll_choices where poll_id='$poll_id' order by votes desc,choice_number"; } $results = mysql_db_query ("likelike",$query); $choices = array(); $choicevotes = array(); while ( $row = mysql_fetch_array($results) ) { $choicevotes[sizeof($choices)] = $row['votes']; $choices[sizeof($choices)] = $row['choice_text']; } mysql_free_result($results); ?>
if (strstr($HTTP_USER_AGENT,"bot")) { echo "The Solids\nPatrick Butler\n\n"; } require ('sideindex.animals'); ?> |
Results( echo $poll_details['total_votes'];?> vote if ($poll_details['total_votes'] != 1) {echo 's';}?>)
Vote | Read/Post Comments if ($poll_details['num_comments'] > 0) {echo ' ('.$poll_details['num_comments'].') ';}?> | Home |