<!--#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"))
lm2=trim(request("lm2"))
if lm2="" then lm2=trim(request("lm"))
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 lm2<>"0" then sql=sql&" and (lm='"&lm2&"' or lm2='"&lm2&"' or lm3='"&lm2&"') "
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
			if n<>0 then
			  ttt="<BR><font color="&rs("titlecolor")&">"&titleb(rs("title"),n)&"</font>"
			end if
			id=rs("id")
			title=rs("title")
			pic=rs("pic")
			pic=replace(pic,"border=","bo=")
			Filename=rs("filename")
			if filename="" then filename=0
			%>
			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
%>