listblogstar.asp

来自「是个不错的文件代码,希望大家好好用,」· ASP 代码 · 共 81 行

ASP
81
字号
<!--#include file="inc/inc_syssite.asp"-->
<!--#include file="inc/syscode.asp"-->
<%
dim mainsql,usertype,strurl,rsmain,show_list
strurl="listblogstar.asp"
call sysshow()

call sub_showuserlist(mainsql,strurl)
G_P_Show=replace(G_P_Show,"$show_list$",show_list)
response.Write G_P_Show&oblog.site_bottom
sub sub_showuserlist(sql,strurl)
	dim topn,msql
	G_P_PerMax=Int(oblog.CacheConfig(36))
	G_P_FileName=strurl
	if request("page")<>"" then
    	G_P_This=cint(request("page"))
	else
		G_P_This=1
	end if
	msql="select * from [oblog_blogstar] where ispass=1 order by addtime desc"
	if not IsObject(conn) then link_database
	Set rsmain=Server.CreateObject("Adodb.RecordSet")
	'response.Write(msql)
	rsmain.Open msql,Conn,1,1
  	if rsmain.eof and rsmain.bof then
		show_list=show_list & "共调用0位博客之星<br>"
	else
    	G_P_AllRecords=rsmain.recordcount
		'show_list=show_list & "共调用" & G_P_AllRecords & " 位博客之星<br>"
		if G_P_This<1 then
       		G_P_This=1
    	end if
    	if (G_P_This-1)*G_P_PerMax>G_P_AllRecords then
	   		if (G_P_AllRecords mod G_P_PerMax)=0 then
	     		G_P_This= G_P_AllRecords \ G_P_PerMax
		  	else
		      	G_P_This= G_P_AllRecords \ G_P_PerMax + 1
	   		end if

    	end if
	    if G_P_This=1 then
        	getlist()
        	show_list=show_list&oblog.showpage(false,true,"位博客之星")
   	 	else
   	     	if (G_P_This-1)*G_P_PerMax<G_P_AllRecords then
         	   	rsmain.move  (G_P_This-1)*G_P_PerMax
         		dim bookmark
           		bookmark=rsmain.bookmark
            	getlist()
            	show_list=show_list&oblog.showpage(false,true,"位博客之星")
        	else
	        	G_P_This=1
           		getlist()
           		show_list=show_list&oblog.showpage(false,true,"位博客之星")
	    	end if
		end if
	end if
	rsmain.Close
	set rsmain=Nothing
end sub

sub getlist()
	dim rstmp,i
	show_list="当前位置:<a href='index.asp'>首页</a>→所有博客之星(共有" & G_P_AllRecords & "位)<hr />"
	show_list=show_list&"<table width='100%'  align='center' cellpadding='0' cellspacing='1'>"& vbcrlf
	show_list=show_list&"<tr height='25' ><td width='100' align='center'><strong>图片</strong></td>"& vbcrlf
	show_list=show_list&"<td align='left' width=180 > <strong>blog名</strong></td>"& vbcrlf
	show_list=show_list&"<td align='left'> <strong>简介</strong></td>"& vbcrlf
	show_list=show_list&"</tr>"& vbcrlf
    do while not rsmain.eof	
		show_list=show_list&"<tr><td align='center'> <a href='"&rsmain("userurl")&"' target='_blank'><img src="""&rsmain("picurl")&"""  hspace=""3"" border=""0"" vspace=""3"" alt='"&oblog.filt_html(rsmain("blogname"))&"' /></a></td>"& vbcrlf
		show_list=show_list&"<td align='left'><a href='"&rsmain("userurl")&"' target='_blank'>"&oblog.filt_html(rsmain("blogname"))&"</a></td>"& vbcrlf
		show_list=show_list&"<td align='left'>"&oblog.filt_html(rsmain("info"))&"</td>"& vbcrlf
		show_list=show_list&"</tr>"& vbcrlf
		rsmain.movenext
		i=i+1
		if i>=G_P_PerMax then exit do	
	loop		
	show_list=show_list&"</table>"
end sub
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?