Cleanup (missing $row declaration).
[fa-stable.git] / gl / manage / exchange_rates.php
index 5bc3b25226e5aa84ef1bd97474e658a0ec991161..e50fc5f308ae6995876c35213866cffca5005969 100644 (file)
@@ -67,6 +67,7 @@ function handle_submit()
        }
 
        $selected_id = '';
+       clear_data();
 }
 
 //---------------------------------------------------------------------------------------------
@@ -79,6 +80,7 @@ function handle_delete()
                return;
        delete_exchange_rate($selected_id);
        $selected_id = '';
+       clear_data();
 }
 
 //---------------------------------------------------------------------------------------------
@@ -172,7 +174,7 @@ if (!isset($_POST['curr_abrev']))
 
 echo "<center>";
 echo _("Select a currency :") . "  ";
-currencies_list('curr_abrev', null, true);
+echo currencies_list('curr_abrev', null, true);
 echo "</center>";
 
 // if currency sel has changed, clear the form
@@ -184,10 +186,7 @@ if ($_POST['curr_abrev'] != get_global_curr_code())
 
 set_global_curr_code($_POST['curr_abrev']);
 
-$sql = "SELECT date_, rate_buy, id FROM "
-       .TB_PREF."exchange_rates "
-       ."WHERE curr_code=".db_escape($_POST['curr_abrev'])."
-        ORDER BY date_ DESC";
+$sql = get_sql_for_exchange_rates();
 
 $cols = array(
        _("Date to Use From") => 'date',