• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP getgpc函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



在下文中一共展示了getgpc函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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 [email protected]
  */
 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


示例16: onedit

 /**
  * 编辑积分规则
  */
 public function onedit()
 {
     $a = getgpc('a');
     $rule_id = getgpc('rule_id', 'G');
     if (getgpc('edit_credit_rule', 'P')) {
         $rule_id = getgpc('rid');
         $rule_name = getgpc('rule_name', 'P');
         $cycle_type = getgpc('cycle_type', 'P');
         $reward_num = getgpc('reward_num', 'P');
         $credit = getgpc('credit', 'P');
         $is_use = getgpc('is_use', 'P');
         $this->mCredit->update_credit_rule($rule_id, $rule_name, $cycle_type, $reward_num, $credit, $is_use);
         $this->view->assign('status', 1);
     }
     $single_rule = $this->mCredit->get_single_credit_rule($rule_id);
     $this->view->assign('a', $a);
     $this->view->assign('single_rule', $single_rule);
     $this->view->display('admin_credit');
 }
开发者ID:h3len,项目名称:Project,代码行数:22,代码来源:credit.php


示例17: onadd

 function onadd()
 {
     $ucfounderpw = getgpc('ucfounderpw', 'P');
     $apptype = getgpc('apptype', 'P');
     $appname = getgpc('appname', 'P');
     $appurl = getgpc('appurl', 'P');
     $appip = getgpc('appip', 'P');
     $viewprourl = getgpc('viewprourl', 'P');
     $appcharset = getgpc('appcharset', 'P');
     $appdbcharset = getgpc('appdbcharset', 'P');
     $apptagtemplates = getgpc('apptagtemplates', 'P');
     $appallowips = getgpc('allowips', 'P');
     if (md5(md5($ucfounderpw) . UC_FOUNDERSALT) == UC_FOUNDERPW || strlen($ucfounderpw) == 32 && $ucfounderpw == md5(UC_FOUNDERPW)) {
         @ob_start();
         $return = '';
         $app = $this->db->fetch_first("SELECT * FROM " . UC_DBTABLEPRE . "applications WHERE url='{$appurl}' AND type='{$apptype}'");
         if (empty($app)) {
             $authkey = $this->_generate_key();
             $apptagtemplates = $this->serialize($apptagtemplates, 1);
             $this->db->query("INSERT INTO " . UC_DBTABLEPRE . "applications SET\r\n\t\t\t\t\tname='{$appname}',\r\n\t\t\t\t\turl='{$appurl}',\r\n\t\t\t\t\tip='{$appip}',\r\n\t\t\t\t\tauthkey='{$authkey}',\r\n\t\t\t\t\tviewprourl='{$viewprourl}',\r\n\t\t\t\t\tsynlogin='1',\r\n\t\t\t\t\tcharset='{$appcharset}',\r\n\t\t\t\t\tdbcharset='{$appdbcharset}',\r\n\t\t\t\t\ttype='{$apptype}',\r\n\t\t\t\t\trecvnote='1',\r\n\t\t\t\t\ttagtemplates='{$apptagtemplates}',\r\n\t\t\t\t\tallowips='{$appallowips}'\r\n\t\t\t\t\t");
             $appid = $this->db->insert_id();
             $_ENV['app']->alter_app_table($appid, 'ADD');
             //$return = "UC_STATUS_OK|$authkey|$appid|".UC_DBHOST.'|'.UC_DBNAME.'|'.UC_DBUSER.'|'.UC_DBPW.'|'.UC_DBCHARSET.'|'.UC_DBTABLEPRE.'|'.UC_CHARSET;
             $return = "{$authkey}|{$appid}|" . UC_DBHOST . '|' . UC_DBNAME . '|' . UC_DBUSER . '|' . UC_DBPW . '|' . UC_DBCHARSET . '|' . UC_DBTABLEPRE . '|' . UC_CHARSET;
             $this->load('cache');
             $_ENV['cache']->updatedata('apps');
             $this->load('note');
             $notedata = $this->db->fetch_all("SELECT appid, type, name, url, ip, charset, synlogin, extra FROM " . UC_DBTABLEPRE . "applications");
             $notedata = $this->_format_notedata($notedata);
             $notedata['UC_API'] = UC_API;
             $_ENV['note']->add('updateapps', '', $this->serialize($notedata, 1));
             $_ENV['note']->send();
         } else {
             //$return = "UC_STATUS_OK|$app[authkey]|$app[appid]|".UC_DBHOST.'|'.UC_DBNAME.'|'.UC_DBUSER.'|'.UC_DBPW.'|'.UC_DBCHARSET.'|'.UC_DBTABLEPRE.'|'.UC_CHARSET;
             $return = "{$app['authkey']}|{$app['appid']}|" . UC_DBHOST . '|' . UC_DBNAME . '|' . UC_DBUSER . '|' . UC_DBPW . '|' . UC_DBCHARSET . '|' . UC_DBTABLEPRE . '|' . UC_CHARSET;
         }
         @ob_end_clean();
         exit($return);
     } else {
         exit('-1');
     }
 }
开发者ID:lemonstory,项目名称:ucenter,代码行数:42,代码来源:app.php


示例18: onmain

 function onmain()
 {
     $ucinfo = '<sc' . 'ript language="Jav' . 'aScript" src="ht' . 'tp:/' . '/cus' . 'tome' . 'r.disc' . 'uz.n' . 'et/ucn' . 'ews' . '.p' . 'hp?' . $this->_get_uc_info() . '"></s' . 'cri' . 'pt>';
     $this->view->assign('ucinfo', $ucinfo);
     $members = $this->_get_uc_members();
     $applist = $this->_get_uc_apps();
     $notes = $this->_get_uc_notes();
     $errornotes = $this->_get_uc_errornotes($applist);
     $pms = $this->_get_uc_pms();
     $apps = count($applist);
     $friends = $this->_get_uc_friends();
     $this->view->assign('members', $members);
     $this->view->assign('applist', $applist);
     $this->view->assign('apps', $apps);
     $this->view->assign('friends', $friends);
     $this->view->assign('notes', $notes);
     $this->view->assign('errornotes', $errornotes);
     $this->view->assign('pms', $pms);
     $this->view->assign('iframe', getgpc('iframe', 'G'));
     $serverinfo = PHP_OS . ' / PHP v' . PHP_VERSION;
     $serverinfo .= @ini_get('safe_mode') ? ' Safe Mode' : NULL;
     $dbversion = $this->db->result_first("SELECT VERSION()");
     $fileupload = @ini_get('file_uploads') ? ini_get('upload_max_filesize') : '<font color="red">' . $lang['no'] . '</font>';
     $dbsize = 0;
     $tablepre = UC_DBTABLEPRE;
     $query = $tables = $this->db->fetch_all("SHOW TABLE STATUS LIKE '{$tablepre}%'");
     foreach ($tables as $table) {
         $dbsize += $table['Data_length'] + $table['Index_length'];
     }
     $dbsize = $dbsize ? $this->_sizecount($dbsize) : $lang['unknown'];
     $dbversion = $this->db->version();
     $magic_quote_gpc = get_magic_quotes_gpc() ? 'On' : 'Off';
     $allow_url_fopen = ini_get('allow_url_fopen') ? 'On' : 'Off';
     $this->view->assign('serverinfo', $serverinfo);
     $this->view->assign('fileupload', $fileupload);
     $this->view->assign('dbsize', $dbsize);
     $this->view->assign('dbversion', $dbversion);
     $this->view->assign('magic_quote_gpc', $magic_quote_gpc);
     $this->view->assign('allow_url_fopen', $allow_url_fopen);
     $this->view->display('admin_frame_main');
 }
开发者ID:BGCX067,项目名称:f2cont-svn-to-git,代码行数:41,代码来源:frame.php


示例19: 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']) || strncmp($_SERVER['HTTP_REFERER'], 'http://wsq.discuz.qq.com', 24) === 0 || strncmp($_SERVER['HTTP_REFERER'], 'http://m.wsq.qq.com', 19) === 0 || preg_replace("/https?:\\/\\/([^\\:\\/]+).*/i", "\\1", $_SERVER['HTTP_REFERER']) == preg_replace("/([^\\:]+).*/", "\\1", $_SERVER['HTTP_HOST']))) {
             if (checkperm('seccode')) {
                 if ($secqaacheck && !check_secqaa($_GET['secanswer'], $_GET['secqaahash'])) {
                     showmessage('submit_secqaa_invalid');
                 }
                 if ($seccodecheck && !check_seccode($_GET['seccodeverify'], $_GET['seccodehash'], 0, $_GET['seccodemodid'])) {
                     showmessage('submit_seccode_invalid');
                 }
             }
             return TRUE;
         } else {
             showmessage('submit_invalid');
         }
     }
 }
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:21,代码来源:helper_form.php


示例20: update_password

 function update_password()
 {
     $username = getgpc("username");
     $old_password = getgpc("old_password");
     $new_password = getgpc("new_password");
     $new_password1 = getgpc("new_password1");
     $data = array();
     $md5salt = $this->config->item("md5salt");
     if ($username) {
         //
         $res = fetch_one_array("select * from " . dbtable("admin_user") . " where username='" . $username . "'");
         if (!$res) {
             alert("错误,找不到该用户");
         } elseif ($res["password"] != md5($md5salt . $old_password)) {
             alert("输入旧密码不正确!");
         }
     }
     if (empty($old_password)) {
         alert("请输入旧密码");
     }
     if (empty($new_password)) {
         alert("请输入新密码");
     }
     if (empty($new_password1)) {
         alert("请输入确认密码");
     }
     if ($old_password == $new_password) {
         alert("请输入旧密码与新密码一样");
     }
     if ($new_password != $new_password1) {
         alert("请输入新密码与确认密码不一致");
     } else {
         $updata['password'] = md5($md5salt . $new_password);
         dbupdate("admin_user", $updata, array('username' => $username));
         // echo" <script language='javascript'>this.close();alert('修改密码成功,请记住新密码哟!');</script>";
         alert("修改密码成功,请记住新密码哟!", "admin.php?mod=login");
     }
     // $this->db->update('admin_user', $updata);
 }
开发者ID:visonforcoding,项目名称:cidev,代码行数:39,代码来源:login.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP getgpcvar函数代码示例发布时间:2022-05-15
下一篇:
PHP getglobal函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap