SupportArea

BoltWire is a FREE content management system written in PHP.

Its innovative architecture combined with best-in-class forms processing makes it ideal for creating complex, interactive, web applications fast...


PLUGINS

SKINS

LANGUAGES

Calendar

Extensions > Plugins > Calendar

Here's what this script produces:


To do it, just create a page called code.embed.calendar_js with the following content. Then put <(embed calendar_js)> somewhere in your site.


<div id=calendar>
<script language="JavaScript">
<!>>
now = new Date();
nowDay = now.getDay();
nowDate = now.getDate();
nowMonth = now.getMonth() + 1;
nowYear = new String(now.getYear());
nowyearLen = nowYear.length
nowYear = nowYear.split("")
nowYear = nowYear[nowyearLen - 2] + nowYear[nowyearLen - 1]
j = 31;
startDate = 1;
tmpDate = nowDate;
tmpDay = nowDay;
start = false;
end = false;

monthName = new Array();
monthName[1] = "January";
monthName[2] = "February";
monthName[3] = "March";
monthName[4] = "April";
monthName[5] = "May";
monthName[6] = "June";
monthName[7] = "July";
monthName[8] = "August";
monthName[9] = "September";
monthName[10] = "October";
monthName[11] = "November";
monthName[12] = "December";

monthLen = new Array();
monthLen[1] = "31";
monthLen[2] = "28";
monthLen[3] = "31";
monthLen[4] = "30";
monthLen[5] = "31";
monthLen[6] = "30";
monthLen[7] = "31";
monthLen[8] = "31";
monthLen[9] = "30";
monthLen[10] = "31";
monthLen[11] = "30";
monthLen[12] = "31";

for (i = 0; i < j; i++){
     tmpDate>>;
     tmpDay>>;
     if (tmpDay < 0){
          tmpDay = 6;
     }
     if (tmpDate == 1){
          i = 31;
     }
}

document.write("<table border=1><tr><th colspan=7>" + monthName[nowMonth] + ' 20' + nowYear + "</th></tr>")
document.write("<tr><td>SU</td><td>M</td><td>T</td><td>W</td><td>TH</td><td>F</td><td>SA</td></tr><tr>")

for (i = 0; i < 7; i++){
     for (week = 0; week <= 6; week++){
          if (startDate == nowDate){
               document.write("<td bgcolor='yellow'><B><I>")
          }
          else{
               document.write("<td>")
          }

          if (week == tmpDay){
               start = true
          }
          if ((start == true)&&(end == false)){
               document.write(startDate)
               startDate++
          }
          if (startDate == nowDate){
               document.write("</B></I>")
          }
          document.write("</td>")
          if (startDate > monthLen[nowMonth]){
               end = true
          }
     }
     document.write("</tr>")
}
document.write("</table>")
// >>>
</script>
<div>