print "<td class=left>" . NEWLINE;
 print "<select name='test_result_status' size=1>" . NEWLINE;
 $selected_value = $status;
 $test_run_status = results_get_teststatus_by_project($project_id);
 html_print_list_box_from_array($test_run_status, $selected_value);
 print "</select>" . NEWLINE;
 print "</td>" . NEWLINE;
 print "</tr>" . NEWLINE;
 # Root Cause for Failure
 print "<tr>" . NEWLINE;
 print "<td class=form-lbl-r>" . lang_get('root_cause') . "</td>" . NEWLINE;
 print "<td class=left>" . NEWLINE;
 print "<select name='root_cause' size=1>" . NEWLINE;
 $selected_value = $root_cause;
 $root_causes = results_get_root_cause_values();
 html_print_list_box_from_array($root_causes, $selected_value);
 print "</select>" . NEWLINE;
 print "</td>" . NEWLINE;
 print "</tr>" . NEWLINE;
 # E-mail user
 print "<tr>" . NEWLINE;
 print "<td class=form-lbl-r>" . lang_get('email_test_run_status') . "</td>" . NEWLINE;
 print "<td class=left>" . NEWLINE;
 print "<select name='email_users[]' multiple size='5'>" . NEWLINE;
 //$selected_value = user_get_email_by_username($assigned_to);
 $users = user_get_details_all($project_id);
 $email_users = array();
 foreach ($users as $user) {
     $email_users[$user[USER_EMAIL]] = $user[USER_UNAME];
 }
 //$email_users[] = "";
print "<td>";
print "<form method=post action={$action_page}>";
print "<input type=hidden name='bug_id' value='{$bug_id}'>" . NEWLINE;
print "<table class=inner rules=none border=0>";
# FORM TITLE
print "<tr>";
print "<td class=form-header-l colspan=2>" . lang_get('close_bug') . "</td>";
print "</tr>";
# IMPLEMENTED IN RELEASE
print "<tr>" . NEWLINE;
print "<td class=form-lbl-r nowrap>" . lang_get('closed_reason_code') . "<span class='required'>*</span></td>" . NEWLINE;
print "<td class=form-data-l>" . NEWLINE;
$selected_value = session_validate_form_get_field('closed_reason_code', $closed_reason_code);
print "<select name='closed_reason_code_required' size=1>" . NEWLINE;
$closed_reasons = bug_get_closed_reason_code();
html_print_list_box_from_array($closed_reasons, $selected_value);
print "</select>" . NEWLINE;
print "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
# BUGNOTE
print "<tr>" . NEWLINE;
print "<td class=form-lbl-r nowrap>" . lang_get('bug_note') . "</td>" . NEWLINE;
print "<td class=form-data-l>" . NEWLINE;
print "<textarea rows='6' cols='50' name='bugnote'></textarea>" . NEWLINE;
print "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
util_add_spacer();
# BUTTON
print "<tr>" . NEWLINE;
print "<td colspan='2'><input type=submit name='update' value='" . lang_get("update") . "'></td>" . NEWLINE;
print "</tr>" . NEWLINE;
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-header-l colspan=2>" . lang_get('upload_heading') . "</td>" . NEWLINE;
 print "</tr>" . NEWLINE;
 print "<tr>" . NEWLINE;
 print "<td class=form-lbl-r>" . lang_get('file_name') . "</td>" . NEWLINE;
 print "<td class=form-data-l><input type='file' name='uploadfile' size='60'></td>" . NEWLINE;
 print "</tr>" . NEWLINE;
 print "<tr>" . NEWLINE;
 print "<td class=form-lbl-r>" . lang_get('comments') . "</td>" . NEWLINE;
 print "<td class=form-data-l><textarea rows='2' cols='45' name='comments'></textarea></td>" . NEWLINE;
 print "</tr>" . NEWLINE;
 print "<tr>" . NEWLINE;
 print "<td class=form-lbl-r>" . lang_get('file_type') . "</td>" . NEWLINE;
 print "<td class=form-data-l>" . NEWLINE;
 print "<select name=doc_type>" . NEWLINE;
 $test_types = test_get_test_type($project_id, $blank = true);
 html_print_list_box_from_array($test_types);
 print "</select></td>" . NEWLINE;
 print "</tr>" . NEWLINE;
 print "<tr>" . NEWLINE;
 print "<td colspan=2><input type='hidden' name='MAX_FILE_SIZE' value='25000000'></td>" . NEWLINE;
 print "</tr>" . NEWLINE;
 print "<tr>" . NEWLINE;
 print "<td class=center colspan=2><input type='submit' value='Upload'></td>" . NEWLINE;
 print "</tr>" . NEWLINE;
 print "</table>" . NEWLINE;
 print "</form>" . NEWLINE;
 print "</td>" . NEWLINE;
 print "</tr>" . NEWLINE;
 print "</table>" . NEWLINE;
 print "<br>" . NEWLINE;
 print "<br>" . NEWLINE;
    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>";
    print"</tr>" ;
print "<form method=post action=requirement_change_status_page.php>" . NEWLINE;
print "<input type='hidden' name=req_ids value='{$req_ids}'>";
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-data-l'><h4>" . lang_get('update_status') . "</h4></td>" . NEWLINE;
print "</tr>" . NEWLINE;
# STATUS
print "<tr>" . NEWLINE;
print "<td class='form-data-c'>";
print "<select name=req_status size=1>" . NEWLINE;
$list_box = requirement_get_statuses();
html_print_list_box_from_array($list_box);
print "</select>" . NEWLINE;
print "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
# SUBMIT BUTTON
print "<tr>" . NEWLINE;
print "<td class='form-data-c'><input type='submit' name=submit_status value='" . lang_get('update') . "'></td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "</table>" . NEWLINE;
print "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "</table>" . NEWLINE;
print "</form>" . NEWLINE;
print "</div>" . NEWLINE;
html_print_footer();
# ---------------------------------------------------------------------
    print "</td>" . NEWLINE;
}
print "</tr>" . NEWLINE;
print "<tr>" . NEWLINE;
# Change Password
print "<td class=form-lbl-r>" . lang_get('change_password') . "</td>" . NEWLINE;
print "<td class=form-lbl-l><input tabindex=11 type=password name='password' maxlength=20 ";
if (!$tempest_admin && $user_id != $selected_user_id) {
    print ' disabled';
}
print "></td>" . NEWLINE;
# Add To Projects
if ($tempest_admin && !empty($user_unassociated_projects)) {
    print "<td class=form-lbl-l width='33%' rowspan=8 valign=top>" . NEWLINE;
    print "<select tabindex=100 name='add_to_projects[]' size=11 multiple>";
    html_print_list_box_from_array($user_unassociated_projects, session_validate_form_get_field("add_to_projects"));
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
}
print "</tr>" . NEWLINE;
print "<tr>" . NEWLINE;
# Change Password Confirm
print "<td class=form-lbl-r>" . lang_get('password_confirm') . "</td>" . NEWLINE;
print "<td class=form-lbl-l><input tabindex=15 type=password name='password_confirm' maxlength=20 ";
if (!$tempest_admin && $user_id != $selected_user_id) {
    print ' disabled';
}
print "></td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "<tr>" . NEWLINE;
# First Name
$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;
} else {
        }
        print "</tbody>" . NEWLINE;
        print "</table>" . NEWLINE;
        #option is displayed,if user is manager
        if ($user_is_manager && !$locked) {
            print "<table>" . NEWLINE;
            print "<tr>" . NEWLINE;
            print "<td align='left'>" . NEWLINE;
            if (session_use_javascript()) {
                print "<input id=select_all type=checkbox name=thispage onClick='checkAll( this )'>\n" . NEWLINE;
                print "<label for=select_all>" . lang_get("select_all") . "</label>\n" . NEWLINE;
            }
            print "<select name='action'>\n" . NEWLINE;
            $selected_value = '';
            $test_run_status = results_get_teststatus_by_project($project_id);
            html_print_list_box_from_array($test_run_status, $selected_value);
            print "</select>\n" . NEWLINE;
            print "</td>\n" . NEWLINE;
            print "<td><input type='hidden' name='testset_id' value='{$testset_id}'></td>\n" . NEWLINE;
            print "<td><input type='submit' name=mass_update value='OK'></td>\n" . NEWLINE;
            print "</table>\n" . NEWLINE;
        }
    } else {
        print html_no_records_found_message(lang_get("no_tests_testset"));
    }
    print "</form>\n" . NEWLINE;
} elseif (!empty($s_properties['build_id']) && $s_properties['build_id'] != 'all') {
    # Move this above the if loop so it can be used by all queries on the page
    $testset_tbl = TS_TBL;
    $db_testset_id = TS_TBL . "." . TS_ID;
    $db_testset_name = TS_TBL . "." . TS_NAME;
}

$rows_release_2[""] = "";
html_print_list_box_from_key_array( $rows_release_2, session_validate_form_get_field('req_assign_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, session_validate_form_get_field('req_assigned_to'));
print "</select>" . NEWLINE;
print "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
# FUNCTIONALITY
print "<tr>" . NEWLINE;
print "<td class=form-lbl-r valign=top nowrap>" . lang_get('functionality') . "</td>" . NEWLINE;
print "<td class=form-data-l>" . NEWLINE;
print "<select name='req_functionality[]' size=6 multiple>" . NEWLINE;
$list_box = array();
$rows = project_get_req_functionality($project_id);
foreach ($rows as $row) {
    $list_box[$row[REQ_FUNCT_ID]] = $row[REQ_FUNCT_NAME];
}
html_print_list_box_from_key_array($list_box, session_validate_form_get_field('req_functionality'));
#html_print_list_box_from_key_array( $list_box );
        //$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"<td class='tbl-l' valign=top>$step_input</TD>". NEWLINE;
        print "<td class='tbl-l' valign=top>{$step_expected}</TD>" . NEWLINE;
        print "<td><textarea name='actual_result_{$verify_results_id}' rows='4' cols='30'>" . session_validate_form_get_field("actual_result_{$verify_results_id}", $step_actual) . "</textarea></td>" . NEWLINE;
        print "<td>" . NEWLINE;
        print "<select name='step_status_{$verify_results_id}'>";
        $list_box = array("Pass", "Fail", "Info", "");
        $list_box_selected = session_validate_form_get_field("step_status_{$verify_results_id}", $test_status);
        html_print_list_box_from_array($list_box, $list_box_selected);
        print "</select>" . NEWLINE;
        print "</td>" . NEWLINE;
        print "</tr>" . NEWLINE;
        //		print"<td><input type='hidden' name='step_number[{$i}]' value='$step_number'></td>". NEWLINE;
        //		print"<td><input type='hidden' name='step_action[{$i}]' value='$step_action'></td>". NEWLINE;
        //		print"<td><input type='hidden' name='step_expected[{$i}]' value='$step_expected'></td>". NEWLINE;
        $i++;
    }
    print "</table>" . NEWLINE;
}
print "</div>" . NEWLINE;
print "</form>" . NEWLINE;
html_print_footer();
# ---------------------------------------------------------------------
# $Log: results_continue_manual_test_page.php,v $
print "<td class=form-header-l colspan=2>" . lang_get('upload_new_file_version') . " {$file_name}</td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td class=form-lbl-r>" . lang_get('file_name') . "<span class='required'>*</span></td>" . NEWLINE;
print "<td class=form-data-l><input type='file' name='uploadfile_required' size='60'></td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td class=form-lbl-r>" . lang_get('comments') . "</td>" . NEWLINE;
print "<td class=form-data-l><textarea rows='2' cols='45' name='comments'>" . session_validate_form_get_field('comments') . "</textarea></td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td class=form-lbl-r>" . lang_get('file_type') . "</td>" . NEWLINE;
print "<td class=form-data-l>" . NEWLINE;
print "<select name=doc_type>" . NEWLINE;
$test_types = test_get_test_type($project_id, $blank = true);
html_print_list_box_from_array($test_types, $doc_type);
print "</select></td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "<input type='hidden' name='manual_test_id' value='{$manual_test_id}'>" . NEWLINE;
print "<input type='hidden' name='MAX_FILE_SIZE' value='25000000'>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td class=center colspan=2><input type='submit' value='Upload'></td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "</table>" . NEWLINE;
print "</form>" . NEWLINE;
print "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "</table>" . NEWLINE;
print "<br>" . NEWLINE;
print "<br>" . NEWLINE;
print "</div>" . NEWLINE;
 print "<td class=left>{$testset_name}</td>";
 print "</tr>";
 print "<tr class=left>";
 print "<td class=right>" . lang_get('date_created') . ":</td>";
 print "<td class=left>{$date_created}</td>";
 print "</tr>";
 print "<tr class=left>";
 print "<td class=right>" . lang_get('description') . ":</td>";
 print "<td class=left>{$description}</td>";
 print "</tr>";
 $statuses = testset_get_status();
 print "<tr class=left>";
 print "<td class=right>" . lang_get('status') . ":</td>";
 print "<td class=left>";
 print "<select name=signoff_status>";
 html_print_list_box_from_array($statuses, $status);
 //html_list_box( $db, TESTSET_STATUS_TBL, TS_STATUS_NAME, $status );
 print "</select>";
 print "</td>";
 print "</tr>";
 print "<tr class=left>";
 print "<td class='right'>" . lang_get('comments') . ":</td>";
 print "<td class='left'><textarea rows='5' cols='50' name='signoff_comments'>{$comments}</textarea></td>";
 print "</tr>";
 print "<tr><td><input type='hidden' name='testset_id' value='{$testset_id}'></td></tr>";
 print "<tr><td><input type='hidden' name='build_id' value='{$build_id}'></td></tr>";
 print "<tr><td class=center colspan=2><input type=submit name='save' value='{$submit_btn}'><br/><br/></td>";
 print "</form>";
 print "</table>";
 print "</td>";
 print "</tr>";
print "<table class=width60>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td>" . NEWLINE;
print "<form method='POST' enctype='multipart/form-data' action='results_remote_execution_action.php'>" . NEWLINE;
print "<table class=inner>" . NEWLINE;
# FORM TITLE
print "<tr>" . NEWLINE;
print "<td colspan='2'><h4>" . lang_get('upload_tests') . "</h4></td>" . NEWLINE;
print "</tr>" . NEWLINE;
# TEST TOOLS
$tool_array = array('WinRunner');
print "<tr>" . NEWLINE;
print "<td class='form-lbl-r'>" . lang_get('test_tool') . "</td>" . NEWLINE;
print "<td class='form-data-l'>" . NEWLINE;
print "<select name='test_tool'>";
html_print_list_box_from_array($tool_array);
print "</select>" . NEWLINE;
print "</td>" . NEWLINE;
print "</tr>";
# FILE
print "<tr>" . NEWLINE;
print "<td class='form-lbl-r'>" . lang_get('upload_tests') . "</td>" . NEWLINE;
print "<td class='form-data-l'><input type='file' name='f'></input></td>" . NEWLINE;
print "</tr>" . NEWLINE;
util_add_spacer();
# SUBMIT BUTTON
print "<tr>" . NEWLINE;
print "<td colspan='2' class='form-data-c'><input type='submit' value='" . lang_get('submit_btn') . "'></td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "</table>" . NEWLINE;
print "</form>" . NEWLINE;
print "<input type='hidden' name=field value='{$field}'>" . 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-data-l'><h4>{$form_title}</h4></td>" . NEWLINE;
print "</tr>" . NEWLINE;
# VALUE
print "<tr>" . NEWLINE;
print "<td class='form-data-c'>";
print "<select name=field_value size=1>" . NEWLINE;
switch ($field) {
    case 'status':
        html_print_list_box_from_array($possible_values);
        break;
    case 'assigned_release':
        html_print_list_box_from_key_array($possible_values);
        break;
}
print "</select>" . NEWLINE;
print "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
util_add_spacer();
# SUBMIT BUTTON
print "<tr>" . NEWLINE;
print "<td class='form-data-c'><input type='submit' name=submit_status value='" . lang_get('update') . "'></td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "</table>" . NEWLINE;
print "</td>" . NEWLINE;
print "<td class=form-data-l>" . NEWLINE;
$selected_value = session_validate_form_get_field('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('assign_to_developer') . "</td>" . NEWLINE;
print "<td class=form-data-l>" . NEWLINE;
$selected_value = session_validate_form_get_field('assigned_to_developer');
print "<select name='assigned_to_developer' 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;
# SUMMARY
print "<tr>" . NEWLINE;
print "<td class=form-lbl-r>" . lang_get('bug_summary') . "<span class='required'>*</span></td>";
print "<td class=form-data-l>" . NEWLINE;
print "<input type=text size='100' maxlength='128' name=summary_required value='" . session_validate_form_get_field('summary_required') . "'>";
print "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
# DESCRIPTION
$description = session_validate_form_get_field('description_required', "", session_use_FCKeditor());
print "<tr>" . NEWLINE;
print "<td class=form-lbl-r>" . lang_get('bug_description') . "<span class='required'>*</span></td>" . NEWLINE;
print "<td class=form-data-l>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td class=form-lbl-r nowrap>" . lang_get('req_status') . "</td>" . NEWLINE;
print "<td class=form-data-l>" . NEWLINE;
print "<select name=req_status size=1>" . NEWLINE;
$list_box = requirement_get_statuses();
html_print_list_box_from_array($list_box, session_validate_form_get_field('req_status', $req_version_status));
print "</select>" . NEWLINE;
print "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
# PRIORITY
print "<tr>" . NEWLINE;
print "<td class=form-lbl-r nowrap>" . lang_get('req_priority') . "</td>" . NEWLINE;
print "<td class=form-data-l>" . NEWLINE;
print "<select name=req_priority size=1>" . NEWLINE;
$list_box = requirement_get_priority();
html_print_list_box_from_array($list_box, session_validate_form_get_field('req_priority', $req_priority));
print "</select>" . NEWLINE;
print "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
# CHANGE REQUEST
# Set the field to an empty string if the value of the defect id = 0
if ($req_defect_id != 0) {
    $req_defect_id = util_pad_id($req_defect_id);
} else {
    $req_defect_id = '';
}
$defect_id = session_validate_form_get_field('defect_id');
print "<tr>" . NEWLINE;
print "<td class=form-lbl-r nowrap>" . lang_get('req_defect_id') . "</td>" . NEWLINE;
print "<td class=form-data-l>";
print "<input type='text' size='10' name='defect_id' value='" . session_validate_form_get_field('defect_id', $req_defect_id) . "'></td>" . NEWLINE;
    print "</tr>" . NEWLINE;
    # Store the current and new bug ID seperately so we can verify if it's changed
    print "<input type='hidden' name='current_bug_id' value='{$current_bug_id}'>";
    # bug ID
    print "<tr>" . NEWLINE;
    print "<td class=form-lbl-r>" . lang_get('bug_id') . "</td>" . NEWLINE;
    print "<td class=left><input type='text' size='20' maxlength='7' name='new_bug_id' value='{$padded_bug_id}' ></td>" . NEWLINE;
    print "</tr>" . NEWLINE;
    # TEST STATUS
    print "<tr>" . NEWLINE;
    print "<td class=form-lbl-r>" . lang_get('test_status') . "</td>" . NEWLINE;
    print "<td class=left>" . NEWLINE;
    print "<select name='verification_status' size=1>" . NEWLINE;
    $verification_status = results_get_verification_status();
    $selected_value = $status;
    html_print_list_box_from_array($verification_status, $selected_value);
    print "</select>" . NEWLINE;
    print "</td>" . NEWLINE;
    print "</tr>";
    util_add_spacer();
    print "<tr><td class=center colspan=2><input type=submit name='save' value='" . lang_get('update') . "'></td></tr>" . NEWLINE;
    print "</table>" . NEWLINE;
    print "</td>" . NEWLINE;
    print "</tr>" . NEWLINE;
    print "</table>" . NEWLINE;
}
print "</form>" . NEWLINE;
print "</div>\n" . NEWLINE;
html_print_footer();
# ---------------------------------------------------------------------
# $Log: results_update_verification_page.php,v $