| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 | 
							- <?php
 
- $type = array
 
- (
 
- 	'gd' => 'GD库',
 
- 	'im' => 'ImageMagic库',
 
- );
 
- $update = array
 
- (
 
- 	1 => '每次访问都生成',
 
- 	2 => '仅生成一次',
 
- );
 
- $create = array
 
- (
 
- 	1 => '自动生成空白图',
 
- 	2 => '手动上传',
 
- );
 
- return array
 
- (
 
- 	# 表名
 
- 	'name' => 'template',
 
- 	# 显示给用户看的名称
 
- 	'lang' => '模板设置',
 
- 	'order' => 20,
 
- 	//'check' => 'key',
 
- 	# 数据结构
 
- 	'struct' => array
 
- 	(
 
- 	
 
- 		'id' 		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> 'ID',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '',
 
- 			'match' 	=> 'is_numeric',
 
- 			'search'	=> 'order',
 
- 			//'list'		=> true,
 
- 		),
 
- 		'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' 		=> 'varchar-32',
 
- 			'name' 		=> '使用的图形库',
 
- 			'default' 	=> 'gd',
 
- 			'desc' 		=> '使用的图形库',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'select',
 
- 			'option'	=> $type,
 
- 			'search'	=> 'select',
 
- 		),
 
- 		'update'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-1',
 
- 			'name' 		=> '生成规则',
 
- 			'default' 	=> '2',
 
- 			'desc' 		=> '生成规则',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'select',
 
- 			'option'	=> $update,
 
- 		),
 
- 		'create'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '模板背景图',
 
- 			'default' 	=> '2',
 
- 			'desc' 		=> '模板背景图',
 
- 			'match' 	=> 'is_numeric',
 
- 			'update'	=> 'radio',
 
- 			'option'	=> $create,
 
- 			'search'	=> 'select',
 
- 			'control'	=> 'create',
 
- 		),
 
- 		'width'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-11',
 
- 			'name' 		=> '背景图宽度',
 
- 			'default' 	=> '300',
 
- 			'desc' 		=> '背景图宽度',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'show'		=> 'create=1',
 
- 		),
 
- 		'height'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-11',
 
- 			'name' 		=> '背景图高度',
 
- 			'default' 	=> '300',
 
- 			'desc' 		=> '背景图高度',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'show'		=> 'create=1',
 
- 		),
 
- 		'background'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-150',
 
- 			'name' 		=> '模板背景图',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '模板背景图',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'image',
 
- 			'key' 		=> '1',
 
- 			'show'		=> 'create=2',
 
- 		),
 
- 		'pic'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-150',
 
- 			'name' 		=> '样例图',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '样例图',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'image',
 
- 			'key' 		=> '1',
 
- 		),
 
- 		'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})',
 
- 		),
 
- 	),
 
- 	# 管理功能
 
- 	'manage' => array
 
- 	(
 
- 		# 列表
 
- 		'list_button' => array
 
- 		(
 
- 			'list' => array('模块', '"model&project=poster&search_option_template_id={id}&oper_parent=template&oper_project=poster&page_type=1"'),
 
- 		),
 
- 	),
 
- 	'request' => array
 
- 	(
 
- 		'getAll' => array
 
- 		(
 
- 			# 匹配的正则或函数 选填项
 
- 			'option' => array
 
- 			(
 
- 				'key' => 'yes',
 
- 				'ids' => array('yes-id', 'in'),
 
- 				'state' => 1,
 
- 			),
 
- 			'type' => 'all',
 
- 			'order' => array('id' => 'desc'),
 
- 			'col' => '*',
 
- 		),
 
- 	)
 
- );
 
 
  |