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

129 lines
5.3 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");
include_once("../../../inc/rule.php");
if($GG['ucid'] && $GG['id']){
$db->deldate("QPTreasureDB.dbo.GameUnionConsumer","UnionConsumerID='".$GG['ucid']."'");
echo "<script>location.href='gh-kf.php?kid=".$GG['kid']."&page=".$GG['page']."';</script>";
exit;
}
if($GG['delfk']){//<2F><><EFBFBD>շ<EFBFBD><D5B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>50<35><30> <20><><EFBFBD>߿<EFBFBD><DFBF><EFBFBD>
$all = $db->fetch_all("select UnionID,UnionCode from QPTreasureDB.dbo.GameUnion where UnionCard<'50' order by UnionID desc");
if($all){
foreach($all as $k=>$v){
$db->deldate("QPPlatformDB.dbo.UnionRoomInfo","UnionCode='".$v['UnionCode']."'");
$db->deldate("QPTreasureDB.dbo.GameUnionConsumer","(GameOK='2' or GameOK='1') and UnionID='".$v['UnionID']."'");
}
}
echo "<script>location.href='gh-kf.php';</script>";
exit;
}
if($GG['qkzxkf']){//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>߿<EFBFBD><DFBF><EFBFBD>
$db->deldate("QPTreasureDB.dbo.GameUnionConsumer","GameOK='2' or GameOK='1'");
echo "<script>location.href='gh-kf.php';</script>";
exit;
}
if($GG['del']){//ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD>п<EFBFBD><D0BF><EFBFBD>ʧ<EFBFBD><CAA7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
$db->deldate("QPTreasureDB.dbo.GameUnionConsumer","GameOK='0'");
echo "<script>location.href='gh-kf.php';</script>";
exit;
}
if($GG['autodel']){//ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Զ<EFBFBD><D4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
$db->deldate("QPTreasureDB.dbo.GameUnionConsumer","GameOK='8' and UserIDa='0' and UserIDb='0' and UserIDc='0' and UserIDd='0' and UserIDe='0'");
echo "<script>location.href='gh-kf.php';</script>";
exit;
}
if($GG['zhuan']){//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD>ת<EFBFBD><D7AA><EFBFBD>ѿ<EFBFBD>
$ssday = date('Y-m-d',strtotime("-2 day"));
/*$ss = $db->fetch_all("select * from QPTreasureDB.dbo.GameUnionConsumer where (GameOK='2' or (GameOK='1' and GameRule<'100000000')) and convert(char(10),InsertTime,120)<'".$ssday."' order by UnionConsumerID desc");
print_r($ss);*/
$db->update('QPTreasureDB.dbo.GameUnionConsumer',['GameOK'=>'8'],"(GameOK='2' or (GameOK='1' and GameRule<'100000000')) and convert(char(10),InsertTime,120)<'".$ssday."'");
echo "<script>location.href='gh-kf.php';</script>";
exit;
}
$order = "UnionConsumerID desc";
if($GG['uid']){
$where = " where a.UnionID = '".$GG['uid']."'";
$order = "GameOK asc,UnionConsumerID desc";
if($GG['date']){
$where .= " and CONVERT(date,a.InsertTime) = '".$GG['date']."'";
}
if($GG['gid']){
$where .= " and (b.GameID='".$GG['gid']."' or c.GameID='".$GG['gid']."' or d.GameID='".$GG['gid']."' or e.GameID='".$GG['gid']."' or f.GameID='".$GG['gid']."') ";
}
}
if($GG['kid']){
$where = " where a.KindID = '".$GG['kid']."'";
$order = "GameOK asc,UnionConsumerID desc";
}
if($GG['ok']){
$where = " where a.GameOK = '".$GG['ok']."'";
}
$sql = "select a.*,convert(char,a.InsertTime,120) as addTime,g.UnionName,g.UnionCard,g.UnionCode,g.UnionGoldOpen,bi.HeadHttp,b.NickName,b.GameID,
ci.HeadHttp as HeadHttpc,c.NickName as NickNamec,c.GameID as GameIDc,
di.HeadHttp as HeadHttpd,d.NickName as NickNamed,d.GameID as GameIDd,
ei.HeadHttp as HeadHttpe,e.NickName as NickNamee,e.GameID as GameIDe,
fi.HeadHttp as HeadHttpf,f.NickName as NickNamef,f.GameID as GameIDf
from QPTreasureDB.dbo.GameUnionConsumer as a
LEFT JOIN AccountsInfo AS b ON(a.UserIDa=b.UserID) LEFT JOIN IndividualDatum as bi ON(a.UserIDa=bi.UserID)
LEFT JOIN AccountsInfo AS c ON(a.UserIDb=c.UserID) LEFT JOIN IndividualDatum as ci ON(a.UserIDb=ci.UserID)
LEFT JOIN AccountsInfo AS d ON(a.UserIDc=d.UserID) LEFT JOIN IndividualDatum as di ON(a.UserIDc=di.UserID)
LEFT JOIN AccountsInfo AS e ON(a.UserIDd=e.UserID) LEFT JOIN IndividualDatum as ei ON(a.UserIDd=ei.UserID)
LEFT JOIN AccountsInfo AS f ON(a.UserIDe=f.UserID) LEFT JOIN IndividualDatum as fi ON(a.UserIDe=fi.UserID)
LEFT JOIN QPTreasureDB.dbo.GameUnion AS g ON(a.UnionID=g.UnionID)
".$where." order by ".$order;
$data = $db->page([
"sql"=>$sql,
"count"=>"select count(*) from QPTreasureDB.dbo.GameUnionConsumer ".str_ireplace("a.","",$where)." ",
"key"=>"UnionConsumerID",
"table"=>"QPTreasureDB.dbo.GameUnionConsumer",
"where"=>str_ireplace("a.","",$where),
"order"=>$order,
"page"=>$GG['page'],
"pageSize"=>$GG['pagelist'] ? $GG['pagelist'] : 30
]);
if($data['data']){
$uzf = 0;
foreach($data['data'] as $k=>$v){
$info[$k] = $v;
//$info[$k]['HeadHttp'] = $info[$k]['HeadHttp'];
$info[$k]['Date'] = strtotime($info[$k]['addTime']);
if($GG['gid']){
if($GG['gid'] == $v['GameID']){
$uzf += $v['Golda'];
$info[$k]['fff'] = $v['Golda'];
}elseif($GG['gid'] == $v['GameIDc']){
$uzf += $v['Goldb'];
$info[$k]['fff'] = $v['Goldb'];
}elseif($GG['gid'] == $v['GameIDd']){
$uzf += $v['Goldc'];
$info[$k]['fff'] = $v['Goldc'];
}elseif($GG['gid'] == $v['GameIDe']){
$uzf += $v['Goldd'];
$info[$k]['fff'] = $v['Goldd'];
}elseif($GG['gid'] == $v['GameIDf']){
$uzf += $v['Golde'];
$info[$k]['fff'] = $v['Golde'];
}
}
}
}
//print_r($info);
//exit;
$ppxq -> assign('uzf',$uzf);
$ppxq -> assign('rule',$rule);
$ppxq -> register_function('timename','timename');
$ppxq -> register_function('convertip','convertip');
$ppxq -> assign('Pagenum',pages());
$ppxq -> assign('data',$info);
$ppxq -> assign('Link',"pagelist=".$GG['pagelist']."&uid=".$GG['uid']."&kid=".$GG['kid']."&ok=".$GG['ok']);
$ppxq -> assign('Pages',$data['page']);
$ppxq -> assign('GG',$GG);
$ppxq -> assign('datee',time()-3600);
$ppxq -> display('user/gh-kf.tpl');
$db->close();
unset($GG,$ppxq,$db);
?>