// required includes
//include('includes/allincludes.php');
//include('Connections/aric.php');
//mysql_select_db($database_aric,$aric);
include_once '../components/library/Db.php';
$db = Db::connect('aric');
$currentYear = date("Y");
$currentMonth = date("m");
$startRange = $currentYear."-".$currentMonth."-01";
$endRange = ($currentYear+1)."-01-01";
$query = "SELECT a.title,a.url,a.startd,a.endd,a.focal_person,a.venue,b.sourcename
FROM tbl_meetings a
INNER JOIN tbl_source b ON a.id_source = b.id_source
WHERE DATE_FORMAT(a.startd,'%Y-%m-%d') >= '$startRange'
AND DATE_FORMAT(a.startd,'%Y-%m-%d') < '$endRange'
ORDER BY a.sortdate ASC";
$result = $db->execute($query);
//if(!$result = mysql_query($query)){
// die("Error: ".mysql_query());
//}
$count = -1;
$set = array();
$oldMonth = "";
$calendarTable = "";
foreach($result as $key=>$row){
$title = stripslashes($row['title']);
$url = $row['url'];
$startDate = $row['startd'];
$endDate = $row['endd'];
$source = $row['sourcename'];
$person = $row['focal_person'];
$venue = $row['venue'];
$startDate = getdate(strtotime($startDate));
$endDate = getdate(strtotime($endDate));
$currentMonth = $startDate['month']." ".$startDate['year'];
if($currentMonth != $oldMonth){
if($key>1)$margin ='margin-top:20px;';
$calendarTable .= '
'.$currentMonth.' |
';
$calendarTable .= '
Date | Title | Venue |
';
$oldMonth = $currentMonth;
}
$startDay = $startDate['mday'];
$endDay = $endDate['mday'];
$dayRange = $startDay == $endDay ? $startDay : $startDay . " - " . $endDay;
$linkTitle = $url ? "
".$title."" : $title;
$calendarTable .= "
";
$calendarTable .= "".$dayRange." | ";
$calendarTable .= "".$linkTitle." ".$source." | ";
$calendarTable .= "".$venue." | ";
$calendarTable .= "
";
}
?>
Notice: Undefined variable: filterSelected in
/opt/rh/httpd24/root/var/www/vhosts/aricv7/content/rci_calendar.php on line
70
Notice: Undefined variable: label in /opt/rh/httpd24/root/var/www/vhosts/aricv7/content/rci_calendar.php on line 79
|
|
Notice: Undefined variable: calendarTable in /opt/rh/httpd24/root/var/www/vhosts/aricv7/content/rci_calendar.php on line 87
|
|
|
|