当前位置: 首页>>代码示例>>PHP>>正文


PHP AdminListBuilder::doSetStatus方法代码示例

本文整理汇总了PHP中Admin\Builder\AdminListBuilder::doSetStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminListBuilder::doSetStatus方法的具体用法?PHP AdminListBuilder::doSetStatus怎么用?PHP AdminListBuilder::doSetStatus使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Admin\Builder\AdminListBuilder的用法示例。


在下文中一共展示了AdminListBuilder::doSetStatus方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setStatus

 public function setStatus($ids, $status = 1)
 {
     $ids = I('ids', array());
     $status = $_GET['status'];
     $status != 1 && ($status = 0);
     D('Addons://Report/Report')->processingTime();
     $builder = new AdminListBuilder();
     $builder->doSetStatus('Report', $ids, $status);
 }
开发者ID:ccccy,项目名称:wuanlife,代码行数:9,代码来源:ReportController.class.php

示例2: setStatus

 public function setStatus()
 {
     $ids = I('ids');
     $status = I('get.status');
     $builder = new AdminListBuilder();
     $builder->doSetStatus('mail_history', $ids, $status);
 }
开发者ID:xiaolw,项目名称:wacms,代码行数:7,代码来源:MailController.class.php

示例3: setVerifyStatus

 public function setVerifyStatus($ids, $status)
 {
     $model_user = D('rankUser');
     $model = D('rank');
     if ($status == 1) {
         foreach ($ids as $val) {
             $rank_user = $model_user->where('id=' . $val)->field('uid,rank_id,reason')->find();
             $rank = $model->where('id=' . $rank_user['rank_id'])->find();
             $content = '管理员通过了你的头衔申请:[' . $rank['title'] . ']';
             $user = query_user(array('username', 'space_link'), $rank_user['uid']);
             $content1 = '管理员通过了@' . $user['username'] . ' 的头衔申请:[' . $rank['title'] . '],申请理由:' . $rank_user['reason'];
             clean_query_user_cache($rank_user['uid'], array('rank_link'));
             $this->sendMessage($rank_user, $content, '头衔申请审核通过');
             if (D('Common/Module')->isInstalled('Weibo')) {
                 //安装了微博模块
                 //发微博
                 $model_weibo = D('Weibo/Weibo');
                 $result = $model_weibo->addWeibo(is_login(), $content1);
             }
         }
     } else {
         if ($status = -1) {
             foreach ($ids as $val) {
                 $rank_user = $model_user->where('id=' . $val)->field('uid,rank_id')->find();
                 $rank = $model->where('id=' . $rank_user['rank_id'])->find();
                 $content = '管理员驳回了你的头衔申请:[' . $rank['title'] . ']';
                 $this->sendMessage($rank_user, $content, '头衔申请审核不通过');
             }
         }
     }
     $builder = new AdminListBuilder();
     $builder->doSetStatus('rankUser', $ids, $status);
 }
开发者ID:chenyongze,项目名称:bighaha,代码行数:33,代码来源:RankController.class.php

示例4: setAnswerStatus

 public function setAnswerStatus($ids, $status = 1)
 {
     !is_array($ids) && ($ids = explode(',', $ids));
     $builder = new AdminListBuilder();
     if ($status == 0 || $status == -1) {
         $map['best_answer'] = array('in', $ids);
         $best_ids = $this->questionModel->getList($map, 'best_answer');
         if (count($best_ids)) {
             $best_ids = array_column($best_ids, 'best_answer');
             $best_ids = implode(',', $best_ids);
             $this->error("id 为 {$best_ids} 的答案是问题的最佳答案,不能被禁用或删除!");
         }
     }
     $builder->doSetStatus('QuestionAnswer', $ids, $status);
 }
开发者ID:chenyongze,项目名称:bighaha,代码行数:15,代码来源:QuestionController.class.php

示例5: setCommentStatus

 public function setCommentStatus($ids, $status)
 {
     $builder = new AdminListBuilder();
     $builder->doSetStatus('WeiboComment', $ids, $status);
 }
开发者ID:suhanyujie,项目名称:digitalOceanVps,代码行数:5,代码来源:WeiboController.class.php

示例6: setNewsStatus

 public function setNewsStatus($ids, $status = 1)
 {
     !is_array($ids) && ($ids = explode(',', $ids));
     $builder = new AdminListBuilder();
     S('news_home_data', null);
     //发送消息
     $messageModel = D('Common/Message');
     foreach ($ids as $val) {
         $news = $this->newsModel->getData($val);
         $tip = '你的资讯投稿【' . $news['title'] . '】审核通过。';
         $messageModel->sendMessage($news['uid'], '资讯投稿审核通过!', $tip, 'News/Index/detail', array('id' => $val), is_login(), 2);
     }
     //发送消息 end
     $builder->doSetStatus('News', $ids, $status);
 }
开发者ID:chenyongze,项目名称:bighaha,代码行数:15,代码来源:NewsController.class.php

示例7: setRuleStatus

 public function setRuleStatus($ids, $status)
 {
     $builder = new AdminListBuilder();
     $builder->doSetStatus('SeoRule', $ids, $status);
 }
开发者ID:chenyongze,项目名称:bighaha,代码行数:5,代码来源:SEOController.class.php

示例8: setAuthStatus

 public function setAuthStatus()
 {
     $ids = I('ids');
     $status = I('get.status', 0, 'intval');
     $builder = new AdminListBuilder();
     if ($status == 1) {
         if (is_array($ids)) {
             foreach ($ids as $id) {
                 $this->transAuth($id);
             }
         } else {
             $this->transAuth($ids);
         }
     }
     $builder->doSetStatus('Apply', $ids, $status);
 }
开发者ID:smartymoon,项目名称:fang1001,代码行数:16,代码来源:HomeController.class.php

示例9: setSsoAppStatus

 public function setSsoAppStatus($ids, $status)
 {
     $builder = new AdminListBuilder();
     $builder->doSetStatus('sso_app', $ids, $status);
 }
开发者ID:fishling,项目名称:chatPro,代码行数:5,代码来源:AuthorizeController.class.php

示例10: setVerifyStatus

 public function setVerifyStatus($ids, $status)
 {
     $model_user = M('rankUser');
     $model = M('rank');
     if ($status == 1) {
         foreach ($ids as $val) {
             $rank_user = $model_user->where('id=' . $val)->field('uid,rank_id,reason')->find();
             $rank = $model->where('id=' . $rank_user['rank_id'])->find();
             $content = l('_RECEPTION_TITLE_PASSED_BY_ADMIN_') . L('_COLON_') . '[' . $rank['title'] . ']';
             $user = query_user(array('nickname', 'space_link'), $rank_user['uid']);
             $content1 = L('_RECEPTION_PASSED_BY_ADMIN_PARAM_', array('nickname' => $user['nickname'], 'title' => $rank['title'])) . $rank_user['reason'];
             clean_query_user_cache($rank_user['uid'], array('rank_link'));
             $this->sendMessage($rank_user, $content, L('_TITLE_APPLICATION_FOR_APPROVAL_'));
             if (M('Common/Module')->isInstalled('Weibo')) {
                 //安装了轻博客模块
                 //发轻博客
                 $model_weibo = M('Weibo/Weibo');
                 $result = $model_weibo->addWeibo(is_login(), $content1);
             }
         }
     } else {
         if ($status = -1) {
             foreach ($ids as $val) {
                 $rank_user = $model_user->where('id=' . $val)->field('uid,rank_id')->find();
                 $rank = $model->where('id=' . $rank_user['rank_id'])->find();
                 $content = L('_ASK_REFUSED_BY_ADMIN_') . L('_COLON_') . '[' . $rank['title'] . ']';
                 $this->sendMessage($rank_user, $content, L('_THE_TITLE_OF_THE_APPLICATION_FOR_APPROVAL_IS_NOT_PASSED_'));
             }
         }
     }
     $builder = new AdminListBuilder();
     $builder->doSetStatus('rankUser', $ids, $status);
 }
开发者ID:terrydeng,项目名称:beimeibang1205,代码行数:33,代码来源:RankController.class.php

示例11: setStatus

 /**
  * 设置活动分类状态:删除=-1,禁用=0,启用=1
  * @param $ids
  * @param $status
  * @author 郑钟良<zzl@ourstu.com>
  */
 public function setStatus($ids, $status)
 {
     !is_array($ids) && ($ids = explode(',', $ids));
     if (in_array(1, $ids)) {
         $this->error('id为 1 的分类是活动基础分类,不能被禁用、删除!');
     }
     $builder = new AdminListBuilder();
     $builder->doSetStatus('EventType', $ids, $status);
 }
开发者ID:tmac1997,项目名称:DormitoryWebsite,代码行数:15,代码来源:EventController.class.php

示例12: setGoodsBuyStatus

 public function setGoodsBuyStatus($ids, $status)
 {
     $builder = new AdminListBuilder();
     if ($status == 1) {
         $gettime = time();
         foreach ($ids as $id) {
             D('shop_buy')->where('id=' . $id)->setField('gettime', $gettime);
             $content = D('shop_buy')->find($id);
             $message = "你购买的商品已发货。现在可以在已完成交易列表中查看该交易。";
             D('Message')->sendMessageWithoutCheckSelf($content['uid'], '发货通知', $message, 'Shop/Index/myGoods', array('status' => '1'), is_login(), 1);
             //商城记录
             $goods_name = D('shop')->field('goods_name')->find($content['goods_id']);
             $shop_log['message'] = '在' . time_format($gettime) . '[' . is_login() . ']' . query_user('nickname', is_login()) . '发送了用户[' . $content['uid'] . ']' . query_user('nickname', $content['uid']) . '购买的商品:<a href="index.php?s=/Shop/Index/goodsDetail/id/' . $content['goods_id'] . '.html" target="_black">' . $goods_name['goods_name'] . '</a>';
             $shop_log['uid'] = is_login();
             $shop_log['create_time'] = $gettime;
             D('shop_log')->add($shop_log);
         }
     }
     $builder->doSetStatus('shop_buy', $ids, $status);
 }
开发者ID:chenyongze,项目名称:bighaha,代码行数:20,代码来源:ShopController.class.php

示例13: setEventContentStatus

 /**
  * 设置状态
  * @param $ids
  * @param $status
  * autor:xjw129xjt
  */
 public function setEventContentStatus($ids, $status)
 {
     $builder = new AdminListBuilder();
     if ($status == 1) {
         foreach ($ids as $id) {
             $content = D('Event')->find($id);
             D('Common/Message')->sendMessage($content['uid'], "管理员审核通过了您发布的内容。现在可以在列表看到该内容了。", $title = '专辑内容审核通知', U('Event/Index/detail', array('id' => $id)), is_login(), 2);
             /*同步微博*/
             $user = query_user(array('username', 'space_link'), $content['uid']);
             $weibo_content = '管理员审核通过了@' . $user['username'] . ' 的内容:【' . $content['title'] . '】,快去看看吧:' . "http://{$_SERVER['HTTP_HOST']}" . U('Event/Index/detail', array('id' => $content['id']));
             //  $model = D('Weibo/Weibo');
             //  $model->addWeibo(is_login(), $weibo_content);
             /*同步微博end*/
         }
     }
     $builder->doSetStatus('Event', $ids, $status);
 }
开发者ID:fishling,项目名称:chatPro,代码行数:23,代码来源:EventController.class.php

示例14: setVerifyStatus

 public function setVerifyStatus($ids, $status)
 {
     $model_user = D('rankUser');
     $model = D('rank');
     if ($status == 1) {
         foreach ($ids as $val) {
             $rank_user = $model_user->where(array('id' => $val))->field('uid,rank_id,reason')->find();
             $rank = $model->where(array('id' => $rank_user['rank_id']))->find();
             $content = '管理员通过了你的头衔申请:[' . $rank['title'] . ']';
             $user = query_user(array('username', 'space_link'), $rank_user['uid']);
             $content1 = '管理员通过了@' . $user['username'] . ' 的头衔申请:[' . $rank['title'] . '],申请理由:' . $rank_user['reason'];
             clean_query_user_cache($rank_user['uid'], array('rank_link'));
             $this->sendMessage($rank_user, $content, '头衔申请审核通过');
         }
     } else {
         if ($status = -1) {
             foreach ($ids as $val) {
                 $rank_user = $model_user->where(array('id' => $val))->field('uid,rank_id')->find();
                 $rank = $model->where(array('id' => $rank_user['rank_id']))->find();
                 $content = '管理员驳回了你的头衔申请:[' . $rank['title'] . ']';
                 $this->sendMessage($rank_user, $content, '头衔申请审核不通过');
             }
         }
     }
     $builder = new AdminListBuilder();
     $builder->doSetStatus('rankUser', $ids, $status);
 }
开发者ID:admpub,项目名称:OpenCenter,代码行数:27,代码来源:RankController.class.php

示例15: setAtlasStatus

 /**
  * 设置状态
  * @param $ids
  * @param $status
  * autor:xjw129xjt
  */
 public function setAtlasStatus($ids, $status)
 {
     $builder = new AdminListBuilder();
     if ($status == 1) {
         foreach ($ids as $id) {
             $content = D('Atlas')->find($id);
             D('Common/Message')->sendMessage($content['uid'], "管理员审核通过了您发布的内容。现在可以在列表看到该内容了。", $title = '图集内容审核通知', U('Atlas/Index/detail', array('id' => $id)), is_login(), 2);
             /*同步微博*/
             $user = query_user(array('username', 'space_link'), $content['uid']);
             $weibo_content = '管理员审核通过了@' . $user['username'] . ' 的内容:【' . $content['content'] . '】,快去看看吧:' . "http://{$_SERVER['HTTP_HOST']}" . U('Atlas/Index/detail', array('id' => $content['id']));
             $model = D('Weibo/Weibo');
             $model->addWeibo(is_login(), $weibo_content);
             /*同步微博end*/
         }
     } else {
         if ($status == -1) {
             //(真删除)
             $ids = is_array($ids) ? $ids : explode(',', $ids);
             foreach ($ids as $atlas_id) {
                 $atlas = $this->atlasModel->find($atlas_id);
                 //移除 内容
                 $this->atlasModel->delete($atlas_id);
                 //移除图片
                 $this->atlasPictureModel->del($atlas['image_id']);
                 //删除对应的点赞记录
                 M('atlas_like')->where('atlas_id = ' . $atlas_id)->delete();
                 //移除对应的评论
                 M('local_comment')->where(array('app' => 'Atlas', 'row_id' => $atlas_id))->delete();
             }
         }
     }
     $builder->doSetStatus('Atlas', $ids, $status);
 }
开发者ID:chenyongze,项目名称:bighaha,代码行数:39,代码来源:AtlasController.class.php


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