<?php if ($mod==""){
	header('location:../../404.php');
}else{
?>
		<footer id="footer" class="row-fluid">
			<div id="footer-widgets" class="container">
				<div class="footer-widget span6 block1">
					<div class="widget widget_latestpost">
						<h3 class="title"><span>Post Teratas</span></h3>
						<div class="latest-posts widget">
						<?php
							$tablepopfoot = new PoTable('post');
							$popfoots = $tablepopfoot->findAllLimitBy(hits, active, 'Y', DESC, '3');
							foreach($popfoots as $popfoot){
						?>
							<div class="latest-post clearfix">
								<a href="<?php echo "detailpost-$popfoot->id_post-$popfoot->seotitle.html"; ?>"><img width="225" height="136" src="po-content/po-upload/<?php echo $popfoot->picture; ?>" class="thumb fl" alt="<?php echo $popfoot->title; ?>" title="<?php echo $popfoot->title; ?>" /></a>
								<h4><a href="<?php echo "detailpost-$popfoot->id_post-$popfoot->seotitle.html"; ?>" rel="bookmark" title="<?php echo $popfoot->title; ?>"><?php echo $popfoot->title; ?></a></h4>
								<div class="post-time"><?php echo tgl_indo($popfoot->date); ?></div>
							</div>
						<?php } ?>
						</div>
					</div>
				</div>
				<div class="footer-widget span3 block3">
					<div class="widget">
						<h3 class="title"><span>Tag Teratas</span></h3>
						<div class="tagcloud">
						<?php
							$tabletag = new PoTable('tag');
							$tags = $tabletag->findAllLimit(id_tag, DESC, '10');
							foreach($tags as $tag){
						?>
							<a href="#" title=""><?php echo $tag->tag_title; ?></a>
						<?php } ?>
						</div>
					</div>
				</div>
				<div class="footer-widget span3 block4">
					<div class="widget">
						<h3 class="title"><span>Sosial Media</span></h3>
							<div class="socmed clearfix">		
								<ul>
									<li>
										<a href="#"><img src="po-content/<?php echo $folder; ?>/images/rss-icon.png" alt=""></a>
										<?php
											$tablesubs = new PoTable('subscribe');
											$totalsubs = $tablesubs->numRow();
										?>
										<h4><?php echo $totalsubs; ?></h4>
										<p>Langganan</p>
									</li>
									<li>
										<a href="#"><img src="po-content/<?php echo $folder; ?>/images/twitter-icon.png" alt=""></a>
										<h4><?php if ($sharetw==''){ echo "0"; }else{ echo $sharetw; } ?></h4>
										<p>Twitter</p>
									</li>
									<li>
										<a href="#"><img src="po-content/<?php echo $folder; ?>/images/fb-icon.png" alt=""></a>
										<h4><?php if ($sharefb==''){ echo "0"; }else{ echo $sharefb; } ?></h4>
										<p>Facebook</p>
									</li>
								</ul>
							</div>
					</div>
				</div>
				<div class="footer-widget span6 block5">
					<img class="footer-logo" src="po-content/<?php echo $folder; ?>/images/footer-logo.png" alt="Magazine">
						<div class="footer-text">
							<h4><?php echo $website_name; ?></h4>
							<p><?php echo $meta_description; ?></p>
						</div><div class="clearfix"></div>
				</div>
			</div><!-- footer-widgets -->

			<div id="site-info" class="container">

				<div id="footer-nav" class="fr">
					<ul class="menu">
						<li><a href="<?php echo $website_url; ?>">Beranda</a></li>
						<li><a href="pages-1-tentang-kami.html">Tentang Kami</a></li>
						<li><a href="contact.html">Kontak</a></li>
					</ul>
				</div>
				<div id="credit" class="fl">
					<p>&copy; 2014. All Right Reserved by <a href="http://www.popojicms.org">PopojiCMS</a></p>
				</div>
			</div><!-- .site-info -->
		</footer>
	</div><!-- #wrapper -->
</body>
</html>
<?php } ?>