summaryrefslogtreecommitdiff
path: root/fs_selfservice/FS-SelfService/cgi/view_cdr_details.html
blob: 40eed80d8bb919eceefc7bd49db168973f19d8f9 (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
59
60
61
62
<%= include('header', ($inbound ? 'Received calls' : 'Dialed calls' ) . 
                       ' for '.
                       Date::Format::time2str('%b&nbsp;%o&nbsp;%Y', $beginning).
                       ' - '.
                       Date::Format::time2str('%b&nbsp;%o&nbsp;%Y', $ending)
           )
%>

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

<TABLE WIDTH="100%">
  <TR>
    <TD WIDTH="50%">
<%=
    $ahref = qq!<A HREF="${url}view_cdr_details;svcnum=$svcnum;!;
    $ahref = qq!inbound=1;! if $inbound;
    if ($previous < $beginning) {
      $OUT .= $ahref.
              qq!beginning=$previous;ending=$beginning">Previous period</A>!;
    } else {
      '';
    }
%>
    </TD>
    <TD  WIDTH="50%" ALIGN="right">
<%= 
    if ($next > $ending) {
      $OUT .= $ahref. qq!beginning=$ending;ending=$next">Next period</A>!;
    } else {
      '';
    }
%>
    </TD>
  </TR>
</TABLE>
<TABLE BGCOLOR="#cccccc">
  <TR>
<%= $space = '<TD>&nbsp;</TD>';
  $OUT .= join($space, 
    map { '<TH ALIGN="right">'.$_.'</TH>' } 
    @header
  )
%>
  </TR>
<%= my $total = 0;
    my $utotal = 0;
    my $dtotal = 0;
    foreach my $usage ( @usage ) {
      $OUT .= '<TR>';
      $OUT .= join($space,
        map { "<TD>$_</TD>" } @{$usage}
      );
      $OUT .= '</TR>';
    }
%>

</TABLE>
<BR>

<%= include('footer') %>