📄 adsadd.asp
字号:
document.AdsForm.CycleSpeed.disabled=true;
}
}
function ChooseCycle()
{
if (document.AdsForm.Cycle1.checked==false)
{
document.AdsForm.MaxClick.disabled=false;
document.AdsForm.EndTime.disabled=false;
document.AdsForm.EEETTT.disabled=false;
document.AdsForm.MaxShow.disabled=false;
}
else
{
document.AdsForm.MaxClick.disabled=true;
document.AdsForm.EndTime.disabled=true;
document.AdsForm.EEETTT.disabled=true;
document.AdsForm.MaxShow.disabled=true;
document.AdsForm.EndTime.value='';
}
}
function ChooseCycleDis()
{
if (document.AdsForm.CycleTF.checked==true)
{
document.AdsForm.CycleLocation.disabled=false;
document.AdsForm.CycleDirection.disabled=false;
document.AdsForm.CycleSpeed.disabled=false;
}
else
{
document.AdsForm.CycleLocation.disabled=true;
document.AdsForm.CycleDirection.disabled=true;
document.AdsForm.CycleSpeed.disabled=true;
}
}
function TempFun()
{
if (document.AdsForm.Type.value=='10')
{
document.AdsForm.RightPicPath.disabled=false;
document.AdsForm.PPPCCC.disabled=false;
}
else
{
document.AdsForm.RightPicPath.disabled=true;
document.AdsForm.PPPCCC.disabled=true;
}
if (document.AdsForm.Type.value=='11')
{
document.AdsForm.CycleDirection.disabled=false;
document.AdsForm.CycleSpeed.disabled=false;
document.AdsForm.CycleTF.disabled=true;
document.AdsForm.CycleLocation.disabled=true;
}
else
{
document.AdsForm.CycleTF.checked=false;
document.AdsForm.CycleTF.disabled=false;
document.AdsForm.CycleLocation.disabled=true;
document.AdsForm.CycleDirection.disabled=true;
document.AdsForm.CycleSpeed.disabled=true;
}
}
ChooseCycle();
ChooseCycleDis();
TempFun();
</script>
<%
if request.form("action")="add" then
dim RsAdsObj,AdsChooseObj,AdsSql,ACycleLocation,ACycleTF,ACycleSpeed,ACycleDirection,ALocation,AType,ALeftPicPath,APicWidth,ARightPicPath,APicHeight,AUrl,AExplain,ACycle,AMaxShow,AMaxClick,AEndTime,ARemark
if isnumeric(request.form("Location"))=false then
response.Write("<script>alert(""广告位必须为数字型"");history.back();</script>")
response.end
else
ALocation = request.form("Location")
Set AdsChooseObj = Conn.Execute("select Location from FS_Ads where Location="&ALocation&"")
if not AdsChooseObj.eof then
Response.Write("<script>alert(""广告位重复,请重新输入"");location=""javascript:history.back(-1)"";</script>")
response.end
end if
end if
if isnumeric(request.form("Type"))=false then
response.write("<script>alert(""广告类型错误"");location=""javascript:history.back(-1)"";</script>")
else
AType = request.form("Type")
end if
if request.form("LeftPicPath")<>"" then
ALeftPicPath = replace(replace(request.form("LeftPicPath"),"'",""),"""","")
else
response.write("<script>alert(""请选择广告图片"");location=""javascript:history.back(-1)"";</script>")
response.end
end if
if AType="10" then
if request.form("RightPicPath")<>"" then
ARightPicPath = replace(replace(request.form("RightPicPath"),"'",""),"""","")
else
response.write("<script>alert(""请选择对联广告右图片"");location=""javascript:history.back(-1)"";</script>")
response.end
end if
else
ARightPicPath = ""
end if
if isnumeric(request.form("PicWidth"))=false or isnumeric(request.form("PicHeight"))=false then
response.write("<script>alert(""广告图片规格必须为数字型"");location=""javascript:history.back(-1)"";</script>")
response.end
else
APicWidth = request.form("PicWidth")
APicHeight = request.form("PicHeight")
end if
if request.form("UrlT")<>"" and request.form("UrlT")<>"http://" then
AUrl = replace(replace(request.form("UrlT"),"'",""),"""","")
else
response.write("<script>alert(""请输入广告链接地址"");location=""javascript:history.back(-1)"";</script>")
response.end
end if
if request.form("Explain")<>"" then
AExplain = replace(replace(request.form("Explain"),"'",""),"""","")
else
AExplain = ""
end if
if request.form("Cycle")="0" then
ACycle="0"
AMaxShow = "2147483647"
AMaxClick = "2147483647"
AEndTime = ""
else
ACycle="1"
if request.form("MaxShow")<>"" and isnumeric(request.form("MaxShow"))=false then
response.write("<script>alert(""广告最大显示数必须为数字型"");location=""javascript:history.back(-1)"";</script>")
response.end
else
AMaxShow = request.form("MaxShow")
end if
if request.form("MaxClick")<>"" and isnumeric(request.form("MaxClick"))=false then
response.write("<script>alert(""广告最大点击数必须为数字型"");location=""javascript:history.back(-1)"";</script>")
response.end
else
AMaxClick = request.form("MaxClick")
end if
if request.form("EndTime")="" or isnull(request.form("EndTime")) then
AEndTime=""
else
AEndTime=formatdatetime(request.form("EndTime"))
end if
end if
if request.form("Remark")<>"" then
ARemark = replace(replace(request.form("Remark"),"'",""),"""","")
else
ARemark = ""
end if
if request.form("CycleTF")="1" and AType <> "11" then
if request.form("CycleLocation")="0" or request.form("CycleLocation")="" then
response.write("<script>alert(""请选择循环广告位"");location=""javascript:history.back(-1)"";</script>")
response.end
end if
end if
if AType="11" then
if isnumeric(request.form("CycleSpeed"))=false then
response.write("<script>alert(""广告循环速度必须为数字型"");location=""javascript:history.back(-1)"";</script>")
response.end
else
ACycleSpeed=request.form("CycleSpeed")
end if
else
ACycleSpeed="2"
end if
set RsAdsObj=server.createobject(G_FS_RS)
AdsSql="select * from FS_Ads"
RsAdsObj.open AdsSql,Conn,3,3
RsAdsObj.addnew
RsAdsObj("Location")=clng(ALocation)
RsAdsObj("Type")=cint(AType)
RsAdsObj("LeftPicPath")=cstr(ALeftPicPath)
RsAdsObj("RightPicPath")=ARightPicPath
RsAdsObj("PicWidth")= cint(APicWidth)
RsAdsObj("PicHeight")= cint(APicHeight)
RsAdsObj("Url")= cstr(AUrl)
RsAdsObj("Explain")= cstr(AExplain)
RsAdsObj("CycleSpeed")= cint(ACycleSpeed)
if AMaxShow<>"" then
RsAdsObj("MaxShow")= AMaxShow
else
RsAdsObj("MaxShow")= "2147483647"
end if
if AMaxClick<>"" then
RsAdsObj("MaxClick")= AMaxClick
else
RsAdsObj("MaxClick")= "2147483647"
end if
if AEndTime<>"" then
RsAdsObj("EndTime")= AEndTime
end if
RsAdsObj("Remark")= ARemark
RsAdsObj("AddTime")= now()
RsAdsObj("LastTime")= now()
RsAdsObj("State")= "1"
RsAdsObj("Cycle")= cint(ACycle)
if request.form("CycleDirection")<>"" and isnull(request.form("CycleDirection"))=false then
RsAdsObj("CycleDirection") = Cstr(request.form("CycleDirection"))
else
RsAdsObj("CycleDirection") = "up"
end if
if AType="11" then
RsAdsObj("CycleTF")="1"
ACycleTF = "1"
else
if request.form("CycleTF")="1" then
RsAdsObj("CycleTF")="1"
ACycleTF = "1"
else
RsAdsObj("CycleTF")="0"
ACycleTF = "0"
end if
end if
if ACycleTF="1" and AType<>"11" then
RsAdsObj("CycleLocation")=clng(request.form("CycleLocation"))
ACycleLocation = clng(request.form("CycleLocation"))
else
ACycleLocation = "0"
RsAdsObj("CycleLocation")="0"
end if
RsAdsObj.update
RsAdsObj.close
set RsAdsObj = nothing
select case AType
case "1" call ShowAds(ALocation)
case "2" call NewWindow(ALocation)
case "3" call OpenWindow(ALocation)
case "4" call FilterAway(ALocation)
case "5" call DialogBox(ALocation)
case "6" call ClarityBox(ALocation)
case "7" call RightBottom(ALocation)
case "8" call DriftBox(ALocation)
case "9" call LeftBottom(ALocation)
case "10" call Couplet(ALocation)
end select
if ACycleTF = "1" then
call Cycle(ALocation,TempLocation)
end if
Response.Redirect("AdsList.asp")
response.end
end if
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -