64 lines
2.7 KiB
PHP
64 lines
2.7 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");
|
||
|
|
$db->links();
|
||
|
|
if($GG['del']){
|
||
|
|
$db->deldate("YuanBaoLog","YbID='".$GG['del']."'");
|
||
|
|
}
|
||
|
|
//$cs = $db->fetch_all("select top 100 a.*,convert(char,a.LoTime,120) as Date,c.GameID,c.NickName,c.SpreaderID,c.WXShareTimes,c.Gender,b.HeadHttp,y.UnionName from YuanBaoLog as a LEFT JOIN IndividualDatum as b ON(a.UserID=b.UserID) LEFT JOIN AccountsInfo AS c ON(a.UserID=c.UserID) LEFT JOIN QPTreasureDB.dbo.GameScoreInfo AS x ON(a.UserID=x.UserID) LEFT JOIN QPTreasureDB.dbo.GameUnion As y ON(x.UnionID=y.UnionID) where a.UserID not in(select top 100 UserID from YuanBaoLog where UserID='3300' order by YbID desc) and a.UserID='3300' order by YbID desc");
|
||
|
|
//print_r($cs);
|
||
|
|
//echo "<<";
|
||
|
|
//exit;
|
||
|
|
|
||
|
|
if($GG['order'] == 'yb'){
|
||
|
|
$order = "YuanBao desc";
|
||
|
|
}elseif($GG['order'] == 'qyb'){
|
||
|
|
$order = "QYuanBao desc";
|
||
|
|
}elseif($GG['order'] == 'hit'){
|
||
|
|
$order = "LotteryHit desc";
|
||
|
|
}else{
|
||
|
|
$order = "YbID desc";
|
||
|
|
}
|
||
|
|
if($GG['gid']){
|
||
|
|
$userid = $db->fetch_abc("select UserID from AccountsInfo where GameID='".$GG['gid']."'");
|
||
|
|
}
|
||
|
|
if($userid){
|
||
|
|
$where = " where a.UserID='".$userid."'";
|
||
|
|
}
|
||
|
|
if($GG['type'] && $where){
|
||
|
|
$where = " and a.UserID='".$userid."'";
|
||
|
|
}elseif($GG['type']){
|
||
|
|
$where = " where a.Types='".$GG['type']."'";
|
||
|
|
}
|
||
|
|
$data = $db->page([
|
||
|
|
"sql"=>"select a.*,convert(char,a.LoTime,120) as Date,c.GameID,c.NickName,c.SpreaderID,c.WXShareTimes,c.Gender,b.HeadHttp,y.UnionName from YuanBaoLog as a LEFT JOIN IndividualDatum as b ON(a.UserID=b.UserID) LEFT JOIN AccountsInfo AS c ON(a.UserID=c.UserID) LEFT JOIN QPTreasureDB.dbo.GameScoreInfo AS x ON(a.UserID=x.UserID) LEFT JOIN QPTreasureDB.dbo.GameUnion As y ON(x.UnionID=y.UnionID) ".$where." order by ".$order,
|
||
|
|
"count"=>"select count(*) from YuanBaoLog ".str_ireplace("a.","",$where),
|
||
|
|
"key"=>"YbID",
|
||
|
|
"table"=>"YuanBaoLog",
|
||
|
|
"where"=>str_ireplace("a.","",$where),
|
||
|
|
"order"=>$order,
|
||
|
|
"page"=>$GG['page'],
|
||
|
|
"pageSize"=>$GG['pagelist'] ? $GG['pagelist'] : 100
|
||
|
|
]);
|
||
|
|
if($data['data']){
|
||
|
|
foreach($data['data'] as $k=>$v){
|
||
|
|
$info[$k] = $v;
|
||
|
|
$info[$k]['HeadHttp'] = $info[$k]['HeadHttp'];
|
||
|
|
$info[$k]['Date'] = strtotime($info[$k]['Date']);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
//print_r($data);exit;
|
||
|
|
$ppxq -> register_function('timename','timename');
|
||
|
|
$ppxq -> register_function('convertip','convertip');
|
||
|
|
$ppxq -> assign('Pagenum',pages(4));
|
||
|
|
$ppxq -> assign('data',$info);
|
||
|
|
$ppxq -> assign('Link',"pagelist=".$GG['pagelist']."&gid=".$GG['gid']."&type=".$GG['type']."&order=".$GG['order']);
|
||
|
|
$ppxq -> assign('Pages',$data['page']);
|
||
|
|
$ppxq -> assign('GG',$GG);
|
||
|
|
$ppxq -> display('user/lottery.tpl');
|
||
|
|
$db->close();
|
||
|
|
unset($GG,$ppxq,$db);
|
||
|
|
?>
|