[ Mini Kiebo ]
Server: Windows NT AKFAR_SERVER 10.0 build 26200 (Windows 10) AMD64
Path:
D:
/
xampp
/
htdocs
/
smk
/
application
/
views
/
sms
/
kontak
/
[
Home
]
File: Copy of kontak_view.php
<!-- Content Header (Page header) --> <section class="content-header"> <h1> Daftar Kontak <small>Pengelompokan Kontak untuk keperluan tertentu</small> </h1> <ol class="breadcrumb"> <li><a href="<?php echo site_url() ?>/"><i class="fa fa-dashboard"></i> Home</a></li> <li class="active">Kontak</li> </ol> </section> <!-- Main content --> <section class="content"> <?php echo form_open('sms/kontak/add','id="form-kontak"')?> <div class="row"> <div class="col-md-5"> <div class="box"> <div class="box-header with-border"> <div class="box-title">Daftar Grup</div> <div class="box-tools pull-right"> <a class="dropdown-toggle" data-toggle="dropdown" href="#">Tambah Grup</span></a> </div> </div><!-- /.box-header --> <div class="box-body"> <div id="form-pesan"></div> <table id="table-grup" class="table table-bordered table-hover responsive"> <thead> <tr> <th>No.</th> <th>Grup</th> <th>keterangan</th> <th>Action</th> </tr> </thead> <tbody> <tr> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </tbody> </table> </div> </div> </div> <div class="col-md-7"> <div class="box"> <div class="box-header with-border"> <div class="box-title">Daftar Kontak</div> <div class="box-tools pull-right"> <div class="dropdown pull-right"> <a class="dropdown-toggle" data-toggle="dropdown" href="#">Tambah Kontak <span class="caret"></span></a> <ul class="dropdown-menu"> <li role="presentation"><a role="menuitem" href="<?php echo site_url() ?>/">Dari Guru</a></li> <li role="presentation"><a role="menuitem" href="<?php echo site_url() ?>/">Dari Siswa</a></li> <li role="presentation"><a role="menuitem" href="<?php echo site_url() ?>/">Manual</a></li> </ul> </div> </div> </div><!-- /.box-header --> <div class="box-body"> <div class="row"> <div class="col-sm-12"> <div class="form-group"> <label>GRUP Kontak</label> <select name="siswa-tujuan" id="siswa-tujuan" class="form-control input-sm"> <option value="SISWA">Siswa</option> <option value="ORTU">Orang Tua</option> </select> </div> <hr /> </div> </div> <div class="row"> <div class="col-sm-12"> <table id="table-kontak" class="table table-bordered table-hover responsive"> <thead> <tr> <th>No.</th> <th>NIP</th> <th>Nama</th> <th>HP</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> </div> </div> </form> </section><!-- /.content --> <div class="modal" id="modal-sdm" tabindex="-1" role="dialog" aria-labelledby="basicModal" aria-hidden="true"> <div class="modal-dialog" style="width:800px"> <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">Data SDM</h4> </div> <div class="modal-body"> <table id="table-sdm" class="table table-bordered table-hover responsive"> <thead> <tr> <th>No.</th> <th>NIP</th> <th>Nama</th> <th>HP</th> <th>Action</th> </tr> </thead> <tbody> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </tbody> </table> </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 --> <div class="modal" id="modal-siswa" tabindex="-1" role="dialog" aria-labelledby="basicModal" aria-hidden="true"> <div class="modal-dialog" style="width:800px"> <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">Data Siswa</h4> </div> <div class="modal-body"> <p><b>Info : </b>Klik nomor HP Siswa atau Wali untuk memilih</p> <table id="table-siswa" class="table table-bordered table-hover responsive"> <thead> <tr> <th>No.</th> <th>Kelas</th> <th>Nama</th> <th>HP Siswa</th> <th>HP Wali</th> </tr> </thead> <tbody> <tr> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </tbody> </table> </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 pilihtujuan(pilihan){ $('#pilih').val(pilihan); } function pilihsdm(nama, hp){ $('#table-data').append('<tr><td><input name="lain-hp['+hp+']" type="hidden" value="'+hp+'">'+nama+'</td><td>'+hp+'</td><td><a onClick="$(this).closest(\'tr\').remove();" class="btn btn-default btn-xs">hapus</a></td></tr>'); } function refresh_kelas(tingkat){ $("#modal-proses").modal('show'); $.getJSON('<?php echo site_url()?>/akademik/siswa/get_kelas2/'+tingkat+'', function(data){ var $kelas = $('#siswa-kelas'); $kelas.empty(); $.each(data.data, function(key, val){ $kelas.append('<option value="' + val.id + '">' + val.kelas +'</option>'); }); }); $("#modal-proses").modal('hide'); } $(function(){ $("#siswa-tingkat").change(function(){ refresh_kelas($('#siswa-tingkat').val()); }); $('#form-pengumuman').submit(function(){ $("#modal-proses").modal('show'); $.ajax({ url:"<?php echo site_url()?>/sms/pengumuman/kirim", type:"POST", data:$('#form-pengumuman').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(){ $('#form-pesan').html(''); }, 2000); $('#pengirim').val('SMKNDU'); $('#pesan').val(''); $('#pengirim').focus(); }else{ $("#modal-proses").modal('hide'); $('#form-pesan').html(pesan_err(obj.pesan)); setTimeout(function(){ $('#form-pesan').html(''); }, 10000); } } }); return false; }); $('#table-grup').DataTable({ "paging": true, "iDisplayLength":10, "bProcessing": false, "bServerSide": true, "searching": false, "aoColumns": [ {"bSearchable": false, "bSortable": false, "sWidth":"20px"}, {"bSearchable": false, "bSortable": false}, {"bSearchable": false, "bSortable": false}, {"bSearchable": false, "bSortable": false}, {"bSearchable": false, "bSortable": false, "sWidth":"60px"}], "sAjaxSource": "<?php echo site_url()?>/sms/kontak/get_all_grup/", "autoWidth": false, "aLengthMenu": [[10, 25, 50, 100, 200, 500], [10, 25, 50, 100, 200, 500]] }); $('#table-kontak').DataTable({ "paging": true, "iDisplayLength":25, "bProcessing": false, "bServerSide": true, "searching": true, "aoColumns": [ {"bSearchable": false, "bSortable": false, "sWidth":"20px"}, {"bSearchable": false, "bSortable": false}, {"bSearchable": false, "bSortable": false}, {"bSearchable": false, "bSortable": false}, {"bSearchable": false, "bSortable": false, "sWidth":"60px"}], "sAjaxSource": "<?php echo site_url()?>/sms/kontak/get_all_kontak/", "autoWidth": false, "aLengthMenu": [[10, 25, 50, 100, 200, 500], [10, 25, 50, 100, 200, 500]] }); $('#table-sdm').DataTable({ "paging": true, "iDisplayLength":10, "bProcessing": false, "bServerSide": true, "searching": true, "aoColumns": [ {"bSearchable": false, "bSortable": false, "sWidth":"20px"}, {"bSearchable": false, "bSortable": false}, {"bSearchable": false, "bSortable": false}, {"bSearchable": false, "bSortable": false}, {"bSearchable": false, "bSortable": false, "sWidth":"60px"}], "sAjaxSource": "<?php echo site_url()?>/sdm/pegawai/get_pilihan_sdm/", "autoWidth": false, "aLengthMenu": [[10, 25, 50, 100, 200, 500], [10, 25, 50, 100, 200, 500]] }); $('#table-siswa').DataTable({ "paging": true, "iDisplayLength":10, "bProcessing": false, "bServerSide": true, "searching": true, "aoColumns": [ {"bSearchable": false, "bSortable": false, "sWidth":"20px"}, {"bSearchable": false, "bSortable": false}, {"bSearchable": false, "bSortable": false}, {"bSearchable": false, "bSortable": false}, {"bSearchable": false, "bSortable": false, "sWidth":"60px"}], "sAjaxSource": "<?php echo site_url()?>/akademik/siswa/get_pilihan_siswa/", "autoWidth": false, "aLengthMenu": [[10, 25, 50, 100, 200, 500], [10, 25, 50, 100, 200, 500]] }); $( document ).ready(function() { $('#pengirim').focus(); refresh_kelas($('#siswa-tingkat').val()); $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { var akandibuka = $(e.target).attr("id"); var yanglamadibuka = $(e.relatedTarget).attr("id"); }) }); }); </script>