Example #1
0
require_once e_PLUGIN . 'dateplus/_class.php';
$pref = e107::pref('dateplus');
$tp = e107::getParser();
$sc = e107::getScBatch('dateplus', true);
$template = e107::getTemplate('dateplus');
$curMonth = date('n');
$curDay = date('j');
$hs = hanukkahStart();
$he = hanukkahStart() + 691200;
$text = "";
$holidays = getHolidays($curMonth, $curDay);
foreach ($holidays as $holiday) {
    $holiray[] = array($holiday[0], $holiday[1], $holiday[2]);
}
if ($pref['enableUserdays'] == true) {
    $userdays = getUserdays($curMonth, $curDay);
    foreach ($userdays as $userday) {
        $holiray[] = array($userday[0], $userday[1], $userday[2]);
    }
}
if (date('j/n/Y', $hs) == date('j/n/Y')) {
    $holiray[] = array('Hanukkah starts', date('n', $hs), date('j', $hs));
}
if (date('j/n/Y', $he) == date('j/n/Y')) {
    $holiray[] = array('Hanukkah ends', date('n', $he), date('j', $he));
}
$all_holidays = '';
if (isset($holiray[0])) {
    foreach ($holiray as $entry) {
        $sc->setVars(array('name' => $entry[0], 'month' => $entry[1], 'day' => $entry[2]));
        $all_holidays .= $tp->parseTemplate($template['holiday'], false, $sc);
Example #2
0
		<tr>';
for ($x = 0; $x < $running_day; $x++) {
    $calendar .= '
			<td style="height: 200px;"></td>';
    $days_in_this_week++;
}
for ($list_day = 1; $list_day <= $days_in_month; $list_day++) {
    $style = $list_day == date('j') ? 'primary' : 'default';
    $ec = 0;
    $holidays = getHolidays($month, $list_day);
    foreach ($holidays as $holiday) {
        $event .= '<p class="small">' . $holiday[0] . '</p>';
        $ec++;
    }
    if ($pref['enableUserdays'] == true) {
        $userdays = getUserdays($month, $list_day);
        foreach ($userdays as $userday) {
            $event .= '<p class="small">' . $userday[0] . '</p>';
            $ec++;
        }
    }
    $hs = hanukkahStart();
    $he = hanukkahStart() + 691200;
    if (date('j/n/Y', $hs) == $list_day . '/' . $month . '/' . $year) {
        $event .= '<p class="small">Hanukkah starts</p>';
        $ec++;
    }
    if (date('j/n/Y', $he) == $list_day . '/' . $month . '/' . $year) {
        $event .= '<p class="small">Hanukkah ends</p>';
        $ec++;
    }