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

📄 adminsuperadmin.asp

📁 程序名称:酷虎网校友录 V1.0 (商业版)*(修改版) * 本软体为商业软件
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="inc/sessionadmin.asp"-->
<!--#include file="inc/md5.asp"-->
<%
AdminName1=Request.Form("AdminName1")
AdminName2=Request.Form("AdminName2")
AdminName3=Request.Form("AdminName3")
AdminPassword1=Request.Form("AdminPassword1")
AdminPassword2=Request.Form("AdminPassword2")
AdminPassword3=Request.Form("AdminPassword3")
AdminPassword4=Request.Form("AdminPassword4")
AdminPassword5=Request.Form("AdminPassword5")

IF AdminName1<>"" Then
IF Len(AdminPassword1)<6 Then
ErrInfo=ErrInfo & "密码不能少于6位!<BR>"
End IF
IF AdminPassword1<>AdminPassword2 Then
ErrInfo=ErrInfo & "两次密码不一样!<BR>"
End IF
SQL="Select * From 超级管理员 Where 帐号='"& AdminName1 &"'"
Set RS=Server.CreateObject("ADODB.Recordset")
RS.Open SQL,Connstr,1,1
IF Not RS.Eof THen
ErrInfo=ErrInfo & "该管理员帐号已经存在!<BR>"
End IF
IF ErrInfo="" Then
SQL="Select * From 超级管理员"
Set RS=Server.CreateObject("ADODB.Recordset")
RS.Open SQL,Connstr,3,2
RS.AddNew
RS("帐号")=AdminName1
RS("密码")=md5(AdminPassword1)
RS.Update
ErrInfo="成功添加管理员!<BR>"
End IF
End IF

IF AdminName2<>"" Then
SQL="Delete * From 超级管理员 Where 帐号='"& AdminName2 &"'"
Set RS=Server.CreateObject("ADODB.Recordset")
RS.Open SQL,Connstr,3,2
ErrInfo="成功删除管理员!<BR>"
End IF

IF AdminName3<>"" Then
IF Len(AdminPassword4)<6 Then
ErrInfo=ErrInfo & "密码不能少于6位!<BR>"
End IF

IF AdminPassword4<>AdminPassword5 Then
ErrInfo=ErrInfo & "两次密码不一样!<BR>"
End IF

SQL="Select * From 超级管理员 Where 帐号='"& AdminName3 &"'"
Set RS=Server.CreateObject("ADODB.Recordset")
RS.Open SQL,Connstr,3,2
IF RS.EOF Then
ErrInfo=ErrInfo & "不存在这个管理员!<BR>"
Else
	IF md5(AdminPassword3)<>RS("密码") Then
	ErrInfo=ErrInfo & "旧密码不正确!<BR>"
	End IF
End IF
IF ErrInfo="" Then
RS("密码")=md5(AdminPassword4)
RS.Update
ErrInfo="密码修改成功!<BR>"
End IF

End IF

%>
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<!--#include file="inc/css.asp"-->
<title><%=WebSiteName%></title>
</head>
<body topmargin="0" background="images/bg.gif">
<!--#include file="admintop.asp"-->
<div align="center">
  <center>
  <table border="0" width="755" cellspacing="0" cellpadding="0">
    <tr>
      <td width="189" style="background-color: #FFFFFF; border-left: 1 solid #000000; border-top: 1 solid #000000; border-bottom: 1 solid #000000" valign="top"> 
		<!--#include file="aleft.asp"-->
      </td>
      <td width="562" style="background-color: #FFFFFF; border: 1 solid #000000" valign="top">
        <table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td width="100%" height="25" bgcolor="#EDEDED" style="border-bottom: 1 solid #000000;">
              <table border="0" width="100%" cellspacing="0" cellpadding="0">
                <tr>
                  <td width="100%">
                    <p align="center">超级管理员添加与管理</td>                 
                </tr>
              </table>
            </td>
          </tr>
          <tr>
            <td width="100%" valign="top">
            <div align="center">
              <table border="0" width="90%" cellspacing="0" cellpadding="0">
              <%IF ErrInfo<>"" Then%>
                <tr>
                  <td width="100%" height="8"></td>
                </tr>
                <tr>
                  <td width="100%" height="22">
                    <p style="margin-left: 50"><font color="#FF0000"><%=ErrInfo%></font></td>
                </tr>
              <%End IF%>  
                <tr>
                  <td width="100%" height="8"></td>
                </tr>
                <tr>
                  <td width="100%">
                    <p style="line-height: 150%"><font color="#FF0000">·超级管理员为校友录维护人员,有绝对高的权限。所以务必少添加此类型的用户。</font></td>
                </tr>
              <center>
                <tr>
                  <td width="100%" valign="bottom" style="background-color: #EDEDED; border-top: 1 solid #000000; border-bottom: 1 solid #000000;" height="20">超级管理员添加与管理--&gt;&gt;添加超级管理员</td>
                </tr>
              </center>
              <form action="" method="post">
                <tr>
                  <td width="100%" valign="middle" align="right">
                    <table border="0" width="100%" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="24%" valign="middle" align="right">
                          <p style="margin-top: 10">超级管理员的名字:</td>
                        <td width="44%">
                          <p style="margin-top: 10"><input type=text name="AdminName1" size=12 maxlength=12 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 82; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%"></td>
                        <td width="32%">
                          <p style="margin-top: 10"></td>
                      </tr>
                      <tr>
                        <td width="24%" valign="middle" align="right">
                          超级管理员的密码:</td>
                        <td width="44%">
                          <input type=password name="AdminPassword1" size=12 maxlength=16 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 82; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%"></td>
                        <td width="32%">
                        </td>
                      </tr>
                      <tr>
                        <td width="24%" valign="middle" align="right">
                          <p style="margin-bottom: 10">请再输入一遍密码:</td>
                        <td width="44%">
                          <p style="margin-bottom: 10"><input type=password name="AdminPassword2" size=12 maxlength=16 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 82; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%"></td>
                        <td width="32%">
                          <p style="margin-bottom: 10"><INPUT type=submit value=' 添 加 ' name=Submit style="background-color: #DDDDDD; background-repeat: repeat; background-attachment: scroll; font-size: 9pt; height: 18; width: 85; border: 1px groove #000000; background-position: 0% 50%"></td>
                      </tr>
                    </table>
                  </td>
                </tr>
                </form>
                <center>
                <center>
              </center>
              </center>
                <center>
              </center>
              <center>
                <tr>
                  <td width="100%" valign="bottom" style="background-color: #EDEDED; border-top: 1 solid #000000; border-bottom: 1 solid #000000;" height="20">超级管理员添加与管理--&gt;&gt;割除超级管理员</td>
                </tr>
              </center>
              <form action="" method="post">
                <tr>
                  <td width="100%" height="8">
                    <table border="0" width="100%" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="6%">
                          <p style="margin-top: 10; margin-bottom: 10" align="right">将:</td>
                        <td width="22%">
                          <p style="margin-top: 10; margin-bottom: 10"><select size="1" name="AdminName2" style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 19; width: 108; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%">
                            <option>超级管理员名字</option>
                            <%
                            SQL="Select * From 超级管理员"
                            Set RS=Server.CreateObject("ADODB.Recordset")
                            RS.Open SQL,Connstr,1,1
                            Do While Not RS.EOF
                            %>
                            <option Value="<%=RS("帐号")%>"><%=RS("帐号")%></option>
                            <%
                            RS.MoveNext
                            Loop
                            %>
                          </select></td>
                        <td width="40%">
                          <p style="margin-top: 10; margin-bottom: 10">从超级管理员队伍中割除。</td>
                        <td width="32%">
                          <p style="margin-top: 10; margin-bottom: 10"><INPUT type=submit value=' 割 除 ' name=Submit style="background-color: #DDDDDD; background-repeat: repeat; background-attachment: scroll; font-size: 9pt; height: 18; width: 85; border: 1px groove #000000; background-position: 0% 50%">   
                        </td>
                      </tr>
                      <center>
                <tr>
                  <td width="100%" valign="bottom" style="background-color: #EDEDED; border-top: 1 solid #000000; border-bottom: 1 solid #000000;" height="20" colspan="6">超级管理员添加与管理--&gt;&gt;密码更改</td>
                </tr>
                </form>
              </center>
                    </table>
                  </td>
                </tr>
                <form action="" method="post">
                <tr>
                  <td width="100%" height="8">
                    <table border="0" width="100%" cellspacing="0" cellpadding="0">
                      <tr>
                        <td width="24%">
                          <p style="margin-top: 10" align="right">您的超级管理名字:</td>
                        <td width="44%">
                          <p style="margin-top: 10"><input type=text name="AdminName3" size=12 maxlength=12 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 82; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%"></td>
                        <td width="32%">
                          <p style="margin-top: 10"></td>
                      </tr>
                      <tr>
                        <td width="24%">
                          <p align="right">您以前的管理密码:</td>
                        <td width="44%"><input type=password name="AdminPassword3" size=12 maxlength=16 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 82; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%"></td>
                        <td width="32%"></td>
                      </tr>
                      <tr>
                        <td width="24%">
                          <p align="right"><font color="#FF0000">您要更改的新密码:</font></td>
                        <td width="44%"><input type=password name="AdminPassword4" size=12 maxlength=16 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 82; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%"></td>
                        <td width="32%"></td>
                      </tr>
                      <tr>
                        <td width="24%">
                          <p style="margin-bottom: 10" align="right"><font color="#FF0000">请再输入一遍密码:</font></td>
                        <td width="44%">
                          <p style="margin-bottom: 10"><input type=password name="AdminPassword5" size=12 maxlength=16 style="background-attachment: scroll; background-repeat: repeat; font-size: 9pt; height: 18; width: 82; background-color: #FFFFFF; border: 1 solid #000000; background-position: none 0%"></td>
                        <td width="32%">
                          <p style="margin-bottom: 10"><INPUT type=submit value=' 修 改 ' name=Submit style="background-color: #DDDDDD; background-repeat: repeat; background-attachment: scroll; font-size: 9pt; height: 18; width: 85; border: 1px groove #000000; background-position: 0% 50%">   
                        </td>
                      </tr>
                    </table>
                  </td>
                </tr>
                </form>
              <center>
              </table>
              </center>
            </div>
            </td>
          </tr>
          <tr>
            <td width="100%" valign="top" height="8">
            <p>
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</div>
<!--#include file="bottom.asp"-->
</body>

</html>

⌨️ 快捷键说明

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