📄 makecnbbrggaojs.asp
字号:
<!--#include file="sysconfig.asp"-->
<!--#include file="checkadmin.asp"-->
<%
Call CheckAdminFlag(TempAdminFlag,3)
Dim CnbbrGGao:CnbbrGGao=10
Dim RsGGao,Error_GGao
ReDim SysGGao(CnbbrGGao) '广告内容信息存储数组
sql="select CurrentGGaoid,BBRGGaoWidth,BBRGGaoHeight from bbrggaoconfig"
set rsggao=server.createobject("ADODB.Recordset")
rsggao.open sql,conn,1,3
if rsggao.eof then
Error_GGao=1
else
Error_GGao=0
i=1
Do while not Rsggao.eof
SysGGao(i)=Sys_GGao(RsGGao("CurrentGGaoID"))
i=i+1
Rsggao.MoveNext
Loop
end if
Function Sys_GGao(ggaoid)
Dim RsGGao2
sql="select ggaolink,ggaourl,ggaoflag,ggaostatus,ggaotype from bbrsysggao where ggaostatus=1 and ggaoflag="&ggaoid
set Rsggao2=conn.execute(sql)
if Not RsGGao2.Eof then
if Rsggao2("ggaotype")=2 then
Sys_GGao=Sys_GGao & "document.write('<OBJECT classid=""clsid:D27CDB6E-AE6D-11CF-96B8-444553540000"" "&_
"codebase=""http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"" "&_
"border=""0"" width="& rsggao("bbrggaowidth") &" height="& rsggao("bbrggaoheight") &" >" &_
"<PARAM name=""movie"" value="& rsggao2("ggaourl") &">" &_
"<PARAM name=""quality"" value=""High"">" &_
"<PARAM name=""scale"" value=""NoBorder"">" &_
"<PARAM name=""wmode"" value=""transparent"">" &_
"<EMBED src="& rsggao2("ggaourl") &_
"pluginspage=""http://www.macromedia.com/go/getflashplayer"" type=""application/x-shockwave-flash"" "&_
"width="& rsggao("bbrggaowidth") &" height="& rsggao("bbrggaoheight") &" quality=""High"" "&_
"scale=""NoBorder"" wmode=""transparent""></embed>" &_
"</OBJECT>');" & Vbcrlf
end if
if Rsggao2("ggaotype")=1 then
Sys_GGao=Sys_GGao & "document.write('<a href="""& rsggao2("ggaolink") &""" target=""_blank""><img src="& rsggao2("ggaourl") &" border=""0"" width="""& rsggao("bbrggaowidth") &""" height="""& rsggao("bbrggaoheight") &"""></a>');" & Vbcrlf
end if
if Rsggao2("ggaotype")=0 then
if rsggao2("ggaolink")="" or rsggao2("ggaolink")="#" or rsggao2("ggaolink")="###" then
Sys_GGao=Sys_GGao & "document.write('"& rsggao2("ggaourl") &"');" & Vbcrlf
else
Sys_GGao=Sys_GGao & "document.write('<a href="""& rsggao2("ggaolink") &""" target=""_blank"">"& rsggao2("ggaourl") &"</a>');" & Vbcrlf
end if
end if
end if
End Function
Function MakeGGaoJs(GGaoID)
set fs=server.createobject("scripting.filesystemobject")
file=server.mappath("../js/Ad_cnbbr_"& GGaoId &".js")
set AD_CnbbrJsStr=fs.opentextfile(file,2,true)
AD_CnbbrJsStr.write SYSGGAO(GGaoID)
End Function
Dim Fs,File,Ad_cnbbrJsStr
Dim GGID:GGID=Request("GGID")
if GGID<>"" then
GGID=Split(GGID,",")
For i=0 to Ubound(GGID)
Call MakeGGaoJs(GGID(i))
Next
else
For i=1 to CnbbrGGao
Call MakeGGaoJs(i)
Next
end if
Set Fs=nothing
Call ALertInfo("系统广告JS代码生成完毕!正在返回广告列表...","admin_SysGGao.asp",1)
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -