adsdirection_inc.asp

来自「网店批发系统,很好很强大,很好很强大很好很强大」· ASP 代码 · 共 48 行

ASP
48
字号
<%
	Response.Buffer = True 
	Response.ExpiresAbsolute = Now() - 1 
	Response.Expires = 0 
	Response.CacheControl = "no-cache" 
	Response.AddHeader "Pragma", "No-Cache" 
%>
<%
	call CheckType(36)	
	dim rs,Ads,AdsNum,AdsDirection,action,Title,j,AdsPartID

	AdsNum = -1

	AdsDirection = sqlcheck(Request.QueryString("ID"))
	AdsPartID = sqlcheck(Request.QueryString("IDD"))
	Title = sqlchg(Request.QueryString("Title"))
	
	action = sqlchg(Request.QueryString("action"))	
		
	if Cint(AdsPartID) < 0 then
		AdsPartID = -Cint(AdsPartID)
		action = "del"
	end if

	if AdsDirection < 11 or  AdsDirection > 24 then
		AdsDirection = 0
	end if
	
	if action = "add" then
		conn.execute("Update Advertisement set AdsPartID = AdsPartID&',"&AdsDirection&"' where AdsID = "&AdsPartID&"")
		Response.End()
	end if
	if action = "del" then
		set rs = conn.execute("Select AdsPartID from Advertisement where AdsID = "&AdsPartID&"")
		response.Write rs(0)
		AdsDirection = replace(rs(0),","&AdsDirection&"","")	
		conn.execute("Update Advertisement set AdsPartID = '"&AdsDirection&"' where AdsID = "&AdsPartID&"")
		Response.End()
	end if
		
	set rs = conn.execute("Select AdsID,AdsPic,AdsLink,orderID,AdsDirection,AdsPartID from Advertisement")
	if not rs.eof then
		Ads = rs.getrows
		AdsNum = ubound(Ads,2)
	end if
%>
<script language="javascript">var url = "AdsDirection.asp?action=add&ID=<%=AdsDirection%>&IDD=";</script>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?