<!--#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)
show=replace(show,"$show_list$",show_list)
response.Write show&oblog.site_bottom
sub sub_showuserlist(sql,strurl)
	dim topn,msql
	MaxPerPage=oblog.setup(45,0)
	strFileName=strurl
	if request("page")<>"" then
    	currentPage=cint(request("page"))
	else
		currentPage=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
    	totalPut=rsmain.recordcount
		'show_list=show_list & "共调用" & 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_list=show_list&oblog.showpage(strFileName,totalput,MaxPerPage,false,true,"位博客之星")
   	 	else
   	     	if (currentPage-1)*MaxPerPage<totalPut then
         	   	rsmain.move  (currentPage-1)*MaxPerPage
         		dim bookmark
           		bookmark=rsmain.bookmark
            	getlist()
            	show_list=show_list&oblog.showpage(strFileName,totalput,MaxPerPage,false,true,"位博客之星")
        	else
	        	currentPage=1
           		getlist()
           		show_list=show_list&oblog.showpage(strFileName,totalput,MaxPerPage,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>→所有博客之星(共有" & totalPut & "位)<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>=MaxPerPage then exit do	
	loop		
	show_list=show_list&"</table>"
end sub
%>
