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


PHP fform::dlg方法代碼示例

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


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

示例1: farray

        $r = farray('nis', 'nisn');
        $r['departemen'] = gpost('departemen');
        $r['tahunajaran'] = gpost('tahunajaran');
        $r['kelas'] = gpost('kelas');
    }
    $fform->reg['title_af'] = '<idata>';
    $fform->reg['title_uf'] = 'Edit <idata>';
    $fform->reg['title_df'] = 'Batalkan <idata>';
    $fform->dimension(350);
    $fform->head();
    if ($opt == 'af' || $opt == 'uf') {
        require_once MODDIR . 'control.php';
        // Add or Edit form
        $pros = gpost('proses');
        $tp = mysql_query("SELECT angkatan FROM psb_proses WHERE replid='{$pros}'");
        $rp = mysql_fetch_array($tp);
        $fform->fl('Departemen', departemen_name($r['departemen']));
        $fform->fl('Angkatan', angkatan_name($rp['angkatan']));
        $fform->fl('Tahun ajaran', tahunajaran_name($r['tahunajaran']));
        $fform->fl('Kelas', kelas_name($r['kelas']));
        $fform->fi('No Induk', iText('nis', $r['nis'], 'width:120px'));
        $fform->fi('NISN', iText('nisn', $r['nisn'], $fform->rwidths));
    } else {
        if ($opt == 'df') {
            // Delete form
            $fform->reg['btnlabel_d_y'] = '   Ya   ';
            $fform->dlg('Batalkan penempatan siswa <b>' . $r['nama'] . '</b>?');
        }
    }
    $fform->foot();
}
開發者ID:epiii,項目名稱:siadu-epiii,代碼行數:31,代碼來源:penempatan.php

示例2: gpost

$aktif = gpost('aktif');
if ($opt == 'a' || $opt == 'u' || $opt == 'd') {
    $q = false;
    // edit
    if ($aktif == 1) {
        $q = mysql_query("UPDATE keu_tahunbuku SET aktif='0'");
        if ($q) {
            $q = mysql_query("UPDATE keu_tahunbuku SET aktif='1' WHERE replid='{$cid}'");
        }
    } else {
        $q = mysql_query("UPDATE keu_tahunbuku SET aktif='0' WHERE replid='{$cid}'");
    }
    $fform->notif($q);
} else {
    // Prepocessing form
    $r = dbSFA("*", $dbtable, "W/replid='{$cid}'");
    $fform->reg['title_uf'] = 'Ubah Status Tahun Buku';
    $fform->reg['btnlabel_u_y'] = '   Ya   ';
    $fform->reg['btnlabel_u_n'] = 'Tidak';
    $fform->head();
    require_once MODDIR . 'control.php';
    // Add or Edit form
    if ($r['aktif'] == '1') {
        $fform->dlg('Non-aktifkan tahun buku <b>' . $r['nama'] . '</b>?', $s);
        hiddenval('aktif', 0);
    } else {
        $fform->dlg('Aktifkan tahun buku <b>' . $r['nama'] . '</b>, dan non aktifkan tahun buku lainnya?', $s);
        hiddenval('aktif', 1);
    }
    $fform->foot();
}
開發者ID:epiii,項目名稱:siadu-epiii,代碼行數:31,代碼來源:tahunbuku_status.php

示例3: fform

<?php require_once(MODDIR.'fform/fform.php'); $opt=gpost('opt');$cid=gpost('cid');if($cid=='')$cid=0;
// form Module
$fmod="katalog_buku_daftar_cek";
$dbtable="pus_buku";
$fform=new fform($fmod,$opt,$cid,'Buku');

$data=gpost('data');

if($opt=='d'){ $q=false;
	$d=explode(",",$data);
	$n=count($d);
	for($i=0;$i<$n;$i++){
		$cid=$d[$i];
		$q=dbDel($dbtable,"replid='$cid'");
	}
	$fform->notif($q);
} else {
	$fform->head();
	if($opt=='df'){ // Delete form 
		$d=explode(",",$data);
		$n=count($d);
		$fform->dlg('Apakah anda yakin untuk menghapus '.$n.' buku yang dipilih?');
		
	} $fform->foot();
}
?>
開發者ID:nickohappy7,項目名稱:sister,代碼行數:26,代碼來源:katalog_buku_daftar_cek.php

示例4: gpost

$dept = gpost('departemen');
if ($opt == 'a' || $opt == 'u' || $opt == 'd') {
    $q = false;
    // edit
    if ($aktif == 1) {
        $q = mysql_query("UPDATE aka_tahunajaran SET aktif='0' WHERE departemen='{$dept}'");
        if ($q) {
            $q = mysql_query("UPDATE aka_tahunajaran SET aktif='1' WHERE replid='{$cid}'");
        }
    } else {
        $q = mysql_query("UPDATE aka_tahunajaran SET aktif='0' WHERE replid='{$cid}'");
    }
    $fform->notif($q);
} else {
    // Prepocessing form
    $r = dbSFA("*", $dbtable, "W/replid='{$cid}'");
    $fform->reg['title_uf'] = 'Ubah Status Tahun Ajaran';
    $fform->reg['btnlabel_u_y'] = '   Ya   ';
    $fform->reg['btnlabel_u_n'] = 'Tidak';
    $fform->head();
    require_once MODDIR . 'control.php';
    // Add or Edit form
    if ($r['aktif'] == '1') {
        $fform->dlg('Non-aktifkan tahun ajaran <b>' . $r['tahunajaran'] . '</b>?', $s);
        hiddenval('aktif', 0);
    } else {
        $fform->dlg('Aktifkan tahun ajaran <b>' . $r['tahunajaran'] . '</b>, dan non aktifkan tahun ajaran lainnya?', $s);
        hiddenval('aktif', 1);
    }
    $fform->foot();
}
開發者ID:nickohappy7,項目名稱:sister,代碼行數:31,代碼來源:tahunajaran_status.php

示例5: if

<?php require_once(MODDIR.'xform/xform.php'); require_once(MODDIR.'fform/fform.php'); require_once(MODDIR.'xtable/xtable.php');
$opt=gpost('opt');
if($opt=='a'){
	$q=mysql_query("UPDATE pus_stockhist SET status='3' WHERE status='2' LIMIT 1");
	if($q) echo "1";
	else echo "0";
}
else if($opt=='af'){
	$fmod="stocktake_cek_done";
	$fform=new fform($fmod,'af',$cid,'Cari siswa');
	$fform->reg['title_af']='<idata>';
	$fform->reg['btnlabel_a_y']='  Ya  ';
	$fform->reg['btnlabel_a_n']='Tidak';
	$fform->yes_act='stocktake_cek_done(\'a\')';
	$fform->dimension(500);
	$tbl=stocktake_ctable();
	$ncek_y=mysql_num_rows(mysql_query("SELECT * FROM ".$tbl." WHERE cek='Y'"));
	$ncek=mysql_num_rows(mysql_query("SELECT * FROM ".$tbl));
	
	$fform->head('Akhiri pengecekan item');
	
	if($ncek_y<$ncek){
		$fform->dlg(($ncek-$ncek_y).' item belum dicek. Apakah anda yakin untuk melajutkan ke proses berikutnya?');
	} else {
		$fform->dlg('Akhiri pengecekan item dan lanjutkan ke proses berikutnya?');
	}
	$fform->foot();
}
?>
開發者ID:nickohappy7,項目名稱:sister,代碼行數:29,代碼來源:stocktake_cek_done.php

示例6: if

	$fform->head('Akhiri pemberian catatan');
	
	if($ncek_y<$ncek){
		$fform->dlg(($ncek-$ncek_y).' item hilang tanpa keterangan. Apakah anda yakin untuk menyelesaikan proses stock opname?');
	} else {
		$fform->dlg('Akhiri pemberian catatan item dan selesaikan proses stock opname?');
	}
	$fform->foot();
}
else if($opt=='df'){
	$fmod="stocktake_note_done";
	$fform=new fform($fmod,'df',$cid,'Cari siswa');
	$fform->reg['title_af']='<idata>';
	$fform->reg['btnlabel_d_y']='  Ya  ';
	$fform->reg['btnlabel_d_n']='Tidak';
	$fform->yes_act='stocktake_note_done(\'d\')';
	$fform->dimension(500);
	$tbl=stocktake_ctable();
	$ncek_y=mysql_num_rows(mysql_query("SELECT * FROM ".$tbl." WHERE cek='N' AND note<>''"));
	$ncek=mysql_num_rows(mysql_query("SELECT * FROM ".$tbl." WHERE cek='N'"));
	
	$fform->head('Kembali ke Proses Pengecekan');
	
	//if($ncek_y<$ncek){
	//	$fform->dlg(($ncek-$ncek_y).' item hilang tanpa keterangan. Apakah anda yakin untuk menyelesaikan proses stock opname?');
	//} else {
		$fform->dlg('Kembali ke proses pengecekan item?');
	//}
	$fform->foot();
}
?>
開發者ID:nickohappy7,項目名稱:sister,代碼行數:31,代碼來源:stocktake_note_done.php

示例7: gpost

$tajar = gpost('tahunajaran');
if ($opt == 'a' || $opt == 'u' || $opt == 'd') {
    $q = false;
    // edit
    if ($aktif == 1) {
        $q = mysql_query("UPDATE aka_semester SET aktif='0' WHERE tahunajaran='{$tajar}'");
        if ($q) {
            $q = mysql_query("UPDATE aka_semester SET aktif='1' WHERE replid='{$cid}'");
        }
    } else {
        $q = mysql_query("UPDATE aka_semester SET aktif='0' WHERE replid='{$cid}'");
    }
    $fform->notif($q);
} else {
    // Prepocessing form
    $r = dbSFA("*", $dbtable, "W/replid='{$cid}'");
    $fform->reg['title_uf'] = 'Ubah Status Semester';
    $fform->reg['btnlabel_u_y'] = '   Ya   ';
    $fform->reg['btnlabel_u_n'] = 'Tidak';
    $fform->head();
    require_once MODDIR . 'control.php';
    // Add or Edit form
    if ($r['aktif'] == '1') {
        $fform->dlg('Non-aktifkan semester <b>' . $r['nama'] . '</b>?', $s);
        hiddenval('aktif', 0);
    } else {
        $fform->dlg('Aktifkan semester <b>' . $r['nama'] . '</b>, dan non aktifkan semester lainnya?', $s);
        hiddenval('aktif', 1);
    }
    $fform->foot();
}
開發者ID:nickohappy7,項目名稱:sister,代碼行數:31,代碼來源:semester_status.php


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