?>
</ul>
<ul id="block-tovar-list" >
<?php
$result = mysql_query("SELECT * FROM table_products WHERE visible='1' ORDER BY $sorting $qury_start_num",$link);
if (mysql_num_rows($result) > 0)
{
$row = mysql_fetch_array($result);
do
{
if ($row["image"] != "" && file_exists("./uploads_images/".$row["image"]))
{
$img_path = './uploads_images/'.$row["image"];
$max_width = 150;
$max_height = 150;
list($width, $height) = getimagesize($img_path);
$ratioh = $max_height/$height;
$ratiow = $max_width/$width;
$ratio = min($ratioh, $ratiow);
$width = intval($ratio*$width);
$height = intval($ratio*$height);
}else
{
$img_path = "images/noimages80x70.png";
$width = 80;
$height = 70;
}
// Количество отзывов
$query_reviews = mysql_query("SELECT * FROM table_reviews WHERE products_id = '{$row["products_id"]}' AND moderat='1'",$link);