-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathd_table_user.php
207 lines (173 loc) · 6.19 KB
/
d_table_user.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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<!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, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>Data User</title>
<!-- Custom fonts for this template-->
<link href="assets/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<!-- Page level plugin CSS-->
<link href="vendor/datatables/dataTables.bootstrap4.css" rel="stylesheet">
<!-- Custom styles for this template-->
<link href="assets/css/sb-admin.css" rel="stylesheet">
</head>
<body id="page-top">
<?php
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
include 'controller/koneksi.php';
session_start();
if(isset($_SESSION['login'])) {
$_SESSION['login'];
$_SESSION['username'];
}
if($_SESSION['level'] =="admin"){
}else{
die("<div style='background-color:#e80000; height:35px;'> <h4 style='text-align:center; color:#ffffff;'> Anda Belum Login Atau Anda Bukan Admin !!!
Silahkan <a href='login.php'> Klik </a> Untuk Login, Agar Anda Bisa Mengakses Halaman Ini </h4> </div>");
}
?>
<nav class="navbar navbar-expand navbar-dark bg-dark static-top">
<a class="navbar-brand mr-1" href="index.html">Asian Travel Tour</a>
<button class="btn btn-link btn-sm text-white order-1 order-sm-0" id="sidebarToggle" href="#">
<i class="fas fa-bars"></i>
</button>
<!-- Navbar Search -->
<form class="d-none d-md-inline-block form-inline ml-auto mr-0 mr-md-3 my-2 my-md-0">
<div class="input-group">
<input type="text" class="form-control" placeholder="Search for..." aria-label="Search" aria-describedby="basic-addon2">
<div class="input-group-append">
<button class="btn btn-primary" type="button">
<i class="fas fa-search"></i>
</button>
</div>
</div>
</form>
<!-- Navbar -->
<ul class="navbar-nav ml-auto ml-md-0">
<li class="nav-item no-arrow">
<a class="nav-link" href="controller/hapussession.php">
<i class="fas fa-sign-out-alt fa-fw"></i>
</a>
</li>
</ul>
</nav>
<div id="wrapper">
<!-- Sidebar -->
<ul class="sidebar navbar-nav">
<li class="nav-item">
<a class="nav-link" href="halaman_admin.php">
<i class="fas fa-fw fa-tachometer-alt"></i>
<span>Dashboard</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="d_table_rute.php">
<i class="fas fa-fw fa-plane"></i>
<span>Data Rute</span></a>
</li>
<li class="nav-item ">
<a class="nav-link" href="d_table_pesanan.php">
<i class="fas fa-fw fa-shopping-cart"></i>
<span>Data Pemesanan</span></a>
</li>
<li class="nav-item active">
<a class="nav-link" href="d_table_rute.php">
<i class="fas fa-fw fa-user"></i>
<span>Data User</span></a>
</li>
</ul>
<div id="content-wrapper">
<div class="container-fluid">
<!-- Breadcrumbs-->
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a href="#">Dashboard</a>
</li>
<li class="breadcrumb-item active">Tabel Data User</li>
</ol>
<!-- DataTables Example -->
<div class="card mb-3">
<div class="card-header">
<i class="fas fa-shopping-cart"></i>
Data Pemesanan</div>
<?php
$no=1;
$sql = 'SELECT * FROM auth_user';
$query = mysqli_query($koneksi, $sql);
if (!$query) {
die ('SQL Error: ' . mysqli_error($koneksi));
}
echo"
<div class='card-body'>
<div class='table-responsive'>
<br> <br>
<table class='table table-bordered' id='dataTable' cellspacing='0'>
<thead class='thead-light'>
<tr>
<th>No</th>
<th>User Name</th>
<th>Password</th>
<th>Level</th>
<th>NIK </th>
<th>Nama</th>
<th>Jenis Kelamin</th>
<th>No Hp</th>
<th>Email</th>
</tr>
</thead>
<tbody id='myTable'>";
while ($row = mysqli_fetch_array($query)){
?>
<tr>
<td> <?php echo $no++ ; ?></td>
<td> <?php echo $row['username'] ; ?> </td>
<td> <?php echo $row['password'] ; ?> </td>
<td> <?php echo $row['level'] ; ?> </td>
<td> <?php echo $row['no_nik'] ;?></td>
<td> <?php echo $row['nama_lengkap'] ;?></td>
<td> <?php echo $row['jenis_kelamin'] ; ?> </td>
<td> <?php echo $row['no_hp'] ; ?> </td>
<td> <?php echo $row['email'] ; ?></td>
</tr>
<?php } ?>
</tbody>
<tfoot class='thead-light'>
<tr>
<th>No</th>
<th>User Name</th>
<th>Password</th>
<th>Level</th>
<th>NIK </th>
<th>Nama</th>
<th>Jenis Kelamin</th>
<th>No Hp</th>
<th>Emailp</th>
</tr>
</tfoot>
</table>
</div>
</div>
<div class="card-footer small text-muted">Updated yesterday at 11:59 PM</div>
</div>
</div>
<!-- /.container-fluid -->
<!-- Sticky Footer -->
<footer class="sticky-footer">
<div class="container my-auto">
<div class="copyright text-center my-auto">
<span>Copyright © Asian Travel Tour | Uji Kompetensi Keahlian Rekayasa Perangkat Lunak | SMK ISLAMIYAH CIAWI 2019</span>
</div>
</div>
</footer>
</div>
<!-- /.content-wrapper -->
</div>
<!-- /#wrapper -->
<!-- Bootstrap core JavaScript-->
<script src="assets/jquery/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
</body>
</html>