From f4a514d5ac952110da846636ecbb9de951eaf3d2 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期三, 04 六月 2025 14:57:57 +0800
Subject: [PATCH] 16 卡牌服务端(GMT命令个人邮件、全服邮件相关;)
---
SuperGMToolClient/GMTManage/GMT_CompensationQueryPersonal.php | 80 +++++++++++++++++++++------------------
1 files changed, 43 insertions(+), 37 deletions(-)
diff --git a/SuperGMToolClient/GMTManage/GMT_CompensationQueryPersonal.php b/SuperGMToolClient/GMTManage/GMT_CompensationQueryPersonal.php
index e4a4a71..890966e 100644
--- a/SuperGMToolClient/GMTManage/GMT_CompensationQueryPersonal.php
+++ b/SuperGMToolClient/GMTManage/GMT_CompensationQueryPersonal.php
@@ -3,24 +3,45 @@
include_once "/Common/Logging.php";
include_once "/Account/User.php";
include_once "/language/lang.php";
+include_once "/Common/GMTRetCode.php";
\Logging\CreateLogging("GMT_CompensationQueryPersonal.php");
\CommFunc\SessionStart();
$Permission = \User\Permission::P_PersonalMailMgr;
$spid = $_SESSION['spid'];
+$toServerID = $_SESSION['serverID'];
$user = new \User\User($_SESSION['UserAccount']);
if (!$user->HavePermission($Permission)) {
exit;
}
\Logging\LogInfo("_POST:" . print_r($_POST, true));
+$queryType = $_POST["queryType"];
+$playerFind = $_POST["playerFind"];
+$opType = array_key_exists("opType", $_POST) ? $_POST["opType"] : "";
+$GUIDInfo = array_key_exists("GUIDInfo", $_POST) ? $_POST["GUIDInfo"] : "";
-$serversArray = $user->GetServers();
+$packData = array(
+ "queryType" => $queryType,
+ "playerFind" => $playerFind,
+ "opType" => $opType,
+ "GUIDInfo" => $GUIDInfo,
+);
+$retList = \CommFunc\SendGMTToGameServers(True, "GMT_CompensationQueryPersonal", $packData, $spid, array($toServerID));
+if (!is_array($retList)) {
+ echo "杩斿洖閿欒锛屾病鏈夎繑鍥炰俊鎭�";
+ exit;
+}
+$ret = json_decode($retList[$toServerID], true);
+$errStr = ParseResult($ret, $resultMsg);
+if ($errStr != "") {
+ echo $errStr;
+ exit;
+}
$mailNameArray = CommFunc\getCfgKeyNameContent("mail", true, $spid);
$itemNameArray = CommFunc\getCfgKeyNameContent("item", true, $spid);
-$moneyTypeArray = CommFunc\getCfgKeyNameContent("money", true, $spid);
$mailtypes = CommFunc\GetMailTypes();
//------------------------------------------
@@ -28,18 +49,14 @@
//鏄剧ず琛ㄦ牸瀛楁閰嶇疆 key-鍙傛暟鍚嶏紝value-璇存槑
$tableArray = array(
"Num" => \Lang\gettext("缂栧彿"),
- "RecState" => \Lang\gettext("鐘舵��"),
- "MailType" => \Lang\gettext("绫诲瀷"),
+ "State" => \Lang\gettext("鐘舵��"),
+ // "MailType" => \Lang\gettext("绫诲瀷"),
"Title" => \Lang\gettext("鏍囬"),
- "Gold" => $moneyTypeArray["1"],
- "GoldPaper" => $moneyTypeArray["2"],
- "Silver" => $moneyTypeArray["3"],
"ItemList" => \Lang\gettext("鐗╁搧"),
"CreateTime" => \Lang\gettext("鍙戦�佹椂闂�"),
- "LimitTime" => \Lang\gettext("鍒版湡鏃堕棿"),
+ "LimitDays" => \Lang\gettext("鏈夋晥澶╂暟"),
"Content" => \Lang\gettext("鍐呭"),
"GUID" => \Lang\gettext("GUID"),
- // "Sender" => \Lang\gettext("鍙戦�佷汉"),
);
// 鑾峰彇瀛楁瀵瑰簲鍐呭
@@ -47,18 +64,16 @@
{
global $mailtypes;
$c = $mailDict[$keyName];
- if ($keyName == "RecState") {
- $recState = intval($c);
- $getState = $recState % 10; // 0 鏈�氱煡锛�1 涓嶅彲棰嗗彇锛� 2 鍙鍙栵紝 3 宸查鍙�
- $readState = $recState / 10; // 0 鏈锛�1 宸茶
- if ($getState === 3) {
- return \Lang\gettext("宸查鍙�");
- } else if ($readState === 1) {
- return \Lang\gettext("宸茶");
- } else if ($readState === 0) {
+ if ($keyName == "State") {
+ $mailState = intval($c);
+ if ($mailState === 1) {
return "<font color='red'>" . \Lang\gettext("鏈") . "</font>";
+ } else if ($mailState === 2) {
+ return \Lang\gettext("宸茶");
+ } else if ($mailState === 3) {
+ return \Lang\gettext("宸查鍙�");
}
- return "<font color='red'>" . $recState . "</font>";
+ return "<font color='red'>" . $mailState . "</font>";
} elseif ($keyName == "Title") {
if (array_key_exists($c, $mailNameArray)) {
return $mailNameArray[$c];
@@ -89,21 +104,13 @@
return $mailDict[$keyName];
}
-$resultInfo = $_POST;
-
-$resultMsg = $resultInfo["ResultMsg"];
-
-$queryCmdInfo = $resultMsg["QueryCmdInfo"];
-$resultList = array();
-if (array_key_exists("ResultList", $resultMsg)) {
- $resultList = $resultMsg["ResultList"];
+$mailList = array();
+if (array_key_exists("mailList", $resultMsg)) {
+ $mailList = $resultMsg["mailList"];
}
-$retCount = count($resultList);
+$retCount = count($mailList);
-if (
- array_key_exists("opType", $queryCmdInfo) && $queryCmdInfo["opType"] == "del" &&
- array_key_exists("ResultType", $resultInfo) && $resultInfo["ResultType"] === 0
-) {
+if ($opType == "del") {
echo "<font color='red'>" . \Lang\gettext("鍒犻櫎鎴愬姛锛佸彲缁х画鎿嶄綔锛�") . "</font>";
}
?>
@@ -117,10 +124,9 @@
</head>
<body>
- <form id="CompensationQueryPersonal" name="CompensationQueryPersonal" action="/Common/GMCmdProcess.php" method="post">
- <input type="hidden" readonly="readonly" name="queryType" value="<?php if (array_key_exists("queryType", $queryCmdInfo)) echo $queryCmdInfo["queryType"]; ?>" />
- <?php echo \Lang\gettext("鐩爣鐜╁"); ?>: <input readonly="readonly" name="playerList" value="<?php if (array_key_exists("playerList", $queryCmdInfo)) echo $queryCmdInfo["playerList"]; ?>" />
- <input type="hidden" name="playerFind" value="" />
+ <form method="post">
+ <input type="hidden" readonly="readonly" name="queryType" value="<?php echo $queryType; ?>" />
+ <?php echo \Lang\gettext("鐩爣鐜╁"); ?>: <input readonly="readonly" name="playerFind" value="<?php echo $playerFind; ?>" />
<br />
<hr />
<?php echo \Lang\gettext("杩斿洖鏉℃暟"); ?>: <?php echo $retCount; ?><br /><br />
@@ -133,7 +139,7 @@
echo "</tr>";
for ($i = 0; $i < $retCount; $i++) {
- $mailDict = $resultList[$i];
+ $mailDict = $mailList[$i];
$num = $i + 1;
echo "<tr>";
echo "<td align='center'><input name='checkbox" . $i . "' id='checkbox" . $i . "' type='checkbox' />" . $num . " </td>";
--
Gitblit v1.8.0