prepaid download/upload tracking
[freeside.git] / fs_selfservice / FS-SelfService / cgi / view_usage.html
diff --git a/fs_selfservice/FS-SelfService/cgi/view_usage.html b/fs_selfservice/FS-SelfService/cgi/view_usage.html
new file mode 100644 (file)
index 0000000..40aec7b
--- /dev/null
@@ -0,0 +1,49 @@
+<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>
+
+<FORM ACTION="<%= $selfurl %>" METHOD="POST">
+<INPUT TYPE="hidden" NAME="session" VALUE="<%= $session_id %>">
+
+<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 $totalbytes = '';
+    if ( ($svc->{'upbytes'}   + 0) eq $svc->{'upbytes'}
+      || ($svc->{'downbytes'} + 0) eq $svc->{'downbytes'} ) {
+
+      $totalbytes = $svc->{'upbytes'} + $svc->{'downbytes'};
+    }
+
+  $OUT .= '<TR><TD>';
+    $OUT .= $svc->{'label'}. ': '. $svc->{'value'};
+    $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 .= $totalbytes;
+  $OUT .= '</TD></TR>';
+  } %>
+
+</TABLE>
+<BR>
+
+</FORM>
+
+</TD></TR></TABLE>
+<HR>
+<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT>
+</BODY></HTML>