<!--#include file="../../fy_inc/fy.User.asp"-->
 <!--#include file="../../Field.asp"-->
<% 
	
	   Dim Rs,ID,adstr
	   ID = ChkNumeric(Request("ID"))
	   if ID=0 or ID="" Then ID=1
 		Set rs=fycms.actexe("select * from ads_fy where ID="&ID&"")
		If Not rs.eof Then 
			If rs("ifset")=1 Then Call fycms.Alert("对不起,该广告已关闭!","")
			If  rs("UnlockTime")=0 Then '时间限制否?
				If Now < rs("StartTime") Then Call  fycms.Alert("对不起,该广告还没有开始!","")
				If Now > rs("EndTime") Then Call  fycms.Alert("对不起,该广告已经结束!","")
			End If 

		Select Case  rs("isset")
			Case "1"
				adstr=adstr&"<a href="""&rs("adurl")&""" target=""_blank"">"&rs("title")&"</a>"
			Case "2"
				adstr=adstr&"<a href="""&rs("adurl")&""" target=""_blank""><img src="""&rs("adfile")&""" width="""&rs("adwidth")&""" height="""&Rs("adheight")&""" border=""0""></a>"
			Case "3"
				adstr=adstr&"<object classid=""clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"" codebase=""http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"" width="""&Rs("adwidth")&""" height="""&Rs("adheight")&""">"
				adstr=adstr&"<param name=""movie"" value="""&Rs("adfile")&""" />"
				adstr=adstr&"<param name=""quality"" value=""high"" />"
				adstr=adstr&"<embed src="""&Rs("adfile")&""" quality=""high"" pluginspage=""http://www.macromedia.com/go/getflashplayer"" type=""application/x-shockwave-flash"" width="""&Rs("adwidth")&""" height="""&Rs("adheight")&"""></embed>"
				adstr=adstr&"</object>"
 			Case "4"
				adstr=adstr&rs("content")
 			Case Else 
				adstr=adstr&"没有该广告"
		End Select 



		 
		Else 
			Call fycms.alert("不存在该广告!","")
		End If 
	 
		
 	
		echo "document.write('" & tojs(adstr) & "');"

 
 	    Set  Rs = Nothing 
		Response.End 
 
%> 