hxp
2025-06-09 6c3f6335c70859ded94a1ad8d218acb0ac34239c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<?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>