Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
UCC
webcams
Commits
a69dba19
Commit
a69dba19
authored
Dec 03, 2014
by
Mitchell Pomery
Browse files
Main page now looks nicer
parent
8e85fc32
Changes
3
Hide whitespace changes
Inline
Side-by-side
www/camera.php
View file @
a69dba19
<?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"
);
...
...
www/webcam-overrides.css
View file @
a69dba19
...
...
@@ -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*/
...
...
www/webcams.js
View file @
a69dba19
...
...
@@ -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
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment