<!--#include file="conn.asp"-->
<!--#include file="adminset.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆！');window.location.href='login.asp';</script>"
response.End
end if
if session("flag")>2 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if
if qx10<>1 then
response.Write "<div align=center><font size=80 color=red><b>您没有此项目管理权限！</b></font></div>"
response.End
end if
%>
<html>
<title>网软志成在线购物系统</title>
<link href="../css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {
	color: #000000;
	font-weight: bold;
}
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style2 {color: #FF0000}
-->
</style>
<body bgcolor="#FFFFFF">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="1%" height="28">&nbsp;</td>
    <td width="99%"><table width="100%" border="0" cellspacing="0" cellpadding="5">
      <tr>
        <td width="77%" height="27" style="font-size:14px;color:#ffffff">&nbsp;<strong><font color="#000000">网软志成购物后台管理系统 &gt;&gt; 邮件管理 &gt;&gt; 邮件列表 </font></strong></td>
        <td width="23%" style="font-size:14px;color:#ffffff"><span class="style2">* 为必添项目</span></td>
      </tr>
      <tr>
        <td height="27" colspan="2" style="font-size:12px;color:#000000"><span style="font-size:14px;color:#ffffff">&nbsp;</span>说明：以下邮件列表为用户在网站前台自愿提交申请相关订阅的邮件地址！</td>
        </tr>
      
    </table></td>
  </tr>
</table>
<br>
<table width="95%" border="0" align="center" cellpadding="3" cellspacing="1" bordercolorlight="#CCCCCC" bordercolordark="#CCCCCC" bgcolor="#999999">
 
 <tr valign="top">
   <td bgcolor="#CCCCCC"><div align="center">邮件</div></td>
   <td bgcolor="#CCCCCC"><div align="center">加入时间</div></td>
   <td bgcolor="#CCCCCC"><div align="center">IP地址</div></td>
   <td bgcolor="#CCCCCC"><div align="center">推荐会员</div></td>
 </tr>
 <% 
            
set rs = server.createobject("adodb.recordset")
on error resume next
dim curpage, curtopic, strtopic
dim FIRSTNO, PERPAGE
PERPAGE = 20	'每页显示记录数

    
    if request("page")="" then
  	curpage = 1
else
	curpage = cint(request("page"))
end if
sql = "SELECT * FROM mail ORDER BY id DESC"
rs.open sql,conn,1,1

if err.number <> 0 then
	response.write "数据库连接发生了错误"
	else
	if rs.bof and rs.eof then
		rs.close
		response.write "<center>目前还没有任何用户的邮件"
	else
		dim i
		rs.pagesize = PERPAGE
		rs.absolutepage = curpage
	
		for i = 1 to rs.pagesize
		%>  
 <tr valign="top"> 
          
    <td width="524" bgcolor="#F3F3F3"><div align="center"><a href=mailto:<%=rs("mail")%>><%=rs("mail")%></a></div></td>
    <td width="524" bgcolor="#F3F3F3"><div align="center"><%=rs("date")%></div></td>
    <td width="524" bgcolor="#F3F3F3"><div align="center"><%=rs("ip")%></div></td>
    <td width="524" bgcolor="#F3F3F3"><div align="center"><%=rs("username")%></div></td>
 </tr><%
			rs.movenext
			if rs.eof then
				i = i + 1
				exit for
			end if
		next%>
</table>
      <div align="center"><br>
          <%
		response.write "第" + cstr(curpage) + "页/总" + cstr(rs.pagecount) + "页 "
		response.write "本页" + cstr(i-1) + "条/总" + cstr(rs.recordcount) + "条 "
		if curpage = 1 then 
			response.write "首页 前页 "
		else
			response.write "<a href='email_manage.asp?page=1'>首页</a> <a href='email_manage.asp?page=" + cstr(curpage-1) + "'>前页</a> "
		end if
		if  curpage = rs.pagecount then
			response.write "后页 末页"
		else
			response.write "<a href='email_manage.asp?page=" + cstr(curpage+1) + "'>后页</a> <a href='email_manage.asp?page=" + cstr(rs.pagecount) + "'>末页</a>"
		end if
		rs.close
 	'end if	
end if	
end if	
set rs = nothing
call endconnection()

 %>
          <br>
        <!--#include file="copyright.asp"-->
      <p>&nbsp;</p>
      <p>&nbsp;</p>
</div>
</body>
</html>