<?php
if($_SESSION['user']->isLoggedIn()) {
    if(isset($path[1])) {
        switch ($path[1]) {
            case 'add':
                $services = (new AccomodationServices())->getAll();
                require_once(VIEW_PATH.$path[1] . '_' . $path[0].'.php');
                break;
            case 'edit':
                require_once(VIEW_PATH.$path[1] . '_' . $path[0].'.php');
                break;
            default:
                redirect();
        }
    }else{
        redirect();
    }
}else{
    redirect('login');
}