📄 admin_adminadd.asp
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!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>添加管理员</title>
<link href="../Style.css" rel="stylesheet" type="text/css">
</head>
<body>
<!--#include file="../Inc/adovbs.asp"-->
<!--#include file="Inc/Conn.asp"-->
<!--#include file="Inc/Admin_Check.asp"-->
<!--#include file="../Inc/MD5.asp"-->
<!--#include file="../inc/SQLCHK.asp"-->
<%
If Request.QueryString("Action")="Add" Then
Dim AdminName, AdminPwd
AdminName = Request.Form("AdminName")
AdminPwd = MD5(Request.Form("AdminPwd"))
Dim RS
Set RS=Server.CreateObject("ADODB.RecordSet")
RS.ActiveConnection=Conn
RS.Source = "Select * From [Admin] Where AdminName='"&AdminName&"'"
RS.CursorType = adOpenKeyset
RS.CursorLocation = adUseServer
RS.LockType = adLockReadOnly
RS.Open
If Not(RS.Eof and RS.Bof) Then
RS.Close
Response.write "<script language='javascript'>" &Chr(13)
Response.write "alert('用户名已存在!');" &Chr(13)
Response.write "javascript:history.go(-1);"&Chr(13)
Response.write "</script>" &Chr(13)
Response.End
Else
RS.Close
'用户不存在,进行存储过程
RS.LockType = adLockOptimistic
RS.Open "Select * From [Admin] Where (ID IS Null)"
'添加数据集
RS.AddNew
RS("AdminName") = AdminName
RS("AdminPwd") = AdminPwd
RS.Update
Response.write "<script language='javascript'>" & chr(13)
Response.write "alert('添加成功!');" & Chr(13)
Response.write "window.document.location.href='Admin_System.asp';"&Chr(13)
Response.write "</script>" & Chr(13)
Response.End
End If
End If
%>
<!--#include file="Inc/Head.asp"-->
<table width="772" height="100%" border="0" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="11" background="../Image/LeftMargin.gif"></td>
<td width="750" height="400" align="center" valign="top" background="../Image/BGBlock.gif"><br>
<!--/////////////////////////////////////////////////////////////////////////////////////////////-->
<script LANGUAGE="JavaScript" SRC="../CheckForm.js"></script>
<form action="Admin_AdminAdd.asp?Action=Add" method="post" onSubmit="return CheckForm(this)">
<table width="400" border="0" cellspacing="0" cellpadding="0" align="center" class="TableInfo">
<tr>
<td height="40" colspan="2" align="center" class="TextTitle">添加管理员</td>
</tr>
<tr>
<td height="15" colspan="2" align="center" class="TextTitle"><hr width="92%" color="#BBBBBB" size="1"></td>
</tr>
<tr>
<td height="40" width="160" > <span class="Text1">管理员登陆名:</span></td>
<td align="left"><Input NAME="AdminName" ID="AdminName" SIZE="20" maxLength="14" check="^\S+$" warning="账号不能为空,且不能含有空格" class="Input"></td>
</tr>
<tr>
<td height="40" width="160"> <span class="Text1">密码:</span></td>
<td align="left"><INPUT NAME="AdminPwd" TYPE="Password" ID="Password" SIZE="20" maxLength="12" check="\S{8,}" warning="密码八位以上" class="Input"></td>
</tr>
<tr>
<td height="40" width="160" > <span class="Text1">重复密码:</span></td>
<td align="left"><INPUT NAME="PwdConfirm" TYPE="Password" ID="PwdConfirm" size="20" maxLength="12" accord="AdminPwd" warning="两次输入的密码不一致" class="Input"></td>
</tr>
<tr>
<td height="30" colspan="2" align="center">
<input type="submit" name="Submit" value="提 交" class="Input">
<INPUT NAME="Reset" type=reset ID="Reset" VALUE="清 除" class="Input"></td>
</tr>
</table>
</form><br>
<!--/////////////////////////////////////////////////////////////////////////////////////////////-->
</td>
<td width="11" background="../Image/RightMargin.gif"></td>
</tr>
</table>
<!--#include file="Inc/Trail.asp"-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -