<%@ page language="C#" autoeventwireup="true" inherits="ims.web.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" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="s1" runat="server" OnAsyncPostBackError="AsyncError" />
    <div class="ui-tabs 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">
                <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:28px"><a href="#" onclick="return sortBy('Files');">附件</a></td><td style="width:92px"><a href="#" onclick="return sortBy('SendTime');">时间</a></td><td style="width:40px">删除</td></tr>
                    <asp:PlaceHolder runat="server" ID="ph"></asp:PlaceHolder>
                </table>
            </div>
            <div runat="server" id="prompt" class="nodata">无</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>
                <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:ListItem Value="300">300项/页</asp:ListItem>
                    <asp:ListItem Value="500">500项/页</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();" CustomCss="noline" ShowProgress="false">
    <ContentTemplate>
        <fieldset><legend>批量操作</legend>
            <div class="padbox">
                <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();" value="取消" />
        </div>
    </ContentTemplate>
    </ims:Pop>
    <ims:Pop runat="server" ID="find" OnOkClick="FindMsgs" HideOnOkClientClick="false" Title="查找" ShowProgress="false">
        <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({dateFmt:'yyyy-MM-dd',onpicked:function(){$(this).next('.tbTime').focus();}});" ID="tbTime1"></asp:TextBox>～<asp:TextBox runat="server" CssClass="tbTime" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'});" ID="tbTime2"></asp:TextBox><br />
            <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 bigger">
        <br />
        <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" />
    </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>