99 lines
4.2 KiB
PHP
99 lines
4.2 KiB
PHP
|
|
<?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['del']){
|
|||
|
|
$union = $db->fetch_one("select * from QPTreasureDB.dbo.GameUnion where UnionID='".$GG['del']."'");
|
|||
|
|
if($union){
|
|||
|
|
//ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
$db->deldate("QPTreasureDB.dbo.GameUnion","UnionID='".$union['UnionID']."'");
|
|||
|
|
$db->deldate("QPTreasureDB.dbo.GameUnionMember","UnionID='".$union['UnionID']."' and UserID='".$union['UserID']."'");
|
|||
|
|
$db->deldate("QPTreasureDB.dbo.GameUnionKind","UnionID='".$union['UnionID']."'");
|
|||
|
|
$db->deldate("QPTreasureDB.dbo.GameUnionCard","UnionID='".$union['UnionID']."'");
|
|||
|
|
$db->deldate("QPTreasureDB.dbo.GameUnionDay","UnionID='".$union['UnionID']."'");
|
|||
|
|
$db->deldate("QPTreasureDB.dbo.GameUnionMonth","UnionID='".$union['UnionID']."'");
|
|||
|
|
$db->deldate("QPTreasureDB.dbo.GameUnionConsumer","UnionID='".$union['UnionID']."'");
|
|||
|
|
$db->deldate("QPPlatformDB.dbo.UnionRoomInfo","UnionCode='".$union['UnionCode']."'");
|
|||
|
|
//<2F><EFBFBD>Ĭ<EFBFBD>Ϲ<EFBFBD><CFB9><EFBFBD>
|
|||
|
|
$un_id = $db->fetch_abc("select UnionID from QPTreasureDB.dbo.GameScoreInfo where UserID='".$union['UserID']."'");
|
|||
|
|
if($un_id == $union['UnionID']){
|
|||
|
|
$unm_id = $db->fetch_abc("select UnionID from QPTreasureDB.dbo.GameUnionMember where UserID='".$union['UserID']."'");
|
|||
|
|
if($unm_id){
|
|||
|
|
$db->update('QPTreasureDB.dbo.GameScoreInfo',['UnionID'=>$unm_id],"UserID='".$union['UserID']."'");
|
|||
|
|
}else{
|
|||
|
|
$db->update('QPTreasureDB.dbo.GameScoreInfo',['UnionID'=>0],"UserID='".$union['UserID']."'");
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
echo "<script>location.href='gh.php';</script>";
|
|||
|
|
exit;
|
|||
|
|
}
|
|||
|
|
if($GG['xd']){
|
|||
|
|
$union = $db->fetch_all("select * from QPTreasureDB.dbo.GameUnion order by UnionID asc");
|
|||
|
|
if($union){
|
|||
|
|
foreach($union as $k => $v){
|
|||
|
|
$count = $db->fetch_abc("select count(*) from QPTreasureDB.dbo.GameUnionMember where UnionID='".$v['UnionID']."'");
|
|||
|
|
$db->update('QPTreasureDB.dbo.GameUnion',['People' => $count],"UnionID='".$v['UnionID']."'");
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
echo "<script>location.href='gh.php';</script>";
|
|||
|
|
exit;
|
|||
|
|
}
|
|||
|
|
/*
|
|||
|
|
if($GG['huan']){
|
|||
|
|
$union = $db->fetch_one("select * from QPTreasureDB.dbo.GameUnion where UnionID='".$GG['huan']."'");
|
|||
|
|
if($union){
|
|||
|
|
if($union['UnionGoldOpen']){
|
|||
|
|
$hsave=['UnionGoldOpen'=>0];
|
|||
|
|
}else{
|
|||
|
|
$hsave=['UnionGoldOpen'=>1];
|
|||
|
|
}
|
|||
|
|
$db->update('QPTreasureDB.dbo.GameUnion',$hsave,"UnionID='".$union['UnionID']."'");
|
|||
|
|
}
|
|||
|
|
}*/
|
|||
|
|
if($GG['username']){
|
|||
|
|
$where = " where (c.NickName like '%".$GG['username']."%' or c.GameID like '%".$GG['username']."%' or a.UnionName like '%".$GG['username']."%')";
|
|||
|
|
}
|
|||
|
|
if($GG['order'] == 'hk'){
|
|||
|
|
$order = "GameHit desc";
|
|||
|
|
}elseif($GG['order'] == 'fk'){
|
|||
|
|
$order = "UnionCard desc";
|
|||
|
|
}elseif($GG['order'] == 'rs'){
|
|||
|
|
$order = "People desc";
|
|||
|
|
}else{
|
|||
|
|
$order = "Time desc";
|
|||
|
|
}
|
|||
|
|
$data = $db->page([
|
|||
|
|
"sql"=>"select a.*,c.GameID,c.NickName,c.SpreaderID,c.WXShareTimes,c.Gender,c.LastLogonIP,c.RegisterIP,c.Remark,b.HeadHttp,convert(char,c.LastLogonDate,120) as LastDate,convert(char,a.Time,120) as Times from QPTreasureDB.dbo.GameUnion 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 d ON(a.UserID=d.UserID) ".$where." order by ".$order,
|
|||
|
|
"count"=>"select count(*) from QPTreasureDB.dbo.GameUnion ".str_ireplace("c.","",$where),
|
|||
|
|
"key"=>"UnionID",
|
|||
|
|
"table"=>"QPTreasureDB.dbo.GameUnion",
|
|||
|
|
"where"=>str_ireplace("c.","",$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]['LastDate'] = strtotime($info[$k]['LastDate']);
|
|||
|
|
$info[$k]['Times'] = strtotime($info[$k]['Times']);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
//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']."&sotype=".$GG['sotype']."&key=".$GG['key']."&order=".$GG['order']);
|
|||
|
|
$ppxq -> assign('Pages',$data['page']);
|
|||
|
|
$ppxq -> assign('GG',$GG);
|
|||
|
|
$ppxq -> display('user/gh.tpl');
|
|||
|
|
$db->close();
|
|||
|
|
unset($GG,$ppxq,$db);
|
|||
|
|
?>
|