<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Admin/MasterPage.master"
    Title="发送网站短消息" Inherits="PowerEasy.Module.General.WebSite.Admin.Accessories.MessageSend"
    CodeBehind="MessageSend.aspx.cs" ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CphNavigation" runat="Server">
    <pe:ExtendedSiteMapPath ID="SmpNavigator" SiteMapProvider="AdminMapProvider" runat="server" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CphContent" runat="Server">
    <table width="100%" border="0" cellpadding="2" cellspacing="1" class="border">
        <tr align="center">
            <td colspan="3" class="spacingtitle">
                <b>发送网站短消息</b>
            </td>
        </tr>
        <tr class="tdbg">
            <td align="right" style="height: 28px; width: 15%;">
                &nbsp;收件人：
            </td>
            <td colspan="2">
                <table id="TblAddMessage" visible="true" runat="server">
                    <tr>
                        <td>
                            <asp:RadioButton ID="RadIncept1" runat="server" GroupName="InceptGroup" Checked="true" />所有会员
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td valign="top">
                            <asp:RadioButton ID="RadIncept2" runat="server" GroupName="InceptGroup" />指定会员组
                        </td>
                        <td>
                            <asp:CheckBoxList ID="ChklUserGroupList" runat="server" RepeatColumns="5" RepeatDirection="Horizontal"
                                Width="100%">
                            </asp:CheckBoxList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <asp:RadioButton ID="RadIncept3" runat="server" GroupName="InceptGroup" />指定用户名
                        </td>
                        <td>
                            <asp:TextBox ID="TxtUserName" runat="server" Width="260px"></asp:TextBox>
                            <pec:FloatingDialog ID="FloatingDialog" runat="server" ShowType="1" Width="600" Height="450"
                                Name="会员列表" Skin="inputbutton" Title="选择用户" />
                        </td>
                    </tr>
                </table>
                <table id="TblEditMessage" visible="false" runat="server">
                    <tr>
                        <td>
                            <asp:TextBox ID="TxtInceptUser" runat="server" Width="426px"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr class="tdbg">
            <td align="right" style="height: 27px; width: 15%;">
                发送人：
            </td>
            <td colspan="2">
                <asp:TextBox ID="TxtSender" runat="server"></asp:TextBox>
                <pe:RequiredFieldValidator ID="ValrSender" runat="server" ControlToValidate="TxtSender"
                    ErrorMessage="短消息发送人不能为空"></pe:RequiredFieldValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td align="right" style="height: 28px; width: 15%;">
                短消息主题：
            </td>
            <td colspan="2">
                <asp:TextBox ID="TxtTitle" runat="server" Width="300px"></asp:TextBox>
                <pe:RequiredFieldValidator ID="ValrTitle" runat="server" ControlToValidate="TxtTitle"
                    ErrorMessage="短消息主题不能为空" Display="Dynamic"></pe:RequiredFieldValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td align="right" style="height: 23px; width: 15%;">
                短消息内容：
            </td>
            <td>
                <pe:UEditor ID="EditorContent" runat="server" Width="580px" Height="220px" LinkUpload="true" ModuleName="message" Thumbnail="false" Watermark="false"
                     Toolbar="Simple" Value="您好！这是一条测试短信。（请勿回复此短信）">
                </pe:UEditor>
                <pe:UEditorValidator ID="ValrContent" runat="server" ControlToValidate="EditorContent"
                    ErrorMessage="短消息内容不能为空" Display="Dynamic"></pe:UEditorValidator>
            </td>
        </tr>
        <tr class="tdbg">
            <td align="right">
                短消息内容中可用标签说明：
            </td>
            <td>
               <table id="taglist">
                <tr>
                 <td><a target="_self">{$UserName}</a>：用户名</td>
                 <td><a target="_self">{$UserId}</a>：会员ID</td>
                 <td><a target="_self">{$Email}</a>：电子邮箱</td>
                </tr>
                <tr>
                 <td><a target="_self">{$GroupId}</a>：会员组ID</td>
                 <td><a target="_self">{$GroupName}</a>：会员组名称</td>
                 <td><a target="_self">{$HonorType}</a>：会员头衔</td>
                </tr>
                <tr>
                 <td><a target="_self">{$LogOnTimes}</a>：登录次数</td>
                 <td><a target="_self">{$ConsumeExp}</a>：用户消费积分</td>
                 <td><a target="_self">{$UserPoint}</a>：用户点券数</td>
                </tr>
                <tr>
                 <td><a target="_self">{$ConsumeMoney}</a>：消费的金额</td>
                 <td><a target="_self">{$ConsumePoint}</a>：消费的点券数</td>
                 <td><a target="_self">{$AlipayUserID}</a>：支付宝用户ID</td>
                </tr>
                <tr>
                 <td><a target="_self">{$EndDays}</a>：有效期剩余天数</td>
                 <td><a target="_self">{$GetPasswordTime}</a>：上一次取回密码时间</td>
                 <td><a target="_self">{$JoinTime}</a>：加入某会员组的时间</td>
                </tr>
                <tr>
                 <td><a target="_self">{$LastAddPointTime}</a>：最后赠送点券时间</td>
                 <td><a target="_self">{$LastLogOnTime}</a>：最后登录时间</td>
                 <td><a target="_self">{$LastLockoutTime}</a>：上次被锁定的时间</td>
                </tr>
                <tr>
                 <td><a target="_self">{$LastPresentTime}</a>：最后赠送积分时间</td>
                 <td><a target="_self">{$LastLogOnIP}</a>：最后登录IP</td>
                 <td><a target="_self">{$PostItems}</a>：添加的信息数</td>
                </tr>
                <tr>
                 <td><a target="_self">{$DelItems}</a>：被删除的信息数</td>
                 <td><a target="_self">{$RejectItems}</a>：被退稿的信息数</td>
                 <td><a target="_self">{$PassedItems}</a>：审核通过的信息数</td>
                </tr>
                <tr>
                 <td><a target="_self">{$UserExp}</a>：会员积分数</td>
                 <td><a target="_self">{$Question}</a>：密码提示问题</td>
                 <td><a target="_self">{$RegTime}</a>：注册时间</td>
                </tr>
               </table>                    
            </td>
        </tr>
        <tr align="center" class="tdbg">
            <td colspan="2" style="height: 50px;">
                <asp:HiddenField ID="HdnMessageID" runat="server" />
                <asp:Button ID="BtnSend" runat="server" Text="发送" OnClick="BtnSend_Click" />
                <asp:Button ID="BtnSave" runat="server" Text="保存" OnClick="BtnSave_Click" />
                <asp:Button ID="BtnReset" runat="server" Text="清除" ValidationGroup="none" OnClick="BtnReset_Click" />
            </td>
        </tr>
    </table>
    <script type="text/javascript">
        var a_list = document.getElementById("taglist").getElementsByTagName('a');
        for (var i = 0; i < a_list.length; i++) {
            a_list[i].onmouseup = function () {
                <%=EditorContent.ClientID%>$$ueditor$$obj.setContent(this.innerText, true);
            };
        }
    </script>
</asp:Content>
