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

<%
x=trim(request("x"))
y=trim(request("y"))
w=trim(request("w"))
h=trim(request("h"))
n=trim(request("n"))
ztid=trim(request("ztid"))
if (not isNumeric(ztid)) then
   ztid=0
end if
if n="" then n=20
n=int(n)
open=trim(request("open"))
font=trim(request("font"))
if font="" then font=9
if open="1" then
  open="_blank"
else
  open="_top"
end if
if w="" then w=100
if h="" then h=100
if x="" then x=1
if y="" then y=1
x=int(x)
y=int(y)
xy=x*y
if (not isNumeric(lm2)) then
	lm2=0
end if

path=config("path")

sql = "select top "&xy&" * from news where ( pic like '%.jpg%' or pic like '%.JPG%' or pic like '%.gif%' or pic like '%.GIF%' ) and sh=1 "
if ztid<>"0" then
  sql=sql&" and ztid="&ztid&" "
end if
sql=sql&" order by ontop desc , updat desc , id desc"
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
%>
document.write("<div align=center>");
document.write("<table border=0 cellpadding=0 cellspacing=0 width=100% id=tableasdaDF1>");
<%
if rs.recordcount<>0 then
for yyyy=1 to y
%>
		document.write("<tr>");
			<%
			if rs.eof then exit for
			for xxxx=1 to x
			
			id=rs("id")
			title=trim(rs("title"))
			pic=rs("pic")
			pic=replace(pic,"border=","bo=")
			pic=replace(pic,"""","")
			Filename=rs("filename")
			if filename="" then filename=0
			if title="" then title=" "
			if n<>0 then
			  ttt="<BR><font color="&rs("titlecolor")&">"&titleb(title,n)&"</font>"
			end if
			%>
			document.write("<td align=center style='font-size:<%=font%>pt;line-height:150%'><a href=<%=path%><%=hrefID(ID,Filename)%> target='<%=open%>' title='<%=title%>'><img hspace=2 vspace=2 border=0 width=<%=w%> height=<%=h%> src='<%=pic%>'><font style='font-size:<%=font%>pt'><%=ttt%></font></a></td>");
			<%
			rs.movenext
			if rs.eof then exit for
			next
			%>
		document.write("</tr>");
<%
next
else
%>
document.write("暂无图片信息");
<%
end if
%>
	document.write("</table>");
document.write("</div>");


<%
conn.close:set conn=nothing
%>