<script>
function transfer(id){
var url = '<?= site_url('site/transfer')?>/'+id;
document.location = url ;
}
function hapus(id){
//alert(id)
var idx = id;
var r = confirm('anda yakin hapus data');
if(r==true){
var url = '<?=site_url('site/delete')?>/'+idx;
//alert(url);
document.location = url;
}else{
alert('batal hapus');
}
}
function edit(id){
var idx = id;
var url = '<?= site_url('site/edit');?>/'+idx;
alert(url);
document.location = url ;
}
</script>
<table>
<tr>
<td>No</td>
<td>Nama</td>
<td>Alamat</td>
<td>Gaji Utama</td>
<td>Gaji Utama test</td>
<td>Gol</td>
<td>Aksi</td>
</tr>
<?php
$no=1;
foreach ($row as $result) :
?>
<tr>
<td><?= $no.'.' ?></td>
<td><?= $result['nama_kar'] ?></td>
<td><?= $result['alamat_kar'] ?></td>
<td><?= $result['gaji_utama'] ?></td>
<td><?= 'Rp.'.number_format($result['gaji_utama'], 0, ", ", "." ); ?></td>
<td><?= $result['gol_kar'] ?></td>
<td><a href="#" title="hapus" onclick="hapus(<?=$result['kary_id']?>)">hapus</a> |
<a href="#" title="edit" onclick="edit(<?=$result['kary_id']?>)">edit</a> |
<a href="#" title="transfer" onclick="transfer(<?=$result['kary_id']?>)">transfer</a>
</td>
</tr>
<?php
$no++;
endforeach;
?>
</table>
Langganan:
Posting Komentar (Atom)
0 Response to "view content vSite"
Posting Komentar