-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
transaksi.php
213 lines (172 loc) · 7.73 KB
/
transaksi.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
208
209
210
211
212
213
<?php
include('koneksi.php'); //agar index terhubung dengan database, maka koneksi sebagai penghubung harus di include
?>
<!DOCTYPE html>
<html>
<head>
<title>TRANSAKSI</title>
</head>
<body>
<?php
include ('tampilan/header.php');
include ('tampilan/footer.php');
include ('tampilan/sidebar.php');
?>
<!-- main content -->
<div class="main-content bg-primary">
<section class="section">
<div class="section-header">
<h1>TRANSAKSI</h1>
<div class="section-header-breadcrumb">
<div class="breadcrumb-item active"><a href="#">Dashboard</a></div>
<div class="breadcrumb-item text-primary">Transaksi</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header">
<h3>TRANSAKSI PEMBAYARAN</h3>
<div class="card-header-form">
<form action="proses_transaksi.php" method="post">
</div>
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">id Petugas</span>
</div>
<input type="text" name="id_petugas" class="form-control" placeholder="id petugas" aria-label="masukkan id petugas" aria-describedby="basic-addon1">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">NISN</span>
</div>
<input type="text" name="nisn" class="form-control" placeholder="nisn" aria-label="masukkan nisn" aria-describedby="basic-addon1">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">Tanggal Bayar</span>
</div>
<input type="date" name="tgl_bayar" class="form-control" placeholder="tgl_bayar" aria-label="tanggal" aria-describedby="basic-addon1">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<label class="input-group-text" for="inputGroupSelect01">Bulan Bayar</label>
</div>
<select class="custom-select" name= "bulan_dibayar" id="inputGroupSelect01">
<option selected>--pilih bulan--</option>
<option value="januari">Januari</option>
<option value="februari">Februari</option>
<option value="maret">Maret</option>
<option value="januari">April</option>
<option value="februari">Mei</option>
<option value="maret">Juni</option>
<option value="januari">Juli</option>
<option value="februari">Agustus</option>
<option value="maret">September</option>
<option value="januari">oktober</option>
<option value="februari">november</option>
<option value="maret">desember</option>
</select>
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<label class="input-group-text" for="inputGroupSelect01">Tahun Bayar</label>
</div>
<select class="custom-select" name="tahun_dibayar" id="inputGroupSelect01">
<option selected>--pilih tahun--</option>
<option value="2019">2019</option>
<option value="2020">2020</option>
<option value="2021">2021</option>
</select>
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">ID SPP</span>
</div>
<input type="text" name="id_spp" class="form-control" placeholder="id spp" aria-label="masukkan id" aria-describedby="basic-addon1">
</div>
<div class="input-group mb-3">
<div class="input-group-prepend">
<span class="input-group-text" id="basic-addon1">jumlah</span>
</div>
<input type="text" name="jumlah_bayar" class="form-control" placeholder="jumlah bayar" aria-label="masukkan nominal" aria-describedby="basic-addon1">
</div>
<div class="d-flex justify-content-center">
<button type="submit" class="btn btn-success">Bayar</button>
</form>
</div>
<br/>
<form action="" method="get">
<h2>DATA BAYAR SISWA SESUAI NISN</h2>
<table class="table">
<tr>
<td>NISN</td>
<td>:</td>
<td>
<input class="form-control" type="text" name="nisn" placeholder="--Data NISN Lihat Di Form Siswa--">
</td>
<td>
<button class="btn btn-success" type="submit" name="cari">Cari</button>
</td>
</tr>
</table>
</form>
<?php
if (isset($_GET['nisn']) && $_GET['nisn']!='') {
$query = mysqli_query($koneksi, "SELECT * FROM siswa WHERE nisn='$_GET[nisn]'");
$data = mysqli_fetch_array($query);
$nisn = $data['nisn'];
?>
<h2>DATA SISWA</h2>
<table class="table table-striped">
<thead>
<tr>
<th scope="col">NISN</th>
<th scope="col">NAMA SISWA</th>
<th scope="col">ID KELAS</th>
</tr>
</thead>
<tbody>
<td><?php echo $data['nisn']; ?></td>
<td><?php echo $data['nama']; ?></td>
<td><?php echo $data['id_kelas']; ?></td>
</tbody>
</table>
<h2>DATA SPP SISWA</h2>
<table class="table table-striped table-responsive">
<thead>
<tr>
<!-- <th scope="col">Id Pembayaran</th> -->
<th scope="col">id petugas</th>
<th scope="col"> NISN</th>
<th scope="col">Tgl Bayar</th>
<th scope="col">Bulan Bayar</th>
<th scope="col">Tahun Bayar</th>
<th scope="col">id spp</th>
<th scope="col">Jumlah</th>
</tr>
</thead>
<tbody>
<?php
$query = mysqli_query($koneksi,"SELECT * FROM pembayaran WHERE nisn='$data[nisn]' ORDER BY bulan_dibayar ASC");
while ($data=mysqli_fetch_array($query)) {
echo" <tr>
<td>$data[id_petugas]</td>
<td>$data[nisn]</td>
<td>$data[tgl_bayar]</td>
<td>$data[bulan_dibayar]</td>
<td>$data[tahun_dibayar]</td>
<td>$data[id_spp]</td>
<td>$data[jumlah_bayar]</td>
</tr>";
}
?>
</tbody>
</table>
<?php
}
?>
</div>
</body>
</html>