| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 | <?php$type = array(	'gd' => 'GD库',	'im' => 'ImageMagic库',);$update = 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,		),		'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"'),		),	),	'request' => array	(		'getAll' => array		(			# 匹配的正则或函数 选填项			'option' => array			(				'key' => 'yes',				'ids' => array('yes-id', 'in'),				'state' => 1,			),			'type' => 'all',			'order' => array('id' => 'desc'),			'col' => '*',		),	));
 |