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


PHP iPHP::get_cookie方法代码示例

本文整理汇总了PHP中iPHP::get_cookie方法的典型用法代码示例。如果您正苦于以下问题:PHP iPHP::get_cookie方法的具体用法?PHP iPHP::get_cookie怎么用?PHP iPHP::get_cookie使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在iPHP的用法示例。


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

示例1: get_user_info

 public function get_user_info()
 {
     $this->openid = authcode(iPHP::get_cookie("QQ_OPENID"), 'DECODE');
     $access_token = authcode(iPHP::get_cookie("QQ_ACCESS_TOKEN"), 'DECODE');
     $get_user_info = "https://graph.qq.com/user/get_user_info?" . "access_token=" . $access_token . "&oauth_consumer_key=" . $this->appid . "&openid=" . $this->openid . "&format=json";
     $info = $this->get_url_contents($get_user_info);
     $arr = json_decode($info, true);
     $arr['avatar'] = $arr['figureurl_2'];
     $arr['gender'] = $arr['gender'] == "??" ? '1' : 0;
     return $arr;
 }
开发者ID:World3D,项目名称:iCMS,代码行数:11,代码来源:QQ.class.php

示例2: get_user_info

 public function get_user_info()
 {
     $access_token = authcode(iPHP::get_cookie("WX_ACCESS_TOKEN"), 'DECODE');
     $openid = authcode(iPHP::get_cookie("WX_OPENID"), 'DECODE');
     $get_user_info = "https://api.weixin.qq.com/sns/userinfo?" . "access_token=" . $access_token . "&openid=" . $openid;
     $info = $this->get_url_contents($get_user_info);
     $arr = json_decode($info, true);
     $arr['avatar'] = $arr['headimgurl'];
     $arr['gender'] = $arr['sex'];
     return $arr;
 }
开发者ID:sunhk25,项目名称:iCMS,代码行数:11,代码来源:WX.class.php

示例3: __construct

 public function __construct()
 {
     $this->auth = user::get_cookie();
     $this->uid = (int) $_GET['uid'];
     $this->forward = iS::escapeStr($_GET['forward']);
     $this->forward or iPHP::get_cookie('forward');
     $this->forward or $this->forward = iCMS_URL;
     // iFS::config($GLOBALS['iCONFIG']['user_fs_conf'])
     iFS::$userid = user::$userid;
     iPHP::assign('forward', $this->forward);
 }
开发者ID:World3D,项目名称:iCMS,代码行数:11,代码来源:user.app.php

示例4: API_like

 public function API_like()
 {
     // iPHP::app('user.class','static');
     // user::get_cookie() OR iPHP::code(0,'iCMS:!login',0,'json');
     $this->id or iPHP::code(0, 'iCMS:article:empty_id', 0, 'json');
     $lckey = 'like_comment_' . $this->id;
     $like = iPHP::get_cookie($lckey);
     $like && iPHP::code(0, 'iCMS:comment:!like', 0, 'json');
     //$ip = iPHP::getIp();
     iDB::query("UPDATE `#iCMS@__comment` SET `up`=up+1 WHERE `id`='{$this->id}'");
     iPHP::set_cookie($lckey, $_SERVER['REQUEST_TIME'], 86400);
     iPHP::code(1, 'iCMS:comment:like', 0, 'json');
 }
开发者ID:sunhk25,项目名称:iCMS,代码行数:13,代码来源:comment.app.php

示例5: get_user_info

 public function get_user_info()
 {
     $access_token = authcode(iPHP::get_cookie("WB_ACCESS_TOKEN"), 'DECODE');
     $refresh_token = authcode(iPHP::get_cookie("WB_REFRESH_TOKEN"), 'DECODE');
     $this->openid = authcode(iPHP::get_cookie("WB_OPENID"), 'DECODE');
     $url = "https://api.weibo.com/2/users/show.json?uid=" . $this->openid;
     $info = $this->get_url_contents($url, $access_token);
     $arr = json_decode($info, true);
     $arr['nickname'] = $arr['screen_name'];
     $arr['avatar'] = $arr['avatar_large'];
     $arr['gender'] = $arr['gender'] == "m" ? '1' : '0';
     return $arr;
 }
开发者ID:sunhk25,项目名称:iCMS,代码行数:13,代码来源:WB.class.php

示例6: vote

 private function vote($_do)
 {
     // iPHP::app('user.class','static');
     // user::get_cookie() OR iPHP::code(0,'iCMS:!login',0,'json');
     $aid = (int) $_GET['iid'];
     $aid or iPHP::code(0, 'iCMS:article:empty_id', 0, 'json');
     $ackey = 'article_' . $_do . '_' . $aid;
     $vote = iPHP::get_cookie($ackey);
     $vote && iPHP::code(0, 'iCMS:article:!' . $_do, 0, 'json');
     if ($_do == 'good') {
         $sql = '`good`=good+1';
     } else {
         $sql = '`bad`=bad+1';
     }
     iDB::query("UPDATE `#iCMS@__article` SET {$sql} WHERE `id` ='{$aid}' limit 1");
     iPHP::set_cookie($ackey, time(), 86400);
     iPHP::code(1, 'iCMS:article:' . $_do, 0, 'json');
 }
开发者ID:World3D,项目名称:iCMS,代码行数:18,代码来源:article.app.php

示例7: checkLogin

 public static function checkLogin()
 {
     //        self::$LOGIN_COUNT = (int)authcode(get_cookie('iCMS_LOGIN_COUNT'),'DECODE');
     //        if(self::$LOGIN_COUNT>iCMS_LOGIN_COUNT) exit();
     $a = iS::escapeStr($_POST['username']);
     $p = iS::escapeStr($_POST['password']);
     $ip = iPHP::getIp();
     $sep = iPHP_AUTH_IP ? '#=iCMS[' . $ip . ']=#' : '#=iCMS=#';
     if (empty($a) && empty($p)) {
         $auth = iPHP::get_cookie(self::$AUTH);
         list($a, $p) = explode($sep, authcode($auth, 'DECODE'));
         return self::check($a, $p);
     } else {
         $p = md5($p);
         $crs = self::check($a, $p);
         iDB::query("UPDATE `#iCMS@__members` SET `lastip`='" . $ip . "',`lastlogintime`='" . time() . "',`logintimes`=logintimes+1 WHERE `uid`='" . self::$userid . "'");
         iPHP::set_cookie(self::$AUTH, authcode($a . $sep . $p, 'ENCODE'));
         self::$AJAX && iPHP::json(array('code' => 1));
         return $crs;
     }
 }
开发者ID:sunhk25,项目名称:iCMS,代码行数:21,代码来源:iMember.class.php

示例8: do_iCMS

 function do_iCMS()
 {
     $tabs = iPHP::get_cookie(iACP::$app_name . '_tabs');
     $tabs == "list" ? $this->do_list() : $this->do_tree();
 }
开发者ID:World3D,项目名称:iCMS,代码行数:5,代码来源:category.app.php

示例9: head

 public static function head($navbar = true)
 {
     $body_class = '';
     if (iCMS::$config['other']['sidebar_enable']) {
         iCMS::$config['other']['sidebar'] or $body_class = 'sidebar-mini';
         $body_class = iPHP::get_cookie('ACP_sidebar_mini') ? 'sidebar-mini' : '';
     } else {
         $body_class = 'sidebar-display';
     }
     $navbar === false && ($body_class = 'iframe ');
     include self::view("admincp.header");
     $navbar === true && (include self::view("admincp.navbar"));
 }
开发者ID:Junred,项目名称:iCMS,代码行数:13,代码来源:iACP.class.php

示例10: get_openid

 public function get_openid()
 {
     $this->openid = authcode(iPHP::get_cookie("TB_OPENID"), 'DECODE');
     return $this->openid;
 }
开发者ID:sunhk25,项目名称:iCMS,代码行数:5,代码来源:TB.class.php

示例11: get_cookie

 public static function get_cookie($unpw = false)
 {
     $auth = authcode(iPHP::get_cookie(self::$AUTH));
     $userid = authcode(iPHP::get_cookie('userid'));
     $nickname = authcode(iPHP::get_cookie('nickname'));
     list($_userid, $_username, $_password, $_nickname) = explode(USER_AUTHASH, $auth);
     if ((int) $userid === (int) $_userid && $nickname === $_nickname) {
         self::$userid = (int) $_userid;
         self::$nickname = $_nickname;
         $u = array('userid' => self::$userid, 'nickname' => self::$nickname);
         if ($unpw) {
             $u['username'] = $_username;
             $u['password'] = $_password;
         }
         return $u;
     }
     //self::logout();
     return false;
 }
开发者ID:sunhk25,项目名称:iCMS,代码行数:19,代码来源:user.class.php


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