her er lidt at lege med :)
se evt.
www.mdk-photo.com/Kalender<head>
<title>MDK's Kalender</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
-->
</style></head>
<html>
<body>
<%
Today = Date
DayPlus = -( weekday(date) mod 7 ) + 2
%>
<table border="0" cellspacing="0" cellpadding="3">
<% For Height = 0 to 5 %>
<tr>
<% For Width = 0 to 6 %>
<td>
<table border="1" cellspacing="0" cellpadding="0">
<tr>
<td width="150" <%
If Date + DayPlus + Request.Querystring("plus") = Today Then
Response.Write "bgcolor=""#FFFFFF"""
ELSEIF weekday(date + DayPlus + Request.Querystring("plus") ) = 1 then
Response.Write "bgcolor=""#FF5555"""
Else
Response.write "bgcolor=""#CCCCCC"""
End if
%>><%
If Date + DayPlus + Request.Querystring("plus") = Today Then
Response.Write "Today - " & Weekdayname(weekday(date))
Else
Response.write ( Date + dayPlus + Request.Querystring("plus") ) & " - " & Weekdayname(weekday(date + dayPlus + Request.Querystring("plus")))
End if
%>
</td>
</tr>
<tr>
<td width="150"><%
ThatDay = Date + dayPlus + Request.Querystring("plus")
Set fs=Server.CreateObject("Scripting.FileSystemObject")
If fs.FileExists(Server.Mappath(Replace(ThatDay,"/","-") & ".Kal")) Then
Set f=fs.OpenTextFile(Server.Mappath(Replace(ThatDay,"/","-") & ".Kal"), 1)
Response.Write(f.ReadAll)
f.Close
Else
Response.Write "<a href=""?add=" & ThatDay & """>add</a>"
End If
set fs=nothing
%>
</td>
</tr>
</table>
</td>
<% dayPlus = dayPlus + 1
Next %>
</tr>
<% Next %>
</table>
<% If Request.Querystring("add") <> "" then %>
<Form method="post" action="index.asp">
<TextArea name="TextArea" cols="30" rows="10"></TextArea>
<input type="hidden" name="add" value="<%=Request.Querystring("add")%>">
<input type="Submit" name="Submit" Value="Submit">
</Form>
<%=Replace(Request.Querystring("add"),"/","-") & ".kal"%>
<% end if %>
<% If Request.Form("Submit") <> "" Then
set fs=Server.CreateObject("Scripting.FileSystemObject")
Filename = Replace(Request.Form("add"),"/","-") & ".kal"
set f=fs.CreateTextFile(Server.Mappath(Filename),true)
f.write(Request.Form("TextArea"))
f.close
set f=nothing
set fs=nothing
End if
%>
</body>
</html>