<?php
// the following sets the week to this weeks number
$weeknumber = date("W"); //gets the current week number
$dayofweek = date ("D"); //gets the current day
//this makes sure sunday gets counted as the current week
//not the previous week.
if ($dayofweek==Sun)
{
$weeknumber++ ;
}
//this script gets this weeks info
include ("$weeknumber".".php") ;
//in case for some reason i dont update next year in time
if ($weeknumber<27) print "under construction";
//the following sets up the high holiday times
//still needs to be formatted
elseif ($weeknumber==38) // week of Rosh Hashanah
{
print "this week is Shabbos parshas $parsha,<br />
rosh hashanah is on thursday and friday,<br />
candle lighting times are as follows:<br />
wed. sept. 15, 29 Elul, at 6:55 pm<br />
thu. sept. 16, 1 Tishrei, after 7:57 pm<br />
fri. sept. 17, 2 Tishrei, at $starts pm <br />
Shabbos ends at $ends pm.<br />
Sun sept. 19, 4 Tishrei is the fast of Gedaliah<br />
fast begins at 5:35 am and ends at 7:42 pm";
}
elseif ($weeknumber==39) //week of yom kippur
{
$sunday="today is the fast of Gedaliah.<br />
fast ends at 7:42 pm<br />";
$restofweek= "This week is shabbos $parsha.<br />
light candles<br />
fri. $fridayEn, $fridayHe, at $starts<br />
Yom Kippur ends saturday night at $ends pm";
if ($dayofweek==Sun) print "$sunday"."$restofweek";
else print $restofweek ;
}
else //for all the regular weeks
{
print
"<table width=\"220\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
<tr>
<td height=\"30\" colspan=\"2\">
<div align=\"center\" class=\"candleweek\">Shabbos Parshas
$parsha</div></td>
</tr>
<tr>
<td width=\"163\" class=\"candlelightend\">Light Candles</td>
<td width=\"57\"> </td>
</tr>
<tr>
<td height=\"26\" class=\"candletimeday\">fri. $fridayEn, $fridayHe,</td>
<td valign=\"top\"><div align=\"center\" class=\"candletimeday\">$starts</div></td>
</tr>
<tr>
<td class=\"candlelightend\">Shabbos Ends</td>
<td> </td>
</tr>
<tr>
<td class=\"candletimeday\" height=\"30\">Shabbos night</td>
<td valign=\"top\"><div align=\"center\" class=\"candletimeday\">$ends</div></td>
</tr>
</table>" ;
}
?>