%
dim mainsql,classid,strurl,rsmain,show_list,ustr
dim keyword,selecttype,isbest,bstr1,userid
classid=clng(request.QueryString("classid"))
keyword=EncodeJP(oblog.filt_badstr(request("keyword")))
selecttype=oblog.filt_badstr(request("selecttype"))
isbest=clng(request.QueryString("isbest"))
userid=clng(request.QueryString("userid"))
call sysshow()
strurl="list.asp"
if classid<>0 then
set rsmain=oblog.execute("select id from oblog_logclass where parentpath like '"&classid&",%' OR parentpath like '%,"&classid&"' OR parentpath like '%,"&classid&",%'")
while not rsmain.eof
ustr=ustr&","&rsmain(0)
rsmain.movenext
wend
ustr=classid&ustr
mainsql=" and oblog_log.classid in ("&ustr&")"
'mainsql=" and oblog_log.classid="&classid
strurl="list.asp?classid="&classid
end if
if keyword<>"" then
select case selecttype
case "topic"
mainsql=" and topic like '%"&keyword&"%'"
strurl="list.asp?keyword="&keyword&"&selecttype="&selecttype
case "logtext"
if oblog.setup(77,0)=1 then
mainsql=" and logtext like '%"&keyword&"%'"
strurl="list.asp?keyword="&keyword&"&selecttype="&selecttype
else
oblog.adderrstr("当前系统已经关闭日志内容搜索。")
oblog.showerr
end if
case "id"
mainsql=" and author like '%"&keyword&"%'"
strurl="list.asp?keyword="&keyword&"&selecttype="&selecttype
end select
end if
if isbest=1 then
mainsql=mainsql&" and isbest=1"
if strurl="list.asp" then
strurl=strurl&"?isbest=1"
else
strurl=strurl&"&isbest=1"
end if
bstr1="→精华日志"
end if
if userid>0 then
mainsql=mainsql&" and userid="&userid
if strurl="list.asp" then
strurl=strurl&"?userid="&userid
else
strurl=strurl&"&userid="&userid
end if
end if
call sub_showlist(mainsql,strurl)
show=replace(show,"$show_list$",show_list)
response.Write show&oblog.site_bottom
sub sub_showlist(sql,strurl)
dim topn
dim msql
MaxPerPage=oblog.setup(8,0)
strFileName=strurl
if request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if
topn=oblog.setup(14,0)
msql="select top "&topn&" oblog_log.topic,oblog_log.author,oblog_log.addtime,oblog_log.commentnum,oblog_log.logid,oblog_logclass.classname,oblog_logclass.id,userid,logfile from oblog_log,oblog_logclass where oblog_log.classid=oblog_logclass.id and ishide=0 and passcheck=1 and isdraft=0 and blog_password=0"&sql
msql=msql&" order by oblog_log.logid desc"
Set rsmain=Server.CreateObject("Adodb.RecordSet")
'response.Write(msql)
if not IsObject(conn) then link_database
rsmain.Open msql,Conn,1,1
if rsmain.eof and rsmain.bof then
show_list=show_list & "共调用0篇日志 "
else
totalPut=rsmain.recordcount
show_list=show_list & "共调用" & totalPut & " 篇日志 "
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)*MaxPerPage0 then
show_list=show_list&"当前位置:首页→日志类别("&rsmain(5)&")"
else
show_list=show_list&"当前位置:首页→日志列表(所有类别)"
end if
else
select case selecttype
case "topic"
show_list=show_list&"当前位置:首页→搜索日志标题关键字“"&keyword&"”"
case "logtext"
show_list=show_list&"当前位置:首页→搜索日志内容关键字“"&keyword&"”"
case "id"
show_list=show_list&"当前位置:首页→搜索博客名称关键字“"&keyword&"”"
case else
show_list=show_list&"当前位置:首页→搜索关键字“"&keyword&"”"
end select
end if
bstr=trim(Request.ServerVariables("query_string"))
if bstr<>"" then bstr="list.asp?"&replace(replace(bstr,"&isbest=1",""),"isbest=1","")&"&isbest=1" else bstr="list.asp?isbest=1"
show_list=show_list&bstr1&"
"
do while not rsmain.eof
strtopic=oblog.filt_html(rsmain(0))
if oblog.strLength(strtopic)>50 then
strtopic=oblog.InterceptStr(strtopic,47)&"..."
end if
show_list=show_list&"