If database = tom then <> else
<%Function HTMLCalendar(StartDate, ShowToday, ShowBorder, ShowLinks, LinksURL)
MonthLables = Array(\"\", \"Januar\", \"Februar\", \"Marts\", \"April\", \"Maj\", _
\"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"December\")
\' If ShowLinks is True then grab navigation parameters from query string.
if ShowLinks = True then
PrevDate = request.querystring(\"calprev\")
NextDate = request.querystring(\"calnext\")
end if
if PrevDate <> \"\" then
WorkDate = DateValue(PrevDate)
elseif NextDate <> \"\" then
WorkDate = DateValue(NextDate)
elseif IsNull(StartDate) = false and StartDate <> \"\" then
WorkDate = DateValue(StartDate)
else
WorkDate = Now
end if
TodayDate = Now
mm = Month(WorkDate)
dd = 1
yy = Year(WorkDate)
WorkDate = DateSerial(yy, mm, dd)
PrevDate = DateAdd(\"m\", -1, WorkDate)
NextDate = DateAdd(\"m\", +1, WorkDate)
html = \"\"
html = html & \"<table cellspacing=0 cellpadding=0 class=\"\"clsCalendarOuter\"\"\"
\' If ShowBorder is True then display border around calendar table.
if ShowBorder = True then
html = html & \" border=\"\"1\"\"\"
end if
html = html & \">\" & vbcrlf
html = html & \"<tr>\" & vbcrlf
\' If ShowLinks is True display Previous Month link.
if ShowLinks = True then
html = html & \"<th><a href=\"\"\"
html = html & LinksURL
html = html & \"?calprev=\" & PrevDate & \"\"\"><small><</small></a></th>\" & vbcrlf
end if
html = html & \"<th nowrap\"
\' If ShowLinks is False span Month Year column across would-be link columns.
if ShowLinks = False then
html = html & \" colspan=\"\"3\"\"\"
end if
html = html & \">\" & MonthLables(mm) & \" \" & yy & \"</th>\" & vbcrlf
\' If ShowLinks is True display Next Month link.
if ShowLinks = True then
html = html & \"<th><a href=\"\"\"
html = html & LinksURL
html = html & \"?calnext=\" & NextDate & \"\"\"><small>></small></a></th>\" & vbcrlf
end if
html = html & \"</tr>\" & vbcrlf
html = html & \"<tr>\" & vbcrlf
html = html & \"<td colspan=\"\"3\"\"><table class=\"\"clsCalendarInner\"\" border=\"\"0\"\" width=\"\"500\"\">\" & vbcrlf
html = html & \"<tr>\" & vbcrlf
html = html & \"<th align=right>Søndag</th>\" & vbcrlf
html = html & \"<th align=right>Mandag</th>\" & vbcrlf
html = html & \"<th align=right>Tirsdag</th>\" & vbcrlf
html = html & \"<th align=right>Onsdag</th>\" & vbcrlf
html = html & \"<th align=right>Torsdag</th>\" & vbcrlf
html = html & \"<th align=right>Fredag</th>\" & vbcrlf
html = html & \"<th align=right>Lørdag</th>\" & vbcrlf
html = html & \"</tr>\" & vbcrlf
html = html & \"<tr>\" & vbcrlf
html = html & \"<td class=\"\"clsCalendarWeekdaysLine\"\" colspan=\"\"7\"\" bgcolor=\"\"#000000\"\" height=\"\"1\"\"></td>\" & vbcrlf
html = html & \"</tr>\" & vbcrlf
DaysInMonth = DateDiff(\"d\", WorkDate, NextDate)
FirstWeekDay = Weekday(WorkDate, 1)
if Month(WorkDate) = Month(TodayDate) and Year(WorkDate) = Year(TodayDate) then
BoldDay = Day(TodayDate)
end if
Do While DaysInMonth > 0
html = html & \"<tr>\" & vbcrlf
for CurrentWeekDay = 1 to 7
html = html & \"<td\"
if (dd > 1 and DaysInMonth > 0) or (dd = 1 and FirstWeekDay = CurrentWeekDay) then
\' If ShowToday is true then we want to emphasize today\'s date.
if ShowToday = True and dd = BoldDay then
\'HER SKAL DAGS DATO STÅ
html = html & \" class=\"\"clsCalendarToday\"\" align=\"\"right\"\" bgcolor=#000000><strong><a style=\"\"color: #ffffff\"\" href=showevent.asp?date=\" & dd & \"-\" & mm & \">\" & dd & \"</strong>\"
else
--> HER SKAL DER VÆRE ET DATABASE SCRIPT SOM CHECKER OM DATOEN DER BLIVER SAT IND ER TOM I EVENTS.MDB
\'HER SKAL ALLE ANDRE DATOER STÅ
html = html & \" align=\"\"right\"\" bgcolor=#ffffff><a style=\"\"color: #000000\"\" href=showevent.asp?date=\" & dd & \"-\" & mm & \">\" & dd
end if
DaysInMonth = DaysInMonth - 1
dd = dd + 1
else
html = html & \" style=\"\"border-bottom: 1 solid #000000\"\">\"
end if
html = html & \"</td>\" & vbcrlf
next
html = html & \"</tr>\" & vbcrlf
Loop
html = html & \"</table>\" & vbcrlf
html = html & \"</td>\" & vbcrlf
html = html & \"</tr>\" & vbcrlf
html = html & \"</table>\" & vbcrlf
HTMLCalendar = html
End Function
Jeg gir 300 point for den her da den syntes at være ret svær :]
hjæææææææælp :]~
