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
840 B
PHP
Raw Normal View History

2020-12-18 20:29:24 +01:00
<?php
2020-12-20 03:56:05 +01:00
if($_SESSION['USER']->isLoggedIn()) {
2020-12-18 20:29:24 +01:00
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();
}
2020-12-18 20:29:24 +01:00
break;
case 'edit':
if($_SESSION['USER']->getAccomodationId())
{
require_once(VIEW_PATH.$path[1] . '_' . $path[0].'.php');
}else{
redirect();
}
2020-12-18 20:29:24 +01:00
break;
default:
redirect();
}
}else{
redirect();
}
}else{
redirect('login');
}