<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% ' *** Logout the current user. MM_Logout = CStr(Request.ServerVariables("URL")) & "?MM_Logoutnow=1" If (CStr(Request("MM_Logoutnow")) = "1") Then Session.Contents.Remove("MM_Username") Session.Contents.Remove("MM_UserAuthorization") MM_logoutRedirectPage = "/learntech/cal/index.asp" ' redirect with URL parameters (remove the "MM_Logoutnow" query param). if (MM_logoutRedirectPage = "") Then MM_logoutRedirectPage = CStr(Request.ServerVariables("URL")) If (InStr(1, UC_redirectPage, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then MM_newQS = "?" For Each Item In Request.QueryString If (Item <> "MM_Logoutnow") Then If (Len(MM_newQS) > 1) Then MM_newQS = MM_newQS & "&" MM_newQS = MM_newQS & Item & "=" & Server.URLencode(Request.QueryString(Item)) End If Next if (Len(MM_newQS) > 1) Then MM_logoutRedirectPage = MM_logoutRedirectPage & MM_newQS End If Response.Redirect(MM_logoutRedirectPage) End If %> <% Dim Events Dim Events_numRows Set Events = Server.CreateObject("ADODB.Recordset") Events.ActiveConnection = MM_events_STRING Events.Source = "SELECT * FROM dbo.events" Events.CursorType = 0 Events.CursorLocation = 2 Events.LockType = 1 Events.Open() Events_numRows = 0 %> <% Dim todayEvents Dim todayEvents_numRows Set todayEvents = Server.CreateObject("ADODB.Recordset") todayEvents.ActiveConnection = MM_events_STRING todayEvents.Source = "SELECT eid, sdate, substring(convert(varchar(19),edate,100),1,11) as [Todays Date], startTime, endTime, eventTitle, EventDescription, Coordinator, email, eLocation, eDuration FROM dbo.events WHERE convert(varchar(19),edate,101) = convert(varchar(19),getdate(),101)" todayEvents.CursorType = 0 todayEvents.CursorLocation = 2 todayEvents.LockType = 1 todayEvents.Open() todayEvents_numRows = 0 %> <% Dim loggedin__MMColParam loggedin__MMColParam = "1" If (Session("MM_Username") <> "") Then loggedin__MMColParam = Session("MM_Username") End If %> <% Dim loggedin Dim loggedin_numRows Set loggedin = Server.CreateObject("ADODB.Recordset") loggedin.ActiveConnection = MM_events_STRING loggedin.Source = "SELECT * FROM dbo.cal_login WHERE username = '" + Replace(loggedin__MMColParam, "'", "''") + "'" loggedin.CursorType = 0 loggedin.CursorLocation = 2 loggedin.LockType = 1 loggedin.Open() loggedin_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = -1 Repeat1__index = 0 todayEvents_numRows = todayEvents_numRows + Repeat1__numRows %> <% Dim MM_paramName %> <% ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters Dim MM_keepNone Dim MM_keepURL Dim MM_keepForm Dim MM_keepBoth Dim MM_removeList Dim MM_item Dim MM_nextItem ' create the list of parameters which should not be maintained MM_removeList = "&index=" If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "=" End If MM_keepURL="" MM_keepForm="" MM_keepBoth="" MM_keepNone="" ' add the URL parameters to the MM_keepURL string For Each MM_item In Request.QueryString MM_nextItem = "&" & MM_item & "=" If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item)) End If Next ' add the Form variables to the MM_keepForm string For Each MM_item In Request.Form MM_nextItem = "&" & MM_item & "=" If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item)) End If Next ' create the Form + URL string and remove the intial '&' from each of the strings MM_keepBoth = MM_keepURL & MM_keepForm If (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1) End If If (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1) End If If (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1) End If ' a utility function used for adding additional parameters to these strings Function MM_joinChar(firstItem) If (firstItem <> "") Then MM_joinChar = "&" Else MM_joinChar = "" End If End Function %> <% Function ASPCalendar If Request("EventDate") <> "" Then EventDate = DateValue(Request("EventDate")) Else EventDate = date() End if CurMonth = Month(EventDate) CurMonthName = MonthName(CurMonth) CurYear = Year(EventDate) FirstDayDate = DateSerial(CurYear, CurMonth, 1) FirstDay = WeekDay(FirstDayDate, 0) CurDay = FirstDayDate Dim tmpHTML tmpHTML="" tmpHTML = tmpHTML & "" & Chr(10) tmpHTML = tmpHTML & "" & Chr(10) tmpHTML = tmpHTML & "" & Chr(10) tmpHTML = tmpHTML & "" & Chr(10) & "" & Chr(10) & "" Response.Write(tmpHTML) For DayLoop = 1 to 7 Response.Write("" & Chr(10)) Next Response.Write("" & Chr(10) & "") If FirstDay <> 1 Then Response.Write("" & Chr(10)) End if DayCounter = FirstDay CorrectMonth = True Do While CorrectMonth = True isEvent = FALSE Events.filter = 0 Dim iCheck Dim chkStr chkStr = (Events.Fields.Item("sdate").Name) iCheck = CurDay Events.filter = chkStr & "=" & (iCheck) If not(Events.EOF) Then isEvent = TRUE If CurDay = EventDate Then Response.Write("" & Chr(10)) Else Response.Write(Day(CurDay) & "" & Chr(10)) End If DayCounter = DayCounter + 1 If DayCounter > 7 Then DayCounter = 1 Response.Write("" & Chr(10)) Response.Write(" CurMonth Then Response.Write(" class=""lastweek""") End If Response.Write(">" & Chr(10)) End if CurDay = DateAdd("d", 1, CurDay) If Month(CurDay) <> CurMonth then CorrectMonth = False End if Loop IF DayCounter <> 1 Then Response.Write("") Else Response.Write("") End if Response.Write("" & Chr(10) & "
CDE Events Calendar
" & Chr(10) tmpHTML = tmpHTML & "" & " " & CurMonthName & " " & "" & "    " tmpHTML = tmpHTML & "" & " " & CurYear & " " & "" tmpHTML = tmpHTML & "
" & WeekDayName(Dayloop, True, 0) & "
 ") Else Response.Write("") End if If isEvent = TRUE Then Response.Write("" & Day(CurDay)& "") Response.Write("
  
" & Chr(10)) End Function %> Untitled Document
   


CONTACT:

Dr. Ellen P. O'Hara-Mays,
Executive Director
Learning Technology &
Distance Education
P:570-893-2072
F:570-893-2638
poharama@lhup.edu
toll free 877-268-4688


 

eCompanion

An eCompanion is a course shell used to support face-to-face instruction. It has all of the features of the eCourse. Examguard can be added to the eCompanion upon request to provide a secure testing environment.

To request an eCompanion got to the following web-address:
Click Here

Technical Support for eCompanion student:
support@lhup.edu
1-877-268-4688 (toll-free)

Graphic artist/Course Devleopment for distance education faculty: 893-6297 vpaulina@lhup.edu

 
 
   
January 6, 2006 A proud member of the Pennsylvania State System of Higher Education    
All LHU Sites LHU Calendar Lock Haven Home Web Master
<% Events.Close() Set Events = Nothing %> <% todayEvents.Close() Set todayEvents = Nothing %> <% loggedin.Close() Set loggedin = Nothing %>