<?php global $qaleb;?>
<?php if($qaleb['ads-default-top']=='1'){?><div class="ads"><?php echo $qaleb['ads-default-top-html'];?></div><?php } ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<section class="single">
<div id="lin-10"></div>
<header>
 <?php if($qaleb['rotitr']=='1'){?><?php if(get_post_meta( get_the_ID(), 'meta-text-1', true )!=null){ ?> <small class="subtitle text-muted"><i class="fa fa-stop" aria-hidden="true"></i> <?php echo get_post_meta( get_the_ID(), 'meta-text-1', true ); ?></small> <?php } ?><?php } ?>
<h2 class="single-post-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php if($qaleb['send']=='1'){?><div class="meta-right"><i class="fa fa-envelope-o" aria-hidden="true" style="color:#0049ff;"></i>&nbsp; <?php echo direct_email('ارسال ') ?></div><?php } ?>
<?php if($qaleb['print']=='1'){?><a class="print" href="#" onclick='window.open("<?php the_permalink();?>?print=1", "printwin","left=200,top=200,width=820,height=550,toolbar=1,resizable=0,status=0,scrollbars=1");'><i class="fa fa-print" aria-hidden="true" style="color:#0049ff;"></i>&nbsp; پرینت</a><?php } ?>
<br></header>
 <?php if($qaleb['imag']=='1'){?><div class="single-thumb">
                <?php if(has_post_thumbnail()){?>
                  <a class="attachment-post-thumbnail size-post-thumbnail wp-post-image" href="<?php the_permalink(); ?>"><?php $ata = get_the_title(); if ( has_post_thumbnail()) the_post_thumbnail('img-650', array('title' => esc_attr( $post->post_title ) , 'alt' => $ata ) ); ?></a>
                  <?php }else{ ?>
                  <img src="<?php bloginfo("template_url"); ?>/img/none.png">
                  <?php } ?>
</div><?php } ?>
<header>
<span>
<?php if($qaleb['singl-category-ac']=='1'){?>  شناسه خبر : <?php the_ID();?>    | <?php } ?>
<?php if($qaleb['singl-date-ac']=='1'){?> تاریخ انتشار : <?php the_time(' d F Y  -  G:i');  ?>    | <?php } ?>
<?php if($qaleb['singl-view-ac']=='1'){?> <?php set_post_views (get_the_ID()); ?><?php echo get_post_views (get_the_ID()); ?>    | <?php } ?>
<?php if($qaleb['singl-comments-ac']=='1'){?> تعداد دیدگاه :  <?php comments_popup_link('0', ' 1 ', '%'); ?>    | <?php } ?>
<?php if($qaleb['singl-user-ac']=='1'){?> ارسال توسط :  <b><?php the_author_posts_link(); ?></b> <?php } ?>
</span>
</header>
<div class="post-content clearfix">

<?php if($qaleb['lide']=='1'){?><div class="lead"><?php if(get_meta('lead') != false) : echo get_meta('lead'); else : the_excerpt(); endif; ?></div><?php } ?>
<div class="con"><?php the_content(); ?></div>
<ul>
<li><span style="color: #808080; font-family: Vazir; font-size: 12px;"><em><?php if(get_post_meta( get_the_ID(), 'meta-text-3', true )!=null){ ?> نویسنده : <?php echo get_post_meta( get_the_ID(), 'meta-text-3', true ); ?><?php } ?></em></span></li>
<li><span style="color: #808080; font-family: Vazir; font-size: 12px;"><em><?php if(get_post_meta( get_the_ID(), 'meta-text-4', true )!=null){ ?> منبع خبر : <?php echo get_post_meta( get_the_ID(), 'meta-text-4', true ); ?><?php } ?></em></span></li>
</ul>

<div class="page-bottom">
<?php if($qaleb['singl-social-ac']=='1'){?><?php get_template_part('inc/share'); ?><?php } ?>
<?php if($qaleb['singl-link-ac']=='1'){?><?php get_template_part('inc/link'); ?><?php } ?>
</div>
</div>

<?php if($qaleb['singl-tags-ac']=='1'){?>
<div class="box-header"><b>برچسب ها </b></div>
<div class="tag"><?php the_tags('','  '); ?><?php if(has_tag()){ echo ' '; }else { echo '<p style="font:12px tahoma">این مطلب بدون برچسب می باشد.</p>';}?></div>
<div id="lin-10"></div>
<?php } ?>

<?php if($qaleb['relate-default']=='1'){?>
<?php if($qaleb['norm-or-tage'] == '1'){?>
<?php get_template_part('inc/relat-norm'); ?>
<?php }else{ ?>
<?php get_template_part('inc/relat-tage'); ?>
<?php } ?>
<?php } ?>
<!---->

<?php if($qaleb['ads-default-bottom']=='1'){?> <div class="separator"></div><div class="ads"><?php echo $qaleb['ads-default-bottom-html'];?></div><?php } ?>
<div id="lin-10"></div>
<div class="box-header"><b><?php echo $qaleb['single-comment-title']; ?></b></div>

<div class="hints"><i class="fa fa-exclamation"></i>
<div class="des-hints"><?php echo $qaleb['single-comment-text']; ?></div>
</div>
<?php comments_template('/comments.php'); ?>
</section>
<?php endwhile; else : ?><?php endif; ?>