skin up self-service according to config passed from backend, RT#5530
[freeside.git] / fs_selfservice / FS-SelfService / cgi / myaccount.html
1 <%= $url = "$selfurl?session=$session_id;action="; ''; %>
2 <%= include('header') %>
3
4 Hello <%= $name %>!<BR><BR>
5 <%= $small_custview %>
6 <BR>
7 <%= if ( $balance > 0 ) {
8   if (scalar(grep $_, @hide_payment_field)) {
9     $OUT .= qq! <B><A HREF="${url}make_payment">Make a payment</A></B><BR><BR>!;
10   } else {
11     $OUT .= qq! <B><A HREF="${url}make_thirdparty_payment&payby_method=CC">Make a payment</A></B><BR><BR>!;
12   }
13 } %>
14 <%=
15   if ( @open_invoices ) {
16     $OUT .= '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 BGCOLOR="#eeeeee">'.
17             '<TR><TH BGCOLOR="#ff6666" COLSPAN=5>Open Invoices</TH></TR>';
18     my $link = qq!<A HREF="<%= $url %>myaccount!;
19     my $col1 = "ffffff";
20     my $col2 = "dddddd";
21     my $col = $col1;
22
23     foreach my $invoice ( @open_invoices ) {
24       my $td = qq!<TD BGCOLOR="#$col">!;
25       my $a=qq!<A HREF="${url}view_invoice;invnum=!. $invoice->{'invnum'}. '">';
26       $OUT .=
27         "<TR>$td${a}Invoice #". $invoice->{'invnum'}. "</A></TD>$td</TD>".
28         "$td$a". $invoice->{'date'}. "</A></TD>$td</TD>".
29         qq!<TD BGCOLOR="#$col" ALIGN="right">$a\$!. $invoice->{'owed'}.
30           '</A></TD>'.
31         '</TR>';
32       $col = $col eq $col1 ? $col2 : $col1;
33     }
34     $OUT .= '</TABLE><BR>';
35   } else {
36     $OUT .= 'You have no outstanding invoices.<BR><BR>';
37   }
38 %>
39
40 <%=
41   if ( @support_services ) {
42     $OUT .= '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 BGCOLOR="#eeeeee">'.
43             '<TR><TH BGCOLOR="#ff6666" COLSPAN="3">Support Time Remaining</TH>'.
44             '</TR><TR><TH ALIGN="left">#</TH><TH>Package</TH>'.
45             '<TH>Time Remaining</TH></TR>';
46     my $col1 = "ffffff";
47     my $col2 = "dddddd";
48     my $col = $col1;
49
50     foreach my $support ( @support_services ) {
51       my $td = qq!<TD BGCOLOR="#$col">!;
52       my $a = qq!<A HREF="${url}view_support_details;svcnum=!.
53               $support->{'svcnum'}. '">';
54       $OUT .=
55         "<TR>$td$a". $support->{'pkgnum'}. "</A></TD>".
56         $td.$a. $support->{'pkg'}. "</A></TD>".
57         $td.$a. $support->{'time'}. "</A></TD>".
58         '</TR>';
59       $col = $col eq $col1 ? $col2 : $col1;
60     }
61     $OUT .= '</TABLE><BR>';
62   } else {
63     $OUT .= '';
64   }
65 %>
66
67 <%=
68   if ( @tickets ) {
69     $OUT .= '<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 BGCOLOR="#eeeeee">'.
70             '<TR><TH BGCOLOR="#ff6666" COLSPAN=5>Open Tickets</TH></TR>'.
71             '<TR><TH>#</TH><TH>Subject</TH><TH>Priority</TH><TH>Queue</TH>'.
72             '<TH>Status</TH></TR>';
73     my $col1 = "ffffff";
74     my $col2 = "dddddd";
75     my $col = $col1;
76
77     foreach my $ticket ( @tickets ) {
78       my $td = qq!<TD BGCOLOR="#$col">!;
79       $OUT .=
80         "<TR>$td". $ticket->{'id'}. "</TD>".
81         $td. $ticket->{'subject'}. "</TD>".
82         $td. ($ticket->{'content'} || $ticket->{'priority'}). "</TD>".
83         $td. $ticket->{'queue'}. "</TD>".
84         $td. $ticket->{'status'}. "</TD>".
85         '</TR>';
86       $col = $col eq $col1 ? $col2 : $col1;
87     }
88     $OUT .= '</TABLE>';
89   } else {
90     $OUT .= '';
91   }
92 %>
93
94 <%= include('footer') %>