2003-07-11 17:27:56 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
//
|
|
|
|
// ZoneMinder web settings view file, $Date$, $Revision$
|
2005-02-24 22:40:14 +08:00
|
|
|
// Copyright (C) 2003, 2004, 2005 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( 'Monitors' ) )
|
|
|
|
{
|
|
|
|
$view = "error";
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
$result = mysql_query( "select * from Monitors where Id = '$mid'" );
|
|
|
|
if ( !$result )
|
|
|
|
die( mysql_error() );
|
|
|
|
$monitor = mysql_fetch_assoc( $result );
|
|
|
|
|
2005-01-19 09:50:24 +08:00
|
|
|
$zmu_command = getZmuCommand( " -m $mid -B -C -H -O" );
|
2004-09-27 00:24:05 +08:00
|
|
|
$zmu_output = exec( escapeshellcmd( $zmu_command ) );
|
|
|
|
list( $brightness, $contrast, $hue, $colour ) = split( ' ', $zmu_output );
|
|
|
|
|
|
|
|
$monitor['Brightness'] = $brightness;
|
|
|
|
$monitor['Contrast'] = $contrast;
|
|
|
|
$monitor['Hue'] = $hue;
|
|
|
|
$monitor['Colour'] = $colour;
|
|
|
|
|
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>
|
2004-01-08 18:09:35 +08:00
|
|
|
<title>ZM - <?= $monitor['Name'] ?> - <?= $zmSlangSettings ?></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();
|
|
|
|
function validateForm(Form)
|
|
|
|
{
|
|
|
|
return( true );
|
|
|
|
}
|
|
|
|
|
|
|
|
function closeWindow()
|
|
|
|
{
|
|
|
|
window.close();
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
2003-12-16 22:30:23 +08:00
|
|
|
<form name="settings_form" method="post" action="<?= $PHP_SELF ?>" onsubmit="return validateForm( document.settings_form )">
|
2003-07-11 17:27:56 +08:00
|
|
|
<input type="hidden" name="view" value="<?= $view ?>">
|
|
|
|
<input type="hidden" name="action" value="settings">
|
|
|
|
<input type="hidden" name="mid" value="<?= $mid ?>">
|
2005-01-16 01:47:44 +08:00
|
|
|
<table border="0" cellspacing="0" cellpadding="4" width="100%">
|
|
|
|
<tr>
|
|
|
|
<td colspan="2" align="left" class="head">Monitor <?= $monitor['Name'] ?> - <?= $zmSlangSettings ?></td>
|
|
|
|
</tr>
|
2003-07-11 17:27:56 +08:00
|
|
|
<tr>
|
2004-01-07 20:57:07 +08:00
|
|
|
<td align="right" class="smallhead"><?= $zmSlangParameter ?></td><td align="left" class="smallhead"><?= $zmSlangValue ?></td>
|
2003-07-11 17:27:56 +08:00
|
|
|
</tr>
|
2004-09-26 00:37:41 +08:00
|
|
|
<tr><td align="right" class="text"><?= $zmSlangBrightness ?></td><td align="left" class="text"><input type="text" name="new_brightness" value="<?= $monitor['Brightness'] ?>" size="8" class="form"<?php if ( !canEdit( 'Monitors' ) ) { ?> disabled<?php } ?>></td></tr>
|
|
|
|
<tr><td align="right" class="text"><?= $zmSlangContrast ?></td><td align="left" class="text"><input type="text" name="new_contrast" value="<?= $monitor['Contrast'] ?>" size="8" class="form"<?php if ( !canEdit( 'Monitors' ) ) { ?> disabled<?php } ?>></td></tr>
|
|
|
|
<tr><td align="right" class="text"><?= $zmSlangHue ?></td><td align="left" class="text"><input type="text" name="new_hue" value="<?= $monitor['Hue'] ?>" size="8" class="form"<?php if ( !canEdit( 'Monitors' ) ) { ?> disabled<?php } ?>></td></tr>
|
|
|
|
<tr><td align="right" class="text"><?= $zmSlangColour ?></td><td align="left" class="text"><input type="text" name="new_colour" value="<?= $monitor['Colour'] ?>" size="8" class="form"<?php if ( !canEdit( 'Monitors' ) ) { ?> disabled<?php } ?>></td></tr>
|
2003-07-11 17:27:56 +08:00
|
|
|
<tr>
|
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="<?= $zmSlangClose ?>" class="form" onClick="closeWindow()"></td>
|
2003-07-11 17:27:56 +08:00
|
|
|
</tr>
|
|
|
|
</table>
|
2005-01-16 01:47:44 +08:00
|
|
|
</form>
|
2003-07-11 17:27:56 +08:00
|
|
|
</body>
|
|
|
|
</html>
|