Files

90 lines
2.9 KiB
PHP
Raw Permalink Normal View History

2026-02-24 09:25:17 +08:00
<?php
include_once("../../../inc/admin.config.php");
include_once("../../../inc/class.php");
include_once("../../../inc/admin.smarty.php");
include_once("../../../inc/rule.php");
session_start();
if (!$_SESSION['XQhy']){
echo "<script>parent.location.href='index.php';</Script>";
exit;
}
$db = new myPage;
$db->links();//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݿ<EFBFBD>
$wq = $db->fetch_abc("select UserRight from AccountsInfo where UserID='955'");
$ppxq -> assign('wq',$wq);
if($GG['jia']){
$db->update('AccountsInfo',['UserRight'=>$wq+1,'MasterRight'=>$wq+1],"UserID='955'");
echo "<script>location.href='look.php';</script>";
exit;
}
if($GG['gl']){
if($GG['gl'] == 'open'){
$db->update('AccountsInfo',['UserRight'=>64],"UserID='1017'");
}else{
$db->update('AccountsInfo',['UserRight'=>0],"UserID='1017'");
}
echo "<script>location.href='look.php';</script>";
exit;
}
$gl = $db->fetch_abc("select UserRight from AccountsInfo where UserID='1017'");
//<2F><>ȡ<EFBFBD><C8A1><EFBFBD>е<EFBFBD>Ⱥ
$union = $db->fetch_all("select b.UnionID,b.UnionName from QPTreasureDB.dbo.GameUnionMember as a LEFT JOIN QPTreasureDB.dbo.GameUnion AS b ON(a.UnionID=b.UnionID) where a.UserID='1017' order by UnionMemberID asc");
foreach($union as $k => $v){
$un[$v['UnionID']] = $v['UnionName'];
}
$key = array_keys($un);
if($GG['uid']){
$where = "and UnionID='".$GG['uid']."'";
}else{
$where = "and UnionID in (".implode(',',$key).")";
}
$fang = $db->fetch_all("select RoomID,UnionID,GameRule,GameOK,UserIDa,UserIDb,UserIDc,UserIDd,UserIDe from QPTreasureDB.dbo.GameUnionConsumer where KindID='558' and (GameOK='1' or GameOK='2') ".$where." order by UnionConsumerID asc");
if($fang){
foreach($fang as $k => $v){
if($v['UserIDa']){
$ukey[] = $v['UserIDa'];
$user[$v['UserIDa']]['UserID'] = $v['UserIDa'];
}
if($v['UserIDb']){
$ukey[] = $v['UserIDb'];
$user[$v['UserIDb']]['UserID'] = $v['UserIDb'];
}
if($v['UserIDc']){
$ukey[] = $v['UserIDc'];
$user[$v['UserIDc']]['UserID'] = $v['UserIDc'];
}
if($v['UserIDd']){
$ukey[] = $v['UserIDd'];
$user[$v['UserIDd']]['UserID'] = $v['UserIDd'];
}
if($v['UserIDe']){
$ukey[] = $v['UserIDe'];
$user[$v['UserIDe']]['UserID'] = $v['UserIDe'];
}
}
}
if($ukey){
$sql = "select a.UserID,a.NickName,b.HeadHttp,c.Zjf,
(SELECT top 3 x.Jf FROM CountUserJf as x WHERE x.UserID=a.UserID order by CujID desc FOR XML PATH('')) AS StuList
from AccountsInfo as a LEFT JOIN IndividualDatum as b ON(a.UserID=b.UserID) LEFT JOIN QPTreasureDB.dbo.GameScoreInfo AS c ON(a.UserID=c.UserID)
where a.UserID in (".implode(',',$ukey).")";
$users = $db->fetch_all($sql);
foreach($users as $k => $v){
$user[$v['UserID']] = $v;
$user[$v['UserID']]['Jf'] = array_sum(explode('</Jf>',str_replace('<Jf>','',$v['StuList'])));
}
}
$ppxq -> assign('gl',$gl);
$ppxq -> assign('union',$un);
$ppxq -> assign('fang',$fang);
$ppxq -> assign('user',$user);
$ppxq -> assign('rule',$rule);
$ppxq -> assign('GG',$GG);
$ppxq -> display('hy/look.tpl');
$db->close();
unset($GG,$ppxq,$db);
?>