當前位置: 首頁>>代碼示例>>PHP>>正文


PHP UserAction::_initialize方法代碼示例

本文整理匯總了PHP中UserAction::_initialize方法的典型用法代碼示例。如果您正苦於以下問題:PHP UserAction::_initialize方法的具體用法?PHP UserAction::_initialize怎麽用?PHP UserAction::_initialize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在UserAction的用法示例。


在下文中一共展示了UserAction::_initialize方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _initialize

	public function _initialize() {
		parent::_initialize();
		$this->canUseFunction('shake');
		$this->shake_model=M('Shake');
		$this->token_where['token']=$this->token;
		$this->keyword_model=M('Keyword');
	}
開發者ID:kevicki,項目名稱:pig,代碼行數:7,代碼來源:ShakeAction.class.php

示例2: _initialize

 public function _initialize()
 {
     parent::_initialize();
     $this->assign('token', $this->token);
     //
     $this->canUseFunction('huiyuanka');
     //權限
     if ($this->token != $_GET['token']) {
         //$this->error('非法操作');
     }
     $this->wxuser_db = M("Wxuser");
     //獲取所在組的開卡數量
     $thisWxUser = $this->wxuser_db->where(array('token' => $this->token))->find();
     $thisUser = $this->user;
     $thisGroup = $this->userGroup;
     $this->wxuser_db->where(array('token' => $this->token))->save(array('allcardnum' => $thisGroup['create_card_num']));
     //總數
     //if (!$thisUser['card_num']){
     $allcards = M('Member_card_create')->where(array('token' => $this->token))->select();
     $cardTotal = count($allcards);
     M('Users')->where(array('id' => $thisUser['id']))->save(array('card_num' => $cardTotal));
     M('Wxuser')->where(array('token' => $this->token))->save(array('yetcardnum' => $cardTotal));
     //}else {
     //$cardTotal=$thisUser['card_num'];
     //}
     //
     $can_cr_num = $thisWxUser['allcardnum'] - $cardTotal;
     if ($can_cr_num > 0) {
         $data['cardisok'] = 1;
     } else {
         $data['cardisok'] = 0;
     }
     $this->wxuser_db->where(array('uid' => session('uid'), 'token' => session('token')))->save($data);
     //
     $this->member_card_set_db = M('Member_card_set');
     //
     $id = intval($_GET['id']);
     if ($id) {
         $this->thisCard = $this->member_card_set_db->where(array('id' => $id))->find();
         if ($this->thisCard && $this->thisCard['token'] != $this->token) {
             $this->error('非法操作');
         }
         $this->assign('thisCard', $this->thisCard);
     }
     //transfer start
     $data = M('Member_card_create');
     $cardByToken = $this->member_card_set_db->where(array('token' => $this->token))->order('id ASC')->find();
     if ($cardByToken) {
         $data->where('token=\'' . $this->token . '\' AND cardid=0')->save(array('cardid' => $cardByToken['id']));
         M('Member_card_exchange')->where('token=\'' . $this->token . '\' AND cardid=0')->save(array('cardid' => $cardByToken['id']));
         M('Member_card_coupon')->where('token=\'' . $this->token . '\' AND cardid=0')->save(array('cardid' => $cardByToken['id']));
         M('Member_card_vip')->where('token=\'' . $this->token . '\' AND cardid=0')->save(array('cardid' => $cardByToken['id']));
         M('Member_card_integral')->where('token=\'' . $this->token . '\' AND cardid=0')->save(array('cardid' => $cardByToken['id']));
     }
     //$thisWxUser['wx_coupons'] 	= '1';
     $this->wxuser = $thisWxUser;
     //transfer end
     $type = $this->_get('type', 'intval');
     $this->assign('type', $type ? $type : 1);
 }
開發者ID:liuguogen,項目名稱:weixin,代碼行數:60,代碼來源:Member_cardAction.class.php

示例3: _initialize

	public function _initialize() {
		parent::_initialize();
		//$this->canUseFunction('hotel');
		
		$this->_cid = isset($_GET['cid']) ? intval($_GET['cid']) : session('companyid');
		if (empty($this->token)) {
			$this->error('不合法的操作', U('Index/index'));
		}
		if (empty($this->_cid))  {
			$company = M('Company')->where(array('token' => $this->token, 'isbranch' => 0))->find();
			if ($company) {
				$this->_cid = $company['id'];
				//主店的k存session
				session('companyk', md5($this->_cid . session('uname')));
			} else {
				$this->error('您還沒有添加您的商家信息',U('Company/index',array('token' => $this->token)));
			}
		} else {
			$k = session('companyk');
			$company = M('Company')->where(array('token' => $this->token, 'id' => $this->_cid))->find();
			if (empty($company)) {
				$this->error('非法操作', U('Hotels/index',array('token' => $this->token)));
			} else {
				$username = $company['isbranch'] ? $company['username'] : session('uname');
				if (md5($this->_cid . $username) != $k) {
					$this->error('非法操作', U('Hotels/index',array('token' => $this->token)));
				}
			}
		}
		$this->assign('ischild', session('companyLogin'));
		$this->assign('cid', $this->_cid);
	}
開發者ID:kevicki,項目名稱:pig,代碼行數:32,代碼來源:HotelsAction.class.php

示例4: _initialize

	public function _initialize() {
		parent::_initialize();

		$this->sign_conf = M('sign_conf');
		$this->sign_db   = M('sign_in');

	}
開發者ID:royalwang,項目名稱:saivi,代碼行數:7,代碼來源:SigninAction.class.php

示例5: _initialize

	public function _initialize() {
		parent::_initialize();
		$this->token=$this->_session('token');
		$this->home_db=M('home');
		
		$this->canUseFunction('shouye');
	}
開發者ID:nicevoice,項目名稱:saima_versatil,代碼行數:7,代碼來源:HomeAction.class.php

示例6: _initialize

 public function _initialize()
 {
     parent::_initialize();
     $this->token = $this->_session('token');
     $this->kefu_db = M('kefu');
     $this->canUseFunction('Kefu');
 }
開發者ID:liuguogen,項目名稱:weixin,代碼行數:7,代碼來源:KefuAction.class.php

示例7: _initialize

 protected function _initialize()
 {
     $this->function = 'car';
     $this->token = $_SESSION['token'];
     parent::_initialize();
     parent::checkOpenedFunction();
 }
開發者ID:zhaoshengloveqingqing,項目名稱:Wechat,代碼行數:7,代碼來源:CarAction.class.php

示例8: _initialize

	public function _initialize() {
		parent::_initialize();
		$this->pay_config_db=M('Alipay_config');
		if (!$this->token){
			exit();
		}
	}
開發者ID:kevicki,項目名稱:pig,代碼行數:7,代碼來源:Alipay_configAction.class.php

示例9: _initialize

 public function _initialize()
 {
     parent::_initialize();
     /*$checkFunc=new checkFunc();if (!function_exists('fdsrejsie3qklwewerzdagf4ds')){exit('error-4');}
       $checkFunc->cfdwdgfds3skgfds3szsd3idsj();*/
     $this->canUseFunction("Unitary");
 }
開發者ID:node-rookie,項目名稱:bdg,代碼行數:7,代碼來源:UnitaryAction.class.php

示例10: _initialize

 public function _initialize()
 {
     parent::_initialize();
     $this->canUseFunction('Person_card');
     if ($this->token != $this->_get('token')) {
     }
 }
開發者ID:liuguogen,項目名稱:weixin,代碼行數:7,代碼來源:Person_cardAction.class.php

示例11: _initialize

 public function _initialize()
 {
     parent::_initialize();
     if (ALI_FUWU_GROUP) {
         $isgostr = '隻有認證的服務號或者服務窗才可以使用!';
     } else {
         $isgostr = '隻有認證的服務號才可以使用!';
     }
     $this->isgostr = $isgostr;
     $this->assign('isgostr', $this->isgostr);
     if (intval($this->wxuser['winxintype']) != 3 && $this->wxuser['fuwuappid'] == '') {
         $this->error($isgostr);
         exit;
     }
     $where = array('token' => $this->token);
     $this->thisWxUser = M('Wxuser')->where($where)->find();
     if ($this->thisWxUser['type'] == 0) {
         $diyApiConfig = M('Diymen_set')->where($where)->find();
         if ((empty($this->thisWxUser['appid']) || empty($this->thisWxUser['appsecret'])) && (empty($diyApiConfig['appid']) || empty($diyApiConfig['appsecret']))) {
             $this->error('請先設置AppID和AppSecret再使用本功能', '?g=User&m=Index&a=edit&id=' . $this->thisWxUser['id']);
         } else {
             $this->thisWxUser['appid'] = $diyApiConfig['appid'];
             $this->thisWxUser['appsecret'] = $diyApiConfig['appsecret'];
         }
     }
     $apiOauth = new apiOauth();
     $this->access_token = $apiOauth->update_authorizer_access_token($this->thisWxUser['appid']);
 }
開發者ID:hehekeke,項目名稱:pigcms,代碼行數:28,代碼來源:RecognitionAction.class.php

示例12: _initialize

	public function _initialize() {
		parent::_initialize();
		$this->deliemail_config=M('deliemail');
		if (!$this->token){
			exit();
		}
	}
開發者ID:royalwang,項目名稱:saivi,代碼行數:7,代碼來源:SaiviemailAction.class.php

示例13: _initialize

 public function _initialize() {
     parent::_initialize();
     $this->_mod = D('item');
     $this->_cate_mod = D('item_cate');
     $brandlist= $this->_brand=M('brandlist')->where('status=1')->order('ordid asc,id asc')->select();
     $this->assign('brandlist',$brandlist);
 }
開發者ID:royalwang,項目名稱:saivi,代碼行數:7,代碼來源:itemAction.class+bak.php

示例14: _initialize

 public function _initialize()
 {
     parent::_initialize();
     $this->where = array('token' => $this->token);
     $this->modules = array('Home' => '首頁', 'Classify' => '網站分類', 'Img' => '圖文回複', 'Company' => 'LBS信息', 'Live' => '微場景', 'Adma' => 'DIY宣傳頁', 'Photo' => '相冊', 'Selfform' => '萬能表單', 'Custom' => '通用表單', 'Host' => '商家訂單', 'Groupon' => '團購', 'Shop' => '商城', 'sc1' => '微商城', 'sc2' => '微團購', 'sc3' => '微秒殺', 'Repast' => '訂餐', 'Wedding' => '婚慶喜帖', 'Vote' => '投票', 'Paper' => '小秘書', 'Panorama' => '全景', 'Lottery' => '大轉盤', 'Guajiang' => '刮刮卡', 'Coupon' => '優惠券', 'MemberCard' => '會員卡', 'Estate' => '微房產', 'Message' => '留言板', 'Car' => '汽車', 'GoldenEgg' => '砸金蛋', 'LuckyFruit' => '水果機', 'AppleGame' => '走鵲橋', 'Lovers' => '摁死情侶', 'Autumn' => '吃月餅', 'Problem' => '一戰到底', 'Forum' => '論壇', 'GreetingCard' => '賀卡', 'Medical' => '微醫療', 'School' => '微教育', 'Hotels' => '酒店賓館', 'Business' => '行業應用', 'Market' => '微商圈', 'Research' => '微調研', 'Fansign' => '微信簽到', 'Zhaopin' => '微招聘', 'Fangchan' => '微房產', 'Baoming' => '報名活動', 'Sharetalent' => '分享達人', 'Hforward' => '轉發有禮', 'Punish' => '懲罰台', 'Vcard' => '微名片', 'Jiejing' => '微街景', 'Yingyong' => '場景應用', 'OutsideLink' => '<font color="red">生活服務</font>');
     $this->arr = array('game', 'Knwx', 'Jingcai', 'Jiugong', 'Fanyan', 'Invite', 'Hforward', 'Lapiao', 'Jikedati', 'Sharetalent', 'Red_packet', 'Autumns', 'Popularity', 'Helping', 'MicroBroker', 'Seckill', 'Unitary', 'Crowdfunding', 'DishOut', 'LivingCircle', 'Test', 'Bargain', 'Service', 'Hongbao', 'Micrstore', 'SeniorScene', 'SeniorCard', 'ServiceChat', 'Voteimg');
 }
開發者ID:liuguogen,項目名稱:weixin,代碼行數:7,代碼來源:LinkAction.class.php

示例15: _initialize

 public function _initialize()
 {
     parent::_initialize();
     $this->where = array('token' => $this->token);
     $this->modules = array('Home' => '首頁', 'Classify' => '網站分類', 'Img' => '圖文回複', 'Company' => 'LBS信息', 'Live' => '微場景', 'Adma' => 'DIY宣傳頁', 'Photo' => '相冊', 'Selfform' => '萬能表單', 'Custom' => '微預約', 'Host' => '商家訂單', 'Groupon' => '團購', 'Shop' => '商城', 'Repast' => '訂餐', 'Wedding' => '婚慶喜帖', 'Vote' => '投票', 'Paper' => '小秘書', 'Panorama' => '全景', 'Lottery' => '大轉盤', 'Guajiang' => '刮刮卡', 'Coupon' => '優惠券', 'MemberCard' => '會員卡', 'Estate' => '微房產', 'Message' => '留言板', 'Car' => '汽車', 'GoldenEgg' => '砸金蛋', 'LuckyFruit' => '水果機', 'AppleGame' => '走鵲橋', 'Lovers' => '摁死情侶', 'Autumn' => '吃月餅', 'Problem' => '一戰到底', 'Forum' => '論壇', 'GreetingCard' => '賀卡', 'Medical' => '微醫療', 'School' => '微教育', 'Hotels' => '酒店賓館', 'Business' => '行業應用', 'Market' => '微商圈', 'Research' => '微調研', 'Fansign' => '微信簽到', 'Vcard' => '微名片', 'OutsideLink' => '<font color="red">生活服務</font>');
     $this->arr = array('game');
 }
開發者ID:ww102111,項目名稱:weixin,代碼行數:7,代碼來源:LinkAction.class.php


注:本文中的UserAction::_initialize方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。