public function limitList() { $action_name = I('get.action', '', 'op_t'); !empty($action_name) && ($map['action_list'] = array(array('like', '%[' . $action_name . ']%'), '', 'or')); //读取规则列表 $map['status'] = array('EGT', 0); $model = M('action_limit'); $List = $model->where($map)->order('id asc')->select(); $timeUnit = $this->getTimeUnit(); foreach ($List as &$val) { $val['time'] = $val['time_number'] . $timeUnit[$val['time_unit']]; $val['action_list'] = get_action_name($val['action_list']); empty($val['action_list']) && ($val['action_list'] = L('_ALL_ACTS_')); $val['punish'] = get_punish_name($val['punish']); } unset($val); //显示页面 $builder = new AdminListBuilder(); $builder->title(L('_ACTION_LIST_'))->buttonNew(U('editLimit'))->setStatusUrl(U('setLimitStatus'))->buttonEnable()->buttonDisable()->buttonDelete()->keyId()->keyTitle()->keyText('name', L('_NAME_'))->keyText('frequency', L('_FREQUENCY_'))->keyText('time', L('_TIME_UNIT_'))->keyText('punish', L('_PUNISHMENT_'))->keyBool('if_message', L('_SEND_REMINDER_'))->keyText('message_content', L('_MESSAGE_PROMPT_CONTENT_'))->keyText('action_list', L('_ACT_'))->keyStatus()->keyDoActionEdit('editLimit?id=###')->data($List)->display(); }
public function limitList() { $action_name = I('get.action', '', 'op_t'); !empty($action_name) && ($map['action_list'] = array(array('like', '%[' . $action_name . ']%'), '', 'or')); //读取规则列表 $map['status'] = array('EGT', 0); $model = M('action_limit'); $List = $model->where($map)->order('id asc')->select(); $timeUnit = $this->getTimeUnit(); foreach ($List as &$val) { $val['time'] = $val['time_number'] . $timeUnit[$val['time_unit']]; $val['action_list'] = get_action_name($val['action_list']); empty($val['action_list']) && ($val['action_list'] = '所有行为'); $val['punish'] = get_punish_name($val['punish']); } unset($val); //显示页面 $builder = new AdminListBuilder(); $builder->title('行为限制列表')->buttonNew(U('editLimit'))->setStatusUrl(U('setLimitStatus'))->buttonEnable()->buttonDisable()->buttonDelete()->keyId()->keyTitle()->keyText('name', '名称')->keyText('frequency', '频率')->keyText('time', '时间单位')->keyText('punish', '处罚')->keyBool('if_message', '是否发送提醒')->keyText('message_content', '消息提示内容')->keyText('action_list', '行为')->keyStatus()->keyDoActionEdit('editLimit?id=###')->data($List)->display(); }