| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246 | 
							- <?php
 
- $type = array
 
- (
 
- 	1 => '图片',
 
- 	2 => '文字',
 
- );
 
- $fonts = array
 
- (
 
- 	1 => '常规',
 
- 	2 => '粗体',
 
- 	3 => '中等',
 
- );
 
- $position_type = array
 
- (
 
- 	1 => '左上角',
 
- 	2 => '左下角',
 
- 	3 => '右上角',
 
- 	4 => '右下角',
 
- 	5 => '居中',
 
- 	6 => '上居中',
 
- 	7 => '下居中',
 
- 	8 => '自定义',
 
- );
 
- return array
 
- (
 
- 	# 表名
 
- 	'name' => 'model',
 
- 	# 显示给用户看的名称
 
- 	'lang' => '模块设置',
 
- 	'menu' => false,
 
- 	'check' => 'template_id,key',
 
- 	# 数据结构
 
- 	'struct' => array
 
- 	(
 
- 	
 
- 		'id' 		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> 'ID',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '',
 
- 			'match' 	=> 'is_numeric',
 
- 			'search'	=> 'order',
 
- 			//'list'		=> true,
 
- 		),
 
- 		'template_id'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '所属模板',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '请选择所属模板',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'hidden',
 
- 			'value'		=> Dever::input('search_option_template_id')
 
- 		),
 
- 		'name'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-32',
 
- 			'name' 		=> '模块名称',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '模块名称',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'search'	=> 'fulltext',
 
- 			'list'		=> true,
 
- 		),
 
- 		'key'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-32',
 
- 			'name' 		=> '模块标识-设置模块时,使用该标识来设置模块信息',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '模块标识',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'search'	=> 'fulltext',
 
- 			'list'		=> true,
 
- 		),
 
- 		'type'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '模块类型',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '请选择模块类型',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'radio',
 
- 			'option'	=> $type,
 
- 			'search'	=> 'select',
 
- 			'list'		=> true,
 
- 			'control'	=> 'type',
 
- 		),
 
- 		'value'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-500',
 
- 			'name' 		=> '模块默认值',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '模块默认值',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'text',
 
- 			'search'	=> 'fulltext',
 
- 			//'list'		=> true,
 
- 		),
 
- 		'position_type'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '模块位置',
 
- 			'default' 	=> '8',
 
- 			'desc' 		=> '请选择模块位置',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'radio',
 
- 			'option'	=> $position_type,
 
- 			//'search'	=> 'select',
 
- 			//'list'		=> true,
 
- 			'control'	=> 'position_type',
 
- 		),
 
- 		'position'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-32',
 
- 			'name' 		=> '模块定位-位置为left,top,如100,200',
 
- 			'default' 	=> '0,0',
 
- 			'desc' 		=> '模块定位',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'show'		=> 'position_type=8',
 
- 		),
 
- 		'offset'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-32',
 
- 			'name' 		=> '偏移量-偏移位置为left,top,如-10,-20',
 
- 			'default' 	=> '0,0',
 
- 			'desc' 		=> '偏移量',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 		),
 
- 		'text_width'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-11',
 
- 			'name' 		=> '文字宽度',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '文字宽度',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'show'		=> 'type=2',
 
- 		),
 
- 		'width'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-11',
 
- 			'name' 		=> '图片宽度',
 
- 			'default' 	=> '200',
 
- 			'desc' 		=> '图片宽度',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'show'		=> 'type=1',
 
- 		),
 
- 		'height'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-11',
 
- 			'name' 		=> '图片高度',
 
- 			'default' 	=> '200',
 
- 			'desc' 		=> '图片高度',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'show'		=> 'type=1',
 
- 		),
 
- 		'color'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-10',
 
- 			'name' 		=> '文字颜色',
 
- 			'default' 	=> '#000000',
 
- 			'desc' 		=> '文字颜色',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'color',
 
- 			'show'		=> 'type=2',
 
- 		),
 
- 		'fonts'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '字体',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '字体',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'select',
 
- 			'option'	=> $fonts,
 
- 			'show'		=> 'type=2',
 
- 		),
 
- 		'size'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '文字大小-直接输入像素数字',
 
- 			'default' 	=> '16',
 
- 			'desc' 		=> '文字大小',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'text',
 
- 			'show'		=> 'type=2',
 
- 		),
 
- 		'angle'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '角度-直接输入数字',
 
- 			'default' 	=> '0',
 
- 			'desc' 		=> '角度',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'text',
 
- 			'show'		=> 'type=2',
 
- 		),
 
- 		'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时才生效
 
- 			'insert'	=> true,
 
- 			'search'	=> 'date',
 
- 			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
 
- 		),
 
- 	),
 
- );
 
 
  |