⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 youbianset.asp

📁 21世纪人才www.51zy.net 网站源码
💻 ASP
字号:
<!--#include file="conn.asp"-->
<%if session("admin")="" then
response.Write "<script language='javascript'>alert('网络超时或您还没有登陆!');window.location.href='login.asp';</script>"
response.End
else
if session("flag")>1 then
response.Write "<p align=center><font color=red>您没有此项目管理权限!</font></p>"
response.End
end if
end if

dim id,youbian,dizhiname,danweino,i
if request("action")="update" then
    for i=1 to request.form("id").count
	id=replace(request.form("id")(i),"'","")
	youbian=replace(request.form("youbian")(i),"'","")
	dizhiname=replace(request.form("dizhiname")(i),"'","")
	if len(youbian)<>6 then
%>
<script language=javascript>
history.back()
alert("请正确填写邮编!")
</script>
<%
		Response.End
	end if
	conn.execute("update youbian set youbian="&youbian&",dizhiname='"&dizhiname&"' where id="&id)

    next
conn.close
set conn=nothing
response.write "<script language=javascript>alert('邮编设置成功!');window.location.href='youbianmanage.asp';</script>"
end if


if request("action")="add" then
	dizhiname=trim(request("dizhiname"))
	youbian=request.form("youbian")
	If len(youbian)<>6 Then
		response.write "请正确填写邮编!请<a href=javascript:history.go(-1)>返回重新填写</a>!"
		response.end
	end if
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open "select * from youbian",conn,1,3
rs.addnew
rs("dizhiname")=dizhiname
rs("youbian")=youbian
rs.update
rs.close
set rs=nothing

conn.close
set conn=nothing
response.write "<script language=javascript>alert('邮编添加成功!');window.location.href='youbianmanage.asp';</script>"
end if
%>

⌨️ 快捷键说明

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