?? addnew1.asp
字號:
<% Response.Buffer=false %>
<!-- #include file="inc/dbconn.inc" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="inc/register.css" type="text/css">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>樂清資訊-資訊與商務的世界</title>
<meta content="text/html; charset=gb2312" http-equiv="Content-Type">
<STYLE type=text/css>TABLE {
FONT-SIZE: 9pt; LINE-HEIGHT: 12pt
}
.bord {
BACKGROUND: #ffffff; BORDER-BOTTOM: rgb(238,238,238) 1px solid; BORDER-LEFT: rgb(128,128,128) 1px solid; BORDER-RIGHT: rgb(238,238,238) 1px solid; BORDER-TOP: rgb(128,128,128) 1px solid; FONT-FAMILY: "宋體"; FONT-SIZE: 9pt; FONT-WEIGHT: normal
}.sbtxt { color: #000000; font-family: 宋體; font-size: 12px; text-decoration: none }
.sblue { color: #0000cc; font-family: 宋體; font-size: 12px; text-decoration: none }
.sorenge { color: #ff6600; font-family: 宋體; font-size: 12px; text-decoration: none }
a:hover { color: #0000ff; font-family: 宋體; font-size: 12px; text-decoration: none }
.swtxt { color: #ffffff; font-family: 宋體; font-size: 12px; text-decoration: none }
.shtxt { color: #666666; font-family: 宋體; font-size: 12px; text-decoration: none }
.bftxt { color: #FFFFFF; font-family: 宋體; font-size: 12px; text-decoration: none }
</style>
<meta content="Microsoft FrontPage 4.0" name="GENERATOR">
<meta name="ProgId" content="FrontPage.Editor.Document">
</head>
<body topmargin="0" leftmargin="0" bgcolor="#DFDFDF">
<!--#include file="inc/top.htm"-->
<SCRIPT language=JavaScript src="inc/validate.js"></SCRIPT>
<SCRIPT language=JavaScript>
<!--
function checkform()
{
if (checkstring("用戶名", document.addnew.uname.value, false)) {
document.addnew.uname.focus();
return false;
}
var pwd = document.addnew.pwd.value;
if (addnew.pwd.value=="") {
alert("請輸入登錄密碼!");
addnew.pwd.focus();
return (false);
}
if (pwd.length < 3) {
alert("密碼不能少于三位!");
return false;
}
var pwd2 = document.addnew.pwd2.value;
if (pwd != pwd2) {
alert("兩次密碼輸入不一致!");
document.addnew.pwd.value="";
document.addnew.pwd2.value="";
return false;
}
return true;
}
//-->
</SCRIPT>
<!-- #include file="inc/enpasswd.inc" -->
<table height="280" align="center" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
<tr>
<td width="760" height="31"></td>
</tr>
<tr>
<td width="760" valign="top">
<form name="addnew" onsubmit="return checkform();" action="addnew1.asp" method="post">
<div align="center">
<table border="0" cellpadding="3" cellspacing="1" width="450" bgcolor="#000000">
<tr bgcolor="#d5c88a">
<td width="100%" height="22">
<p align="center"> ---------- 新會員注冊 ----------
</td>
</tr>
<tr valign="top" bgcolor="#FFFFFF">
<td width="350" align="center">
<table cellpadding="2" cellspacing="0" width="450">
<tr>
<td width="76" align="right" height="5"></td>
<td width="141" align="left" height="5"></td>
<td width="70" align="right" height="5"></td>
<td width="145" align="left" height="5"></td>
<tr>
<td width="76" align="right">用 戶 名:</td>
<td width="141" align="left">
<input type="text" name="uname" size="15" maxlength="15">
</td>
<td width="70" align="right">用戶類別:</td>
<td width="145" align="left">
<select size="1" name="usertype">
<option value="geren" selected>個人</option>
</select>
</td>
<tr>
<td width="76" align="right">登錄密碼:</td>
<td width="141" align="left">
<input type="password" name="pwd" size="15" maxlength="15">
</td>
<td width="70" align="right">重復密碼:</td>
<td width="145" align="left">
<input type="password" name="pwd2" size="15" maxlength="15">
</td>
<tr>
<td align="right" colspan="4" height="30">
<p align="center">
<input type="submit" value=" 注 冊 " name="B1" style="position: relative; height: 22">
</td>
</table>
</td>
</tr>
</table>
</div>
</form>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="760" align="center" bgcolor="#FFFFFF">
<tr>
<td width="100%"></td>
</tr>
<tr>
<td width="100%">
<p align="center">
<!--#include file="inc/down.htm"-->
</td>
</tr>
</table>
</body>
</html>
<%
uname=request("uname")
pwd=request("pwd")
if uname="" then
Response.End
end if
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from geren where uname='"&uname&"'"
rs.open sql,conn,3,3
if not rs.eof then
rs.close
set rs=nothing
response.write"<SCRIPT language=JavaScript>alert('用戶名重復,請重新選擇一個用戶名!');"
response.write"javascript:history.go(-1)</SCRIPT>"
else
rs.close
set rs=nothing
Set rs = Server.CreateObject("ADODB.Recordset")
sq2="select * from geren"
rs.open sq2,conn,3,3
rs.addnew
rs("uname")=uname
rs("pwd")=pwd
rs.update
rs.close
set rs=nothing
Set rs = Server.CreateObject("ADODB.Recordset")
sq3="select * from users"
rs.open sq3,conn,3,3
rs.addnew
rs("name")=uname
rs("password")=pwd
rs("state")=1
rs.update
rs.close
set rs=nothing
session("puid")=uname
response.write"<SCRIPT language=JavaScript>alert('新用戶注冊成功,按確定進入管理頁面...');"
response.write"this.location.href='geren/main.asp';</SCRIPT>"
end if
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -