function deleteComment($comment_id) { $objResponse = new xajaxResponse(); $project7 = new editsee_App(); if ($project7->loggedIn() && $project7->isAdmin()) { $query = $project7->db->_query("select linked_post_id from " . $project7->db->get_table_prefix() . "comments where comment_id='" . $comment_id . "'"); $post_id = $query->_result(0); $project7->db->_query("update " . $project7->db->get_table_prefix() . "comments set date_deleted=now(),deleted='1' where comment_id='" . $comment_id . "'"); $objResponse->assign("comments", "innerHTML", $project7->get_comments($post_id)); } else { $objResponse->alert($project7->notLoggedIn(true)); } return $objResponse; }