-<%= include( '/elements/header.html', 'Search RADIUS sessions', '', '', '
-<LINK REL="stylesheet" TYPE="text/css" HREF="../elements/calendar-win2k-2.css" TITLE="win2k-2">
-<SCRIPT TYPE="text/javascript" SRC="../elements/calendar_stripped.js"></SCRIPT>
-<SCRIPT TYPE="text/javascript" SRC="../elements/calendar-en.js"></SCRIPT>
-<SCRIPT TYPE="text/javascript" SRC="../elements/calendar-setup.js"></SCRIPT>
-') %>
-<FORM NAME="OneTrueForm" ACTION="sqlradius.cgi" METHOD="POST">
-<% #include( '/elements/table.html' ) %>
-<%= ntable('#cccccc') %>
+<% include( '/elements/header.html', 'Search RADIUS sessions' ) %>
+
+<FORM NAME="OneTrueForm" ACTION="sqlradius.cgi" METHOD="GET">
+% #include( '/elements/table.html' )
+
+<% ntable('#cccccc') %>
<TR>
<TD ALIGN="right">Username: </TD>
<TD><INPUT TYPE="text" NAME="username"></TD>
<TD></TD>
<TD><FONT SIZE="-1"><I>(leave blank to show all users)</I></FONT></TD>
</TR>
+% my @part_export = qsearch( 'part_export', { 'exporttype' => 'sqlradius' } );
+% push @part_export,
+% qsearch( 'part_export', { 'exporttype' => 'sqlradius_withdomain' } );
+%
+% if ( grep { ! $_->option('hide_ip') } @part_export ) {
-<% my @part_export = qsearch( 'part_export', { 'exporttype' => 'sqlradius' } );
- push @part_export,
- qsearch( 'part_export', { 'exporttype' => 'sqlradius_withdomain' } );
-%>
-
-<% if ( grep { ! $_->option('hide_ip') } @part_export ) { %>
<TR>
<TD ALIGN="right">IP address: </TD>
<TD><INPUT TYPE="text" NAME="ip"></TD>
<TD></TD>
<TD><FONT SIZE="-1"><I>(leave blank to show all IPs)</I></FONT></TD>
</TR>
-<% } %>
+% }
+% if ( grep { $_->option('show_called_station') } @part_export ) {
-<% if ( grep { $_->option('show_called_station') } @part_export ) { %>
<TR>
<TD ALIGN="right">Destination prefix:</TD>
<TD><INPUT TYPE="text" NAME="prefix"></TD>
<TR>
<TD></TD>
<TD><FONT SIZE="-1"><I>(country code or country code and prefix)</I></FONT></TD>
+ </TR>
+ <TR>
+ <TD></TD>
<TD><FONT SIZE="-1"><I>(leave blank to show all destinations)</I></FONT></TD>
</TR>
-<% } %>
+% }
+
+
+<% include( '/elements/tr-input-beginning_ending.html', 'input_time'=>1 ) %>
-<TR>
- <TD ALIGN="right">From: </TD>
- <TD>
- <INPUT TYPE="text" NAME="beginning" ID="beginning_text" VALUE="" SIZE=11 MAXLENGTH=10> <IMG SRC="../images/calendar.png" ID="beginning_button" STYLE="cursor: pointer" TITLE="Select date">
- </TD>
- <SCRIPT TYPE="text/javascript">
- Calendar.setup({
- inputField: "beginning_text",
- ifFormat: "%m/%d/%Y",
- button: "beginning_button",
- align: "BR"
- });
- </SCRIPT>
-</TR>
-<TR>
- <TD></TD>
- <TD><i>m/d/y</i></TD>
-</TR>
-<TR>
- <TD ALIGN="right">To: </TD>
- <TD>
- <INPUT TYPE="text" NAME="ending" ID="ending_text" VALUE="" SIZE=11 MAXLENGTH=10> <IMG SRC="../images/calendar.png" ID="ending_button" STYLE="cursor:pointer" TITLE="Select date">
- </TD>
- <SCRIPT TYPE="text/javascript">
- Calendar.setup({
- inputField: "ending_text",
- ifFormat: "%m/%d/%Y",
- button: "ending_button",
- align: "BR"
- });
- </SCRIPT>
-</TR>
-<TR>
- <TD></TD>
- <TD><i>m/d/y</i>
- <BR><FONT SIZE="-1">(leave one or both dates blank for an open-ended search)</FONT>
- </TD>
-</TR>
</TABLE>
<BR><INPUT TYPE="submit" VALUE="View sessions">
</FORM>
-</BODY>
-</HTML>
+<% include('/elements/footer.html') %>
+<%init>
+
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('List rating data');
+</%init>