function html_print_bug_filter($project_id, $filter_bug_status, $filter_bug_category, $filter_bug_component, $filter_reported_by, $filter_assigned_to, $filter_assigned_to_developer, $filter_found_in_rel, $filter_assigned_to_rel, $filter_per_page, $filter_view_closed, $filter_search, $filter_jump)
{
    print "<table class=width100>" . NEWLINE;
    print "<tr>" . NEWLINE;
    print "<td>" . NEWLINE;
    print "<table class=inner rules=none border=0>" . NEWLINE;
    # TITLES FOR HEADER DIALOG
    print "<tr class=left>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('reported_by') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('assigned_to') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('assigned_to_developer') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('found_in_release') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('assigned_to_release') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('show') . "</td>" . NEWLINE;
    print "<td>&nbsp;</td>" . NEWLINE;
    print "</tr>" . NEWLINE;
    # REPORTED BY - all users
    print "<td align='center'>" . NEWLINE;
    print "<select name='reported_by'>" . NEWLINE;
    $reported_by = user_get_usernames_by_project($project_id, $blank = true);
    html_print_list_box_from_array($reported_by, $filter_reported_by);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # ASSIGNED TO - all users?? or all users with bug_assign_status
    print "<td align='center'>" . NEWLINE;
    print "<select name='assigned_to'>" . NEWLINE;
    $assigned_to = user_get_usernames_by_project($project_id, $blank = true);
    html_print_list_box_from_array($assigned_to, $filter_assigned_to);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # ASSIGNED TO DEVELOPER
    print "<td align='center'>" . NEWLINE;
    print "<select name='assigned_to_developer'>" . NEWLINE;
    $assigned_to_developer = user_get_usernames_by_project($project_id, $blank = true);
    html_print_list_box_from_array($assigned_to_developer, $filter_assigned_to_developer);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # FOUND IN RELEASE
    print "<td align='center'>" . NEWLINE;
    print "<select name='found_in_release'>" . NEWLINE;
    $found_in_release = admin_get_all_release_names($project_id, $blank = true);
    html_print_list_box_from_array($found_in_release, $filter_found_in_rel);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # ASSIGNED TO RELEASE
    print "<td align='center'>" . NEWLINE;
    print "<select name='assigned_to_release'>" . NEWLINE;
    $assigned_to_release = admin_get_all_release_names($project_id, $blank = true);
    html_print_list_box_from_array($assigned_to_release, $filter_assigned_to_rel);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # PER PAGE
    print "<td align='center'>" . NEWLINE;
    print "<input type='text' size='3' maxlength='3' name='per_page' value='" . $filter_per_page . "'>" . NEWLINE;
    print "</td>" . NEWLINE;
    print "<td align='center' rowspan=4 valign=center><input type='submit' value='Filter'></td>" . NEWLINE;
    print "</tr>" . NEWLINE;
    # SECOND ROW OF FILTERS
    print "<tr class='left'>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('bug_status') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('bug_category') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('bug_component') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('view_closed') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('search') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('jump') . "</td>" . NEWLINE;
    print "<td>&nbsp;</td>" . NEWLINE;
    print "</tr>" . NEWLINE;
    print "<tr>" . NEWLINE;
    # STATUS
    print "<td align='center'>" . NEWLINE;
    print "<select name='status'>" . NEWLINE;
    $bug_status = bug_get_status(true);
    html_print_list_box_from_array($bug_status, $filter_bug_status);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # CATEGORY
    print "<td align='center'>" . NEWLINE;
    print "<select name='category'>" . NEWLINE;
    html_print_list_box_from_key_array(bug_get_categories($project_id, $blank = true), $selected = $filter_bug_category);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # COMPONENT
    print "<td align='center'>" . NEWLINE;
    print "<select name='component'>" . NEWLINE;
    html_print_list_box_from_key_array(bug_get_components($project_id, $blank = true), $selected = $filter_bug_component);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # VIEW CLOSED
    print "<td align='center'>" . NEWLINE;
    print "<select name='view_closed'>" . NEWLINE;
    $view_closed_options = array(lang_get('yes'), lang_get('no'));
    html_print_list_box_from_array($view_closed_options, $filter_view_closed);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # SEARCH
    print "<td align='center'>" . NEWLINE;
    print "<input type='text' size='15' maxlength='25' name='bug_search' value='" . $filter_search . "'>" . NEWLINE;
    print "</td>" . NEWLINE;
    # JUMP
    print "<td align='center'>" . NEWLINE;
    print "<input type='text' size='6' maxlength='6' name='filter_jump' value='" . $filter_jump . "'>" . NEWLINE;
    print "</td>" . NEWLINE;
    print "</tr>" . NEWLINE;
    print "</table>" . NEWLINE;
    print "<input type=hidden name=bug_form_filter_value value=true>" . NEWLINE;
    print "</td>" . NEWLINE;
    print "</tr>" . NEWLINE;
    print "</table>" . NEWLINE;
}
    print"<td class=form-lbl-r>". lang_get('qa_owner') ."</td>";
    print"<td class=form-data-l>";
        $selected_value = session_validate_form_get_field( 'qa_owner');
        print"<select name='qa_owner' size=1>";
        $qa_owner = user_get_qaowners_by_project($project_id, $blank=true);
        html_print_list_box_from_array( $qa_owner, $selected_value );
        print"</select>";
    print "</td>";
    print"</tr>";
*/
print "<tr>";
print "<td class=form-lbl-r>" . lang_get('test_assigned_to') . "</td>";
print "<td class=form-data-l>";
$selected_value = session_validate_form_get_field('assigned_to');
print "<select name='assigned_to' size=1>";
$assign_to_users = user_get_usernames_by_project($project_id, $blank = true);
html_print_list_box_from_array($assign_to_users, $selected_value);
//html_print_list_box_with_join( $db, USER_TBL, PROJECT_USER_ASSOC_TBL, USER_UNAME, USER_ID, PROJECT_USER_ASSOC_TBL, PROJ_ID, $project_id, $selected_value);
print "</select>";
print "</td>";
print "</tr>";
/*
    print"<tr>";
    print"<td class=form-lbl-r>". lang_get('test_assigned_by') ."</td>";
    print"<td class=form-data-l>";
        $selected_value = session_validate_form_get_field( 'assigned_by' );
        print"<select name='assigned_by' size=1>";
        $assign_by_users = user_get_usernames_by_project($project_id, $blank=true);
        html_print_list_box_from_array( $assign_by_users, $selected_value);
        print"</select>";
    print "</td>";
switch ($field) {
    case 'man_auto':
        $form_title = lang_get('update_man_auto');
        $possible_values = test_get_man_auto_values();
        break;
    case 'ba_owner':
        $form_title = lang_get('update_ba_owner');
        $possible_values = user_get_baowners_by_project($project_id, $blank = true);
        break;
    case 'qa_owner':
        $form_title = lang_get('update_qa_owner');
        $possible_values = user_get_qaowners_by_project($project_id, $blank = true);
        break;
    case 'tester':
        $form_title = lang_get('update_tester');
        $possible_values = user_get_usernames_by_project($project_id, $blank = true);
        break;
    case 'test_status':
        $form_title = lang_get('update_test_status');
        $possible_values = test_get_status($blank = true);
        break;
    case 'test_priority':
        $form_title = lang_get('update_priority');
        $possible_values = test_get_priorities();
        break;
    case 'auto_pass':
        $form_title = lang_get('update_autopass');
        $possible_values = test_get_autopass_values();
        break;
    case 'test_type':
        $form_title = lang_get('update_testtype');
    }
} else {
    error_report_show("test_page.php", NO_BUGS_SELECTED);
}
switch ($field) {
    case 'bug_status':
        $form_title = lang_get('update_bug_status');
        $possible_values = bug_get_status();
        break;
    case 'assign_to':
        $form_title = lang_get('update_assign_to');
        $possible_values = user_get_usernames_by_project($project_id);
        break;
    case 'assign_to_dev':
        $form_title = lang_get('update_assign_to_developer');
        $possible_values = user_get_usernames_by_project($project_id);
        break;
}
print "<br>" . NEWLINE;
print "<div align=center>" . NEWLINE;
print "<form method=post action={$action_page}>" . NEWLINE;
print "<table class=width50>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td>" . NEWLINE;
print "<table class=inner>" . NEWLINE;
# FORM TITLE
print "<tr>" . NEWLINE;
print "<td class='form-header-l'>{$form_title}</td>" . NEWLINE;
print "</tr>" . NEWLINE;
# VALUE
print "<tr>" . NEWLINE;
$list_box = array();
$rows_rel = admin_get_releases($project_id);
foreach ($rows_rel as $row_rel) {
    $list_box[$row_rel[RELEASE_ID]] = $row_rel[RELEASE_NAME];
}
$list_box[""] = "";
html_print_list_box_from_key_array($list_box, session_validate_form_get_field('assigned_release'));
print "</select>" . NEWLINE;
print "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
# ASSIGNED TO
print "<tr>" . NEWLINE;
print "<td class=form-lbl-r nowrap>" . lang_get('assigned_to') . "</td>" . NEWLINE;
print "<td class=form-data-l>" . NEWLINE;
print "<select name='req_assigned_to'>" . NEWLINE;
$rows_users = user_get_usernames_by_project($project_id, true);
html_print_list_box_from_array($rows_users);
print "</select>" . NEWLINE;
print "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
# REASON FOR CHANGE
print "<tr>" . NEWLINE;
print "<td class=form-lbl-r nowrap>" . lang_get('req_reason_change') . "</td>" . NEWLINE;
print "<td class=form-data-l><textarea rows='3' cols='45' name='req_reason_change'></textarea></td>" . NEWLINE;
print "</tr>" . NEWLINE;
if ($record_or_file == "F") {
    # FILE
    print "<tr>" . NEWLINE;
    print "<td class=form-lbl-r nowrap>" . lang_get('file_name') . " <span class='required'>*</span></td>" . NEWLINE;
    print "<td class=form-data-l><input type=file name=upload_file size=45></td>" . NEWLINE;
    print "</tr>" . NEWLINE;
 print "<td class=form-lbl-r nowrap>" . lang_get('assigned_to') . "</td>" . NEWLINE;
 print "<td class=form-data-l>" . NEWLINE;
 $selected_value = session_validate_form_get_field('assigned_to', $assigned_to);
 print "<select name='assigned_to' size=1>" . NEWLINE;
 $assigned_to = user_get_usernames_by_project($project_id, $blank = true);
 html_print_list_box_from_array($assigned_to, $selected_value);
 print "</select>" . NEWLINE;
 print "</td>" . NEWLINE;
 print "</tr>" . NEWLINE;
 # ASSIGN TO DEVELOPER
 print "<tr>" . NEWLINE;
 print "<td class=form-lbl-r nowrap>" . lang_get('assigned_to_developer') . "</td>" . NEWLINE;
 print "<td class=form-data-l>" . NEWLINE;
 $selected_value = session_validate_form_get_field('assigned_to_developer', $assigned_to_developer);
 print "<select name='assigned_to_developer' size=1>" . NEWLINE;
 $assigned_to_developer = user_get_usernames_by_project($project_id, $blank = true);
 html_print_list_box_from_array($assigned_to_developer, $selected_value);
 print "</select>" . NEWLINE;
 print "</td>" . NEWLINE;
 print "</tr>" . NEWLINE;
 # TEST VERIFICATION ID
 # YOU CAN ONLY UPDATE THIS FROM THE VERFICATION PAGE
 /*
 print"<tr>". NEWLINE;
 print"<td class=form-lbl-r>". lang_get('test_verification_id') ."</td>";
 print"<td class=form-data-l>". NEWLINE;
 	print"<input type=text size='10' name='verify_id' maxlength='10' value='" . session_validate_form_get_field ('verify_id', $test_verify_id);
 print"'</td>". NEWLINE;
 print"</tr>". NEWLINE;
 */
 # SUMMARY