Exemplo n.º 1
0
     $comment->update($_POST);
     $comment->db_response("json");
     break;
 case "approve_comment":
     $comment = new WT_Comment($_POST["comment_id"]);
     $comment->approve($_POST["_nonce"], $_POST["event_id"]);
     $comment->db_response("json");
     break;
 case "unapprove_comment":
     $comment = new WT_Comment($_POST["comment_id"]);
     $comment->unapprove($_POST["_nonce"], $_POST["event_id"]);
     $comment->db_response("json");
     break;
 case "delete_comment":
     $comment = new WT_Comment($_POST["comment_id"]);
     $comment->delete($_POST["_nonce"], $_POST["event_id"]);
     $comment->db_response("json");
     break;
 case "delete_all_comments":
     unset($_POST["action"]);
     if ($_POST["id"]) {
         $comment = new WT_Comment();
         $comment->delete_all(json_decode(stripslashes($_POST["id"])), $_POST["_nonce"]);
         $comment->db_response("json");
     }
     break;
     //RSVP
 //RSVP
 case "not-attend":
     $rsvp = new WT_RSVP();
     $rsvp->notattend_event($_POST["event_id"]);