www.gusucode.com > 学校共青团组织网站源代码 > 学校共青团组织网站源代码/626/newscodeztjs.asp
<!--#include file = admin_conn.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>"); <% t=trim(request("t")) hot=trim(request("hot")) tj=trim(request("tj")) news=trim(request("new")) n=trim(request("n")) more=trim(request("more")) week=trim(request("week")) line=trim(Request("line")) pic=trim(Request("pic")) zzly=trim(Request("zzly")) hit=trim(Request("hit")) pls=trim(Request("pls")) lmname=trim(Request("lmname")) font=trim(request("font")) ztid=trim(request("ztid")) if ztid="" then ztid="0" if font="" then font="9" if line="" then line="2" if n="" then n=30 n=int(n) open=trim(request("open")) if open="1" then open="_blank" else open="_top" end if list=trim(request("list")) if list="" then list=10 list=int(list) icon=trim(request("icon")) if icon="1" then icon="<img src=images/sign067.gif border=0> " elseif icon<>"0" and icon<>"1" then icon="<img src="&icon&" border=0>" else icon="" end if path=trim(config("path")) if (not isNumeric(ztid)) then ztid=0 end if sql = "select top "&list&" id,ztid,title,titlecolor,hit,pic,ontop,time,lm,lm2,lm3,zz,filename,updat from news where title<>'' and sh=1 " if tj="1" then sql=sql&" and tj='推荐' " if ztid<>"0" then sql=sql&" and ztid="&ztid&" " end if if hot="1" then sql = sql&" order by hit desc , updat desc , id desc" else sql= sql&" order by ontop desc , updat desc , id desc" end if Set rs = Server.CreateObject("ADODB.RecordSet") rs.Open sql,conn,1,1 %> document.write("<table border=0 cellpadding=<%=line%> cellspacing=0 width=100%>"); <% while not rs.eof lm2=trim(rs("lm3")) if lm2="0" or lm2="" then lm2=trim(rs("lm2")) if lm2="0" or lm2="" then lm2=trim(rs("lm")) if lm2="" then lm2=0 sql2 = "select * from lm where id="&clng(lm2) Set rs2 = Server.CreateObject("ADODB.RecordSet") rs2.Open sql2,conn,1,1 fontcolor=rs2("fontcolor") pic=rs2("pic") lmid=rs2("id") lm=rs2("lm")&rs2("lm2")&rs2("lm3") if rs("titlecolor")="默认颜色" then fontcolor=rs2("fontcolor") else fontcolor=rs("titlecolor") end if id=rs("id") title=rs("title") newshit=rs("hit") title=replace(title,"""","") %> document.write("<tr><td><font style='font-size:<%=font%>pt'><%=icon%></font>"); <% if lmname="1" then %> document.write("<a href=<%=path%>news_more.asp?lm2=<%=lmid%> target=_blank><font color=999999 style='font-size:<%=font%>pt'>[<%=lm%>]</font></a> "); <% end if %> document.write("<a href=<%=path%><%=hrefID(ID,rs("filename"))%> target=<%=open%> title='<%=title%>'><font color='<%=fontcolor%>' style='font-size:<%=font%>pt'><%=titleb(title,n)%></font></a>"); <% if trim(rs("pic"))<>"" and pic="1" then %> document.write("<font style='font-size:<%=font%>pt'>[图]</font>"); <% end if Newszz=rs("zz") if zzly="1" then %> document.write("<font style='font-size:<%=font%>pt'>{<%=Newszz%>}</font>"); <% end if if hit="1" then %> document.write("<font style='font-size:<%=font%>pt'><a title='阅读数'>[<%=Newshit%>]</a></font>"); <% end if if pls="1" then set rspl = Server.CreateObject("ADODB.RecordSet") rspl.Open "select * from [NewsPL] where NewsID="&id&" order by id desc",conn,1,1 NewsPLS=rspl.recordcount rspl.close:set rspl=nothing %> document.write("<font style='font-size:<%=font%>pt'><a title='评论数'>[<%=NewsPLS%>]</a></font>"); <% end if if news="1" then if datediff("d",rs("time"),date())<=newsx() then %> document.write("</td><td align=left><img src=<%=path%>images/new.gif>"); <% else%> document.write("</td><td align=left>"); <% end if else %> document.write("</td><td>"); <% end if tttt=rs("time") %> document.write("</td><td align=right>"); <% if t="1" then%> document.write("<font color=999999 style='font-size:<%=font%>pt'><%=formatdatetime(tttt,1)%></font>"); <%elseif t="2" then %> document.write("<font color=999999 style='font-size:<%=font%>pt'><%=formatdatetime(tttt,2)%></font>"); <%elseif t="3" then%> document.write("<font color=999999 style='font-size:<%=font%>pt'>(<%=month(tttt)%>月<%=day(tttt)%>日)</font>"); <%elseif t="4" then%> document.write("<font color=999999 style='font-size:<%=font%>pt'>(<%=month(tttt)%>-<%=day(tttt)%>)</font>"); <% end if %> <%if week="1" then%> document.write("<font color=999999 style='font-size:<%=font%>pt'>(<%=weekDayName(weekday(tttt))%>)</font>"); <%end if%> document.write("</td></tr>"); <% rs.movenext wend lm=trim(request("lm")) lm2=trim(request("lm2")) if more="1" then %> document.write("<tr><td align=right colspan=2><a href=<%=path%>news_zt.asp?ztid=<%=ztid%>&open=<%=open%>&tj=<%=tj%>&hot=<%=hot%> target=<%=open%>><font style='font-size:<%=font%>pt'>更多内容</font></a></td></tr>"); <% else end if conn.close:set conn=nothing %> document.write("</table>");