$PSBar->selection('Angkatan', iSelect('angkatan', $angkatan, $angk, $PSBar->selws, $fmod . "_get()")); } else { $PSBar->end(); hiddenval('angkatan', $angk); angkatan_warn(0, 'float:left'); $PSBar->pass = false; } $PSBar->end(); if ($PSBar->pass) { if ($opt == 'af' || $opt == 'uf') { require_once VWDIR . 'siswa_form.php'; } else { $xtable = new xtable($fmod, 'siswa'); $xtable->search_keyon('nis=>aka_siswa.nis:EQ', 'nama=>aka_siswa.nama:LIKE'); $xtable->docname = "Data Siswa Angkatan " . angkatan_name($angk); $xtable->printparams = array('angkatan' => angkatan_name($angk)); // Query $db = new xdb("aka_siswa"); $db->field("aka_siswa:replid,nis,nisn,nama,tmplahir,tgllahir"); $db->where_and("aka_siswa.angkatan='{$angk}'"); $db->where_and($xtable->search_sql_get()); $t = $xtable->use_db($db, $xtable->pageorder_sql('nis', 'nisn', 'nama')); $xtable->btnbar_f('print', 'srcbox'); if ($xtable->ndata > 0) { // Table head $xtable->head('@!NIS', '@!NISN', '@nama', 'Tempat Tanggal lahir', '{50px}'); while ($r = mysql_fetch_array($t)) { $xtable->row_begin(); $xtable->td($r['nis'], 80); $xtable->td($r['nisn'], 120); $xtable->td($r['nama']);
$PSBar->end(); $xtable->btnbar_f('add', 'print', 'help'); if ($xtable->ndata > 0) { // Table head $xtable->head('Periode penerimaan{200px}', 'Kode Awalan{120px}', 'Angkatan{120px}', 'Kapasitas{C,100px}', 'Calon Siswa{C,100px}', 'Siswa Diterima{C,100px}', 'status{C,80px}', 'keterangan'); while ($r = mysql_fetch_array($t)) { $xtable->row_begin(); $q = mysql_query("SELECT replid FROM psb_calonsiswa WHERE proses = '" . $r['replid'] . "'"); $n = mysql_num_rows($q); $q = mysql_query("SELECT replid FROM psb_calonsiswa WHERE proses = '" . $r['replid'] . "' AND status<>0"); $n1 = mysql_num_rows($q); //if(diffDay($r['tglselesai'])<0) $s='<br/><span style="color:#ff9000">(lewat dari tgl penutupan)</span>'; //else $s=''; $xtable->td($r['proses'], 200); $xtable->td($r['kodeawalan'], 120); $xtable->td(angkatan_name($r['angkatan']), 120); $xtable->td($r['kapasitas'], 100, 'c'); $xtable->td($n, 100, 'c'); $xtable->td($n1, 100, 'c'); $xtable->td($r['aktif'] == '1' ? '<span style="color:#00A000"><b>Dibuka</b></span>' : 'Ditutup', 80, 'c'); $xtable->td(nl2br($r['keterangan'])); $xtable->opt_ud($r['replid']); $xtable->row_end(); } $xtable->foot(); } else { $xtable->nodata(); } } else { departemen_warn(1); }
$piut = 0; // Set pembayaran uang pangkal $t = mysql_query("SELECT aka_siswa.replid,aka_siswa.sumnet,aka_siswa.angsuran FROM aka_siswa WHERE aka_siswa.angkatan='{$refid}'"); while ($r = mysql_fetch_array($t)) { $pemb['siswa'] = $r['replid']; $pemb['nominal'] = $r['sumnet']; $pemb['cicilan'] = $r['angsuran']; $q = dbInsert("keu_pembayaran", $pemb); if ($q) { $piut += $pemb['nominal']; } } $jur = array(); $jur[0] = array('rek' => $inp['rek3'], 'debet' => $piut, 'kredit' => 0); $jur[1] = array('rek' => $inp['rek2'], 'debet' => 0, 'kredit' => $piut); $q = transaksi_posting_auto("Target pendapatan uang pangkal angkatan " . angkatan_name($refid) . ".", $jur); } else { if ($inp['reftipe'] == RT_SPP) { $piut = 0; // Set pembayaran uang sekolah $db = siswa_db_bytahunajaran($refid, "sppbulan"); $t = $db->query(); log_print("mysql_num_rows(t):" . mysql_num_rows($t) . ";"); while ($r = mysql_fetch_array($t)) { $pemb['siswa'] = $r['replid']; $pemb['nominal'] = $r['sppbulan'] * 12; $pemb['cicilan'] = $r['sppbulan']; $q = dbInsert("keu_pembayaran", $pemb); if ($q) { $piut += $pemb['nominal']; }
$r = farray('nis', 'nisn'); $r['departemen'] = gpost('departemen'); $r['tahunajaran'] = gpost('tahunajaran'); $r['kelas'] = gpost('kelas'); } $fform->reg['title_af'] = '<idata>'; $fform->reg['title_uf'] = 'Edit <idata>'; $fform->reg['title_df'] = 'Batalkan <idata>'; $fform->dimension(350); $fform->head(); if ($opt == 'af' || $opt == 'uf') { require_once MODDIR . 'control.php'; // Add or Edit form $pros = gpost('proses'); $tp = mysql_query("SELECT angkatan FROM psb_proses WHERE replid='{$pros}'"); $rp = mysql_fetch_array($tp); $fform->fl('Departemen', departemen_name($r['departemen'])); $fform->fl('Angkatan', angkatan_name($rp['angkatan'])); $fform->fl('Tahun ajaran', tahunajaran_name($r['tahunajaran'])); $fform->fl('Kelas', kelas_name($r['kelas'])); $fform->fi('No Induk', iText('nis', $r['nis'], 'width:120px')); $fform->fi('NISN', iText('nisn', $r['nisn'], $fform->rwidths)); } else { if ($opt == 'df') { // Delete form $fform->reg['btnlabel_d_y'] = ' Ya '; $fform->dlg('Batalkan penempatan siswa <b>' . $r['nama'] . '</b>?'); } } $fform->foot(); }
$s.='<tr height="20px"><td width="100px">Nama:</td><td><b>'.$r['nama'].'</b></td></tr>'; $s.='<tr height="20px"><td>No pendaftaran:</td><td>'.$r['nopendaftaran'].'</td></tr>'; $cs=calonsiswa_syarat($r['replid']); if($cs>1){ $s.='<tr><td colspan="2"><div class="warnbox" style="margin-top:6px">Persyaratan wajib belum dipenuhi. Apakah anda yakin untuk menerima siswa tersebut sebagai siswa aktif?</div></td></tr>'; $fform->reg['btnlabel_u_y']=' Ya '; $fform->reg['btnlabel_u_n']='Tidak'; } $s.='</table>'; */ //$fform->dlg('<div style="height:20px">Terima calon siswa berikut sebagai siswa aktif.</div>',$s); $fform->fc('Terima calon siswa berikut ini:'); $fform->fl('Nama', '<b>' . $r['nama'] . '</b>'); $fform->fl('No pendaftaran', $r['nopendaftaran']); $fform->fc('sebagai siswa aktif pada:'); $fform->fl('Departemen', departemen_name($r['departemen'])); $fform->fl('Angkatan', angkatan_name($angkatan)); $fform->fi('No Induk', iText('nis', $r['nis'], 'width:120px')); $fform->fi('NISN', iText('nisn', $r['nisn'], $fform->rwidths)); hiddenval('status', 1); hiddenval('angkatan', $angkatan); //if($cs>1) echo '<tr><td colspan="2"><div class="warnbox">Persyaratan wajib belum dipenuhi. Apakah anda yakin untuk menerima siswa tersebut sebagai siswa aktif?</div></td></tr>'; } else { $fform->dlgw('Pembatalan penerimaan siswa ini juga menghapus data siswa aktif.', 'Apakah anda yakin untuk membatalkan penerimaan siswa:<br/><b>' . $r['nama'] . '</b>?'); hiddenval('nis', 0); hiddenval('nisn', 0); hiddenval('status', 0); hiddenval('angkatan', 0); } $fform->foot(); }