Apache-NNTPGateway
view release on metacpan or search on metacpan
NNTPGateway.pm view on Meta::CPAN
'list' => \&action_list,
'last' => \&action_last,
'read' => \&action_read,
'followup' => \&action_followup,
'post' => \&action_post,
'catchup' => \&action_catchup,
);
# Action shown in main menu
my %Menu_Entries_Map =
(
'list' => 1,
'last' => 1,
'post' => 1,
);
# Action that are posting actions....
my %Post_Actions_Map =
(
'post' => 1,
NNTPGateway.pm view on Meta::CPAN
### Sub print_html_menu() ###
# &print_html_menu( request [, action] ):
# - Description:
# - Arguments : the request, the current action.
###
sub print_html_menu ( $\$ ) {
my ($r, $action) = @_;
$action ||= $The_Action;
$r->print( "\n<table width=\"100%\" align=\"center\"><tr><td bgcolor=\"$MENU_BGCOLOR\" align=\"center\">" );
foreach ( keys %Actions_Map ) {
next unless $Menu_Entries_Map{$_};
next if $Disabled_Actions{$_};
my $Aname = &message($_);
$Aname = $_ =~ s/^([a-z]{1,1})/uc( $1 )/e unless $Aname;
if ( $_ eq $action ) {
$r->print( "<font color=\"red\">[ ${Aname} ]</font>" );
} else {
$r->print( "<font color=\"blue\">[ <a href=\"${Base}/$_\">${Aname}</a> ]</font>" );
}
}
$r->print( "</td></tr></table>\n" );
( run in 0.483 second using v1.01-cache-2.11-cpan-49f99fa48dc )