From 0ab6e27259dd054f4acbae839733ad32bcae217c Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Tue, 29 Mar 2016 14:35:12 -0400 Subject: [PATCH] Use Monitor object --- web/skins/classic/views/zones.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/web/skins/classic/views/zones.php b/web/skins/classic/views/zones.php index 9182dc98f..f5e237369 100644 --- a/web/skins/classic/views/zones.php +++ b/web/skins/classic/views/zones.php @@ -25,13 +25,12 @@ if ( !canView( 'Monitors' ) ) } $mid = validInt($_REQUEST['mid']); +$Monitor = new Monitor( $mid ); $wd = getcwd(); chdir( ZM_DIR_IMAGES ); $status = exec( escapeshellcmd( getZmuCommand( " -m ".$mid." -z" ) ) ); chdir( $wd ); - -$monitor = dbFetchMonitor( $mid ); - +$image = ZM_DIR_IMAGES.'/'.'Zones'.$Monitor->Id().'.jpg'; $zones = array(); foreach( dbFetchAll( 'select * from Zones where MonitorId = ? order by Area desc', NULL, array($mid) ) as $row ) { @@ -42,7 +41,6 @@ foreach( dbFetchAll( 'select * from Zones where MonitorId = ? order by Area desc } } -$image = 'Zones'.$monitor['Id'].'.jpg'; xhtmlHeaders(__FILE__, translate('Zones') ); ?> @@ -58,13 +56,13 @@ xhtmlHeaders(__FILE__, translate('Zones') ); foreach( array_reverse($zones) as $zone ) { ?> - <?php echo htmlspecialchars($zone['Name']) ?> + <?php echo htmlspecialchars($zone['Name']) ?> - zones + zones
@@ -84,9 +82,9 @@ foreach( $zones as $zone ) { ?> - + -  /  +  / Width*$Monitor->Height) ) ?> disabled="disabled"/>
- disabled="disabled"/> + disabled="disabled"/>