gusucode.com > 学校共青团组织网站源代码 > 学校共青团组织网站源代码/626/lmcode.asp
<!--#include file = titleb.asp --> document.write("<head><meta http-equiv='Content-Language' content='zh-cn'><meta http-equiv='Content-Type' content='text/html; charset=gb2312'></head>"); <% 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 %> <!--#include file = admin_conn.asp --> <% path=config("path") if fs="1" then sql = "select * from lm where lm<>'' " 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("<a href=<%=path%>news_more.asp?lm=<%=id%> target=_blank title='<%=lm%>'><B><%=lm%></b></a>"); <% 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("<font color=999999>(<%=rs11.recordcount%>)</font><BR>"); <% 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(" ├<a href=<%=path%>news_more.asp?lm2=<%=id2%>&lmname=0&open=1&n=30&tj=0&hot=0 target=_blank title='<%=lm2%>'><%=lm2%></a>"); <% 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("<font color=999999>(<%=rs3.recordcount%>)</font><BR>"); <% rs3.close set rs3=nothing set rs3 = Server.CreateObject("ADODB.RecordSet") rs3.Open "select * from [lm] where lmid='"&id2&"' order by id "&ord&" ",conn,1,1 while not rs3.eof Response.Write "document.write("" ├<a href="&path&"news_more.asp?lm2="&rs3("ID")&"&lmname=0&open=1&n=30&tj=0&hot=0 target=_blank title='"&rs3("lm3")&"'>"&rs3("lm3")&"</a>"");" 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(""<font color=999999>("&rs4.recordcount&")</font><BR>"");" 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 lm2<>'' " 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(" <a href=<%=path%>news_more.asp?lm2=<%=id%>&lmname=0&open=1&n=30&tj=0&hot=0 target=_blank title='<%=lm2%>'><%=lm2%></a>"); <% 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("<a href=<%=path%>news_more.asp?lm2=<%=id%>&lmname=0&open=1&n=30&tj=0&hot=0 target=_blank title='<%=lm2%>'><%=lm2%></a> "); <% 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&"' order by id "&ord&" ",conn,1,1 while not rs.eof lm2=rs("id") lmname=rs("lm2")&rs("lm3") %> document.write("<li><a href=<%=path%>news_more.asp?lm2=<%=lm2%>&lmname=0&open=1&n=30&tj=0&hot=0 target=_blank title='<%=lmname%>'><font color='<%=color%>'><%=lmname%></font></a><BR>"); <% rs.movenext wend if rs.recordcount=0 then Response.Write "document.write(""<BR>无子栏目<BR><BR>"");" end if rs.close set rs=nothing end if conn.close set conn=nothing %>