vratjazyk()."' and url.typ = 'product' and url.lang = '".$language->vratjazyk()."'"); while ($zaznam = mysql_fetch_array($q)) { $q1 = mysql_query("select name from product_undercarts where id_product = ".$zaznam['id_product']); if (mysql_num_rows($q1)==0) { $podkarts=false; $stock->init_stock_num_front($zaznam['id_product'],'NONE'); $zaznam['lze_objednat']=$stock->verify($zaznam['id_product']); $zaznam['podkarta']=$podkarts; } else { $podkarts=true; $zaznam['podkarta']=$podkarts; } if ($zaznam['sleva_akce']!=0) { $zaznam['procentualni_sleva']=round(100-($zaznam['price']/(($zaznam['sleva_akce']/100))),0); $zaznam['sleva_akce']=$language->prepocitat_mena($zaznam['sleva_akce']); $zaznam['sleva_akce_without_dph']=$language->prepocitat_mena($zaznam['sleva_akce']/(100+($zaznam['dph']))*100); } $zaznam['price']=$language->prepocitat_mena($zaznam['price']); $zaznam['price_without_dph']=($zaznam['price']/(100+($zaznam['dph']))*100); if (!file_exists($_SERVER['DOCUMENT_ROOT'].'/media/product/'.$zaznam['folder'].'/hlavni.png')) {$zaznam['hlavnifoto1']='/media/default_product.png';} else {$zaznam['hlavnifoto1']='/media/product/'.$zaznam['folder'].'/hlavni.png';} $zaznamakce [] = $zaznam; } $smarty->assign('zaznamakce',$prom->upravitpromennetisk($zaznamakce)); $smarty->assign('url',$_GET['url']); ?> vratjazyk()."'"); while ($zaznam = mysql_fetch_array($q)) { $zaznamdb [] = $zaznam; } $prom->upravitpromennetisk($zaznamdb); foreach ($zaznamdb[0] as $klic => $hod) { $smarty->assign($klic,$hod); } if ($zaznamdb[0]['meta_des']=='') {$meta_des=$zaznamdb[0]['nazev'];} else {$meta_des=$zaznamdb[0]['meta_des'];} if ($zaznamdb[0]['meta_tit']=='') {$meta_tit=$zaznamdb[0]['nazev'];} else {$meta_tit=$zaznamdb[0]['meta_tit'];} if ($zaznamdb[0]['meta_keywords']=='') {$meta_keywords=$zaznamdb[0]['nazev'];} else {$meta_keywords=$zaznamdb[0]['meta_keywords'];} $smarty->assign('des',$meta_des); $smarty->assign('title',$meta_tit); $smarty->assign('keywords',$meta_keywords); // nasledující kód vypíše produkty i dle řazení $dotaz = "select product.id as 'id' from product inner join product_lang on product.id = product_lang.id_product where product.hlavni = 1 $sex and product.kos = 0 and product_lang.lang = '".$language->vratjazyk()."' and product_lang.zobrazit = 1"; $zaznastranku = 20; $poczaz=$db->pocetzaznamu($dotaz); // kos = 0 -> zbozi neni v kosi // 1 -> opak if ($poczaz!=0) { $zbytek = $poczaz % $zaznastranku; $stranek = ($poczaz - $zbytek)/ $zaznastranku; $numnav->nastavpar('?pid=',$_GET['pid'],$stranek,$poczaz,$zbytek,$zaznastranku,''); if ($poczaz>$zaznastranku) $smarty->assign('strankovani',$numnav->ukaznav_big()); $vycet=$numnav->vycetid ($dotaz); $q = mysql_query("select product.id as 'id_product', product.sleva_akce, product.prize as 'price', product.folder as 'folder', product.novinka as 'new', product.akce as 'in_action', product_lang.nazev as 'name_of_product', product_lang.anotace as 'anotace', url.nazev as 'name_url', maker.jmeno_vyrobce, dph.dph from product inner join product_lang on product.id = product_lang.id_product inner join url on product.id = url.id_typ inner join dph on product.dph = dph.id left join maker on product.kod_vyrobce = maker.id where product.id in (".$vycet.") and product_lang.lang = '".$language->vratjazyk()."' and url.typ = 'product' and url.lang = '".$language->vratjazyk()."' ORDER BY product.id desc"); while ($zaznam = mysql_fetch_array($q)) { $q1 = mysql_query("select name from product_undercarts where id_product = ".$zaznam['id_product']); if (mysql_num_rows($q1)==0) { $podkarts=false; $stock->init_stock_num_front($zaznam['id_product'],'NONE'); $zaznam['lze_objednat']=$stock->verify($zaznam['id_product']); $zaznam['podkarta']=$podkarts; } else { $podkarts=true; $zaznam['podkarta']=$podkarts; } if ($zaznam['sleva_akce']!=0) { $zaznam['procentualni_sleva']=round(100-($zaznam['price']/(($zaznam['sleva_akce']/100))),0); $zaznam['sleva_akce']=$language->prepocitat_mena($zaznam['sleva_akce']); $zaznam['sleva_akce_without_dph']=$language->prepocitat_mena($zaznam['sleva_akce']/(100+($zaznam['dph']))*100); } $zaznam['price']=$language->prepocitat_mena($zaznam['price']); $zaznam['price_without_dph']=($zaznam['price']/(100+($zaznam['dph']))*100); if (!file_exists($_SERVER['DOCUMENT_ROOT'].'/media/product/'.$zaznam['folder'].'/hlavni.png')) {$zaznam['hlavnifoto1']='/media/default_product.png';} else {$zaznam['hlavnifoto1']='/media/product/'.$zaznam['folder'].'/hlavni.png';} $zaznamdb1 [] = $zaznam; } $prom->upravitpromennetisk($zaznamdb1); //setcookie('idcat',$zaznamdb[0]['id'],time () + 86400,'/'); $smarty->assign('zaznamdb1',$prom->upravitpromennetisk($zaznamdb1)); $smarty->assign('url',$_GET['url']); } ?>