工会web
This commit is contained in:
53
GonghuiWeb/www/adminxx/user/old-agent.php
Normal file
53
GonghuiWeb/www/adminxx/user/old-agent.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?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('agent');
|
||||
if($GG['order'] == 'gk'){
|
||||
$order = "BuyCount desc";
|
||||
}elseif($GG['order'] == 'sk'){
|
||||
$order = "SellCount desc";
|
||||
}elseif($GG['order'] == 'yk'){
|
||||
$order = "LeftCount desc";
|
||||
}elseif($GG['order'] == 'je'){
|
||||
$order = "PayMoney desc";
|
||||
}elseif($GG['order'] == 'dl'){
|
||||
$order = "SubCount desc";
|
||||
}else{
|
||||
$order = "ID desc";
|
||||
}
|
||||
if($GG['ids']){
|
||||
$where = " where a.ParentID='".$GG['ids']."'";
|
||||
}else{
|
||||
$where = " where a.ParentID<>'0'";
|
||||
}
|
||||
$data = $db->page([
|
||||
"sql"=>"select a.*,convert(char,a.LastLogonDate,120) as Date,b.Accounts as dname from AgentList as a LEFT JOIN AgentList as b ON(a.ParentID=b.ID) ".$where." order by ".$order,
|
||||
"count"=>"select count(*) from AgentList ".str_ireplace("a.","",$where),
|
||||
"key"=>"ID",
|
||||
"table"=>"AgentList",
|
||||
"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.tpl');
|
||||
$db->close();
|
||||
unset($GG,$ppxq,$db);
|
||||
?>
|
||||
Reference in New Issue
Block a user