function OnRequest()
{
    $user = ModelFacade::getLoggedInUser();
    $messages = DirectMessages::getUsersInbox($user->id);
    if (isset($_POST['delMsg'])) {
        foreach ($_POST['delMsg'] as $eachDelMsg) {
            ModelFacade::deleteMsg($eachDelMsg);
        }
        header('Location: /DirectMsgInbox.php');
    }
    include_once '/Views/DirectMsgInbox.html';
}
Exemplo n.º 2
0
 public static function getUsersInbox($userId)
 {
     $inbox = DirectMessages::getUsersInbox($userId);
     return $inbox;
 }