Exemplo n.º 1
0
     $social->insert($_POST["_nonce"], $_POST["type"], $_POST["event_id"], $_POST["ref_id"]);
     $social->db_response("json");
     break;
     // POST
 // POST
 case "add_post":
     $post = new WT_Post();
     $post->update($_POST);
     $post->db_response("json");
     break;
     //COMMENTS
 //COMMENTS
 case "get_comment":
     $comment = new WT_Comment($_POST["comment_id"]);
     if (!empty($_POST["comment_id"])) {
         $comment->retrieve();
     }
     echo json_encode($comment->db_out(null, 0));
     break;
 case "get_event_comments":
     if (!empty($_POST["event_id"])) {
         $comment = new WT_Comment();
         echo "<table id='the-comment-list' class='widefat'>";
         comments_rows($comment->query("comment_event_id=" . $_POST["event_id"]));
         echo "</table>";
     }
     break;
 case "insert_comment":
     $comment = new WT_Comment();
     $insert = $comment->insert($_POST);
     if ($insert) {