-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnomorantrian.php
108 lines (93 loc) · 4.5 KB
/
nomorantrian.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
<!doctype html>
<html lang="en" class="h-100">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Aplikasi Antrian Berbasis Web">
<!-- Title -->
<title>Nomor Antrian</title>
<!-- Favicon icon -->
<link rel="shortcut icon" href="" type="image/x-icon">
<!-- Bootstrap 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">
<!-- Bootstrap Icons -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.5.0/font/bootstrap-icons.css">
<!-- Font -->
<link href="https://fonts.googleapis.com/css?family=Raleway:100,200,300,400,500,600,700,800,900&display=swap" rel="stylesheet">
<!-- Custom Style -->
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body class="d-flex flex-column h-100" style="background: url('https://source.unsplash.com/random/?moonstar,night') no-repeat center center fixed; background-size: cover;">
<main class="flex-shrink-0">
<div class="container pt-5">
<div class="row justify-content-lg-center">
<div class="col-lg-5 mb-4">
<div class="px-4 py-3 mb-4 bg-white rounded-2 shadow-sm">
<!-- judul halaman -->
<div class="d-flex align-items-center me-md-auto">
<i class="bi-people-fill text-success me-3 fs-3"></i>
<h1 class="h5 pt-2">Nomor Antrian</h1>
</div>
<div class="row justify-content-lg-center">
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">Home <a href="index.html"><i class="bi-house-fill text-success"></i></a></li>
<li class="breadcrumb-item" aria-current="page">Nomor Antrian</li>
</ol>
</nav>
</div>
</div>
<div class="card border-0 shadow-sm">
<div class="card-body text-center d-grid p-5">
<div class="border border-success rounded-2 py-2 mb-5">
<h3 class="pt-4">ANTRIAN</h3>
<!-- menampilkan informasi jumlah antrian -->
<h1 id="antrian" class="display-1 fw-bold text-success text-center lh-1 pb-2"></h1>
</div>
<!-- button pengambilan nomor antrian -->
<a id="insert" href="javascript:void(0)" class="btn btn-success btn-block rounded-pill fs-5 px-5 py-4 mb-2">
<i class="bi-person-plus fs-4 me-2"></i> Ambil Nomor
</a>
</div>
</div>
</div>
</div>
</div>
</main>
<!-- Footer -->
<footer class="footer mt-auto py-4" style="background-color: #fff;">
<div class="container">
<!-- copyright -->
<div class="copyright text-center mb-2 mb-md-0">
© 2024 - <a href="" target="_blank" class="text-danger text-decoration-none">Ahmad Ghozali</a>. All rights reserved.
</div>
</div>
</footer>
<!-- jQuery Core -->
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<!-- Popper and Bootstrap JS -->
<script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.min.js" integrity="sha384-Atwg2Pkwv9vp0ygtn1JAojH0nYbwNJLPhwyoVbhoPwBhjQPR5VtM2+xf0Uwh9KtT" crossorigin="anonymous"></script>
<script type="text/javascript">
$(document).ready(function() {
// tampilkan jumlah antrian
$('#antrian').load('nomor-antrian/get_antrian.php');
// proses insert data
$('#insert').on('click', function() {
$.ajax({
type: 'POST', // mengirim data dengan method POST
url: 'nomor-antrian/insert.php', // url file proses insert data
success: function(result) { // ketika proses insert data selesai
// jika berhasil
if (result === 'Sukses') {
// tampilkan jumlah antrian
$('#antrian').load('nomor-antrian/get_antrian.php').fadeIn('slow');
}
},
});
});
});
</script>
</body>
</html>