📄 addnewdata.asp
字号:
<!-- #include file="conn.asp" -->
<!-- #include file="ini.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=allsms%></title>
<link href="css.css" type=text/css rel=stylesheet></head>
<body>
<div id=d1><img src="logo.gif"></div>
<div id=d2 style="text-align:left;">您现在的位置»<A HREF="index.asp">首页</A>»<A HREF="reg.asp">注册资料</A>»</div>
<%
ac=request.QueryString("ac")
msg="出现错误! ERROW"
if request.Form("username")="" then
msg=msg&"<br>"&"用户名不能为空"
end if
if strcomp(cstr(request.Form("password")),cstr(request.Form("password2")))<>0 then
msg=msg&"<br>"&"两次密码输入不同"
end if
if len(request.Form("password"))<6 then
msg=msg&"<br>"&"密码太简单"
end if
if request.Form("quest")="" then
msg=msg&"<br>"&"提示不能为空"
end if
if request.Form("getpassword")="" then
msg=msg&"<br>"&"答案不能为空"
end if
'if len(request.Form("password"))=0 or len(request.Form("password2"))=0 then
'msg=msg&"<br>"&"密码不能为空"
'end if
'if len(request.Form("quest"))=0 or len(request.Form("getpassword"))=0 then
'msg=msg&"<br>"&"提示不能为空"
'end if
if strcomp(msg,"注册错误信息")>0 then
response.Redirect("reg.asp?msg="&msg)
end if
if ac="adduser" then
set rsc=server.createobject("adodb.recordset")
sql="select * from info where username='"&request.Form("username")&"'"
rsc.open sql,conn,1,1
ck=rsc("username")
set rsc=nothing
if ck<>"" then
msg=msg&"<br>"&"用户名已被注册."
response.Redirect("reg.asp?msg="&msg)
end if
dsql="select * from info where id is null"
set rs=server.createobject("adodb.recordset")
rs.open dsql,conn,1,3
rs.addnew
rs("username")=request.Form("username")
rs("password")=request.Form("password")
rs("mail")=request.Form("mail")
rs("sex")=request.Form("sex")
rs("qq")=request.Form("qq")
rs("add")=request.Form("add")
rs("personalinfo")=request.Form("personalinfo")
rs("quest")=request.Form("quest")
rs("getpassword")=request.Form("getpassword")
rs("ntime")=now
rs.update
set rs=nothing
session("admin")=request.Form("username")
'response.Redirect("index.asp")
%>
<a href="index.asp" target="_self">注册成功,请返回登陆!</a>
<div style="width:350px;border-top:1px #666666 solid;text-align:Center;"><img src="add.gif"></div>
<%
end if
%>
<div id=copy style="text-align:center;"><a href="http://www.youwe.org/?user" target="_parent">Copyright ©<%=webmaster%></a><BR>有为明星加工厂 设计发布</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -