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


PHP WapAction类代码示例

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


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

示例1: __construct

	public function __construct()
	{
		parent::_initialize();
		
		$this->action_id = $this->_get("id", "intval");
		D("Userinfo")->convertFake(M("cointree_users"), array("token" => $this->token, "wecha_id" => $this->wecha_id, "fakeopenid" => $this->fakeopenid));
	}
开发者ID:kevicki,项目名称:pig,代码行数:7,代码来源:CoinBaseAction.class.php

示例2: __construct

 public function __construct()
 {
     $this->bid = $this->_get('bid') ? intval($this->_get('bid', 'trim')) : 0;
     parent::_initialize();
     /*$checkFunc=new checkFunc();if (!function_exists('fdsrejsie3qklwewerzdagf4ds')){exit('error-4');}
       $checkFunc->cfdwdgfds3skgfds3szsd3idsj();*/
     if (!$this->wecha_id) {
         $this->wecha_id = '';
         $_SESSION['token_openid_' . $this->token] = '';
     }
     if ($this->owndomain) {
         $this->siteUrl = "http://" . $this->owndomain;
     }
     $this->thisopenduser = $this->bid . '_user' . $this->wecha_id;
     //$loginuserid=isset($_SESSION[$thisopenduser]) && !empty($_SESSION[$thisopenduser]) ? intval($_SESSION[$thisopenduser]) : 0;
     $loginuserid = cookie($this->thisopenduser);
     $this->loginuserid = $loginuserid ? intval($loginuserid) : 0;
     $tmpuserid = $this->_get('loginuserid') ? intval($this->_get('loginuserid', 'trim')) : 0;
     if ($this->owndomain && $this->rget == 3 && $tmpuserid > 0) {
         $this->loginuserid = $tmpuserid;
     }
     $bgimg = $_SESSION['MicroBroker_bgimg' . $this->bid];
     $this->assign('loginuserid', $this->loginuserid);
     $this->assign('wecha_id', $this->wecha_id);
     $this->assign('bid', $this->bid);
     $this->assign('bgimg', $bgimg);
 }
开发者ID:liuguogen,项目名称:weixin,代码行数:27,代码来源:MicroBrokerAction.class.php

示例3: _initialize

 protected function _initialize()
 {
     parent::_initialize();
     $opened_funcs = session('opened_funcs_' . $this->token);
     $cur_func = 'canyin';
     if (!in_array($cur_func, $opened_funcs)) {
         //Log::record('Dining function verification failed: token:'.$this->token.' opened_funcs:'.print_r($opened_funcs, true));
         //Log::save();
         echo '没有开启餐饮功能!';
         exit;
     }
     if (empty($this->wechat_id)) {
         //未登录
         if ($this->wechat_type == 1 && $this->is_authed == 1) {
             $host_name = C('wx_handler_server');
             $cur_url = urlencode('http://' . $host_name . $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'] . "#wechat_redirect");
             //必须是认证过的服务号
             $redirect = urlencode('http://' . $host_name . "/index.php?g=Wap&m=Oauth2&a=index&backurl=" . $cur_url . "#wechat_redirect");
             $auth_url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" . $this->appid . "&redirect_uri=" . $redirect . "&response_type=code&scope=snsapi_userinfo&state=" . $this->token . "#wechat_redirect";
             //Log::record('auth_url'.$auth_url);
             header("Location:{$auth_url}");
             //确保重定向后,后续代码不会被执行
         }
     }
     $this->assign('token', $this->token);
 }
开发者ID:zhaoshengloveqingqing,项目名称:Wechat,代码行数:26,代码来源:DiningAction.class.php

示例4: __construct

    public function __construct() {

        $this->bid = $this->_get('bid') ? intval($this->_get('bid', 'trim')) : 0;
        parent::_initialize();
		
        if (!$this->wecha_id) {
            $this->wecha_id = '';
            $_SESSION['token_openid_' . $this->token] = '';
        }
		if($this->owndomain){
		   $this->siteUrl="http://".$this->owndomain;
		}
        $this->thisopenduser = $this->bid . '_user' . $this->wecha_id;
        //$loginuserid=isset($_SESSION[$thisopenduser]) && !empty($_SESSION[$thisopenduser]) ? intval($_SESSION[$thisopenduser]) : 0;
        $loginuserid = cookie($this->thisopenduser);
        $this->loginuserid = $loginuserid ? intval($loginuserid) : 0;
		$tmpuserid=$this->_get('loginuserid') ? intval($this->_get('loginuserid','trim')) : 0;
		if($this->owndomain && ($this->rget==3) && ($tmpuserid>0)){
		  $this->loginuserid=$tmpuserid;
		}
		$bgimg=$_SESSION['MicroBroker_bgimg' . $this->bid];
        $this->assign('loginuserid', $this->loginuserid);
        $this->assign('wecha_id', $this->wecha_id);
        $this->assign('bid', $this->bid);
		$this->assign('bgimg', $bgimg);
    }
开发者ID:kevicki,项目名称:pig,代码行数:26,代码来源:MicroBrokerAction.class.php

示例5: __construct

	public function __construct(){

		

		parent::__construct();
		if($this->_get('wecha_id')){
			$cover = 0;
		}else{
			$cover = 1;
		}
		$this->assign('cover',$cover);

		$this->token=session('token');

		// $this->token = $this->_get('token');

		$this->assign('token',$this->token);

		$this->wecha_id	= $this->_get('wecha_id');

		if (!$this->wecha_id){

			$this->wecha_id='null';

		}
			$where['token']=$this->token;

		$this->assign('wecha_id',$this->wecha_id);
     



	}
开发者ID:royalwang,项目名称:saivi,代码行数:33,代码来源:JikedatiAction.class.php

示例6: __construct

	public function __construct(){

		parent::__construct();

		$this->token=session('token');

		// $this->token = $this->_get('token');

		$this->assign('token',$this->token);

		$this->wecha_id	= $this->_get('wecha_id');

		if (!$this->wecha_id){

			$this->wecha_id='null';

		}
			
		$this->assign('wecha_id',$this->wecha_id);

		$this->scene_model=M('Scene');
		$this->scene_addtp=M('scene_addtp');


	}
开发者ID:royalwang,项目名称:saivi,代码行数:25,代码来源:SceneAction.class.php

示例7: __construct

 public function __construct()
 {
     parent::_initialize();
     if (!defined('RES')) {
         define('RES', THEME_PATH . 'common');
     }
     //$this->wecha_id=$this->wecha_id;
     $this->assign('wecha_id', $this->wecha_id);
     //
     $this->token = $this->_get('token');
     $this->thisUser = M('Userinfo')->where(array('token' => $this->_get('token'), 'wecha_id' => $this->wecha_id))->find();
     if (!$this->wecha_id && ACTION_NAME != 'companyMap') {
         $this->error('您没有权限使用会员卡,如需使用请关注微信“' . $this->wxuser['wxname'] . '”并回复会员卡', U('Index/index', array('token' => $this->token)));
     }
     $action = array('index', 'companyMap', 'payReturn');
     if (!in_array(ACTION_NAME, $action) && empty($_GET['cardid'])) {
         $this->error('请领取会员卡后再操作');
     }
     if (C('baidu_map')) {
         $this->isamap = 0;
     } else {
         $this->isamap = 1;
         $this->amap = new amap();
     }
 }
开发者ID:node-rookie,项目名称:bdg,代码行数:25,代码来源:CardAction.class.php

示例8: _initialize

	public function _initialize(){
		parent::_initialize();
		$agent = $_SERVER['HTTP_USER_AGENT']; 
		if(!strpos($agent,"MicroMessenger")) {
		//	echo '此功能只能在微信浏览器中使用';exit;
		}
		
		$this->token		= $this->_get('token');
		$this->session_cart_name='session_cart_products_'.$this->token;
		$this->assign('token',$this->token);
		$this->wecha_id	= $this->wecha_id;
		if (!$this->wecha_id){
			//$this->wecha_id='';
		}
		$this->assign('wecha_id',$this->wecha_id);
		$this->product_model=M('Product');
		$this->product_cat_model=M('Product_cat');
		//define('RES',THEME_PATH.'common');
		//define('STATICS',TMPL_PATH.'static');
		$this->assign('staticFilePath',str_replace('./','/',THEME_PATH.'common/css/product'));
		//购物车
		$calCartInfo=$this->calCartInfo();
		$this->assign('totalProductCount',$calCartInfo[0]);
		$this->assign('totalProductFee',$calCartInfo[1]);
		//是否是餐饮
		if (isset($_GET['dining'])&&intval($_GET['dining'])){
			$this->isDining=1;
			$this->assign('isDining',1);
		}
	}
开发者ID:kevicki,项目名称:pig,代码行数:30,代码来源:ProductAction.class.php

示例9: _initialize

	public function _initialize()
	{
		parent::_initialize();
		
		$this->action_id = $this->_get("id", "intval");
		$this->my_packets = M("hongbao_grabber")->where("hongbao_id = $this->action_id and token = '$this->token' and grabber_wechaid = '$this->wecha_id'")->find();
	}
开发者ID:kevicki,项目名称:pig,代码行数:7,代码来源:HongbaoAction.class.php

示例10: _initialize

	public function _initialize() {
		parent::_initialize();
		session('wapupload',1);
		if (!$this->wecha_id){
			$this->error('您无权访问','');
		}
	}
开发者ID:kevicki,项目名称:pig,代码行数:7,代码来源:UserinfoAction.class.php

示例11: __construct

 public function __construct()
 {
     parent::_initialize();
     $this->field_db = M('custom_field');
     $this->info_db = M('custom_info');
     $this->limit_db = M('custom_limit');
     $this->token = $this->_get('token');
     if (!defined('RES')) {
         define('RES', THEME_PATH . 'common');
     }
     //$this->wecha_id		= $this->_get('wecha_id');
     if (!$this->wecha_id) {
         $this->wecha_id = 'null';
     }
     $this->thisForm = M('custom_set')->where(array('token' => $this->token, 'set_id' => $this->_get('id', 'intval')))->find();
     $this->assign('token', $this->token);
     $this->assign('thisForm', $this->thisForm);
     $this->assign('wecha_id', $this->wecha_id);
     if (C('baidu_map')) {
         $this->isamap = 0;
     } else {
         $this->isamap = 1;
         $this->amap = new amap();
     }
 }
开发者ID:ww102111,项目名称:weixin,代码行数:25,代码来源:CustomAction.class.php

示例12: _initialize

 public function _initialize()
 {
     parent::_initialize();
     $agent = $_SERVER['HTTP_USER_AGENT'];
     if (!strpos($agent, "MicroMessenger")) {
         //	echo '此功能只能在微信浏览器中使用';exit;
     }
     $this->token = isset($_REQUEST['token']) ? htmlspecialchars($_REQUEST['token']) : session('token');
     $this->session_cart_name = 'session_cart_products_' . $this->token;
     $this->assign('token', $this->token);
     $this->wecha_id = isset($_REQUEST['wecha_id']) ? htmlspecialchars($_REQUEST['wecha_id']) : '';
     if (!$this->wecha_id) {
         //$this->wecha_id='';
         //exit('非法请求');
     }
     $this->assign('wecha_id', $this->wecha_id);
     $this->product_model = M('Product');
     $this->product_cat_model = M('Product_cat');
     $this->assign('staticFilePath', str_replace('./', '/', THEME_PATH . 'common/css/store'));
     //购物车
     $calCartInfo = $this->calCartInfo();
     $this->assign('totalProductCount', $calCartInfo[0]);
     $this->assign('totalProductFee', $calCartInfo[1]);
     $cats = $this->product_cat_model->where(array('token' => $this->token))->order('id asc')->select();
     $this->assign('cats', $cats);
 }
开发者ID:SubDong,项目名称:pigcms,代码行数:26,代码来源:StoreAction.class.php

示例13: _initialize

 public function _initialize()
 {
     parent::_initialize();
     if (!$this->wecha_id) {
         $this->error('您无权访问', '');
     }
 }
开发者ID:ailingsen,项目名称:pigcms,代码行数:7,代码来源:UserinfoAction.class.php

示例14: __construct

    public function __construct(){
        parent::_initialize();
        if (!defined('RES')){
            define('RES',THEME_PATH.'common');
        }
        //$this->wecha_id=$this->wecha_id;
        $this->assign('wecha_id',$this->wecha_id);
        //
        $this->token=$this->_get('token');
        $this->thisUser = M('Userinfo')->where(array('token'=>$this->_get('token'),'wecha_id'=>$this->wecha_id))->find();
        if (!$this->wecha_id && ACTION_NAME != 'companyMap'){
        	$name = $this->isFuwu ? '服务窗' : '微信';
            $this->error('您没有权限使用会员卡,如需使用请关注'.$name.'“'.$this->wxuser['wxname'].'”并回复会员卡',U('Index/index',array('token'=>$this->token)));
        }

        $action = array('index', 'companyMap','payReturn');
        if(!in_array(ACTION_NAME,$action) && empty($_GET['cardid'])){
            $this->error('请领取会员卡后再操作');
        }
		if (C('baidu_map')){
            $this->isamap=0;
        }else {
            $this->isamap=1;
            $this->amap=new amap();
        }
        // 校正数据表
        D('Userinfo')->convertFake(M('MemberCardCreate'), array('token'=>$this->token, 'fakeopenid'=> $this->fakeopenid, 'wecha_id'=>$this->wecha_id));
        D('Userinfo')->convertFake(M('MemberCardCouponRecord'), array('token'=>$this->token, 'fakeopenid'=> $this->fakeopenid, 'wecha_id'=>$this->wecha_id));
        D('Userinfo')->convertFake(M('MemberCardPayRecord'), array('token'=>$this->token, 'fakeopenid'=> $this->fakeopenid, 'wecha_id'=>$this->wecha_id));
        D('Userinfo')->convertFake(M('MemberCardSign'), array('token'=>$this->token, 'fakeopenid'=> $this->fakeopenid, 'wecha_id'=>$this->wecha_id));
        D('Userinfo')->convertFake(M('MemberCardUseRecord'), array('token'=>$this->token, 'fakeopenid'=> $this->fakeopenid, 'wecha_id'=>$this->wecha_id));
        
    }
开发者ID:kevicki,项目名称:pig,代码行数:33,代码来源:CardAction.class.php

示例15: __construct

	public function __construct(){
		
		

		parent::__construct();

		$this->token=session('token');

		// $this->token = $this->_get('token');

		$this->assign('token',$this->token);

		$this->wecha_id	= $this->_get('wecha_id');

		if (!$this->wecha_id){

			$this->wecha_id='null';

		}
			$where['token']=$this->token;
		$kefu=M('Kefu')->where($where)->find();
		$this->assign('kefu',$kefu);

		$this->assign('wecha_id',$this->wecha_id);

		$this->Zhaopin_model=M('Zhaopin');

		
		

		



	}
开发者ID:kevicki,项目名称:pig,代码行数:35,代码来源:ZhaopinAction.class.php


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