Date Selection <%
' Day.asp
%>
<title> Select Date </title>
<style type=text/css>
<!--
Body{margin:0;font-size:9pt;color: #5E639B}
Td{font-size:9pt;color: #000000}
a:link {color: #000000; Text-decoration:none}
a:visited {color: #000000; Text-decoration:none}
a:active {color: #000000; Text-decoration:none}
a:hover {color: #ff3333; Text-decoration:none}
-->
</style>
<script language= "JavaScript" >
function Getday (v) {
Window.opener.document.<%=request.querystring ("form")%>.<%=request.querystring ("field")%>.value=v;
Window.close ();
return false;
}
</Script>
<body bgcolor= #ffffff onblur= "Window.focus ()" >
<%
Olddate=request ("Olddate")
If not isDate (olddate) then olddate=date
Yy=year (CDate (olddate))
Mm=month (CDate (olddate))
If request ("yy") <> "" Then Yy=request ("yy")
If request ("MM") <> "" Then Mm=request ("MM")
If yy= "" then yy=year (date)
If mm= "" then Mm=month (date)
If Mm>12 then mm=1:yy=yy+1
If Mm<1 then mm=12:yy=yy-1
Dim m (12)
M (1) =31
M (3) =31
M (5) =31
M (7) =31
M (8) =31
M (10) =31
M (12) =31
M (2) =28
M (4) =30
M (6) =30
M (9) =30
M (11) =30
if (yy mod 4=0 and yy mod 100<>0) or yy mod 400=0 then M (2) =29
Mms=m (mm)
Week1= (Weekday (CDate (yy & "-" & mm & "-1"))-1
%>
<table width=250 cellspacing=1 cellpadding=0 bgcolor= #FFDFDF align=center>
<tr>
<TD colspan=7 align=center>
<table width=100% height=20 cellspacing=0 cellpadding=0>
<tr height=20>
<TD width=30 align=center>
<a href=day.asp?form=<%=request ("form")%>&field=<%=request ("field")%>&yy=<%= (yy-1)% >&mm=<%=mm%>>
<font face=webdings style=color: #000000 title= "last year" >7</font>
</a>
<TD width=30 align=center>
<a href=day.asp?form=<%=request ("form")%>&field=<%=request ("field")%>&mm=<%= (mm-1)% >&yy=<%=yy%>>
<font face=webdings style=color: #000000 title= "Last month" >3</font>
</a>
<TD width=130 align=center style= "font:9pt verdana,geneva,sans-serif;color: #CD0101" >
<b><%=yy%> year <%=mm%> Month </b>
<TD width=30 align=center>
<a href=day.asp?form=<%=request ("form")%>&field=<%=request ("field")%>&mm=<%= (mm+1)% >&yy=<%=yy%>>
<font face=webdings style=color: #000000 title= "next month" >4</font>
</a>
<TD width=30 align=center>
<a href=day.asp?form=<%=request ("form")%>&field=<%=request ("field")%>&yy=<%= (yy+1)% >&mm=<%=mm%>>
<font face=webdings style=color: #000000 title= "next year" >8</font>
</a>
</table>
<tr bgcolor= #ffffff height=20>
<TD width=35 align=center bgcolor= #FFF4F4 style=color: #ff6633 > Day
<TD width=35 align=center bgcolor= #FFF4F4 > A
<TD width=35 align=center bgcolor= #FFF4F4 > II
<TD width=35 align=center bgcolor= #FFF4F4 > three
<TD width=35 align=center bgcolor= #FFF4F4 > Four
<TD width=35 align=center bgcolor= #FFF4F4 > Five
<TD width=35 align=center bgcolor= #FFF4F4 > VI
<%
If Week1<>0 Then
Response.Write "<tr>"
For I=1 to Week1
Response.Write "<td width=35 height=20 bgcolor= #ffffff >"
Next
End If
For I=1 to MMS
if (i+week1-1) mod 7=0 then Response.Write "<tr>"
Response.Write "<td width=35 height=20 align=center bgcolor= #ffffff >"
If CDate (yy & "-" & mm & "-" & I) =date () Then
%>
<input Type=button value=<%=i%>
Style= "BORDER: #CD0101 1px groove;width:30;heigh