<a class="btn btn-small pull-right" href="searchresult.php?cat">More <i class="icon-chevron-right"></i></a> <!-- -----------------Recent Ads Listing End----------------- --> <br> <br> <!-- -----------------Most Viewed Ads Listing Start----------------- --> <div onload="viewedFadeOut()"> <div class="thumbnail-header"> <span class="cat_header">Most Viewed Ads</span> </div> <br> <span id="viewed1"> <?php if (isset($_COOKIE["fbcity"]) && isset($_COOKIE["fblocType"])) { $post = viewedPost("", $_COOKIE["fblocType"], $_COOKIE["fbcity"]); } else { $post = viewedPost("", "", ""); } $counter = 1; while ($row = mysqli_fetch_array($post)) { ?> <div id="viewed_<?php echo $counter; ?> "> <div class="media"> <a class="pull-left" href="product.php?pid=<?php echo $row['Post_id']; ?> "> <img class="media-object" alt="<?php echo $row['Post_title'];
?> </table> <div class="thumbnail-header"> <span class="cat_header">Most Viewed Posts</span> <span class="pull-right cat_header"><a href="searchresult.php?l_type=recent&cat=<?php echo $cat; ?> ">More</a></span> </div> <table class="category_table" cellpadding="10" cellspacing="0"> <?php if (isset($_COOKIE["fbcity"]) && isset($_COOKIE["fblocType"])) { $post = viewedPost($cat, $_COOKIE["fblocType"], $_COOKIE["fbcity"]); } else { $post = viewedPost($cat, "", ""); } $rowcount = mysqli_num_rows($post); if ($rowcount == 0) { ?> <br /><center><img src='shopping.png' /><h4>Oops! No one is selling!</h4><strong>Try some other location</strong></center> <?php } $counter = 3; while ($row = mysqli_fetch_array($post)) { $title = substr($row['Post_title'], 0, 60); if (strlen($row['Post_title']) > 60) { $title = $title . "..."; } if ($counter == 3) { echo "<tr>";