School of Dentistry Calendar
+ Add an Event to the calendar
$cDate = $monthID . '/' . $dayID . '/' . $yearID; $vDate = date('m/d/Y',strtotime($cDate)); $vDate30 = date('m/d/Y',strtotime($cDate . '+30 days')); //echo "Date1: $vDate"; //echo "Date2: $vDate10
"; require_once($_SERVER['DOCUMENT_ROOT'] . "/fx6/FX.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/fx6/server16_data.php"); //include 'showCals.php'; $getCal = new FX($serverIP, $webCompanionPort_s, $dataSourceType, $scheme_s); $getCal->SetDBData("DentalWeb.fmp12", "calendar_web", "all"); $getCal->SetDBPassword('d3ntalw3b', 'xmlread'); if (!isset($dayID)) { $getCal->AddDBParam('start_date year', $yearID); $getCal->AddDBParam('start_date month', $monthID); } else { $getCal->AddDBParam('start_date', "{$vDate}..{$vDate30}"); } $getCal->AddDBParam('DS status', 'Approved'); $getCal->AddDBParam('show_school', 'Y'); $getCal->AddSortParam('start_date'); $getCal->AddSortParam('start time_calc'); $CalData = $getCal->FMFind(); $Cals = $CalData['data']; $calCount = $CalData['foundCount']; //echo "Found: $calCount
"; //echo ceil($calCount / $showBy) ; if ($calCount > 0) { $selDate = ''; echo '
Time | Event | Location | Department |
' . $currDate . ' | |||
' . $currDate . (trim($Cal['end_date'][0]) == '' ? '' : ' - ' . date("F j, Y", strtotime($Cal['end_date'][0]))) . ' | ' . $eventTime . ' | ' . $Cal['title'][0] . ' | ' . $Cal['location'][0] . ' |
' . $eventTime . ' | ' . $event. ' | ' . $Cal['location'][0] . (trim($Cal['room number'][0])==''?'':' (' . trim($Cal['room number'][0]) . ')') . ' | ' . $deptname . ' |