Bug 213 - Correct invalid console behaviour when not running.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1620 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
7db02dea5a
commit
0e592f6a8f
|
@ -126,7 +126,7 @@ if ( isset($action) )
|
|||
$filter_parms[] = "sort_asc=$sort_asc";
|
||||
$filter_parms[] = "limit=$limit";
|
||||
$filter_query_string = join( '&', $filter_parms );
|
||||
simpleQuery( "replace into Filters set Name = '$filter_name', Query = '$filter_query_string', AutoArchive = '$auto_archive', AutoVideo = '$auto_video', AutoUpload = '$auto_upload', AutoEmail = '$auto_email', AutoMessage = '$auto_message', AutoExecute = '$auto_execute', AutoDelete = '$auto_delete'" );
|
||||
simpleQuery( "replace into Filters set Name = '$filter_name', Query = '$filter_query_string', AutoArchive = '$auto_archive', AutoVideo = '$auto_video', AutoUpload = '$auto_upload', AutoEmail = '$auto_email', AutoMessage = '$auto_message', AutoExecute = '$auto_execute', AutoDelete = '$auto_delete'" );
|
||||
$refresh_parent = true;
|
||||
}
|
||||
}
|
||||
|
@ -994,8 +994,11 @@ if ( isset($action) )
|
|||
|
||||
$monitor['Function'] = $new_function;
|
||||
if ( $cookies ) session_write_close();
|
||||
zmcControl( $monitor, true );
|
||||
zmaControl( $monitor, true );
|
||||
if ( daemonCheck() )
|
||||
{
|
||||
zmcControl( $monitor, true );
|
||||
zmaControl( $monitor, true );
|
||||
}
|
||||
$refresh_parent = true;
|
||||
}
|
||||
}
|
||||
|
@ -1035,7 +1038,10 @@ if ( isset($action) )
|
|||
//echo "<html>$sql</html>";
|
||||
simpleQuery( $sql );
|
||||
if ( $cookies ) session_write_close();
|
||||
zmaControl( $mid, true );
|
||||
if ( daemonCheck() )
|
||||
{
|
||||
zmaControl( $mid, true );
|
||||
}
|
||||
$refresh_parent = true;
|
||||
}
|
||||
}
|
||||
|
@ -1157,8 +1163,11 @@ if ( isset($action) )
|
|||
$monitor = mysql_fetch_assoc( $result );
|
||||
fixDevices();
|
||||
if ( $cookies ) session_write_close();
|
||||
zmcControl( $monitor, true );
|
||||
zmaControl( $monitor, true );
|
||||
if ( daemonCheck() )
|
||||
{
|
||||
zmcControl( $monitor, true );
|
||||
zmaControl( $monitor, true );
|
||||
}
|
||||
//daemonControl( 'restart', 'zmwatch.pl' );
|
||||
$refresh_parent = true;
|
||||
}
|
||||
|
@ -1201,7 +1210,10 @@ if ( isset($action) )
|
|||
if ( $deleted_zid )
|
||||
{
|
||||
if ( $cookies ) session_write_close();
|
||||
zmaControl( $mid, true );
|
||||
if ( daemonCheck() )
|
||||
{
|
||||
zmaControl( $mid, true );
|
||||
}
|
||||
$refresh_parent = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -584,9 +584,16 @@ function daemonStatus( $daemon, $args=false )
|
|||
{
|
||||
global $daemon_status;
|
||||
|
||||
initDaemonStatus();
|
||||
if ( daemonCheck() )
|
||||
{
|
||||
initDaemonStatus();
|
||||
}
|
||||
else
|
||||
{
|
||||
$daemon_status = "";
|
||||
}
|
||||
|
||||
$string .= "$daemon";
|
||||
$string = "$daemon";
|
||||
if ( $args )
|
||||
$string .= " $args";
|
||||
return( strpos( $daemon_status, "'$string' running" ) !== false );
|
||||
|
|
|
@ -245,7 +245,7 @@ else
|
|||
if ( canView( 'Stream' ) && $cycle_count > 1 )
|
||||
{
|
||||
?>
|
||||
<a href="javascript: newWindow( '<?= $PHP_SELF ?>?view=cycle&group=<?= $cgroup ?>', 'zmCycle<?= $cgroup ?>', <?= $montage_width+$jws['cycle']['w'] ?>, <?= $montage_height+$jws['cycle']['h'] ?> );"><?= $zmSlangCycle ?></a> / <a href="javascript: newWindow( '<?= $PHP_SELF ?>?view=montage&group=<?= $cgroup ?>', 'zmMontage<?= $cgroup ?>', <?= ($montage_cols*$montage_width)+$jws['montage']['w'] ?>, <?= ($montage_rows*((ZM_WEB_COMPACT_MONTAGE?4:40)+$montage_height))+$jws['montage']['h'] ?> );"><?= $zmSlangMontage ?></a>
|
||||
<?= makeLink( "javascript: newWindow( '$PHP_SELF?view=cycle&group=$cgroup', 'zmCycle$cgroup', ".($montage_width+$jws['cycle']['w']).", ".($montage_height+$jws['cycle']['h'])." );", $zmSlangCycle, $running ) ?> / <?= makeLink( "javascript: newWindow( '$PHP_SELF?view=montage&group=$cgroup', 'zmMontage$cgroup', ".(($montage_cols*$montage_width)+$jws['montage']['w']).", ".(($montage_rows*((ZM_WEB_COMPACT_MONTAGE?4:40)+$montage_height))+$jws['montage']['h'])." );", $zmSlangMontage, $running ) ?>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
|
@ -337,7 +337,7 @@ foreach( $monitors as $monitor )
|
|||
}
|
||||
$scale = max( reScale( SCALE_SCALE, $monitor['DefaultScale'], ZM_WEB_DEFAULT_SCALE ), SCALE_SCALE );
|
||||
?>
|
||||
<td align="left" class="text"><?= makeLink( "javascript: newWindow( '$PHP_SELF?view=watch&mid=".$monitor['Id']."', 'zmWatch".$monitor['Id']."', ".(reScale( $monitor['Width'], $scale )+$jws['watch']['w']).", ".(reScale( $monitor['Height'], $scale )+$jws['watch']['h'])." );", $monitor['Name'], ($monitor['Function'] != 'None') && canView( 'Stream' ) ) ?></td>
|
||||
<td align="left" class="text"><?= makeLink( "javascript: newWindow( '$PHP_SELF?view=watch&mid=".$monitor['Id']."', 'zmWatch".$monitor['Id']."', ".(reScale( $monitor['Width'], $scale )+$jws['watch']['w']).", ".(reScale( $monitor['Height'], $scale )+$jws['watch']['h'])." );", $monitor['Name'], $running && ($monitor['Function'] != 'None') && canView( 'Stream' ) ) ?></td>
|
||||
<td align="left" class="text"><?= makeLink( "javascript: newWindow( '$PHP_SELF?view=function&mid=".$monitor['Id']."', 'zmFunction', ".$jws['function']['w'].", ".$jws['function']['h']." );", "<span class=\"$fclass\">".$monitor['Function']."</span>", canEdit( 'Monitors' ) ) ?></td>
|
||||
<?php if ( $monitor['Type'] == "Local" ) { ?>
|
||||
<td align="left" class="text"><?= makeLink( "javascript: newWindow( '$PHP_SELF?view=monitor&mid=".$monitor['Id']."', 'zmMonitor', ".$jws['monitor']['w'].", ".$jws['monitor']['h']." );", "<span class=\"$dclass\">".$monitor['Device']." (".$monitor['Channel'].")</span>", canEdit( 'Monitors' ) ) ?></td>
|
||||
|
|
|
@ -116,7 +116,7 @@ foreach( $monitors as $monitor )
|
|||
$fclass .= "em";
|
||||
}
|
||||
?>
|
||||
<td align="left" style="width: 6em"><?= makeLink( "$PHP_SELF?view=watch&mid=".$monitor['Id'], substr( $monitor['Name'], 0, 8 ), ($monitor['Function'] != 'None') && canView( 'Stream' ) ) ?></td>
|
||||
<td align="left" style="width: 6em"><?= makeLink( "$PHP_SELF?view=watch&mid=".$monitor['Id'], substr( $monitor['Name'], 0, 8 ), $running && ($monitor['Function'] != 'None') && canView( 'Stream' ) ) ?></td>
|
||||
<td align="left" style="width: 4em"><?= makeLink( "$PHP_SELF?view=function&mid=".$monitor['Id'], "<span class=\"$fclass\">".substr( $monitor['Function'], 0, 4 )."</span>", canEdit( 'Monitors' ) ) ?></td>
|
||||
<td align="right" style="width: 3em"><?= makeLink( "$PHP_SELF?view=events&page=1&filter=1&trms=3&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&op2=%3d&val2=0&cnj3=and&attr3=DateTime&op3=%3e%3d&val3=-1%20hour", $monitor['HourEventCount'], canView( 'Events' ) ) ?></td>
|
||||
<td align="right" style="width: 3em"><?= makeLink( "$PHP_SELF?view=events&page=1&filter=1&trms=3&attr1=MonitorId&op1=%3d&val1=".$monitor['Id']."&cnj2=and&attr2=Archived&op2=%3d&val2=0&cnj3=and&attr3=Date&op3=%3e%3d&val3=today", $monitor['TodayEventCount'], canView( 'Events' ) ) ?></td>
|
||||
|
@ -126,7 +126,7 @@ foreach( $monitors as $monitor )
|
|||
?>
|
||||
<tr>
|
||||
<td align="left"> </td>
|
||||
<td align="center"><?= makeLink( "$PHP_SELF?view=montage", count($monitors), ( canView( 'Stream' ) && $cycle_count > 1 ) ) ?></td>
|
||||
<td align="center"><?= makeLink( "$PHP_SELF?view=montage", count($monitors), ( $running && canView( 'Stream' ) && $cycle_count > 1 ) ) ?></td>
|
||||
<td align="right" class="text"><?= makeLink( "$PHP_SELF?view=events&page=1&filter=1&trms=2&attr1=Archived&op1=%3d&val1=0&cnj2=and&attr2=DateTime&op2=%3e%3d&val2=-1%20hour", $hour_event_count, canView( 'Events' ) ) ?></td>
|
||||
<td align="right" class="text"><?= makeLink( "$PHP_SELF?view=events&page=1&filter=1&trms=2&attr1=Archived&op1=%3d&val1=0&cnj2=and&attr2=Date&op2=%3e%3d&val2=today", $today_event_count, canView( 'Events' ) ) ?></td>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in New Issue