query("DELETE FROM memht_calendar_events WHERE date < ($tzNOW - INTERVAL 30 DAY)"); ?> 12) { $next_month = 1; } echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "
".numToMonth($n_month)." $n_year
"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; echo "\n"; for ($i=1;$i<=$days;$i++) { $w_stamp = mktime(0,0,0,$n_month,$i,$n_year); $w_day = date('w',$w_stamp); if ($w_day==1) { echo "\n"; } while ($offset>0) { $offset--; echo "\n"; } switch ($w_day) { case 6: $class = "cal_sat"; break; case 0: $class = "cal_sun"; break; default: $class = "cal_uni"; break; } $itxt = $i; if ($result = $dblink->get_list("SELECT title FROM memht_calendar_events WHERE YEAR(date)=$n_year AND MONTH(date) = $n_month AND DAYOFMONTH(date) = $i")) { $class = "cal_evt"; $events = ""; foreach ($result as $row) { $events .= "
".outCode($row['title'])."
"; } $itxt = "$itxt"; } if ($n_year==date('Y') AND $n_month==date('n') AND $i==$n_day) { $class = "cal_now"; } echo "\n"; if ($w_day==0) { echo "\n"; } } echo "
".substr(_MON_,0,1)."".substr(_TUE_,0,1)."".substr(_WED_,0,1)."".substr(_THU_,0,1)."".substr(_FRI_,0,1)."".substr(_SAT_,0,1)."".substr(_SUN_,0,1)."
 $itxt
"; ?>