-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
30 lines (25 loc) · 1 KB
/
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
<?php
session_start();
if (!isset($_SESSION['username'])) { // Cek Jika Belum Login
header("Location: login.php");
}
else { // Jika Sudah
// Cek Role
if (strtolower((string)$_SESSION['role']) == "analyst" ) { // if Role Analyst => header to dashboard/index.php?role=analyst
echo "BERHASIL LOGIN ANALYST";
header("Location: dashboard/index.php?role=analyst");
}
else if (strtolower((string)$_SESSION['role']) == "siteman" ) { // else Role Siteman => header to dashboard/index.php?role=siteman
header("Location: dashboard/index.php?role=siteman");
}
}
// <div class="row">
// <div class="col-xl-12 col-md-12 col-sm-12 col-12">
// <select class="form-control selectpicker" id="select-country" data-live-search="true">
// <option data-tokens="china">China</option>
// <option data-tokens="malayasia">Malayasia</option>
// <option data-tokens="singapore">Singapore</option>
// </select>
// </div>
// </div>
?>