www.gusucode.com > 艺术签名文章资讯网源代码 > 艺术签名文章资讯网源代码/624/runads.asp

    <!--#include file="conn.asp"-->
<!--#include file="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">
<style type="text/css">
body { font-size: 12px; font-family: 宋体;margin: 0px;}
td { font-size: 12px; font-family: 宋体; line-height: 18px;}
a {color: #111111; text-decoration: none}
a:hover { color: #ff8c40; text-decoration: underline}
</style>
</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 = Newasp.ChkNumeric(Request("ID"))
ConnectionDatabase
Set Rs_Ad = Server.CreateObject("ADODB.Recordset")
If Len(ID) = 0 Then
	SQL = "SELECT * FROM NC_Adlist WHERE flag=4 And isLock=0 ORDER BY startime DESC, id DESC"
Else
	SQL = "SELECT * FROM NC_Adlist WHERE flag=4 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("isFlash") = 0 Then
		HtmlString = HtmlString & "<A HREF='" & Rs_Ad("url") & "' target=_blank Title='" & Rs_Ad("Readme") & "'><img src='" & Rs_Ad("picurl") & "' border=0 width='" & Rs_Ad("Width") & "' height='" & Rs_Ad("Height") & "'></A>"
	ElseIf Rs_Ad("isFlash") = 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("picurl") & "'>"& vbCrLf
		HtmlString = HtmlString & " <param name='quality' value='high'>"& vbCrLf
		HtmlString = HtmlString & " <embed src='" & Rs_Ad("picurl") & "' 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("AdCode")
	End If
End If
Rs_Ad.Close
Set Rs_Ad = Nothing
Response.Write HtmlString
CloseConn
%>
</body>
</html>