-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwelcome.php
72 lines (56 loc) · 2.15 KB
/
welcome.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
session_start();
if ($_SESSION["login_user"] == false) {
header("location: index.php");
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (isset($_POST["product"])) {
$_SESSION["product"] = $_POST["product"];
$_SESSION["line"] = $_POST["line"];
$_SESSION["point"] = $_POST["point"];
header("location: tracking_panel.php");
} else {
session_destroy();
header("location: index.php");
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.4.1/font/bootstrap-icons.css" />
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<link rel="stylesheet" href="css/style.css" />
<title>Image Tracking System</title>
</head>
<body>
<?php require "layouts/navbar_sidebar.php"; ?>
<main class="mt-5 pt-3">
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<h4>Hello</h4>
<?php
var_dump($_SESSION);
if (isset($_SESSION["super_admin"])) {
echo "<h1>Super admin [ {$_SESSION['login_user']} ]</h1>";
} elseif (isset($_SESSION["admin"])) {
echo "<h1>Admin [ {$_SESSION['login_user']} ]</h1>";
} else {
echo "<h1>General User [ {$_SESSION['login_user']} ]</h1>";
}
?>
</div>
</div>
</div>
</main>
<?php
require "backend/footer.php";
?>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.bundle.min.js" integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous">
</script>
</body>
</html>