⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addnew1.asp

📁 大型人才程序网站程序
💻 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 + -