-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathindex.php
41 lines (38 loc) · 947 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
include_once "db.php";
session_start();
if (isset($_SESSION['user_id'])){
$user_id = $_SESSION['user_id'];
$userQuery = "SELECT * FROM user WHERE id = '$user_id'";
$result = mysqli_query($connection, $userQuery);
$user = mysqli_fetch_assoc($result);
}else{
header('Location:login.php');
}
include_once "header.php";
include_once "sidebar.php";
if (isset($_GET['room_mang'])){
include_once "room_mang.php";
}
elseif (isset($_GET['reservation'])){
include_once "reservation.php";
}
elseif (isset($_GET['staff_mang'])){
include_once "staff_mang.php";
}
elseif (isset($_GET['add_emp'])){
include_once "add_emp.php";
}
elseif (isset($_GET['complain'])){
include_once "complain.php";
}
elseif (isset($_GET['statistics'])){
include_once "statistics.php";
}
elseif (isset($_GET['emp_history'])){
include_once "emp_history.php";
}
else{
include_once "room_mang.php";
}
include_once "footer.php";