📄 account.asp
字号:
<%@ Language=VBScript %>
<!--#INCLUDE FILE="include/shop.asp" -->
<% REM ######################################################################### %>
<% REM %>
<% REM Accout.ASP %>
<% REM Epro v1.00 %>
<% REM 增加新用户 %>
<% REM Copyright (c) 1996-98 Epro. All rights reserved. %>
<% REM %>
<% REM ######################################################################### %>
<%
redirecturl=Request("goto")
if redirecturl="" then redirecturl="index.asp"
dim errorList '记录错误信息
shortname = checklength(Request("id"),20)
if isnull(shortname) then
errorList=errorList & "注册名必须在1到20个字符。<br>"
end if
fullname = checklength(Request("name"),25)
if isnull(fullname) then
errorList=errorList & "全名必须在1到25个汉字。<br>"
end if
y=checknum(Request("y"),4)
if isnull(y) then y=1975
m=checknum(Request("month"),2)
if isnull(m) then m=1
d=checknum(Request("day"),2)
if isnull(d) then d=1
birthday=dateserial(y,m,d)
education = Request("education")
career = Request("career")
sex = Request("sex")
street = checklength(Request("cst"),120)
if isnull(street) then
errorList=errorList & "街道地址必须在1到120个汉字。<br>"
end if
city = checklength(Request("cit"),10)
if isnull(city) then
errorList=errorList & "城市必须在1到10个汉字。<br>"
end if
country = checklength(Request("cou"),10)
if isnull(country) then
errorList=errorList & "国家必须在1到10个汉字。<br>"
end if
province =checklength(Request("pro"),15)
if isnull(province) then
errorList=errorList & "省份必须在1到15个汉字。<br>"
end if
zip = checklength(Request("zip"),50)
if isnull(zip) then
errorList=errorList & "邮件编号必须在1到50个字符。<br>"
end if
email = checklength(Request("ema"),50)
phone =checklength(Request("ph"),20)
if isnull(phone) then
errorList=errorList & "电话号码必须在1到20个字符。<br>"
end if
pwd = Request("pa")
if isnull(pwd ) then
errorList=errorList & "密码必须在1到20个字符。<br>"
end if
idcard = checklength(Request("card"),30)
que = checklength(Request("que"),20)
if isnull(que) then
errorList=errorList & "问题必须在1到20个字符。<br>"
end if
awn = checklength(Request("awn"),20)
if isnull(awn) then
errorList=errorList & "答案必须在1到20个字符。<br>"
end if
'errorList=formValues("shortname")
if errorList<>"" then
%>
<!--#INCLUDE FILE="include/error.asp" -->
<%
else
if request("action")="add" then
cmdTemp.CommandText = "SELECT * FROM shopper where shortname='" & shortname & "'"
else
cmdTemp.CommandText = "SELECT * FROM shopper where shortname='" & ShopperID & "'"
end if
Set recordSet = Server.CreateObject("ADODB.Recordset")
recordSet.Open cmdTemp, , adOpenKeyset, adLockOptimistic
if request("action")="add" and not (recordSet.EOF) then
errorList=errorList & "注册名已经存在,请更改后在试。<br>"
else
if request("action")="add" then
recordSet.AddNew
recordSet("shortname") =shortname
end if
recordSet("fullname") =fullname
recordSet("sex") =sex
recordSet("street") =street
recordSet("city") =city
recordSet("province") =province
recordSet("zip") =zip
recordSet("country") =country
recordSet("phone") =phone
recordSet("email") =email
recordSet("password") =pwd
recordSet("created") = now
recordSet("birthday")=birthday
recordSet("education")=education
recordSet("idcard")=idcard
recordSet("career")=career
recordSet("question")=que
recordSet("answer")=awn
recordSet.Update
if request("action")="add" then
Session("ShopperId") =shortname
end if
end if
if errorList<> "" then
%>
<!--#INCLUDE FILE="include/error.asp" -->
<%
else %>
<html>
<head>
<title>注册成功</title>
<link REL="stylesheet" HREF="shop.css" TYPE="text/css">
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
</head>
<body topMargin="0">
<!--#INCLUDE FILE = "include/toolbar.asp" -->
<br>
<table WIDTH="720" BORDER="0" CELLPADDING="0" CELLPADDING="0">
<tr>
<td WIDTH="250"> </td>
<td>
操作成功!
</td>
</tr>
<tr><td></td>
<td><br>
<a href="<%=redirecturl%>">继续</a>
</td>
</tr>
</table>
<!--#INCLUDE FILE = "include/footer.asp" -->
</body>
</html>
<%
end if
end if %>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -