<%
'商易仿淘宝4.0(多用户)
'ACCESS版演示网站：http://www.ftaobao.com(商易仿淘宝商城)
'SQL版演示网站：http://sql.ftaobao.com
'电话：0571-56907100
'QQ：1147100
%>
<!--#include file="../include/conn.asp"-->
<!--#include file="inc.asp"-->
<!--#include file="../include/config.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>您的站内信件---<%=my_name%></title>
<link href="../include/css.css" rel="stylesheet" type="text/css">
</head>

<%'禁止网页缓存及涮新
Response.Buffer = True 
Response.ExpiresAbsolute = Now() - 1 
Response.Expires = -1440
Response.CacheControl = "no-cache"


'会员判断
if Request.Cookies(Rikee)("huiyuan")<>"" and Request.Cookies(Rikee)("hypwd")<>"" then
set rs = conn.execute("select zt from huiyuan where huiyuan='"&Request.Cookies(Rikee)("huiyuan")&"' and password='"&(Request.Cookies(Rikee)("hypwd"))&"'")
if rs.eof then
Response.Cookies(Rikee)("huiyuan")=""
Response.Cookies(Rikee)("hypwd")=""
hy_close "您不是会员或尚未登陆，会员登陆后才能接收查看站内信！"
Response.end
else
if rs(0)<>1 then
Response.Cookies(Rikee)("huiyuan")=""
Response.Cookies(Rikee)("hypwd")=""
hy_close "您不是会员或尚未登陆，会员登陆后才能接收查看站内信！"
Response.end
end if
end if
rs.close
set rs=nothing
else
hy_close "您不是会员或尚未登陆，会员登陆后才能接收查看站内信！"
Response.end
end if
%>
<base target="_top">
<body bgcolor="#F3F3F3">
<div align="center"> 
  <table width="100%" border="0" align="center" cellpadding="3" cellspacing="0">
<%dx=conn.execute("select count(id) from duanxin where name1='"&Request.Cookies(Rikee)("huiyuan")&"' and zt=0")(0)
if dx>0 then dx=dx-1 else dx=dx
if request("x")="no" then x=" and zt=0" else x=""
Set rs=Server.CreateObject("ADODB.Recordset")
sql="select id,name2,sj from duanxin where name1='"&Request.Cookies(Rikee)("huiyuan")&"' "&x&" order by zt,id desc"
rs.open sql,conn,3,1
if rs.eof then
hy_close "没有站内信记录！"
Response.end
end if
rs.pagesize = 1
if request("page")=""  or isempty(request("page")) then
page = 1
else
page=int(request("page"))
end if
if page>rs.pagecount then
page=rs.pagecount
end if
if not rs.BOF then
Rs.Move Rs.PageSize*(page-1)
end if
i=1
do while not rs.eof and i<=rs.pagesize
conn.execute("Update duanxin set zt=1 where id="&rs("id")&"")
id=rs("id")
huiyuan=rs("name2")%>
    <tr valign="middle" bgcolor="#f1f1f1"> 
      <td height="25">发送时间：<%=rs("sj")%>&nbsp;&nbsp;发送人：<%=huiyuan%></td>
    </tr>
    <tr valign="top" bgcolor="#FFFFFF"> 
      <td height="150"> <iframe name=ad frameborder=0 width=100% height=120 scrolling=auto src=neirong.asp?id=<%=id%>></iframe></td>
    </tr>
<%i=i+1
rs.MoveNext                                              
loop%>
    <tr align=right valign=middle> 
      <td height=25> <%if rs.recordcount>0 then
if page>1 then response.write "<a href='?page="&page-1&"'>[上一条]</a>   "
if page>0 and page<rs.recordcount then response.write "<a href='?page="&page+1&"'>[下一条]</a>   "
end if
rs.close
set rs=nothing%></td>
    </tr>
    <tr align=center valign=middle bgcolor="#f1f1f1"> 
      <td height=30> <a href=?>〖全部<%=conn.execute("select count(id) from duanxin where name1='"&Request.Cookies(Rikee)("huiyuan")&"'")(0)%>〗</a> <%if dx>0 then Response.Write "<a href=?x=no>〖未读<font color=red>"&dx&"</font>〗</a>" else Response.Write "〖未读0〗"%><a href="javascript:void window.showModelessDialog('fa.asp?huiyuan=<%=huiyuan%>','','scroll:0;status:0;help:0;resizable:0;dialogWidth:620px;dialogHeight:350px')">【直接回复】</a><a href="javascript:void window.showModelessDialog('fa.asp?huiyuan=<%=huiyuan%>&y_id=<%=id%>','','scroll:0;status:0;help:0;resizable:0;dialogWidth:620px;dialogHeight:350px')">【引用回复】</a><a href=# onClick="javascript:self.close();">【关闭窗口】</a> 
    </tr>
  </table>
  
</div>
</body>
</html>
<%Response.Cookies(rikee)("zhanneixin")="1"
conn.close
set conn=nothing%>
