|
|
|
@ -27,7 +27,7 @@ class StatisticsController extends ThinkController {
|
|
|
|
|
// 游戏排行
|
|
|
|
|
$type=$_REQUEST['type'];
|
|
|
|
|
if($type==1 || $type==''){
|
|
|
|
|
$list_data=$this->data_order($today,$yesterday);
|
|
|
|
|
$list_data=$this->data_order2($today,$yesterday);
|
|
|
|
|
}elseif($type==2){
|
|
|
|
|
$list_data=$this->data_order($thisweek,$lastweek);
|
|
|
|
|
}elseif($type==3){
|
|
|
|
@ -43,15 +43,14 @@ class StatisticsController extends ThinkController {
|
|
|
|
|
default:
|
|
|
|
|
$promote_data = $this->promote_data_order2($today,$yesterday);
|
|
|
|
|
}
|
|
|
|
|
dump($list_data);die();
|
|
|
|
|
$this->assign('zhuce',$list_data['reg']);
|
|
|
|
|
$this->assign('active',$list_data['active']);
|
|
|
|
|
$this->assign('pay',$list_data['pay']);
|
|
|
|
|
$this->assign('game_chart',$list_data['chart']);
|
|
|
|
|
|
|
|
|
|
$this->assign('promotereg',array_slice($promote_data['reg'], 0, 10));
|
|
|
|
|
$this->assign('promoteactive',array_slice($promote_data['active'], 0, 10));
|
|
|
|
|
$this->assign('promotepay',array_slice($promote_data['pay'], 0, 10));
|
|
|
|
|
$this->assign('promotereg',$promote_data['reg']);
|
|
|
|
|
$this->assign('promoteactive',$promote_data['active']);
|
|
|
|
|
$this->assign('promotepay',$promote_data['pay']);
|
|
|
|
|
$this->assign('promote_chart', $promote_data['chart']);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -512,16 +511,16 @@ class StatisticsController extends ThinkController {
|
|
|
|
|
"pay"=>0
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
$char[$t['promote_id']][$key] = $t['cg'];
|
|
|
|
|
$char[$t['game_id']][$key] = $t['cg'];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
foreach ($char as $key => $value) {
|
|
|
|
|
$data["chart"]["game_name"] .= ("\"".$value['game_name']."\",");
|
|
|
|
|
$data["chart"]["game"] .= ("\"".$value['game_name']."\",");
|
|
|
|
|
$data["chart"]["reg"] .= ( $value['reg'].",");
|
|
|
|
|
$data["chart"]["active"] .= ( $value['active'].",");
|
|
|
|
|
$data["chart"]["pay"] .= ( $value['pay'].",");
|
|
|
|
|
}
|
|
|
|
|
$data["chart"]["game_name"] = \rtrim($data["chart"]["game_name"],",");
|
|
|
|
|
$data["chart"]["game"] = \rtrim($data["chart"]["game"],",");
|
|
|
|
|
$data["chart"]["reg"] = \rtrim($data["chart"]["reg"],",");
|
|
|
|
|
$data["chart"]["active"] = \rtrim($data["chart"]["active"],",");
|
|
|
|
|
$data["chart"]["pay"] = \rtrim($data["chart"]["pay"],",");
|
|
|
|
@ -641,7 +640,6 @@ class StatisticsController extends ThinkController {
|
|
|
|
|
else
|
|
|
|
|
$data['chart'][$k] = implode(',',$v);
|
|
|
|
|
}
|
|
|
|
|
echo "<pre>";dump($data);die();
|
|
|
|
|
return $data;
|
|
|
|
|
}
|
|
|
|
|
//设置排名
|
|
|
|
@ -672,7 +670,7 @@ class StatisticsController extends ThinkController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
$randdata[$i]['change'] = 0;
|
|
|
|
|
$randdata[$i]['change'] = $rand-1 - self::COUNTLIMIT;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|