本文整理匯總了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);
}
示例2: setStatus
public function setStatus()
{
$ids = I('ids');
$status = I('get.status');
$builder = new AdminListBuilder();
$builder->doSetStatus('mail_history', $ids, $status);
}
示例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);
}
示例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);
}
示例5: setCommentStatus
public function setCommentStatus($ids, $status)
{
$builder = new AdminListBuilder();
$builder->doSetStatus('WeiboComment', $ids, $status);
}
示例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);
}
示例7: setRuleStatus
public function setRuleStatus($ids, $status)
{
$builder = new AdminListBuilder();
$builder->doSetStatus('SeoRule', $ids, $status);
}
示例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);
}
示例9: setSsoAppStatus
public function setSsoAppStatus($ids, $status)
{
$builder = new AdminListBuilder();
$builder->doSetStatus('sso_app', $ids, $status);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}