Files
wnmj/GonghuiWeb/www/adminxx/user/gh-sq.php

49 lines
1.8 KiB
PHP
Raw 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");
if($GG['username']){
$where = " where (b.NickName like '%".$GG['username']."%' or b.GameID like '%".$GG['username']."%')";
}
if($GG['order'] == 'yx'){
$order = "GameHit desc";
}elseif($GG['order'] == 'rs'){
$order = "People desc";
}else{
$order = "UnionCode desc";
}
$sql = "select a.*,b.GameID,b.NickName,b.WXShareTimes,b.Gender,b.SpreaderID,c.HeadHttp,d.UnionName,d.UnionCode,d.UnionGG,d.People,d.GameHit,convert(char,a.AddTime,120) as Date from QPTreasureDB.dbo.GameUnionNotice 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.GameUnion As d ON(a.UnionID=d.UnionID) ".$where." order by ".$order;
$data = $db->page([
"sql"=>$sql,
"count"=>"select count(*) from QPTreasureDB.dbo.GameUnionNotice ".str_ireplace("b.","",$where)." ",
"key"=>"UnionNoticeID",
"table"=>"QPTreasureDB.dbo.GameUnionNotice",
"where"=>str_ireplace("b.","",$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]['HeadHttp'] = $info[$k]['HeadHttp'];
$info[$k]['Date'] = strtotime($info[$k]['Date']);
}
}
//print_r($info);
//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']."&dj=".$GG['dj']."&&username=".$GG['username']."&order=".$GG['order']);
$ppxq -> assign('Pages',$data['page']);
$ppxq -> assign('GG',$GG);
$ppxq -> display('user/gh-sq.tpl');
$db->close();
unset($GG,$ppxq,$db);
?>