|
@@ -17,14 +17,13 @@ $list = function()
|
|
|
$info = Dever::input('search_option_info_id', 1);
|
|
|
Dever::setInput('search_option_info_id', $info);
|
|
|
$type_default = -1;
|
|
|
+$type_id = '0';
|
|
|
|
|
|
$data = array
|
|
|
(
|
|
|
1 => '内容自定义',
|
|
|
);
|
|
|
-
|
|
|
-$data_update = array();
|
|
|
-
|
|
|
+$name = '推送数据管理';
|
|
|
if ($info) {
|
|
|
$info = Dever::db('push/info')->one($info);
|
|
|
|
|
@@ -40,15 +39,83 @@ if ($info) {
|
|
|
} else {
|
|
|
$type_default = $v['id'];
|
|
|
if ($v['id'] > 0 && isset($v['type']) && $v['type'] == 1) {
|
|
|
- $type_id[] = $v['id'];
|
|
|
+ $type_id[] = $v['id'];
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
$type_id = implode(',', $type_id);
|
|
|
+}
|
|
|
+
|
|
|
+$struct = array
|
|
|
+(
|
|
|
+ 'id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => 'ID',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+
|
|
|
+ 'order' => 'desc',
|
|
|
+
|
|
|
+ ),
|
|
|
|
|
|
- $info['name'] .= '下的推送数据管理';
|
|
|
+ 'info_id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '所属推送位',
|
|
|
+ 'default' => Dever::input('search_option_info_id', '1'),
|
|
|
+ 'desc' => '推送位',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'search' => 'select',
|
|
|
+ 'update' => 'hidden',
|
|
|
+ 'option' => $list,
|
|
|
+ 'list' => true,
|
|
|
+ 'value' => Dever::input('search_option_info_id', '1'),
|
|
|
+ ),
|
|
|
|
|
|
+ 'type' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '功能类型',
|
|
|
+ 'default' => ''.$type_default.'',
|
|
|
+ 'desc' => '请选择功能类型',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'update' => 'radio',
|
|
|
+
|
|
|
+ 'option' => $type,
|
|
|
+ 'control' => 'type',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'type_id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '关联数据',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '关联数据',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'select',
|
|
|
+ 'show' => 'type=' . $type_id,
|
|
|
+ 'update_search' => 'push/lib/manage.search?{type}',
|
|
|
+ ),
|
|
|
+
|
|
|
+
|
|
|
+ 'data' => array
|
|
|
+ (
|
|
|
+ 'type' => 'text-1000',
|
|
|
+ 'name' => '自定义数据项',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '自定义数据项',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'option' => $data,
|
|
|
+ 'update' => $data_update,
|
|
|
+ 'list' => 'Dever::load("push/lib/manage.show", {id})',
|
|
|
+ ),
|
|
|
+ */
|
|
|
+);
|
|
|
+
|
|
|
+if ($info) {
|
|
|
$col = Dever::db('push/col')->getAll(array('id' => $info['col']));
|
|
|
|
|
|
if ($col) {
|
|
@@ -64,13 +131,19 @@ if ($info) {
|
|
|
if ($info['col_pic'] && isset($pic_temp[$pic_index]) && $pic_temp[$pic_index]) {
|
|
|
$place = $pic_temp[$pic_index];
|
|
|
}
|
|
|
-
|
|
|
+ $key = 'col_' . $v['id'];
|
|
|
+ $list = false;
|
|
|
if ($v['type'] == 1) {
|
|
|
$update_type = 'text';
|
|
|
+ $lang[] = $key;
|
|
|
+ $list = true;
|
|
|
} elseif ($v['type'] == 2) {
|
|
|
$update_type = 'textarea';
|
|
|
+ $lang[] = $key;
|
|
|
+ $list = true;
|
|
|
} elseif ($v['type'] == 3) {
|
|
|
$update_type = 'editor';
|
|
|
+ $lang[] = $key;
|
|
|
} elseif ($v['type'] == 4) {
|
|
|
$update_type = 'image';
|
|
|
$pic_index++;
|
|
@@ -84,9 +157,10 @@ if ($info) {
|
|
|
} elseif ($v['type'] == 8) {
|
|
|
$update_type = 'day';
|
|
|
}
|
|
|
- $data_update[] = array
|
|
|
+ $struct[$key] = array
|
|
|
(
|
|
|
- 'col' => 'col_' . $v['id'],
|
|
|
+
|
|
|
+ 'type' => 'varchar-1000',
|
|
|
'name' => $v['name'],
|
|
|
'default' => '',
|
|
|
'desc' => $v['name'],
|
|
@@ -94,128 +168,67 @@ if ($info) {
|
|
|
'update' => $update_type,
|
|
|
'place' => $place,
|
|
|
'key' => 1,
|
|
|
+ 'list' => $list,
|
|
|
);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-} else {
|
|
|
- $info = array();
|
|
|
- $info['name'] = '推送数据管理';
|
|
|
- $type_id = '0';
|
|
|
}
|
|
|
|
|
|
+$struct += array
|
|
|
+(
|
|
|
+ 'reorder' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '排序(数值越大越靠前)',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '请输入排序',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'text',
|
|
|
+ 'search' => 'order',
|
|
|
+ 'list_name' => '排序',
|
|
|
+ 'list' => true,
|
|
|
+ 'order' => 'desc',
|
|
|
+ 'edit' => true,
|
|
|
+ ),
|
|
|
|
|
|
+ 'state' => array
|
|
|
+ (
|
|
|
+ 'type' => 'tinyint-1',
|
|
|
+ 'name' => '状态',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '请选择状态',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'cdate' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '录入时间',
|
|
|
+ 'match' => array('is_numeric', time()),
|
|
|
+ 'desc' => '',
|
|
|
+
|
|
|
+ 'insert' => true,
|
|
|
+ 'list' => 'date("Y-m-d H:i:s", {cdate})',
|
|
|
+ ),
|
|
|
+);
|
|
|
return array
|
|
|
(
|
|
|
|
|
|
'name' => 'data',
|
|
|
|
|
|
- 'lang' => $info['name'],
|
|
|
+ 'lang' => $name,
|
|
|
'order' => 20,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- 'struct' => array
|
|
|
- (
|
|
|
- 'id' => array
|
|
|
- (
|
|
|
- 'type' => 'int-11',
|
|
|
- 'name' => 'ID',
|
|
|
- 'default' => '',
|
|
|
- 'desc' => '',
|
|
|
- 'match' => 'is_numeric',
|
|
|
-
|
|
|
- 'order' => 'desc',
|
|
|
-
|
|
|
- ),
|
|
|
-
|
|
|
- 'info_id' => array
|
|
|
- (
|
|
|
- 'type' => 'int-11',
|
|
|
- 'name' => '所属推送位',
|
|
|
- 'default' => Dever::input('search_option_info_id', '1'),
|
|
|
- 'desc' => '推送位',
|
|
|
- 'match' => 'is_numeric',
|
|
|
- 'search' => 'select',
|
|
|
- 'update' => 'hidden',
|
|
|
- 'option' => $list,
|
|
|
- 'list' => true,
|
|
|
- 'value' => Dever::input('search_option_info_id', '1'),
|
|
|
- ),
|
|
|
-
|
|
|
- 'type' => array
|
|
|
- (
|
|
|
- 'type' => 'int-11',
|
|
|
- 'name' => '功能类型',
|
|
|
- 'default' => ''.$type_default.'',
|
|
|
- 'desc' => '请选择功能类型',
|
|
|
- 'match' => 'is_numeric',
|
|
|
- 'update' => 'radio',
|
|
|
-
|
|
|
- 'option' => $type,
|
|
|
- 'control' => 'type',
|
|
|
- ),
|
|
|
-
|
|
|
- 'type_id' => array
|
|
|
- (
|
|
|
- 'type' => 'int-11',
|
|
|
- 'name' => '关联数据',
|
|
|
- 'default' => '',
|
|
|
- 'desc' => '关联数据',
|
|
|
- 'match' => 'option',
|
|
|
- 'update' => 'select',
|
|
|
- 'show' => 'type=' . $type_id,
|
|
|
- 'update_search' => 'push/lib/manage.search?{type}',
|
|
|
- ),
|
|
|
-
|
|
|
- 'data' => array
|
|
|
- (
|
|
|
- 'type' => 'text-1000',
|
|
|
- 'name' => '自定义数据项',
|
|
|
- 'default' => '',
|
|
|
- 'desc' => '自定义数据项',
|
|
|
- 'match' => 'is_string',
|
|
|
- 'option' => $data,
|
|
|
- 'update' => $data_update,
|
|
|
- 'list' => 'Dever::load("push/lib/manage.show", {id})',
|
|
|
- ),
|
|
|
-
|
|
|
- 'reorder' => array
|
|
|
- (
|
|
|
- 'type' => 'int-11',
|
|
|
- 'name' => '排序(数值越大越靠前)',
|
|
|
- 'default' => '1',
|
|
|
- 'desc' => '请输入排序',
|
|
|
- 'match' => 'option',
|
|
|
- 'update' => 'text',
|
|
|
- 'search' => 'order',
|
|
|
- 'list_name' => '排序',
|
|
|
- 'list' => true,
|
|
|
- 'order' => 'desc',
|
|
|
- 'edit' => true,
|
|
|
- ),
|
|
|
+ 'struct' => $struct,
|
|
|
|
|
|
- 'state' => array
|
|
|
- (
|
|
|
- 'type' => 'tinyint-1',
|
|
|
- 'name' => '状态',
|
|
|
- 'default' => '1',
|
|
|
- 'desc' => '请选择状态',
|
|
|
- 'match' => 'is_numeric',
|
|
|
- ),
|
|
|
-
|
|
|
- 'cdate' => array
|
|
|
- (
|
|
|
- 'type' => 'int-11',
|
|
|
- 'name' => '录入时间',
|
|
|
- 'match' => array('is_numeric', time()),
|
|
|
- 'desc' => '',
|
|
|
-
|
|
|
- 'insert' => true,
|
|
|
- 'list' => 'date("Y-m-d H:i:s", {cdate})',
|
|
|
- ),
|
|
|
+ 'manage' => array
|
|
|
+ (
|
|
|
+ 'lang' => implode(',', $lang),
|
|
|
),
|
|
|
|
|
|
|