Versione Standard - Standard Version
0 and visibile='1'"; $result3 = mysql_query($query3, $db); $row3 = mysql_fetch_array($result3); if ($row3[tot] > 1) { echo '
'; //lingue $query = "select * from lingue where ordling >0 order by ordling"; $result = mysql_query($query, $db); while ($row = mysql_fetch_array($result)) { $query2 = "select * from pagine where lingua=" . $row['idling'] . " and homelingua = 1 and visibile='1'"; $result2 = mysql_query($query2, $db); while ($row2 = mysql_fetch_array($result2)) { echo "" . "" ."  "; } } echo "
"; } ?>
"; if ($_SESSION['idcli'] != "") { $accessoclienti = "

". $f_benvenuto[$idling] . " " . $_SESSION['nomecli'] . "

" . $f_profilo[$idling] . "
" . $f_ordini[$idling] . "
Logout
"; } if ($ecm == 1) echo $accessoclienti; ?>
MENU'
"; $inibriciola .= "Home > "; while ($appmama != 0) { $query = "select * from pagine where id='" . $appmama . "'"; $result = mysql_query($query, $db); while ($row = mysql_fetch_array($result)) { if ($row['nolinkmenu'] == '1') $briciola = "" . $row['titolo'] . " > " . $briciola; $appmama = $row['madre']; } } $briciola = $inibriciola . $briciola . $titolo . "
"; if ($mamma != 0) echo $briciola; /////////////////// if ($testomobile == "") $testomobile = $testo; ?>

'; ?>
'; $cunta = 0; $queryn = "select * from foto where fotonum = '" . $idpagina . "' and fotogruppo='9' order by fotoord"; $resultn = mysql_query($queryn, $db); while ($rown = mysql_fetch_array($resultn)) { $cunta = $cunta + 1; $topslide .= ''; } $topslide .= "
"; $cunta = 0; $queryn = "select * from foto where fotonum = '" . $idpagina . "' and fotogruppo='9' order by fotoord"; $resultn = mysql_query($queryn, $db); while ($rown = mysql_fetch_array($resultn)) { $cunta = $cunta + 1; $topslide .= '
'; $topslide .= '

' . $rown['fototxt'] . '

'; if ($rown['fotodesc'] != "") { $topslide .= '

' . $rown['fotodesc'] . '

'; } $topslide .= '
'; } print $topslide; } ?>
0) print '

'; ?>

"; } ////////////////////////////////////////////// NEW /////////////////////////////////////////// if ($_POST['variante'] != "") { $queryva = "select * from varianti where var_id='" . $_POST['variante'] . "'"; $resultva = mysql_query($queryva, $db); while ($rowva = mysql_fetch_array($resultva)) { $prezzo = $rowva['var_prezzo']; if ($_SESSION['tipocli'] == 2) { $prezzo =$rowva['var_prezzoriv']; } $testovar = $rowva['var_testo']; } } else { $queryva = "select * from varianti where var_idpag='" . $idpag . "' order by var_prezzo limit 1"; $resultva = mysql_query($queryva, $db); while ($rowva = mysql_fetch_array($resultva)) { $prezzo = $rowva['var_prezzo']; if ($_SESSION['tipocli'] == 2) { $prezzo =$rowva['var_prezzoriv']; } $testovar = $rowva['var_testo']; } } if ($_POST['variante2'] != "") { $queryva = "select * from varianti2 where var_id='" . $_POST['variante2'] . "'"; $resultva = mysql_query($queryva, $db); while ($rowva = mysql_fetch_array($resultva)) { $testovar2 = $rowva['var_testo']; } } else { $queryva = "select * from varianti2 where var_idpag='" . $idpag . "' limit 1"; $resultva = mysql_query($queryva, $db); while ($rowva = mysql_fetch_array($resultva)) { $testovar2 = $rowva['var_testo']; } } if ($_FILES["foto2"]["name"]!="") { /////////////////////// upload file /////////////////////// if ($_FILES["foto2"]["name"]!=""){ if(!isset($_FILES)) $_FILES = $HTTP_POST_FILES; if(!isset($_SERVER)) $_SERVER = $HTTP_SERVER_VARS; $upload_dir = "uploads/persona"; $orname = $_FILES["foto2"]["name"]; list($b1,$b2)=split("[.]",$orname); if ((strtolower($b2)!="jpg")) { print ' '; unlink ($_SERVER["DOCUMENT_ROOT"] .$_POST['foto2']); $foto2=""; $err=1; } else { $new_name = time()."-" . $_SESSION['username'] . ".".$b2; $_SESSION['imma'] = $new_name; $file_name = ($new_name) ? $new_name : $_FILES["foto2"]["name"]; if(@is_uploaded_file($_FILES["foto2"]["tmp_name"])) { @move_uploaded_file($_FILES["foto2"]["tmp_name"], "$upload_dir/$file_name") or die("Impossibile spostare il file FOTO, controlla l'esistenza o i permessi della directory dove fare l'upload. ".$_FILES["foto2"]["tmp_name"]." $upload_dir"); chmod("$upload_dir/$file_name", 0777); } else { die("Problemi nell'upload del file FOTO chiamato : " . $_FILES["foto2"]["name"]); } //chmod("$upload_dir/$file_name", 0644); $foto2=$url."uploads/persona/".$file_name; if ($foto2!=$_POST['foto2old']) unlink ($_SERVER["DOCUMENT_ROOT"] .$_POST['foto2old']); } }else{ $foto2=$_POST['foto2old']; } } print '
'; $queryc = "select count(*) as totiva from varianti where var_idpag ='" . $_GET['idpag'] ."'"; $resultc = mysql_query($queryc, $db); $rowc = mysql_fetch_array($resultc); if ($rowc['totiva'] != 0) { $_SESSION['variante'] = $_POST['variante']; print '
' . $testovariante . '
'; print '
'; } ///////////// variante 2 $queryz = "select count(*) as totiva2 from varianti2 where var_idpag ='" . $_GET['idpag'] ."'"; $resultz = mysql_query($queryz, $db); $rowz = mysql_fetch_array($resultz); if ($rowz['totiva2'] != 0) { //echo $queryz; $_SESSION['variante2'] = $_POST['variante2']; print '
' . $testovariante2 . '
'; print '
'; } else { $_SESSION['variante2'] = ""; } ///////////// } else { $_SESSION['variante'] = ""; } print '
'; /*if ($_SESSION['variante'] != "") { $queryva = "select * from varianti where var_id='" . $_SESSION['variante'] . "'"; $resultva = mysql_query($queryva, $db); while ($rowva = mysql_fetch_array($resultva)) { $prezzo = $rowva['var_prezzo']; $testovar = $rowva['var_testo']; } } */ ?> '; print'
Carica immagine da stampare: '; if ($_SESSION['imma'] != "") { print'
'; } print "
"; print "Una volta caricata l'immagine potrai mettere il prodotto nel carrello

"; } // '; print ''; if ($file == 0 and $invendita == 1) { print '

'; } if ($file == 1 and $_SESSION['imma'] != "" and $invendita == 1) { print '

'; } if ($prezzo > 0) { echo "
" . $prezzo . " €
"; } if ($prezzo != "0.00" AND $acquista != 1) { echo "
"; } ////////////////////////////////////////////////////////////////////////////////////////////// ?> "; $sottomenu .= ""; $sottomenu .= "
"; $sottomenu .= "
"; $sottomenu .= "
"; // //crea sottomenu [menuoriz] if ( $_GET['idpag'] != "") { $query = "select * from pagine where madre='" . $_GET['idpag'] ."' and visibile='1' order by ordine"; } $result = mysql_query($query, $db); $sottomenuo = ""; while ($row = mysql_fetch_array($result)) { $sottomenuo .= "" . $row['titolo'] ."  "; } $sottomenuo .= ""; $testomobile = str_replace ('

[opensection]

', '
', $testomobile); $testomobile = str_replace ('

[div-13]

', '
', $testomobile); $testomobile = str_replace ('

[div-23]

', '
', $testomobile); $testomobile = str_replace ('

[div-33]

', '
', $testomobile); $testomobile = str_replace ('

[div-14]

', '
', $testomobile); $testomobile = str_replace ('

[div-24]

', '
', $testomobile); $testomobile = str_replace ('

[div-34]

', '
', $testomobile); $testomobile = str_replace ('

[div-44]

', '
', $testomobile); $testomobile = str_replace ('

[div-15]

', '
', $testomobile); $testomobile = str_replace ('

[div-25]

', '
', $testomobile); $testomobile = str_replace ('

[div-35]

', '
', $testomobile); $testomobile = str_replace ('

[div-45]

', '
', $testomobile); $testomobile = str_replace ('

[div-55]

', '
', $testomobile); $testomobile = str_replace ('

[closediv]

', '
', $testomobile); $testomobile = str_replace ('

[closesection]

', '
', $testomobile); ////////////////////////////////////////////// $testomobile = str_replace ('[menu]', $sottomenu, $testomobile); $testomobile = str_replace ('[menuoriz]', $sottomenuo, $testomobile); $testomobile = str_replace ("[catalogo", "[catalogomobile", $testomobile); $testomobile = str_replace ("[ecommerce", "[catalogomobile", $testomobile); $testomobile = str_replace ("[marche", "[marchemobile", $testomobile); $testomobile = str_replace ("[bloghome", "[bloghomemobile", $testomobile); $testomobile = str_replace ("fotoview0", "fotonivo0", $testomobile); $testomobile = str_replace ("fotoview1", "fotonivo1", $testomobile); $testomobile = str_replace ("fotoview2", "fotonivo2", $testomobile); $testomobile = str_replace ("fotoview3", "fotonivo3", $testomobile); $testomobile = str_replace ("fotoview4", "fotonivo4", $testomobile); $testomobile = str_replace ("fotoview5", "fotonivo5", $testomobile); $testomobile = str_replace ("fotogallerybox0", "fotomobile0", $testomobile); $testomobile = str_replace ("fotogallerybox1", "fotomobile1", $testomobile); $testomobile = str_replace ("fotogallerybox2", "fotomobile2", $testomobile); $testomobile = str_replace ("fotogallerybox3", "fotomobile3", $testomobile); $testomobile = str_replace ("fotogallerybox4", "fotomobile4", $testomobile); $testomobile = str_replace ("fotogallerybox5", "fotomobile5", $testomobile); /* * * $testomobile = str_replace ("fotogallery0", "fotomobile0", $testomobile); $testomobile = str_replace ("fotogallery1", "fotomobile1", $testomobile); $testomobile = str_replace ("fotogallery2", "fotomobile2", $testomobile); $testomobile = str_replace ("fotogallery3", "fotomobile3", $testomobile); $testomobile = str_replace ("fotogallery4", "fotomobile4", $testomobile); $testomobile = str_replace ("fotogallery5", "fotomobile5", $testomobile); $testomobile = str_replace ("fotogallerylight0", "fotomobile0", $testomobile); $testomobile = str_replace ("fotogallerylight1", "fotomobile1", $testomobile); $testomobile = str_replace ("fotogallerylight2", "fotomobile2", $testomobile); $testomobile = str_replace ("fotogallerylight3", "fotomobile3", $testomobile); $testomobile = str_replace ("fotogallerylight4", "fotomobile4", $testomobile); $testomobile = str_replace ("fotogallerylight5", "fotomobile5", $testomobile); $testomobile = str_replace ("fotogallerylightfix0", "fotomobile0", $testomobile); $testomobile = str_replace ("fotogallerylightfix1", "fotomobile1", $testomobile); $testomobile = str_replace ("fotogallerylightfix2", "fotomobile2", $testomobile); $testomobile = str_replace ("fotogallerylightfix3", "fotomobile3", $testomobile); $testomobile = str_replace ("fotogallerylightfix4", "fotomobile4", $testomobile); $testomobile = str_replace ("fotogallerylightfix5", "fotomobile5", $testomobile); $testomobile = str_replace ("fotonivo0", "fotomobile0", $testomobile); $testomobile = str_replace ("fotonivo1", "fotomobile1", $testomobile); $testomobile = str_replace ("fotonivo2", "fotomobile2", $testomobile); $testomobile = str_replace ("fotonivo3", "fotomobile3", $testomobile); $testomobile = str_replace ("fotonivo4", "fotomobile4", $testomobile); $testomobile = str_replace ("fotonivo5", "fotomobile5", $testomobile); */ ///////////////////////// foto singola al 100% /////////////// for ($i = 0; $i <= 9; ++$i) { $c = 0; $messaggiofl = ''; $queryn = "select * from foto where fotonum = '" . $idpagina . "' and fotogruppo='$i' order by fotoord"; $resultn = mysql_query($queryn, $db); while ($rown = mysql_fetch_array($resultn)) { $messaggiofl .= ''. $rown['fototxt'] .''; } $messaggiofl .= '
'; $stringadasost = "[fotosingola" . $i . "]"; $testomobile = str_replace ($stringadasost, $messaggiofl, $testomobile); } ///////////////////FOTOLINK////////////////////////////////////// $messaggioflink = '
'; $queryn = "select * from foto where fotonum = '" . $idpagina . "' and fotogruppo='6' order by fotoord"; $resultn = mysql_query($queryn, $db); while ($rown = mysql_fetch_array($resultn)) { $messaggioflink .= ' ' . $rown['fototxt'] .'

' . $rown['fototxt'] . '


'; } $messaggioflink .= '
'; $testomobile = str_replace ("[fotolink]", $messaggioflink, $testomobile); ///////////////////FOTOGALLERY NIVO ////////////////////////////////////// for ($i = 0; $i <= 5; ++$i) { $messaggiof = '
'; $cunta = 0; $queryn = "select * from foto where fotonum = '" . $idpagina . "' and fotogruppo='$i' order by fotoord"; $resultn = mysql_query($queryn, $db); while ($rown = mysql_fetch_array($resultn)) { $cunta = $cunta + 1; $messaggiof .= ''; } $messaggiof .= "
"; $cunta = 0; $queryn = "select * from foto where fotonum = '" . $idpagina . "' and fotogruppo='$i' order by fotoord"; $resultn = mysql_query($queryn, $db); while ($rown = mysql_fetch_array($resultn)) { $cunta = $cunta + 1; $messaggiof .= '
'; $messaggiof .= '

' . $rown['fototxt'] . '

'; if ($rown['fotodesc'] != "") { $messaggiof .= '

' . $rown['fotodesc'] . '

'; } $messaggiof .= '
'; } $stringadasost = "[fotonivo" . $i . "]"; $testomobile = str_replace ($stringadasost, $messaggiof, $testomobile); } ///////////////////////////////////////////////////////// FORM PERSONALIZZATI ////////////// srand((double)microtime()*1000000); $num1 = rand(1,5); $num2 = rand(1,5); $num3 = rand(1,5); $querysost = "select * from formpers order by formnome, formordine"; //echo $querysost; $resultsost = mysql_query($querysost, $db); while ($rowsost = mysql_fetch_array($resultsost)) { $obli = ""; $cont = ""; $qu = $qu+1; echo ' '; if ($rowsost['formobb'] == "1") { $obli = "* "; $cont=" onblur='controlla" . $qu . "();' "; } if ($rowsost['formtipo'] == "1") { $contap[$rowsost[formnome]] = $contap[$rowsost[formnome]] + 1; $tipo = '' . $obli . $rowsost[formcampo] . ':'; } if ($rowsost['formtipo'] == "2") { $contap[$rowsost[formnome]] = $contap[$rowsost[formnome]] + 1; $tipo = '' . $obli . $rowsost[formcampo] . ':'; } if ($rowsost['formtipo'] == "3") { $contap[$rowsost[formnome]] = $contap[$rowsost[formnome]] + 1; $tipo = '' . $obli . $rowsost[formcampo] . ':'; } if ($rowsost['formtipo'] == "5") { $contap[$rowsost[formnome]] = $contap[$rowsost[formnome]] + 1; $tipo = ''; } if ($rowsost['formtipo'] == "4") { $contap[$rowsost[formnome]] = $contap[$rowsost[formnome]] + 1; $tipo = '' . $obli . $rowsost[formcampo] . ':'; } $forma[$rowsost[formnome]] .= $tipo . ""; // $app .= $rowsost[formcampo]; } $querysost2 = "SELECT DISTINCT(formnome) FROM formpers"; $resultsost2 = mysql_query($querysost2, $db); while ($rowsost2 = mysql_fetch_array($resultsost2)) { $dasost = "[" . $rowsost2['formnome'] . "]"; $sost = "
" . $forma[$rowsost2[formnome]] . "
* E-mail:
Newsletter?
AntiSpam code:
* Letto informativa Privacy
"; $testomobile = str_replace ($dasost, $sost, $testomobile); //$testo = str_replace ($dasost, $app, $testo); } /////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////// $testomobile = str_replace ('[form_azienda_oriz]', $form_azienda_oriz, $testomobile); $testomobile = str_replace ('[form_azienda]', $form_azienda, $testomobile); $testomobile = str_replace ('[form_privato]', $form_privato, $testomobile); $testomobile = str_replace ('[form_privato_oriz]', $form_privato_oriz, $testomobile); $messaggiofl =""; for ($i = 0; $i <= 5; ++$i) { $queryn = "select * from foto where fotonum = '" . $idpagina . "' and fotogruppo='$i' order by fotoord"; $resultn = mysql_query($queryn, $db); while ($rown = mysql_fetch_array($resultn)) { /* $immagine = $urlpartenza . $rown['fotoimg']; $dimensioni = getimagesize($immagine); $larghezza = $dimensioni[0]; $altezza = $dimensioni[1]; if ($altezza >= $larghezza) { $rapporto = $altezza/$larghezza; $fotogalleryfix_light_alt2 = $foto_alt_mobile; $fotogalleryfix_light_larg2 = $foto_largh_mobile / $rapporto; } if ($altezza < $larghezza) { $rapporto = $larghezza/$altezza; $fotogalleryfix_light_alt2 = $foto_alt_mobile; $fotogalleryfix_light_larg2 = $foto_largh_mobile * $rapporto; } */ // $messaggiofl .= '

'; $messaggiofl .= '

'; } $stringadasost = "[fotomobile" . $i . "]"; $testomobile = str_replace ($stringadasost, $messaggiofl, $testomobile); $messaggiofl =""; } ////////////// /////////////// CATALOGO ////////////// $queryx = "select * from pagine where madre='" . $_GET['idpag'] . "' and catalogo ='1' and visibile ='1' order by ordine"; $resultx = mysql_query($queryx, $db); while ($rowx = mysql_fetch_array($resultx)) { $messaggioc .= '
'. $rowx['titolo'] .'

' . $rowx['titolo'] . "

" . $rowx['breve'] . "
"; if ($rowx['prezzo'] > 0) { if ($_SESSION['tipocli'] == 2) { $messaggioc .= '
' . number_format($rowx['prezzoriv'],2,',','.') . " €
"; } else { $messaggioc .= '
' . number_format($rowx['prezzo'],2,',','.') . " €
"; } } $messaggioc .= "
"; } $testomobile = str_replace ("[catalogomobile]", $messaggioc, $testomobile); /////////////////////////////////////// /////////////// bloghome ////////////// $queryx = "select * from pagine where marca = 'blog' and catalogo ='1' and visibile ='1' order by id desc LIMIT " . $bloghome_quanti; $resultx = mysql_query($queryx, $db); while ($rowx = mysql_fetch_array($resultx)) { $messaggioc .= '
'. $rowx['titolo'] .'

' . $rowx['titolo'] . "

" . $rowx['breve'] . "
"; $messaggioc .= "
"; } $testomobile = str_replace ("[bloghomemobile]", $messaggioc, $testomobile); /////////////////////////////////////// /////////////// VETRINA ////////////// $messaggioc = ""; $queryx = "select * from pagine where vetrina='1' and catalogo ='1' and visibile ='1' order by rand() limit " . $vetrina_quanti. ";"; $resultx = mysql_query($queryx, $db); while ($rowx = mysql_fetch_array($resultx)) { /* $immagine = $urlpartenza . $rowx['foto']; $dimensioni = getimagesize($immagine); $larghezza = $dimensioni[0]; $altezza = $dimensioni[1]; if ($altezza >= $larghezza) { $rapporto = $altezza/$larghezza; $fotogalleryfix_light_alt2 = $catalogo_foto_alt_mobile; $fotogalleryfix_light_larg2 = $catalogo_foto_largh_mobile / $rapporto; } if ($altezza < $larghezza) { $rapporto = $larghezza/$altezza; $fotogalleryfix_light_alt2 = $catalogo_foto_alt_mobile; $fotogalleryfix_light_larg2 = $catalogo_foto_largh_mobile * $rapporto; } */ $messaggioc .= '
'. $rowx['titolo'] .'

' . $rowx['titolo'] . "

" . $rowx['breve'] . "
"; if ($rowx['prezzo'] > 0) { $messaggioc .= "Prezzo: " . $rowx['prezzo'] . ""; } $messaggioc .= "
"; } $testomobile = str_replace ("[vetrina]", $messaggioc, $testomobile); /////////////////////////////////////// /////CORRELATI $queryx = "select * from correlati where corrpag='" . $_GET['idpag'] . "'"; $resultx = mysql_query($queryx, $db); $contatore = 0; while ($rowx = mysql_fetch_array($resultx)) { $queryx2 = "select * from pagine where id='" . $rowx['corrprod'] . "'"; $resultx2 = mysql_query($queryx2, $db); while ($rowx2 = mysql_fetch_array($resultx2)) { $messaggiocorr .= '
'. $rowx2['titolo'] .'

' . $rowx2['titolo'] . "


"; } } $testomobile = str_replace ("[correlati]", $messaggiocorr, $testomobile); //////////////////////////////////////// ////MARCHE $queryx = "select * from pagine where id = $_GET[idpag]"; $resultx = mysql_query($queryx, $db); while ($rowx = mysql_fetch_array($resultx)) { $marca = $rowx['marca']; $idling = $rowx['lingua']; } $queryx2 = "select * from pagine where marca='" . $marca . "' and catalogo ='1' and visibile ='1' and id != '" . $_GET['idpag'] . "' order by ordine"; $resultx2 = mysql_query($queryx2, $db); while ($rowx2 = mysql_fetch_array($resultx2)) { $messaggiocorr .= '
'. $rowx2['titolo'] .'

' . $rowx2['titolo'] . "


"; } $testomobile = str_replace ("[marchemobile]", $messaggiocorr, $testomobile); //////////////////////////////////////// /////////////// SCHEDE ////////////// $schedevert = "
"; $queryx = "select * from schede where pagina='" . $_GET['idpag'] . "' and visibile ='1' order by ordine"; $resultx = mysql_query($queryx, $db); while ($rowx = mysql_fetch_array($resultx)) { $schedevert .= "

" . $rowx['titolo'] . "

"; $schedevert .= "
" . $rowx['testo'] . "
"; } $schedevert .= "
"; /////////////////////////////////////// $testomobile = str_replace ("[schedemobile]", $schedevert, $testomobile); echo $testomobile; if ($_GET['acquista'] == 1) { include ("_acquista.php"); } if ($_GET['reg'] == 1) { include ("_registra.php"); } if ($_GET['ord'] == 1) { include ("_ordinicli.php"); } ?>