if($opt=='a'||$opt=='u'||$opt=='d'){ $q=false; if($opt=='a'){ // add $q=dbInsert($dbtable,$inp); } else if($opt=='u') { // edit $q=dbUpdate($dbtable,$inp,"replid='$cid'"); } else if($opt=='d'){ // delete $q=dbDel($dbtable,"replid='$cid'"); } $fform->notif($q); } else { if($opt=='uf'||$opt=='df'){ // Prepocessing form $r=dbSFA("*",$dbtable,"W/replid='$cid'"); } else { } $fform->head(); if($opt=='af' || $opt=='uf'){ require_once(MODDIR.'control.php'); // Add or Edit form $fform->fi('Kode',iText('kode',$r['kode'],"width:60px")); $fform->fi('Jenis buku',iText('nama',$r['nama'],$fform->rwidths)); $fform->fa('Keterangan',iTextarea('keterangan',$r['keterangan'],$fform->rwidths,3)); } else if($opt=='df'){ // Delete form $fform->dlg_del('['.$r['kode'].'] '.$r['nama']); } $fform->foot(); } ?>
$inp=app_form_gpost('klasifikasi-kode','klasifikasi','pengarang','callnumber','penerjemah','editor','penerbit','tahunterbit','kota','isbn','issn','bahasa','seri','volume','edisi','jenisbuku','photo','deskripsi','halaman','dimensi'); $inp['judul']=gpost('judul1').'`'.gpost('judul2'); if($opt=='a'||$opt=='u'||$opt=='d'){ $q=false; $ec=0; if($opt=='a'){ // add $q=dbInsert($dbtable,$inp); $cid=mysql_insert_id(); } else if($opt=='u') { // edit $q=dbUpdate($dbtable,$inp,"replid='$cid'"); } else if($opt=='d'){ // delete $q=dbDel($dbtable,"replid='$cid'"); $q=dbDel("pus_buku","katalog='$cid'"); } echo $cid; $fform->notif($q); } else { if($opt=='uf'||$opt=='df'){ // Prepocessing form $r=dbSFA("*",$dbtable,"W/replid='$cid'"); } else { $r=array(); } $fform->head(); if($opt=='df'){ // Delete form $fform->dlg_del(buku_judul($r['judul'])); } $fform->foot(); } ?>
if ($opt == 'u') { // edit $q = dbUpdate($dbtable, $inp, "replid='{$cid}'"); } else { if ($opt == 'd') { // delete $q = dbDel($dbtable, "replid='{$cid}'"); } } } $fform->notif($q); } else { if ($opt == 'uf' || $opt == 'df') { // Prepocessing form $r = dbSFA("*", $dbtable, "W/replid='{$cid}'"); } else { } $fform->head(); if ($opt == 'af' || $opt == 'uf') { require_once MODDIR . 'control.php'; // Add or Edit form $fform->fi('Nama', iText('nama', $r['nama'], $fform->rwidths)); $fform->fa('Keterangan', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 3)); } else { if ($opt == 'df') { // Delete form $fform->dlg_del($r['kode']); } } $fform->foot(); }
$q = dbUpdate($dbtable, $inp, "replid='{$cid}'"); } else { if ($opt == 'd') { // delete $q = dbDel($dbtable, "replid='{$cid}'"); $q &= dbDel("psb_setbiaya", "krit='{$cid}'"); $q &= dbUpdate("psb_calonsiswa", array('kriteria' => 0), "kriteria='{$cid}'"); } } } $fform->notif($q); } else { if ($opt == 'uf' || $opt == 'df') { // Prepocessing form $r = dbSFA("*", $dbtable, "W/replid='{$cid}'"); } else { } $fform->head(); if ($opt == 'af' || $opt == 'uf') { require_once MODDIR . 'control.php'; // Add or Edit form $fform->fi('Nama kriteria', iText('kriteria', $r['kriteria'], $fform->rwidths)); $fform->fa('Keterangan', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 3)); } else { if ($opt == 'df') { // Delete form $fform->dlg_del($r['kriteria']); } } $fform->foot(); }
$db = new xdb("aka_mutasi"); $db->field("aka_mutasi:replid,jenismutasi,siswa,tanggal,keterangan", "aka_siswa:nis as snis,nama as ssiswa"); $db->join("siswa", "aka_siswa"); $db->where("aka_mutasi.siswa='{$cid}'"); $r = $db->gofetch(); } else { $r = array(); $r['tanggal'] = date("Y-m-d"); } $fform->dimension(500); $fform->head(); if ($opt == 'af' || $opt == 'uf') { require_once MODDIR . 'control.php'; // Add or Edit form $jenismutasi = jenismutasi_opt(); //$fform->fl('Departemen',departemen_name($r['departemen'])); $s = '<button id="mutasi_siswa_btn" title="Cari" class="btn" style="float:left" onclick="mutasi_siswa_formlist()"><div class="bi_srcb"> </div></button>'; $fform->fi('Siswa', iText('snis', $r['snis'], 'float:left;margin-right:4px;width:80px', '', 'readonly', 'onclick="mutasi_siswa_formlist()"') . iText('ssiswa', $r['ssiswa'], 'float:left;margin-right:4px;width:' . ($fform->rwidth - 110) . 'px', '', 'readonly', 'onclick="mutasi_siswa_formlist()"') . $s); hiddenval('siswa', $r['siswa']); $s = '<button title="Tambah jenis mutasi" class="btn" style="float:left" onclick="mutasi_jenismutasi_form(\'af\')"><div class="bi_addb"> </div></button>'; $fform->fi('Tanggal', inputTanggal('tanggal', $r['tanggal'])); $fform->fi('Jenis mutasi', iSelect('jenismutasi', $jenismutasi, $r['jenismutasi'], 'float:left;margin-right:4px;min-width:80px') . $s); $fform->fa('Keterangan', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 4)); } else { if ($opt == 'df') { // Delete form $fform->dlg_del($r['ssiswa']); } } $fform->foot(); }
// delete $q = dbDel($dbtable, "replid='{$cid}'"); } } } $fform->notif($q); } else { if ($opt == 'uf' || $opt == 'df') { // Prepocessing form $r = dbSFA("*", $dbtable, "W/replid='{$cid}'"); } else { $r['tanggal1'] = date("Y-m-d"); $r['tanggal2'] = date("Y-m-d"); } $fform->dimension(450, 100); $fform->head(); if ($opt == 'af' || $opt == 'uf') { require_once MODDIR . 'control.php'; // Add or Edit form $fform->fi('Aktivitas', iText('aktivitas', $r['aktivitas'], $fform->rwidths)); $fform->fi('Tanggal mulai', inpDate('tanggal1', $r['tanggal1'])); $fform->fi('Tanggal selesai', inpDate('tanggal2', $r['tanggal2'])); $fform->fa('Keterangan', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 10)); } else { if ($opt == 'df') { // Delete form $fform->dlg_del($r['aktivitas']); } } $fform->foot(); }
} } } $fform->notif($q); } else { if ($opt == 'uf' || $opt == 'df') { // Prepocessing form $r = dbSFA("*", $dbtable, "W/replid='{$cid}'"); } else { $r['departemen'] = $inp['departemen']; } $fform->head(); if ($opt == 'af' || $opt == 'uf') { require_once MODDIR . 'control.php'; // Add or Edit form $fform->fl('Departemen', departemen_name($r['departemen'])); $fform->fi('Angkatan', iText('angkatan', $r['angkatan'], 'width:60px')); $fform->fa('Keterangan', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 3)); } else { if ($opt == 'df') { // Delete form if (dbSRow("aka_siswa", "W/angkatan='{$cid}'") > 0) { $fform->reg['dlg_del'] = '<idata> masih digunakan. Apakah anda yakin untuk menghapus <idata> <data>?'; $fform->dlg_delw($r[$fmod], 'Data-data kelas dan siswa yang termasuk dalam tingkat ini juga akan dihapus. Data yang sudah dihapus tidak dapat dikembalikan.'); } else { $fform->dlg_del($r[$fmod]); } } } $fform->foot(); }
$q = dbUpdate($dbtable, $inp, "replid='{$cid}'"); } else { if ($opt == 'd') { // delete $q = dbDel($dbtable, "replid='{$cid}'"); $q &= dbDel("psb_setbiaya", "krit='{$cid}'"); $q &= dbUpdate("psb_calonsiswa", array('golongan' => 0), "golongan='{$cid}'"); } } } $fform->notif($q); } else { if ($opt == 'uf' || $opt == 'df') { // Prepocessing form $r = dbSFA("*", $dbtable, "W/replid='{$cid}'"); } else { } $fform->head(); if ($opt == 'af' || $opt == 'uf') { require_once MODDIR . 'control.php'; // Add or Edit form $fform->fi('Nama golongan', iText('golongan', $r, $fform->rwidths)); $fform->fa('Keterangan', iTextarea('keterangan', $r, $fform->rwidths, 3)); } else { if ($opt == 'df') { // Delete form $fform->dlg_del($r['golongan']); } } $fform->foot(); }
$q = dbUpdate($dbtable, $inp, "replid='{$cid}'"); } else { if ($opt == 'd') { // delete $q = dbDel($dbtable, "replid='{$cid}'"); } } } $fform->notif($q); } else { if ($opt == 'uf' || $opt == 'df') { // Prepocessing form $r = dbSFA("*", $dbtable, "W/replid='{$cid}'"); } else { } $fform->head(); if ($opt == 'af' || $opt == 'uf') { // add n update form require_once MODDIR . 'control.php'; // Add or Edit form $fform->fi('Diskon (%)', iText('nilai', $r['nilai'], 'width:40px') . ' %'); $fform->fi('Diskon (Rupiah)', iText('nilai2', $r['nilai2'])); $fform->fa('Keterangan', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 3)); } else { if ($opt == 'df') { // Delete form $fform->dlg_del($r['nilai']); } } $fform->foot(); }
} $fform->notif($q); } else { if ($opt == 'uf' || $opt == 'df') { // Prepocessing form $r = dbSFA("*", $dbtable, "W/replid='{$cid}'"); } else { $r = app_form_gpost('departemen', 'tahunajaran', 'nama', 'keterangan'); } $fform->head(); if ($opt == 'af' || $opt == 'uf') { require_once MODDIR . 'control.php'; // Add or Edit form $fform->fl('Departemen', departemen_name($r['departemen'])); $fform->fl('Tahun ajaran', tahunajaran_name($r['tahunajaran'])); $fform->fi('Nama Kelompok', iText('nama', $r['nama'], $fform->rwidths)); $fform->fa('Keterangan', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 3)); } else { if ($opt == 'df') { // Delete form if (0 > 0) { $fform->reg['dlg_del'] = 'Tingkat masih digunakan. Apakah anda yakin untuk menghapus <idata> <data>?'; $fform->dlg_delw($r[$fmod], 'Data-data kelas dan siswa yang termasuk dalam tingkat ini juga akan dihapus. Data yang sudah dihapus tidak dapat dikembalikan.'); } else { $fform->dlg_del(matapelajaran_name($r['nama'])); } //$fform->dlg_del($r['nilai']); } } $fform->foot(); }
// delete $q = dbDel($dbtable, "replid='{$cid}'"); } } } $fform->notif($q); } else { if ($opt == 'uf' || $opt == 'df') { // Prepocessing form $r = dbSFA("*", $dbtable, "W/replid='{$cid}'"); $r['passwd'] = ''; } else { $r = farray('nama', 'uname', 'passwd', 'rpasswd', 'keterangan'); } $fform->dimension(450, 120); $fform->head(); if ($opt == 'af' || $opt == 'uf') { require_once MODDIR . 'control.php'; // Add or Edit form $fform->fi('Nama anggota', iText('nama', $r['nama'], $fform->rwidths)); $fform->fi('User ID', iText('uname', $r['uname'], $fform->rwidths)); $fform->fi('Password', iPswd('passwd', $r['passwd'], $fform->rwidths)); $fform->fi('Konfirmasi password', iPswd('rpasswd', $r['rpasswd'], $fform->rwidths)); } else { if ($opt == 'df') { // Delete form $fform->dlg_del($r['uname']); } } $fform->foot(); }
$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".'); } } } $fform->foot(); }
} else { if ($opt == 'd') { // delete $q = dbDel($dbtable, "replid='{$cid}'"); } } } $fform->notif($q); } else { if ($opt == 'uf' || $opt == 'df') { // Prepocessing form $r = dbSFA("*", $dbtable, "W/replid='{$cid}'"); } else { $r['rak'] = gpost('rak'); } $fform->head(); if ($opt == 'af' || $opt == 'uf') { require_once MODDIR . 'control.php'; // Add or Edit form $fform->fl('Gudang', rak_name($r['rak']), $fform->rwidths); $fform->fi('Kode', iText('kode', $r['kode'], "width:60px")); $fform->fi('Nama', iText('nama', $r['nama'], $fform->rwidths)); $fform->fa('Keterangan', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 3)); } else { if ($opt == 'df') { // Delete form $fform->dlg_del($r['periode']); } } $fform->foot(); }
if ($opt == 'uf' || $opt == 'df') { // Prepocessing form $r = dbSFA("*", $dbtable, "W/replid='{$cid}'"); } else { $r = farray('judul', 'penyelenggara', 'tempat', 'tgl1', 'tgl2', 'pembicara', 'peserta', 'jenistraining'); } $fform->ptop = 50; $fform->head(); if ($opt == 'af' || $opt == 'uf') { require_once MODDIR . 'control.php'; // Add or Edit form $fform->fi('Judul', iText('judul', $r, $fform->rwidths)); $fform->fi('Penyelenggara', iText('penyelenggara', $r, $fform->rwidths)); $fform->fi('Tempat', iText('tempat', $r, $fform->rwidths)); $fform->fi('Tanggal', inputDate('tgl1', $r)); $fform->fi('', inputDate('tgl2', $r)); $fform->fi('Pembicara', iText('pembicara', $r, $fform->rwidths)); $fform->fi('Jenis training', iSelect('jenistraining', jenistraining_r($a), $r)); $fform->fa('Peserta', iTextarea('peserta', $r, $fform->rwidths, 5)); } else { if ($opt == 'df') { // Delete form $fform->dlg_del($r['judul']); } } $fform->foot(); } exit; ?>
$satuan = satuan_r($sat); $tingkatbuku = tingkatbuku_r($tingb); } $fform->ptop = 20; $fform->head(); if ($opt == 'uf') { require_once MODDIR . 'control.php'; // Add or Edit form hiddenval('katalog', $r['katalog']); $fform->fg('Data buku'); $fform->fl('Judul', '<b>' . buku_judul($rk['judul']) . '</b>'); hiddenval('nbuku', 0); $fform->fi('ID buku', iText('idbuku', $r['idbuku'], $fform->rwidths, '', '', 'disabled')); //hiddenval('idbuku',$r['idbuku']); $fform->fi('Barkode', iText('barkode', $r['barkode'], $fform->rwidths, '', '', 'disabled')); $fform->fi('Callnumber', iText('callnumber', $r['callnumber'], $fform->rwidths)); $fform->fi('Sumber', iRadio('sumber1', 'sumber', 0, 'Beli', $r['sumber'], '', 'onclick="katalog_buku_getkode(' . $cid . ')"')); $fform->fi('', iRadio('sumber2', 'sumber', 1, 'Pemberian', $r['sumber'], '', 'onclick="katalog_buku_getkode(' . $cid . ')"')); $fform->fi('Harga', iSelect('satuan', $satuan, $sat) . ' ' . iText('harga', $r['harga'], 'width:120px')); $fform->fi('Tanggal diperoleh', inputTanggal('tanggal', $r['tanggal'])); $fform->fg('Alokasi buku'); $fform->fi('Lokasi', iSelect('tlokasi', $lokasi, $lok, '', 'katalog_buku_getkode(' . $cid . ')')); $fform->fi('Tingkat', iSelect('ttingkatbuku', $tingkatbuku, $tingb, '', 'katalog_buku_getkode(' . $cid . ')')); } else { if ($opt == 'df') { // Delete form $fform->dlg_del($r['idbuku']); } } $fform->foot(); }
// delete $q = dbDel($dbtable, "replid='{$cid}'"); } } } $fform->notif($q); } else { if ($opt == 'uf' || $opt == 'df') { // Prepocessing form } else { } $fform->lwidth = 150; $fform->fwidth = 500; $fform->ptop = 100; $fform->head(); if ($opt == 'af' || $opt == 'uf') { require_once MODDIR . 'control.php'; // Add or Edit form $fform->fg('Ubah Password'); $fform->fi('Password lama', iText('oldpassword', '', $fform->rwidths)); $fform->fi('Password baru', iPswd('newpassword', '', $fform->rwidths)); $fform->fi('Ulangi password baru', iPswd('rnewpassword', '', $fform->rwidths)); } else { if ($opt == 'df') { // Delete form $fform->reg['dlg_del'] = 'Apakah anda yakin untuk menghapus <idata> <data> bulan?'; $fform->dlg_del($r['cicilan']); } } $fform->foot(); }
$r = app_form_gpost('departemen', 'tahunajaran', 'pegawai', 'pelajaran', 'aktif', 'keterangan'); $r['pelajaran'] = gpost('spelajaran'); $r['aktif'] = '1'; } $fform->dimension(450); $fform->head(); if ($opt == 'af' || $opt == 'uf') { //$fform->fl('Departemen',departemen_name($r['departemen'])); //$fform->fl('Tahun ajaran',tahunajaran_name($r['tahunajaran'])); //$fform->fi('Status',iSelect('aktif',array('1'=>'Aktif','0'=>'Tidak aktif'),$r['aktif'])); //$fform->fa('Kode',iText('kode',$r['kode'],'width:40px')); require_once MODDIR . 'control.php'; // Add or Edit form $fform->fi('Mata Pelajaran', iSelect('pelajaran', pelajaran_opt(gpost('tahunajaran')), $r['pelajaran'])); $fform->fi('Pegawai', app_form_getpegawai('pegawai', $r)); $fform->fa('Keterangan', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 3)); hiddenval('aktif', 1); } else { if ($opt == 'df') { // Delete form if (0 > 0) { $fform->reg['dlg_del'] = 'Data <idata> masih digunakan. Apakah anda yakin untuk menghapus <idata> <data>?'; $fform->dlg_delw($r['nama'], 'Data-data kelas dan siswa yang termasuk dalam tingkat ini juga akan dihapus. Data yang sudah dihapus tidak dapat dikembalikan.'); } else { $fform->dlg_del($r['nama']); } //$fform->dlg_del($r['nilai']); } } $fform->foot(); }
if ($opt == 'd') { // delete $q = dbDel($dbtable, "replid='{$cid}'"); $q = dbDel("psb_calonsiswa_syarat", "syarat='{$cid}'"); } } } $fform->notif($q); } else { if ($opt == 'uf' || $opt == 'df') { // Prepocessing form $r = dbSFA("*", $dbtable, "W/replid='{$cid}'"); } else { $r = farray('syarat', 'wajib', 'keterangan'); $r['wajib'] = '1'; } $fform->head(); if ($opt == 'af' || $opt == 'uf') { require_once MODDIR . 'control.php'; // Add or Edit form $fform->fi('Persyaratan', iText('syarat', $r['syarat'], $fform->rwidths, '', '', $cid == '1' || $cid == '2' ? 'disabled' : '')); $fform->fi('Sifat', iSelect('wajib', array('1' => 'Wajib', '0' => 'Tidak wajib'), $r['wajib'])); $fform->fa('Keterangan', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 3)); } else { if ($opt == 'df') { // Delete form $fform->dlg_del($r['syarat']); } } $fform->foot(); }