error_report_check($_GET);
$rows_requirement = requirement_get_detail($project_id, $s_req_id, $s_req_version_id);
$row_requirement = $rows_requirement[0];
$req_version_id = $row_requirement[REQ_VERS_UNIQUE_ID];
$req_rec_or_file = $row_requirement[REQ_REC_FILE];
$req_name = $row_requirement[REQ_FILENAME];
$req_detail = $row_requirement[REQ_VERS_DETAIL];
$req_reason_for_change = $row_requirement[REQ_VERS_REASON_CHANGE];
$req_version_status = $row_requirement[REQ_VERS_STATUS];
$req_area_covered = $row_requirement[REQ_AREA_COVERAGE];
$req_area_covered_id = $row_requirement[REQ_AREA_COVERAGE_ID];
$req_doc_type = $row_requirement[REQ_DOC_TYPE_NAME];
$req_doc_type = $row_requirement[REQ_DOC_TYPE_ID];
$req_priority = $row_requirement[REQ_PRIORITY];
$req_defect_id = $row_requirement[REQ_VERS_DEFECT_ID];
$selected_release = requirement_get_release($req_version_id);
print "<br>";
print "<form method=post action='requirement_edit_action.php'>" . NEWLINE;
print "<input type=hidden name=req_id value={$s_req_id}>" . NEWLINE;
print "<input type=hidden name=project_id value={$project_id}>" . NEWLINE;
print "<input type=hidden name=req_ver_id value={$req_version_id}>" . NEWLINE;
print "<input type=hidden name=record_or_file value='{$req_rec_or_file}'>" . NEWLINE;
print "<div align=center>" . NEWLINE;
print "<span class='required'>*</span> <span class='print'>" . lang_get('must_complete_field') . "</span>" . NEWLINE;
print "<table class=width90>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td>" . NEWLINE;
print "<table class=inner>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td colspan=2><h4>" . lang_get('edit_requirement') . "</h4></td>" . NEWLINE;
print "</tr>" . NEWLINE;
    $area_covered = $row_detail[REQ_AREA_COVERAGE];
    $req_author = $row_detail[REQ_VERS_UPLOADED_BY];
    $req_doc_type = $row_detail[REQ_DOC_TYPE_NAME];
    $date_created = $row_detail[REQ_VERS_TIMESTAMP];
    $locked_by = $row_detail[REQ_LOCKED_BY];
    $locked_date = $row_detail[REQ_LOCKED_DATE];
    $assigned_to = $row_detail[REQ_VERS_ASSIGNED_TO];
    $record_or_file = $row_detail[REQ_REC_FILE];
    $req_file_name = $row_detail[REQ_VERS_FILENAME];
    # Blank if record based
    $req_detail = $row_detail[REQ_VERS_DETAIL];
    # Blank if file based
    $req_priority = $row_detail[REQ_PRIORITY];
    $req_last_updated = $row_detail[REQ_LAST_UPDATED];
}
$assigned_to_release = requirement_get_release($req_version_id);
print "<br>" . NEWLINE;
print "<form method=post action='{$page}'>" . NEWLINE;
print "<table class=width100 rules=cols>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td width='33%' nowrap class=grid-header-c>" . lang_get('req_id') . "</td>" . NEWLINE;
print "<td width='33%' nowrap class=grid-header-c>" . lang_get('req_name') . "</td>" . NEWLINE;
print "<td width='33%' nowrap class=grid-header-c>" . lang_get('req_version') . "</td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "<tr>" . NEWLINE;
print "<td width='33%' class=grid-data-c>" . sprintf("%05s", trim($s_req_id)) . "</td>" . NEWLINE;
print "<td width='33%' class=grid-data-c>{$req_name}</td>" . NEWLINE;
print "<td width='33%' class=grid-data-c>{$req_version_num}</td>" . NEWLINE;
print "</tr>" . NEWLINE;
print "</table>" . NEWLINE;
print "<br>" . NEWLINE;