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

📄 index.asp

📁 不是我做的一个留言板
💻 ASP
字号:
<%@ Language=VBScript %>
<%
if session("username")="" then
response.redirect "../log.asp"

else

lname=session("username")

%>
<!--#INCLUDE FILE="conn.asp" -->
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="../config.asp" -->
<%
dim rs
dim sql
dim page
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "Select * FROM iZzgbook Order By dateandtime Desc"
rs.open sql,conn,1,1

'----------------------------------------------
IF not IsNumeric(Request("page")) Or IsEmpty(Request("page")) Then
page=1
Else
Page=Int(Abs(Request("page")))
End if
rs.pagesize = 6'------------------每页显示留言数
total  = rs.RecordCount
mypagesize     = rs.pagesize
rs.absolutepage = page
%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="style/style.css">
<title><%=titlemark%>留言</title>
</head>
<body bgcolor="#ffffff">
<div align="center">
<center>
<table border="0" width="600" cellspacing="3" cellpadding="3" height="52">
<tr>
<td width="100%" height="42"><p align="center"><img border="0" src="image/logo.gif" width="400" height="40" alt="我的留言本">
</td>
</tr></table>
</center>
</div>
<div align="center">
  <center><table border="0" width="600" cellpadding="2" height="11"><tr>
<td width="100%" height="5"><p align="center">[<a href="add.asp">签写留言</a>]  
[<a href="../index.asp">返回首页</a>]  
[<a href="mailto:boy_linjin@163.com">站长信箱</a>]&nbsp;</td> 
</tr><tr><td width="100%" height="6">&nbsp; 
     
 </td></tr></table> 
  </center>
</div>
<TABLE bgColor=#000000 border=0 cellPadding=0 cellSpacing=0 width="600" align="center" height="8"> 
<CENTER></center><TR bgColor=#ffffff><TD bgColor=#000000><TABLE border=0 cellPadding=3 cellSpacing=1 height=8 width="100%"><CENTER></center><TR><CENTER> 
            <TD bgColor=#2f5e8c height=19 width=168><font color="#ffffff">&nbsp;<img src="image/FRIEND.GIF" width="16" height="16">作者信息</font></TD> 
</center>
          <TD bgColor=#2f5e8c height=19 width=415> 
            <p align="left"><font color="#ffff00">&nbsp;<img src="image/MESSAGE.GIF" width="16" height="16">留言内容(留言总数:<%=total%>)</font></p>
          </TD> 
</TR></TABLE></TR></TABLE> 
<!-- Start -->
<%
'######################################################################
'以下显示留言
'######################################################################
dim i 
i=1
do while not rs.eof  and mypagesize>0
id=rs("gbookid")
name=rs("name")
email=rs("email")
homepage=rs("homepage")
oicq=rs("oicq")
head=rs("head")
content=rs("content")
content=Autolink(content)
dateandtime=rs("dateandtime")
reply=rs("reply")
sex=rs("sex")
rltime=rs("rltime")
%>
<center><TABLE a bgColor=#000000 border=0 cellPadding=0 cellSpacing=0 height=1 width='600'> 
<TR bgColor=#ffffff width="100%"><TD bgColor=#000000 height=1 width="100%"> 
<TABLE border=0 cellPadding=3 cellSpacing=1 height=8 width="100%"><TBODY><TR> 
<TD bgColor=#f7f7f7 height=8 rowSpan=3 vAlign=top width=168> 
<TABLE><font color="#000000">留言:NO.<%=i+(page-1)*rs.pagesize%></font> 
<TBODY></TBODY></TABLE><div align="center"><center><TABLE border=0 cellPadding=0 cellSpacing=0> 
<TBODY><TR><TD align=middle><font color="#000000"><img src="image/0<%=sex%>.gif" width="32" height="32"></font></TD></TR></TBODY></TABLE></center></div> 
              <P>姓名:<font color="#000000"><%=name%></font> <BR>
                来自:<font color="#000000"><%=rs("ip")%></font><br>
                邮件:<IMG border=0 src="image/mail.gif" width="15" height="15"><a href="mailto:<%=email%>" title="给<%=name%>发信">邮件</a> 
                <BR>
                主页:<IMG border=0 src="image/home.gif" width="15" height="15"><a href="<%=homepage%>" target="_blank" title="访问<%=name%>的主页">主页</a><br>
                OICQ: <img src="image/OICQ.GIF" width="16" height="16" alt="<%=name%>的qq号"><%=oicq%><BR>
              </P>
            </TD> 
<TD bgColor=#ffffff height=1 width=415><IMG src="image/1.gif" width="18" height="18"> 发表于:<%=dateandtime%><TR><TD bgColor=#ffffff height=95 width=415><TABLE border=0 cellPadding=3 cellSpacing=0 height="100%" width="100%"><TBODY><TR><TD vAlign=top width="100%" height="94"><img src="face/<%=head%>" width="20" height="20"><font color="#003366"><%=content%></font>
<%
if reply<>"斑竹很快就会回复你的哦 :-)" then
%><BR><BR>
                    <font color='#ff0000'><img src="image/FOOT.GIF" width="16" height="16">斑竹回复:<font color="#000000">(<img src="image/CLOCK.GIF" width="11" height="11">:<font color="red"><%=rltime%>)</font></font></font><BR>
&nbsp;&nbsp;<font color="green"><%=reply%></font>
<%else%>
<BR><BR>
                    <font color="#ff0000"><img src="image/REPLYNOW.GIF" width="16" height="16">系统自动回复:</font><BR>
                    &nbsp;&nbsp;<font color="green">斑竹很快就会回复你的哦 :)</font> 
                    <%
end if
%>
                  </TD>
                </TR></TBODY></TABLE><TR>  
            <TD bgColor=#f7f7f7 height=10 width=415>&nbsp; <a href="mailto:<%=email%>" title="给<%=name%>发信"><IMG border=0 src="image/mail.gif" width="15" height="15">&nbsp;邮件</a>&nbsp; 
              <a href="<%=homepage%>" target="_blank" title="访问<%=name%>的主页"><IMG border=0 src="image/home.gif" width="16" height="16">主页</a>&nbsp;<IMG alt='<%=name%>的IP地址是:<%=rs("ip")%>' border=0 src="image/ip.gif" width="13" height="15">&nbsp;IP 
              &nbsp;<a href="reply.asp?gbookid=<%=id%>" title="回复该留言(只有版主才有回复的权利!)"><IMG border=0 src="image/replay.gif" width="16" height="16">回复</a> 
              &nbsp;<a href="del.asp?gbookid=<%=id%>" title="删除该留言"><IMG border=0 src="image/del.gif" width="11" height="11">删除</a></TD>
          </TR></TBODY></TABLE></TR></TABLE></CENTER>
 <%
mypagesize=mypagesize-1
i=i+1
rs.movenext
loop
%>
<!-- ended -->  
<table border="0" width="100%" height="1" cellpadding="0">  
<tr>
<td width="100%" height="1">
      <p align="center"><br>  
页数:&nbsp;  
<%
if page>1 then%>
<a href='index.asp?page=<%=page-1%>'>上一页</a>
<%
end if
%>
 <%
 if rs.pagecount <= 8 then
for j=1 to rs.pagecount
response.write "[<a href='index.asp?page="&j&"'>"&j&"</a>]"'--------------暂时先用这吧
next
else
for j=1 to 8
response.write "[<a href='index.asp?page="&j&"'>"&j&"</a>]&nbsp;"
next
response.write  "[<a href='index.asp?page="&rs.pagecount&"' title='最后一页'>&gt;&gt;</a>]"
end if
%> 
<%
if page<rs.pagecount   then%>
<a href='index.asp?page=<%=page+1%>'>下一页</a>
<%
end if
%></td>
&nbsp;
    
</tr></table><HR noShade SIZE=1 width="80%" color="#000000"><div align="center"><center>  
<TABLE border=0 cellSpacing=4 width=545 height="21">
<TBODY><TR align=middle><TD class=unnamed1 width=533 height="15">
          <P align=center>麻婆豆腐工作室 版权所有<br>
             http://www.hztt.com http://www.chinastudy.cc/bbs</P>
        </TD></TR></TBODY></TABLE>
</center></div>  
</body>  
<%
rs.close
set rs=nothing
conn.close
set conn=nothing'--------------------------真是糊涂啊~~~~~~~~~~~~~~~~~
%>
<%end if%>

⌨️ 快捷键说明

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