Commit a69dba19 authored by Mitchell Pomery's avatar Mitchell Pomery

Main page now looks nicer

parent 8e85fc32
<?php
$camera = 'nocamera';
if (isset($_GET['camera']))
$camera=$_GET['camera'];
$imagelocation="../";
$camera=$_GET['camera'];
$imagelocation="../../";
$file = $imagelocation.strtolower($camera).".jpg";
//echo $file;
header("Expires: ".gmdate("D, d M Y H:i:s", time())." GMT");
if (!is_readable($file))
if (!is_readable($file)) {
$file="nocamera.jpg";
}
header("Content-Type: image/jpeg");
header("Content-Length: ".filesize($file));
header("Last-Modified: ".gmdate("D, d M Y H:i:s", filectime($file))." GMT");
......
......@@ -23,15 +23,19 @@
}
.camSection {
margin-left:auto;
margin-right:auto;
text-align: center;
margin-left:auto;
margin-right:auto;
text-align: center;
}
body {
padding-bottom: 4.5em;
}
.offline {
opacity: 0.1;
}
/* Haven't touched anything below this */
/*the navigation stuff for the archives page*/
......
......@@ -8,7 +8,7 @@ function updateWebcam (webcamid, webcamurl)
{
var date = new Date ();
var fullwebcamurl = webcamurl + "&t" + date.getTime ();
var img = document.getElementById (webcamid);
var img = document.getElementById(webcamid);
// get an XML HTTP Request object
var req = false;
......@@ -40,27 +40,11 @@ function updateWebcam (webcamid, webcamurl)
if (Math.abs (imgdate.getTime () - servdate.getTime ()) > 1000 * 60 * 2)
{
// this image is out of date
img.style.opacity = 0.75;
if (iambob)
{
img.style.border = "0px solid red";
}
else
{
img.style.border = "4px solid red";
}
img.classList.add('offline');
}
else
{
img.style.opacity = 1.0;
if (iambob)
{
img.style.border = "0px solid transparent";
}
else
{
img.style.border = "4px solid transparent";
}
img.classList.remove('offline');
}
}
}
......@@ -84,4 +68,4 @@ function updateTime()
updateWebcam ("ipcamera4", "camera.php?camera=ipcamera4");
updateWebcam ("ipcamera5", "camera.php?camera=ipcamera5");
updateWebcam ("ipcamera6", "camera.php?camera=ipcamera6");
}
\ No newline at end of file
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment