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 foreach my $item ( @menu ) {
93 next if $menu_skipblanks && $item->{'title'} =~ /^\s*$/;
94 next if $menu_skipheadings && ! $item->{'url'};
97 if ( $menu_body_image ) {
98 if ( exists $item->{'url'} && $action eq $item->{'url'} ) {
99 $OUT .= #' BGCOLOR="'. ( $body_bgcolor || '#eeeeee' ). '" '.
100 ' STYLE="background: url(image.cgi?menu_body_image) 0 bottom; '.
101 ' color:#3366CC"; '. #XXX config
104 $OUT .= ' STYLE="background: url(image.cgi?menu_body_image) 0 bottom" ';
107 if ( exists $item->{'url'} && $action eq $item->{'url'} ) {
108 $OUT .= ' BGCOLOR="'. ( $body_bgcolor || '#eeeeee' ). '" '.
109 ' STYLE="border-top: 1px solid black;'.
110 ' border-left: 1px solid black;'.
111 ' border-bottom: 1px solid black"';
113 $OUT .= ' STYLE="border-right: 1px solid black"';
118 if ( $menu_skipheadings ) {
119 $OUT .= ' ';
121 $OUT .= ' ' x $item->{'indent'}
122 if exists $item->{'indent'};
125 $OUT .= '<A HREF="'. $url. $item->{'url'}. '">'
126 if exists $item->{'url'} && $action ne $item->{'url'};
128 $OUT .= '<FONT SIZE="'. ( $menu_fontsize || $item->{'size'} ). '">'
129 if $menu_fontsize || exists($item->{'size'});
131 $item->{'title'} =~ s/ / /g;
132 $OUT .= $item->{'title'};
135 if exists $item->{'size'};
138 if exists $item->{'url'} && $action ne $item->{'url'};
140 $OUT .= '</TD></TR>';
144 if ( $menu_bottom_image ) {
145 $OUT .= '<TR><TD STYLE="padding:0px"><IMG SRC="image.cgi?menu_bottom_image"></TD></TR>';
147 $OUT .= '<TR><TD STYLE="border-right: 1px solid black" HEIGHT="100%"><BR><BR><BR><BR></TD></TR>';