-<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 for
-<%= Date::Format::time2str('%b %o %Y', $beginning) %> -
-<%= Date::Format::time2str('%b %o %Y', $ending) %>
-</FONT><BR><BR>
+<%= $url = "$selfurl?;action="; ''; %>
+<%= include('header', 'Service usage details for '.
+ Date::Format::time2str('%b %o %Y', $beginning).
+ ' - '.
+ Date::Format::time2str('%b %o %Y', $ending)
+ )
+%>
<%= if ( $error ) {
$OUT .= qq!<FONT SIZE="+1" COLOR="#ff0000">$error</FONT><BR><BR>!;
$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'};
+ my $duration = ( $usage->{'acctstoptime'} && $usage->{'acctstarttime'} )
+ ? ( $usage->{'acctstoptime'} - $usage->{'acctstarttime'} )
+ : 0;
$total += $duration;
my $h = int($duration/3600);
my $m = sprintf("%02d", int(($duration % 3600) / 60));
</TABLE>
<BR>
-</TD></TR></TABLE>
-<HR>
-<FONT SIZE="-2">powered by <a href="http://www.sisd.com/freeside">freeside</a></FONT>
-</BODY></HTML>
+<%= include('footer') %>