2003-07-11 17:27:56 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
//
|
|
|
|
// ZoneMinder web watch view file, $Date$, $Revision$
|
2006-01-17 19:32:47 +08:00
|
|
|
// Copyright (C) 2003, 2004, 2005, 2006 Philip Coombes
|
2004-01-08 19:45:57 +08:00
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
|
|
|
// as published by the Free Software Foundation; either version 2
|
|
|
|
// of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with this program; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
//
|
|
|
|
|
|
|
|
if ( !canView( 'Stream' ) )
|
|
|
|
{
|
|
|
|
$view = "error";
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
$result = mysql_query( "select * from Monitors where Id = '$mid'" );
|
|
|
|
if ( !$result )
|
|
|
|
die( mysql_error() );
|
|
|
|
$monitor = mysql_fetch_assoc( $result );
|
2006-01-15 21:09:30 +08:00
|
|
|
mysql_free_result( $result );
|
2004-01-08 19:45:57 +08:00
|
|
|
|
2006-11-06 21:56:44 +08:00
|
|
|
if ( !isset($control) )
|
|
|
|
{
|
2006-11-07 18:16:38 +08:00
|
|
|
$control = (canView( 'Control' ) && ($monitor['DefaultView'] == 'Control'));
|
2006-11-06 21:56:44 +08:00
|
|
|
}
|
|
|
|
|
2004-02-16 03:47:23 +08:00
|
|
|
if ( !isset($scale) )
|
2006-01-18 01:07:13 +08:00
|
|
|
$scale = reScale( SCALE_BASE, $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE );
|
2005-10-21 00:16:47 +08:00
|
|
|
|
2006-01-18 01:07:13 +08:00
|
|
|
$resize_scale = max( $scale, SCALE_BASE );
|
2004-01-08 20:26:31 +08:00
|
|
|
|
2003-07-11 17:27:56 +08:00
|
|
|
?>
|
2004-12-29 03:22:23 +08:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
|
2003-07-11 17:27:56 +08:00
|
|
|
<html>
|
|
|
|
<head>
|
2005-05-06 20:24:57 +08:00
|
|
|
<title><?= ZM_WEB_TITLE_PREFIX ?> - <?= $monitor['Name'] ?> - <?= $zmSlangWatch ?></title>
|
2004-12-29 02:20:11 +08:00
|
|
|
<link rel="stylesheet" href="zm_html_styles.css" type="text/css">
|
2004-12-29 03:29:43 +08:00
|
|
|
<script type="text/javascript">
|
2005-10-21 00:16:47 +08:00
|
|
|
window.resizeTo( <?= reScale( $monitor['Width'], $resize_scale )+$jws['watch']['w'] ?>, <?= reScale( $monitor['Height'], $resize_scale )+$jws['watch']['h'] ?> );
|
2003-07-11 17:27:56 +08:00
|
|
|
//opener.location.reload();
|
|
|
|
window.focus();
|
|
|
|
</script>
|
|
|
|
</head>
|
2005-12-09 01:13:00 +08:00
|
|
|
<frameset rows="24,<?= reScale($monitor['Height'],$scale)+8 ?>,16,*,0" border="0" frameborder="no" framespacing="0">
|
2005-10-21 00:16:47 +08:00
|
|
|
<frame src="<?= $PHP_SELF ?>?view=watchmenu&mode=<?= $mode ?>&mid=<?= $monitor['Id'] ?>&scale=<?= $scale ?>&control=<?= $control ?>" marginwidth="0" marginheight="0" name="MonitorMenu<?= $monitor['Id' ] ?>" scrolling="no">
|
|
|
|
<frame src="<?= $PHP_SELF ?>?view=watchfeed&mode=<?= $mode ?>&mid=<?= $monitor['Id'] ?>&scale=<?= $scale ?>&control=<?= $control ?>" marginwidth="0" marginheight="0" name="MonitorStream<?= $monitor['Id' ] ?>" scrolling="no">
|
2005-02-24 18:43:29 +08:00
|
|
|
<frame src="<?= $PHP_SELF ?>?view=watchstatus&mid=<?= $monitor['Id'] ?>&control=<?= $control ?>" marginwidth="0" marginheight="0" name="MonitorStatus<?= $monitor['Id' ] ?>" scrolling="no">
|
|
|
|
<?php
|
|
|
|
if ( $control )
|
|
|
|
{
|
2006-01-16 01:33:44 +08:00
|
|
|
if ( canView( 'Control' ) )
|
2005-03-21 03:47:04 +08:00
|
|
|
{
|
2005-02-24 18:43:29 +08:00
|
|
|
?>
|
|
|
|
<frame src="<?= $PHP_SELF ?>?view=control&mid=<?= $monitor['Id'] ?>" marginwidth="0" marginheight="0" name="ControlPanel<?= $monitor['Id' ] ?>" scrolling="auto">
|
|
|
|
<?php
|
2005-03-21 03:47:04 +08:00
|
|
|
}
|
2005-02-24 18:43:29 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2005-03-21 03:47:04 +08:00
|
|
|
if ( canView( 'Events' ) )
|
|
|
|
{
|
2005-02-24 18:43:29 +08:00
|
|
|
?>
|
2004-02-19 21:02:05 +08:00
|
|
|
<frame src="<?= $PHP_SELF ?>?view=watchevents&max_events=<?= MAX_EVENTS ?>&mid=<?= $monitor['Id'] ?>" marginwidth="0" marginheight="0" name="MonitorEvents<?= $monitor['Id' ] ?>" scrolling="auto">
|
2005-02-24 18:43:29 +08:00
|
|
|
<?php
|
2005-03-21 03:47:04 +08:00
|
|
|
}
|
2005-02-24 18:43:29 +08:00
|
|
|
}
|
|
|
|
?>
|
2005-12-09 01:13:00 +08:00
|
|
|
<frame src="<?= $PHP_SELF ?>?view=blank" marginwidth="0" marginheight="0" name="Siren<?= $monitor['Id' ] ?>" scrolling="no">
|
2003-07-11 17:27:56 +08:00
|
|
|
</frameset>
|