tag = "MEMCACHE"; include_once('./inc-databroker.php'); include_once('./common.inc'); include_once('./inc-usermanagement.inc'); $array_posts = array(); $id = ExtractSitePostID($_REQUEST['id']); $id = CleanUrlParameter($id); $id = str_replace("/", "", $id); // If the post ID is no longer valid, then redirect if(!IsPostIDValid($id)) { header('Location: /404.php'); exit; } $commentid = CleanUrlParameter(ExtractSitePostID($_REQUEST['commentid'])); $commentid = str_replace("/", "", $commentid); $action = CleanUrlParameter($_REQUEST['action']); $action = str_replace("/", "", $action); $array_threadcommentIDs = DataBroker_GetThreadCommentsIDs($commentid); // (START) Submit comment if(strtolower($action) == "submit") { if($loggedIn) { $comment = HTMLFormToText($_REQUEST['comment']); $comment = mysql_real_escape_string($comment); $url = $_REQUEST['url']; if(trim($url) == "") { $url = "/"; } if(IsPostIDValid($id)) { $newComment = new Comment(); $newComment->sitepostID = $id; $newComment->userID = $cookie_userid; $newComment->comment = $comment; // Insert comment $lastID = DataBroker_InsertNewComment($newComment); // Redirect to url $url = FilterUrlParameter($url, "commentid"); header('Location: ' . $url . "&commentid=$lastID#a_comment_$lastID"); } else { // TODO: Handle } } else { // TODO: Handle } } // (END) Submit comment // (START) Submit edit comment if(strtolower($action) == "edit") { if($loggedIn) { $comment = HTMLFormToText($_REQUEST['comment']); $comment = mysql_real_escape_string($comment); $url = $_REQUEST['url']; if(trim($url) == "") { $url = "/"; } if(IsPostIDValid($id)) { $newComment = new Comment(); $newComment->sitepostID = $id; $newComment->commentid = $commentid; $newComment->userID = $cookie_userid; $newComment->comment = $comment; // Edit comment DataBroker_EditComment($newComment); // Redirect to url $url = FilterUrlParameter($url, "commentid"); header('Location: ' . $url . "&commentid=" . $newComment->commentid . "#a_comment_" . $newComment->commentid); } else { // TODO: Handle } } } // (END) Submit edit comment // (START) Submit reply comment if(strtolower($action) == "reply") { if($loggedIn) { $comment = HTMLFormToText($_REQUEST['comment']); $comment = mysql_real_escape_string($comment); $url = $_REQUEST['url']; if(trim($url) == "") { $url = "/"; } if(IsPostIDValid($id)) { $newComment = new Comment(); $newComment->sitepostID = $id; $newComment->replycommentID = $commentid; $newComment->userID = $cookie_userid; $newComment->comment = $comment; // Reply to comment $newCommentID = DataBroker_InsertNewComment($newComment); // Redirect to url $url = FilterUrlParameter($url, "commentid"); header('Location: ' . $url . "&commentid=" . $newCommentID . "#a_comment_" . $newCommentID); } else { // TODO: Handle } } } // (END) Submit reply comment // Determine highlight keywords $highlight = CleanUrlParameter($_REQUEST['highlight']); $highlight = str_replace(",", " ", $highlight); $highlight = str_replace("%20", " ", $highlight); $highlight = str_replace("+", "", $highlight); $array_highlightkeywords = explode(" ", $highlight); // Check to see if post ID is valid - if not, redirect if(IsPostIDValid($id)) { DataBroker_BumpSitePostViewCount($id); } else { header("Location: /"); } // (START) Get post $postItem = DataBroker_GetSitePost($id); $postItem->site = ucwords(strtolower($postItem->site)); $postItem->userName = str_replace(" ", " ", $postItem->userName); $postItem->userName = stripslashes($postItem->userName); $postItem->title = stripslashes($postItem->title); if($postItem->viewcount <= 0) { $postItem->viewcount = 0; } $preformattedTitle = $postItem->title; if(trim($highlight) != "") { $postItem->title = HighlightKeywords($postItem->title, $array_highlightkeywords); $postItem->description = HighlightKeywords($postItem->description, $array_highlightkeywords); } array_push($array_posts, $postItem); // (END) Get post // Get rating images and alt text GetRatingImageText($cookie_userid, $id); ?> dealseeQ.com :: <? echo strip_tags($postItem->title); ?>
Administrative Panel