| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217 | <?php$project = function(){    $array = array();    $info = Dever::db('log/project')->state();    if($info)    {        $array += $info;    }    return $array;};return array(	# 表名	'name' => 'stat',	# 显示给用户看的名称	'lang' => '广告数据统计',	'order' => 1,	'menu' => false,	# 数据结构	'struct' => array	(		'id' 		=> array		(			'type' 		=> 'int-11',			'name' 		=> 'ID',			'default' 	=> '',			'desc' 		=> '',			'match' 	=> 'is_numeric',			//'search'	=> 'order',			'order'		=> 'desc',			//'list'		=> true,		),				'page_id'      => array        (            'type'      => 'int-11',            'name'      => '广告页面id',            'default'   => '1',            'desc'      => '广告页面id',            'match'     => 'is_numeric',            'update'    => 'select',            //'search'    => 'select',            //'list'        => true,        ),        'info_id'      => array        (            'type'      => 'int-11',            'name'      => '广告位id',            'default'   => '1',            'desc'      => '广告位id',            'match'     => 'is_numeric',            'update'    => 'select',            //'search'    => 'select',            //'list'        => true,        ),        'data_id'      => array        (            'type'      => 'int-11',            'name'      => '广告投放id',            'default'   => '1',            'desc'      => '广告投放id',            'match'     => 'is_numeric',            'update'    => 'select',            //'search'    => 'select',            //'list'        => true,        ),        'year'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '时间',			'default' 	=> '',			'desc' 		=> '年',			'match' 	=> 'is_numeric',			'update'	=> 'text',			'list'        => '"{year}年{month}月{day}日{hour}时"',		),		'month'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '月',			'default' 	=> '',			'desc' 		=> '月',			'match' 	=> 'is_numeric',			'update'	=> 'text',		),		'day'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '日',			'default' 	=> '',			'desc' 		=> '日',			'match' 	=> 'is_numeric',			'update'	=> 'text',		),		'hour'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '小时',			'default' 	=> '',			'desc' 		=> '小时',			'match' 	=> 'is_numeric',			'update'	=> 'text',		),		'time'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '时间',			'default' 	=> '',			'desc' 		=> '时间',			'match' 	=> 'is_numeric',			'search'	=> 'time',			'update'	=> 'text',		),		'pv_view'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '广告访问量',			'default' 	=> '',			'desc' 		=> '广告访问量',			'match' 	=> 'is_numeric',			'update'	=> 'text',			//'search'	=> 'order',			'list_name'		=> '数据统计',			'list'      => 'Dever::load("ad/lib/manage.getNum", {id})',		),		'uv_view'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '广告访问量(UV)',			'default' 	=> '',			'desc' 		=> '广告访问量',			'match' 	=> 'is_numeric',			'update'	=> 'text',			//'search'	=> 'order',			//'list'		=> true,		),		'pv_click'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '广告点击量',			'default' 	=> '',			'desc' 		=> '广告点击量',			'match' 	=> 'is_numeric',			'update'	=> 'text',			//'search'	=> 'order',			//'list'		=> true,		),		'uv_click'		=> array		(			'type' 		=> 'int-11',			'name' 		=> '广告点击量(UV)',			'default' 	=> '',			'desc' 		=> '广告点击量',			'match' 	=> 'is_numeric',			'update'	=> 'text',			//'search'	=> 'order',			//'list'		=> true,		),		'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,			'list'		=> 'date("Y-m-d H:i:s", {cdate})',		),	),		'manage' => array	(		'delete' => false,		'edit' => false,		'insert' => false,	),		# request 请求接口定义	'request' => array	(		'sum' => array		(			# 匹配的正则或函数 选填项		    'option' => array		    (		        'data_id' => 'yes',		        'state' => 1,		    ),		    'type' => 'one',		    'order' => array('id' => 'desc'),		    //'group' => 'data_id',		    'col' => 'id,sum(pv_view) as pv_view,sum(pv_click) as pv_click,sum(uv_view) as uv_view,sum(uv_click) as uv_click,cdate,data_id,info_id,page_id,time',		),	),);
 |