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

PHP WapAction类代码示例

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

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



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


示例16: _initialize

 public function _initialize()
 {
     parent::_initialize();
     $this->token = filter_var($this->_get('token'), FILTER_SANITIZE_STRING);
     $this->wecha_id = filter_var($this->wecha_id, FILTER_SANITIZE_STRING);
     $this->type = filter_var($this->_get('type'), FILTER_SANITIZE_STRING);
     $this->bid = filter_var($this->_get('bid'), FILTER_VALIDATE_INT);
     $arrAllow = array('fitness', 'gover', 'food', 'travel', 'flower', 'property', 'ktv', 'bar', 'fitment', 'wedding', 'affections', 'housekeeper', 'lease', 'beauty');
     $orderid = filter_var($this->_get('orderid'), FILTER_SANITIZE_STRING);
     if (!in_array($this->type, $arrAllow) && empty($_GET['orderid'])) {
         $this->error('抱歉,您的参数不合法!', U('Index/index', array('token' => $this->token, 'wecha_id' => $this->wecha_id)));
     }
     $where = array('token' => $this->token, 'type' => $this->type, 'bid' => $this->bid);
     $busines = M('busines')->where($where)->find();
     $this->assign('busines', $busines);
     $this->assign('picurl', $busines['picurl']);
     $this->assign('title', $busines['title']);
     $this->assign('token', $this->token);
     $this->assign('wecha_id', $this->wecha_id);
     $this->assign('type', $this->type);
     $this->assign('bid', $this->bid);
     $where['token'] = $this->token;
     $kefu = M('Kefu')->where($where)->find();
     $this->assign('kefu', $kefu);
     $tpl = $this->wxuser;
     $this->tpl = $tpl;
 }
开发者ID:liuguogen,项目名称:weixin,代码行数:27,代码来源:BusinessAction.class.php


示例17: __construct

 public function __construct()
 {
     parent::__construct();
     //普通活动或者现场活动
     $this->act_type = $this->_get('act_type', 'intval');
     $this->shake_model = M('Shake');
 }
开发者ID:liuguogen,项目名称:weixin,代码行数:7,代码来源:ShakeAction.class.php


示例18: __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;
		
		$this->assign('wecha_id',$this->wecha_id);

		$this->Yingyong_model=M('Yingyong');

	
		

		



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


示例19: _initialize

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


示例20: _initialize

	public function _initialize(){
		parent::_initialize();
		$agent = $_SERVER['HTTP_USER_AGENT']; 
		if (!strpos($agent, "MicroMessenger")) {
			//echo '此功能只能在微信浏览器中使用';exit;
		}
		
		$this->token = isset($_REQUEST['token']) ? $_REQUEST['token'] : session('token');//$this->_get('token');
		
		$this->assign('token', $this->token);
		$this->wecha_id	= isset($_REQUEST['wecha_id']) ? $_REQUEST['wecha_id'] : '';
		$this->assign('wecha_id', $this->wecha_id);
		
		$this->_cid = $_SESSION["session_hotel_{$this->token}"];
		$this->assign('cid', $this->_cid);
		
		$this->session_dish_info = "session_hotel_{$this->_cid}_info_{$this->token}";
		$this->session_dish_user = "session_hotel_{$this->_cid}_user_{$this->token}";
		
		$this->assign('totalDishCount', $count);
		$where['token']=$this->token;
		$kefu=M('Kefu')->where($where)->find();
		$this->assign('kefu',$kefu);

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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP Warehouse类代码示例发布时间:2022-05-23
下一篇:
PHP Walker_Nav_Menu类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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