<% on error resume next set fs = Server.CreateObject("Scripting.FileSystemObject")
If Request.Form("Submit") <> "" Then 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
If Date + DayPlus + Request.Querystring("plus") = Today Then Response.Write "bgcolor=""#FFFFFF""" Else if weekday(date + DayPlus + Request.Querystring("plus") ) = 1 then Response.Write "bgcolor=""#FF5555""" else Response.write "bgcolor=""#CCCCCC""" end if End if
%>><%
If Date + DayPlus + Request.Querystring("plus") = Today Then Response.Write Weekdayname(weekday(date + dayPlus + Request.Querystring("plus"))) Else Response.write Weekdayname(weekday(date + dayPlus + Request.Querystring("plus"))) End if
%> </td> </tr> <tr height="20px" style="font-size:9pt; "> <td ><%= datepart("d",Date + DayPlus + Request.Querystring("plus")) & " " & MonthName(DatePart( "m", Date+DayPlus+Request.Querystring("plus"))) %></td> </tr> <tr> <td width="150" bgcolor="<% ThatDay = Date + dayPlus + Request.Querystring("plus") Set fs=Server.CreateObject("Scripting.FileSystemObject") If fs.FileExists(Server.Mappath(Replace(ThatDay,"/","-") & ".Kal")) Then Response.Write "#AAAAFF" end if %>"><% 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
</td> <% dayPlus = dayPlus + 1 Next %> </tr> <% Next %> </table>
<% If Request.Querystring("add") <> "" or Request.Querystring("edit") <> "" then %> <fieldset style="width:300px;height:250px;position:absolute;left:30%;top:30%;background-color:#AAFFFF;"> <legend><b><%=Request.Querystring("add")%><%=Request.Querystring("edit")%></b></legend> <div align="center"> <Form method="post" action="index.asp">
<TextArea name="TextArea" cols="30" rows="10"><% if Request.Querystring("edit") <> "" then set fs = Server.CreateObject("Scripting.FileSystemObject") Set f = fs.OpenTextFile(Server.Mappath(Replace(Request.Querystring("edit"),"/","-") & ".Kal"), 1) Response.Write(f.ReadAll) f.Close end if %></TextArea> <input type="hidden" name="add" value="<%=Request.Querystring("add")%><%=Request.Querystring("edit")%>"> <input type="Submit" name="Submit" Value="Submit"> <input type="submit" name="cancel" value="Cancel"> </Form> </div> </fieldset> <% end if %>
<% set fs = Server.CreateObject("Scripting.FileSystemObject")
If Request.Form("Submit") <> "" Then Filename = Replace(Request.Form("add"),"/","-") & ".kal" set f = fs.CreateTextFile(Server.Mappath(Filename),true) f.write(Request.Form("TextArea")) f.close End if %>
<html> <body> <% Today = Date DayPlus = -( weekday(date) mod 7 ) + 2 %> <table border="0" cellspacing="0" cellpadding="3"> <% For Height = 0 to 5 %> <tr class="month_top_tr"> <td colspan="7" align="center" class="month_top"><b>UGE <%= DatePart( "ww", Date+DayPlus+Request.Querystring("plus")) & " - " & datepart("yyyy",Date + DayPlus + Request.Querystring("plus")) %></b></td> <tr> <% For Width = 0 to 6 %> <td valign=top>
<table border="1" cellspacing="0" cellpadding="0" class="minitable"> <tr height="20px"> <td class="td_date_top" width="150" align="center" <% If Date + DayPlus + Request.Querystring("plus") = Today Then Response.Write "bgcolor=""#FFFFFF""" Else if weekday(date + DayPlus + Request.Querystring("plus") ) = 1 then Response.Write "bgcolor=""#FF5555""" else Response.write "bgcolor=""#CCCCCC""" end if End if %>><% If Date + DayPlus + Request.Querystring("plus") = Today Then Response.Write Weekdayname(weekday(date + dayPlus + Request.Querystring("plus"))) Else Response.write Weekdayname(weekday(date + dayPlus + Request.Querystring("plus"))) End if %> </td> </tr> <tr height="20px" class="dato_felt"> <td ><%= datepart("d",Date + DayPlus + Request.Querystring("plus")) & " " & MonthName(DatePart( "m", Date+DayPlus+Request.Querystring("plus"))) %></td> </tr> <tr> <td width="150" class="dato_aftale" bgcolor="<% ThatDay = Date + dayPlus + Request.Querystring("plus")
If fs.FileExists(Server.Mappath(Replace(ThatDay,"/","-") & ".Kal")) Then Response.Write "#AAAAFF" end if %>"><% 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
</td> <% dayPlus = dayPlus + 1 Next %> </tr> <% Next %> </table>
<% If Request.Querystring("add") <> "" or Request.Querystring("edit") <> "" then %> <fieldset class="fieldsetstyle"> <legend class="legend"><b><%=Request.Querystring("add")%><%=Request.Querystring("edit")%></b></legend> <div align="center"> <Form method="post" action="index.asp">
<TextArea name="TextArea" cols="30" rows="10"><% if Request.Querystring("edit") <> "" then Set f = fs.OpenTextFile(Server.Mappath(Replace(Request.Querystring("edit"),"/","-") & ".Kal"), 1) Response.Write(f.ReadAll) f.Close end if %></TextArea> <input type="hidden" name="add" value="<%=Request.Querystring("add")%><%=Request.Querystring("edit")%>"> <input type="Submit" name="Submit" Value="Submit"> <input type="submit" name="cancel" value="Cancel"> </Form> </div> </fieldset> <% end if %>
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.