[ Mini Kiebo ]
Server: Windows NT AKFAR_SERVER 10.0 build 26200 (Windows 10) AMD64
Path:
D:
/
xampp
/
htdocs
/
simaku
/
application-old
/
views
/
admin
/
rek
/
[
Home
]
File: rek5_.php
<div id="main"> <div id="tengah"> <span class="judulkategori">Daftar Kode Rekening - Chart of Account (COA)</span><br> <?php $no=$hal+1; echo ! empty($message) ? '<p class="message">' . $message . '</p>': ''; echo ! empty($h2_title) ? '<h2>' . $h2_title . '</h2>': ''; $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) ? '<p id="pagination">' . $pagination. '</p>' : '';?> <table style="border: 1pt ridge #DDDDDD;" bgcolor="#EEFAFF" cellpadding="4" cellspacing="1" class="widget"> <thead> <tr> <th>Kode</th> <th>Keterangan</th> <th>Dengan Pembatasan</th> <th>Action</th> </tr> </thead> <tbody> <?php foreach($query->result() as $row) { if(($no%2)==0){ $warna='#B3E8FF'; } else{ $warna='#D6F3FF'; } if($row->is_pembatasan == 1){ $cek = 'checked'; }else{ $cek = ''; } ?> <tr bgcolor="<?=$warna?>"> <td align="center"><?=$row->koderek5?></td> <td align="left"><?=anchor('adm_rek/rek6_/'.$row->idrek5,$row->namarek5)?></td> <td> <label><input type="checkbox" class="mak-checkbox" data-id="<?=$row->idrek5?>" <?=$cek?>></label></td> <td align="center"><?=anchor('adm_rek/updaterek5/'.$row->idrek5,'update',array('class' => 'update')).' | '. anchor('adm_rek/deleterek5/'.$row->idrek5,'hapus',array('class'=> 'delete','onclick'=>"return confirm('Anda yakin akan menghapus data ini?')"))?></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_rek/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> <br></div> </br></br> </div> </div>