<!--#include file="../../conn/conn.asp"-->
<!--#include file="../../conn/nosql.asp"-->
<!--#include file="../../conn/config.asp"-->
<!--#include file="../../conn/count.asp"-->
<!--#include file="../page.asp"-->
<!--#include file="../count.asp"-->
<%
if isChkInteger(request("web_id")) then
web_id=request("web_id")
else
Response.Redirect ("../../index.asp")
end if
sql="select * from snsn_user where id="&web_id
Set rs= Server.CreateObject("ADODB.Recordset") 
rs.open sql,conn,1,1
if rs.eof or rs.bof then
response.write "<script language='javascript'>"
response.write "alert('没有此用户，请确认后或联系管理员再访问本页！');"
response.write"this.location.href='/index.asp';</SCRIPT>"
response.end
else
%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link rel="stylesheet" href="css.css" type="text/css">
<style type="text/css">
<!--
.style8 {color: #FF3300}
-->
</style>
</head>
<body>
<table width="420"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="22">
      <table width="420"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td width="1" height="1"></td>
          <td height="1" colspan="2" bgcolor="#CCCCCC"></td>
          <td width="1" height="1"></td>
        </tr>
        <tr>
          <td width="1" bgcolor="#CCCCCC"></td>
          <td width="30" bgcolor="#F1F1F1"><div align="center"><span class="style8"><img src="img/p_13.gif" width="19" height="19"></span></div></td>
          <td height="25" bgcolor="#F1F1F1"><span class="M"><FONT 
                              color=#000000><a href="web.asp?web_id=<%=web_id%>"><U><%=home%></U></a></FONT> -&gt; <FONT 
                              color=#000000><a href="guestbook.asp?web_id=<%=web_id%>"><U><%=ly%></U></a></FONT> -&gt; <FONT 
                              color=#000000><a href="guestbook_add.asp?web_id=<%=web_id%>"><U>发表</U></a></FONT></span></td>
          <td width="1" bgcolor="#CCCCCC"></td>
        </tr>
        <tr>
          <td width="1" height="1"></td>
          <td height="1" colspan="2" bgcolor="#CCCCCC"></td>
          <td width="1" height="1"></td>
        </tr>
      </table></td>
    </tr><tr>
    <td height="6"></td>
  </tr>
  <tr>
    <td>
      <%
set rs=server.createobject("adodb.recordset") 
sql="select * from snsn_guestbook where userid="&web_id&" order by id desc"
rs.open sql,conn,1,1 

%>      
      <%if rs.eof or rs.bof then 
response.write "<p align='center'>对不起，没有您要查询的信息</p>" 
else
rs.PageSize =5 '每页记录条数
		iCount=rs.RecordCount '记录总数
		iPageSize=rs.PageSize
    	maxpage=rs.PageCount 
    	page=request("page")
    	per_page=rs.PageSize
    
    if Not IsNumeric(page) or page="" then
        page=1
    else
        page=cint(page)
    end if
    
    if page<1 then
        page=1
    elseif  page>maxpage then
        page=maxpage
    end if
    
    rs.AbsolutePage=Page

	if page=maxpage then
		x=iCount-(maxpage-1)*iPageSize
	else
		x=iPageSize
	end if
	For i=1 To x%>
                  <table width="97%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
                    <tr>
                      <td bgcolor="#FFFFFF"><TABLE width="380" border="0" align="center" cellpadding="2" cellspacing="0"  bordercolorlight="#D7EBFF" bordercolordark="#D7EBFF"  style="border-collapse: collapse" onMouseOver='JavaScript:this.style.backgroundColor="#FCFBF3"' onMouseOut='JavaScript:this.style.backgroundColor=""'>
                       <TR height="20" bgcolor="#ffffff">
                          <td height="10"></td>
                        </TR> <TR height="20">
                          <TD height="22"> <a name="#part<%=rs("id")%>"></a><strong><font color="#FF0000"><%=rs("title")%></font></strong>(<%=rs("adddate")%>)
                              <%if rs("adddate")>=date()-1 then%>
                              <img src="img/new.gif" width="30" height="10">
                              <%end if%></td>
                        </TR>
                        <TR height="20">
                          <TD height="22">留言人：<%=rs("name")%>
                              <%if rs("sex")="boy" then%>
                              先生
                              <%else%>
                              小姐
                              <%end if%>
                              <%if rs("qq")<>"" then%>
      QICQ：<%=rs("qq")%>
      <%end if%></td>
                        </TR>
                        <%if rs("email")<>"" or rs("url")<>"" then%>
                        <TR height="20">
                          <TD height="22"><%if rs("email")<>"" then%>
                            E-mail：<%=rs("email")%>
                            <%end if%>
                      &nbsp;&nbsp;
                            <%if rs("url")<>"" then%>
                            主页：<%=rs("url")%>
                            <%end if%></td>
                        </TR>
                        <%end if%>
                        <TR height="20">
                          <TD width="380" height="1"><img src="img/bb_code.gif" width="22" height="20">
                               <%show=rs("content")
if rs("zshow")=1 then
content=Plus_ChkPicWords(htmltotext(show))
else
Set re=new RegExp
re.IgnoreCase =true
re.Global=True
re.Pattern="\[qq@*([0-9]*)\]"
show=re.Replace(show,"&nbsp;<img src=../QQ/gif/$1.gif border=0 alt='点击看我超酷表演' onmouseover=ShowQQ('$1'); style='cursor: hand;border:1px border-collapse: collapse; border-style: dotted;'>")
content=show
end if    %> <%if rs("qqh")=1 then%>
                              <%if session("id")=cint(web_id) then%>
                            <%=content%>
                              <%else%>
                              留给站长的悄悄话...
                              <%end if%>
                              <%else%><%=content%><%end if%>                          </td>
                        </TR>
                        <%if rs("reply")<>"" then%>
                        <TR height="20">
                          <TD height="30">站长回复：</td>
                        </TR>
                        <TR height="20" bgcolor="#ffffff">
                          <td height="1" background="img/xbj3.gif"></td>
                        </TR>
                        <TR height="20">
                          <TD height="1"><span class="style8"><img src="img/p_13.gif" width="19" height="19"><%=rs("reply")%></span></td>
                        </TR>
                        <%end if%>
                        <%if cint(web_id) = session("id") then%>
                        <TR height="20">
                          <TD height="1" align="right">&nbsp;&nbsp; <a href="guestbook_add.asp?web_id=<%=request("web_id")%>&action=save&id=<%=rs("id")%>"><img src="img/hf.gif" width="32" height="17" border="0"></a> <a href="guestbook_add.asp?web_id=<%=request("web_id")%>&action=del&id=<%=rs("id")%>"><img src="img/sch.gif" width="32" height="17" border="0"></a></td>
                        </TR>
                        <%end if%>
                        
                        <TR height="20" bgcolor="#ffffff">
                          <td height="10"></td>
                        </TR>
                      </TABLE></td>
                    </tr>
                  </table>
                  <table width="90%" height="5"  border="0" align="center" cellpadding="0" cellspacing="0">
                    <tr>
                      <td></td>
                    </tr>
                  </table>
                  <%
		  icolor=icolor+1
if icolor>1 then icolor=0
		RS.MoveNext
next%>
          <TABLE width="100%" 
        border=0 align="center" cellPadding=4 cellSpacing=0>
            <TBODY>
              <TR>
                <TD class=M noWrap align=middle><%
					call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>",per_page)
				  %></TD>
              </TR>
            </TBODY>
      </TABLE>
    </center></td>
  </tr>
</table>
<p>&nbsp;</p>
</body>
</html><%end if
end if%>
