'******* PRIVATE MEMBER VARIABLES **********
Private iRecsPerPage
Private strTHString
'*******************************************
'************ Initialize Event *************
Private Sub Class_Initialize()
iRecsPerPage = 10 'assign a default value
End Sub
'*******************************************
'************ PROPERTY LET/GET *************
Public Property Let THString(strValue)
'Replace all apostrophes with \'
strTHString = Replace(strValue, "'", "\'")
End Property
Public Property Get THString()
THString = strTHString
End Property
Public Property Let RecsPerPage(iValue)
If iValue > 0 and IsNumeric(iValue) then
iRecsPerPage = CInt(iValue)
End If
End Property
Public Property Get RecsPerPage()
RecsPerPage = iRecsPerPage
End Property
'*******************************************
'**************** METHODS ******************
Public Function GenerateHTML(objRS)
'Begin by getting an array of the data
Dim aValues
aValues = objRS.GetRows()
'Find the value of rows and columns
Dim iCols, iRows
iCols = UBound(aValues, 1)
iRows = UBound(aValues, 2)
<!--#include file="conn.asp"-->
<%
dim rs,sql
set rs=server.createobject("adodb.recordset")
sql="select * from user where stoped=0 and passed=1 order by u_id desc"
rs.open sql,conn,1,1
pgsize=20
page=request.querystring("page")
rs.pagesize=pgsize
pgnm=rs.pagecount
if page=""or clng(page)<1 then page=1
if clng(page)>pgnm then page=pgnm
if pgnm>0 then rs.absolutepage=page
i=0
%>
<html>
<head>
<title>会员名单</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="style.css" rel="stylesheet" type="text/css">
</head>