工会web
This commit is contained in:
41
GonghuiWeb/www/adminxx/user/cz.php
Normal file
41
GonghuiWeb/www/adminxx/user/cz.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?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");
|
||||
|
||||
$where = " where UserID!=0 ";
|
||||
if($GG['m']){
|
||||
//$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 .= " and convert(varchar(7),AddDate,120)='".$GG['m']."'";
|
||||
}
|
||||
$sql = "select a.*,b.GameID,b.NickName,b.Gender,b.Remark,e.UnionName,convert(char,b.RegisterDate,120) as RegDate,convert(char,b.LastLogonDate,120) as LastDate,c.InsureScore,d.HeadHttp from (select UserID,sum(PayMoney) as num,sum(OperCount) as fk from AgentRecharge ".$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'] = $v['num']/$v['fk'];
|
||||
}
|
||||
}
|
||||
for($y=0;$y<50;$y++){
|
||||
$ye = date('Y-m',strtotime('-'.$y.' month'));
|
||||
if($ye>'2017-03'){
|
||||
$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/cz.tpl');
|
||||
$db->close();
|
||||
unset($GG,$ppxq,$db);
|
||||
?>
|
||||
Reference in New Issue
Block a user