/
admin.php
108 lines (91 loc) · 2.07 KB
/
admin.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?php
session_start();
if( empty( $_SESSION['id_user'] ) ){
//session_destroy();
$_SESSION['err'] = '<strong>ERROR!</strong> Anda harus login terlebih dahulu.';
header('Location: ./');
die();
} else {
include "koneksi.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">
<meta name="description" content="">
<meta name="author" content="">
<title>Aplikasi Jasa Cuci</title>
<!-- Bootstrap core CSS -->
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/jquery-ui.min.css" rel="stylesheet">
<script src="js/jquery.min.js"></script>
<style type="text/css">
body {
min-height: 200px;
padding-top: 70px;
}
@media print {
.container {
margin-top: -30px;
}
#tombol,
.noprint {
display: none;
}
}
</style>
</head>
<body>
<?php include "menu.php"; ?>
<div class="container">
<?php
if( isset($_REQUEST['hlm'] )){
$hlm = $_REQUEST['hlm'];
switch( $hlm ){
case 'transaksi':
include "transaksi.php";
break;
case 'laporan':
include "laporan.php";
break;
case 'user':
include "user.php";
break;
case 'biaya':
include "biaya.php";
break;
case 'cetak':
include "cetak_nota.php";
break;
}
} else {
?>
<!-- Main component for a primary marketing message or call to action -->
<div class="jumbotron">
<h2>Selamat Datang di Aplikasi Kasir Jasa Cuci</h2>
<p>Halo <strong><?php echo $_SESSION['nama']; ?></strong>, Anda login sebagai
<strong>
<?php
if($_SESSION['level'] == 1){
echo 'Admin.';
} else {
echo 'Petugas Kasir.';
}
?>
</strong>
</p>
</div>
<?php
}
?>
</div> <!-- /container -->
<!-- Bootstrap core JavaScript, Placed at the end of the document so the pages load faster -->
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
</body>
</html>
<?php
}
?>