";
// echo "totr - $totalrows col- $ile_column it - $totalitem";
$ix=1;
while ($ix <= $ile_col)
{
// echo"  | ";
// echo"$totalrows col- $ile_column | ";
$ix++;
}
echo" ";
}
$bgcolour=$colour_4;
$zdjecie_numer=0;
while($row = mysql_fetch_array($result))
{
$zdjecie_numer=$zdjecie_numer+1;
$product=$row["product"];
$cat_iid=$row["cat_id"];
$description= $row["description"];
$price=$row["price"];
$sale_price=$row["sale_price"];
$image=$row["image"];
$title=$row["title"];
$title=stripslashes($title);
$description=stripslashes($description);
$description=substr($description,0,100);
if ($bgcolour ==$colour_3)
{
$bgcolour =$colour_4;
}
elseif ($bgcolour ==$colour_4)
{
$bgcolour =$colour_3;
}
if (!file_exists("$site_dir/images/" . "thumb_$image"))
{
$thumb=new thumbnail("$site_dir/images/$image");
$thumb->size_auto(120);
$thumb->jpeg_quality(100);
$thumb->save("$site_dir/images/thumb_$image", $gd_version);
}
if ($zdjecie_numer==1)
{
$thumb_name="thumb_$image";
$thumb_no = "catnophoto.gif";
//echo $thumb_name;
$sql_cot = "select * from ".$prefix."store_category where cat_id = '$cat_iid'";
// echo $title;
$rez = mysql_query ($sql_cot);
$lin = mysql_fetch_array($rez);
$thumb_yes = $lin["cat_image"];
// echo "- $thumb_yes -";
if ($thumb_yes == $thumb_no)
{
// $sql_rep = "replace ".$prefix."store_category ( cat_image values ('$thumb_name'))";
// $rezu = mysql_query($sql_rep);
$sql_upt = "update ".$prefix."store_category set cat_image='$thumb_name' where cat_id = '$cat_iid'";
$ret = mysql_query ($sql_upt);
}
}
if ($kol >= $ile_column)
{
// http://forums.devshed.com/t50348/s.html
echo"";
$kol=1;
}
else
{ $kol++; }
echo"
$title
Calculate price
| ";
//echo "$kol -=- $ile_column";
//echo "els $kol - $ile_col";
// echo"
// $product
// | ";
//
}
$kol=1;
if($totalitem>0)
{
echo"
|