📄 listblogger.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="inc/bloginfo.asp"-->
<!--#include file="inc/syscode.asp"-->
<!--#include file="inc/function.asp"-->
<%
response.Write "<title>"&sitetitle&"--博客列表</title>"& vbcrlf
response.Write "</head>"& vbcrlf
response.Write "<body>"& vbcrlf
dim show
dim mainsql,usertype,strurl
strurl="listblogger.asp"
usertype=cint(request.QueryString("usertype"))
call sysshow()
if usertype>0 then
strurl="listblogger.asp?usertype="&usertype
mainsql="where usertypeid="&usertype
else
mainsql=""
end if
call sub_showuserlist(mainsql,strurl)
show=replace(show,"$show_list$",show_userlist)
response.Write show
call bottom()
sub sub_showuserlist(sql,strurl)
dim topn
dim msql
MaxPerPage=show_listuser_num
strFileName=strurl
if request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if
msql="select username,blogname,sex,useremail,icq,msn,logcount,homepage,adddate from [user] "&sql&" order by userid desc"
Set rsmain=Server.CreateObject("Adodb.RecordSet")
rsmain.Open msql,Conn,1,1
if rsmain.eof and rsmain.bof then
show_userlist=show_userlist & "共调用0位博客<br>"
else
totalPut=rsmain.recordcount
show_userlist=show_userlist & "共调用" & totalPut & " 位博客<br>"
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
getlist()
show_userlist=show_userlist&fshowpage(strFileName,totalput,MaxPerPage,false,true,"位博客")
else
if (currentPage-1)*MaxPerPage<totalPut then
rsmain.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rsmain.bookmark
getlist()
show_userlist=show_userlist&fshowpage(strFileName,totalput,MaxPerPage,false,true,"位博客")
else
currentPage=1
getlist()
show_userlist=show_userlist&fshowpage(strFileName,totalput,MaxPerPage,false,true,"位博客")
end if
end if
end if
rsmain.Close
set rsmain=Nothing
end sub
sub getlist()
dim rstmp,i
dim title
set rstmp=conn.execute("select typename from usertype where id="&usertype)
if not rstmp.eof then
show_userlist="当前位置:<a href='index.asp'>首页</a>→博客类别("&rstmp(0)&")<hr noshade>"
end if
set rstmp=nothing
show_userlist=show_userlist&"<table width='100%' align='center' cellpadding='0' cellspacing='1'>"& vbcrlf
show_userlist=show_userlist&"<tr height='25' ><td width='100' > <div align='center'><strong>用户id</strong></div></td>"& vbcrlf
show_userlist=show_userlist&"<td> <div align='center'><strong>blog名</strong></div></td>"& vbcrlf
show_userlist=show_userlist&"<td width=180> <div align='center'><strong>EMAIL</strong></div></td>"& vbcrlf
show_userlist=show_userlist&"<td width=40> <div align='center'><strong>日志</strong></div></td>"& vbcrlf
show_userlist=show_userlist&"</tr>"& vbcrlf
do while not rsmain.eof
title="======== 用 户 信 息 ========" & vbcrlf & "性别:"
if rsmain(2)=1 then
title=title& "男"
else
title=title& "女"
end if
title=title& vbcrlf & "信箱:" & rsmain("userEmail") & vbcrlf & "QQ:"
if rsmain(4)<>"" then
title=title& rsmain(4)
else
title=title& "未填"
end if
title=title& vbcrlf & "MSN:"
if rsmain(5)<>"" then
title=title& rsmain(5)
else
title=title& "未填"
end if
title=title& vbcrlf & "主页:"
if rsmain(7)<>"" then
title=title& rsmain(7)
else
title=title& "未填"
end if
title=title& vbcrlf & "注册日期:" & rsmain(8)
show_userlist=show_userlist&"<tr height='22' bgColor=#ffffff><td> <div align='center'><a href='blog.asp?name="&rsmain(0)&"' title='点击进入"&rsmain(0)&"的blog页面"& vbcrlf&title&"'>"&rsmain(0)&"</a></div></td>"& vbcrlf
show_userlist=show_userlist&"<td><div align='center'>"&rsmain(1)&"</div></td>"& vbcrlf
show_userlist=show_userlist&"<td><div align='center'><a href='mailto:"&rsmain(3)&"' title='点击发送 Email'>"&rsmain(3)&"</div></td>"& vbcrlf
show_userlist=show_userlist&"<td><div align='center'>"&rsmain(6)&"</div></td>"& vbcrlf
show_userlist=show_userlist&"</tr>"& vbcrlf
rsmain.movenext
i=i+1
if i>=MaxPerPage then exit do
loop
show_userlist=show_userlist&"</table>"
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -