Merge branch 'github/pr/57'
[freeside.git] / httemplate / search / report_sqlradius_usage.html
1 %# some overlap with report_sqlradius_usage_custnum.html
2 <& /elements/header.html, mt($title) &>
3
4 <FORM ACTION="sqlradius_usage.html" METHOD="GET">
5
6 <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
7
8 <& /elements/tr-select-agent.html,
9   'empty_label'   => 'all',
10 &>
11
12 %#more future-proof to actually ask all exports if they ->can('usage_sessions')
13 % my @exporttypes = qw( sqlradius sqlradius_withdomain broadband_sqlradius
14 %                       phone_sqlradius radiator
15 %                     );
16 <& /elements/tr-select-table.html,
17   'label'         => 'Export',
18   'table'         => 'part_export',
19   'name_col'      => 'label',
20   'hashref'       => {},
21   'extra_sql'     => ' WHERE exporttype IN ( '.
22                                             join(',', map "'$_'", @exporttypes).
23                                           ')',
24   'disable_empty' => 1,
25   'order_by'      => 'ORDER BY exportnum',
26 &>
27
28 <& /elements/tr-input-beginning_ending.html &>
29
30 </TABLE>
31
32 <BR>
33 <INPUT TYPE="submit" VALUE="<% mt('Get Report') |h %>">
34
35 </FORM>
36
37 <& /elements/footer.html &>
38 <%init>
39
40 die "access denied"
41   unless $FS::CurrentUser::CurrentUser->access_right('Usage: RADIUS sessions');
42   # yes?
43
44 my $title = 'Data Usage Report';
45
46 </%init>