Server : Apache/2.4.18 (Ubuntu) System : Linux canvaswebdesign 3.13.0-71-generic #114-Ubuntu SMP Tue Dec 1 02:34:22 UTC 2015 x86_64 User : oppastar ( 1041) PHP Version : 7.0.33-0ubuntu0.16.04.15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Directory : /var/www/blue-sky.co.id/public_html/application/views/admin/other_businesses/ |
Upload File : |
<div class="row"> <div class="col-sm-6"> <p><a href="<?= base_url('admin/dashboard'); ?>"><i class="fa fa-arrow-left" aria-hidden="true"></i> Kembali ke beranda</a></p> <h2>Other Businesses</h2> <?= $this->session->flashdata('success'); //to display success message ?> <?= $this->session->flashdata('result'); //to display result message ?> </div> </div> <div class="row" style="display: none;"> <div class="col-sm-12"> <p><?= anchor('admin/other_businesses/add', '<i class="fa fa-plus" aria-hidden="true"></i> <strong>Buat Other Business baru</strong>', array('class' => 'btn btn-primary')); ?></p> </div> </div> <div class="row"> <div class="col-sm-12"> <div class="table-responsive"> <?= form_open(base_url('admin/other_businesses/delete_all'),array('id'=>'frm_delete_all')); ?> <table class="table table-striped"> <thead> <tr> <!-- <th style="text-align: center;"> <button type="submit" id="delall_slc_checkbox" style="background: transparent;border: none;font-size: 23px;cursor: pointer;"> <i class="fa fa fa-trash-o"></i> </button> <input id="slcall_checkbox" type="checkbox"> </th> --> <th>Nama Business</th> <th>Edit</th> <!-- <th>Hapus</th> --> </tr> </thead> <tbody> <?php foreach ($other_businesses as $key): ?> <tr> <!-- <td style="text-align: center;"> <input class="checkbox_for_del" name="checkbox_for_del[]" value="<?= $key->id; ?>" type="checkbox"> </td> --> <td> <?= $key->name; ?> </td> <td> <?= bt_edit('admin/other_businesses/edit/' . $key->id); ?> </td> <!-- <td> <?= bt_delete('admin/other_businesses/delete/' . $key->id); ?> </td> --> </tr> <?php endforeach; ?> </tbody> </table> <?= form_close(); ?> </div> </div><!-- end class="col-sm-12" --> </div> <!-- end row --> <div class="row"> <div class="col-sm-12"> <?php //create pagination... echo '<p style="text-align:center;">' . $this->pagination->create_links() . '</p>'; ?> </div><!-- end class="col-sm-12" --> </div> <!-- end row --> <script> jQuery(document).ready(function($){ $("form#frm_delete_all").submit(function(ev){ ev.preventDefault(); var csrfHash = '<?= $this->security->get_csrf_hash(); ?>'; if(confirm('Are you sure?')==true){ var input_check = $( "input[type='checkbox'].checkbox_for_del:checked" ); var checkbox_del = [[]]; $.each(input_check,function(idx,key){ checkbox_del[idx]=$(this).val(); }); $.ajax({ 'url' : "<?= base_url('admin/other_businesses/delete_all'); ?>", 'type' : 'POST', 'dataType' :'json', 'data' : { 'checkbox_del' : checkbox_del, 'csrftestname' : csrfHash }, 'success' : function(res) { // console.log(res); if (res.result == 'sukses') { window.location.href="<?= base_url('admin/other_businesses'); ?>"; } } }); } }); $("input#slcall_checkbox").click(function(){ var input_check = $( "input[type='checkbox'].checkbox_for_del" ); if($(this).is(':checked')){ input_check.prop('checked',false); input_check.prop('checked',true); }else{ input_check.prop('checked',false); } }); }); function exchangeStatusAct(earlyStat,this_id){ var toStat = ''; var csrfHash = '<?= $this->security->get_csrf_hash(); ?>'; if (earlyStat == 'ya') { toStat = 'Ya'; }else{ toStat = 'Tidak'; } // $.ajax({ // 'url' : "<?= base_url('admin/home_content/body_rooms/changeStatusAct'); ?>", // 'type' : 'POST', // 'dataType' :'json', // 'data' : { // 'this_id' : this_id, // 'toStat' : toStat, // 'csrftestname' : csrfHash // }, // 'success' : function(res) { // if (res.res == 'sukses') { // // alert('Successfully'); // location.reload(); // } // } // }); } function refreshDisplayPriority(){ if (confirm("Are you sure?")==true) { var inp_change_priority = jQuery("input.inp_change_priority"); var csrfHash = '<?= $this->security->get_csrf_hash(); ?>'; var data = [[]]; jQuery.each(inp_change_priority,function(idx,key){ data[idx] = { id : jQuery(this).data('id'), val : jQuery(this).val(), }; }); // $.ajax({ // 'url' : "<?= base_url('admin/home_content/body_rooms/refreshDisplayPriority'); ?>", // 'type' : 'POST', // 'dataType' :'json', // 'data' : { // 'this_data' : data, // 'csrftestname' : csrfHash // }, // 'success' : function(res) { // if (res.res == 'sukses') { // // console.log(res.data); // // alert('Successfully'); // location.reload(); // } // } // }); } } </script>