2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
//
|
2020-04-10 23:16:11 +08:00
|
|
|
// ZoneMinder web watch feed view file
|
2008-07-25 17:48:16 +08:00
|
|
|
// Copyright (C) 2001-2008 Philip Coombes
|
2008-07-14 21:54:50 +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
|
2016-12-26 23:23:16 +08:00
|
|
|
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2008-07-14 21:54:50 +08:00
|
|
|
//
|
|
|
|
|
2021-12-11 04:34:35 +08:00
|
|
|
if (!canView('Stream')) {
|
2016-09-27 08:09:09 +08:00
|
|
|
$view = 'error';
|
|
|
|
return;
|
2008-07-14 21:54:50 +08:00
|
|
|
}
|
2021-12-11 04:34:35 +08:00
|
|
|
require_once('includes/Monitor.php');
|
|
|
|
|
|
|
|
ob_start();
|
|
|
|
include('_monitor_filters.php');
|
|
|
|
$filterbar = ob_get_contents();
|
|
|
|
ob_end_clean();
|
2015-12-02 03:30:24 +08:00
|
|
|
|
2017-11-02 01:08:01 +08:00
|
|
|
|
2015-12-02 03:30:24 +08:00
|
|
|
// This is for input sanitation
|
2021-12-11 04:34:35 +08:00
|
|
|
$mid = isset($_REQUEST['mid']) ? intval($_REQUEST['mid']) : 0;
|
|
|
|
|
|
|
|
$widths = array(
|
|
|
|
'auto' => translate('auto'),
|
|
|
|
'100%' => '100%',
|
|
|
|
'160px' => '160px',
|
|
|
|
'320px' => '320px',
|
|
|
|
'352px' => '352px',
|
|
|
|
'640px' => '640px',
|
|
|
|
'1280px' => '1280px',
|
|
|
|
'1920px' => '1920px'
|
|
|
|
);
|
|
|
|
|
|
|
|
$heights = array(
|
|
|
|
'auto' => translate('auto'),
|
|
|
|
'240px' => '240px',
|
|
|
|
'480px' => '480px',
|
|
|
|
'720px' => '720px',
|
|
|
|
'1080px' => '1080px',
|
|
|
|
);
|
|
|
|
|
|
|
|
$monitors = array();
|
|
|
|
$monitor_index = 0;
|
|
|
|
foreach ($displayMonitors as &$row) {
|
|
|
|
if ($row['Function'] == 'None') continue;
|
|
|
|
if ($mid and ($row['Id'] == $mid)) $monitor_index = count($monitors);
|
|
|
|
$monitors[] = new ZM\Monitor($row);
|
|
|
|
if (!isset($widths[$row['Width'].'px'])) {
|
|
|
|
$widths[$row['Width'].'px'] = $row['Width'].'px';
|
|
|
|
}
|
|
|
|
if (!isset($heights[$row['Height'].'px'])) {
|
|
|
|
$heights[$row['Height'].'px'] = $row['Height'].'px';
|
|
|
|
}
|
|
|
|
unset($row);
|
|
|
|
} # end foreach Monitor
|
|
|
|
|
|
|
|
if (!$mid) {
|
|
|
|
$mid = $monitors[0]->Id();
|
|
|
|
$monitor_index = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!visibleMonitor($mid)) {
|
2016-09-27 22:05:16 +08:00
|
|
|
$view = 'error';
|
|
|
|
return;
|
2014-12-12 22:32:03 +08:00
|
|
|
}
|
2008-07-14 21:54:50 +08:00
|
|
|
|
2019-02-22 22:19:07 +08:00
|
|
|
$monitor = new ZM\Monitor($mid);
|
2021-12-11 04:34:35 +08:00
|
|
|
$nextMid = ($monitor_index == count($monitors)-1) ? $monitors[0]->Id() : $monitors[$monitor_index+1]->Id();
|
|
|
|
$cycle = isset($_REQUEST['cycle']) and ($_REQUEST['cycle'] == 'true');
|
|
|
|
$showCycle = $cycle;
|
|
|
|
if (isset($_COOKIE['zmCycleShow'])) {
|
|
|
|
$showCycle = $_COOKIE['zmCycleShow'] == 'true';
|
|
|
|
}
|
2017-05-19 09:48:21 +08:00
|
|
|
#Whether to show the controls button
|
2018-04-27 05:18:36 +08:00
|
|
|
$showPtzControls = ( ZM_OPT_CONTROL && $monitor->Controllable() && canView('Control') && $monitor->Type() != 'WebSite' );
|
2008-07-14 21:54:50 +08:00
|
|
|
|
2021-12-11 04:34:35 +08:00
|
|
|
$options = array();
|
2021-12-17 05:38:15 +08:00
|
|
|
if (!empty($_REQUEST['mode']) and ($_REQUEST['mode']=='still' or $_REQUEST['mode']=='stream')) {
|
|
|
|
$options['mode'] = validHtmlStr($_REQUEST['mode']);
|
|
|
|
} else if (isset($_COOKIE['zmWatchMode'])) {
|
|
|
|
$options['mode'] = $_COOKIE['zmWatchMode'];
|
|
|
|
} else {
|
2021-12-11 04:34:35 +08:00
|
|
|
$options['mode'] = canStream() ? 'stream' : 'still';
|
2021-12-17 05:38:15 +08:00
|
|
|
}
|
|
|
|
if (!empty($_REQUEST['maxfps']) and validFloat($_REQUEST['maxfps']) and ($_REQUEST['maxfps']>0)) {
|
|
|
|
$options['maxfps'] = validHtmlStr($_REQUEST['maxfps']);
|
|
|
|
} else if (isset($_COOKIE['zmWatchRate'])) {
|
|
|
|
$options['maxfps'] = $_COOKIE['zmWatchRate'];
|
2021-12-11 04:34:35 +08:00
|
|
|
} else {
|
2021-12-17 05:38:15 +08:00
|
|
|
$options['maxfps'] = ''; // unlimited
|
2021-12-11 04:34:35 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
$period = ZM_WEB_REFRESH_CYCLE;
|
|
|
|
if (isset($_REQUEST['period'])) {
|
|
|
|
$period = validInt($_REQUEST['period']);
|
|
|
|
} else if (isset($_COOKIE['zmCyclePeriod'])) {
|
|
|
|
$period = validInt($_COOKIE['zmCyclePeriod']);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (isset($_REQUEST['scale'])) {
|
2016-09-27 21:46:04 +08:00
|
|
|
$scale = validInt($_REQUEST['scale']);
|
2018-06-26 02:50:54 +08:00
|
|
|
} else if ( isset($_COOKIE['zmWatchScale'.$mid]) ) {
|
2016-09-27 21:46:04 +08:00
|
|
|
$scale = $_COOKIE['zmWatchScale'.$mid];
|
|
|
|
} else {
|
2020-04-30 04:35:20 +08:00
|
|
|
$scale = $monitor->DefaultScale();
|
2016-09-27 21:46:04 +08:00
|
|
|
}
|
2021-12-11 04:34:35 +08:00
|
|
|
$options['scale'] = $scale;
|
2008-07-14 21:54:50 +08:00
|
|
|
|
2021-12-11 04:34:35 +08:00
|
|
|
if (isset($_REQUEST['width'])) {
|
|
|
|
$options['width'] = validInt($_REQUEST['width']);
|
|
|
|
} else if ( isset($_COOKIE['zmCycleWidth']) and $_COOKIE['zmCycleWidth'] ) {
|
2021-12-17 05:38:15 +08:00
|
|
|
$options['width'] = $_COOKIE['zmCycleWidth'];
|
2021-12-11 04:34:35 +08:00
|
|
|
} else {
|
|
|
|
$options['width'] = '';
|
|
|
|
}
|
|
|
|
if (isset($_REQUEST['height'])) {
|
|
|
|
$options['height'] =validInt($_REQUEST['height']);
|
|
|
|
} else if (isset($_COOKIE['zmCycleHeight']) and $_COOKIE['zmCycleHeight']) {
|
2021-12-17 05:38:15 +08:00
|
|
|
$options['height'] = $_COOKIE['zmCycleHeight'];
|
2021-12-11 04:34:35 +08:00
|
|
|
} else {
|
|
|
|
$options['height'] = '';
|
|
|
|
}
|
2008-07-14 21:54:50 +08:00
|
|
|
|
2021-12-11 04:34:35 +08:00
|
|
|
$connkey = generateConnKey();
|
2022-01-12 11:19:58 +08:00
|
|
|
if ( $monitor->JanusEnabled() ) {
|
|
|
|
$streamMode = 'janus';
|
|
|
|
} else {
|
|
|
|
$streamMode = getStreamMode();
|
|
|
|
}
|
2008-12-06 02:46:32 +08:00
|
|
|
|
2020-04-10 23:16:11 +08:00
|
|
|
noCacheHeaders();
|
2019-09-20 02:57:17 +08:00
|
|
|
xhtmlHeaders(__FILE__, $monitor->Name().' - '.translate('Feed'));
|
2008-07-14 21:54:50 +08:00
|
|
|
?>
|
|
|
|
<body>
|
2020-10-16 21:08:23 +08:00
|
|
|
<?php echo getNavBarHTML() ?>
|
2021-12-11 04:34:35 +08:00
|
|
|
<div id="header">
|
|
|
|
<div class="controlHeader">
|
|
|
|
<form method="get">
|
|
|
|
<input type="hidden" name="view" value="watch"/>
|
|
|
|
<?php echo $filterbar ?>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
2020-10-16 21:08:23 +08:00
|
|
|
<div class="d-flex flex-row justify-content-between px-3 py-1">
|
2021-12-11 04:34:35 +08:00
|
|
|
<div id="navButtons">
|
2020-10-17 04:47:42 +08:00
|
|
|
<button type="button" id="backBtn" class="btn btn-normal" data-toggle="tooltip" data-placement="top" title="<?php echo translate('Back') ?>" disabled><i class="fa fa-arrow-left"></i></button>
|
|
|
|
<button type="button" id="refreshBtn" class="btn btn-normal" data-toggle="tooltip" data-placement="top" title="<?php echo translate('Refresh') ?>" ><i class="fa fa-refresh"></i></button>
|
|
|
|
<button type="button" id="settingsBtn" class="btn btn-normal" data-toggle="tooltip" data-placement="top" title="<?php echo translate('Settings') ?>" disabled><i class="fa fa-sliders"></i></button>
|
|
|
|
<button type="button" id="enableAlmBtn" class="btn btn-normal" data-on-click="cmdAlarm" data-toggle="tooltip" data-placement="top" title="<?php echo translate('DisableAlarms') ?>" disabled><i class="fa fa-bell"></i></button>
|
|
|
|
<button type="button" id="forceAlmBtn" class="btn btn-danger" data-on-click="cmdForce" data-toggle="tooltip" data-placement="top" title="<?php echo translate('ForceAlarm') ?>" disabled><i class="fa fa-exclamation-circle"></i></button>
|
2020-10-16 21:08:23 +08:00
|
|
|
</div>
|
2021-12-11 04:34:35 +08:00
|
|
|
<div id="headerButtons">
|
|
|
|
<!--
|
2021-12-17 05:38:15 +08:00
|
|
|
<button type="button" id="streamToggle" class="btn <?php echo $options['mode'] == 'stream' ? 'btn-primary':'btn-secondary'?>" title="<?php echo translate('Toggle Streaming/Stills')?>">
|
|
|
|
<span class="material-icons md-18">switch_video</span>
|
|
|
|
</button>
|
2021-12-11 04:34:35 +08:00
|
|
|
-->
|
|
|
|
<button type="button" id="cycleToggle" class="btn <?php echo $showCycle ? 'btn-primary':'btn-secondary'?>" title="<?php echo translate('Toggle cycle sidebar')?>">
|
|
|
|
<span class="material-icons md-18">view_carousel</span>
|
|
|
|
</button>
|
2021-12-17 05:38:15 +08:00
|
|
|
<?php
|
|
|
|
$maxfps_options = array(''=>translate('Unlimited'),
|
|
|
|
'0' => translate('Stills'),
|
|
|
|
'1' => '1 '.translate('FPS'),
|
|
|
|
'2' => '2 '.translate('FPS'),
|
|
|
|
'5' => '5 '.translate('FPS'),
|
|
|
|
'10' => '10 '.translate('FPS'),
|
|
|
|
'20' => '20 '.translate('FPS'),
|
|
|
|
);
|
|
|
|
echo htmlSelect('changeRate', $maxfps_options, $options['maxfps']);
|
|
|
|
?>
|
2020-10-16 21:08:23 +08:00
|
|
|
</div>
|
2021-12-11 04:34:35 +08:00
|
|
|
<div id="sizeControl">
|
|
|
|
<span id="widthControl">
|
|
|
|
<label><?php echo translate('Width') ?>:</label>
|
|
|
|
<?php echo htmlSelect('width', $widths, $options['width'], array('id'=>'width', 'data-on-change-this'=>'changeSize') ); ?>
|
|
|
|
</span>
|
|
|
|
<span id="heightControl">
|
|
|
|
<label><?php echo translate('Height') ?>:</label>
|
|
|
|
<?php echo htmlSelect('height', $heights, $options['height'], array('id'=>'height', 'data-on-change-this'=>'changeSize') ); ?>
|
|
|
|
</span>
|
|
|
|
<span id="scaleControl">
|
|
|
|
<label><?php echo translate('Scale') ?>:</label>
|
|
|
|
<?php echo htmlSelect('scale', $scales, $options['scale'], array('id'=>'scale', 'data-on-change-this'=>'changeScale') ); ?>
|
|
|
|
</span>
|
|
|
|
</div><!--sizeControl-->
|
|
|
|
</div><!--control header-->
|
|
|
|
</div><!--header-->
|
2019-06-28 22:28:53 +08:00
|
|
|
<?php
|
2020-05-02 06:15:19 +08:00
|
|
|
if ( $monitor->Status() != 'Connected' and $monitor->Type() != 'WebSite' ) {
|
2019-06-28 22:28:53 +08:00
|
|
|
echo '<div class="warning">Monitor is not capturing. We will be unable to provide an image</div>';
|
|
|
|
}
|
|
|
|
?>
|
2021-12-11 04:34:35 +08:00
|
|
|
<div class="container-fluid h-100">
|
|
|
|
<div class="row flex-nowrap h-100" id="content">
|
|
|
|
<nav id="sidebar" class="h-100"<?php echo $showCycle?'':' style="display:none;"'?>>
|
|
|
|
<div id="cycleButtons" class="buttons">
|
|
|
|
<?php
|
|
|
|
$seconds = translate('seconds');
|
|
|
|
$minute = translate('minute');
|
|
|
|
$minutes = translate('minutes');
|
|
|
|
$cyclePeriodOptions = array(
|
|
|
|
10 => '10 '.$seconds,
|
|
|
|
30 => '30 '.$seconds,
|
|
|
|
60 => '1 '.$minute,
|
|
|
|
120 => '2 '.$minutes,
|
|
|
|
300 => '5 '.$minutes,
|
|
|
|
);
|
|
|
|
if (!isset($cyclePeriodOptions[ZM_WEB_REFRESH_CYCLE])) {
|
|
|
|
$cyclePeriodOptions[ZM_WEB_REFRESH_CYCLE] = ZM_WEB_REFRESH_CYCLE.' '.$seconds;
|
|
|
|
}
|
|
|
|
echo htmlSelect('cyclePeriod', $cyclePeriodOptions, $period, array('id'=>'cyclePeriod'));
|
|
|
|
?>
|
|
|
|
<span id="secondsToCycle"></span><br/>
|
|
|
|
<button type="button" id="cyclePrevBtn" title="<?php echo translate('PreviousMonitor') ?>">
|
|
|
|
<i class="material-icons md-18">skip_previous</i>
|
|
|
|
</button>
|
|
|
|
<button type="button" id="cyclePauseBtn" title="<?php echo translate('PauseCycle') ?>">
|
|
|
|
<i class="material-icons md-18">pause</i>
|
|
|
|
</button>
|
|
|
|
<button type="button" id="cyclePlayBtn" title="<?php echo translate('PlayCycle') ?>">
|
|
|
|
<i class="material-icons md-18">play_arrow</i>
|
|
|
|
</button>
|
|
|
|
<button type="button" id="cycleNextBtn" title="<?php echo translate('NextMonitor') ?>">
|
|
|
|
<i class="material-icons md-18">skip_next</i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<ul class="nav nav-pills flex-column h-100">
|
2019-06-11 22:58:54 +08:00
|
|
|
<?php
|
2021-12-11 04:34:35 +08:00
|
|
|
foreach ($monitors as $m) {
|
|
|
|
echo '<li class="nav-item"><a class="nav-link'.( $m->Id() == $monitor->Id() ? ' active' : '' ).'" href="?view=watch&mid='.$m->Id().'">'.$m->Name().'</a></li>';
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
<div class="container-fluid col-sm-offset-2 h-100 pr-0">
|
|
|
|
<div id="imageFeed"
|
|
|
|
<?php
|
|
|
|
if ($streamMode == 'jpeg') {
|
2019-06-11 22:58:54 +08:00
|
|
|
echo 'title="Click to zoom, shift click to pan, ctrl click to zoom out"';
|
|
|
|
}
|
|
|
|
?>
|
2021-12-17 05:38:15 +08:00
|
|
|
><?php echo getStreamHTML($monitor, $options); ?>
|
2020-12-10 04:03:40 +08:00
|
|
|
</div>
|
2021-12-11 04:34:35 +08:00
|
|
|
<?php if ($monitor->Type() != 'WebSite') { ?>
|
|
|
|
<div id="monitorStatus">
|
|
|
|
<div id="monitorState">
|
|
|
|
<span><?php echo translate('State') ?>:<span id="stateValue"></span></span>
|
|
|
|
<span id="viewingFPS" title="<?php echo translate('Viewing FPS')?>"><span id="viewingFPSValue"></span> fps</span>
|
|
|
|
<span id="captureFPS" title="<?php echo translate('Capturing FPS')?>"><span id="captureFPSValue"></span> fps</span>
|
|
|
|
<?php if ( $monitor->Function() == 'Modect' or $monitor->Function() == 'Mocord' ) { ?>
|
|
|
|
<span id="analysisFPS" title="<?php echo translate('Analysis FPS')?>"><span id="analysisFPSValue"></span> fps</span>
|
|
|
|
<?php } ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="replayStatus"<?php echo $streamMode=="single" ? ' class="hidden"' : '' ?>>
|
|
|
|
<span id="mode"><?php echo translate('Mode') ?>: <span id="modeValue"></span></span>
|
|
|
|
<span id="rate"><?php echo translate('Rate') ?>: <span id="rateValue"></span>x</span>
|
|
|
|
<span id="delay"><?php echo translate('Delay') ?>: <span id="delayValue"></span>s</span>
|
|
|
|
<span id="level"><?php echo translate('Buffer') ?>: <span id="levelValue"></span>%</span>
|
|
|
|
<span id="zoom"><?php echo translate('Zoom') ?>: <span id="zoomValue"></span>x</span>
|
|
|
|
</div>
|
2021-12-17 05:38:15 +08:00
|
|
|
<div class="buttons" id="dvrControls">
|
2018-04-19 00:30:18 +08:00
|
|
|
<?php
|
2021-12-11 04:34:35 +08:00
|
|
|
if ($streamMode == 'jpeg') {
|
|
|
|
if ($monitor->StreamReplayBuffer() != 0) {
|
2018-04-19 00:30:18 +08:00
|
|
|
?>
|
2021-12-11 04:34:35 +08:00
|
|
|
<button type="button" id="fastRevBtn" title="<?php echo translate('Rewind') ?>" class="unavail" disabled="disabled" data-on-click-true="streamCmdFastRev">
|
|
|
|
<i class="material-icons md-18">fast_rewind</i>
|
|
|
|
</button>
|
|
|
|
<button type="button" id="slowRevBtn" title="<?php echo translate('StepBack') ?>" class="unavail" disabled="disabled" data-on-click-true="streamCmdSlowRev">
|
|
|
|
<i class="material-icons md-18">chevron_right</i>
|
|
|
|
</button>
|
2018-04-19 00:30:18 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
2021-12-11 04:34:35 +08:00
|
|
|
<button type="button" id="pauseBtn" title="<?php echo translate('Pause') ?>" class="inactive" data-on-click-true="streamCmdPause">
|
|
|
|
<i class="material-icons md-18">pause</i>
|
|
|
|
</button>
|
|
|
|
<button type="button" id="stopBtn" title="<?php echo translate('Stop') ?>" class="unavail" disabled="disabled" data-on-click-true="streamCmdStop" style="display:none;">
|
|
|
|
<i class="material-icons md-18">stop</i>
|
|
|
|
</button>
|
|
|
|
<button type="button" id="playBtn" title="<?php echo translate('Play') ?>" class="active" disabled="disabled" data-on-click-true="streamCmdPlay">
|
|
|
|
<i class="material-icons md-18">play_arrow</i>
|
|
|
|
</button>
|
2018-04-19 00:30:18 +08:00
|
|
|
<?php
|
2021-12-11 04:34:35 +08:00
|
|
|
if ($monitor->StreamReplayBuffer() != 0) {
|
2018-04-19 00:30:18 +08:00
|
|
|
?>
|
2021-12-11 04:34:35 +08:00
|
|
|
<button type="button" id="slowFwdBtn" title="<?php echo translate('StepForward') ?>" class="unavail" disabled="disabled" data-on-click-true="streamCmdSlowFwd">
|
|
|
|
<i class="material-icons md-18">chevron_right</i>
|
|
|
|
</button>
|
|
|
|
<button type="button" id="fastFwdBtn" title="<?php echo translate('FastForward') ?>" class="unavail" disabled="disabled" data-on-click-true="streamCmdFastFwd">
|
|
|
|
<i class="material-icons md-18">fast_forward</i>
|
|
|
|
</button>
|
2018-04-19 00:30:18 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
2021-12-11 04:34:35 +08:00
|
|
|
<button type="button" id="zoomOutBtn" title="<?php echo translate('ZoomOut') ?>" class="avail" data-on-click="streamCmdZoomOut">
|
|
|
|
<i class="material-icons md-18">zoom_out</i>
|
|
|
|
</button>
|
|
|
|
<button type="button" id="fullscreenBtn" title="<?php echo translate('Fullscreen') ?>" class="avail" data-on-click="watchFullscreen">
|
|
|
|
<i class="material-icons md-18">fullscreen</i>
|
|
|
|
</button>
|
2018-04-19 00:30:18 +08:00
|
|
|
<?php
|
2018-04-27 05:18:36 +08:00
|
|
|
} // end if streamMode==jpeg
|
2018-04-19 00:30:18 +08:00
|
|
|
?>
|
2021-12-11 04:34:35 +08:00
|
|
|
</div><!--dvrButtons-->
|
2018-04-27 05:18:36 +08:00
|
|
|
<?php } // end if $monitor->Type() != 'WebSite' ?>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
2016-09-27 22:05:16 +08:00
|
|
|
if ( $showPtzControls ) {
|
2019-09-20 02:57:17 +08:00
|
|
|
foreach ( getSkinIncludes('includes/control_functions.php') as $includeFile )
|
2008-07-23 00:24:36 +08:00
|
|
|
require_once $includeFile;
|
2008-07-14 21:54:50 +08:00
|
|
|
?>
|
2016-04-04 23:39:12 +08:00
|
|
|
<div id="ptzControls" class="ptzControls">
|
2019-09-20 02:57:17 +08:00
|
|
|
<?php echo ptzControls($monitor) ?>
|
2008-07-14 21:54:50 +08:00
|
|
|
</div>
|
|
|
|
<?php
|
|
|
|
}
|
2019-01-25 22:22:08 +08:00
|
|
|
if ( canView('Events') && ($monitor->Type() != 'WebSite') ) {
|
2008-07-14 21:54:50 +08:00
|
|
|
?>
|
2020-11-27 07:00:05 +08:00
|
|
|
<!-- Table styling handled by bootstrap-tables -->
|
2020-12-01 23:50:32 +08:00
|
|
|
<div id="events" class="row justify-content-center table-responsive-sm">
|
2020-11-27 07:00:05 +08:00
|
|
|
<table
|
|
|
|
id="eventList"
|
|
|
|
data-locale="<?php echo i18n() ?>"
|
|
|
|
data-side-pagination="server"
|
|
|
|
data-ajax="ajaxRequest"
|
|
|
|
data-cookie="true"
|
|
|
|
data-cookie-id-table="zmEventListTable"
|
|
|
|
data-cookie-expire="2y"
|
|
|
|
data-show-columns="true"
|
|
|
|
data-show-export="true"
|
|
|
|
data-uncheckAll="true"
|
|
|
|
data-buttons-class="btn btn-normal"
|
2020-12-03 22:38:28 +08:00
|
|
|
data-show-refresh="true"
|
2020-11-27 07:00:05 +08:00
|
|
|
class="table-sm table-borderless"
|
|
|
|
>
|
2008-07-14 21:54:50 +08:00
|
|
|
<thead>
|
2020-11-27 07:00:05 +08:00
|
|
|
<!-- Row styling is handled by bootstrap-tables -->
|
2008-07-14 21:54:50 +08:00
|
|
|
<tr>
|
2020-12-03 09:44:12 +08:00
|
|
|
<th data-sortable="false" data-field="Delete"><?php echo translate('Delete') ?></th>
|
2020-11-27 07:00:05 +08:00
|
|
|
<th data-sortable="false" data-field="Id"><?php echo translate('Id') ?></th>
|
|
|
|
<th data-sortable="false" data-field="Name"><?php echo translate('Name') ?></th>
|
|
|
|
<th data-sortable="false" data-field="StartDateTime"><?php echo translate('AttrStartTime') ?></th>
|
|
|
|
<th data-sortable="false" data-field="Length"><?php echo translate('Duration') ?></th>
|
|
|
|
<th data-sortable="false" data-field="Frames"><?php echo translate('Frames') ?></th>
|
|
|
|
<th data-sortable="false" data-field="AlarmFrames"><?php echo translate('AlarmBrFrames') ?></th>
|
|
|
|
<th data-sortable="false" data-field="AvgScore"><?php echo translate('AvgBrScore') ?></th>
|
|
|
|
<th data-sortable="false" data-field="MaxScore"><?php echo translate('MaxBrScore') ?></th>
|
2020-12-03 09:44:12 +08:00
|
|
|
<th data-sortable="false" data-field="Thumbnail"><?php echo translate('Thumbnail') ?></th>
|
2008-07-14 21:54:50 +08:00
|
|
|
</tr>
|
|
|
|
</thead>
|
2020-11-27 07:00:05 +08:00
|
|
|
|
2008-07-14 21:54:50 +08:00
|
|
|
<tbody>
|
2020-11-27 07:00:05 +08:00
|
|
|
<!-- Row data populated via Ajax -->
|
2008-07-14 21:54:50 +08:00
|
|
|
</tbody>
|
2020-11-27 07:00:05 +08:00
|
|
|
|
2008-07-14 21:54:50 +08:00
|
|
|
</table>
|
|
|
|
</div>
|
2021-12-11 04:34:35 +08:00
|
|
|
</div>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
}
|
2016-09-27 22:05:16 +08:00
|
|
|
if ( ZM_WEB_SOUND_ON_ALARM ) {
|
2008-07-14 21:54:50 +08:00
|
|
|
$soundSrc = ZM_DIR_SOUNDS.'/'.ZM_WEB_ALARM_SOUND;
|
|
|
|
?>
|
|
|
|
<div id="alarmSound" class="hidden">
|
|
|
|
<?php
|
2016-09-27 22:05:16 +08:00
|
|
|
if ( ZM_WEB_USE_OBJECT_TAGS && isWindows() ) {
|
2008-07-14 21:54:50 +08:00
|
|
|
?>
|
|
|
|
<object id="MediaPlayer" width="0" height="0"
|
|
|
|
classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
|
|
|
|
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,02,902">
|
2014-12-05 07:44:23 +08:00
|
|
|
<param name="FileName" value="<?php echo $soundSrc ?>"/>
|
2009-05-26 02:03:46 +08:00
|
|
|
<param name="autoStart" value="0"/>
|
2008-07-14 21:54:50 +08:00
|
|
|
<param name="loop" value="1"/>
|
2009-10-17 01:09:16 +08:00
|
|
|
<param name="hidden" value="1"/>
|
2008-07-14 21:54:50 +08:00
|
|
|
<param name="showControls" value="0"/>
|
2014-12-05 07:44:23 +08:00
|
|
|
<embed src="<?php echo $soundSrc ?>"
|
2008-07-14 21:54:50 +08:00
|
|
|
autostart="true"
|
|
|
|
loop="true"
|
|
|
|
hidden="true">
|
|
|
|
</embed>
|
|
|
|
</object>
|
|
|
|
<?php
|
2016-09-27 22:05:16 +08:00
|
|
|
} else {
|
2008-07-14 21:54:50 +08:00
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
<embed src="<?php echo $soundSrc ?>"
|
2008-07-14 21:54:50 +08:00
|
|
|
autostart="true"
|
|
|
|
loop="true"
|
|
|
|
hidden="true">
|
|
|
|
</embed>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-01-12 11:19:58 +08:00
|
|
|
<script src="<?php echo cache_bust('js/adapter.min.js') ?>"></script>
|
|
|
|
<script src="<?php echo cache_bust('js/janus.js') ?>"></script>
|
2020-09-03 06:14:45 +08:00
|
|
|
<?php xhtmlFooter() ?>
|