Today in . .
<% myPageName = "On_This_Day" %>
<%
mTitleColor = "DARKRED" '* This is the color of the title 'Today in History' *'
mHeaderColor = "DARKBLUE" '* This is the color of the headers, Birthdays, Events *'
mYearColor = "DARKGREEN" '* This is the color of the year *'
mTextColor = "BLACK" '* This is the color of the text of the birthday or event *'
mTitle = "Today, " '* What you want to appear as the title *'
mTitleEnd = " . . . " '* What you want to appear as the title *'
mDataBaseDir = "../db/Today.mdb"
'* Function to return the verbose month given an integer 1-12 *'
function toLongMonth(pInInteger)
mMonth = "Not Found"
if isNumeric(pInInteger) then
select case pInInteger
case 1: mMonth = "January"
case 2: mMonth = "February"
case 3: mMonth = "March"
case 4: mMonth = "April"
case 5: mMonth = "May"
case 6: mMonth = "June"
case 7: mMonth = "July"
case 8: mMonth = "August"
case 9: mMonth = "September"
case 10: mMonth = "October"
case 11: mMonth = "November"
case 12: mMonth = "December"
end select
end if
toLongMonth = mMonth
end function
'* Open DSNless connection to Today.mdb *'
set connGlobal = server.createobject("ADODB.Connection")
connGlobal.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ= " & server.mappath(mDataBaseDir)
'* SQL Statement to pull data *'
mSQL = "SELECT his_type, his_year, his_desc FROM UNV_HISTORY " & _
" WHERE his_day = datepart('d', date()) " & _
" AND his_month = datepart('m', date()) " & _
" ORDER BY his_type, his_year "
'* Execute the SQL statement *'
set rsGlobal = connGlobal.execute(mSQL)
'* Display The Title *'
response.write "" & mTitle & _
toLongMonth(datepart("m", date())) & _
" " & datepart("d", date()) & mTitleEnd & _
"
"
'* Display The Birthday Tag *'
response.write "Some Birthdays:"
mType = "B"
'* Initialize a table that will be used to format results of rsGlobal *'
response.write "
Some Global Events:" response.write "
| " & rsGlobal("his_year") & " | " response.write "" & rsGlobal("his_desc") & " |