[ASP]使用类,实现模块化(5)
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>")
Next
Response.Write "</ul><div style=''''top:20px;background-color:#ccc;color:#020;font-weight:bold;bordr-top:2px solid #008;padding:10px 0;color:#b00''''>列表(<a href=default.asp>回到典型模式</a>):"
if Start > 0 then
Response.Write "<A HREF=""?k=read&Start=" & iStart-ipageno &"&pageno=" & ipageno & """>Previous</A>"
end if
if iStop < iRows then
Response.Write " <A HREF=""?k=read&Start=" & iStart+ipageno &"&pageno=" & ipageno & """>Next</A>"
end If
response.write"</div>"
Else
rowid=litter_in(rowid-1,iRows)
response.write("<div style=''''width:85%''''><h4 style=''''text-align:center''''><a href=?k=read&pageno="&pageno&"&start="&start&">返回列表</a></h4></h2><hr/><h5>"&server.htmlencode(data(1,rowid))&"</h5><p>"&server.htmlencode(data(2,rowid))&"<h5>+-----"&server.htmlencode(data(3,rowid))&"")
response.write("<div >")
End if
End Function
''''-----------------------------------------------------------------
Public Function list_ids()
sql3="select * from "&itable&" where id="&iid&" "
startconn()
Set rs=conn.execute(sql3)
If rs.eof And rs.bof Then
data=Array(0,0,0,0)
Else
data=Rs.GetRows()
End If
closers
closeconn
response.write(UBound(data)&":")
response.write(server.htmlencode(data(2,0)))
End function
''''-----------------------------------------------------------------
Public Function rs_top(num,table,whe)
startconn()
sql="select top "&num&" * from "&table&""
sql2="select count(*) as szd_count from "&table&" "" "&whe&""
Set rs=conn.execute(sql2)
szd_count=rs("szd_count")
closers
Set rs = Conn.Execute(sql)
dim data
内容版权声明:除非注明,否则皆为本站原创文章。