Common/CommFunc.php | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
SuperGMToolClient/AddEntireCompensation.php | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
SuperGMToolClient/AddPersonalCompensation.php | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
SuperGMToolClient/CompensationQueryPersonal.php | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
SuperGMToolClient/CompensationTempMgr.php | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
SuperGMToolClient/CompensationTempSend.php | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
SuperGMToolClient/CompensationTempSendMulti.php | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
SuperGMToolClient/GMTManage/GMT_CompensationQuery.php | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
SuperGMToolClient/GMTManage/GMT_CompensationQueryPersonal.php | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
SuperGMToolClient/MailTemp/sg_Entire.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
SuperGMToolClient/MailTemp/sg_Person.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
SuperGMToolClient/compensationTemp.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Common/CommFunc.php
@@ -548,6 +548,7 @@ $post = array(); $post['pack'] = $pack_data_dict; $post['sign'] = $sign; $post['toServerID'] = $mainServerID; $sendServers[$mainServerID] = array($mainServerID, $serverInfo['Page'], $post); } SuperGMToolClient/AddEntireCompensation.php
@@ -25,9 +25,8 @@ $selectTempIndex = intval($_GET["tempIndex"]); } $moneyNameInfo = CommFunc\getCfgKeyNameContent("money", true); $itemIDNameInfo = CommFunc\getCfgKeyNameContent("item", false); $mailtypes = CommFunc\GetMailTypes(); // $mailtypes = CommFunc\GetMailTypes(); ?> @@ -88,14 +87,16 @@ <td><input type="text" name="Sender" value="" size="20" /></td> </tr> <tr> <td><?php echo \Lang\gettext("结束时间"); ?>: </td> <td><?php echo \Lang\gettext("有效天数"); ?>:</td> <td><input type="number" name="LimitDays" id="LimitDays" value="7" min="1" /></td> <!-- <td><?php echo \Lang\gettext("结束时间"); ?>: </td> <td> <?php include_once "/Common/EndTimeSelect.php"; ?> </td> </td> --> </tr> <tr> <!-- <tr> <td><?php echo \Lang\gettext("职业多选"); ?>: </td> <td> <input type="checkbox" name="Job1" id="Job1" onclick="UpdatePlayerJob(3)" checked /><?php echo \Lang\gettext("枪豪"); ?> @@ -104,7 +105,7 @@ <input type="hidden" name="PlayerJob" id="PlayerJob" value="15" /> <input type="checkbox" name="JobAll" checked onclick="SelectAllJob(this.checked, 3)" /><?php echo \Lang\gettext("全选/全不选"); ?><br /> </td> </tr> </tr> --> <tr> <td><?php echo \Lang\gettext("最低等级"); ?>: </td> <td><input type="number" name="PlayerLV" id="PlayerLV" value="30" min="1" />(<?php echo \Lang\gettext("领取邮件所需最低等级"); ?>)</td> @@ -127,7 +128,7 @@ </select> </td> </tr> <tr> <!-- <tr> <td><?php echo \Lang\gettext("邮件类型"); ?>: </td> <td> <select name="MailType" id="MailType"> @@ -138,7 +139,7 @@ ?> </select> </td> </tr> </tr> --> <tr> <td><?php echo \Lang\gettext("邮件标题"); ?>: </td> <td><input type="text" name="Title" id="Title" size="68" /></td> @@ -147,25 +148,9 @@ <td><?php echo \Lang\gettext("邮件内容"); ?>: </td> <td> <textarea name="Text" id="Text" cols="70" rows="7"></textarea><br /> <input type="button" value="<?php echo \Lang\gettext("插入超链接"); ?>" onclick="inserthyperlink('Text');" /> <input type="button" value="<?php echo \Lang\gettext("插入界面"); ?>" onclick="insertgameform('Text');" /><br /> <!-- <input type="button" value="<?php echo \Lang\gettext("插入超链接"); ?>" onclick="inserthyperlink('Text');" /> <input type="button" value="<?php echo \Lang\gettext("插入界面"); ?>" onclick="insertgameform('Text');" /><br /> --> </td> </tr> <tr> <td><?php echo \Lang\gettext("流向记录"); ?>: </td> <td><input type="text" name="Detail" id="Detail" size="68" />(<?php echo \Lang\gettext("使用英文"); ?>)</td> </tr> <tr> <td style="text-align: right;"><?php echo $moneyNameInfo["1"]; ?>: </td> <td><input type="number" id="Gold" name="Gold" value="" min="0" max="2000000000" /></td> </tr> <tr> <td style="text-align: right;"><?php echo $moneyNameInfo["2"]; ?>: </td> <td><input type="number" id="GoldPaper" name="GoldPaper" value="" min="0" max="2000000000" /></td> </tr> <tr> <td style="text-align: right;"><?php echo $moneyNameInfo["3"]; ?>: </td> <td><input type="number" id="Silver" name="Silver" value="" min="0" max="2000000000" /></td> </tr> <tr> <td><?php echo \Lang\gettext("邮件物品"); ?>:</td> SuperGMToolClient/AddPersonalCompensation.php
@@ -20,10 +20,8 @@ if (array_key_exists('tempIndex', $_GET)) { $selectTempIndex = intval($_GET["tempIndex"]); } $moneyNameInfo = CommFunc\getCfgKeyNameContent("money", true); $itemIDNameInfo = CommFunc\getCfgKeyNameContent("item", false); $mailtypes = CommFunc\GetMailTypes(); // $mailtypes = CommFunc\GetMailTypes(); $accID = $_GET["accID"]; $mailTitle = $_GET["mailTitle"]; @@ -111,14 +109,16 @@ </td> </tr> <tr> <td><?php echo \Lang\gettext("结束时间"); ?>:</td> <td><?php echo \Lang\gettext("有效天数"); ?>:</td> <td><input type="number" name="LimitDays" id="LimitDays" value="7" min="1" /></td> <!-- <td><?php echo \Lang\gettext("结束时间"); ?>:</td> <td> <?php include_once "/Common/EndTimeSelect.php"; ?> </td> </td> --> </tr> <tr> <!-- <tr> <td><?php echo \Lang\gettext("邮件类型"); ?>: </td> <td> <select name="MailType" id="MailType"> @@ -129,7 +129,7 @@ ?> </select> </td> </tr> </tr> --> <tr> <td><?php echo \Lang\gettext("邮件标题"); ?>:</td> <td><input type="text" name="Title" id="Title" size="68" /></td> @@ -138,27 +138,9 @@ <td><?php echo \Lang\gettext("邮件内容"); ?>:</td> <td> <textarea name="Text" id="Text" cols="70" rows="7"></textarea><br /> <input type="button" value="<?php echo \Lang\gettext("插入超链接"); ?>" onclick="inserthyperlink('Text');" /> <input type="button" value="<?php echo \Lang\gettext("插入界面"); ?>" onclick="insertgameform('Text');" /> <!-- <input type="button" value="<?php echo \Lang\gettext("插入超链接"); ?>" onclick="inserthyperlink('Text');" /> <input type="button" value="<?php echo \Lang\gettext("插入界面"); ?>" onclick="insertgameform('Text');" /> --> </td> </tr> <tr> <td><?php echo \Lang\gettext("流向记录"); ?>:</td> <td> <input type="text" name="Detail" id="Detail" size="68" />(<?php echo \Lang\gettext("使用英文"); ?>) </td> </tr> <tr> <td style="text-align: right;"><?php echo $moneyNameInfo["1"]; ?>: </td> <td><input type="number" id="Gold" name="Gold" value="" min="0" max="2000000000" /></td> </tr> <tr> <td style="text-align: right;"><?php echo $moneyNameInfo["2"]; ?>: </td> <td><input type="number" id="GoldPaper" name="GoldPaper" value="" min="0" max="2000000000" /></td> </tr> <tr> <td style="text-align: right;"><?php echo $moneyNameInfo["3"]; ?>: </td> <td><input type="number" id="Silver" name="Silver" value="" min="0" max="2000000000" /></td> </tr> <tr> <td><?php echo \Lang\gettext("邮件物品"); ?>:</td> SuperGMToolClient/CompensationQueryPersonal.php
@@ -27,7 +27,7 @@ <body> <form id="CompensationQueryPersonal" name="CompensationQueryPersonal" action="/Common/GMCmdProcess.php" method="post"> <form action="GMTManage/GMT_CompensationQueryPersonal.php" method="post"> <dl> <center> <p><?php echo \Lang\gettext("个人邮件管理"); ?></P> @@ -40,8 +40,7 @@ <input type="radio" name="queryType" value="playerName" /> <span><?php echo \Lang\gettext("角色名"); ?></span> <br /> <input class="long_input" type="text" id="playerList" name="playerList" value="" size="50" /> <input type="hidden" class="long_input" type="text" name="playerFind" value="" size="50" /> <input class="long_input" type="text" name="playerFind" id="playerFind" value="" /> </div> </dd> SuperGMToolClient/CompensationTempMgr.php
@@ -21,20 +21,14 @@ // 公共数据 $tempData["Name"] = $_POST["MailTempName"]; if ($_POST["EndDate"] != "") { $d1 = strtotime(date("Y-m-d")); $d2 = strtotime($_POST["EndDate"]); $Days = round(($d2 - $d1) / 3600 / 24); $tempData["EndDays"] = max(1, $Days); // 至少1天,因为时间默认是0点,所以+1天即当天 if ($_POST["LimitDays"] != "") { $tempData["LimitDays"] = intval($_POST["LimitDays"]); } else { $tempData["EndDays"] = 2; // 默认2天有效期 $tempData["LimitDays"] = 7; // 默认7天有效期 } $tempData["Title"] = $_POST["Title"]; $tempData["Text"] = $_POST["Text"]; $tempData["Gold"] = intval($_POST["Gold"]); $tempData["GoldPaper"] = intval($_POST["GoldPaper"]); $tempData["Silver"] = intval($_POST["Silver"]); $items = array(); // 物品数据 $itemNums = explode(",", $_POST["itemNums"]); SuperGMToolClient/CompensationTempSend.php
@@ -13,7 +13,6 @@ $readTempContent = \CommFunc\GetFileContents("MailTemp/" . $spID . "_Person.json", "[]"); // $mailTempArray = json_decode($readTempContent, true); $moneyNameInfo = CommFunc\getCfgKeyNameContent("money", true); $itemIDNameInfo = CommFunc\getCfgKeyNameContent("item", false); ?> @@ -156,13 +155,9 @@ var innerHTML = ""; if (tempIndex >= 0) { var temp = tempInfo[tempIndex] innerHTML += "<p><?php echo \Lang\gettext("结束时间"); ?>: " + sumDateByDays(temp.EndDays) + " 00:00:00</p>"; innerHTML += "<p><?php echo \Lang\gettext("有效天数"); ?>: " + temp.LimitDays + "</p>"; innerHTML += "<p><?php echo \Lang\gettext("标题"); ?>: " + temp.Title + "</p>"; innerHTML += "<p><?php echo \Lang\gettext("内容"); ?>: " + temp.Text + "</p>"; innerHTML += "<p><?php echo $moneyNameInfo["1"]; ?>: <font color=\"red\"><b>" + temp.Gold + "</b></font>" + " <?php echo $moneyNameInfo["2"]; ?>: <font color=\"blue\"><b>" + temp.GoldPaper + "</b></font>" + " <?php echo $moneyNameInfo["3"]; ?>: <font><b>" + temp.Silver + "</b></font>" + "</p>"; // innerHTML += "物品: "; var itemIDNameInfo = <?php echo $itemIDNameInfo; ?>; for (let index = 0; index < temp.Items.length; index++) { SuperGMToolClient/CompensationTempSendMulti.php
@@ -49,12 +49,9 @@ $pack_data["queryType"] = $_POST["queryType" . $num]; $pack_data['playerFind'] = "0"; // 实际不用该参数,兼容旧版用 $pack_data['EndTime'] = date('Y-m-d', strtotime('+' . $tempInfo["EndDays"] . ' day')) . " 00:00:00"; $pack_data['LimitDays'] = $tempInfo["LimitDays"]; $pack_data["Title"] = $tempInfo["Title"]; $pack_data["Text"] = $tempInfo["Text"]; $pack_data["Gold"] = $tempInfo["Gold"]; $pack_data["GoldPaper"] = $tempInfo["GoldPaper"]; $pack_data["Silver"] = $tempInfo["Silver"]; # 物品信息 $pack_data["itemNums"] = implode(",", array_keys($tempInfo["Items"])); SuperGMToolClient/GMTManage/GMT_CompensationQuery.php
@@ -18,7 +18,6 @@ $mailNameArray = CommFunc\getCfgKeyNameContent("mail", true, $spid); $itemNameArray = CommFunc\getCfgKeyNameContent("item", true, $spid); $moneyTypeArray = CommFunc\getCfgKeyNameContent("money", true, $spid); $mailtypes = CommFunc\GetMailTypes(); //------------------------------------------ @@ -27,21 +26,15 @@ $tableArray = array( "Num" => \Lang\gettext("编号"), "CheckState" => \Lang\gettext("状态"), "MailType" => \Lang\gettext("类型"), // "MailType" => \Lang\gettext("类型"), "Title" => \Lang\gettext("标题"), "LimitLV" => \Lang\gettext("限制等级"), "LimitLVType" => \Lang\gettext("升级可领"), "Gold" => $moneyTypeArray["1"], "GoldPaper" => $moneyTypeArray["2"], "Silver" => $moneyTypeArray["3"], "PlayerJob" => \Lang\gettext("职业"), "ItemList" => \Lang\gettext("物品"), "Content" => \Lang\gettext("内容"), "GUID" => \Lang\gettext("GUID"), "CreateTime" => \Lang\gettext("发送时间"), "LimitTime" => \Lang\gettext("到期时间"), "Sender" => \Lang\gettext("发送人"), "OnlyServerID" => \Lang\gettext("是否单服邮件") "LimitDays" => \Lang\gettext("有效天数"), ); // 获取字段对应内容 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>"; SuperGMToolClient/MailTemp/sg_Entire.json
New file @@ -0,0 +1,28 @@ [ { "Name":"bb", "LimitDays":30, "Title":"aaaaaaaaaaa", "Text":"bbbbbbbbbbb", "Items":[ [ 20, 100, 0 ], [ 30, 1000, 0 ], [ 3502, 10, 0 ] ], "PlayerLV":50, "LimitLVType":0, "CheckState":0 } ] SuperGMToolClient/MailTemp/sg_Person.json
New file @@ -0,0 +1,25 @@ [ { "Name":"11", "LimitDays":30, "Title":"1111111", "Text":"2222222", "Items":[ [ 20, 10, 0 ], [ 10, 5, 0 ], [ 3501, 3, 0 ] ] } ] SuperGMToolClient/compensationTemp.js
@@ -17,12 +17,9 @@ tempItems = curTemp.Items.length; document.getElementById("MailTempName").value = curTemp.Name; document.getElementById("EndDate").value = sumDateByDays(curTemp.EndDays); document.getElementById("LimitDays").value = curTemp.LimitDays; document.getElementById("Title").value = curTemp.Title; document.getElementById("Text").value = curTemp.Text; document.getElementById("Gold").value = curTemp.Gold; document.getElementById("GoldPaper").value = curTemp.GoldPaper; document.getElementById("Silver").value = curTemp.Silver; if (document.getElementById("pack_type").value == "GMT_AddEntireCompensation") { document.getElementById("PlayerLV").value = curTemp.PlayerLV; @@ -31,12 +28,9 @@ } } else { document.getElementById("MailTempName").value = ""; document.getElementById("EndDate").value = sumDateByDays(7); document.getElementById("LimitDays").value = 7; document.getElementById("Title").value = ""; document.getElementById("Text").value = ""; document.getElementById("Gold").value = 0; document.getElementById("GoldPaper").value = 0; document.getElementById("Silver").value = 0; if (document.getElementById("pack_type").value == "GMT_AddEntireCompensation") { document.getElementById("PlayerLV").value = 30;