/home/a/aquarion/sites/www.aquarionics.com/epistula/chapters/webcam.inc.php
All my code (That is, anything not in the "Others" list on the right) is BSD licenced.
You can also view this page as text/plain or colour-coded source
<?PHP
/*******************************************************************************
Chapter - Webcam
********************************************************************************
Display a webcam archive
$Id: webcam.inc.php,v 1.1.1.1 2004/05/16 17:39:12 aquarion Exp $
$log$
*******************************************************************************/
$page->title = "Webcam";
$caching = false;
$display = "<html><head><title>Webcam</title></head>\n<body style=\"margin: 0 0 0 0; padding: 0 0 0 0;\">\n";
$display .= $page->image("/assets/webcam/webcam.jpg", "[Webcam Image]");
$display .= $page->forwardto($_SERVER['REQUEST_URI'],30);
$display .= "</body></html>";
if ($wanted[1] == "window"){
$finalOutput = $display;
} else {
$output = "<iframe src=\"/webcam/window\" width=\"350\" height=\"270\"></iframe><br>";
$output .= "<script type=\"text/javascript\">"
."function openwindow()\n"
."{\n"
."window.open(\"/webcam/window\",\"Aquaricam\",\"toolbar=yes,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width=320,height=240\")\n"
."}\n"
."document.write(\"<a href='javascript:openwindow()'>Open Aquaricam Window</a><br>\")"
."</script>\n";
$directory = "assets/webcam";
if ($dir = @opendir($directory)) {
while (($file = readdir($dir)) !== false) {
if(preg_match("/^t_/i", $file)){
$output .= $page->image("/assets/webcam/$file", "[Webcam Image]");
}
}
closedir($dir);
}
$page->content .= $page->item($output);
}
?>
Using a heavily customised version of Tom's PHPCode2ValidXHTML Thing