📄 kzsub.asp
字号:
<!-- #include file="conn.asp" -->
<!-- #include file="function.asp" -->
<!-- #include file="pub.asp" -->
<!-- #include file="config.asp" -->
<%
sub chakan(dtable,fs,pagename,msgtxt,n)
response.Write(msgtxt&"<hr>")
If Len(Trim(Request("page")))=0 Then
page=1
Else
page=CInt(Trim(Request("page")))
End If
set rs=Server.CreateObject("ADODB.RecordSet")
sql="select * from "& dtable &" order by "&fs&" desc "
rs.open sql,conn,1,1
rs.PageSize=5
if not rs.eof then '--------------
rs.AbsolutePage=page
mm=m+1
for m=mm to rs.PageSize+mm
if (m mod 2)=0 then
bg="drag1"
else
bg="drag2"
end if
if strcomp("users",dtable)=0 then
if n=0 then
msgstringshow=strformat("用户名:"&rs("username"),15)
msgstringshow=msgstringshow & strformat(rs("email"),15)
msgstringshow=msgstringshow & strformat(rs("regtime"),20)
msgstringshow=msgstringshow & strformat(rs("ip"),15)
msgstringshow=msgstringshow & strformat(rs("addr"),20)
end if
if n=1 and len(rs("tiebaname"))>0 then
msgstringshow=strformat("用户名:"&rs("username"),15)
msgstringshow=msgstringshow & strformat(rs("email"),15)
msgstringshow=msgstringshow & strformat(rs("regtime"),20)
msgstringshow=msgstringshow & strformat(rs("ip"),15)
msgstringshow=msgstringshow & strformat(rs("addr"),20)
end if
end if
'response.Write(" <tr ><td colspan=""6"" >")
response.Write(" <div class="&bg&" onMouseOver=postid("&rs("id")&")>"&msgstringshow&"</div>")
' response.Write(" </td></tr>")
rs.movenext
if rs.EOF Then Exit For
next
end if
'response.Write(" <tr><td colspan=""6"" class=""tback"">")
if page <>1 then
Response.Write "<a class=tback href="&pagename&"page=1>首页</a> "
end if
tmppage = page - 1
if tmppage <= 0 then
tmppage = 1
else
Response.Write"<a class=tback href="&pagename&"page="&tmppage&">上一页</a>"
end if
tmppage = page + 1
if tmppage >rs.PageCount then
tmppage = page
else
Response.Write " <a class=tback href="&pagename&"page="&tmppage&">下一页</a> "
end if
if Cstr(page) <> Cstr(rs.PageCount) and Cstr(rs.PageCount) <> 0 then
Response.Write "<a class=tback href="&pagename&"page="&rs.PageCount&">尾页</a>"
end if
if Cstr(rs.PageCount) <> 0 then
Response.Write " 第<font color='#CCCCCC'>" & page & "/"&rs.PageCount&"</font>页"
end if
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -