[ Mini Kiebo ]
Server: Windows NT DESKTOP-5B8S0D4 6.2 build 9200 (Windows 8 Professional Edition) i586
Path:
D:
/
Backup
/
14082024
/
Data
/
htdocs
/
htdocs
/
tracer
/
application
/
views
/
admin
/
[
Home
]
File: bg_mahasiswa_tampil.php
<table class="table table-striped table-bordered data"> <thead> <tr> <th align="center">No</th> <th align="center">NIM</th> <th align="center">Nama Mahasiswa</th> <th align="center">Angkatan</th> <th align="center">Jurusan</th> <th align="center">Kode Jurusan</th> <th align="center">Kelas</th> <th align="center">Status</th> <th align="center">Edit</th> <th align="center">Hapus</th> </tr> </thead> <tbody> <?php $no=1; ?> <?php $status = ''; $stat = ''; foreach($mahasiswa->result_array() as $d) { if ($d['status']=='') { $stat = '<span class="label label-success arrowed-in arrowed-in-right">AKTIF</span>'; }elseif ($d['status']=='1') { $stat = '<span class="label label-warning arrowed arrowed-right">CUTI</span>'; }elseif ($d['status']=='2') { $stat = '<span class="label label-danger arrowed">NON AKTIF</span>'; }elseif ($d['status']=='3') { $stat = '<span class="label arrowed"><s>KELUAR</s></span>'; }elseif ($d['status']=='4') { $stat = '<span class="label label-info arrowed-right arrowed-in">LULUS</span>'; }elseif ($d['status']=='5') { $stat = '<span class="label arrowed">MENINGGAL</span>'; }elseif ($d['status']=='6') { $stat = '<span class="label label-success arrowed-in arrowed-in-right">Aktif Kembali</span>'; } $status = ''; ?> <tr> <td align="center"><?php echo $no++; ?></td> <td align="center"><?php echo $d['nim']; ?></td> <td align="center"><?php echo $d['nama_mahasiswa']; ?></td> <td align="center"><?php echo $d['angkatan']; ?></td> <td align="center"><?php echo $d['jurusan']; ?></td> <td align="center"><?php echo $d['kelas_program']; ?></td> <td align="center"><?php echo $d['kelas']; ?></td> <td > <a href="#" data-toggle="modal" data-target="#<?php echo $d['nim']; ?>"><?php echo $stat; ?></a> <!-- Modal --> <div class="modal fade" id="<?php echo $d['nim']; ?>" role="dialog"> <div class="modal-dialog"> <script> $(document).ready(function() { $("#waktu.<?php echo $d['nim'];?>").hide(); $("#waktu2.<?php echo $d['nim'];?>").hide(); $("#status.<?php echo $d['nim'];?>").change(function() { var nilai = $("#status.<?php echo $d['nim'];?>").val(); if(nilai==1){ $("#waktu.<?php echo $d['nim'];?>").show(); }else{ $("#waktu.<?php echo $d['nim'];?>").hide(); } if(nilai==6){ $("#waktu2.<?php echo $d['nim'];?>").show(); }else{ $("#waktu2.<?php echo $d['nim'];?>").hide(); } }) }); </script> <form name="sam" method="post" action="<?php echo base_url();?>admin/updateStatus"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">Pilih Status <?php echo $d['nama_mahasiswa']; ?> </h4> </div> <div class="modal-body"> Pilih Status : <select name="status" id="status" class="<?php echo $d['nim'];?>" style="width: 200px; "> <?php foreach ($sta->result() as $val ) { $pilih = ''; if($val->kd_status==$d['status']) $pilih="selected='selected'"; ?> <option value="<?php echo $val->kd_status;?>"<?php echo $pilih;?>><?php echo $val->status;?></option> <?php } ?> </select> <div id="waktu" class="<?php echo $d['nim'];?>"> <h3>Pengajuan Cuti</h3> <table> <tr><td>Dari : <input type="date" name="dari"></td></tr> </table> </div> <div id="waktu2" class="<?php echo $d['nim'];?>"> <h3>Aktif Kembali </h3> <table> <tr><td>Mulai Aktif : <input type="date" name="sampai"></td></tr> <tr><td> </td></tr> </table> </div> </div> </div> <div class="modal-footer"> <input type = "hidden" name = "nim" value = "<?php echo $d['nim'];?>"/> <input class="btn btn-default" type = "submit" name="sam" value ="Save" /> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div> </form> </div> </div> </td> <?php echo '<td align="center" width="60"><a href="'.base_url().'admin/edit_mahasiswa/'.$d['nim'].'" rel="example_group" class="link" style="float:left;"><span class="green"> <i class="ace-icon fa fa-pencil-square-o bigger-120"></i> Edit </span></a> </td> <td align="center" width="60"> <a href="'.base_url().'admin/hapus_mahasiswa/'.$d['nim'].'" onClick=\'return confirm("Anda yakin...??")\' class="link" style="float:left;"><span class="red"> <i class="ace-icon fa fa-trash-o bigger-120"></i> Hapus </span></a>'; ?> </td> </tr> <?php } ?> </tbody> </table> </body> <script type="text/javascript"> $(document).ready(function(){ $('.data').DataTable(); }); </script> </html>