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

📄 welcome.asp

📁 数据库系统,全是源文件,大家可以自由下载哦,谢谢合作
💻 ASP
字号:

<!--#include file="conn.asp"-->
<%
dim sql


'检查管理员
if request.form("submit")="登陆" then

   if request.Form("radio")="管理员" then
   
   sql="select * from user where usename='"&request.Form("admin")&"' and password='"&request.Form("qx")&"'"

   rs.open sql,conn,3,1
       if rs.eof then
             response.write "<script>alert('用户名不存在或者密码错误!');location.href='/login.asp';</script>"
 
       else
             session("admin")=rs("usename")
	         session("qx")=rs("password")
	         response.write "<script> alert('登陆成功,欢迎使用本系统!');location.href='/main.asp';</script>"
       end if
	
	
	'检查教师权限
	else if request.form("radio")="教师" then
	    
         sql="select * from teacher where t_usename='"&request.Form("admin")&"' and t_paw='"&request.Form("qx")&"'"
         rs.open sql,conn,3,1
                if rs.eof then
                    response.write "<script>alert('用户名不存在或者密码错误!');location.href='/login.asp';</script>"
 
                else
                    session("admin")=rs("t_usename")
	                session("qx")=rs("t_paw")
	                response.write "<script> alert('登陆成功,欢迎使用本系统!');location.href='/teacher/t_index.asp';</script>"
                end if
	'检查学生权限
	else
	
	      
          sql="select * from student where s_usename='"&request.Form("admin")&"' and s_paw='"&request.Form("qx")&"'"
          rs.open sql,conn,3,1
                if rs.eof then
                    response.write "<script>alert('用户名不存在或者密码错误!');location.href='/login.asp';</script>"
 
                else
                    session("admin")=rs("s_usename")
	                session("qx")=rs("s_paw")
	                response.write "<script> alert('登陆成功,欢迎使用本系统!');location.href='/admin/admin_xiugai.asp';</script>"
                end if

rs.close
set rs=nothing
conn.close
set conn=nothing
end if
end if
end if
%>


⌨️ 快捷键说明

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