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

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

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


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

  $get_blog_comment_reply=$retrieveObj->retriever("blog_comment_replies","*","bcr_id",$bcr_id,"fetch");

?>

<form class="form-block" id="edit_blog_comment_reply_form">
	<div class="row">
		<div class="text-center lead">
			Edit reply
		</div>
		<div class="col-md-12" id="edit_blog_comment_reply_response">
			
		</div>							
		<div class="col-md-12">									
			<div class="form-group">
				<label>Reply:</label>
				<textarea class="form-input" id="reply" name="reply" required="" placeholder="Your text"><?php echo $get_blog_comment_reply->bcr_text ?></textarea>
			</div>
		</div>
		<div class="col-md-12 text-center d-flex justify-content-between">	
			<input type="hidden" name="edit_blog_comment_reply_note" value="<?php echo $bcr_id ?>">
			<button type="submit" class="btn btn-primary" onclick="edit_blog_comment_reply(<?php echo $get_blog_comment_reply->bc_id ?>)">Update</button>
			<a class='btn btn-danger' href="#" onclick="cancel_edit_blog_post_comment_reply_view()"> Cancel</a>
		</div>
	</div>
</form>