// --------------------------------------------------------------------------
// Foto-Webcam.eu
// Render full-sized image in a maximum size window with scrolling
//
// Flori Radlherr, http://www.radlherr.de
// This is free software, see COPYING for details.
// --------------------------------------------------------------------------
//
require "common.php";
$img= "/".$webcam['parImg']."_hu.jpg";
$imgUri= $webcam['workUri'].$img;
$imgPath= $webcam['workPath'].$img;
$inc= $webcam['includeUri'];
// ----------------------------------------------------------------------------
// Read actual image size to have the correct rectangle
$imageWidth= 0;
$imageHeight= 0;
$size= @getimagesize($imgPath);
if (isset($size)) {
$imageWidth= $size[0];
$imageHeight= $size[1];
}
else {
exit();
}
// ----------------------------------------------------------------------------
// Localisation
$msgFit= "fitscreen.png";
$msgFitT= "Fit image to screen size (Key F)";
$msgTitle= "View Webcam Image with full Resulution";
$msgMove= "Move mouse to scroll image
".
"Click or Esc to close window";
if ($lang == "de") {
$msgFit= "anpassen.png";
$msgFitT= "Zeige gesamtes Bild im Fenster (Taste F)";
$msgTitle= "Webcam-Bild in voller Auflösung";
$msgMove= "Maus bewegen, um Bild zu scrollen
".
"Klick bzw. Esc schließt das Fenster";
}
// ----------------------------------------------------------------------------
print <<
$msgTitle
END;
// ----------------------------------------------------------------------------
$ua= $_SERVER['HTTP_USER_AGENT'];
if (preg_match("/(symbian|mobile|fennec|android|iphone|ipad)/i", $ua)) {
print <<
END;
exit;
}
// ----------------------------------------------------------------------------
print <<
#img {
width: ${imageWidth}px; height: ${imageHeight}px;
}
#div {
position: fixed;
z-index: 0;
top: 0;
bottom: 0;
left: 0;
right: 0;
overflow: hidden;
}
#help {
position: fixed;
z-index: 2;
opacity: 0.6;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=60)";
top: 0;
right: 0;
background-color: white;
color: black;
font-size: 14px;
text-align: right;
padding: 2px;
}
#showframe {
position: fixed;
z-index: 2;
bottom: 0;
right: 0;
opacity: 0.3;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=30)";
background-color: white;
}
#showpos {
position: fixed;
z-index: 3;
opacity: 0.5;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
background-color: white;
}
#fullpic {
display: block;
position: fixed;
z-index: 3;
bottom: 0;
left: 0;
opacity: 0.2;
-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
cursor: pointer;
}
$msgMove
ENDX;