From ruff@olimp.ua Fri Jun 8 13:42:54 2007 From: "Ruslan N. Marchenko" To: freeradius-users@lists.freeradius.org Subject: dialup admin accounting revers order Date: Fri, 08 Jun 2007 12:42:49 +0100 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0901005284999119133==" --===============0901005284999119133== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Have a suggestion to make a checkbox on accounting page which will enable reverse listing order. It is more convenient (imho) to see it last-like. --- /usr/share/webapps/freeradius-dialupadmin/1.70.3/htdocs/accounting.php 2007-03-01 11:58:34.000000000 +0200 +++ /var/www/adm/htdocs/du/accounting.php 2007-04-28 10:46:54.000000000 +0300 @@ -147,7 +147,7 @@

Max results returned:
- + Reverse @@ -219,7 +219,8 @@ ' AND ' . ${"item_of_w$i"} . ' ' . ${"operator_of_w$i"} . " '" . ${"value_of_w$i"} . "'" ; $i++; } - +#phpinfo(); +$reverse = ($_REQUEST["revers"] != 'on') ? "ASC" : "DESC" ; $order = ($order_by != '') ? "$order_by" : 'username'; foreach ($accounting_show_attrs as $val) @@ -228,7 +229,7 @@ $sql_extra_query = ''; if ($config[sql_accounting_extra_query] != '') $sql_extra_query = sql_xlat($config[sql_accounting_extra_query],$login,$config); -$query="SELECT $query_view FROM $config[sql_accounting_table] $where $sql_extra_query ORDER BY $order LIMIT $maxresults;"; +$query="SELECT $query_view FROM $config[sql_accounting_table] $where $sql_extra_query ORDER BY $order $reverse LIMIT $maxresults;"; echo << -- Olimp, System Administrator IT Dept. ---- Looking forward to reading yours. RUFF-RIPE DI76-GANDI RUFF-6BONE Ruslan N. Marchenko --===============0901005284999119133==--