<?php global $qaleb;?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
	<meta name="robots" content="noindex, nofollow">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><?php echo bloginfo("name");?> | نسخه چاپی | <?php the_title(); ?></title>
    <link rel="canonical" href="<?php the_permalink(); ?>">
	<link href="<?php bloginfo('template_url'); ?>/css/print.css" rel="stylesheet" type="text/css" />
</head>
<body onload="window.print();">
        <div class="container p-main-frame">
            <div class="p-header">
                <div class="p-logo">
      <a href="<?php bloginfo('url'); ?>">
     <h1><?php echo bloginfo("name");?></h1>
	 <span><?php bloginfo('description'); ?></span>
      </a>
                </div>
                <div class="p-detail">
				    <div><span><a href="<?php the_permalink(); ?>">متن اصلی</a></span></div>
                    <div><span>گروه : </span><span><?php the_category(' » ' ); ?></span></div>  
                    <div><span>شناسه : </span><span id="newsid"><?php the_ID();?></span></div>
                    <div><span>تاریخ : </span><span id="newsdate"><?php the_time(' d F Y ');  ?></span></div>
					 <div><span>ساعت : </span><span><?php the_time(' G:i');  ?></span></div>
					 <div style="float: left;margin: 0;margin-top: -1px;background: #ddd;padding: 2px 10px;"><a><span onclick="window.print()">پرینت از صفحه</span></a></div>
                </div>
            </div>
            <div class="news-header">
                <span><?php echo get_post_meta( get_the_ID(), 'meta-text-1', true ); ?></span>
                <h1><?php the_title(); ?></h1>
                <p><?php if(get_meta('lead') != false) : echo get_meta('lead'); else : the_excerpt(); endif; ?></p>
            </div>
			
            <div class="p-nt">
				<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
               <?php the_content(); ?>
               <?php endwhile; else : ?><?php endif; ?>
            </div>
			
        </div><p class="container copyright"><?php echo $qaleb['site'];?></p>

</body>
</html>
<script type="text/javascript">
	(function($){
		$(document).ready(function(){
		
			String.prototype.toPersianDigit = function (a) {
				return this.replace(/\d+/g, function (digit) {
					var enDigitArr = [], peDigitArr = [];
					for (var i = 0; i < digit.length; i++) {
						enDigitArr.push(digit.charCodeAt(i));
					}
					for (var j = 0; j < enDigitArr.length; j++) {
						peDigitArr.push(String.fromCharCode(enDigitArr[j] + ((!!a && a == true) ? 1584 : 1728)));
					}
					return peDigitArr.join('');
				});
			};
			function TraceNodes(Node) {
				if (Node.nodeType == 3)//TextNode
					Node.nodeValue = Node.nodeValue.toPersianDigit();
			else
				for (var i = 0; i < Node.childNodes.length; i++)
					TraceNodes(Node.childNodes[i]);
			}
			TraceNodes(document);
			
		});
	})(jQuery);
</script>
<script type="text/javascript">
 //window.onload=window.print();
</script>