1 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
3 <TD VALIGN="top" BGCOLOR="<%= $menu_bgcolor || $box_bgcolor || '#c0c0c0' %>">
5 <TABLE CELLSPACING=0 BORDER=0 HEIGHT="100%">
9 if ( $menu_top_image ) {
10 $OUT .= '<TR><TD STYLE="padding:0px"><IMG SRC="image.cgi?menu_top_image"></TD></TR>';
15 { title=>'Overview', url=>'myaccount', size=>'+1', },
17 { title=>'Purchase', size=>'+1', },
20 unless ( $access_pkgnum ) {
22 { title=>'Purchase additional package',
23 url=>'customer_order_pkg', 'indent'=>2 };
26 if ( $balance > 0 ) { #XXXFIXME "enable selfservice prepay features" flag or something, eventually per-pkg or something really fancy
28 #XXXFIXME still a bit sloppy for multi-gateway of differing namespace
30 while($i < scalar(@cust_paybys)) { last if $cust_paybys[$i] =~ /^CARD/; $i++ }
31 if ( $cust_paybys[$i] && $cust_paybys[$i] =~ /^CARD/ ) {
32 push @menu, { title => 'Recharge my account with a credit card',
33 url => $hide_payment_fields[$i]
34 ? 'make_thirdparty_payment&payby_method=CC'
41 while($i < scalar(@cust_paybys)) { last if $cust_paybys[$i] =~ /^CHEK/; $i++ }
42 if ( $cust_paybys[$i] && $cust_paybys[$i] =~ /^CHEK/ ) {
43 push @menu, { title => 'Recharge my account with a check',
44 url => $hide_payment_fields[$i]
45 ? 'make_thirdparty_payment&payby_method=ECHECK'
51 push @menu, { title => 'Recharge my account with a prepaid card',
52 url => 'recharge_prepay',
55 if grep(/^PREP/, @cust_paybys);
61 { title=>'View my usage', url=>'view_usage', size=>'+1', },
62 { title=>'Create a ticket', url=>'tktcreate', size=>'+1', },
65 unless ( $access_pkgnum ) {
67 { title=>'Setup my services', url=>'provision', size=>'+1', },
75 { title=>'Change my information', size=>'+1', };
77 unless ( $access_pkgnum ) {
79 { title=>'Change billing address', url=>'change_bill', indent=>2 },
80 { title=>'Change service address', url=>'change_ship', indent=>2 },
81 { title=>'Change payment information', url=>'change_pay', indent=>2 },
86 { title=>'Change password(s)', url=>'change_password', indent=>2 },
88 { title=>'Logout', url=>'logout', size=>'+1', },
91 my %menu_disable = map { $_=>1 } @menu_disable;
92 foreach my $item ( @menu ) {
94 next if ( $menu_skipblanks && $item->{'title'} =~ /^\s*$/ )
95 || ( $menu_skipheadings && ! $item->{'url'} )
96 || $menu_disable{$item->{'title'}};
99 if ( $menu_body_image ) {
100 if ( exists $item->{'url'} && $action eq $item->{'url'} ) {
101 $OUT .= #' BGCOLOR="'. ( $body_bgcolor || '#eeeeee' ). '" '.
102 ' STYLE="background: url(image.cgi?menu_body_image) 0 bottom; '.
103 ' color:#3366CC"; '. #XXX config
106 $OUT .= ' STYLE="background: url(image.cgi?menu_body_image) 0 bottom" ';
109 if ( exists $item->{'url'} && $action eq $item->{'url'} ) {
110 $OUT .= ' BGCOLOR="'. ( $body_bgcolor || '#eeeeee' ). '" '.
111 ' STYLE="border-top: 1px solid black;'.
112 ' border-left: 1px solid black;'.
113 ' border-bottom: 1px solid black"';
115 $OUT .= ' STYLE="border-right: 1px solid black"';
120 if ( $menu_skipheadings ) {
121 $OUT .= ' ';
123 $OUT .= ' ' x $item->{'indent'}
124 if exists $item->{'indent'};
127 $OUT .= '<A HREF="'. $url. $item->{'url'}. '">'
128 if exists $item->{'url'} && $action ne $item->{'url'};
130 $OUT .= '<FONT SIZE="'. ( $menu_fontsize || $item->{'size'} ). '">'
131 if $menu_fontsize || exists($item->{'size'});
133 $item->{'title'} =~ s/ / /g;
134 $OUT .= $item->{'title'};
137 if exists $item->{'size'};
140 if exists $item->{'url'} && $action ne $item->{'url'};
142 $OUT .= '</TD></TR>';
146 if ( $menu_bottom_image ) {
147 $OUT .= '<TR><TD STYLE="padding:0px"><IMG SRC="image.cgi?menu_bottom_image"></TD></TR>';
149 $OUT .= '<TR><TD STYLE="border-right: 1px solid black" HEIGHT="100%"><BR><BR><BR><BR></TD></TR>';