close_xss = 1; // 关闭xss验证 $this->is_edit = false; // 不允许修改字段类别 $this->fieldtype = ['TEXT']; $this->defaulttype = 'TEXT'; } /** * 字段相关属性参数 * * @param array $value 值 * @param array $field 字段集合 * @return string */ public function option($option, $field = NULL) { $Merge = []; $option['value'] = isset($option['value']) ? $option['value'] : ''; if ($field) { foreach ($field as $t) { if ($t['fieldtype'] == 'Merge') { $t['setting'] = dr_string2array($t['setting']); if (preg_match_all('/\{(.+)\}/U', $t['setting']['option']['value'], $value)) { foreach ($value[1] as $v) { $Merge[] = $v; } } } } $_field = []; $_field[] = ''; foreach ($field as $t) { $t['fieldtype'] != 'Merge' && !dr_in_array($t['fieldname'], $Merge) && $_field[] = ''; } $_field = implode('', array_unique($_field)); } return ['
'.dr_lang('分组规则不支持html标签,注意每个字段只能存在于一个分组中,否则会出错;此字段只能用于模块中').'
']; } /** * create_sql */ public function create_sql($name, $value, $cname = '') { } /** * alter_sql */ public function alter_sql($name, $value, $cname = '') { } /** * drop_sql */ public function drop_sql($name) { } /** * test */ public function test_sql($tables, $field) { return 0; } /** * 字段入库值 */ public function insert_value($field) { } /** * 字段表单输入 * @return string */ public function input($field, $value = '') { // 字段禁止修改时就返回显示字符串 if ($this->_not_edit($field, $value)) { return $this->show($field, $value); } return $this->input_format($field['fieldname'], $field['name'], $field['setting']['option']['value']); } }