Files

50 lines
1.9 KiB
PHP
Raw Permalink Normal View History

2026-02-24 09:25:17 +08:00
<?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();
if($GG['order'] == 'yb'){
$order = "YuanBao desc";
}elseif($GG['order'] == 'qyb'){
$order = "QYuanBao desc";
}else{
$order = "Hdlid desc";
}
if($GG['gid']){
$userid = $db->fetch_abc("select UserID from AccountsInfo where GameID='".$GG['gid']."'");
}
if($userid){
$where = " where a.UserID='".$userid."'";
}
$data = $db->page([
"sql"=>"select a.*,convert(char,a.Haddtime,120) as Date,c.GameID,c.NickName,c.SpreaderID,c.WXShareTimes,c.Gender,b.HeadHttp,y.UnionName,z.Htitle from HuodongLog 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 x ON(a.UserID=x.UserID) LEFT JOIN QPTreasureDB.dbo.GameUnion As y ON(x.UnionID=y.UnionID) LEFT JOIN HuoDong As z ON(a.Hdid=z.Hdid) ".$where." order by ".$order,
"count"=>"select count(*) from HuoDongLog ".str_ireplace("a.","",$where),
"key"=>"Hdlid",
"table"=>"HuoDongLog",
"where"=>str_ireplace("a.","",$where),
"order"=>$order,
"page"=>$GG['page'],
"pageSize"=>$GG['pagelist'] ? $GG['pagelist'] : 100
]);
if($data['data']){
foreach($data['data'] as $k=>$v){
$info[$k] = $v;
$info[$k]['HeadHttp'] = $info[$k]['HeadHttp'];
$info[$k]['Date'] = strtotime($info[$k]['Date']);
}
}
//print_r($data);exit;
$ppxq -> register_function('timename','timename');
$ppxq -> register_function('convertip','convertip');
$ppxq -> assign('Pagenum',pages(4));
$ppxq -> assign('data',$info);
$ppxq -> assign('Link',"pagelist=".$GG['pagelist']."&gid=".$GG['gid']."&type=".$GG['type']."&order=".$GG['order']);
$ppxq -> assign('Pages',$data['page']);
$ppxq -> assign('GG',$GG);
$ppxq -> display('user/huodong_log.tpl');
$db->close();
unset($GG,$ppxq,$db);
?>