| Server IP : 104.21.25.180 / Your IP : 162.159.115.41 Web Server : Apache/2.4.37 System : Linux almalinux.duckdns.org 4.18.0-553.111.1.el8_10.x86_64 #1 SMP Sun Mar 8 20:06:07 EDT 2026 x86_64 User : ricodeal ( 1046) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/libexec/webmin/mailcap/ |
Upload File : |
#!/usr/bin/perl
# Show current mailcap entries
require './mailcap-lib.pl';
&ui_print_header(undef, $text{'index_title'}, "", undef, 1, 1);
@mailcap = &list_mailcap();
if (@mailcap) {
print &ui_form_start("delete.cgi", "post");
@links = ( &select_all_link("d"),
&select_invert_link("d"),
&ui_link("edit.cgi?new=1", $text{'index_add'}) );
print &ui_links_row(\@links);
@tds = ( "width=5" );
print &ui_columns_start([
"",
$text{'index_type'},
$text{'index_program'},
$text{'index_cmt'},
$text{'index_enabled'},
], 100, 0, \@tds);
foreach $m (@mailcap) {
print &ui_checked_columns_row([
&ui_link("edit.cgi?index=".$m->{'index'}, $m->{'type'}),
&html_escape($m->{'program'}),
&html_escape($m->{'cmt'} || $m->{'args'}->{'description'}),
$m->{'enabled'} ? $text{'yes'} :
"<font color=#ff0000>$text{'no'}</font>",
], \@tds, "d", $m->{'index'});
}
print &ui_columns_end();
print &ui_links_row(\@links);
print &ui_form_end([ [ "delete", $text{'index_delete'} ],
undef,
[ "disable", $text{'index_disable'} ],
[ "enable", $text{'index_enable'} ] ]);
}
else {
print "<b>$text{'index_none'}</b><p>\n";
print &ui_link("edit.cgi?new=1", $text{'index_add'});
print "<p>\n";
}
&ui_print_footer("/", $text{'index'});