ftpServer.html 8.05 KB
<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="../../css/frame.css" rel="stylesheet" />
    <link href="../../scripts/easyui/themes/default/easyui.css" rel="stylesheet" />
    <style type="text/css">
        #form_ftp {
            padding: 8px;
        }
        .tdTitle {
            width: 110px;
        }
        .settingBtn {
            
        }
    </style>
</head>
<body>
    <form id="form_ftp">
        <table class="settingsContainer">
            <tr>
                <td class="tdTitle">FTP服务器Ip地址</td>
                <td class="tdContent">
                    <input id="940" name="940" class="settingParameter" type="text" />
                </td>
                <td class="tdTitle">端口</td>
                <td class="tdContent">
                    <input id="941" name="941" class="settingParameter" type="text" />
                </td>
                <td class="tdTitle">
                    <a href="#" id="btnTestFtp" class="settingBtn" style="margin-left: 10px;">测试连接</a>
                </td>
            </tr>
            <tr>
                <td class="tdTitle">帐号</td>
                <td class="tdContent">
                    <input id="942" name="942" class="settingParameter" type="text" />
                </td>
                <td class="tdTitle">密码</td>
                <td class="tdContent">
                    <input id="943" name="943" class="settingParameter" type="text" />
                </td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td class="tdTitle">一级目录</td>
                <td class="tdContent">
                    <select name="944" id="944" class="settingParameter">
                        <option value="0">设备名称</option>
                        <option value="1">设备编号</option>
                        <option value="2">地点名称</option>
                        <option value="3">地点编号</option>
                        <option value="4">时间</option>
                        <option value="5">日期</option>
                        <option value="6">日期+时间</option>
                        <option value="7">IP地址</option>
                        <option value="8">方向</option>
                        <option value="9">车道</option>
                        <option value="10"></option>
                    </select>
                </td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td class="tdTitle">二级目录</td>
                <td class="tdContent">
                    <select name="945" id="945" class="settingParameter">
                        <option value="0">设备名称</option>
                        <option value="1">设备编号</option>
                        <option value="2">地点名称</option>
                        <option value="3">地点编号</option>
                        <option value="4">时间</option>
                        <option value="5">日期</option>
                        <option value="6">日期+时间</option>
                        <option value="7">IP地址</option>
                        <option value="8">方向</option>
                        <option value="9">车道</option>
                        <option value="10"></option>
                    </select>
                </td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td class="tdTitle">三级目录</td>
                <td class="tdContent">
                    <select id="946" name="946" class="settingParameter">
                        <option value="0">设备名称</option>
                        <option value="1">设备编号</option>
                        <option value="2">地点名称</option>
                        <option value="3">地点编号</option>
                        <option value="4">时间</option>
                        <option value="5">日期</option>
                        <option value="6">日期+时间</option>
                        <option value="7">IP地址</option>
                        <option value="8">方向</option>
                        <option value="9">车道</option>
                        <option value="10"></option>
                    </select>
                </td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td class="tdTitle">四级目录</td>
                <td class="tdContent">
                    <select id="947" name="947" class="settingParameter">
                        <option value="0">设备名称</option>
                        <option value="1">设备编号</option>
                        <option value="2">地点名称</option>
                        <option value="3">地点编号</option>
                        <option value="4">时间</option>
                        <option value="5">日期</option>
                        <option value="6">日期+时间</option>
                        <option value="7">IP地址</option>
                        <option value="8">方向</option>
                        <option value="9">车道</option>
                        <option value="10"></option>
                    </select>
                </td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td class="tdTitle">文件名称选择项</td>
                <td class="tdContent">
                    <select id="948" name="948" class="settingParameter">
                        <option value="0">设备名称</option>
                        <option value="1">设备编号</option>
                        <option value="2">地点名称</option>
                        <option value="3">地点编号</option>
                        <option value="4">时间</option>
                        <option value="5">日期</option>
                        <option value="6">日期+时间</option>
                        <option value="7">IP地址</option>
                        <option value="8">方向</option>
                        <option value="9">车道</option>
                        <option value="10"></option>
                    </select>
                </td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td class="tdTitle">文件名称</td>
                <td class="tdContent">
                    <input id="949" name="949" class="settingParameter" type="text" />
                </td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
            <tr>
                <td colspan="5">
                    <a href="#" class="settingBtn" id="btnSave">保存</a>
                </td>
            </tr>
        </table>
    </form>    
    <script src="../../scripts/easyui/jquery.min.js"></script>
    <script src="../../scripts/easyui/jquery.easyui.min.js"></script>
    <script src="../../scripts/utilities.js"></script>
    <script type="text/javascript">
        var parameterAdaptor = new ParameterAdaptor();

        $().ready(function() {
            //加载信息
            loadFtpInfo();
            //保存信息
            $("#btnSave").click(saveParametersToServer);
        });

        //加载信息
        function loadFtpInfo() {
            var keys = new Array();
            for (var i = 940; i <= 949; i++) {
                keys.push(i);
            }
            parameterAdaptor.getParameters(keys, function(data) {
                $("#form_ftp").form("load", data);
            });
        }

        //保存参数
        function saveParametersToServer() {
            var formObj = $("#form_ftp");

            parameterAdaptor.saveParameters(formObj);
        }
    </script>
</body>
</html>