<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
</head>
<%! String days[]; %>
<%
days=new String[42];
for(int i=0;i<42;i++)
{
days[i]="";
}
%>
<%
GregorianCalendar currentDay = new GregorianCalendar();
int today=currentDay.get(Calendar.DAY_OF_MONTH);
int week=currentDay.get(Calendar.DAY_OF_WEEK);
System.out.println(week);
int month=currentDay.get(Calendar.MONTH);
int year= currentDay.get(Calendar.YEAR);
//顯示當前系統時間
out.println(year+"年"+ (month+1)+"月"+today+"日");
Calendar thisMonth=Calendar.getInstance();
thisMonth.set(Calendar.MONTH, month );
thisMonth.set(Calendar.YEAR, year );
thisMonth.setFirstDayOfWeek(Calendar.SUNDAY);
thisMonth.set(Calendar.DAY_OF_MONTH,1);
int firstIndex=thisMonth.get(Calendar.DAY_OF_WEEK)-1;
int maxIndex=thisMonth.getActualMaximum(Calendar.DAY_OF_MONTH);
for(int i=0;i<maxIndex;i++)
{
days[firstIndex+i]=String.valueOf(i+1);
}
%>
<BODY background=yellow10.gif MS_POSITIONING="GridLayout">
<TABLE cellSpacing=1 cellPadding=0 width="100%" bgColor=#5eb426 border=0>
<TBODY>
<TR>
<TD bgColor=#b1db99 height=25>
<DIV align=center>
<FORM id=Form1 name=Form1 action=dayrep.aspx method=get><INPUT type=hidden
value=dDwxMzk0NTQzNzMyOzs+OK9A0FWTKOsEv4q6hJA0dy1Lj8A= name=__VIEWSTATE>
<DIV align=center>
<TABLE>
<TBODY>
<TR>
<TD>
</FORM></TD></TR></TBODY></TABLE></FORM></DIV></DIV></TD></TR>
<TR>
<TD vAlign=top>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width=2 bgColor=#b1db99 height=280></TD>
<TD vAlign=top bgColor=#b1db99 height=300>
<DIV align=center><FONT face=宋體></FONT><BR>親愛的用戶你好!到目前爲止,你有<FONT
color=red size=5>10</FONT>篇新到的公文還未收閱,請及時處理 <BR><BR></DIV>
<CENTER>
<TABLE id="datatable" borderColorDark=#ffffff width="95%" borderColorLight=#000000 border=1>
<TBODY>
<TR bgColor=#66aa77>
<TD align=middle width="14%"><FONT color=#ffffff>星期日
</FONT></TD>
<TD align=middle width="14%"><FONT color=#ffffff>星期一
</FONT></TD>
<TD align=middle width="14%"><FONT color=#ffffff>星期二
</FONT></TD>
<TD align=middle width="14%"><FONT color=#ffffff>星期三
</FONT></TD>
<TD align=middle width="14%"><FONT color=#ffffff>星期四
</FONT></TD>
<TD align=middle width="14%"><FONT color=#ffffff>星期五
</FONT></TD>
<TD align=middle width="14%"><FONT color=#ffffff>星期六
</FONT></TD></TR>
<% for(int j=0;j<6;j++) { %>
<tr id=<%=j %>>
<% for(int i=j*7;i<(j+1)*7;i++) {
%>
<td vAlign=top align=middle >
<%
if((i-firstIndex+1)==today){
%>
<font color="red"><%=days[i]%></font>
<%
} else {
%>
<%=days[i]%>
<%
}
%>
</td>
<% } %>
</tr>
<% } %>
</TBODY></TABLE></CENTER><BR></TD>
<TD width=2 bgColor=#b1db99 height=280></TD></TR></TBODY></TABLE></TD>
<TR>
<TD bgColor=#b1db99 height=1></TD></TR></TBODY></TABLE></BODY></HTML>