?> </label> <!-- textarea rows and cols are overridden by CSS height and width --> <textarea id="description" name="description" rows="8" cols="40"><?php echo htmlspecialchars($description); ?> </textarea> </div> <div id="div_date"> <label><?php echo get_vocab("date"); ?> :</label> <?php gendateselector("", $start_day, $start_month, $start_year); ?> </div> <?php if (!$enable_periods) { ?> <div id="div_time"> <label><?php echo get_vocab("time"); ?> :</label> <input name="hour" value="<?php if (!$twentyfourhour_format && $start_hour > 12) { echo $start_hour - 12; } else {
<div id="ad"> <input id="all_day" class="checkbox" name="all_day" type="checkbox" value="yes" onclick="OnAllDayClick(this)"> <label for="all_day"><?php echo get_vocab("all_day"); ?> </label> </div> </div> <?php echo "</div>\n"; echo "<div id=\"div_end_date\">\n"; echo "<label for=\"start_datepicker\">" . get_vocab("end") . ":</label>\n"; $date = getdate($end_time); // Don't show the end date selector if multiday is not allowed echo "<div" . ($multiday_allowed ? '' : " style=\"visibility: hidden\"") . ">\n"; gendateselector("end_", $date['mday'], $date['mon'], $date['year']); echo "</div>\n"; // If we're using periods the booking model is slightly different, // so subtract one period because the "end" period is actually the beginning // of the last period booked foreach ($areas as $a) { if ($a['enable_periods']) { $a['resolution'] = 60; $first = 12 * 60 * 60; // If we're using periods we just go to the beginning of the last slot $last = $first + (count($periods) - 1) * $a['resolution']; } else { $first = ($a['morningstarts'] * 60 + $a['morningstarts_minutes']) * 60; $last = ($a['eveningends'] * 60 + $a['eveningends_minutes']) * 60; $last = $last + $a['resolution']; }
function create_field_entry_end_date($disabled = FALSE) { global $end_time, $areas, $area_id, $periods, $multiday_allowed; $date = getbookingdate($end_time, TRUE); $current_s = ($date['hours'] * 60 + $date['minutes']) * 60; echo "<div id=\"div_end_date\">\n"; echo "<label>" . get_vocab("end") . ":</label>\n"; // Don't show the end date selector if multiday is not allowed echo "<div" . ($multiday_allowed ? '' : " style=\"visibility: hidden\"") . ">\n"; gendateselector("end_", $date['mday'], $date['mon'], $date['year'], '', $disabled); echo "</div>\n"; // Generate the live slot selector // If we're using periods the booking model is slightly different, // so subtract one period because the "end" period is actually the beginning // of the last period booked $a = $areas[$area_id]; $this_current_s = $a['enable_periods'] ? $current_s - $a['resolution'] : $current_s; genSlotSelector($areas[$area_id], 'end_seconds', 'end_seconds', $this_current_s, FALSE, $disabled); // Generate the templates foreach ($areas as $a) { $this_current_s = $a['enable_periods'] ? $current_s - $a['resolution'] : $current_s; genSlotSelector($a, 'end_seconds' . $a['id'], 'end_seconds', $this_current_s, TRUE, TRUE); } echo "<span id=\"end_time_error\" class=\"error\"></span>\n"; echo "</div>\n"; }
function create_field_entry_end_date($disabled = FALSE) { global $end_time, $areas, $area_id, $periods, $multiday_allowed; echo "<div id=\"div_end_date\">\n"; echo "<label>" . get_vocab("end") . ":</label>\n"; $date = getdate($end_time); // Don't show the end date selector if multiday is not allowed echo "<div" . ($multiday_allowed ? '' : " style=\"visibility: hidden\"") . ">\n"; gendateselector("end_", $date['mday'], $date['mon'], $date['year'], '', $disabled); echo "</div>\n"; // If we're using periods the booking model is slightly different, // so subtract one period because the "end" period is actually the beginning // of the last period booked foreach ($areas as $a) { if ($a['enable_periods']) { $a['resolution'] = 60; $first = 12 * 60 * 60; // If we're using periods we just go to the beginning of the last slot $last = $first + (count($periods) - 1) * $a['resolution']; } else { $first = ($a['morningstarts'] * 60 + $a['morningstarts_minutes']) * 60; $last = ($a['eveningends'] * 60 + $a['eveningends_minutes']) * 60; $last = $last + $a['resolution']; } $end_value = $a['enable_periods'] ? $end_time - $a['resolution'] : $end_time; $display_none = $a['id'] != $area_id; genSlotSelector($a, "end_", $first, $last, $end_value, $display_none, $disabled); } echo "<span id=\"end_time_error\" class=\"error\"></span>\n"; echo "</div>\n"; }