print "<td colspan='2' class='form-data-c'><input type='submit' name=submit_add_discussion 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 "</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) {
     $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;
     print "<td align='center'>{$timestamp}</td>" . NEWLINE;
     print "<td align='center'>" . NEWLINE;
     $assoc_releases = requirement_get_assoc_releases($req_version_id);
     foreach ($assoc_releases as $row) {
         print $row[RELEASE_NAME] . "<br>" . NEWLINE;
     }
     print "</td>" . NEWLINE;
     print "<td align='center'>{$assigned_to}</td>" . NEWLINE;
     print "<td align='left'>{$reason_for_change}</td>" . NEWLINE;
     if ($record_or_file == 'F') {
         $file_name = $row[REQ_VERS_FILENAME];
         print "<td align='center'><a href='download.php?upload_filename=" . $s_project_properties['req_upload_path'] . $file_name . "'>" . lang_get('download') . "</a></td>" . NEWLINE;
     } else {
         print "<td align='center'><a href='{$history_detail_page}?req_version_id={$req_version_id}'>" . lang_get('view') . "</a></td>" . NEWLINE;
     }
     print "</tr>" . NEWLINE;
 }
 print "</table>" . 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><a href='requirement_detail_page.php?req_id={$s_req_id}'>" . sprintf("%05s", trim($s_req_id)) . "</a></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 "</div>" . NEWLINE;
print "<br>" . NEWLINE;
# Get associated releases
$assoc_releases = array();
foreach (requirement_get_assoc_releases($s_req_version_id) as $row) {
    $assoc_releases[] = $row[RELEASE_ID];
}
$release_details = admin_get_all_release_details_by_project($project_id, null, $order_by, $order_dir);
if (!empty($release_details)) {
    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('release_name'), RELEASE_NAME, $order_by, $order_dir);
    html_tbl_print_header(lang_get('rel_date_received'), RELEASE_DATE_RECEIVED, $order_by, $order_dir);
    html_tbl_print_header(lang_get('rel_description'));
    print "</tr>" . NEWLINE;
    foreach ($release_details as $release_detail) {
        $release_id = $release_detail[RELEASE_ID];
        $release_name = $release_detail[RELEASE_NAME];