2003-11-05 23:52:22 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
//
|
|
|
|
// ZoneMinder web frames view file, $Date$, $Revision$
|
|
|
|
// Copyright (C) 2003 Philip Coombes
|
|
|
|
//
|
|
|
|
// This program is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU General Public License
|
|
|
|
// as published by the Free Software Foundation; either version 2
|
|
|
|
// of the License, or (at your option) any later version.
|
|
|
|
//
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with this program; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
//
|
|
|
|
|
|
|
|
if ( !canView( 'Events' ) )
|
|
|
|
{
|
|
|
|
$view = "error";
|
|
|
|
return;
|
|
|
|
}
|
2004-03-04 23:13:10 +08:00
|
|
|
$sql = "select E.*,M.Name as MonitorName,M.Width,M.Height from Events as E inner join Monitors as M on E.MonitorId = M.Id where E.Id = '$eid'";
|
|
|
|
$result = mysql_query( $sql );
|
|
|
|
if ( !$result )
|
|
|
|
die( mysql_error() );
|
|
|
|
$event = mysql_fetch_assoc( $result );
|
|
|
|
|
2004-03-19 05:23:36 +08:00
|
|
|
$sql = "select *, unix_timestamp( TimeStamp ) as UnixTimeStamp from Frames where EventID = '$eid' order by FrameId";
|
2004-03-04 23:13:10 +08:00
|
|
|
$result = mysql_query( $sql );
|
2004-01-08 19:45:57 +08:00
|
|
|
if ( !$result )
|
|
|
|
die( mysql_error() );
|
|
|
|
while ( $row = mysql_fetch_assoc( $result ) )
|
|
|
|
{
|
|
|
|
$frames[] = $row;
|
|
|
|
}
|
2004-03-04 23:13:10 +08:00
|
|
|
|
2003-11-05 23:52:22 +08:00
|
|
|
?>
|
2004-12-29 03:22:23 +08:00
|
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
2003-11-05 23:52:22 +08:00
|
|
|
<html>
|
|
|
|
<head>
|
2004-01-07 20:57:07 +08:00
|
|
|
<title>ZM - <?= $zmSlangFrames ?> <?= $eid ?></title>
|
2004-12-29 02:20:11 +08:00
|
|
|
<link rel="stylesheet" href="zm_html_styles.css" type="text/css">
|
2003-11-05 23:52:22 +08:00
|
|
|
<script language="JavaScript">
|
|
|
|
window.focus();
|
|
|
|
function newWindow(Url,Name,Width,Height)
|
|
|
|
{
|
|
|
|
var Name = window.open(Url,Name,"resizable,scrollbars,width="+Width+",height="+Height);
|
|
|
|
}
|
|
|
|
function closeWindow()
|
|
|
|
{
|
|
|
|
window.close();
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<table width="96%" border="0">
|
|
|
|
<tr>
|
2004-01-07 20:57:07 +08:00
|
|
|
<td align="left" class="smallhead"><b><?= $zmSlangEvent ?> <?= $eid ?></b></td>
|
|
|
|
<td align="right" class="text"><a href="javascript: closeWindow();"><?= $zmSlangClose ?></a></td>
|
2003-11-05 23:52:22 +08:00
|
|
|
</tr>
|
|
|
|
<tr><td colspan="2"><table width="100%" border="0" bgcolor="#7F7FB2" cellpadding="3" cellspacing="1"><tr bgcolor="#FFFFFF">
|
2004-01-07 20:57:07 +08:00
|
|
|
<td class="smallhead" align="center"><?= $zmSlangFrameId ?></td>
|
|
|
|
<td class="smallhead" align="center"><?= $zmSlangAlarmFrame ?></td>
|
|
|
|
<td class="smallhead" align="center"><?= $zmSlangTimeStamp ?></td>
|
|
|
|
<td class="smallhead" align="center"><?= $zmSlangTimeDelta ?></td>
|
|
|
|
<td class="smallhead" align="center"><?= $zmSlangScore ?></td>
|
2003-11-05 23:52:22 +08:00
|
|
|
</tr>
|
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
if ( count($frames) )
|
|
|
|
{
|
|
|
|
foreach ( $frames as $frame )
|
2003-11-05 23:52:22 +08:00
|
|
|
{
|
2004-03-04 23:13:10 +08:00
|
|
|
$alarm_frame = $frame['Type']=='Alarm';
|
|
|
|
$bgcolor = $alarm_frame?'#FA8072':($frame['Type']=='Bulk'?'#CCCCCC':'#FFFFFF');
|
2003-11-05 23:52:22 +08:00
|
|
|
?>
|
2004-03-04 23:13:10 +08:00
|
|
|
<tr bgcolor="<?= $bgcolor ?>">
|
2004-03-30 19:02:49 +08:00
|
|
|
<td class="text" align="center"><a href="javascript: newWindow( '<?= $PHP_SELF ?>?view=frame&eid=<?= $eid ?>&fid=<?= $frame['FrameId'] ?>', 'zmImage', <?= $event['Width']+$jws['image']['w'] ?>, <?= $event['Height']+$jws['image']['h'] ?> );"><?= $frame['FrameId'] ?></a></td>
|
2004-03-04 23:13:10 +08:00
|
|
|
<td class="text" align="center"><?= $alarm_frame?$zmSlangYes:$zmSlangNo ?></td>
|
2004-01-08 18:09:35 +08:00
|
|
|
<td class="text" align="center"><?= date( "H:i:s", $frame['UnixTimeStamp'] ) ?></td>
|
|
|
|
<td class="text" align="center"><?= number_format( $frame['Delta'], 2 ) ?></td>
|
2003-11-05 23:52:22 +08:00
|
|
|
<?php
|
2004-03-04 23:13:10 +08:00
|
|
|
if ( ZM_RECORD_EVENT_STATS && $alarm_frame )
|
2004-01-08 19:45:57 +08:00
|
|
|
{
|
2003-11-05 23:52:22 +08:00
|
|
|
?>
|
2004-01-08 18:09:35 +08:00
|
|
|
<td class="text" align="center"><a href="javascript: newWindow( '<?= $PHP_SELF ?>?view=stats&eid=<?= $eid ?>&fid=<?= $frame['FrameId'] ?>', 'zmStats', <?= $jws['stats']['w'] ?>, <?= $jws['stats']['h'] ?> );"><?= $frame['Score'] ?></a></td>
|
2003-11-05 23:52:22 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2003-11-05 23:52:22 +08:00
|
|
|
?>
|
2004-01-08 18:09:35 +08:00
|
|
|
<td class="text" align="center"><?= $frame['Score'] ?></td>
|
2003-11-05 23:52:22 +08:00
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
}
|
2003-11-05 23:52:22 +08:00
|
|
|
?>
|
|
|
|
</tr>
|
|
|
|
<?php
|
|
|
|
}
|
2004-01-08 19:45:57 +08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2003-11-05 23:52:22 +08:00
|
|
|
?>
|
|
|
|
<tr bgcolor="#FFFFFF">
|
2004-01-07 20:57:07 +08:00
|
|
|
<td class="text" colspan="8" align="center"><br><?= $zmSlangNoFramesRecorded ?><br><br></td>
|
2003-11-05 23:52:22 +08:00
|
|
|
</tr>
|
|
|
|
<?php
|
2004-01-08 19:45:57 +08:00
|
|
|
}
|
2003-11-05 23:52:22 +08:00
|
|
|
?>
|
|
|
|
</table></td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</body>
|
|
|
|
</html>
|