summaryrefslogtreecommitdiff
path: root/fs_selfservice/FS-SelfService/cgi/view_usage.html
blob: b78f9975b3e29ffed5218d9e9c75b9d2c35323e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<HTML><HEAD><TITLE>MyAccount</TITLE></HEAD>
<BODY BGCOLOR="#eeeeee"><FONT SIZE=5>MyAccount</FONT><BR><BR>
<%= $url = "$selfurl?session=$session_id;action="; ''; %>
<%= include('myaccount_menu') %>
<TD VALIGN="top">

<FONT SIZE=4>Service usage</FONT><BR><BR>

<%= if ( $error ) {
  $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">$error</FONT><BR><BR>!;
} ''; %>

<TABLE BGCOLOR="#cccccc">
  <TR>
    <TH ALIGN="left">Account</TH>
    <TH ALIGN="right">Time remaining</TH>
    <TH ALIGN="right">Upload remaining</TH>
    <TH ALIGN="right">Download remaining</TH>
    <TH ALIGN="right">Total remaining</TH>
  </TR>
<%= foreach my $svc ( @svcs ) {
      my $link = "${url}view_usage_details;".
        "svcnum=$svc->{'svcnum'};beginning=0;ending=0";
  $OUT .= '<TR><TD>';
    $OUT .= qq!<A HREF="$link">!. $svc->{'label'}. ': '. $svc->{'value'}.'</A>';
    $OUT .= '</TD><TD ALIGN="right">';
    $OUT .= $svc->{'seconds'};
    $OUT .= '</TD><TD ALIGN="right">';
    $OUT .=  $svc->{'upbytes'};
    $OUT .= '</TD><TD ALIGN="right">';
    $OUT .= $svc->{'downbytes'};
    $OUT .= '</TD><TD ALIGN="right">';
    $OUT .= $svc->{'totalbytes'};
  $OUT .= '</TD></TR>';
    if ( $svc->{'recharge_amount'} ) {
      my $link = "${url}process_order_recharge;".
                 "svcnum=$svc->{'svcnum'}";
    $OUT .= '<TR><TD ALIGN="right">';
      $OUT .= qq!<A HREF="$link">!.'Recharge for $';
      $OUT .= $svc->{'recharge_amount'} . '</A> with';
      $OUT .= '</TD><TD ALIGN="right">';
      $OUT .= $svc->{'recharge_seconds'} if $svc->{'recharge_seconds'};
      $OUT .= '</TD><TD ALIGN="right">';
      $OUT .=  $svc->{'recharge_upbytes'} if $svc->{'recharge_upbytes'};
      $OUT .= '</TD><TD ALIGN="right">';
      $OUT .= $svc->{'recharge_downbytes'} if $svc->{'recharge_downbytes'};
      $OUT .= '</TD><TD ALIGN="right">';
      $OUT .= $svc->{'recharge_totalbytes'} if $svc->{'recharge_totalbytes'};
    $OUT .= '</TD></TR>';
    }
  } %>

</TABLE>
<BR>

</TD></TR></TABLE>

<%= include('footer') %>