0) {
$tot_cookie = 0;
$tot1 = 1;
if (isset($_COOKIE['prod_naticonlacam'])) {
$out_ultimi_visti = $_COOKIE['prod_naticonlacam'];
$tot_cookie = $_COOKIE['prod_naticonlacam']["conto"];
$tot1 = $tot_cookie + 1;
// print_r($out_ultimi_visti);
}
setcookie("prod_naticonlacam[conto]", $tot1, time() + (3600 * 24 * 5));
setcookie("prod_naticonlacam[" . $tot_cookie . "]", $codice, time() + (3600 * 24 * 5));
/*
' . nl2br(pulisci_accenti($descrizione_ann)) . '
';
$suggeriti = '';
$qq_sugg = 'select * from ' . tbl_ann . ' where attivo=1 and ann_hp2=1 order by rand() limit 3';
$rr_sugg = mysql_query($qq_sugg);
if (mysql_num_rows($rr_sugg) > 0) {
// Suggeriti da '.$azienda.'
$tab_sugg = '
' . $testo["Evidenza"] . '';
$suggeriti = '
';
$i = 1;
while ($row = mysql_fetch_array($rr_sugg)) {
$prezzo = prezzo_euro($row['prezzo']);
$linkto = '/' . pulisci_url($row['titolo_ann']) . '-' . $row['id'];
$pageto = $linkto . '.html';
$img = get_name_img_mini_web($row['id_foto'], $row['ext']);
$image = 'https://www.naticonlacamicia.org/_img/_mmini/' . $img['name'];
$nome_prod = $row['titolo_ann'];
if ($row['titolo_ann' . $lang] != '') {
$nome_prod = $row['titolo_ann' . $lang];
}
if (strlen($nome_prod) > 30)
$nome_prod = substr($nome_prod, 0, 30) . '...';
$addc = '';
if ($i == 3)
$addc = ' class="last"';
$td_sconto = '';
$prezzo = '
' . prezzo_euro($row['prezzo']) . '';
if ($row['sconto'] > 0) {
/*
-'.$result['sconto'].'% */
$prezzo = '
' . prezzo_euro($row['prezzo2']) . ' ' . prezzo_euro($row['prezzo']) . '';
// $td_sconto='
-'.$result['sconto'].'%';
$td_sconto = '
-' . $row['sconto'] . '%';
} elseif ($row['prezzo_barrato'] > 0) {
$prezzo = '
' . prezzo_euro($row['prezzo_barrato']) . ' ' . prezzo_euro($row['prezzo']) . '';
}
$suggeriti .= '
';
$i++;
}
$suggeriti .= '
';
$div_sugg = '
' . $suggeriti . '
';
}
$consigliati = '';
if ($correlati) {
$qq_sugg = 'select ' . tbl_ann . '.* from ' . tbl_ann . ',gest_ann_rela where ' . tbl_ann . '.attivo=1 and ' . tbl_ann . '.id=gest_ann_rela.id_ann2 and gest_ann_rela.id_ann1="' . $codice . '" order by rand() limit 3';
// echo $qq_sugg;
$rr_sugg = mysql_query($qq_sugg);
if (mysql_num_rows($rr_sugg) > 0) {
$act = '';
if ($tab_sugg == '')
$act = ' class="selected"';
$tab_cons = '
' . $testo["ArticoliAbbinati"] . '';
$consigliati = '
';
while ($row = mysql_fetch_array($rr_sugg)) {
$prezzo = prezzo_euro($row['prezzo']);
$linkto = '/' . pulisci_url($row['titolo_ann']) . '-' . $row['id'];
$pageto = $linkto . '.html';
$img = get_name_img_mini_web($row['id_foto'], $row['ext']);
$image = 'https://www.naticonlacamicia.org/_img/_mmini/' . $img['name'];
$nome_prod = $row['titolo_ann'];
if ($row['titolo_ann' . $lang] != '') {
$nome_prod = $row['titolo_ann' . $lang];
}
if (strlen($nome_prod) > 30)
$nome_prod = substr($nome_prod, 0, 30) . '...';
$td_sconto = '';
$prezzo = '
' . prezzo_euro($row['prezzo']) . '';
if ($row['sconto'] > 0) {
/*
-'.$result['sconto'].'% */
$prezzo = '
' . prezzo_euro($row['prezzo2']) . ' ' . prezzo_euro($row['prezzo']) . '';
// $td_sconto='
-'.$result['sconto'].'%';
$td_sconto = '
-' . $row['sconto'] . '%';
} elseif ($row['prezzo_barrato'] > 0) {
$prezzo = '
' . prezzo_euro($row['prezzo_barrato']) . ' ' . prezzo_euro($row['prezzo']) . '';
}
$consigliati .= '
';
}
$consigliati .= '
';
$act = '';
if ($tab_sugg == '')
$act = ' active';
$div_cons = '
' . $consigliati . '
';
}
}
$act = '';
if ($tab_sugg == '' and $tab_cons == '')
$act = ' class="selected"';
if ($tot_cookie > 0) {
$lista_cookie = '';
// $lista_cookie.='tot '.$tot_cookie;
for ($r = 0; $r < $tot_cookie; $r++) {
if ($_COOKIE['prod_naticonlacam'][$r] != '' and $_COOKIE['prod_naticonlacam'][$r] != $codice)
$lista_cookie .= ' id="' . $_COOKIE['prod_naticonlacam'][$r] . '" or';
// $lista_cookie.=' r '.$r;
}
// echo $lista_cookie;
if ($lista_cookie != '')
$lista_cookie = substr($lista_cookie, 0, strlen($lista_cookie) - 2);
$lista_last = '';
if ($lista_cookie != '') {
$qq_sugg = 'select * from ' . tbl_ann . ' where attivo=1 and (' . $lista_cookie . ') order by rand() limit 3';
// echo $qq_sugg;
$rr_sugg = mysql_query($qq_sugg);
if (mysql_num_rows($rr_sugg) > 0) {
$tab_last = '
' . $testo["UltimiVisti"] . '';
$lista_last = '
';
while ($row = mysql_fetch_array($rr_sugg)) {
$prezzo = prezzo_euro($row['prezzo']);
$linkto = '/' . pulisci_url($row['titolo_ann']) . '-' . $row['id'];
$pageto = $linkto . '.html';
$img = get_name_img_mini_web($row['id_foto'], $row['ext']);
$image = 'https://www.naticonlacamicia.org/_img/_mmini/' . $img['name'];
$nome_prod = $row['titolo_ann'];
if ($row['titolo_ann' . $lang] != '') {
$nome_prod = $row['titolo_ann' . $lang];
}
if (strlen($nome_prod) > 30)
$nome_prod = substr($nome_prod, 0, 30) . '...';
$td_sconto = '';
$prezzo = '
' . prezzo_euro($row['prezzo']) . '';
if ($row['sconto'] > 0) {
/*
-'.$result['sconto'].'% */
$prezzo = '
' . prezzo_euro($row['prezzo2']) . ' ' . prezzo_euro($row['prezzo']) . '';
// $td_sconto='
-'.$result['sconto'].'%';
$td_sconto = '
-' . $row['sconto'] . '%';
} elseif ($row['prezzo_barrato'] > 0) {
$prezzo = '
' . prezzo_euro($row['prezzo_barrato']) . ' ' . prezzo_euro($row['prezzo']) . '';
}
$lista_last .= '
';
}
$lista_last .= '
';
$act = '';
if ($tab_sugg == '' and $tab_cons == '')
$act = ' active';
$div_last = '
' . $lista_last . '
';
}
}
}
if ($tab_sugg != '' or $tab_cons != '' or $tab_last != '') {
$out .= '
' . $tab_sugg . '
' . $tab_cons . '
' . $tab_last . '
' . $div_sugg . '
' . $div_cons . '
' . $div_last . '
';
}
$out .= '
';
} else {
// categoria non trovata-->
}
}
}
?>