print "</tr>" . NEWLINE;
 print "</thead>" . NEWLINE;
 print "<tbody>" . NEWLINE;
 foreach ($release_details as $release_detail) {
     //for( $i=0; $i < sizeof( $release_details ); $i++ ) {
     //extract( $release_details[$i], EXTR_PREFIX_ALL, 'v' );
     $release_id = $release_detail[RELEASE_ID];
     $release_name = $release_detail[RELEASE_NAME];
     $release_date_received = date_trim_time($release_detail[RELEASE_DATE_RECEIVED]);
     $release_description = $release_detail[RELEASE_DESCRIPTION];
     $qa_signoff_by = $release_detail[RELEASE_QA_SIGNOFF_BY];
     $qa_signoff_date = date_trim_time($release_detail[RELEASE_QA_SIGNOFF_DATE]);
     $qa_signoff_status = $release_detail[RELEASE_QA_SIGNOFF];
     $qa_signoff_comment = $release_detail[RELEASE_QA_SIGNOFF_COMMENTS];
     $ba_signoff_by = $release_detail[RELEASE_BA_SIGNOFF_BY];
     $ba_signoff_date = date_trim_time($release_detail[RELEASE_BA_SIGNOFF_DATE]);
     $ba_signoff_status = $release_detail[RELEASE_BA_SIGNOFF];
     $ba_signoff_comment = $release_detail[RELEASE_BA_SIGNOFF_COMMENTS];
     $row_style = html_tbl_alternate_bgcolor($row_style);
     print "<tr class='{$row_style}'>" . NEWLINE;
     print "<td class='tbl-l'><a href='{$build_page}?release_id={$release_id}'>{$release_name}</a></td>" . NEWLINE;
     print "<td class='tbl-c'>{$release_date_received}</td>" . NEWLINE;
     print "<td class='tbl-l'>{$release_description}</td>" . NEWLINE;
     //print"<td class='tbl-c'>$ba_signoff_status</td>". NEWLINE;
     //print"<td class='tbl-c'>$ba_signoff_by</td>". NEWLINE;
     //print"<td class='tbl-c'>$ba_signoff_date</td>". NEWLINE;
     //print"<td class='tbl-c'>$ba_signoff_comment</td>". NEWLINE;
     print "<td class='tbl-c'>{$qa_signoff_status}</td>" . NEWLINE;
     print "<td class='tbl-c'>{$qa_signoff_by}</td>" . NEWLINE;
     print "<td class='tbl-c'>{$qa_signoff_date}</td>" . NEWLINE;
     print "<td class='tbl-c'>{$qa_signoff_comment}</td>" . NEWLINE;
    $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];
        $release_date_received = date_trim_time($release_detail[RELEASE_DATE_RECEIVED]);
        $release_description = $release_detail[RELEASE_DESCRIPTION];
        $row_style = html_tbl_alternate_bgcolor($row_style);
        if (util_array_value_search($release_id, $assoc_releases)) {
            $checked = "checked";
        } else {
            $checked = "";
        }
        print "<tr class='{$row_style}'>" . NEWLINE;
        print "<td><input type='checkbox' name='row_releases[{$release_id}]' {$checked}></td>" . NEWLINE;
        print "<td class='tbl-l'>{$release_name}</td>" . NEWLINE;
        print "<td class='tbl-c'>{$release_date_received}</td>" . NEWLINE;
        print "<td class='tbl-c'>{$release_description}</td>" . NEWLINE;
        print "</tr>" . NEWLINE;
    }
    print "</table>" . NEWLINE;