tabs to spaces
parent
320bf823c5
commit
c6dd3ffbec
|
@ -28,9 +28,9 @@ require_once('includes/Event.php');
|
||||||
$countSql = 'SELECT count(E.Id) AS EventCount FROM Monitors AS M INNER JOIN Events AS E ON (M.Id = E.MonitorId) WHERE';
|
$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.*,M.Name AS MonitorName,M.DefaultScale FROM Monitors AS M INNER JOIN Events AS E on (M.Id = E.MonitorId) WHERE';
|
$eventsSql = 'SELECT E.*,M.Name AS MonitorName,M.DefaultScale FROM Monitors AS M INNER JOIN Events AS E on (M.Id = E.MonitorId) WHERE';
|
||||||
if ( $user['MonitorIds'] ) {
|
if ( $user['MonitorIds'] ) {
|
||||||
$user_monitor_ids = ' M.Id in ('.$user['MonitorIds'].')';
|
$user_monitor_ids = ' M.Id in ('.$user['MonitorIds'].')';
|
||||||
$countSql .= $user_monitor_ids;
|
$countSql .= $user_monitor_ids;
|
||||||
$eventsSql .= $user_monitor_ids;
|
$eventsSql .= $user_monitor_ids;
|
||||||
} else {
|
} else {
|
||||||
$countSql .= ' 1';
|
$countSql .= ' 1';
|
||||||
$eventsSql .= ' 1';
|
$eventsSql .= ' 1';
|
||||||
|
@ -194,22 +194,21 @@ while ( $event_row = dbFetchNext($results) ) {
|
||||||
<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="colName"><a href="?view=event&eid=<?php echo $event->Id().$filterQuery.$sortQuery.'&page=1">'.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="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 class="colCause"><?php echo makePopupLink( '?view=eventdetail&eid='.$event->Id(), 'zmEventDetail', 'eventdetail', validHtmlStr($event->Cause()), canEdit( 'Events' ), 'title="'.htmlspecialchars($event->Notes()).'"' ) ?>
|
||||||
<?php
|
<?php
|
||||||
# display notes as small text
|
# display notes as small text
|
||||||
if ($event->Notes()) {
|
if ($event->Notes()) {
|
||||||
# if notes include detection objects, then link it to objdetect.jpg
|
# if notes include detection objects, then link it to objdetect.jpg
|
||||||
if (strpos($event->Notes(),"detected:")!== false){
|
if (strpos($event->Notes(),'detected:')!== false){
|
||||||
# make a link
|
# make a link
|
||||||
echo makePopupLink( '?view=image&eid='.$event->Id().'&fid=objdetect', 'zmImage',
|
echo makePopupLink( '?view=image&eid='.$event->Id().'&fid=objdetect', 'zmImage',
|
||||||
array('image', reScale($event->Width(), $scale), reScale($event->Height(), $scale)),
|
array('image', reScale($event->Width(), $scale), reScale($event->Height(), $scale)),
|
||||||
"<div class=\"small text-nowrap text-muted\"><u>".$event->Notes()."</u></div>");
|
"<div class=\"small text-nowrap text-muted\"><u>".$event->Notes()."</u></div>");
|
||||||
}
|
}
|
||||||
elseif ($event->Notes() != 'Forced Web: ') {
|
elseif ($event->Notes() != 'Forced Web: ') {
|
||||||
echo "<br/><div class=\"small text-nowrap text-muted\">".$event->Notes()."</div>";
|
echo "<br/><div class=\"small text-nowrap text-muted\">".$event->Notes()."</div>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td class="colTime"><?php echo strftime(STRF_FMT_DATETIME_SHORTER, strtotime($event->StartTime())) .
|
<td class="colTime"><?php echo strftime(STRF_FMT_DATETIME_SHORTER, strtotime($event->StartTime())) .
|
||||||
( $event->EndTime() ? ' until ' . strftime(STRF_FMT_DATETIME_SHORTER, strtotime($event->EndTime()) ) : '' ) ?>
|
( $event->EndTime() ? ' until ' . strftime(STRF_FMT_DATETIME_SHORTER, strtotime($event->EndTime()) ) : '' ) ?>
|
||||||
|
|
Loading…
Reference in New Issue