%
lmid=chkhtm(trim(request("lm")))
lmname=chkhtm(trim(request("lmname")))
n=trim(request("n"))
list=chkhtm(trim(request("list")))
more=trim(request("more"))
open=trim(request("open"))
bg=trim(request("bg"))
hot=trim(request("hot"))
tj=chkhtm(trim(request("tj")))
ord=chkhtm(trim(request("ord")))
fs=trim(request("fs"))
t=trim(request("t"))
if bg="" then bg="ffffff"
if lmname="" then lmname=0
'if lmid=0 then lmid=""
if n="" then n=20
if list="" then list=10
if more="" then more=1
if open="" then open=1
if ord="" then ord="asc"
if lmid="" then lmid=0
if t="" then t=0
if hot="" then hot=0
if tj="0" then
tj="不推荐"
else
tj="推荐"
end if
if ord<>"asc" then ord="desc"
if (not isNumeric(lmid)) then
lmid=0
end if
%>
<%
path=config("path")
if fs="1" then
sql = "select * from lm where lm<>'' and hidden=0 "
if lmid<>"0" then sql=sql&" and id="&lmid&" "
sql=sql&" order by id "&ord&""
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
while not rs.eof
id=rs("id")
lm=rs("lm")
%>
document.write("news_more.asp?lm=<%=id%> target=_blank title='<%=lm%>'><%=lm%>");
<%
sql11 = "select id,lm,lm2 from news where lm='"&rs("ID")&"' or lm2='"&rs("ID")&"' order by id "&ord&" "
Set rs11 = Server.CreateObject("ADODB.RecordSet")
rs11.Open sql11,conn,1,1
%>
document.write("(<%=rs11.recordcount%>)
");
<%
sql2 = "select * from lm where lmid='"&rs("id")&"' order by id "&ord&" "
Set rs2 = Server.CreateObject("ADODB.RecordSet")
rs2.Open sql2,conn,1,1
while not rs2.eof
id2=rs2("id")
lm2=rs2("lm2")&rs2("lm3")
%>
document.write(" ├news_more.asp?lm2=<%=id2%>&lmname=0&open=1&n=30&tj=0&hot=0 target=_blank title='<%=lm2%>'><%=lm2%>");
<%
sql3 = "select id,lm,lm2,lm3 from news where lm2='"&rs2("id")&"' or lm='"&rs2("id")&"' order by id "&ord&" "
Set rs3 = Server.CreateObject("ADODB.RecordSet")
rs3.Open sql3,conn,1,1
%>
document.write("(<%=rs3.recordcount%>)
");
<%
rs3.close
set rs3=nothing
set rs3 = Server.CreateObject("ADODB.RecordSet")
rs3.Open "select * from [lm] where lmid='"&id2&"' and hidden=0 order by id "&ord&" ",conn,1,1
while not rs3.eof
Response.Write "document.write("" ├"&rs3("lm3")&""");"
set rs4 = Server.CreateObject("ADODB.RecordSet")
rs4.Open "select ID,lm,lm2,lm3 from [news] where lm3='"&rs3("ID")&"' order by id desc",conn,1,1
Response.Write "document.write(""("&rs4.recordcount&")
"");"
rs4.close:set rs4=nothing
rs3.movenext
wend
rs3.close:set rs3=nothing
rs2.movenext
wend
rs2.close
set rs2=nothing
rs.movenext
wend
rs.close
set rs=nothing
elseif fs="2" then
sql="select * from [lm] where 1=1 "
if lmid<>"0" then sql=sql&" and lmid='"&lmid&"' "
sql=sql&" order by id "&ord&" "
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
while not rs.eof
id=rs("id")
lm2=rs("lm2")&rs("lm3")
%>
document.write(" news_more.asp?lm2=<%=id%> title='<%=lm2%>'><%=lm2%>
");
<%
rs.movenext
wend
elseif fs="3" then
sql="select * from [lm] where lm<>'' "
sql=sql&" order by id "&ord&" "
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
while not rs.eof
id=rs("id")
lm2=rs("lm")
%>
document.write("news_more.asp?lm2=<%=id%>&lmname=0&open=1&n=30&tj=0&hot=0 target=_blank title='<%=lm2%>'><%=lm2%> ");
<%
rs.movenext
wend
rs.close
set rs=nothing
elseif fs="4" and trim(request("lm"))<>"" then
lmid=chkhtm(trim(request("lm")))
if (not isNumeric(lmid)) then
lmid=0
end if
set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "select * from [lm] where lmid='"&lmid&"' and hidden=0 order by orderid asc,id asc ",conn,1,1
while not rs.eof
lm2=rs("id")
lmname=rs("lm2")&rs("lm3")
%>
//document.write("
 | js-pic.asp?lm2=<%=lm2%> title='<%=lmname%>'><%=lmname%> |
");
<%
'rs.movenext
'wend
'if rs.recordcount=0 then
' Response.Write "document.write(""
无子栏目
"");"
'end if
'rs.close
'set rs=nothing
'while not rs.eof
Set rs1=conn.execute("select * from [lm] where lmid='"&Rs("id")&"' and hidden=0 order by orderid asc,id asc ")
if not (rs1.eof and rs1.bof) then
%>
document.write("");
document.write(")\"> <%=rs("lm2")%> | ");
document.write("
");
document.write("");
document.write("");
document.write("
");
<%Else%>
document.write("");
document.write("\" target=\"_parent\"><%=rs("lm2")%> | ");
document.write("
");
document.write("");
document.write("");
document.write("
");
<%End If%>
<%
rs.movenext
wend
%>
document.write("");
document.write("");
document.write("
");
<%
elseif fs="5" and trim(request("lm"))<>"" then
lmid=chkhtm(trim(request("lm")))
if trim(request("lm")) = "" then lmid=chkhtm(trim(request("lm2")))
if (not isNumeric(lmid)) then
lmid=0
end if
set rs2 = Server.CreateObject("ADODB.RecordSet")
rs2.Open "select * from [lm] where id="&lmid&" order by id "&ord&" ",conn,1,1
lm = rs2("lm")
if isnull(lm) or lm="" then
lmid = rs2("lmid")
rs2.close
set rs2=nothing
end if
set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "select * from [lm] where lmid='"&lmid&"' order by id "&ord&" ",conn,1,1
%>
<%
while not rs.eof
lm2=rs("id")
lmname=rs("lm2")&rs("lm3")
%>
document.write(" | news_more.asp?lm2=<%=lm2%> title='<%=lmname%>'><%=lmname%> |
");
<%
rs.movenext
wend
%>
<%
if rs.recordcount=0 then
Response.Write "document.write(""
无子栏目
"");"
end if
rs.close
set rs=nothing
elseif fs="6" and trim(request("lm"))<>"" then
lmid=chkhtm(trim(request("lm")))
if trim(request("lm")) = "" then lmid=chkhtm(trim(request("lm2")))
if (not isNumeric(lmid)) then
lmid=0
end if
set rs2 = Server.CreateObject("ADODB.RecordSet")
rs2.Open "select * from [lm] where id="&lmid&" order by id "&ord&" ",conn,1,1
if isnull(rs2("lm")) or rs2("lm")="" then
lmid = rs2("lmid")
set rs3 = Server.CreateObject("ADODB.RecordSet")
rs3.Open "select * from [lm] where id="&lmid&" order by id "&ord&" ",conn,1,1
if isnull(rs3("lm")) or rs3("lm")="" then
lmid = rs3("lmid")
end if
rs3.close
set rs3=nothing
end if
rs2.close
set rs2=nothing
set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "select * from [lm] where lmid='"&lmid&"' order by id "&ord&" ",conn,1,1
%>
document.write("");
<%
if rs.recordcount=0 then
Response.Write "document.write(""
无子栏目
"");"
end if
rs.close
set rs=nothing
elseif fs="7" and trim(request("lm"))<>"" then
lmid=chkhtm(trim(request("lm")))
if trim(request("lm")) = "" then lmid=chkhtm(trim(request("lm2")))
if (not isNumeric(lmid)) then
lmid=0
end if
set rs2 = Server.CreateObject("ADODB.RecordSet")
rs2.Open "select * from [lm] where id="&lmid&" order by id "&ord&" ",conn,1,1
if isnull(rs2("lm2")) or rs2("lm2")="" then
lmid = rs2("lmid")
end if
rs2.close
set rs2=nothing
set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "select * from [lm] where lmid='"&lmid&"' order by id "&ord&" ",conn,1,1
%>
document.write("");
<%
if rs.recordcount=0 then
Response.Write "document.write(""
无子栏目
"");"
end if
rs.close
set rs=nothing
elseif fs="8" and trim(request("newsid"))<>"" then
lmid=chkhtm(trim(request("newsid")))
if (not isNumeric(lmid)) then
lmid=0
end if
set rs2 = Server.CreateObject("ADODB.RecordSet")
rs2.Open "select * from [news] where id="&lmid&" order by id "&ord&" ",conn,1,1
lmid = trim(rs2("lm"))
rs2.close
set rs2=nothing
set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "select * from [lm] where lmid='"&lmid&"' order by id "&ord&" ",conn,1,1
%>
document.write("");
<%
if rs.recordcount=0 then
Response.Write "document.write(""
无子栏目
"");"
end if
rs.close
set rs=nothing
elseif fs="9" and trim(request("newsid"))<>"" then
lmid=chkhtm(trim(request("newsid")))
if (not isNumeric(lmid)) then
lmid=0
end if
set rs2 = Server.CreateObject("ADODB.RecordSet")
rs2.Open "select * from [news] where id="&lmid&" order by id "&ord&" ",conn,1,1
lmid = rs2("lm2")
rs2.close
set rs2=nothing
set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "select * from [lm] where lmid='"&lmid&"' order by id "&ord&" ",conn,1,1
%>
document.write("");
<%
if rs.recordcount=0 then
Response.Write "document.write(""
无子栏目
"");"
end if
rs.close
set rs=nothing
end if
conn.close
set conn=nothing
%>