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

📄 ye_admin_g.asp

📁 类似于baidu的百度知道
💻 ASP
字号:
<%if session("admin")="" then
response.write"你没有登陆或是非法用户!<meta http-equiv=refresh content='1;url=../Index.asp'>"
response.End()
end if
if session("adminl")<>"0" then
response.write"你没有操作权限!<meta http-equiv=refresh content='1;url=r.asp'>"
response.End()
end if
%>
<!--#include file=conn.asp-->
<!--#include file="../Config.asp"-->
<!--#include file="../md5.asp"-->

<!--#include file=Ye_Up.asp-->
<link href=ht.css rel=stylesheet type=text/css>
<title><%=webname%>_管理员管理</title>
<br>
<!--管理员修改密码-->
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="t1">
	<tr>
		<td><%if request("up")="修改" then
	if request("adminpwd")="" then
	response.write"密码不能为空!<meta http-equiv=refresh content='1;url=Ye_Admin_G.asp'>"
	response.End()
	else
	rs.open"select * from admin where adminname='"&session("admin")&"'",conn,1,3
	rs("adminpwd")=md5(request("adminpwd"))
	rs.update
	response.write"密码修改成功!<meta http-equiv=refresh content='1;url=Ye_Admin_G.asp'>"
	response.End()
	end if
	end if%><form method=post action=Ye_Admin_G.asp>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
	<tr>
		<td height="36" align="center" onmouseover="this.className='tbb'" onmouseout="this.className='taa'" class="taa"><strong>管理员修改密码</strong></td>
	</tr>
	<tr>
		<td align=center><br>
新密码:<input name="adminpwd" type="password" id="adminpwd" size="12"><input name="up" type="submit" id="up" value="修改">
         </td>
	</tr>
</table>
</form>
		</td>
	</tr>
</table>
<br>

<!--添加管理员-->
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="t1">
	<tr>
		<td><%if request("add")="添加" then
	if request("adminname")="" then
	response.write"帐号不能为空!<meta http-equiv=refresh content='1;url=Ye_Admin_G.asp'>"
	response.End()
	if request("pass")="" then
	response.write"密码不能为空!<meta http-equiv=refresh content='1;url=Ye_Admin_G.asp'>"
	response.End()
	end if
	if request("adminl")="" then
	response.write"权限不能为空!<meta http-equiv=refresh content='1;url=Ye_Admin_G.asp'>"
	response.End()
	end if
	else
	rs.open"select * from admin where adminname='"&request("adminname")&"'",conn,1,1
	if not rs.eof then
	rs.close
	response.write"该帐号已经存在!<meta http-equiv=refresh content='1;url=Ye_Admin_G.asp'>"
	response.End()
	else
	rs.close
	rs.open"select * from admin",conn,1,3
	rs.addnew
	rs("adminname")=request("adminname")
	rs("adminpwd")=md5(request("pass"))
	rs("adminl")=request("adminl")
	rs.update
	rs.close
	response.write"管理员添加成功!<meta http-equiv=refresh content='1;url=Ye_Admin_G.asp'>"
	response.End()
	end if
	end if
	end if
	%><form method=post action=Ye_Admin_G.asp>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
	<tr>
		<td height="36" align="center" onmouseover="this.className='tbb'" onmouseout="this.className='taa'" class="taa"><strong>添加管理员</strong></td>
	</tr>
	<tr>
		<td align=center><br>
<p align="center">帐号:<input name="adminname" type="text" id="adminname" size="12">&nbsp;<br>密码:<input name="pass" type="password" id="pass" size="12">&nbsp;<br>级别:<select size="1" name="adminl"><option value="0" selected>系统  管理员</option><option value="1">一般  管理员</option></select><br><input name="add" type="submit" id="add" value="添加">
    </td>
	</tr>
</table>
</form>
		</td>
	</tr>
</table>
<br>

<!--删除管理员-->
<table border="0" width="100%" cellspacing="0" cellpadding="0" class="t1">
	<tr>
		<td><%if request("del")="删除" then
rs2.open"select * from admin where id="&request("id")&"",conn,1,3
rs2.delete
rs2.close
end if
%>
<table border="0" width="100%" cellspacing="0" cellpadding="0" height="100%">
	<tr>
		<td height="36" align="center" onmouseover="this.className='tbb'" onmouseout="this.className='taa'" class="taa"><strong>删除管理员</strong></td>
	</tr>
	<tr>
		<td align=center><br>
<table width="100%"><tr><td height="24"><p align="center"><b>管理员</b></td>
        <td height="24"><p align="center"><b>删除</b></td></tr><%rs2.open"select * from admin",conn,1,1
      while not rs2.eof
      %><tr onmouseover="this.className='taa'" onmouseout="this.className='tcc'" class="tcc"><form method=post action=Ye_Admin_G.asp><input type=hidden name="id" value=<%=rs2("id")%>>
<td align="center"><%=rs2("adminname")%></td><td align="center"><p align="center"><input name="del" type="submit" id="del" value="删除"></form><%
      rs2.movenext
	  wend
      rs2.close%></tr></table>
   </td>
	</tr>
</table>
		</td>
	</tr>
</table>

<br><!--#include file=Ye_End.asp-->

⌨️ 快捷键说明

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