<%@ page language="C#" autoeventwireup="true" inherits="ims.web.msgs, ims.web" enableviewstatemac="false" enableEventValidation="false" %>
<!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" id="msgs">
<head runat="server">
    <title>我的消息</title>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="s1" runat="server">
        <Scripts><asp:ScriptReference Name="MicrosoftAjax.js" ScriptMode="Auto" Path="~/js/MsAjax.js"/><asp:ScriptReference Name="MicrosoftAjaxWebForms.js" ScriptMode="Auto" Path="~/js/MsAjax.js"/></Scripts>
    </asp:ScriptManager>
    <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" cellspacing="0" id="dt">
                    <tr class="headRow" 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" cellspacing="0">
            <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 align="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="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="标为已读" Width="66" 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">
        <br />
        <input type="button" id="btnBatch" runat="server" value="批量操作" onclick="showBatchPop();" style="width:66px" class="btn" />
        <input type="button" id="btnSend" runat="server" value="发送消息" onclick="toSend('msg');" style="width:66px" 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>