<%@ page language="C#" autoeventwireup="true" inherits="message.message_SendMsgBox, LebiMall" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title><%=model_t.Title %></title>
    <meta name="description" content=<%=model_t.Description %> />
    <meta name="keywords" content=<%=model_t.Keywords %> />
    <meta name="generator" content="LBMall 3.0.0" />
    <link href="../images/css/css3.css" rel="stylesheet" type="text/css" />
    <link href="../images/css/css2.css" rel="stylesheet" type="text/css" />
    <link href="../images/css/css.css" rel="stylesheet" type="text/css" />
    <link href="../images/css/ie6.css" rel="stylesheet" type="text/css" />
    <link href="../images/css/ie7.css" rel="stylesheet" type="text/css" />
    <!--[if lte IE 6]><style type="text/css" media="screen">/* <![CDATA[ */ @import url(../images/css/ie6.css); /* ]]> */</style><![endif]-->
    <!--[if gte IE 7]><STYLE type=text/css media=screen>@import url(../images/css/ie7.css);</STYLE><![endif]-->
    <link href="css/newcss.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../images/js/shopjs.js"></script>
    <script type="text/javascript">
        function selectAll(_flag){
            var value = _flag;
            document.getElementById("cmbTotal").checked = _flag;
            var idstr = document.getElementById("hide_ids").value;
            var idArray = idstr.split(',');
            for(var i = 0 ;i < idArray.length;i ++){
                document.getElementById("cmb"+idArray[i]).checked = value;
            }
        }
        function deleteMsg(){
            var idstr = document.getElementById("hide_ids").value;
            var idArray = idstr.split(',');
            var deleteIds = "";
            for(var i = 0 ;i < idArray.length;i ++){
                if(document.getElementById("cmb"+idArray[i]).checked){
                    deleteIds += idArray[i] + ",";
                }
            }
            deleteIds = deleteIds.substring(0,deleteIds.length - 1);
            if(deleteIds == ""){
                return false;
            }
            window.location.href="Delete.aspx?ids="+deleteIds+"&url="+escape("SendMsgBox.aspx");
        }
        function search2(){
            var texts2=document.getElementById("ser2").value;
            var select_v2=document.getElementById("Select2").value;
            window.location="../list.aspx?tid="+select_v2+"&titlec="+escape(texts2);
        }
    </script>

</head>
<body>
    <form id="Form1" runat="server">
        
     <div id="top-menu02">
        <div id="top-menu">
            <div class="right">
                <script type="text/javascript">indexhead();</script>
            </div>
        </div>
    </div>
    <div id="top">
        <div id="logo">
            <a href="http://<%=Request.Url.Host %><%=model_t.WebPath %>/">
                <img src="../Upload/WebAdminImages/<%=model_t.Logoimg %>" border="0" /></a></div>
    </div>
    <div id="sp-menu">
        <ul>
           <li><a href="http://<%=Request.Url.Host %><%=model_t.WebPath %>/">首页</a></li>
            <%for (int i = 0; i < ds_tab.Tables[0].Rows.Count; i++){ %>
            <li><%if (model_t.Tab == "1"){ %>
                <a href="../<%= ds_tab.Tables[0].Rows[i]["tdirname"]%>/" target="_blank"><%= ds_tab.Tables[0].Rows[i]["tname"]%></a>
                <%}else{%>
                <a href="../TopTab.aspx?type=<%= ds_tab.Tables[0].Rows[i]["tdirname"]%>" target="_blank"><%= ds_tab.Tables[0].Rows[i]["tname"]%></a>
                <%} %></li>
            <%} %>
            <li><a href="http://<%=Request.Url.Host %><%=model_t.WebPath %>/News/" target="_blank">资讯</a></li>
        </ul>
        <p>
            <span><a href="../ShopCoupon.aspx">优惠券</a></span></p>
    </div>
        <div id="contenter2">
            <div id="contenter">

                <script type="text/javascript">
                    shopLeft();
                </script>

                <div id="right">
                    <div class="contenter">
                        <div class="nav-tabs">
                            <ul class="tabs">
                                <li><a href="Default.aspx">系统消息</a> </li>
                            </ul>
                            <ul class="tabs">
                                <li class="selected"><a href="SendMsgBox.aspx">发信箱</a> </li>
                            </ul>
                            <ul class="tabs">
                                <li><a href="WriteMsg.aspx">发送消息</a> </li>
                            </ul>
                        </div>
                        <div>
                            <table cellspacing="0" cellpadding="0" border="0">
                                    <thead>
                                        <tr class="new_tr" style="background-color: #eff5fb">
                                            <td class="net_Attach">
                                                <input type="checkbox" id="cmbTotal" onclick="selectAll(this.checked);" />
                                            </td>
                                            <td class="new_tt1">
                                                标题(共<%=this.count %>条)</td>
                                            <td class="new_content1">
                                                内容</td>
                                            <td class="new_tt1">
                                                收信人
                                            </td>
                                            <td class="new_tt1">
                                                发布时间
                                            </td>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <%for (int i = 0; i < dsMsg.Tables[0].Rows.Count; i++)
                                          {
                                        %>
                                        <tr class="new_tr2">
                                            <td>
                                                <input type="checkbox" id="cmb<%=dsMsg.Tables[0].Rows[i]["mid"] %>" name="cmb<%=dsMsg.Tables[0].Rows[i]["mid"] %>" />
                                            </td>
                                            <td>
                                                <a href="Details.aspx?Fid=<%=dsMsg.Tables[0].Rows[i]["mid"] %>">
                                                    <%=dsMsg.Tables[0].Rows[i]["mtitle"].ToString().Length > 20 ? dsMsg.Tables[0].Rows[i]["mtitle"].ToString().Substring(0, 20) + "..." : dsMsg.Tables[0].Rows[i]["mtitle"].ToString()%>
                                                </a>
                                            </td>
                                            <td>
                                                <a href="Details.aspx?Fid=<%=dsMsg.Tables[0].Rows[i]["mid"] %>">
                                                    <%=dsMsg.Tables[0].Rows[i]["mcontent"]%>
                                                </a>
                                            </td>
                                            <td>
                                                <%
                                                    admin_user = getName(dsMsg.Tables[0].Rows[i]["toUserId"].ToString());
                                                %>
                                                <%=admin_user.Admin_username %>
                                            </td>
                                            <td>
                                                <em>
                                                    <%=dsMsg.Tables[0].Rows[i]["sendtime"]%>
                                                </em>
                                            </td>
                                        </tr>
                                        <%
                                            this.ids += dsMsg.Tables[0].Rows[i]["mid"].ToString() + ",";
                                        } %>
                                        <tr>
                                            <td colspan="5">
                                                <a href="javascript:selectAll(true);">全 选 </a>| <a href="javascript:selectAll(false);">
                                                    全不选 </a>| <a href="javascript:deleteMsg();">删 除 </a>
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            <div class="fy">
                                <webdiyer:AspNetPager CssClass="pages" CurrentPageButtonClass="cpb" ID="AspNetPager1"
                                    runat="server" FirstPageText="首页" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页"
                                    PageSize="15" UrlPaging="True" NumericButtonCount="6">
                                </webdiyer:AspNetPager>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="both">
                </div>
                <div class="both">
                </div>
                <input type="hidden" value="<%=this.ids.Length > 0 ? this.ids.Substring(0,ids.Length-1):"" %>"
                    id="hide_ids" />
                     <div id="footer">
                <div id="copyright">
                    <div class="search">
                        <div class="search-left">
                            <div class="search-left-title">
                                搜索：</div>
                            <div class="search-left-form">
                                <input type="text" runat="server" id="ser2" size="30" /></div>
                            <div class="search-left-list">
                                <select id="Select2" runat="server">
                                </select>
                            </div>
                            <div class="search-left-button">
                                <img src="../images/search-buttom.gif" width="60" height="20" onclick="search2()" /></div>
                        </div>
                        <div class="search-right">
                            <div runat=server id="div_s2"></div>
                        </div>
                    </div>
                </div>
            </div>
                <div class="copyright" runat="server" id="copr"></div>
            </div>
        </div>

    </form>
</body>
</html>
