[ Mini Kiebo ]
Server: Windows NT AKFAR_SERVER 10.0 build 26200 (Windows 10) AMD64
Path:
D:
/
xampp
/
htdocs
/
simaku
/
application-old
/
views
/
admin
/
mak
/
[
Home
]
File: aturmak.php
<div class="alert alert-info"><strong>Daftar Mata Anggaran Kegiatan - MAK</strong></div> <?php $no=$hal+1; echo ! empty($h2_title) ? '<div class="alert alert-info">' . $h2_title . '</div>': ''; echo ! empty($message) ? '<p class="message">' . $message . '</p>': ''; $flashmessage = $this->session->flashdata('message'); echo ! empty($flashmessage) ? '<p class="message">' . $flashmessage . '</p>': ''; if ( ! empty($link)){ echo '<p id="bottom_link">'; foreach($link as $links){ echo $links . ' '; } echo '</p>'; } // echo ! empty($pagination) ? '<div class="pagination pagination-centered">' . $pagination. '</div>' : '';?> <table class="table table-bordered table-hover table-condensed" > <thead> <tr> <th>No</th> <th>Kode</th> <th>Keterangan</th> <th>Pengadaan Aset</th> </tr> </thead> <tbody> <?php foreach($query->result() as $row){ if($row->dengan_aset == 1){ $cek = 'checked'; }else{ $cek = ''; } ?> <tr> <td align="center"><?=$no?></td> <td align="center"><?=$row->kodemak1.' '.$row->kodemak2.' '.$row->kodemak3.' '.$row->kodemak4?></td> <td align="left"><?=$row->namamak4?></td> <td> <label> <input type="checkbox" class="mak-checkbox" data-id="<?=$row->idmak4?>" <?=$cek?>> </label> </td> </tr> <?php $no++; }?> </tbody> </table> <script> $(document).ready(function() { $('.mak-checkbox').change(function() { var id = $(this).data('id'); var status = $(this).is(':checked') ? 1 : 0; $.ajax({ url: '<?= base_url("adm_mak/update_status") ?>', type: 'POST', data: {id: id, status: status}, success: function(response) { console.log('Status updated successfully'); }, error: function(xhr, status, error) { console.error('Error updating status:', error); } }); }); }); </script> <?php // echo ! empty($pagination) ? '<div class="pagination pagination-centered">' . $pagination. '</div>' : ''; ?>