link new tax report to cust_credit_bill_pkg for credits, RT#12332
[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 <TR>
12   <TD></TD>
13   <TD><FONT SIZE="-1"><I>(leave blank to show all users)</I></FONT></TD>
14 </TR>
15 % my @part_export = qsearch( 'part_export', { 'exporttype' => 'sqlradius' } );
16 %   push @part_export,
17 %     qsearch( 'part_export', { 'exporttype' => 'sqlradius_withdomain' } );
18 %
19 % if ( grep { ! $_->option('hide_ip') } @part_export ) { 
20
21   <TR>
22     <TD ALIGN="right">IP address: </TD>
23     <TD><INPUT TYPE="text" NAME="ip"></TD>
24   </TR>
25   <TR>
26     <TD></TD>
27     <TD><FONT SIZE="-1"><I>(leave blank to show all IPs)</I></FONT></TD>
28   </TR>
29 % } 
30 % if ( grep { $_->option('show_called_station') } @part_export ) { 
31
32   <TR>
33     <TD ALIGN="right">Destination prefix:</TD>
34     <TD><INPUT TYPE="text" NAME="prefix"></TD>
35   </TR>
36   <TR>
37     <TD></TD>
38     <TD><FONT SIZE="-1"><I>(country code or country code and prefix)</I></FONT></TD>
39   </TR>
40   <TR>
41     <TD></TD>
42     <TD><FONT SIZE="-1"><I>(leave blank to show all destinations)</I></FONT></TD>
43   </TR>
44 % } 
45
46   <TR>
47     <TD>Show:</TD>
48     <TD>
49       <INPUT TYPE="radio" NAME="open_sessions" VALUE="0" onClick="open_changed(this);" CHECKED>Completed sessions<BR>
50       <INPUT TYPE="radio" NAME="open_sessions" VALUE="1" onClick="open_changed(this);">Open sessions
51     </TD>
52   </TR>
53
54   <TR>
55     <TH COLSPAN=2>Session start</TD>
56   </TR>
57
58   <% include( '/elements/tr-input-beginning_ending.html',
59                 'prefix'     => 'starttime',
60                 'input_time' => 1,
61             )
62   %>
63
64   <SCRIPT TYPE="text/javascript">
65
66     function open_changed(what) {
67
68       var value=get_open_value(what); 
69       if ( value == '1' ) {
70         what.form.stoptime_beginning_text.disabled = true;
71         what.form.stoptime_ending_text.disabled = true;
72         what.form.stoptime_beginning_text.style.backgroundColor = '#dddddd';
73         what.form.stoptime_ending_text.style.backgroundColor = '#dddddd';
74         what.form.stoptime_beginning_button.style.display = 'none';
75         what.form.stoptime_ending_button.style.display = 'none';
76         what.form.stoptime_beginning_disabled.style.display = '';
77         what.form.stoptime_ending_disabled.style.display = '';
78       } else if ( value == '0' ) {
79         what.form.stoptime_beginning_text.disabled = false;
80         what.form.stoptime_ending_text.disabled = false;
81         what.form.stoptime_beginning_text.style.backgroundColor = '#ffffff';
82         what.form.stoptime_ending_text.style.backgroundColor = '#ffffff';
83         what.form.stoptime_beginning_button.style.display = '';
84         what.form.stoptime_ending_button.style.display = '';
85         what.form.stoptime_beginning_disabled.style.display = 'none';
86         what.form.stoptime_ending_disabled.style.display = 'none';
87       }
88
89     }
90
91     function get_open_value(what) {
92       var rad_val = '';
93       for (var i=0; i < what.form.open_sessions.length; i++) {
94         if (what.form.open_sessions[i].checked) {
95           var rad_val = what.form.open_sessions[i].value;
96         }
97      }
98      return rad_val;
99    }
100
101   </SCRIPT>
102
103   <TR>
104     <TH COLSPAN=2>Session end</TD>
105   </TR>
106
107   <% include( '/elements/tr-input-beginning_ending.html',
108                 'prefix'     => 'stoptime',
109                 'input_time' => 1,
110             )
111   %>
112
113 </TABLE>
114 <BR><INPUT TYPE="submit" VALUE="View sessions">
115 </FORM>
116
117 <% include('/elements/footer.html') %>
118 <%init>
119
120 die "access denied"
121   unless $FS::CurrentUser::CurrentUser->access_right('List rating data');
122
123 </%init>