2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
//
|
|
|
|
// ZoneMinder web frames view file, $Date$, $Revision$
|
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
|
|
|
//
|
|
|
|
|
2016-11-22 01:28:15 +08:00
|
|
|
if ( !canView( 'Events' ) ) {
|
|
|
|
$view = 'error';
|
2008-07-14 21:54:50 +08:00
|
|
|
return;
|
|
|
|
}
|
2016-11-22 01:28:15 +08:00
|
|
|
require_once( 'includes/Frame.php' );
|
|
|
|
$Event = new Event( $_REQUEST['eid'] );
|
2008-07-14 21:54:50 +08:00
|
|
|
|
2013-12-18 01:53:15 +08:00
|
|
|
$sql = 'SELECT *, unix_timestamp( TimeStamp ) AS UnixTimeStamp FROM Frames WHERE EventID = ? ORDER BY FrameId';
|
2014-03-22 05:16:56 +08:00
|
|
|
$frames = dbFetchAll( $sql, NULL, array( $_REQUEST['eid'] ) );
|
2008-07-14 21:54:50 +08:00
|
|
|
|
|
|
|
$focusWindow = true;
|
|
|
|
|
2016-11-22 01:28:15 +08:00
|
|
|
xhtmlHeaders(__FILE__, translate('Frames')." - ".$Event->Id() );
|
2008-07-14 21:54:50 +08:00
|
|
|
?>
|
|
|
|
<body>
|
|
|
|
<div id="page">
|
|
|
|
<div id="header">
|
2015-05-10 21:10:30 +08:00
|
|
|
<div id="headerButtons"><a href="#" onclick="closeWindow();"><?php echo translate('Close') ?></a></div>
|
2016-11-22 01:28:15 +08:00
|
|
|
<h2><?php echo translate('Frames') ?> - <?php echo $Event->Id() ?></h2>
|
2008-07-14 21:54:50 +08:00
|
|
|
</div>
|
|
|
|
<div id="content">
|
2014-12-05 07:44:23 +08:00
|
|
|
<form name="contentForm" id="contentForm" method="get" action="<?php echo $_SERVER['PHP_SELF'] ?>">
|
2008-07-14 21:54:50 +08:00
|
|
|
<input type="hidden" name="view" value="none"/>
|
|
|
|
<table id="contentTable" class="major" cellspacing="0">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
2015-05-10 21:10:30 +08:00
|
|
|
<th class="colId"><?php echo translate('FrameId') ?></th>
|
|
|
|
<th class="colType"><?php echo translate('Type') ?></th>
|
|
|
|
<th class="colTimeStamp"><?php echo translate('TimeStamp') ?></th>
|
|
|
|
<th class="colTimeDelta"><?php echo translate('TimeDelta') ?></th>
|
|
|
|
<th class="colScore"><?php echo translate('Score') ?></th>
|
2016-11-22 01:28:15 +08:00
|
|
|
<?php
|
|
|
|
if ( ZM_WEB_LIST_THUMBS ) {
|
|
|
|
?>
|
|
|
|
<th class="colThumbnail"><?php echo translate('Thumbnail') ?></th>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
2008-07-14 21:54:50 +08:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<?php
|
2016-11-22 01:28:15 +08:00
|
|
|
if ( count($frames) ) {
|
|
|
|
foreach ( $frames as $frame ) {
|
|
|
|
$Frame = new Frame( $frame );
|
|
|
|
|
2008-07-14 21:54:50 +08:00
|
|
|
$class = strtolower($frame['Type']);
|
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
<tr class="<?php echo $class ?>">
|
2016-11-22 01:28:15 +08:00
|
|
|
<td class="colId"><?php echo makePopupLink( '?view=frame&eid='.$Event->Id().'&fid='.$frame['FrameId'], 'zmImage', array( 'frame', $Event->Width(), $Event->Height() ), $frame['FrameId'] ) ?></td>
|
2014-12-05 07:44:23 +08:00
|
|
|
<td class="colType"><?php echo $frame['Type'] ?></td>
|
|
|
|
<td class="colTimeStamp"><?php echo strftime( STRF_FMT_TIME, $frame['UnixTimeStamp'] ) ?></td>
|
|
|
|
<td class="colTimeDelta"><?php echo number_format( $frame['Delta'], 2 ) ?></td>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
if ( ZM_RECORD_EVENT_STATS && ($frame['Type'] == 'Alarm') )
|
|
|
|
{
|
|
|
|
?>
|
2016-11-22 01:28:15 +08:00
|
|
|
<td class="colScore"><?php echo makePopupLink( '?view=stats&eid='.$Event->Id().'&fid='.$frame['FrameId'], 'zmStats', 'stats', $frame['Score'] ) ?></td>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
?>
|
2014-12-05 07:44:23 +08:00
|
|
|
<td class="colScore"><?php echo $frame['Score'] ?></td>
|
2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
}
|
2016-11-22 01:28:15 +08:00
|
|
|
if ( ZM_WEB_LIST_THUMBS ) {
|
|
|
|
?>
|
|
|
|
<td class="colThumbnail"><?php echo makePopupLink( '?view=frame&eid='.$Event->Id().'&fid='.$frame['FrameId'], 'zmImage', array( 'image', $Event->Width(), $Event->Height() ), '<img src="?view=image&fid='.$Frame->Id().'&'.
|
|
|
|
(ZM_WEB_LIST_THUMB_WIDTH?'width='.ZM_WEB_LIST_THUMB_WIDTH.'&':'').
|
|
|
|
(ZM_WEB_LIST_THUMB_HEIGHT?'height='.ZM_WEB_LIST_THUMB_HEIGHT.'&':'').'filename='.$Event->MonitorId().'_'.$frame['EventId'].'_'.$frame['FrameId'].'.jpg" '.
|
|
|
|
(ZM_WEB_LIST_THUMB_WIDTH?'width="'.ZM_WEB_LIST_THUMB_WIDTH.'" ':'').
|
|
|
|
(ZM_WEB_LIST_THUMB_HEIGHT?'height="'.ZM_WEB_LIST_THUMB_HEIGHT.'" ':'').'alt="'.$frame['FrameId'].'"/>' ) ?></td>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
2008-07-14 21:54:50 +08:00
|
|
|
</tr>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
?>
|
|
|
|
<tr>
|
2015-05-10 21:10:30 +08:00
|
|
|
<td colspan="5"><?php echo translate('NoFramesRecorded') ?></td>
|
2008-07-14 21:54:50 +08:00
|
|
|
</tr>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<div id="contentButtons">
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|