-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhalaman_admin.php
150 lines (138 loc) · 6.25 KB
/
halaman_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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
<?php
session_start();
require 'koneksi.php';
if(!isset($_SESSION['login-admin'])){
echo "<script>
alert('Akses ditolak, silahkan login dulu');
document.location.href = 'login.php';
</script>";
} else {
$username = $_SESSION['login-admin'];
}
?>
<!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="icon" href="image/logo.ico" type="image/x-icon">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link href='https://fonts.googleapis.com/css?family=Nunito' rel='stylesheet'>
<link rel="stylesheet" href="style_admin.css">
<title>Fluffy Cafe</title>
</head>
<body>
<div class="container">
<div class="wrapper">
<div class="nav-brand">fluffy cafe</div>
<ul class="navigation">
<li><a href="manage_staff.php">Manage Staff</a></li>
<li><a href="manage_menu.php">Manage Menu</a></li>
<li><a href="aboutus_admin.php">about us</a></li>
<li><a href="logout.php">logout</a></li>
</ul>
</div>
<div class="intro-content">
<div class="line"></div>
<p class="greeting">Admin Dashboard</p>
</div>
<div class="content">
<div class="label"><i class="fa fa-user fa-2x"></i>Staff Account</div>
<div class="staff-box">
<div class="box">
<table>
<th class="title-text">Name</th>
<th class="title-text">Username</th>
<th class="title-text">Position</th>
<?php
require "koneksi.php";
$query = "SELECT * FROM staff ORDER BY username ASC";
$result = $db->query($query);
if(!$result) {
die("Error");
}
while ($row = mysqli_fetch_assoc($result)){
$result = $db->query("SELECT * FROM staff");
$i = 1;
while($row = mysqli_fetch_array($result)){
?>
<tr>
<td class="text" align="center"><?=$row['nama_staff']?></td>
<td class="text" align="center"><?=$row['username']?></td>
<td class="text" align="center"><?=$row['jabatan']?></td>
</tr>
<?php }} ?>
</table>
</div>
</div>
</div>
<div class="content">
<div class="label"><i class="fa fa-check-circle fa-2x"></i>Staff Attendance</div>
<div class="staff-box">
<div class="box">
<table>
<th class="title-text">Name</th>
<th class="title-text">Username</th>
<th class="title-text">Jabatan</th>
<th class="title-text">Kehadiran</th>
<?php
require "koneksi.php";
$query = "SELECT * FROM absensi ORDER BY username ASC";
$result = $db->query($query);
if(!$result) {
die("Error");
}
while ($row = mysqli_fetch_assoc($result)){
$result = $db->query("SELECT * FROM absensi");
$i = 1;
while($row = mysqli_fetch_array($result)){
?>
<tr>
<td class="text" align="center"><?=$row['nama_staff']?></td>
<td class="text" align="center"><?=$row['username']?></td>
<td class="text" align="center"><?=$row['jabatan']?></td>
<td class="text" align="center"><?=$row['kehadiran']?></td>
</tr>
<?php }} ?>
</table>
</div>
</div>
</div>
<div class="content2">
<div class="label"><i class="fa fa-user fa-2x"></i>Customer Account</div>
<div class="user-box">
<div class="box">
<table>
<th class="title-text">Name</th>
<th class="title-text">Username</th>
<th class="title-text">Email</th>
<th class="title-text">Phone Number</th>
<?php
require "koneksi.php";
$query = "SELECT * FROM customer ORDER BY nama_customer ASC";
$result = $db->query($query);
if(!$result) {
die("Error");
}
while ($row = mysqli_fetch_assoc($result)){
$result = $db->query("SELECT * FROM customer");
$i = 1;
while($row = mysqli_fetch_array($result)){
?>
<tr>
<td class="text" align="center"><?=$row['nama_customer']?></td>
<td class="text" align="center"><?=$row['username']?></td>
<td class="text" align="center"><?=$row['email']?></td>
<td class="text" align="center"><?=$row['nomor_telp']?></td>
</tr>
<?php }} ?>
</table>
</div>
</div>
</div>
<div class="space"></div>
</div>
<div class="footer">Copyright © 2022 Designed by Natalie Fuad</div>
</body>
</html>