<%@ page language="C#" autoeventwireup="true" inherits="ims.msgs, ims.web" enableviewstatemac="false" enableEventValidation="false" %>
<!DOCTYPE html>
<html id="msgs">
<head runat="server">
    <title>我的消息</title><meta http-equiv="X-UA-Compatible" content="IE=edge" /><meta name="viewport" content="width=device-width,initial-scale=1">
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="s1" runat="server" OnAsyncPostBackError="AsyncError">
        <CompositeScript Path="js/msajax.js" ScriptMode="Release">
            <Scripts>
                <asp:ScriptReference Name="WebForms.js" Assembly="System.Web" /><asp:ScriptReference Name="MicrosoftAjax.js" /><asp:ScriptReference Name="MicrosoftAjaxWebForms.js" />
            </Scripts>
        </CompositeScript>
    </asp:ScriptManager>
    <div class="ui-tabs nobg noborder">
	    <ul>
		    <li><a href="#up" id="unread"><span>未读消息</span><span class="hide"> - 查找结果</span></a></li>
		    <li><a href="#up" id="read"><span>已读消息</span><span class="hide"> - 查找结果</span></a></li>
		    <li><a href="#up" id="sendbox" runat="server"><span>发件箱</span><span class="hide"> - 查找结果</span></a></li>
	    </ul>
        <asp:UpdatePanel ID="up" runat="server" OnPreRender="MsgsPreRender" RenderMode="Block" UpdateMode="conditional">
        <ContentTemplate>
            <div runat="server" id="main" class="mtop_n">
                <table class="hr" id="dt">
                    <tr title="点击列标题链接排序，再次点击反向排序"><td class="cbtd"><input type="checkbox" id="cbAll" onclick="selectAll();" title="全选" /></td><td style="width:72px" runat="server" id="tdSender"><a href="#" onclick="return sortBy('Sender');">发件人</a></td><td><a href="#" onclick="return sortBy('Subject');">主 题</a></td><td style="width:32px" class="hide2"><a href="#" onclick="return sortBy('Files');">附件</a></td><td style="width:108px" class="hide2"><a href="#" onclick="return sortBy('SendTime');">时间</a></td><td style="width:32px">删除</td></tr>
                    <asp:PlaceHolder runat="server" ID="ph"></asp:PlaceHolder>
                </table>
            </div>
        </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    <asp:UpdatePanel ID="upPager" runat="server" RenderMode="Block" UpdateMode="conditional">
    <ContentTemplate>
        <table runat="server" id="PagerBar" class="PagerBar">
            <tr><td class="nowrap">
                <asp:LinkButton ID="btnFirst" Text="首页" runat="server" ToolTip="快捷键：Home" AccessKey="F" OnClick="ChangePage" />
                <asp:LinkButton ID="btnPrevious" Text="上页" runat="server" ToolTip="快捷键：←或PageUp" AccessKey="P" OnClick="ChangePage" />
                <asp:Label ID="lblCount" CssClass="count" runat="server"></asp:Label>
                <asp:LinkButton ID="btnNext" Text="下页" runat="server" ToolTip="快捷键：→或PageDown" AccessKey="N" OnClick="ChangePage" />
                <asp:LinkButton ID="btnLast" Text="末页" runat="server" ToolTip="快捷键：End" AccessKey="L" OnClick="ChangePage" />
            </td><td class="right">
                <asp:DropDownList runat="server" id="ddlPagesize" AutoPostBack="True" OnSelectedIndexChanged="PageSizeChanged">
                    <asp:ListItem Value="5">5项/页</asp:ListItem>
                    <asp:ListItem Value="10">10项/页</asp:ListItem>
                    <asp:ListItem Value="15" Selected="True">15项/页</asp:ListItem>
                    <asp:ListItem Value="20">20项/页</asp:ListItem>
                    <asp:ListItem Value="30">30项/页</asp:ListItem>
                    <asp:ListItem Value="50">50项/页</asp:ListItem>
                    <asp:ListItem Value="100">100项/页</asp:ListItem>
                </asp:DropDownList>
                <asp:DropDownList ID="ddlPager" AutoPostBack="true" OnSelectedIndexChanged="ChangePage" runat="server"></asp:DropDownList>
            </td></tr>
        </table>
    </ContentTemplate>
    </asp:UpdatePanel>
    <ims:Pop runat="server" ID="batch" ShowCancelButton="false" ShowOkButton="false" OnClientUpdated="setBatchPop();">
    <ContentTemplate>
        <fieldset><legend>批量操作</legend>
            <div class="padbox mtop_m">
                <asp:RadioButton runat="server" ID="rbSelected" GroupName="range" Text="选中的消息" Checked="true" />　<asp:RadioButton runat="server" ID="rbAll" GroupName="range" Text="所有此类消息" />
            </div>
        </fieldset>
        <div class="footBtnArea">
            <asp:Button ID="btnMark" CssClass="btn" runat="server" Text="标为已读" OnClientClick="return toMark();" OnClick="Mark" />
            <asp:Button ID="btnDel" CssClass="btn" runat="server" Text="删除" OnClientClick="return beforeDel();" OnClick="BatchDel" />
            <input type="button" class="btn" onclick="HideDialog(this);" value="取消" />
        </div>
    </ContentTemplate>
    </ims:Pop>
    <ims:Pop runat="server" ID="find" Width="370" OnOkClick="FindMsgs" HideOnOkClientClick="false" Title="查找">
        <ContentTemplate>
            <ul class="conds">
                <li id="liSender"><asp:CheckBox runat="server" ID="cbSender" Text="发件人：　" /><input type="text" runat="server" acfid="UserName" chars=";；、,，" ondblclick="showUserTree(this.id);" id="tbSender" class="tb" title="输入或选择用户名，双击弹出选择窗口" /></li>
                <li id="liSendee"><asp:CheckBox runat="server" ID="cbSendee" Text="收件人：　" /><input type="text" runat="server" acfid="UserName" chars=";；、,，" ondblclick="showUserTree(this.id);" id="tbSendee" class="tb" title="输入或选择用户名，双击弹出选择窗口" /></li>
                <li><asp:CheckBox runat="server" ID="cbSubject" Text="主题包含：" /><asp:TextBox runat="server" ID="tbSubject" CssClass="tb"></asp:TextBox></li>
                <li><asp:CheckBox runat="server" ID="cbContent" Text="内容包含：" /><asp:TextBox runat="server" ID="tbContent" CssClass="tb"></asp:TextBox></li>
                <li class="times"><asp:CheckBox runat="server" ID="cbTime" Text="发送时间：" /><asp:RadioButton runat="server" ID="rbInput" Checked="true" GroupName="time" /><asp:TextBox runat="server" CssClass="tbTime" onfocus="WdatePicker({el:this,dateFmt:'yyyy-MM-dd',onpicked:function(){$(this).next('.tbTime').focus();}});" ID="tbTime1"></asp:TextBox>～<asp:TextBox runat="server" CssClass="tbTime" onfocus="WdatePicker({el:this,dateFmt:'yyyy-MM-dd'});" ID="tbTime2"></asp:TextBox><br />
            <span class="hidden"><input type="checkbox"" /><label>发送时间：</label></span><asp:RadioButton runat="server" ID="rbSelect" GroupName="time" /><asp:DropDownList runat="server" ID="ddly"></asp:DropDownList>
                    <asp:DropDownList runat="server" ID="ddlm"></asp:DropDownList>
                    <asp:DropDownList runat="server" ID="ddld"></asp:DropDownList>
                </li>
            </ul>
        </ContentTemplate>
    </ims:Pop>
    <div class="footBtnArea">
        <input type="button" id="btnBatch" runat="server" value="批量操作" onclick="showBatchPop();" class="btn" />
        <input type="button" id="btnSend" runat="server" value="发送消息" onclick="return toSend('msg');" class="btn" />
        <input type="button" id="btnFind" value="查找" class="btn" onclick="toFind();" />
		<input type="button" onclick="back();" value="返回" class="btn pconly" />
    </div>

    <asp:Button runat="server" ID="btnOpera" OnClick="ExeOpera" CssClass="hide" />
    <script src="js/comm.js"></script><script src="js/msgs.js"></script>
    </form>
</body>
</html>