diff --git a/Application/Admin/Controller/StatisticsController.class.php b/Application/Admin/Controller/StatisticsController.class.php index 03b2b8546..25aa243bf 100644 --- a/Application/Admin/Controller/StatisticsController.class.php +++ b/Application/Admin/Controller/StatisticsController.class.php @@ -9,7 +9,7 @@ use User\Api\UserApi as UserApi; */ class StatisticsController extends ThinkController { public function overview(){ - $shuju = unserialize(M('IndexChart','tab_')->field("all_count")->order('`date` desc')->find()["all_count"]); + $shuju = json_decode(M('IndexChart','tab_')->field("all_count")->order('`date` desc')->find()["all_count"],true); $this->assign('shuju',$shuju); $this->assign('openegretmain','openegretmain');//模板还样式使用 @@ -207,10 +207,10 @@ class StatisticsController extends ThinkController { $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(); - $data['news'] = unserialize($dbdata["new_user_hours"]); - $data['active'] = unserialize($dbdata["active_user_hours"]); - $data['player']=unserialize($dbdata["pay_user_hours"]); - $data['money']=unserialize($dbdata["pay_money_hours"]); + $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); + $data['money']=json_decode($dbdata["pay_money_hours"],true); } else { $datelist = get_date_list($starttime,$endtime,$num==7?4:1);