Motage and event list issues, fixes.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2642 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
8af774a98c
commit
1080485c33
|
@ -114,7 +114,7 @@ $GLOBALS['defaultUser'] = array(
|
|||
"Devices" => 'Edit',
|
||||
"System" => 'Edit',
|
||||
"MaxBandwidth" => "",
|
||||
"MonitorIds" => "",
|
||||
"MonitorIds" => false
|
||||
);
|
||||
|
||||
function loadConfig( $defineConsts=true )
|
||||
|
|
|
@ -1085,7 +1085,9 @@ function getImageSrc( $event, $frame, $scale, $captureOnly=false, $overwrite=fal
|
|||
function createListThumbnail( $event, $overwrite=false )
|
||||
{
|
||||
$sql = "select * from Frames where EventId = '".$event['Id']."' and Score = '".$event['MaxScore']."' order by FrameId limit 0,1";
|
||||
$frame = dbFetchOne( $sql );
|
||||
if ( !($frame = dbFetchOne( $sql )) )
|
||||
return( false );
|
||||
|
||||
$frameId = $frame['FrameId'];
|
||||
|
||||
if ( ZM_WEB_LIST_THUMB_WIDTH )
|
||||
|
|
|
@ -30,7 +30,7 @@ if ( !empty($_REQUEST['execute']) )
|
|||
}
|
||||
|
||||
$countSql = "select count(E.Id) as EventCount from Monitors as M inner join Events as E on (M.Id = E.MonitorId) where";
|
||||
$eventsSql = "select E.Id,E.MonitorId,M.Name As MonitorName,M.Width,M.Height,M.DefaultScale,E.Name,E.Cause,E.StartTime,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived from Monitors as M inner join Events as E on (M.Id = E.MonitorId) where";
|
||||
$eventsSql = "select E.Id,E.MonitorId,M.Name As MonitorName,M.Width,M.Height,M.DefaultScale,E.Name,E.Cause,E.Notes,E.StartTime,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived from Monitors as M inner join Events as E on (M.Id = E.MonitorId) where";
|
||||
if ( $user['MonitorIds'] )
|
||||
{
|
||||
$countSql .= " M.Id in (".join( ",", preg_split( '/["\'\s]*,["\'\s]*/', $user['MonitorIds'] ) ).")";
|
||||
|
@ -210,7 +210,7 @@ foreach ( $events as $event )
|
|||
<td class="colId"><?= makePopupLink( '?view=event&eid='.$event['Id'].$filterQuery.$sortQuery.'&page=1', 'zmEvent', array( 'event', reScale( $event['Width'], $scale ), reScale( $event['Height'], $scale ) ), $event['Id'].($event['Archived']?'*':'') ) ?></td>
|
||||
<td class="colName"><?= makePopupLink( '?view=event&eid='.$event['Id'].$filterQuery.$sortQuery.'&page=1', 'zmEvent', array( 'event', reScale( $event['Width'], $event['DefaultScale'], ZM_WEB_DEFAULT_SCALE ), reScale( $event['Height'], $event['DefaultScale'], ZM_WEB_DEFAULT_SCALE ) ), validHtmlStr($event['Name']).($event['Archived']?'*':'' ) ) ?></td>
|
||||
<td class="colMonitorName"><?= $event['MonitorName'] ?></td>
|
||||
<td class="colCause"><?= makePopupLink( '?view=eventdetail&eid='.$event['Id'], 'zmEventDetail', 'eventdetail', validHtmlStr($event['Cause']), canEdit( 'Events' ) ) ?></td>
|
||||
<td class="colCause"><?= makePopupLink( '?view=eventdetail&eid='.$event['Id'], 'zmEventDetail', 'eventdetail', validHtmlStr($event['Cause']), canEdit( 'Events' ), 'title="'.htmlspecialchars($event['Notes']).'"' ) ?></td>
|
||||
<td class="colTime"><?= strftime( STRF_FMT_DATETIME_SHORTER, strtotime($event['StartTime']) ) ?></td>
|
||||
<td class="colDuration"><?= $event['Length'] ?></td>
|
||||
<td class="colFrames"><?= makePopupLink( '?view=frames&eid='.$event['Id'], 'zmFrames', 'frames', $event['Frames'] ) ?></td>
|
||||
|
@ -221,10 +221,18 @@ foreach ( $events as $event )
|
|||
<?php
|
||||
if ( ZM_WEB_LIST_THUMBS )
|
||||
{
|
||||
$thumbData = createListThumbnail( $event );
|
||||
if ( $thumbData = createListThumbnail( $event ) )
|
||||
{
|
||||
?>
|
||||
<td class="colThumbnail"><?= makePopupLink( '?view=frame&eid='.$event['Id'].'&fid='.$thumbData['FrameId'], 'zmImage', array( 'image', reScale( $event['Width'], $scale ), reScale( $event['Height'], $scale ) ), '<img src="'.$thumbData['Path'].'" width="'.$thumbData['Width'].'" height="'.$thumbData['Height'].'" alt="'.$thumbData['FrameId'].'/'.$event['MaxScore'].'"/>' ) ?></td>
|
||||
<?php
|
||||
}
|
||||
else
|
||||
{
|
||||
?>
|
||||
<td class="colThumbnail"> </td>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
<td class="colMark"><input type="checkbox" name="markEids[]" value="<?= $event['Id'] ?>" onclick="configureButton( this, 'markEids' );"<?php if ( !canEdit( 'Events' ) ) { ?> disabled="disabled"<?php } ?>/></td>
|
||||
|
|
|
@ -39,7 +39,7 @@ var SOUND_ON_ALARM = <?= ZM_WEB_SOUND_ON_ALARM ?>;
|
|||
var POPUP_ON_ALARM = <?= ZM_WEB_POPUP_ON_ALARM ?>;
|
||||
|
||||
var streamMode = "<?= $streamMode ?>";
|
||||
var showMode = "<?= ($showControls && $_REQUEST['control'])?"control":"events" ?>";
|
||||
var showMode = "<?= ($showControls && !empty($_REQUEST['control']))?"control":"events" ?>";
|
||||
|
||||
var connKey = '<?= $connkey ?>';
|
||||
var maxDisplayEvents = <?= 2 * MAX_EVENTS ?>;
|
||||
|
|
|
@ -103,13 +103,6 @@ foreach ( $monitors as $monitor )
|
|||
?>
|
||||
<div id="monitorFrame<?= $monitor['index'] ?>" class="monitorFrame">
|
||||
<div id="monitor<?= $monitor['index'] ?>" class="monitor idle">
|
||||
<?php
|
||||
if ( !ZM_WEB_COMPACT_MONTAGE )
|
||||
{
|
||||
?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<div id="imageFeed<?= $monitor['index'] ?>" class="imageFeed" onclick="createPopup( '?view=watch&mid=<?= $monitor['Id'] ?>', 'zmWatch<?= $monitor['Id'] ?>', 'watch', <?= $monitor['scaleWidth'] ?>, <?= $monitor['scaleHeight'] ?> );">
|
||||
<?php
|
||||
if ( ZM_STREAM_METHOD == 'mpeg' && ZM_MPEG_LIVE_FORMAT )
|
||||
|
|
Loading…
Reference in New Issue