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') %>
7 <FONT SIZE=4>Service usage details for
8 <%= Date::Format::time2str('%b %o %Y', $beginning) %> -
9 <%= Date::Format::time2str('%b %o %Y', $ending) %>
13 $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">$error</FONT><BR><BR>!;
19 <%= if ($previous < $beginning) {
20 $OUT .= qq!<A HREF="${url}view_usage_details;svcnum=$svcnum;beginning=!;
21 $OUT .= qq!$previous;ending=$beginning">Previous period</A>!;
26 <TD WIDTH="50%" ALIGN="right">
27 <%= if ($next > $ending) {
28 $OUT .= qq!<A HREF="${url}view_usage_details;svcnum=$svcnum;beginning=!;
29 $OUT .= qq!$ending;ending=$next">Next period</A>!;
36 <TABLE BGCOLOR="#cccccc">
38 <TH ALIGN="left">Account</TH>
39 <TH ALIGN="right">Start Time</TH>
40 <TH ALIGN="right">Duration</TH>
41 <TH ALIGN="right">Upload</TH>
42 <TH ALIGN="right">Download</TH>
47 foreach my $usage ( @usage ) {
49 $OUT .= $usage->{'username'};
50 $OUT .= '</TD><TD ALIGN="right">';
51 $OUT .= Date::Format::time2str('%T%P %a %b %o %Y', $usage->{'acctstarttime'});
52 $OUT .= '</TD><TD ALIGN="right">';
53 my $duration = $usage->{'acctstoptime'} - $usage->{'acctstarttime'};
55 my $h = int($duration/3600);
56 my $m = sprintf("%02d", int(($duration % 3600) / 60));
57 my $s = sprintf("%02d", $duration % 60);
59 $OUT .= '</TD><TD ALIGN="right">';
60 $OUT .= Number::Format::format_bytes($usage->{'acctinputoctets'}, precision => 2);
61 $utotal += $usage->{'acctinputoctets'};
62 $OUT .= '</TD><TD ALIGN="right">';
63 $OUT .= Number::Format::format_bytes($usage->{'acctoutputoctets'}, precision => 2);
64 $dtotal += $usage->{'acctoutputoctets'};
67 my $h = int($total/3600);
68 my $m = sprintf("%02d", int(($total % 3600) / 60));
69 my $s = sprintf("%02d", $total % 60);
70 $OUT .= qq!<TR><TD></TD><TD></TD>!;
71 $OUT .= qq!<TD ALIGN="right"><HR></TD>! x 3;
73 $OUT .= qq!<TR><TD></TD><TD></TD><TD ALIGN="right">$h:$m:$s</TD>!;
74 $OUT .= qq!<TD ALIGN="right">!;
75 $OUT .= Number::Format::format_bytes($utotal, precision => 2). qq!</TD>!;
76 $OUT .= qq!<TD ALIGN="right">!;
77 $OUT .= Number::Format::format_bytes($dtotal, precision => 2). qq!</TD>!;
85 <FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT>