$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(); }
} //jt_name($jtrans); $fform->head(); if ($opt == 'af' || $opt == 'uf') { require_once MODDIR . 'control.php'; // Add or Edit form hiddenval('trans_pembayaran', $pid); hiddenval('trans_jenis', $jtrans); hiddenval('trans_nomer', $r['nomer']); hiddenval('trans_ct', $r['ct']); $fform->fl('<b>Nomor</b>', '<b><span id="box_trans_nomer">' . $no['nomer'] . '</span></b>'); $fform->fi('Tanggal', inputTanggal('trans_tanggal', $r['tanggal'], 'transaksi_getnomer()')); $fform->fi('Rek. Kas/Bank', iSelect('rekkas', $rekasbank, $r['rekkas'], $fform->rwidths, 'transaksi_getnomer()')); $fform->fg('pada'); $fform->fi('Rek. perkiraan', iSelect('rekitem', $rekening, $r['rekitem'], $fform->rwidths)); $fform->fa('Uraian', iTextArea('uraian', $r['uraian'], $fform->rwidths, 3)); $fform->fi('Nominal', iTextC('nominal', $r['nominal'], 'width:120px')); } else { if ($opt == 'df') { // Delete form $fform->rheight = ''; $fform->fc('Apakah anda yakin untuk menghapus data transaksi ini?'); $fform->fl('Nomor', '<b>' . $r['nomer'] . '</b>'); $fform->fl('Tanggal', fftgl($r['tanggal'])); $fform->fl('Uraian', $r['uraian']); } } if ($opt == 'af') { $s = '<div style="float:right;margin-right:-20px">' . iCheckx('trans_print', 'Cetak bukti pembayaran', 0, 'float:right') . '</div>'; //$fform->optional_button=$s; }
<?php require_once(MODDIR.'fform/fform.php'); $opt=gpost('opt');$cid=gpost('cid');if($cid=='')$cid=0; // form Module $fmod='stocktake_note'; $dbtable=stocktake_ctable(); $fform=new fform($fmod,$opt,$cid); $inp=app_form_gpost('note'); if($opt=='a'||$opt=='u'||$opt=='d'){ $q=false; $q=dbUpdate($dbtable,$inp,"replid='$cid'"); //$fform->notif($q); if($q) echo nl2br($inp['note']); else echo "-0-"; } else { $r=dbSFA("*",$dbtable,"W/replid='$cid'"); $t1=mysql_query("SELECT pus_katalog.judul FROM pus_buku LEFT JOIN pus_katalog ON pus_katalog.replid=pus_buku.katalog WHERE pus_buku.replid='".$r['buku']."' LIMIT 0,1"); $r1=mysql_fetch_array($t1); $fform->head(); if($opt=='af' || $opt=='uf'){ require_once(MODDIR.'control.php'); // Add or Edit form $fform->fc('Tambahkan catatan untuk item:'); $fform->fl('Barkode',$r['barkode']); $fform->fl('Judul',buku_judul($r1['judul'])); $fform->fa('Keterangan',iTextarea('note',$r['note'],$fform->rwidths,3)); } $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 { } $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('Nama Lokasi', iText('nama', $r['nama'], $fform->rwidths)); $fform->fa('Alamat', iTextarea('alamat', $r['alamat'], $fform->rwidths, 3)); $fform->fi('Kontak', iText('kontak', $r['kontak'], $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(); }
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; ?>
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('No ID member',iText('nid',$r['nid'],$fform->rwidths)); $fform->fi('Nama',iText('nama',$r['nama'],$fform->rwidths)); $fform->fi('Kontak',iText('kontak',$r['kontak'],$fform->rwidths)); $fform->fa('Alamat',iTextarea('alamat',$r['alamat'],$fform->rwidths,3)); } else if($opt=='df'){ // Delete form $fform->dlg_del($r['nama']); } $fform->foot(); } ?>
} } $fform->notif($q); } else { if ($opt == 'uf' || $opt == 'df') { // Prepocessing form $r = dbSFA("*", $dbtable, "W/replid='{$cid}'"); } else { $r = farray('nama', 'tanggal1', 'tanggal2', 'keterangan', 'efektif'); $r['efektif'] = 0; } $fform->ptop = 60; $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 Kegiatan',iText('nama',$r['nama'],$fform->rwidths)); $fform->fi('Tanggal', inputTanggal('tanggal1', $r['tanggal1'])); $fform->fi('sampai', inputTanggal('tanggal2', $r['tanggal2'])); $fform->fi('', iCheckx('efektif', 'Hari efektif', $r['efektif'], 'margin:6px 0px')); $fform->fa('Uraian kegiatan', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 8)); } else { if ($opt == 'df') { // Delete form $fform->dlg_del($r['nama']); } } $fform->foot(); }
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}'"); $r['passwd'] = ''; } else { $r = farray('nama', 'keterangan', 'ufile', 'fname'); } $fform->dimension(450, 120); $fform->head(); if ($opt == 'af' || $opt == 'uf') { require_once MODDIR . 'control.php'; // Add or Edit form $fform->fi('Judul', iText('nama', $r['nama'], $fform->rwidths)); $fform->fa('Deskripsi', iTextarea('keterangan', $r['keterangan'], $fform->rwidths, 3)); app_form_fu(); } else { if ($opt == 'df') { // Delete form $fform->dlg_del($r['nama']); } } $fform->foot(); }