工会web
This commit is contained in:
23
GonghuiWeb/www/adminxx/hy/index.php
Normal file
23
GonghuiWeb/www/adminxx/hy/index.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
include_once("../../../inc/admin.config.php");
|
||||
include_once("../../../inc/class.php");
|
||||
include_once("../../../inc/admin.smarty.php");
|
||||
|
||||
if($GG['submit']){
|
||||
if($GG['uname'] == '18107938977'){
|
||||
session_start();
|
||||
$_SESSION['XQhy']='admin';
|
||||
echo "<script>location.href='look.php';</script>";
|
||||
exit;
|
||||
}else{
|
||||
echo "<script>location.href='index.php';</script>";
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
//$ppxq -> assign('data',$data);
|
||||
//$ppxq -> assign('GG',$GG);
|
||||
$ppxq -> display('hy/index.tpl');
|
||||
$db->close();
|
||||
unset($GG,$ppxq,$db);
|
||||
?>
|
||||
92
GonghuiWeb/www/adminxx/hy/jl.php
Normal file
92
GonghuiWeb/www/adminxx/hy/jl.php
Normal file
@@ -0,0 +1,92 @@
|
||||
<?php
|
||||
include_once("../../../inc/admin.config.php");
|
||||
include_once("../../../inc/class.php");
|
||||
include_once("../../../inc/admin.smarty.php");
|
||||
|
||||
session_start();
|
||||
if (!$_SESSION['XQhy']){
|
||||
echo "<script>parent.location.href='index.php';</Script>";
|
||||
exit;
|
||||
}
|
||||
$db = new myPage;
|
||||
$db->links();//Á¬½ÓÊý¾Ý¿â
|
||||
|
||||
$GG['uid'] = $GG['uid'] ? $GG['uid'] :'1017';
|
||||
$where = " where a.UserID='".$GG['uid']."'";
|
||||
$table = "QPTreasureDB.dbo.PrivateGameRecordUserRecordID";
|
||||
$sql = "SELECT top 200 UserID,convert(char,InsertTime,120) as Date,RecordID
|
||||
,(SELECT b.UserID,c.GameID,c.NickName,y.UnionID,y.UnionName,x.Zjf,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) LEFT JOIN QPTreasureDB.dbo.GameScoreInfo AS x ON(b.UserID=x.UserID) LEFT JOIN QPTreasureDB.dbo.GameUnion As y ON(x.UnionID=y.UnionID) WHERE b.RecordID=a.RecordID order by b.InsertTime asc FOR XML PATH('')) AS users
|
||||
,(SELECT e.UserScore,e.RecordChildID FROM QPTreasureDB.dbo.PrivateGameRecordChild as e WHERE e.RecordID=a.RecordID FOR XML PATH('')) AS log
|
||||
,(SELECT top 1 b.KindID FROM QPTreasureDB.dbo.PrivateGameRecordUserRecordID as b WHERE b.RecordID=a.RecordID) AS KindID
|
||||
FROM QPTreasureDB.dbo.PrivateGameRecordUserRecordID a ".$where." GROUP BY UserID,RecordID,InsertTime order by InsertTime desc";
|
||||
$count = "select count(*) from ".$table." ".str_ireplace("a.","",$where);
|
||||
|
||||
$data = $db->page([
|
||||
"sql"=>$sql,
|
||||
"count"=>$count,
|
||||
"key"=>"RecordID",
|
||||
"table"=>$table,
|
||||
"where"=>str_ireplace("a.","",$where),
|
||||
"order"=>"RecordID desc",
|
||||
"page"=>$GG['page'],
|
||||
"pageSize"=>$GG['pagelist'] ? $GG['pagelist'] : 200
|
||||
]);
|
||||
//print_r($data['data']);exit;
|
||||
if($data['data']){
|
||||
foreach($data['data'] as $k => $v){
|
||||
$info[$k]['data'] = $v;
|
||||
if($v['users']){
|
||||
$v['users'] = str_replace("<UserID>0</UserID>","",$v['users']);
|
||||
$userstr = [];
|
||||
$arr = explode("</HeadHttp>",$v['users']);
|
||||
foreach($arr as $ka => $va){
|
||||
if($va){
|
||||
$userstr[] = str_replace(['</UserID>','</GameID>','</NickName>','</UnionID>','</UnionName>','</Zjf>','<GameID>','<UserID>','<NickName>','<HeadHttp>','<UnionID>','<UnionName>','<Zjf>'],['</>','</>','</>','</>','</>','</>','','','','','','','',''],$va);
|
||||
}
|
||||
}
|
||||
if($userstr){
|
||||
foreach($userstr as $kb => $vb){
|
||||
$user_str = explode('</>',$vb);
|
||||
$info[$k]['users'][$kb]['UserID'] = $user_str[0];
|
||||
$info[$k]['users'][$kb]['GameID'] = $user_str[1];
|
||||
$info[$k]['users'][$kb]['NickName'] = $user_str[2];
|
||||
$info[$k]['users'][$kb]['UnionName'] = $user_str[4] ? $user_str[4] : "";
|
||||
$info[$k]['users'][$kb]['Zjf'] = $user_str[5] ? $user_str[5] : 0;
|
||||
$info[$k]['users'][$kb]['HeadHttp'] = $user_str[6] ? $user_str[6] : $user_str[3];
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$info[$k]['users'] = [];
|
||||
}
|
||||
$logs = array_filter(explode("</RecordChildID>",str_replace(['</UserScore>','<RecordChildID>','<UserScore>'],['',',',''],$v['log'])));
|
||||
$info[$k]['logs'] = $logs;
|
||||
foreach($logs as $kb => $vb){
|
||||
$ajf = explode(",",$vb);
|
||||
$zf[0] = $zf[0]+$ajf[0];
|
||||
$zf[1] = $zf[1]+$ajf[1];
|
||||
$zf[2] = $zf[2]+$ajf[2];
|
||||
$zf[3] = $zf[3]+$ajf[3];
|
||||
$zf[4] = $zf[4]+$ajf[4];
|
||||
}
|
||||
$info[$k]['zf'] = $zf;
|
||||
$zf = [];
|
||||
//¼ÆËã×Ü·Ö
|
||||
if($userstr){
|
||||
foreach($userstr as $kzf => $vzf){
|
||||
$arrss = explode("</>",$vzf);
|
||||
if($arrss[0] == $GG['uid']){
|
||||
$zzf = $zzf+$info[$k]['zf'][$kzf];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$ppxq -> assign('zzf',$zzf);
|
||||
$ppxq -> assign('data',$info);
|
||||
$ppxq -> register_function('timename','timename');
|
||||
$ppxq -> assign('GG',$GG);
|
||||
$ppxq -> display('hy/jl.tpl');
|
||||
$db->close();
|
||||
unset($GG,$ppxq,$db);
|
||||
?>
|
||||
90
GonghuiWeb/www/adminxx/hy/look.php
Normal file
90
GonghuiWeb/www/adminxx/hy/look.php
Normal file
@@ -0,0 +1,90 @@
|
||||
<?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();//连接数据库
|
||||
$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'");
|
||||
|
||||
//获取所有的群
|
||||
$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);
|
||||
?>
|
||||
Reference in New Issue
Block a user