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); }
public function setStatus() { $ids = I('ids'); $status = I('get.status'); $builder = new AdminListBuilder(); $builder->doSetStatus('mail_history', $ids, $status); }
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); }
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); }
public function setCommentStatus($ids, $status) { $builder = new AdminListBuilder(); $builder->doSetStatus('WeiboComment', $ids, $status); }
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); }
public function setRuleStatus($ids, $status) { $builder = new AdminListBuilder(); $builder->doSetStatus('SeoRule', $ids, $status); }
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); }
public function setSsoAppStatus($ids, $status) { $builder = new AdminListBuilder(); $builder->doSetStatus('sso_app', $ids, $status); }
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); }
/** * 设置活动分类状态:删除=-1,禁用=0,启用=1 * @param $ids * @param $status * @author 郑钟良<*****@*****.**> */ 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); }
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); }
/** * 设置状态 * @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); }
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); }
/** * 设置状态 * @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); }
public function setLzlReplyStatus($ids, $status) { $builder = new AdminListBuilder(); $builder->doSetStatus('GroupLzlReply', $ids, $status); }
public function setCommentStatus($ids, $status) { foreach ($ids as $id) { $comemnt = D('Weibo/WeiboComment')->getComment($id); if ($status == 1) { D('Weibo/Weibo')->where(array('id' => $comemnt['weibo_id']))->setInc('comment_count'); } else { D('Weibo/Weibo')->where(array('id' => $comemnt['weibo_id']))->setDec('comment_count'); } S('weibo_' . $comemnt['weibo_id'], null); } $builder = new AdminListBuilder(); $builder->doSetStatus('WeiboComment', $ids, $status); }
public function setLimitStatus($ids, $status) { $builder = new AdminListBuilder(); $builder->doSetStatus('action_limit', $ids, $status); }
/** * 设置商品分类状态:删除=-1,禁用=0,启用=1 * @param $ids * @param $status * @author 郑钟良<*****@*****.**> */ public function setStatus($ids, $status) { $builder = new AdminListBuilder(); if ($status == -1) { $id = array_unique((array) $ids); $rs = M('UserTag')->where(array('pid' => array('in', $id)))->save(array('status' => $status)); } $builder->doSetStatus('UserTag', $ids, $status); }
/** * 审核用户,通过,不通过 * @param $ids * @param int $status * @param int $role_id * @author 郑钟良<*****@*****.**> */ public function setUserAudit($ids, $status = 1, $role_id = 0) { $ids = is_array($ids) ? $ids : explode(',', $ids); if ($status == 1) { $map_role['role_id'] = $role_id; foreach ($ids as $val) { $map_role['id'] = $val; $user_role = $this->userRoleModel->where($map_role)->find(); if ($user_role['init'] == 0) { D('Common/Member')->initUserRoleInfo($role_id, $user_role['uid']); } } $builder = new AdminListBuilder(); $builder->doSetStatus('UserRole', $ids, $status); } else { if ($status == 0) { $uids = $this->userRoleModel->where(array('id' => array('in', $ids)))->field('uid')->select(); if (count($uids)) { $builder = new AdminListBuilder(); $builder->doSetStatus('UserRole', $ids, $status); } else { $this->info(L('_NO_OPERATIONAL_DATA_')); } } else { $this->error(L('_ILLEGAL_OPERATION_')); } } }
public function setPaperStatus($ids, $status = 1) { !is_array($ids) && ($ids = explode(',', $ids)); $builder = new AdminListBuilder(); $builder->doSetStatus('Paper', $ids, $status); }
public function setFieldSettingStatus($ids, $status) { $builder = new AdminListBuilder(); $builder->doSetStatus('field_setting', $ids, $status); }
public function setTypeStatus($ids, $status) { $builder = new AdminListBuilder(); $builder->doSetStatus('ucenter_score_type', $ids, $status); }
public function setReplyStatus($ids, $status) { $builder = new AdminListBuilder(); $builder->doSetStatus('ForumPostReply', $ids, $status); }
public function setIssueContentStatus() { $ids = I('ids'); $status = I('get.status', 0, 'intval'); $builder = new AdminListBuilder(); if ($status == 1) { foreach ($ids as $id) { $content = D('IssueContent')->find($id); //发送站内消息 D('Common/Message')->sendMessage($content['uid'], "管理员审核通过了您发布的内容。现在可以在列表看到该内容了。", $title = '专辑内容审核通知', U('Issue/Index/issueContentDetail', array('id' => $id)), is_login(), 2); /*同步微博*/ /* $user = query_user(array('nickname', 'space_link'), $content['uid']); $weibo_content = '管理员审核通过了@' . $user['nickname'] . ' 的内容:【' . $content['title'] . '】,快去看看吧:' ."http://$_SERVER[HTTP_HOST]" .U('Issue/Index/issueContentDetail',array('id'=>$content['id'])); $model = D('Weibo/Weibo'); $model->addWeibo(is_login(), $weibo_content);*/ /*同步微博end*/ } } $builder->doSetStatus('IssueContent', $ids, $status); }
public function setStatus() { $ids = I('request.ids', '', 'toInt'); if (!$ids) { return; } $status = I('get.status'); $builder = new AdminListBuilder(); $builder->doSetStatus('mail_history', $ids, $status); }