print "<table class=width100 rules=cols>" . NEWLINE;
 print "<tr>" . NEWLINE;
 html_tbl_print_header(lang_get('test_id'));
 html_tbl_print_header(lang_get('test_name'));
 html_tbl_print_header(lang_get('action_'));
 html_tbl_print_header(lang_get('expected_'));
 html_tbl_print_header(lang_get('actual_'));
 html_tbl_print_header('');
 html_tbl_print_header(lang_get('defect'));
 html_tbl_print_header(lang_get('bug_status'));
 html_tbl_print_header(lang_get('time_failed'));
 html_tbl_print_header(lang_get('os'));
 html_tbl_print_header(lang_get('window'));
 html_tbl_print_header(lang_get('object'));
 html_tbl_print_header(lang_get('policy_id'));
 html_tbl_print_header(lang_get('claim_id'));
 print "</tr>" . NEWLINE;
 foreach ($rows_failed_verifications as $row_failed_verification) {
     $row_style = html_tbl_alternate_bgcolor($row_style);
     print "<tr class='{$row_style}'>" . NEWLINE;
     print "<td><a href='{$show_verifications_page}?test_run_id=" . $row_failed_verification[VERIFY_RESULTS_TS_UNIQUE_RUN_ID] . "&amp;release_id={$release_id}&amp;build_id={$build_id}&amp;testset_id={$testset_id}'>" . $row_failed_verification[VERIFY_RESULTS_TS_UNIQUE_RUN_ID] . "</a></td>" . NEWLINE;
     print "<td>" . $row_failed_verification[TEST_RESULTS_TEST_SUITE] . "</td>" . NEWLINE;
     print "<td>" . $row_failed_verification[VERIFY_RESULTS_ACTION] . "</td>" . NEWLINE;
     print "<td>" . $row_failed_verification[VERIFY_RESULTS_EXPECTED_RESULT] . "</td>" . NEWLINE;
     print "<td>" . $row_failed_verification[VERIFY_RESULTS_ACTUAL_RESULT] . "</td>" . NEWLINE;
     print results_verfication_status_icon($row_failed_verification[VERIFY_RESULTS_TEST_STATUS]);
     if ($row_failed_verification[VERIFY_RESULTS_DEFECT_ID] != 0) {
         $defect_id = util_pad_id($row_failed_verification[VERIFY_RESULTS_DEFECT_ID]);
         print "<td><a href='" . VIEW_BUG_URL . "?defect_id={$defect_id}&id={$defect_id}'>{$defect_id}</a></td>" . NEWLINE;
         print "<td>" . bug_get_field_value($defect_id, BUG_STATUS) . "</td>" . NEWLINE;
     } else {
$assigned_to = $row[TEST_ASSIGNED_TO];
$assigned_by = $row[TEST_ASSIGNED_BY];
$dateassigned = $row[TEST_DATE_ASSIGNED];
$dateexpcomplete = $row[TEST_DATE_EXPECTED];
$dateactcomplete = $row[TEST_DATE_COMPLETE];
$duration = $row[TEST_DURATION];
$test_status = $row[TEST_STATUS];
$signoff_by = $row[TEST_SIGNOFF_BY];
$signoff_date = $row[TEST_SIGNOFF_DATE];
$last_updated_date = $row[TEST_LAST_UPDATED];
$last_updated_by = $row[TEST_LAST_UPDATED_BY];
print "<br>" . NEWLINE;
print "<table class=width100 rules='cols' border='1'>" . NEWLINE;
print "<tr>" . NEWLINE;
html_tbl_print_header(lang_get('test_id'));
html_tbl_print_header(lang_get('test_name'));
print "</tr>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td><a href='{$test_detail_page}?test_id={$test_id}&project_id={$project_id}'>{$test_id}</a></td>" . NEWLINE;
print "<td>{$test_name}</td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "</table>" . NEWLINE;
//print"<b>Import Test Steps for Test: $test_name</b>";
/*
if( IMPORT_EXPORT_TO_EXCEL ) {
	print"<font color=red><br><br><b>Warning: Make sure the excel file is in the following format:</b></font>";
}
else {
	print"<font color=red><br><br><b>Warning: Make sure the csv file is in the following format:</b></font>";
}
*/
$g_timer->mark_time("Finished load rows to display on page from db into memory");
if ($row) {
    print "<div align=center>" . NEWLINE;
    print "<table class=width100 rules=cols>" . NEWLINE;
    print "<tr class=tbl_header>" . NEWLINE;
    print "<th></th>" . NEWLINE;
    print "<th></th>" . NEWLINE;
    html_tbl_print_header(lang_get('bug_id'), BUG_ID, $order_by, $order_dir);
    html_tbl_print_header(lang_get('bug_priority'), BUG_PRIORITY, $order_by, $order_dir);
    html_tbl_print_header(lang_get('bug_status'), BUG_STATUS, $order_by, $order_dir);
    html_tbl_print_header(lang_get('bug_category'), BUG_CATEGORY, $order_by, $order_dir);
    html_tbl_print_header(lang_get('reported_by'), BUG_REPORTER, $order_by, $order_dir);
    html_tbl_print_header(lang_get('assigned_to'), BUG_ASSIGNED_TO, $order_by, $order_dir);
    #html_tbl_print_header( lang_get('found_in_release'), BUG_FOUND_IN_RELEASE,	$order_by, $order_dir );
    #html_tbl_print_header( lang_get('assigned_to_release'), BUG_ASSIGN_TO_RELEASE, $order_by, $order_dir );
    html_tbl_print_header(lang_get('bug_summary'));
    print "</tr>" . NEWLINE;
    $g_timer->mark_time("Outputting main html table to browser");
    $row_style = '';
    foreach ($row as $row_bug_detail) {
        $bug_id = $row_bug_detail[BUG_ID];
        $priority = $row_bug_detail[BUG_PRIORITY];
        $bug_status = $row_bug_detail[BUG_STATUS];
        $category = $row_bug_detail[CATEGORY_NAME];
        $component = $row_bug_detail[COMPONENT_NAME];
        $reported_by = $row_bug_detail[BUG_REPORTER];
        $reported_date = $row_bug_detail[BUG_REPORTED_DATE];
        $assigned_to = $row_bug_detail[BUG_ASSIGNED_TO];
        $found_in_release = $row_bug_detail[BUG_FOUND_IN_RELEASE];
        $assign_to_release = $row_bug_detail[BUG_ASSIGN_TO_RELEASE];
        $discovery_period = $row_bug_detail[BUG_DISCOVERY_PERIOD];
html_page_title($project_name . " - " . lang_get('release_page'));
html_page_header($db, $project_name);
html_print_menu();
html_release_map(array("release_link", "build_link", "<a href=testset_page.php>" . lang_get("testsets") . "</a>", lang_get('test_plan_history')));
$rows = testset_get_test_plan_log($_GET['test_plan_id']);
if (!empty($rows)) {
    print "<br><br>";
    print "<table class=width100 rules=cols>" . NEWLINE;
    print "<tr>" . NEWLINE;
    html_tbl_print_header(lang_get("file_name"));
    html_tbl_print_header(lang_get("view"));
    html_tbl_print_header(lang_get("download"));
    html_tbl_print_header(lang_get("uploaded_by"));
    html_tbl_print_header(lang_get("date_added"));
    html_tbl_print_header(lang_get("version"));
    html_tbl_print_header(lang_get("info"));
    print "</tr>" . NEWLINE;
    foreach ($rows as $row) {
        $file_name = $s_project_properties['test_plan_upload_path'] . $row[TEST_PLAN_VERSION_FILENAME];
        $row_style = html_tbl_alternate_bgcolor($row_style);
        print "<tr class={$row_style}>" . NEWLINE;
        print "<td>" . $row[TEST_PLAN_NAME] . "</td>" . NEWLINE;
        print "<td><a href='{$file_name}' target='_blank'>" . lang_get('view') . "</a></td>" . NEWLINE;
        print "<td><a href='download.php?upload_filename={$file_name}'>" . lang_get('download') . "</a></td>" . NEWLINE;
        print "<td>" . $row[TEST_PLAN_VERSION_UPLOADEDBY] . "</td>" . NEWLINE;
        print "<td>" . $row[TEST_PLAN_VERSION_UPLOADEDDATE] . "</td>" . NEWLINE;
        print "<td>" . $row[TEST_PLAN_VERSION_VERSION] . "</td>" . NEWLINE;
        print "<td>" . html_info_icon($row[TEST_PLAN_VERSION_COMMMENTS]) . "</td>" . NEWLINE;
        print "</tr>" . NEWLINE;
    }
    print "</table>" . NEWLINE;
if ($rows_requirement) {
    print "<div align=center>" . NEWLINE;
    print "<table class=width100 rules=cols>" . NEWLINE;
    # Table headers
    print "<tr class=tbl_header>" . NEWLINE;
    print "<th></th>";
    html_tbl_print_header(lang_get('req_id'), REQ_ID, $order_by, $order_dir);
    html_tbl_print_header("");
    html_tbl_print_header(lang_get('req_name'), REQ_FILENAME, $order_by, $order_dir);
    html_tbl_print_header(lang_get('req_detail'), REQ_VERS_DETAIL, $order_by, $order_dir);
    html_tbl_print_header(lang_get('req_type'), REQ_DOC_TYPE_NAME, $order_by, $order_dir);
    html_tbl_print_header(lang_get('status'), REQ_VERS_STATUS, $order_by, $order_dir);
    html_tbl_print_header(lang_get('req_area'), REQ_AREA_COVERAGE, $order_by, $order_dir);
    html_tbl_print_header(lang_get('functionality'));
    html_tbl_print_header(lang_get('req_locked_by'), REQ_LOCKED_BY, $order_by, $order_dir);
    html_tbl_print_header(lang_get('req_locked_date'), REQ_LOCKED_DATE, $order_by, $order_dir);
    print "</tr>" . NEWLINE;
    foreach ($rows_requirement as $row_requirement) {
        $req_id = $row_requirement[REQ_ID];
        $req_version_id = $row_requirement[REQ_VERS_UNIQUE_ID];
        if (session_records_ischecked("requirement_requirement_assoc", $req_id)) {
            $checked = "checked";
        } else {
            $checked = "";
        }
        # Build list of records
        if (empty($records)) {
            $records = $req_id . " => ''";
        } else {
            $records .= ", " . $req_id . " => ''";
        }
html_page_title($project_name . " - " . lang_get('report_area_tested_page'));
html_page_header($db, $project_name);
html_print_menu();
html_browse_release_menu($db, $page, $project_id);
print "<br>";
error_report_check($_GET);
global $db;
print "<div align=center>";
if (isset($testset_id) && $testset_id != 'all') {
    print "<form method=post action='{$page}?_release_id={$release_id}&amp;_build_id={$build_id}&amp;_testset_id={$testset_id}'>";
    print "<table class=width80 rules=cols>" . NEWLINE;
    print "<tr>" . NEWLINE;
    html_tbl_print_header(lang_get('area_tested'), AREA_TESTED_NAME, $order_by, $order_dir);
    html_tbl_print_header(lang_get('num_of_tests_for_area'));
    html_tbl_print_header(lang_get('num_of_tests_used'));
    html_tbl_print_header(lang_get('percentage_of_area_tests'));
    print "</tr>" . NEWLINE;
    foreach (project_get_areas_tested($project_id, $order_by, $order_dir) as $row_area_tested) {
        $row_style = html_tbl_alternate_bgcolor($row_style);
        $area_tested = $row_area_tested[AREA_TESTED_NAME];
        $tests_for_area = report_get_num_tests_in_area($project_id, $area_tested);
        $tests_used = report_get_num_area_tested_in_testset($project_id, $_GET['_testset_id'], $area_tested);
        if ($tests_for_area != 0) {
            $percentage_tests_used = sprintf("%01.2f", $tests_used / $tests_for_area * 100);
        } else {
            $percentage_tests_used = "0.00";
        }
        print "<tr class='{$row_style}'>" . NEWLINE;
        print "<td>{$area_tested}</td>" . NEWLINE;
        print "<td>{$tests_for_area}</td>" . NEWLINE;
        print "<td>{$tests_used}</td>" . NEWLINE;
print"</tr>". NEWLINE;

print"</table>". NEWLINE;
*/
if (!empty($rows)) {
    print "<br><br>";
    print "<table class=width100 rules=cols>" . NEWLINE;
    print "<tr>" . NEWLINE;
    html_tbl_print_header(lang_get("version"));
    html_tbl_print_header(lang_get("status"));
    html_tbl_print_header(lang_get("author"));
    html_tbl_print_header(lang_get("created"));
    html_tbl_print_header(lang_get("req_assign_release"));
    html_tbl_print_header(lang_get("assigned_to"));
    html_tbl_print_header(lang_get("req_reason_change"));
    html_tbl_print_header(lang_get("view"));
    print "</tr>" . NEWLINE;
    foreach ($rows as $row) {
        $req_version_id = $row[REQ_VERS_UNIQUE_ID];
        $req_version = $row[REQ_VERS_VERSION];
        $req_status = $row[REQ_VERS_STATUS];
        $author = $row[REQ_VERS_AUTHOR];
        $timestamp = $row[REQ_VERS_TIMESTAMP];
        $assigned_to = $row[REQ_VERS_ASSIGNED_TO];
        $reason_for_change = $row[REQ_VERS_REASON_CHANGE];
        $row_style = html_tbl_alternate_bgcolor($row_style);
        $file_name = "";
        print "<tr class={$row_style}>" . NEWLINE;
        print "<td align='center'>{$req_version}</td>" . NEWLINE;
        print "<td align='center'>{$req_status}</td>" . NEWLINE;
        print "<td align='center'>{$author}</td>" . NEWLINE;
    
    	$table_body .= "<td>$count_percent_cov%</td>". NEWLINE;
    	$table_body .= "</tr>". NEWLINE;
    */
    $table_body .= "</tbody>" . NEWLINE;
}
print "<div align=center>";
print "<br>" . NEWLINE;
print "<table class=width90 rules=cols>" . NEWLINE;
print "<thead>" . NEWLINE;
print "<tr>" . NEWLINE;
html_tbl_print_header("a");
html_tbl_print_header("b");
html_tbl_print_header("c");
html_tbl_print_header("d");
html_tbl_print_header("e");
print "</tr>" . NEWLINE;
print "</thead>" . NEWLINE;
print $table_body;
print "</table>" . NEWLINE;
print "</div>";
html_print_footer();
# ---------------------------------------------------------------------
# $Log: requirement_tests_assoc_report_page.php,v $
# Revision 1.3  2006/08/05 22:08:51  gth2
# adding NEWLINE constant to support multiple OS newline chars - gth
#
# Revision 1.2  2006/02/24 11:35:34  gth2
# update to div - class=div-c not working in firefox - gth
#
# Revision 1.1.1.1  2005/11/30 23:00:58  gth2
$g_timer->mark_time("Get requirements");
$rows_requirement = requirement_get($project_id, $page_number, $order_by, $order_dir, $filter_doc_type, $filter_status, $filter_area_covered, $filter_functionality, $filter_assign_release, $filter_show_versions, 0, $filter_search, $filter_priority, "");
$g_timer->mark_time("Finished get requirements");
################################################################################
# Traceability Matrix
################################################################################
if ($rows_requirement) {
    print "<div align=center>" . NEWLINE;
    print "<table class=width100 rules=all>" . NEWLINE;
    # Table headers
    print "<tr class=tbl_header>" . NEWLINE;
    html_tbl_print_header(lang_get('req_id'));
    html_tbl_print_header(lang_get('req_name'));
    html_tbl_print_header(lang_get('req_doc_type'));
    html_tbl_print_header(lang_get('test_id'));
    html_tbl_print_header(lang_get('percent_covered'));
    print "</tr>" . NEWLINE;
    # Variables for summary statistics
    $req_count = 0;
    $total_coverage = 0;
    foreach ($rows_requirement as $row_requirement) {
        $req_count += 1;
        $req_id = util_pad_id($row_requirement[REQ_ID]);
        $req_name = $row_requirement[REQ_FILENAME];
        $req_version_id = $row_requirement[REQ_VERS_UNIQUE_ID];
        $req_doc_type = $row_requirement[REQ_DOC_TYPE_NAME];
        # Set the row's background color to something special if the requirement
        # has no test cases associated with it (a bad thing).
        $req_test_relationships = requirement_get_test_relationships($req_id);
        if (empty($req_test_relationships)) {
            $row_style = ROW2_STYLE;
$row = test_filter_rows($project_id, $filter_manual_auto, $filter_ba_owner, $filter_qa_owner, $filter_tester, $filter_test_type, $filter_area_tested, $filter_test_status, $filter_test_priority, $filter_per_page, $filter_test_search, $order_by, $order_dir, $page_number);
if ($row) {
    print "<div align=center>" . NEWLINE;
    print "<table class=width100 rules=cols>" . NEWLINE;
    print "<tr class=tbl_header>" . NEWLINE;
    print "<th></th>" . NEWLINE;
    html_tbl_print_header(lang_get('percent_covered_test'));
    html_tbl_print_header(lang_get('test_id'), TEST_ID, $order_by, $order_dir);
    html_tbl_print_header(lang_get('man_auto'));
    html_tbl_print_header(lang_get('test_name'), TEST_NAME, $order_by, $order_dir);
    html_tbl_print_header(lang_get('ba_owner'), TEST_BA_OWNER, $order_by, $order_dir);
    html_tbl_print_header(lang_get('qa_owner'), TEST_QA_OWNER, $order_by, $order_dir);
    html_tbl_print_header(lang_get('tester'), TEST_TESTER, $order_by, $order_dir);
    html_tbl_print_header(lang_get('testtype'), TEST_TESTTYPE, $order_by, $order_dir);
    html_tbl_print_header(lang_get('area_tested'), TEST_AREA_TESTED, $order_by, $order_dir);
    html_tbl_print_header(lang_get('priority'), TEST_PRIORITY, $order_by, $order_dir);
    print "</tr>" . NEWLINE;
    $row_style = '';
    foreach ($row as $row_test_detail) {
        $test_id = $row_test_detail[TEST_ID];
        $test_name = $row_test_detail[TEST_NAME];
        $ba_owner = $row_test_detail[TEST_BA_OWNER];
        $qa_owner = $row_test_detail[TEST_QA_OWNER];
        $tester = $row_test_detail[TEST_TESTER];
        $test_type = $row_test_detail[TEST_TESTTYPE];
        $manual = $row_test_detail[TEST_MANUAL];
        $automated = $row_test_detail[TEST_AUTOMATED];
        $area_tested = $row_test_detail[TEST_AREA_TESTED];
        $priority = $row_test_detail[TEST_PRIORITY];
        $autopass = $row_test_detail[TEST_AUTO_PASS];
        # Name of the % covered text input
 html_tbl_print_header(lang_get('testset_name'));
 html_tbl_print_header(lang_get('date_created'));
 html_tbl_print_header(lang_get('description'));
 html_tbl_print_header(lang_get('status'));
 # page not implemented yet, column disabled!
 #html_tbl_print_header( lang_get('detail') );
 html_tbl_print_header(lang_get('locked_by'));
 html_tbl_print_header(lang_get('lock_date'));
 html_tbl_print_header(lang_get('lock_comment'));
 if ($user_is_manager) {
     html_tbl_print_header(lang_get('lock'));
 }
 html_tbl_print_header(lang_get('signed_off_by'));
 html_tbl_print_header(lang_get('sign_off_date'));
 html_tbl_print_header(lang_get('comments'));
 html_tbl_print_header(lang_get('sign_off'));
 print "</tr>" . NEWLINE;
 while ($row = db_fetch_row($db, $rs)) {
     $testset_id = $row[TS_ID];
     $testset_name = $row[TS_NAME];
     $testset_date_created = $row[TS_DATE_CREATED];
     $testset_description = $row[TS_DESCRIPTION];
     $testset_status = $row[TS_STATUS];
     $testset_signoff_date = $row[TS_SIGNOFF_DATE];
     $testset_signoff_by = $row[TS_SIGNOFF_BY];
     $testset_comments = $row[TS_SIGNOFF_COMMENTS];
     $testset_orderby = $row[TS_ORDERBY];
     $testset_lockcomment = $row[TS_LOCK_COMMENT];
     $testset_lock_by = $row[TS_LOCK_BY];
     $testset_lock_date = $row[TS_LOCKCHANGE_DATE];
     $locked = testset_get_lock_status($testset_id);
 print "<input type=hidden name=table value=project_manage_testtype>" . NEWLINE;
 print "<table class=hide70>" . NEWLINE;
 print "<tr>" . NEWLINE;
 print "<td>" . NEWLINE;
 $rows_testtypes = project_get_test_types($selected_project_id, $order_by, $order_dir, $page_number);
 print "<input type=hidden name='order_dir' value='{$order_dir}'>";
 print "<input type=hidden name='order_by' value='{$order_by}'>";
 print "</td>" . NEWLINE;
 print "</tr>" . NEWLINE;
 print "</table>" . NEWLINE;
 print "</form>" . NEWLINE;
 if ($rows_testtypes) {
     print "<table id='sortabletable' class='sortable' rules='cols'>" . NEWLINE;
     print "<thead>" . NEWLINE;
     print "<tr>" . NEWLINE;
     html_tbl_print_header(lang_get('testtype'));
     if ($project_manager) {
         html_tbl_print_header_not_sortable(lang_get('edit'));
         html_tbl_print_header_not_sortable(lang_get('delete'));
     }
     print "\n</tr>" . NEWLINE;
     print "</thead>" . NEWLINE;
     print "<tbody>" . NEWLINE;
     foreach ($rows_testtypes as $row_testtype) {
         $id = $row_testtype[TEST_TYPE_ID];
         $name = $row_testtype[TEST_TYPE_TYPE];
         #$row_style = html_tbl_alternate_bgcolor($row_style);
         #print"<tr class='$row_style'>". NEWLINE;
         print "<tr>" . NEWLINE;
         print "<td>{$name}</td>" . NEWLINE;
         if ($project_manager) {
$rows_test_steps = test_get_test_steps( $test_id, $s_page_number );
print"</td>". NEWLINE;
print"</tr>". NEWLINE;
print"</table>". NEWLINE;
//print"</form>". NEWLINE; */
$rows_test_steps = results_get_verify_results_detail($test_run_id);
$num_test_steps = sizeof($rows_test_steps);
if ($num_test_steps != '0') {
    # Display test steps if they exist
    print "<table class='width100' rules='cols'>" . NEWLINE;
    print "<tr class='tbl_header'>" . NEWLINE;
    html_tbl_print_header(lang_get('step_no'));
    html_tbl_print_header(lang_get('step_action'));
    html_tbl_print_header(lang_get('step_expected'));
    html_tbl_print_header(lang_get('actual_result'));
    html_tbl_print_header(lang_get('pass_fail'));
    print "</tr>" . NEWLINE;
    $i = 0;
    $row_style = '';
    foreach ($rows_test_steps as $row_test_step) {
        $verify_results_id = $row_test_step[VERIFY_RESULTS_ID];
        $step_number = $row_test_step[VERIFY_RESULTS_VAL_ID];
        $step_action = $row_test_step[VERIFY_RESULTS_ACTION];
        //$step_input			= $row_test_step[VERIFY_RESULT_TEST_INPUTS];
        $step_expected = $row_test_step[VERIFY_RESULTS_EXPECTED_RESULT];
        $step_actual = $row_test_step[VERIFY_RESULTS_ACTUAL_RESULT];
        $test_status = $row_test_step[VERIFY_RESULTS_TEST_STATUS];
        $row_style = html_tbl_alternate_bgcolor($row_style);
        print "<tr class='{$row_style}'>" . NEWLINE;
        print "<td class='tbl-c' valign=top>{$step_number}</TD>" . NEWLINE;
        print "<td class='tbl-l' valign=top>{$step_action}</TD>" . NEWLINE;
     print "</table>" . NEWLINE;
     print "</div>";
     break;
     # RELEASE ASSOC
 # RELEASE ASSOC
 case 4:
     print "<table cellpadding=4 width='100%'>" . NEWLINE;
     print "<tr>" . NEWLINE;
     print "<td>" . NEWLINE;
     $req_rel_relationships = requirement_get_assoc_releases($s_req_version_id);
     if (!empty($req_rel_relationships)) {
         print "<table rules=cols class=width100>" . NEWLINE;
         print "<tr>" . NEWLINE;
         html_tbl_print_header("&nbsp;" . lang_get('release_name') . "&nbsp;");
         if ($user_has_delete_rights) {
             html_tbl_print_header("&nbsp;" . lang_get('delete') . "&nbsp;");
         }
         print "</tr>" . NEWLINE;
         foreach ($req_rel_relationships as $row_req_rel_rels) {
             $release_name = $row_req_rel_rels[RELEASE_NAME];
             $assoc_id = $row_req_rel_rels[REQ_VERS_ASSOC_REL_ID];
             $row_style = html_tbl_alternate_bgcolor($row_style);
             print "<tr class='{$row_style}'>" . NEWLINE;
             print "<td nowrap>{$release_name}</td>" . NEWLINE;
             if ($user_has_delete_rights) {
                 print "<td nowrap><a href='requirement_delete_assoc_action.php?assoc=release&amp;assoc_id={$assoc_id}'>" . lang_get('delete') . "</a></td>" . NEWLINE;
             }
             print "</tr>" . NEWLINE;
         }
         print "</table>" . NEWLINE;
     } else {
 #html_tbl_print_header( lang_get('ba_owner'), 	TEST_BA_OWNER,		$order_by, $order_dir );
 #html_tbl_print_header( lang_get('qa_owner'), 	TEST_QA_OWNER,		$order_by, $order_dir );
 #html_tbl_print_header( lang_get('tester'),  	TEST_TESTER,		$order_by, $order_dir );
 #html_tbl_print_header( lang_get('testtype'), 	TEST_TESTTYPE,		$order_by, $order_dir );
 #html_tbl_print_header( lang_get('area_tested'), TEST_AREA_TESTED,	$order_by, $order_dir );
 #html_tbl_print_header( lang_get('priority'),    TEST_PRIORITY,	    $order_by, $order_dir );
 html_tbl_print_header(lang_get('test_id'));
 html_tbl_print_header(lang_get('man_auto'));
 html_tbl_print_header(lang_get('autopass'));
 html_tbl_print_header(lang_get('test_name'));
 html_tbl_print_header(lang_get('ba_owner'));
 html_tbl_print_header(lang_get('qa_owner'));
 html_tbl_print_header(lang_get('tester'));
 html_tbl_print_header(lang_get('testtype'));
 html_tbl_print_header(lang_get('area_tested'));
 html_tbl_print_header(lang_get('priority'));
 print "</tr>" . NEWLINE;
 print "</thead>" . NEWLINE;
 print "<tbody>" . NEWLINE;
 foreach ($row as $row_test_detail) {
     $test_id = $row_test_detail[TEST_ID];
     $test_name = $row_test_detail[TEST_NAME];
     $ba_owner = $row_test_detail[TEST_BA_OWNER];
     $qa_owner = $row_test_detail[TEST_QA_OWNER];
     $tester = $row_test_detail[TEST_TESTER];
     $test_type = $row_test_detail[TEST_TESTTYPE];
     $manual = $row_test_detail[TEST_MANUAL];
     $automated = $row_test_detail[TEST_AUTOMATED];
     $area_tested = $row_test_detail[TEST_AREA_TESTED];
     $autopass = $row_test_detail[TEST_AUTO_PASS];
     $priority = $row_test_detail[TEST_PRIORITY];
Esempio n. 16
0
html_tbl_print_header(lang_get('closed_reason_code'), BUG_CLOSED_REASON_CODE, $order_by, $order_dir);
html_tbl_print_header(lang_get('bug_status'), BUG_STATUS, $order_by, $order_dir);
html_tbl_print_header(lang_get('reported_by'), BUG_REPORTER, $order_by, $order_dir);
html_tbl_print_header(lang_get('reported_date'), BUG_REPORTED_DATE, $order_by, $order_dir);
html_tbl_print_header(lang_get('assigned_to'), BUG_ASSIGNED_TO, $order_by, $order_dir);
html_tbl_print_header(lang_get('assigned_to_developer'), BUG_ASSIGNED_TO_DEVELOPER, $order_by, $order_dir);
html_tbl_print_header(lang_get('bug_closed'), BUG_CLOSED, $order_by, $order_dir);
html_tbl_print_header(lang_get('bug_closed_date'), BUG_CLOSED_DATE, $order_by, $order_dir);
html_tbl_print_header(lang_get('test_verification_id'), BUG_TEST_VERIFY_ID, $order_by, $order_dir);
html_tbl_print_header(lang_get('req_version_id'), BUG_REQ_VERSION_ID, $order_by, $order_dir);
html_tbl_print_header(lang_get('found_in_release'), BUG_FOUND_IN_RELEASE, $order_by, $order_dir);
html_tbl_print_header(lang_get('assigned_to_release'), BUG_ASSIGN_TO_RELEASE, $order_by, $order_dir);
html_tbl_print_header(lang_get('implemented_in_release'), BUG_IMPLEMENTED_IN_RELEASE, $order_by, $order_dir);
html_tbl_print_header(lang_get('discovery_period'), BUG_DISCOVERY_PERIOD, $order_by, $order_dir);
html_tbl_print_header(lang_get('bug_summary'), BUG_SUMMARY, $order_by, $order_dir);
html_tbl_print_header(lang_get('bug_description'), BUG_DESCRIPTION, $order_by, $order_dir);
print "</tr>" . NEWLINE;
$bugs_rows = exercise($project_id, $page_number, $order_by, $order_dir, $filter_bug_status, $filter_bug_category, $filter_bug_component, $filter_reported_by, $filter_assigned_to, $filter_assigned_to_dev, $filter_found_in_rel, $filter_assigned_to_rel, $filter_view_closed, $filter_search);
foreach ($bugs_rows as $bug_row) {
    $row_style = html_tbl_alternate_bgcolor($row_style);
    $bug_id = $bug_row[BUG_ID];
    $project_id = $bug_row[BUG_PROJECT_ID];
    $category = $bug_row[BUG_CATEGORY];
    $component = $bug_row[BUG_COMPONENT];
    $priority = $bug_row[BUG_PRIORITY];
    $severity = $bug_row[BUG_SEVERITY];
    $closed_reason_code = $bug_row[BUG_SEVERITY];
    $status = $bug_row[BUG_STATUS];
    $reporter = $bug_row[BUG_REPORTER];
    $reporter_date = $bug_row[BUG_REPORTED_DATE];
    $assigned_to = $bug_row[BUG_ASSIGNED_TO];
 #$row = test_get_test_steps( $test_id );
 $num_test_steps = sizeof($rows_test_steps);
 if ($num_test_steps != '0') {
     # Display test steps if they exist
     print "<table class='width100' rules='cols'>" . NEWLINE;
     print "<tr class='tbl_header'>" . NEWLINE;
     #html_tbl_print_header( lang_get('step_no') );
     #html_tbl_print_header( lang_get('step_action') );
     #html_tbl_print_header( lang_get('test_inputs') );
     #html_tbl_print_header( lang_get('step_expected') );
     #html_tbl_print_header( lang_get('step_edit') );
     html_tbl_print_header(lang_get('step_no'));
     html_tbl_print_header(lang_get('step_action'));
     html_tbl_print_header(lang_get('test_inputs'));
     html_tbl_print_header(lang_get('step_expected'));
     html_tbl_print_header(lang_get('step_edit'));
     print "</tr>" . NEWLINE;
     $row_style = '';
     foreach ($rows_test_steps as $row_test_step) {
         $row_test_step_id = $row_test_step[TEST_STEP_ID];
         $step_number = $row_test_step[TEST_STEP_NO];
         $step_action = $row_test_step[TEST_STEP_ACTION];
         $step_test_inputs = $row_test_step[TEST_STEP_TEST_INPUTS];
         $step_expected = $row_test_step[TEST_STEP_EXPECTED];
         $info_step = $row_test_step[TEST_STEP_INFO_STEP];
         $info_step_class = "";
         if ($info_step == "Y") {
             $info_step_class = "class='test-step-info'";
         }
         $row_style = html_tbl_alternate_bgcolor($row_style);
         print "<tr class='{$row_style}'>" . NEWLINE;
print "<div align=center>" . NEWLINE;
print "<table width=80% border=0>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td align=left><font size=3><b>" . lang_get('latest_requirements') . "</b></font></td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "</table>" . NEWLINE;
#print"<h3>".lang_get("latest_requirements")."</h3>". NEWLINE;
$rows_reqs = requirement_get_last_updated($project_id);
if ($rows_reqs) {
    print "<table rules=cols class=width80>" . NEWLINE;
    print "<tr>";
    html_tbl_print_header(lang_get('req_id'));
    html_tbl_print_header(lang_get('req_version'));
    html_tbl_print_header(lang_get('req_name'));
    html_tbl_print_header(lang_get('last_updated_by'));
    html_tbl_print_header(lang_get('last_updated'));
    print "</tr>";
    foreach ($rows_reqs as $rows_req) {
        $req_id = $rows_req[REQ_ID];
        $req_version_id = $rows_req[REQ_VERS_UNIQUE_ID];
        $req_name = $rows_req[REQ_FILENAME];
        $req_last_updated = $rows_req[REQ_VERS_LAST_UPDATED];
        $req_last_updated_by = $rows_req[REQ_VERS_LAST_UPDATED_BY];
        $req_version = $rows_req[REQ_VERS_VERSION];
        $display_req_id = util_pad_id($req_id);
        $row_style = html_tbl_alternate_bgcolor($row_style);
        print "<tr class={$row_style}>" . NEWLINE;
        print "<td><a href='{$req_detail_page}?req_id={$req_id}&amp;req_version_id={$req_version_id}'>{$display_req_id}</a></td>" . NEWLINE;
        print "<td>{$req_version}</td>" . NEWLINE;
        print "<td>{$req_name}</td>" . NEWLINE;
        print "<td>{$req_last_updated_by}</td>" . NEWLINE;
 //print"<form action='project_archive_tests_page.php' method=post>". NEWLINE;
 print "<input type=hidden name=project_id value={$selected_project_id}>";
 print "<table id='sortabletable' class='sortable' rules=cols>" . NEWLINE;
 print "<thead>" . NEWLINE;
 print "<tr>" . NEWLINE;
 #html_tbl_print_header( lang_get('man_auto') );
 #html_tbl_print_header( lang_get('test_name'), TEST_NAME, 			$order_by, $order_dir );
 #html_tbl_print_header( lang_get('testtype'), TEST_TESTTYPE, 		$order_by, $order_dir );
 #html_tbl_print_header( lang_get('area_tested'), TEST_AREA_TESTED, 	$order_by, $order_dir );
 #html_tbl_print_header( lang_get('status'), TEST_STATUS, 			$order_by, $order_dir );
 #html_tbl_print_header( lang_get('archive') );
 html_tbl_print_header_not_sortable(lang_get('man_auto'));
 html_tbl_print_header(lang_get('test_name'));
 html_tbl_print_header(lang_get('testtype'));
 html_tbl_print_header(lang_get('area_tested'));
 html_tbl_print_header(lang_get('status'));
 html_tbl_print_header_not_sortable(lang_get('archive'));
 print "</tr>" . NEWLINE;
 print "</thead>" . NEWLINE;
 print "<tbody>" . NEWLINE;
 foreach ($row as $test_row) {
     #$row_style = html_tbl_alternate_bgcolor($row_style);
     #print"<tr class='$row_style'>". NEWLINE;
     print "<tr>" . NEWLINE;
     print "<td>" . html_print_testtype_icon($test_row[TEST_MANUAL], $test_row[TEST_AUTOMATED]) . "</td>" . NEWLINE;
     print "<td>" . $test_row[TEST_NAME] . "</td>" . NEWLINE;
     print "<td>" . $test_row[TEST_TESTTYPE] . "</td>" . NEWLINE;
     print "<td>" . $test_row[TEST_AREA_TESTED] . "</td>" . NEWLINE;
     print "<td>" . $test_row[TEST_STATUS] . "</td>" . NEWLINE;
     if (session_records_ischecked("archive_tests", $test_row[TEST_ID])) {
         $checked = "checked";
 #html_tbl_print_header( lang_get('first'), 		USER_FNAME,					$s_users_order_by, $s_users_order_dir,	$action_page );
 #html_tbl_print_header( lang_get('last'),	 	USER_LNAME,					$s_users_order_by, $s_users_order_dir,	$action_page );
 #html_tbl_print_header( lang_get('email'), 		USER_EMAIL,					$s_users_order_by, $s_users_order_dir,	$action_page );
 #html_tbl_print_header( lang_get('phone') );
 #html_tbl_print_header( lang_get('user_rights'), PROJ_USER_PROJECT_RIGHTS,	$s_users_order_by, $s_users_order_dir,	$action_page );
 #html_tbl_print_header( lang_get('qa_owner'), PROJ_USER_QA_OWNER,			$s_users_order_by, $s_users_order_dir,	$action_page );
 #html_tbl_print_header( lang_get('ba_owner'), PROJ_USER_BA_OWNER,			$s_users_order_by, $s_users_order_dir,	$action_page );
 html_tbl_print_header(lang_get('id'));
 html_tbl_print_header(lang_get('username'));
 html_tbl_print_header(lang_get('first'));
 html_tbl_print_header(lang_get('last'));
 html_tbl_print_header(lang_get('email'));
 html_tbl_print_header_not_sortable(lang_get('phone'));
 html_tbl_print_header(lang_get('user_rights'));
 html_tbl_print_header(lang_get('qa_owner'));
 html_tbl_print_header(lang_get('ba_owner'));
 if ($project_manager) {
     html_tbl_print_header_not_sortable(lang_get('edit'));
     html_tbl_print_header_not_sortable(lang_get('remove'));
 }
 print "\n</tr>" . NEWLINE;
 print "</thead>" . NEWLINE;
 print "<tbody>" . NEWLINE;
 foreach ($rows_user_details as $row_user_detail) {
     $tbl_user_id = $row_user_detail[USER_ID];
     $tbl_user_first = $row_user_detail[USER_FNAME];
     $tbl_user_last = $row_user_detail[USER_LNAME];
     $tbl_username = $row_user_detail[USER_UNAME];
     $tbl_user_email = $row_user_detail[USER_EMAIL];
     $tbl_user_phone = $row_user_detail[USER_PHONE];
     $tbl_user_delete_rights = $row_user_detail[PROJ_USER_DELETE_RIGHTS];
 print "<th>";
 print "</th>" . NEWLINE;
 html_tbl_print_header(lang_get('test_id'), TEST_ID, $order_by, $order_dir);
 print "<th>&nbsp;</th>" . NEWLINE;
 html_tbl_print_header(lang_get('test_name'), TEST_NAME, $order_by, $order_dir);
 html_tbl_print_header(lang_get('ba_owner'), TEST_BA_OWNER, $order_by, $order_dir);
 html_tbl_print_header(lang_get('qa_owner'), TEST_QA_OWNER, $order_by, $order_dir);
 html_tbl_print_header(lang_get('tester'), TEST_TESTER, $order_by, $order_dir);
 html_tbl_print_header(lang_get('testtype'), TEST_TESTTYPE, $order_by, $order_dir);
 html_tbl_print_header(lang_get('area_tested'), TEST_AREA_TESTED, $order_by, $order_dir);
 html_tbl_print_header(lang_get('test_status'), TEST_TS_ASSOC_STATUS, $order_by, $order_dir);
 html_tbl_print_header(lang_get('test_doc'));
 html_tbl_print_header(lang_get('results'));
 html_tbl_print_header(lang_get('tester'));
 html_tbl_print_header(lang_get('info'));
 html_tbl_print_header(lang_get('bug'));
 print "</tr>" . NEWLINE;
 foreach ($rows as $row) {
     $test_id = $row[TEST_ID];
     $display_test_id = util_pad_id($test_id);
     $test_name = $row[TEST_NAME];
     $manual = $row[TEST_MANUAL];
     $automated = $row[TEST_AUTOMATED];
     $auto_pass = $row[TEST_AUTO_PASS];
     $ba_owner = $row[TEST_BA_OWNER];
     $qa_owner = $row[TEST_QA_OWNER];
     $tester = $row[TEST_TESTER];
     $test_type = $row[TEST_TESTTYPE];
     $area_tested = $row[TEST_AREA_TESTED];
     $priority = $row[TEST_PRIORITY];
     $test_ts_assoc_id = $row[TEST_TS_ASSOC_ID];
 #html_tbl_print_header( lang_get('finished') );
 html_tbl_print_header(lang_get('os'));
 html_tbl_print_header(lang_get('sp'));
 html_tbl_print_header(lang_get('pass'));
 html_tbl_print_header(lang_get('fail'));
 html_tbl_print_header(lang_get('blank'));
 html_tbl_print_header(lang_get('total'));
 html_tbl_print_header(lang_get('tester'));
 //html_tbl_print_header( lang_get('test_status') );
 //html_tbl_print_header( "" );
 //html_tbl_print_header( lang_get('comment') );
 //html_tbl_print_header( lang_get('sign_off') );
 //print"<th></th>";
 //html_tbl_print_header( lang_get('info') );
 //html_tbl_print_header( lang_get('doc') );
 html_tbl_print_header(lang_get('view_results'));
 //html_tbl_print_header( lang_get('update') );
 //html_tbl_print_header( lang_get('delete') );
 print "</tr>";
 foreach ($rows_test_runs as $row_test_run) {
     $machine_name = $row_test_run[TEST_RESULTS_MACHINE_NAME];
     $time_started = $row_test_run[TEST_RESULTS_TIME_STARTED];
     $time_finished = $row_test_run[TEST_RESULTS_TIME_FINISHED];
     $env = $row_test_run[TEST_RESULTS_ENVIRONMENT];
     #$finished			= $row_test_run[TEST_RESULTS_FINISHED];
     $os = $row_test_run[TEST_RESULTS_OS];
     $sp = $row_test_run[TEST_RESULTS_SP];
     $assigned_to = $row_test_run[TEST_RESULTS_ASSIGNED_TO];
     $status = $row_test_run[TEST_RESULTS_TEST_STATUS];
     $comments = $row_test_run[TEST_RESULTS_COMMENTS];
     $rows_test_runs_id = $row_test_run[TEST_RESULTS_TS_UNIQUE_RUN_ID];
$testset_id = admin_get_max_testset($build_id);
$statuses = results_get_teststatus_by_project($project_id);
#$results_url	= $results_page ."?release_id=$release_id&amp;build_id=$build_id&amp;testset_id=$testset_id";
$rows_testsets = testset_filter_row($project_id, $build_name, $release_name, $per_page, $order_by, $order_dir, $page_number);
#$rows_testsets = testset_get_last($project_id);
if ($rows_testsets) {
    print "<table align=center rules=cols class=width95>" . NEWLINE;
    print "<tr>" . NEWLINE;
    html_tbl_print_sortable_header(lang_get('testset_id'), TS_TBL . "." . TS_ID, $order_by, $order_dir);
    html_tbl_print_sortable_header(lang_get('testset_name'), TS_TBL . "." . TS_NAME, $order_by, $order_dir);
    html_tbl_print_sortable_header(lang_get('build_name'), BUILD_TBL . "." . BUILD_NAME, $order_by, $order_dir);
    html_tbl_print_sortable_header(lang_get('release_name'), RELEASE_TBL . "." . RELEASE_NAME, $order_by, $order_dir);
    html_tbl_print_sortable_header(lang_get('tests'));
    # Display table headers based on the statuses of the project
    foreach ($statuses as $status) {
        html_tbl_print_header($status);
    }
    html_tbl_print_sortable_header(lang_get('testset_date_received'), TS_TBL . "." . TS_DATE_CREATED, $order_by, $order_dir);
    print "</tr>" . NEWLINE;
    foreach ($rows_testsets as $row_testset) {
        $testset_id = $row_testset[TS_ID];
        $num_tests = admin_count_tests_in_testset($testset_id);
        #$testset_name = admin_get_testset_name( $testset_id );
        $testset_name = $row_testset[TS_NAME];
        $testset_build_id = admin_get_build_id_from_testset_id($testset_id);
        #$testset_build_name = admin_get_build_name($testset_build_id);
        $testset_build_name = $row_testset[BUILD_NAME];
        $testset_release_id = admin_get_release_id_from_build_id($testset_build_id);
        #$testset_release_name = admin_get_release_name($testset_release_id);
        $testset_release_name = $row_testset[RELEASE_NAME];
        $testset_date_created = $row_testset[TS_DATE_CREATED];
auth_authenticate_user();
$project_name = session_get_project_name();
$page = basename(__FILE__);
html_window_title();
html_print_body();
html_page_title($project_name . " - " . lang_get('reporting_page'));
html_page_header($db, $project_name);
html_print_menu();
error_report_check($_GET);
#print"<br>Please select from one of the reports below<br><br>";
print "<br><br>" . NEWLINE;
print "<div align=center>" . NEWLINE;
print "<table class=width90 rules=cols>" . NEWLINE;
print "<tr class=tbl_header>" . NEWLINE;
html_tbl_print_header(lang_get('report_name'));
html_tbl_print_header(lang_get('description'));
print "</tr>" . NEWLINE;
# Custom Report
print "<tr class='row-2'>";
//print"<td class='tbl-l'><a href='report_custom_page.php'>". lang_get('report_custom_page') ."</a></td>". NEWLINE;
print "<td class='tbl-l'>" . lang_get('report_custom_page') . "</td>" . NEWLINE;
print "<td class='tbl-l'>" . lang_get('report_custom_page_desc') . "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
# TEST AREA REPORT
print "<tr class='row-1'>";
print "<td class='tbl-l'><a href='report_area_tested_page.php'>" . lang_get('area_tested') . "</a></td>" . NEWLINE;
print "<td class='tbl-l'>" . lang_get('area_tested_desc') . "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
# BUILD STATUS REPORT
print "<tr class='row-2'>";
print "<td class='tbl-l'><a href='report_build_status_page.php'>" . lang_get('build_status') . "</a></td>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td colspan='2' class='form-data-c'><input type='submit' value='" . lang_get('add') . "'></td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "</table>" . NEWLINE;
print "</form>" . NEWLINE;
print "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "</table>" . NEWLINE;
print "<br><br>" . NEWLINE;
$build_details = admin_get_builds($release_id, $order_by, $order_dir);
if (!empty($build_details)) {
    print "<table id='sortabletable' class='sortable' rules=cols>" . NEWLINE;
    print "<thead>" . NEWLINE;
    print "<tr class=tbl_header>" . NEWLINE;
    html_tbl_print_header_not_sortable(lang_get('build_name'));
    html_tbl_print_header(lang_get('build_date_received'));
    html_tbl_print_header_not_sortable(lang_get('build_description'));
    html_tbl_print_header_not_sortable(lang_get('edit'));
    html_tbl_print_header_not_sortable(lang_get('delete'));
    print "\t</tr>" . NEWLINE;
    print "</thead>" . NEWLINE;
    print "<tbody>" . NEWLINE;
    for ($i = 0; $i < sizeof($build_details); $i++) {
        extract($build_details[$i], EXTR_PREFIX_ALL, 'v');
        $build_id = ${'v_' . BUILD_ID};
        $build_name = ${'v_' . BUILD_NAME};
        $build_date_received = ${'v_' . BUILD_DATE_REC};
        $build_description = ${'v_' . BUILD_DESCRIPTION};
        $row_style = html_tbl_alternate_bgcolor($row_style);
        print "<tr class='{$row_style}'>" . NEWLINE;
        print "<td class='tbl-l'><a href='{$testset_page}?build_id={$build_id}'>{$build_name}</a></td>" . NEWLINE;
 print "<table class=width100 rules=cols>" . NEWLINE;
 print "<tr>" . NEWLINE;
 html_tbl_print_header(lang_get('project_name'), PROJ_NAME, $order_by, $order_dir);
 html_tbl_print_header(lang_get('project_user_rights'), PROJ_USER_PROJECT_RIGHTS, $order_by, $order_dir);
 html_tbl_print_header(lang_get('delete_rights'), PROJ_USER_DELETE_RIGHTS, $order_by, $order_dir);
 html_tbl_print_header(lang_get('email_testset'), PROJ_USER_EMAIL_TESTSET, $order_by, $order_dir);
 html_tbl_print_header(lang_get('email_discussions'), PROJ_USER_EMAIL_REQ_DISCUSSION, $order_by, $order_dir);
 html_tbl_print_header(lang_get('email_new_bug'), PROJ_USER_EMAIL_NEW_BUG, $order_by, $order_dir);
 html_tbl_print_header(lang_get('email_update_bug'), PROJ_USER_EMAIL_UPDATE_BUG, $order_by, $order_dir);
 html_tbl_print_header(lang_get('email_assigned_bug'), PROJ_USER_EMAIL_ASSIGNED_BUG, $order_by, $order_dir);
 html_tbl_print_header(lang_get('email_bugnote_bug'), PROJ_USER_EMAIL_BUGNOTE_BUG, $order_by, $order_dir);
 html_tbl_print_header(lang_get('email_status_bug'), PROJ_USER_EMAIL_STATUS_BUG, $order_by, $order_dir);
 html_tbl_print_header(lang_get('qa_tester'), PROJ_USER_QA_OWNER, $order_by, $order_dir);
 html_tbl_print_header(lang_get('ba_owner'), PROJ_USER_BA_OWNER, $order_by, $order_dir);
 if ($tempest_admin) {
     html_tbl_print_header(lang_get('remove'));
 }
 print "</tr>" . NEWLINE;
 foreach ($rows_user_projects as $user_project_row) {
     $row_style = html_tbl_alternate_bgcolor($row_style);
     $assoc_project_id = $user_project_row[PROJ_ID];
     print "<tr class='{$row_style}'>" . NEWLINE;
     # project name
     print "<td>" . $user_project_row[PROJ_NAME] . "<input type=hidden name='{$assoc_project_id}" . "_project_name' value='" . $user_project_row[PROJ_NAME] . "'></td>" . NEWLINE;
     # project rights
     print "<td>" . NEWLINE;
     print "<input type=hidden name='{$assoc_project_id}" . "_project_rights' value='" . $user_project_row[PROJ_USER_PROJECT_RIGHTS] . "'>" . NEWLINE;
     print "<select name='{$assoc_project_id}" . "_project_rights' size=1";
     if (!user_has_rights($assoc_project_id, $user_id, MANAGER)) {
         print ' disabled';
     }
html_browse_release_menu($db, $page, $project_id);
error_report_check($_GET);
print "<div align=center>";
print "<br>" . NEWLINE;
if (isset($testset_id) && $testset_id != 'all') {
    $verif_summary = report_get_verifs_summary($testset_id);
    $passed = $verif_summary["Passed"];
    $failed = $verif_summary["Failed"];
    $info = $verif_summary["Info"];
    $bugs = $verif_summary["Bugs"];
    print "<form method=post action='{$page}?_release_id={$release_id}&amp;_build_id={$build_id}&amp;_testset_id={$testset_id}'>";
    print "<table class=width80>" . NEWLINE;
    print "<tr>" . NEWLINE;
    html_tbl_print_header(lang_get('verifs_passed'));
    html_tbl_print_header(lang_get('verifs_failed'));
    html_tbl_print_header(lang_get('num_bugs'));
    print "</tr>" . NEWLINE;
    print "<tr>" . NEWLINE;
    print "<td>{$passed}</td>" . NEWLINE;
    if ($failed !== 0) {
        print "<td><a href='report_verif_failed_page.php?_release_id={$release_id}&amp;_build_id={$build_id}&amp;_testset_id={$testset_id}'>{$failed}</a></td>" . NEWLINE;
    } else {
        print "<td>0</td>" . NEWLINE;
    }
    if ($bugs !== 0) {
        print "<td><a href='report_verif_failed_page.php?_release_id={$release_id}&amp;_build_id={$build_id}&amp;_testset_id={$testset_id}&bugs_only=true'>{$bugs}</a></td>" . NEWLINE;
    } else {
        print "<td>0</td>" . NEWLINE;
    }
    print "</tr>" . NEWLINE;
    print "</table>" . NEWLINE;
 $g_timer->mark_time("Second Table");
 $test_signoff_details = report_get_test_signoff_details($testset_id, $order_by, $order_dir, $page);
 if (!empty($test_signoff_details)) {
     print "<form method=post action='{$page}?_release_id={$release_id}&amp;_build_id={$build_id}&amp;_testset_id={$testset_id}'>";
     print "<table class=width100 rules=cols>" . NEWLINE;
     print "<tr>" . NEWLINE;
     html_tbl_print_header("");
     html_tbl_print_header(lang_get('test_name'), TEST_NAME, $order_by, $order_dir);
     html_tbl_print_header(lang_get('area_tested'), TEST_AREA_TESTED, $order_by, $order_dir);
     html_tbl_print_header(lang_get('test_assigned_to'), TEST_TS_ASSOC_ASSIGNED_TO, $order_by, $order_dir);
     html_tbl_print_header(lang_get('test_status'), TEST_TS_ASSOC_STATUS, $order_by, $order_dir);
     html_tbl_print_header("");
     html_tbl_print_header(lang_get('os'));
     html_tbl_print_header(lang_get('info'), TEST_TS_ASSOC_COMMENTS, $order_by, $order_dir);
     html_tbl_print_header(lang_get('time_tested'));
     html_tbl_print_header(lang_get('time_approved'), TEST_TS_ASSOC_TIMESTAMP, $order_by, $order_dir);
     print "</tr>" . NEWLINE;
     foreach ($test_signoff_details as $row_test_signoff) {
         $row_style = html_tbl_alternate_bgcolor($row_style);
         $last_test_run = test_get_last_run($row_test_signoff[TEST_ID], $testset_id);
         $os = $last_test_run[TEST_RESULTS_OS];
         $time_started = $last_test_run[TEST_RESULTS_TIME_STARTED];
         print "<tr class='{$row_style}'>" . NEWLINE;
         print "<td>" . html_print_testtype_icon($row_test_signoff[TEST_MANUAL], $row_test_signoff[TEST_AUTOMATED]) . "</td>" . NEWLINE;
         print "<td>" . $row_test_signoff[TEST_NAME] . "</td>" . NEWLINE;
         print "<td>" . $row_test_signoff[TEST_AREA_TESTED] . "</td>" . NEWLINE;
         print "<td>";
         if (!empty($row_test_signoff[TEST_TS_ASSOC_ASSIGNED_TO])) {
             print $row_test_signoff[TEST_TS_ASSOC_ASSIGNED_TO];
         } else {
             print "Not Assigned";
 print "<tr>" . NEWLINE;
 print "<td>" . NEWLINE;
 $rows_test_doc_types = project_get_test_doc_types($selected_project_id, $order_by, $order_dir, $page_number);
 print "<input type=hidden name='order_dir' value='{$order_dir}'>";
 print "<input type=hidden name='order_by' value='{$order_by}'>";
 print "</td>" . NEWLINE;
 print "</tr>" . NEWLINE;
 print "</table>" . NEWLINE;
 print "</form>" . NEWLINE;
 if ($rows_test_doc_types) {
     print "<table class='width70' rules=cols>" . NEWLINE;
     print "<tr>" . NEWLINE;
     html_tbl_print_header(lang_get('test_doc_type'), MAN_DOC_TYPE_NAME, $order_by, $order_dir, "{$page}?page_number={$page_number}", $page_number);
     if ($project_manager) {
         html_tbl_print_header(lang_get('edit'));
         html_tbl_print_header(lang_get('delete'));
     }
     print "\n</tr>" . NEWLINE;
     foreach ($rows_test_doc_types as $row_test_doc_type) {
         $id = $row_test_doc_type[MAN_DOC_TYPE_ID];
         $name = $row_test_doc_type[MAN_DOC_TYPE_NAME];
         $row_style = html_tbl_alternate_bgcolor($row_style);
         print "<tr class='{$row_style}'>" . NEWLINE;
         print "<td>{$name}</td>" . NEWLINE;
         if ($project_manager) {
             print "<td><a href='project_edit_testdoctype_page.php?test_doc_type_id={$id}'>" . lang_get("edit") . "</a></td>" . NEWLINE;
             print "<td>" . NEWLINE;
             print "<form name='delete_release' method=post action='{$delete_page}'>" . NEWLINE;
             print "<input type='submit' name='remove_man_doc_type_from_project' value='" . lang_get('delete') . "' class='page-numbers'>" . NEWLINE;
             print "<input type='hidden' name='r_page' value='{$redirect_url}#test_doc_type'>" . NEWLINE;
             print "<input type='hidden' name='f' value='remove_man_doc_type_from_project'>" . NEWLINE;
 $history_details = bug_get_history($bug_id);
 if ($history_details) {
     print "<a name='history' id='history'></a>" . NEWLINE;
     print "<table class=width95 rules=cols>" . NEWLINE;
     # FORM TITLE
     print "<tr>" . NEWLINE;
     print "<td class='white-grid-header-l' colspan='4'><b>" . lang_get('bug_history') . "</b>";
     print "&nbsp;<a href='#'>[" . lang_get('back_to_top') . "]</a>";
     print "</td>" . NEWLINE;
     print "</tr>" . NEWLINE;
     # COLUMN HEADERS
     print "<tr class=tbl_header>" . NEWLINE;
     html_tbl_print_header(lang_get('date_modified'));
     html_tbl_print_header(lang_get('username'));
     html_tbl_print_header(lang_get('field'));
     html_tbl_print_header(lang_get('change'));
     print "</tr>" . NEWLINE;
     $row_style = '';
     foreach ($history_details as $history_detail) {
         $history_date = $history_detail[BUG_HISTORY_DATE];
         $history_user = $history_detail[BUG_HISTORY_USER];
         $history_field = $history_detail[BUG_HISTORY_FIELD];
         $history_old_val = $history_detail[BUG_HISTORY_OLD_VALUE];
         $history_new_val = $history_detail[BUG_HISTORY_NEW_VALUE];
         $change = '';
         if ($history_field != lang_get('new_bug')) {
             if (!empty($history_old_val) || !empty($history_new_val)) {
                 $change = $history_old_val . " => " . $history_new_val;
             }
         }
         $row_style = html_tbl_alternate_bgcolor($row_style);