| Current Path : /var/www/cesa.co.za/calendar/ |
| Current File : /var/www/cesa.co.za/calendar/agenda.php |
<?php
include( '../inc/auth.inc' );
$db = mysql_connect($loghost,$logid,$logpwd);
mysql_select_db($dbname,$db);
$sql = "SELECT EventID, StartDate, EndDate, EventDescription
FROM SAACEEvents ORDER BY StartDate";
$queryresult = mysql_query($sql);
$getrow = 1;
$i = 0;
do {
if ($getrow) {
if ($row = mysql_fetch_array($queryresult)) {
$eventid = $row["EventID"];
$startdate = $row["StartDate"];
$enddate = $row["EndDate"];
$eventname = $row["EventDescription"];
} else {
break;
}
}
if (date("F", strtotime($startdate)) != $currmonth) {
$currmonth = date("F", strtotime($startdate));
echo "// ".$currmonth;
echo chr(10), chr(13);
}
$day = date("d", strtotime($startdate));
$year = date("Y", strtotime($startdate));
$month = date("m", strtotime($startdate));
$event = $eventname;
echo 'fAppendEvent('.$year.','.$month.','.$day.',"","",null,null,null,null,"<div align=left class=\'MsgBoard\'>'.$event.'</div>");';
echo chr(10), chr(13);
if (strtotime($enddate) > strtotime($startdate)) {
$startdate = date("Y/m/d" , strtotime($startdate) + 24*60*60);
$getrow = 0;
} else {
$getrow = 1;
}
$i++;
} while($i < 10000);
?>