📄 adsmodify.asp
字号:
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>
<%
end if
if request.form("action")="mod" then
dim RsAdsObj,AdsChooseObj,ACycleSpeed,AdsSql,ALocation,ACycleDirection,ACycleTF,ACycleLocation,AType,ALeftPicPath,APicWidth,ARightPicPath,APicHeight,AUrl,AExplain,ACycle,AMaxShow,AMaxClick,AEndTime,ARemark
if request.form("Location")="" then
response.write("<script>alert(""参数传递错误"");location=""javascript:window.close()"";</script>")
response.end
else
ALocation = Clng(request.form("Location"))
end if
if isnumeric(request.form("Type"))=false then
response.write("<script>alert(""广告类型错误"");location=""javascript:history.back(-1)"";</script>")
response.end
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
response.write("<script>alert(""请选择对联广告右图片"");location=""javascript:history.back(-1)"";</script>")
response.end
end if
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("Url")<>"" then
AUrl = replace(replace(request.form("Url"),"'",""),"""","")
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" or request.form("CycleTF")="1" 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 where Location="&ALocation&""
RsAdsObj.open AdsSql,Conn,1,3
RsAdsObj("Type")=cint(AType)
RsAdsObj("LeftPicPath")=cstr(ALeftPicPath)
if AType="10" then
RsAdsObj("RightPicPath")=Replace(Replace(request.form("RightPicPath"),"'",""),"""","")
End If
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
if RsAdsObj("State")<>"2" then
RsAdsObj("State") = "1"
end if
RsAdsObj("LastTime")= now()
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")=request.form("CycleLocation")
else
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" and request.form("TempLocation")="0" then
else
call Cycle(ALocation,request.form("TempLocation"))
end if
Response.Redirect("AdsList.asp")
Response.End
end if
set Conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -