case 'unfollow': $isAjax = isset($_REQUEST['buckys_ajax']) ? true : false; $paramPageID = get_secure_integer($_REQUEST['pid']); if ($isAjax) { header('Content-type: application/xml'); } if (!buckys_check_form_token('request')) { if ($isAjax) { $resultXML = ['status' => 'error', 'message' => MSG_INVALID_REQUEST]; render_result_xml($resultXML); exit; } else { buckys_redirect('/page.php?pid=' . $paramPageID, MSG_INVALID_REQUEST, MSG_TYPE_ERROR); } } $result = $pageFollowerIns->removeFollower($paramPageID, $userID); if ($result) { if ($isAjax) { $resultXML = ['status' => 'success', 'message' => 'MSG_FOLLOW_PAGE_SUCCESS', 'html' => 'follow', 'link' => '/page.php?action=follow&pid=' . $paramPageID . buckys_get_token_param()]; render_result_xml($resultXML); exit; } else { buckys_redirect('/page.php?pid=' . $paramPageID, MSG_UNFOLLOW_PAGE_SUCCESS, MSG_TYPE_SUCCESS); } } else { $resultXML = ['status' => 'error', 'message' => MSG_INVALID_REQUEST]; render_result_xml($resultXML); exit; } break; //==================== Add New Page ====================//