<! -- # Include file = "conn. asp" --> // call the database,
<%
'Dim pagesize
'SQL = "select top 1 * from [pagesize] order by id desc"
'Rs. open SQL, conn, 1, 1
'Pagesize = rs ("pagesize ")
'Rs. Close
If session ("pagesize") = "" Then session ("pagesize") = 9
Dim page
Page = unescape (Request. QueryString ("page "))
If page <> "" Then
SQL = "select * from [test] order by id asc"
Rs. open SQL, conn, 1, 1
If rs. eof Then
Response. Write (escape ("no data "))
Else
Rs. pagesize = session ("pagesize ")
Page = CLng (page)
If page <1 Then
Page = 1
ElseIf page> rs. pagecount Then
Page = rs. pagecount
End If
Rs. absolutepage = page
Dim I, str
Str = str & "<div style = 'margin: 0'>"
For I = 1 To rs. pagesize
Str = str & rs ("id ")&". <a href = '"& rs (" weburl ") &" 'title =' go to this website 'target = '_ blank'> "& rs (" webname ") & "</a> <br/>"
Rs. movenext
If rs. eof Then Exit
Next
Str = str & "</div> <div style = 'margin-top: 10px; line-height: 30px; text-align: left; border-top: 1px #999 solid'>"
Str = str & "<a href = 'javascript: void (getweblist (1) '> </a>"
For I = 1 To rs. pagecount
If I = page Then
Str = str & "<span style = 'font-weight: bold; color: red; font-size: 16px; '>" & I & "</span>"
Else
Str = str & "<a href = javascript: void (getweblist (" & I & ")>" & I & "</a>"
End If
Next
Str = str & "<a href = 'javascript: void (getweblist (" & rs. pagecount & ") '>>></a>"
Str = str & "</div>"
Str = escape (str)
Response. Write (str)
End If
Rs. Close
Set rs = Nothing
Conn. Close
Set conn = Nothing
Else
Response. Write (escape ("Error: The page number cannot be blank! "))
End If
%>