gusucode.com > 学校共青团组织网站源代码 > 学校共青团组织网站源代码/626/JS-ZT.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>");


<%
n=chkhtm(trim(request("n")))
list=chkhtm(trim(request("list")))
font=chkhtm(trim(request("font")))
color=chkhtm(trim(request("color")))
line=chkhtm(trim(request("line")))

if (not isNumeric(line)) then line=20
if (not isNumeric(font)) then font=9
if (not isNumeric(n)) then n=30
if (not isNumeric(list)) then list=20
%>



document.write("<div align=center><table border=0 cellpadding=0 cellspacing=0 width=100%>");
<%
path=trim(config("path"))

set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "select top "&list&" * from [NewsZT] order by id desc",conn,1,1
if rs.recordcount<>0 then

for i=1 to rs.recordcount
title=titleb(rs("title"),n)
ztid=rs("id")
%>
document.write("<tr><td height=<%=line%> width=10>·</td>");
document.write("<td height=<%=line%>><a href='<%=path%>news_zt.asp?ztid=<%=ztid%>' target=_blank style='font-size:<%=font%>pt;color:<%=color%>'><%=title%></a></td></tr>");
<%
rs.movenext
if rs.eof then exit for
next

end if
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
document.write("</table></div>");