******* http://www.reca.ab.ca/asp/verify.asp <%@ LANGUAGE="VBSCRIPT" %> <%Response.Buffer = True%> <% Session("ssn_reason")="" Session("ssn_Agency_Recordset") = "" Session("ssn_Branch_Recordset") = "" Session("ssn_Person_Recordset") = "" Session("Salesperson_Recordset") = "" var_recaid = Request.Form("UserID") Session("ssn_Reca_ID_Tmp") = var_recaid var_password = Request.Form("Password") If Len(var_recaid) <= 0 Or Len(var_password) <= 0 Then Response.Redirect "login.asp?qry_message=Please+Provide+Your+User+ID+And+Password" Else 'MOVED FROM GLOBAL.ASA, IE/RL - 6/25/98 Session("RECADATABASE_ConnectionString") = "DRIVER={SQL Server};SERVER=205.233.109.135;UID=sa;PWD=orangerabbit;APP=Microsoft (R) Developer Studio;WSID=6634BBD2R245;LANGUAGE=us_english;DATABASE=RECADATABASE" Session("RECADATABASE_ConnectionTimeout") = 90 Session("RECADATABASE_CommandTimeout") = 300 Session("RECADATABASE_RuntimeUserName") = "sa" Session("RECADATABASE_RuntimePassword") = "orangerabbit" Set RECADATABASE = Server.CreateObject("ADODB.Connection") RECADATABASE.ConnectionTimeout = Session("RECADATABASE_ConnectionTimeout") RECADATABASE.CommandTimeout = Session("RECADATABASE_CommandTimeout") RECADATABASE.Open Session("RECADATABASE_ConnectionString"), Session("RECADATABASE_RuntimeUserName"), Session("RECADATABASE_RuntimePassword") Set cmdTemp = Server.CreateObject("ADODB.Command") Set rsPerson = Server.CreateObject("ADODB.Recordset") cmdTemp.CommandText = "Select RECAID, FirstName, LastName, Authority From Persons WHERE (RECAID = '" & var_recaid & "' And Password = '" & var_password & "')" cmdTemp.CommandType = 1 Set cmdTemp.ActiveConnection = RECADATABASE rsPerson.Open cmdTemp, , 1, 3 If rsPerson.EOF Then Response.Redirect "login.asp?qry_message=Invalid+User+ID/Password+Combination" Else 'MOVED FROM GLOBAL.ASA, IE/RL - 6/25/98 'GET ACTIVE MONTH FOR MONTH END CLOSING Set RECAACTDATABASE = Server.CreateObject("ADODB.Connection") RECAACTDATABASE.ConnectionTimeout = Session("RECADATABASE_ConnectionTimeout") RECAACTDATABASE.CommandTimeout = Session("RECADATABASE_CommandTimeout") RECAACTDATABASE.Open Session("RECADATABASE_ConnectionString"), Session("RECADATABASE_RuntimeUserName"), Session("RECADATABASE_RuntimePassword") Set cmdActiveMonth = Server.CreateObject("ADODB.Command") Set rsActiveMonth = Server.CreateObject("ADODB.Recordset") cmdActiveMonth.CommandText = "ActiveMonth" cmdActiveMonth.CommandType = 2 Set cmdActiveMonth.ActiveConnection = RECAACTDATABASE rsActiveMonth.Open cmdActiveMonth, , 1, 3 If Not rsActiveMonth.EOF Then Session("ssn_ActiveMonth") = Month(rsActiveMonth("ActiveDate")) Session("ssn_ActiveYear") = Year(rsActiveMonth("ActiveDate")) Session("ssn_ActiveDate") = rsActiveMonth("ActiveDate") End If Set rsActiveMonth = Nothing Set RECAACTDATABASE = Nothing 'FORCE PASSWORD CHANGE ON FIRST TIME LOGON Session("ssn_Reca_ID") = var_recaid Session("ssn_Reca_Pass") = var_password If UCase(Trim(var_recaid)) = UCase(Trim(var_password)) Then Select Case rsPerson("Authority") Case "I" Session("ssn_authority") = "I" Case "A" Session("ssn_authority") = "A" Case "B" Session("ssn_authority") = "B" Case "S" Session("ssn_authority") = "S" Case Else Session("ssn_authority") = "U" Response.Redirect "login.asp?qry_message=Access+Denied" End Select Response.Redirect "chgpass.asp" End If Session("ssn_MemberName") = rsPerson("FirstName").Value & " " & rsPerson("LastName").Value Select Case Trim(Request.Form("pushedbutton")) Case "Proceed" var_page = "Logged On To RECA-ONLINE" var_transaction = "" Call LogActivity(var_page, var_transaction) Select Case rsPerson("Authority") Case "I" Session("ssn_authority") = "I" 'Response.Redirect "../M8_02int.htm" Response.Redirect "m8_02int.asp" Case "A" Session("ssn_authority") = "A" var_show_reminder = CheckReportDueDate(FindAgencyID(rsPerson("RECAID"))) If var_show_reminder Then If Session("ssn_approaching_due_date") Then If Session("ssn_report_due_in") = 1 Then var_days = "day" Else var_days = "days" End If var_alert_string = "'Your accounting report is due in " & Session("ssn_report_due_in") & " " & var_days & ".'" ElseIf Session("ssn_due_today") Then var_alert_string = "'Your accounting report is due today'" ElseIf Session("ssn_overdue") Then If Session("ssn_overdue_by") = 1 Then var_days = "day" Else var_days = "days" End If var_alert_string = "'Your accounting report is overdue by " & Session("ssn_overdue_by") & " " & var_days & ".'" End If Response.Write "" Response.Write "" Else Response.Write "" Response.Write "" End If Case "B" Session("ssn_authority") = "B" Response.Redirect "M8_02brm.asp" Case "S" Session("ssn_authority") = "S" Response.Redirect "M8_02sr.asp" Case Else 'Session("ssn_authority") = "U" Response.Redirect "login.asp?qry_message=Access+Denied" End Select Case "Change Password" var_page = "Logged On To RECA-ONLINE" var_transaction = "" Call LogActivity(var_page, var_transaction) Select Case rsPerson("Authority") Case "I" Session("ssn_authority") = "I" Case "A" Session("ssn_authority") = "A" Case "B" Session("ssn_authority") = "B" Case "S" Session("ssn_authority") = "S" Case Else Session("ssn_authority") = "U" Response.Redirect "login.asp?qry_message=Access+Denied" End Select Response.Redirect "chgpass.asp" Case Else Response.Redirect "login.asp?qry_message=Select+Proceed+or+Change+Password." End Select End If rsPerson.Close RECADATABASE.Close Set RECADATABASE = Nothing End If '--EOF:verify.asp %>