⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 welcomegbview.asp

📁 此程序为网上下载
💻 ASP
字号:
<%@ codepage ="936" %>
<%nickname=Session("hxf_u_nickname")
if nickname="" then Response.Redirect "error.asp?id=210"
show=Request.QueryString("show")
if show="" then show=0
if Not(IsNumeric(show)) then show=0
if show<0 then show=0
if show>2 then show=2
page=Request.QueryString("page")
if page="" then page=1
if Not(IsNumeric(page)) then page=1
if page<1 then page=1
page=int(page)
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
connstr=Application("wsaxhg_connstr")
conn.open connstr
if page=1 then
 sql="SELECT gbtop FROM gbooktop"
 rs.open sql,conn,1,1
 gbtop=rs("gbtop")
 rs.close
end if
Select Case show
 Case 0
  sql="SELECT * FROM gbook WHERE mm='0' or towho='" & nickname & "' or fromwho='" & nickname & "' ORDER BY writetime DESC"
 Case 1
  sql="SELECT * FROM gbook WHERE towho='" & nickname & "' or fromwho='" & nickname & "' ORDER BY writetime DESC"
 Case 2
  sql="SELECT * FROM gbook WHERE mm='1' and (towho='" & nickname & "' or fromwho='" & nickname & "') ORDER BY writetime DESC"
End Select
rs.open sql,conn,1,1
rs.PageSize=10
totalrec=rs.RecordCount
if totalrec=0 then
 rs.close
 conn.close
 set rs=nothing
 set conn=nothing
 Response.Redirect "error.asp?id=200"
end if
totalpage=rs.PageCount
if page>totalpage then page=totalpage
rs.AbsolutePage=page
rs.CacheSize=rs.PageSize
i=0
dim showwritetime(),showmm(),showtowho(),showfromwho(),showtitle(),showintro(),showhideip(),showip(),showaddress(),showemail(),showhomename(),showhomeurl()
do while (Not rs.Eof) and (i<rs.PageSize)
 i=i+1
 Redim Preserve showwritetime(i),showmm(i),showtowho(i),showfromwho(i),showtitle(i),showintro(i),showhideip(i),showip(i),showaddress(i),showemail(i),showhomename(i),showhomeurl(i)
 showwritetime(i)=rs("writetime")
 showmm(i)=rs("mm")
 showtowho(i)=rs("towho")
 showfromwho(i)=rs("fromwho")
 showtitle(i)=rs("title")
 showintro(i)=rs("intro")
 showhideip(i)=rs("hideip")
 showip(i)=rs("ip")
 showaddress(i)=rs("address")
 showemail(i)=rs("email")
 showhomename(i)=rs("homename")
 showhomeurl(i)=rs("homeurl")
 rs.MoveNext
Loop
rs.close
conn.close
set rs=nothing
set conn=nothing%><html>
<head>
<title>留言簿</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
a{color:blue;text-decoration:none}
a:hover{color:red;text-decoration:none}
a:active{text-decoration:none}
a:visited{text-decoration:none}
td{font-family:'宋体';font-size:9pt}
input{font-family:'宋体';font-size:9pt;background-color:<%=chattablebgcolor%>;color:000000;border: 1 double}
body{font-family:'宋体';font-size:1pt;line-height:160%}
</style>
<script Language=JavaScript>
function gop(){url="welcomegbview.asp?show="+document.forms[0].show.value+"&page="+document.forms[0].page.value;this.location.href=url;}
</script>
</head>
<body oncontextmenu=self.event.returnValue=false bgcolor="#DCD8D0" leftmargin="5" topmargin="5">
<a name="begin"></a> 
<div align=center>
<table width="421" border="0" cellspacing="0" height="20">
    <form method="post" action="javascript:gop()">
<tr> 
<td width="420"> 
          <table border="0" width="419" cellspacing="0" height="24">
            <tr> 
              <td width="197">共 <font color=red><%=totalrec%></font> 条留言 每页 10                   
                条 共 <font color=red><%=totalpage%></font> 页</td>                   
              <td align="right" width="60">                   
                <input type="text" name="page" size="2" maxlength="3" value="<%=page%>">                   
<input type="submit" name="Submit" value="Go">                   
<input type="hidden" name="show" value="<%=show%>">                   
</td>                   
              <td align="right" width="156"> <%if page-1>0 then%><a href="welcomegbview.asp?show=<%=show%>&page=<%=page-1%>">上一页</a><%else%><font color=666666>上一页</font><%end if%> <%if page+1<=totalpage then%><a href="welcomegbview.asp?show=<%=show%>&page=<%=page+1%>">下一页</a><%else%><font color=666666>下一页</font><%end if%> <a href=javascript:history.go(0) title=刷新本页>第<%=page%>页</a></td>                   
</tr>                   
</table>                   
</td>                   
</tr>                   
</form>                   
</table>                   
  <hr noshade size="2" color=009900>                   
<%if page=1 then%>                   
  <table width=431 border=0 cellpadding=4 bgcolor=#DCD8D0>                  
    <tr bgcolor="DCD8D0">                   
      <td width="417">站长公告:<%=gbtop%></td>                   
</tr>                   
</table><%end if                   
for i=1 to UBound(showwritetime)%>                  
<hr noshade size="2" color=009900>                   
  <table width=428 border=0 cellspacing=0 bordercolorlight=DCD8D0 bordercolordark=DCD8D0 cellpadding=0 bgcolor="#DCD8D0" bordercolor="DCD8D0" height="90">                  
    <tr bgcolor="DCD8D0" bordercolor="DCD8D0">                   
      <td width="424">                   
        <table width=100% border=0 cellpadding=0 bgcolor="DCD8D0" height="20">                  
          <tr bgcolor=#DCD8D0>                   
            <td width=10% align=center height="6">写给:</td>                   
            <td width=56% height="6">                   
              <table width="94%" border="0" cellspacing="0" cellpadding="0">                  
                <tr>                    
                  <td width="53%"><%=showtowho(i)%><%if showmm(i)="1" then Response.Write "<font color=red size=3>【悄悄话】</font>"%></td>                   
                  <td align="right" width="47%"><a href="welcomegbwrite.asp?towho=<%=server.URLEncode(showfromwho(i))%>&title=<%=server.URLEncode(showtitle(i))%>">【回复】</a></td>                   
</tr>                   
</table>                   
</td>                   
            <td align=right width=34% height="6"><%=showwritetime(i)%></td>                   
</tr></table>                   
        <hr size="1" width="420">                  
        <table width=100% border=0 bordercolorlight=DCD8D0 bordercolordark=DCD8D0 bgcolor=DCD8D0 bordercolor="DCD8D0" height="63">                  
          <tr bgcolor="#DCD8D0">                   
            <td width=10% align=center bordercolor="DCD8D0" height="10"><font color="#FF0000">主题:</font></td>                  
            <td width=90% bordercolor="DCD8D0" height="10"><b><%=showtitle(i)%></b></td>                  
          </tr>                  
          <tr>                   
            <td width=10% align=center bgcolor="#DCD8D0" bordercolor="DCD8D0" valign="top"><font color=red>内容:</font></td>                  
            <td width=90% bgcolor="#DCD8D0"><font color=0066FF class=l1><%=showintro(i)%></font></td>                  
          </tr>                  
          <tr>                   
            <td colspan="2" align=center bgcolor="#DCD8D0" bordercolor="DCD8D0" valign="top">                  
              <hr size="1" width="420">                  
            </td>                  
          </tr>                  
          <tr>                   
            <td width=10% align=center bgcolor="#DCD8D0" bordercolor="DCD8D0">姓名:</td>                  
            <td width=90% bgcolor="#DCD8D0">                   
              <table width=100% border=0 cellspacing=0 cellpadding=0>                  
                <tr>                   
                  <td><font color=FF0000><a href='#' onMouseOver="window.status='详细资料。';return true" onMouseOut="window.status='';return true" onClick="window.open('friendqueryview.asp?id=<%=showfromwho(i)%>','ph','width=365,height=235,scrollbars=no')" title="详细信息"><b><%=showfromwho(i)%></b></a></font></td>                  
                  <td align=right>                   
                    <%if showemail(i)<>"" then%>                  
                    <a href=mailto:<%=showemail(i)%>>信箱</a>                   
                    <%else%>                  
                    <font color=666666>信箱</font>                   
                    <%end if%>                  
                                        
                    <%if showhomeurl(i)<>"" then%>                  
                    <a href="<%=showhomeurl(i)%>" target="_blank" title="<%=showhomename(i)%>">主页</a>                   
                    <%else%>                  
                    <font color=666666>主页</font>                   
                    <%end if%>                  
                  </td>                  
                </tr>                  
              </table>                  
            </td>                  
          </tr>                  
          <tr bgcolor="#DCD8D0">                   
            <td width=10% align=center bordercolor="DCD8D0" height="2">来自:</td>                  
            <td width=90% height="2"><font color=009966>                   
              <%if showhideip(i)<>"1" then Response.Write showip(i)&" "%>                  
              <%=showaddress(i)%></font></td>                  
          </tr>                  
        </table>                  
      </td>                  
</tr>                  
</table>                  
  <%next%>                   
  <hr noshade size="2" color=009900>                  
  <table width="431" border="0" cellpadding="5" height="10%">                  
    <tr>                   
<td width="72"><a href="welcomegbwrite.asp">书写留言</a></td>                  
<td width="329">                   
<p align=right><%if page-1>0 then%><a href="welcomegbview.asp?show=<%=show%>&page=<%=page-1%>">上一页</a><%else%><font color=666666>上一页</font><%end if%> <%if page+1<=totalpage then%><a href="welcomegbview.asp?show=<%=show%>&page=<%=page+1%>">下一页</a><%else%><font color=666666>下一页</font><%end if%> <a href="#begin">〖回到页首〗</a></p>                  
</td>                  
</tr>                  
</table>                  
</div>                  
</body>                  
</html>                  

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -