?? 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
'用戶不存在,進(jìn)行存儲過程
RS.LockType = adLockOptimistic
RS.Open "Select * From [Admin] Where (ID IS Null)"
'添加數(shù)據(jù)集
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">重復(fù)密碼:</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>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -