false])) as $if) { if ($config['interfaces'][$if]['if'] == $cloneif) { return true; } } return false; } $a_clones = &config_read_array('wireless', 'clone'); if ($_SERVER['REQUEST_METHOD'] === 'POST') { $input_errors = array(); if (!empty($_POST['action']) && $_POST['action'] == "del" && !empty($a_clones[$_POST['id']])) { if (clone_inuse($a_clones[$_POST['id']]['cloneif'])) { /* check if still in use */ $input_errors[] = gettext("This wireless clone cannot be deleted because it is assigned as an interface."); } else { mwexec("/sbin/ifconfig " . escapeshellarg($a_clones[$_POST['id']]['cloneif']) . " destroy"); unset($a_clones[$_POST['id']]); write_config(); header(url_safe('Location: /interfaces_wireless.php')); exit; } } } include("head.inc"); legacy_html_escape_form_data($a_clones); $main_buttons = array( array('href'=>'interfaces_wireless_edit.php', 'label'=>gettext('Add')), ); ?>
0) print_input_errors($input_errors); ?>