} $start = explode(" ", $row['app_start']); $start = $start[1]; $end = explode(" ", $row['app_end']); $end = $end[1]; $first_app = strtotime($row['app_start']) - $daybegin; $start_pixel = $first_app / 60 * $zoom; $divs[] = array('id' => $row['followUpAppointmentId'] ?: $row['app_id'], 'start_stamp' => strtotime($row['app_start']), 'end_stamp' => strtotime($row['app_end']), 'start_offset' => round_to_nearest($start_time, 15) * $zoom, 'start' => date('H:i', strtotime(substr($start, 0, -3))), 'end' => date('H:i', strtotime(substr($end, 0, -3))), 'duration' => $duration, 'start_pixel' => $start_pixel, 'end_pixel' => $start_pixel + $duration * $zoom, 'app_height' => $duration * $zoom, 'colour' => $row['use_colour'], 'type' => $row['app_type'], 'subtype' => $row['ity_title'], 'notetype' => $row['app_notetype'], 'client' => $cli_name, 'addr' => str_replace(" ", " ", $pro_addr), 'tel' => $row['tel_number'], 'user' => $row['use_name'], 'contact' => $row['con_name'], 'attendees' => $row['app_attendees'], 'cv' => $row['d2a_cv'], 'subject' => format_overdiv($row['app_subject']), 'notes' => format_overdiv($row['note']), 'private' => $row['app_private'], 'bookedby' => $row['app_bookedby'], 'DIT' => $row['DIT']); unset($app_attendees, $use_colour, $pro_addr, $cli_name, $price); } } //print_r($divs); // end sql // need to loop every 15 minutes, consider not using Calendar class for this and going bespoke $Day->build(); while ($Hour =& $Day->fetch()) { // show working hours only if (date('H', $Hour->getTimeStamp()) >= $default_workingday_start && date('H', $Hour->getTimeStamp()) <= $default_workingday_end) { // highlight current hour slot but only if viewing current day if (date('l, jS F, Y', $Day->getTimeStamp()) == date('l, jS F, Y')) { if (date('H', $Hour->getTimeStamp()) == date('H')) { $class = "calHourNow"; } else { $class = "calHour"; } } else { $class = "calHour"; } // make the hour bar $hourBar .= '<div class="' . $class . '" style="height: ' . (60 * $zoom - 1) . 'px"><a name="' . date('H', $Hour->getTimeStamp()) . '"></a>' . date('H:', $Hour->getTimeStamp()) . '' . date('i', $Hour->getTimeStamp()) . '</div>' . "\n"; }
$selection = array($Day); $Month->build($selection); while ($Child =& $Month->fetch()) { if ($Child->isSelected()) { echo "<option value=\"" . $Child->thisDay() . "\" selected>" . $Child->thisDay() . "\n"; } else { echo "<option value=\"" . $Child->thisDay() . "\">" . $Child->thisDay() . "\n"; } } ?> </select> Hour:<select name="h"> <?php $selection = array($Hour); $Day->build($selection); while ($Child =& $Day->fetch()) { if ($Child->isSelected()) { echo "<option value=\"" . $Child->thisHour() . "\" selected>" . $Child->thisHour() . "\n"; } else { echo "<option value=\"" . $Child->thisHour() . "\">" . $Child->thisHour() . "\n"; } } ?> </select> Minute:<select name="i"> <?php $selection = array($Minute); $Hour->build($selection); while ($Child =& $Hour->fetch()) { if ($Child->isSelected()) { echo "<option value=\"" . $Child->thisMinute() . "\" selected>" . $Child->thisMinute() . "\n";