59 lines
1.9 KiB
PHP
59 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");
|
||
|
|
|
||
|
|
|
||
|
|
if($GG['delid']){
|
||
|
|
$db->deldate("AgentRecharge","Rid='".$GG['delid']."'");
|
||
|
|
}
|
||
|
|
|
||
|
|
if($GG['order'] == 'qi'){
|
||
|
|
$order = "LeftCount desc";
|
||
|
|
}elseif($GG['order'] == 'gk'){
|
||
|
|
$order = "OperCount desc";
|
||
|
|
}elseif($GG['order'] == 'je'){
|
||
|
|
$order = "PayMoney desc";
|
||
|
|
}elseif($GG['order'] == 'js'){
|
||
|
|
$order = "Price desc";
|
||
|
|
}else{
|
||
|
|
$order = "Rid desc";
|
||
|
|
}
|
||
|
|
|
||
|
|
$where = " where a.OperCount<>'' ";
|
||
|
|
if($GG['key']){
|
||
|
|
$where .= " and a.UserID='".$GG['key']."'";
|
||
|
|
}
|
||
|
|
$table = "AgentRecharge";
|
||
|
|
$sql = "select a.*,convert(char,a.AddDate,120) as Date,b.GameID,b.UserID,b.NickName,b.Remark,c.HeadHttp,e.UnionName from AgentRecharge as a LEFT JOIN AccountsInfo as b ON(a.UserID=b.UserID) LEFT JOIN IndividualDatum 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;
|
||
|
|
$count = "select count(*) from ".$table." ".str_ireplace("a.","",$where);
|
||
|
|
$data = $db->page([
|
||
|
|
"sql"=>$sql,
|
||
|
|
"count"=>$count,
|
||
|
|
"key"=>"Rid",
|
||
|
|
"table"=>$table,
|
||
|
|
"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($data);
|
||
|
|
//exit;
|
||
|
|
$ppxq -> register_function('timename','timename');
|
||
|
|
$ppxq -> register_function('convertip','convertip');
|
||
|
|
$ppxq -> assign('Pagenum',pages());
|
||
|
|
$ppxq -> assign('data',$info);
|
||
|
|
$ppxq -> assign('Link',"pagelist=".$GG['pagelist']."&sotype=".$GG['sotype']."&key=".$GG['key']."&order=".$GG['order']);
|
||
|
|
$ppxq -> assign('Pages',$data['page']);
|
||
|
|
$ppxq -> assign('GG',$GG);
|
||
|
|
$ppxq -> display('user/agent-log.tpl');
|
||
|
|
$db->close();
|
||
|
|
unset($GG,$ppxq,$db);
|
||
|
|
?>
|