#!/usr/bin/perl # edit_group.cgi # Show a form for editing or creating a group of hosts or nets require './itsecur-lib.pl'; &can_use_error("groups"); &ReadParse(); if ($in{'new'}) { &header($text{'group_title1'}, "", undef, undef, undef, undef, &apply_button()); } else { &header($text{'group_title2'}, "", undef, undef, undef, undef, &apply_button()); @groups = &list_groups(); if (defined($in{'idx'})) { $group = $groups[$in{'idx'}]; } else { ($group) = grep { $_->{'name'} eq $in{'name'} } @groups; $in{'idx'} = $group->{'index'}; } } print "