#!/usr/local/bin/perl # # postfix-module by Guillaume Cottenceau , # for webmin by Jamie Cameron # # Copyright (c) 2000 by Mandrakesoft # # Permission to use, copy, modify, and distribute this software and its # documentation under the terms of the GNU General Public License is hereby # granted. No representations are made about the suitability of this software # for any purpose. It is provided "as is" without express or implied warranty. # See the GNU General Public License for more details. # # # Edit maps require './postfix-lib.pl'; &ReadParse(); &ui_print_header(undef, $text{'canonical_edit_title'}, ""); my $which; if ($in{'which'} eq $text{'edit_canonical_maps'}) { $which = 1; } elsif ($in{'which'} eq $text{'edit_recipient_canonical_maps'}) { $which = 2; } elsif ($in{'which'} eq $text{'edit_sender_canonical_maps'}) { $which = 3; } else { &error($text{'internal_error'}); } # double-table displaying all mappings my $mappingsaliases = &get_aliases(); print "Click on any alias to edit its properties:\n
\n"; print "
\n"; print "\n"; print " ", "\n"; my $split_index = int(($#{$aliases})/2); my $i = -1; foreach $alias (@{$aliases}) { print "\n"; print "\n"; print "\n\n"; $i++; if ($i == $split_index) { print "
$text{'aliases_name'}$text{'aliases_value'}
{'number'}\">$alias->{'name'}$alias->{'value'}
\n"; print "\n"; print " ", "\n"; } } print "
$text{'aliases_name'}$text{'aliases_value'}
\n"; print "
\n"; # new alias form print "
\n"; print "
\n"; print "\n"; print "
$text{'new_aliasmsg'}\n"; print "
\n"; &ui_print_footer("", $text{'index_return'}); print "$which
\n"; print "
\n";