connectDB();
$query = "SELECT unique_id,start_date,end_date,event_title,event_details,event_level,user_id
FROM Calendar
WHERE ('$chosenStartMonth' BETWEEN start_date AND end_date) OR
('$chosenEndMonth' BETWEEN start_date AND end_date) OR
MONTH(start_date) = $monthInInt OR MONTH(end_date) = $monthInInt";
$result = $database->queryDB($query);
$counter = 0;
while($row = mysql_fetch_array($result,MYSQL_ASSOC)) {
$uniqueId = $row["unique_id"];
$startDate = $row["start_date"];
$endDate = $row["end_date"];
$eventTitle = $row["event_title"];
$eventDescription = $row["event_details"];
$eventLevel = $row["event_level"];
$userId = $row["user_id"];
$events[$counter][0] = $uniqueId;
$events[$counter][1] = $eventLevel;
$events[$counter][2] = $startDate;
$events[$counter][3] = $endDate;
$events[$counter][4] = $eventTitle;
$events[$counter][5] = $eventDescription;
$events[$counter][6] = $userId;
$counter++;
} //while
$database->closeDB();
?>
|
|
|
Sun | Mon | Tue |
Wed | Thu | Fri | Sat |
6) {$s++;
echo "\n\n";
$day = 0; }
//------------------------------------------------//
if ($i == date("j") && $m == date("m")) {?>
',
'newWin','scrollbars=no,status=yes,width=500,height=450')"
onMouseOver="this.style.cursor='pointer'">
0) {
for($a = 0; $a < $counter; $a++) {
$currentDate = mktime(0,0,0,$monthInInt,$i,$yearInInt);
$startDate = mktime(0,0,0,($dateFunction->getMonth($events[$a][2])),
($dateFunction->getDay($events[$a][2])),
($dateFunction->getYear($events[$a][2])));
$endDate = mktime(0,0,0,($dateFunction->getMonth($events[$a][3])),
($dateFunction->getDay($events[$a][3])),
($dateFunction->getYear($events[$a][3])));
if(($currentDate >= $startDate && $currentDate <= $endDate)
|| $currentDate == $startDate) {
if($currentLevel == $events[$a][1] && $currentLevel == 3) { ?>
',
'newWin','scrollbars=no,status=yes,width=500,height=450')"
onMouseOver="this.style.cursor='pointer'">
',
'newWin','scrollbars=no,status=yes,width=500,height=450')"
onMouseOver="this.style.cursor='pointer'">
',
'newWin','scrollbars=no,status=yes,width=500,height=450')"
onMouseOver="this.style.cursor='pointer'">
|
0) {?>
',
'newWin','scrollbars=no,status=yes,width=500,height=450')"
onMouseOver="this.style.cursor='pointer'">
0) {
for($a = 0; $a < $counter; $a++) {
$currentDate = mktime(0,0,0,$monthInInt,$i,$yearInInt);
$startDate = mktime(0,0,0,($dateFunction->getMonth($events[$a][2])),
($dateFunction->getDay($events[$a][2])),
($dateFunction->getYear($events[$a][2])));
$endDate = mktime(0,0,0,($dateFunction->getMonth($events[$a][3])),
($dateFunction->getDay($events[$a][3])),
($dateFunction->getYear($events[$a][3])));
if(($currentDate >= $startDate && $currentDate <= $endDate)
|| $currentDate == $startDate) {
if($currentLevel == $events[$a][1] && $currentLevel == 3) { ?>
',
'newWin','scrollbars=no,status=yes,width=500,height=450')"
onMouseOver="this.style.cursor='pointer'">
',
'newWin','scrollbars=no,status=yes,width=500,height=450')"
onMouseOver="this.style.cursor='pointer'">
',
'newWin','scrollbars=no,status=yes,width=500,height=450')"
onMouseOver="this.style.cursor='pointer'">
|
0) {?>
';
}
}
//-----------------------------------------------//
if ($i == $t_days && $day < 6) {
$remaining = 7 - $day;
for($gap = 0; $gap < $remaining; $gap++) {
echo ' | ';
}
echo ' ';
}
}
?>
|