addGlobal(new Form_Input( 'tab', null, 'hidden', $tab )); if ($tab == "port") { $sectiontext = gettext('Port Alias Details'); $helptext = gettext('Paste in the ports to import separated by a carriage return. ' . 'The list may contain port numbers, port ranges, blank lines (ignored) and ' . 'an optional description after each port. e.g.:' . ''); } else { $sectiontext = gettext('IP Alias Details'); $helptext = gettext('Paste in the aliases to ' . 'import separated by a carriage return. Common examples are lists of IPs, ' . 'networks, blacklists, etc. The list may contain IP addresses, with or without ' . 'CIDR prefix, IP ranges, blank lines (ignored) and an optional description after ' . 'each IP. e.g.:'); } $section = new Form_Section($sectiontext); $section->addInput(new Form_Input( 'name', 'Alias Name', 'text', $_POST['name'] ))->setPattern('[a-zA-Z0-9_]+')->setHelp('The name of the alias may only consist '. 'of the characters "a-z, A-Z, 0-9 and _".'); $section->addInput(new Form_Input( 'descr', 'Description', 'text', $_POST['descr'] ))->setHelp('A description may be entered here for administrative reference (not parsed).'); $section->addInput(new Form_Textarea( 'aliasimport', 'Aliases to import', $_POST["aliasimport"] ))->setHelp($helptext); $form->add($section); print $form; include("foot.inc");