65 lines
2.7 KiB
PHP
65 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");
|
|
|
|
if($GG['order'] == 'xf'){
|
|
$order = "ConsumeScore desc";
|
|
}elseif($GG['order'] == 'sy'){
|
|
$order = "InsureScore desc";
|
|
}elseif($GG['order'] == 'yx'){
|
|
$order = "PlayCount desc";
|
|
}elseif($GG['order'] == 'jy'){
|
|
$order = "Grade desc";
|
|
}else{
|
|
$order = "ID desc";
|
|
}
|
|
$where = " where a.ToKind='0' ";
|
|
if($GG['key']){
|
|
if($GG['sotype'] == 'agent'){
|
|
$where .= " and a.AgentID = '".$GG['key']."'";
|
|
$table = "QPPlatformManagerDB.dbo.AgentDealLog";
|
|
$sql = "select a.*,convert(char,a.OperDate,120) as Date,b.Accounts,b.WeiXin,c.GameID,c.NickName from QPPlatformManagerDB.dbo.AgentDealLog as a LEFT JOIN QPPlatformManagerDB.dbo.AgentList as b ON(a.AgentID=b.ID) LEFT JOIN AccountsInfo as c ON(a.ToID=c.UserID)".$where." order by ".$order;
|
|
$count = "select count(*) from ".$table." ".str_ireplace("a.","",$where);
|
|
}else{
|
|
$where .= " and a.Reason = '".$GG['key']."'";
|
|
$table = "QPPlatformManagerDB.dbo.AgentDealLog";
|
|
$sql = "select a.*,convert(char,a.OperDate,120) as Date,b.Accounts,b.WeiXin,c.GameID,c.NickName from QPPlatformManagerDB.dbo.AgentDealLog as a LEFT JOIN QPPlatformManagerDB.dbo.AgentList as b ON(a.AgentID=b.ID) LEFT JOIN AccountsInfo as c ON(a.ToID=c.UserID)".$where." order by ".$order;
|
|
$count = "select count(*) from ".$table." ".str_ireplace("a.","",$where);
|
|
}
|
|
}else{
|
|
$table = "QPPlatformManagerDB.dbo.AgentDealLog";
|
|
$sql = "select a.*,convert(char,a.OperDate,120) as Date,b.Accounts,b.WeiXin,c.GameID,c.NickName from QPPlatformManagerDB.dbo.AgentDealLog as a LEFT JOIN QPPlatformManagerDB.dbo.AgentList as b ON(a.AgentID=b.ID) LEFT JOIN AccountsInfo as c ON(a.ToID=c.UserID)".$where." order by ".$order;
|
|
$count = "select count(*) from ".$table." ".str_ireplace("a.","",$where);
|
|
}
|
|
$data = $db->page([
|
|
"sql"=>$sql,
|
|
"count"=>$count,
|
|
"key"=>"ID",
|
|
"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;
|
|
$info[$k]['OperCount'] = abs($v['OperCount']);
|
|
}
|
|
}
|
|
//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/bug.tpl');
|
|
$db->close();
|
|
unset($GG,$ppxq,$db);
|
|
?>
|