Width()-1; $minY = 0; $maxY = $monitor->Height()-1; $zones = array(); foreach( dbFetchAll('SELECT * FROM Zones WHERE MonitorId=? ORDER BY Area DESC', NULL, array($mid)) as $row ) { $row['Points'] = coordsToPoints($row['Coords']); limitPoints($row['Points'], $minX, $minY, $maxX, $maxY); $row['Coords'] = pointsToCoords($row['Points']); $row['AreaCoords'] = preg_replace('/\s+/', ',', $row['Coords']); $zones[] = $row; } $connkey = generateConnKey(); xhtmlHeaders(__FILE__, translate('Zones')); ?>