View file iblog/themes/stock/include/subfooter.php

File size: 2.85Kb
	<div class="container sitecontainer bgw">
		<div class="row">
			<div class="col-md-12 col-sm-12">
				<div class="widget">
                        <div class="widget-title">
                            <h4>Top Post</h4>
                            <hr>
                        </div>
                        <!-- end widget-title -->

                        <div class="reviewlist review-posts m30">
						
					<?php 
						$sql = "select * from blog_post ORDER BY num_views LIMIT 3";
						$data = $conn->query($sql);
						while($a = $data->fetch_array()){ 
						$tot_comments = totalcomments($conn,$a['id']);?>
                            <div class="post-review col-md-4 col-sm-12">
                                <div class="post-media entry">
                                    <a href="<?php echo $hostname.$blog_page."/".$a['page_name']?>" title="<?php echo $a['title'];?>">
                                        <img src="uploads/topics/<?php echo $a['feature_img'];?>" class="img-responsive" 
										alt="<?php echo $a['page_name'];?>">
                                        <div class="magnifier">
                                            <div class="review-stat">
                                                <div class="rating">
                                                    <i class="fa fa-star"></i>
                                                    <i class="fa fa-star"></i>
                                                    <i class="fa fa-star"></i>
                                                    <i class="fa fa-star"></i>
                                                    <i class="fa fa-star-o"></i>
                                                </div>
                                            </div>
                                            <!-- end review-stat -->
                                            <div class="hover-title">
                                                <span>(<?php echo $tot_comments; ?>) Comments</span>
                                            </div>
                                            <!-- end title -->
                                        </div>
                                        <!-- end magnifier -->
                                    </a>
                                </div>
                                <!-- end media -->
                                <div class="post-title">
                                    <h3><a href="<?php echo $hostname.$blog_page."/".$a['page_name']?>"><?php echo $a['title']?></a></h3>
                                </div>
                                <!-- end post-title -->
                            </div>
                            <!-- end post-review -->
						<?php } ?>	

                        </div>

                    </div>
				</div>
			</div>
		</div>
		<!-- end widget -->