]> git.entuzijast.net Git - freeradius-dialup-admin.git/commitdiff
Fix a stupid bug in accounting.php3. We should not use the show_attrs array.
authorkkalev <kkalev>
Mon, 9 Sep 2002 14:28:52 +0000 (14:28 +0000)
committerkkalev <kkalev>
Mon, 9 Sep 2002 14:28:52 +0000 (14:28 +0000)
Changelog
htdocs/accounting.php3

index a035ff1384d4b17e72aa7d6f648497f133acd351..11b05e14b34609e25c01a5c22151c933bdbee230 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -62,6 +62,7 @@ Ver 1.55:
 * Add a user find page. User can be searched based on the full name, department or RADIUS attribute.
   The radius attribute should be included in the _user_ profile, not in a group/regular/default profile.
 * Add support for the user ldap regular profile attribute in user_edit.attrs
+* Fix a stupid bug in accounting.php3. We should not use the show_attrs array.
 Ver 1.54:
 * Add attributes for the sql group tables in admin.conf. Now SQL group support should really work!
 Ver 1.53:
index 15637141ecd190a7c61eeff741fb99740300cd64..27473d62dbd645d38ea51f230d0de8d49f4ac09e 100644 (file)
@@ -22,7 +22,7 @@ EOM;
        exit();
 }
 
-$operators=array( '<', '>', '=', '>=', '<=' );
+$operators=array( '=','<', '>', '<=', '>=' );
 
 $link = @da_sql_pconnect ($config) or die('cannot connect to sql databse');
 $fields = @da_sql_list_fields($config[sql_accounting_table],$link,$config);
@@ -110,7 +110,7 @@ if(!$queryflag) {
 <tr>
 <td>
 <b>Show the following attributes:</b><br>
-<select name="show_attrs[]" size=5 multiple>
+<select name="accounting_show_attrs[]" size=5 multiple>
 EOM;
 foreach($items as $key => $val)
        echo <<<EOM
@@ -202,10 +202,10 @@ while (${"item_of_w$i"}){
 
 $order = ($order_by != '') ? "$order_by" : 'UserName';
 
-foreach ($show_attrs as $val)
+foreach ($accounting_show_attrs as $val)
        $query_view .= $val . ',';
 $query_view = ereg_replace(',$','',$query_view);
-$query="SELECT $query_view FROM $config[sql_accounting_table] $where ORDER BY $order LIMIT $maxresults";
+$query="SELECT $query_view FROM $config[sql_accounting_table] $where ORDER BY $order LIMIT $maxresults;";
 
 echo <<<EOM
 <html>
@@ -232,18 +232,18 @@ echo <<<EOM
        <tr bgcolor="#d0ddb0">
        </tr>
 EOM;
-foreach($show_attrs as $val){
+foreach($accounting_show_attrs as $val){
        $desc = $sql_attrs[$val][desc];
        echo "<th>$desc</th>\n";
 }
 echo "</tr>\n";
 
-       $search = @da_sql_query($link,$config,"$query");
+       $search = @da_sql_query($link,$config,$query);
        if ($search){
                while( $row = @da_sql_fetch_array($search,$config) ){
                        $num++;
                        echo "<tr align=center>\n";
-                       foreach($show_attrs as $val){
+                       foreach($accounting_show_attrs as $val){
                                $info = $row[$val];
                                if ($info == '')
                                        $info = '-';