<%@ Page Language="C#" AutoEventWireup="false" %>
<%@ Register TagPrefix="Hishop" Namespace="Hishop.Web.Controls" Assembly="Hishop.Web.Controls" %>
<%@ Register TagPrefix="Hishop" Namespace="Hishop.Web.Management" Assembly="Hishop.Web.Management" %>
<%@ Register TagPrefix="Hishop" Namespace="Hishop.Web.Validator" Assembly="Hishop.Web.Validator" %>
<%@ Import Namespace="Hishop.SystemServices" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <Hishop:HeadContainer ID="HeadContainer1" runat="server" />
    <Hishop:PageTitle ID="PageTitle1" runat="server" />
    <link rel="stylesheet" href="../../utility/validate/pagevalidator.css" type="text/css" />
    <link rel="stylesheet" href="../css/Hishopv5.css" type="text/css" />
    <script type="text/javascript" src="../../utility/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="../../utility/validate/pagevalidator.js"></script>
    
    <script type="text/javascript" src="../js/Hishopv5.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <div class="PageTitleArea">
                <div class="PageTitle">
                    <asp:Literal ID="litManagerTop" runat="server" Text="<%$ Resources:EmailSettings, IDS_PageTitle %>" ></asp:Literal>
                </div>
                <div style="width: 80%;">
                    <asp:Literal ID="litManagerDisciption" runat="server" Text="<%$ Resources:EmailSettings, IDS_PageDesc %>" ></asp:Literal>
                </div>
            </div>
            
             <Hishop:EmailSettings ID="EmailSettings" runat="server">
             <SkinTemplate>
<div id="updateMsg"><Hishop:StatusMessage id="Status" runat="server" Visible="False" /></div>

<table border="0" cellpadding="0" cellspacing="0" width="100%" class="formTableList">
<!--邮件发送服务器-->
    <tr>
        <td class="leftTD" style="width:130px;"><asp:Label ID="Label4" runat="server"  Text="<%$ Resources:EmailSettings, IDM_lblSmtpServer %>"></asp:Label></td>
        <td class="rightTD"><asp:TextBox ID="txtSmtpServer"  runat="server"></asp:TextBox></td>
        <td class="rightTD">
            <div id="txtSmtpServerTip" runat="server"></div>
            <Hishop:ValidateTarget ID="ValidateSmtpServer"  ContainerId="ValidatorContainer" runat="server" ControlToValidate="txtSmtpServer" 
                 Description="<%$ Resources:EmailSettings, IDM_help04 %>" Nullable="False">
               <Validators>
                 <Hishop:InputStringClientValidator ErrorMessage="<%$ Resources:EmailSettings, IDM_help04%>"/>
               </Validators>
            </Hishop:ValidateTarget> 
        </td>
    </tr>
    <!--安全连接(SSL)-->
    <tr>
        <td class="leftTD" style="width:130px;"><asp:Label ID="Label2" runat="server"  Text="<%$ Resources:EmailSettings, IDM_lblSmtpEnableSsl %>"></asp:Label></td>
        <td class="rightTD"><Hishop:YesNoRadioButtonList ID="ynrblSmtpEnableSsl" runat="server" /> </td>
        <td class="rightTD">
            <div class="msgNormal">
                <asp:Literal ID="lblSmtpEnableSsl" runat="server" Text="<%$Resources:EmailSettings,IDS_help01 %>" />
            </div>
        </td>
    </tr>
<!--邮件服务器端口-->
    <tr>
        <td class="leftTD" style="width:130px;"><asp:Label ID="Label9" runat="server" Text="<%$ Resources:EmailSettings,IDM_lblSmtpPortNumber %>"></asp:Label></td>
        <td class="rightTD"><asp:TextBox ID="txtSmtpPortNumber" runat="server"></asp:TextBox></td>
        <td class="rightTD">
            <div id="txtSmtpPortNumberTip" runat="server"></div>
            <Hishop:ValidateTarget ID="ValidatetxtSmtpPortNumber"  ContainerId="ValidatorContainer" runat="server" ControlToValidate="txtSmtpPortNumber"
                  Description="<%$ Resources:EmailSettings, IDM_help09%>" Nullable="False">
               <Validators>
                  <Hishop:InputNumberClientValidator ErrorMessage="<%$ Resources:EmailSettings, IDM_help09%>" />
               </Validators>
            </Hishop:ValidateTarget> 
        </td>
    </tr>
<!--邮件服务器登录名-->
    <tr>
        <td class="leftTD" style="width:130px;"><asp:Label ID="Label7" runat="server" Text="<%$Resources:EmailSettings,IDM_lblSmtpServerUserName %>"></asp:Label></td>
        <td class="rightTD"><asp:TextBox ID="txtSmtpServerUserName" runat="server"></asp:TextBox> </td>
        <td class="rightTD">
            <div id="txtSmtpServerUserNameTip" runat="server"></div>
            <Hishop:ValidateTarget ID="ValidateSmtpServerUserName" ContainerId="ValidatorContainer" runat="server" ControlToValidate="txtSmtpServerUserName" 
                 Description="<%$ Resources:EmailSettings, IDM_help07 %>" Nullable="False">
               <Validators>
                 <Hishop:InputStringClientValidator ErrorMessage="<%$ Resources:EmailSettings, IDM_help07%>"/>
               </Validators>
            </Hishop:ValidateTarget> 
        </td>
    </tr>
<!--邮件服务器登录密码-->
    <tr>
        <td class="leftTD" style="width:130px;"><asp:Label ID="Label8" runat="server" Text="<%$ Resources:EmailSettings,IDM_lblSmtpServerPassword %>"></asp:Label></td>
        <td class="rightTD"><asp:TextBox ID="txtSmtpServerPassword" runat="server" TextMode="Password"></asp:TextBox></td>
        <td class="rightTD">
            <div id="txtSmtpServerPasswordTip" runat="server"></div>
            <Hishop:ValidateTarget ID="ValidatetxtSmtpServerPassword"  ContainerId="ValidatorContainer" runat="server" ControlToValidate="txtSmtpServerPassword" 
                 Description="<%$ Resources:EmailSettings, IDM_help08 %>" Nullable="False">
               <Validators>
                 <Hishop:InputStringClientValidator ErrorMessage="<%$ Resources:EmailSettings, IDM_help08%>"/>
               </Validators>
            </Hishop:ValidateTarget> 
        </td>
    </tr>
<!--邮件服务器重复录密码-->
    <tr>
        <td class="leftTD" style="width:130px;"><asp:Label ID="Label1" runat="server" Text="<%$ Resources:EmailSettings,IDM_lblSmtpServerPassword2 %>"></asp:Label></td>
        <td class="rightTD"><asp:TextBox ID="txtSmtpServerPassword2" runat="server" TextMode="Password"></asp:TextBox></td>
        <td class="rightTD">
            <div id="txtSmtpServerPassword2Tip" runat="server"></div>
            <Hishop:ValidateTarget ID="ValidateSmtpServerPassword2"  ContainerId="ValidatorContainer" runat="server" ControlToValidate="txtSmtpServerPassword2" 
                 Description="<%$ Resources:EmailSettings, IDM_help082 %>" Nullable="False">
               <Validators>
                 <Hishop:InputStringClientValidator ErrorMessage="<%$ Resources:EmailSettings, IDM_help082%>" />
                 <Hishop:CompareClientValidator DestinationId="txtSmtpServerPassword" ErrorMessage="<%$ Resources:EmailSettings, IDS_Invalid_SmtpServerPassword_NotComp%>" />
               </Validators>
            </Hishop:ValidateTarget> 
        </td>
    </tr>
    <!--Email回复地址-->
    <tr>
        <td class="leftTD" style="width:130px;"><asp:Label ID="Label11" runat="server" Text="<%$ Resources:EmailSettings,IDM_lblAdminEmailAddress %>"></asp:Label></td>
        <td class="rightTD"><asp:TextBox ID="txtAdminEmailAddress" runat="server" ></asp:TextBox></td>
        <td class="rightTD">
            <div id="txtAdminEmailAddressTip" runat="server"></div>
            <Hishop:ValidateTarget ID="validateAdminEmailAddress"  ContainerId="ValidatorContainer" runat="server" ControlToValidate="txtAdminEmailAddress" 
                Description="<%$ Resources:EmailSettings, IDM_help10%>" Nullable="false" >               
              <Validators>
                <Hishop:InputStringClientValidator ErrorMessage="<%$ Resources:EmailSettings, IDS_EmailAddress_Error%>" 
                    LowerBound="1" UpperBound="200" Regex="([a-zA-Z\\.0-9_-])+@([a-zA-Z0-9_-])+((\\.[a-zA-Z0-9_-]{2,3}){1,2})"/>
              </Validators>
            </Hishop:ValidateTarget> 
        </td>
    </tr>
<!--一次发送邮件的限制-->
    <tr>
        <td class="leftTD" style="width:130px;"><asp:Label ID="Label3" runat="server" Text="<%$ Resources:EmailSettings, IDM_lblEmailThrottle %>"></asp:Label></td>
        <td class="rightTD"><asp:TextBox ID="txtEmailThrottle" runat="server"></asp:TextBox> </td>
        <td class="rightTD">
            <div id="txtEmailThrottleTip" runat="server"></div>
            <Hishop:ValidateTarget ID="ValidateEmailThrottle"  ContainerId="ValidatorContainer" runat="server" ControlToValidate="txtEmailThrottle"
                  Description="<%$ Resources:EmailSettings, IDM_help03%>" Nullable="False">
               <Validators>
                  <Hishop:InputNumberClientValidator ErrorMessage="<%$ Resources:EmailSettings, IDM_help03%>" />
                  <Hishop:NumberRangeClientValidator MaxValue="10000" MinValue="0" ErrorMessage="<%$ Resources:EmailSettings, IDS_EmailThrottle_Error%>" />
               </Validators>
            </Hishop:ValidateTarget> 
        </td>
    </tr>
<!--按钮-->
    <tr>
        <td class="bottonLeftTD" style="width:130px;">&nbsp;</td>
        <td class="rightTD">
            <asp:Button ID="btnChangeEmailSettings" OnClientClick="return PageIsValid();" runat="server" Text="<%$ Resources:EmailSettings, IDM_btnChangeEmailSettings %>"  CssClass="inp_L1"></asp:Button >
            <asp:Button ID="btnTestEmailSettings" OnClientClick="return PageIsValid();" runat="server" Text="<%$ Resources:EmailSettings, IDM_btnTestEmailSettings %>"  CssClass="inp_L1" style="margin-left:10px"></asp:Button >
        </td>
        <td class="rightTD">&nbsp;</td>
    </tr> 
</table>     
             </SkinTemplate>
             </Hishop:EmailSettings>
            
        </div>
        <br />
        <div style="text-align:center">
            <hr style="width:500px;" />
            <Hishop:SiteCopyright runat="server" />
        </div>
        <br />
        <Hishop:ValidatorContainer runat="server" ID="ValidatorContainer" />
    </form>
</body>
</html>