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


PHP _getcookie函数代码示例

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


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

示例1: card_addmoney

 public function card_addmoney()
 {
     $czknum = htmlspecialchars($_POST['czknum']);
     $password = htmlspecialchars($_POST['password']);
     if (empty($czknum) or empty($password)) {
         _message("您尚未填写卡密信息");
     }
     $czkdata = $this->db->GetList("select * from `@#_czk` where `status` = '1'  AND czknum='{$czknum}' AND password='{$password}'");
     if (!$czkdata) {
         _message("卡号或卡密不正确");
     }
     $czkdata = $czkdata[0];
     $uid = intval(_encrypt(_getcookie("uid"), 'DECODE'));
     //查询用户信息
     if ($czkdata['type'] == 1) {
         $members = $this->db->GetList("select * from `@#_member` where uid='{$uid}'");
         $money = $czkdata['mianzhi'] + $members[0]['money'];
         $this->db->Query("UPDATE `@#_member` SET money='{$money}' where `uid`='{$uid}' ");
     } else {
         $members = $this->db->GetList("select * from `@#_member` where uid='{$uid}' and tyczk='0'");
         if (empty($members)) {
             _message("卡密不存在或者已经参与此活动!");
             die;
         }
         $money = $czkdata['mianzhi'] + $members[0]['money'];
         $this->db->Query("UPDATE `@#_member` SET money='{$money}',tyczk='1' where `uid`='{$uid}' ");
     }
     $this->db->Query("UPDATE `@#_czk` SET status='0' where czknum='{$czknum}' AND password='{$password}' ");
     $time = time();
     $this->db->Query("INSERT INTO `@#_member_account`(uid,type,pay,content,money,time)VALUES('{$uid}','1','账户','充值卡','{$czkdata['mianzhi']}','{$time}')");
     _message("充值成功!");
 }
开发者ID:shuay,项目名称:projectYG,代码行数:32,代码来源:cart.action.php

示例2: CheckAdminInfo

 protected final function CheckAdminInfo($uid = null, $ashell = null)
 {
     $this->db = System::load_app_model('admin_model', G_ADMIN_DIR);
     if ($uid && $ashell) {
         $CheckId = _encrypt($uid, 'DECODE');
         $CheckAshell = _encrypt($ashell, 'DECODE');
     } else {
         $CheckId = _encrypt(_getcookie("AID"), 'DECODE');
         $CheckAshell = _encrypt(_getcookie("ASHELL"), 'DECODE');
     }
     if (!$CheckId || !$CheckAshell) {
         return false;
     }
     $info = $this->db->GetOne("SELECT * FROM `@#_admin` WHERE `uid` = '{$CheckId}'");
     if (isset($_POST['dosubmit']) || isset($_POST['submit-1'])) {
         if ($info[mid] == '1') {
             _message("测试帐号无修改权限!");
         }
     }
     if (!$info) {
         return false;
     }
     $infoshell = md5($info['username'] . $info['userpass']) . md5($_SERVER['HTTP_USER_AGENT']);
     if ($infoshell != $CheckAshell) {
         return false;
     }
     $this->AdminInfo = $info;
     return true;
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:29,代码来源:admin.class.php

示例3: findpassword

 public function findpassword()
 {
     if (isset($_POST['submit'])) {
         $name = isset($_POST['name']) ? $_POST['name'] : "";
         $txtRegSN = strtoupper($_POST['txtRegSN']);
         if (md5($txtRegSN) != _getcookie('checkcode')) {
             _message("验证码错误");
         }
         $regtype = null;
         if (_checkmobile($name)) {
             $regtype = 'mobile';
         }
         if (_checkemail($name)) {
             $regtype = 'email';
         }
         if ($regtype == null) {
             _message("帐号类型不正确!", null, 3);
         }
         $info = $this->DB()->GetOne("SELECT * FROM `@#_member` WHERE {$regtype} = '{$name}' LIMIT 1");
         if (!$info) {
             _message("帐号不存在");
         }
         header("location:" . WEB_PATH . "/member/finduser/find" . $regtype . "check" . "/" . _encrypt($name));
     }
     $title = "找回密码";
     include templates("user", "findpassword");
 }
开发者ID:king3388,项目名称:king,代码行数:27,代码来源:finduser.action.php

示例4: __construct

 public function __construct()
 {
     if (ROUTE_M == 'member' && ROUTE_C == 'user' && ROUTE_A == 'login') {
         return;
     }
     if (ROUTE_M == 'member' && ROUTE_C == 'user' && ROUTE_A == 'register') {
         return;
     }
     $uid = intval(_encrypt(_getcookie("uid"), 'DECODE'));
     $utype = _encrypt(_getcookie("utype"), 'DECODE');
     $ushell = _encrypt(_getcookie("ushell"), 'DECODE');
     if ($utype === NULL) {
         $this->HeaderLogin();
     }
     if (!$uid) {
         $this->HeaderLogin();
     }
     $this->userinfo = $this->DB()->GetOne("SELECT * from `@#_member` where `uid` = '{$uid}'");
     if (!$this->userinfo) {
         $this->HeaderLogin();
     }
     $shell = md5($this->userinfo['uid'] . $this->userinfo['password'] . $this->userinfo[$utype]);
     if ($ushell != $shell) {
         $this->HeaderLogin();
     }
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:26,代码来源:base.class.php

示例5: CheckAdminInfo

 protected final function CheckAdminInfo($uid = null, $ashell = null)
 {
     $this->db = System::load_app_model('admin_model', G_ADMIN_DIR);
     if ($uid && $ashell) {
         $CheckId = _encrypt($uid, 'DECODE');
         $CheckAshell = _encrypt($ashell, 'DECODE');
     } else {
         $CheckId = _encrypt(_getcookie("AID"), 'DECODE');
         $CheckAshell = _encrypt(_getcookie("ASHELL"), 'DECODE');
     }
     if (!$CheckId || !$CheckAshell) {
         return false;
     }
     $info = $this->db->GetOne("SELECT * FROM `@#_admin` WHERE `uid` = '{$CheckId}'");
     if (!$info) {
         return false;
     }
     $infoshell = md5($info['username'] . $info['userpass']) . md5($_SERVER['HTTP_USER_AGENT']);
     if ($infoshell != $CheckAshell) {
         return false;
     }
     if (empty($_SESSION['token']) && $_SESSION['token'] != md5($info['username'] . $info['userpass'])) {
         return false;
     }
     $this->AdminInfo = $info;
     return true;
 }
开发者ID:haidao17,项目名称:backend,代码行数:27,代码来源:admin.class.php

示例6: upload

 public function upload()
 {
     $getinfo = $this->segment_array();
     //var_dump($getinfo);
     $title = isset($getinfo[4]) ? htmlspecialchars($getinfo[4]) : '';
     //标题
     $type = isset($getinfo[5]) ? htmlspecialchars($getinfo[5]) : '';
     //上传类型
     $path = isset($getinfo[6]) ? htmlspecialchars($getinfo[6]) : '';
     //上传的文件夹
     $num = isset($getinfo[7]) ? intval($getinfo[7]) : 0;
     //上传个数
     $size = isset($getinfo[8]) ? intval($getinfo[8]) : 0;
     //最大size大小
     $frame = isset($getinfo[9]) ? htmlspecialchars($getinfo[9]) : '';
     //iframe的ID
     $input = isset($getinfo[10]) ? htmlspecialchars($getinfo[10]) : '';
     //父框架保存图片地址的input的id
     $func = isset($getinfo[11]) ? htmlspecialchars($getinfo[11]) : '';
     //父框架保存图片地址的input的id
     $desc = $type;
     //类型描述
     $title = urldecode($title);
     if (!_is_utf8($title)) {
         $title = iconv("GBK", "UTF-8", $title);
     }
     $size_str = $this->getsize($size, false);
     $uptype = $this->getUPtype($type, false);
     $check = _getcookie("AID") . '&' . _getcookie("ASHELL");
     System::load_app_class("admin", G_ADMIN_DIR, "no");
     $admincheck = admin::StaticCheckAdminInfo() ? 1 : 0;
     include $this->tpl(ROUTE_M, 'uploadify');
 }
开发者ID:think-css,项目名称:yungou,代码行数:33,代码来源:uploadify.action.php

示例7: __construct

 public function __construct()
 {
     header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT");
     header("Cache-Control: no-cache, must-revalidate");
     header("Pragma:no-cache");
     $this->Cartlist = _getcookie('Cartlist');
     $this->db = System::load_sys_class("model");
 }
开发者ID:king3388,项目名称:king,代码行数:8,代码来源:cart.action.php

示例8: __construct

 public function __construct()
 {
     parent::__construct();
     /* 		if(ROUTE_A!='userphotoup' and ROUTE_A!='singphotoup'){
     			if(!$this->userinfo)_message("请登录",WEB_PATH."/mobile/user/login",3);
     		}	 */
     $this->db = System::load_sys_class('model');
     //查询购物车的信息
     $Mcartlist = _getcookie("Mcartlist");
     $this->Mcartlist = json_decode(stripslashes($Mcartlist), true);
 }
开发者ID:shuay,项目名称:projectYG,代码行数:11,代码来源:shopajax.action.php

示例9: coo

function coo($id)
{
    $code = _getcookie('CODE');
    $cook = explode(",", $code);
    $count = count($cook) - 1;
    for ($i = 0; $i < $count; $i++) {
        if ($id == $cook[$i]) {
            return true;
        }
    }
}
开发者ID:think-css,项目名称:yungou,代码行数:11,代码来源:my.fun.php

示例10: spcook

function spcook($me)
{
    $mysql_model = System::load_sys_class('model');
    $uid = _encrypt(_getcookie('uid'), 'DECODE');
    $member = $mysql_model->GetOne("select * from `@#_member` where `uid`='" . $uid . "'");
    if ($me == "pic") {
        $img = explode(".", $member['img']);
        return $img[1];
    } else {
        return $member[$me];
    }
}
开发者ID:ping199143,项目名称:1ydb,代码行数:12,代码来源:user.fun.php

示例11: cook

 public function cook()
 {
     $mysql_model = System::load_sys_class('model');
     $uid = _encrypt(_getcookie('uid'), 'DECODE');
     $member = $mysql_model->GetOne("select * from `@#_member` where `uid`='" . $uid . "'");
     if (!$member) {
         $lei = $this->segment(2);
         $funct = $this->segment(3);
         //echo $lei;
         header("location:" . WEB_PATH . "home/user/login?lei=" . $lei . "&funct=" . $funct);
         exit;
     } else {
         return $member;
     }
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:15,代码来源:base.class.php

示例12: __construct

 public function __construct()
 {
     $this->db = System::load_sys_class("model");
     $uid = intval(_encrypt(_getcookie("uid"), 'DECODE'));
     $ushell = _encrypt(_getcookie("ushell"), 'DECODE');
     if (!$uid) {
         $this->userinfo = false;
     }
     $this->userinfo = $this->db->GetOne("SELECT * from `@#_member` where `uid` = '{$uid}'");
     if (!$this->userinfo) {
         $this->userinfo = false;
     }
     $shell = md5($this->userinfo['uid'] . $this->userinfo['password'] . $this->userinfo['mobile'] . $this->userinfo['email']);
     if ($ushell != $shell) {
         $this->userinfo = false;
     }
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:17,代码来源:memberbase.class.php

示例13: detail

 public function detail()
 {
     $member = $this->userinfo;
     $sd_id = abs(intval($this->segment(4)));
     $shaidan = $this->db->GetOne("select * from `@#_shaidan` where `sd_id`='{$sd_id}'");
     $goods = $this->db->GetOne("select sid from `@#_shoplist` where `id` = '{$shaidan['sd_shopid']}'");
     $goods = $this->db->GetOne("select id,qishu,money,q_uid,maxqishu,thumb,title from `@#_shoplist` where `sid` = '{$goods['sid']}' order by `qishu` DESC");
     if (isset($_POST['submit'])) {
         $sdhf_syzm = _getcookie("checkcode");
         $sdhf_pyzm = isset($_POST['sdhf_code']) ? strtoupper($_POST['sdhf_code']) : '';
         $sdhf_id = $shaidan['sd_id'];
         $sdhf_userid = $member['uid'];
         $sdhf_content = $_POST['sdhf_content'];
         $sdhf_time = time();
         $sdhf_username = _htmtocode(get_user_name($member));
         $sdhf_img = _htmtocode($member['img']);
         if (empty($sdhf_content)) {
             _message("页面错误");
         }
         if (empty($sdhf_pyzm)) {
             _message("请输入验证码");
         }
         if ($sdhf_syzm != md5($sdhf_pyzm)) {
             _message("验证码不正确");
         }
         $this->db->Query("INSERT INTO `@#_shaidan_hueifu`(`sdhf_id`,`sdhf_userid`,`sdhf_content`,`sdhf_time`,`sdhf_username`,`sdhf_img`)VALUES\n\t\t\t('{$sdhf_id}','{$sdhf_userid}','{$sdhf_content}','{$sdhf_time}','{$sdhf_username}','{$sdhf_img}')");
         $sd_ping = $shaidan['sd_ping'] + 1;
         $this->db->Query("UPDATE `@#_shaidan` SET sd_ping='{$sd_ping}' where sd_id='{$shaidan['sd_id']}'");
         _message("评论成功", WEB_PATH . "/go/shaidan/detail/" . $sd_id);
     }
     $shaidannew = $this->db->GetList("select * from `@#_shaidan` order by `sd_id` DESC limit 5");
     $shaidan_hueifu = $this->db->GetList("select * from `@#_shaidan_hueifu` where `sdhf_id`='{$sd_id}' LIMIT 10");
     foreach ($shaidan_hueifu as $k => $v) {
         $shaidan_hueifu[$k]['sdhf_content'] = _htmtocode($shaidan_hueifu[$k]['sdhf_content']);
     }
     if (!$shaidan) {
         _message("页面错误");
     }
     $substr = substr($shaidan['sd_photolist'], 0, -1);
     $sd_photolist = explode(";", $substr);
     $title = $shaidan['sd_title'] . "_" . _cfg("web_name");
     $keywords = $shaidan['sd_title'];
     $description = $shaidan['sd_title'];
     include templates("index", "detail");
 }
开发者ID:shuay,项目名称:projectYG,代码行数:45,代码来源:shaidan.action.php

示例14: friends1

 function friends1()
 {
     $webname = $this->_cfg['web_name'];
     $member = $this->userinfo;
     $title = "我的购买中心";
     $memberdj = $this->db->GetList("select * from `@#_member_group`");
     $jingyan = $member['jingyan'];
     if (!empty($memberdj)) {
         foreach ($memberdj as $key => $val) {
             if ($jingyan >= $val['jingyan_start'] && $jingyan <= $val['jingyan_end']) {
                 $member['yungoudj'] = $val['name'];
             }
         }
     }
     $mysql_model = System::load_sys_class('model');
     $member = $this->userinfo;
     $uid = _getcookie('uid');
     $notinvolvednum = 0;
     //未参加购买的人数
     $involvednum = 0;
     //参加预购的人数
     $involvedtotal = 0;
     //邀请人数
     //查询邀请好友信息
     $invifriends = $mysql_model->GetList("select * from `@#_member` where `yaoqing`='{$member['uid']}' ORDER BY `time` DESC");
     $involvedtotal = count($invifriends);
     //var_dump($invifriends);
     for ($i = 0; $i < count($invifriends); $i++) {
         $sqluid = $invifriends[$i]['uid'];
         $sqname = get_user_name($invifriends[$i]);
         $invifriends[$i]['sqlname'] = $sqname;
         //查询邀请好友的消费明细
         $accounts[$sqluid] = $mysql_model->GetList("select * from `@#_member_account` where `uid`='{$sqluid}'  ORDER BY `time` DESC");
         //判断哪个好友有消费
         if (empty($accounts[$sqluid])) {
             $notinvolvednum += 1;
             $records[$sqluid] = '未参与购买';
         } else {
             $involvednum += 1;
             $records[$sqluid] = '已参与购买';
         }
     }
     include templates("mobile/invite", "friends1");
 }
开发者ID:ping199143,项目名称:1ydb,代码行数:44,代码来源:invite.action.php

示例15: __construct

 public function __construct()
 {
     $this->mysql_model = System::load_sys_class('model');
     $this->userid = intval(_encrypt(_getcookie("uid"), 'DECODE'));
     //获取当前客户的基本信息 (积分、剩余金额等)
     $this->userinfo = $this->mysql_model->GetOne("SELECT * from `@#_member` where `uid` = '{$this->userid}'");
     $curtime = time();
     /* if(!$this->userid){
     			_message("你还未登录,无权限访问该页!",WEB_PATH."/member/user/login");
     	    } */
     //显示当前抽奖第几期
     $this->ruleinfo = $this->mysql_model->GetOne("select * from `@#_egglotter_rule` where `starttime`<='{$curtime}' and `endtime`>='{$curtime}' and `startusing`=1");
     $this->username = $this->userinfo['username'];
     $rule_id = $this->ruleinfo['rule_id'];
     if (!$this->ruleinfo) {
         _message("没有设置游戏");
     }
     //产看当期奖品
     $this->spoilinfo = $this->mysql_model->GetList("select * from `@#_egglotter_spoil` where `rule_id`='{$rule_id}'");
 }
开发者ID:king3388,项目名称:king,代码行数:20,代码来源:egglotter.plugin.php


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