%
lm=int(request("lm"))
set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "select * from lm where id="&lm,conn,1,1
if rs.recordcount<>0 Then
If rs("lmid")=72 Then
title=rs("lm2")
Else
title=rs("lm")
End if
Else
title=""
End If
rs.close:set rs=nothing
%>
<%
'ON ERROR RESUME NEXT
path=finddir(request.servervariables("URL"))
lm=trim(request("lm"))
if lm="" then lm=trim(Request("lm2"))
page=trim(request("page"))
if page="" then page=1
if lm="" then lm=0
if lm2="" then lm2=lm
if lm="" then lm=lm2
if lm2="" then lm2=0
function pictulist()
if openwindow="1" then
open="_blank"
else
open="_top"
end if
%>
<%
sql="select id,title,pic,sh,lm,lm2,lm3,hit,ontop,filename,ontop from [news] where ( [pic] like '%.jpg' or [pic] like '%.gif' ) and sh=1 "
if lm<>"0" then sql=sql&" and (lm='"&lm&"' or lm2='"&lm&"' or lm3='"&lm&"') "
sql=sql&" order by ontop desc , updat desc , id desc"
set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
if rs.recordcount <>0 then
page=int(request("page"))
rs.PageSize=xy
pagecount=rs.pagesize
if page<=0 then page=1
if request("page")="" then page=1
rs.AbsolutePage=page
for i=1 to picy
%>
<%
for xxxx=1 to picx
if pictitle<>0 then
ttt=""&titleb(rs("title"),pictitle)&""
end if
title=rs("title")
id=rs("id")
%>
<%if rs.recordcount<>0 then
if page>1 then
response.write "首页 "
response.write "上一页 "
end if
if page下一页 "
response.write "尾页 "
end if
response.write "共"&rs.recordcount&"条 每页显示"&pagecount&"条 共"&rs.pagecount&"页 "
%>
<%end if%>
<%
end function
set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "select * from [lm] where id="&lm&" order by id desc",conn,1,1
if rs.recordcount<>0 then
mbid=rs("mb")
lmname=rs("lm")&rs("lm2")&rs("lm3")
else
set rs2 = Server.CreateObject("ADODB.RecordSet")
rs2.Open "select * from [lm] order by id asc",conn,1,1
if rs2.recordcount<>0 then
mbid=rs2("mb")
end if
rs2.close:set rs2=nothing
end if
rs.close:set rs=nothing
if mbid="" then mbid=0
set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "select id,listtumb,picw,pich,picx,picy,pictitle,pictitlecolor,pictitlesize,openwindow from [NewsMB] where id="&mbid&" order by id desc",conn,1,1
if rs.recordcount<>0 then
listtumb=rs("listtumb")
picw=rs("picw")
pich=rs("pich")
picx=rs("picx")
picy=rs("picy")
pictitle=rs("pictitle")
pictitlecolor=rs("pictitlecolor")
pictitlesize=rs("pictitlesize")
openwindow=rs("openwindow")
xy=int(picx)*int(picy)
else
Response.Write "
对不起,系统模版不正确或者没有模版!
"
conn.close:set conn=nothing
Response.end
end if
rs.close:set rs=nothing
if instr(listtumb,"$$图片列表$$")=0 then
Response.Write "
对不起,后台系统模版不正确,没有找到$$图片列表$$!
"
else
listtumb=replace(listtumb,"$$栏目名$$",lmname)
listtumb=replace(listtumb,"$$路径$$",lmaa())
listtumb=replace(listtumb,"$$LMID$$",lm)
listtumb=split(listtumb,"$$图片列表$$")
response.write listtumb(0)
Response.Write pictulist()
Response.Write listtumb(1)
end if
%>
<%
conn.close
set conn=nothing
%>