Fixed bugs in display and configuration of triggers.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@699 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2003-12-11 15:18:27 +00:00
parent cf8ac09aef
commit e070dcebd1
2 changed files with 3 additions and 3 deletions

View File

@ -279,14 +279,14 @@ if ( $action )
{
if ( $mid > 0 )
{
$sql = "update TriggersX10 set ".implode( ", ", $changes )." where MonitorId = '$mid'";
$sql = "update TriggersX10 set ".implode( ", ", $x10_changes )." where MonitorId = '$mid'";
$result = mysql_query( $sql );
if ( !$result )
die( mysql_error() );
}
elseif ( !$user[MonitorIds] )
{
$sql = "insert into TriggersX10 set MonitorId = '$mid', ".implode( ", ", $changes );
$sql = "insert into TriggersX10 set MonitorId = '$mid', ".implode( ", ", $x10_changes );
$result = mysql_query( $sql );
if ( !$result )
die( mysql_error() );

View File

@ -249,7 +249,7 @@ function closeWindow()
if ( $opt_count && ($opt_count%$break_count == 0) )
echo "</br>";
?>
<input type="checkbox" name="new_monitor[Triggers][]" value="<?= $opt_trigger ?>" class="form-noborder"<?php if ( in_array( $opt_trigger, split( ",", $new_monitor['Triggers'] ) ) ) { ?> checked<?php } ?>><?= $opt_trigger ?>
<input type="checkbox" name="new_monitor[Triggers][]" value="<?= $opt_trigger ?>" class="form-noborder"<?php if ( $new_monitor['Triggers'] && in_array( $opt_trigger, $new_monitor['Triggers'] ) ) { ?> checked<?php } ?>><?= $opt_trigger ?>
<?php
$opt_count ++;
}