|
@@ -0,0 +1,178 @@
|
|
|
+<?php
|
|
|
+
|
|
|
+$info = function()
|
|
|
+{
|
|
|
+ $array = array();
|
|
|
+ $info = Dever::db('ad/info')->state();
|
|
|
+ if($info)
|
|
|
+ {
|
|
|
+ $array += $info;
|
|
|
+ }
|
|
|
+ return $array;
|
|
|
+};
|
|
|
+$info_id = Dever::input('search_option_info_id');
|
|
|
+$config = array();
|
|
|
+$pic = 'image';
|
|
|
+$video = 'upload';
|
|
|
+$code = 'textarea';
|
|
|
+if ($info_id) {
|
|
|
+ $config = Dever::load('ad/info-one', $info_id);
|
|
|
+ if ($config['type'] == 1) {
|
|
|
+ $video = 'hidden';
|
|
|
+ $code = 'hidden';
|
|
|
+ }
|
|
|
+ if ($config['type'] == 2) {
|
|
|
+ $pic = 'hidden';
|
|
|
+ $code = 'hidden';
|
|
|
+ }
|
|
|
+ if ($config['type'] == 3) {
|
|
|
+ $video = 'hidden';
|
|
|
+ $pic = 'hidden';
|
|
|
+ }
|
|
|
+}
|
|
|
+return array
|
|
|
+(
|
|
|
+
|
|
|
+ 'name' => 'data',
|
|
|
+
|
|
|
+ 'lang' => '广告投放',
|
|
|
+ 'order' => 200,
|
|
|
+ 'menu' => false,
|
|
|
+
|
|
|
+ 'struct' => array
|
|
|
+ (
|
|
|
+ 'id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '广告位ID',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+
|
|
|
+ 'order' => 'desc',
|
|
|
+ 'list' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'name' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-60',
|
|
|
+ 'name' => '标题',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '请输入标题',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'update' => 'text',
|
|
|
+ 'search' => 'fulltext',
|
|
|
+ 'list' => true,
|
|
|
+ 'edit' => true,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'info_id' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '选择所属广告位',
|
|
|
+ 'default' => Dever::input('search_option_info_id', '1'),
|
|
|
+ 'desc' => '选择所属广告位',
|
|
|
+ 'match' => 'is_numeric',
|
|
|
+ 'option' => $info,
|
|
|
+
|
|
|
+ 'search' => 'select',
|
|
|
+ 'list' => true,
|
|
|
+ 'value' => Dever::input('search_option_info_id', '1'),
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'pic' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-150',
|
|
|
+ 'name' => '广告图',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '广告图',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'update' => $pic,
|
|
|
+ 'key' => '1',
|
|
|
+ 'place' => '150',
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'video' => array
|
|
|
+ (
|
|
|
+ 'type' => 'varchar-800',
|
|
|
+ 'name' => '广告视频-视频格式mp4,mov,上传大小不能超过4G',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '广告视频',
|
|
|
+ 'match' => 'is_string',
|
|
|
+ 'update' => $video,
|
|
|
+ 'key' => '3',
|
|
|
+ 'place' => '150',
|
|
|
+ 'upload' => 'qiniu',
|
|
|
+ 'large' => true,
|
|
|
+
|
|
|
+ 'cover' => 2,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'code' => array
|
|
|
+ (
|
|
|
+ 'type' => 'text-255',
|
|
|
+ 'name' => '广告代码',
|
|
|
+ 'default' => '',
|
|
|
+ 'desc' => '广告代码',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => $code,
|
|
|
+ ),
|
|
|
+
|
|
|
+ 'reorder' => array
|
|
|
+ (
|
|
|
+ 'type' => 'int-11',
|
|
|
+ 'name' => '排序(数值越大越靠前)',
|
|
|
+ 'default' => '1',
|
|
|
+ 'desc' => '请输入排序',
|
|
|
+ 'match' => 'option',
|
|
|
+ 'update' => 'text',
|
|
|
+ 'search' => 'order',
|
|
|
+ 'list_name' => '排序',
|
|
|
+ 'list' => true,
|
|
|
+ 'order' => 'desc',
|
|
|
+
|
|
|
+ ),
|
|
|
+
|
|
|
+ '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
|
|
|
+ (
|
|
|
+
|
|
|
+ ),
|
|
|
+
|
|
|
+
|
|
|
+ 'request' => array
|
|
|
+ (
|
|
|
+ 'getAll' => array
|
|
|
+ (
|
|
|
+
|
|
|
+ 'option' => array
|
|
|
+ (
|
|
|
+ 'info_id' => 'yes',
|
|
|
+ 'state' => 1,
|
|
|
+ ),
|
|
|
+ 'type' => 'all',
|
|
|
+ 'order' => array('id' => 'desc'),
|
|
|
+ 'col' => '*',
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+);
|