예제 #1
0
     } else {
         if (empty($pageData)) {
             //No such page exists
             echo json_encode(['success' => 0, 'msg' => MSG_NO_SUCH_PAGE]);
         } else {
             //You don't have permission to update content
             echo json_encode(['success' => 0, 'msg' => MSG_NO_PERMISSION_TO_EDIT_PAGE]);
         }
     }
     exit;
     //==================== Delete this page ====================//
 //==================== Delete this page ====================//
 case 'delete':
     $paramPageID = get_secure_integer($_REQUEST['pid']);
     //Check if this user has rights to delete this one
     if ($pageIns->deletePageByID($paramPageID, $userID)) {
         //Deleted successfully
         buckys_redirect('/account.php', MSG_DELETE_PAGE_SUCCESS, MSG_TYPE_SUCCESS);
     } else {
         //You don't have rights to delete this page
         buckys_redirect('/account.php', MSG_NO_PERMISSION_TO_DELETE_PAGE, MSG_TYPE_ERROR);
     }
     exit;
     //==================== Follow This Page ====================//
 //==================== Follow This Page ====================//
 case 'follow':
     $isAjax = isset($_REQUEST['buckys_ajax']) ? true : false;
     if ($isAjax) {
         header('Content-type: application/xml');
     }
     if (!buckys_check_form_token('request')) {