Пример #1
0
}
?>
  
					</table>
					<!--  -----------------Buy/Sell/Trade Product Listing End----------------- -->

					<!--  -----------------Real Estate-Housing Product Listing Start----------------- -->
					<div class="thumbnail-header">
						<span class="cat_header">Real Estate-Housing</span><span class="pull-right cat_header"><a href="category.php?catid=6&cat=Real Estate-Housing">More</a></span>
					</div>
					<table class="category_table" cellpadding="10" cellspacing="0">   
			          <?php 
if (isset($_COOKIE["fbcity"]) && isset($_COOKIE["fblocType"])) {
    $post = randomPost("Real Estate-Housing", $_COOKIE["fblocType"], $_COOKIE["fbcity"]);
} else {
    $post = randomPost("Real Estate-Housing", "", "");
}
$rowcount = mysqli_num_rows($post);
if ($rowcount == 0) {
    ?>
							<br /><center><img src='shopping.png' alt="No ad"/><h4>Oops! No one is selling!</h4><strong>Try some other location</strong></center>
						<?php 
}
$counter = 4;
while ($row = mysqli_fetch_array($post)) {
    $title = substr($row['Post_title'], 0, 60);
    if (strlen($row['Post_title']) > 60) {
        $title = $title . "...";
    }
    if ($counter == 4) {
        echo "<tr>";
<div class="thumbnail-header">
<span class="cat_header">Similar Posts</span>
</div>
<table class="category_table" cellpadding="10" cellspacing="0">   
<?php 
if (isset($_COOKIE["fbcity"]) && isset($_COOKIE["fblocType"])) {
    $post = randomPost($product['Post_category'], $_COOKIE["fblocType"], $_COOKIE["fbcity"]);
} else {
    $post = randomPost($product['Post_category'], "", "");
}
$counter = 4;
while ($row = mysqli_fetch_array($post)) {
    $title = substr($row['Post_title'], 0, 60);
    if (strlen($row['Post_title']) > 60) {
        $title = $title . "...";
    }
    if ($counter == 4) {
        echo "<tr>";
    }
    ?>
  
<td width="25%" valign="top">
	<div class="category_thumbnail" id="post_<?php 
    echo $row['Post_id'];
    ?>
" style="height: 230px;">
		<a href="product.php?pid=<?php 
    echo $row['Post_id'];
    ?>
" title="<?php 
    echo $row['Post_title'];