hxp
2025-06-04 f4a514d5ac952110da846636ecbb9de951eaf3d2
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"]);