#!/usr/local/bin/perl # list_features.cgi # Display a list of all sendmail features from the M4 file require './sendmail-lib.pl'; require './features-lib.pl'; $features_access || &error($text{'features_ecannot'}); &ui_print_header(undef, $text{'features_title'}, ""); @features = &list_features() if (-r $config{'sendmail_mc'} && -r "$config{'sendmail_features'}/feature"); if (@features) { # Show table of features print &text('features_desc', "$config{'sendmail_mc'}", "$config{'sendmail_cf'}"),"

\n"; print "

\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; local $i = 0; foreach $f (@features) { print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; $i++; } print "
$text{'features_type'}$text{'features_value'}$text{'features_move'}
"; print "" if ($f->{'type'}); print $text{"features_type".$f->{'type'}}; print "" if ($f->{'type'}); print "",$f->{'text'} ? &html_escape($f->{'text'}) : "
","
"; if ($i == @features-1) { print ""; } else { print "", ""; } if ($i == 0) { print ""; } else { print "", ""; } print "
\n"; print "\n"; print "\n"; print "
\n"; print "\n"; print "
\n"; # Show button to rebuild sendmail.cf print &ui_hr(); print "
\n"; print "\n"; print "\n"; print "\n"; print "
",&text('features_buildmsg', "$config{'sendmail_cf'}"), "
\n"; } else { # Features file is not setup yet .. if (!$config{'sendmail_mc'} || !$config{'sendmail_features'}) { print "

",&text('features_econfig', "@{[&get_webprefix()]}/config.cgi?$module_name"),"

\n"; } elsif (!-r $config{'sendmail_mc'}) { print "

",&text('features_emc', "@{[&get_webprefix()]}/config.cgi?$module_name", "$config{'sendmail_mc'}"),"

\n"; } elsif (!-r "$config{'sendmail_features'}/feature") { print "

",&text('features_efeatures', "@{[&get_webprefix()]}/config.cgi?$module_name", "$config{'sendmail_features'}"),"

\n"; } } &ui_print_footer("", $text{'index_return'});