<%
set rs = Server.CreateObject("adodb.recordset")
Lmn.Normal "{'function':'SingleTableList','table':'Ext_info','field':'id,name,pic,description,content,viewnum,updatetime','condition':'isshow = \'是\' and classid in(select id from [Ext_infoClass] where id=" & rs_column("id") & " or classid=" & rs_column("id") & ")','order':'id desc','styleid':'','thisid':'0'}", rs
if rs.eof then
liststr = "
暂无任何内容,请在网站后台添加!
"
else
rs.pagesize = 9
if page > rs.pagecount then page=rs.pagecount
rs.absolutepage = page
for ipage = 1 to rs.pagesize
pic = ""
'得到简介'
intro = rs(3)
if (isnull(intro) or intro="") and (not isnull(rs(4))) then
intro=Lmn.RemoveHtmlTag(rs(4))
if len(intro)>125 then intro = left(intro,125) & "..."
rs(3) = intro
rs.update
end if
if isnull(intro) or intro="" then
intro = rs(1)
end if
'得到图片'
if rs("pic") = "" or isnull(rs("pic")) then
picstr = lcase(replace(rs("content"), "'", """"))
if instr(picstr, " 0 then
picstr = split(picstr, " 0 then
pic = split(pic, "src=""")(1)
pic = split(pic, """")(0)
end if
end if
if pic = "" then
pic = web("template") & "images/default.jpg"
end if
newpic = replace(pic, web("dir"), "", 1, 1, 1)
''rs("pic") = newpic
else
pic = web("dir") & rs("pic")
end if
liststr = liststr & "
" & vbCrLf
rs.movenext
if rs.eof then exit for
next
spage = page - 3
epage = page + 3
if spage < 1 then spage = 1
if epage > rs.pagecount then epage = rs.pagecount
for i = spage to epage
if i = page then
pagestr = pagestr & ""&i&""
else
pagestr = pagestr & ""&i&""
end if
next
pagestr = "" & pagestr & ""
end if
rs.close
set rs = nothing
%><%=liststr%>
<%=pagestr%>
{#static:201609211340294867#}
<%=Lmn.Normal("{'function':'SingleTableList','table':'Ext_Info','field':'top 10 id,name,updatetime','condition':'classid in(select id from [Ext_infoClass] where id=" & rs_column("id") & " or classid=" & rs_column("id") & ")','order':'viewnum desc, id desc','styleid':'201609211531584216','thisid':'0'}", "")%>