-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdetail.php
148 lines (129 loc) · 4.71 KB
/
detail.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
<?php
// sesi
session_start();
// import koneksi.php
include 'koneksi.php';
// fungsi pengecekan sesi
if(isset($_SESSION['sesi'])){
// import header.php
include 'header.php';
// mengambil data id
$id = $_GET['id'];
// ambil data tabel pendaftaran
$query = mysqli_query($db, "SELECT * FROM pendaftaran WHERE id='$id'");
$data = mysqli_fetch_array($query);
// fungsi konversi tanggal
function tanggal_indo($tanggal){
$bulan = [ 'bulan',
'Januari',
'Februari',
'Maret',
'April',
'Mei',
'Juni',
'Juli',
'Agustus',
'September',
'Oktober',
'November',
'Desember'
];
// memecah tanggal bulan tahun
$split = explode('-', $tanggal);
return $split[2] . ' ' . $bulan[ (int)$split[1] ] . ' ' . $split[0];
}
?>
<!-- Container -->
<div class="container py-3">
<div class="card">
<!-- Card Header -->
<h3 class="card-header text-center">
Detail Data Siswa
</h3>
<!-- Card Body -->
<div class="card-body o-hidden border-0 shadow-lg ">
<!-- Card Data Siswa -->
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Nama Lengkap</h6>
</div>
<div class="col-sm-9 text-secondary">
<?php echo $data['nama']; ?>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">NISN</h6>
</div>
<div class="col-sm-9 text-secondary">
<?php echo $data['nisn']; ?>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Jenis Kelamin</h6>
</div>
<div class="col-sm-9 text-secondary">
<?php echo $data['jenis_kelamin']; ?>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Tempat / Tanggal Lahir</h6>
</div>
<div class="col-sm-9 text-secondary">
<?php echo $data['tempat_lahir'] . ", " . tanggal_indo($data['tanggal_lahir']); ?>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Asal Sekolah</h6>
</div>
<div class="col-sm-9 text-secondary">
<?php echo $data['asal_sekolah']; ?>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Alamat</h6>
</div>
<div class="col-sm-9 text-secondary">
<?php echo $data['alamat']; ?>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-3">
<h6 class="mb-0">Status Pendaftaran</h6>
</div>
<div class="col-sm-9 text-secondary">
<?php echo $data['status']; ?>
</div>
</div>
<hr>
<div class="row justify-content-center">
<a target="_blank" onclick="window.print()" class="btn btn-primary">Cetak</a>
<a role="button" name="submit" href="proses/proses_diterima.php?id=<?=$data['id'];?>" class="btn mx-2 btn-success">Diterima</a>
<a role="button" name="submit" href="proses/proses_cadangan.php?id=<?=$data['id'];?>" class="btn mx-2 btn-warning">Cadangan</a>
<a role="button" name="submit" href="proses/proses_ditolak.php?id=<?=$data['id'];?>" class="btn mx-2 btn-danger">Tidak Diterima</a>
</div>
</div>
</div>
</div>
</div>
<?php
include 'footer.php';
} else {
echo "<script>
alert('Silahkan Login Terlebih Dahulu!');
window.location = 'login.php';
</script>";
}
?>