deposit slips
[freeside.git] / httemplate / search / sqlradius.html
1 <% include( '/elements/header.html', 'Search RADIUS sessions' ) %>
2
3 <FORM NAME="OneTrueForm" ACTION="sqlradius.cgi" METHOD="GET">
4 % #include( '/elements/table.html' ) 
5
6 <% ntable('#cccccc') %>
7 <TR>
8   <TD ALIGN="right">Username: </TD>
9   <TD><INPUT TYPE="text" NAME="username"></TD>
10 </TR>
11 <% include( '/elements/tr-checkbox.html',
12             'field' => 'summarize',
13             'label' => 'Summarize',
14             'value' => 'Y',
15           )
16 %>
17 <TR>
18   <TD></TD>
19   <TD><FONT SIZE="-1"><I>(leave blank to show all users)</I></FONT></TD>
20 </TR>
21 % my @part_export = qsearch( 'part_export', { 'exporttype' => 'sqlradius' } );
22 %   push @part_export,
23 %     qsearch( 'part_export', { 'exporttype' => 'sqlradius_withdomain' } );
24 %
25 % if ( grep { ! $_->option('hide_ip') } @part_export ) { 
26
27   <TR>
28     <TD ALIGN="right">IP address: </TD>
29     <TD><INPUT TYPE="text" NAME="ip"></TD>
30   </TR>
31   <TR>
32     <TD></TD>
33     <TD><FONT SIZE="-1"><I>(leave blank to show all IPs)</I></FONT></TD>
34   </TR>
35 % } 
36 % if ( grep { $_->option('show_called_station') } @part_export ) { 
37
38   <TR>
39     <TD ALIGN="right">Destination prefix:</TD>
40     <TD><INPUT TYPE="text" NAME="prefix"></TD>
41   </TR>
42   <TR>
43     <TD></TD>
44     <TD><FONT SIZE="-1"><I>(country code or country code and prefix)</I></FONT></TD>
45   </TR>
46   <TR>
47     <TD></TD>
48     <TD><FONT SIZE="-1"><I>(leave blank to show all destinations)</I></FONT></TD>
49   </TR>
50 % } 
51
52   <TR>
53     <TD>Show:</TD>
54     <TD>
55       <INPUT TYPE="radio" NAME="session_status" VALUE="" onClick="enable_stop(true);" CHECKED>All sessions<BR>
56       <INPUT TYPE="radio" NAME="session_status" VALUE="closed" onClick="enable_stop(true);">Completed sessions<BR>
57       <INPUT TYPE="radio" NAME="session_status" VALUE="open" onClick="enable_stop(false);">Open sessions
58     </TD>
59   </TR>
60
61   <TR>
62     <TH COLSPAN=2>Session start</TD>
63   </TR>
64
65   <% include( '/elements/tr-input-beginning_ending.html',
66                 'prefix'     => 'starttime',
67                 'input_time' => 1,
68             )
69   %>
70
71   <SCRIPT TYPE="text/javascript">
72
73     function enable_stop(value) {
74
75       var f = document.OneTrueForm;
76       if ( value ) {
77         f.stoptime_beginning_text.disabled = false;
78         f.stoptime_ending_text.disabled = false;
79         f.stoptime_beginning_text.style.backgroundColor = '#ffffff';
80         f.stoptime_ending_text.style.backgroundColor = '#ffffff';
81         f.stoptime_beginning_button.style.display = '';
82         f.stoptime_ending_button.style.display = '';
83         f.stoptime_beginning_disabled.style.display = 'none';
84         f.stoptime_ending_disabled.style.display = 'none';
85       } else {
86         f.stoptime_beginning_text.disabled = true;
87         f.stoptime_ending_text.disabled = true;
88         f.stoptime_beginning_text.style.backgroundColor = '#dddddd';
89         f.stoptime_ending_text.style.backgroundColor = '#dddddd';
90         f.stoptime_beginning_button.style.display = 'none';
91         f.stoptime_ending_button.style.display = 'none';
92         f.stoptime_beginning_disabled.style.display = '';
93         f.stoptime_ending_disabled.style.display = '';
94       }
95
96     }
97
98   </SCRIPT>
99
100   <TR>
101     <TH COLSPAN=2>Session end</TD>
102   </TR>
103
104   <% include( '/elements/tr-input-beginning_ending.html',
105                 'prefix'     => 'stoptime',
106                 'input_time' => 1,
107             )
108   %>
109
110 </TABLE>
111 <BR><INPUT TYPE="submit" VALUE="View sessions">
112 </FORM>
113
114 <% include('/elements/footer.html') %>
115 <%init>
116
117 die "access denied"
118   unless $FS::CurrentUser::CurrentUser->access_right('List rating data');
119
120 </%init>