% thispage = "journals.asp" %>
<%
' ---------- Page Functions ----------
Function FormatStr(String)
' Replaces a double carrige return with a paragraph break
' a single carrige return with a break rule and CHR(13) with nothing
String = Replace(String, CHR(13), "")
String = Replace(String, CHR(10) & CHR(10), "
Journals
2007
2008
2009
2010
<%
Set adorst = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT * FROM calendar WHERE CheckYear = " & sCurrentYear
adorst.Open strSQL, objConn
'strPage = "viewDay.asp?currentDate=" & dtOnDay
' Checks for a message on the day being written
' strSQL = "SELECT * FROM calendar ORDER BY calendarDate Desc "
'Set objRS = objConn.Execute(strSQL)
'dailyMsg = objRS("title") & ", " & objRS("author")
'while NOT objRS.EOF
' Response.Write ("")
strSQL = "SELECT * FROM calendar WHERE CheckYear = " & sCurrentYear
Set objRS = objConn.Execute(strSQL)
If objRS.EOF Then
response.write ("No Journal Entries for " & sCurrentYear & "")
Else
strSQL = "SELECT * FROM calendar WHERE CheckMonth = 12 AND CheckYear = " & sCurrentYear & " ORDER BY calendarDate Desc "
Set objRS = objConn.Execute(strSQL)
If NOT objRS.EOF THEN
Response.Write ("
December " & ", " & Year(objRS("calendarDate")) & "
")
While NOT objRS.EOF or objRS.BOF
Response.write("
")
Response.Write ("" & MonthName(Month(objRS("calendarDate"))) & " " & Day(objRS("calendarDate")) & ", " & Year(objRS("calendarDate")) & "")
Response.Write (" - " & FormatStr(objRS("title") & ", " & objRS("author")) & "")
Response.Write ("
")
objRS.MoveNext
Wend
End If
'Else If Month(objRS("calendarDate")) = "11" Then
'If Month(objRS("calendarDate")) = "11" Then
strSQL = "SELECT * FROM calendar WHERE CheckMonth = 11 AND CheckYear = " & sCurrentYear & " ORDER BY calendarDate Desc "
Set objRS = objConn.Execute(strSQL)
If NOT objRS.EOF THEN
Response.Write ("
November " & ", " & Year(objRS("calendarDate")) & "
")
While NOT objRS.EOF or objRS.BOF
Response.write("
")
Response.Write ("" & MonthName(Month(objRS("calendarDate"))) & " " & Day(objRS("calendarDate")) & ", " & Year(objRS("calendarDate")) & "")
Response.Write (" - " & FormatStr(objRS("title") & ", " & objRS("author")) & "")
Response.Write ("
")
objRS.MoveNext
Wend
End If
'Else If Month(objRS("calendarDate")) = "10" Then
'If Month(objRS("calendarDate")) = "10" Then
strSQL = "SELECT * FROM calendar WHERE CheckMonth = 10 AND CheckYear = " & sCurrentYear & " ORDER BY calendarDate Desc "
Set objRS = objConn.Execute(strSQL)
If NOT objRS.EOF THEN
Response.Write ("
October " & ", " & Year(objRS("calendarDate")) & "
")
While NOT objRS.EOF or objRS.BOF
Response.write("
")
Response.Write ("" & MonthName(Month(objRS("calendarDate"))) & " " & Day(objRS("calendarDate")) & ", " & Year(objRS("calendarDate")) & "")
Response.Write (" - " & FormatStr(objRS("title") & ", " & objRS("author")) & "")
Response.Write ("
")
objRS.MoveNext
Wend
End If
'Else If Month(objRS("calendarDate")) = "9" Then
'If Month(objRS("calendarDate")) = "9" Then
strSQL = "SELECT * FROM calendar WHERE CheckMonth = 9 AND CheckYear = " & sCurrentYear & " ORDER BY calendarDate Desc "
Set objRS = objConn.Execute(strSQL)
If NOT objRS.EOF THEN
Response.Write ("
September " & ", " & Year(objRS("calendarDate")) & "
")
While NOT objRS.EOF or objRS.BOF
Response.write("
")
Response.Write ("" & MonthName(Month(objRS("calendarDate"))) & " " & Day(objRS("calendarDate")) & ", " & Year(objRS("calendarDate")) & "")
Response.Write (" - " & FormatStr(objRS("title") & ", " & objRS("author")) & "")
Response.Write ("
")
objRS.MoveNext
Wend
End If
'Else If Month(objRS("calendarDate")) = "8" Then
'If Month(objRS("calendarDate")) = "8" Then
strSQL = "SELECT * FROM calendar WHERE CheckMonth = 8 AND CheckYear = " & sCurrentYear & " ORDER BY calendarDate Desc "
Set objRS = objConn.Execute(strSQL)
If NOT objRS.EOF THEN
Response.Write ("
August " & ", " & Year(objRS("calendarDate")) & "
")
While NOT objRS.EOF or objRS.BOF
Response.write("
")
Response.Write ("" & MonthName(Month(objRS("calendarDate"))) & " " & Day(objRS("calendarDate")) & ", " & Year(objRS("calendarDate")) & "")
Response.Write (" - " & FormatStr(objRS("title") & ", " & objRS("author")) & "")
Response.Write ("
")
objRS.MoveNext
Wend
End If
'Else If Month(objRS("calendarDate")) = "7" Then
'If Month(objRS("calendarDate")) = "7" Then
strSQL = "SELECT * FROM calendar WHERE CheckMonth = 7 AND CheckYear = " & sCurrentYear & " ORDER BY calendarDate Desc "
Set objRS = objConn.Execute(strSQL)
If NOT objRS.EOF THEN
Response.Write ("
July " & ", " & Year(objRS("calendarDate")) & "
")
While NOT objRS.EOF or objRS.BOF
Response.write("
")
Response.Write ("" & MonthName(Month(objRS("calendarDate"))) & " " & Day(objRS("calendarDate")) & ", " & Year(objRS("calendarDate")) & "")
Response.Write (" - " & FormatStr(objRS("title") & ", " & objRS("author")) & "")
Response.Write ("
")
objRS.MoveNext
Wend
End If
'Else If Month(objRS("calendarDate")) = "6" Then
'If Month(objRS("calendarDate")) = "6" Then
strSQL = "SELECT * FROM calendar WHERE CheckMonth = 6 AND CheckYear = " & sCurrentYear & " ORDER BY calendarDate Desc "
Set objRS = objConn.Execute(strSQL)
If NOT objRS.EOF THEN
Response.Write ("
June " & ", " & Year(objRS("calendarDate")) & "
")
While NOT objRS.EOF or objRS.BOF
Response.write("
")
Response.Write ("" & MonthName(Month(objRS("calendarDate"))) & " " & Day(objRS("calendarDate")) & ", " & Year(objRS("calendarDate")) & "")
Response.Write (" - " & FormatStr(objRS("title") & ", " & objRS("author")) & "")
Response.Write ("
")
objRS.MoveNext
Wend
End If
'Else If Month(objRS("calendarDate")) = "5" Then
'If Month(objRS("calendarDate")) = "5" Then
strSQL = "SELECT * FROM calendar WHERE CheckMonth = 5 AND CheckYear = " & sCurrentYear & " ORDER BY calendarDate Desc "
Set objRS = objConn.Execute(strSQL)
If NOT objRS.EOF THEN
Response.Write ("
May " & ", " & Year(objRS("calendarDate")) & "
")
While NOT objRS.EOF or objRS.BOF
Response.write("
")
Response.Write ("" & MonthName(Month(objRS("calendarDate"))) & " " & Day(objRS("calendarDate")) & ", " & Year(objRS("calendarDate")) & "")
Response.Write (" - " & FormatStr(objRS("title") & ", " & objRS("author")) & "")
Response.Write ("
")
objRS.MoveNext
Wend
End If
strSQL = "SELECT * FROM calendar WHERE CheckMonth = 4 AND CheckYear = " & sCurrentYear & " ORDER BY calendarDate Desc "
Set objRS = objConn.Execute(strSQL)
If NOT objRS.EOF THEN
Response.Write ("
April " & ", " & Year(objRS("calendarDate")) & "
")
While NOT objRS.EOF or objRS.BOF
Response.write("
")
Response.Write ("" & MonthName(Month(objRS("calendarDate"))) & " " & Day(objRS("calendarDate")) & ", " & Year(objRS("calendarDate")) & "")
Response.Write (" - " & FormatStr(objRS("title") & ", " & objRS("author")) & "")
Response.Write ("
")
objRS.MoveNext
Wend
End If
'If Month(objRS("calendarDate")) = "3" Then
strSQL = "SELECT * FROM calendar WHERE CheckMonth = 3 AND CheckYear = " & sCurrentYear & " ORDER BY calendarDate Desc "
Set objRS = objConn.Execute(strSQL)
If NOT objRS.EOF THEN
Response.Write ("
March " & ", " & Year(objRS("calendarDate")) & "
")
While NOT objRS.EOF or objRS.BOF
Response.write("
")
Response.Write ("" & MonthName(Month(objRS("calendarDate"))) & " " & Day(objRS("calendarDate")) & ", " & Year(objRS("calendarDate")) & "")
Response.Write (" - " & FormatStr(objRS("title") & ", " & objRS("author")) & "")
Response.Write ("
")
objRS.MoveNext
Wend
End If
'If Month(objRS("calendarDate")) = "2" Then
'If Month(objRS("calendarDate")) = "2" Then
strSQL = "SELECT * FROM calendar WHERE CheckMonth = 2 AND CheckYear = " & sCurrentYear & " ORDER BY calendarDate Desc "
Set objRS = objConn.Execute(strSQL)
If NOT objRS.EOF THEN
Response.Write ("
February " & ", " & Year(objRS("calendarDate")) & "
")
While NOT objRS.EOF or objRS.BOF
Response.write("
")
Response.Write ("" & MonthName(Month(objRS("calendarDate"))) & " " & Day(objRS("calendarDate")) & ", " & Year(objRS("calendarDate")) & "")
Response.Write (" - " & FormatStr(objRS("title") & ", " & objRS("author")) & "")
Response.Write ("
")
objRS.MoveNext
Wend
End If
'If Month(objRS("calendarDate")) = "1" Then
strSQL = "SELECT * FROM calendar WHERE CheckMonth = 1 AND CheckYear = " & sCurrentYear & " ORDER BY calendarDate Desc "
Set objRS = objConn.Execute(strSQL)
If NOT objRS.EOF THEN
Response.Write ("
January " & ", " & Year(objRS("calendarDate")) & "
")
While NOT objRS.EOF or objRS.BOF
Response.write("
")
Response.Write ("" & MonthName(Month(objRS("calendarDate"))) & " " & Day(objRS("calendarDate")) & ", " & Year(objRS("calendarDate")) & "")
Response.Write (" - " & FormatStr(objRS("title") & ", " & objRS("author")) & "")
Response.Write ("
")
objRS.MoveNext
Wend
End If
End If
'End If
'End If
'End If
'End If
'End If
'End If
'End If
'End If
'End If
'End If
'End If
'Response.write("
")
' '
'Response.Write ("" & MonthName(Month(objRS("calendarDate"))) & " " & Day(objRS("calendarDate")) & ", " & Year(objRS("calendarDate")) & "")
'Response.Write (" - " & FormatStr(objRS("title") & ", " & objRS("author")) & "")
'Response.Write ("
")
'objRS.MoveNext
'Wend
' Response.Write ("")
' End IF
' End If
' Next
%>