this thread"; if (strstr($comment,"EmwW_6kUdHw")!==false) $errormessage[] = "please post video links to this thread - also, your link has been removed from youtube."; //if($_SESSION["SCENEID_ID"]==2100) // $comment = "hi! i'm dubmood and i suck!\n\nps. i have a small penis."; //if(!strcasecmp(trim($message),"Optimus, you have a small penis")) // $comment = "hi - i come from $REMOTE_ADDR"; if($which&&trim($comment)&&$rating&&!$errormessage) { $query="SELECT who FROM comments where comment='".addslashes($comment)."' and who=".$_SESSION["SCENEID_ID"]." and which=".$which." ORDER BY quand DESC LIMIT 1"; $timestart = microtime_float(); $result=mysql_query($query); $time["query1"] = microtime_float() - $timestart; $lastone=mysql_fetch_assoc($result); if($lastone["who"]!=$_SESSION["SCENEID_ID"]) { $title="You've successfully added the following comment:"; $query="SELECT count(0) FROM comments WHERE who=".$_SESSION["SCENEID_ID"]." AND which=".$which." AND rating!=0"; $timestart = microtime_float(); $result=mysql_query($query); $time["query2"] = microtime_float() - $timestart; if(mysql_result($result,0)) $rating="isok"; switch($rating) { case "rulez": $rating=1; break; case "sucks": $rating=-1; break; default: $rating=0; } $query="INSERT comments SET comment='".addslashes($comment)."',who=".$_SESSION["SCENEID_ID"].",which=".$which.",rating=".$rating.",quand=NOW()"; $timestart = microtime_float(); mysql_query($query); $time["query3"] = microtime_float() - $timestart; //update vote info unset($commentss); //unset($checktable); $checktable = array(); $rulez=0; $piggie=0; $sucks=0; $total=0; $query = "SELECT comments.rating,comments.who FROM comments WHERE comments.which='".$which."'"; $timestart = microtime_float(); $result=mysql_query($query); $time["query4"] = microtime_float() - $timestart; while($tmp=mysql_fetch_array($result)) { $commentss[]=$tmp; } for($i=0;$i DATE_SUB(sysdate(),INTERVAL '30' DAY) AND prods.quand < DATE_SUB(sysdate(),INTERVAL '0' DAY) ORDER BY (prods.views/((sysdate()-prods.quand)/100000)+prods.views)*prods.voteavg*prods.voteup desc LIMIT 50",1); $time["cache2"] = microtime_float() - $timestart; } break; default: $url = '/'; } if($errormessage) { unset($message); for($i=0;$i"; } debuglog(var_export($time,true)); ?>

get back