\n"; &ui_print_footer("", $text{'index_return'}); exit; } if (!-r $vfile) { # Text file not found print "",&text('virtusers_efile', "$vfile", "$vdbm", "@{[&get_webprefix()]}/config.cgi?$module_name"),"
\n"; print "",&text('virtusers_createfile', 'create_file.cgi?mode=virtusers'),"
\n"; &ui_print_footer("", $text{'index_return'}); exit; } @virts = &list_virtusers($vfile); if ($access{'vmode'} == 2) { @virts = grep { $_->{'from'} =~ /$access{'vaddrs'}/ } @virts; } elsif ($access{'vmode'} == 3) { @virts = grep { $_->{'from'} =~ /^$remote_user\@/ } @virts; } @virts = grep { $access{"vedit_".&virt_type($_->{'to'})} } @virts; if (!$access{'vcatchall'}) { @virts = grep { $_->{'from'} !~ /^\@/ } @virts; } &virtuser_form(); if ($in{'search'}) { # Restrict to search results @virts = grep { $_->{'from'} =~ /$in{'search'}/i || $_->{'to'} =~ /$in{'search'}/i } @virts; } elsif ($config{'max_records'} && @virts > $config{'max_records'}) { # Show search form print $text{'virtusers_toomany'},"\n"; print "
\n"; } print &text('virtusers_desc1', 'list_aliases.cgi'),"
\n" if ($access{'amode'}); print &text('virtusers_desc2', 'list_cws.cgi'),"\n" if ($access{'cws'}); &ui_print_footer("", $text{'index_return'}); sub virts_table { local @tds = ( "width=5" ); print &ui_columns_start([ "", $text{'virtusers_for'}, $text{'virtusers_to'}, $config{'show_cmts'} ? ( $text{'virtusers_cmt'} ) : ( ) ], 100, 0, \@tds); foreach $m (@_) { local @cols; push(@cols, "{'num'}\">". "".&html_escape($m->{'from'}).""); if ($m->{'to'} =~ /^error:(.*)$/) { push(@cols, &text('virtusers_error', "".&html_escape("$1")."")); } elsif ($m->{'to'} =~ /^\%1\@(\S+)$/) { push(@cols, &text('virtusers_domain', "".&html_escape("$1")."")); } else { push(@cols, &text('virtusers_address', "".&html_escape($m->{'to'})."")); } push(@cols, &html_escape($m->{'cmt'})) if ($config{'show_cmts'}); print &ui_checked_columns_row(\@cols, \@tds, "d", $m->{'from'}); } print &ui_columns_end(); }