Ok ... change of plans ... go into business_logic.php and find the function named in the code sample below. Insert the BOLD line where I've indicated. Should retain the current function when changing tables.
[pre]
function build_change_table_form()
// goal: build a form to choose the table
// input:
// output: the listbox
{
global $conn, $table_name, $autosumbit_change_table_control, $dadabik_main_file;
$change_table_form = '<form method="get" action="'.$dadabik_main_file.'" name="change_table_form">';
if ( $autosumbit_change_table_control == 0) {
$change_table_form .= '<input type="submit" class="button_change_table" value="'.$submit_buttons_ar["change_table"].'">';
} // end if
$change_table_form .= "<select name=\"table_name\" class=\"select_change_table\"";
if ( $autosumbit_change_table_control == 1) {
$change_table_form .= " onchange=\"javascript:document.change_table_form.submit()\"";
}
$change_table_form .= ">";
$only_include_allowed = 2;
$allowed_table_infos_ar = build_installed_table_infos_ar($only_include_allowed, 1);
$count_temp = count($allowed_table_infos_ar);
for($i=0; $i<$count_temp; $i++){
$change_table_form .= "<option value=\"".htmlspecialchars($allowed_table_infos_ar[$i]['name_table'])."\"";
if ($table_name == $allowed_table_infos_ar[$i]['name_table']){
$change_table_form .= " selected";
}
$change_table_form .= ">".$allowed_table_infos_ar[$i]['alias_table']."</option>";
} // end for
$change_table_form .= "</select>";
$change_table_form .= '<input type="hidden" name="function" value="'.$_GET["function"].'">';
$change_table_form .= '</form>';
if ($count_temp == 1 || $count_temp == 0){
return "";
} // end if
else{
return $change_table_form;
} // end else
} // end function build_change_table_form
[/pre]
Basically because this is a get form, each field in the form is appended to the URL when the form contents are submitted - in the order they appear in the form. So if you want the function to be appended before the table name, then move the line before the start of the select.
Let me know how this works out for you.