<%@ Page Title="" Language="C#" MasterPageFile="~/Dialog/DialogMaster.Master" AutoEventWireup="true"
    CodeBehind="EmailSeverAdd.aspx.cs" Inherits="OAWeb.SMSEmail.EmailSeverAdd" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <style type="text/css">
        .table_form .right
        {
            width: 120px;
        }
    </style>
    <div class="form" style="width: 600px; padding: 10px;">
        <table cellpadding="0" cellspacing="0" border="0" class="table_form">
            <tr>
                <td class="right">
                    &nbsp;
                </td>
                <td>
                    <asp:CheckBox ID="chkBatch" runat="server" Text="批量导入" />
                    <span class="tip01">
                        <asp:Literal ID="litBatchTip" runat="server" Text="只能导入txt文件，且内容格式:邮箱+分隔符+密码"></asp:Literal></span>
                </td>
            </tr>
            <tr class="batch hide">
                <td class="right">
                    选择导入文件：
                </td>
                <td>
                    <input name="file_uploader" type="file" />
                    分隔符：<asp:TextBox ID="txtSgin" runat="server" CssClass="text width80"></asp:TextBox>
                </td>
            </tr>
            <tr class="batch_no">
                <td class="right">
                    发件人邮箱：
                </td>
                <td>
                    <asp:TextBox ID="txtFromAddress" runat="server" CssClass="text width200"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="right">
                    SMTP服务器地址：
                </td>
                <td>
                    <asp:TextBox ID="txtSmtpHost" runat="server" CssClass="text width200"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="right">
                    SMTP服务器端口：
                </td>
                <td>
                    <asp:TextBox ID="txtSmtpPort" runat="server" CssClass="text width200" Text="25"></asp:TextBox>
                </td>
            </tr>
            <tr class="batch_no">
                <td class="right">
                    SMTP用户名：
                </td>
                <td>
                    <asp:TextBox ID="txtUserName" runat="server" CssClass="text width200"></asp:TextBox>
                </td>
            </tr>
            <tr class="batch_no">
                <td class="right">
                    SMTP密码：
                </td>
                <td>
                    <asp:TextBox ID="txtPassword" runat="server" CssClass="text width200"></asp:TextBox>
                </td>
            </tr>
            <tr class="batch_no">
                <td class="right">
                    最大发送数：</td>
                <td>
                    <asp:TextBox ID="txtSendNum" runat="server" CssClass="text width50" Text="5"></asp:TextBox> <span class="tip01">一个邮件服务器一次发送条数</span> </td>
            </tr>
            <tr>
                <td class="right">
                    其他设置：
                </td>
                <td>
                    <asp:CheckBox ID="chkEnableSsl" runat="server" Text="是否启用SSL"  /> 
                    <asp:CheckBox ID="chkEnabled" runat="server" Text="启用" Checked="True" /> &nbsp;
                &nbsp;</td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: center">
                    <input id="btnUpload" type="button" value=" 导 入 " class="btn_77px batch hide" />
                    <input id="btnSave" type="button" value=" 保 存 " class="btn_77px batch_no" />
                    <input id="btnClose" type="button" value=" 返 回 " onclick="art.dialog.close();return false;"
                        class="btn_77px" />
                </td>
            </tr>
        </table>
    </div>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#<%=chkBatch.ClientID %>").change(function () {
                if ($(this).attr("checked") == "checked") {
                    $(".batch").show();
                    $(".batch_no").hide();
                } else {
                    $(".batch").hide();
                    $(".batch_no").show();
                }
            })
            $("#btnUpload").click(function () {
                CreateZhezao($(".form"), "zhezhao");
                return FormPostAjax("/SMSEmail/EmailSeverAdd.aspx?op=BatchSave&class=<%=SetClass %>", "ok", CloseReload, function () { $("#zhezhao").remove(); });
            });
            $("#btnSave").click(function () { return FormPostAjax("/SMSEmail/EmailSeverAdd.aspx?op=Save&Id=<%=Id %>&class=<%=SetClass %>", "ok", CloseReload); });
        });

    </script>
</asp:Content>
