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