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

📄 admin_modify.asp

📁 还是同学录 功能较为的简单点 挺好用的
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="admin_error.asp"-->
<!--#include file="md5.asp"-->
<title><%=sitename%>-后台管理</title>
<%
  if master="" then
      errinfo="<li>管理员没有登陆,请先 <a href='admin_login.asp'>登陆</a><br>"
      call errweb()
  else
%>
  <table width="<%=width%>" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td width="20%" align="center" valign="top"><%call menu()%></td>
      <td width="80%" align="center" valign="top">
<%
  if request("action")="save" then
      call save()
  else
      call modify()
  end if
%></td>
    </tr>
</table>
<%
  sub modify()
%>
  <form method="POST" action="?action=save">
  <table border="1" width="100%">
    <tr>
      <td width="50%">帐&nbsp;&nbsp;&nbsp; 号</td>
      <td width="50%"><input name="admin" size="20" value="<%=master%>"></td>
    </tr>
    <tr>
      <td width="50%">密&nbsp;&nbsp;&nbsp; 码</td>
      <td width="50%"><input type="password" name="pwd" size="20"></td>
    </tr>
    <tr>
      <td width="50%">重输密码</td>
      <td width="50%"><input type="password" name="repwd" size="20"></td>
    </tr>
  </table>
  <p><input type="submit" value="更 改" name="B1"></p>
  </form>
<%
  end sub
  
  sub save()
      dim repwd,pwd,admin,founderror
      admin=lcase(trim(request.form("admin")))
      pwd=request.form("pwd")
      repwd=request.form("repwd")
      if admin="" or len(admin)>20 then
          errinfo="<li>帐号不能为空,且在20个字符以内<br>"
          founderror=true
      end if 
      if pwd="" or len(pwd)>20 then
          errinfo="<li>密码不能为空,且在20个字符以内<br>"
          founderror=true
      elseif pwd<>repwd then
          errinfo="<li>两次密码输入不一致,请重新输入<br>"
          founderror=true
      end if 
      if founderror then
          call errweb()
      else
          conn.execute("update admin set admin='"&admin&"',pwd='"&md5(pwd)&"' where admin='"&master&"'")
          session("master_address_list")=admin
          success="<li>管理员帐号、密码修改成功,请牢记该密码<br><li><a href='?'>重新修改密码</a><br><li><a href='admin_index.asp'>返回管理欢迎页</a><br>"
          call successweb()
      end if  
  end sub
  
  end if
  conn.close
  set conn=nothing
%>

⌨️ 快捷键说明

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