📄 index1.asp
字号:
<!--# 飘易留言本系统 v2.0
此留言本系统采用ASP+ACCESS数据库编写,提供给个人用户和非商业用户免费使用。
未经作者许可,严禁用于任何商业行为,否则责任自负。
飘易留言本系统 2.0版改进了以下几点:
1、改进了数据库的md5加密算法。
2、可自主设置每页显示的页数。
3、加强了回复功能,使其具有管理员编辑留言的权限。
4、增加了搜索留言的功能。
5、可在线修改管理员密码。
6、管理员可以添加、删除、编辑和回复留言。
7、增加了留言本访问量的统计功能。。
8、增加了留言本的验证码功能,防止机器人群发软件的留言。
飘易留言本系统 2.0版使用方法如下:
1、解压后,如需修改数据库路径,请在inc/conn.asp里修改相应路径。
2、将根目录下的top.asp和bottom.asp修改为你自己的个性头尾文件。
3、管理员初始用户名和密码均为admin 。
4、默认每页显示10条留言,如需修改,请在index.asp文件里更改 listnum 的值即可。
5、如果您有任何疑问,请与作者flymorn联系;作者主页:飘网中国 http://cn-pn.com 演示地址:
http://cn-pn.com/gb/ 。
6、使用过程中,请勿删除版权信息以尊重作者的劳动。
-->
<% @LANGUAGE = VBScript %>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/sqlfilter.asp"-->
<!--#include file="inc/getverifycode.asp"-->
<%
set rs_hits=server.CreateObject("adodb.recordset")
sql="select * from hits"
rs_hits.open sql,conn,1,3
rs_hits("hits")=rs_hits("hits")+1
rs_hits.update
%>
<html>
<head><title>飘易留言系统_v2.0_飘网中国_www.cn-pn.com</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
.style3 {color: #FF0000}
body {
margin-top: 3px;
margin-bottom: 1px;
background-image: url(images/bg_001.gif);
}
.style4 {color: #003366}
.style5 {color: #993300}
.style6 {
font-size: 18px;
font-weight: bold;
}
a:link {
color: #000000;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: underline;
color: #FF0000;
}
a:active {
text-decoration: none;
color: #0033CC;
}
.style10 {color: #000033}
.style13 {color: #333333}
-->
</style>
<link href="css.css" rel="stylesheet" type="text/css">
<SCRIPT Language="JScript" SRC="xp_ubbcode.js" Runat=Server></SCRIPT>
<style type="text/css">
<!--
.style14 {color: #666666}
-->
</style>
</head>
<body>
<!--#include file="top.asp"-->
<table width="602" height="35" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F9E6EA" class="biao_bdr">
<tr>
<td><div align="center" class="style6"><a href="#add"><img src="images/xie.gif" alt="请您留言" width="80" height="26" border="0" align="absmiddle"></a> <a href="search.asp" target="_blank"><img src="images/sou.gif" alt="搜索留言" width="80" height="26" border="0" align="absmiddle"></a> <a href="copyright.asp" target="_blank"><img src="images/banben.gif" alt="版本说明" width="80" height="26" border="0" align="absmiddle"></a></div></td>
</tr>
</table>
<table width="602" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFCC99" class="biao_bdr">
<tr>
<td width="65"><span class="style3"><strong>公告:</strong></span><img src="images/ann.gif" width="20" height="16" align="absmiddle"></td>
<td><div align="left"><MARQUEE scrollAmount=1 scrollDelay=4 width=535 align="left" onmouseover="this.stop()" onmouseout="this.start()">
<span class="style13">1、飘易留言本系统 v2.0进行测试使用。2、此版本有待美化,希望高手们就美化上多多指导。</span>3、本站提供此版本下载。
</marquee></div></td>
</tr>
</table>
<%
set rs=server.CreateObject("adodb.recordset")
sqlstrc="select * from gb where name<>'' order by id desc"
rs.open sqlstrc,conn,1,1
If rs.eof and rs.bof Then
Response.Write ( "<p align=""center"">暂无留言。</p>" )
Else
filepath=request.servervariables("path_info") '设置路径用
rs.PageSize = listnum '每页显示记录数
pagecount=rs.PageCount
'page=int(request.QueryString ("page"))
page = SafeRequest("page",1)
If page = "" Then
page=1
End If
If (page-Rs.pagecount) > 0 Then
page=Rs.pagecount
End If
if page < 1 Then
page = 1
End If
rs.AbsolutePage=page
%>
<%
For i = 1 to rs.PageSize
if rs.EOF then
Exit For
end if '利用for next 循环依次读出记录
%>
<table width="602" border="0" align="center" cellpadding="0" cellspacing="0" class="biao_bdr">
<tr>
<td><img src="images/bgt.gif" width="600" height="12"></td>
</tr>
</table>
<table width="602" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F9E6EA" class="biao_bdr">
<tr>
<td width="110"><div align="center" class="style10">用户头像</div></td>
<td><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="380"><span class="style5">主题:<%= XP_UBBCode(rs("title").value) %> </span></td>
<td><img src="images/oicq.gif" alt="QQ:<%=rs("qq")%>" width="16" height="16"> <a href="mailto:<%=rs("email")%>"><img src="images/email.gif" alt="邮箱:<%=rs("email")%>" width="16" height="16" border="0"></a> <a href="<%=rs("homepage")%>" target="_blank"><img src="images/homepage.gif" alt="个人主页:<%=rs("homepage")%>" width="16" height="16" border="0"></a> <img src="images/ipinfo.gif" alt="IP:<%=rs("ip")%>" width="16" height="16"></td>
</tr>
</table></td>
</tr>
<tr>
<td><div align="center"><img src="<%=rs("face")%>" alt="【<%=rs("name")%>】的ID为:<%=rs("id")%>" width="64" height="64"></div>
<div align="center" class="style5"> -<br>
【<%= XP_UBBCode(rs("name").value) %>】</div></td>
<td><table width="490" height="90" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="40" colspan="2"> <span class="style13"><%= XP_UBBCode(rs("content").value) %></span></td>
</tr>
<tr>
<td colspan="2"><div align="right">留言时间:<%=rs("time")%></div></td>
</tr>
<tr>
<td width="400"><span style="color: #0033CC">版主回复:<%= XP_UBBCode(rs("repcontent").value) %></span></td>
<td><div align="right"><a href="rep.asp?id=<%=rs("id")%>" target="_self">
</a><a href="rep.asp?id=<%=rs("id")%>" target="_self">
<%If Session("adminchk")="True" Then%>
</a><a href="rep.asp?id=<%=rs("id")%>" target="_self"> 回复</a>|<a href="del.asp?id=<%=rs("id")%>">删除</a>
<%End If%></div>
</td>
</tr>
</table></td>
</tr>
</table>
<%
rs.movenext
next
end if
%>
<table width="602" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#FFCCCC" bgcolor="#FFCCCC" class="biao_bdr">
<tr>
<td>
<form action="<%=filepath%>" method="get">
<div align="center">
<%if page=1 and not page=pagecount then%>
总计<%=rs.RecordCount%>条 每页<%=rs.PageSize%>条 共1/<%=pagecount%>页
<a href="<%=filepath%>?page=<%=page+1%>">下一页</a>
<a href="<%=filepath%>?page=<%=pagecount%>">尾页</a>
<%elseif page=pagecount and not page=1 then%>
总计<%=rs.RecordCount%>条 每页<%=rs.PageSize%>条 共<%=pagecount%>/<%=pagecount%>页
<a href="<%=filepath%>?page=1">首页</a>
<a href="<%=filepath%>?page=<%=page-1%>">上一页</a>
<%elseif page<1 then%>
<%elseif page>pagecount then%>
<%elseif page=1 and page=pagecount then%>
总计<%=rs.RecordCount%>条 每页<%=rs.PageSize%>条 共1/1页
<%else%>
总计<%=rs.RecordCount%>条 每页<%=rs.PageSize%>条 共<%=page %>/<%=pagecount%>页
<a href="<%=filepath%>?page=1">首页</a>
<a href="<%=filepath%>?page=<%=page-1%>">上一页</a>
<a href="<%=filepath%>?page=<%=page+1%>">下一页</a>
<a href="<%=filepath%>?page=<%=pagecount%>">尾页</a>
<%end if%>
<input name="page" size=2 value="<%=page+1%>"> <input type="submit" value="GO" >
</div>
</form>
</td>
</tr>
</table>
<table width="600" align="center" cellpadding="0" cellspacing="0" bgcolor="#F8DEDA" class="biao_bdr">
<tr>
<td width="460">
<form name="add" method="post" action="addok.asp">
<table width="460" height="240" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td> 用户昵称:</td>
<td><input name="name" type="text" id="name" maxlength="15">
<span class="style1 style3">*</span></td>
<td width="120"> </td>
</tr>
<tr>
<td> OICQ号码:</td>
<td><input name="qq" type="text" maxlength="12"></td>
<td width="140" rowspan="6"><img
src="images/201.gif" alt="请选择个人形象代表" width="64" height="64" border="0" align="absbottom" id=face></td>
</tr>
<tr>
<td> 邮箱地址:</td>
<td><input name="email" type="text" maxlength="20"></td>
</tr>
<tr>
<td> 个人网站:</td>
<td><input name="homepage" type="text" maxlength="60"></td>
</tr>
<tr>
<td> 留言主题:</td>
<td><input name="title" type="text" maxlength="26">
<span class="style1 style3">*</span></td>
</tr>
<tr>
<td> 验证功能:</td>
<td> <input name="verifycode" type="text" id="verifycode" size="8" maxlength="8" alt="防止机器人的群发">
<img src="images/code/0<%=mid(Session("verifycode"),1,1)%>.gif" width="16" height="13" alt=""><img src="images/code/0<%=mid(Session("verifycode"),2,1)%>.gif" width="16" height="13" alt=""><img src="images/code/0<%=mid(Session("verifycode"),3,1)%>.gif" width="16" height="13" alt=""><img src="images/code/0<%=mid(Session("verifycode"),4,1)%>.gif" width="16" height="13" alt=""> <span class="style1 style3">*</span></td>
</tr>
<tr>
<td> 选择头像:</td>
<td><select name="face" onChange="document.images['face'].src=options[selectedIndex].value;">
<option value="images/201.gif" selected>女孩1</option>
<option value="images/202.gif">女孩2</option>
<option value="images/203.gif">女孩3</option>
<option value="images/101.gif">男孩1</option>
<option value="images/102.gif">男孩2</option>
<option value="images/103.gif">男孩3</option>
</select></td>
</tr>
<tr>
<td> 留言内容:<br>
<span class="style5"> (仅支持<br>
<a href="UBBcode.htm" target="_blank" title="什么是UBB代码">UBB代码</a>)</span></td>
<td colspan="2"><textarea name="content" cols="50" rows="5" id="textarea"></textarea>
<span class="style1 style3">*</span></td>
</tr>
<tr>
<td> </td>
<td colspan="2">
<input type="hidden" name="ip" value="<%=request.ServerVariables("REMOTE_ADDR")%>">
<input name="repcontent" type="hidden" value="暂无回复">
<input type="submit" name="btnSubmit" id="btnSubmit2" value="提交"/>
<input type="reset" name="Submit2" value="重置"/></td>
</tr>
</table>
</form> </td>
<td><p class="style4"><a href="#"><img src="images/tu1.gif" alt="返回顶部" width="140" height="260" border="0"></a></p> </td>
</tr>
</table>
<table width="602" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#F9BAC5" class="biao_bdr">
<tr>
<td width="660"><div align="center">
<div align="center"><a href="login.asp" target="_self">管理登陆</a>
<%If Session("adminchk")="True" Then%>
<a href="adminpsw_edit.asp">修改密码</a> <a href="logout.asp">退出</a>
<%End If%>
<span class="style13 style14"><strong>您是第<span class="style3"> <%= rs_hits("hits") %> </span>位客人</strong>。</span>
<%rs_hits.close
set rs_hits=nothing %>
</div>
</div></td>
<td><a href="#" style="font-weight: bold; font-size: 16px;">Top</a></td>
</tr>
</table>
<!--#include file="bottom.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -