From 9d4fa2963b1059fed54aaeae583bf02a30c42239 Mon Sep 17 00:00:00 2001 From: jhunkeler Date: Mon, 4 Jan 2010 04:54:14 +0000 Subject: Fixed SVN maybe. git-svn-id: http://svn.3rd-infantry-division.org/testing/branches/Bayonet CMS v2@448 c5b2fb0a-d05d-0410-98c8-828840a80ff6 --- blocks/mini_calendar/functions.php | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'blocks/mini_calendar/functions.php') diff --git a/blocks/mini_calendar/functions.php b/blocks/mini_calendar/functions.php index 1133daa..ffc98a6 100644 --- a/blocks/mini_calendar/functions.php +++ b/blocks/mini_calendar/functions.php @@ -25,6 +25,15 @@ /** * PrintCalendar() - prints the calendar with events */ + ?> + +
- +
@@ -105,7 +113,7 @@ $day_count++; } -$sqlToday = $year.'-'.$monthNum.'-'.$today; +$sqlToday = date("Y-m-d", mktime(0, 0, 0, $monthNum, $today, $year)); $events = GetEventsOnInterval("{$year}-{$monthNum}-01","{$year}-{$monthNum}-{$days_in_month}"); //loop printing each day of the CURRENT month ONLY @@ -117,7 +125,7 @@ $events = GetEventsOnInterval("{$year}-{$monthNum}-01","{$year}-{$monthNum}-{$da echo ''; //weekdays } - $sqlDate = $year.'-'.$monthNum.'-'.$day_num; //old way NOT unix + $sqlDate = date("Y-m-d", mktime(0, 0, 0, $monthNum, $day_num, $year)); //checks to see if the current day has events $isEvent=false; @@ -129,23 +137,13 @@ $events = GetEventsOnInterval("{$year}-{$monthNum}-01","{$year}-{$monthNum}-{$da } } - } - - /* global $db; - $result = $db->Query("SELECT title,color,date,time FROM `bayonet_events` WHERE `date` = '$sqlDate' ORDER BY `date` DESC"); - while(($row = $db->Fetch($result))!=false) - { - $isEvent = true; - if($day_num == $today){ - $todaysEvents[] = $row; - } - } */ + } if($day_num == $today && $isEvent==true){ echo '
'.$day_num.'
'; }else if($day_num == $today && $isEvent==false){ echo '
'.$day_num.'
'; }else if($day_num != $today && $isEvent==true){ - echo '
'; + echo "
"; echo $day_num; echo '
'; }else{ -- cgit