[ Mini Kiebo ]
Server: Windows NT AKFAR_SERVER 10.0 build 26200 (Windows 10) AMD64
Path:
D:
/
BACKUP C 19-12
/
XAMPP74
/
htdocs
/
smk
/
application
/
views
/
akademik
/
siswa
/
[
Home
]
File: Copy of list_view.php
<!-- Content Header (Page header) --> <section class="content-header"> <h1> Daftar Siswa <small>Pengaturan Siswa</small> </h1> <ol class="breadcrumb"> <li><a href="<?php echo site_url() ?>/"><i class="fa fa-dashboard"></i> Home</a></li> <li class="active">Siswa</li> </ol> </section> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-md-3"> <div class="box"> <div class="box-header with-border"> <div class="box-title">Referensi</div> </div><!-- /.box-header --> <div class="box-body"> <div class="form-group"> <label>Tahun Ajaran</label> <input type="text" class="form-control input-sm" name="info-thnajaran" id="info-thnajaran" value="<?php if(!empty($info_thnajaran)){ echo $info_thnajaran; }else{ echo 'BELUM AKTIF'; } ?>" readonly> </div> <div class="form-group"> <label>Tingkat</label> <select name="info-tingkat" id="info-tingkat" class="form-control input-sm"> <?php if(!empty($info_tingkat)){ echo $info_tingkat; } ?> </select> </div> <div class="form-group"> <label>Kelas</label> <div id="data-kelas"> <select name="info-kelas" id="info-kelas" class="form-control input-sm"> <option value="kosong">KOSONG</option> </select> </div> </div> <div class="form-group"> <label>Keterangan</label> <textarea class="form-control input-sm" rows="3" name="info-keterangan" id="info-keterangan" readonly><?php if(!empty($info_keterangan)){ echo $info_keterangan; }else{ echo ''; } ?></textarea> </div> <div class="box-footer"> <button type="button" id="btn-tampil" class="btn btn-info pull-right">Tampilkan</button> </div> </div> </div> </div> <div class="col-xs-9"> <div class="box"> <div class="box-header with-border"> <div class="box-title">Data Siswa</div> <div class="box-tools pull-right"> <div class="dropdown pull-right"> <a class="dropdown-toggle" data-toggle="dropdown" href="#">Menu <span class="caret"></span></a> <ul class="dropdown-menu"> <li role="presentation"><a role="menuitem" href="<?php echo current_url(); ?>/index/add">Tambah Siswa</a></li> </ul> </div> </div> </div><!-- /.box-header --> <div class="box-body"> <table id="table-siswa" class="table table-bordered table-hover"> <thead> <tr> <th>No.</th> <th>NIS</th> <th>Nama</th> <th>HP</th> <th>Wali</th> <th>HP</th> <th>Action</th> </tr> </thead> <tbody> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </tbody> </table> </div> </div> </div> </div> </section><!-- /.content --> <script lang="javascript"> function refresh_kelas(tingkat){ $("#modal-proses").modal('show'); $.getJSON('<?php echo site_url()?>/akademik/siswa/get_kelas2/'+tingkat+'', function(data){ var $kelas = $('#info-kelas'); $kelas.empty(); $.each(data.data, function(key, val){ $kelas.append('<option value="' + val.id + '">' + val.kelas +'</option>'); }); }); $("#modal-proses").modal('hide'); } function refresh_table(){ $('#table-siswa').dataTable().fnReloadAjax(); } $(function(){ $("#info-kelas").change(function(){ refresh_table(); }); $("#info-tingkat").change(function(){ refresh_kelas($('#info-tingkat').val()); refresh_table(); }); $("#btn-tampil").change(function(){ refresh_table(); }); $( document ).ready(function() { refresh_kelas($('#info-tingkat').val()); $('#table-siswa').DataTable({ "paging": true, "iDisplayLength":10, "bProcessing": false, "bServerSide": true, "searching": true, "aoColumns": [ {"bSearchable": false, "bSortable": false, "sWidth":"20px"}, {"bSearchable": false, "bSortable": false, "sWidth":"50px"}, {"bSearchable": false, "bSortable": false, "sWidth":"150px"}, {"bSearchable": false, "bSortable": false}, {"bSearchable": false, "bSortable": false}, {"bSearchable": false, "bSortable": false}, {"bSearchable": false, "bSortable": false, "sWidth":"30px"}], "sAjaxSource": "<?php echo current_url();?>/get_all_siswa/", "autoWidth": false, "fnServerParams": function ( aoData ) { aoData.push( { "name": "kelas", "value": $('#info-kelas').val()} ); } }); setTimeout(function(){ refresh_table(); }, 1000); }); }); </script>