<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->
<!--#include file="../inc/setup.asp"-->
<!--#include file="../inc/char.asp"-->
<!--#include file="../inc/sql.asp"-->
<%end if%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<LINK href="images/css.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
.style4 {color: #000000}
.style5 {color: #239DD8}
.style6 {color: #FFFFFF}
.style8 {color: #000000}
-->
</style>
</head>
<body>
<!--#include file="bottom.asp"-->
<table width="99%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top" bgcolor="#FFFFFF"><TABLE cellSpacing=1 cellPadding=3 width="100%" align=center border=0>
      <TBODY>
        <TR bgcolor="#000000">
          <TD colspan="2" bgcolor="#FFFFFF"><div align="center" class="style5">
              <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="1" style="border:1 solid #ECECEE;">
                <tr bgcolor="#D2E9FB">
                  <td width="120" height="22" align="center"><span class="style6" style="color: #000000">信息发送人</span></td>
                  <td align="center" bgcolor="#D2E9FB"><span class="style8">内容标题</span></td>
                  <td width="120" align="center"><span class="style8">发送时间</span></td>
                  <td width="48" align="center"><span class="style8">状态</span></td>
                  <td width="48" align="center"><span class="style8">删除</span></td>
                </tr>
<%
	cid=ReplaceBadChar(Request.Cookies("admin_company_id"))
	dim i,intPage,page,pre,last,filepath'定义变量
	set rs_user = server.CreateObject("adodb.recordset")'创建对象
	sql="select * from cmailbox where reid="&cid&" order by newmail ,id desc"'定义SQL语句
	rs_user.PageSize = 10 '这里设定每页显示的记录数
	rs_user.CursorLocation = 3
	rs_user.Open sql,conn,0,2,1 '这里执行你查询SQL并获得结果记录集
	if rs_user.eof and rs_user.bof then
%>
		<tr style="cursor:hand" backgroundColor='FFFFFF'>
        <td height="30" colspan="5" align="center">对不起，您的信箱内暂无信件</td>
        </tr>
<%
	else
	pre = true
	last = true
	page = trim(Request.QueryString("page"))'变量是跳转页面时的值

	if len(page) = 0 then
		intpage = 1
		pre = false
	else
		if cint(page) =< 1 then
			intpage = 1
			pre = false
		else
			if cint(page) >= rs_user.PageCount then
				intpage = rs_user.PageCount
				last = false
			else
				intpage = cint(page)
			end if
		end if
	end if
	if not rs_user.eof then
		rs_user.AbsolutePage = intpage
	end if
	for i=1 to rs_user.PageSize
	if rs_user.EOF or rs_user.BOF then exit for
%>
		<tr style="cursor:hand" onMouseOver="this.style.backgroundColor='F0F0F0'" onMouseOut ="this.style.backgroundColor='FFFFFF'">
                  <td height="30" align="center" onClick="window.open('msnread.asp?id=<%= rs_user("id") %>','网愿科技','height=310, width=422, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no')"><%= rs_user("sendname") %></td>
                  <td align="center" onClick="window.open('msnread.asp?id=<%= rs_user("id") %>','网愿科技','height=310, width=422, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no')"><% if len(rs_user("title"))>20 then%><%=left(rs_user("title"),20)%>...<% else%><%=rs_user("title")%><%end if%>！</td>
                  <td align="center" onClick="window.open('msnread.asp?id=<%= rs_user("id") %>','网愿科技','height=310, width=422, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no')"><%=rs_user("sdate")%></td>
                  <td align="center" onClick="window.open('msnread.asp?id=<%= rs_user("id") %>','网愿科技','height=310, width=422, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no')"><% if rs_user("newmail")=0 then Response.Write("<font color=red>未读</font>") else Response.Write("已读")%></td>
                  <td align="center"><a href="msnread.asp?action=del&id=<%= rs_user("id") %>">删除</a></td>
                </tr>
<%
	rs_user.movenext
	next
	end if
%>
              </table>
          </div>
<table width="99%" border="0" align="center" cellpadding="2" cellspacing="2" borderColorLight=#808080 borderColorDark=#ffffff>
<tr>
<%if rs_user.pagecount > 0 then%>
<td width="13%" align="left">当前页<%=intpage%>/<%=rs_user.PageCount%></td>
<%else%>
<td width="41%" align="left">当前页0/0</td><%end if%>
<td width="46%" align="right"> <a href="?page=1">首页</a>|
<%if pre then%>
<a href="?page=<%=intpage -1%>">上页</a>| <%end if%>
<%if last then%>
<a href="?page=<%=intpage +1%>">下页</a> |<%end if%>
<a href="?page=<%=rs_user.PageCount%>">尾页</a>|转到第
<select name="sel_page" onchange=javascript:location.href=this.options[this.selectedIndex].value>
<%
	for i = 1 to rs_user.PageCount
	if i = intpage then
%>
<option value="?page=<%=i%>" selected><%=i%></option>
<%else%> 
<option value="?page=<%=i%>"><%=i%></option>
<%
	end if
	next
	rs.close
	set rs=nothing
	conn.close
	set conn=nothing
%>
</select>页</font>
</td>
</tr>
</table>
       </TD>
        </TR>
      </TBODY>
    </TABLE>
	</td>
  </tr>
</table>
</body>
</html>

