2014-11-01 02:46:37 +08:00
|
|
|
<?php
|
|
|
|
//
|
|
|
|
// ZoneMinder web console file, $Date$, $Revision$
|
|
|
|
// Copyright (C) 2001-2008 Philip Coombes
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
|
|
|
|
$group = NULL;
|
|
|
|
if ( ! empty($_COOKIE['zmGroup']) ) {
|
|
|
|
if ( $group = dbFetchOne( 'select * from Groups where Id = ?', NULL, array($_COOKIE['zmGroup'])) )
|
|
|
|
$groupIds = array_flip(explode( ',', $group['MonitorIds'] ));
|
|
|
|
}
|
|
|
|
|
|
|
|
$monitors = dbFetchAll( "select * from Monitors order by Sequence asc" );
|
|
|
|
$displayMonitors = array();
|
|
|
|
for ( $i = 0; $i < count($monitors); $i++ )
|
|
|
|
{
|
|
|
|
if ( !visibleMonitor( $monitors[$i]['Id'] ) )
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
if ( $group && !empty($groupIds) && !array_key_exists( $monitors[$i]['Id'], $groupIds ) )
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
$monitors[$i]['Show'] = true;
|
|
|
|
$monitors[$i]['zmc'] = zmcStatus( $monitors[$i] );
|
|
|
|
$monitors[$i]['zma'] = zmaStatus( $monitors[$i] );
|
|
|
|
$displayMonitors[] = $monitors[$i];
|
|
|
|
}
|
|
|
|
|
|
|
|
$versionClass = (ZM_DYN_DB_VERSION&&(ZM_DYN_DB_VERSION!=ZM_VERSION))?'errorText':'';
|
|
|
|
|
|
|
|
xhtmlHeaders( __FILE__, $SLANG['Console'] );
|
|
|
|
?>
|
|
|
|
<body>
|
2014-11-16 00:34:45 +08:00
|
|
|
<?php include("header.php"); ?>
|
|
|
|
|
2014-11-01 02:46:37 +08:00
|
|
|
<form name="monitorForm" method="get" action="<?= $_SERVER['PHP_SELF'] ?>">
|
|
|
|
<input type="hidden" name="view" value="<?= $view ?>"/>
|
|
|
|
<input type="hidden" name="action" value=""/>
|
2014-11-01 23:39:11 +08:00
|
|
|
|
2014-11-01 04:55:19 +08:00
|
|
|
<div id="content" class="container-fluid">
|
2014-11-01 23:26:19 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-2"><?php include("sidebar.php"); ?></div>
|
|
|
|
|
|
|
|
<div class="col-md-10">
|
2014-11-19 23:53:07 +08:00
|
|
|
|
|
|
|
<div ng-controller="ConsoleController">
|
|
|
|
<div class="row">
|
|
|
|
<?php foreach( $displayMonitors as $monitor ) {
|
2014-11-01 02:46:37 +08:00
|
|
|
if ( !$monitor['zmc'] )
|
2014-11-19 23:53:07 +08:00
|
|
|
$dclass = "danger";
|
2014-11-01 02:46:37 +08:00
|
|
|
else
|
|
|
|
{
|
|
|
|
if ( !$monitor['zma'] )
|
2014-11-19 23:53:07 +08:00
|
|
|
$dclass = "warning";
|
2014-11-01 02:46:37 +08:00
|
|
|
else
|
2014-11-19 23:53:07 +08:00
|
|
|
$dclass = "info";
|
2014-11-01 02:46:37 +08:00
|
|
|
}
|
|
|
|
?>
|
2014-11-19 23:53:07 +08:00
|
|
|
<div class="col-md-3">
|
|
|
|
<div class="panel panel-<?= $dclass ?>">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<input class="pull-right btn btn-default" type="checkbox" name="markMids[]" value="<?= $monitor['Id'] ?>" onclick="setButtonStates( this )"<?php if ( !canEdit( 'Monitors' ) ) { ?> disabled="disabled"<?php } ?>/>
|
|
|
|
<h2 class="text-left panel-title"><?= $monitor['Name'] ?> <small>(<?= $monitor['Id'] ?>)</small></h2>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="panel-body center-block">
|
2014-11-20 21:47:41 +08:00
|
|
|
<div>
|
|
|
|
<?php
|
2014-11-26 01:56:54 +08:00
|
|
|
$scale = 50;
|
|
|
|
$streamSrc = getStreamSrc( array( "mode=single", "monitor=".$monitor['Id'], "scale=".$scale ) );
|
2014-11-26 01:45:47 +08:00
|
|
|
outputImageStill( "liveStream".$monitor['Id'], $streamSrc, reScale( $monitor['Width'], $scale ), reScale( $monitor['Height'], $scale ), $monitor['Name'] );
|
2014-11-20 21:47:41 +08:00
|
|
|
?>
|
|
|
|
</div>
|
2014-11-19 23:53:07 +08:00
|
|
|
|
|
|
|
<p><span ng-bind="Counts<?= $monitor['Id'] ?>"></span> recent events</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-11-01 02:46:37 +08:00
|
|
|
<?php } ?>
|
2014-11-19 23:53:07 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-11-01 23:26:19 +08:00
|
|
|
</div> <!-- End .col-md-10 -->
|
|
|
|
|
|
|
|
|
|
|
|
</div> <!-- End .row -->
|
|
|
|
</div> <!-- End #content .container-fluid -->
|
2014-11-01 02:46:37 +08:00
|
|
|
</form>
|
2014-11-19 23:53:07 +08:00
|
|
|
<?php include("footer.php"); ?>
|
2014-11-01 02:46:37 +08:00
|
|
|
</body>
|
|
|
|
</html>
|