57 lines
1.9 KiB
PHP
57 lines
1.9 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");
|
|
if($GG['uid']){
|
|
$where = " where a.UserID = '".$GG['uid']."'";
|
|
}
|
|
if($GG['kid']){
|
|
$where = " where a.KindID = '".$GG['kid']."'";
|
|
}
|
|
$GG['rule'] = $GG['rule']>-1 ? $GG['rule'] : -1;
|
|
if($GG['rule']>=0){
|
|
$where .= " and a.GameRule = '".$GG['rule']."'";
|
|
}
|
|
if($GG['order'] == 'yx'){
|
|
$order = "GameHit desc";
|
|
}elseif($GG['order'] == 'rs'){
|
|
$order = "People desc";
|
|
}else{
|
|
$order = "id desc";
|
|
}
|
|
|
|
$sql = "select a.*,convert(char,a.CostTime,120) as Date,b.HeadHttp,c.NickName,c.GameID,e.UnionID,e.UnionName,e.UnionCode from QPTreasureDB.dbo.GameScoreLog 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 d ON(a.UserID=d.UserID) LEFT JOIN QPTreasureDB.dbo.GameUnion As e ON(d.UnionID=e.UnionID) ".$where." order by ".$order;
|
|
|
|
$data = $db->page([
|
|
"sql"=>$sql,
|
|
"count"=>"select count(*) from QPTreasureDB.dbo.GameScoreLog ".str_ireplace("a.","",$where)." ",
|
|
"key"=>"id",
|
|
"table"=>"QPTreasureDB.dbo.GameScoreLog",
|
|
"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;
|
|
}
|
|
}
|
|
//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']."&kid=".$GG['kid']."&rule=".$GG['rule']."&uid=".$GG['uid']."&order=".$GG['order']);
|
|
$ppxq -> assign('Pages',$data['page']);
|
|
$ppxq -> assign('GG',$GG);
|
|
$ppxq -> display('user/slog.tpl');
|
|
$db->close();
|
|
unset($GG,$ppxq,$db);
|
|
?>
|