";
if(isset($_POST['urun']))
{
$ara=TEXT($_POST['urun']);
if(strlen($ara)<3) yonlendir('urunler.php','En az 3 karakter giriniz');
else
$urunler=$db->coksatirPlus("select id,name,image from product where aktif='1' and name like '%$ara%' order by name");
if(!$urunler) yonlendir('urunler.php','Arama sonucuna uygun ürün bulunamadı');
}
else
{
if($cid>0) $where=" and ctgry=$cid ";
else $where="and ctgry in(".implode(",",$kategoriArray).") ";
if($cid==0) $limit.=" limit 0,40";
$urunler=$db->coksatirPlus("select id,name,image from product where aktif='1' $where order by id desc $limit");
}
foreach($urunler as $urun)
{
extract($urun);
echo "
";
}
echo "