From 633a1a80945760bb73ba096701e55a685188e3ea Mon Sep 17 00:00:00 2001 From: stan Date: Wed, 23 Feb 2005 12:07:13 +0000 Subject: [PATCH] Limits montage view to mobile group monitors. git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1340 e3e1d417-86f3-4887-817a-d78f3d33393f --- web/zm_xhtml_view_montage.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/web/zm_xhtml_view_montage.php b/web/zm_xhtml_view_montage.php index bd157987f..7648fe92e 100644 --- a/web/zm_xhtml_view_montage.php +++ b/web/zm_xhtml_view_montage.php @@ -18,6 +18,12 @@ // 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" ); $monitors = array(); $max_width = 0; @@ -28,6 +34,11 @@ while( $row = mysql_fetch_assoc( $result ) ) { continue; } + if ( $group && $group['MonitorIds'] && !in_array( $row['Id'], split( ',', $group['MonitorIds'] ) ) ) + { + continue; + } + if ( $max_width < $row['Width'] ) $max_width = $row['Width']; if ( $max_height < $row['Height'] ) $max_height = $row['Height']; $monitors[] = $row;