📄 register.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="Config.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><%= cfgTitle %></title>
<style type="text/css">
<!--
body {
background-color: #666688;
}
-->
</style>
<style type="text/css">
<!--
.style2 {font-weight: bold}
.style3 {
color: #FFFFFF;
font-size: 14px;
font-weight: bold;
}
-->
</style>
<link href="Style.css" rel="stylesheet" type="text/css">
<%
if request("action") = "save" then
Dim Username
call createRs(rs,"select * from Users where Username='" & trim(request.Form("Username")) & "'")
'response.End()
if not rs.eof and not rs.bof then
%>
<script language="javascript">
alert("对不起,您的用户名已被他人注册。");
history.back(1);
</script>
<%
response.End()
end if
rs.addnew
rs("Username") = request.Form("Username")
rs("Password") = request.Form("Password")
rs("sex") = request.Form("sex")
rs("question") = request.Form("question")
rs("answer") = request.Form("answer")
rs("date") = date()
rs.update
Username = rs("Username")
call closers(rs)
call creaters(rs,"select * from affiche")
rs.addnew
rs("Username") = Username
rs("Content") = "暂无公告..."
rs.update
call closers(rs)
call creaters(rs,"select * from Title")
rs.addnew
rs("Username") = Username
rs("Description") = Username & "'s Blog 我的博客"
rs.update
call closers(rs)
response.Cookies("user").Expires = now()
%>
<script language="javascript">
window.location = "Register.asp?Username=<%= request.Form("Username") %>&user=<%= request("user") %>";
</script>
<%
end if
%>
</head>
<body>
<!--#include file="top.asp"-->
<link href="Style.css" rel="stylesheet" type="text/css">
<% if request("Username") <> "" then %>
<table width="614" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="614" height="15" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="614" height="15"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="29" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="614" height="29" valign="middle" background="images/Main_01.gif"> <span class="style3">用户注册 注册成功</span></td>
</tr>
</table></td>
</tr>
<tr>
<td height="80" valign="top"><table width="100%" border="0" cellpadding="10" cellspacing="0" background="images/Main_02.gif">
<!--DWLayoutTable-->
<tr>
<td width="614" height="50">
<div align="center">
恭喜您!您的Blog已注册成功,今后您可从以下站点访问:<P>
<a href="http://<%=request.ServerVariables("SERVER_NAME")%><%= replace(lcase(request.ServerVariables("URL")),"register.asp","Default.asp") %>?User=<%= request("Username") %>">
http://<%=request.ServerVariables("SERVER_NAME")%><%= replace(lcase(request.ServerVariables("URL")),"register.asp","Default.asp") %>?User=<%= request("Username") %>
</a>
</div></td>
</tr>
<tr>
<td height="40">
<div align="center">
<input name="Submit2" type="button" class="InputBox" value="进入" onClick="javascript:window.location='Default.asp?User=<%= request("Username") %>';">
<input name="Submit" type="button" class="InputBox" value="返回" onClick="javascript:history.back(1);">
</div> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="25" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="614" height="25" valign="top"><img src="images/Main_03.gif" width="614" height="25"></td>
</tr>
</table></td>
</tr>
</table>
<% 'End If %>
<% elseif request("action") = "apply" then %>
<table width="614" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="614" height="15" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="614" height="15"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="29" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="614" height="29" valign="middle" background="images/Main_01.gif"> <span class="style3">用户注册 填写基本资料</span></td>
</tr>
</table></td>
</tr>
<tr>
<td height="80" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/Main_02.gif">
<!--DWLayoutTable-->
<tr>
<td width="614" height="80"><br>
<table width="63%" height="106" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#C0E096">
<form name="frmUnit" method="post" action="Register.asp?action=save&user=<%= request("user") %>" >
<tr bgcolor="#E6F2D5">
<td width="27%" height="14" bgcolor="#F3F9EC">用户名:</td>
<td width="73%" bgcolor="#F3F9EC"><input name="username" type="text" class="InputBox" id="username">
*</td>
</tr>
<tr>
<td height="14" bgcolor="#FFFFFF">性别:</td>
<td bgcolor="#FFFFFF"><input name="sex" type="radio" value="男" checked>
男
<input type="radio" name="sex" value="女">
女</td>
</tr>
<tr bgcolor="#F3F9EC">
<td height="14">密码:</td>
<td><input name="password" type="password" class="InputBox" id="password">
*</td>
</tr>
<tr>
<td height="14" bgcolor="#FFFFFF">重新输入密码:</td>
<td bgcolor="#FFFFFF"><input name="Repassword" type="password" class="InputBox" id="Repassword">
*</td>
</tr>
<tr bgcolor="#F3F9EC">
<td height="14">密保提问:</td>
<td><input name="question" type="text" class="InputBox" id="question">
*</td>
</tr>
<tr>
<td height="14" bgcolor="#FFFFFF">密保答案:</td>
<td bgcolor="#FFFFFF"><input name="answer" type="text" class="InputBox" id="answer">
*</td>
</tr>
<tr bgcolor="#F3F9EC">
<td height="14" colspan="2"><div align="center">
<input name="btnSubmit" type="button" class="InputBox" id="btnSubmit" value="提交">
<input name="Submit3" type="reset" class="InputBox" value="重填">
</div></td>
</tr>
</form>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="25" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="614" height="25" valign="top"><img src="images/Main_03.gif" width="614" height="25"></td>
</tr>
</table></td>
</tr>
</table>
<% else %>
<table width="614" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="614" height="15" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="614" height="15"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="29" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="614" height="29" valign="middle" background="images/Main_01.gif"> <span class="style3">用户注册 接受协议</span></td>
</tr>
</table></td>
</tr>
<tr>
<td height="80" valign="top"><table width="100%" border="0" cellpadding="10" cellspacing="0" background="images/Main_02.gif">
<!--DWLayoutTable-->
<tr>
<td width="614" height="80">
<!--#include file="Regtext.txt"-->
</td>
</tr>
<tr>
<td height="40">
<div align="center">
<input name="Submit2" type="button" class="InputBox" value="同意" onClick="javascript:window.location='Register.asp?action=apply&user=<%= request("user") %>';">
<input name="Submit" type="button" class="InputBox" value="不同意">
</div> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="25" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="614" height="25" valign="top"><img src="images/Main_03.gif" width="614" height="25"></td>
</tr>
</table></td>
</tr>
</table>
<% end if %>
<!--#include file="down.asp"-->
</body>
</html>
<script language="vbscript">
sub btnSubmit_onclick()
if frmUnit.Username.value = "" then
Msgbox "用户名不能为空",vbCritical,"用户名"
exit sub
end if
if frmUnit.password.value = "" then
Msgbox "密码不能为空",vbCritical,"密码"
exit sub
end if
if frmUnit.question.value = "" then
Msgbox "密码提问不能为空",vbCritical,"密码提问"
exit sub
end if
if frmUnit.answer.value = "" then
Msgbox "密码答案不能为空",vbCritical,"密码答案"
exit sub
end if
if frmUnit.password.value <> frmUnit.Repassword.value then
Msgbox "您两次输入的密码不同",vbCritical,"密码不同"
exit sub
end if
frmunit.submit
end sub
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -