Header Start Here
Header Start Here
Header Start Here
</div>
<div id="navbar" class="navbar-collapse
collapse">
<nav class="cl-effect-1">
<ul class="nav navbar-nav">
<li><a
href="userhome.jsp"> <span data-hover="Home">Home</span></a></li>
<li><a
href="viewfriendrequests.jsp"> <span
data-
hover="About">View Friend Request</span></a></li>
<li><a
href="viewfriends.jsp"> <span data-hover="Home">View
Friends</span></a></li>
<li><a href="wall.jsp">
<span data-hover="Home">Add
Posts</span></a></li>
<li><a
href="searchfriends.jsp"> <span
data-
hover="Home">Search Friends</span></a></li>
<li><a
href="updateprofile.jsp"> <span
data-
hover="About">Update Profile</span></a></li>
<li><a
href="logout.jsp"> <span data-hover="Home">Logout</span></a></li>
</ul>
</nav>
</div>
</nav>
</div>
<div class="clearfix"></div>
</div>
</div>
</div>
<%
String status=request.getParameter("status");
if (status!= null) {
%>
<h3><%=status%></h3>
<%
} else {
%>
<h3>View Posts</h3>
<%
}
%>
</div>
<table id="customers">
<tr>
<th>User Name</th>
<th>Description</th>
<th>Image</th>
<th>Protect</th>
<tr />
<%
//filtering starts here
Set<String>
friends=DAO.getMyFriendsIds((String)request.getSession().getAttribute("userna
me"));
List<Post> posts=DAO.getPosts(friends);
Iterator<Post> it=posts.iterator();
while(it.hasNext())
{
Post post=it.next();
String textBody=post.getDescription();
%>
<tr>
<td><%=post.getPostedBy()%></td>
<td><%=post.getDescription()%></td>
<td><img
src="<%="./uploads/"+post.getImage()%>"
alt="not found" height="150"
width="150" /></td>
<td>
<%
if(post.getPostedBy().equals((String)request.getSession().getAttribute(
"username")))
{
%>
<form action="UpdatePost"
method="post">
<input type="hidden"
name="postid"
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
<!--contact end here-->
$().UItoTop({
easingType : 'easeOutQuart'
});
});
</script>
</div>
</div>
<!--footer end here-->
</body>