<!--#include file="conn.asp"-->
<!--#include file="inc/const.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>弹出广告</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="skin/default/style.css" type=text/css rel=stylesheet>
</head>
<body leftMargin="0" topMargin="0">
<%
Dim SQL, Rs_Ad, HtmlString, ID
If Not IsNumeric(Request("id")) And Request("id")<>"" Then
	Response.Write"错误的系统参数!ID必须是数字"
	Response.End
End If
ID = CLng(request("ID"))
Set Rs_Ad = Server.CreateObject("adodb.recordset")
If Len(ID) = 0 Then
	SQL = "select * from NC_Adcolumn where AdsType = 0 And isLock = 0 order by AdsTime desc, id desc"
Else
	SQL = "select * from NC_Adcolumn where AdsType = 0 And isLock = 0 And id = " & ID
End If
Rs_Ad.Open SQL, conn, 1, 1
If Rs_Ad.bof And Rs_Ad.EOF Then
	HtmlString = ""
Else
	If Rs_Ad("LinkType") = 0 Then
		HtmlString = HtmlString & "<A HREF='" & Rs_Ad("LinkUrl") & "' target=_blank Title='" & Rs_Ad("Remark") & "'><img src='" & Rs_Ad("ImageUrl") & "' border=0 width='" & Rs_Ad("Width") & "' height='" & Rs_Ad("Height") & "'></A>"
	ElseIf Rs_Ad("LinkType") = 1 Then
		HtmlString = HtmlString & " <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='" & Rs_Ad("Width") & "' height='" & Rs_Ad("Height") & "'>"& vbCrLf
		HtmlString = HtmlString & " <param name='movie' value='" & Rs_Ad("ImageUrl") & "'>"& vbCrLf
		HtmlString = HtmlString & " <param name='quality' value='high'>"& vbCrLf
		HtmlString = HtmlString & " <embed src='" & Rs_Ad("ImageUrl") & "' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='" & Rs_Ad("Width") & "' height='" & Rs_Ad("Height") & "'></embed>"& vbCrLf
		HtmlString = HtmlString & " </object>"& vbCrLf
	Else
		HtmlString = HtmlString & Rs_Ad("Remark")
	End If
End If
Rs_Ad.Close
Set Rs_Ad = Nothing
Response.Write HtmlString
CloseConn
%>
</body>
</html>
