= '23' || $t_dh < '4') || ($t_dh == '4' && $t_dm < '30'))
{
if ($t_dh >= '23')
{
$start_time_unix = mktime('22', '00', '00', date("m"), date("d"), date("Y"));
}
else
{
$start_time_unix = mktime('22', '00', '00', date("m", time()-84600), date("d", time()-84600), date("Y", time()-84600));
}
}
else
{
$start_time_unix = time()-3600;
}
$start_hour = date("g", $start_time_unix);
$start_min = substr(date("i", $start_time_unix), 0,1)."0";
$start_ampm = date("a", $start_time_unix);
}
$stop_hour = $_GET['s2h'];
$stop_min = $_GET['s2m'];
$stop_ampm = $_GET['s2p'];
$stop_time_unix = strtotime("$date_month/$date_day/$date_year, {$stop_hour}:{$stop_min}$stop_ampm");
// If the stop hour hasn't been given, in this case the latest image may have been requested OR the script
// has been run without a query string, default to the current time
if (!$stop_hour || $latest_imge == 'on')
{
$stop_time_unix = time();
$stop_hour = date("g", $stop_time_unix);
$stop_min = date("i", $stop_time_unix);
$stop_ampm = date("a", $stop_time_unix);
}
// Round the minute UP. THIS SECTION WILL FAIL WHEN CROSSING DAYS.
$stop_min_fir = substr(date("i", $stop_time_unix), 0,1);
$stop_min_sec = substr(date("i", $stop_time_unix), 1,1);
if ($stop_min_sec <= 3)
{
$stop_min = $stop_min_fir."0";
}
elseif ($stop_min_sec >= 4 && $stop_min_sec <= 5)
{
$stop_min = $stop_min_fir."5";
}
else
{
if ($stop_min_fir == 5)
{
$stop_hour++; $stop_min = '00';
}
else
{
$stop_min_fir++; $stop_min = $stop_min_fir."0";
}
}
// Build query string to pass onto each webcam image URL
$quicklink_query_string = "date={$date}&s1h={$start_hour}&s1m={$start_min}&s1p={$start_ampm}&s2h={$stop_hour}&s2m={$stop_min}&s2p={$stop_ampm}&cam=";
}
// If the date selected is not the current day, disable the "Latest Image" checkbox
if ($date_day != date("d"))
{
$disabled = 'disabled=true';
}
// Create a time array with times at 1 minute intervals between the selected start and stop time
while ($start_time_unix <= $stop_time_unix)
{
$image_times[] = date("YmdHi", $start_time_unix);
$start_time_unix = $start_time_unix + 60;
}
$webcam_display_order_raw = "tlc_sbp_rocklea,tlc_probuild_ueenswharf7,tlc_mcnab_kangaroopoint1,tlc_jewel_camera5";
$webcam_display_order = explode(",", $webcam_display_order_raw);
// Source appropriate webcam images fo each image time. This will return a very large
// associative array with the image URL's
$webcam_images = create_radar_image_list($webcam_display_order, $image_times, '5');
//////////////////////////////////////////////////////////////////////
/// START BROWSER OUTPUT /////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
?>
BSCH - Webcam Timelapse
View timelapse sequences from multiple cameras simultaneously. This section is designed to provide a quick overview - higher resolution imagery
is available for each camera by clicking on the image or using the quick links.