<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MailSubscribes.aspx.cs"
    Inherits="PowerEasy.SiteFactory.WebSite.MailSubscribes" Async="true" ValidateRequest="false" %>

<!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 runat="server">
    <title>
        <asp:Localize ID="Localize2" Text="<%$ Res: MailSubscribe_MailSubscribes_Page , 邮件订阅 %>"
            runat="server" /></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table style="width: 100%">
            <tr>
                <td style="height: 40px;" align="center">
                </td>
            </tr>
            <tr>
                <td align="center">
                    <asp:Localize ID="Localize1" Text="<%$ Res:MailSubscribe_MailSubscribes_Localize1 , 在此进行邮件订阅，您将收到最新的打折优惠信息或最新商品的信息！ %>"
                        runat="server" />
                    <br />
                    <br />
                    <fieldset style="margin: 10px 0; text-align: left;">
                        <legend>订阅项列表</legend>
                        <asp:CheckBoxList ID="cblSubscriptionItems" runat="server" DataTextField="Name" DataValueField="Id"
                            RepeatDirection="Horizontal" RepeatColumns="3" Width="100%">
                        </asp:CheckBoxList>
                        <asp:Label runat="server" ID="lblMsg" Visible="false">暂无邮件订阅项，现在你可能无法订阅，请联系管理员添加订阅项.</asp:Label>
                    </fieldset>
                    <asp:Panel runat="server" ID="pnlSubscribe">

                        <script language="javascript" type="text/javascript">
                            function bb() {
                                for (var i = 0; i < document.forms[0].length; i++) {
                                    var o = document.forms[0][i];
                                    if (o.type == "checkbox" && o.checked == true) {
                                        return true;
                                    }
                                }
                                alert("请选择订阅项！");
                                return false;
                            }
                        </script>

                        请输入您的邮件地址：
                        <asp:TextBox ID="txtMail" runat="server"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="RaEmail" ControlToValidate="txtMail" Display="Dynamic"
                            runat="server" ErrorMessage="<%$ Res: MailSubscribe_MailSubscribes_RaEmail , 请输入Email地址 %>"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegEmail" ControlToValidate="txtMail" Display="Dynamic"
                            runat="server" ErrorMessage="<%$ Res: MailSubscribe_MailSubscribes_RegEmail , 请输入正确的Email %>"
                            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                        <asp:Button ID="btnSubscribe" CssClass="input_button" runat="server" Text="<%$ Res: MailSubscribe_MailSubscribes_btnSubscribe , 订阅 %>"
                            OnClientClick="return bb();" OnClick="btnSubscribe_Click" />
                    </asp:Panel>
                </td>
            </tr>
            <tr>
                <td style="height: 60px;">
                    &nbsp;
                </td>
            </tr>
        </table>
    </div>
    </form>
</body>
</html>
