本文整理汇总了PHP中UserAction类的典型用法代码示例。如果您正苦于以下问题:PHP UserAction类的具体用法?PHP UserAction怎么用?PHP UserAction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了UserAction类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: execute
public function execute()
{
$action = UserAction::newFromContext($this->getContext());
$action->doAction();
$this->setAction($action);
$this->content = $this->initContent();
}
开发者ID:rosssclafani,项目名称:testswarm,代码行数:7,代码来源:UserPage.php
示例2: _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
示例3: _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
示例4: _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
示例5: _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
示例6: _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
示例7: _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
示例8: _initialize
protected function _initialize()
{
$this->function = 'car';
$this->token = $_SESSION['token'];
parent::_initialize();
parent::checkOpenedFunction();
}
开发者ID:zhaoshengloveqingqing,项目名称:Wechat,代码行数:7,代码来源:CarAction.class.php
示例9: prepareData
protected function prepareData()
{
parent::prepareData();
$em = $this->em();
$attachmentOwnerType = $em->getRepository('\\ru\\nazarov\\crm\\entities\\AttachmentType')->findOneBy(array('code' => 'application'));
$attachments = array();
foreach ($em->getRepository('\\ru\\nazarov\\crm\\entities\\Attachment')->findBy(array('type' => $attachmentOwnerType)) as $attachment) {
$ownerId = $attachment->getOwner();
if (!array_key_exists($ownerId, $attachments)) {
$attachments[$ownerId] = array();
}
$attachments[$ownerId][] = $attachment;
}
$orgs = $em->getRepository('\\ru\\nazarov\\crm\\entities\\Organization')->findBy(array(), array('typeId' => 'ASC', 'name' => 'ASC'));
$orgId = $this->request()->get('org');
foreach ($orgs as $org) {
if ($org->getId() == $orgId) {
break;
}
}
if (isset($org) && $org->getId() != $orgId) {
$org = null;
}
$repo = $em->getRepository('\\ru\\nazarov\\crm\\entities\\Application');
$this->view()->set('content', 'apps_list.tpl')->set('apps', isset($org) ? $repo->findBy(array($org->getType()->getCode() => $org->getId()), array('id' => 'DESC')) : $repo->findBy(array(), array('id' => 'DESC')))->set('attachments', $attachments)->set('orgId', isset($org) ? $org->getId() : null)->set('orgs', $orgs);
}
开发者ID:nazarov-andrey,项目名称:crm,代码行数:26,代码来源:AppsListAction.php
示例10: _initialize
public function _initialize()
{
parent::_initialize();
$this->canUseFunction("Yundabao");
//加载数据库
$this->m_wxuser = M("wxuser");
$this->m_users = M("yundabao_users");
$this->m_yundabao = M("yundabao");
/**
*API的url
*/
//获取AccessToken的url
$url['AccessToken'] = "http://openapi.yundabao.com/api/mode3api.ashx?action=AgentUserLogin";
//获取UserId的url
$url['UserId'] = "http://openapi.yundabao.com/api/mode3api.ashx?action=AgentUserId";
//获取价格年限的url
$url['PriceYears'] = "http://openapi.yundabao.com/api/mode3api.ashx?action=ServiceList&accesstoken=";
//创建应用url
$url['CreateApp'] = "http://openapi.yundabao.com/api/mode3api.ashx?action=CreateApp";
//应用列表url
$url['AppList'] = "http://openapi.yundabao.com/api/mode3api.ashx?action=AppList";
//修改应用url
$url['ModifyApp'] = "http://openapi.yundabao.com/api/mode3api.ashx?action=ModifyApp";
//重新生成url
$url['RebuildApp'] = "http://openapi.yundabao.com/api/mode3api.ashx?action=RebuildApp";
//删除应用url
$url['DeleteApp'] = "http://openapi.yundabao.com/api/mode3api.ashx?action=DeleteApp";
//应用数据url
$url['DataStatistics'] = "http://openapi.yundabao.com/api/mode3api.ashx?action=DataStatistics";
//把url赋值给变量apiurl
$this->apiurl = $url;
}
开发者ID:liuguogen,项目名称:weixin,代码行数:32,代码来源:YundabaoAction.class.php
示例11: _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
示例12: _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
示例13: _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
示例14: _initialize
public function _initialize()
{
parent::_initialize();
$this->canUseFunction('Person_card');
if ($this->token != $this->_get('token')) {
}
}
开发者ID:liuguogen,项目名称:weixin,代码行数:7,代码来源:Person_cardAction.class.php
示例15: _initialize
public function _initialize() {
parent::_initialize();
$this->deliemail_config=M('deliemail');
if (!$this->token){
exit();
}
}
开发者ID:royalwang,项目名称:saivi,代码行数:7,代码来源:SaiviemailAction.class.php
示例16: _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
示例17: _initialize
public function _initialize() {
parent::_initialize();
$token_open=M('token_open')->field('queryname')->where(array('token'=>session('token')))->find();
if(!strpos($token_open['queryname'],'Fenlei')){
$this->error('您还开启该模块的使用权,请到功能模块中添加',U('Function/index',array('token'=>session('token'),'id'=>session('wxid'))));
}
$this->Fenlei_model=M('Fenlei');
$this->token=session('token');
$this->assign('token',$this->token);
$this->assign('module','Fenlei');
}
开发者ID:royalwang,项目名称:saivi,代码行数:25,代码来源:FenleiAction.class.php
示例18: _initialize
public function _initialize()
{
parent::_initialize();
$this->canUseFunction('Fuwu');
$this->appid = M('Wxuser')->where(array('token' => $this->token))->getField('fuwuappid');
$this->m_fuwuuser = M('fuwuuser');
}
开发者ID:liuguogen,项目名称:weixin,代码行数:7,代码来源:FuwuAction.class.php
示例19: _initialize
public function _initialize()
{
parent::_initialize();
$this->canUseFunction('Dxs');
$this->token = session('token');
$this->assign('token', $this->token);
}
开发者ID:liuguogen,项目名称:weixin,代码行数:7,代码来源:DxsAction.class.php
示例20: _initialize
public function _initialize() {
parent::_initialize();
$this->token=session('token');
$this->assign('token',$this->token);
$this->apikey=C('baidu_map_api');
$this->assign('apikey',$this->apikey);
}
开发者ID:kevicki,项目名称:pig,代码行数:7,代码来源:MapAction.class.php
注:本文中的UserAction类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论