<?php
  require_once("../../session_check.php");
  require_once("../../../classes/main_classes.php");

  if(!isset($_POST["bc_id"])){
    die("<p class='alert alert-warning'>Invalid request</p>");
  }

  $bc_id=addslashes($_POST["bc_id"]);


  //OBJECTS
  $retrieveObj=new RETRIEVE();
  $rowcountObj=new ROWCOUNT();

  $get_blog_comment=$retrieveObj->retriever("blog
  		JOIN blog_comments ON blog.b_id=blog_comments.b_id
  	","*","blog_comments.bc_id",$bc_id,"fetch");
?>


<h4 class="page-title">
	<span class="fas fa-blog"></span>
	Blog
</h4>
<p><a href="#" class="bold" onclick="blog_view()">Blog</a> <span class="fas fa-angle-right"></span> <a href="#" class="bold" onclick="blog_post_comments_view(<?php echo $get_blog_comment->b_id ?>)">  Blog post comment </a> <span class="fas fa-angle-right"></span>  Replies : <i><?php echo $get_blog_comment->b_title ?></i> </p>
<div class="row">
	<div class="col-md-12 mb-3">
		<div class="container">
			<div class="be-comment-block2">
				<div class="be-comment">
					<div class="be-img-comment">	
						<a href="blog-detail-2.html">
							<!--img src="https://bootdey.com/img/Content/avatar/avatar1.png" alt="" class="be-ava-comment"-->
							<span class="fas fa-user fa-2x text-dark"></span>
						</a>
					</div>
					<div class="be-comment-content">
						
							<span class="be-comment-name">
								<a href="blog-detail-2.html"><?php echo $get_blog_comment->bc_fullname; ?></a>
								</span>
							<span class="be-comment-time">
								<i class="fa fa-clock-o"></i>
								<?php
									echo date("M j, Y", strtotime($get_blog_comment->bc_time)) ;
									echo " at ";
									echo date("H:i A", strtotime($get_blog_comment->bc_time)) ;
								?>
							</span>

						<p class="be-comment-text">
							<?php
								echo $get_blog_comment->bc_text;
							?>
						</p>
					</div>
				</div>
			</div>
			<div class="be-comment-block" id="blog_comment_replies_block">
				
			</div>
			<div class="be-comment-block" id="edit_blog_comment_reply_block">
				
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
  $(document).ready(function () {
    var table = $('#blogs_table').DataTable({
      columnDefs: [
        {bSortable: false, targets: [4]} 
      ]
    });

    blog_comment_replies_content_view(<?php echo $bc_id ?>)
  })
</script>