add thumbnails and an mp4 download in the events list
This commit is contained in:
parent
6aaa0fe39f
commit
53f4276cb7
|
@ -25,7 +25,6 @@ function exportHeader($title) {
|
|||
<meta charset="utf-8">
|
||||
<title><?php echo $title ?></title>
|
||||
<style type="text/css">
|
||||
<!--
|
||||
<?php include(ZM_PATH_WEB.'/'.ZM_SKIN_PATH.'/css/'.ZM_SKIN_NAME.'/export.css'); ?>
|
||||
|
||||
ul.tabs {
|
||||
|
@ -67,7 +66,6 @@ html ul.tabs li.active, html ul.tabs li.active a:hover {
|
|||
background: #dddddd;
|
||||
border-bottom: 1px solid #e0e0e0;
|
||||
}
|
||||
-->
|
||||
</style>
|
||||
<script type="text/javascript" src="<?php echo ($title == translate('Images').' Master' ? '' : '../') ?>jquery.js"></script>
|
||||
<!--<script type="text/javascript" src="<?php echo ($title == translate('Images').' Master' ? '' : '../') ?>video.js"></script>-->
|
||||
|
@ -94,7 +92,6 @@ html ul.tabs li.active, html ul.tabs li.active a:hover {
|
|||
});
|
||||
|
||||
});
|
||||
// ]]>
|
||||
</script>
|
||||
</head>
|
||||
<?php
|
||||
|
@ -144,8 +141,8 @@ function exportEventFrames($event, $exportDetail, $exportImages) {
|
|||
exportHeader(translate('Frames').' '.$event->Id());
|
||||
|
||||
$otherlinks = '';
|
||||
if( $exportDetail ) $otherlinks .= '<a href="zmEventDetail.html">'.translate('Event').'</a>,';
|
||||
if( $exportImages ) $otherlinks .= '<a href="zmEventImages.html">'.translate('Images').'</a>,';
|
||||
if ( $exportDetail ) $otherlinks .= '<a href="zmEventDetail.html">'.translate('Event').'</a>,';
|
||||
if ( $exportImages ) $otherlinks .= '<a href="zmEventImages.html">'.translate('Images').'</a>,';
|
||||
$otherlinks = substr($otherlinks,0,-1);
|
||||
?>
|
||||
<body>
|
||||
|
@ -265,7 +262,7 @@ function exportEventImages($event, $exportDetail, $exportFrames, $myfilelist) {
|
|||
</video>
|
||||
</div><!--videoFeed-->
|
||||
<?php
|
||||
} else { // end if DefaultVideo
|
||||
} else { // end if DefaultVideo
|
||||
?>
|
||||
<ilayer id="slidensmain" width=&{slidewidth}; height=&{slideheight}; bgColor=&{slidebgcolor}; visibility=hide>
|
||||
<layer id="slidenssub" width="&{slidewidth};" left="auto" top="auto"></layer>
|
||||
|
@ -587,6 +584,33 @@ else if (document.layers) window.onload=start_slider;
|
|||
return ob_get_clean();
|
||||
}
|
||||
|
||||
function eventlist_html($Event) {
|
||||
?>
|
||||
<div class="event">
|
||||
<?php
|
||||
if ( $Event->SaveJPEGs() ) {
|
||||
?>
|
||||
<a href="#" onclick="switchevent('<?php echo $Event->Id(); ?>/zmEventImages.html');return false;">
|
||||
<?php if ( ZM_WEB_LIST_THUMBS ) { ?>
|
||||
<img width="<?php echo ZM_WEB_LIST_THUMB_WIDTH ?>" src="<?php echo $Event->Id(); ?>/snapshot.jpg" alt="<?php echo $Event->Id()?>"/>
|
||||
<?php } else { echo $Event->Id(); } ?>
|
||||
</a>
|
||||
<?php
|
||||
} # end if has jpegs
|
||||
if ( $Event->DefaultVideo() ) {
|
||||
if ( ZM_WEB_LIST_THUMBS ) {
|
||||
?>
|
||||
<a href="<?php echo $Event->Id().'/'.$Event->DefaultVideo() ?>">
|
||||
<img width="<?php echo ZM_WEB_LIST_THUMB_WIDTH ?>" src="<?php echo $Event->Id(); ?>/snapshot.jpg" alt="<?php echo $Event->Id()?>"/>
|
||||
</a>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div><!--event-->
|
||||
<?php
|
||||
}
|
||||
|
||||
function exportEventImagesMaster($eids) {
|
||||
ob_start();
|
||||
exportHeader(translate('Images').' Master');
|
||||
|
@ -631,25 +655,20 @@ function exportEventImagesMaster($eids) {
|
|||
<?php
|
||||
foreach($eids as $eid) {
|
||||
$Event = new Event($eid);
|
||||
if ( $Event->SaveJPEGs() ) {
|
||||
?>
|
||||
<div><a href="#" onclick="switchevent('<?php echo $eid; ?>/zmEventImages.html');return false;"><?php echo $eid; ?></a></div>
|
||||
<?php
|
||||
} # end if saveJPEGs
|
||||
eventlist_html($Event);
|
||||
} # end foreach event id
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
foreach ($monitors as $monitor) {
|
||||
echo "<div class=\"tab_content\" id=\"tab$monitor\">";
|
||||
echo '<h2>Monitor: ' . $monitorNames[$monitor] . ' </h2>';
|
||||
foreach ($monitors as $monitor_id) {
|
||||
echo "<div class=\"tab_content\" id=\"tab$monitor_id\">";
|
||||
echo '<h2>Monitor: ' . $monitorNames[$monitor_id] . ' </h2>';
|
||||
foreach ( $eids as $eid ) {
|
||||
if ( $eventMonitorId[$eid] == $monitor ) {
|
||||
?>
|
||||
<div><a href="#" onclick="switchevent('<?php echo $eid; ?>/zmEventImages.html');return false;"><?php echo $eid; ?></a></div>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
$Event = new Event($eid);
|
||||
if ( $Event->MonitorId() == $monitor_id ) {
|
||||
eventlist_html($Event);
|
||||
} # end if its the right monitor
|
||||
} # end foreach event
|
||||
echo '</div>';
|
||||
} # end foreach monitor
|
||||
?>
|
||||
|
|
|
@ -125,14 +125,15 @@ $disk_space_total = 0;
|
|||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$event_count = 0;
|
||||
while ( $event_row = dbFetchNext($results) ) {
|
||||
$event = new Event($event_row);
|
||||
$scale = max( reScale( SCALE_BASE, $event->DefaultScale(), ZM_WEB_DEFAULT_SCALE ), SCALE_BASE );
|
||||
echo '<input type="hidden" name="eids[]" value="'.validInt($event->Id())."\"/>\n";
|
||||
?>
|
||||
<tr<?php echo $event->Archived() ? ' class="archived"' : '' ?>>
|
||||
<td class="colId"><a href="?view=event&eid=<?php echo $event->Id().$filterQuery.$sortQuery.'&page=1"> '.$event->Id().($event->Archived()?'*':'') ?></a></td>
|
||||
<td class="colName"><a href="?view=event&eid=<?php echo $event->Id().$filterQuery.$sortQuery.'&page=1"> '.validHtmlStr($event->Name()).($event->Archived()?'*':'') ?></a></td>
|
||||
<td class="colId"><a href="?view=event&eid=<?php echo $event->Id().$filterQuery.$sortQuery ?>&page=1"><?php echo $event->Id().($event->Archived()?'*':'') ?></a></td>
|
||||
<td class="colName"><a href="?view=event&eid=<?php echo $event->Id().$filterQuery.$sortQuery ?>&page=1"><?php echo validHtmlStr($event->Name()).($event->Archived()?'*':'') ?></a></td>
|
||||
<td class="colMonitorName"><?php echo makePopupLink( '?view=monitor&mid='.$event->MonitorId(), 'zmMonitor'.$event->Monitorid(), 'monitor', $event->MonitorName(), canEdit( 'Monitors' ) ) ?></td>
|
||||
<td class="colCause"><?php echo makePopupLink( '?view=eventdetail&eid='.$event->Id(), 'zmEventDetail', 'eventdetail', validHtmlStr($event->Cause()), canEdit( 'Events' ), 'title="'.htmlspecialchars($event->Notes()).'"' ) ?></td>
|
||||
<td class="colTime"><?php echo strftime(STRF_FMT_DATETIME_SHORTER, strtotime($event->StartTime())) .
|
||||
|
@ -149,6 +150,7 @@ while ( $event_row = dbFetchNext($results) ) {
|
|||
<?php
|
||||
if ( ZM_WEB_EVENT_DISK_SPACE ) {
|
||||
$disk_space_total += $event->DiskSpace();
|
||||
$event_count += 1;
|
||||
?>
|
||||
<td class="colDiskSpace"><?php echo human_filesize($event->DiskSpace()) ?></td>
|
||||
<?php
|
||||
|
@ -157,6 +159,10 @@ while ( $event_row = dbFetchNext($results) ) {
|
|||
} # end foreach event
|
||||
?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<td colspan="11"><?php echo $event_count ?> events</td>
|
||||
<td class="colDiskSpace"><?php echo human_filesize($disk_space_total);?></td>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
<table id="contentTable" class="minor">
|
||||
|
|
Loading…
Reference in New Issue