AdminAction::delWeiba PHP Méthode

delWeiba() public méthode

解散微吧
public delWeiba ( ) : array
Résultat array 操作成功状态和提示信息
    public function delWeiba()
    {
        if (empty($_POST['weiba_id'])) {
            $return['status'] = 0;
            $return['data'] = '';
            echo json_encode($return);
            exit;
        }
        !is_array($_POST['weiba_id']) && ($_POST['weiba_id'] = array($_POST['weiba_id']));
        $data['weiba_id'] = array('in', $_POST['weiba_id']);
        $result = D('weiba')->where($data)->setField('is_del', 1);
        if ($result) {
            D('weiba_post')->where('weiba_id=' . $weiba_id)->delete();
            D('weiba_reply')->where('weiba_id=' . $weiba_id)->delete();
            D('weiba_follow')->where('weiba_id=' . $weiba_id)->delete();
            D('weiba_log')->where('weiba_id=' . $weiba_id)->delete();
            $return['status'] = 1;
            $return['data'] = L('PUBLIC_ADMIN_OPRETING_SUCCESS');
        } else {
            $return['status'] = 0;
            $return['data'] = L('PUBLIC_ADMIN_OPRETING_ERROR');
        }
        echo json_encode($return);
        exit;
    }