使用类,实现模块化(4)


Private Sub closers()
rs.close
Set rs=Nothing
response.write("<strong style='color:#085420'>关闭数据库RS</strong>.......<br/>")

End Sub

'-----------------------------------------------------------------
Property Get havese
havese=isession
End Property

Property Let havese(yoursession)
isession=yoursession
If yoursession="" Then
isession="nodef"
End If
End Property

'-----------------------------------------------------------------
Public Function makesession(arraydata)
If IsArray(arraydata) then
makear=arraydata
Else
makear=Array(0,0,0,0)
End If
If isession="" Then
isession="nodef"
End if
session(isession)=makear
End Function
'-----------------------------------------------------------------

private Function getsession()
thisget=session(isession)
If Not IsArray(thisget) Then
thisget=Array(0,0,0,0)
End If
Getsession=thisget
End function
'-----------------------------------------------------------------
Property Get ConnectString 
ConnectString = sqlstr
End Property
Property Let ConnectString(str) 
sqlstr = str
End Property
'-----------------------------------------------------------------

Property Get getid 
getid = iid
End Property
Property Let getid(id) 
iid = id
End Property
'-----------------------------------------------------------------

Property Get gettable 
gettable = itable
End Property
Property Let gettable(table) 
itable = table
End Property
'-----------------------------------------------------------------
'------------------------------------------------------------------
public Function readarraysession(iStart,ipageno,irowid)
rowid=killint(irowid,0,0)
start=killint(istart,0,0)
pageno=killint(ipageno,5,5)
data=getsession
iRows = UBound(data, 2)
iCols = UBound(data, 1)
response.write("<h5>总数获得了:")
response.write("<b> "&iRows+1&"</b>条信息</h5><hr/><ul style='width:100%;'>")
If rowid = 0 then
If iRows > (ipageno + iStart) Then
iStop = ipageno + iStart - 1
Else
iStop = iRows
End If
For iRowLoop = Start to iStop
Response.Write ("<li style='padding:4px 0;'><a href=?k=read&rowid="&irowloop+1&">"&data(1, iRowLoop) & " </a><span style='padding:4px 0 4px 10px;background-color:#ccc; '>较慢,不推荐点击--><a href=?k=list&id="&data(0,irowloop)&">更新</a></span></li>")

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/3476.html