<%
'获取登陆用户的留言
name=Session("UserName")
set rs=server.createobject("adodb.recordset")
sql="select * from book where name='"&name&"' order by id desc"
rs.open sql,conn,1,1
dim MaxPerPage
MaxPerPage=10'一页显示记录数
'取得页数,并判断留言输入的是否数字类型的数据,如不是将以第一页显示
dim text,checkpage
text="0123456789"
Rs.PageSize=MaxPerPage
for i=1 to len(request("page"))
checkpage=instr(1,text,mid(request("page"),i,1))
if checkpage=0 then
exit for
end if
next
If checkpage<>0 then
If NOT IsEmpty(request("page")) Then
CurrentPage=Cint(request("page"))
If CurrentPage < 1 Then CurrentPage = 1
If CurrentPage > Rs.PageCount Then CurrentPage = Rs.PageCount
Else
CurrentPage= 1
End If
If not Rs.eof Then Rs.AbsolutePage = CurrentPage end if
Else
CurrentPage=1
End if
call list
'显示帖子的子程序
Sub list()%>
<table width="90%" height="19" border="0" align="center" cellpadding="0" cellspacing="0">
<tr><td width="21%" height="18" bgcolor="#eeeeee"><img src="images/arrow.gif" width="16" height="13"><strong>留言列表</strong></td>
<td width="79%" bgcolor="#eeeeee">
<%Response.write "<strong><font color='#000000'>-> 全部-</font>"
Response.write "共</font>" & "<font color=#FF0000>" & Cstr(Rs.RecordCount) & "</font>" & "<font color='#000000'>条留言</font></strong> "
Response.write "<strong><font color='#000000'>第</font>" & "<font color=#FF0000>" & Cstr(CurrentPage) & "</font>" & "<font color='#000000'>/" & Cstr(rs.pagecount) & "</font></strong> "
If currentpage > 1 Then
response.write "<strong><a href='NetBook.asp?&page="+cstr(1)+"'><font color='#000000'>首页</font></a><font color='#ffffff'> </font></strong>"
Response.write "<strong><a href='NetBook.asp?page="+Cstr(currentpage-1)+"'><font color='#000000'>上一页</font></a><font color='#ffffff'> </font></strong>"
Else
Response.write "<strong><font color='#000000'>上一页 </font></strong>"
End if
If currentpage < Rs.PageCount Then
Response.write "<strong><a href='NetBook.asp?page="+Cstr(currentPage+1)+"'><font color='#000000'>下一页</font></a><font color='#ffffff'> </font>"
Response.write "<a href='NetBook.asp?page="+Cstr(Rs.PageCount)+"'><font color='#000000'>尾页</font></a></strong> "
Else
Response.write ""
Response.write "<strong><font color='#000000'>下一页</font></strong> "
End if
%> </td></tr>
<tr><td height="1" colspan="2" bgcolor="#999999"></td></tr>
</table>
<%
If rs.eof and rs.bof then
response.write ""
response.end
End if
%> <br> <table width="90%" height="18" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#666666">
<tr bgcolor="#99CCFF">
<td width="56%" height="25" align="center" bgcolor="#CCCCCC">
<p align="center"><font color="#000000"><b>留言主题</b></font>(单击标题查看回复留言)</p></td>
<td width="22%" height="21" align="center" bgcolor="#CCCCCC"><font color="#000000"><b>时间</b></font></td>
<td width="22%" height="21" align="center" bgcolor="#CCCCCC"><font color="#000000"><b>回复</b></font></td>
</tr>
<%
if not rs.eof then
i=0
do while not rs.eof
%>
<tr bgcolor="#99CCFF">
<td height="22" bgcolor="#FFFFFF"> <a href="javascript:window.open('NetBookRe.asp?id=<%=rs("id")%>&name=<%=rs("name")%>')">
<%=rs("title")%></a></td>
<td height="1" bgcolor="#FFFFFF" align="center"> <%=rs("time")%></td>
<td height="1" bgcolor="#FFFFFF" align="center"> <%If rs("rebook")<>"" Then%> <a href="javascript:window.open('NetBookRe.asp?id=<%=rs("id")%>&name=<%=rs("name")%>')">回复</a>
<%else%>
无
<%End If%> </td>
</tr>
<%
i=i+1
if i >= MaxPerpage then exit do
rs.movenext
loop
end if
%>
<%end sub%>
没有合适的资源?快使用搜索试试~ 我知道了~
ASP网站设计与开发整站实例教程
共992个文件
jpg:395个
gif:373个
asp:144个
5星 · 超过95%的资源 需积分: 10 49 下载量 137 浏览量
2010-07-12
15:45:54
上传
评论
收藏 8.26MB RAR 举报
温馨提示
本书是一本完全以实际工作中的真实网站《师生作品展示平台》为创作素材的ASP程序代码开发的技能实训书。书中的模块代码在注重执行效率的同时,是笔者严格按照统一代码缩进、统一命名规范的原则精心编写的。代码注释规范而且非常全面,关键代码和函数几乎每行语句均有注释。 每模块根据“模拟制作任务”、“知识点拓展”、“独立实践任务”、“职业技能知识点考核”的结构来组织学习内容,全方位剖析ASP在网页设计制作中的流程和拓展领域。作者根据在网页设计公司多年的实际工作经验,精心挑选了有侧重点的实例进行讲解,让读者摆脱了成为只会操作不会设计的“软件奴隶”,大大提高其综合设计方面的技能。
资源推荐
资源详情
资源评论
收起资源包目录
ASP网站设计与开发整站实例教程 (992个子文件)
global.asa 608B
syscode.asp 46KB
main.asp 22KB
trainWork_show2.asp 16KB
trainWork_show1.asp 15KB
works_manage.asp 12KB
NetBook.asp 12KB
md5.asp 11KB
md5.asp 11KB
student_manage.asp 11KB
nclass.asp 11KB
function.asp 10KB
function.asp 10KB
function.asp 10KB
works_add.asp 10KB
works_edit.asp 10KB
News_Manage1.asp 10KB
UploadPic.asp 10KB
News_modi.asp 7KB
UserReg.asp 7KB
student_add.asp 7KB
student_edit.asp 7KB
anclass.asp 6KB
User_Manage.asp 6KB
worksList.asp 6KB
UserModify.asp 6KB
News_Manage.asp 6KB
teacher_index.asp 6KB
EditBox.asp 6KB
worksList_flv.asp 6KB
News_Manage加删除确定功能5.asp 6KB
News_add.asp 6KB
News_Manage加全选框4.asp 5KB
UserRegPost.asp 5KB
renpassword.asp 5KB
News_Manage加分页显示3.asp 5KB
uploadFileClass.asp 5KB
menu.asp 5KB
Book_Manage.asp 4KB
teachershow.asp 4KB
News_ClassManage.asp 4KB
campus_news.asp 4KB
News_ClassAddSmall.asp 4KB
test.asp 4KB
onlineuser.asp 4KB
design_enjoy.asp 4KB
News_ClassModifyBig.asp 3KB
News_ClassModifySmall.asp 3KB
login.asp 3KB
News_Manage加标题查询2.asp 3KB
News_ClassAddSmall11.asp 3KB
News_Manage不加分页1.asp 3KB
flashplay.asp 3KB
Book_Re.asp 3KB
teacher_manage.asp 3KB
News_Managetest.asp 3KB
News_ClassAddBig.asp 3KB
upfile_flash.asp 3KB
upfile_flash.asp 3KB
upfile_flash.asp 3KB
works_save.asp 3KB
NetBookRe.asp 3KB
UploadPic.inc.asp 3KB
News_ClassManage111.asp 3KB
trainWork_show3.asp 2KB
upload_flash.asp 2KB
upload_flash.asp 2KB
upload_flash.asp 2KB
Book_Manage取数据.asp 2KB
nclass_save.asp 2KB
student._save.asp 2KB
campus_news_page.asp 2KB
teacher_set.asp 2KB
intro.asp 2KB
4-21.asp 2KB
anclass_save.asp 1KB
config.asp 1KB
chkadmin.asp 1KB
4-22.asp 1KB
News_save.asp 1KB
2-2.asp 1KB
UserLogin.asp 1KB
News_Del.asp 1KB
NetBookSave.asp 882B
3-12.asp 800B
admin.asp 799B
teacher_detele.asp 736B
EditBox.inc.asp 716B
4-2-1.asp 681B
3-1-1.asp 622B
2-1-1.asp 527B
News_ClassDelSmall.asp 496B
3-8.asp 485B
News_ClassDelBig.asp 477B
4-11.asp 468B
4-2-2.asp 445B
index.asp 410B
4-1.asp 394B
Conn.asp 386B
Conn.asp 386B
共 992 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10
资源评论
- qiage8882013-09-18正学ASP呢 正需要呢 赞
- cnbikie2013-01-19看了一下,是我需要的,最需要的才是最好的
liluse
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功