<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Email_GroupSend_Operate, V5Shop.Shop.Config" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc1" %>
<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="cc1" %>
<!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 id="Head1" runat="server">
    <title></title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/control.css" rel="stylesheet" type="text/css" />
    <link href="js/calendar-system.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" language="javascript" src="js/Common.js"></script>

    <script type="text/javascript" language="javascript" src="Js/Calendar.js"></script>

    <script type="text/javascript" language="javascript" src="Js/Calendar-zh.js"></script>

    <script type="text/javascript" language="javascript" src="Js/Calendar-Setup.js"></script>

    <script type="text/javascript" src="editor/fckeditor.js"></script>

</head>
<body>
    <form id="form1" runat="server">
        <div class="OperateTitle">
            <div>
                <asp:Label ID="lblAdd" runat="server" Text="【 邮件群发 】"></asp:Label>
                <a href="Email_EmailContent_Manage.aspx" title="返回邮件组列表">返回列表</a>
            </div>
        </div>
        <div>
            <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" id="OperateTable">
                <tr>
                    <td align="right" bgcolor="#FFFFFF" style="height: 30px; width: 20%;">
                        <asp:Label ID="lblSendObject" runat="server" Text="发送对象："></asp:Label>&nbsp;</td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 30px">
                        <asp:RadioButtonList ID="rblSendObject" runat="server" CssClass="radioaspx" AutoPostBack="True"
                            OnSelectedIndexChanged="rblSendObject_SelectedIndexChanged" RepeatDirection="Horizontal">
                        </asp:RadioButtonList><span class="NeedMsg"></span></td>
                </tr>
                <tr id="trUserList" runat="server">
                    <td align="right" bgcolor="#FFFFFF" style="height: 30px; width: 20%;">
                        <asp:Label ID="lblUserList" runat="server" Text="会员列表："></asp:Label>&nbsp;</td>
                    <td bgcolor="#FFFFFF" align="left" style="height: 30px">
                        <span class="NeedMsg"></span>
                        <asp:ListBox ID="lbUserList" runat="server" Height="200px" SelectionMode="Multiple"
                            Width="600px"></asp:ListBox>
                        <asp:Button ID="btnSelectAll" runat="server" CssClass="button" OnClick="btnSelectAll_Click"
                            Text="选择全部会员" /></td>
                </tr>
                <tr id="trEmailGroupList" visible="false" runat="server">
                    <td align="right" bgcolor="#ffffff" style="width: 20%; height: 30px">
                        <asp:Label ID="lblEmailGroup" runat="server" Text="邮件组会员："></asp:Label></td>
                    <td align="left" bgcolor="#ffffff" style="height: 30px">
                        <asp:ListBox ID="lbEmailGroupList" runat="server" Height="200px" SelectionMode="Multiple"
                            Width="600px"></asp:ListBox></td>
                </tr>
                <tr id="trOrderUser" visible="false" runat="server">
                    <td align="right" bgcolor="#ffffff" style="width: 20%; height: 30px">
                        <asp:Label ID="lblOrderUser" runat="server" Text="订阅会员："></asp:Label></td>
                    <td align="left" bgcolor="#ffffff" style="height: 30px">
                        <asp:ListBox ID="lbOrderUser" runat="server" Height="200px" SelectionMode="Multiple"
                            Width="600px"></asp:ListBox></td>
                </tr>
                <tr id="trUserGroup" visible="false" runat="server">
                    <td align="right" bgcolor="#ffffff" style="width: 20%; height: 30px">
                        <asp:Label ID="lblUserGroup" runat="server" Text="等级会员："></asp:Label></td>
                    <td align="left" bgcolor="#ffffff" style="height: 30px">
                        <asp:ListBox ID="lbUserGroup" runat="server" Height="200px" SelectionMode="Multiple"
                            Width="600px"></asp:ListBox></td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#ffffff" style="width: 20%; height: 30px">
                        <asp:Label ID="lblSelectContent" runat="server" Text="选择内容："></asp:Label></td>
                    <td align="left" bgcolor="#ffffff" style="height: 30px">
                        <asp:DropDownList ID="ddlSelectContent" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlSelectContent_SelectedIndexChanged" Width="150px">
                        </asp:DropDownList></td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#ffffff" style="width: 20%; height: 30px">
                        <asp:Label ID="lblContent" runat="server" Text="邮件内容："></asp:Label></td>
                    <td align="left" bgcolor="#ffffff" style="height: 30px">
                        <cc1:FCKeditor ID="FCKContent" runat="server" width="600px"></cc1:FCKeditor></td>
                </tr>
                <tr>
                    <td align="right" bgcolor="#ffffff" style="width: 20%; height: 30px">
                        <cc1:HelpCtrl ID="HelpCtrl1" runat="server" FontColor="red" Header="定时发送" ImageURL="images/help.gif"
                            Text="如果选中此项，系统将在指定的时间发送邮件，否则，将即时发送。" />
                        <asp:Label ID="lblTimeSend" runat="server" Text="是否定时发送："></asp:Label></td>
                    <td align="left" bgcolor="#ffffff" style="height: 30px">
                        <asp:CheckBox ID="cbIsTimeSend" runat="server" AutoPostBack="True" CssClass="checkboxaspx"
                            OnCheckedChanged="cbIsTimeSend_CheckedChanged" Text="是" />
                    </td>
                </tr>
                <tr id="trSendTime" runat="server" visible="false">
                    <td align="right" bgcolor="#ffffff" style="width: 20%; height: 30px">
                        <asp:Label ID="Label2" runat="server" Text="发送时间："></asp:Label>
                    </td>
                    <td align="left" bgcolor="#ffffff" style="height: 30px">
                        <asp:TextBox ID="txtSendTime" runat="server" Width="200px"></asp:TextBox>
                        <img id="sltS" src="images/calendar1.gif" title="打开日历" alt="打开日历" align="absmiddle" />
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtSendTime"
                            ErrorMessage="不能为空"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="时间格式不正确"
                            ValidationExpression="^\d{4}-\d{2}-\d{2}$" ControlToValidate="txtSendTime"></asp:RegularExpressionValidator></td>

                </tr>
                <tr>
                    <td height="30" align="right" bgcolor="#FFFFFF" style="width: 20%">
                    </td>
                    <td bgcolor="#FFFFFF" align="left">
                        <asp:Button ID="btnSend" runat="server" CssClass="button" OnClick="btnSend_Click"
                            Text="发送" />
                        <input id="Button1" runat="server" type="button" value="返回列表" onclick="window.location.href='Email_EmailGroup_Manage.aspx'"
                            class="button" /></td>
                </tr>
            </table>

            <script type="text/javascript">
            //加TABLE样式
            InitTrClass();
            function showsetup()
            {
                Calendar.setup({
	            inputField     :    "txtSendTime",
	            ifFormat       :    "%Y-%m-%d", 
	            button         :    "sltS",
	            align          :    "Br",
	            singleClick    :    true
                });
            }
            if(document.getElementById("cbIsTimeSend").checked)
            {
                showsetup();
            }
            </script>

        </div>
        <uc1:PageBottom ID="PageBottom1" runat="server" />
    </form>
</body>
</html>
