%
dim mainsql,classid,strurl,rsmain,show_list,ustr
dim keyword,selecttype,isbest,bstr1,userid
classid=40
keyword=EncodeJP(oblog.filt_badstr(request("keyword")))
selecttype=oblog.filt_badstr(request("selecttype"))
isbest=Int(request.QueryString("isbest"))
userid=Int(request.QueryString("userid"))
call sysshow()
strurl="listcgjl.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 a.classid in ("&ustr&")"
'mainsql=" and oblog_log.classid="&classid
strurl="listcgjl.asp?classid="&classid
end if
if keyword<>"" then
select case selecttype
case "topic"
mainsql=" and topic like '%"&keyword&"%'"
strurl="listcgjl.asp?keyword="&keyword&"&selecttype="&selecttype
case "logtext"
if oblog.cacheConfig(26)=1 then
mainsql=" and logtext like '%"&keyword&"%'"
strurl="listcgjl.asp?keyword="&keyword&"&selecttype="&selecttype
else
oblog.adderrstr("當(dāng)前系統(tǒng)已經(jīng)關(guān)閉內(nèi)容搜索。")
oblog.showerr
end if
case "id"
mainsql=" and author like '%"&keyword&"%'"
strurl="listcgjl.asp?keyword="&keyword&"&selecttype="&selecttype
end select
end if
if isbest=1 then
mainsql=mainsql&" and isbest=1"
if strurl="listcgjl.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="listcgjl.asp" then
strurl=strurl&"?userid="&userid
else
strurl=strurl&"&userid="&userid
end if
end if
call sub_showlist(mainsql,strurl)
G_P_Show=replace(G_P_Show,"$show_list$",show_list)
response.Write G_P_Show&oblog.site_bottom
sub sub_showlist(sql,strurl)
dim topn
dim 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
topn=oblog.CacheConfig(37)
msql="select top "&topn&" a.topic,a.author,a.addtime,a.commentnum,a.logid,b.classname,b.id,userid,logfile,a.isbest from oblog_log a,oblog_logclass b where a.classid=b.id and isdel=0 and ishide=0 and passcheck=1 and isdraft=0 and blog_password=0"&sql
msql=msql&" order by a.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 & "共調(diào)用0篇
"
else
G_P_AllRecords=rsmain.recordcount
show_list=show_list & "共調(diào)用" & G_P_AllRecords & " 篇
"
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團(tuán)隊(duì)游戲
"
show_list=show_list&"
"
end sub
%>
"
show_list=show_list&" "
do while not rsmain.eof
If rsmain("isbest")=1 Then
strtopic="" & oblog.filt_html(rsmain(0)) & ""
Else
strtopic=oblog.filt_html(rsmain(0))
End If
if oblog.strLength(strtopic)>50 then
strtopic=oblog.InterceptStr(strtopic,47)&"..."
end If
show_list=show_list&"標(biāo)題 "
rsmain.movenext
i=i+1
if i>=G_P_PerMax then exit do
loop
show_list=show_list&" "
show_list=show_list&""&strtopic&"
"
show_list=show_list&" "
show_list=show_list&"