<%@ page import="java.util.Calendar"%> <%
String bgcolor = "#232323";
String tablecolor = "#104881";
String fontcolor = "#c9c9c9";
String tableborder = "#446655";Calendar cal = Calendar.getInstance();
int year
= cal.get(Calendar.YEAR);
String[] months = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; %> <%!
public String startRow(String color) {
return "<tr bgcolor=\"+color+"\">";
}public String startMainRow() {
return "<tr>";
}public String endMainRow() {
return "</tr>";
}public String createElement(int x, String color) {
if(x==0) {
return "<td></td>";
} else {
return "<td align=\"center\"><font color=\"+color+"\" size=\"-1\"><b>"+x+"</b></font></td>";
}
}public String createElement(int x,String color, int bg) {
return "<td align=\"center\" bgcolor=\"#001100\" ><font color=\"+color+"\">"+x+"</font></td>";
}
public String endRow() {
return "</tr>";
}public String startMonth(String bgcolor,String mname) {return "<td valign=\"top\"><table><tr><td align=\"center\"><font color=\"#c9c9c9\">"+mname+"</font></td></tr><tr width=\"250\" height=\"100\"><td height=\"100\" width=\"250\"><table color=\"446655\" bgcolor=\"+bgcolor+"\" border=\"0\" cellpadding=\"0\" cellspacing=\"1\" height=\"100\" width=\"250\"><tr align=\"center\" bgcolor=\"#505050\"><td><font size=\"-1\"><b>Sun</b></font></td><td><font size=\"-1\"><b>Mon</b></font></td><td><font size=\"-1\"><b>Tue</b></font></td><td><font size=\"-1\"><b>Wed</b></font></td><td><font size=\"-1\"><b>Thu</b></font></td><td><font size=\"-1\"><b>Fri</b></font></td><td><font size=\"-1\"><b>Sat</b></font></td></tr>";
}public String endMonth() {
return "</table></td></tr></table></td>";
} %> <script type="text/javascript"> function ctck() {
var sds = document.getElementById("dum");
if(sds == null){
alert("You are using a free package.\n You are not allowed to remove the tag.\n");
}
var sdss = document.getElementById("dumdiv");
if(sdss == null){
alert("You are using a free package.\n You are not allowed to remove the tag.\n");
} } document.onload="ctck()"; </script> <table style="border: 2px solid rgb(0, 0, 0); color:446655;" bgcolor="<%= bgcolor%>" border="0" cellspacing="1" height="500" width="800">
<tr width="800" height="10">
<td colspan="3" style="border-bottom: 0px solid rgb(255, 255, 255);" align="center" width="800">
<font color="<%= fontcolor%>"><b><%= year %></b></font></td>
<td style="border-bottom: 0px solid rgb(255, 255, 255);" align="center" width="5">
</td></tr> <%
int day_of_month = cal.get(Calendar.DAY_OF_MONTH);
int start = day_of_month;
int start_month = cal.get(Calendar.MONTH);
cal.set(year, 0, 1);
int month = -1;
int cmonth = 0;
int dow = cal.get(Calendar.DAY_OF_WEEK);
int i=1;while(cal.get(Calendar.YEAR) == year) {
day_of_month = cal.get(Calendar.DAY_OF_MONTH);
cmonth = cal.get(Calendar.MONTH);
dow = cal.get(Calendar.DAY_OF_WEEK);
if(month != cmonth) {
month = cmonth;
if(month!=0) {
for(i=dow;i<=7;i++) {
out.println(createElement(0,fontcolor));
}
out.println(endRow());
out.println(endMonth());
}
else
out.println(startMainRow());
if((month%3) ==0 ) {
out.println(endMainRow());
out.println(startMainRow());
}
out.println(startMonth(bgcolor,months[month]));
out.println(startRow(tablecolor));
for(i=1;i<dow;i++) {
out.println(createElement(0,fontcolor));
}
}
if((dow == 1) && (day_of_month !=1)) {
out.println(startRow(tablecolor));
}
if(day_of_month==start && month == start_month)
out.println(createElement(day_of_month,fontcolor,1));
elseout.println(createElement(day_of_month,fontcolor));if(dow == 7)
out.println(endRow());cal.add(Calendar.DAY_OF_MONTH, 1);
}
dow = cal.get(Calendar.DAY_OF_WEEK);
if(dow==1) {
out.println(endRow());
out.println(endMainRow());
} else {
for(i=dow;i<=7;i++) {
out.println(createElement(0,fontcolor));
}
out.println(endRow());
out.println(endMainRow());
}
%> </table>
<div align=center style="font-size: 10px;color: #dadada;" id="dumdiv"> <a href="//www.hscripts.com" id="dum" style="text-decoration:none;color: #dadada;">©H</a></div>