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

📄 admin_inc.asp

📁 在线发布系统 本系统有两大功能模块:用户模块和后台管理模块。用户模块模块主要实现的主要功能有:文章浏览功能、用户注册登陆能、文章发布功能、用户管理修改文章功能、文章搜索功能。后台管理模块模块主要实现
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="inc.asp"-->
<%
if request.form("submit")="登陆" then
sql="select * from user_data where user_name='"&trim(request.form("admin_name"))&"'and power_type in(1,2)"
set rs=red(sql)
if rs.eof then
%>
<script language="javascript">
     window.alert("没有此管理员");
     window.location.href="admin_logo.asp";
</script>
<%
elseif rs("user_pwd")<>trim(request.form("admin_pwd")) then%>
<script language="javascript">
     window.alert("您的密码不正确");
     window.location.href="admin_logo.asp";
</script>
<%
else
response.cookies("admin_name")=trim(request.form("admin_name"))
session("power_type")=rs("power_type")
response.redirect "index.asp"
end if
rs.close
set rs=nothing
end if
<!-- 以上是管理员登陆认证 -->
%>
<%
if request.QueryString("method")="lyout" then
response.Cookies("admin_name")=""
%>
<script language="javascript">
window.alert("退出登陆");
location.href="../index.asp";
</script>
<%end if%>
<!-- 以上是退出登陆 -->
<%
if request.QueryString("method")="hy" then
sql1="delete from user_data where user_id="&request.QueryString("id")
conn1.execute sql1
%>
<script language="javascript">
window.alert("成功删除会员");
location.href="index.asp";
</script>
<%
elseif request.QueryString("method")="gl" then
sql="update user_data set power_type=1 where user_id="&request.QueryString("id")
conn1.execute sql
%>
<script language="javascript">
window.alert("成功添加管理员");
window.location.href="admin_user.asp";
</script>
<%
elseif request.QueryString("method")="cs" then
sql="update user_data set power_type=0 where user_id="&request.QueryString("id")
conn1.execute sql
%>
<script language="javascript">
window.alert("成功撤销管理");
window.location.href="admin_user.asp";
</script>
<%end if%>

⌨️ 快捷键说明

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