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