$limit ) { $nEvents = $limit; } $pages = (int)ceil($nEvents/ZM_WEB_EVENTS_PER_PAGE); if ( !empty($page) ) { if ( $page < 0 ) $page = 1; else if ( $page > $pages ) $page = $pages; } if ( !empty($page) ) { $limitStart = (($page-1)*ZM_WEB_EVENTS_PER_PAGE); if ( empty( $limit ) ) { $limitAmount = ZM_WEB_EVENTS_PER_PAGE; } else { $limitLeft = $limit - $limitStart; $limitAmount = ($limitLeft>ZM_WEB_EVENTS_PER_PAGE)?ZM_WEB_EVENTS_PER_PAGE:$limitLeft; } $eventsSql .= " limit $limitStart, $limitAmount"; } elseif ( !empty( $limit ) ) { $eventsSql .= ' limit 0, '.$limit; } $maxWidth = 0; $maxHeight = 0; $archived = false; $unarchived = false; $events = array(); foreach ( dbFetchAll( $eventsSql ) as $event_row ) { $events[] = $event = new Event( $event_row ); # Doesn this code do anything? $scale = max( reScale( SCALE_BASE, $event->DefaultScale(), ZM_WEB_DEFAULT_SCALE ), SCALE_BASE ); $eventWidth = reScale( $event_row['Width'], $scale ); $eventHeight = reScale( $event_row['Height'], $scale ); if ( $maxWidth < $eventWidth ) $maxWidth = $eventWidth; if ( $maxHeight < $eventHeight ) $maxHeight = $eventHeight; if ( $event_row['Archived'] ) $archived = true; else $unarchived = true; } $maxShortcuts = 5; $pagination = getPagination( $pages, $page, $maxShortcuts, $filterQuery.$sortQuery.'&limit='.$limit ); $focusWindow = true; xhtmlHeaders(__FILE__, translate('Events') ); ?>

DefaultScale(), ZM_WEB_DEFAULT_SCALE ), SCALE_BASE ); ?> DiskSpace(); ?> createListThumbnail() ) { ?>
disabled="disabled"/>
Id().$filterQuery.$sortQuery.'&page=1', 'zmEvent', array( 'event', reScale( $event->Width(), $scale ), reScale( $event->Height(), $scale ) ), $event->Id().($event->Archived()?'*':'') ) ?> 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()?'*':'' ) ) ?> MonitorId(), 'zmMonitor'.$event->Monitorid(), 'monitor', $event->MonitorName(), canEdit( 'Monitors' ) ) ?> Id(), 'zmEventDetail', 'eventdetail', validHtmlStr($event->Cause()), canEdit( 'Events' ), 'title="'.htmlspecialchars($event->Notes()).'"' ) ?> StartTime()) ) ?> Length() ) ?> Id(), 'zmFrames', 'frames', $event->Frames() ) ?> Id(), 'zmFrames', 'frames', $event->AlarmFrames() ) ?> TotScore() ?> AvgScore() ?> Id().'&fid=0', 'zmImage', array( 'image', reScale( $event->Width(), $scale ), reScale( $event->Height(), $scale ) ), $event->MaxScore() ) ?> DiskSpace() ) ?> Path().'/snapshot.jpg' ) ) { Warning("Using snapshot"); $imgSrc = '?view=image&eid='.$event->Id().'&fid=snapshot&width='.$thumbData['Width'].'&height='.$thumbData['Height']; } else { Warning("Not Using snapshot" . $event->Path().'/snapshot.jpg' ); $imgSrc = '?view=image&eid='.$event->Id().'&fid='.$thumbData['FrameId'].'&width='.$thumbData['Width'].'&height='.$thumbData['Height']; } $streamSrc = $event->getStreamSrc( array( 'mode'=>'jpeg', 'scale'=>$scale, 'maxfps'=>ZM_WEB_VIDEO_MAXFPS, 'replay'=>'single') ); $imgHtml = ''. validHtmlStr('Event '.$event->Id()) .''; echo makePopupLink( '?view=frame&eid='.$event->Id().'&fid='.$thumbData['FrameId'], 'zmImage', array( 'image', reScale( $event->Width(), $scale ), reScale( $event->Height(), $scale ) ), $imgHtml ); ?>   disabled="disabled"/>
Totals: