exit;
    }
    $posts = OC_Collaboration_Post::readPosts($_POST['member'], $_POST['project'], $_POST['start'], $_POST['count']);
    $text = '';
    foreach ($posts as $each) {
        if (!isset($each['title']) || $each['title'] == '') {
            break;
        }
        $datetime = explode(' ', $each['time']);
        $text .= '<div class="unit">
		<div class="post_title">' . $each['title'] . '</div>
		
		<div class="contents">' . $each['content'] . '<br />
			<br />
			<div class="comment" >
				<button class="btn_comment" id="btn_comment_' . $each['post_id'] . '" >' . ($l->t('Comments') . ' (' . OC_Collaboration_Comment::getCommentCount($each['post_id']) . ')') . '</button>
			</div>
		</div>
		
		<div class="details">
			<div class="proj_title">' . (isset($each['proj_title']) && !is_null($each['proj_title']) ? $l->t('Project: %s', array($each['proj_title'])) : '') . '</div>
			
			<div class="creation_details">' . $l->t('On %s at %s by %s', array($l->l('date', $datetime[0]), $l->l('time', $datetime[1]), $each['creator'])) . '</div>
		</div>
		</div>';
    }
    OCP\JSON::success(array('posts' => $text));
    exit;
}
OC_JSON::error();
exit;
						  </div>
				      <div class="contents">
					     <?php 
        p($each['content']);
        ?>
			  	    </div>
              <div class="cb-date">
	          <?php 
        $datetime = explode(' ', $each['time']);
        p($l->t('On %s at %s by %s', array($l->l('date', $datetime[0]), $l->l('time', $datetime[1]), $each['creator'])));
        ?>
            </div>
            <div class="comment" >
	            <button class="btn_comment" id="<?php 
        p('btn_comment_' . $each['post_id']);
        ?>
" >
		             <?php 
        p($l->t('Comments') . ' (' . OC_Collaboration_Comment::getCommentCount($each['post_id']) . ')');
        ?>
	            </button>
            </div>
				  </div>
			  </div></div>
	    <?php 
    }
}
?>
		</div>
</div>