0 $types = array( 'OverloadFrames' => 'integer', 'ExtendAlarmFrames' => 'integer', ); $changes = getFormChanges($zone, $_REQUEST['newZone'], $types); if ( count($changes) ) { if ( $zid > 0 ) { dbQuery('UPDATE Zones SET '.implode(', ', $changes).' WHERE MonitorId=? AND Id=?', array($mid, $zid)); } else { dbQuery('INSERT INTO Zones SET MonitorId=?, '.implode(', ', $changes), array($mid)); } if ( daemonCheck() && ($monitor->Type() != 'WebSite') ) { if ( $_REQUEST['newZone']['Type'] == 'Privacy' ) { $monitor->zmaControl('stop'); $monitor->zmcControl('restart'); $monitor->zmaControl('start'); } else { $monitor->zmaControl('restart'); } } if ( ($_REQUEST['newZone']['Type'] == 'Privacy') && $monitor->Controllable() ) { $monitor->sendControlCommand('quit'); } } // end if changes # HTTP_REFERER will typically be ?view=zone so no good. # if a referer is passed in $_REQUEST then use it otherwise go to ?view=zones $redirect = isset($_REQUEST['REFERER']) ? $_REQUEST['REFERER'] : '?view=zones'; } // end if action } // end if $mid and canEdit($mid) ?>