-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtambah_kb_penunjang_lain.php
executable file
·268 lines (249 loc) · 15.6 KB
/
tambah_kb_penunjang_lain.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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
<?php require( realpath( 'header.php' ) ); ?>
<?php
error_reporting( 0 );
require_once './model/database.php';
$id_user = $_SESSION['id_user'];
$query_bk_sks = "SELECT SUM(bk_sks) FROM kb_penunjang_lain_temp WHERE id_user = '$id_user'";
$result = mysqli_query( $conn, $query_bk_sks );
$hasil = $result->fetch_assoc();
$test = implode( $hasil );
$query_kinerja_sks = "SELECT SUM(kinerja_sks) FROM kb_penunjang_lain_temp WHERE id_user = '$id_user'";
$result1 = mysqli_query( $conn, $query_kinerja_sks );
$hasil1 = $result1->fetch_assoc();
$test1 = implode( $hasil1 );
$total = $test + $test1;
$db = new Database();
$q = "SELECT MAX(id_kbpn) as id_kbpn FROM kb_penunjang_lain";
$db->query( $q );
$last_no_kbp = $db->fetch();
?>
<section class="content">
<div class="container-fluid">
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="card">
<div class="header">
<h2>
TAMBAH KINERJA PENUNJANG LAINNYA
</h2>
</div>
<div class="body">
<form action="pages/tambah_kb_penunjang_temp.php" method="POST"
enctype="multipart/form-data">
<input type="hidden" name="id_user" value="<?php echo $id_user ?>">
<input type="hidden" name="id_kbpn"
value="<?php echo count( $last_no_kbp ) > 0 ? $last_no_kbp[0]->id_kbpn + 1 : 0 + 1 ?>">
<div class="row clearfix">
<div class="form-group form-float">
<div class="col-md-4">
<div class="form-group">
<div class="form-line">
<input type="text" id="" name="jenis_kegiatan" class="form-control">
<label class="form-label">JENIS KEGIATAN</label>
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<div class="form-line" style="bottom: 20px">
<label class="">BUKTI PENUGASAN</label><br>
<small class="text-danger">* file harus berbentuk pdf</small>
<input type="file" accept=".pdf" id="" name="file1"
class="form-control">
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<div class="form-line">
<input type="number" id="" name="bk_sks" class="form-control">
<label class="form-label">SKS</label>
</div>
</div>
</div>
</div>
</div>
<div class="row clearfix">
<div class="form-group form-float">
<div class="col-md-4">
<div class="form-group">
<div class="form-line">
<input type="text" id="" name="masa_penugasan" class="form-control">
<label class="form-label">MASA PENUGASAN</label>
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<div class="form-line" style="bottom: 25px">
<label class="">KINERJA BUKTI DOKUMEN</label><br>
<small class="text-danger">* file harus berbentuk pdf</small>
<input type="file" accept=".pdf" name="file" class="form-control">
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<div class="form-line">
<input type="number" id="" name="kinerja_sks" class="form-control">
<label class="form-label">SKS</label>
</div>
</div>
</div>
</div>
</div>
<div class="row clearfix">
<div class="form-group form-float">
<div class="col-md-4">
<div class="form-group">
<div class="form-line">
<label>Rekomendasi</label>
<select class="form-control show-tick" name="rekomendasi">
<option>-- Please Select --</option>
<option value="Lanjutkan">Lanjutkan</option>
<option value="Selesai">Selesai</option>
<option value="Gagal">Gagal</option>
<option value="Lainnya">Lainnya</option>
<option value="Beban lebih">Beban lebih</option>
</select>
</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<button type="submit" name="simpan"
class="btn btn-success m-t-15 waves-effect">SAVE
</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="card">
<div class="header">
<h2>
DATA KINERJA BIDANG PENUNJANG LAINNYA SEMENTARA
</h2>
</div>
<div class="body">
<div class="table-responsive">
<table class="table table-bordered table-striped table-hover js-basic-example dataTable">
<thead>
<tr>
<th hidden="">ID KBPN</th>
<th>JENIS KEGIATAN</th>
<th>BUKTI PENUGASAN</th>
<th>SKS</th>
<th>MASA PENUGASAN</th>
<th>KINERJA SKS</th>
<th>REKOMENDASI</th>
<th>DOKUMEN</th>
</tr>
</thead>
<tbody>
<?php
$id_user = $_SESSION['id_user'];
$db = new Database();
$query = "SELECT * FROM kb_penunjang_lain_temp WHERE id_user = '$id_user'";
$db->query( $query );
$kbp_temp = $db->fetch();
foreach ( $kbp_temp as $key => $kb_penelitian ):
?>
<tr>
<td><?php echo $kb_penelitian->jenis_kegiatan ?></td>
<td>
<a href="files/kb_pendidikan/<?php echo $kb_penelitian->bk_buktipenugasan ?>"
target="_blank"><?php echo $kb_penelitian->bk_buktipenugasan ?></a>
</td>
<td class="text-center"><?php echo $kb_penelitian->bk_sks ?></td>
<td><?php echo $kb_penelitian->masa_penugasan ?></td>
<td class="text-center"><?php echo $kb_penelitian->kinerja_sks ?></td>
<td><?php echo $kb_penelitian->rekomendasi ?></td>
<td><a href="files/kb_pendidikan/<?php echo $kb_penelitian->kb_dokumen ?>"
target="_blank"><?php echo $kb_penelitian->kb_dokumen ?></a></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<form action="pages/simpan_kb_penunjang_lain.php" method="POST">
<input type="hidden" name="id_user" value="<?php echo $id_user ?>">
<div class="row clearfix">
<br>
<div class="">
<div class="col-md-3">
<div class="form-group">
<div class="form-line">
<label>Tahun</label>
<select class="form-control show-tick" name="tahun">
<option>-- Please Select --</option>
<option value="2018/2019">2018/2019</option>
<option value="2019/2020">2019/2020</option>
<option value="2020/2021">2020/2021</option>
<option value="2021/2022">2021/2022</option>
</select>
</div>
</div>
</div>
</div>
<div class="">
<div class="col-md-3">
<div class="form-group">
<div class="form-line">
<label>Semester</label>
<select class="form-control show-tick" name="semester">
<option>-- Please Select --</option>
<option value="1">Ganjil</option>
<option value="2">Genap</option>
</select>
</div>
</div>
</div>
</div>
<div class="">
<div class="col-md-3">
<div class="form-group">
<div class="form-line">
<label>Nomor KBPN</label>
<input readonly type="text" class="form-control" name="nomor_kbpn"
value="<?php echo count( $last_no_kbp ) > 0 ? $last_no_kbp[0]->id_kbpn + 1 : 0 + 1 ?>">
</div>
</div>
</div>
</div>
<div class="">
<div class="col-md-3">
<div class="form-group">
<div class="form-line">
<label>Total SKS</label>
<input type="text" id="" name="" class="form-control"
value="<?php echo $total ?>" disabled>
</div>
</div>
</div>
</div>
<div class="">
<div class="col-md-3">
<div class="form-group">
<button type="submit" name="simpan"
class="btn btn-success m-t-15 waves-effect" style="top: 15px">
SAVE
</button>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</section>
<?php require( realpath( 'footer.php' ) ); ?>