| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 | 
							- <?php
 
- $type = array
 
- (
 
- 	'gd' => 'GD库',
 
- 	'im' => 'ImageMagic库',
 
- );
 
- 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' 	=> 'im',
 
- 			'desc' 		=> '使用的图形库',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'select',
 
- 			'option'	=> $type,
 
- 			'search'	=> 'select',
 
- 		),
 
- 		'background'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-150',
 
- 			'name' 		=> '模板背景图',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '模板背景图',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'image',
 
- 			'key' 		=> '1',
 
- 			'place'		=> '150',
 
- 		),
 
- 		'pic'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-150',
 
- 			'name' 		=> '模板样例图',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '模板样例图',
 
- 			'match' 	=> 'option',
 
- 			'update'	=> 'image',
 
- 			'key' 		=> '1',
 
- 			'place'		=> '150',
 
- 		),
 
- 		'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"'),
 
- 		),
 
- 	),
 
- );
 
 
  |