if ($opt == 'uf' || $opt == 'df') { // Prepocessing form $r = dbSFA("*", $dbtable, "W/replid='{$cid}'"); } else { $r = array(); $r['departemen'] = gpost('departemen'); $r['proses'] = gpost('proses'); $r['kapasitas'] = 0; $r['biaya'] = 0; } $fform->head(); if ($opt == 'af' || $opt == 'uf') { require_once MODDIR . 'control.php'; // Add or Edit form $fform->fl('Departemen', departemen_name(gpost('departemen')), $fform->rwidths); $fform->fl('Proses', proses_name($r['proses']), $fform->rwidths); $fform->fi('Nama kelompok', iText('kelompok', $r['kelompok'], $fform->rwidths)); $fform->fi('Tanggal dibuka', inputTanggal('tglmulai', $r['tglmulai'])); $fform->fi('Tanggal ditutup', inputTanggal('tglselesai', $r['tglselesai'])); $fform->fi('Biaya pendaftaran', iTextC('biaya', $r['biaya'], 'width:120px')); $fform->fa('Keterangan', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 3)); } else { if ($opt == 'df') { // Delete form $fform->dlg_del($r['kelompok']); } else { if ($opt == 'hf') { $fform->fh('Kelompok pendaftaran adalah pembagian tahap atau gelombang pendaftaran dalam satu periode penerimaan siswa baru.<br/>Contoh kelompok pendaftaran: "Early bird", "Reguler Gelombang 1", "Reguler Gelombang 2".'); } } }
$departemen = mysql_fetch_array($t); // Queries: $t = mysql_query("SELECT * FROM psb_calonsiswa WHERE proses='{$pros}' AND kelompok='{$kel}' ORDER BY nopendaftaran"); // add a page $pdf->AddPage(); page_header(); require_once 'header.php'; $pdf->SetFont(mydeffont, '', 12, '', true); $pdf->MultiCell($dcPageW, 0, 'DATA CALON SISWA BARU', 0, 'C', 0, 1, '', '', true); dc_YDown(3); if (mysql_num_rows($t) > 0) { $pdf->SetFont(mydeffont, '', 8, '', true); $pdf->MultiCell(30, 0, 'Departemen', 0, 'L', 0, 0, '', '', true); $pdf->MultiCell(100, 0, ': ' . $departemen['departemen'], 0, 'L', 0, 1, '', '', true); $pdf->MultiCell(30, 0, 'Proses Penerimaan', 0, 'L', 0, 0, '', '', true); $pdf->MultiCell(100, 0, ': ' . proses_name($pros), 0, 'L', 0, 1, '', '', true); $pdf->MultiCell(30, 0, 'Kelompok', 0, 'L', 0, 0, '', '', true); $pdf->MultiCell(100, 0, ': ' . kelompok_name($kel), 0, 'L', 0, 1, '', '', true); dc_YDown(2); $thx = array('No.', 'No Daftar', 'Nama', 'Uang Pangkal', 'Subsidi', 'Saudara', 'Tunai', 'Denda', 'Uang Pangkal Net', 'Angsuran', '#1', '#2', '#3', 'Status'); $twx = array(11, 25, 0, 23, 23, 23, 16, 23, 23, 23, 10, 10, 10, 15); $tax = array('C', 'L', 'L', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'L'); $tx = 0; for ($i = 0; $i < count($twx); $i++) { $tx += $twx[$i]; } $twx[2] = $dcPageW - $tx; $tcx = array(); $tcx[0] = $dcMarginL; for ($i = 1; $i < count($twx); $i++) { $tcx[$i] = $tcx[$i - 1] + $twx[$i - 1];