| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 | 
							- <?php
 
- # 定义几个常用的选项
 
- $status = array
 
- (
 
- 	1 => '未审核',
 
- 	2 => '审核通过',
 
- 	3 => '审核未通过',
 
- );
 
- return array
 
- (
 
- 	# 表名
 
- 	'name' => 'filter',
 
- 	# 显示给用户看的名称
 
- 	'lang' => '过滤词配置',
 
- 	'order' => 1,
 
- 	'menu' => false,
 
- 	'check' => 'name',
 
- 	# 数据结构
 
- 	'struct' => array
 
- 	(
 
- 		'id' 		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> 'ID',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '',
 
- 			'match' 	=> 'is_numeric',
 
- 			'order'		=> 'desc',
 
- 		),
 
- 		
 
- 		'name'		=> array
 
- 		(
 
- 			'type' 		=> 'varchar-50',
 
- 			'name' 		=> '过滤词-请填写一些常用的黑名单词汇',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '请输入过滤词',
 
- 			'match' 	=> 'is_string',
 
- 			'update'	=> 'text',
 
- 			'search'	=> 'fulltext',
 
- 			'list'		=> true,
 
- 		),
 
- 		'num'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '过滤次数',
 
- 			'default' 	=> '',
 
- 			'desc' 		=> '请输入过滤次数',
 
- 			'match' 	=> 'is_numeric',
 
- 			//'update'	=> 'text',
 
- 			//'search'	=> 'fulltext',
 
- 			'list'		=> true,
 
- 		),
 
- 		'status'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-1',
 
- 			'name' 		=> '审核状态',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '请选择审核状态',
 
- 			'match' 	=> 'is_numeric',
 
- 			'option' 	=> $status,
 
- 			'update'	=> 'radio',
 
- 			'list'		=> true,
 
- 			'edit'		=> true,
 
- 		),
 
- 	
 
- 		'state'		=> array
 
- 		(
 
- 			'type' 		=> 'tinyint-1',
 
- 			'name' 		=> '数据状态',
 
- 			'default' 	=> '1',
 
- 			'desc' 		=> '请选择数据状态',
 
- 			'match' 	=> 'is_numeric',
 
- 			//'option' 	=> $option,
 
- 			//'update'	=> 'radio',
 
- 			//'list'		=> true,
 
- 		),
 
- 		
 
- 		'cdate'		=> array
 
- 		(
 
- 			'type' 		=> 'int-11',
 
- 			'name' 		=> '录入时间',
 
- 			'match' 	=> array('is_numeric', time()),
 
- 			'desc' 		=> '',
 
- 			# 只有insert时才生效
 
- 			'insert'	=> true,
 
- 			'list'		=> 'date("Y-m-d H:i:s", {cdate})',
 
- 		),
 
- 	),
 
- 	# 后台管理
 
- 	'manage' => array
 
- 	(
 
- 		# 自定义页面
 
- 		'page_list' => 'test',
 
- 		# 是否有删除按钮
 
- 		'delete' => 1,
 
- 		# 是否物理删除
 
- 		//'delete' => 2,
 
- 	),
 
- 	# request 请求接口定义
 
- 	'request' => array
 
- 	(
 
- 		'up' => array
 
- 		(
 
- 			'where' => array
 
- 			(
 
- 				'id' => 'yes',
 
- 			),
 
- 			'set' => array
 
- 			(
 
- 				'num' => array(1, '+='),
 
- 			),
 
- 			'type' => 'update',
 
- 		),
 
- 	)
 
- );
 
 
  |