database_query("DELETE FROM ".$database->database_real_escape_string($_POST["object"])." WHERE id='".$_POST["comment_id"]."'"); } elseif($_POST["task"]=="comment_edit") { $comment_body=$_POST["comment_edit"]; $comment_body = cleanHTML(censor($comment_body), $setting['setting_comment_html'], Array("style")); $comment_body = preg_replace('/(\r\n?)/', "\n", $comment_body); $comment_body = str_replace("\n", "
", $comment_body); $comment_body = preg_replace('/(
){3,}/is', '

', $comment_body); //$comment_body = str_replace("'", "\'", $comment_body); if( !trim($comment_body) ) { exit; $comment_body = ""; } $comment_body=json_encode(htmlentities($comment_body, ENT_QUOTES)); $database->database_query("UPDATE ".$database->database_real_escape_string($_POST["object"])." SET body='".$database->database_real_escape_string($comment_body)."' WHERE id='".$_POST["comment_id"]."'"); } elseif(trim($_POST["comment"])!=""){ $comment_body=$_POST["comment"]; $comment_body = cleanHTML(censor($comment_body), $setting['setting_comment_html'], Array("style")); $comment_body = preg_replace('/(\r\n?)/', "\n", $comment_body); $comment_body = str_replace("\n", "
", $comment_body); $comment_body = preg_replace('/(
){3,}/is', '

', $comment_body); //$comment_body = str_replace("'", "\'", $comment_body); if( !trim($comment_body) ) { exit; $comment_body = ""; } $comment_body=json_encode(htmlentities($comment_body, ENT_QUOTES)); $database->database_query("INSERT INTO ".$database->database_real_escape_string($_POST["object"])." SET object_id='".$database->database_real_escape_string($_POST["object_id"])."', authoruser_id='".$database->database_real_escape_string($_POST["user"])."', date='".$time."', body='".$database->database_real_escape_string($comment_body)."'"); $lastid=$database->database_insert_id(); $owner=new SEUser(Array($_POST["user"])); if($_POST["object"]=="batortrainingcomments"){ $query=$database->database_query("SELECT * FROM bateworldcom_zips.bator_training WHERE id=".$database->database_real_escape_string($_POST["object_id"])." "); $row=$database->database_fetch_array($query); $actions->actions_add($user, "btscomment", array( $user->user_info['user_username'], $user->user_displayname, $row["title"], $_POST["object_id"], $comment_body //$this->poll_owner->user_info['user_username'], //$this->poll_info['poll_id'], //$poll_title ), Array(), 0, false, "btscomment", $_POST["object_id"], 31, $lastid); //Add in database then add text to admin (%s) then add stuff to here and homestorage/activityfeed.php } elseif($_POST["object"]=="bate_videocomments"){ $query=$database->database_query("SELECT * FROM bate_videos WHERE id=".$database->database_real_escape_string($_POST["object_id"])." "); $row=$database->database_fetch_array($query); $actions->actions_add($user, "bate_videocomments", array( $user->user_info['user_username'], $user->user_displayname, $row["title"], $_POST["object_id"], $comment_body //$this->poll_owner->user_info['user_username'], //$this->poll_info['poll_id'], //$poll_title ), Array(), 0, false, "bate_videocomments", $_POST["object_id"], 31, $lastid); //Add in database then add text to admin (%s) then add stuff to here and homestorage/activityfeed.php } ?>
"> user_photo("./images/nophoto.png"); echo $owner->userprofiledot($profilepicture, "75px");?>