當前位置: 首頁>>代碼示例>>PHP>>正文


PHP fform類代碼示例

本文整理匯總了PHP中fform的典型用法代碼示例。如果您正苦於以下問題:PHP fform類的具體用法?PHP fform怎麽用?PHP fform使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了fform類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: gpost

<?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);
開發者ID:epiii,項目名稱:siadu-epiii,代碼行數:31,代碼來源:discount.php

示例2: require_once

<?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;
開發者ID:nickohappy7,項目名稱:sister,代碼行數:31,代碼來源:katalog_buku.php

示例3: gpost

<?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}'");
開發者ID:nickohappy7,項目名稱:sister,代碼行數:31,代碼來源:guru.php

示例4: require_once

<?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'"));
	
開發者ID:nickohappy7,項目名稱:sister,代碼行數:30,代碼來源:opac_detil.php

示例5: gpost

<?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}'");
開發者ID:nickohappy7,項目名稱:sister,代碼行數:31,代碼來源:semester.php

示例6: gpost

<?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}'");
            }
        }
開發者ID:nickohappy7,項目名稱:sister,代碼行數:31,代碼來源:mutasi.php

示例7: require_once

<?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();
} ?>
開發者ID:nickohappy7,項目名稱:sister,代碼行數:30,代碼來源:stocktake_note.php

示例8: gpost

<?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'] . "'");
            }
        }
開發者ID:epiii,項目名稱:siadu-epiii,代碼行數:31,代碼來源:sirkulasi_peminjaman.php

示例9: require_once

<?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'");
開發者ID:nickohappy7,項目名稱:sister,代碼行數:31,代碼來源:tools_idbuku.php

示例10: session_start

<?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');
開發者ID:epiii,項目名稱:siadu-epiii,代碼行數:31,代碼來源:inventory_penerimaan.php

示例11: session_start

<?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;
開發者ID:epiii,項目名稱:siadu-epiii,代碼行數:31,代碼來源:pembayaran.php

示例12: gpost

<?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}'");
            }
        }
開發者ID:epiii,項目名稱:siadu-epiii,代碼行數:31,代碼來源:pendataan_saudara.php

示例13: gpost

<?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') {
開發者ID:epiii,項目名稱:siadu-epiii,代碼行數:31,代碼來源:status.php

示例14: session_start

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;
開發者ID:epiii,項目名稱:siadu-epiii,代碼行數:30,代碼來源:transaksi2.php

示例15: admin_get

                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}'");
開發者ID:epiii,項目名稱:siadu-epiii,代碼行數:31,代碼來源:setting.php


注:本文中的fform類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。