|
@@ -15,9 +15,10 @@ $config = array();
|
|
|
$pic = 'image';
|
|
|
$video = 'upload';
|
|
|
$code = 'textarea';
|
|
|
+$link = 'textarea';
|
|
|
if ($info_id) {
|
|
|
$config = Dever::load('ad/info-one', $info_id);
|
|
|
- if ($config['type'] == 1) {
|
|
|
+ if ($config['type'] == 1 || $config['type'] == 4) {
|
|
|
$video = 'hidden';
|
|
|
$code = 'hidden';
|
|
|
}
|
|
@@ -28,8 +29,14 @@ if ($info_id) {
|
|
|
if ($config['type'] == 3) {
|
|
|
$video = 'hidden';
|
|
|
$pic = 'hidden';
|
|
|
+ $link = 'hidden';
|
|
|
}
|
|
|
}
|
|
|
+$type = array
|
|
|
+(
|
|
|
+ 1 => '永久',
|
|
|
+ 2 => '时间段',
|
|
|
+);
|
|
|
return array
|
|
|
(
|
|
|
# 表名
|
|
@@ -38,13 +45,18 @@ return array
|
|
|
'lang' => '广告投放',
|
|
|
'order' => 200,
|
|
|
'menu' => false,
|
|
|
+ 'end' => array
|
|
|
+ (
|
|
|
+ 'update' => 'ad/lib/manage.upDataCache',
|
|
|
+ 'insert' => 'ad/lib/manage.upDataCache',
|
|
|
+ ),
|
|
|
# 数据结构
|
|
|
'struct' => array
|
|
|
(
|
|
|
'id' => array
|
|
|
(
|
|
|
'type' => 'int-11',
|
|
|
- 'name' => '广告位ID',
|
|
|
+ 'name' => '投放ID',
|
|
|
'default' => '',
|
|
|
'desc' => '',
|
|
|
'match' => 'is_numeric',
|
|
@@ -66,6 +78,49 @@ return array
|
|
|
'edit' => true,
|
|
|
),
|
|
|
|
|
|
+ 'type' => array
|
|
|
+ (
|
|
|
+ 'type' => 'tinyint-1',
|
|
|
+ 'name' => '投放类型',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '投放类型',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'option' => $type,
|
|
|
+ 'update' => 'radio',
|
|
|
+ 'search' => 'select',
|
|
|
+ //'list' => true,
|
|
|
+ 'control' => 'type',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'sdate' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '开始投放时间',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '开始投放时间',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'update' => 'date',
|
|
|
+ 'search' => 'date',
|
|
|
+ 'list_name' => '投放时间',
|
|
|
+ 'list' => '{type} == 2 ? date("Y-m-d H:i:s", {sdate})." 至 ".date("Y-m-d H:i:s", {edate}) : "永久"',
|
|
|
+ 'callback' => 'maketime',
|
|
|
+ 'show' => 'type=2',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'edate' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '结束投放时间',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '结束投放时间',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'update' => 'date',
|
|
|
+ 'search' => 'date',
|
|
|
+ //'list' => 'date("Y-m-d H:i:s", {edate})',
|
|
|
+ 'callback' => 'maketime',
|
|
|
+ 'show' => 'type=2',
|
|
|
+ ),
|
|
|
+
|
|
|
'info_id' => array
|
|
|
(
|
|
|
'type' => 'int-11',
|
|
@@ -117,6 +172,16 @@ return array
|
|
|
'match' => 'option',
|
|
|
'update' => $code,
|
|
|
),
|
|
|
+
|
|
|
+ 'link' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-500',
|
|
|
+ 'name' => '跳转链接',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '请输入跳转链接',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'update' => $link,
|
|
|
+ ),
|
|
|
|
|
|
'reorder' => array
|
|
|
(
|