Removed 'images' view.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@33 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
37ea3644ca
commit
2063029655
90
web/zm.php
90
web/zm.php
|
@ -619,96 +619,6 @@ function checkAll(form,name){
|
|||
</html>
|
||||
<?php
|
||||
}
|
||||
elseif ( $view == "images" )
|
||||
{
|
||||
$result = mysql_query( "select E.*,M.Name as MonitorName, M.Width, M.Height from Events as E, Monitors as M where E.Id = '$eid' and E.MonitorId = M.Id" );
|
||||
if ( !$result )
|
||||
die( mysql_error() );
|
||||
$event = mysql_fetch_assoc( $result );
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<title>ZM - Images - <?php echo $event[Name] ?> - Images</title>
|
||||
<link rel="stylesheet" href="zmstyles.css" type="text/css">
|
||||
<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 border="0" cellspacing="0" cellpadding="0" align="center" width="100%">
|
||||
<?php
|
||||
$result = mysql_query( "select * from Frames where EventID = '$eid' order by Id" );
|
||||
if ( !$result )
|
||||
die( mysql_error() );
|
||||
?>
|
||||
<tr><td colspan="4"><table border="0" cellpadding="0" cellspacing="2" align="center">
|
||||
<tr>
|
||||
<?php
|
||||
$count = 0;
|
||||
$scale = IMAGE_SCALING;
|
||||
$fraction = sprintf( "%.2f", 1/$scale );
|
||||
$thumb_width = $event[Width]/4;
|
||||
$thumb_height = $event[Height]/4;
|
||||
while( $row = mysql_fetch_assoc( $result ) )
|
||||
{
|
||||
$frame_id = $row[FrameId];
|
||||
$image_path = $row[ImagePath];
|
||||
|
||||
if ( $scale == 1 )
|
||||
{
|
||||
$capt_image = $image_path;
|
||||
$anal_image = preg_replace( "/capture/", "analyse", $image_path );
|
||||
|
||||
if ( file_exists($anal_image) && filesize( $anal_image ) )
|
||||
{
|
||||
$thumb_image = $anal_image;
|
||||
}
|
||||
else
|
||||
{
|
||||
$thumb_image = $capt_image;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$thumb_image = preg_replace( "/capture/", "thumb", $image_path );
|
||||
|
||||
if ( !file_exists($thumb_image) || !filesize( $thumb_image ) )
|
||||
{
|
||||
$anal_image = preg_replace( "/capture/", "analyse", $image );
|
||||
if ( file_exists( $anal_image ) )
|
||||
$command = "jpegtopnm -dct fast $anal_image | pnmscalefixed $fraction | ppmtojpeg --dct=fast > $thumb_image";
|
||||
else
|
||||
$command = "jpegtopnm -dct fast $image | pnmscalefixed $fraction | ppmtojpeg --dct=fast > $thumb_image";
|
||||
#exec( escapeshellcmd( $command ) );
|
||||
exec( $command );
|
||||
}
|
||||
}
|
||||
?>
|
||||
<td align="center" width="88"><a href="javascript: newWindow( '<?php echo $PHP_SELF ?>?view=image&eid=<?php echo $eid ?>&fid=<?php echo $frame_id ?>', 'zmImage', <?php echo $event[Width]+48 ?>, <?php echo $event[Height]+72 ?> );"><img src="<?php echo $thumb_image ?>" width="<?php echo $thumb_width ?>" height="<? echo $thumb_height ?>" border="0" alt="<?php echo $frame_id ?>/<?php echo $row[Score] ?>"></a></td>
|
||||
<?php
|
||||
flush();
|
||||
if ( !(++$count % 4) )
|
||||
{
|
||||
?>
|
||||
</tr>
|
||||
<tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
?>
|
||||
</tr>
|
||||
</table></td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
<?php
|
||||
}
|
||||
elseif( $view == "image" )
|
||||
{
|
||||
$result = mysql_query( "select * from Frames where EventID = '$eid' and FrameId = '$fid'" );
|
||||
|
|
Loading…
Reference in New Issue