<!-- Authors: Jason Fillo and Peter Deschere -->

<html>
 <head>
   <title>Bulletin Board - Powered by $Money</title>
 </head>

 <%
 	String user = (String)request.getAttribute("name");
	String s = (String)request.getSession(false).toString();
	String topic = (String)request.getAttribute("topicselected");
	String posts = (String)request.getAttribute("posts");

 %>

 <body>
   <p>
	VIEW TOPIC<br>

	user = <%=user %><br>
	session = <%=s %><br>
	<h3>All posts for topic: <%=topic %></h3>
	<p>
	<%= posts %>
	</p>

	<h4>Post a new comment on this topic</h4>	
	<form method="post" action="PostPost.do">
	<input type="hidden" name="name" value="<%=user %>"/>
	<input type="hidden" name="topicselected" value="<%=topic %>"/>
	<table>
	 <tr>
	  <td align="left">Author:</td>
	  <td align="left"><%=user %></td>
	 </tr>
	<tr>
	 <td align="left">Subject:</td>
	 <td align="left"><input type="text" name="subject"/></td>
	</tr>
	<tr>
	 <td align="left" colspan="2">Body:</td>
	</tr>
	<tr>
	 <td align="left" colspan="2">
	   <textarea name="body" rows="6" cols="40"></textarea>
	 </td>
	</tr>
	<tr>
	 <td align="center" colspan="2">
	   <input type="submit" value="Post!"/>
	 </td>
	</tr>
        </table>
        </form>
   </p>
 </body>
</html>
