|
|
|
|
@ -51,14 +51,15 @@ $lastFid = $maxFid;
|
|
|
|
|
$alarmFrame = $Frame->Type()=='Alarm';
|
|
|
|
|
|
|
|
|
|
if ( isset( $_REQUEST['scale'] ) ) {
|
|
|
|
|
$scale = $_REQUEST['scale'];
|
|
|
|
|
$scale = validNum($_REQUEST['scale']);
|
|
|
|
|
} else if ( isset( $_COOKIE['zmWatchScale'.$Monitor->Id()] ) ) {
|
|
|
|
|
$scale = $_COOKIE['zmWatchScale'.$Monitor->Id()];
|
|
|
|
|
$scale = validNum($_COOKIE['zmWatchScale'.$Monitor->Id()]);
|
|
|
|
|
} else if ( isset( $_COOKIE['zmWatchScale'] ) ) {
|
|
|
|
|
$scale = $_COOKIE['zmWatchScale'];
|
|
|
|
|
$scale = validNum($_COOKIE['zmWatchScale']);
|
|
|
|
|
} else {
|
|
|
|
|
$scale = max( reScale( SCALE_BASE, $Monitor->DefaultScale(), ZM_WEB_DEFAULT_SCALE ), SCALE_BASE );
|
|
|
|
|
}
|
|
|
|
|
$scale = $scale ?: "auto";
|
|
|
|
|
|
|
|
|
|
$imageData = $Event->getImageSrc( $frame, $scale, 0 );
|
|
|
|
|
if ( ! $imageData ) {
|
|
|
|
|
@ -67,7 +68,7 @@ if ( ! $imageData ) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$show = 'capt';
|
|
|
|
|
if ( isset($_REQUEST['show']) ) {
|
|
|
|
|
if (isset($_REQUEST['show']) && in_array($_REQUEST['show'], array('capt', 'anal'))) {
|
|
|
|
|
$show = $_REQUEST['show'];
|
|
|
|
|
} else if ( $imageData['hasAnalImage'] ) {
|
|
|
|
|
$show = 'anal';
|
|
|
|
|
@ -89,9 +90,9 @@ xhtmlHeaders(__FILE__, translate('Frame').' - '.$Event->Id()." - ".$Frame->Frame
|
|
|
|
|
<div id="headerButtons">
|
|
|
|
|
<?php if ( ZM_RECORD_EVENT_STATS && $alarmFrame ) { echo makePopupLink( '?view=stats&eid='.$Event->Id().'&fid='.$Frame->FrameId(), 'zmStats', 'stats', translate('Stats') ); } ?>
|
|
|
|
|
<?php if ( canEdit( 'Events' ) ) { ?><a href="?view=none&action=delete&markEid=<?php echo $Event->Id() ?>"><?php echo translate('Delete') ?></a><?php } ?>
|
|
|
|
|
<a href="#" onclick="closeWindow(); return( false );"><?php echo translate('Close') ?></a>
|
|
|
|
|
<a href="#" data-on-click="closeWindow"><?php echo translate('Close') ?></a>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="scaleControl"><label for="scale"><?php echo translate('Scale') ?></label><?php echo buildSelect('scale', $scales, 'changeScale();'); ?></div>
|
|
|
|
|
<div id="scaleControl"><label for="scale"><?php echo translate('Scale') ?></label><?php echo buildSelect('scale', $scales); ?></div>
|
|
|
|
|
<h2><?php echo translate('Frame') ?> <?php echo $Event->Id().'-'.$Frame->FrameId().' ('.$Frame->Score().')' ?></h2>
|
|
|
|
|
<input type="hidden" name="base_width" id="base_width" value="<?php echo $Event->Width(); ?>"/>
|
|
|
|
|
<input type="hidden" name="base_height" id="base_height" value="<?php echo $Event->Height(); ?>"/>
|
|
|
|
|
@ -103,19 +104,19 @@ xhtmlHeaders(__FILE__, translate('Frame').' - '.$Event->Id()." - ".$Frame->Frame
|
|
|
|
|
<?php if ( $imageData['hasAnalImage'] ) {
|
|
|
|
|
echo sprintf('<a href="?view=frame&eid=%d&fid=%d&scale=%d&show=%s">', $Event->Id(), $Frame->FrameId(), $scale, ( $show=='anal'?'capt':'anal' ) );
|
|
|
|
|
} ?>
|
|
|
|
|
<img id="frameImg" src="<?php echo $Frame->getImageSrc($show=='anal'?'analyse':'capture') ?>" width="<?php echo reScale( $Event->Width(), $Event->DefaultScale(), $scale ) ?>" height="<?php echo reScale( $Event->Height(), $Event->DefaultScale(), $scale ) ?>" alt="<?php echo $Frame->EventId()."-".$Frame->FrameId() ?>" class="<?php echo $imageData['imageClass'] ?>"/>
|
|
|
|
|
<img id="frameImg" src="<?php echo validHtmlStr($Frame->getImageSrc($show=='anal'?'analyse':'capture')) ?>" width="<?php echo reScale( $Event->Width(), $Event->DefaultScale(), $scale ) ?>" height="<?php echo reScale( $Event->Height(), $Event->DefaultScale(), $scale ) ?>" alt="<?php echo $Frame->EventId()."-".$Frame->FrameId() ?>" class="<?php echo $imageData['imageClass'] ?>"/>
|
|
|
|
|
<?php if ( $imageData['hasAnalImage'] ) { ?></a><?php } ?>
|
|
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
<p id="controls">
|
|
|
|
|
<?php if ( $Frame->FrameId() > 1 ) { ?>
|
|
|
|
|
<button type="button" id="firstLink" onclick="window.location='?view=frame&eid=<?php echo $Event->Id() ?>&fid=<?php echo $firstFid ?>&scale=<?php echo $scale ?>&show=<?php echo $show ?>';"><?php echo translate('First') ?></button>
|
|
|
|
|
<button type="button" id="prevLink" onclick="window.location='?view=frame&eid=<?php echo $Event->Id() ?>&fid=<?php echo $prevFid ?>&scale=<?php echo $scale ?>&show=<?php echo $show ?>';"><?php echo translate('Prev') ?></button>
|
|
|
|
|
<a class="btn-primary" id="firstLink" href="?view=frame&eid=<?php echo $Event->Id() ?>&fid=<?php echo $firstFid ?>&scale=<?php echo $scale ?>&show=<?php echo $show ?>"><?php echo translate('First') ?></a>
|
|
|
|
|
<a class="btn-primary" id="prevLink" href="?view=frame&eid=<?php echo $Event->Id() ?>&fid=<?php echo $prevFid ?>&scale=<?php echo $scale ?>&show=<?php echo $show ?>"><?php echo translate('Prev') ?></a>
|
|
|
|
|
<?php
|
|
|
|
|
}
|
|
|
|
|
if ( $Frame->FrameId() < $maxFid ) { ?>
|
|
|
|
|
<button type="button" id="nextLink" onclick="window.location='?view=frame&eid=<?php echo $Event->Id() ?>&fid=<?php echo $nextFid ?>&scale=<?php echo $scale ?>&show=<?php echo $show ?>';"><?php echo translate('Next') ?></button>
|
|
|
|
|
<button type="button" id="lastLink" onclick="window.location='?view=frame&eid=<?php echo $Event->Id() ?>&fid=<?php echo $lastFid ?>&scale=<?php echo $scale ?>&show=<?php echo $show ?>';"><?php echo translate('Last') ?></button>
|
|
|
|
|
<a class="btn-primary" id="nextLink" href="?view=frame&eid=<?php echo $Event->Id() ?>&fid=<?php echo $nextFid ?>&scale=<?php echo $scale ?>&show=<?php echo $show ?>"><?php echo translate('Next') ?></a>
|
|
|
|
|
<a class="btn-primary" id="lastLink" href="?view=frame&eid=<?php echo $Event->Id() ?>&fid=<?php echo $lastFid ?>&scale=<?php echo $scale ?>&show=<?php echo $show ?>"><?php echo translate('Last') ?></a>
|
|
|
|
|
<?php } ?>
|
|
|
|
|
</p>
|
|
|
|
|
<?php if (file_exists ($dImagePath)) { ?>
|
|
|
|
|
|