|
@@ -945,25 +945,22 @@ class Database
|
|
|
if (isset($config['manage']['search']['linkage'])) {
|
|
|
foreach ($config['manage']['search']['linkage'] as $k => $v) {
|
|
|
$this->list_search_linkage($result, $search, $prefix . 'linkage_' . $k, $v['lang'], $this->option($v['option']), $v['default']);
|
|
|
+ $result .= '<br />';
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (isset($config['manage']['search']['time'])) {
|
|
|
- $this->list_search_br($result);
|
|
|
foreach ($config['manage']['search']['time'] as $k => $v) {
|
|
|
$this->list_search_time($result, $search, $prefix, $k, $v);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (isset($config['manage']['search']['date'])) {
|
|
|
- $this->list_search_br($result);
|
|
|
foreach ($config['manage']['search']['date'] as $k => $v) {
|
|
|
$this->list_search_time($result, $search, $prefix, $k, $v, 'date');
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
if (isset($config['manage']['search']['select'])) {
|
|
|
$this->list_search_br($result);
|
|
|
foreach ($config['manage']['search']['select'] as $k => $v) {
|
|
@@ -1462,6 +1459,7 @@ class Database
|
|
|
$v = str_replace('-1', ',', $v);
|
|
|
$v = str_replace(',,,', ',', $v);
|
|
|
$v = str_replace(',,', ',', $v);
|
|
|
+ $v = str_replace(',,', ',', $v);
|
|
|
$param['option_' . $k] = $v;
|
|
|
|
|
|
# 设定检索高亮
|
|
@@ -1620,7 +1618,7 @@ class Database
|
|
|
}
|
|
|
}
|
|
|
} elseif (isset($config['manage']['list_type']) && $config['manage']['list_type'] == 'tree') {
|
|
|
- $data = $this->tree($data, $config, $parent);
|
|
|
+ $data = $this->tree($data, $config, -1);
|
|
|
}
|
|
|
|
|
|
if ($excel == true) {
|
|
@@ -1847,7 +1845,7 @@ class Database
|
|
|
$level++;
|
|
|
|
|
|
foreach ($array as $k => $v) {
|
|
|
- if (isset($v[$key . '_parent']) && $v[$key . '_parent'] == $parent_id) {
|
|
|
+ if (isset($v[$key]) && $v[$key] == $parent_id) {
|
|
|
$v['level'] = $level;
|
|
|
$v['name'] = $this->treeName($v['name'], $level);
|
|
|
$result[] = $v;
|
|
@@ -1862,10 +1860,15 @@ class Database
|
|
|
$string = '';
|
|
|
|
|
|
if ($level > 1) {
|
|
|
+ /*
|
|
|
$num = 4;
|
|
|
$string = '-';
|
|
|
//STR_PAD_LEFT
|
|
|
$string = str_pad('|', $level * $num, $string);
|
|
|
+ */
|
|
|
+ $string = str_repeat(' ',$level-1);
|
|
|
+
|
|
|
+ $string .= '|—';
|
|
|
}
|
|
|
|
|
|
return $string . $name;
|
|
@@ -1957,6 +1960,7 @@ class Database
|
|
|
return $data[$r[1]];
|
|
|
};
|
|
|
$eval = '$value = ' . preg_replace_callback('/{(.*?)}/', $func, $value) . ';';
|
|
|
+
|
|
|
eval($eval);
|
|
|
}
|
|
|
|
|
@@ -2391,6 +2395,25 @@ class Database
|
|
|
$update_other_id[$index]['option_' . $m_col] = $s_value;
|
|
|
}
|
|
|
} else {
|
|
|
+ if (is_array($v)) {
|
|
|
+ $k = str_replace('update_', '', $k);
|
|
|
+ $kd = $k . '_id';
|
|
|
+ if (isset($config['struct'][$kd])) {
|
|
|
+ foreach ($v as $vk => $vt) {
|
|
|
+ if ($vt == -1) {
|
|
|
+ unset($v[$vk]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if ($v) {
|
|
|
+ $vd = end($v);
|
|
|
+ $kdi = $prefix . '_' . $kd;
|
|
|
+ $update[$i][$kdi] = $vd;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (isset($config['struct'][$k]) && strpos($config['struct'][$k]['type'], 'int') !== false) {
|
|
|
+ $v = end($v);
|
|
|
+ }
|
|
|
+ }
|
|
|
$update[$i][$ki] = $v;
|
|
|
}
|
|
|
}
|