Limits montage view to mobile group monitors.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1340 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2005-02-23 12:07:13 +00:00
parent 1906d9ac17
commit 633a1a8094
1 changed files with 11 additions and 0 deletions

View File

@ -18,6 +18,12 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// //
$sql = "select * from Groups where Name = 'Mobile'";
$result = mysql_query( $sql );
if ( !$result )
echo mysql_error();
$group = mysql_fetch_assoc( $result );
$result = mysql_query( "select * from Monitors where Function != 'None' order by Id" ); $result = mysql_query( "select * from Monitors where Function != 'None' order by Id" );
$monitors = array(); $monitors = array();
$max_width = 0; $max_width = 0;
@ -28,6 +34,11 @@ while( $row = mysql_fetch_assoc( $result ) )
{ {
continue; continue;
} }
if ( $group && $group['MonitorIds'] && !in_array( $row['Id'], split( ',', $group['MonitorIds'] ) ) )
{
continue;
}
if ( $max_width < $row['Width'] ) $max_width = $row['Width']; if ( $max_width < $row['Width'] ) $max_width = $row['Width'];
if ( $max_height < $row['Height'] ) $max_height = $row['Height']; if ( $max_height < $row['Height'] ) $max_height = $row['Height'];
$monitors[] = $row; $monitors[] = $row;