コード例 #1
0
ファイル: xclams.php プロジェクト: NguyenThanhDung/ntd.vn
         }
     }
     break;
 case ACTION_SUBMIT_EDITED_XCLAM:
     if ($loggedUser->GetType() == UserType::ADMIN) {
         $id = isset($_POST["id"]) ? $_POST["id"] : false;
         $content = isset($_POST["content"]) ? $_POST["content"] : false;
         if ($id && $content) {
             XclamManager::UpdateXclam($id, $content);
         }
     }
     break;
 case ACTION_DELETE_XCLAM:
     if ($loggedUser->GetType() == UserType::ADMIN) {
         if (isset($_GET["id"])) {
             XclamManager::DeleteXclam($_GET["id"]);
         }
     }
     break;
 case ACTION_POST_COMMENT:
     $content = isset($_POST["content"]) ? $_POST["content"] : false;
     $entryId = isset($_POST["entry_id"]) ? $_POST["entry_id"] : false;
     if ($content && $entryId) {
         CommentManager::PostComment($loggedUser, $content, EntryType::XCLAM, $entryId);
     }
     break;
 case ACTION_EDIT_COMMENT_FORM:
     $id = $_GET["id"];
     $editingComment = CommentManager::GetCommentById($id);
     $includedPage = "edit_comment";
     break;