当前位置: 首页>>代码示例>>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;未经允许,请勿转载。