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


PHP getgpc函数代码示例

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


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

示例1: index

 function index()
 {
     //面包屑导航
     $data['headpagemenu'] = array(0 => array('name' => '后台', 'link' => "admin.php"), 1 => array('name' => '中奖管理', 'link' => ""));
     $data['headpagetitle'] = "中奖管理";
     //左侧菜单
     $data['menumod'] = "prize";
     //数据总量
     $count = fetch_one_array("select count(*) as num from " . dbtable("prize") . " p," . dbtable("shopprize") . " u where p.city_id=u.id order by  p.prize_date");
     //分页
     $per_page = getgpc("per_page");
     $per_page = $per_page ? $per_page : 0;
     $pnum = 20;
     $list = fetch_array("select p.*,u.tname,u.city from " . dbtable("prize") . " p," . dbtable("shopprize") . " u where p.city_id=u.id order by  p.id limit {$per_page},{$pnum} ");
     foreach ($list as $key => $row) {
         if ($row['status'] == 1 and !empty($row['city_no'])) {
             $city_no = $row['city_no'];
             $city_data = fetch_one_array("select tname from " . dbtable("shopprize") . " where city_no='" . $city_no . "'");
             $list[$key]['extname'] = $city_data['tname'];
         } else {
             $list[$key]['extname'] = "";
         }
     }
     $data["plist"] = $list;
     $this->load->library('pagination');
     $config['base_url'] = 'admin.php?mod=prize&act=index';
     $config['total_rows'] = $count["num"];
     $config['per_page'] = $pnum;
     $this->pagination->initialize($config);
     $data["page"] = $this->pagination->create_links();
     $this->load->view('prize_index', $data);
 }
开发者ID:visonforcoding,项目名称:cidev,代码行数:32,代码来源:prize.php

示例2: submitcheck

 public static function submitcheck($var, $allowget = 0, $seccodecheck = 0, $secqaacheck = 0)
 {
     if (!getgpc($var)) {
         return FALSE;
     } else {
         global $_G;
         if ($allowget || $_SERVER['REQUEST_METHOD'] == 'POST' && !empty($_GET['formhash']) && $_GET['formhash'] == formhash() && empty($_SERVER['HTTP_X_FLASH_VERSION']) && (empty($_SERVER['HTTP_REFERER']) || preg_replace("/https?:\\/\\/([^\\:\\/]+).*/i", "\\1", $_SERVER['HTTP_REFERER']) == preg_replace("/([^\\:]+).*/", "\\1", $_SERVER['HTTP_HOST']))) {
             if (empty($_GET['phone_reg'])) {
                 if (checkperm('seccode')) {
                     if ($secqaacheck && !check_secqaa($_GET['secanswer'], $_GET['sechash'])) {
                         showmessage('submit_secqaa_invalid');
                     }
                     if ($seccodecheck && !check_seccode($_GET['seccodeverify'], $_GET['sechash'])) {
                         showmessage('submit_seccode_invalid');
                     }
                 }
             }
             return TRUE;
             // For ios reg modify by heavenK
         } elseif ($_SERVER['REQUEST_METHOD'] == 'POST' && !empty($_GET['formhash']) && !empty($_GET['phone_reg']) && empty($_SERVER['HTTP_X_FLASH_VERSION']) && empty($_SERVER['HTTP_REFERER'])) {
             return TRUE;
         } else {
             //add by zh
             if ($_GET['mod'] == 'sms' && $_GET['flag'] == 1) {
                 exit(lang('message', 'submit_invalid'));
             } else {
                 showmessage('submit_invalid');
             }
         }
     }
 }
开发者ID:Jaedeok-seol,项目名称:discuz_template,代码行数:31,代码来源:helper_form.php

示例3: check_priv

 function check_priv()
 {
     $username = $this->sid_decode($this->view->sid);
     if (empty($username)) {
         //		header('Location: '.UC_API.'/admin.php?m=user&a=login&iframe='.getgpc('iframe', 'G').($this->cookie_status ? '' : '&sid='.$this->view->sid));
         //		exit;
         //暂时屏蔽
     } else {
         $this->user['isfounder'] = $username == 'UCenterAdministrator' ? 1 : 0;
         if (!$this->user['isfounder']) {
             $admin = $this->db->fetch_first("SELECT a.*, m.* FROM " . UC_DBTABLEPRE . "admins a LEFT JOIN " . UC_DBTABLEPRE . "members m USING(uid) WHERE a.username='{$username}'");
             if (empty($admin)) {
                 header('Location: ' . UC_API . '/admin.php?m=user&a=login&iframe=' . getgpc('iframe', 'G') . ($this->cookie_status ? '' : '&sid=' . $this->view->sid));
                 exit;
             } else {
                 $this->user = $admin;
                 $this->user['username'] = $username;
                 $this->user['admin'] = 1;
                 $this->view->sid = $this->sid_encode($username);
                 $this->setcookie('sid', $this->view->sid, 86400);
             }
         } else {
             $this->user['username'] = 'UCenterAdministrator';
             $this->user['admin'] = 1;
             $this->view->sid = $this->sid_encode($this->user['username']);
             $this->setcookie('sid', $this->view->sid, 86400);
         }
         $this->view->assign('user', $this->user);
     }
 }
开发者ID:h3len,项目名称:Project,代码行数:30,代码来源:admin.php

示例4: control

 function control()
 {
     parent::__construct();
     $authkey = md5(UC_KEY . $_SERVER['HTTP_USER_AGENT'] . $this->onlineip);
     $this->time = time();
     $seccodeauth = getgpc('seccodeauth');
     $seccode = $this->authcode($seccodeauth, 'DECODE', $authkey);
     //$seccode = rand(100000, 999999);
     //$this->setcookie('uc_secc', $this->authcode($seccode."\t".$this->time, 'ENCODE'));
     @header("Expires: -1");
     @header("Cache-Control: no-store, private, post-check=0, pre-check=0, max-age=0", FALSE);
     @header("Pragma: no-cache");
     include_once UC_ROOT . 'lib/seccode.class.php';
     $code = new seccode();
     $code->code = $seccode;
     $code->type = 0;
     $code->width = 70;
     $code->height = 21;
     $code->background = 0;
     $code->adulterate = 1;
     $code->ttf = 1;
     $code->angle = 0;
     $code->color = 1;
     $code->size = 0;
     $code->shadow = 1;
     $code->animator = 0;
     $code->fontpath = UC_ROOT . 'images/fonts/';
     $code->datapath = UC_ROOT . 'images/';
     $code->includepath = '';
     $code->display();
 }
开发者ID:softhui,项目名称:discuz,代码行数:31,代码来源:seccode.php

示例5: check_acl

 /**
  * 权限检测
  * @author allen caowenpeng1990@126.com
  */
 protected function check_acl()
 {
     $controller = $this->uri->rsegment(1) ? $this->uri->rsegment(1) : getgpc("mod");
     $action = $this->uri->rsegment(2) ? $this->uri->rsegment(2) : getgpc("act");
     $node_str = $controller . '/' . $action;
     $query_node = $this->db->get_where('admin_node', array('node' => $node_str, 'status' => 1));
     $node = $query_node->row_array();
     //查出被权限的节点
     $admin_utype = $this->session->userdata('admin_utype');
     if ($admin_utype == 'sysadmin') {
         //全站放行
         return;
     }
     if (is_array($node) && count($node) > 0) {
         $admin_id = $this->session->userdata('admin_id');
         $query_acl = $this->db->select('admin_group.acl')->from('admin_group')->join('admin_user', 'admin_user.groupid = admin_group.id')->where(array('admin_user.id' => $admin_id))->get();
         $acl = unserialize($query_acl->row_array()['acl']);
         if (!in_array($node['id'], $acl)) {
             if ($this->input->is_ajax_request()) {
                 $data['status'] = false;
                 $data['msg'] = '您没有权限进行此操作!';
                 ajaxReturn($data);
             } else {
                 header("Content-type:text/html;charset=utf-8");
                 alert("您没有权限进行此操作!");
             }
         }
     }
 }
开发者ID:visonforcoding,项目名称:cidev,代码行数:33,代码来源:MY_Controller.php

示例6: onls

 function onls()
 {
     //如果添加用户设置
     if (getgpc('add_user_set', 'P')) {
         $praArr = $_POST;
         $praArr['username'] = $this->user['username'];
         $usetArr = serialize($praArr);
         if (!empty($usetArr)) {
             $this->mUset->add_user_set($usetArr);
         }
     }
     //如果删除
     if (getgpc('del', 'G')) {
         $id = getgpc('id');
         $this->mUset->del_user_set($id);
     }
     //如果更新
     if (getgpc('update', 'G')) {
         $updateArr = serialize($_POST);
         $this->mUset->update_user_set($updateArr);
     }
     $all_user_set = $this->mUset->get_user_set();
     //获取所有用户设置
     //$this->view->assign("result",$this->result);
     $this->view->assign("all_user_set", $all_user_set);
     $this->view->display('admin_uset');
 }
开发者ID:h3len,项目名称:Project,代码行数:27,代码来源:uset.php

示例7: _call

 function _call($a, $arg)
 {
     $do = getgpc('do');
     $do = empty($do) ? 'onindex' : 'on' . $do;
     if (method_exists($this, $do) && $do[0] != '_') {
         $this->{$do}();
     } else {
         exit('Plugin module not found');
     }
 }
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:10,代码来源:plugin.php

示例8: onls

 function onls()
 {
     $page = getgpc('page');
     $delete = getgpc('delete', 'P');
     $num = $_ENV['feed']->get_total_num();
     $feedlist = $_ENV['feed']->get_list($page, UC_PPP, $num);
     $multipage = $this->page($num, UC_PPP, $page, 'admin.php?m=feed&a=ls');
     $this->view->assign('feedlist', $feedlist);
     $this->view->assign('multipage', $multipage);
     $this->view->display('admin_feed');
 }
开发者ID:softhui,项目名称:discuz,代码行数:11,代码来源:feed.php

示例9: onsend

 function onsend()
 {
     $mailid = intval(getgpc('mailid'));
     $result = $_ENV['mail']->send_by_id($mailid);
     if ($result) {
         $this->writelog('mail_send', "appid={$appid}&noteid={$noteid}");
         $this->message('mail_succeed', $_SERVER['HTTP_REFERER']);
     } else {
         $this->writelog('mail_send', 'failed');
         $this->message('mail_false', $_SERVER['HTTP_REFERER']);
     }
 }
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:12,代码来源:mail.php

示例10: onls

 function onls()
 {
     $page = getgpc('page');
     $find = getgpc('find', 'P');
     $replacement = getgpc('replacement', 'P');
     $replacementnew = getgpc('replacementnew', 'P');
     $findnew = getgpc('findnew', 'P');
     $delete = getgpc('delete', 'P');
     if ($find) {
         foreach ($find as $id => $arr) {
             $_ENV['badword']->update_badword($find[$id], $replacement[$id], $id);
         }
     }
     $status = 0;
     if ($findnew) {
         $_ENV['badword']->add_badword($findnew, $replacementnew, $this->user['username']);
         $status = 1;
         $this->writelog('badword_add', 'findnew=' . htmlspecialchars($findnew) . '&replacementnew=' . htmlspecialchars($replacementnew));
     }
     if (@$delete) {
         $_ENV['badword']->delete_badword($delete);
         $status = 2;
         $this->writelog('badword_delete', "delete=" . implode(',', $delete));
     }
     if (getgpc('multisubmit', 'P')) {
         $badwords = getgpc('badwords', 'P');
         $type = getgpc('type', 'P');
         if ($type == 0) {
             $_ENV['badword']->truncate_badword();
             $type = 1;
         }
         $arr = explode("\n", str_replace(array("\r", "\n\n"), array("\r", "\n"), $badwords));
         foreach ($arr as $k => $v) {
             $arr2 = explode("=", $v);
             $_ENV['badword']->add_badword($arr2[0], $arr2[1], $this->user['username'], $type);
         }
     }
     if ($status > 0) {
         $notedata = $_ENV['badword']->get_list($page, 1000000, 1000000);
         $this->load('note');
         $_ENV['note']->add('updatebadwords', '', $this->serialize($notedata, 1));
         $_ENV['note']->send();
         $this->load('cache');
         $_ENV['cache']->updatedata('badwords');
     }
     $num = $_ENV['badword']->get_total_num();
     $badwordlist = $_ENV['badword']->get_list($page, UC_PPP, $num);
     $multipage = $this->page($num, UC_PPP, $page, 'admin.php?m=badword&a=ls');
     $this->view->assign('status', $status);
     $this->view->assign('badwordlist', $badwordlist);
     $this->view->assign('multipage', $multipage);
     $this->view->display('admin_badword');
 }
开发者ID:pan289091315,项目名称:Discuz,代码行数:53,代码来源:badword.php

示例11: getclass

 function getclass()
 {
     $gradeid = getgpc("gradeid");
     $classid = getgpc("classid");
     $res = fetch_array("select * from " . dbtable("class") . " where upid='" . $gradeid . "'");
     $str = '<option value="0">全部班级</option>';
     foreach ($res as $row) {
         if ($classid == $row['id']) {
             $add = " selected";
         } else {
             $add = "";
         }
         $str .= '<option value="' . $row["id"] . '" ' . $add . '>' . $row["name"] . '</option>';
     }
     echo $str;
 }
开发者ID:visonforcoding,项目名称:cidev,代码行数:16,代码来源:ajax.php

示例12: onupdate

 function onupdate()
 {
     $updated = false;
     if ($this->submitcheck('submit')) {
         $type = getgpc('type', 'P');
         if (!is_array($type) || in_array('data', $type)) {
             $_ENV['cache']->updatedata();
         }
         if (!is_array($type) || in_array('tpl', $type)) {
             $_ENV['cache']->updatetpl();
         }
         $updated = true;
     }
     $this->view->assign('updated', $updated);
     $this->view->display('admin_cache');
 }
开发者ID:v998,项目名称:discuzx-en,代码行数:16,代码来源:cache.php

示例13: index

 function index()
 {
     $per_page = getgpc("per_page");
     $per_page = $per_page ? $per_page : 0;
     $pnum = 8;
     $list = fetch_array("select * from " . dbtable("englandstyle") . " where 1  and status=1 order by displayorder desc, id desc limit {$per_page},{$pnum}");
     foreach ($list as $key => $row) {
         $res[intval($key / 4)][] = $row;
     }
     $count = fetch_one_array("select count(*) as num from " . dbtable("englandstyle") . " where 1  and status=1");
     $data['total_num'] = $count['num'];
     $data['per_page'] = $per_page + $pnum;
     $data['pnum'] = $pnum;
     $data["reslist"] = $res;
     $this->load->view('englandstyle', $data);
 }
开发者ID:visonforcoding,项目名称:cidev,代码行数:16,代码来源:englandstyle.php

示例14: save

	function save(){
		$this->redirect .= '&dxanchor='.$this->dxanchor;
		$varsnew = getgpc('varsnew', 'p');

		$varsnew['height'] = $varsnew['height'] > 0 ? intval($varsnew['height']) : 0;
		$varsnew['lineheight'] = $varsnew['lineheight'] ? 'height:'.$varsnew['lineheight'].'px;line-height:'.$varsnew['lineheight'].'px;' : '';
		$varsnew['left'] = intval($varsnew['left']).'px';
		$varsnew['top'] = intval($varsnew['top']).'px';
		$varsnew['left3'] = intval($varsnew['left3']);
		$varsnew['top3'] = intval($varsnew['top3']);

		$this->cache->set('settings', $varsnew);
		$this->cache->styles('weather.css', $varsnew, true);

		$this->cpmsg();
	}
开发者ID:xiao2ww,项目名称:Bjwlkjc,代码行数:16,代码来源:settings.inc.php

示例15: dxcore

	function dxcore(){
		global $pluginid, $plugin;

		define('XTQ_ROOT', realpath(dirname(__FILE__).'/../').'/');

		$this->pluginid = $pluginid;
		$this->identifier = $plugin['identifier'];
		$this->basescript = 'plugins&operation=config&do='.$this->pluginid.'&identifier=ducexweather&pmod='.getgpc('pmod');
		$this->redirect = getglobal('siteurl').ADMINSCRIPT.'?action='.$this->basescript;

		require(XTQ_ROOT.'include/dx_cache.class.php');

		$this->cache = new dx_xcache('ducexweather');

		$this->settings = $this->cache->loadsetting();

		$this->header();
	}
开发者ID:xiao2ww,项目名称:Bjwlkjc,代码行数:18,代码来源:dx_core.php


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