工会web
This commit is contained in:
56
GonghuiWeb/www/adminxx/user/old-agent-log.php
Normal file
56
GonghuiWeb/www/adminxx/user/old-agent-log.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?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'] == 'qi'){
|
||||
$order = "ToCurCount desc";
|
||||
}elseif($GG['order'] == 'gk'){
|
||||
$order = "OperCount desc";
|
||||
}elseif($GG['order'] == 'js'){
|
||||
$order = "Price desc";
|
||||
}else{
|
||||
$order = "ID desc";
|
||||
}
|
||||
$where = " where a.ToKind='1' and a.AgentID='1' and a.Del='0'";
|
||||
if($GG['key']){
|
||||
$where .= " and a.ToID = '".$GG['key']."'";
|
||||
$table = "QPPlatformManagerDB.dbo.AgentDealLog";
|
||||
$sql = "select a.*,convert(char,a.OperDate,120) as Date,b.Accounts,b.WeiXin from QPPlatformManagerDB.dbo.AgentDealLog as a LEFT JOIN QPPlatformManagerDB.dbo.AgentList as b ON(a.ToID=b.ID) ".$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 from QPPlatformManagerDB.dbo.AgentDealLog as a LEFT JOIN QPPlatformManagerDB.dbo.AgentList as b ON(a.ToID=b.ID) ".$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/agent-log.tpl');
|
||||
$db->close();
|
||||
unset($GG,$ppxq,$db);
|
||||
?>
|
||||
Reference in New Issue
Block a user