Gli ultimi articoli della nostra produzione
"; //************ S T E P 1 if ($step=="1") { if ($parent!="-1") { $count="1"; $cat1=$parent; $done="0"; $currid=$parent; $level=$parent; ############################################################# // Inizio percorso while (!$done) { $count=$count+1; $query="SELECT id, parent FROM category WHERE id='$level'"; $result = mysql_query($query,$db); if ($myrow = mysql_fetch_array($result)) { $parent_id=$myrow['id']; $parent_parent=$myrow['parent']; $level=$parent_parent; ${"cat".$count}=$level; $currid=$level; if ($orphan) { $count=$count-1; $done="1"; } if ($level=="-1") { $done="1"; $grandparent=$parent_id; } if ($level==$lastlevel) { $count=$count-1; $done="1"; } $lastlevel=$level; } else {$done="1";} } /* ---- Visualizza le categorie superiori e quella attiva ---- */ $cont = 1; $path[0] ="$prod_base"; for ($i=$count; $i>=1; $i=$i-1) { $display=${"cat".$i}; // $spacer=(($count - $i) * 15); $query="SELECT c.id, c.name, c.active, c.picture, c.description FROM category c WHERE c.id='$display'"; $result = mysql_query($query,$db); if ($myrow=mysql_fetch_array($result)) { $display_id=$myrow['id']; $display_name=$myrow['name']; $display_active=$myrow['active']; $display_picture=$myrow['picture']; $display_description=$myrow['description']; $cont ++; $titolo = $display_name; $rif=""; $path[$cont] = "$display_name"; } mysql_free_result($result); } $path = implode (" › ", $path); $path = "".$title."".$path; } // fine percorso ############################################################# if ($titolo == '') { $titolo = $prod_base; } // Visualizzazione stringa path //echo "$path
"; ?>


">


=1; $i=$i-1) { $display=${"cat".$i}; $query="SELECT c.id, c.name, c.active, c.picture, c.description FROM category c WHERE c.id='$display'"; $result = mysql_query($query,$db); if ($myrow=mysql_fetch_array($result)) { $display_id=$myrow['id']; $display_name=$myrow['name']; $display_active=$myrow['active']; $display_picture=$myrow['picture']; $display_description=$myrow['description']; if ($display_id==$parent) { $catname=$display_name; if ($display_picture!="none") {$haspic=1; $catpicture=$display_picture;} else {$haspic=0;} if ($display_description=="none") {$catdescription="";} else {$catdescription=$display_description;} } } mysql_free_result($result); } /* ---- Visualizza le categorie sotto a quella attiva ----- */ $query="SELECT c.id, c.code, c.name, c.active FROM category c WHERE c.parent='$parent' AND c.active"; $result = mysql_query($query, $db); ?>
">
0) { // ci sono news $num_pagine=ceil($tot_ricerca / $numc); // Se la pagina è la 1 partiamo da 0 $begin=($pagina-1) * $numc; /* ----- Mostra i prodotti della categoria ------ */ $query="SELECT DISTINCT p.novita as novita ,p.discount as discount, p.catalogoid as catalogoid , p.shortdesc as shortdesc, p.picture as picture,p.marcaid as marcaid, p.catalogoid as catalogoid, p.id AS id, p.name as name, p.sell AS sell, cl.catid AS catid FROM products p, catlink cl WHERE p.id=cl.prodid AND p.active=1 AND cl.catid='$parent' AND p.deleted=0 order by p.marcaid, p.name LIMIT $begin, $numc"; $result = mysql_query($query,$db); while ($myrow = mysql_fetch_array($result)) { mysql_assign($query,$myrow,"display_"); if ($display_picture=='none' || $display_picture=='') {$this_img=""; unset($w); unset($h); ;} else {$this_img="prodimg/$display_picture"; $h = "height='100'"; $w = "width='150'"; } /*$qq = "select * from produttori where id = '$display_marcaid'"; $resultM = mysql_query($qq,$db); $myrow = mysql_fetch_array($resultM);*/ if ($i) { $i=false; $colore="#F9F9F9"; } else {$i=true; $colore="#FFFFFF"; } /*$qq2 = "select * from catalogo where id = '$display_catalogoid'"; $resultC = mysql_query($qq2,$db); $myrowC = mysql_fetch_array($resultC); */ ?> 0 ) $display_discount= number_format($display_discount, 2, '.', ''); else $display_discount=""; if ($display_discount) $price = "
$temp_sell
€ $display_discount
"; else $price = "€ ".$temp_sell; ?>

">"; ?>


0) echo"
"; ?>" >Articolo "; ?>




Marche e siti di riferimento
">
">
"; if ($haspic) {echo""; } } } if ($step=="2") { $query = "SELECT * FROM products WHERE id=$pid AND deleted=0"; $result = mysql_query($query,$db); if($myrow = mysql_Fetch_array($result)) { mysql_assign($query,$myrow,"this_"); $esaurito = false; $found=1; } else { $found=0; } mysql_free_result($result); if (!$found) { echo $prodottoinesistente; } else { // ++++++++++++++++++++++ /*$qq = "select * from produttori where id = '$this_marcaid'"; $resultM = mysql_query($qq,$db); $myrowM = mysql_fetch_array($resultM);*/ // ++++++++++++++++++++++ // ++++++++++++++++++++++ /*$qq2 = "select * from catalogo where id = '$this_catalogoid'"; $resultC = mysql_query($qq2,$db); $myrowC = mysql_fetch_array($resultC);*/ // ++++++++++++++++++++++ if(!$catid) { $query="SELECT catid FROM catlink WHERE prodid=$pid"; $result=mysql_query($query,$db); if ($myrow=mysql_fetch_array($result)) { $catid=$myrow['catid']; } else { $catid=-1; } mysql_free_result($result); } $hasfield=0; if ($this_picture!="none") {$haspic=1;} else {$haspic=0;} if ($this_url!="none") {$hasurl=1;} else {$hasurl=0;} //$weight=formatPrice($this_weight,-1); //if ($this_voleven) {$volprice=$this_volprice*$this_volqty;} //else {$volprice=$this_volprice*1;} if ($this_sell > 0) { // $volprice= formatPrice($volprice,2); $price=formatPrice($this_sell,2); $price="€ ".$price; } // ***** $next_catid=$catid; $cat_path=""; while($next_catid!=-1) { $query="SELECT c.name,c.parent FROM category c WHERE c.id=$next_catid"; $result=mysql_query($query); if($myrow=mysql_fetch_array($result)) { $cat_name=$myrow['name']; $cat_parent=$myrow['parent']; $cat_path=" › ".$cat_name."".$cat_path; } else { $cat_parent=-1; } mysql_free_result($result); $next_catid=$cat_parent; } $cat_path="".$title."".$cat_path; //***** //echo"$cat_path
"; ?> "; ?>
Articolo $this_name"; ?>

" alt="" width="375" border="0"> <% if ($this_sell > 0) { // VISIBILE SOLO SE PREZZO INSERITO%> <% } %>


">Richiedi maggiori informazioni sull'Articolo

" target="_blank">Ingrandisci l'immagine