当前位置: 首页>>代码示例>>PHP>>正文


PHP gpost函数代码示例

本文整理汇总了PHP中gpost函数的典型用法代码示例。如果您正苦于以下问题:PHP gpost函数的具体用法?PHP gpost怎么用?PHP gpost使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了gpost函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: loginCheck

function loginCheck()
{
    $user = gpost('uname');
    $pass = md5(gpost('passwd'));
    $t = mysql_query("SELECT * FROM admin WHERE uname='{$uname}' AND passwd='{$passwd}'");
    if (mysql_num_rows($t) == 1) {
        $r = mysql_fetch_array($t);
        if ($r['app'] == APID || $r['level'] == 1) {
            $_SESSION[ASID . 'admin_id'] = $r['replid'];
            $_SESSION[ASID . 'admin_name'] = $r['nama'];
            $_SESSION[ASID . 'admin_uname'] = $r['uname'];
            $_SESSION[ASID . 'admin_level'] = $r['level'];
            $_SESSION[ASID . 'admin_dept'] = $r['departemen'];
            $_SESSION[ASID . 'admin_pegawai'] = $r['pegawai'];
            $_SESSION[ASID . 'admin_bahasa'] = $r['bahasa'];
            dbUpdate("admin", array('tlogin' => date("Y-m-d H:i:s")), "replid='" . $r['replid'] . "'");
            echo $r['nama'];
        } else {
            echo "0";
            //echo $r['nama'];
        }
    } else {
        //echo $r['nama'];
        echo "0";
    }
}
开发者ID:nickohappy7,项目名称:sister,代码行数:26,代码来源:common.php

示例2: getsx

function getsx($n)
{
    if (isset($_GET[$n])) {
        return $_GET[$n];
    } else {
        return gpost($n);
    }
}
开发者ID:epiii,项目名称:siadu-epiii,代码行数:8,代码来源:common.php

示例3: __construct

	function __construct($f,$o='',$c=0){
		$this->fmod=$f;
		$this->opt=$o==''?gpost('opt'):$o;
		$this->cid=$c==''?gpost('cid',0):$c;
		$this->set_labelw(100);
		$this->set_fieldw(250);
		$this->tb=false;
		$this->cb=false;
		$this->gb=false;
		$this->ng=0;
		$this->back_act=$this->fmod.'_get()';
		$this->grupclass='flodiv';
		$this->grupstyle='';
		$this->tablestyle='float:left;border:1px solid rgba(0, 0, 0, .3);background:#fcfcff;margin-bottom:10px';
		$this->tablewidth='100%';
		$this->btn_yes='';
		$this->btn_no='';
		$this->showtitle=1;
	}
开发者ID:nickohappy7,项目名称:sister,代码行数:19,代码来源:xform.php

示例4: gpost

<?php

require_once '../shared/config.php';
require_once 'system/config.php';
require_once DBFILE;
require_once LIBDIR . 'common.php';
$filedesc = gpost('description');
/* File Upload */
$errormsg = "";
$cerr = 0;
$imagedata = "";
$allowedExts = array("jpg", "jpeg", "png");
$extension = end(explode(".", $_FILES["file"]["name"]));
if (($_FILES["file"]["type"] == "image/jpeg" || $_FILES["file"]["type"] == "image/png" || $_FILES["file"]["type"] == "image/pjpeg") && in_array($extension, $allowedExts)) {
    if ($_FILES["file"]["error"] > 0) {
        $cerr++;
        $errormsg = "Error return Code: " . $_FILES["file"]["error"] . "<br>";
    } else {
        if ($_FILES["file"]["size"] < 2000000) {
            if (file_exists($filepath)) {
                $cerr++;
                $errormsg = $_FILES["file"]["name"] . " sudah ada. ";
            } else {
                if ($extension == "jpg" || $extension == "jpeg") {
                    $uploadedfile = $_FILES['file']['tmp_name'];
                    $src = imagecreatefromjpeg($uploadedfile);
                } else {
                    if ($extension == "png") {
                        $uploadedfile = $_FILES['file']['tmp_name'];
                        $src = imagecreatefrompng($uploadedfile);
                    } else {
开发者ID:epiii,项目名称:siadu-epiii,代码行数:31,代码来源:trreq.php

示例5: xtable

<?php
$fmod='statistik';
$xtable = new xtable($fmod,'Buku','','','sirkulasi');
//$xtable->use_select();
$xtable->noopt=true;
$xtable->pageorder="cnt DESC,mtipe";

$lok=gpost('lokasi');
$lokasi=lokasi_r($lok);
$tgl1=date("Y-m-")."1";
$tgl2=date("Y-m-").cal_days_in_month(CAL_GREGORIAN,intval(date("m")),intval(date("Y")));
$tanggal1=gpost('tanggal1',$tgl1);
$tanggal2=gpost('tanggal2',$tgl2);

// Query
$xtable->search_keyon('memberid(ID member)=>aka_siswa.nis:EQ|hrd_pegawai.nip:EQ|pus_member.nid:EQ-0','nama(nama member)=>aka_siswa.nama:LIKE|hrd_pegawai.nama:LIKE|pus_member.nama:LIKE-1');
				
$db=new xdb("pus_peminjaman");
$db->field("pus_peminjaman:replid,member,mtipe","COUNT(pus_peminjaman.member) as cnt","aka_siswa:nis,nama as nsiswa","hrd_pegawai:nip,nama as npegawai","pus_member:nid,nama as nmember");
$db->join("buku","pus_buku");
$db->join("member","aka_siswa");
$db->join("member","hrd_pegawai");
$db->join("member","pus_member");
$db->where($lok==0?"":"pus_buku.lokasi='$lok'");
$db->where_and("pus_peminjaman.tanggal1 >= '$tanggal1'");
$db->where_and("pus_peminjaman.tanggal1 <= '$tanggal2'");
$db->where_and($xtable->search_sql_get());
$db->group("pus_peminjaman.mtipe,pus_peminjaman.member");

$t=$db->query();
$xtable->ndata=mysql_num_rows($t);
开发者ID:nickohappy7,项目名称:sister,代码行数:31,代码来源:statistik2.php

示例6: hiddenval_gpost

function hiddenval_gpost()
{
    $a = func_get_args();
    $n = count($a);
    for ($i = 0; $i < $n; $i++) {
        hiddenval($a[$i], gpost($a[$i]));
    }
}
开发者ID:epiii,项目名称:siadu-epiii,代码行数:8,代码来源:common.php

示例7: gpost

<?php

require_once MODDIR . 'date.php';
$replid = gpost('id');
$cid = $replid;
$t = mysql_query("SELECT * FROM psb_calonsiswa WHERE replid='{$replid}' LIMIT 0,1");
$r = mysql_fetch_array($t);
$fwidth = 700;
if ($r['photo'] == '') {
    $r['photo'] = 'nophoto.png';
}
$proses = mysql_fetch_array(mysql_query("SELECT * FROM psb_proses WHERE replid='" . $r['proses'] . "' LIMIT 0,1"));
$kelompok = mysql_fetch_array(mysql_query("SELECT * FROM psb_kelompok WHERE replid='" . $r['kelompok'] . "' LIMIT 0,1"));
$kondisi = mysql_fetch_array(mysql_query("SELECT * FROM psb_kondisisiswa WHERE replid='" . $r['kondisi'] . "' LIMIT 0,1"));
$status = mysql_fetch_array(mysql_query("SELECT * FROM psb_statussiswa WHERE replid='" . $r['status'] . "' LIMIT 0,1"));
$agama = mysql_fetch_array(mysql_query("SELECT * FROM mst_agama WHERE replid='" . $r['agama'] . "' LIMIT 0,1"));
$jkelamin = array('L' => 'Laki-laki', 'P' => 'Perempuan');
$a = 0;
?>
<table cellspacing="0" cellpadding="0" width="100%"><tr><td id="fformt" align="center" style="padding-top:60px">
<div id="fformbox" class="fformbox" style="width:<?php 
echo $fwidth + 20;
?>
px;overflow:hidden">
	<table cellspacing="25px" cellpadding="0" width="100%" height="100%"><tr><td>
	<div style="cursor:default;text-align:left;color:<?php 
echo CDARK;
?>
;font:24px <?php 
echo SFONTL;
?>
开发者ID:epiii,项目名称:siadu-epiii,代码行数:31,代码来源:pendataan_view.php

示例8: require_once

<?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"));
开发者ID:nickohappy7,项目名称:sister,代码行数:30,代码来源:jenisbuku.php

示例9: MstrGet

$fmod = "pf_info1";
// db Table
$dbtable = "employee";
// Global Variables
$mstr_level = MstrGet("mstr_level");
$mstr_division = MstrGet("mstr_division");
$mstr_group = MstrGet("mstr_group");
$mstr_position = MstrGet("mstr_position");
if ($opt == 'a' || $opt == 'u' || $opt == 'd' || $opt == 'up' || $opt == 'dn') {
    // Post Variables
    $inp = array();
    $inp['nip'] = gpost('nip');
    $inp['level'] = gpost('level');
    $inp['division'] = gpost('division');
    $inp['group'] = gpost('group');
    $inp['position'] = gpost('position');
    if ($opt == 'a') {
        $t = dbUpdate($dbtable, array('active' => 'N'), "empid='{$dcid}'");
        dbInsert($dbtable, array('empid' => $dcid, 'status' => $status, 'date1' => $date1, 'date2' => $date2, 'position' => $position));
        dbUpdate("employee", array('status' => $status), "dcid='{$dcid}'");
    } else {
        if ($opt == 'u') {
            dbUpdate($dbtable, $inp, "dcid='{$cid}'");
        } else {
            if ($opt == 'd') {
                if ($active == 'Y') {
                    dbUpdate("employee", array('status' => 0), "dcid='{$dcid}'");
                }
                dbDel($dbtable, "dcid='{$cid}'");
            }
        }
开发者ID:epiii,项目名称:siadu-epiii,代码行数:31,代码来源:pf_info1.php

示例10: array

        $mtitle = "Change " . $fname . "'s reward";
    } else {
        $mtitle = "Delete " . $fname . "'s reward";
    }
}
// Function Module
$fmod = "pf_reward";
// db Table
$dbtable = "emp_reward";
// Global Variables
if ($opt == 'a' || $opt == 'u' || $opt == 'd' || $opt == 'rf') {
    // Post Variables
    $p = array('reward', 'rewardby', 'description', 'date', 'file');
    $ipost = array();
    foreach ($p as $k => $v) {
        $ipost[$v] = gpost($v);
    }
    if ($opt == 'a') {
        $ipost['empid'] = $dcid;
        $fid = 0;
        if ($ipost['file'] != '') {
            $description = "Attachment of reward - " . $ipost['description'];
            $filename = $ipost['file'];
            $extension = end(explode(".", $filename));
            dbInsert("emp_files", array('empid' => $dcid, 'description' => $description, 'file' => $filename, 'type' => $extension));
            $fid = mysql_insert_id();
        }
        $ipost['file'] = $fid;
        dbInsert($dbtable, $ipost);
        $cid = mysql_insert_id();
    } else {
开发者ID:epiii,项目名称:siadu-epiii,代码行数:31,代码来源:pf_reward.php

示例11: appmod_use

<?php

appmod_use('aka/siswa', 'aka/kelas', 'aka/pelajaran', 'aka/rapor');
$opt = gpost('opt');
$cid = gpost('cid', 0);
/* Load App libraries */
require_once DBFILE;
require_once LIBDIR . 'common.php';
require_once MODDIR . 'date.php';
$dept = gpost('departemen');
$departemen = departemen_r($dept);
$proses = proses_r($pros, $dept);
// cell($a,$w=0,$c=1,$r=1,$al='',$b=-1,$bg='',$s='',$atr='')
$pros = gpost('proses');
$query = mysql_query("SELECT aka_mutasi.tanggal,aka_mutasi.departemen, aka_mutasi.keterangan, aka_siswa.nisn,aka_siswa.nama, aka_jenismutasi.nama as njenis \n\t\t\t\t\t\t\tFROM aka_mutasi\n\t\t\t\t\t\t\tJOIN aka_siswa ON aka_siswa.replid=aka_mutasi.replid\n                            JOIN aka_jenismutasi ON aka_jenismutasi.replid=aka_mutasi.replid\n                            WHERE aka_mutasi.departemen='{$dept}'");
$token = doc_decrypt($token);
$doc = new doc();
$doc->dochead("Laporan Mutasi Siswa " . gets('kelompok'), 7);
$doc->nl();
$doc->row_blank(7);
//$t=dbQSql($token);
$no = 1;
$doc->head('No{C}', '@Tanggal', '@NISN', '@Angkatan', '@Nama', '@Jenis Mutasi', '@Keterangan');
while ($r = mysql_fetch_array($query)) {
    $doc->nl();
    $doc->cell($no++, 20, 'c');
    $doc->cell(fftgl($r['tanggal']), 80);
    $doc->cell($r['nisn'], 30);
    $doc->cell($r['siswa'], 80);
    $doc->cell($r['njenis'], 50);
    $doc->cell($r['keterangan'], 50);
开发者ID:nickohappy7,项目名称:sister,代码行数:31,代码来源:mutasi.php

示例12: array

                    $inp = array();
                    foreach ($a as $k => $v) {
                        $inp[$v] = gpost($v);
                    }
                    if (dbUpdate("book", $inp, "dcid='{$dcid}'")) {
                        echo "TBook information has been saved.";
                    } else {
                        echo 'F<span style="colo:#ff0000">Failed to save book information.</span>';
                    }
                    //header('location:'.RLNK.'bibliographic.php?tab=catalog&act=view&nid='.$inp['catalog']);
                } else {
                    if ($q == "addsyc") {
                        $a = array('title', 'author', 'author2', 'publisher', 'class', 'classcode', 'isbn', 'release', 'series', 'language', 'cover');
                        $inp = array();
                        foreach ($a as $k => $v) {
                            $inp[$v] = gpost($v);
                        }
                        if (dbInsert("catalog", $inp)) {
                            $dcid = mysql_insert_id();
                            echo "T" . $dcid . "~Catalog information has been saved.";
                        } else {
                            echo 'F0~<span style="colo:#ff0000">Failed to save book information.</span>';
                        }
                    } else {
                        header('location:' . RLNK);
                    }
                }
            }
        }
    }
}
开发者ID:epiii,项目名称:siadu-epiii,代码行数:31,代码来源:request.php

示例13: hiddenval

     $PSBar->end();
     hiddenval('proses', $pros);
     hiddenval('kelompok', $kel);
     proses_warn(1);
     exit;
 }
 if (count($kelompok) > 0) {
     $PSBar->selection('Kelompok', iSelect('kelompok', $kelompok, $kel, $PSBar->selws, $fmod . "_get()"));
 } else {
     $PSBar->end();
     hiddenval('kelompok', $kel);
     kelompok_warn(1);
     exit;
 }
 $PSBar->end();
 $tampil = gpost('tampil', 'all');
 $t = mysql_query("SELECT replid FROM keu_modul WHERE reftipe='" . RT_PSB . "' AND refid='{$pros}'");
 if (mysql_num_rows($t) > 0) {
     $modul = mysql_fetch_array($t);
     $modid = $modul['replid'];
     $inp = array('modul' => $modid, 'siswa' => 0, 'nominal' => 0, 'cicilan' => 0);
     $t = mysql_query("SELECT psb_calonsiswa.replid,psb_kelompok.biaya FROM psb_calonsiswa LEFT JOIN psb_kelompok ON psb_kelompok.replid=psb_calonsiswa.kelompok WHERE psb_calonsiswa.proses='{$pros}'");
     while ($r = mysql_fetch_array($t)) {
         $t1 = mysql_query("SELECT * FROM keu_pembayaran WHERE modul='{$modid}' AND siswa='" . $r['replid'] . "'");
         if (mysql_num_rows($t1) == 0) {
             $inp['siswa'] = $r['replid'];
             $inp['nominal'] = $r['biaya'];
             $inp['cicilan'] = $r['biaya'];
             $q = dbInsert("keu_pembayaran", $inp);
         }
     }
开发者ID:epiii,项目名称:siadu-epiii,代码行数:31,代码来源:modul_psb.php

示例14: require_once

<?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();
开发者ID:nickohappy7,项目名称:sister,代码行数:31,代码来源:katalog.php

示例15: session_start

session_start();
require_once '../shared/config.php';
require_once 'system/config.php';
$tl = 1;
$t = mysql_query("SELECT * FROM appactivate WHERE app='" . APID . "' LIMIT 0,1");
$r = mysql_fetch_array($t);
if ($r['aktif'] == '1') {
    header('location:./');
}
$wrong = 0;
$ukey = '';
$vkey = '';
if (gpost('accept') == 'YES') {
    $ukey = gpost('cuser');
    $vkey = gpost('cverify');
    $t = mysql_query("SELECT * FROM appactivate WHERE user='{$ukey}' AND kunci='{$vkey}' AND aktif='0' LIMIT 0,1");
    if (mysql_num_rows($t) > 0) {
        $pwd = md5($vkey);
        mysql_query("UPDATE appactivate SET aktif='1' WHERE user='{$ukey}' AND kunci='{$vkey}'");
        mysql_query("INSERT INTO admin SET nama='Admin',uname='{$ukey}',passwd='{$pwd}',app='rep',level='1'");
        header('location:./');
    } else {
        $wrong = 1;
    }
}
// APP:
$APP_TITLE = 'Repository';
$APP_PAGETITLES = array('file' => 'File', 'grup' => 'Grup');
$APP_HOMETITLE = 'Home';
$APP_PLUGIN = "flot|tinymce";
开发者ID:epiii,项目名称:siadu-epiii,代码行数:30,代码来源:activation.php


注:本文中的gpost函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。