2003-07-11 17:27:56 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
//
|
|
|
|
// ZoneMinder web monitor 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.
|
|
|
|
//
|
2003-09-23 17:52:45 +08:00
|
|
|
|
2004-01-08 19:45:57 +08:00
|
|
|
if ( !canView( 'Monitors' ) )
|
|
|
|
{
|
|
|
|
$view = "error";
|
|
|
|
return;
|
|
|
|
}
|
2003-09-23 17:52:45 +08:00
|
|
|
|
2004-01-08 19:45:57 +08:00
|
|
|
$tabs = array();
|
2006-01-01 01:21:45 +08:00
|
|
|
$tabs["general"] = $zmSlangGeneral;
|
2004-01-08 19:45:57 +08:00
|
|
|
$tabs["source"] = $zmSlangSource;
|
|
|
|
$tabs["timestamp"] = $zmSlangTimestamp;
|
|
|
|
$tabs["buffers"] = $zmSlangBuffers;
|
2005-10-17 05:11:44 +08:00
|
|
|
if ( ZM_OPT_CONTROL && canView( 'Control' ) )
|
2005-02-24 18:43:29 +08:00
|
|
|
{
|
|
|
|
$tabs["control"] = $zmSlangControl;
|
|
|
|
}
|
2004-01-08 19:45:57 +08:00
|
|
|
if ( ZM_OPT_X10 )
|
|
|
|
{
|
|
|
|
$tabs["x10"] = $zmSlangX10;
|
|
|
|
}
|
2006-01-01 01:21:45 +08:00
|
|
|
$tabs["misc"] = $zmSlangMisc;
|
2004-01-08 19:45:57 +08:00
|
|
|
|
|
|
|
if ( !isset($tab) )
|
2006-01-01 01:21:45 +08:00
|
|
|
$tab = "general";
|
2003-09-23 17:52:45 +08:00
|
|
|
|
2004-01-08 19:45:57 +08:00
|
|
|
if ( !empty($mid) )
|
|
|
|
{
|
|
|
|
$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
|
|
|
if ( ZM_OPT_X10 )
|
2003-07-11 17:27:56 +08:00
|
|
|
{
|
2004-01-08 19:45:57 +08:00
|
|
|
$result = mysql_query( "select * from TriggersX10 where MonitorId = '$mid'" );
|
2003-07-11 17:27:56 +08:00
|
|
|
if ( !$result )
|
|
|
|
die( mysql_error() );
|
2004-01-08 19:45:57 +08:00
|
|
|
$x10_monitor = mysql_fetch_assoc( $result );
|
2006-01-15 21:09:30 +08:00
|
|
|
mysql_free_result( $result );
|
2003-10-28 01:08:15 +08:00
|
|
|
}
|
2004-01-08 19:45:57 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$monitor = array();
|
|
|
|
$monitor['Name'] = $zmSlangNew;
|
|
|
|
$monitor['Function'] = "None";
|
2005-12-23 00:47:19 +08:00
|
|
|
$monitor['Enabled'] = true;
|
2004-01-08 19:45:57 +08:00
|
|
|
$monitor['Type'] = "Local";
|
|
|
|
$monitor['Device'] = "";
|
|
|
|
$monitor['Channel'] = "";
|
|
|
|
$monitor['Format'] = "";
|
|
|
|
$monitor['Host'] = "";
|
|
|
|
$monitor['Path'] = "";
|
|
|
|
$monitor['Port'] = "80";
|
2006-01-24 07:09:47 +08:00
|
|
|
$monitor['Palette'] = "4";
|
2004-01-08 19:45:57 +08:00
|
|
|
$monitor['Width'] = "";
|
|
|
|
$monitor['Height'] = "";
|
|
|
|
$monitor['Orientation'] = "0";
|
|
|
|
$monitor['LabelFormat'] = '%%s - %y/%m/%d %H:%M:%S';
|
|
|
|
$monitor['LabelX'] = 0;
|
|
|
|
$monitor['LabelY'] = 0;
|
2004-12-30 02:40:08 +08:00
|
|
|
$monitor['ImageBufferCount'] = 40;
|
2004-01-08 19:45:57 +08:00
|
|
|
$monitor['WarmupCount'] = 25;
|
|
|
|
$monitor['PreEventCount'] = 10;
|
|
|
|
$monitor['PostEventCount'] = 10;
|
2004-09-25 20:37:45 +08:00
|
|
|
$monitor['AlarmFrameCount'] = 1;
|
2005-02-24 18:43:29 +08:00
|
|
|
$monitor['Controllable'] = 0;
|
|
|
|
$monitor['ControlType'] = 0;
|
|
|
|
$monitor['ControlDevice'] = "";
|
|
|
|
$monitor['ControlAddress'] = "";
|
2005-05-23 01:44:15 +08:00
|
|
|
$monitor['AutoStopTimeout'] = "";
|
2005-02-24 18:43:29 +08:00
|
|
|
$monitor['TrackMotion'] = 0;
|
|
|
|
$monitor['TrackDelay'] = "";
|
|
|
|
$monitor['ReturnLocation'] = -1;
|
|
|
|
$monitor['ReturnDelay'] = "";
|
2004-01-08 19:45:57 +08:00
|
|
|
$monitor['SectionLength'] = 600;
|
|
|
|
$monitor['FrameSkip'] = 0;
|
2004-09-23 21:43:10 +08:00
|
|
|
$monitor['EventPrefix'] = 'Event-';
|
2006-01-01 02:08:07 +08:00
|
|
|
$monitor['MaxFPS'] = "";
|
2006-03-31 20:47:39 +08:00
|
|
|
$monitor['AlarmMaxFPS'] = "";
|
2004-01-08 19:45:57 +08:00
|
|
|
$monitor['FPSReportInterval'] = 1000;
|
2005-12-16 18:09:11 +08:00
|
|
|
$monitor['RefBlendPerc'] = 7;
|
2005-11-22 19:21:27 +08:00
|
|
|
$monitor['DefaultRate'] = '100';
|
2005-10-20 00:52:28 +08:00
|
|
|
$monitor['DefaultScale'] = '100';
|
2005-10-17 05:24:52 +08:00
|
|
|
$monitor['WebColour'] = 'red';
|
2004-01-08 19:45:57 +08:00
|
|
|
$monitor['Triggers'] = "";
|
|
|
|
}
|
|
|
|
if ( !isset( $new_monitor ) )
|
|
|
|
{
|
|
|
|
$new_monitor = $monitor;
|
|
|
|
$new_monitor['Triggers'] = split( ',', isset($monitor['Triggers'])?$monitor['Triggers']:"" );
|
|
|
|
$new_x10_monitor = isset($x10_monitor)?$x10_monitor:array();
|
|
|
|
}
|
2006-01-01 02:08:07 +08:00
|
|
|
if ( !empty($preset) )
|
|
|
|
{
|
2006-03-31 20:47:39 +08:00
|
|
|
$result = mysql_query( "select Type, Device, Channel, Format, Host, Port, Path, Width, Height, Palette, MaxFPS, AlarmMaxFPS, Controllable, ControlId, ControlDevice, ControlAddress, DefaultRate, DefaultScale from MonitorPresets where Id = '$preset'" );
|
2006-01-01 02:08:07 +08:00
|
|
|
if ( !$result )
|
|
|
|
die( mysql_error() );
|
|
|
|
$preset = mysql_fetch_assoc( $result );
|
2006-01-15 21:09:30 +08:00
|
|
|
mysql_free_result( $result );
|
2006-01-01 02:08:07 +08:00
|
|
|
foreach ( $preset as $name=>$value )
|
|
|
|
{
|
|
|
|
if ( isset($value) )
|
|
|
|
{
|
|
|
|
$new_monitor[$name] = $value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-12-28 23:47:45 +08:00
|
|
|
$local_palettes = array( $zmSlangGrey=>1, "RGB24"=>4, "RGB565"=>3, "RGB555"=>6, "YUV422"=>7, "YUYV"=>8, "YUV422P"=>13, "YUV420P"=>15 );
|
2005-10-18 05:55:02 +08:00
|
|
|
$remote_palettes = $file_palettes = array( $zmSlang8BitGrey=>1, $zmSlang24BitColour=>4 );
|
2005-05-06 00:46:26 +08:00
|
|
|
$orientations = array( $zmSlangNormal=>'0', $zmSlangRotateRight=>'90', $zmSlangInverted=>'180', $zmSlangRotateLeft=>'270', $zmSlangFlippedHori=>'hori', $zmSlangFlippedVert=>'vert' );
|
2004-01-08 19:45:57 +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 Transitional//EN">
|
2003-07-11 17:27:56 +08:00
|
|
|
<html>
|
|
|
|
<head>
|
2005-05-06 20:24:57 +08:00
|
|
|
<title><?= ZM_WEB_TITLE_PREFIX ?> - <?= $zmSlangMonitor ?> - <?= $monitor['Name'] ?></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">
|
2003-07-11 17:27:56 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
if ( !empty($refresh_parent) )
|
|
|
|
{
|
2003-07-11 17:27:56 +08:00
|
|
|
?>
|
|
|
|
opener.location.reload(true);
|
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
}
|
2003-07-11 17:27:56 +08:00
|
|
|
?>
|
|
|
|
window.focus();
|
2006-01-24 07:09:47 +08:00
|
|
|
function validateForm(form)
|
2003-07-11 17:27:56 +08:00
|
|
|
{
|
2004-02-16 03:44:31 +08:00
|
|
|
var errors = new Array();
|
|
|
|
|
2006-01-24 07:09:47 +08:00
|
|
|
if ( form.elements['new_monitor[Name]'].value.search( /[^\w-]/ ) >= 0 )
|
2004-02-16 03:44:31 +08:00
|
|
|
{
|
2005-02-24 18:43:29 +08:00
|
|
|
errors[errors.length] = "<?= $zmSlangBadNameChars ?>";
|
2004-02-16 03:44:31 +08:00
|
|
|
}
|
2006-01-24 07:09:47 +08:00
|
|
|
if ( form.elements['new_monitor[MaxFPS]'].value && !(parseFloat(form.elements['new_monitor[MaxFPS]'].value) > 0 ) )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadMaxFPS ?>";
|
|
|
|
}
|
2006-03-31 20:47:39 +08:00
|
|
|
if ( form.elements['new_monitor[AlarmMaxFPS]'].value && !(parseFloat(form.elements['new_monitor[AlarmMaxFPS]'].value) > 0 ) )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadAlarmMaxFPS ?>";
|
|
|
|
}
|
2006-01-24 07:09:47 +08:00
|
|
|
if ( !form.elements['new_monitor[RefBlendPerc]'].value || !(parseInt(form.elements['new_monitor[RefBlendPerc]'].value) > 0 ) )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadRefBlendPerc ?>";
|
|
|
|
}
|
|
|
|
if ( form.elements['new_monitor[Type]'].value == 'Local' )
|
|
|
|
{
|
|
|
|
if ( !form.elements['new_monitor[Device]'].value )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadDevice ?>";
|
|
|
|
}
|
|
|
|
if ( !form.elements['new_monitor[Channel]'].value || !form.elements['new_monitor[Channel]'].value.match( /^\d+$/ ) )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadChannel ?>";
|
|
|
|
}
|
|
|
|
if ( !form.elements['new_monitor[Format]'].value || !form.elements['new_monitor[Format]'].value.match( /^\d+$/ ) )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadFormat ?>";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ( form.elements['new_monitor[Type]'].value == 'Remote' )
|
|
|
|
{
|
|
|
|
if ( !form.elements['new_monitor[Host]'].value || !form.elements['new_monitor[Host]'].value.match( /^[0-9a-zA-Z_.-]+$/ ) )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadHost ?>";
|
|
|
|
}
|
|
|
|
if ( form.elements['new_monitor[Port]'].value && !form.elements['new_monitor[Port]'].value.match( /^\d+$/ ) )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadPort ?>";
|
|
|
|
}
|
|
|
|
if ( !form.elements['new_monitor[Path]'].value )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadPath ?>";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ( form.elements['new_monitor[Type]'].value == 'File' )
|
|
|
|
{
|
|
|
|
if ( !form.elements['new_monitor[Path]'].value )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadPath ?>";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ( !form.elements['new_monitor[Width]'].value || !(parseInt(form.elements['new_monitor[Width]'].value) > 0 ) )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadWidth ?>";
|
|
|
|
}
|
|
|
|
if ( !form.elements['new_monitor[Height]'].value || !(parseInt(form.elements['new_monitor[Height]'].value) > 0 ) )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadHeight ?>";
|
|
|
|
}
|
|
|
|
if ( !form.elements['new_monitor[LabelX]'].value || !(parseInt(form.elements['new_monitor[LabelX]'].value) >= 0 ) )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadLabelX ?>";
|
|
|
|
}
|
|
|
|
if ( !form.elements['new_monitor[LabelY]'].value || !(parseInt(form.elements['new_monitor[LabelY]'].value) >= 0 ) )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadLabelY ?>";
|
|
|
|
}
|
|
|
|
if ( !form.elements['new_monitor[ImageBufferCount]'].value || !(parseInt(form.elements['new_monitor[ImageBufferCount]'].value) >= 10 ) )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadImageBufferCount ?>";
|
|
|
|
}
|
|
|
|
if ( !form.elements['new_monitor[WarmupCount]'].value || !(parseInt(form.elements['new_monitor[WarmupCount]'].value) >= 0 ) )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadWarmupCount ?>";
|
|
|
|
}
|
|
|
|
if ( !form.elements['new_monitor[PreEventCount]'].value || !(parseInt(form.elements['new_monitor[PreEventCount]'].value) > 0 ) || (parseInt(form.elements['new_monitor[PreEventCount]'].value) > parseInt(form.elements['new_monitor[ImageBufferCount]'].value)) )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadPreEventCount ?>";
|
|
|
|
}
|
|
|
|
if ( !form.elements['new_monitor[PostEventCount]'].value || !(parseInt(form.elements['new_monitor[PostEventCount]'].value) >= 0 ) )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadPostEventCount ?>";
|
|
|
|
}
|
|
|
|
if ( !form.elements['new_monitor[AlarmFrameCount]'].value || !(parseInt(form.elements['new_monitor[AlarmFrameCount]'].value) > 0 ) )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadAlarmFrameCount ?>";
|
|
|
|
}
|
|
|
|
if ( !form.elements['new_monitor[SectionLength]'].value || !(parseInt(form.elements['new_monitor[SectionLength]'].value) >= 30 ) )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadSectionLength ?>";
|
|
|
|
}
|
|
|
|
if ( !form.elements['new_monitor[FPSReportInterval]'].value || !(parseInt(form.elements['new_monitor[FPSReportInterval]'].value) >= 100 ) )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadFPSReportInterval ?>";
|
|
|
|
}
|
|
|
|
if ( !form.elements['new_monitor[FrameSkip]'].value || !(parseInt(form.elements['new_monitor[FrameSkip]'].value) >= 0 ) )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadFrameSkip ?>";
|
|
|
|
}
|
|
|
|
if ( !form.elements['new_monitor[WebColour]'].value || !form.elements['new_monitor[WebColour]'].value.match( /^[#0-9a-zA-Z]+$/ ) )
|
|
|
|
{
|
|
|
|
errors[errors.length] = "<?= $zmSlangBadWebColour ?>";
|
|
|
|
}
|
2004-02-16 03:44:31 +08:00
|
|
|
if ( errors.length )
|
|
|
|
{
|
|
|
|
alert( errors.join( "\n" ) );
|
|
|
|
return( false );
|
|
|
|
}
|
2003-07-11 17:27:56 +08:00
|
|
|
return( true );
|
|
|
|
}
|
|
|
|
|
2006-01-24 07:09:47 +08:00
|
|
|
function submitTab(form,tab)
|
2003-10-28 01:08:15 +08:00
|
|
|
{
|
2006-01-24 07:09:47 +08:00
|
|
|
form.action.value = "";
|
|
|
|
form.tab.value = tab;
|
|
|
|
form.submit();
|
2003-10-28 01:08:15 +08:00
|
|
|
}
|
|
|
|
|
2006-01-23 20:11:13 +08:00
|
|
|
function selectLinkedMonitors()
|
|
|
|
{
|
|
|
|
newWindow( "<?= $PHP_SELF ?>?view=monitorselect&callForm=<?= urlencode( 'monitor_form' ) ?>&callField=<?= urlencode( 'new_monitor[LinkedMonitors]' ) ?>", "zmLinkedMonitors", <?= $jws['monitorselect']['w'] ?>, <?= $jws['monitorselect']['h'] ?> );
|
|
|
|
}
|
|
|
|
|
2005-02-24 18:43:29 +08:00
|
|
|
function newWindow(Url,Name,Width,Height)
|
|
|
|
{
|
2005-12-08 19:20:00 +08:00
|
|
|
var Win = window.open(Url,Name,"resizable,width="+Width+",height="+Height);
|
2005-02-24 18:43:29 +08:00
|
|
|
}
|
|
|
|
|
2003-07-11 17:27:56 +08:00
|
|
|
function closeWindow()
|
|
|
|
{
|
|
|
|
window.close();
|
|
|
|
}
|
2005-02-24 18:43:29 +08:00
|
|
|
|
|
|
|
<?php
|
|
|
|
if ( ZM_OPT_CONTROL && $tab == 'control' )
|
|
|
|
{
|
|
|
|
?>
|
2006-01-24 07:09:47 +08:00
|
|
|
function loadLocations( form )
|
2005-02-24 18:43:29 +08:00
|
|
|
{
|
2006-01-24 07:09:47 +08:00
|
|
|
var controlIdSelect = form.elements['new_monitor[ControlId]'];
|
|
|
|
var returnLocationSelect = form.elements['new_monitor[ReturnLocation]'];
|
2005-02-24 18:43:29 +08:00
|
|
|
|
|
|
|
returnLocationSelect.options[option_count++] = new Option( '<?= $zmSlangNone ?>', -1 );
|
|
|
|
if ( controlIdSelect.selectedIndex )
|
|
|
|
{
|
|
|
|
var option_count = 1;
|
|
|
|
<?php
|
|
|
|
$sql = "select * from Controls where Type = '".$monitor['Type']."'";
|
|
|
|
$result = mysql_query( $sql );
|
|
|
|
if ( !$result )
|
|
|
|
die( mysql_error() );
|
|
|
|
$control_types = array( ''=>$zmSlangNone );
|
|
|
|
while( $row = mysql_fetch_assoc( $result ) )
|
|
|
|
{
|
|
|
|
$control_types[$row['Id']] = $row['Name'];
|
|
|
|
?>
|
|
|
|
if ( controlIdSelect.selectedIndex > 0 )
|
|
|
|
{
|
|
|
|
if ( controlIdSelect.options[controlIdSelect.selectedIndex].value == <?= $row['Id'] ?> )
|
|
|
|
{
|
|
|
|
<?php
|
|
|
|
if ( $row['HasHomePreset'] )
|
|
|
|
{
|
|
|
|
?>
|
|
|
|
returnLocationSelect.options[option_count++] = new Option( '<?= $zmSlangHome ?>', 0 );
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
for ( $i = 1; $i <= $row['NumPresets']; $i++ )
|
|
|
|
{
|
|
|
|
?>
|
|
|
|
returnLocationSelect.options[option_count++] = new Option( '<?= $zmSlangPreset.' '.$i ?>', <?= $i ?> );
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
returnLocationSelect.options.length = option_count;
|
|
|
|
<?php
|
|
|
|
}
|
2006-01-15 21:09:30 +08:00
|
|
|
mysql_free_result( $result );
|
2005-02-24 18:43:29 +08:00
|
|
|
?>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
returnLocationSelect.options.length = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
2003-07-11 17:27:56 +08:00
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<table border="0" cellspacing="0" cellpadding="0" width="100%">
|
|
|
|
<tr>
|
2005-02-24 18:43:29 +08:00
|
|
|
<td align="left" class="head"><?= $zmSlangMonitor ?> - <?= $monitor['Name'] ?></td>
|
2006-01-01 02:08:07 +08:00
|
|
|
<td align="right" valign="bottom" class="text"><?= makeLink( "javascript: newWindow( '$PHP_SELF?view=monitorpreset&mid=$mid', 'zmMonitorPreset<?= $mid ?>', ".$jws['monitorpreset']['w'].", ".$jws['monitorpreset']['h']." );", $zmSlangPresets, canEdit( 'Monitors' ) ) ?></td>
|
2003-09-23 17:52:45 +08:00
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td> </td>
|
2003-07-11 17:27:56 +08:00
|
|
|
</tr>
|
2003-09-23 17:52:45 +08:00
|
|
|
</table>
|
|
|
|
<table border="0" cellspacing="0" cellpadding="4" width="100%">
|
|
|
|
<tr>
|
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
foreach ( $tabs as $name=>$value )
|
|
|
|
{
|
|
|
|
if ( $tab == $name )
|
2003-09-23 17:52:45 +08:00
|
|
|
{
|
|
|
|
?>
|
|
|
|
<td width="10" class="activetab"><?= $value ?></td>
|
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2003-09-23 17:52:45 +08:00
|
|
|
?>
|
2003-10-28 01:08:15 +08:00
|
|
|
<td width="10" class="passivetab"><a href="javascript: submitTab( document.monitor_form, '<?= $name ?>' );"><?= $value ?></a></td>
|
2003-09-23 17:52:45 +08:00
|
|
|
<?php
|
|
|
|
}
|
2004-01-08 19:45:57 +08:00
|
|
|
}
|
2003-09-23 17:52:45 +08:00
|
|
|
?>
|
|
|
|
<td class="nontab"> </td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
<table border="0" cellspacing="0" cellpadding="2" width="100%">
|
2003-12-16 22:30:23 +08:00
|
|
|
<form name="monitor_form" method="post" action="<?= $PHP_SELF ?>" onsubmit="return validateForm( document.monitor_form )">
|
2003-07-11 17:27:56 +08:00
|
|
|
<input type="hidden" name="view" value="<?= $view ?>">
|
2003-09-23 17:52:45 +08:00
|
|
|
<input type="hidden" name="tab" value="<?= $tab ?>">
|
|
|
|
<input type="hidden" name="action" value="monitor">
|
2003-07-11 17:27:56 +08:00
|
|
|
<input type="hidden" name="mid" value="<?= $mid ?>">
|
2003-10-28 01:08:15 +08:00
|
|
|
<?php
|
2006-01-01 01:21:45 +08:00
|
|
|
if ( $tab != 'general' )
|
2004-01-08 19:45:57 +08:00
|
|
|
{
|
2003-10-28 01:08:15 +08:00
|
|
|
?>
|
2004-01-08 18:09:35 +08:00
|
|
|
<input type="hidden" name="new_monitor[Name]" value="<?= $new_monitor['Name'] ?>">
|
2003-10-28 01:08:15 +08:00
|
|
|
<input Type="hidden" name="new_monitor[Type]" value="<?= $new_monitor['Type'] ?>">
|
|
|
|
<input type="hidden" name="new_monitor[Function]" value="<?= $new_monitor['Function'] ?>">
|
2005-12-23 00:47:19 +08:00
|
|
|
<input type="hidden" name="new_monitor[Enabled]" value="<?= $new_monitor['Enabled'] ?>">
|
2006-01-23 20:11:13 +08:00
|
|
|
<input type="hidden" name="new_monitor[LinkedMonitors]" value="<?= $new_monitor['LinkedMonitors'] ?>">
|
2006-01-01 01:21:45 +08:00
|
|
|
<input type="hidden" name="new_monitor[RefBlendPerc]" value="<?= $new_monitor['RefBlendPerc'] ?>">
|
|
|
|
<input type="hidden" name="new_monitor[MaxFPS]" value="<?= $new_monitor['MaxFPS'] ?>">
|
2006-03-31 20:47:39 +08:00
|
|
|
<input type="hidden" name="new_monitor[AlarmMaxFPS]" value="<?= $new_monitor['AlarmMaxFPS'] ?>">
|
2003-10-28 01:08:15 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
if ( isset($new_monitor['Triggers']) )
|
|
|
|
{
|
|
|
|
foreach( $new_monitor['Triggers'] as $new_trigger )
|
2003-10-28 01:08:15 +08:00
|
|
|
{
|
|
|
|
?>
|
|
|
|
<input type="hidden" name="new_monitor[Triggers][]" value="<?= $new_trigger ?>">
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
}
|
2004-01-08 19:45:57 +08:00
|
|
|
}
|
2006-01-24 07:09:47 +08:00
|
|
|
if ( $tab != 'source' || $new_monitor['Type'] != 'Local' )
|
2004-01-08 19:45:57 +08:00
|
|
|
{
|
2003-10-28 01:08:15 +08:00
|
|
|
?>
|
2004-01-08 18:09:35 +08:00
|
|
|
<input type="hidden" name="new_monitor[Device]" value="<?= $new_monitor['Device'] ?>">
|
|
|
|
<input type="hidden" name="new_monitor[Channel]" value="<?= $new_monitor['Channel'] ?>">
|
|
|
|
<input type="hidden" name="new_monitor[Format]" value="<?= $new_monitor['Format'] ?>">
|
2006-01-24 07:09:47 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
if ( $tab != 'source' || $new_monitor['Type'] != 'Remote' )
|
|
|
|
{
|
|
|
|
?>
|
2004-01-08 18:09:35 +08:00
|
|
|
<input type="hidden" name="new_monitor[Host]" value="<?= $new_monitor['Host'] ?>">
|
|
|
|
<input type="hidden" name="new_monitor[Port]" value="<?= $new_monitor['Port'] ?>">
|
2006-01-24 07:09:47 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
if ( $tab != 'source' || ($new_monitor['Type'] != 'Remote' && $new_monitor['Type'] != 'File') )
|
|
|
|
{
|
|
|
|
?>
|
2004-01-08 18:09:35 +08:00
|
|
|
<input type="hidden" name="new_monitor[Path]" value="<?= $new_monitor['Path'] ?>">
|
2006-01-24 07:09:47 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
if ( $tab != 'source' )
|
|
|
|
{
|
|
|
|
?>
|
2004-01-08 18:09:35 +08:00
|
|
|
<input type="hidden" name="new_monitor[Palette]" value="<?= $new_monitor['Palette'] ?>">
|
|
|
|
<input type="hidden" name="new_monitor[Width]" value="<?= $new_monitor['Width'] ?>">
|
|
|
|
<input type="hidden" name="new_monitor[Height]" value="<?= $new_monitor['Height'] ?>">
|
|
|
|
<input type="hidden" name="new_monitor[Orientation]" value="<?= $new_monitor['Orientation'] ?>">
|
2003-10-28 01:08:15 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
}
|
|
|
|
if ( $tab != 'timestamp' )
|
|
|
|
{
|
2003-10-28 01:08:15 +08:00
|
|
|
?>
|
2004-01-08 18:09:35 +08:00
|
|
|
<input type="hidden" name="new_monitor[LabelFormat]" value="<?= $new_monitor['LabelFormat'] ?>">
|
|
|
|
<input type="hidden" name="new_monitor[LabelX]" value="<?= $new_monitor['LabelX'] ?>">
|
|
|
|
<input type="hidden" name="new_monitor[LabelY]" value="<?= $new_monitor['LabelY'] ?>">
|
2003-10-28 01:08:15 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
}
|
|
|
|
if ( $tab != 'buffers' )
|
|
|
|
{
|
2003-10-28 01:08:15 +08:00
|
|
|
?>
|
2004-01-08 18:09:35 +08:00
|
|
|
<input type="hidden" name="new_monitor[ImageBufferCount]" value="<?= $new_monitor['ImageBufferCount'] ?>">
|
|
|
|
<input type="hidden" name="new_monitor[WarmupCount]" value="<?= $new_monitor['WarmupCount'] ?>">
|
|
|
|
<input type="hidden" name="new_monitor[PreEventCount]" value="<?= $new_monitor['PreEventCount'] ?>">
|
|
|
|
<input type="hidden" name="new_monitor[PostEventCount]" value="<?= $new_monitor['PostEventCount'] ?>">
|
2004-09-25 20:37:45 +08:00
|
|
|
<input type="hidden" name="new_monitor[AlarmFrameCount]" value="<?= $new_monitor['AlarmFrameCount'] ?>">
|
2003-10-28 01:08:15 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
}
|
2005-02-24 18:43:29 +08:00
|
|
|
if ( ZM_OPT_CONTROL && $tab != 'control' )
|
|
|
|
{
|
|
|
|
?>
|
|
|
|
<input type="hidden" name="new_monitor[Controllable]" value="<?= $new_monitor['Controllable'] ?>">
|
|
|
|
<input type="hidden" name="new_monitor[ControlId]" value="<?= $new_monitor['ControlId'] ?>">
|
|
|
|
<input type="hidden" name="new_monitor[ControlDevice]" value="<?= $new_monitor['ControlDevice'] ?>">
|
|
|
|
<input type="hidden" name="new_monitor[ControlAddress]" value="<?= $new_monitor['ControlAddress'] ?>">
|
2005-05-23 01:44:15 +08:00
|
|
|
<input type="hidden" name="new_monitor[AutoStopTimeout]" value="<?= $new_monitor['AutoStopTimeout'] ?>">
|
2005-02-24 18:43:29 +08:00
|
|
|
<input type="hidden" name="new_monitor[TrackMotion]" value="<?= $new_monitor['TrackMotion'] ?>">
|
|
|
|
<input type="hidden" name="new_monitor[TrackDelay]" value="<?= $new_monitor['TrackDelay'] ?>">
|
|
|
|
<input type="hidden" name="new_monitor[ReturnLocation]" value="<?= $new_monitor['ReturnLocation'] ?>">
|
|
|
|
<input type="hidden" name="new_monitor[ReturnDelay]" value="<?= $new_monitor['ReturnDelay'] ?>">
|
|
|
|
<?php
|
|
|
|
}
|
2006-01-01 01:21:45 +08:00
|
|
|
if ( ZM_OPT_X10 && $tab != 'x10' )
|
|
|
|
{
|
|
|
|
?>
|
|
|
|
<input type="hidden" name="new_x10_monitor[Activation]" value="<?= $new_x10_monitor['Activation'] ?>">
|
|
|
|
<input type="hidden" name="new_x10_monitor[AlarmInput]" value="<?= $new_x10_monitor['AlarmInput'] ?>">
|
|
|
|
<input type="hidden" name="new_x10_monitor[AlarmOutput]" value="<?= $new_x10_monitor['AlarmOutput'] ?>">
|
|
|
|
<?php
|
|
|
|
}
|
2004-01-08 19:45:57 +08:00
|
|
|
if ( $tab != 'misc' )
|
|
|
|
{
|
2003-10-28 01:08:15 +08:00
|
|
|
?>
|
2004-09-23 21:43:10 +08:00
|
|
|
<input type="hidden" name="new_monitor[EventPrefix]" value="<?= $new_monitor['EventPrefix'] ?>">
|
2006-01-01 01:21:45 +08:00
|
|
|
<input type="hidden" name="new_monitor[SectionLength]" value="<?= $new_monitor['SectionLength'] ?>">
|
|
|
|
<input type="hidden" name="new_monitor[FrameSkip]" value="<?= $new_monitor['FrameSkip'] ?>">
|
2004-01-08 18:09:35 +08:00
|
|
|
<input type="hidden" name="new_monitor[FPSReportInterval]" value="<?= $new_monitor['FPSReportInterval'] ?>">
|
2005-11-22 19:21:27 +08:00
|
|
|
<input type="hidden" name="new_monitor[DefaultRate]" value="<?= $new_monitor['DefaultRate'] ?>">
|
2005-10-20 00:52:28 +08:00
|
|
|
<input type="hidden" name="new_monitor[DefaultScale]" value="<?= $new_monitor['DefaultScale'] ?>">
|
2005-10-17 05:24:52 +08:00
|
|
|
<input type="hidden" name="new_monitor[WebColour]" value="<?= $new_monitor['WebColour'] ?>">
|
2003-10-28 01:08:15 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
}
|
2003-10-28 01:08:15 +08:00
|
|
|
?>
|
2003-07-11 17:27:56 +08:00
|
|
|
<tr>
|
2005-02-24 18:43:29 +08:00
|
|
|
<td align="left" class="smallhead" width="50%"><?= $zmSlangParameter ?></td><td align="left" class="smallhead" width="50%"><?= $zmSlangValue ?></td>
|
2003-07-11 17:27:56 +08:00
|
|
|
</tr>
|
2003-09-23 17:52:45 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
switch ( $tab )
|
|
|
|
{
|
2006-01-01 01:21:45 +08:00
|
|
|
case 'general' :
|
2003-09-23 17:52:45 +08:00
|
|
|
{
|
|
|
|
?>
|
2004-01-08 18:09:35 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangName ?></td><td align="left" class="text"><input type="text" name="new_monitor[Name]" value="<?= $new_monitor['Name'] ?>" size="16" class="form"></td></tr>
|
2006-01-01 01:21:45 +08:00
|
|
|
<?php
|
|
|
|
$select_name = "new_monitor[Type]";
|
|
|
|
$source_types = array(
|
|
|
|
'Local'=>$zmSlangLocal,
|
|
|
|
'Remote'=>$zmSlangRemote,
|
|
|
|
'File'=>$zmSlangFile
|
|
|
|
);
|
|
|
|
?>
|
|
|
|
<tr><td align="left" class="text"><?= $zmSlangSourceType ?></td><td><?= buildSelect( $select_name, $source_types ); ?></td></tr>
|
2004-01-07 20:57:07 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangFunction ?></td><td align="left" class="text"><select name="new_monitor[Function]" class="form">
|
2003-07-11 17:27:56 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
foreach ( getEnumValues( 'Monitors', 'Function' ) as $opt_function )
|
|
|
|
{
|
2003-07-11 17:27:56 +08:00
|
|
|
?>
|
2003-10-28 01:08:15 +08:00
|
|
|
<option value="<?= $opt_function ?>"<?php if ( $opt_function == $new_monitor['Function'] ) { ?> selected<?php } ?>><?= $opt_function ?></option>
|
2003-07-11 17:27:56 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
}
|
2003-07-11 17:27:56 +08:00
|
|
|
?>
|
|
|
|
</select></td></tr>
|
2005-12-23 00:47:19 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangEnabled ?></td><td align="left" class="text"><input type="checkbox" name="new_monitor[Enabled]" value="1" class="form-noborder"<?php if ( !empty($new_monitor['Enabled']) ) { ?> checked<?php } ?>></td></tr>
|
2006-01-23 20:11:13 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangLinkedMonitors ?></td><td align="left" class="text"><input type="text" name="new_monitor[LinkedMonitors]" value="<?= $new_monitor['LinkedMonitors'] ?>" size="16" class="form"> <a href="#" onClick="selectLinkedMonitors()"><?= $zmSlangSelect ?></a></td></tr>
|
2006-01-01 01:21:45 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangMaximumFPS ?></td><td align="left" class="text"><input type="text" name="new_monitor[MaxFPS]" value="<?= $new_monitor['MaxFPS'] ?>" size="6" class="form"></td></tr>
|
2006-03-31 20:47:39 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangAlarmMaximumFPS ?></td><td align="left" class="text"><input type="text" name="new_monitor[AlarmMaxFPS]" value="<?= $new_monitor['AlarmMaxFPS'] ?>" size="6" class="form"></td></tr>
|
2006-01-01 01:21:45 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangRefImageBlendPct ?></td><td align="left" class="text"><input type="text" name="new_monitor[RefBlendPerc]" value="<?= $new_monitor['RefBlendPerc'] ?>" size="4" class="form"></td></tr>
|
2004-01-07 20:57:07 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangTriggers ?></td><td align="left" class="text">
|
2003-09-23 17:52:45 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
$opt_triggers = getSetValues( 'Monitors', 'Triggers' );
|
|
|
|
$break_count = (int)(ceil(count($opt_triggers)));
|
|
|
|
$break_count = min( 3, $break_count );
|
|
|
|
$opt_count = 0;
|
|
|
|
foreach( $opt_triggers as $opt_trigger )
|
|
|
|
{
|
|
|
|
if ( !ZM_OPT_X10 && $opt_trigger == 'X10' )
|
|
|
|
continue;
|
|
|
|
if ( $opt_count && ($opt_count%$break_count == 0) )
|
|
|
|
echo "</br>";
|
2003-09-23 17:52:45 +08:00
|
|
|
?>
|
2004-01-08 18:09:35 +08:00
|
|
|
<input type="checkbox" name="new_monitor[Triggers][]" value="<?= $opt_trigger ?>" class="form-noborder"<?php if ( isset($new_monitor['Triggers']) && in_array( $opt_trigger, $new_monitor['Triggers'] ) ) { ?> checked<?php } ?>><?= $opt_trigger ?>
|
2003-09-23 17:52:45 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
$opt_count ++;
|
|
|
|
}
|
|
|
|
if ( !$opt_count )
|
|
|
|
{
|
2003-09-23 17:52:45 +08:00
|
|
|
?>
|
2004-01-07 20:57:07 +08:00
|
|
|
<em><?= $zmSlangNoneAvailable ?></em>
|
2003-09-23 17:52:45 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
}
|
2003-09-23 17:52:45 +08:00
|
|
|
?>
|
|
|
|
</td></tr>
|
2003-07-11 17:27:56 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 'source' :
|
|
|
|
{
|
|
|
|
if ( $new_monitor['Type'] == "Local" )
|
2003-09-23 17:52:45 +08:00
|
|
|
{
|
2003-07-11 17:27:56 +08:00
|
|
|
?>
|
2005-10-17 18:58:25 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangDevicePath ?></td><td align="left" class="text"><input type="text" name="new_monitor[Device]" value="<?= $new_monitor['Device'] ?>" size="24" class="form"></td></tr>
|
2004-01-27 17:39:36 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangDeviceChannel ?></td><td align="left" class="text"><input type="text" name="new_monitor[Channel]" value="<?= $new_monitor['Channel'] ?>" size="4" class="form"></td></tr>
|
2004-01-08 18:09:35 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangDeviceFormat ?></td><td align="left" class="text"><input type="text" name="new_monitor[Format]" value="<?= $new_monitor['Format'] ?>" size="4" class="form"></td></tr>
|
|
|
|
<tr><td align="left" class="text"><?= $zmSlangCapturePalette ?></td><td align="left" class="text"><select name="new_monitor[Palette]" class="form"><?php foreach ( $local_palettes as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $new_monitor['Palette'] ) { ?> selected<?php } ?>><?= $name ?></option><?php } ?></select></td></tr>
|
2003-07-11 17:27:56 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
}
|
2005-10-18 05:55:02 +08:00
|
|
|
elseif ( $new_monitor['Type'] == "Remote" )
|
2004-01-08 19:45:57 +08:00
|
|
|
{
|
2003-07-11 17:27:56 +08:00
|
|
|
?>
|
2004-02-16 03:17:38 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangRemoteHostName ?></td><td align="left" class="text"><input type="text" name="new_monitor[Host]" value="<?= $new_monitor['Host'] ?>" size="36" class="form"></td></tr>
|
2004-01-08 18:09:35 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangRemoteHostPort ?></td><td align="left" class="text"><input type="text" name="new_monitor[Port]" value="<?= $new_monitor['Port'] ?>" size="6" class="form"></td></tr>
|
|
|
|
<tr><td align="left" class="text"><?= $zmSlangRemoteHostPath ?></td><td align="left" class="text"><input type="text" name="new_monitor[Path]" value="<?= $new_monitor['Path'] ?>" size="36" class="form"></td></tr>
|
|
|
|
<tr><td align="left" class="text"><?= $zmSlangRemoteImageColours ?></td><td align="left" class="text"><select name="new_monitor[Palette]" class="form"><?php foreach ( $remote_palettes as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $new_monitor['Palette'] ) { ?> selected<?php } ?>><?= $name ?></option><?php } ?></select></td></tr>
|
2005-10-18 05:55:02 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
elseif ( $new_monitor['Type'] == "File" )
|
|
|
|
{
|
|
|
|
?>
|
|
|
|
<tr><td align="left" class="text"><?= $zmSlangFilePath ?></td><td align="left" class="text"><input type="text" name="new_monitor[Path]" value="<?= $new_monitor['Path'] ?>" size="36" class="form"></td></tr>
|
|
|
|
<tr><td align="left" class="text"><?= $zmSlangFileColours ?></td><td align="left" class="text"><select name="new_monitor[Palette]" class="form"><?php foreach ( $file_palettes as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $new_monitor['Palette'] ) { ?> selected<?php } ?>><?= $name ?></option><?php } ?></select></td></tr>
|
2003-07-11 17:27:56 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
}
|
2003-07-11 17:27:56 +08:00
|
|
|
?>
|
2004-01-08 18:09:35 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangCaptureWidth ?> (<?= $zmSlangPixels ?>)</td><td align="left" class="text"><input type="text" name="new_monitor[Width]" value="<?= $new_monitor['Width'] ?>" size="4" class="form"></td></tr>
|
|
|
|
<tr><td align="left" class="text"><?= $zmSlangCaptureHeight ?> (<?= $zmSlangPixels ?>)</td><td align="left" class="text"><input type="text" name="new_monitor[Height]" value="<?= $new_monitor['Height'] ?>" size="4" class="form"></td></tr>
|
|
|
|
<tr><td align="left" class="text"><?= $zmSlangOrientation ?></td><td align="left" class="text"><select name="new_monitor[Orientation]" class="form"><?php foreach ( $orientations as $name => $value ) { ?><option value="<?= $value ?>"<?php if ( $value == $new_monitor['Orientation'] ) { ?> selected<?php } ?>><?= $name ?></option><?php } ?></select></td></tr>
|
2003-09-23 17:52:45 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 'timestamp' :
|
|
|
|
{
|
2003-09-23 17:52:45 +08:00
|
|
|
?>
|
2005-05-20 00:18:13 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangTimestampLabelFormat ?></td><td align="left" class="text"><input type="text" name="new_monitor[LabelFormat]" value="<?= $new_monitor['LabelFormat'] ?>" size="32" class="form"></td></tr>
|
2004-01-08 18:09:35 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangTimestampLabelX ?></td><td align="left" class="text"><input type="text" name="new_monitor[LabelX]" value="<?= $new_monitor['LabelX'] ?>" size="4" class="form"></td></tr>
|
|
|
|
<tr><td align="left" class="text"><?= $zmSlangTimestampLabelY ?></td><td align="left" class="text"><input type="text" name="new_monitor[LabelY]" value="<?= $new_monitor['LabelY'] ?>" size="4" class="form"></td></tr>
|
2003-09-23 17:52:45 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 'buffers' :
|
|
|
|
{
|
2003-09-23 17:52:45 +08:00
|
|
|
?>
|
2004-01-21 18:52:07 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangImageBufferSize ?></td><td align="left" class="text"><input type="text" name="new_monitor[ImageBufferCount]" value="<?= $new_monitor['ImageBufferCount'] ?>" size="6" class="form"></td></tr>
|
2004-01-08 18:09:35 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangWarmupFrames ?></td><td align="left" class="text"><input type="text" name="new_monitor[WarmupCount]" value="<?= $new_monitor['WarmupCount'] ?>" size="4" class="form"></td></tr>
|
|
|
|
<tr><td align="left" class="text"><?= $zmSlangPreEventImageBuffer ?></td><td align="left" class="text"><input type="text" name="new_monitor[PreEventCount]" value="<?= $new_monitor['PreEventCount'] ?>" size="4" class="form"></td></tr>
|
|
|
|
<tr><td align="left" class="text"><?= $zmSlangPostEventImageBuffer ?></td><td align="left" class="text"><input type="text" name="new_monitor[PostEventCount]" value="<?= $new_monitor['PostEventCount'] ?>" size="4" class="form"></td></tr>
|
2004-09-25 20:37:45 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangAlarmFrameCount ?></td><td align="left" class="text"><input type="text" name="new_monitor[AlarmFrameCount]" value="<?= $new_monitor['AlarmFrameCount'] ?>" size="4" class="form"></td></tr>
|
2005-02-24 18:43:29 +08:00
|
|
|
<?php
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 'control' :
|
|
|
|
{
|
|
|
|
?>
|
|
|
|
<tr><td align="left" class="text"><?= $zmSlangControllable ?></td><td align="left" class="text"><input type="checkbox" name="new_monitor[Controllable]" value="1" class="form-noborder"<?php if ( !empty($new_monitor['Controllable']) ) { ?> checked<?php } ?>></td></tr>
|
2005-10-17 05:24:52 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangControlType ?></td><td class="text"><?= buildSelect( "new_monitor[ControlId]", $control_types, 'loadLocations( document.monitor_form )' ); ?><?php if ( canEdit( 'Control' ) ) { ?> <a href="javascript: newWindow( '<?= $PHP_SELF ?>?view=controlcaps', 'zmControlCaps', <?= $jws['controlcaps']['w'] ?>, <?= $jws['controlcaps']['h'] ?> );"><?= $zmSlangEdit ?></a><?php } ?></td></tr>
|
2005-02-24 18:43:29 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangControlDevice ?></td><td align="left" class="text"><input type="text" name="new_monitor[ControlDevice]" value="<?= $new_monitor['ControlDevice'] ?>" size="32" class="form"></td></tr>
|
2005-05-25 02:31:52 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangControlAddress ?></td><td align="left" class="text"><input type="text" name="new_monitor[ControlAddress]" value="<?= $new_monitor['ControlAddress'] ?>" size="32" class="form"></td></tr>
|
2005-05-23 01:44:15 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangAutoStopTimeout ?></td><td align="left" class="text"><input type="text" name="new_monitor[AutoStopTimeout]" value="<?= $new_monitor['AutoStopTimeout'] ?>" size="4" class="form"></td></tr>
|
2005-02-24 18:43:29 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangTrackMotion ?></td><td align="left" class="text"><input type="checkbox" name="new_monitor[TrackMotion]" value="1" class="form-noborder"<?php if ( !empty($new_monitor['TrackMotion']) ) { ?> checked<?php } ?>></td></tr>
|
|
|
|
<?php
|
|
|
|
$return_options = array(
|
|
|
|
'-1' => $zmSlangNone,
|
|
|
|
'0' => $zmSlangHome,
|
|
|
|
'1' => $zmSlangPreset." 1",
|
|
|
|
);
|
|
|
|
?>
|
|
|
|
<tr><td align="left" class="text"><?= $zmSlangTrackDelay ?></td><td align="left" class="text"><input type="text" name="new_monitor[TrackDelay]" value="<?= $new_monitor['TrackDelay'] ?>" size="4" class="form"></td></tr>
|
|
|
|
<tr><td align="left" class="text"><?= $zmSlangReturnLocation ?></td><td><?= buildSelect( "new_monitor[ReturnLocation]", $return_options ); ?></td></tr>
|
|
|
|
<tr><td align="left" class="text"><?= $zmSlangReturnDelay ?></td><td align="left" class="text"><input type="text" name="new_monitor[ReturnDelay]" value="<?= $new_monitor['ReturnDelay'] ?>" size="4" class="form"></td></tr>
|
2006-01-01 01:21:45 +08:00
|
|
|
<?php
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 'x10' :
|
|
|
|
{
|
|
|
|
?>
|
|
|
|
<tr><td align="left" class="text"><?= $zmSlangX10ActivationString ?></td><td align="left" class="text"><input type="text" name="new_x10_monitor[Activation]" value="<?= $new_x10_monitor['Activation'] ?>" size="20" class="form"></td></tr>
|
|
|
|
<tr><td align="left" class="text"><?= $zmSlangX10InputAlarmString ?></td><td align="left" class="text"><input type="text" name="new_x10_monitor[AlarmInput]" value="<?= $new_x10_monitor['AlarmInput'] ?>" size="20" class="form"></td></tr>
|
|
|
|
<tr><td align="left" class="text"><?= $zmSlangX10OutputAlarmString ?></td><td align="left" class="text"><input type="text" name="new_x10_monitor[AlarmOutput]" value="<?= $new_x10_monitor['AlarmOutput'] ?>" size="20" class="form"></td></tr>
|
2003-09-23 17:52:45 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
case 'misc' :
|
|
|
|
{
|
2003-09-23 17:52:45 +08:00
|
|
|
?>
|
2004-09-25 22:33:28 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangEventPrefix ?></td><td align="left" class="text"><input type="text" name="new_monitor[EventPrefix]" value="<?= $new_monitor['EventPrefix'] ?>" size="24" class="form"></td></tr>
|
2006-01-01 01:21:45 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangSectionlength ?></td><td align="left" class="text"><input type="text" name="new_monitor[SectionLength]" value="<?= $new_monitor['SectionLength'] ?>" size="6" class="form"></td></tr>
|
|
|
|
<tr><td align="left" class="text"><?= $zmSlangFrameSkip ?></td><td align="left" class="text"><input type="text" name="new_monitor[FrameSkip]" value="<?= $new_monitor['FrameSkip'] ?>" size="6" class="form"></td></tr>
|
2004-01-08 18:09:35 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangFPSReportInterval ?></td><td align="left" class="text"><input type="text" name="new_monitor[FPSReportInterval]" value="<?= $new_monitor['FPSReportInterval'] ?>" size="6" class="form"></td></tr>
|
2005-11-22 19:21:27 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangDefaultRate ?></td><td align="left" class="text"><?= buildSelect( "new_monitor[DefaultRate]", $rates ); ?></td></tr>
|
2005-10-20 00:52:28 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangDefaultScale ?></td><td align="left" class="text"><?= buildSelect( "new_monitor[DefaultScale]", $scales ); ?></td></tr>
|
2005-10-17 05:24:52 +08:00
|
|
|
<tr><td align="left" class="text"><?= $zmSlangWebColour ?></td><td align="left" class="text"><input type="text" name="new_monitor[WebColour]" value="<?= $new_monitor['WebColour'] ?>" size="10" class="form" onChange="document.getElementById('Swatch').style.backgroundColor=this.value"> <span id="Swatch" style="background-color: <?= $new_monitor['WebColour'] ?>; border: 1px solid black; width: 20px; height: 10px; padding: 0px;"> </span></td></tr>
|
2003-09-23 17:52:45 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
break;
|
2003-09-23 17:52:45 +08:00
|
|
|
}
|
2004-01-08 19:45:57 +08:00
|
|
|
}
|
2003-09-23 17:52:45 +08:00
|
|
|
?>
|
2003-07-11 17:27:56 +08:00
|
|
|
<tr><td colspan="2" align="left" class="text"> </td></tr>
|
2006-01-01 02:08:07 +08:00
|
|
|
<tr style="height: 100%; vertical-align: bottom;">
|
2004-01-07 20:57:07 +08:00
|
|
|
<td colspan="2" align="right"><input type="submit" value="<?= $zmSlangSave ?>" class="form"<?php if ( !canEdit( 'Monitors' ) ) { ?> disabled<?php } ?>> <input type="button" value="<?= $zmSlangCancel ?>" class="form" onClick="closeWindow()"></td>
|
2003-07-11 17:27:56 +08:00
|
|
|
</tr>
|
|
|
|
</table>
|
2006-01-01 02:08:07 +08:00
|
|
|
</form>
|
2003-07-11 17:27:56 +08:00
|
|
|
</body>
|
|
|
|
</html>
|