2008-07-14 21:54:50 +08:00
|
|
|
<?php
|
|
|
|
//
|
|
|
|
// ZoneMinder web frame 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
|
|
|
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
//
|
|
|
|
|
|
|
|
if ( !canView( 'Events' ) )
|
|
|
|
{
|
|
|
|
$_REQUEST['view'] = "error";
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2014-04-30 22:01:10 +08:00
|
|
|
$sql = 'SELECT E.*,M.Name AS MonitorName,M.DefaultScale FROM Events AS E INNER JOIN Monitors AS M ON E.MonitorId = M.Id WHERE E.Id = ?';
|
|
|
|
$event = dbFetchOne( $sql, NULL, array( $_REQUEST['eid'] ) );
|
2008-07-14 21:54:50 +08:00
|
|
|
|
|
|
|
if ( !empty($_REQUEST['fid']) )
|
|
|
|
{
|
2014-04-30 22:01:10 +08:00
|
|
|
$frame = dbFetchOne( 'SELECT * FROM Frames WHERE EventID = ? AND FrameId = ?', NULL, array( $_REQUEST['eid'], $_REQUEST['fid'] ) );
|
2008-07-14 21:54:50 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-04-30 22:01:10 +08:00
|
|
|
$frame = dbFetchOne( 'SELECT * FROM Frames WHERE EventID = ? AND Score = ?', NULL, array( $_REQUEST['eid'], $event['MaxScore'] ) );
|
2008-07-14 21:54:50 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
$maxFid = $event['Frames'];
|
|
|
|
|
|
|
|
$firstFid = 1;
|
|
|
|
$prevFid = $frame['FrameId']-1;
|
|
|
|
$nextFid = $frame['FrameId']+1;
|
|
|
|
$lastFid = $maxFid;
|
|
|
|
|
|
|
|
$scale = getDeviceScale( $event['Width'], $event['Height'], 1.1 );
|
|
|
|
|
|
|
|
$imageData = getImageSrc( $event, $frame, $scale, (isset($_REQUEST['show'])&&$_REQUEST['show']=="capt") );
|
|
|
|
|
|
|
|
xhtmlHeaders( __FILE__, $SLANG['Frame'].' - '.$_REQUEST['eid'].'-'.$frame['FrameId'] );
|
|
|
|
?>
|
|
|
|
<body>
|
|
|
|
<div id="page">
|
|
|
|
<div id="header">
|
|
|
|
<h2><?= $SLANG['Frame'] ?> <?= $_REQUEST['eid']."-".$frame['FrameId']." (".$frame['Score'].")" ?></h2>
|
|
|
|
</div>
|
|
|
|
<div id="content">
|
2010-02-23 17:12:12 +08:00
|
|
|
<?php if ( $imageData['hasAnalImage'] ) { ?><a href="?view=frame&eid=<?= $_REQUEST['eid'] ?>&fid=<?= $frame['FrameId'] ?>&show=<?= $imageData['isAnalImage']?"capt":"anal" ?>"><?php } ?><img src="<?= viewImagePath( $imageData['thumbPath'] ) ?>" class="<?= $imageData['imageClass'] ?>"/><?php if ( $imageData['hasAnalImage'] ) { ?></a><?php } ?>
|
2008-07-14 21:54:50 +08:00
|
|
|
<div id="contentButtons">
|
|
|
|
<?php if ( $frame['FrameId'] > 1 ) { ?>
|
|
|
|
<a href="?view=frame&eid=<?= $_REQUEST['eid'] ?>&fid=<?= $firstFid ?>"><<</a>
|
|
|
|
<?php } if ( $frame['FrameId'] > 1 ) { ?>
|
|
|
|
<a href="?view=frame&eid=<?= $_REQUEST['eid'] ?>&fid=<?= $prevFid ?>"><</a>
|
|
|
|
<?php } if ( $frame['FrameId'] < $maxFid ) { ?>
|
|
|
|
<a href="?view=frame&eid=<?= $_REQUEST['eid'] ?>&fid=<?= $nextFid ?>">></a>
|
|
|
|
<?php } if ( $frame['FrameId'] < $maxFid ) { ?>
|
|
|
|
<a href="?view=frame&eid=<?= $_REQUEST['eid'] ?>&fid=<?= $lastFid ?>">>></a>
|
|
|
|
<?php } ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|