Mohon bantuan nya buat master, saya mau sidang tugas akhir sekitar tgl 19 an jadi saya minta penjelasannya untuk menambahkan script berdasarkan user yg login di script menampilkan data tabel berelasi banyak jd hanya baca saja membernya [code=html <?php
include_once 'include/class.php';
include_once 'include/lib.php';
$user = new User();
$angsur = new Angsuran();
$iduser = $_SESSION;
if (!$user->get_sesi())
{
header("location:index.php");
}
$nopim = $_GET;
//ambil data nasabah berdasarkan nomor pinjam
$id_nsb=$angsur->tampilPinjamAngsur('id',$nopim);
?>
<div class="subnav">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/tabdata01.gif" /></td>
<td class="tabsubnav">
<b>DATA<b> » <a href="?page=input_angsuran"> PEMBAYARAN ANGSURAN</a>
</td>
<td><img src="images/tabdata03.gif" /></td>
</tr>
</table>
</div>
<br />
<table class="tabholder" border="0" cellspacing="0" cellpadding="3">
<tr class="tabhead">
<td align="left" width="100" class="tabtxt">No. Pinjaman</td>
<td align="left" width="30" class="tabtxt">:</td>
<td align="left" class="tabtxt"><?php echo $angsur->tampilPinjamAngsur('nopim',$nopim); ?></td>
<td align="left" width="100" class="tabtxt">Nama Nasabah</td>
<td align="left" width="30" class="tabtxt">:</td>
<td align="left" class="tabtxt"><?php echo $angsur->tampilPinjamNasabah('nama',$id_nsb); ?></td>
</tr>
</table>
<br>
<table class="tabholder" border="0" cellspacing="1" cellpadding="0">
<tr class="tabhead">
<td align="center" class="tabtxt">Angsuran </td>
<td align="center" class="tabtxt">Tgl. Bayar Angsuran</td>
<td align="center" class="tabtxt">Tgl. Jatuh Tempo</td>
<td align="center" class="tabtxt">Biaya Angsuran </td>
<td align="center" class="tabtxt">Denda/Hari </td>
<td align="center" class="tabtxt">Kena Denda</td>
<td align="center" class="tabtxt">Total Pembayaran</td>
<td align="center" class="tabtxt">Sisa Angsuran/Kali</td>
</tr>
<?php
//Tampilkan Angsuran yang sudah terbayar per nasabah
$arrayAngNasabah=$angsur->tampilPerNasabah($nopim);
if (count($arrayAngNasabah))
{
foreach($arrayAngNasabah as $data)
{
?>
<tr class="tabcont">
<td class="tabtxt" align="center"><?php echo $data; ?></td>
<td class="tabtxt"><?php echo tgl_eng_to_ind($data);?></td>
<td class="tabtxt"><?php echo tgl_eng_to_ind($data); ?> </td>
<td class="tabtxt"><?php echo format_angka($angsur->tampilPinjamAngsur('angsuran',$nopim)); ?></td>
<td class="tabtxt"><?php echo $data;?></td>
<td class="tabtxt"><?php echo format_angka($data);?></td>
<td class="tabtxt"><?php echo format_angka($angsur->tampilPinjamAngsur('angsuran',$nopim)+$data);?></td>
<td class="tabtxt"><?php echo $angsur->tampilPinjamAngsur('lama',$nopim)-$data;?></td>
</tr>
<?php
}
}?>
</table>]
<?php
include_once 'include/class.php';
include_once 'include/lib.php';
$user = new User();
$angsur = new Angsuran();
$iduser = $_SESSION;
if (!$user->get_sesi())
{
header("location:index.php");
}
$nopim = $_GET;
//ambil data nasabah berdasarkan nomor pinjam
$id_nsb=$angsur->tampilPinjamAngsur('id',$nopim);
?>
<div class="subnav">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/tabdata01.gif" /></td>
<td class="tabsubnav">
<b>DATA<b> » <a href="?page=input_angsuran"> PEMBAYARAN ANGSURAN</a>
</td>
<td><img src="images/tabdata03.gif" /></td>
</tr>
</table>
</div>
<br />
<table class="tabholder" border="0" cellspacing="0" cellpadding="3">
<tr class="tabhead">
<td align="left" width="100" class="tabtxt">No. Pinjaman</td>
<td align="left" width="30" class="tabtxt">:</td>
<td align="left" class="tabtxt"><?php echo $angsur->tampilPinjamAngsur('nopim',$nopim); ?></td>
<td align="left" width="100" class="tabtxt">Nama Nasabah</td>
<td align="left" width="30" class="tabtxt">:</td>
<td align="left" class="tabtxt"><?php echo $angsur->tampilPinjamNasabah('nama',$id_nsb); ?></td>
</tr>
</table>
<br>
<table class="tabholder" border="0" cellspacing="1" cellpadding="0">
<tr class="tabhead">
<td align="center" class="tabtxt">Angsuran </td>
<td align="center" class="tabtxt">Tgl. Bayar Angsuran</td>
<td align="center" class="tabtxt">Tgl. Jatuh Tempo</td>
<td align="center" class="tabtxt">Biaya Angsuran </td>
<td align="center" class="tabtxt">Denda/Hari </td>
<td align="center" class="tabtxt">Kena Denda</td>
<td align="center" class="tabtxt">Total Pembayaran</td>
<td align="center" class="tabtxt">Sisa Angsuran/Kali</td>
</tr>
<?php
//Tampilkan Angsuran yang sudah terbayar per nasabah
$arrayAngNasabah=$angsur->tampilPerNasabah($nopim);
if (count($arrayAngNasabah))
{
foreach($arrayAngNasabah as $data)
{
?>
<tr class="tabcont">
<td class="tabtxt" align="center"><?php echo $data; ?></td>
<td class="tabtxt"><?php echo tgl_eng_to_ind($data);?></td>
<td class="tabtxt"><?php echo tgl_eng_to_ind($data); ?> </td>
<td class="tabtxt"><?php echo format_angka($angsur->tampilPinjamAngsur('angsuran',$nopim)); ?></td>
<td class="tabtxt"><?php echo $data;?></td>
<td class="tabtxt"><?php echo format_angka($data);?></td>
<td class="tabtxt"><?php echo format_angka($angsur->tampilPinjamAngsur('angsuran',$nopim)+$data);?></td>
<td class="tabtxt"><?php echo $angsur->tampilPinjamAngsur('lama',$nopim)-$data;?></td>
</tr>
<?php
}
}?>
</table>
[/code]berikut script menampilkan untuk hak akses admin
Silahkan
login untuk menjawab!
Budi Ono
· Jul 10, 2016
· 0 Suka
· 0 Tidak Suka
Bang gak ada yg mau jawab apa masih liburan