38 lines
1.5 KiB
PHP
38 lines
1.5 KiB
PHP
<?php
|
|
include_once("../../../inc/admin.inc.php");
|
|
include_once("../../../inc/class.php");
|
|
include_once("../../../inc/admin.smarty.php");
|
|
include_once("../../../inc/admin.power.php");
|
|
include_once("../../../inc/ip.php");
|
|
|
|
$GG['m'] = $GG['m'] ? $GG['m'] : date('Y-m');
|
|
if($GG['m'] == date('Y-m')){
|
|
$day = intval(date("d"));
|
|
}else{
|
|
$day = date("t",strtotime($GG['m']));
|
|
}
|
|
$where = " where convert(varchar(7),InsertTime,120)='".$GG['m']."'";
|
|
$sql = "select a.*,b.GameID,b.NickName,b.Gender,e.UnionName,b.Remark,convert(char,b.RegisterDate,120) as RegDate,convert(char,b.LastLogonDate,120) as LastDate,c.InsureScore,d.HeadHttp from (select UserID,sum(OperNum) as num from QPTreasureDB.dbo.PayToPlayerLog ".$where." group by UserID) as a LEFT JOIN AccountsInfo as b ON(a.UserID=b.UserID) LEFT JOIN QPTreasureDB.dbo.GameScoreInfo as c ON(a.UserID=c.UserID) LEFT JOIN IndividualDatum as d ON(a.UserID=d.UserID) LEFT JOIN QPTreasureDB.dbo.GameUnion As e ON(c.UnionID=e.UnionID) order by num desc";
|
|
$data = $db->fetch_all($sql);
|
|
if($data){
|
|
foreach($data as $k=>$v){
|
|
$zz = $zz+$v['num'];
|
|
$info[$k] = $v;
|
|
$info[$k]['pjz'] = intval($v['num']/$day);
|
|
}
|
|
}
|
|
for($y=0;$y<50;$y++){
|
|
$ye = date('Y-m',strtotime('-'.$y.' month'));
|
|
if($ye>'2019-10'){
|
|
$year[] = $ye;
|
|
}
|
|
}
|
|
$ppxq -> register_function('timename','timename');
|
|
$ppxq -> assign('zz',$zz);
|
|
$ppxq -> assign('year',$year);
|
|
$ppxq -> assign('data',$info);
|
|
$ppxq -> assign('GG',$GG);
|
|
$ppxq -> display('user/top.tpl');
|
|
$db->close();
|
|
unset($GG,$ppxq,$db);
|
|
?>
|