<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content"><?php echo $content_top; ?>
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <h1><?php echo $heading_title; ?></h1>
  	<div style="color:#666666; margin-bottom: 12px;"><b><?php echo $text_posted_on; ?></b> <?php echo $date_added; ?> ; <b><?php echo $text_read; ?></b> <?php echo $new_read_counter_value; ?> <?php echo $text_time; ?></div>
	 <?php echo $description; ?>
	 <!-- Share Button Bottom Start -->
	 <?php if(!empty($share_button_code)){ ?>
		<div align="right" style="margin-top: 10px; margin-bottom: 10px;"><?php echo $share_button_code; ?></div>
	 <?php } ?>
	 <!-- Share Button Bottom End -->
	 <!-- Related Blogs Start -->
	<br />
	<?php if (!empty($related_blogs)) { ?>
		<p>&nbsp;</p>
		<div style="text-transform: capitalize; font-weight: bold; font-size: 14px;"><?php echo $text_related_blog; ?></div>
		<table width="100%">
			<?php foreach ($related_blogs as $related_blog) { ?>
				<tr>
					<td style="padding: 5px 0px 0px 0px;">
						<div><a href="<?php echo $related_blog['href']; ?>"><b><?php echo $related_blog['title']; ?></b></a></div>
						<div style="color:#666666;"><b><?php echo $text_posted_on; ?></b> <?php echo $related_blog['date_added']; ?> ; <b><?php echo $text_read; ?></b> <?php echo $related_blog['count_read']; ?> <?php echo $text_time; ?></div>
					</td>
				</tr>
				<tr>
					<td style="padding: 5px 0px 20px 0px; border-bottom: 1px dashed #777777;">
					<?php if($related_blog['image']){ ?>
					<img src="<?php echo $related_blog['image']; ?>" align="left" style="border: 1px solid #000000; padding: 2px; margin: 0px 4px 4px 0px;" />
					<?php } ?><?php echo $related_blog['short_description']; ?></td>
				</tr>
			<?php } ?>
		</table>
		<p>&nbsp;</p>
	<?php } ?>
	 <!-- Related Blog End -->
	 <!-- Comment Area start -->
  		<?php if($allow_comment){ ?>
  		<?php if($comment_permission == '0'){ ?>
  		<?php if ($logged) { ?>
  		<a name="comment_area"></a><a name="comment_form"></a>  		
  		<div style="height: 4px; border-top: 1px dashed #cccccc; margin-bottom: 12px;"></div>
  		<div style="font-size: 14px; font-weight: bold;" id="comment_title"><?php echo $text_comment; ?></div>
  		<?php if ($comments) { ?>
		<?php foreach ($comments as $comment) { ?>
		<div class="content"><b><?php echo $comment['name']; ?></b> | <?php echo $comment['date_added']; ?><br />
  		<br />
  		<?php echo $comment['comment']; ?></div>
		<?php } ?>
		<div class="pagination"><?php echo $pagination; ?></div>
		<?php } else { ?>
		<div class="content"><?php echo $text_no_comment; ?></div>
		<?php } ?>		
		<form action="<?php echo str_replace('&', '&amp;', $action); ?>" method="post" enctype="multipart/form-data" id="comment">
  		<div id="comment">
  		<?php if(!empty($error_messages)){ ?><div class="error" style="text-align: center; border: 1px solid Red; background-color: pink; padding: 4px;"><?php echo $error_messages; ?></div><?php } ?>
     <?php if(!empty($success_messages)){ ?><div class="success" style="text-align: center; border: 1px solid Green; background-color: #dbe8db; padding: 4px;"><?php echo $success_messages; ?></div><?php } ?>
      </div>
      <div class="heading" id="comment_title"><?php echo $text_write_comment; ?></div>
      <div class="content"><b><?php echo $entry_name; ?></b><br />
        <input type="text" name="name" value="" />
        <br />
        <?php if ($error_name) { ?>
            <span class="error"><?php echo $error_name; ?></span><br />
        <?php } ?>
        <br />
        <b><?php echo $entry_email; ?></b><br />
        <input type="text" name="email" value="" />
        <br />
        <?php if ($error_email) { ?>
            <span class="error"><?php echo $error_email; ?></span><br />
        <?php } ?>
        <br />
        <b><?php echo $entry_comment; ?></b>
        <textarea name="comment" style="width: 98%;" rows="4"></textarea>
        <span style="font-size: 11px;"><?php echo $text_note; ?></span><br />
        <?php if ($error_comment) { ?>
            <span class="error"><?php echo $error_comment; ?></span><br />
        <?php } ?>
        <br />
        <b><?php echo $entry_captcha; ?></b><br />
        <input type="text" name="captcha" value="" autocomplete="off" />
        <br />
        <img src="index.php?route=extras/blog/captcha" id="captcha" />
        <?php if ($error_captcha) { ?>
            <br /><span class="error"><?php echo $error_captcha; ?></span><br />
        <?php } ?>
      </div>
      <div class="buttons">
        <table>
          <tr>
            <td align="right"><a onclick="$('#comment').submit();" class="button"><span><?php echo $button_send; ?></span></a></td>
          </tr>
        </table>
      </div>
      </form>
      <?php }else{ ?>
      <a name="comment_area"></a>  		
  		<div style="height: 4px; border-top: 1px dashed #cccccc; margin-bottom: 12px;"></div>
  		<div style="font-size: 14px; font-weight: bold;" id="comment_title"><?php echo $text_comment; ?></div>
  		<div class="content"><?php echo $text_comment_must_logged_in; ?></div>
      <?php } ?>
      <?php }else{ ?>
      <a name="comment_area"></a><a name="comment_form"></a>  		
  		<div style="height: 4px; border-top: 1px dashed #cccccc; margin-bottom: 12px;"></div>
  		<div style="font-size: 14px; font-weight: bold;" id="comment_title"><?php echo $text_comment; ?></div>
  		<?php if ($comments) { ?>
		<?php foreach ($comments as $comment) { ?>
		<div class="content"><b><?php echo $comment['name']; ?></b> | <?php echo $comment['date_added']; ?><br />
  		<br />
  		<?php echo $comment['comment']; ?></div>
		<?php } ?>
		<div class="pagination"><?php echo $pagination; ?></div>
		<?php } else { ?>
		<div class="content"><?php echo $text_no_comment; ?></div>
		<?php } ?>		
		<form action="<?php echo str_replace('&', '&amp;', $action); ?>" method="post" enctype="multipart/form-data" id="comment">
  		<div id="comment">
  		<?php if(!empty($error_messages)){ ?><div class="error" style="text-align: center; border: 1px solid Red; background-color: pink; padding: 4px;"><?php echo $error_messages; ?></div><?php } ?>
     <?php if(!empty($success_messages)){ ?><div class="success" style="text-align: center; border: 1px solid Green; background-color: #dbe8db; padding: 4px;"><?php echo $success_messages; ?></div><?php } ?>
      </div>
      <div class="heading" id="comment_title"><?php echo $text_write_comment; ?></div>
      <div class="content"><b><?php echo $entry_name; ?></b><br />
        <input type="text" name="name" value="" />
        <br />
        <?php if ($error_name) { ?>
            <span class="error"><?php echo $error_name; ?></span>
        <?php } ?>
        <br />
        <b><?php echo $entry_email; ?></b><br />
        <input type="text" name="email" value="" />
        <br />
        <?php if ($error_email) { ?>
            <span class="error"><?php echo $error_email; ?></span>
        <?php } ?>
        <br />
        <b><?php echo $entry_comment; ?></b>
        <textarea name="comment" style="width: 98%;" rows="4"></textarea>
        <span style="font-size: 11px;"><?php echo $text_note; ?></span>
        <?php if ($error_comment) { ?>
            <span class="error"><?php echo $error_comment; ?></span>
        <?php } ?>
        <br />
        <b><?php echo $entry_captcha; ?></b><br />
        <input type="text" name="captcha" value="" autocomplete="off" />
        <br />
        <img src="index.php?route=extras/blog/captcha" id="captcha" />
        <?php if ($error_captcha) { ?>
            <br /><span class="error"><?php echo $error_captcha; ?></span>
        <?php } ?>
      </div>
      <div class="buttons">
        <table>
          <tr>
            <td align="right"><a onclick="$('#comment').submit();" class="button"><span><?php echo $button_send; ?></span></a></td>
          </tr>
        </table>
      </div>
      </form>
      <?php } ?>
      <?php } ?>
      <!-- Comment Area end -->
    <!--
	 <div class="buttons">
      <table>
        <tr>
          <td align="right"><a onclick="location = '<?php echo str_replace('&', '&amp;', $continue); ?>'" class="button"><span><?php echo $button_continue; ?></span></a></td>
        </tr>
      </table>
    </div>-->
  <?php echo $content_bottom; ?></div> 
<?php echo $footer; ?>