工会web
This commit is contained in:
39
GonghuiWeb/www/adminxx/user/test2.php
Normal file
39
GonghuiWeb/www/adminxx/user/test2.php
Normal file
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
include_once("../../../inc/admin.inc.php");
|
||||
include_once("../../../inc/class.php");
|
||||
include_once("../../../inc/admin.smarty.php");
|
||||
include_once("../../../inc/admin.power.php");
|
||||
|
||||
|
||||
|
||||
$wheres = "where UserID ='1017'";
|
||||
$data = $db->fetch_all("SELECT top 50 UserID,convert(char,InsertTime,120) as Date,RecordID
|
||||
,(SELECT b.UserID,c.GameID,c.NickName,d.HeadHttp FROM QPTreasureDB.dbo.PrivateGameRecordUserRecordID as b LEFT JOIN AccountsInfo as c ON(b.UserID=c.UserID) LEFT JOIN IndividualDatum as d ON(d.UserID=b.UserID) WHERE b.RecordID=a.RecordID FOR XML PATH('')) AS users
|
||||
,(SELECT e.UserScore FROM QPTreasureDB.dbo.PrivateGameRecordChild as e WHERE e.RecordID=a.RecordID FOR XML PATH('')) AS log
|
||||
FROM QPTreasureDB.dbo.PrivateGameRecordUserRecordID a ".$wheres." GROUP BY UserID,RecordID,InsertTime order by InsertTime desc");
|
||||
|
||||
if($data){
|
||||
foreach($data as $k => $v){
|
||||
$info[$k]['data'] = $v;
|
||||
if($v['users']){
|
||||
$userstr = [];
|
||||
$arr = explode("</HeadHttp>",$v['users']);
|
||||
foreach($arr as $ka => $va){
|
||||
if($va){
|
||||
$userstr[] = str_replace(['</UserID>','</GameID>','</NickName>','<GameID>','<UserID>','<NickName>','<HeadHttp>'],['</>','</>','</>','','','',''],$va);
|
||||
}
|
||||
}
|
||||
$info[$k]['user'] = $userstr;
|
||||
}else{
|
||||
$info[$k]['user'] = [];
|
||||
}
|
||||
$logs = explode("</UserScore>",str_replace("<UserScore>","",$v['log']));
|
||||
$info[$k]['logs'] = array_filter($logs);
|
||||
|
||||
}
|
||||
}
|
||||
print_r($info);
|
||||
exit;
|
||||
$db->close();
|
||||
unset($GG,$ppxq,$db);
|
||||
?>
|
||||
Reference in New Issue
Block a user