%
strForm = "
Please Login with your UTMB username and password.
" & strForm Else If Session("Authorized") = True then Response.Redirect("success.asp") Session("Authorized") = LDAP_login(Session("Username"), Request.Form("password")) If Session("Authorized") = True then info = LDAP_info(Session("username")) For Each field in split(info, "&") name = split(field, "=")(0) value = split(field, "=")(1) Session(name) = value Next set cn=Server.CreateObject("ADODB.Connection") cn.Open (dbConnString) ' Create recordset object. set rs=Server.CreateObject("ADODB.Recordset") mySQL = "SELECT * FROM Authorized WHERE [email] = '" & Session("mail") & "'" rs.Open mySQL, cn If rs.bof and rs.eof then strBody = "You are not an autorized user. Please speak to Carol McCoggin for authorization.
" & strForm else Response.Redirect("success.asp") 'The p_ldap_info stored procedure returns the following information: 'Session("cn") = Full name 'Session("sn") = Surname 'Session("givenname") = Given name 'Session("mail") = UTMB email address 'Session("telephoneNumber") = UTMB phone number 'Session("title") = Position title end if Else strBody = "You have entered an invalid username or password. Please try again.
" & strForm Session.Abandon End If End If %>![]() |
||||||||
| ||||||||