FCC form 477 part II and V issues, RT13057
[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="open_sessions" VALUE="0" onClick="open_changed(this);" CHECKED>Completed sessions<BR>
56       <INPUT TYPE="radio" NAME="open_sessions" VALUE="1" onClick="open_changed(this);">Open sessions
57     </TD>
58   </TR>
59
60   <TR>
61     <TH COLSPAN=2>Session start</TD>
62   </TR>
63
64   <% include( '/elements/tr-input-beginning_ending.html',
65                 'prefix'     => 'starttime',
66                 'input_time' => 1,
67             )
68   %>
69
70   <SCRIPT TYPE="text/javascript">
71
72     function open_changed(what) {
73
74       var value=get_open_value(what); 
75       if ( value == '1' ) {
76         what.form.stoptime_beginning_text.disabled = true;
77         what.form.stoptime_ending_text.disabled = true;
78         what.form.stoptime_beginning_text.style.backgroundColor = '#dddddd';
79         what.form.stoptime_ending_text.style.backgroundColor = '#dddddd';
80         what.form.stoptime_beginning_button.style.display = 'none';
81         what.form.stoptime_ending_button.style.display = 'none';
82         what.form.stoptime_beginning_disabled.style.display = '';
83         what.form.stoptime_ending_disabled.style.display = '';
84       } else if ( value == '0' ) {
85         what.form.stoptime_beginning_text.disabled = false;
86         what.form.stoptime_ending_text.disabled = false;
87         what.form.stoptime_beginning_text.style.backgroundColor = '#ffffff';
88         what.form.stoptime_ending_text.style.backgroundColor = '#ffffff';
89         what.form.stoptime_beginning_button.style.display = '';
90         what.form.stoptime_ending_button.style.display = '';
91         what.form.stoptime_beginning_disabled.style.display = 'none';
92         what.form.stoptime_ending_disabled.style.display = 'none';
93       }
94
95     }
96
97     function get_open_value(what) {
98       var rad_val = '';
99       for (var i=0; i < what.form.open_sessions.length; i++) {
100         if (what.form.open_sessions[i].checked) {
101           var rad_val = what.form.open_sessions[i].value;
102         }
103      }
104      return rad_val;
105    }
106
107   </SCRIPT>
108
109   <TR>
110     <TH COLSPAN=2>Session end</TD>
111   </TR>
112
113   <% include( '/elements/tr-input-beginning_ending.html',
114                 'prefix'     => 'stoptime',
115                 'input_time' => 1,
116             )
117   %>
118
119 </TABLE>
120 <BR><INPUT TYPE="submit" VALUE="View sessions">
121 </FORM>
122
123 <% include('/elements/footer.html') %>
124 <%init>
125
126 die "access denied"
127   unless $FS::CurrentUser::CurrentUser->access_right('List rating data');
128
129 </%init>