include "likelikeconstants.php"; if (substr($REQUEST_URI,0,4) == "/ci/") { $category = urldecode(substr($REQUEST_URI,4)); $category = preg_replace("/\?PHPSESSID.*/","",$category); if (strstr($category,"/2")) { $old = 1; $category = preg_replace("/\/2$/","",$category); } $pollurl = "/poll/"; $resultsurl = "/results/"; } else { $pollurl = "/poll.elephant?poll_id="; $resultsurl = "/results.moose?poll_id="; } //session_register("in_category"); #if ($category == 'Sex') {include "tosex.xxx"; exit();} if ($category == 'Sex' && ! preg_match("/intro/",$HTTP_REFERER) && ! preg_match("/^209.76.16/",$REMOTE_ADDR)) {header("Location: /sex_intro.chicken?$QUERY_STRING\n\n"); exit();} $in_category=$category; ?>
require ('sideindex.animals'); ?> |
*/ ?>
if ($category == 'Bummin!' || $category == '') {
echo "Create a poll";
}
else {
echo "Create a poll in this category";
}
?>
# now load up the polls mysql_connect("db1.likelike.com","likelike","3927%nN$!Hz4N"); $query = "select *,IF (ADDDATE(created_time,INTERVAL $ll_hours_for_new HOUR) > NOW(),1,0) as is_new from polls_by_category,poll_details where polls_by_category.category='$category' and poll_details.active=1 and polls_by_category.poll_id=poll_details.poll_id order by is_new desc, total_votes desc,created_time desc"; $results = mysql_db_query ("likelike",$query); while ( $row = mysql_fetch_array($results) ) { $poll_id = $row['poll_id']; echo "
"; } mysql_free_result($results); ?> |