<td >Kode Pos </td> <td colspan="2">: '.(empty($r2['kodeposayah'])?'-':$r2['kodeposayah']).'</td> </tr><tr> <td colspan="3"> </td> </tr>'; // bioadata ibu $r3=getField('*',$tb3,'siswa',$replid); $out.='<tr class="head"> <td colspan="3">Biodata Ibu</td> </tr><tr> <td >Nama</td> <td colspan="2">: '.(empty($r3['namaibu'])?'-':$r3['namaibu']).'</td> </tr><tr> <td>Tempat / Tanggal Lahir</td> <td colspan="2">: '.(empty($r3['tempatlahiribu'])?'-':$r3['tempatlahiribu']).' / '.tgl_indo5((empty($r3['tempatlahiribu'])?'-':$r3['tempatlahiribu'])).'</td> </tr><tr> <td >Warga Negara</td> <td colspan="2">: '.(empty($r3['warganegaraibu'])?'-':$r3['warganegaraibu']).'</td> </tr><tr> <td >Agama</td> <td colspan="2">: '.(empty($r3['agamaibu'])?'-':getField('agama','psb_agama','replid',$r3['agamaibu'])).'</td> </tr><tr> <td >Gereja</td> <td colspan="2">: '.(empty($r3['gerejaibu'])?'-':$r3['gerejaibu']).'</td> </tr><tr> <td >HP </td> <td colspan="2">: '.(empty($r3['hpibu'])?'-':$r3['hpibu']).'</td> </tr><tr> <td >Telpon</td> <td colspan="2">: '.(empty($r3['telponibu'])?'-':$r3['telponibu']).'</td>
$e2 = mysql_query($s2); while($r2 = mysql_fetch_assoc($e2)){ $itemArr[]=array( 'iditem' =>$r2['replid'], 'item' =>$r2['item'], 'jumlah' =>$r2['jumlah'], 'biayaSat' =>intval($r2['biaya']), 'biayaTot' =>(intval($r2['biaya']) * intval($r2['jumlah'])), ); $biayaSatSum+=intval($r2['biaya']); $biayaTotSum+=(intval($r2['biaya']) * intval($r2['jumlah'])); } $stat = ($e2)?'sukses':'gagal_ambil_detail_aktivitas'; }$out = json_encode(array( 'status' =>$stat, 'lokasi' =>$r['lokasi'], 'tanggal1' =>tgl_indo5($r['tanggal1']), 'tanggal2' =>tgl_indo5($r['tanggal2']), 'tgltagihan' =>tgl_indo5($r['tgltagihan']), 'aktivitas' =>$r['aktivitas'], 'keterangan' =>$r['keterangan'], 'iddetilanggaran' =>$r['iddetilanggaran'], 'detilanggaran' =>$r['detilanggaran'].' [sisa : '.setuang($r['anggaranSisa']).', kuota : '.setuang($r['anggaranKuota']).']', 'sisaNum' =>setuang($r['anggaranSisa']), 'itemArr' =>$itemArr )); break; // ambiledit ----------------------------------------------------------------- } }echo $out; ?>
dg.departemen, dg.tglmulai, dg.tglselesai from '.$tb.' dg JOIN psb_gelombang g on g.replid = dg.gelombang WHERE dg.replid='.$_POST['replid']; $e = mysql_query($s); $r = mysql_fetch_assoc($e); $stat = ($e)?'sukses':'gagal'; $out = json_encode(array( 'status' =>$stat, 'gelombang' =>$r['gelombang'], 'departemen' =>$r['departemen'], 'tahunajaran' =>$r['tahunajaran'], 'tglmulai' =>($r['tglmulai']=='0000-00-00'?'-':tgl_indo5($r['tglmulai'])), 'tglselesai' =>($r['tglselesai']=='0000-00-00'?'-':tgl_indo5($r['tglselesai'])), )); break; // ambiledit ----------------------------------------------------------------- // cmbdetailgelombang ----------------------------------------------------------------- case 'cmb'.$mnu: $w=''; if(isset($_POST['replid'])){ $w='where replid ='.$_POST['replid']; }else{ if(isset($_POST['tahunajaran']) && isset($_POST['departemen'])){ $w='where tahunajaran ='.$_POST['tahunajaran'].' AND departemen ='.$_POST['departemen']; } }
l.nama as lokasi from ' . $tb . ' a, sar_lokasi l WHERE a.lokasi= l.replid and a.replid=' . $_POST['replid']; // var_dump($s);exit(); $e = mysql_query($s); $r = mysql_fetch_assoc($e); $itemArr = array(); $biayaSatSum = $biayaTotSum = $biayaTotSum2 = 0; if (!$e) { $stat = $e ? 'sukses' : 'gagal_ambil_data_aktivitas'; } else { $s2 = 'SELECT * FROM ' . $tb3 . ' WHERE aktivitas =' . $_POST['replid']; $e2 = mysql_query($s2); while ($r2 = mysql_fetch_assoc($e2)) { $itemArr[] = array('iditem' => $r2['replid'], 'item' => $r2['item'], 'jumlah' => $r2['jumlah'], 'biayaSat' => intval($r2['biaya']), 'biayaTot' => intval($r2['biaya']) * intval($r2['jumlah'])); $biayaSatSum += intval($r2['biaya']); $biayaTotSum += intval($r2['biaya']) * intval($r2['jumlah']); } $stat = $e2 ? 'sukses' : 'gagal_ambil_detail_aktivitas'; } $out = json_encode(array('status' => $stat, 'lokasi' => $r['lokasi'], 'tanggal1' => tgl_indo5($r['tanggal1']), 'tanggal2' => tgl_indo5($r['tanggal2']), 'tgltagihan' => tgl_indo5($r['tgltagihan']), 'aktivitas' => $r['aktivitas'], 'keterangan' => $r['keterangan'], 'itemArr' => $itemArr)); break; // ambiledit ----------------------------------------------------------------- } } echo $out; // ---------------------- // // -- created by rovi -- // // ---------------------- //
function getTglTrans($siswa, $typ) { $s = 'SELECT t.replid, max(t.tanggal)tgl FROM keu_transaksi t LEFT JOIN keu_pembayaran p ON p.replid = t.pembayaran LEFT JOIN keu_modulpembayaran m ON m.replid = p.modul LEFT JOIN keu_katmodulpembayaran k ON k.replid = m.katmodulpembayaran WHERE p.siswa = ' . $siswa . ' and ( k.nama = "' . $typ . '" )'; $e = mysql_query($s); $r = mysql_fetch_assoc($e); $tgl = $r['tgl'] != NULL ? tgl_indo5($r['tgl']) : '-'; return $tgl; }
$kredit = 0; } else { if ($jenis == 'out') { // outcome $debit = $r2['rekkas'] == $r2['rek'] ? 0 : $r2['nominal']; $kredit = $r2['rekitem'] == $r2['rek'] ? 0 : $r2['nominal']; } else { // income $debit = $r2['rekkas'] == $r2['rek'] ? $r2['nominal'] : 0; $kredit = $r2['rekitem'] == $r2['rek'] ? $r2['nominal'] : 0; } } $debitTot += $debit; $kreditTot += $kredit; $out .= '<tr > <td>' . tgl_indo5($r2['tanggal']) . '</td> <td>' . $r2['nomer'] . '</td> <td>' . $r2['uraian'] . '</td> <td align="right">Rp. ' . number_format($debit) . '</td> <td align="right">Rp. ' . number_format($kredit) . '</td> </tr>'; } $out .= '</tbody> <tfoot> <tr class="head"> <th align="right" colspan="3">Jumlah</th> <th align="right">Rp. ' . number_format($debitTot) . '</th> <th align="right">Rp. ' . number_format($kreditTot) . '</th> </tr> <tr class="head"> <th align="right" colspan="3">Selisih</th>
AND j.jenisrekening ="k" AND t.tanggal BETWEEN "' . tgl_indo6($_GET['tgl1']) . '" AND "' . tgl_indo6($_GET['tgl2']) . '" ORDER BY t.tanggal ASC'; $e3 = mysql_query($s3); $keluarTot = 0; if (mysql_num_rows($e3) <= 0) { $out .= '<tr> <td colspan="4" align="center">data kosong</td> </tr>'; } else { while ($r3 = mysql_fetch_assoc($e3)) { $keluarTot += $r3['nominal']; $out .= '<tr> <td width="10%">' . tgl_indo5($r3['tanggal']) . '</td> <td width="20%">' . getNoKwitansi($r3['idTransaksi']) . '</td> <td width="30%">' . $r3['uraian'] . '</td> <td align="right" width="20%">' . setuang($r3['nominal']) . '</td> </tr>'; } } $out .= '</tbody> <tfoot> <tr class="info fg-white"> <th colspan="3" align="right">Jumlah : </th> <th align="right">' . setuang($keluarTot) . '</th> </tr> </tfoot> </table>'; $saldoAkhir = $r['nominal'] + $masukTot - $keluarTot;
$recpage = 10;//jumlah data per halaman $aksi ='tampil'; $subaksi =''; $obj = new pagination_class($sql,$starting,$recpage,$aksi, $subaksi); $result =$obj->result; #ada data $jum = mysql_num_rows($result); $out =''; if($jum!=0){ while($res = mysql_fetch_assoc($result)){ $tingNama = getKriteriaSiswa('tingkat',$res['idsiswa']); $stingNama = getKriteriaSiswa('subtingkat',$res['idsiswa']); $out.= '<tr> <td align="center">'.tgl_indo5($res['tanggallahiribu']).'</td> <td align="center">'.$res['namaibu'].'</td> <td align="center">'.$res['namasiswa'].'</td> <td align="center">'.$tingNama.'-'.$stingNama.' </td> <td align="center">'.$res['alamatibu'].'</td> <td align="center">'.$res['emailibu'].'</td> </tr>'; } }else{ #kosong $out.= '<tr align="center"> <td colspan=9 ><span style="color:red;text-align:center;"> ... data tidak ditemukan...</span></td></tr>'; } #link paging $out.= '<tr class="info"><td colspan=9>'.$obj->anchors.'</td></tr>'; $out.='<tr class="info"><td colspan=9>'.$obj->total.'</td></tr>';
if ($jum != 0) { $nox = $starting + 1; while ($res = mysql_fetch_assoc($result)) { // <button data-hint="detail" class="button" onclick="viewFR('.$res['replid'].');"> // <i class="icon-zoom-in"></i> // </button> $btn = '<td> <button data-hint="ubah" class="button" onclick="viewFR(' . $res['replid'] . ');"> <i class="icon-pencil on-left"></i> </button> <button data-hint="hapus" class="button" onclick="del(' . $res['replid'] . ');"> <i class="icon-remove on-left"></i> </button> </td>'; $out .= '<tr> <td class="text-center">' . tgl_indo5($res['tanggal1']) . ' - ' . tgl_indo5($res['tanggal2']) . '</td> <td>' . $res['aktivitas'] . '</td> <td>' . $res['aktivitas'] . '</td> <td>' . $res['aktivitas'] . '</td> <td><pre>' . $res['keterangan'] . '</pre></td> ' . $btn . ' </tr>'; $nox++; } } else { #kosong $out .= '<tr align="center"> <td colspan=9 ><span style="color:red;text-align:center;"> ... data tidak ditemukan...</span></td></tr>'; } #link paging
// <button '.(isAksi($mnu,'u')?'onclick="viewFR('.$res['replid'].');"':'disabled').' data-hint="ubah" > // <i class="icon-pencil"></i> // </button> $btn = ' <td align="center"> <button ' . (isAksi($mnu, 'd') ? 'onclick="del(' . $res['replid'] . ');"' : 'disabled') . ' data-hint="hapus" > <i class="icon-remove"></i> </button> </td>'; $out .= '<tr> <td>' . tgl_indo5($res['tgl']) . '</td> <td>' . $res['nis'] . '</td> <td>' . $res['namasiswa'] . '</td> <td>-</td> <td>' . $res['nomom'] . '</td> <td>' . tgl_indo5($res['tglmom']) . '</td> <td align="right">' . setuang($res['biayaKurangTot']) . '</td> ' . $btn . ' </tr>'; // <td>'.getTotalPemutihan($res['replid']).'</td> $nox++; } } else { #kosong $out .= '<tr align="center"> <td colspan=9 ><span style="color:red;text-align:center;"> ... data tidak ditemukan...</span></td></tr>'; } #link paging $out .= '<tr class="info"><td colspan=9>' . $obj->anchors . '</td></tr>'; $out .= '<tr class="info"><td colspan=9>' . $obj->total . '</td></tr>';
'posisiayah' =>$r['posisiayah'], 'penghasilanayah' =>$r['penghasilanayah'], 'telponayah' =>$r['telponayah'], 'emailayah' =>$r['emailayah'], 'pinbbayah' =>$r['pinbbayah'], 'alamatayah' =>$r['alamatayah'], 'hpayah' =>$r['hpayah'], 'faxrumahayah' =>$r['faxrumahayah'], 'alamatkantorayah' =>$r['alamatkantorayah'], 'telponkantorayah' =>$r['telponkantorayah'], 'faxkantorayah' =>$r['faxkantorayah'], 'gerejaayah' =>$r['gerejaayah'], /*siswa ibu*/ 'namaibu' =>$r['namaibu'], 'tempatlahiribu' =>$r['tempatlahiribu'], 'tanggallahiribu' =>tgl_indo5($r['tanggallahiribu']), 'agamaibu' =>$r['agamaibu'], 'warganegaraibu' =>$r['warganegaraibu'], 'kodeposibu' =>$r['kodeposibu'], 'kotaibu' =>$r['kotaibu'], 'pendidikanibu' =>$r['pendidikanibu'], 'bidangpekerjaanibu' =>$r['bidangpekerjaanibu'], 'pekerjaanibu' =>$r['pekerjaanibu'], 'posisiibu' =>$r['posisiibu'], 'penghasilanibu' =>$r['penghasilanibu'], 'telponibu' =>$r['telponibu'], 'emailibu' =>$r['emailibu'], 'pinbbibu' =>$r['pinbbibu'], 'alamatibu' =>$r['alamatibu'], 'hpibu' =>$r['hpibu'], 'faxrumahibu' =>$r['faxrumahibu'],
'kesehatan' =>$r['kesehatan'], 'ketkesehatan' =>$r['ketkesehatan'], // ayah 'namaAyah' =>$r['namaAyah'], 'kebangsaanAyah' =>$r['kebangsaanAyah'], 'tmplahirAyah' =>$r['tmplahirAyah'], 'tgllahirAyah' =>tgl_indo5($r['tgllahirAyah']), 'pekerjaanAyah' =>$r['pekerjaanAyah'], 'telponAyah' =>$r['telponAyah'], 'pinbbAyah' =>$r['pinbbAyah'], 'emailAyah' =>$r['emailAyah'], // ibu 'namaIbu' =>$r['namaIbu'], 'kebangsaanIbu' =>$r['kebangsaanIbu'], 'tmplahirIbu' =>$r['tmplahirIbu'], 'tgllahirIbu' =>tgl_indo5($r['tgllahirIbu']), 'pekerjaanIbu' =>$r['pekerjaanIbu'], 'telponIbu' =>$r['telponIbu'], 'pinbbIbu' =>$r['pinbbIbu'], 'emailIbu' =>$r['emailIbu'], /*kakek nenek*/ 'namaKakek' =>$r['namaKakek'], 'namaNenek' =>$r['namaNenek'], /*darurat*/ 'namaDarurat' =>$r['namaDarurat'], 'hubungan' =>$r['hubungan'], 'telponDarurat' =>$r['telponDarurat'], )); break; // ambiledit -----------------------------------------------------------------
$out = json_encode(array('status' => 'invalid_no_post')); } } else { switch ($_POST['aksi']) { // history bayar case 'histBayar': $s = 'SELECT p.replid, p.tanggal,p.nominal,p.idkwitansi FROM ' . $tb . ' p WHERE p.siswabiaya = ' . $_POST['siswabiaya'] . ' ORDER BY p.tanggal ASC,p.replid ASC'; $e = mysql_query($s); $arr = array(); $totNominal = 0; $angsuranKe = 1; while ($r = mysql_fetch_assoc($e)) { $arr[] = array('replid' => $r['replid'], 'angsuranKe' => $angsuranKe, 'nominal' => setuang($r['nominal']), 'tanggal' => tgl_indo5($r['tanggal']), 'idkwitansi' => $r['idkwitansi']); $totNominal += $r['nominal']; $angsuranKe++; } $out = json_encode(array('status' => $e ? 'sukses' : 'gagal', 'datax' => $arr, 'totNominal' => setuang($totNominal))); break; // tampil --------------------------------------------------------------------- // tampil --------------------------------------------------------------------- case 'tampil': $departemen = isset($_POST['departemenS']) ? filter($_POST['departemenS']) : ''; $tahunajaran = isset($_POST['tahunajaranS']) ? filter($_POST['tahunajaranS']) : ''; $subtingkat = isset($_POST['subtingkatS']) ? filter($_POST['subtingkatS']) : ''; $biaya = isset($_POST['biayaS']) ? filter($_POST['biayaS']) : ''; // opsional $semester = isset($_POST['semesterS']) && $_POST['semesterS'] != '' && $_POST['semesterS'] != 'null' ? ' AND idsemester =' . filter($_POST['semesterS']) : ''; $bulan = isset($_POST['bulanS']) && $_POST['bulanS'] != '' && $_POST['bulanS'] != 'null' ? ' AND idsemester =' . filter($_POST['bulanS']) : '';
'posisiayah' =>$r['posisiayah'], 'penghasilanayah' =>setuang($r['penghasilanayah']), 'telponayah' =>$r['telponayah'], 'emailayah' =>$r['emailayah'], 'pinbbayah' =>$r['pinbbayah'], 'alamatayah' =>$r['alamatayah'], 'hpayah' =>$r['hpayah'], 'faxrumahayah' =>$r['faxrumahayah'], 'alamatkantorayah' =>$r['alamatkantorayah'], 'telponkantorayah' =>$r['telponkantorayah'], 'faxkantorayah' =>$r['faxkantorayah'], 'gerejaayah' =>$r['gerejaayah'], //ibu 'namaibu' =>$r['namaibu'], 'tempatlahiribu' =>$r['tempatlahiribu'], 'tanggallahiribu' =>$r['tanggallahiribu']=='0000-00-00'?'':tgl_indo5($r['tanggallahiribu']), 'agamaibu' =>$r['agamaibu'], 'warganegaraibu' =>$r['warganegaraibu'], 'kodeposibu' =>$r['kodeposibu'], 'kotaibu' =>$r['kotaibu'], 'pendidikanibu' =>$r['pendidikanibu'], 'bidangpekerjaanibu' =>$r['bidangpekerjaanibu'], 'pekerjaanibu' =>$r['pekerjaanibu'], 'posisiibu' =>$r['posisiibu'], 'penghasilanibu' =>setuang($r['penghasilanibu']), 'telponibu' =>$r['telponibu'], 'emailibu' =>$r['emailibu'], 'pinbbibu' =>$r['pinbbibu'], 'alamatibu' =>$r['alamatibu'], 'hpibu' =>$r['hpibu'], 'faxrumahibu' =>$r['faxrumahibu'],
case 'ambiledit': $s = ' SELECT t.tahunajaran, t.tglmulai, t.tglakhir, t.keterangan, d.replid as id_departemen, d.nama as departemen from ' . $tb . ' t, departemen d WHERE t.departemen= d.replid and t.replid=' . $_POST['replid']; $e = mysql_query($s); $r = mysql_fetch_assoc($e); $stat = $e ? 'sukses' : 'gagal'; $out = json_encode(array('status' => $stat, 'tahunajaran' => $r['tahunajaran'], 'tglmulai' => tgl_indo5($r['tglmulai']), 'tglakhir' => tgl_indo5($r['tglakhir']), 'keterangan' => $r['keterangan'], 'id_departemen' => $r['id_departemen'], 'departemen' => $r['departemen'])); break; // ambiledit ----------------------------------------------------------------- // aktifkan ----------------------------------------------------------------- // ambiledit ----------------------------------------------------------------- // aktifkan ----------------------------------------------------------------- case 'aktifkan': $e1 = mysql_query('UPDATE ' . $tb . ' set aktif="0" where departemen = ' . $_POST['departemen']); if (!$e1) { $stat = 'gagal menonaktifkan'; } else { $s2 = 'UPDATE ' . $tb . ' set aktif="1" where replid = ' . $_POST['replid']; $e2 = mysql_query($s2); if (!$e2) { $stat = 'gagal mengaktifkan'; } else {
</td> </tr> </table><br />'; // start of header $out.='<table width="100%"> <tr> <td width="20%" >Kode Transaksi </td> <td>: '.$r1['nomer'].'</td> </tr> <tr> <td>No. Bukti</td> <td>: '.$r1['nobukti'].'</td> </tr> <tr> <td>Tanggal</td> <td>: '.tgl_indo5($r1['tanggal']).'</td> </tr> <tr> <td>Uraian</td> <td>: '.$r1['uraian'].'</td> </tr>'; if($jenisTrans=='pengeluaran'){ $out.='<tr> <td>Anggaran</td> <td>: '.getAnggaran($r1['detilanggaran']).'</td> </tr>'; }$out.='</table>'; // end of header // start of detail table $out.='<table class="isi" width="100%">
case 'ambiledit': $s = ' SELECT s.replid, s.semester, s.tglMulai, s.tglSelesai, concat(t.tahunajaran," - ",(t.tahunajaran+1))tahunajaran FROM aka_semester s LEFT JOIN aka_tahunajaran t ON t.replid = s.tahunajaran WHERE s.replid=' . $_POST['replid']; // var_dump($s);exit(); $e = mysql_query($s); $r = mysql_fetch_assoc($e); $stat = $e ? 'sukses' : 'gagal'; $out = json_encode(array('status' => $stat, 'tahunajaran' => $r['tahunajaran'], 'semester' => $r['semester'], 'tglMulai' => $r['tglMulai'] == '0000-00-00' ? '' : tgl_indo5($r['tglMulai']), 'tglSelesai' => $r['tglSelesai'] == '0000-00-00' ? '' : tgl_indo5($r['tglSelesai']))); break; // ambiledit ----------------------------------------------------------------- // cmbsemester ----------------------------------------------------------------- // ambiledit ----------------------------------------------------------------- // cmbsemester ----------------------------------------------------------------- case 'cmbsemester': if (isset($_POST['replid'])) { $w = 'where replid =' . $_POST['replid']; } else { if (isset($_POST[$mnu])) { $w = 'where ' . $mnu . '=' . $_POST[$mnu]; } elseif (isset($_POST['tahunajaran'])) { $w = 'where tahunajaran =' . $_POST['tahunajaran']; } else { $w = '';
FROM keu_penerimaansiswa p WHERE p.siswabiaya = ' . $idsiswabiaya . ' ORDER BY p.tanggal ASC, p.replid ASC'; $e2 = mysql_query($s2); $n2 = mysql_num_rows($e2); $arr = array(); $totNominal = 0; $angsuranKe = 0; if ($n2 == 0) { $out .= '<tr><td align="center" colspan="3">Kosong</td></tr>'; } else { while ($r2 = mysql_fetch_assoc($e2)) { $angsuranKe++; $out .= '<tr style="background-color:lightGrey;"> <td align="center">' . $angsuranKe . ' </td> <td align="center">' . tgl_indo5($r2['tanggal']) . ' </td> <td align="right">' . setuang($r2['nominal']) . ' </td> </tr>'; $totNominal += $r2['nominal']; } } $out .= '<tr class="head"> <td colspan="2" align="center">Total Terbayar </td> <td style="background-color:lightBlue;" align="right">' . setuang($totNominal) . '</td> </tr><tr> <td>* Total Kurangan </td> <td>: </td> <td style="background-color:lightBlue;" align="right">' . setuang(intval($r['biayaNett']) - $totNominal) . '</td> </tr>'; } $out .= '<tr>
<td width="20%">Debit</td> <td width="20%">Kredit</td> </tr>'; while ($r2 = mysql_fetch_assoc($e2)) { $debit = $r2['jenisrekening'] == 'd' ? setuang($r2['nominal']) : '-'; $kredit = $r2['jenisrekening'] == 'k' ? setuang($r2['nominal']) : '-'; $tb2 .= '<tr> <td width="60%">' . getRekening($r2['detilrekening']) . '</td> <td width="20%" align="right">' . $debit . '</td> <td width="20%" align="right">' . $kredit . '</td> </tr>'; } $tb2 .= '</table>'; } $out .= '<tr> <td width="12%" valign="top">' . tgl_indo5($r['tanggal']) . '</td> <td width="18%" valign="top" style="font-weight:bold;">' . getNoKwitansi($r['replid']) . '<br>' . $r['nobukti'] . '</td> <td width="15%" valign="top">' . $r['uraian'] . '</td> <td width="55%">' . $tb2 . '</td> </tr>'; } } else { #kosong $out .= '<tr align="center"> <td colspan=9 ><span style="color:red;text-align:center;"> ... data tidak ditemukan...</span></td></tr>'; } $out .= '</table> </body>'; echo $out; #generate html -> PDF ------------
$stat = $e ? 'sukses' : 'gagal'; $out = json_encode(array('status' => $stat, 'terhapus' => $d[$mnu])); break; // delete ----------------------------------------------------------------- // ambiledit ----------------------------------------------------------------- // delete ----------------------------------------------------------------- // ambiledit ----------------------------------------------------------------- case 'ambiledit': $s = ' SELECT * from ' . $tb . ' WHERE replid=' . $_POST['replid']; $e = mysql_query($s); $r = mysql_fetch_assoc($e); $stat = $e ? 'sukses' : 'gagal'; $out = json_encode(array('status' => $stat, 'tahunajaran' => $r['tahunajaran'], 'departemen' => $r['departemen'], 'kelompok' => $r['kelompok'], 'tglmulai' => tgl_indo5($r['tglmulai']), 'tglselesai' => tgl_indo5($r['tglselesai']), 'keterangan' => $r['keterangan'])); break; // ambiledit ----------------------------------------------------------------- // aktifkan ----------------------------------------------------------------- // ambiledit ----------------------------------------------------------------- // aktifkan ----------------------------------------------------------------- case 'aktifkan': $e1 = mysql_query('UPDATE ' . $tb . ' set aktif="0" where departemen = ' . $_POST['departemen']); if (!$e1) { $stat = 'gagal menonaktifkan'; } else { $s2 = 'UPDATE ' . $tb . ' set aktif="1" where replid = ' . $_POST['replid']; $e2 = mysql_query($s2); if (!$e2) { $stat = 'gagal mengaktifkan'; } else {
m.rek3, m.nama modul, m.replid idmodul FROM keu_modulpembayaran m LEFT JOIN keu_katmodulpembayaran k ON k.replid = m.katmodulpembayaran LEFT JOIN keu_pembayaran p ON p.modul = m.replid WHERE m.angkatan = ' . $ang . ' AND k.nama = "spp"'; // var_dump($s2);exit(); $e2 = mysql_query($s2); // var_dump($s2);exit(); $r2 = mysql_fetch_assoc($e2); $stat = $e2 ? 'sukses' : 'gagal'; $out = json_encode(array('status' => $stat, 'datax' => array('nis' => getSiswaBy('nis', $sis), 'idsiswa' => $sis, 'siswa' => getSiswaBy('nama', $sis), 'nomer' => getNoTrans($_POST['subaksi']), 'tanggal' => tgl_indo5(date('Y-m-d')), 'rekkas' => $r2['rek1'], 'rekitem' => $r2['rek2'], 'rek1' => getRekening($r2['rek1']), 'rek2' => getRekening($r2['rek2']), 'rek3' => getRekening($r2['rek3']), 'modul' => $r2['modul'], 'idmodul' => $r2['idmodul'], 'status' => getStatusBayar('spp', $_POST['replid']), 'nominal' => 'Rp. ' . number_format(getBiaya('spp', $sis))))); break; } break; // ambiledit ------------------------------------------------------------------ // generate barcode ----------------------------------------------------------- // ambiledit ------------------------------------------------------------------ // generate barcode ----------------------------------------------------------- case 'kodegenerate': $s = 'SELECT tb1.lokasi, tb1.grup, tb1.tempat, tb1.katalog, tb2.barang, LPAD(tb2.barang,5,0)barkode
-- LEFT JOIN aka_tingkat t ON t.replid = c.tingkat WHERE c.replid=' . $_POST['replid']; $e = mysql_query($s) or die(mysql_error()); $r = mysql_fetch_assoc($e); // print_r($r);exit(); $stat = $e ? 'sukses' : 'gagal'; $regNum = setuang(getBiaya('registration', $_POST['replid'])); $regNumNet = setuang(getBiayaNet('registration', $_POST['replid'])); $nopendaftaran = getNoPendaftaran($_POST['replid'], $r['kelompok'])['akhir']; // $tingkat = getField('tingkat','psb_calonsiswa','replid',$r['tingkat']); $tahunajaran = getField('tahunajaran', 'psb_kelompok', 'replid', $r['kelompok']); $discangsuran = setuang(getDiscAngsuran($regNum, $r['angsuran'])); $disctunai = setuang(getDisc('disctunai', $_POST['replid'])); // var_dump($tingkat);exit(); $out = json_encode(array('status' => $stat, 'setbiaya' => $r['setbiaya'], 'registration' => $regNum, 'angsuran' => $r['angsuran'], 'discangsuran' => $discangsuran, 'discsubsidi' => setuang($r['discsubsidi']), 'discsaudara' => setuang($r['discsaudara']), 'iddisctunai' => $r['disctunai'], 'disctunai' => $disctunai, 'disctotal' => setuang(getDiscTotal($_POST['replid'])), 'registrationnet' => $regNumNet, 'material' => setuang($r['material']), 'tuition' => setuang($r['tuition']), 'nopendaftaranH' => $r['nopendaftaran'], 'nopendaftaran' => $nopendaftaran, 'namaSiswa' => $r['namaSiswa'], 'tahunajaran' => $tahunajaran, 'kelompok' => $r['kelompok'], 'tingkat' => $r['tingkat'], 'golongan' => $r['golongan'], 'kelamin' => $r['kelamin'], 'tmplahir' => $r['tmplahir'], 'tgllahir' => tgl_indo5($r['tgllahir']), 'agama' => $r['agama'], 'alamat' => $r['alamat'], 'telpon' => $r['telpon'], 'sekolahasal' => $r['sekolahasal'], 'photo' => $r['photo'], 'darah' => $r['darah'], 'kesehatan' => $r['kesehatan'], 'ketkesehatan' => $r['ketkesehatan'], 'namaAyah' => $r['namaAyah'], 'kebangsaanAyah' => $r['kebangsaanAyah'], 'tmplahirAyah' => $r['tmplahirAyah'], 'tgllahirAyah' => tgl_indo5($r['tgllahirAyah']), 'pekerjaanAyah' => $r['pekerjaanAyah'], 'telponAyah' => $r['telponAyah'], 'pinbbAyah' => $r['pinbbAyah'], 'emailAyah' => $r['emailAyah'], 'namaIbu' => $r['namaIbu'], 'kebangsaanIbu' => $r['kebangsaanIbu'], 'tmplahirIbu' => $r['tmplahirIbu'], 'tgllahirIbu' => tgl_indo5($r['tgllahirIbu']), 'pekerjaanIbu' => $r['pekerjaanIbu'], 'telponIbu' => $r['telponIbu'], 'pinbbIbu' => $r['pinbbIbu'], 'emailIbu' => $r['emailIbu'], 'namaKakek' => $r['namaKakek'], 'namaNenek' => $r['namaNenek'], 'namaDarurat' => $r['namaDarurat'], 'hubungan' => $r['hubungan'], 'telponDarurat' => $r['telponDarurat'])); break; // ambiledit ----------------------------------------------------------------- //detail siswa // ambiledit ----------------------------------------------------------------- //detail siswa case 'detail': $s = ' SELECT t.replid, d.nama departemen, akt.tahunajaran tahunajaran, k.kelompok kelompok, t.nopendaftaran nopendaftaran, t.status statusx, t.nama as nama_siswa, if(t.kelamin="L","Laki-Laki","Perempuan") jk,