📄 cls_ads.asp
字号:
If MyFile.FolderExists(Server.MapPath(TempSysRootDir&"\JS\AdsJs")) = false then
MyFile.CreateFolder(Server.MapPath(TempSysRootDir&"\JS\AdsJs"))
End If
if MyFile.FileExists(Server.MapPath(TempSysRootDir&"\JS\AdsJs")&"\"& ClarityBoxLocation &".js") then
MyFile.DeleteFile(Server.MapPath(TempSysRootDir&"\JS\AdsJs")&"\"& ClarityBoxLocation &".js")
end if
set CrHNJS=MyFile.CreateTextFile(Server.MapPath(TempSysRootDir&"\JS\AdsJs")&"\"& ClarityBoxLocation &".js")
CrHNJS.write AdsJSStr
set MyFile=nothing
ClarityBoxObj.close
Set ClarityBoxObj = Nothing
End Sub
Sub RightBottom(TempLocation)
dim RightBottomStr,RightBottomLocation,RightBottomObj
RightBottomLocation = clng(TempLocation)
AdsTempPicStr(RightBottomLocation)
RightBottomStr = AdsTempStr
Set RightBottomObj = Conn.Execute("select * from FS_Ads where Location="&RightBottomLocation&"")
if RightBottomObj("State")<>"1" then
AdsJSStr = "document.write('此广告已经暂停或是失效');"
else
AdsJSStr = "if (navigator.appName == 'Netscape')" & vbCrLf & _
"{document.write('<layer id=RightBottom top=150 width="& RightBottomObj("PicWidth") &" height="& RightBottomObj("PicHeight") &">"& RightBottomStr &"</layer>');}" & vbCrLf & _
"else{document.write('<div id=RightBottom style=""position: absolute;width:"& RightBottomObj("PicWidth") &";height:"& RightBottomObj("PicHeight") &";visibility: visible;z-index: 1"">"& RightBottomStr &"</div>');}" & vbCrLf & _
"document.write('<script language=javascript src="& TempSysRootDir &"/" & PlusDir &"/Ads/CreateJs/RightBottom.js></script>');" & vbCrLf & _
"document.write('<script src="& TempSysRootDir & "/" & PlusDir &"/Ads/show.asp?Location="&RightBottomLocation&"></script>');"
end if
Set MyFile=Server.CreateObject(G_FS_FSO)
If MyFile.FolderExists(Server.MapPath(TempSysRootDir&"\JS\AdsJs")) = false then
MyFile.CreateFolder(Server.MapPath(TempSysRootDir&"\JS\AdsJs"))
End If
if MyFile.FileExists(Server.MapPath(TempSysRootDir&"\JS\AdsJs")&"\"& RightBottomLocation &".js") then
MyFile.DeleteFile(Server.MapPath(TempSysRootDir&"\JS\AdsJs")&"\"& RightBottomLocation &".js")
end if
set CrHNJS=MyFile.CreateTextFile(Server.MapPath(TempSysRootDir&"\JS\AdsJs")&"\"& RightBottomLocation &".js")
CrHNJS.write AdsJSStr
set MyFile=nothing
RightBottomObj.close
Set RightBottomObj = Nothing
End Sub
Sub DriftBox(TempLocation)
dim DriftBoxStr,DriftBoxLocation,DriftBoxObj
DriftBoxLocation = clng(TempLocation)
AdsTempPicStr(DriftBoxLocation)
DriftBoxStr = AdsTempStr
Set DriftBoxObj = Conn.Execute("select * from FS_Ads where Location="&DriftBoxLocation&"")
if DriftBoxObj("State")<>"1" then
AdsJSStr = "document.write('此广告已经暂停或是失效');"
else
AdsJSStr = "DriftBoxStr=(document.layers)?true:false;" & vbCrLf & _
"if(DriftBoxStr){document.write('<layer id=DriftBox width="& DriftBoxObj("PicWidth") &" height="& DriftBoxObj("PicHeight") &" onmouseover=DriftBoxSM(""DriftBox"") onmouseout=movechip(""DriftBox"")>"& DriftBoxStr &"</layer>');}" & vbCrLf & _
"else{document.write('<div id=DriftBox style=""position:absolute; width:"& DriftBoxObj("PicWidth") &"px; height:"& DriftBoxObj("PicHeight") &"px; z-index:9; filter: Alpha(Opacity=90)"" onmouseover=DriftBoxSM(""DriftBox"") onmouseout=movechip(""DriftBox"")>"& DriftBoxStr &"</div>');}" & vbCrLf & _
"document.write('<script language=javascript src="& TempSysRootDir &"/" & PlusDir &"/Ads/CreateJs/DriftBox.js></script>');" & vbCrLf & _
"document.write('<script src="& TempSysRootDir & "/" & PlusDir &"/Ads/show.asp?Location="&DriftBoxLocation&"></script>');"
end if
Set MyFile=Server.CreateObject(G_FS_FSO)
If MyFile.FolderExists(Server.MapPath(TempSysRootDir&"\JS\AdsJs")) = false then
MyFile.CreateFolder(Server.MapPath(TempSysRootDir&"\JS\AdsJs"))
End If
if MyFile.FileExists(Server.MapPath(TempSysRootDir&"\JS\AdsJs")&"\"& DriftBoxLocation &".js") then
MyFile.DeleteFile(Server.MapPath(TempSysRootDir&"\JS\AdsJs")&"\"& DriftBoxLocation &".js")
end if
set CrHNJS=MyFile.CreateTextFile(Server.MapPath(TempSysRootDir&"\JS\AdsJs")&"\"& DriftBoxLocation &".js")
CrHNJS.write AdsJSStr
set MyFile=nothing
DriftBoxObj.close
Set DriftBoxObj = Nothing
End Sub
Sub LeftBottom(TempLocation)
dim LeftBottomStr,LeftBottomLocation,LeftBottomObj
LeftBottomLocation = clng(TempLocation)
AdsTempPicStr(LeftBottomLocation)
LeftBottomStr = AdsTempStr
Set LeftBottomObj = Conn.Execute("select * from FS_Ads where Location="&LeftBottomLocation&"")
if LeftBottomObj("State")<>"1" then
AdsJSStr = "document.write('此广告已经暂停或是失效');"
else
AdsJSStr = "if (navigator.appName == 'Netscape')" & vbCrLf & _
"{document.write('<layer id=LeftBottom top=150 width="& LeftBottomObj("PicWidth") &" height="& LeftBottomObj("PicHeight") &">"& LeftBottomStr &"</layer>');}" & vbCrLf & _
"else{document.write('<div id=LeftBottom style=""position: absolute;width:"& LeftBottomObj("PicWidth") &";height:"& LeftBottomObj("PicHeight") &";visibility: visible;z-index: 1"">"& LeftBottomStr &"</div>');}" & vbCrLf & _
"document.write('<script language=javascript src="& TempSysRootDir &"/" & PlusDir &"/Ads/CreateJs/LeftBottom.js></script>');" & vbCrLf & _
"document.write('<script src="& TempSysRootDir & "/" & PlusDir &"/Ads/show.asp?Location="&LeftBottomLocation&"></script>');"
end if
Set MyFile=Server.CreateObject(G_FS_FSO)
If MyFile.FolderExists(Server.MapPath(TempSysRootDir&"\JS\AdsJs")) = false then
MyFile.CreateFolder(Server.MapPath(TempSysRootDir&"\JS\AdsJs"))
End If
if MyFile.FileExists(Server.MapPath(TempSysRootDir&"\JS\AdsJs")&"\"& LeftBottomLocation &".js") then
MyFile.DeleteFile(Server.MapPath(TempSysRootDir&"\JS\AdsJs")&"\"& LeftBottomLocation &".js")
end if
set CrHNJS=MyFile.CreateTextFile(Server.MapPath(TempSysRootDir&"\JS\AdsJs")&"\"& LeftBottomLocation &".js")
CrHNJS.write AdsJSStr
set MyFile=nothing
LeftBottomObj.close
Set LeftBottomObj = Nothing
End Sub
Sub Couplet(TempLocation)
dim CoupletLeftStr,CoupletLocation,CoupletRightStr,CoupletObj
CoupletLocation = clng(TempLocation)
AdsTempPicStr(CoupletLocation)
CoupletLeftStr = AdsTempStr
CoupletRightStr = AdsTempStrRight
Set CoupletObj = Conn.Execute("select State from FS_Ads where Location="&CoupletLocation&"")
if CoupletObj("State")<>"1" then
AdsJSStr = "document.write('此广告已经暂停或是失效');"
else
AdsJSStr = "function winload()" & vbCrLf & _
"{" & vbCrLf & _
"AdsLayerLeft.style.top=20;" & vbCrLf & _
"AdsLayerLeft.style.left=5;" & vbCrLf & _
"AdsLayerRight.style.top=20;" & vbCrLf & _
"AdsLayerRight.style.right=5;" & vbCrLf & _
"}" & vbCrLf & _
"if(screen.availWidth>800){" & vbCrLf & _
"{" & vbCrLf & _
"document.write('<div id=AdsLayerLeft style=""position: absolute;visibility:visible;z-index:1""><table width=100 border=0 cellspacing=0 cellpadding=0><tr><td>" & CoupletLeftStr & "</td></tr></table></div>'" & vbCrLf & _
"+'<div id=AdsLayerRight style=""position: absolute;visibility:visible;z-index:1""><table width=100 border=0 cellspacing=0 cellpadding=0><tr><td>" & CoupletRightStr & "</td></tr></table></div>');" & vbCrLf & _
"}" & vbCrLf & _
"document.write('<script language=javascript src="& TempSysRootDir &"/" & PlusDir &"/Ads/CreateJs/Couplet.js></script>');" & vbCrLf & _
"winload()" & vbCrLf & _
"}" & vbCrLf & _
"document.write('<script src="& TempSysRootDir & "/" & PlusDir &"/Ads/show.asp?Location="&CoupletLocation&"></script>');"
end if
Set MyFile=Server.CreateObject(G_FS_FSO)
If MyFile.FolderExists(Server.MapPath(TempSysRootDir&"\JS\AdsJs")) = false then
MyFile.CreateFolder(Server.MapPath(TempSysRootDir&"\JS\AdsJs"))
End If
if MyFile.FileExists(Server.MapPath(TempSysRootDir&"\JS\AdsJs")&"\"& CoupletLocation &".js") then
MyFile.DeleteFile(Server.MapPath(TempSysRootDir&"\JS\AdsJs")&"\"& CoupletLocation &".js")
end if
set CrHNJS=MyFile.CreateTextFile(Server.MapPath(TempSysRootDir&"\JS\AdsJs")&"\"& CoupletLocation &".js")
CrHNJS.write AdsJSStr
set MyFile=nothing
CoupletObj.close
Set CoupletObj = Nothing
End Sub
Sub Cycle(ALocation,TempLocation)
dim CycleSelfObj,CycleSelfLocation,CycleLocation,CycleObj,NoCycleObj,JsFileName
CycleSelfLocation = clng(ALocation)
CycleLocation = clng(TempLocation)
Set CycleSelfObj = Conn.Execute("select * from FS_Ads where Location="&CycleSelfLocation&"")'自身查询
if CycleSelfObj("CycleTF") = "1" then '所有循环广告
if CycleSelfObj("CycleLocation")<>"0" then '所有被添加到循环广告的非循环广告
Set NoCycleObj = Conn.Execute("select * from FS_Ads where State=1 and CycleTF=1 and (Location="&CycleSelfObj("CycleLocation")&" or CycleLocation="&CycleSelfObj("CycleLocation")&") order by AddTime desc")
Set CycleObj = Conn.Execute("select * from FS_Ads where Location="&CycleSelfObj("CycleLocation")&"")'所属循环位
else '所有TYPE=11的循环广告
Set NoCycleObj = Conn.Execute("select * from FS_Ads where State=1 and CycleTF=1 and (Location="&CycleSelfLocation&" or CycleLocation="&CycleSelfLocation&") order by AddTime desc")
Set CycleObj = Conn.Execute("select * from FS_Ads where Location="&CycleSelfLocation&"")'所属循环位
end if
else '所有现在不是循环广告
if CycleLocation <> "0" then '以前是循环广告的非循环广告
Set NoCycleObj = Conn.Execute("select * from FS_Ads where State=1 and CycleTF=1 and (Location="&CycleLocation&" or CycleLocation="&CycleLocation&") order by AddTime desc")
Set CycleObj = Conn.Execute("select * from FS_Ads where Location="&CycleLocation&"")'所属循环位
end if
end if
AdsJSStr = "document.write('<marquee onmouseout=start() onmouseover=stop() width="&CycleObj("PicWidth")&" height="&CycleObj("PicHeight")&" direction="&CycleObj("CycleDirection")&" scrollamount="&CycleObj("CycleSpeed")&">"
do while not NoCycleObj.eof
If Instr(1,LCase(NoCycleObj("LeftPicPath")),"http://") <> 0 then
AdsJSStr = AdsJSStr & " <a href="""& TempSysRootDir & "/" & PlusDir &"/Ads/AdsClick.asp?Location="& NoCycleObj("Location") &""" title="""&NoCycleObj("Explain")&""" target=_blank><img src="""& NoCycleObj("LeftPicPath")&""" width="""&CycleObj("PicWidth")&""" height="""&CycleObj("PicHeight")&""" border=""0""></a>"
Else
AdsJSStr = AdsJSStr & " <a href="""& TempSysRootDir & "/" & PlusDir &"/Ads/AdsClick.asp?Location="& NoCycleObj("Location") &""" title="""&NoCycleObj("Explain")&""" target=_blank><img src="""& TempSysRootDir & NoCycleObj("LeftPicPath")&""" width="""&CycleObj("PicWidth")&""" height="""&CycleObj("PicHeight")&""" border=""0""></a>"
End If
NoCycleObj.movenext
if CycleObj("CycleDirection") = "up" or CycleObj("CycleDirection") = "down" then
AdsJSStr = AdsJSStr & "<br><br>"
else
AdsJSStr = AdsJSStr & " "
end if
loop
AdsJSStr = AdsJSStr & "</marquee>');"
if CycleSelfObj("State")<>"1" and CycleSelfObj("Type")="11" then
AdsJSStr = "document.write('此广告已经暂停或是失效');"
end if
if CycleSelfObj("Type")<>"11" then
JsFileName = clng(CycleSelfObj("CycleLocation"))
else
JsFileName = clng(CycleSelfLocation)
end if
Set MyFile=Server.CreateObject(G_FS_FSO)
If MyFile.FolderExists(Server.MapPath(TempSysRootDir&"\JS\AdsJs")) = false then
MyFile.CreateFolder(Server.MapPath(TempSysRootDir&"\JS\AdsJs"))
End If
if MyFile.FileExists(Server.MapPath(TempSysRootDir&"\JS\AdsJs")&"\"& JsFileName &".js") then
MyFile.DeleteFile(Server.MapPath(TempSysRootDir&"\JS\AdsJs")&"\"& JsFileName &".js")
end if
set CrHNJS=MyFile.CreateTextFile(Server.MapPath(TempSysRootDir&"\JS\AdsJs")&"\"& JsFileName &".js")
CrHNJS.write AdsJSStr
set MyFile=nothing
NoCycleObj.close
CycleObj.close
CycleSelfObj.close
Set CycleSelfObj = Nothing
End Sub
'-------------生成广告JS结束----------------
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -