<!-- #include file="include/config.asp" -->
<%
dim atype,atemp,awh
action=code_form(request.querystring("action"))
if len(action)>10 or len(action)<1 then response.end
%>
<!-- #include file="include/conn.asp" -->
<%
awh=""
sql="select asort,atype,asize,awidth,aheight,aname,alink,aurl from ads where asort='"&action&"'"
set rs=conn.execute(sql)
if rs.eof and rs.bof then
  rs.close:set rs=nothing
  call close_conn()
  response.end
end if
atype=int(rs("atype"))
if rs("asize")=true then
 awh=" width="&rs("awidth")&" height="&rs("aheight")
end if
select case atype
case 1
  atemp="<a href='"&rs("alink")&"' target=_blank><img src='"&rs("aurl")&"' border=0 alt='"&rs("aname")&"'"&awh&"></a>"
case 2
  atemp="<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0'"&awh&">" & _
	"<param name=movie value='"&rs("aurl")&"'><param name=quality value=high>" & _
	"<embed src='"&rs("aurl")&"' quality=high pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash'"&awh&">" & _
	"</embed></object>"
case 3
  atemp="<a href='"&rs("alink")&"' target=_blank>"&rs("aname")&"</a>"
end select

rs.close:set rs=nothing
call close_conn()

response.write "document.write("""&atemp&""");"
%>