<?php require_once MODDIR . 'fform/fform.php'; $opt = gpost('opt'); $cid = gpost('cid'); if ($cid == '') { $cid = 0; } // form Module $fmod = 'discount'; $dbtable = 'psb_disctunai'; $fform = new fform($fmod, $opt, $cid, 'Diskon tunai'); // $inp = app_form_gpost('nilai','keterangan'); $inp = app_form_gpost('nilai', 'nilai2', 'keterangan'); 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);
<?php require_once(MODDIR.'fform/fform.php'); $opt=gpost('opt');$cid=gpost('cid');if($cid=='')$cid=0; // form Module $fmod="katalog_buku"; $dbtable="pus_buku"; $fform=new fform($fmod,$opt,$cid,'Koleksi'); $inp=app_form_gpost('katalog','idbuku','barkode','callnumber','sumber','harga','satuan','tanggal'); //$inp['urut']=$l; //$inp['idbuku']=buku_getidbuku($lok,$tingb,0,$l); //$inp['barkode']=buku_idbukutobarkode($inp['idbuku']); $nunit=intval(gpost('nbuku')); $inp['lokasi']=gpost('tlokasi'); $inp['tingkatbuku']=gpost('ttingkatbuku'); $inp['tahun']=date("Y"); if($opt=='a'||$opt=='u'||$opt=='d'){ $q=false; if($opt=='a'){ // add if($nunit>1){ $lok=$inp['lokasi']; $tingb=$inp['tingkatbuku']; $data=array('kodelokasi'=>$inp['lokasi'],'kodetingkat'=>$inp['tingkatbuku'],'sumber'=>$inp['sumber']); for($i=0;$i<$nunit;$i++){ $inp['urut']=buku_getlasturut()+1; $data['nomorauto']=$inp['urut']; $inp['idbuku']=buku_makeid($data); $inp['barkode']=buku_makebarkode($data);; $q=dbInsert($dbtable,$inp); } } else { $inp['urut']=buku_getlasturut()+1;
<?php require_once MODDIR . 'fform/fform.php'; $opt = gpost('opt'); $cid = gpost('cid'); if ($cid == '') { $cid = 0; } appmod_use('aka/tahunajaran', 'aka/pelajaran'); // form Module $fmod = 'guru'; $dbtable = 'aka_guru'; $fform = new fform($fmod, $opt, $cid); $inp = app_form_gpost('tahunajaran', 'pegawai', 'pelajaran', 'aktif', 'keterangan'); if ($opt == 'a' || $opt == 'u' || $opt == 'd') { //db operation : add , update, delete $q = false; if ($opt == 'a') { // add $q = dbInsert($dbtable, $inp); $y = mysql_query("SELECT * FROM admin WHERE pegawai='" . $inp['pegawai'] . "'"); // $y=mysql_query("SELECT * FROM admin WHERE pegawai='".$inp['pegawai']."'"); if (mysql_num_rows($y) == 0) { $y = mysql_query("SELECT hrd_pegawai.nip,hrd_pegawai.nama FROM hrd_pegawai WHERE hrd_pegawai.replid='" . $inp['pegawai'] . "'"); $u = mysql_fetch_array($y); $q = mysql_query("INSERT INTO admin SET app='gur', nama='" . $u['nama'] . "', uname='" . $u['nip'] . "', passwd='" . md5('admin') . "', pegawai='" . $inp['pegawai'] . "', level='2'"); } } else { if ($opt == 'u') { // edit $q = dbUpdate($dbtable, $inp, "replid='{$cid}'");
<?php require_once(MODDIR.'fform/fform.php'); require_once(MODDIR.'xform/xform.php'); $opt=gpost('opt');$cid=gpost('cid');if($cid=='')$cid=0; require_once(MODDIR.'control.php'); // form Module $fmod='bahasa'; $dbtable='pus_katalog'; $fform=new fform($fmod,$opt,$cid); $xform=new xform($fmod); $db=new xdb("pus_katalog"); $db->field("pus_katalog:replid,judul,callnumber,penerjemah,editor,tahunterbit,kota,isbn,issn,seri,volume,edisi,photo","pus_pengarang:nama as npengarang","pus_klasifikasi:kode,nama as nklas","pus_bahasa:nama as nbahasa","pus_jenisbuku:nama as njenis"); $db->join("pengarang","pus_pengarang"); $db->join("klasifikasi","pus_klasifikasi"); $db->join("bahasa","pus_bahasa"); $db->join("jenisbuku","pus_jenisbuku"); $db->where_and("pus_katalog.replid='$cid'"); $t=$db->query(); $r=mysql_fetch_array($t); $terbitan=''; if($r['penerbit']!=0)$terbitan=penerbit_name($r['penerbit']); if($r['kota']!=''){ if($terbitan!='')$terbitan.=', '; $terbitan.=$r['kota']; } if($r['tahunterbit']!=''){ if($terbitan!='')$terbitan.=', '; $terbitan.=$r['tahunterbit']; } $tersedia=mysql_num_rows(mysql_query("SELECT * FROM pus_buku WHERE katalog='$cid' AND status='1'"));
<?php require_once MODDIR . 'fform/fform.php'; $opt = gpost('opt'); $cid = gpost('cid'); if ($cid == '') { $cid = 0; } appmod_use('aka/tahunajaran'); // form Module $fmod = 'semester'; $dbtable = 'aka_semester'; $fform = new fform($fmod, $opt, $cid); $inp = app_form_gpost('tahunajaran', 'nama', 'keterangan'); $tajar = $inp['tahunajaran']; if ($opt == 'a' || $opt == 'u' || $opt == 'd') { $q = false; if ($opt == 'a') { // add $q = mysql_query("UPDATE aka_semester SET aktif='0' WHERE tahunajaran='{$tajar}'"); $inp['urut'] = urut_getlast($dbtable) + 1; $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}'"); $q &= dbDel("aka_kelas", "tingkat='{$cid}'");
<?php require_once MODDIR . 'fform/fform.php'; $opt = gpost('opt'); $cid = gpost('cid'); if ($cid == '') { $cid = 0; } appmod_use('aka/jenismutasi'); // form Module $fmod = 'mutasi'; $dbtable = 'aka_mutasi'; $fform = new fform($fmod, $opt, $cid); $inp = app_form_gpost('jenismutasi', 'siswa', 'tanggal', 'keterangan'); if ($opt == 'a' || $opt == 'u' || $opt == 'd') { $q = false; if ($opt == 'a') { // add $q = dbInsert($dbtable, $inp); $q = dbQSql("UPDATE aka_siswa SET aktif='3' WHERE replid='" . $inp['siswa'] . "'"); } else { if ($opt == 'u') { // edit $q = dbUpdate($dbtable, $inp, "siswa='{$cid}'"); } else { if ($opt == 'd') { // delete $q = dbDel($dbtable, "siswa='{$cid}'"); $q = dbQSql("UPDATE aka_siswa SET aktif='1' WHERE replid='{$cid}'"); } }
<?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(); } ?>
<?php require_once MODDIR . 'fform/fform.php'; $opt = gpost('opt'); $cid = gpost('cid'); if ($cid == '') { $cid = 0; } $ssid = session_id(); // form Module $fmod = 'sirkulasi_peminjaman'; $dbtable = 'pus_peminjaman'; $fform = new fform($fmod, $opt, $cid, 'Data Peminjaman'); $fform->globalkey = '0'; $inp = app_form_gpost('tanggal1', 'tanggal2', 'keterangan'); $inp['member'] = gpost('member_id'); $inp['mtipe'] = gpost('member_tipe'); if ($opt == 'a' || $opt == 'u' || $opt == 'd') { $q = false; $ec = 0; if ($opt == 'a') { // add $t = mysql_query("SELECT * FROM pus_tpjm WHERE ssid='{$ssid}'"); while ($r = mysql_fetch_array($t)) { $inp['buku'] = $r['buku']; $q = dbInsert($dbtable, $inp); if ($q) { dbUpdate("pus_buku", array('status' => 0), "replid='" . $r['buku'] . "'"); dbDel("pus_tpjm", "replid='" . $r['replid'] . "'"); } }
<?php require_once(MODDIR.'fform/fform.php'); $opt=gpost('opt');$cid=gpost('cid');if($cid=='')$cid=0; // form Module $fmod='tools_idbuku'; $dbtable='pus_setting'; $fform=new fform($fmod,$opt,$cid,'!Format Nomor ID Item'); $inp=app_form_gpost('nilai'); 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'"); if($q && gpost('updatebuku')=='1'){ $t1=mysql_query("SELECT * FROM pus_buku"); while($r1=mysql_fetch_array($t1)){ $data=array('kodelokasi'=>$r1['lokasi'],'kodetingkat'=>$r1['tingkatbuku'],'sumber'=>$r1['sumber'],'nomorauto'=>$r1['urut']); $idbuku=buku_makeid($data); $q=dbUpdate("pus_buku",array('idbuku'=>$idbuku),"replid='".$r1['replid']."'"); } } } 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'");
<?php session_start(); require_once MODDIR . 'fform/fform.php'; require_once MODDIR . 'xtable/xtable.php'; $opt = gpost('opt'); $cid = gpost('cid'); if ($cid == '') { $cid = 0; } appmod_use('keu/rekening'); $sesid = session_id(); // form Module $fmod = "inventory_penerimaan"; $dbtable = "keu_transaksi"; $fform = new fform($fmod, $opt, $cid, 'penerimaan barang'); $fform->globalkey = '0'; if ($opt == 'a' || $opt == 'u' || $opt == 'd') { $q = false; if ($opt == 'a') { // add $nomerbukti = gpost('nomerbukti'); $kodebrg = gpost('kodebrg'); $namabrg = gpost('namabrg'); $unit = gpost('unit'); $satuan = gpost('satuan'); $pid = gpost('trans_pembayaran'); $jt = gpost('trans_jenis'); $no = gpost('trans_nomer'); $ct = gpost('trans_ct'); $tgl = gpost('trans_tanggal');
<?php session_start(); require_once MODDIR . 'fform/fform.php'; require_once MODDIR . 'xtable/xtable.php'; $opt = gpost('opt'); $cid = gpost('cid'); if ($cid == '') { $cid = 0; } appmod_use('keu/rekening'); $sesid = session_id(); // form Module $fmod = "pembayaran"; $dbtable = "keu_transaksi"; $fform = new fform($fmod, $opt, $cid); if ($opt == 'a' || $opt == 'u' || $opt == 'd') { $q = false; if ($opt == 'a') { // add $pid = gpost('trans_pembayaran'); $jt = gpost('trans_jenis'); $no = gpost('trans_nomer'); $ct = gpost('trans_ct'); $tgl = gpost('trans_tanggal'); $rekkas = gpost('rekkas'); $rekitem = gpost('rekitem'); $urai = gpost('uraian'); $nom = gpost('nominal'); $rekd = $rekkas; $rekk = $rekitem;
<?php require_once MODDIR . 'fform/fform.php'; $opt = gpost('opt'); $cid = gpost('cid'); if ($cid == '') { $cid = 0; } // form Module $fmod = "pendataan_saudara"; $dbtable = "psb_tmp_saudara"; $fform = new fform($fmod, $opt, $cid, 'Data saudara calon siswa'); $inp['sesid'] = session_id(); $inp['nama'] = gpost('psnama'); $inp['tgllahir'] = gpost('pstgllahir'); $inp['sekolah'] = gpost('pssekolah'); 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}'"); } }
<?php require_once MODDIR . 'fform/fform.php'; $opt = gpost('opt'); $cid = gpost('cid', 0); // form Module $fmod = 'status'; $dbtable = 'hrd_m_status'; $fform = new fform($fmod, $opt, $cid, 'status pegawai'); $inp = app_form_gpost('status', 'reminder', 'keterangan'); if ($opt == 'a' || $opt == 'u' || $opt == 'd') { $q = false; if ($opt == 'a') { // add $inp['urut'] = urut_getlast($dbtable) + 1; $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}'"); } } } $fform->notif($q); } else { if ($opt == 'uf' || $opt == 'df') {
session_start(); require_once MODDIR . 'fform/fform.php'; require_once MODDIR . 'xtable/xtable.php'; $opt = gpost('opt'); $cid = gpost('cid'); if ($cid == '') { $cid = 0; } appmod_use('keu/rekening', 'keu/budget'); require_once MODDIR . 'control.php'; $sesid = session_id(); // form Module $fmod = "transaksi"; $dbtable = "keu_transaksi"; $fform = new fform($fmod, $opt, $cid); if ($opt == 'a' || $opt == 'u' || $opt == 'd') { //add, update, delete $q = false; if ($opt == 'a') { // add $jt = gpost('trans_jenis'); $no = gpost('trans_nomer'); $nobukti = gpost('trans_nobukti'); $ct = gpost('trans_ct'); $tgl = gpost('trans_tanggal'); $bud = gpost('budget'); if ($jt == JT_UMUM) { $urai = gpost('uraian'); $jur = array(); $l = 0;
echo "3"; } } else { echo "2"; } } else { echo "1"; } //echo "UPDATE admin SET passwd='$new' WHERE replid='$cid'"; exit; } // form Module $fmod = "setting"; $dbtable = "Pengaturan"; $admin = admin_get(); $fform = new fform($fmod, $opt, $admin['id'], 'Pengaturan akun'); $fform->reg['title_uf'] = '<idata>'; $inp = app_form_gpost('cicilan', 'keterangan'); 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}'");
} else { if ($opt == 'af') { $fform = new fform($fmod, 'af', $cid, 'Cari item'); $fform->reg['title_af'] = '<idata>'; $fform->reg['btnlabel_a_y'] = 'Pilih yg ditandai'; $fform->reg['btnlabel_a_n'] = 'Batal'; $fform->dimension(500); $fform->ptop = 20; $fform->globalkey = '0'; $fform->head('Pilih Siswa'); echo '<tr><td><div id="box_siswa_pendataan_kelas_list">'; require_once APPDIR . 'siswa_pendataan_kelas_list_get.php'; echo '</div></td></tr>'; $fform->foot(); } else { if ($opt == 'df') { $fform = new fform($fmod, 'df', $cid); $fform->reg['title_df'] = 'Keluarkan Siswa Dari Rombongan Belajar'; $fform->reg['btnlabel_u_n'] = 'Tidak'; $fform->reg['btnlabel_d_y'] = ' Ya '; $fform->head(); $r = dbSFA("*", "aka_siswa_kelas", "W/replid='{$cid}'"); $r1 = dbSFA("nama,nis", "aka_siswa", "W/replid='" . $r['siswa'] . "'"); $fform->fc('Apakah anda yakin untuk mengeluarkan siswa ini dari kelas ' . kelas_name($r['kelas']) . '?'); $fform->fr('Nama', '<b>' . $r1['nama'] . '</b>'); $fform->fr('NIS', '<b>' . $r1['nis'] . '</b>'); $fform->foot(); } } } }
<?php require_once MODDIR . 'fform/fform.php'; $opt = gpost('opt'); $cid = gpost('cid'); if ($cid == '') { $cid = 0; } // form Module $fmod = 'angkatan'; $dbtable = 'aka_angkatan'; $fform = new fform($fmod, $opt, $cid); $inp = app_form_gpost('departemen', 'angkatan', 'keterangan'); 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}'"); $q &= dbDel("aka_siswa", "angkatan='{$cid}'"); } } } $fform->notif($q);
<?php require_once MODDIR . 'fform/fform.php'; $opt = gpost('opt'); $cid = gpost('cid', 0); // form Module $fmod = 'tingkat'; $dbtable = 'hrd_m_tingkat'; $fform = new fform($fmod, $opt, $cid, 'tingkat pegawai'); $inp = app_form_gpost('tingkat', 'keterangan'); if ($opt == 'a' || $opt == 'u' || $opt == 'd') { $q = false; if ($opt == 'a') { // add $inp['urut'] = urut_getlast($dbtable) + 1; $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}'"); } } } $fform->notif($q); } else { if ($opt == 'uf' || $opt == 'df') {
<?php require_once(MODDIR.'fform/fform.php'); $opt=gpost('opt');$cid=gpost('cid');if($cid=='')$cid=0; // form Module $fmod='katalog'; $dbtable='pus_katalog'; $fform=new fform($fmod,$opt,$cid,'Katalog Buku'); $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();
echo "2"; } } else { echo "1"; } // echo "UPDATE admin SET passwd='$new' WHERE replid='$cid'"; // exit(); } else { // form Module $fmod="setting"; $dbtable="Pengaturan"; $admin = admin_get(); $adminid = $admin['id']; $fform=new fform($fmod,$opt,$admin['id'],'Pengaturan'); $fform->reg['title_uf']='<idata>'; if($opt=='u'){ $q=false; $inp=array(); $inp['bahasa']=gpost('bahasa'); log_print($inp['bahasa'].' admin id:'.$adminid); if(gpost('newpassword')!=''){ $inp['password']=gpost('newpassword'); } $q=dbUpdate("admin",$inp,"replid='$adminid'"); $fform->reg['notif_u']='Pengaturan telah disimpan. Silahkan login kembali.'; $fform->notif($q); } else {
<?php require_once MODDIR . 'fform/fform.php'; $opt = gpost('opt'); $cid = gpost('cid'); if ($cid == '') { $cid = 0; } // form Module $fmod = 'katalog_pengarang'; $dbtable = 'pus_pengarang'; $fform = new fform($fmod, $opt, $cid, 'pengarang'); $inp = app_form_gpost('nama', 'keterangan'); if ($opt == 'a' || $opt == 'u' || $opt == 'd') { $q = false; if ($opt == 'a') { // add $q = dbInsert($dbtable, $inp); if ($q) { echo mysql_insert_id() . ';' . $inp['nama']; } } else { if ($opt == 'u') { // edit $q = dbUpdate($dbtable, $inp, "replid='{$cid}'"); } else { if ($opt == 'd') { // delete $q = dbDel($dbtable, "replid='{$cid}'"); } }
<?php require_once MODDIR . 'fform/fform.php'; $opt = gpost('opt'); $cid = gpost('cid'); if ($cid == '') { $cid = 0; } appmod_use('keu/inventory'); // form Module $fmod = "inventory_brg"; $dbtable = "keu_brg"; $fform = new fform($fmod, $opt, $cid, 'barang'); $inp = app_form_gpost('kelompokbrg', 'kode', 'nama', 'tanggal', 'unit', 'satuan', 'keterangan'); 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);
<?php require_once MODDIR . 'fform/fform.php'; $opt = gpost('opt'); $cid = gpost('cid'); if ($cid == '') { $cid = 0; } // form Module $fmod = "pembayaran_data"; $dbtable = "keu_pembayaran"; $fform = new fform($fmod, $opt, $cid, 'Data pembayaran'); $inp = app_form_gpost('nominal', 'cicilan', 'keterangan'); if ($opt == 'a' || $opt == 'u' || $opt == 'd') { $q = false; if ($opt == 'a') { // add $q = dbInsert($dbtable, $inp); } else { if ($opt == 'u') { // edit $inp['tanggal'] = date("Y-m-d"); $q = dbUpdate($dbtable, $inp, "replid='{$cid}'"); } else { if ($opt == 'd') { // delete $q = dbDel($dbtable, "replid='{$cid}'"); } } } $fform->notif($q);
<?php require_once MODDIR . 'fform/fform.php'; $opt = gpost('opt'); $cid = gpost('cid'); if ($cid == '') { $cid = 0; } // form Module $fmod = 'penilaian'; $dbtable = 'aka_penilaian'; $fform = new fform($fmod, 'u', $cid, 'penilaian siswa'); $fform->reg['notif_u'] = 'Data <idata> telah disimpan.'; $data = gpost('data'); $t = explode(";", $data); $n = count($t); for ($i = 0; $i < $n; $i++) { $r = explode(",", $t[$i]); $sis = $r[0]; $pel = $r[1]; $jen = $r[2]; $nil = $r[3]; $sql = "SELECT * FROM aka_penilaian WHERE siswa='{$sis}' AND pelajaran='{$pel}' AND jenispengujian='{$jen}'"; $c = mysql_query($sql); if (mysql_num_rows($c) > 0) { $q = mysql_query("UPDATE aka_penilaian SET nilai='{$nil}' WHERE siswa='{$sis}' AND pelajaran='{$pel}' AND jenispengujian='{$jen}'"); } else { $q = mysql_query("INSERT INTO aka_penilaian SET siswa='{$sis}' AND pelajaran='{$pel}' AND jenispengujian='{$jen}',nilai='{$nil}'"); } } $fform->notif($q);
<?php require_once(MODDIR.'fform/fform.php'); $opt=gpost('opt');$cid=gpost('cid');if($cid=='')$cid=0; // form Module $fmod='jenisbuku'; $dbtable='pus_jenisbuku'; $fform=new fform($fmod,$opt,$cid,'Jenis Buku'); $inp=app_form_gpost('kode','nama','keterangan'); 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));
<?php require_once MODDIR . 'fform/fform.php'; $opt = gpost('opt'); $cid = gpost('cid'); if ($cid == '') { $cid = 0; } require_once APPMOD . 'aka/angkatan.php'; // form Module $fmod = "periode"; $dbtable = "psb_proses"; $fform = new fform($fmod, $opt, $cid, 'periode penerimaan siswa'); $inp = app_form_gpost('departemen', 'proses', 'kodeawalan', 'angkatan', 'tglmulai', 'tglselesai', 'kapasitas', 'aktif', 'keterangan'); 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}'"); $q &= dbDel("psb_kelompok", "proses='{$cid}'"); $q &= dbDel("psb_calonsiswa", "proses='{$cid}'"); } }
<?php require_once MODDIR . 'fform/fform.php'; $opt = gpost('opt'); $cid = gpost('cid'); if ($cid == '') { $cid = 0; } // form Module $fmod = "daftarbuku"; $dbtable = "pus_buku"; $fform = new fform($fmod, $opt, $cid, 'Buku'); $inp = app_form_gpost('katalog', 'idbuku', 'barkode', 'callnumber', 'sumber', 'harga', 'satuan', 'tanggal'); $nunit = intval(gpost('nbuku')); $inp['lokasi'] = gpost('tlokasi'); $inp['tingkatbuku'] = gpost('ttingkatbuku'); $inp['tahun'] = date("Y"); if ($opt == 'a' || $opt == 'u' || $opt == 'd') { $q = false; 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') {
<?php require_once(MODDIR.'xform/xform.php'); require_once(MODDIR.'fform/fform.php'); require_once(MODDIR.'xtable/xtable.php'); require_once(MODDIR.'control.php'); $fmod="siswakelas"; $fform=new fform($fmod,'af',$cid,'Cari siswa'); $fform->globalkey='0'; $fform->reg['title_af']='<idata>'; $fform->reg['btnlabel_a_y']='Tutup'; //$fform->reg['btnlabel_a_n']='Tutup'; $fform->dimension(650); $fform->ptop=30; $fform->yes_act='close_fform()'; $fform->head('Daftar Pengecekan Item'); echo '<tr><td><div id="data_member" style="height:350px;overflow:auto">'; $tbl=stocktake_ctable(); $fmod='stocktake_daftar'; $xtable=new xtable($fmod,'item'); $xtable->noopt=true; $xtable->pageorder="cek,ts"; $xtable->search_box_pos('l'); $xtable->search_keyon('barkode=>'.$tbl.'.barkode:EQ-0'); // Query //$sql="SELECT * FROM ".$tbl." ORDER BY cek,ts"; $db=new xdb($tbl); $db->field($tbl.":*","josh.pus_katalog:judul"); $db->join("buku","josh.pus_buku"); $db->joinother("josh.pus_buku","katalog","josh.pus_katalog"); $db->where($xtable->search_sql_get()); $t=$db->query(); $xtable->ndata=mysql_num_rows($t);
<?php require_once MODDIR . 'fform/fform.php'; require_once MODDIR . 'control.php'; $opt = gpost('opt'); $cid = gpost('cid'); if ($cid == '') { $cid = 0; } appmod_use('aka/tahunajaran', 'aka/tingkat', 'aka/kelas'); $mtipe = gpost('mtipe'); if ($mtipe == '') { $mtipe = "1"; } // form Module $fmod = "siswakelas"; $fform = new fform($fmod, 'af', $cid, 'Cari siswa'); $fform->reg['title_af'] = '<idata>'; //$fform->reg['btnlabel_a_y']='Pilih yg ditandai'; $fform->reg['btnlabel_a_n'] = 'Tutup'; $fform->dimension(500); $fform->ptop = 50; $fform->head('Pilih Siswa', 0); echo '<tr><td><div id="data_member" style="height:350px;overflow:auto">'; if ($mtipe == "0" || $mtipe == "1") { require_once APPDIR . 'sirkulasi_member_get_siswa.php'; } echo '</div></td></tr>'; $fform->foot(0);
<?php require_once MODDIR . 'fform/fform.php'; $opt = gpost('opt'); $cid = gpost('cid'); if ($cid == '') { $cid = 0; } // form Module $fmod = "golongan"; $dbtable = "psb_" . $fmod; $fform = new fform($fmod, $opt, $cid, 'golongan calon siswa'); $inp = app_form_gpost('golongan', 'keterangan'); 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}'"); $q &= dbDel("psb_setbiaya", "krit='{$cid}'"); $q &= dbUpdate("psb_calonsiswa", array('golongan' => 0), "golongan='{$cid}'"); } } }