<%@LANGUAGE="VBSCRIPT"%>
<%
<!-- Table Settings
td1=25
td2=75
td3=150
table=td1+td2+td3
-->
IF Request.QueryString("mdr") = "" Then
currentmonth = month(now)
Else
currentmonth = Request.QueryString("mdr")
END If
IF Request.QueryString("yy") = "" Then
currentyear = year(now)
Else
currentyear = Request.QueryString("yy")
END If
currentday = day(now) &"-"& month(now)&"-"& year(now)
current = currentmonth&"-"¤tyear
firstDay = "01" & "/" & currentmonth & "/" & currentYear
lastday = DateAdd("d", -1, DateAdd("m", 1, firstday))
startpos = Weekday(firstday, vbMonday)
currentpos = startpos
vertpos=1
myday = Array("Søndag", "Mandag", "Tirsdag", "Onsdag", "Torsdag", "Fredag", "Lørdag")
mymonth = Array("Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December")
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="
http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="cal-style.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
Response.Write "<a href='cal2.asp?mdr="&Month(Date)&"'>Denne måned</a> "
For t = LBound(mymonth) to UBound(mymonth)
Response.Write "<a href='cal2.asp?mdr="&t +1 &"'>"& mymonth(t) &"</a> "
Next
%>
<p></p>
<table width="<% = table %>" cellpadding="0" cellspacing="0">
<tr bgcolor="#000000">
<td width="<% = td1 %>"> </td>
<td width="<% = td2 %>"><font color="#FFFFFF"> <strong>
<% Response.Write mymonth((currentmonth)-1) %>
</strong></font></td>
<td width="<% = td3 %>"><font color="#FFFFFF"><strong>Event</strong></font></td>
</tr>
<%
For x=1 to day(lastday)
if currentpos>7 then
currentpos=1
vertpos=vertpos+1
end if
Select case currentday
Case x &"-"¤t
cellstyle="todaycell"
Case else
cellstyle="weekdaycell"
end Select
If currentpos>5 or currentpos<1 Then cellstyle="weekendcell"
Response.Write "<tr class=" & cellstyle &">"
Response.write "<td align=""right"" width="&td1&" valign=""top"">"& x &".</td>"
Response.Write "<td width="&td2&" valign=""top"">"& myday(WeekDay(FormatDateTime(x&"-"¤t)) -1) & "</td>"
Response.Write "<td width="&td3&" valign=""top"">adsfasdf</td>"
currentpos=currentpos+1
next
Response.write "</tr>"
%>
</table>
<%
response.write currentday
%>
</body>
</html>