$val) { $$key = $val; } if (! $poll_id && substr($REQUEST_URI,0,16) == "/pollcommentary/") { $poll_id = urldecode(substr($REQUEST_URI,16)); $poll_id = preg_replace("/\?PHPSESSID.*/","",$poll_id); } $pollurl = $altpollurl = "/poll/"; $resultsurl = $altresultsurl = "/results/"; //session_register("in_category"); mysql_connect("db1.xanthas.net","admin","329N02#z!~3nZ!"); $comments_table = "poll_" . $poll_id . "_comments"; $errors = array(); if ($poll_id == "") { $errors[sizeof ($errors)] = "No poll specified."; } else { # add a new comment if there is one if ($addcomment == 'yes') { $newsig = addslashes(htmlspecialchars($newsig)); $newcomment = addslashes(htmlspecialchars($newcomment)); if (! preg_match("/\S/",$newsig)) { $newsig = 'Anonymous'; } if (preg_match("/\S/",$newcomment)) { if (! preg_match("/href=|url=/",$newcomment)) { $dupres = mysql_db_query("likelike","SELECT * FROM $comments_table WHERE comment_text=\"".$newcomment."\" AND commentor=\"".$newsig."\""); if ($duprow = mysql_fetch_array($dupres)) { $duplicate = 1; } else { $addok = mysql_db_query("likelike","insert into $comments_table (comment_text,commentor,ip,time_created) values ('$newcomment','$newsig','$REMOTE_ADDR','".date("Y-m-d H:i:s")."')"); } } if ($addok) { mysql_db_query("likelike","update poll_details set num_comments=num_comments+1 where poll_id=$poll_id"); } elseif (! $duplicate) { $errors[sizeof($errors)]= "There was an error adding your comment."; } } } if (sizeof($errors) == 0) { # load up the poll unset($poll_details); $comments = array(); $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; } mysql_free_result($results); if (isset($poll_details)) { $query = "select * from $comments_table order by time_created LIMIT 300"; $results = mysql_db_query ("likelike",$query); while ( $row = mysql_fetch_array($results) ) { if ($row['banned'] == 1) { $row['comments'] = "REMOVED"; } $comments[sizeof($comments)] = $row; } mysql_free_result($results); } else { $errors[sizeof ($errors)] = "There was an error loading the comments. Sorry."; } } } if (sizeof ($errors) >0) { echo " Poll Comments Problem!

Problem With Poll Comments

"; for ( $counter = 0; $counter < sizeof ($errors); $counter++) { echo $errors[ $counter ]; echo '
'; } echo "

Try something else, please. "; exit(); } ?> Comments: <? echo $poll_details['title']; ?>




Your Ad Here

Question:
Created by: at

Comments

Nobody has commented on this poll yet.


" ; } else { for ($i = 0;$i < $numcomments; $i++) { $commentrow = $comments[$i]; if ($commentrow['banned'] == 1) { echo 'REMOVED

'.$commentrow['commentor'].''; if ($commentrow['time_created'] && $commentrow['time_created'] > '0000-00-00 00:00:00') { echo ''.timeAgo($commentrow['time_created']).''; } echo '
'; } else { $cleantext = cleanUp($commentrow['comment_text']); echo $cleantext.'

'.$commentrow['commentor'].''; if ($commentrow['time_created'] && $commentrow['time_created'] > '0000-00-00 00:00:00') { echo ''.timeAgo($commentrow['time_created']).''; } echo '
'; } } } function cleanUp ($intext) { $intext = preg_replace("/fuck/i","f*ck",$intext); $intext = preg_replace("/Fuck/","F*ck",$intext); $intext = preg_replace("/shit/","poo",$intext); $intext = preg_replace("/Shit/","Poo",$intext); $intext = preg_replace("/asshole/","*sshole",$intext); $intext = preg_replace("/cunt/","c*nt",$intext); $intext = preg_replace("/Cunt/","C*nt",$intext); $intext = preg_replace("/cock/","c*ck",$intext); $intext = preg_replace("/Cock/","C*ck",$intext); $intext = preg_replace("/nigger/i","n-----",$intext); return $intext; } ?> Add a comment:
> Comment:


By:


Vote | Results | Home
Vote Results