<!-- #include file = "../Conn.asp" -->
<!-- #include file = "../Comm/Site_Class.asp" -->
<%
Response.Expires = -1 
Response.ExpiresAbsolute = Now() - 1 
Response.cachecontrol = "no-cache"

PagePath = "../"

Set Qsite = New Site_Class
Qsite.SiteConfig()

If Not IsObject(Conn) Then ConnectionDatabase()

Dim Rs,i,j,Per_02
Dim TodayDate
Dim Sql

TodayDate = Qsite.FormatDate(Date())

Sql = "select * from AdTbl where AdWz like '%|10|%' and AdPause = '0' and ValidityDate > '"& TodayDate &"' order by AdId desc"

Set Rs = server.createobject("ADODB.Recordset")

Rs.Open Sql , Conn , 1 , 1
If Rs.Eof Then
	Per_02 = ""
Else
	Per_02 = ""
	Per_02 = Per_02 & "<table width=""135"" border=""0"" align=""center"" cellpadding=""0"" cellspacing=""0"">"
	i = 0
	Do While Not Rs.Eof
		Per_02 = Per_02 & "<tr>"
		Per_02 = Per_02 & "<td height=""60"" align=""center"">"
		If Rs("AdType") = "1" Then
			Per_02 = Per_02 & "<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=""135"" height=""50"">"
			Per_02 = Per_02 & "<param name=""movie"" value="""& Rs("AdPicUrl") &""" />"
			Per_02 = Per_02 & "<param name=""quality"" value=""high"" />"
			Per_02 = Per_02 & "<embed src="""& Rs("AdPicUrl") &""" quality=""high"" pluginspage=""http://www.macromedia.com/go/getflashplayer"" type=""application/x-shockwave-flash"" width=""135"" height=""50""></embed>"
			Per_02 = Per_02 & "</object>"
		Else
			If Rs("AdUrl") <> "" And Rs("AdUrl") <> "http://" Then
				Per_02 = Per_02 & "<a href="""& Rs("AdUrl") &""" target=""_blank""><img src="""& Rs("AdPicUrl") &""" width=""135"" height=""50"" border=""0"" /></a>"
			Else
				Per_02 = Per_02 & "<img src="""& Rs("AdPicUrl") &""" width=""135"" height=""50"" border=""0"" />"
			End If
		End If
		Per_02 = Per_02 & "</td>"
		Per_02 = Per_02 & "</tr>"
	Rs.MoveNext
	i = i + 1
	Loop
	Per_02 = Per_02 & "</table>"
End If
Rs.Close
%>
document.write('<%=Per_02%>');