if (preg_match('/^[0-9]+$/i', $_POST['subnetId'])) { $Zones->update_address_objects($_POST['subnetId']); } } elseif ($_POST['action'] == 'adr') { if (preg_match('/^[0-9]+$/i', $_POST['subnetId']) && preg_match('/^[0-9a-zA-Z-.]+$/i', $_POST['dnsName']) && preg_match('/^[0-9]+$/i', $_POST['IPId'])) { $Zones->update_address_object($_POST['subnetId'], $_POST['IPId'], $_POST['dnsName']); } } elseif ($_POST['action'] == 'subnet') { if (preg_match('/^[0-9]+$/i', $_POST['subnetId'])) { $Zones->generate_subnet_object($_POST['subnetId']); } } } # check if there is any mapping for a specific zone, if not, display inputs if ($_POST['operation'] == 'checkMapping') { if (!$Zones->check_zone_mapping($_POST['zoneId']) && $_POST['zoneId'] != 0) { # fetch all firewall zones $firewallZones = $Zones->get_zones(); # fetch settings $firewallZoneSettings = json_decode($User->settings->firewallZoneSettings, true); # fetch all devices $devices = $Tools->fetch_devices('type', $firewallZoneSettings['deviceType']); ?> <table class="table table-noborder table-condensed"> <tr> <td colspan="2"> <?php print _('In order to map this network to a zone without an existing device mapping you have to specify the following values.'); ?> </td> </tr>