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 ( 1 ) { #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] =~ /^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] =~ /^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', },
64 unless ( $access_pkgnum ) {
66 { title=>'Setup my services', url=>'provision', size=>'+1', },
74 { title=>'Change my information', size=>'+1', };
76 unless ( $access_pkgnum ) {
78 { title=>'Change billing address', url=>'change_bill', indent=>2 },
79 { title=>'Change service address', url=>'change_ship', indent=>2 },
80 { title=>'Change payment information', url=>'change_pay', indent=>2 },
85 { title=>'Change password(s)', url=>'change_password', indent=>2 },
87 { title=>'Logout', url=>'logout', size=>'+1', },
90 foreach my $item ( @menu ) {
92 next if $menu_skipblanks && $item->{'title'} =~ /^\s*$/;
93 next if $menu_skipheadings && ! $item->{'url'};
96 if ( $menu_body_image ) {
97 if ( exists $item->{'url'} && $action eq $item->{'url'} ) {
98 $OUT .= #' BGCOLOR="'. ( $body_bgcolor || '#eeeeee' ). '" '.
99 ' STYLE="background: url(image.cgi?menu_body_image) 0 bottom; '.
100 ' color:#3366CC"; '. #XXX config
103 $OUT .= ' STYLE="background: url(image.cgi?menu_body_image) 0 bottom" ';
106 if ( exists $item->{'url'} && $action eq $item->{'url'} ) {
107 $OUT .= ' BGCOLOR="'. ( $body_bgcolor || '#eeeeee' ). '" '.
108 ' STYLE="border-top: 1px solid black;'.
109 ' border-left: 1px solid black;'.
110 ' border-bottom: 1px solid black"';
112 $OUT .= ' STYLE="border-right: 1px solid black"';
117 if ( $menu_skipheadings ) {
118 $OUT .= ' ';
120 $OUT .= ' ' x $item->{'indent'}
121 if exists $item->{'indent'};
124 $OUT .= '<A HREF="'. $url. $item->{'url'}. '">'
125 if exists $item->{'url'} && $action ne $item->{'url'};
127 $OUT .= '<FONT SIZE="'. ( $menu_fontsize || $item->{'size'} ). '">'
128 if $menu_fontsize || exists($item->{'size'});
130 $item->{'title'} =~ s/ / /g;
131 $OUT .= $item->{'title'};
134 if exists $item->{'size'};
137 if exists $item->{'url'} && $action ne $item->{'url'};
139 $OUT .= '</TD></TR>';
143 if ( $menu_bottom_image ) {
144 $OUT .= '<TR><TD STYLE="padding:0px"><IMG SRC="image.cgi?menu_bottom_image"></TD></TR>';
146 $OUT .= '<TR><TD STYLE="border-right: 1px solid black" HEIGHT="100%"><BR><BR><BR><BR></TD></TR>';