if (!isset($_SESSION)) { session_start(); } include "../../inc/inc_koneksi.php"; include "../../inc/fungsi_tanggal.php"; $table = "anggota"; date_default_timezone_set("Asia/Jakarta"); $petugas = $_SESSION['namauser']; $skrng = date('Y-m-d H:i:s'); $no = $_POST['no']; $id = mysql_real_escape_string($_POST['id']); $nama = mysql_real_escape_string($_POST['nama']); $jk = $_POST['jk']; $tempat = mysql_real_escape_string($_POST['tempat']); $tgl = jin_date_sql($_POST['tgl']); $alamat = mysql_real_escape_string($_POST['alamat']); $rt = $_POST['rt']; $rw = $_POST['rw']; $hp = $_POST['hp']; $agama = $_POST['agama']; $perusahaan = $_POST['perusahaan']; $pwd = md5('123445'); $sql = mysql_query("SELECT *\n\t\t\t\t FROM {$table}\n\t\t\t\t WHERE noanggota= '{$no}'"); $row = mysql_num_rows($sql); if ($row > 0) { $input = "UPDATE {$table} SET noidentitas='{$id}',\n\t\t\t\t\t\t\t\tnamaanggota='{$nama}',\n\t\t\t\t\t\t\t\tjk='{$jk}',\n\t\t\t\t\t\t\t\ttempat_lahir='{$tempat}',\n\t\t\t\t\t\t\t\ttgl_lahir='{$tgl}',\n\t\t\t\t\t\t\t\talamat='{$alamat}',\n\t\t\t\t\t\t\t\trt='{$rt}',\n\t\t\t\t\t\t\t\trw='{$rw}',\n\t\t\t\t\t\t\t\thp='{$hp}',\n\t\t\t\t\t\t\t\tagama='{$agama}',\n\t\t\t\t\t\t\t\tperusahaan='{$perusahaan}'\n\t\t\t\t\tWHERE noanggota= '{$no}'"; mysql_query($input); echo "<b>Data sukses diubah</b>"; } else { $input = "INSERT INTO {$table} (noanggota,noidentitas,namaanggota,jk,tempat_lahir,tgl_lahir,alamat,rt,rw,hp,agama,perusahaan,tgl_join,petugas,pwd)\n\t\t\t\tVALUES('{$no}','{$id}','{$nama}','{$jk}','{$tempat}','{$tgl}','{$alamat}','{$rt}','{$rw}','{$hp}','{$agama}','{$perusahaan}','{$skrng}','{$petugas}','{$pwd}')";
<script type="text/javascript"> $(function() { $("#theTable.dua tr:even").addClass("stripe1"); $("#theTable.dua tr:odd").addClass("stripe2"); $("#theTable.dua tr").hover( function() { $(this).toggleClass("highlight"); }, function() { $(this).toggleClass("highlight"); } ); }); </script> <?php include '../../inc/inc.koneksi.php'; include '../../inc/fungsi_tanggal.php'; $tgl1 = jin_date_sql($_POST['tgl1']); $tgl2 = jin_date_sql($_POST['tgl2']); $where = " WHERE tgl BETWEEN '{$tgl1}' AND '{$tgl2}'"; echo "<table id='theTable' class='dua' width='100%'>\r\n\t\t<tr>\r\n\t\t\t<th width='5%'>No</th>\r\n\t\t\t<th>Tanggal</th>\r\n\t\t\t<th>No Anggota</th>\r\n\t\t\t<th>Anggota</th>\r\n\t\t\t<th>L/P</th>\r\n\t\t\t<th>Simpanan</th>\r\n\t\t\t<th>Jumlah</th>\r\n\t\t</tr>"; $sql = "SELECT a.*,b.jenis_simpanan,c.namaanggota,c.jk\r\n\t\t\t\tFROM pengambilan as a\r\n\t\t\t\tJOIN jenis_simpanan as b\r\n\t\t\t\tJOIN nasabah as c\r\n\t\t\t\tON a.id_jenis=b.id_jenis AND a.noanggota=c.noanggota\r\n\t\t\t\t{$where}\r\n\t\t\t\tORDER BY a.id_ambil DESC"; $query = mysql_query($sql); $no = 1; while ($rows = mysql_fetch_array($query)) { echo "<tr>\r\n\t\t\t\t<td align='center'>{$no}</td>\r\n\t\t\t\t<td align='center'>" . jin_date_str($rows['tgl']) . "</td>\r\n\t\t\t\t<td align='center'>" . $rows['noanggota'] . "</td>\r\n\t\t\t\t<td>" . $rows['namaanggota'] . "</td>\r\n\t\t\t\t<td>" . $rows['jk'] . "</td>\r\n\t\t\t\t<td>" . $rows['jenis_simpanan'] . "</td>\r\n\t\t\t\t<td align='right'>" . number_format($rows['jumlah']) . "</td>\r\n\t\t\t</tr>"; $no++; } echo "</table>";
<?php session_start(); include "../../inc/inc.koneksi.php"; include "../../inc/fungsi_tanggal.php"; $table = "pengambilan"; $tgl = jin_date_sql($_POST[tgl]); $no = $_POST[no]; $jenis = $_POST[jenis]; $jml = $_POST[jml]; $userid = $_SESSION[namauser]; $input = "INSERT INTO {$table} (tgl,noanggota,id_jenis,jumlah,user_id,tglinsert)\r\n\t\t\tVALUES('{$tgl}','{$no}','{$jenis}','{$jml}','{$userid}',now())"; mysql_query($input); echo "<b>Data sukses disimpan</b>";
<?php session_start(); include "../../inc/inc.koneksi.php"; include "../../inc/fungsi_tanggal.php"; $table = "penggajian"; $tanggal = jin_date_sql($_POST['tanggal']); $jumlah = $_POST['jumlah']; $userid = $_SESSION['namauser']; $input = "INSERT INTO {$table} (id_user, tanggal, jumlah)\r\n\t\t\tVALUES('{$userid}', '{$tanggal}', '{$jumlah}')"; mysql_query($input); echo "<b>Data sukses disimpan</b>";
if (pilih){ $.ajax({ type: 'POST', url: 'modul/penarikan/hapus.php', data: 'id=' + id, success: function(data){ $('#tampil_data1').load('modul/penarikan/tampil_data1.php?cari='+cari); } }); } } </script> <?php //tampil_data1.php include '../../inc/inc_koneksi.php'; include '../../inc/fungsi_tanggal.php'; $cari = $_GET['cari']; $where = " WHERE noanggota='{$cari}'"; echo "<table id='theTable' width='100%'>\n\t<tr>\n\t\t<th width='5%'>No</th>\n\t\t<th>Tanggal</th>\n\t\t<th>Penarikan</th>\n\t\t<th>Jumlah</th>\n\t\t<th>Hapus</th>\n\t</tr>"; $sql = "SELECT a.*,b.jenis_simpanan FROM pengambilan as a JOIN jenis_simpan as b \n\t\t\t\tON a.id_jenis=b.id_jenis {$where} ORDER BY a.id_ambil DESC"; $query = mysql_query($sql); $no = 1; $gtotal = 0; while ($rows = mysql_fetch_array($query)) { echo "<tr>\n\t\t\t<td align='center'>{$no}</td>\n\t\t\t<td align='center'>" . jin_date_sql($rows['tgl']) . "</td>\n\t\t\t<td>" . $rows['jenis_simpanan'] . "</td>\n\t\t\t<td align='right'>" . number_format($rows['jumlah']) . "</td>\n\t\t\t<td align='center'>\n\t\t\t<a href='javascript:deleteRow(\"" . $rows['id_ambil'] . "\")'>Hapus</a>\n\t\t\t</td>\n\t\t</tr>"; $no++; $gtotal += $rows['jumlah']; } echo "\n\t<tr>\n\t\t<td colspan='3' align='center'>Total</td>\n\t\t<td align='right'><b>" . number_format($gtotal) . "</b></td>\n\t</tr>\n</table>";
</script> <?php //tampil_data1.php include '../../inc/inc_koneksi.php'; include '../../inc/fungsi_tanggal.php'; include '../../inc/fungsi_koperasi.php'; if (isset($_POST['tgl1']) && isset($_POST['tgl2'])) { $tgl1 = date('Y-m-d', strtotime($_POST['tgl1'])); $tgl2 = date('Y-m-d', strtotime($_POST['tgl2'])); $where = " WHERE tgl BETWEEN '{$tgl1}' AND '{$tgl2}'"; } else { $where = ""; } echo "<table id='theTable' width='100%'>\n\t<tr>\n\t\t<th width='5%'>No</th>\n\t\t<th>Nomor</th> \n\t\t<th>Tanggal</th>\n\t\t<th>No. Anggota</th>\n\t\t<th>Nama</th>\n\t\t<th>L/P</th>\n\t\t<th>Lama</th>\n\t\t<th>Jumlah</th>\n\t\t<th>Bunga</th>\n\t\t<th>Jumlah Bayar</th>\n\t\t<th>Jumlah Cicilan</th>\n\t\t<th>Sisa</th>\n\t\t<th>Hapus</th>\n\t\t<th>Cetak</th>\n\t</tr>"; $sql = "SELECT a.*,b.namaanggota,b.jk FROM pinjaman_header as a\n\t\t\tJOIN anggota as b\n\t\t\tON a.noanggota=b.noanggota\n\t\t\t{$where}\n\t\t\tORDER BY a.id_pinjam DESC"; $query = mysql_query($sql); $no = 1; $gtotal = 0; while ($rows = mysql_fetch_array($query)) { $jml_bayar = jmlBayar($rows['id_pinjam']); //yg harus dibayar (tagihan) $jml_cicilan = cicilan($rows['id_pinjam']); //yg sudah dibayar $sisa = $jml_bayar - $jml_cicilan; echo "<tr>\n\t\t\t<td align='center'>{$no}</td>\n\t\t\t<td>" . $rows['id_pinjam'] . "</td>\n\t\t\t<td align='center'>" . jin_date_sql($rows['tgl']) . "</td>\n\t\t\t<td align='center'>" . $rows['noanggota'] . "</td>\n\t\t\t<td>" . $rows['namaanggota'] . "</td>\n\t\t\t<td align='center'>" . $rows['jk'] . "</td>\n\t\t\t<td align='center'>" . $rows['lama'] . "</td>\n\t\t\t<td align='center'>" . number_format($rows['jumlah']) . "</td>\n\t\t\t<td align='center'>" . $rows['bunga'] . "</td>\n\t\t\t<td align='center'>" . number_format($jml_bayar) . "</td>\n\t\t\t<td align='center'>" . number_format($jml_cicilan) . "</td>\n\t\t\t<td align='center'>" . number_format($sisa) . "</td> \n\t\t\t<td align='center'>\n\t\t\t<a href='javascript:deleteRow(\"" . $rows['id_pinjam'] . "\")'>Hapus</a>\n\t\t\t</td>\n\t\t\t<td align='center'>\n\t\t\t<a href='javascript:cetakRow(\"" . $rows['id_pinjam'] . "\")'>Cetak</a>\n\t\t\t</td>\n\t\t</tr>"; $no++; $gtotal += $rows['jumlah']; } echo "\n\t<tr>\n\t\t<td colspan='7' align='center'>Total</td>\n\t\t<td align='right'><b>" . number_format($gtotal) . "</b></td>\n\t</tr>\n</table>";
<?php //cari_anggota include '../../inc/inc_koneksi.php'; include '../../inc/fungsi_tanggal.php'; include '../../inc/fungsi_koperasi.php'; $table = 'anggota'; $id = $_POST['cari']; $q = "SELECT * FROM {$table} WHERE noanggota='{$id}'"; $sql = mysql_query($q); $row = mysql_num_rows($sql); if ($row > 0) { $r = mysql_fetch_array($sql); if ($r['jk'] == 'L') { $sex = 'Laki-laki'; } else { $sex = 'Perempuan'; } $sisaangsuran = sisaAngsuran($r['noanggota']); echo "<table>\n\t\t<tr>\n\t\t\t<td>No Identitas</td>\n\t\t\t<td>: {$r['noidentitas']}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>Nama</td>\n\t\t\t<td>: {$r['namaanggota']}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>Jenis Kelamin</td>\n\t\t\t<td>: {$sex}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>Tempat, Tgl Lahir</td>\n\t\t\t<td>: " . $r['tempat_lahir'] . ", " . jin_date_sql($r['tgl_lahir']) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>Alamat</td>\n\t\t\t<td>: " . $r['alamat'] . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>Sisa Angsuran</td>\n\t\t\t<td>: " . number_format($sisaangsuran) . "</td>\n\t\t</tr>\n\t</table>"; }
<?php //cari_anggota include '../../inc/inc_koneksi.php'; include '../../inc/fungsi_tanggal.php'; $table = 'anggota'; $id = $_POST['cari']; $q = "SELECT * FROM {$table} WHERE noanggota='{$id}'"; $sql = mysql_query($q); $row = mysql_num_rows($sql); if ($row > 0) { $r = mysql_fetch_array($sql); if ($r['jk'] == 'L') { $sex = 'Laki-laki'; } else { $sex = 'Perempuan'; } echo "<table>\n\t\t<tr>\n\t\t\t<td>Nama</td>\n\t\t\t<td>: {$r['namaanggota']}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>Jenis Kelamin</td>\n\t\t\t<td>: {$sex}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>Tempat, Tgl Lahir</td>\n\t\t\t<td>: " . $r['tempat_lahir'] . ", " . jin_date_sql($r['tgl_lahir']) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td>Alamat</td>\n\t\t\t<td>: " . $r['alamat'] . "</td>\n\t\t</tr>\n\t</table>"; }
function(){ $(this).toggleClass('highlight'); }, function(){ $(this).toggleClass('highlight'); } ); }); </script> <?php //tampil_data2 include '../../inc/inc_koneksi.php'; include '../../inc/fungsi_tanggal.php'; if (isset($_POST['tgl1']) && isset($_POST['tgl2'])) { $tgl1 = date('Y-m-d', strtotime($_POST['tgl1'])); //formatnya masih dd-mm-yyyy -> yyyy-mm-dd $tgl2 = date('Y-m-d', strtotime($_POST['tgl2'])); //formatnya masih dd-mm-yyyy -> yyyy-mm-dd $where = " WHERE tgl BETWEEN '{$tgl1}' AND '{$tgl2}'"; } else { $where = ""; } echo "<table id='theTable' width='100%'>\n\t<tr>\n\t\t<th width='5%'>No</th>\n\t\t<th>Tanggal</th>\n\t\t<th>No Anggota</th>\n\t\t<th>Anggota</th>\n\t\t<th>L/P</th>\n\t\t<th>Simpanan</th>\n\t\t<th>Jumlah</th> \n\t</tr>"; $sql = "SELECT a.*,b.jenis_simpanan,c.namaanggota,c.jk \n\t\t\t\tFROM simpanan as a \n\t\t\t\tJOIN jenis_simpan as b\n\t\t\t\tJOIN anggota as c \n\n\t\t\t\tON a.id_jenis=b.id_jenis AND a.noanggota=c.noanggota\n\t\t\t\t {$where} ORDER BY a.id_simpanan DESC"; $query = mysql_query($sql); $no = 1; while ($rows = mysql_fetch_array($query)) { echo "<tr>\n\t\t\t<td align='center'>{$no}</td>\n\t\t\t<td align='center'>" . jin_date_sql($rows['tgl']) . "</td>\n\t\t\t<td align='center'>" . $rows['noanggota'] . "</td>\n\t\t\t<td>" . $rows['namaanggota'] . "</td>\n\t\t\t<td align='center'>" . $rows['jk'] . "</td>\n\t\t\t<td>" . $rows['jenis_simpanan'] . "</td>\n\t\t\t<td align='right'>" . number_format($rows['jumlah']) . "</td>\n\t\t</tr>"; $no++; } echo "</table>";
showType: 'show' }); } } </script> <?php include '../../inc/inc_koneksi.php'; include '../../inc/fungsi_tanggal.php'; $cari = $_GET['cari']; $where = " WHERE id_pinjam='{$cari}'"; echo "<div align='center'>\n\t<button class='ui-state-default ui-corner-all' id='simpan'>\n\t\t<span class='ui-icon ui-icon-disk'></span>Simpan\n\t</button>\n\t<button class='ui-state-default ui-corner-all' id='cetak'>\n\t\t<span class='ui-icon ui-icon-print'></span>Cetak\n\t</button>\n\t<button class='ui-state-default ui-corner-all' id='tutup'>\n\t\t<span class='ui-icon ui-icon-close'></span>Tutup\n\t</button>\n</div>"; echo "<table id='theTable' width='100%'>\n\t<tr>\n\t\t<th width='5%'>No</th>\n\t\t<th>Cicilan ke</th>\n\t\t<th>Tanggal <br> Jatuh Tempo</th>\n\t\t<th>Angsuran</th>\n\t\t<th>Bunga</th>\n\t\t<th>Total</th>\n\t\t<th>Tanggal Bayar</th>\n\t\t<th>Jumlah Bayar</th>\n\t</tr>"; $sql = "SELECT * FROM pinjaman_detail {$where} ORDER BY id_pinjam,cicilan"; $query = mysql_query($sql); $no = 1; $gtotal = 0; $gtotal_b = 0; while ($rows = mysql_fetch_array($query)) { $tanggal = jin_date_sql($rows['tgl_bayar']); $jatuhtempo = jin_date_sql($rows['tgl_jatuh_tempo']); $jumlah = $rows['angsuran'] + $rows['bunga']; $jml_bayar = $rows['jumlah_bayar']; echo "<tr>\n\t\t\t<td align='center'>{$no}</td>\n\t\t\t<td align='center'>" . $rows['cicilan'] . "</td>\n\t\t\t<td align='center'>{$jatuhtempo}</td>\n\t\t\t<td align='right'>" . number_format($rows['angsuran']) . "</td>\n\t\t\t<td align='right'>" . number_format($rows['bunga']) . "</td>\n\t\t\t<td align='right'>" . number_format($jumlah) . "</td>\n\t\t\t<td align='center'><input type='text' id='tanggal{$no}' value='{$tanggal}' class='tgl' size='10' /></td>\n\t\t\t<td align='center'><input type='text' id='jml{$no}' value='{$jml_bayar}' class='tgl' size='11' /></td>\n\t\t</tr>"; $no++; $gtotal += $jumlah; $gtotal_b += $jml_bayar; } $sisa = $gtotal - $gtotal_b; echo "<tr>\n\t\t<td colspan='4' align='center'>Total</td>\n\t\t<td align='right'><b>" . number_format($gtotal) . "</b></td>\n\t\t<td align='center'></td>\n\t\t<td align='center'></td>\n\t\t<td align='right'><b>" . number_format($gtotal_b) . "</b></td>\n\t</tr>\n\t<tr>\n\t\t<td colspan='4' align='center'>Sisa Angsuran</td>\n\t\t<td align='right'><b>" . number_format($sisa) . "</b></td> \n\t</tr>"; echo "</table>";
<?php include '../../inc/inc_koneksi.php'; include '../../inc/fungsi_tanggal.php'; $table = 'pinjaman_header'; $id = $_POST['cari']; $q = "SELECT * FROM {$table} WHERE id_pinjam='{$id}'"; $sql = mysql_query($q); $row = mysql_num_rows($sql); if ($row > 0) { while ($r = mysql_fetch_array($sql)) { $data['nomor'] = $r['noanggota']; $data['tgl'] = jin_date_sql($r['tgl']); $data['lama'] = $r['lama']; $data['jml'] = number_format($r['jumlah']); $data['bunga'] = $r['bunga']; echo json_encode($data); } } else { $data['nomor'] = ''; $data['tgl'] = ''; $data['lama'] = ''; $data['jml'] = ''; $data['bunga'] = ''; echo json_encode($data); }
button { margin: 2px; position: relative; padding: 4px 8px 4px 4px; cursor: pointer; list-style: none; } button span.ui-icon{ float: left; margin: 0 4px; } </style> <?php if (!isset($_SESSION)) { session_start(); } function jin_date_sql($date) { $exp = explode('-', $date); // pisah YYYY-MM-DD bertdarkan - if (count($exp) == 3) { $date = $exp[2] . '-' . $exp[1] . '-' . $exp[0]; } return $date; } $userid = $_SESSION['namauser']; $query = mysql_query("SELECT * FROM users WHERE user_id='{$userid}'"); $r = mysql_fetch_array($query); $tgl = jin_date_sql($r['tgl_lahir']); echo "<div id='dalam_content'>\n\t\t<div id='p' class='easyui-panel' title='Edit Profil' style='float:left;width:auto;padding:5px;margin-bottom:10px;'>\n\t\t\t<form name='form' method='post' action='modul/edit_profil/simpan.php' enctype='multipart/form-data'>\n\t\t\t\t<table width='100%'>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width='15%'>Nama Anggota</td>\n\t\t\t\t\t\t<td width='2%'>:</td>\n\t\t\t\t\t\t<td><input type='text' name='nama_anggota' id='nama_anggota' size='50' maxlength='50' class='input' value='" . $r['namalengkap'] . "' /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>TEMPAT LAHIR</td>\n\t\t\t\t\t\t<td width='2%'>:</td>\n\t\t\t\t\t\t<td><input type='text' name='tempat' id='tempat' size'15' maxlength='35' class='input' value='" . $r['tempat_lahir'] . "' /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>TANGGAL LAHIR</td>\n\t\t\t\t\t\t<td width='2%'>:</td>\n\t\t\t\t\t\t<td><input type='text' name='tgl' id='tgl' size'15' maxlength='35' class='input' value='" . $tgl . "' /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td width='15%'>Foto</td>\n\t\t\t\t\t\t<td width='2%'>:</td>\n\t\t\t\t\t\t<td><input type='file' name='fupload' size='20' /></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td colspan='3' align='center'>\n\t\t\t\t\t\t\t<button type='submit' class='ui-state-default ui-corner-all' id='simpan'>\n\t\t\t\t\t\t\t\t<span class='ui-icon ui-icon-disk'></span>Simpan\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t</table>\n\t\t\t</form>\n\t\t</div>\n</div>";
<?php include "../../inc/inc_koneksi.php"; include "../../inc/fungsi_tanggal.php"; $table = 'users'; $id = $_POST['id']; $text = "SELECT *\n\t\t\tFROM {$table} WHERE user_id= '{$id}'"; $sql = mysql_query($text); $row = mysql_num_rows($sql); if ($row > 0) { while ($r = mysql_fetch_array($sql)) { $data['namalengkap'] = $r['namalengkap']; $data['tempat'] = $r['tempat_lahir']; $data['tgl'] = jin_date_sql($r['tgl_lahir']); $data['level'] = $r['level']; echo json_encode($data); } } else { $data['namalengkap'] = ''; $data['tempat_lahir'] = ''; $data['tgl_lahir'] = ''; $data['level'] = ''; echo json_encode($data); }
<?php include "../../inc/inc_koneksi.php"; include "../../inc/fungsi_tanggal.php"; $table = 'pinjaman_detail'; $no = $_POST['no']; $cicilan = $_POST['i']; $angsuran = $_POST['angsuran']; $bunga = $_POST['t_bunga']; $tgl_now = jin_date_sql($_POST['tgl']); $tangal_jt = date('Y-m-d', strtotime('+' . $cicilan . ' month', strtotime($tgl_now))); $sql = "INSERT INTO {$table} (id_pinjam,cicilan,angsuran,bunga,tgl_jatuh_tempo,ket)\n\t\tVALUES ('{$no}','{$cicilan}','{$angsuran}','{$bunga}','{$tangal_jt}','{$tangal_jt}')\n\t"; echo $sql; mysql_query($sql); echo "<b>Data sukses disimpan</b>";
} .akhir { width:20cm ; } .page { width:20cm ; font-size:12px; } </style> <?php include "../../inc/inc.koneksi.php"; include "../../inc/fungsi_tanggal.php"; include "../../inc/fungsi_koperasi.php"; $tgl1 = jin_date_sql($_GET['tgl1']); $tgl2 = jin_date_sql($_GET['tgl2']); $pilih = $_GET['pilih']; $judul_H = "Laporan Hutang Anggota <br>"; if ($pilih == 'tanggal') { $where = " WHERE a.tgl_jatuh_tempo BETWEEN '{$tgl1}' AND '{$tgl2}' AND a.jumlah_bayar=0"; $judul_H .= "Berdasarkan Tanggal Jatuh Tempo {$tgl1} s/d {$tgl2} <br>"; } else { $where = " WHERE a.jumlah_bayar=0"; } $query = "select a.id_pinjam,a.cicilan,a.angsuran,a.bunga,(a.angsuran+a.bunga) as total,a.tgl_jatuh_tempo,a.tgl_bayar,a.jumlah_bayar,\n\t\t\tb.noanggota,b.lama,b.jumlah,\n\t\t\tc.namaanggota,c.jk \n\t\t\tfrom angsuran as a\n\t\t\tjoin pinjaman as b\n\t\t\tJOIN nasabah as c\n\t\t\tON a.id_pinjam=b.id_pinjam AND b.noanggota=c.noanggota\n\t\t {$where}\n\t\t ORDER BY a.id_pinjam,b.noanggota,a.cicilan"; $data = mysql_query($query); echo mysql_error(); function myheader($judul_H) { echo "<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</th>\n\t\t\t<th>Jatuh Tempo</th>\n\t\t\t<th>No.Anggota</th>\n\t\t\t<th>Nama</th>\n\t\t\t<th>L/P</th>\n\t\t\t<th>Cicilan Ke</th>\n\t\t\t<th>Jumlah</th>\n\t\t</tr>"; }
page-break-after: always; margin-bottom:10px; } .akhir { width:20cm ; } .page { width:20cm ; } </style> <?php include "../../inc/inc.koneksi.php"; include "../../inc/fungsi_tanggal.php"; include "../../inc/fungsi_koperasi.php"; $tgl = jin_date_sql($_GET['tgl']); $nomor = $_GET['nomor']; $judul_H = "Laporan Kegiatan Sehari-hari <br> Tanggal " . $_GET['tgl'] . "<br>"; $where = " WHERE tgl='{$tgl}'"; $cari = " "; if (!empty($nomor)) { $where .= " AND noanggota='{$nomor}'"; $cari = " AND noanggota='{$nomor}'"; } $query = "SELECT id_simpanan as no_bukti,tgl as tgl, noanggota as no_anggota,jumlah as jml, 'Simpanan' as ket FROM simpanan {$where}\n\t\t\t\tUNION\n\t\t\t\tSELECT id_ambil as no_bukti,tgl as tgl, noanggota as no_anggota,jumlah as jml, 'Pengambilan' as ket FROM pengambilan {$where}\n\t\t\t\tUNION\n\t\t\t\tSELECT id_pinjam as no_bukti,tgl as tgl,noanggota as no_angota,jumlah as jml, 'Pinjaman' as ket FROM pinjaman {$where}\n\t\t\t\tUNION\n\t\t\t\tSELECT a.id_pinjam as no_bukti, tgl_bayar as tgl, noanggota as no_anggota, jumlah_bayar as jml, 'Bayar Pinjaman' as ket \n\t\t\t\tFROM pinjaman as a\n\t\t\t\tJOIN angsuran as b\n\t\t\t\tON a.id_pinjam=b.id_pinjam\n\t\t\t\tWHERE tgl_bayar='{$tgl}' {$cari}\n\t\t\t\tORDER BY tgl DESC"; $data = mysql_query($query); function myheader($judul_H) { echo "<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 Bukti</th>\n\t\t\t<th>Tanggal</th>\n\t\t\t<th>Nomor Anggota</th>\n\t\t\t<th>Nama Anggota</th>\n\t\t\t<th>Jumlah</th>\n\t\t\t<th>Kegiatan</th>\n\t\t</tr>"; } //echo $query;