<%@ Page Language="C#" AutoEventWireup="true" ValidateRequest="false" MasterPageFile="../Global.Master" CodeBehind="SendMsg.aspx.cs" Inherits="Web.AdminManager.Setting.SendMsg" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="/Common/js/Common_RegexString.js"></script>
    <script src="/Common/js/Common_Class.js" type="text/javascript"></script>
    <%=Web.Lib.CityHelper.GetCTScript("CT")%>
    <script src="/Common/UEditor/editor_config.js" type="text/javascript"></script>
    <script src="/Common/UEditor/editor_all_min.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="/Common/UEditor/themes/default/ueditor.css" />
    <script type="text/javascript">
        $(function () {
            $(".UI_SendMsgTarget").change(function () {
                if ($(this).val() == "4") {
                    $(".UI_ReciveUserName").css("display", "");
                } else {
                    $(".UI_ReciveUserName").css("display", "none");
                }
            });
        });
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="UI_Start" runat="server" visible="false">
        共<%=AllUserNum %>条消息，剩余<%=NowUserIndex %>条未发送
        <script type="text/javascript">
            $(function () {
                function reload()
                {
                    location.reload();
                }
                
                setTimeout(reload, 1000);

            });
        </script>
    </div>
    <div id="UI_SendMsg" runat="server" visible="false">
        <form action="" method="post" class="ui-form ui-form-vertical">
            <fieldset>
                <legend>消息发送</legend>
                <div class="ui-form-group">
                    <label class="ui-form-label">群发对象</label><div class="ui-form-ctrls">
                        <select name="SendMsgTarget" class="UI_SendMsgTarget">
                            <option value="0">请选择</option>
                            <%=CommonLib.Helper.StringFromEnum(typeof(CommonLib.Enums.SendMsgTarget),"<option value=\"{1}\" {2}>{0}</option>",0,"selected") %>
                        </select>
                        <span class="SendMsgTarget ui-help-inline">消息接收对象</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">邮件通知</label><div class="ui-form-ctrls">
                        <input type="checkbox" value="true" name="SendMail" />
                        <span class="SendMail ui-help-inline">选中将同时发送邮件，否则仅为站内消息</span>
                    </div>
                </div>
                <div class="ui-form-group UI_ReciveUserName" style="display:none;">
                    <label class="ui-form-label">会员帐号</label><div class="ui-form-ctrls">
                        <input type="text" class="ui-input-small" name="ReciveUserName" value="" />
                        <span class="ReciveUserName ui-help-inline">接收消息的会员帐号</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">标题</label><div class="ui-form-ctrls">
                        <input type="text" name="Title" value="" />
                        <span class="Title ui-help-inline">消息标题</span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">正文 &nbsp;</label><div class="ui-form-ctrls">
                        <script id="MsgContent" type="text/plain"></script>
                        <script type="text/javascript">
                            var editor = new baidu.editor.ui.Editor({
                                textarea: 'MsgContent'
                            });
                            editor.render("MsgContent");
                        </script>
                        <span class="MsgContent ui-help-inline"></span>
                    </div>
                </div>
                <div class="ui-form-group">
                    <label class="ui-form-label">&nbsp;</label><div class="ui-form-ctrls">
                        <button class="ui-btn ui-btn-primary" type="submit">开始发送</button>
                        <button class="ui-btn" type="button" onclick="history.back();">返回</button>
                    </div>
                </div>
            </fieldset>
        </form>
    </div>
    <div id="UI_List" runat="server" visible="false">
        <table class="ui-table ui-table-bordered">
            <thead>
                <tr>
                    <td colspan="5"><a href="?Action=SendMessage" class="ui-btn ui-btn-primary">消息发送</a>
                    </td>
                </tr>
                <tr>
                    <th>标题
                    </th>
                    <th>对象
                    </th>
                    <th>状态
                    </th>
                    <th>时间
                    </th>
                    <th>操作
                    </th>
                </tr>
            </thead>
            <%=MsgList %>
            <tr>
                <td colspan="5" id="Pager" class="Pager" runat="server"></td>
            </tr>
        </table>
    </div>
</asp:Content>
