function saldo($anggota) { $simpanan = simpanan($anggota); $pengambilan = pengambilan($anggota); $saldo = $simpanan - $pengambilan; return $saldo; }
//echo $query; $data = mysql_query($query); function myheader($profil, $judul_H) { echo "<div class='profil'>" . $profil . "\n\t\t</div>\n\t\t<br>\n\t\t<div class='header'>\n\t\t <h2>" . $judul_H . "</h2>\n\t\t </div>\n\t\t<table class='grid' >\n\t\t<tr>\n\t\t\t<th width='5%'>No</th>\n\t\t\t<th >Nomor Anggota</th>\n\t\t\t<th >No Identitas</th>\n\t\t\t<th >Nama Anggota</th>\n\t\t\t<th >L/P</th>\n\t\t\t<th >Tempat, Tanggal Lahir</th>\n\t\t\t<th >Alamat</th>\n\t\t\t<th >HP</th>\n\t\t\t<th >Simpanan</th>\n\t\t\t<th >Pinjaman</th>\n\t\t</tr>"; } //echo $query; function myfooter() { echo "</table>"; } $no = 1; $page = 1; while ($r_data = mysql_fetch_array($data)) { $tgllhr = jin_date_str($r_data['tgl_lahir']); $simpanan = simpanan($r_data['noanggota']); $pinjaman = sisaAngsuran($r_data['noanggota']); if ($no % 40 == 1) { if ($no > 1) { myfooter(); echo "<div class=\"pagebreak\" align='right'>\n\t\t<div class='page' align='center'>Hal - {$page}</div>\n\t\t</div>"; $page++; } myheader($profil, $judul_H); } echo "<tr>\n\t\t\t<td align='center'>{$no}</td>\n\t\t\t<td align='center'>{$r_data['noanggota']}</td>\n\t\t\t<td align='center'>{$r_data['noidentitas']}</td>\n\t\t\t<td align='left'>{$r_data['namaanggota']}</td>\n\t\t\t<td align='center'>{$r_data['jk']}</td>\n\t\t\t<td align='left'>{$r_data['tempat_lahir']}, {$tgllhr}</td>\n\t\t\t<td align='left'>{$r_data['alamat']}</td>\n\t\t\t<td align='left'>{$r_data['hp']}</td>\n\t\t\t<td align='right'>" . number_format($simpanan) . "</td>\n\t\t\t<td align='right'>" . number_format($pinjaman) . "</td>\n\t\t\t</tr>"; $no++; } myfooter(); echo "</table>"; //echo "<div class='akhir' align='right'>