print "<td class='bg-color'>";
         print "<b>{$author}</b>";
         print "<br>" . NEWLINE;
         print "{$date_created}";
         print "<br><br>" . NEWLINE;
         print "<a href='bug_edit_bugnote_page.php?bugnote_id={$bugnote_id}'>[" . lang_get('edit_link') . "]</a>";
         print "<form method=post action=''>" . NEWLINE;
         print "<input type='submit' name='delete' value='[" . lang_get('delete') . "]' class='page-numbers'>";
         print "<input type='hidden' name='r_page' value='bug_detail_page.php?bug_id={$bug_id}'>";
         print "<input type='hidden' name='f' value='delete_bugnote'>";
         print "<input type='hidden' name='id' value='{$bugnote_id}'>";
         print "<input type='hidden' name='msg' value='260'>";
         print "</form>" . NEWLINE;
         //print"<a href='delete_page.php'>[". lang_get('delete_link') ."]</a>";
         print "</td>" . NEWLINE;
         print "<td class=grid-data-l>" . util_html_encode_string($bugnote) . "</td>" . NEWLINE;
         print "</tr>" . NEWLINE;
     }
     print "</table>" . NEWLINE;
     print "<br>" . NEWLINE;
 }
 # BUG HISTORY SECTION
 $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;
if ($rows_news) {
    //print"<div align=center>". NEWLINE;
    foreach ($rows_news as $row_news) {
        $news_id = $row_news[NEWS_ID];
        $subject = $row_news[NEWS_SUBJECT];
        $body = $row_news[NEWS_BODY];
        $poster = $row_news[NEWS_POSTER];
        $news_modified = $row_news[NEWS_MODIFIED];
        //print"<table class=width80 rules=cols>". NEWLINE;
        # NEWS TITLE
        print "<tr class='tbl-header-l'>" . NEWLINE;
        print "<td><b>{$subject} - {$news_modified} - " . user_get_display_name($project_id, $poster) . "</b></td>" . NEWLINE;
        print "</tr>" . NEWLINE;
        # NEWS
        print "<tr>" . NEWLINE;
        print "<td align=left class=news-body>" . util_html_encode_string($body) . "</td>" . NEWLINE;
        print "</tr>" . NEWLINE;
        /*
        		# EDIT, DELETE LINKS
        		print"<tr>". NEWLINE;
        			print"<td align=left>". NEWLINE;
        			print"<form action='$page' method=post>". NEWLINE;
        			print"<input type=hidden name=news_id value=$news_id>". NEWLINE;
        			print"[<input type=submit name=submit_btn value='".lang_get("edit")."' class=page-numbers>]". NEWLINE;
        			print"[<input type=submit name=submit_btn value='".lang_get("delete")."' class=page-numbers>]". NEWLINE;
        			print"<input type='hidden' name='r_page' value='$page'>". NEWLINE;
        			print"<input type='hidden' name='f' value='delete_news_post'>". NEWLINE;
        			print"<input type='hidden' name='id' value='$news_id'>". NEWLINE;
        			print"<input type='hidden' name='project_id' value='$project_id'>". NEWLINE;
        			print"<input type='hidden' name='msg' value='". DEL_NEWS ."'>". NEWLINE;
        			print"[<input type=submit name=submit_btn value='".lang_get("new_post")."' class=page-numbers>]". NEWLINE;
# POSTS
print "<form method=post action='requirement_discussion_action.php'>" . NEWLINE;
print "<input type=hidden name=discussion_id value={$s_discussion_id} >" . NEWLINE;
print "<input type=hidden name=author value={$username} >" . NEWLINE;
print "<h2>" . lang_get("posts") . "</h2>" . NEWLINE;
$rows_posts = discussion_get_posts($s_discussion_id);
if ($rows_posts) {
    print "<table class=width90 rules=all>" . NEWLINE;
    print "<tr>" . NEWLINE;
    print "<td class=grid-header-c>" . lang_get("author") . "</td>" . NEWLINE;
    print "<td class=grid-header-c>" . lang_get("post") . "</td>" . NEWLINE;
    print "</tr>" . NEWLINE;
    foreach ($rows_posts as $row_post) {
        $post_author = $row_post[POST_AUTHOR];
        $post_date = $row_post[POST_DATE];
        $post_message = util_html_encode_string($row_post[POST_MESSAGE]);
        $row_style = html_tbl_alternate_bgcolor($row_style);
        print "<tr class='{$row_style}'>" . NEWLINE;
        print "<td class=tbl-l width='20%' valign=top>" . NEWLINE;
        print "<p>{$post_author}<br><br>" . NEWLINE;
        print lang_get('posted') . " {$post_date}</p>" . NEWLINE;
        print "</td>" . NEWLINE;
        print "<td class=tbl-l valign=top>{$post_message}</td>" . NEWLINE;
        print "</tr>" . NEWLINE;
    }
    print "</table>" . NEWLINE;
} else {
    print lang_get('no_posts');
}
# ADD POST
if ($discussion_status !== "CLOSED") {