$functionality = "";
         foreach ($rows_functions as $key => $value) {
             $functionality .= $value . ": ";
         }
         $rows[$row][REQ_FUNCT_NAME] = $functionality;
     }
     break;
 case "tests":
     $headers = array(TEST_ID => lang_get('test_id'), TEST_NAME => lang_get('test_name'), TEST_MANUAL => lang_get('manual'), TEST_AUTOMATED => lang_get('automated'), TEST_BA_OWNER => lang_get('ba_owner'), TEST_QA_OWNER => lang_get('qa_owner'), TEST_TESTER => lang_get('tester'), TEST_TESTTYPE => lang_get('testtype'), TEST_AREA_TESTED => lang_get('area_tested'), TEST_PRIORITY => lang_get('priority'), TEST_STATUS => lang_get('test_status'), TEST_AUTO_PASS => lang_get('autopass'));
     $display_options = session_get_display_options("test");
     $rows = test_filter_rows($project_id, $display_options['filter']['manual_auto'], $display_options['filter']['ba_owner'], $display_options['filter']['qa_owner'], $display_options['filter']['tester'], $display_options['filter']['test_type'], $display_options['filter']['area_tested'], $display_options['filter']['test_status'], $display_options['filter']['priority'], $display_options['filter']['per_page'], $display_options['filter']['test_search'], $display_options['order_by'], $display_options['order_dir'], $page_number = 0);
     break;
 case "test_workflow":
     $headers = array(TEST_ID => lang_get('test_id'), TEST_NAME => lang_get('test_name'), TEST_MANUAL => lang_get('manual'), TEST_AUTOMATED => lang_get('automated'), TEST_BA_OWNER => lang_get('ba_owner'), TEST_QA_OWNER => lang_get('qa_owner'), TEST_TESTER => lang_get('tester'), TEST_TESTTYPE => lang_get('testtype'), TEST_AREA_TESTED => lang_get('area_tested'), TEST_PRIORITY => lang_get('priority'), TEST_STATUS => lang_get('test_status'), TEST_AUTO_PASS => lang_get('autopass'), TEST_DATE_ASSIGNED => lang_get('date_assigned'), TEST_DATE_EXPECTED => lang_get('date_expected'), TEST_DATE_COMPLETE => lang_get('date_complete'), TEST_BA_SIGNOFF => lang_get('ba_signoff_date'), TEST_COMMENTS => lang_get('info'));
     $display_options = session_get_display_options("test_workflow");
     $rows = test_workflow_filter_rows($project_id, $display_options['filter']['manual_auto'], $display_options['filter']['test_type'], $display_options['filter']['ba_owner'], $display_options['filter']['qa_owner'], $display_options['filter']['tester'], $display_options['filter']['area_tested'], $display_options['filter']['test_status'], $display_options['filter']['priority'], $display_options['filter']['per_page'], $display_options['filter']['test_search'], $display_options['order_by'], $display_options['order_dir'], $page_number = 0);
     break;
 case "results":
     $headers = array(TEST_ID => lang_get('test_id'), TEST_NAME => lang_get('test_name'), TEST_BA_OWNER => lang_get('ba_owner'), TEST_QA_OWNER => lang_get('qa_owner'), TEST_ASSIGNED_TO => lang_get('test_assigned_to'), TEST_TESTTYPE => lang_get('testtype'), TEST_AREA_TESTED => lang_get('area_tested'), TEST_TS_ASSOC_STATUS => lang_get('test_run_status'), TEST_TS_ASSOC_ASSIGNED_TO => lang_get('test_status'), TEST_TS_ASSOC_COMMENTS => lang_get('info'), TEST_PRIORITY => lang_get('priority'));
     $table_options = session_get_display_options("results");
     $s_properties = session_get_properties("results");
     $rows = results_filter_rows($project_id, $table_options['filter']['manual_auto'], $table_options['filter']['ba_owner'], $table_options['filter']['qa_owner'], $table_options['filter']['test_type'], $table_options['filter']['area_tested'], $table_options['filter']['test_status'], $table_options['filter']['per_page'], $table_options['order_by'], $table_options['order_dir'], $page_number = 0, $s_properties['release_id'], $s_properties['build_id'], $s_properties['testset_id']);
     break;
 case "test_run":
     $s_results = session_get_properties("results");
     $test_run_id = $s_results['test_run_id'];
     $rows_verify_details = results_get_verify_results_detail($test_run_id);
     $s_show_options = session_get_show_options();
     # get project preferences that determine what fields we do and don't show for each project
     $show_custom_1 = $s_show_options['show_custom_1'];
     $show_custom_2 = $s_show_options['show_custom_2'];
$filter_priority = $s_display_options['filter']['priority'];
$filter_test_search = $s_display_options['filter']['test_search'];
html_window_title();
html_print_body();
html_page_title($project_name . " - TESTS WORKFLOW");
html_page_header($db, $project_name);
html_print_menu();
test_menu_print($page);
error_report_check($_GET);
print "<br>" . NEWLINE;
print "<form method=post action={$page} id='form_order'>" . NEWLINE;
print "<div align=center>" . NEWLINE;
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, $filter_priority, $filter_per_page, $filter_test_search);
print "<br>" . NEWLINE;
$g_timer->mark_time("Load rows to display on page from db into memory");
$row = test_workflow_filter_rows($project_id, $filter_manual_auto, $filter_test_type, $filter_ba_owner, $filter_qa_owner, $filter_tester, $filter_area_tested, $filter_test_status, $filter_priority, $filter_per_page, $filter_test_search, $order_by, $order_dir, $page_number, $csv_name = "test_workflow");
if ($row) {
    $g_timer->mark_time("Finished load rows to display on page from db into memory");
    $page_count = ceil($num / $filter_per_page);
    #print"<table id='sortabletable' class='sortable' rules=cols>". NEWLINE;
    print "<table class='sortable' rules=cols>" . NEWLINE;
    print "<thead>" . NEWLINE;
    print "<tr class=tbl_header>" . NEWLINE;
    html_tbl_print_sortable_header(lang_get('test_id'), TEST_ID, $order_by, $order_dir);
    html_tbl_print_sortable_header(lang_get('man_auto'));
    html_tbl_print_sortable_header(lang_get('test_name'), TEST_NAME, $order_by, $order_dir);
    html_tbl_print_sortable_header(lang_get('test_status'), TEST_STATUS, $order_by, $order_dir);
    html_tbl_print_sortable_header(lang_get('priority'), TEST_PRIORITY, $order_by, $order_dir);
    html_tbl_print_sortable_header(lang_get('ba_owner'), TEST_BA_OWNER, $order_by, $order_dir);
    html_tbl_print_sortable_header(lang_get('qa_owner'), TEST_QA_OWNER, $order_by, $order_dir);
    html_tbl_print_sortable_header(lang_get('tester'), TEST_TESTER, $order_by, $order_dir);