diff options
Diffstat (limited to 'fs_selfservice/FS-SelfService/cgi/view_usage_details.html')
-rw-r--r-- | fs_selfservice/FS-SelfService/cgi/view_usage_details.html | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/fs_selfservice/FS-SelfService/cgi/view_usage_details.html b/fs_selfservice/FS-SelfService/cgi/view_usage_details.html new file mode 100644 index 000000000..9067755b0 --- /dev/null +++ b/fs_selfservice/FS-SelfService/cgi/view_usage_details.html @@ -0,0 +1,66 @@ +<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 details</FONT><BR><BR> + +<%= if ( $error ) { + $OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">$error</FONT><BR><BR>!; +} ''; %> + +<TABLE WIDTH="100%"> + <TR> + <TD WIDTH="50%"> +<%= if ($previous < $beginning) { + $OUT .= qq!<A HREF="${url}view_usage_details;svcnum=$svcnum;beginning=!; + $OUT .= qq!$previous;ending=$beginning">Previous period</A>!; + }else{ + ''; + } %> + </TD> + <TD WIDTH="50%" ALIGN="right"> +<%= if ($next > $ending) { + $OUT .= qq!<A HREF="${url}view_usage_details;svcnum=$svcnum;beginning=!; + $OUT .= qq!$ending;ending=$next">Next period</A>!; + }else{ + ''; + }%> + </TD> + </TR> +</TABLE> +<TABLE BGCOLOR="#cccccc"> + <TR> + <TH ALIGN="left">Account</TH> + <TH ALIGN="right">Start Time</TH> + <TH ALIGN="right">Duration</TH> + </TR> +<%= my $total = 0; + foreach my $usage ( @usage ) { + $OUT .= '<TR><TD>'; + $OUT .= $usage->{'username'}; + $OUT .= '</TD><TD ALIGN="right">'; + $OUT .= Date::Format::time2str('%T%P %a %b %o %Y', $usage->{'acctstarttime'}); + $OUT .= '</TD><TD ALIGN="right">'; + my $duration = $usage->{'acctstoptime'} - $usage->{'acctstarttime'}; + $total += $duration; + my $h = int($duration/3600); + my $m = sprintf("%02d", int(($duration % 3600) / 60)); + my $s = sprintf("%02d", $duration % 60); + $OUT .= "$h:$m:$s"; + $OUT .= '</TD></TR>'; + } + my $h = int($total/3600); + my $m = sprintf("%02d", int(($total % 3600) / 60)); + my $s = sprintf("%02d", $total % 60); + $OUT .= qq!<TR><TD></TD><TD></TD><TD ALIGN="right">========</TD></TR>!; + $OUT .= qq!<TR><TD></TD><TD></TD><TD ALIGN="right">$h:$m:$s</TD></TR>!; %> + +</TABLE> +<BR> + +</TD></TR></TABLE> +<HR> +<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT> +</BODY></HTML> |