當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。