$cpent) { if ($cpent['zone'] == $_POST['zone']) { $input_errors[] = sprintf(gettext("Zone [%s] already exists."), $_POST['zone']); break; } } if (!$input_errors) { $cpzone = strtolower($_POST['zone']); $a_cp[$cpzone] = array(); $a_cp[$cpzone]['zone'] = str_replace(" ", "", $_POST['zone']); $a_cp[$cpzone]['descr'] = $_POST['descr']; $a_cp[$cpzone]['localauth_priv'] = true; write_config(); header("Location: services_captiveportal.php?zone={$cpzone}"); exit; } } include("head.inc"); if ($input_errors) { print_input_errors($input_errors); } $form = new Form(new Form_Button( 'submit', 'Continue' )); $section = new Form_Section('Add Captive Portal Zone'); $section->addInput(new Form_Input( 'zone', 'Zone name' ))->setPattern('[0-9A-Za-z_]+')->setHelp('Zone name. Can only contain letters, digits, and underscores (_).'); $section->addInput(new Form_Input( 'descr', 'Zone description' ))->setHelp('You may enter a description here for your reference (not parsed).'); $form->add($section); print($form); include("foot.inc");