[ Mini Kiebo ]
Server: Windows NT AKFAR_SERVER 10.0 build 26200 (Windows 10) AMD64
Path:
D:
/
xampp
/
htdocs
/
smk
/
application
/
views
/
sms
/
presensi_konfigurasi
/
[
Home
]
File: list_view.php
<!-- Content Header (Page header) --> <section class="content-header"> <h1> Format Pesan <small>Pengaturan Format pesan untuk Presensi Harian</small> </h1> <ol class="breadcrumb"> <li><a href="<?php echo site_url() ?>/"><i class="fa fa-dashboard"></i> Home</a></li> <li class="active">Format Pesan</li> </ol> </section> <!-- Main content --> <section class="content"> <div class="row"> <div class="col-xs-12"> <div class="box"> <div class="box-header with-border"> <div class="box-title">Data Format Pesan</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="#" data-toggle="modal" data-target="#modal-help">Bantuan</a></li> </ul> </div> </div> </div><!-- /.box-header --> <div class="box-body"> <table id="table-format" class="table table-bordered table-hover"> <thead> <tr> <th>No.</th> <th>Kode</th> <th>Format Pesan</th> <th>Keterangan</th> <th>Action</th> </tr> </thead> <tbody> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </tbody> </table> </div> </div> </div> </div> </section><!-- /.content --> <div class="modal" id="modal-edit" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="basicModal" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title">Edit Format Pesan</h4> </div> <div class="modal-body"> <span id="form-pesan"></span> <?php echo form_open('sms/presensi_konfigurasi/save','id="form-edit"')?> <div class="box-body"> <div class="form-group"> <label>Kode</label> <input type="text" class="form-control" id="edit-kode" name="edit-kode" readonly> <input type="hidden" id="edit-id" name="edit-id" /> </div> <div class="form-group"> <label>Format</label> <textarea name="edit-format" id="edit-format" class="form-control" ></textarea> </div> <div class="form-group"> <label>Keterangan</label> <input type="text" class="form-control" id="edit-keterangan" name="edit-keterangan" > </div> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> <button type="submit" class="btn btn-primary" id="edit-save">Save</button> <?php echo form_close(); ?> </div> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div><!-- /.modal --> <div class="modal" id="modal-help" data-backdrop="static" tabindex="-1" role="dialog" aria-labelledby="basicModal" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> <h4 class="modal-title">Bantuan</h4> </div> <div class="modal-body"> <div class="box-body"> <p><b>Daftar Kode Format Pesan :</b></p> <table class="table table-striped"> <thead> <tr> <th width="10">No.</th> <th width="80">Kode</th> <th>Fungsi</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>[siswa]</td> <td>Menampilkan Nama Siswa</td> </tr> <tr> <td>2</td> <td>[ortu]</td> <td>Menampilkan Nama Ortu</td> </tr> <tr> <td>3</td> <td>[tanggal]</td> <td>Menampilkan Tanggal Aktif</td> </tr> <tr> <td>3</td> <td>[tglawal]</td> <td>Menampilkan Tanggal Awal Rekap Presensi</td> </tr> <tr> <td>4</td> <td>[tglakhir]</td> <td>Menampilkan Tanggal Akhir Rekap Presensi</td> </tr> <tr> <td>5</td> <td>[hadir]</td> <td>Menampilkan Kehadiran dalam rekap Presensi</td> </tr> <tr> <td>6</td> <td>[sakit]</td> <td>Menampilkan Jumlah Hari Presensi Sakit dalam rekap Presensi</td> </tr> <tr> <td>7</td> <td>[ijin]</td> <td>Menampilkan Jumlah Hari Presensi Ijin dalam rekap Presensi</td> </tr> <tr> <td>8</td> <td>[alpha]</td> <td>Menampilkan Jumlah Hari Presensi Alpha dalam rekap Presensi</td> </tr> </tbody> </table> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div><!-- /.modal --> <script lang="javascript"> function refresh_table(){ $('#table-format').dataTable().fnReloadAjax(); } function edit(id){ $("#modal-proses").modal('show'); $('#form-pesan').html(''); $('#edit-id').val(''); $('#edit-kode').val(''); $('#edit-format').val(''); $('#edit-keterangan').val(''); $.getJSON('<?php echo site_url()?>/sms/presensi_konfigurasi/get_konfigurasi_by_id/'+id, function(data){ $('#edit-id').val(data.id); $('#edit-kode').val(data.kode); $('#edit-format').val(data.kunci1); $('#edit-keterangan').val(data.keterangan); $("#modal-proses").modal('hide'); }); $('#modal-edit').modal('show'); } $(function(){ $('#form-edit').submit(function(){ $("#modal-proses").modal('show'); $.ajax({ url:"<?php echo site_url()?>/sms/presensi_konfigurasi/save", type:"POST", data:$('#form-edit').serialize(), cache: false, success:function(respon){ var obj = $.parseJSON(respon); if(obj.status==1){ $("#modal-proses").modal('hide'); $('#form-pesan').html(pesan_succ(obj.pesan)); setTimeout(function(){ $('#modal-edit').modal('hide'); }, 1500); refresh_table() }else{ $("#modal-proses").modal('hide'); $('#form-pesan').html(pesan_err(obj.pesan)); } } }); return false; }); $('#table-format').DataTable({ "paging": true, "iDisplayLength":10, "bProcessing": false, "bServerSide": true, "searching": false, "aoColumns": [ {"bSearchable": false, "bSortable": false, "sWidth":"20px"}, {"bSearchable": false, "bSortable": false, "sWidth":"100px"}, {"bSearchable": false, "bSortable": false}, {"bSearchable": false, "bSortable": false}, {"bSearchable": false, "bSortable": false, "sWidth":"30px"}], "sAjaxSource": "<?php echo current_url();?>/get_all_konfigurasi_sms/", "autoWidth": false }); }); </script>