% '########################################################### '## COPYRIGHT (C) 2003, Metasun Software '## '## For licensing details, lease read the license.txt file '## included with MetaTraffic or located at: '## http://www.metasun.com/products/metatraffic/license.asp '## '## All copyright notices regarding MetaTraffic '## must remain intact in the scripts and in the '## outputted HTML. All text and logos with '## references to Metasun or MetaTraffic must '## remain visible when the pages are viewed on '## the internet or intranet. '## '## For support, please visit http://www.metasun.com '## and use the support forum. '########################################################### %> <% Option Explicit %> <% Dim datToday, datCurrent, datSelected Dim datMonth, datMonthName, datYear Dim datNextMonth, datNextMonthYear Dim intDaysInMonth, intStartWeekDay, intEndWeekday Dim intDayLoop, intWeekdayPos Dim strClass, strFormname strFormname = Request.Querystring("name") datSelected = Request.Querystring("sdate") datCurrent = Request.Querystring("cdate") If Isdate(datSelected)=False Then datSelected = Date() End If If Isdate(datCurrent)=False Then datCurrent = datSelected End If datSelected = Cdate(datSelected) datCurrent = Cdate(datCurrent) ' SET SOME CONSTANTS datToday = Date() datMonth = Month(datCurrent) datMonthName = Monthname(datMonth) datYear = Year(datCurrent) datNextMonth = Month(DateAdd("m", 1, datCurrent)) datNextMonthYear = Year(DateAdd("m", 1, datCurrent)) intDaysInMonth = Day(DateAdd("d", 0 - Day(datCurrent), DateAdd("m", 1, datCurrent))) intStartWeekday = Weekday(DateAdd("d", (1 - Day(datCurrent)), datCurrent), 1) intEndWeekday = Weekday(DateAdd("d", intDaysInMonth, DateAdd("d", (0 - Day(datCurrent)), datCurrent)), 1) intWeekdayPos = 0 %>
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
| " Next End If For intDayLoop = 1 to intDaysInMonth intWeekdayPos = intWeekdayPos + 1 ' START NEW ROW IF BEGINNING OF WEEK If intWeekdayPos Mod 7 = 1 Then Response.Write " | ||||||
| " Response.Write "" Response.Write intDayLoop & " | " ' CLOSE OFF ROW IF END OF WEEK If intWeekdayPos Mod 7 = 0 Then Response.Write "" Next End If Response.Write " | |||||