";
$channel = $_SESSION['spid'];
$VerNum = $_POST["VerNum"];
$VerTitle = $_POST["VerTitle"];
$VerDetail = $_POST["VerDetail"];
$UpdDate = $_POST["UpdDate"];
$UpdHour = $_POST["UpdHour"];
$UpdMinute = $_POST["UpdMinute"];
$UpdSecond = $_POST["UpdSecond"];
$UpdTime = $UpdDate . " " . $UpdHour . ":" . $UpdMinute . ":" . $UpdSecond;
$find = array(
"Channel" => $channel,
"VerNum" => $VerNum
);
if ($opType == "del") {
if (!DBOper\Remove("Versionlog", $find)) {
$alertMsg = "删除版本失败!";
\Logging\LogError($alertMsg . print_r($find, true));
return false;
}
$alertMsg = "删除版本成功!";
\Logging\LogInfo($alertMsg . print_r($find, true));
return true;
}
$editArray = array(
"Channel" => $channel,
"UpdTime" => $UpdTime,
"VerNum" => $VerNum,
"VerTitle" => $VerTitle,
"VerDetail" => $VerDetail,
);
$opName = $opType == "add" ? "添加" : "修改";
if (!DBOper\Update("Versionlog", $find, $editArray, false, true)) {
$alertMsg = $opName . "版本失败!";
\Logging\LogError($alertMsg . " find=" . json_encode($find) . " set=" . json_encode($editArray));
return false;
}
$alertMsg = $opName . "版本成功!";
\Logging\LogInfo($alertMsg . " find=" . json_encode($find) . " set=" . json_encode($editArray));
return true;
}
$Permission = \User\Permission::P_VersionLog;
$channel = $_SESSION['spid'];
$user = new \User\User($_SESSION['UserAccount']);
if (!$user->HavePermission($Permission)) {
exit;
}
// echo "_POST:" . print_r($_POST, true) . "
";
if ($_POST["opType"]) {
if (VersionInfoEdit($_POST["opType"])) {
}
if ($alertMsg) {
echo "";
}
}
\DBOper\Find("Versionlog", array("Channel" => $channel), $versions, null, array("UpdTime" => -1), 100);
?>
版本更新日志