html_print_menu();
test_menu_print($page);
$ids = "";
# if submit from test_page.php
if (isset($_POST['mass_update_btn']) && isset($_POST['row_test_arr'])) {
    $field = $_POST['action'];
    foreach ($_POST['row_test_arr'] as $key => $value) {
        $ids .= $key . ":";
    }
} else {
    error_report_show("test_page.php", NO_TESTS_SELECTED);
}
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');
function html_print_tests_filter($project_id, $filter_manual_auto, $filter_test_type, $filter_ba_owner, $filter_qa_owner, $filter_tester, $filter_area_tested, $filter_test_status = null, $filter_priority, $filter_per_page, $filter_search)
{
    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('man_auto') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('ba_owner') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('qa_owner') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('tester') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('show') . "</td>" . NEWLINE;
    print "<td>&nbsp;</td>" . NEWLINE;
    print "</tr>" . NEWLINE;
    # MANUAL/AUTOMATED
    print "<tr>" . NEWLINE;
    print "<td align='center'>" . NEWLINE;
    print "<select name='manual_auto'>" . NEWLINE;
    $man_auto = test_get_man_auto_values();
    html_print_list_box_from_array($man_auto, $filter_manual_auto);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # BA OWNER
    print "<td align='center'>" . NEWLINE;
    print "<select name='ba_owner'>" . NEWLINE;
    $ba_owners = test_get_test_value($project_id, TEST_BA_OWNER, $blank = true);
    html_print_list_box_from_array($ba_owners, $filter_ba_owner);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # QA OWNER
    print "<td align='center'>" . NEWLINE;
    print "<select name='qa_owner'>" . NEWLINE;
    $qa_owners = test_get_test_value($project_id, TEST_QA_OWNER, $blank = true);
    html_print_list_box_from_array($qa_owners, $filter_qa_owner);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # TESTER
    print "<td align='center'>" . NEWLINE;
    print "<select name='tester'>" . NEWLINE;
    $testers = test_get_test_value($project_id, TEST_TESTER, $blank = true);
    html_print_list_box_from_array($testers, $filter_tester);
    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'><input type='submit' value='Filter'></td>" . NEWLINE;
    print "</tr>" . NEWLINE;
    print "<tr>";
    print "<td class=form-header-c>" . lang_get('testtype') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('area_tested') . "</td>" . NEWLINE;
    if (!is_null($filter_test_status)) {
        print "<td class=form-header-c>" . lang_get('test_status') . "</td>" . NEWLINE;
    }
    print "<td class=form-header-c>" . lang_get('priority') . "</td>" . NEWLINE;
    print "<td class=form-header-c>" . lang_get('search') . "</td>" . NEWLINE;
    print "</tr>";
    print "<tr>";
    # TEST TYPE
    print "<td align='center'>" . NEWLINE;
    print "<select name='test_type'>" . NEWLINE;
    $test_type = test_get_test_value($project_id, TEST_TESTTYPE, $blank = true);
    html_print_list_box_from_array($test_type, $filter_test_type);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # AREA TESTED
    print "<td align='center'>" . NEWLINE;
    print "<select name='area_tested'>" . NEWLINE;
    $area_tested = test_get_test_value($project_id, TEST_AREA_TESTED, $blank = true);
    html_print_list_box_from_array($area_tested, $filter_area_tested);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    if (!is_null($filter_test_status)) {
        # TEST STATUS
        print "<td align='center'>" . NEWLINE;
        print "<select name='test_status'>" . NEWLINE;
        $test_status = test_get_test_value($project_id, TEST_STATUS, $blank = true);
        html_print_list_box_from_array($test_status, $filter_test_status);
        print "</select>" . NEWLINE;
        print "</td>" . NEWLINE;
    }
    # PRIORITY
    print "<td align='center'>" . NEWLINE;
    print "<select name='priority'>" . NEWLINE;
    $priority = test_get_priorities();
    html_print_list_box_from_array($priority, $filter_priority);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    # SEARCH
    print "<td align='center'>" . NEWLINE;
    print "<input type='text' size='15' maxlength='25' name='test_search' value='" . $filter_search . "'>" . NEWLINE;
    print "</td>" . NEWLINE;
    print "</tr>" . NEWLINE;
    print "</table>";
    print "<input type=hidden name=test_form_filter_value value=true>" . NEWLINE;
    print "</td>" . NEWLINE;
    print "</tr>" . NEWLINE;
    print "</table>" . NEWLINE;
}
 print "<td class='form-header-c'>" . lang_get('man_auto') . "</td>" . NEWLINE;
 print "<td class='form-header-c'>" . lang_get('ba_owner') . "</td>" . NEWLINE;
 print "<td class='form-header-c'>" . lang_get('qa_owner') . "</td>" . NEWLINE;
 print "<td class='form-header-c'>" . lang_get('testtype') . "</td>" . NEWLINE;
 print "<td class='form-header-c'>" . lang_get('area_tested') . "</td>" . NEWLINE;
 print "<td class='form-header-c'>" . lang_get('test_status') . "</td>" . NEWLINE;
 print "<td class='form-header-c'>" . lang_get('show') . "</td>" . NEWLINE;
 print "<td>&nbsp;</td>" . NEWLINE;
 print "</tr>" . NEWLINE;
 print "<tr>" . NEWLINE;
 //$s_TestFormFilterOptions = session_getTestFormFilterOptions();
 //$s_TestTableDisplayOptions = session_getTestTableDisplayOptions();
 # MANUAL/AUTOMATED
 print "<td align='center'>" . NEWLINE;
 print "<select name='manual_auto'>" . NEWLINE;
 $man_auto = test_get_man_auto_values();
 html_print_list_box_from_array($man_auto, $selected = $table_options['filter']['manual_auto']);
 print "</select>" . NEWLINE;
 print "</td>" . NEWLINE;
 # BA OWNER
 print "<td align='center'>" . NEWLINE;
 print "<select name='ba_owner'>" . NEWLINE;
 $ba_owners = testset_get_test_testset_value($project_id, $testset_id, TEST_BA_OWNER, $blank = true);
 html_print_list_box_from_array($ba_owners, $selected = $table_options['filter']['ba_owner']);
 print "</select>" . NEWLINE;
 print "</td>" . NEWLINE;
 # QA OWNER
 print "<td align='center'>" . NEWLINE;
 print "<select name='qa_owner'>" . NEWLINE;
 $qa_owners = testset_get_test_testset_value($project_id, $testset_id, TEST_QA_OWNER, $blank = true);
 html_print_list_box_from_array($qa_owners, $selected = $table_options['filter']['qa_owner']);