|
@@ -0,0 +1,217 @@
|
|
|
+<?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',
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+);
|