本文整理汇总了PHP中app_form_gpost函数的典型用法代码示例。如果您正苦于以下问题:PHP app_form_gpost函数的具体用法?PHP app_form_gpost怎么用?PHP app_form_gpost使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了app_form_gpost函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: gpost
<?php
require_once MODDIR . 'fform/fform.php';
$opt = gpost('opt');
$cid = gpost('cid');
if ($cid == '') {
$cid = 0;
}
// form Module
$fmod = 'user';
$dbtable = 'admin';
$fform = new fform($fmod, $opt, $cid);
$inp = app_form_gpost('uname', 'level', 'app', 'departemen');
if ($opt == 'a' || $opt == 'u' || $opt == 'd') {
$q = false;
if ($opt == 'a') {
// add
$inp['passwd'] = md5('admin');
$q = dbInsert($dbtable, $inp);
} else {
if ($opt == 'u') {
// edit /update
$q = dbUpdate($dbtable, $inp, "replid='{$cid}'");
} else {
if ($opt == 'd') {
// delete
$q = dbDel($dbtable, "replid='{$cid}'");
}
}
}
$fform->notif($q);
示例2: 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}'");
示例3: gpost
<?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') {
示例4: 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}'");
}
}
示例5: 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();
} ?>
示例6: gpost
<?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}'");
}
}
示例7: gpost
<?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);
示例8: dbUpdate
// 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 {
$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.');
示例9: gpost
<?php
require_once MODDIR . 'fform/fform.php';
$opt = gpost('opt');
$cid = gpost('cid', 0);
// form Module
$fmod = 'grup';
$dbtable = 'admin';
$fform = new fform($fmod, $opt, $cid, 'Anggota Grup');
$inp = app_form_gpost('uname', 'nama');
if ($opt == 'a' || $opt == 'u' || $opt == 'd') {
$q = false;
if ($opt == 'a') {
// add
$inp['app'] = APID;
$inp['level'] = '2';
$inp['passwd'] = md5(gpost('passwd'));
$q = dbInsert($dbtable, $inp);
} else {
if ($opt == 'u') {
// edit
if ($inp['passwd'] != '') {
$inp['passwd'] = md5($inp['passwd']);
}
$q = dbUpdate($dbtable, $inp, "replid='{$cid}'");
} else {
if ($opt == 'd') {
// delete
$q = dbDel($dbtable, "replid='{$cid}'");
}
}
示例10: gpost
<?php
require_once MODDIR . 'fform/fform.php';
$opt = gpost('opt');
$cid = gpost('cid');
if ($cid == '') {
$cid = 0;
}
appmod_use('aka/tahunajaran', 'aka/pelajaran', 'aka/kelas');
// form Module
$fmod = 'sks';
$dbtable = 'aka_sks';
$fform = new fform($fmod, $opt, $cid, 'Kontrak Pelajaran');
$inp = app_form_gpost('tahunajaran', 'pelajaran', 'guru');
$inp['kelas'] = gpost('sks_kelas');
if ($opt == 'a' || $opt == 'u' || $opt == 'd') {
$q = false;
if ($opt == 'a') {
// add
$njam = intval(gpost('njam', 1));
if (gpost('salin') == '1') {
$t = dbSel("*", "aka_kelas", "W/tahunajaran='" . $inp['tahunajaran'] . "'");
while ($r = dbFA($t)) {
$inp['kelas'] = $r['replid'];
for ($i = 0; $i < $njam; $i++) {
$q = dbInsert($dbtable, $inp);
}
}
} else {
for ($i = 0; $i < $njam; $i++) {
$q = dbInsert($dbtable, $inp);
示例11: gpost
<?php
require_once MODDIR . 'fform/fform.php';
$opt = gpost('opt');
$cid = gpost('cid', 0);
// form Module
$fmod = 'posisi';
$dbtable = 'hrd_m_posisi';
$fform = new fform($fmod, $opt, $cid, 'posisi pegawai');
$inp = app_form_gpost('posisi', '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') {
示例12: gpost
<?php
require_once MODDIR . 'fform/fform.php';
$opt = gpost('opt');
$cid = gpost('cid');
if ($cid == '') {
$cid = 0;
}
require_once APPMOD . 'psb/proses.php';
// form Module
$fmod = "kelompok";
$dbtable = "psb_kelompok";
$fform = new fform($fmod, $opt, $cid, 'kelompok pendaftaran');
$inp = app_form_gpost('proses', 'kelompok', 'tglmulai', 'tglselesai', 'biaya', 'keterangan');
if ($opt == 'a' || $opt == 'u' || $opt == 'd') {
$q = false;
if ($opt == 'a') {
// add
$q = dbInsert($dbtable, $inp);
} else {
if ($opt == 'u') {
// edit
unset($inp['departemen']);
$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}'");
}
示例13: require_once
<?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','nama2','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'");
}
$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
示例14: gpost
<?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}'");
}
}
}
示例15: gpost
<?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);