Example #1
0
     $um->getMessageThreadsCurrentUser($offset, $amount);
     break;
 case "retrieveThread":
     require_once "../framework2/UserMgmt.php";
     $um = new UserMgmt();
     $thread_id = isset($_POST["thread_id"]) ? filter_var($_POST["thread_id"], FILTER_SANITIZE_STRING) : null;
     $offset = isset($_POST["offset"]) ? filter_var($_POST["offset"], FILTER_SANITIZE_NUMBER_INT) : 0;
     $limit = isset($_POST["limit"]) ? filter_var($_POST["limit"], FILTER_SANITIZE_NUMBER_INT) : 100;
     $um->retrieveThread($thread_id, $offset, $limit);
     break;
 case "retrieveThreadNew":
     require_once "../framework2/UserMgmt.php";
     $um = new UserMgmt();
     $thread_id = isset($_POST["thread_id"]) ? filter_var($_POST["thread_id"], FILTER_SANITIZE_STRING) : null;
     $override = isset($_POST["override"]) ? filter_var($_POST["override"], FILTER_SANITIZE_NUMBER_INT) : 0;
     $um->retrieveThreadNew($thread_id, $override);
     break;
 case "appendMessage":
     require_once "../framework2/UserMgmt.php";
     $um = new UserMgmt();
     $thread_id = isset($_POST["thread_id"]) ? filter_var($_POST["thread_id"], FILTER_SANITIZE_STRING) : null;
     $message_content = isset($_POST["message"]) ? htmlentities($_POST["message"]) : null;
     $um->appendMessage($thread_id, $message_content, true, true);
     break;
 case "deleteThread":
     require_once "../framework2/UserMgmt.php";
     $um = new UserMgmt();
     $thread_id = isset($_POST["thread_id"]) ? filter_var($_POST["thread_id"], FILTER_SANITIZE_STRING) : null;
     $um->deleteThread($thread_id);
     break;
 case "hasNewMessages":