66 lines
2.8 KiB
PHP
66 lines
2.8 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");
|
||
|
|
include_once("../../../inc/rule.php");
|
||
|
|
|
||
|
|
$order = "UnionConsumerID desc";
|
||
|
|
$ssday = date('Y-m-d',strtotime("-1 day"));
|
||
|
|
$where = " where (a.GameOK='2' or (a.GameOK='1' and a.GameRule<'100000000')) and convert(char(10),a.InsertTime,120)<'".$ssday."' ";
|
||
|
|
if($GG['uid']){
|
||
|
|
$where = " and a.UnionID = '".$GG['uid']."'";
|
||
|
|
$order = "GameOK asc,UnionConsumerID desc";
|
||
|
|
}
|
||
|
|
if($GG['kid']){
|
||
|
|
$where = " and a.KindID = '".$GG['kid']."'";
|
||
|
|
$order = "GameOK asc,UnionConsumerID desc";
|
||
|
|
}
|
||
|
|
if($GG['ok']){
|
||
|
|
$where = " and a.GameOK = '".$GG['ok']."'";
|
||
|
|
}
|
||
|
|
$sql = "select a.*,convert(char,a.InsertTime,120) as addTime,g.UnionName,g.UnionCard,g.UnionCode,g.UnionGoldOpen,bi.HeadHttp,b.NickName,b.GameID,
|
||
|
|
ci.HeadHttp as HeadHttpc,c.NickName as NickNamec,c.GameID as GameIDc,
|
||
|
|
di.HeadHttp as HeadHttpd,d.NickName as NickNamed,d.GameID as GameIDd,
|
||
|
|
ei.HeadHttp as HeadHttpe,e.NickName as NickNamee,e.GameID as GameIDe,
|
||
|
|
fi.HeadHttp as HeadHttpf,f.NickName as NickNamef,f.GameID as GameIDf
|
||
|
|
from QPTreasureDB.dbo.GameUnionConsumer as a
|
||
|
|
LEFT JOIN AccountsInfo AS b ON(a.UserIDa=b.UserID) LEFT JOIN IndividualDatum as bi ON(a.UserIDa=bi.UserID)
|
||
|
|
LEFT JOIN AccountsInfo AS c ON(a.UserIDb=c.UserID) LEFT JOIN IndividualDatum as ci ON(a.UserIDb=ci.UserID)
|
||
|
|
LEFT JOIN AccountsInfo AS d ON(a.UserIDc=d.UserID) LEFT JOIN IndividualDatum as di ON(a.UserIDc=di.UserID)
|
||
|
|
LEFT JOIN AccountsInfo AS e ON(a.UserIDd=e.UserID) LEFT JOIN IndividualDatum as ei ON(a.UserIDd=ei.UserID)
|
||
|
|
LEFT JOIN AccountsInfo AS f ON(a.UserIDe=f.UserID) LEFT JOIN IndividualDatum as fi ON(a.UserIDe=fi.UserID)
|
||
|
|
LEFT JOIN QPTreasureDB.dbo.GameUnion AS g ON(a.UnionID=g.UnionID)
|
||
|
|
".$where." order by ".$order;
|
||
|
|
$data = $db->page([
|
||
|
|
"sql"=>$sql,
|
||
|
|
"count"=>"select count(*) from QPTreasureDB.dbo.GameUnionConsumer ".str_ireplace("a.","",$where)." ",
|
||
|
|
"key"=>"UnionConsumerID",
|
||
|
|
"table"=>"QPTreasureDB.dbo.GameUnionConsumer",
|
||
|
|
"where"=>str_ireplace("a.","",$where),
|
||
|
|
"order"=>$order,
|
||
|
|
"page"=>$GG['page'],
|
||
|
|
"pageSize"=>$GG['pagelist'] ? $GG['pagelist'] : 30
|
||
|
|
]);
|
||
|
|
if($data['data']){
|
||
|
|
foreach($data['data'] as $k=>$v){
|
||
|
|
$info[$k] = $v;
|
||
|
|
//$info[$k]['HeadHttp'] = $info[$k]['HeadHttp'];
|
||
|
|
$info[$k]['Date'] = strtotime($info[$k]['addTime']);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
//print_r($info);
|
||
|
|
//exit;
|
||
|
|
$ppxq -> assign('rule',$rule);
|
||
|
|
$ppxq -> register_function('timename','timename');
|
||
|
|
$ppxq -> register_function('convertip','convertip');
|
||
|
|
$ppxq -> assign('Pagenum',pages());
|
||
|
|
$ppxq -> assign('data',$info);
|
||
|
|
$ppxq -> assign('Link',"pagelist=".$GG['pagelist']."&uid=".$GG['uid']."&kid=".$GG['kid']."&ok=".$GG['ok']);
|
||
|
|
$ppxq -> assign('Pages',$data['page']);
|
||
|
|
$ppxq -> assign('GG',$GG);
|
||
|
|
$ppxq -> display('user/jcyx.tpl');
|
||
|
|
$db->close();
|
||
|
|
unset($GG,$ppxq,$db);
|
||
|
|
?>
|