|
|
|
@ -49,7 +49,7 @@ class IndexController extends AdminController {
|
|
|
|
|
$this->foldLineDiagram($_REQUEST['start'],$_REQUEST['end'],$_REQUEST['num']);
|
|
|
|
|
}
|
|
|
|
|
$tm =strtotime(date("Y-m-d",strtotime("-1 day")));
|
|
|
|
|
$allcount = M("IndexChart","tab_")->field("all_count")->where("`date` = '{$tm}'")->find();
|
|
|
|
|
$allcount = SM("IndexChart","tab_")->field("all_count")->order("date desc")->find();
|
|
|
|
|
$allcount = json_decode($allcount['all_count'],true);
|
|
|
|
|
|
|
|
|
|
$this->assign('user_count',$allcount['user_count']);
|
|
|
|
@ -223,7 +223,7 @@ class IndexController extends AdminController {
|
|
|
|
|
$data['date'] = [$start];
|
|
|
|
|
$data['hours'] = 1;
|
|
|
|
|
$tm = strtotime($start);
|
|
|
|
|
$dbdata = M("IndexChart","tab_")->field("new_user_count,new_user_hours,active_user_count,active_user_hours,pay_user_count,pay_user_hours,pay_money_count,pay_money_hours,promote_new_count")->where("`date` = '{$tm}'")->find();
|
|
|
|
|
$dbdata = SM("IndexChart","tab_")->field("new_user_count,new_user_hours,active_user_count,active_user_hours,pay_user_count,pay_user_hours,pay_money_count,pay_money_hours,promote_new_count")->where("`date` = '{$tm}'")->find();
|
|
|
|
|
$data['news'] = json_decode($dbdata["new_user_hours"],true);
|
|
|
|
|
$data['active'] = json_decode($dbdata["active_user_hours"],true);
|
|
|
|
|
$data['player']=json_decode($dbdata["pay_user_hours"],true);
|
|
|
|
@ -231,7 +231,7 @@ class IndexController extends AdminController {
|
|
|
|
|
|
|
|
|
|
//获取昨天
|
|
|
|
|
$ytm = $starttime-86400;
|
|
|
|
|
$ydbdata = M("IndexChart","tab_")->field("new_user_count,active_user_count,pay_user_count,pay_money_count,promote_new_count")->where("`date` = '{$ytm}'")->find();
|
|
|
|
|
$ydbdata = SM("IndexChart","tab_")->field("new_user_count,active_user_count,pay_user_count,pay_money_count,promote_new_count")->where("`date` = '{$ytm}'")->find();
|
|
|
|
|
//计算
|
|
|
|
|
$cnews['count'] = $dbdata['new_user_count'];
|
|
|
|
|
$cnews['rate'] = $this->setRate($dbdata['new_user_count'],$ydbdata['new_user_count']);
|
|
|
|
@ -260,7 +260,7 @@ class IndexController extends AdminController {
|
|
|
|
|
$count1 = array();
|
|
|
|
|
$active_user_list = [];
|
|
|
|
|
$pay_user_list = [];
|
|
|
|
|
$dbdata = M("IndexChart","tab_")->field("FROM_UNIXTIME(`date`, '%Y-%m-%d') as time,new_user_count,active_user_count,active_user_list,pay_user_count,pay_user_list,pay_money_count,promote_new_count")
|
|
|
|
|
$dbdata = SM("IndexChart","tab_")->field("FROM_UNIXTIME(`date`, '%Y-%m-%d') as time,new_user_count,active_user_count,active_user_list,pay_user_count,pay_user_list,pay_money_count,promote_new_count")
|
|
|
|
|
->where($map)
|
|
|
|
|
->group("time")
|
|
|
|
|
->select();
|
|
|
|
@ -330,7 +330,7 @@ class IndexController extends AdminController {
|
|
|
|
|
$map1 = array(
|
|
|
|
|
"date"=>$between
|
|
|
|
|
);
|
|
|
|
|
$ydbdata = M("IndexChart","tab_")->field("new_user_count,active_user_count,active_user_list,pay_user_count,pay_user_list,pay_money_count,promote_new_count")
|
|
|
|
|
$ydbdata = SM("IndexChart","tab_")->field("new_user_count,active_user_count,active_user_list,pay_user_count,pay_user_list,pay_money_count,promote_new_count")
|
|
|
|
|
->where($map1)->select();
|
|
|
|
|
$active_user_list = [];
|
|
|
|
|
$pay_user_list = [];
|
|
|
|
|