adsmanage_inc.asp
来自「网店批发系统,很好很强大,很好很强大很好很强大」· ASP 代码 · 共 49 行
ASP
49 行
<%
dim i,j,k,rs,action,AdsPic,Adsurl,ID,AdsWidth,AdsHeight,AdsAddPic
dim Ads
i=0
action = sqlchg(Request.QueryString("action"))
ID = Cint(sqlcheck(Request.QueryString("ID")))
AdsPic = sqlchg(Request.Form("Ads"&ID&""))
AdsAddPic = sqlchg(Request.Form("Ads"))
Adsurl = sqlchg(Request.Form("Adsurl"))
AdsWidth = Cint(sqlcheck(Request.Form("AdsWidth")))
AdsHeight = Cint(sqlcheck(Request.Form("AdsHeight")))
if action = "add" then
call CheckType(28)
conn.execute("Insert into Advertisement (AdsPic,AdsLink,AdsWidth,AdsHeight) values ('"&AdsAddPic&"','"&Adsurl&"','"&AdsWidth&"','"&AdsHeight&"')")
Response.Write("<script language='javascript'>alert('操作成功');window.location.href='AdsManage.asp';</script>")
Response.End()
end if
if action = "del" then
call CheckType(30)
set rs = conn.execute("Select AdsPic from Advertisement where AdsID = "&ID&"")
call del("../"&rs(0))
conn.execute("Delete from Advertisement where AdsID = "&ID&"")
Response.Write("<script language='javascript'>alert('操作成功');window.location.href='AdsManage.asp';</script>")
Response.End()
end if
if action = "save" then
call CheckType(29)
conn.execute("update Advertisement set AdsPic='"&AdsPic&"',AdsLink='"&Adsurl&"',AdsWidth='"&AdsWidth&"',AdsHeight='"&AdsHeight&"' where AdsID="&ID&"")
Response.Write("<script language='javascript'>alert('操作成功');window.location.href='AdsManage.asp';</script>")
Response.End()
else
call CheckType(27)
set rs=server.CreateObject("adodb.recordset")
rs.open"select AdsID,AdsPic,AdsLink,AdsWidth,AdsHeight from Advertisement order by AdsID",conn,1,1
if not rs.eof then
Ads = rs.getrows
i = ubound(Ads,2)
if not isnumeric(i) then
i = 1
end if
else
i = -1
end if
end if
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?