user_pass.asp

来自「汕头育新学校学籍与成绩管理平台是集学籍管理与成绩管理于一体的网络互动平台。功能强」· ASP 代码 · 共 55 行

ASP
55
字号
<!--#include file="conn.asp"-->
<!--#include file="char.asp"-->
<%
 If mdbFile = Empty Then mdbFile = "yuxin.mdb"
 If u_type = Empty Then u_type = "0"
 Passed = Session(mdbFile )
 If Passed = "Passed"  Then
 u_name = Session("u_name")
 u_password = Session("u_password")
 u_type = Session("u_type")
 u_no = Session("u_no")
 u_id = Session("u_id")
 else
   u_name =Request("u_name")
   u_password =Request("u_password")
 End If
If Passed <> "Passed"  Then
   Passed = CheckPass(u_name,u_password,mdbFile,u_type,u_no,u_id)
End If
If Passed <> "Passed" Then
%>    
   <% If Passed = "NotPassedIDPa" Then  ' 不是第一次进入 %>
      <script>alert('请输入用户帐号和密码!');history.back();</Script>
   <%End If%>      
   <% If Passed = "NotPassedID" Then  ' 不是第一次进入 %>
      <script>alert('请输入用户帐号!');history.back();</Script>
   <%End If%>
   <% If Passed = "NotPassedPa" Then  ' 不是第一次进入 %>
    <script>alert('请输入用户密码!');history.back();</Script>  
   <%End If%>
   <% If Passed = "NotPassed" Then  ' 不是第一次进入 %>
      <script>alert('帐号被删除、帐号或密码错误!');history.back();</Script>
   <%End If%>
<% Else
Session("u_name") = u_name
Session("u_password") = u_password
Session("u_type") = u_type
Session("u_no") = u_no
Session("u_id") = u_id
if u_type="0" then
response.redirect"user_reg2.asp"
elseif u_type="1" then 
response.redirect"user_display.asp"
elseif u_type="2" then 
Response.write "<script>alert('本功能暂不对教师开放!点确定返回!');location.href('user_login.asp');</script>" 
elseif u_type="3" then
response.redirect"admin_display.asp"
elseif u_type="4" then
response.redirect"admin_display.asp"
elseif u_type="5" then
response.redirect"superadmin_display.asp"
else
Response.write "<script>alert('本功能暂不开放!点确定返回!');location.href('user_login.asp');</script>" 
end if
End If %>

⌨️ 快捷键说明

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