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

📄 add_admin.asp

📁 后台管理系统
💻 ASP
字号:
<!--#include file="cookies.asp"-->
<!--#include file="conn.asp"-->
<!--#include file="md5.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>爱斯特淋浴设备有限公司管理后台</title>
<link href="../file/css.css" rel="stylesheet" type="text/css">
<script language="javascript" src="../js/validator.js"></script>
</head>

<body>
<form name="form1" method="post" action="?action=save" onSubmit="return Validator.Validate(this,2)">
  <table cellpadding="2" cellspacing="1" border="0" width="96%" class="tableBorder" align=center>
   <tr> 
      <th height="25" colspan="2" ><strong>
        添加管理员
      </strong>
    </th></tr>
    <tr bgcolor="#FFFFFF">
      <td width="50" height="25" align="right" class="TableRow2">帐号:</td>
      <td width="628" class="TableRow2"><input name="username" type="text" class="form2" id="username" dataType="Require"  msg="请填写管理帐号!">
          <font color="red">*</font></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td width="50" height="25" align="right" class="TableRow2">密码:</td>
      <td class="TableRow2"><input name="userpassword" type="password" class="form2" id="userpassword" dataType="Require"  msg="请填写管理密码!">
          <font color="red">*(密码为md5加密)</font></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="35" class="TableRow2">&nbsp;</td>
      <td class="TableRow2"><input type="submit" name="Submit" value=" 提 交 ">
          <input type="reset" name="Submit" value=" 重 置 "></td>
    </tr>
  </table>
</form>
</body>
</html>
<% if request.querystring("action")="save" then
if trim(request.form("username"))="" or trim(request.form("userpassword"))="" then
response.Write "<script language=javascript>alert('请正确填写表单!');window.location.href='add_admin.asp';</script>"
response.end
end if
set rs=server.createobject("adodb.recordset")
sql="select * from product_admin "
rs.open sql,conn,1,3
rs.addnew
rs("username")=trim(request.form("username"))
rs("userpassword")=md5(trim(request.form("userpassword")))
rs.update
response.Write "<script language=javascript>alert('添加管理员成功!');window.location.href='add_admin.asp';</script>"
rs.close
set rs=nothing
conn.close
set conn=nothing
end if

%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -