?? setpostalcode.asp
字號:
<!--#include file="conn.asp"-->
<!--#include file="session1.asp"-->
<%
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
response.Write "<script language='javascript'>alert('請正確填寫郵編!');javascript:history.go(-1);</script>"
response.end
end if
conn.execute("update sh_youbian set youbian="&youbian&",dizhiname='"&dizhiname&"' where id="&id)
next
conn.close
set conn=nothing
'response.write "<p align=center><font color=red>郵編設置成功!<br>2秒鐘后返回上頁!</font>"
response.write "<meta http-equiv=""refresh"" content=""0;url=ManagePostalcode.asp"">"
end if
if request("action")="add" then
dizhiname=trim(request("dizhiname"))
youbian=request.form("youbian")
If len(youbian)<>6 Then
response.Write "<script language='javascript'>alert('請正確填寫郵編!');javascript:history.go(-1);</script>"
response.end
end if
Set rs = Server.CreateObject("ADODB.Recordset")
rs.open "select * from sh_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 "<p align=center><font color=red>郵編添加成功!<br>2秒鐘后返回上頁!</font>"
response.write "<meta http-equiv=""refresh"" content=""0;url=ManagePostalcode.asp"">"
end if
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -