<?php
|
include_once "/Common/Logging.php";
|
include_once "/Account/User.php";
|
include_once "/db/DBOper.php";
|
include_once "/Common/CommFunc.php";
|
include_once "/language/lang.php";
|
|
$Permission = \User\Permission::P_VersionLog;
|
$channel = $_SESSION['spid'];
|
$user = new \User\User($_SESSION['UserAccount']);
|
if (!$user->HavePermission($Permission)) {
|
exit;
|
}
|
|
$VerNum = $_GET['VerNum'];
|
$opType = $VerNum ? "upd" : "add";
|
$editInfo = array();
|
if ($VerNum) {
|
DBOper\FindOne("Versionlog", array("Channel" => $channel, "VerNum" => $VerNum), $editInfo, null, false);
|
}
|
|
$versionContent = array_key_exists("VerDetail", $editInfo) ? $editInfo["VerDetail"] : "";
|
|
?>
|
|
<html>
|
|
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
<title>版本更新日志编辑</title>
|
<link rel="stylesheet" type="text/css" href="/css/tableform.css">
|
<link rel="stylesheet" href="/js/kindeditor/themes/default/default.css" />
|
<script charset="utf-8" src="/js/kindeditor/kindeditor-all-min.js"></script>
|
<script>
|
// kindeditor文档: http://kindeditor.net/doc.php
|
KindEditor.ready(function(K) {
|
window.editor1 = K.create('#VerDetail'); // id必须唯一
|
});
|
</script>
|
<script type='text/javascript' src='/js/calendar.js'></script>
|
</head>
|
|
<body>
|
<center>
|
<p><b>版本更新日志编辑</b></P>
|
</center>
|
<form action="versionlog.php" method="post">
|
<table id="tt" class="formTable">
|
<tr>
|
<td class="formTableTDName">版本号: </td>
|
<td class="formTableTDValue">
|
<input type="text" name="VerNum" id="VerNum" value="<?php echo array_key_exists("VerNum", $editInfo) ? $editInfo["VerNum"] : "" ?>" />
|
</td>
|
</tr>
|
<tr>
|
<td class="formTableTDName">更新时间: </td>
|
<td class="formTableTDValue">
|
<?php
|
$UpdTimeStr = array_key_exists("UpdTime", $editInfo) ? $editInfo["UpdTime"] : "";
|
\CommFunc\EchoDateTimeSelect("UpdDate", "UpdHour", "UpdMinute", "UpdSecond", $UpdTimeStr, null, null, array(0));
|
?>
|
</td>
|
</tr>
|
<tr>
|
<td class="formTableTDName">版本概述: </td>
|
<td class="formTableTDValue">
|
<input type="text" name="VerTitle" id="VerTitle" value="<?php echo array_key_exists("VerTitle", $editInfo) ? $editInfo["VerTitle"] : "" ?>" size="95" placeholder="版本简要概述" />
|
</td>
|
</tr>
|
<tr>
|
<td class="formTableTDName">详细内容: </td>
|
<td class="formTableTDValue">
|
<textarea name="VerDetail" id="VerDetail" style="width:700px;height:500px;visibility:hidden;"><?php echo htmlspecialchars($versionContent); ?></textarea>
|
</td>
|
</tr>
|
<tr>
|
<td class="formTableTDName"></td>
|
<td class="formTableTDValue">
|
<input type="submit" name="submit" align="center" value="提交" onclick="return CheckSubmit()" />
|
</td>
|
</tr>
|
<input type="hidden" name="opType" id="opType" value="<?php echo $opType ?>" />
|
</table>
|
<hr />
|
</form>
|
<script type="text/javascript">
|
function CheckSubmit() {
|
if (!document.getElementById("VerNum").value) {
|
alert("请输入版本号!");
|
document.getElementById('VerNum').focus();
|
return false;
|
}
|
if (!document.getElementById("VerTitle").value) {
|
alert("请输入版本概述!");
|
document.getElementById('VerTitle').focus();
|
return false;
|
}
|
if (!editor1.html()) {
|
alert("请输入详细内容!");
|
editor1.focus();
|
return false;
|
}
|
return true;
|
}
|
</script>
|
</body>
|
|
</html>
|