1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
Accommodation_Management/controller/accomodation.php

30 lines
No EOL
840 B
PHP

<?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())
{
require_once(VIEW_PATH.$path[1] . '_' . $path[0].'.php');
}else{
redirect();
}
break;
default:
redirect();
}
}else{
redirect();
}
}else{
redirect('login');
}