<?php
if($_SESSION['USER']->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())
default:
redirect('login');