|
<%
RSobj.AbsolutePage = Page
For iPage = 1 To RSobj.PageSize
if ipage mod 2=0 then
color="#ffff00"
else
color="#eedfef"
end if
Response.Write ("<TR bgcolor=orange>")
response.write "<td>"
response.write "昵称:"&rsobj.fields(1).value
response.write "</td>"
response.write "<td>"
response.write "留言主题:"&rsobj.fields(2).value
response.write "</td>"
Response.Write "</TR>"
response.write "<tr>"
response.write "<td>"
response.write "留言内容:"&rsobj.fields(3).value
response.write "</td>"
response.write "</tr>"
response.write "<tr>"
response.write "<td>"
response.write "留言时间:"&rsobj.fields(4).value
response.write "</td>"
response.write "<td>"
response.write rsobj.fields(5).value
response.write "</td>"
response.write "</tr>"
if rsobj("username")=session("user") then
response.write "<tr>"
response.write "<td>"
session("id1")=rsobj("id")
response.write "<td>"
response.write "<a href=inde1.asp?id1="&rsobj("id")&">删除</a>"
response.write "</td>"
end if
RSobj.MoveNext
If RSobj.EOF Then Exit For
Next
Response.Write "</TABLE></CENTER>"
End Sub
%>
<% SQL = "Select * From guset order by time desc"%>
<%Set ConnObj = Server.CreateObject("ADODB.Connection")
DbPath= Server.MapPath("db.mdb")
ConnObj.open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DbPath
Set RSobj =Server.CreateObject ("ADODB.Recordset")
RSobj.Open SQL,ConnObj,adOpenStatic
%>
<hr>
<%
RecNum=RSobj.recordCount
pSize=5
if pSize=0 then
pSize=session("pSize")
end if
RSobj.PageSize=pSize
session("pSize")=pSize
response.write "<Center>共有留言信息 "&RecNum&" 条,"&" 分"&RSobj.PageCount&"页显示<br>"
Page=request("Page")
If Request("Page") = "" Then
Page=1
else
Page = CLng(Request("Page"))
If Page < 1 Then Page = 1
If Page > RSobj.PageCount Then Page = RSobj.PageCount
End If
DispPage RSobj, Page
%>
<%
If Page <> 1 Then
Response.Write "<A href=inde1.asp?Page=1& >第一页</A> "
Response.Write "<A href=inde1.asp?Page="&(Page-1)&">上一页</A> "
End If
If Page <> RSobj.PageCount Then
Response.Write "<A href=inde1.asp?Page="&(Page+1)&">下一页</A> "
Response.Write "<A href=inde1.asp?Page=" & RSobj.PageCount & ">最后一页</A> "
End If
%>
页数: <%=Page%>/ <%=RSobj.PageCount%>
我开始运行的时候还能显示.,不知再次运行的时候,.就不能显示了.
显示错误.缺少一个End 结束语.
请各位帮我看看.我看了很久不知怎么改.
小第在线等... |
|