<%@LANGUAGE="VBSCRIPT"%> <% Option Explicit 'Force good programming habits Response.Expires = 0 'Do not allow the page to be cached Session.Timeout = 60 Dim strErrorMessage, blnLoginSuccessful strErrorMessage = "" blnLoginSuccessful = False If (Request.ServerVariables("CONTENT_LENGTH") <> 0) Then Dim objSchoolRecord, lngSchoolID, strStudentPassword, datExpirationDate Set objSchoolRecord = Server.CreateObject("ADODB.Recordset") objSchoolRecord.ActiveConnection = "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Websites\WEBDATA\CPS.mdb" objSchoolRecord.CursorType = 1 objSchoolRecord.LockType = 3 objSchoolRecord.Source = "Schools" objSchoolRecord.Filter = "SchoolName='" & Replace(Trim(Request.Form("SchoolName")), "'", "''") & "'" objSchoolRecord.Open If (Not objSchoolRecord.EOF) Then objSchoolRecord.MoveFirst lngSchoolID = objSchoolRecord.Fields("SchoolID") strStudentPassword = objSchoolRecord.Fields("SchoolStudentPassword") datExpirationDate = objSchoolRecord.Fields("SchoolExpirationDate") If (strStudentPassword <> Request.Form("StudentPassword")) Then strErrorMessage = "The password that you entered is not correct." If (datExpirationDate <= Date() ) Then strErrorMessage = "Your School's license has expired." Else strErrorMessage = "Could not find your School listed in the database." End If objSchoolRecord.Close Set objSchoolRecord = Nothing If (strErrorMessage = "") Then Dim objStudentRecord Set objStudentRecord = Server.CreateObject("ADODB.Recordset") objStudentRecord.ActiveConnection = "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Websites\WEBDATA\CPS.mdb" objStudentRecord.CursorType = 1 objStudentRecord.LockType = 3 objStudentRecord.Source = "Students" objStudentRecord.Filter = "StudentFirstName = '" & Replace(Trim(Request.Form("StudentFirstName")), """", "'") & "' " & _ " AND StudentLastName = '" & Replace(Trim(Request.Form("StudentLastName")), """", "'") & "' " & _ " AND StudentSchoolID = " & lngSchoolID objStudentRecord.Open If (Not objStudentRecord.EOF) Then objStudentRecord.MoveFirst Else objStudentRecord.AddNew objStudentRecord.Fields("StudentSchoolID") = lngSchoolID objStudentRecord.Fields("StudentFirstName") = Replace(Trim(Request.Form("StudentFirstName")), """", "'") objStudentRecord.Fields("StudentLastName") = Replace(Trim(Request.Form("StudentLastName")), """", "'") objStudentRecord.Fields("StudentIP") = Request.Form("StudentIP") objStudentRecord.Update End If Session("CPSStudentID") = objStudentRecord.Fields("StudentID") Session("CPSStudentFirstName") = objStudentRecord.Fields("StudentFirstName") Session("CPSStudentLastName") = objStudentRecord.Fields("StudentLastName") Dim arrFirstIP, arrCurrentIP arrFirstIP = Split(objStudentRecord("StudentIP") , ".") arrCurrentIP = Split(Request.ServerVariables("REMOTE_ADDR"), ".") objStudentRecord.Close Set objStudentRecord = Nothing If ((arrFirstIP(0) <> arrCurrentIP(0)) Or (arrFirstIP(1) <> arrCurrentIP(1))) Then Dim objMessage Set objMessage = Server.CreateObject("JMail.SMTPMail") objMessage.ServerAddress = "mail.ridgefieldgroup.com" objMessage.Sender = "SecurityWarning@technimediastudios.com" objMessage.SenderName = "Security Warning" objMessage.Subject = "Alternate IP Address - Student" objMessage.AddRecipient "products@technimediastudios.com" 'objMessage.AddRecipient "mstark@ridgefieldgroup.com" objMessage.Body = "The following student logged in under a new IP Address:" & Chr(13) & Chr(10) & Chr(13) & Chr(10) & _ Session("CPSStudentFirstName") & " " & Session("CPSStudentLastName") & Chr(13) & Chr(10) & Chr(13) & Chr(10) & _ "First Login IP: " & arrFirstIP(0) & "." & arrFirstIP(1) & "." & arrFirstIP(2) & "." & arrFirstIP(3) & Chr(13) & Chr(10) & _ "This Login IP: " & arrCurrentIP(0) & "." & arrCurrentIP(1) & "." & arrCurrentIP(2) & "." & arrCurrentIP(3) & Chr(13) & Chr(10) & Chr(13) & Chr(10) & _ "The Date and Time are " & Now() objMessage.Execute objMessage.Close Set objMessage = Nothing End If Dim objLoginRecord Set objLoginRecord = Server.CreateObject("ADODB.Recordset") objLoginRecord.ActiveConnection = "Driver={Microsoft Access Driver (*.mdb)};DBQ=C:\Websites\WEBDATA\CPS.mdb" objLoginRecord.CursorType = 1 objLoginRecord.LockType = 3 objLoginRecord.Source = "Logins" objLoginRecord.Open objLoginRecord.AddNew objLoginRecord.Fields("LoginStudentID") = CLng(Session("CPSStudentID")) objLoginRecord.Update objLoginRecord.Close Set objLoginRecord = Nothing blnLoginSuccessful = True End If End If %> Career Pathways System Online Application


 


Career Pathways System On-Line - Login

<% If (not blnLoginSuccessful) Then %>

Welome Students!

<% If (strErrorMessage <> "") Then Response.Write "
" & strErrorMessage & "
" Else %>

Students, welcome to Career Pathways System On-line!  Use the "Student Login Form" below to get started.

<% End If %>
">
Student Login Form
Name of School:
Student's First Name: Student's Last Name: Student Password:
" onChange="CheckIfEmpty(this);" onFocus="window.status='Enter Your First Name (*REQUIRED*)';" onBlur="window.status=''; CheckIfEmpty(this);"> " onChange="CheckIfEmpty(this);" onFocus="window.status='Enter Your Last Name (*REQUIRED*)';" onBlur="window.status=''; CheckIfEmpty(this);"> " onFocus="window.status='Enter the Student Password (*REQUIRED*)';" onBlur="window.status='';">
">
<% Else %>

Login Successful

You have successfully logged in to Career Pathways System On-line.  Use the link below to start using the application...

START USING CAREER PATHWAYS SYSTEM

Quality Note: This product is best viewed at 800 by 600 screen resolution or higher.  The images and movies included in this demo are high quality.  We recommend at least a cable modem.  If your internet connection isn't fast enough the videos may stutter the first time you click on them to play.  If so, pause the video on your media player to allow ample time for the download.  Once they are in your video cache they will play smoothly every time.

This product is brought to you by:

Technimedia Studios
46501 Jewett Hopedale Road
Jewett, OH 43986
1(800)282-5315

<% End If %>