diff --git a/Naim HDX.jpg b/Naim HDX.jpg new file mode 100644 index 0000000..2c366c8 Binary files /dev/null and b/Naim HDX.jpg differ diff --git a/_bann/1-topHome.jpg b/_bann/1-topHome.jpg new file mode 100644 index 0000000..dda1ecb Binary files /dev/null and b/_bann/1-topHome.jpg differ diff --git a/_bann/1-topTienda.JPG b/_bann/1-topTienda.JPG new file mode 100644 index 0000000..ded7383 Binary files /dev/null and b/_bann/1-topTienda.JPG differ diff --git a/_bann/168ARCAM.jpg b/_bann/168ARCAM.jpg new file mode 100644 index 0000000..8e5d741 Binary files /dev/null and b/_bann/168ARCAM.jpg differ diff --git a/_bann/168BWM1.jpg b/_bann/168BWM1.jpg new file mode 100644 index 0000000..507cae9 Binary files /dev/null and b/_bann/168BWM1.jpg differ diff --git a/_bann/168BWTweeter.jpg b/_bann/168BWTweeter.jpg new file mode 100644 index 0000000..16be783 Binary files /dev/null and b/_bann/168BWTweeter.jpg differ diff --git a/_bann/168NAD.jpg b/_bann/168NAD.jpg new file mode 100644 index 0000000..c5a049e Binary files /dev/null and b/_bann/168NAD.jpg differ diff --git a/_bann/168WilsonAudio.gif b/_bann/168WilsonAudio.gif new file mode 100644 index 0000000..54a1d9e Binary files /dev/null and b/_bann/168WilsonAudio.gif differ diff --git a/_bann/168clave.gif b/_bann/168clave.gif new file mode 100644 index 0000000..a73a0e4 Binary files /dev/null and b/_bann/168clave.gif differ diff --git a/_bann/168clave.jpg b/_bann/168clave.jpg new file mode 100644 index 0000000..5ae37a3 Binary files /dev/null and b/_bann/168clave.jpg differ diff --git a/_bann/168marantz.gif b/_bann/168marantz.gif new file mode 100644 index 0000000..2907387 Binary files /dev/null and b/_bann/168marantz.gif differ diff --git a/_bann/348Audioquest.jpg b/_bann/348Audioquest.jpg new file mode 100644 index 0000000..41dc8f3 Binary files /dev/null and b/_bann/348Audioquest.jpg differ diff --git a/_bann/348HarmanKardon.jpg b/_bann/348HarmanKardon.jpg new file mode 100644 index 0000000..547d5f6 Binary files /dev/null and b/_bann/348HarmanKardon.jpg differ diff --git a/_bann/348Primare.gif b/_bann/348Primare.gif new file mode 100644 index 0000000..64e5647 Binary files /dev/null and b/_bann/348Primare.gif differ diff --git a/_bann/348Rotel.jpg b/_bann/348Rotel.jpg new file mode 100644 index 0000000..43f76fe Binary files /dev/null and b/_bann/348Rotel.jpg differ diff --git a/_bann/348Vidikron.jpg b/_bann/348Vidikron.jpg new file mode 100644 index 0000000..0ca15e8 Binary files /dev/null and b/_bann/348Vidikron.jpg differ diff --git a/_bann/528MFidelity.jpg b/_bann/528MFidelity.jpg new file mode 100644 index 0000000..beb7de1 Binary files /dev/null and b/_bann/528MFidelity.jpg differ diff --git a/_bann/708Fidelity.gif b/_bann/708Fidelity.gif new file mode 100644 index 0000000..57e968d Binary files /dev/null and b/_bann/708Fidelity.gif differ diff --git a/_bann/708HarmanKardon.jpg b/_bann/708HarmanKardon.jpg new file mode 100644 index 0000000..1f5bf9c Binary files /dev/null and b/_bann/708HarmanKardon.jpg differ diff --git a/_bann/708Loewe.jpg b/_bann/708Loewe.jpg new file mode 100644 index 0000000..b81ab98 Binary files /dev/null and b/_bann/708Loewe.jpg differ diff --git a/_bann/708Marantz.jpg b/_bann/708Marantz.jpg new file mode 100644 index 0000000..c9bfbd8 Binary files /dev/null and b/_bann/708Marantz.jpg differ diff --git a/_bann/708SonusFarber.gif b/_bann/708SonusFarber.gif new file mode 100644 index 0000000..f424df7 Binary files /dev/null and b/_bann/708SonusFarber.gif differ diff --git a/_bann/708arcam.jpg b/_bann/708arcam.jpg new file mode 100644 index 0000000..845fe6b Binary files /dev/null and b/_bann/708arcam.jpg differ diff --git a/_bann/AGOSTO VACACIONES.jpg b/_bann/AGOSTO VACACIONES.jpg new file mode 100644 index 0000000..f18aba8 Binary files /dev/null and b/_bann/AGOSTO VACACIONES.jpg differ diff --git a/_bann/BANNER STEWART.jpg b/_bann/BANNER STEWART.jpg new file mode 100644 index 0000000..687b793 Binary files /dev/null and b/_bann/BANNER STEWART.jpg differ diff --git a/_bann/Banner 705.jpg b/_bann/Banner 705.jpg new file mode 100644 index 0000000..1e451d4 Binary files /dev/null and b/_bann/Banner 705.jpg differ diff --git a/_bann/Banner CONCERTINO.jpg b/_bann/Banner CONCERTINO.jpg new file mode 100644 index 0000000..8a88d0c Binary files /dev/null and b/_bann/Banner CONCERTINO.jpg differ diff --git a/_bann/Banner YAMAHA YSP.jpg b/_bann/Banner YAMAHA YSP.jpg new file mode 100644 index 0000000..55b3cb6 Binary files /dev/null and b/_bann/Banner YAMAHA YSP.jpg differ diff --git a/_bann/Banner minima Vintage.jpg b/_bann/Banner minima Vintage.jpg new file mode 100644 index 0000000..f83e9a0 Binary files /dev/null and b/_bann/Banner minima Vintage.jpg differ diff --git a/_bann/CONSULTAR PRECIOS.jpg b/_bann/CONSULTAR PRECIOS.jpg new file mode 100644 index 0000000..46d23b6 Binary files /dev/null and b/_bann/CONSULTAR PRECIOS.jpg differ diff --git a/_bann/Cambridge Solo.jpg b/_bann/Cambridge Solo.jpg new file mode 100644 index 0000000..8991c9e Binary files /dev/null and b/_bann/Cambridge Solo.jpg differ diff --git a/_bann/DALI.jpg b/_bann/DALI.jpg new file mode 100644 index 0000000..205d604 Binary files /dev/null and b/_bann/DALI.jpg differ diff --git a/_bann/EPSON-TW2000-2.gif b/_bann/EPSON-TW2000-2.gif new file mode 100644 index 0000000..1046f9d Binary files /dev/null and b/_bann/EPSON-TW2000-2.gif differ diff --git a/_bann/EPSON-TW2000.gif b/_bann/EPSON-TW2000.gif new file mode 100644 index 0000000..81507b0 Binary files /dev/null and b/_bann/EPSON-TW2000.gif differ diff --git a/_bann/JVC LIQ.jpg b/_bann/JVC LIQ.jpg new file mode 100644 index 0000000..ebf1414 Binary files /dev/null and b/_bann/JVC LIQ.jpg differ diff --git a/_bann/JVC LIQUam.jpg b/_bann/JVC LIQUam.jpg new file mode 100644 index 0000000..33bf124 Binary files /dev/null and b/_bann/JVC LIQUam.jpg differ diff --git a/_bann/Naim HDX.jpg b/_bann/Naim HDX.jpg new file mode 100644 index 0000000..24d2a3d Binary files /dev/null and b/_bann/Naim HDX.jpg differ diff --git a/_bann/Nait XS.jpg b/_bann/Nait XS.jpg new file mode 100644 index 0000000..3cefc04 Binary files /dev/null and b/_bann/Nait XS.jpg differ diff --git a/_bann/OFERTA CABLES.jpg b/_bann/OFERTA CABLES.jpg new file mode 100644 index 0000000..49e3dca Binary files /dev/null and b/_bann/OFERTA CABLES.jpg differ diff --git a/_bann/OFERTA PARADIGM.jpg b/_bann/OFERTA PARADIGM.jpg new file mode 100644 index 0000000..f0721a4 Binary files /dev/null and b/_bann/OFERTA PARADIGM.jpg differ diff --git a/_bann/OFERTA PIONEER CON LX51.jpg b/_bann/OFERTA PIONEER CON LX51.jpg new file mode 100644 index 0000000..dfd8f39 Binary files /dev/null and b/_bann/OFERTA PIONEER CON LX51.jpg differ diff --git a/_bann/Paradigm vertical.jpg b/_bann/Paradigm vertical.jpg new file mode 100644 index 0000000..33ffe09 Binary files /dev/null and b/_bann/Paradigm vertical.jpg differ diff --git a/_bann/SIGNATURE DIAMOND.jpg b/_bann/SIGNATURE DIAMOND.jpg new file mode 100644 index 0000000..3e036bf Binary files /dev/null and b/_bann/SIGNATURE DIAMOND.jpg differ diff --git a/_bann/SONUS FABER TOY.jpg b/_bann/SONUS FABER TOY.jpg new file mode 100644 index 0000000..497faa8 Binary files /dev/null and b/_bann/SONUS FABER TOY.jpg differ diff --git a/_bann/TANGENT NET200.jpg b/_bann/TANGENT NET200.jpg new file mode 100644 index 0000000..2000409 Binary files /dev/null and b/_bann/TANGENT NET200.jpg differ diff --git a/_bann/arcamsmall.gif b/_bann/arcamsmall.gif new file mode 100644 index 0000000..6b9b025 Binary files /dev/null and b/_bann/arcamsmall.gif differ diff --git a/_bann/audioquestsmall.gif b/_bann/audioquestsmall.gif new file mode 100644 index 0000000..05b2184 Binary files /dev/null and b/_bann/audioquestsmall.gif differ diff --git a/_bann/banner EUFONIA MS4.jpg b/_bann/banner EUFONIA MS4.jpg new file mode 100644 index 0000000..427b894 Binary files /dev/null and b/_bann/banner EUFONIA MS4.jpg differ diff --git a/_bann/banner epson tw2000.jpg b/_bann/banner epson tw2000.jpg new file mode 100644 index 0000000..b7ba285 Binary files /dev/null and b/_bann/banner epson tw2000.jpg differ diff --git a/_bann/banner.png b/_bann/banner.png new file mode 100644 index 0000000..a99e437 Binary files /dev/null and b/_bann/banner.png differ diff --git a/_bann/bannerarcam.gif b/_bann/bannerarcam.gif new file mode 100644 index 0000000..758cd65 Binary files /dev/null and b/_bann/bannerarcam.gif differ diff --git a/_bann/banneraudioquest.gif b/_bann/banneraudioquest.gif new file mode 100644 index 0000000..7ca18aa Binary files /dev/null and b/_bann/banneraudioquest.gif differ diff --git a/_bann/instalaciones.jpg b/_bann/instalaciones.jpg new file mode 100644 index 0000000..fb0b8e8 Binary files /dev/null and b/_bann/instalaciones.jpg differ diff --git a/_bann/marantz.jpg b/_bann/marantz.jpg new file mode 100644 index 0000000..6c571db Binary files /dev/null and b/_bann/marantz.jpg differ diff --git a/_bann/novedades.jpg b/_bann/novedades.jpg new file mode 100644 index 0000000..33f7b87 Binary files /dev/null and b/_bann/novedades.jpg differ diff --git a/_bann/ocasion.jpg b/_bann/ocasion.jpg new file mode 100644 index 0000000..2f468ae Binary files /dev/null and b/_bann/ocasion.jpg differ diff --git a/_bann/oferta.png b/_bann/oferta.png new file mode 100644 index 0000000..a268e3b Binary files /dev/null and b/_bann/oferta.png differ diff --git a/_bann/oferta2.png b/_bann/oferta2.png new file mode 100644 index 0000000..cd2f019 Binary files /dev/null and b/_bann/oferta2.png differ diff --git a/_bann/panasonic 58.jpg b/_bann/panasonic 58.jpg new file mode 100644 index 0000000..1edc9d9 Binary files /dev/null and b/_bann/panasonic 58.jpg differ diff --git a/_bann/pioneer zona centro arriba.jpg b/_bann/pioneer zona centro arriba.jpg new file mode 100644 index 0000000..aaaee4d Binary files /dev/null and b/_bann/pioneer zona centro arriba.jpg differ diff --git a/_bann/pioneer zona centro.jpg b/_bann/pioneer zona centro.jpg new file mode 100644 index 0000000..f10118d Binary files /dev/null and b/_bann/pioneer zona centro.jpg differ diff --git a/_bann/topClave.jpg b/_bann/topClave.jpg new file mode 100644 index 0000000..329e6c8 Binary files /dev/null and b/_bann/topClave.jpg differ diff --git a/_bann/topHome.jpg b/_bann/topHome.jpg new file mode 100644 index 0000000..05be233 Binary files /dev/null and b/_bann/topHome.jpg differ diff --git a/_bann/topHome2.jpg b/_bann/topHome2.jpg new file mode 100644 index 0000000..5097d76 Binary files /dev/null and b/_bann/topHome2.jpg differ diff --git a/_bann/topHome3.jpg b/_bann/topHome3.jpg new file mode 100644 index 0000000..2248ee0 Binary files /dev/null and b/_bann/topHome3.jpg differ diff --git a/_bann/topLear.jpg b/_bann/topLear.jpg new file mode 100644 index 0000000..34e9084 Binary files /dev/null and b/_bann/topLear.jpg differ diff --git a/_bann/topLearn.jpg b/_bann/topLearn.jpg new file mode 100644 index 0000000..34e9084 Binary files /dev/null and b/_bann/topLearn.jpg differ diff --git a/_bann/topTienda.jpg b/_bann/topTienda.jpg new file mode 100644 index 0000000..dccee84 Binary files /dev/null and b/_bann/topTienda.jpg differ diff --git a/_bann/tvloewe.jpg b/_bann/tvloewe.jpg new file mode 100644 index 0000000..1309950 Binary files /dev/null and b/_bann/tvloewe.jpg differ diff --git a/_config.php b/_config.php new file mode 100644 index 0000000..3f656eb --- /dev/null +++ b/_config.php @@ -0,0 +1,27 @@ + \ No newline at end of file diff --git a/_imgs/Thumbs.db b/_imgs/Thumbs.db new file mode 100644 index 0000000..1f59414 Binary files /dev/null and b/_imgs/Thumbs.db differ diff --git a/_imgs/Untitled-1.gif b/_imgs/Untitled-1.gif new file mode 100644 index 0000000..196d9ff Binary files /dev/null and b/_imgs/Untitled-1.gif differ diff --git a/_imgs/banda.png b/_imgs/banda.png new file mode 100644 index 0000000..d4dacd0 Binary files /dev/null and b/_imgs/banda.png differ diff --git a/_imgs/cart3.gif b/_imgs/cart3.gif new file mode 100644 index 0000000..2c8b677 Binary files /dev/null and b/_imgs/cart3.gif differ diff --git a/_imgs/compra.gif b/_imgs/compra.gif new file mode 100644 index 0000000..9737230 Binary files /dev/null and b/_imgs/compra.gif differ diff --git a/_imgs/compram.gif b/_imgs/compram.gif new file mode 100644 index 0000000..aa96eaa Binary files /dev/null and b/_imgs/compram.gif differ diff --git a/_imgs/comprb.gif b/_imgs/comprb.gif new file mode 100644 index 0000000..27ca451 Binary files /dev/null and b/_imgs/comprb.gif differ diff --git a/_imgs/comprbm.gif b/_imgs/comprbm.gif new file mode 100644 index 0000000..277e790 Binary files /dev/null and b/_imgs/comprbm.gif differ diff --git a/_imgs/crnr.gif b/_imgs/crnr.gif new file mode 100644 index 0000000..f7a449c Binary files /dev/null and b/_imgs/crnr.gif differ diff --git a/_imgs/curio.jpg b/_imgs/curio.jpg new file mode 100644 index 0000000..b3f0b24 Binary files /dev/null and b/_imgs/curio.jpg differ diff --git a/_imgs/d.gif b/_imgs/d.gif new file mode 100644 index 0000000..e115038 Binary files /dev/null and b/_imgs/d.gif differ diff --git a/_imgs/dotsblue.png b/_imgs/dotsblue.png new file mode 100644 index 0000000..a7912ae Binary files /dev/null and b/_imgs/dotsblue.png differ diff --git a/_imgs/g.gif b/_imgs/g.gif new file mode 100644 index 0000000..196d9ff Binary files /dev/null and b/_imgs/g.gif differ diff --git a/_imgs/gog.gif b/_imgs/gog.gif new file mode 100644 index 0000000..f8caa11 Binary files /dev/null and b/_imgs/gog.gif differ diff --git a/_imgs/gom.gif b/_imgs/gom.gif new file mode 100644 index 0000000..e383383 Binary files /dev/null and b/_imgs/gom.gif differ diff --git a/_imgs/gow.gif b/_imgs/gow.gif new file mode 100644 index 0000000..26ffe1a Binary files /dev/null and b/_imgs/gow.gif differ diff --git a/_imgs/logo.gif b/_imgs/logo.gif new file mode 100644 index 0000000..fdde873 Binary files /dev/null and b/_imgs/logo.gif differ diff --git a/_imgs/logo100.gif b/_imgs/logo100.gif new file mode 100644 index 0000000..a8bd5b6 Binary files /dev/null and b/_imgs/logo100.gif differ diff --git a/_imgs/logo_mail.gif b/_imgs/logo_mail.gif new file mode 100644 index 0000000..289d402 Binary files /dev/null and b/_imgs/logo_mail.gif differ diff --git a/_imgs/logono.gif b/_imgs/logono.gif new file mode 100644 index 0000000..5dfc3f0 Binary files /dev/null and b/_imgs/logono.gif differ diff --git a/_imgs/marc8A.png b/_imgs/marc8A.png new file mode 100644 index 0000000..b20dc61 Binary files /dev/null and b/_imgs/marc8A.png differ diff --git a/_imgs/marc8B.png b/_imgs/marc8B.png new file mode 100644 index 0000000..0379c30 Binary files /dev/null and b/_imgs/marc8B.png differ diff --git a/_imgs/marcA.png b/_imgs/marcA.png new file mode 100644 index 0000000..ceab6d9 Binary files /dev/null and b/_imgs/marcA.png differ diff --git a/_imgs/marcB.png b/_imgs/marcB.png new file mode 100644 index 0000000..d2c9d52 Binary files /dev/null and b/_imgs/marcB.png differ diff --git a/_imgs/marco.png b/_imgs/marco.png new file mode 100644 index 0000000..3b666f4 Binary files /dev/null and b/_imgs/marco.png differ diff --git a/_imgs/mask86.png b/_imgs/mask86.png new file mode 100644 index 0000000..085002d Binary files /dev/null and b/_imgs/mask86.png differ diff --git a/_imgs/menu_contactA.gif b/_imgs/menu_contactA.gif new file mode 100644 index 0000000..bcbc8f7 Binary files /dev/null and b/_imgs/menu_contactA.gif differ diff --git a/_imgs/menu_contactB.gif b/_imgs/menu_contactB.gif new file mode 100644 index 0000000..42a853f Binary files /dev/null and b/_imgs/menu_contactB.gif differ diff --git a/_imgs/menu_homeA.gif b/_imgs/menu_homeA.gif new file mode 100644 index 0000000..029bac8 Binary files /dev/null and b/_imgs/menu_homeA.gif differ diff --git a/_imgs/menu_homeB.gif b/_imgs/menu_homeB.gif new file mode 100644 index 0000000..f3ad68b Binary files /dev/null and b/_imgs/menu_homeB.gif differ diff --git a/_imgs/menu_instA.gif b/_imgs/menu_instA.gif new file mode 100644 index 0000000..63a4674 Binary files /dev/null and b/_imgs/menu_instA.gif differ diff --git a/_imgs/menu_instB.gif b/_imgs/menu_instB.gif new file mode 100644 index 0000000..2577153 Binary files /dev/null and b/_imgs/menu_instB.gif differ diff --git a/_imgs/menu_learningA.gif b/_imgs/menu_learningA.gif new file mode 100644 index 0000000..f5ef74d Binary files /dev/null and b/_imgs/menu_learningA.gif differ diff --git a/_imgs/menu_learningB.gif b/_imgs/menu_learningB.gif new file mode 100644 index 0000000..77481f6 Binary files /dev/null and b/_imgs/menu_learningB.gif differ diff --git a/_imgs/menu_newsA.gif b/_imgs/menu_newsA.gif new file mode 100644 index 0000000..ef2b6d8 Binary files /dev/null and b/_imgs/menu_newsA.gif differ diff --git a/_imgs/menu_newsB.gif b/_imgs/menu_newsB.gif new file mode 100644 index 0000000..4389767 Binary files /dev/null and b/_imgs/menu_newsB.gif differ diff --git a/_imgs/menu_sep.gif b/_imgs/menu_sep.gif new file mode 100644 index 0000000..902f5ed Binary files /dev/null and b/_imgs/menu_sep.gif differ diff --git a/_imgs/menu_storeA.gif b/_imgs/menu_storeA.gif new file mode 100644 index 0000000..ae75772 Binary files /dev/null and b/_imgs/menu_storeA.gif differ diff --git a/_imgs/menu_storeB.gif b/_imgs/menu_storeB.gif new file mode 100644 index 0000000..7bb8c17 Binary files /dev/null and b/_imgs/menu_storeB.gif differ diff --git a/_imgs/menu_top.gif b/_imgs/menu_top.gif new file mode 100644 index 0000000..a9af806 Binary files /dev/null and b/_imgs/menu_top.gif differ diff --git a/_imgs/menu_whoA.gif b/_imgs/menu_whoA.gif new file mode 100644 index 0000000..68cbc5f Binary files /dev/null and b/_imgs/menu_whoA.gif differ diff --git a/_imgs/menu_whoB.gif b/_imgs/menu_whoB.gif new file mode 100644 index 0000000..264c043 Binary files /dev/null and b/_imgs/menu_whoB.gif differ diff --git a/_imgs/mtlo.gif b/_imgs/mtlo.gif new file mode 100644 index 0000000..11bb1e6 Binary files /dev/null and b/_imgs/mtlo.gif differ diff --git a/_imgs/mtly.gif b/_imgs/mtly.gif new file mode 100644 index 0000000..aa5b33f Binary files /dev/null and b/_imgs/mtly.gif differ diff --git a/_imgs/novetit.gif b/_imgs/novetit.gif new file mode 100644 index 0000000..e4eb95b Binary files /dev/null and b/_imgs/novetit.gif differ diff --git a/_imgs/premio1999.gif b/_imgs/premio1999.gif new file mode 100644 index 0000000..f6e3131 Binary files /dev/null and b/_imgs/premio1999.gif differ diff --git a/_imgs/premio2000.gif b/_imgs/premio2000.gif new file mode 100644 index 0000000..03fb235 Binary files /dev/null and b/_imgs/premio2000.gif differ diff --git a/_imgs/premio2001.gif b/_imgs/premio2001.gif new file mode 100644 index 0000000..b801ef1 Binary files /dev/null and b/_imgs/premio2001.gif differ diff --git a/_imgs/premio2007.png b/_imgs/premio2007.png new file mode 100644 index 0000000..fab7464 Binary files /dev/null and b/_imgs/premio2007.png differ diff --git a/_imgs/premio2008.png b/_imgs/premio2008.png new file mode 100644 index 0000000..2286ae0 Binary files /dev/null and b/_imgs/premio2008.png differ diff --git a/_imgs/ptos.gif b/_imgs/ptos.gif new file mode 100644 index 0000000..9a4135e Binary files /dev/null and b/_imgs/ptos.gif differ diff --git a/_imgs/ptoshb.gif b/_imgs/ptoshb.gif new file mode 100644 index 0000000..e915f51 Binary files /dev/null and b/_imgs/ptoshb.gif differ diff --git a/_imgs/ptoshb6.gif b/_imgs/ptoshb6.gif new file mode 100644 index 0000000..5f937ba Binary files /dev/null and b/_imgs/ptoshb6.gif differ diff --git a/_imgs/ptoshg.gif b/_imgs/ptoshg.gif new file mode 100644 index 0000000..7186a2c Binary files /dev/null and b/_imgs/ptoshg.gif differ diff --git a/_imgs/ptoshg6.gif b/_imgs/ptoshg6.gif new file mode 100644 index 0000000..b1b6fc4 Binary files /dev/null and b/_imgs/ptoshg6.gif differ diff --git a/_imgs/ptosho.gif b/_imgs/ptosho.gif new file mode 100644 index 0000000..14a245f Binary files /dev/null and b/_imgs/ptosho.gif differ diff --git a/_imgs/ptosvb.gif b/_imgs/ptosvb.gif new file mode 100644 index 0000000..66fc4b4 Binary files /dev/null and b/_imgs/ptosvb.gif differ diff --git a/_imgs/quien1.jpg b/_imgs/quien1.jpg new file mode 100644 index 0000000..ab65f74 Binary files /dev/null and b/_imgs/quien1.jpg differ diff --git a/_imgs/quien3.jpg b/_imgs/quien3.jpg new file mode 100644 index 0000000..868aced Binary files /dev/null and b/_imgs/quien3.jpg differ diff --git a/_imgs/quien4.jpg b/_imgs/quien4.jpg new file mode 100644 index 0000000..3483ca1 Binary files /dev/null and b/_imgs/quien4.jpg differ diff --git a/_imgs/quien5.jpg b/_imgs/quien5.jpg new file mode 100644 index 0000000..9cee34e Binary files /dev/null and b/_imgs/quien5.jpg differ diff --git a/_imgs/quienesCinco.jpg b/_imgs/quienesCinco.jpg new file mode 100644 index 0000000..eec421c Binary files /dev/null and b/_imgs/quienesCinco.jpg differ diff --git a/_imgs/quienesCuatro.jpg b/_imgs/quienesCuatro.jpg new file mode 100644 index 0000000..bcf233a Binary files /dev/null and b/_imgs/quienesCuatro.jpg differ diff --git a/_imgs/quienesDos.jpg b/_imgs/quienesDos.jpg new file mode 100644 index 0000000..837783c Binary files /dev/null and b/_imgs/quienesDos.jpg differ diff --git a/_imgs/quienesTres.jpg b/_imgs/quienesTres.jpg new file mode 100644 index 0000000..1acd107 Binary files /dev/null and b/_imgs/quienesTres.jpg differ diff --git a/_imgs/quienesUno.jpg b/_imgs/quienesUno.jpg new file mode 100644 index 0000000..8f7443f Binary files /dev/null and b/_imgs/quienesUno.jpg differ diff --git a/_imgs/sombra.gif b/_imgs/sombra.gif new file mode 100644 index 0000000..f9881ae Binary files /dev/null and b/_imgs/sombra.gif differ diff --git a/_imgs/tienda00.gif b/_imgs/tienda00.gif new file mode 100644 index 0000000..3c71d4d Binary files /dev/null and b/_imgs/tienda00.gif differ diff --git a/_imgs/tienda01.jpg b/_imgs/tienda01.jpg new file mode 100644 index 0000000..4a88621 Binary files /dev/null and b/_imgs/tienda01.jpg differ diff --git a/_imgs/tiendathumb.jpg b/_imgs/tiendathumb.jpg new file mode 100644 index 0000000..a89f2b3 Binary files /dev/null and b/_imgs/tiendathumb.jpg differ diff --git a/_imgs/tiendatit.gif b/_imgs/tiendatit.gif new file mode 100644 index 0000000..3a20679 Binary files /dev/null and b/_imgs/tiendatit.gif differ diff --git a/_imgs/titCart.gif b/_imgs/titCart.gif new file mode 100644 index 0000000..689eda8 Binary files /dev/null and b/_imgs/titCart.gif differ diff --git a/_imgs/titCurio.gif b/_imgs/titCurio.gif new file mode 100644 index 0000000..4d3457c Binary files /dev/null and b/_imgs/titCurio.gif differ diff --git a/_imgs/titCuriosidades.gif b/_imgs/titCuriosidades.gif new file mode 100644 index 0000000..c598d86 Binary files /dev/null and b/_imgs/titCuriosidades.gif differ diff --git a/_imgs/titFaq.gif b/_imgs/titFaq.gif new file mode 100644 index 0000000..450a1ff Binary files /dev/null and b/_imgs/titFaq.gif differ diff --git a/_imgs/titInstalaciones.gif b/_imgs/titInstalaciones.gif new file mode 100644 index 0000000..6c9e09f Binary files /dev/null and b/_imgs/titInstalaciones.gif differ diff --git a/_imgs/titLearn.gif b/_imgs/titLearn.gif new file mode 100644 index 0000000..b2aac99 Binary files /dev/null and b/_imgs/titLearn.gif differ diff --git a/_imgs/titLearning.gif b/_imgs/titLearning.gif new file mode 100644 index 0000000..03ac92d Binary files /dev/null and b/_imgs/titLearning.gif differ diff --git a/_imgs/titLegal.gif b/_imgs/titLegal.gif new file mode 100644 index 0000000..5ea56ae Binary files /dev/null and b/_imgs/titLegal.gif differ diff --git a/_imgs/titMarcas.gif b/_imgs/titMarcas.gif new file mode 100644 index 0000000..6e49111 Binary files /dev/null and b/_imgs/titMarcas.gif differ diff --git a/_imgs/titNotiB.gif b/_imgs/titNotiB.gif new file mode 100644 index 0000000..f795a21 Binary files /dev/null and b/_imgs/titNotiB.gif differ diff --git a/_imgs/titNotiW.gif b/_imgs/titNotiW.gif new file mode 100644 index 0000000..9096a61 Binary files /dev/null and b/_imgs/titNotiW.gif differ diff --git a/_imgs/titNove.gif b/_imgs/titNove.gif new file mode 100644 index 0000000..d2ba0d8 Binary files /dev/null and b/_imgs/titNove.gif differ diff --git a/_imgs/titNovedades.gif b/_imgs/titNovedades.gif new file mode 100644 index 0000000..3c60b73 Binary files /dev/null and b/_imgs/titNovedades.gif differ diff --git a/_imgs/titOfertas.gif b/_imgs/titOfertas.gif new file mode 100644 index 0000000..615adc0 Binary files /dev/null and b/_imgs/titOfertas.gif differ diff --git a/_imgs/titPedido.gif b/_imgs/titPedido.gif new file mode 100644 index 0000000..0d4a690 Binary files /dev/null and b/_imgs/titPedido.gif differ diff --git a/_imgs/titQuienes.gif b/_imgs/titQuienes.gif new file mode 100644 index 0000000..01abe11 Binary files /dev/null and b/_imgs/titQuienes.gif differ diff --git a/_imgs/titRecom.gif b/_imgs/titRecom.gif new file mode 100644 index 0000000..b8b6d8b Binary files /dev/null and b/_imgs/titRecom.gif differ diff --git a/_imgs/titSearch.gif b/_imgs/titSearch.gif new file mode 100644 index 0000000..fe0c70d Binary files /dev/null and b/_imgs/titSearch.gif differ diff --git a/_imgs/titTienda.gif b/_imgs/titTienda.gif new file mode 100644 index 0000000..dba9aa5 Binary files /dev/null and b/_imgs/titTienda.gif differ diff --git a/_imgs/titTiendaMain.gif b/_imgs/titTiendaMain.gif new file mode 100644 index 0000000..388b98c Binary files /dev/null and b/_imgs/titTiendaMain.gif differ diff --git a/_imgs/tit_notiw.gif b/_imgs/tit_notiw.gif new file mode 100644 index 0000000..950254b Binary files /dev/null and b/_imgs/tit_notiw.gif differ diff --git a/_imgs/zonab.gif b/_imgs/zonab.gif new file mode 100644 index 0000000..4617655 Binary files /dev/null and b/_imgs/zonab.gif differ diff --git a/_imgs/zonatab1a.gif b/_imgs/zonatab1a.gif new file mode 100644 index 0000000..c88d0c6 Binary files /dev/null and b/_imgs/zonatab1a.gif differ diff --git a/_imgs/zonatab1b.gif b/_imgs/zonatab1b.gif new file mode 100644 index 0000000..e1cab54 Binary files /dev/null and b/_imgs/zonatab1b.gif differ diff --git a/_imgs/zonatab2a.gif b/_imgs/zonatab2a.gif new file mode 100644 index 0000000..ca3fb96 Binary files /dev/null and b/_imgs/zonatab2a.gif differ diff --git a/_imgs/zonatab2b.gif b/_imgs/zonatab2b.gif new file mode 100644 index 0000000..6e48b27 Binary files /dev/null and b/_imgs/zonatab2b.gif differ diff --git a/_imgs/zonatit.gif b/_imgs/zonatit.gif new file mode 100644 index 0000000..85d90a7 Binary files /dev/null and b/_imgs/zonatit.gif differ diff --git a/_incl/bania.php b/_incl/bania.php new file mode 100644 index 0000000..6049e7a --- /dev/null +++ b/_incl/bania.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/_incl/banners.css b/_incl/banners.css new file mode 100644 index 0000000..29c0aba --- /dev/null +++ b/_incl/banners.css @@ -0,0 +1,155 @@ +.oferta { + width: 320px; + height: 110px; + overflow: hidden; + margin:0; +} + +.oferta_foto { + overflow: hidden; + width: 160px; + height: 110px; +} + +.oferta_marca { + font-family: Arial, Helvetica, sans-serif; + font-size: 10px; + text-transform: uppercase; + line-height: 10px; +} + +.oferta_modelo { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} + +.oferta_precio { + font-family: "Times New Roman", Times, serif; + position: relative; + font-size: 36px; + color: #CB2C54; + font-weight: normal; + top: 12px; +} + +.oferta_texto { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + position: relative; + top: 14px; +} + +.lmod { + color: #000000; + text-decoration: none; +} + +a.lmod:hover { + color: #FF3300; + text-decoration: underline; +} + +.destacado { + overflow: hidden; + height: 140px; + width: 528px; + padding-top: 6px; +} + +.destacado_logo { + overflow: hidden; + position: relative; + width: 186px; + height: 42px; +} + +.destacado_foto { + overflow: hidden; + position: relative; + width: 247px; + height: 95px; +} + +.destacado_tipo { + font-family: Arial, Helvetica, sans-serif; + font-size: 10px; + text-transform: uppercase; + line-height: 10px; + position: relative; + top: 6px; +} + +.destacado_datos { + float: right; + position: relative; + overflow: hidden; + height: 150px; + width: 247px; + padding-left: 12px; + padding-top: 6px; +} + +.destacado_modelo { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 15px; + font-weight: bold; + position: relative; + top: 6px; +} + +.destacado_precio { + font-family: "Times New Roman", Times, serif; + font-size: 36px; + color: #CB2C54; + font-weight: normal; + position: relative; + top: 2px; +} + +.destacado_texto { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + position: relative; +} + +.destacado_linea { + width: 279px; + height: 12px; + position: relative; + background: url(_imgs/ptoshb.gif); +} + + +.ofertav { + overflow: hidden; + height: 160px; + width: 168px; +} + +.ofertav_foto { + overflow: hidden; + width: 155px; + height: 95px; +} + +.ofertav_marca { + font-family: Arial, Helvetica, sans-serif; + font-size: 9px; + text-transform: uppercase; + line-height: 9px; +} + +.ofertav_modelo { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} + +.ofertav_precio { + font-family: "Times New Roman", Times, serif; + position: relative; + font-size: 30px; + color: #CB2C54; + font-weight: normal; +} diff --git a/_incl/buscaProducto.php b/_incl/buscaProducto.php new file mode 100644 index 0000000..81029f2 --- /dev/null +++ b/_incl/buscaProducto.php @@ -0,0 +1,32 @@ +// buscar productos + +$buscar = ''; +$orden = ''; +if(strlen($marca)) { + $buscar .= 'AND prod_fab_id ' . $marca; + $orden = 'BY prod_categoria_id'; + if(strlen($categoria)) { + $buscar .= ' AND cat_codigo ' . $categoria; + $orden = 'BY prod_modelo'; + } +} else { + if(strlen($categoria)) { + $buscar .= 'AND cat_codigo ' . $categoria; + $orden = 'BY fab_nombre'; + } +} + + +// aqui tengo que buscar cuando prod_modelo contenga la cadena $modelo +if(strlen($modelo)) { + + +} + +$query = 'SELECT prod_codigo, prod_modelo, prod_precio, fab_nombre, cat_nombre '; +$query .= 'FROM shoop_productos, shoop_fabricantes, shoop_categorias '; +$query .= 'WHERE prod_fab_id=fab_id AND cat_codigo=prod_categoria_id '; +$query .= $buscar . ' ' . $orden; + + + diff --git a/_incl/ca.css b/_incl/ca.css new file mode 100644 index 0000000..acbbad5 --- /dev/null +++ b/_incl/ca.css @@ -0,0 +1,160 @@ +@import url("linkMenu.css"); + +body { + margin-left: 0px; + margin-top: 0px; + margin-right: 0px; + margin-bottom: 0px; +} + +/* +a { + text-decoration: none; +} + +a:image { border-bottom: 0; } +a.image { border-bottom: 0; } + +a:link { + color: #006699; + text-decoration: none; + border-bottom: 1px dashed; + background-color: transparent; +} + +a:visited { + color: #808080; + text-decoration: none; + background-color: transparent; +} + +a:hover { + color: #0033FF; + text-decoration: none; + border-bottom: 1px dashed; + background-color: transparent; +} +*/ + +.t1 { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; +} + +.t1y { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + background-color: #FFE347; +} + +.t1b { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + background-color: #4FA6F2; +} + +.pie { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + color: #7A706A; +} + +.tit{font: bold 12px Verdana, Arial, Helvetica, sans-serif;color:#7a706a;} +.nueve{font-size: 9px;} +.trece{font-size: 13px;} +.mas{font: bold 10px Verdana, Arial, Helvetica, sans-serif;color: #00aeef;text-decoration: none;} +.mas:hover{color:blue;text-decoration:underline;} +.banner01{overflow:hidden;height:144px;width:348px;margin-bottom:6px;} + +.parr, p { + font-family: Georgia, "Times New Roman", Times, serif; + font-size: 11px; +} + +.seccion { + font-family: Arial, Helvetica, sans-serif; + font-size: 11px; + color: #424242; +} + +.error { + font-family: Arial, Helvetica, sans-serif; + font-size: 12px; + font-weight: bold; + color: #FF0000; +} + +.upper { + text-transform: uppercase; +} + +.lista { + font-family: Georgia, "Times New Roman", Times, serif; + font-size: 10px; + list-style-position: outside; + list-style-type: circle; +} + +.minilink { + font-weight: bold; + color: #000000; + text-decoration: none; +} + +.pielink { + color: #7A706A; + text-decoration: none; +} + +.menu1 { + font-family: Arial, Helvetica, sans-serif; + font-size: 11px; + text-decoration: none; + color: #424242; + margin-bottom: 6px; + padding-top: 3px; +} + +.menu1:hover{ + border-bottom: 1px solid #CD0000; +} + +.euro { + font-size: 24px; + font-family: Verdana, Arial, Helvetica, sans-serif; + color: #ACADB0; + font-weight: normal; +} + +.azul{color: #00539D;} +.title{font:bold 16px Verdana, Arial, sans-serif;padding:8px;} +.mini{ + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 9px; + color: #333333; + text-decoration: none; +} + +.mas:hover, .minilink:hover, .pielink:hover, .mini:hover { + color: #FF3300; + text-decoration: none; + border-bottom: 1px dashed; +} + +.capi { + font-size: 16px; + color: #FF6600; + font-weight: bold; +} + +.qa { + margin-top: 6px; + margin-left: 6px; + padding-left: 6px; + + font-family: Arial, Helvetica, sans-serif; + font-size: 11px; +} + +.sombra{background: #FFFFFF url(../_imgs/sombra.gif) repeat-x} + diff --git a/_incl/carrito.css b/_incl/carrito.css new file mode 100644 index 0000000..d2915fc --- /dev/null +++ b/_incl/carrito.css @@ -0,0 +1,4 @@ +.labels {font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; font-size: 11px; color: #000000; text-decoration: none} +.producto {font-family: Arial, Helvetica, sans-serif; font-weight: normal; font-size: 12px; padding-left: 6px} +.euro {font-family: Arial, Helvetica, sans-serif; font-size: 12px;} +.precio {font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; font-size: 13px; color: #006699;} diff --git a/_incl/class.phpmailer.php b/_incl/class.phpmailer.php new file mode 100644 index 0000000..969ca8f --- /dev/null +++ b/_incl/class.phpmailer.php @@ -0,0 +1,1496 @@ +ContentType = "text/html"; + else + $this->ContentType = "text/plain"; + } + + /** + * Sets Mailer to send message using SMTP. + * @return void + */ + function IsSMTP() { + $this->Mailer = "smtp"; + } + + /** + * Sets Mailer to send message using PHP mail() function. + * @return void + */ + function IsMail() { + $this->Mailer = "mail"; + } + + /** + * Sets Mailer to send message using the $Sendmail program. + * @return void + */ + function IsSendmail() { + $this->Mailer = "sendmail"; + } + + /** + * Sets Mailer to send message using the qmail MTA. + * @return void + */ + function IsQmail() { + $this->Sendmail = "/var/qmail/bin/sendmail"; + $this->Mailer = "sendmail"; + } + + + ///////////////////////////////////////////////// + // RECIPIENT METHODS + ///////////////////////////////////////////////// + + /** + * Adds a "To" address. + * @param string $address + * @param string $name + * @return void + */ + function AddAddress($address, $name = "") { + $cur = count($this->to); + $this->to[$cur][0] = trim($address); + $this->to[$cur][1] = $name; + } + + /** + * Adds a "Cc" address. Note: this function works + * with the SMTP mailer on win32, not with the "mail" + * mailer. + * @param string $address + * @param string $name + * @return void + */ + function AddCC($address, $name = "") { + $cur = count($this->cc); + $this->cc[$cur][0] = trim($address); + $this->cc[$cur][1] = $name; + } + + /** + * Adds a "Bcc" address. Note: this function works + * with the SMTP mailer on win32, not with the "mail" + * mailer. + * @param string $address + * @param string $name + * @return void + */ + function AddBCC($address, $name = "") { + $cur = count($this->bcc); + $this->bcc[$cur][0] = trim($address); + $this->bcc[$cur][1] = $name; + } + + /** + * Adds a "Reply-to" address. + * @param string $address + * @param string $name + * @return void + */ + function AddReplyTo($address, $name = "") { + $cur = count($this->ReplyTo); + $this->ReplyTo[$cur][0] = trim($address); + $this->ReplyTo[$cur][1] = $name; + } + + + ///////////////////////////////////////////////// + // MAIL SENDING METHODS + ///////////////////////////////////////////////// + + /** + * Creates message and assigns Mailer. If the message is + * not sent successfully then it returns false. Use the ErrorInfo + * variable to view description of the error. + * @return bool + */ + function Send() { + $header = ""; + $body = ""; + $result = true; + + if((count($this->to) + count($this->cc) + count($this->bcc)) < 1) + { + $this->SetError($this->Lang("provide_address")); + return false; + } + + // Set whether the message is multipart/alternative + if(!empty($this->AltBody)) + $this->ContentType = "multipart/alternative"; + + $this->error_count = 0; // reset errors + $this->SetMessageType(); + $header .= $this->CreateHeader(); + $body = $this->CreateBody(); + + if($body == "") { return false; } + + // Choose the mailer + switch($this->Mailer) + { + case "sendmail": + $result = $this->SendmailSend($header, $body); + break; + case "mail": + $result = $this->MailSend($header, $body); + break; + case "smtp": + $result = $this->SmtpSend($header, $body); + break; + default: + $this->SetError($this->Mailer . $this->Lang("mailer_not_supported")); + $result = false; + break; + } + + return $result; + } + + /** + * Sends mail using the $Sendmail program. + * @access private + * @return bool + */ + function SendmailSend($header, $body) { + if ($this->Sender != "") + $sendmail = sprintf("%s -oi -f %s -t", $this->Sendmail, $this->Sender); + else + $sendmail = sprintf("%s -oi -t", $this->Sendmail); + + if(!@$mail = popen($sendmail, "w")) + { + $this->SetError($this->Lang("execute") . $this->Sendmail); + return false; + } + + fputs($mail, $header); + fputs($mail, $body); + + $result = pclose($mail) >> 8 & 0xFF; + if($result != 0) + { + $this->SetError($this->Lang("execute") . $this->Sendmail); + return false; + } + + return true; + } + + /** + * Sends mail using the PHP mail() function. + * @access private + * @return bool + */ + function MailSend($header, $body) { + $to = ""; + for($i = 0; $i < count($this->to); $i++) + { + if($i != 0) { $to .= ", "; } + $to .= $this->to[$i][0]; + } + + if ($this->Sender != "" && strlen(ini_get("safe_mode"))< 1) + { + $old_from = ini_get("sendmail_from"); + ini_set("sendmail_from", $this->Sender); + $params = sprintf("-oi -f %s", $this->Sender); + $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, + $header, $params); + } + else + $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, $header); + + if (isset($old_from)) + ini_set("sendmail_from", $old_from); + + if(!$rt) + { + $this->SetError($this->Lang("instantiate")); + return false; + } + + return true; + } + + /** + * Sends mail via SMTP using PhpSMTP (Author: + * Chris Ryan). Returns bool. Returns false if there is a + * bad MAIL FROM, RCPT, or DATA input. + * @access private + * @return bool + */ + function SmtpSend($header, $body) { + include_once($this->PluginDir . "class.smtp.php"); + $error = ""; + $bad_rcpt = array(); + + if(!$this->SmtpConnect()) + return false; + + $smtp_from = ($this->Sender == "") ? $this->From : $this->Sender; + if(!$this->smtp->Mail($smtp_from)) + { + $error = $this->Lang("from_failed") . $smtp_from; + $this->SetError($error); + $this->smtp->Reset(); + return false; + } + + // Attempt to send attach all recipients + for($i = 0; $i < count($this->to); $i++) + { + if(!$this->smtp->Recipient($this->to[$i][0])) + $bad_rcpt[] = $this->to[$i][0]; + } + for($i = 0; $i < count($this->cc); $i++) + { + if(!$this->smtp->Recipient($this->cc[$i][0])) + $bad_rcpt[] = $this->cc[$i][0]; + } + for($i = 0; $i < count($this->bcc); $i++) + { + if(!$this->smtp->Recipient($this->bcc[$i][0])) + $bad_rcpt[] = $this->bcc[$i][0]; + } + + if(count($bad_rcpt) > 0) // Create error message + { + for($i = 0; $i < count($bad_rcpt); $i++) + { + if($i != 0) { $error .= ", "; } + $error .= $bad_rcpt[$i]; + } + $error = $this->Lang("recipients_failed") . $error; + $this->SetError($error); + $this->smtp->Reset(); + return false; + } + + if(!$this->smtp->Data($header . $body)) + { + $this->SetError($this->Lang("data_not_accepted")); + $this->smtp->Reset(); + return false; + } + if($this->SMTPKeepAlive == true) + $this->smtp->Reset(); + else + $this->SmtpClose(); + + return true; + } + + /** + * Initiates a connection to an SMTP server. Returns false if the + * operation failed. + * @access private + * @return bool + */ + function SmtpConnect() { + if($this->smtp == NULL) { $this->smtp = new SMTP(); } + + $this->smtp->do_debug = $this->SMTPDebug; + $hosts = explode(";", $this->Host); + $index = 0; + $connection = ($this->smtp->Connected()); + + // Retry while there is no connection + while($index < count($hosts) && $connection == false) + { + if(strstr($hosts[$index], ":")) + list($host, $port) = explode(":", $hosts[$index]); + else + { + $host = $hosts[$index]; + $port = $this->Port; + } + + if($this->smtp->Connect($host, $port, $this->Timeout)) + { + if ($this->Helo != '') + $this->smtp->Hello($this->Helo); + else + $this->smtp->Hello($this->ServerHostname()); + + if($this->SMTPAuth) + { + if(!$this->smtp->Authenticate($this->Username, + $this->Password)) + { + $this->SetError($this->Lang("authenticate")); + $this->smtp->Reset(); + $connection = false; + } + } + $connection = true; + } + $index++; + } + if(!$connection) + $this->SetError($this->Lang("connect_host")); + + return $connection; + } + + /** + * Closes the active SMTP session if one exists. + * @return void + */ + function SmtpClose() { + if($this->smtp != NULL) + { + if($this->smtp->Connected()) + { + $this->smtp->Quit(); + $this->smtp->Close(); + } + } + } + + /** + * Sets the language for all class error messages. Returns false + * if it cannot load the language file. The default language type + * is English. + * @param string $lang_type Type of language (e.g. Portuguese: "br") + * @param string $lang_path Path to the language file directory + * @access public + * @return bool + */ + function SetLanguage($lang_type, $lang_path = "language/") { + if(file_exists($lang_path.'phpmailer.lang-'.$lang_type.'.php')) + include($lang_path.'phpmailer.lang-'.$lang_type.'.php'); + else if(file_exists($lang_path.'phpmailer.lang-en.php')) + include($lang_path.'phpmailer.lang-en.php'); + else + { + $this->SetError("Could not load language file"); + return false; + } + $this->language = $PHPMAILER_LANG; + + return true; + } + + ///////////////////////////////////////////////// + // MESSAGE CREATION METHODS + ///////////////////////////////////////////////// + + /** + * Creates recipient headers. + * @access private + * @return string + */ + function AddrAppend($type, $addr) { + $addr_str = $type . ": "; + $addr_str .= $this->AddrFormat($addr[0]); + if(count($addr) > 1) + { + for($i = 1; $i < count($addr); $i++) + $addr_str .= ", " . $this->AddrFormat($addr[$i]); + } + $addr_str .= $this->LE; + + return $addr_str; + } + + /** + * Formats an address correctly. + * @access private + * @return string + */ + function AddrFormat($addr) { + if(empty($addr[1])) + $formatted = $addr[0]; + else + { + $formatted = $this->EncodeHeader($addr[1], 'phrase') . " <" . + $addr[0] . ">"; + } + + return $formatted; + } + + /** + * Wraps message for use with mailers that do not + * automatically perform wrapping and for quoted-printable. + * Original written by philippe. + * @access private + * @return string + */ + function WrapText($message, $length, $qp_mode = false) { + $soft_break = ($qp_mode) ? sprintf(" =%s", $this->LE) : $this->LE; + + $message = $this->FixEOL($message); + if (substr($message, -1) == $this->LE) + $message = substr($message, 0, -1); + + $line = explode($this->LE, $message); + $message = ""; + for ($i=0 ;$i < count($line); $i++) + { + $line_part = explode(" ", $line[$i]); + $buf = ""; + for ($e = 0; $e $length)) + { + $space_left = $length - strlen($buf) - 1; + if ($e != 0) + { + if ($space_left > 20) + { + $len = $space_left; + if (substr($word, $len - 1, 1) == "=") + $len--; + elseif (substr($word, $len - 2, 1) == "=") + $len -= 2; + $part = substr($word, 0, $len); + $word = substr($word, $len); + $buf .= " " . $part; + $message .= $buf . sprintf("=%s", $this->LE); + } + else + { + $message .= $buf . $soft_break; + } + $buf = ""; + } + while (strlen($word) > 0) + { + $len = $length; + if (substr($word, $len - 1, 1) == "=") + $len--; + elseif (substr($word, $len - 2, 1) == "=") + $len -= 2; + $part = substr($word, 0, $len); + $word = substr($word, $len); + + if (strlen($word) > 0) + $message .= $part . sprintf("=%s", $this->LE); + else + $buf = $part; + } + } + else + { + $buf_o = $buf; + $buf .= ($e == 0) ? $word : (" " . $word); + + if (strlen($buf) > $length and $buf_o != "") + { + $message .= $buf_o . $soft_break; + $buf = $word; + } + } + } + $message .= $buf . $this->LE; + } + + return $message; + } + + /** + * Set the body wrapping. + * @access private + * @return void + */ + function SetWordWrap() { + if($this->WordWrap < 1) + return; + + switch($this->message_type) + { + case "alt": + // fall through + case "alt_attachment": + $this->AltBody = $this->WrapText($this->AltBody, $this->WordWrap); + break; + default: + $this->Body = $this->WrapText($this->Body, $this->WordWrap); + break; + } + } + + /** + * Assembles message header. + * @access private + * @return string + */ + function CreateHeader() { + $result = ""; + + // Set the boundaries + $uniq_id = md5(uniqid(time())); + $this->boundary[1] = "b1_" . $uniq_id; + $this->boundary[2] = "b2_" . $uniq_id; + + $result .= $this->HeaderLine("Date", $this->RFCDate()); + if($this->Sender == "") + $result .= $this->HeaderLine("Return-Path", trim($this->From)); + else + $result .= $this->HeaderLine("Return-Path", trim($this->Sender)); + + // To be created automatically by mail() + if($this->Mailer != "mail") + { + if(count($this->to) > 0) + $result .= $this->AddrAppend("To", $this->to); + else if (count($this->cc) == 0) + $result .= $this->HeaderLine("To", "undisclosed-recipients:;"); + if(count($this->cc) > 0) + $result .= $this->AddrAppend("Cc", $this->cc); + } + + $from = array(); + $from[0][0] = trim($this->From); + $from[0][1] = $this->FromName; + $result .= $this->AddrAppend("From", $from); + + // sendmail and mail() extract Bcc from the header before sending + if((($this->Mailer == "sendmail") || ($this->Mailer == "mail")) && (count($this->bcc) > 0)) + $result .= $this->AddrAppend("Bcc", $this->bcc); + + if(count($this->ReplyTo) > 0) + $result .= $this->AddrAppend("Reply-to", $this->ReplyTo); + + // mail() sets the subject itself + if($this->Mailer != "mail") + $result .= $this->HeaderLine("Subject", $this->EncodeHeader(trim($this->Subject))); + + $result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE); + $result .= $this->HeaderLine("X-Priority", $this->Priority); + $result .= $this->HeaderLine("X-Mailer", "PHPMailer [version " . $this->Version . "]"); + + if($this->ConfirmReadingTo != "") + { + $result .= $this->HeaderLine("Disposition-Notification-To", + "<" . trim($this->ConfirmReadingTo) . ">"); + } + + // Add custom headers + for($index = 0; $index < count($this->CustomHeader); $index++) + { + $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), + $this->EncodeHeader(trim($this->CustomHeader[$index][1]))); + } + $result .= $this->HeaderLine("MIME-Version", "1.0"); + + switch($this->message_type) + { + case "plain": + $result .= $this->HeaderLine("Content-Transfer-Encoding", $this->Encoding); + $result .= sprintf("Content-Type: %s; charset=\"%s\"", + $this->ContentType, $this->CharSet); + break; + case "attachments": + // fall through + case "alt_attachments": + if($this->InlineImageExists()) + { + $result .= sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s", + "multipart/related", $this->LE, $this->LE, + $this->boundary[1], $this->LE); + } + else + { + $result .= $this->HeaderLine("Content-Type", "multipart/mixed;"); + $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); + } + break; + case "alt": + $result .= $this->HeaderLine("Content-Type", "multipart/alternative;"); + $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + } + + if($this->Mailer != "mail") + $result .= $this->LE.$this->LE; + + return $result; + } + + /** + * Assembles the message body. Returns an empty string on failure. + * @access private + * @return string + */ + function CreateBody() { + $result = ""; + + $this->SetWordWrap(); + + switch($this->message_type) + { + case "alt": + $result .= $this->GetBoundary($this->boundary[1], "", + "text/plain", ""); + $result .= $this->EncodeString($this->AltBody, $this->Encoding); + $result .= $this->LE.$this->LE; + $result .= $this->GetBoundary($this->boundary[1], "", + "text/html", ""); + + $result .= $this->EncodeString($this->Body, $this->Encoding); + $result .= $this->LE.$this->LE; + + $result .= $this->EndBoundary($this->boundary[1]); + break; + case "plain": + $result .= $this->EncodeString($this->Body, $this->Encoding); + break; + case "attachments": + $result .= $this->GetBoundary($this->boundary[1], "", "", ""); + $result .= $this->EncodeString($this->Body, $this->Encoding); + $result .= $this->LE; + + $result .= $this->AttachAll(); + break; + case "alt_attachments": + $result .= sprintf("--%s%s", $this->boundary[1], $this->LE); + $result .= sprintf("Content-Type: %s;%s" . + "\tboundary=\"%s\"%s", + "multipart/alternative", $this->LE, + $this->boundary[2], $this->LE.$this->LE); + + // Create text body + $result .= $this->GetBoundary($this->boundary[2], "", + "text/plain", "") . $this->LE; + + $result .= $this->EncodeString($this->AltBody, $this->Encoding); + $result .= $this->LE.$this->LE; + + // Create the HTML body + $result .= $this->GetBoundary($this->boundary[2], "", + "text/html", "") . $this->LE; + + $result .= $this->EncodeString($this->Body, $this->Encoding); + $result .= $this->LE.$this->LE; + + $result .= $this->EndBoundary($this->boundary[2]); + + $result .= $this->AttachAll(); + break; + } + if($this->IsError()) + $result = ""; + + return $result; + } + + /** + * Returns the start of a message boundary. + * @access private + */ + function GetBoundary($boundary, $charSet, $contentType, $encoding) { + $result = ""; + if($charSet == "") { $charSet = $this->CharSet; } + if($contentType == "") { $contentType = $this->ContentType; } + if($encoding == "") { $encoding = $this->Encoding; } + + $result .= $this->TextLine("--" . $boundary); + $result .= sprintf("Content-Type: %s; charset = \"%s\"", + $contentType, $charSet); + $result .= $this->LE; + $result .= $this->HeaderLine("Content-Transfer-Encoding", $encoding); + $result .= $this->LE; + + return $result; + } + + /** + * Returns the end of a message boundary. + * @access private + */ + function EndBoundary($boundary) { + return $this->LE . "--" . $boundary . "--" . $this->LE; + } + + /** + * Sets the message type. + * @access private + * @return void + */ + function SetMessageType() { + if(count($this->attachment) < 1 && strlen($this->AltBody) < 1) + $this->message_type = "plain"; + else + { + if(count($this->attachment) > 0) + $this->message_type = "attachments"; + if(strlen($this->AltBody) > 0 && count($this->attachment) < 1) + $this->message_type = "alt"; + if(strlen($this->AltBody) > 0 && count($this->attachment) > 0) + $this->message_type = "alt_attachments"; + } + } + + /** + * Returns a formatted header line. + * @access private + * @return string + */ + function HeaderLine($name, $value) { + return $name . ": " . $value . $this->LE; + } + + /** + * Returns a formatted mail line. + * @access private + * @return string + */ + function TextLine($value) { + return $value . $this->LE; + } + + ///////////////////////////////////////////////// + // ATTACHMENT METHODS + ///////////////////////////////////////////////// + + /** + * Adds an attachment from a path on the filesystem. + * Returns false if the file could not be found + * or accessed. + * @param string $path Path to the attachment. + * @param string $name Overrides the attachment name. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. + * @return bool + */ + function AddAttachment($path, $name = "", $encoding = "base64", + $type = "application/octet-stream") { + if(!@is_file($path)) + { + $this->SetError($this->Lang("file_access") . $path); + return false; + } + + $filename = basename($path); + if($name == "") + $name = $filename; + + $cur = count($this->attachment); + $this->attachment[$cur][0] = $path; + $this->attachment[$cur][1] = $filename; + $this->attachment[$cur][2] = $name; + $this->attachment[$cur][3] = $encoding; + $this->attachment[$cur][4] = $type; + $this->attachment[$cur][5] = false; // isStringAttachment + $this->attachment[$cur][6] = "attachment"; + $this->attachment[$cur][7] = 0; + + return true; + } + + /** + * Attaches all fs, string, and binary attachments to the message. + * Returns an empty string on failure. + * @access private + * @return string + */ + function AttachAll() { + // Return text of body + $mime = array(); + + // Add all attachments + for($i = 0; $i < count($this->attachment); $i++) + { + // Check for string attachment + $bString = $this->attachment[$i][5]; + if ($bString) + $string = $this->attachment[$i][0]; + else + $path = $this->attachment[$i][0]; + + $filename = $this->attachment[$i][1]; + $name = $this->attachment[$i][2]; + $encoding = $this->attachment[$i][3]; + $type = $this->attachment[$i][4]; + $disposition = $this->attachment[$i][6]; + $cid = $this->attachment[$i][7]; + + $mime[] = sprintf("--%s%s", $this->boundary[1], $this->LE); + $mime[] = sprintf("Content-Type: %s; name=\"%s\"%s", $type, $name, $this->LE); + $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $encoding, $this->LE); + + if($disposition == "inline") + $mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE); + + $mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s", + $disposition, $name, $this->LE.$this->LE); + + // Encode as string attachment + if($bString) + { + $mime[] = $this->EncodeString($string, $encoding); + if($this->IsError()) { return ""; } + $mime[] = $this->LE.$this->LE; + } + else + { + $mime[] = $this->EncodeFile($path, $encoding); + if($this->IsError()) { return ""; } + $mime[] = $this->LE.$this->LE; + } + } + + $mime[] = sprintf("--%s--%s", $this->boundary[1], $this->LE); + + return join("", $mime); + } + + /** + * Encodes attachment in requested format. Returns an + * empty string on failure. + * @access private + * @return string + */ + function EncodeFile ($path, $encoding = "base64") { + if(!@$fd = fopen($path, "rb")) + { + $this->SetError($this->Lang("file_open") . $path); + return ""; + } + $file_buffer = fread($fd, filesize($path)); + $file_buffer = $this->EncodeString($file_buffer, $encoding); + fclose($fd); + + return $file_buffer; + } + + /** + * Encodes string to requested format. Returns an + * empty string on failure. + * @access private + * @return string + */ + function EncodeString ($str, $encoding = "base64") { + $encoded = ""; + switch(strtolower($encoding)) { + case "base64": + // chunk_split is found in PHP >= 3.0.6 + $encoded = chunk_split(base64_encode($str), 76, $this->LE); + break; + case "7bit": + case "8bit": + $encoded = $this->FixEOL($str); + if (substr($encoded, -(strlen($this->LE))) != $this->LE) + $encoded .= $this->LE; + break; + case "binary": + $encoded = $str; + break; + case "quoted-printable": + $encoded = $this->EncodeQP($str); + break; + default: + $this->SetError($this->Lang("encoding") . $encoding); + break; + } + return $encoded; + } + + /** + * Encode a header string to best of Q, B, quoted or none. + * @access private + * @return string + */ + function EncodeHeader ($str, $position = 'text') { + $x = 0; + + switch (strtolower($position)) { + case 'phrase': + if (!preg_match('/[\200-\377]/', $str)) { + // Can't use addslashes as we don't know what value has magic_quotes_sybase. + $encoded = addcslashes($str, "\0..\37\177\\\""); + + if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) + return ($encoded); + else + return ("\"$encoded\""); + } + $x = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches); + break; + case 'comment': + $x = preg_match_all('/[()"]/', $str, $matches); + // Fall-through + case 'text': + default: + $x += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); + break; + } + + if ($x == 0) + return ($str); + + $maxlen = 75 - 7 - strlen($this->CharSet); + // Try to select the encoding which should produce the shortest output + if (strlen($str)/3 < $x) { + $encoding = 'B'; + $encoded = base64_encode($str); + $maxlen -= $maxlen % 4; + $encoded = trim(chunk_split($encoded, $maxlen, "\n")); + } else { + $encoding = 'Q'; + $encoded = $this->EncodeQ($str, $position); + $encoded = $this->WrapText($encoded, $maxlen, true); + $encoded = str_replace("=".$this->LE, "\n", trim($encoded)); + } + + $encoded = preg_replace('/^(.*)$/m', " =?".$this->CharSet."?$encoding?\\1?=", $encoded); + $encoded = trim(str_replace("\n", $this->LE, $encoded)); + + return $encoded; + } + + /** + * Encode string to quoted-printable. + * @access private + * @return string + */ + function EncodeQP ($str) { + $encoded = $this->FixEOL($str); + if (substr($encoded, -(strlen($this->LE))) != $this->LE) + $encoded .= $this->LE; + + // Replace every high ascii, control and = characters + $encoded = preg_replace('/([\000-\010\013\014\016-\037\075\177-\377])/e', + "'='.sprintf('%02X', ord('\\1'))", $encoded); + // Replace every spaces and tabs when it's the last character on a line + $encoded = preg_replace("/([\011\040])".$this->LE."/e", + "'='.sprintf('%02X', ord('\\1')).'".$this->LE."'", $encoded); + + // Maximum line length of 76 characters before CRLF (74 + space + '=') + $encoded = $this->WrapText($encoded, 74, true); + + return $encoded; + } + + /** + * Encode string to q encoding. + * @access private + * @return string + */ + function EncodeQ ($str, $position = "text") { + // There should not be any EOL in the string + $encoded = preg_replace("[\r\n]", "", $str); + + switch (strtolower($position)) { + case "phrase": + $encoded = preg_replace("/([^A-Za-z0-9!*+\/ -])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded); + break; + case "comment": + $encoded = preg_replace("/([\(\)\"])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded); + case "text": + default: + // Replace every high ascii, control =, ? and _ characters + $encoded = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e', + "'='.sprintf('%02X', ord('\\1'))", $encoded); + break; + } + + // Replace every spaces to _ (more readable than =20) + $encoded = str_replace(" ", "_", $encoded); + + return $encoded; + } + + /** + * Adds a string or binary attachment (non-filesystem) to the list. + * This method can be used to attach ascii or binary data, + * such as a BLOB record from a database. + * @param string $string String attachment data. + * @param string $filename Name of the attachment. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. + * @return void + */ + function AddStringAttachment($string, $filename, $encoding = "base64", + $type = "application/octet-stream") { + // Append to $attachment array + $cur = count($this->attachment); + $this->attachment[$cur][0] = $string; + $this->attachment[$cur][1] = $filename; + $this->attachment[$cur][2] = $filename; + $this->attachment[$cur][3] = $encoding; + $this->attachment[$cur][4] = $type; + $this->attachment[$cur][5] = true; // isString + $this->attachment[$cur][6] = "attachment"; + $this->attachment[$cur][7] = 0; + } + + /** + * Adds an embedded attachment. This can include images, sounds, and + * just about any other document. Make sure to set the $type to an + * image type. For JPEG images use "image/jpeg" and for GIF images + * use "image/gif". + * @param string $path Path to the attachment. + * @param string $cid Content ID of the attachment. Use this to identify + * the Id for accessing the image in an HTML form. + * @param string $name Overrides the attachment name. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. + * @return bool + */ + function AddEmbeddedImage($path, $cid, $name = "", $encoding = "base64", + $type = "application/octet-stream") { + + if(!@is_file($path)) + { + $this->SetError($this->Lang("file_access") . $path); + return false; + } + + $filename = basename($path); + if($name == "") + $name = $filename; + + // Append to $attachment array + $cur = count($this->attachment); + $this->attachment[$cur][0] = $path; + $this->attachment[$cur][1] = $filename; + $this->attachment[$cur][2] = $name; + $this->attachment[$cur][3] = $encoding; + $this->attachment[$cur][4] = $type; + $this->attachment[$cur][5] = false; // isStringAttachment + $this->attachment[$cur][6] = "inline"; + $this->attachment[$cur][7] = $cid; + + return true; + } + + /** + * Returns true if an inline attachment is present. + * @access private + * @return bool + */ + function InlineImageExists() { + $result = false; + for($i = 0; $i < count($this->attachment); $i++) + { + if($this->attachment[$i][6] == "inline") + { + $result = true; + break; + } + } + + return $result; + } + + ///////////////////////////////////////////////// + // MESSAGE RESET METHODS + ///////////////////////////////////////////////// + + /** + * Clears all recipients assigned in the TO array. Returns void. + * @return void + */ + function ClearAddresses() { + $this->to = array(); + } + + /** + * Clears all recipients assigned in the CC array. Returns void. + * @return void + */ + function ClearCCs() { + $this->cc = array(); + } + + /** + * Clears all recipients assigned in the BCC array. Returns void. + * @return void + */ + function ClearBCCs() { + $this->bcc = array(); + } + + /** + * Clears all recipients assigned in the ReplyTo array. Returns void. + * @return void + */ + function ClearReplyTos() { + $this->ReplyTo = array(); + } + + /** + * Clears all recipients assigned in the TO, CC and BCC + * array. Returns void. + * @return void + */ + function ClearAllRecipients() { + $this->to = array(); + $this->cc = array(); + $this->bcc = array(); + } + + /** + * Clears all previously set filesystem, string, and binary + * attachments. Returns void. + * @return void + */ + function ClearAttachments() { + $this->attachment = array(); + } + + /** + * Clears all custom headers. Returns void. + * @return void + */ + function ClearCustomHeaders() { + $this->CustomHeader = array(); + } + + + ///////////////////////////////////////////////// + // MISCELLANEOUS METHODS + ///////////////////////////////////////////////// + + /** + * Adds the error message to the error container. + * Returns void. + * @access private + * @return void + */ + function SetError($msg) { + $this->error_count++; + $this->ErrorInfo = $msg; + } + + /** + * Returns the proper RFC 822 formatted date. + * @access private + * @return string + */ + function RFCDate() { + $tz = date("Z"); + $tzs = ($tz < 0) ? "-" : "+"; + $tz = abs($tz); + $tz = ($tz/3600)*100 + ($tz%3600)/60; + $result = sprintf("%s %s%04d", date("D, j M Y H:i:s"), $tzs, $tz); + + return $result; + } + + /** + * Returns the appropriate server variable. Should work with both + * PHP 4.1.0+ as well as older versions. Returns an empty string + * if nothing is found. + * @access private + * @return mixed + */ + function ServerVar($varName) { + global $HTTP_SERVER_VARS; + global $HTTP_ENV_VARS; + + if(!isset($_SERVER)) + { + $_SERVER = $HTTP_SERVER_VARS; + if(!isset($_SERVER["REMOTE_ADDR"])) + $_SERVER = $HTTP_ENV_VARS; // must be Apache + } + + if(isset($_SERVER[$varName])) + return $_SERVER[$varName]; + else + return ""; + } + + /** + * Returns the server hostname or 'localhost.localdomain' if unknown. + * @access private + * @return string + */ + function ServerHostname() { + if ($this->Hostname != "") + $result = $this->Hostname; + elseif ($this->ServerVar('SERVER_NAME') != "") + $result = $this->ServerVar('SERVER_NAME'); + else + $result = "localhost.localdomain"; + + return $result; + } + + /** + * Returns a message in the appropriate language. + * @access private + * @return string + */ + function Lang($key) { + if(count($this->language) < 1) + $this->SetLanguage("en"); // set the default language + + if(isset($this->language[$key])) + return $this->language[$key]; + else + return "Language string failed to load: " . $key; + } + + /** + * Returns true if an error occurred. + * @return bool + */ + function IsError() { + return ($this->error_count > 0); + } + + /** + * Changes every end of line from CR or LF to CRLF. + * @access private + * @return string + */ + function FixEOL($str) { + $str = str_replace("\r\n", "\n", $str); + $str = str_replace("\r", "\n", $str); + $str = str_replace("\n", $this->LE, $str); + return $str; + } + + /** + * Adds a custom header. + * @return void + */ + function AddCustomHeader($custom_header) { + $this->CustomHeader[] = explode(":", $custom_header, 2); + } +} + +?> diff --git a/_incl/class.smtp.php b/_incl/class.smtp.php new file mode 100644 index 0000000..a401374 --- /dev/null +++ b/_incl/class.smtp.php @@ -0,0 +1,1039 @@ +smtp_conn = 0; + $this->error = null; + $this->helo_rply = null; + + $this->do_debug = 0; + } + + /************************************************************* + * CONNECTION FUNCTIONS * + ***********************************************************/ + + /** + * Connect to the server specified on the port specified. + * If the port is not specified use the default SMTP_PORT. + * If tval is specified then a connection will try and be + * established with the server for that number of seconds. + * If tval is not specified the default is 30 seconds to + * try on the connection. + * + * SMTP CODE SUCCESS: 220 + * SMTP CODE FAILURE: 421 + * @access public + * @return bool + */ + function Connect($host,$port=0,$tval=30) { + # set the error val to null so there is no confusion + $this->error = null; + + # make sure we are __not__ connected + if($this->connected()) { + # ok we are connected! what should we do? + # for now we will just give an error saying we + # are already connected + $this->error = + array("error" => "Already connected to a server"); + return false; + } + + if(empty($port)) { + $port = $this->SMTP_PORT; + } + + #connect to the smtp server + $this->smtp_conn = fsockopen($host, # the host of the server + $port, # the port to use + $errno, # error number if any + $errstr, # error message if any + $tval); # give up after ? secs + # verify we connected properly + if(empty($this->smtp_conn)) { + $this->error = array("error" => "Failed to connect to server", + "errno" => $errno, + "errstr" => $errstr); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": $errstr ($errno)" . $this->CRLF; + } + return false; + } + + # sometimes the SMTP server takes a little longer to respond + # so we will give it a longer timeout for the first read + // Windows still does not have support for this timeout function + if(substr(PHP_OS, 0, 3) != "WIN") + socket_set_timeout($this->smtp_conn, $tval, 0); + + # get any announcement stuff + $announce = $this->get_lines(); + + # set the timeout of any socket functions at 1/10 of a second + //if(function_exists("socket_set_timeout")) + // socket_set_timeout($this->smtp_conn, 0, 100000); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $announce; + } + + return true; + } + + /** + * Performs SMTP authentication. Must be run after running the + * Hello() method. Returns true if successfully authenticated. + * @access public + * @return bool + */ + function Authenticate($username, $password) { + // Start authentication + fputs($this->smtp_conn,"AUTH LOGIN" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($code != 334) { + $this->error = + array("error" => "AUTH not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + // Send encoded username + fputs($this->smtp_conn, base64_encode($username) . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($code != 334) { + $this->error = + array("error" => "Username not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + // Send encoded password + fputs($this->smtp_conn, base64_encode($password) . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($code != 235) { + $this->error = + array("error" => "Password not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + return true; + } + + /** + * Returns true if connected to a server otherwise false + * @access private + * @return bool + */ + function Connected() { + if(!empty($this->smtp_conn)) { + $sock_status = socket_get_status($this->smtp_conn); + if($sock_status["eof"]) { + # hmm this is an odd situation... the socket is + # valid but we aren't connected anymore + if($this->do_debug >= 1) { + echo "SMTP -> NOTICE:" . $this->CRLF . + "EOF caught while checking if connected"; + } + $this->Close(); + return false; + } + return true; # everything looks good + } + return false; + } + + /** + * Closes the socket and cleans up the state of the class. + * It is not considered good to use this function without + * first trying to use QUIT. + * @access public + * @return void + */ + function Close() { + $this->error = null; # so there is no confusion + $this->helo_rply = null; + if(!empty($this->smtp_conn)) { + # close the connection and cleanup + fclose($this->smtp_conn); + $this->smtp_conn = 0; + } + } + + + /*************************************************************** + * SMTP COMMANDS * + *************************************************************/ + + /** + * Issues a data command and sends the msg_data to the server + * finializing the mail transaction. $msg_data is the message + * that is to be send with the headers. Each header needs to be + * on a single line followed by a with the message headers + * and the message body being seperated by and additional . + * + * Implements rfc 821: DATA + * + * SMTP CODE INTERMEDIATE: 354 + * [data] + * . + * SMTP CODE SUCCESS: 250 + * SMTP CODE FAILURE: 552,554,451,452 + * SMTP CODE FAILURE: 451,554 + * SMTP CODE ERROR : 500,501,503,421 + * @access public + * @return bool + */ + function Data($msg_data) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Data() without being connected"); + return false; + } + + fputs($this->smtp_conn,"DATA" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 354) { + $this->error = + array("error" => "DATA command not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + # the server is ready to accept data! + # according to rfc 821 we should not send more than 1000 + # including the CRLF + # characters on a single line so we will break the data up + # into lines by \r and/or \n then if needed we will break + # each of those into smaller lines to fit within the limit. + # in addition we will be looking for lines that start with + # a period '.' and append and additional period '.' to that + # line. NOTE: this does not count towards are limit. + + # normalize the line breaks so we know the explode works + $msg_data = str_replace("\r\n","\n",$msg_data); + $msg_data = str_replace("\r","\n",$msg_data); + $lines = explode("\n",$msg_data); + + # we need to find a good way to determine is headers are + # in the msg_data or if it is a straight msg body + # currently I'm assuming rfc 822 definitions of msg headers + # and if the first field of the first line (':' sperated) + # does not contain a space then it _should_ be a header + # and we can process all lines before a blank "" line as + # headers. + $field = substr($lines[0],0,strpos($lines[0],":")); + $in_headers = false; + if(!empty($field) && !strstr($field," ")) { + $in_headers = true; + } + + $max_line_length = 998; # used below; set here for ease in change + + while(list(,$line) = @each($lines)) { + $lines_out = null; + if($line == "" && $in_headers) { + $in_headers = false; + } + # ok we need to break this line up into several + # smaller lines + while(strlen($line) > $max_line_length) { + $pos = strrpos(substr($line,0,$max_line_length)," "); + $lines_out[] = substr($line,0,$pos); + $line = substr($line,$pos + 1); + # if we are processing headers we need to + # add a LWSP-char to the front of the new line + # rfc 822 on long msg headers + if($in_headers) { + $line = "\t" . $line; + } + } + $lines_out[] = $line; + + # now send the lines to the server + while(list(,$line_out) = @each($lines_out)) { + if(strlen($line_out) > 0) + { + if(substr($line_out, 0, 1) == ".") { + $line_out = "." . $line_out; + } + } + fputs($this->smtp_conn,$line_out . $this->CRLF); + } + } + + # ok all the message data has been sent so lets get this + # over with aleady + fputs($this->smtp_conn, $this->CRLF . "." . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "DATA not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return true; + } + + /** + * Expand takes the name and asks the server to list all the + * people who are members of the _list_. Expand will return + * back and array of the result or false if an error occurs. + * Each value in the array returned has the format of: + * [ ] + * The definition of is defined in rfc 821 + * + * Implements rfc 821: EXPN + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE FAILURE: 550 + * SMTP CODE ERROR : 500,501,502,504,421 + * @access public + * @return string array + */ + function Expand($name) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Expand() without being connected"); + return false; + } + + fputs($this->smtp_conn,"EXPN " . $name . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "EXPN not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + # parse the reply and place in our array to return to user + $entries = explode($this->CRLF,$rply); + while(list(,$l) = @each($entries)) { + $list[] = substr($l,4); + } + + return $list; + } + + /** + * Sends the HELO command to the smtp server. + * This makes sure that we and the server are in + * the same known state. + * + * Implements from rfc 821: HELO + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE ERROR : 500, 501, 504, 421 + * @access public + * @return bool + */ + function Hello($host="") { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Hello() without being connected"); + return false; + } + + # if a hostname for the HELO wasn't specified determine + # a suitable one to send + if(empty($host)) { + # we need to determine some sort of appopiate default + # to send to the server + $host = "localhost"; + } + + // Send extended hello first (RFC 2821) + if(!$this->SendHello("EHLO", $host)) + { + if(!$this->SendHello("HELO", $host)) + return false; + } + + return true; + } + + /** + * Sends a HELO/EHLO command. + * @access private + * @return bool + */ + function SendHello($hello, $host) { + fputs($this->smtp_conn, $hello . " " . $host . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER: " . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => $hello . " not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + $this->helo_rply = $rply; + + return true; + } + + /** + * Gets help information on the keyword specified. If the keyword + * is not specified then returns generic help, ussually contianing + * A list of keywords that help is available on. This function + * returns the results back to the user. It is up to the user to + * handle the returned data. If an error occurs then false is + * returned with $this->error set appropiately. + * + * Implements rfc 821: HELP [ ] + * + * SMTP CODE SUCCESS: 211,214 + * SMTP CODE ERROR : 500,501,502,504,421 + * @access public + * @return string + */ + function Help($keyword="") { + $this->error = null; # to avoid confusion + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Help() without being connected"); + return false; + } + + $extra = ""; + if(!empty($keyword)) { + $extra = " " . $keyword; + } + + fputs($this->smtp_conn,"HELP" . $extra . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 211 && $code != 214) { + $this->error = + array("error" => "HELP not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + return $rply; + } + + /** + * Starts a mail transaction from the email address specified in + * $from. Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more Recipient + * commands may be called followed by a Data command. + * + * Implements rfc 821: MAIL FROM: + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE SUCCESS: 552,451,452 + * SMTP CODE SUCCESS: 500,501,421 + * @access public + * @return bool + */ + function Mail($from) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Mail() without being connected"); + return false; + } + + fputs($this->smtp_conn,"MAIL FROM:<" . $from . ">" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "MAIL not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return true; + } + + /** + * Sends the command NOOP to the SMTP server. + * + * Implements from rfc 821: NOOP + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE ERROR : 500, 421 + * @access public + * @return bool + */ + function Noop() { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Noop() without being connected"); + return false; + } + + fputs($this->smtp_conn,"NOOP" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "NOOP not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return true; + } + + /** + * Sends the quit command to the server and then closes the socket + * if there is no error or the $close_on_error argument is true. + * + * Implements from rfc 821: QUIT + * + * SMTP CODE SUCCESS: 221 + * SMTP CODE ERROR : 500 + * @access public + * @return bool + */ + function Quit($close_on_error=true) { + $this->error = null; # so there is no confusion + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Quit() without being connected"); + return false; + } + + # send the quit command to the server + fputs($this->smtp_conn,"quit" . $this->CRLF); + + # get any good-bye messages + $byemsg = $this->get_lines(); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $byemsg; + } + + $rval = true; + $e = null; + + $code = substr($byemsg,0,3); + if($code != 221) { + # use e as a tmp var cause Close will overwrite $this->error + $e = array("error" => "SMTP server rejected quit command", + "smtp_code" => $code, + "smtp_rply" => substr($byemsg,4)); + $rval = false; + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $e["error"] . ": " . + $byemsg . $this->CRLF; + } + } + + if(empty($e) || $close_on_error) { + $this->Close(); + } + + return $rval; + } + + /** + * Sends the command RCPT to the SMTP server with the TO: argument of $to. + * Returns true if the recipient was accepted false if it was rejected. + * + * Implements from rfc 821: RCPT TO: + * + * SMTP CODE SUCCESS: 250,251 + * SMTP CODE FAILURE: 550,551,552,553,450,451,452 + * SMTP CODE ERROR : 500,501,503,421 + * @access public + * @return bool + */ + function Recipient($to) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Recipient() without being connected"); + return false; + } + + fputs($this->smtp_conn,"RCPT TO:<" . $to . ">" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250 && $code != 251) { + $this->error = + array("error" => "RCPT not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return true; + } + + /** + * Sends the RSET command to abort and transaction that is + * currently in progress. Returns true if successful false + * otherwise. + * + * Implements rfc 821: RSET + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE ERROR : 500,501,504,421 + * @access public + * @return bool + */ + function Reset() { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Reset() without being connected"); + return false; + } + + fputs($this->smtp_conn,"RSET" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "RSET failed", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + + return true; + } + + /** + * Starts a mail transaction from the email address specified in + * $from. Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more Recipient + * commands may be called followed by a Data command. This command + * will send the message to the users terminal if they are logged + * in. + * + * Implements rfc 821: SEND FROM: + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE SUCCESS: 552,451,452 + * SMTP CODE SUCCESS: 500,501,502,421 + * @access public + * @return bool + */ + function Send($from) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Send() without being connected"); + return false; + } + + fputs($this->smtp_conn,"SEND FROM:" . $from . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "SEND not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return true; + } + + /** + * Starts a mail transaction from the email address specified in + * $from. Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more Recipient + * commands may be called followed by a Data command. This command + * will send the message to the users terminal if they are logged + * in and send them an email. + * + * Implements rfc 821: SAML FROM: + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE SUCCESS: 552,451,452 + * SMTP CODE SUCCESS: 500,501,502,421 + * @access public + * @return bool + */ + function SendAndMail($from) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called SendAndMail() without being connected"); + return false; + } + + fputs($this->smtp_conn,"SAML FROM:" . $from . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "SAML not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return true; + } + + /** + * Starts a mail transaction from the email address specified in + * $from. Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more Recipient + * commands may be called followed by a Data command. This command + * will send the message to the users terminal if they are logged + * in or mail it to them if they are not. + * + * Implements rfc 821: SOML FROM: + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE SUCCESS: 552,451,452 + * SMTP CODE SUCCESS: 500,501,502,421 + * @access public + * @return bool + */ + function SendOrMail($from) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called SendOrMail() without being connected"); + return false; + } + + fputs($this->smtp_conn,"SOML FROM:" . $from . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250) { + $this->error = + array("error" => "SOML not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return true; + } + + /** + * This is an optional command for SMTP that this class does not + * support. This method is here to make the RFC821 Definition + * complete for this class and __may__ be implimented in the future + * + * Implements from rfc 821: TURN + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE FAILURE: 502 + * SMTP CODE ERROR : 500, 503 + * @access public + * @return bool + */ + function Turn() { + $this->error = array("error" => "This method, TURN, of the SMTP ". + "is not implemented"); + if($this->do_debug >= 1) { + echo "SMTP -> NOTICE: " . $this->error["error"] . $this->CRLF; + } + return false; + } + + /** + * Verifies that the name is recognized by the server. + * Returns false if the name could not be verified otherwise + * the response from the server is returned. + * + * Implements rfc 821: VRFY + * + * SMTP CODE SUCCESS: 250,251 + * SMTP CODE FAILURE: 550,551,553 + * SMTP CODE ERROR : 500,501,502,421 + * @access public + * @return int + */ + function Verify($name) { + $this->error = null; # so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Verify() without being connected"); + return false; + } + + fputs($this->smtp_conn,"VRFY " . $name . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $this->CRLF . $rply; + } + + if($code != 250 && $code != 251) { + $this->error = + array("error" => "VRFY failed on name '$name'", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . + ": " . $rply . $this->CRLF; + } + return false; + } + return $rply; + } + + /******************************************************************* + * INTERNAL FUNCTIONS * + ******************************************************************/ + + /** + * Read in as many lines as possible + * either before eof or socket timeout occurs on the operation. + * With SMTP we can tell if we have more lines to read if the + * 4th character is '-' symbol. If it is a space then we don't + * need to read anything else. + * @access private + * @return string + */ + function get_lines() { + $data = ""; + while($str = fgets($this->smtp_conn,515)) { + if($this->do_debug >= 4) { + echo "SMTP -> get_lines(): \$data was \"$data\"" . + $this->CRLF; + echo "SMTP -> get_lines(): \$str is \"$str\"" . + $this->CRLF; + } + $data .= $str; + if($this->do_debug >= 4) { + echo "SMTP -> get_lines(): \$data is \"$data\"" . $this->CRLF; + } + # if the 4th character is a space then we are done reading + # so just break the loop + if(substr($str,3,1) == " ") { break; } + } + return $data; + } + +} + + + ?> diff --git a/_incl/code.js b/_incl/code.js new file mode 100644 index 0000000..d96f304 --- /dev/null +++ b/_incl/code.js @@ -0,0 +1,86 @@ +/* this door function is based on code by +[---------------------------:[Andrew Hocker]:---------------------------] +*/ +var plus = new Image(); + plus.src = "images/plus.gif"; + +var minus = new Image(); + minus.src = "images/minus.gif"; + +var item = new Image(); + item.src = "images/item.gif"; + +function door(){ + var argv = door.arguments; + var argc = argv.length; + + obj = argv[0].parentNode; + obj.className = (obj.className == 'open') ? 'closed' : 'open'; + + for (var i = 1; i < argc; i++) { + MM_findObj(argv[i]).className = 'closed'; + } + + return false; +} + +// ff + +function selectOption(objeto, optionValue) +{ + var selObj = document.getElementById(objeto); + var i; + for (i=0; i < selObj.options.length; i++) { + if (selObj.options[i].value == optionValue) { + selObj.options[i].selected = true; + } + } +} + +// the typical MM functions +function MM_preloadImages() { //v3.0 + var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); + var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i0&&parent.frames.length) { + d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} + if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i' . "\r"; + $i ++; + } + return $select; +} + +function array2Select($etiquetas, $valor=''){ + $select = ''; + foreach($etiquetas as $item){ + $select .= '' . "\n"; + } // FOR + } + echo $resultado; +?> \ No newline at end of file diff --git a/admin/shoop/ocasion.php b/admin/shoop/ocasion.php new file mode 100644 index 0000000..75bc662 --- /dev/null +++ b/admin/shoop/ocasion.php @@ -0,0 +1,100 @@ + + + + + + +ocasión + + + + + + + +
[ añadir producto ]
+ + 0 */ + ORDER BY ocasion_categoria, ocasion_id"; + $result = mysql_query($query, $conn); +?> + + + + + + + + + + + + + + + + + + + + + + + +An error has occurred while accessing the database: ' . mysql_error(); + } +?> +
NombrePVPP. OfertaUds. 
  ' . $ocasion_nombre . '' . (strlen($ocasion_estado) ? ' (' . $ocasion_estado . ')': "") . (strlen($ocasion_descripcion) ? '
  ' . $ocasion_descripcion . '': "") ; ?>
 [ editar ]
+ + + + + + + + + + + + + + + + + + + diff --git a/admin/shoop/ocasion_db.php b/admin/shoop/ocasion_db.php new file mode 100644 index 0000000..ace72d2 --- /dev/null +++ b/admin/shoop/ocasion_db.php @@ -0,0 +1,51 @@ + \ No newline at end of file diff --git a/admin/shoop/ocasion_edit.php b/admin/shoop/ocasion_edit.php new file mode 100644 index 0000000..2598520 --- /dev/null +++ b/admin/shoop/ocasion_edit.php @@ -0,0 +1,114 @@ + + + +ocasion + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
Categoría
Nombre
Descripción
Estado
+
PVP
Precio
Unidades
+ + + + + + + +
+ [ atrás ]   + [ ] + + [ borrar ] +
+
+ + \ No newline at end of file diff --git a/admin/shoop/ped.php b/admin/shoop/ped.php new file mode 100644 index 0000000..392537b --- /dev/null +++ b/admin/shoop/ped.php @@ -0,0 +1,27 @@ +query('DELETE FROM shoop_pedidos WHERE pedido_id = ' . $rec_id); + $db->query('DELETE FROM shoop_pedi_productos WHERE pp_id_pedido = ' . $rec_id); + $db->query('DELETE FROM shoop_clientes WHERE cliente_id = ' . $rec_id ); + } + } +} + +header('Location:pedidos.php'); +?> \ No newline at end of file diff --git a/admin/shoop/pedidos.php b/admin/shoop/pedidos.php new file mode 100644 index 0000000..6a43fc0 --- /dev/null +++ b/admin/shoop/pedidos.php @@ -0,0 +1,193 @@ +sessionRegistered()){ + Header('Location:' . $SESSION_LOGIN_PAGE); + exit; + } + } +} +*/ + +if(isset($_REQUEST['op'])) { + $operacion = $_REQUEST['op']; +} else { + $operacion = "list"; +} + +// this code is for the "paginator" +$gStartRec = (isset($_REQUEST['start']) ? $_REQUEST['start'] : 0); +$gLimit = 25; +?> + + + + + +pedidos + + + + + + + +query("SELECT COUNT(pedido_id) AS numOfRecords FROM shoop_pedidos", true)) { + if($row = $db->getNext()) { + $numOfRecords = $row['numOfRecords']; + } + } + + if($db->query("SELECT pedido_id, pedido_cod_pedido, pedido_fecha, cliente_nombre, pedido_forma_pago, pedido_estado, pedido_total FROM shoop_pedidos, shoop_clientes WHERE cliente_id = pedido_cliente ORDER BY pedido_id DESC LIMIT " . $gStartRec . ", " . $gLimit)) { +?> + +
+ pedidos. + + $gLimit) { + echo drawPaginator($numOfRecords, $gStartRec, $gLimit, 'pag_button'); + } +?> + +
+ + + + + + + + +getNext()) + { + $pedido_id = $row['pedido_id']; + $pedido_cod_pedido = $row['pedido_cod_pedido']; + $pedido_fecha = $row['pedido_fecha']; + $pedido_cliente = $row['cliente_nombre']; + $pedido_forma_pago = $row['pedido_forma_pago']; + $pedido_estado = $row['pedido_estado']; + $pedido_total = $row['pedido_total']; + +?> + + + + + +
CódigoFechaClienteForma PagoEstadoTotal
+ +query + } else { // if $db + echo '

An error has occurred while accessing the database: ' . mysql_error(); + } +?> + + + + + +
+ + + + + + diff --git a/admin/shoop/pedidos_show.php b/admin/shoop/pedidos_show.php new file mode 100644 index 0000000..a64c79c --- /dev/null +++ b/admin/shoop/pedidos_show.php @@ -0,0 +1,188 @@ + + + + + + +clave audio + + + + + + + + + + + + + +

+query("SELECT pedido_cod_pedido, pedido_fecha, pedido_forma_pago, pedido_transaccion_resultado, pedido_transaccion_codigo FROM shoop_pedidos WHERE pedido_id = " . $pedidoID, true)) { + if($row = $db->getNext()) { + $pedido_codigo = $row['pedido_cod_pedido']; + $formapago = $row['pedido_forma_pago']; + $visa_resultado = $row['pedido_transaccion_resultado']; + $visa_codigo = $row['pedido_transaccion_codigo']; + } + } else { + echo 'error con el pedido'; + } + } +?> +

Número de pedido: .

+

1. Datos del cliente:

+query("SELECT cliente_nombre, cliente_direccion, cliente_codigopostal, cliente_localidad, cliente_provincia, cliente_telefono, cliente_fax, cliente_email, cliente_nif + FROM shoop_clientes WHERE cliente_id = " . $pedidoID, true)) { + if($row = $db->getNext()) { + echo '' . $row['cliente_nombre'] . '
'; + echo $row['cliente_direccion'] . '
'; + echo $row['cliente_codigopostal'] . ' ' . $row['cliente_localidad'] . '
'; + echo (strlen ($row['cliente_provincia']) ? $row['cliente_provincia'] . '
' : ''); + echo '
'; + echo (strlen ($row['cliente_telefono']) ? 'Teléfono: ' . $row['cliente_telefono'] . '
' : ''); + echo (strlen ($row['cliente_fax']) ? 'Fax: ' . $row['cliente_fax'] . '
' : ''); + echo (strlen ($row['cliente_email']) ? 'email: ' . $row['cliente_email'] . '
' : ''); + } + } + } +?> +

+

2. Datos del pedido.
+query("SELECT pp_cantidad, pp_precio_ud, pp_subtotal, pp_prd_tipo, pp_prd_marca, pp_prd_modelo, pp_prd_color + FROM shoop_pedi_productos WHERE pp_id_pedido = " . $pedidoID, true)) { +?> + + + + + + + +
Ud.ProductoPVP Ud. Subtotal
+ +getNext()) { + $totalPedido += $row['pp_subtotal']; +?> + + + + + += $GLOBALS['no_portes']) { +?> + + + + + + + + + + + + + + + + + + + + + + + +
Total:
IVA y Gastos de envío incluidos.
Subtotal:
Gastos de envío:
Total:
IVA incluido.
+ +

+

3. Forma de pago: + + Transferencia Bancaria. + + VISA
+ +

+

[ borrar ]

+ + + + + \ No newline at end of file diff --git a/admin/shoop/productos.php b/admin/shoop/productos.php new file mode 100644 index 0000000..5c2f38f --- /dev/null +++ b/admin/shoop/productos.php @@ -0,0 +1,136 @@ + $value) { + switch($name){ + case 'buscar': + $buscar_str = $value; + break; + case 'marcas': + $marcas_str = $value; + break; + case 'categorias': + $categorias_str = $value; + break; + } + } + } +} else { + $time = time() + 60 * 60 * 24 * 7; + setcookie('clave_admin[buscar]', $buscar_str, $time); + setcookie('clave_admin[marcas]', $marcas_str, $time); + setcookie('clave_admin[categorias]', $categorias_str, $time); +} +?> + + + + + +productos + + + + + +
+ + + + + + + + + +
[ añadir + producto ] [ con foto ]
+ + + 0 ? ' AND prod_modelo LIKE "%' . $buscar_str . '%" ' : '') . + (strlen($marcas_str) > 0 ? ' AND prod_fab_id=' . $marcas_str : '') . + (strlen($categorias_str) > 0 ? ' AND prod_categoria_id="' . $categorias_str . '"' : '') . + ' ORDER BY prod_categoria_id, fab_nombre, prod_modelo'; + + $result = mysql_query($query, $conn); +// $num_results = mysql_num_rows($result); +?> + + + + + + + + + + + + + + + + + + + + + + +An error has occurred while accessing the database: ' . mysql_error(); +} +?> +
CategoríaMarcaModelo
Precio
 
   25 ? '...' : ''); ?>  [ editar ]
+ +
+ + diff --git a/admin/shoop/productos_db.php b/admin/shoop/productos_db.php new file mode 100644 index 0000000..999d337 --- /dev/null +++ b/admin/shoop/productos_db.php @@ -0,0 +1,159 @@ + $catop_valor){ + $sql = 'INSERT INTO shoop_prod_caracteristicas(procat_producto, procat_catop, procat_valor) + VALUES("' . $id . '", "' . $catop_id . '", "' . $catop_valor . '");'; + $result = mysql_query($sql, $conn); + } + } + + // si es resaltado + $sql = 'DELETE FROM shoop_prod_ofertas WHERE oferta_prod_id = ' . $id; + $result = mysql_query($sql, $conn); + + if($prod_oferta) { + $sql = 'INSERT INTO shoop_prod_ofertas(oferta_prod_id, oferta_tipo, oferta_cat_id) + VALUES("' . $id . '", "' . $prod_oferta . '", "' . $prod_categoria_id . '");'; + + $result = mysql_query($sql, $conn); + } + + // modifico la imagen. la funcion detecta s hay imagen nueva + uploadImagenProducto($id, 247, 95, 168, 102); + + // y vuelvo a la pantalla correspondiente + header('Location: productos_edit.php?op=edit&id=' . $id); + } + break; + + case "del": + $sql = 'DELETE FROM shoop_productos WHERE prod_id = ' . $id; + $result = mysql_query($sql, $conn); + $sql = 'DELETE FROM shoop_prod_caracteristicas WHERE procat_producto = ' . $id; + $result = mysql_query($sql, $conn); + $sql = 'DELETE FROM shoop_prod_ofertas WHERE oferta_prod_id = ' . $id; + $result = mysql_query($sql, $conn); + + default: + header('Location: productos.php'); + break; + } +} else { // no tengo conexion con el server + header('Location: productos.php'); +} +?> \ No newline at end of file diff --git a/admin/shoop/productos_edit.php b/admin/shoop/productos_edit.php new file mode 100644 index 0000000..9905132 --- /dev/null +++ b/admin/shoop/productos_edit.php @@ -0,0 +1,316 @@ + + + +productos + + + + + + + +
+ + + + + +
Detalles de este producto
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CategoríaFabricante Imagen
+ + + + + + + + + + + + + + + + + + + + + +
+ + + + + +
+ +
+ + + + + +
+ +
+
Modelo
Resaltado
+ + + + + +
    
Precio (-1 significa CONSULTAR)
(sin comas, con decimales separados por punto)
Colores/Acabados
+ + + + + + + + +
Dimensiones en cm (an x al x fd)    Peso (Kg.)   Volumen (m3)
+
Introducción
Descripción
+ + + + +
Características específicas a la categoría
+ + + + + + + + + + + + + + + +
: + + + + + > + + + +
+ + + + + + + + +
+ [ cancelar ]   + [ Ok ] + + + [ borrar ]
+
+ + \ No newline at end of file diff --git a/admin/shoop/productos_foto.php b/admin/shoop/productos_foto.php new file mode 100644 index 0000000..359155b --- /dev/null +++ b/admin/shoop/productos_foto.php @@ -0,0 +1,226 @@ + $value) { + switch($name){ + case 'buscar': + $buscar_str = $value; + break; + case 'marcas': + $marcas_str = $value; + break; + case 'categorias': + $categorias_str = $value; + break; + } + } + } +} else { + $time = time() + 60 * 60 * 24 * 7; + setcookie('clave_admin[buscar]', $buscar_str, $time); + setcookie('clave_admin[marcas]', $marcas_str, $time); + setcookie('clave_admin[categorias]', $categorias_str, $time); +} +?> + + + + + +productos + + + + + + +
+ + + + + + + + + +
[ añadir + producto ] [ sin foto ]
+ + 0 ? ' AND prod_modelo LIKE "%' . $buscar_str . '%" ' : '') . + (strlen($marcas_str) > 0 ? ' AND prod_fab_id=' . $marcas_str : '') . + (strlen($categorias_str) > 0 ? ' AND prod_categoria_id="' . $categorias_str . '"' : '') . + ' ORDER BY prod_categoria_id, prod_modelo'; + + $result = mysql_query($query, $conn); +// $num_results = mysql_num_rows($result); +?> + + + + + + + + + +An error has occurred while accessing the database: ' . mysql_error(); +} +?> +
+
+ + + + + + + + + +
+
+
€'); ?>
+ +
+
+
+
+
  [ editar ]
+ +
+ + diff --git a/admin/shoop/secciones.php b/admin/shoop/secciones.php new file mode 100644 index 0000000..37297ac --- /dev/null +++ b/admin/shoop/secciones.php @@ -0,0 +1,129 @@ + + + + + + +secciones + + + + + + + + +
[ add a new record ]
+ + + + + + + + + + + + + + + + + + + + + + + + + +An error has occurred while accessing the database: ' . mysql_error(); + } +?> +
OrdenNombreDescripcionSeccion Code
 [ edit ]  [ delete ]
+ $limit) { + + } +?> + + + + + + +
+ + + + + diff --git a/admin/shoop/secciones_db.php b/admin/shoop/secciones_db.php new file mode 100644 index 0000000..a6160ba --- /dev/null +++ b/admin/shoop/secciones_db.php @@ -0,0 +1,44 @@ + \ No newline at end of file diff --git a/admin/shoop/secciones_edit.php b/admin/shoop/secciones_edit.php new file mode 100644 index 0000000..6ece52b --- /dev/null +++ b/admin/shoop/secciones_edit.php @@ -0,0 +1,83 @@ + + + +secciones + + + + + + +
+ + + + + + + + + + + + + + + + + +
Código
Orden
Nombre
Descripción
+ [ volver atrás ]   + [ grabar ]
+
+ + \ No newline at end of file diff --git a/admin/shoop/secciones_show.php b/admin/shoop/secciones_show.php new file mode 100644 index 0000000..a9f0063 --- /dev/null +++ b/admin/shoop/secciones_show.php @@ -0,0 +1,66 @@ + + + +secciones + + + + + + + + + + + + + + + + + + + + + + +
Orden
Nombre
Descripción
Código
[ edit ]  [ delete ]
+ + \ No newline at end of file diff --git a/admin/shoop/upload.php b/admin/shoop/upload.php new file mode 100644 index 0000000..6c56feb --- /dev/null +++ b/admin/shoop/upload.php @@ -0,0 +1,84 @@ +max_filesize(150000); // OPTIONAL: set the max filesize of uploadable files in bytes + $my_uploader->max_image_size(1600, 1600); // OPTIONAL: if you're uploading images, you can set the max pixel dimensions + // UPLOAD the file + if ($my_uploader->upload($upload_file_name, $acceptable_file_types, $default_extension)) { + $my_uploader->save_file($path, $prodID . '_tmp', $mode); + if (!$my_uploader->error) { + $my_uploader->resize($prodID . '_' . $size1_w . '.jpg', $size1_w, $size1_h, 60); + if($size2_w) { + $my_uploader->resize($prodID . '_' . $size2_w . '.jpg', $size2_w, $size2_h, 60); + } + $my_uploader->delete_file; + } + } + if ($my_uploader->error) { + echo $my_uploader->error; + } + + $glob = glob($path . $proid, '_tmp'); + limpia($glob); + } + } + + + function uploadImagenMarca($prodID, $size_w, $size_h, $mascara='') { + $path = "../../_logos/c/"; // este directorio tiene que tener chmod 777 + $upload_file_name = "marca_imagen"; // el nombre del campo tipo file de nuestro formulario + $acceptable_file_types = "image/gif"; // acepta GIF et JPEG + $default_extension = ""; + $mode = 1; // OPTIONS: + // 1 = overwrite mode + // 2 = create new with incremental extention + // 3 = do nothing if exists, highest protection + + + if(strlen($_FILES[$upload_file_name]['name'])) { + $my_uploader = new uploader('es'); // Create a new instance of the class + $my_uploader->max_filesize(150000); // OPTIONAL: set the max filesize of uploadable files in bytes + $my_uploader->max_image_size(1600, 1600); // OPTIONAL: if you're uploading images, you can set the max pixel dimensions + // UPLOAD the file + if ($my_uploader->upload($upload_file_name, $acceptable_file_types, $default_extension)) { + $my_uploader->save_file($path, $prodID . '.gif', $mode); + } else { + echo $my_uploader->error; + } + if ($my_uploader->error) { + echo $my_uploader->error; + } + } else { + echo 'no file'; + } + } + +?> \ No newline at end of file diff --git a/admin/top.htm b/admin/top.htm new file mode 100644 index 0000000..e782caa --- /dev/null +++ b/admin/top.htm @@ -0,0 +1,6 @@ + + + + + +
diff --git a/admin/upload_class.php b/admin/upload_class.php new file mode 100644 index 0000000..64eb496 --- /dev/null +++ b/admin/upload_class.php @@ -0,0 +1,253 @@ +language = "en"; // choice of en, nl, es + $this->rename_file = false; + $this->ext_string = ""; + } + // some error (HTTP)reporting, change the messages or remove options if you like. + function error_text($err_num) { + switch ($this->language) { + case "nl": + $error[0] = "Foto succesvol kopieert."; + $error[1] = "Het bestand is te groot, het maximum is: ".MAX_SIZE."."; + $error[2] = "Het bestand is te groot, het maximum is: ".MAX_SIZE."."; + $error[3] = "Fout bij het uploaden, probeer het nog een keer."; + $error[4] = "Fout bij het uploaden, probeer het nog een keer."; + $error[10] = "Selecteer een bestand."; + $error[11] = "Het zijn alleen bestanden van dit type toegestaan: ".$this->ext_string.""; + $error[12] = "Sorry, de bestandsnaam bevat tekens die niet zijn toegestaan. Gebruik alleen nummer, letters en het underscore teken. Een geldige naam eindigt met een punt en de extensie."; + $error[13] = "De bestandsnaam is te lang, het maximum is: ".$this->max_length_filename." teken."; + $error[14] = "Sorry, het opgegeven directory bestaat niet!"; + $error[15] = "Uploading ".$this->the_file."...Fout! Sorry, er is al een bestand met deze naam aanwezig."; + break; + case "es": + $error[0] = "El fichero: ".$this->the_file." se ha cargado correctamente!"; + $error[1] = "El fichero a cargar excede del tamaño máximo de la directiva en la configuración del servidor."; + $error[2] = "El fichero a cargar excede del tamaño máximo de la directiva especificada en el formulario html."; + $error[3] = "El fichero a cargar solo lo ha sido parcialmente."; + $error[4] = "El fichero no ha sido cargado."; + $error[10] = "Por favor seleccione un fichero a cargar."; + $error[11] = "Solo ficheros con las siguientes extensiones están permitidos: ".$this->ext_string.""; + $error[12] = "Lo siento, el nombre del fichero contiene carácteres invalidos. Use solo carácteres alfanuméricos y separe (si es necesario) con un subrayado. Un nombre de fichero correcto acaba con un punto seguido de la extensión."; + $error[13] = "El nombre de fichero excede de la longitud máxima de ".$this->max_length_filename." carácteres."; + $error[14] = "¡Lo siento, el directorio de destino no existe!"; + $error[15] = "Cargando ".$this->the_file."...Error! lo siento, un fichero con el mismo nombre ya existe."; + break; + default: + // start http errors + $error[0] = "File: ".$this->the_file." successfully uploaded!"; + $error[1] = "The uploaded file exceeds the max. upload filesize directive in the server configuration."; + $error[2] = "The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the html form."; + $error[3] = "The uploaded file was only partially uploaded"; + $error[4] = "No file was uploaded"; + // end http errors + $error[10] = "Please select a file for upload."; + $error[11] = "Only files with the following extensions are allowed: ".$this->ext_string.""; + $error[12] = "Sorry, the filename contains invalid characters. Use only alphanumerical chars and separate parts of the name (if needed) with an underscore. A valid filename ends with one dot followed by the extension."; + $error[13] = "The filename exceeds the maximum length of ".$this->max_length_filename." characters."; + $error[14] = "Sorry, the upload directory doesn't exist!"; + $error[15] = "Uploading ".$this->the_file."...Error! Sorry, a file with this name already exitst."; + + } + return $error[$err_num]; + } + function show_error_string() { + $msg_string = ""; + foreach ($this->message as $value) { + $msg_string .= $value."
\n"; + } + return $msg_string; + } + function upload() { + if ($this->check_file_name()) { + if ($this->validateExtension()) { + if (is_uploaded_file($this->the_temp_file)) { + // this check/conversion is used for unique filenames + $this->file_copy = ($this->rename_file) ? strtotime("now").$this->get_extension($this->the_file) : $this->the_file; + if ($this->move_upload($this->the_temp_file, $this->file_copy)) { + $this->message[] = $this->error_text($this->http_error); + return true; + } + } else { + $this->message[] = $this->error_text($this->http_error); + return false; + } + } else { + $this->show_extensions(); + $this->message[] = $this->error_text(11); + return false; + } + } else { + return false; + } + } + function check_file_name() { + if ($this->the_file != "") { + if (strlen($this->the_file) > $this->max_length_filename) { + $this->message[] = $this->error_text(13); + return false; + } else { + if ($this->do_filename_check == "y") { + if (ereg("^[a-zA-z0-9_]*\.[a-zA-az]{3,4}$", $this->the_file)) { + return true; + } else { + $this->message[] = $this->error_text(12); + return false; + } + } else { + return true; + } + } + } else { + $this->message[] = $this->error_text(10); + return false; + } + } + function get_extension($from_file) { + $ext = strtolower(strrchr($from_file,".")); + return $ext; + } + function validateExtension() { + $extension = $this->get_extension($this->the_file); + $ext_array = $this->extensions; + if (in_array($extension, $ext_array)) { + return true; + } else { + return false; + } + } + // this method is only used for detailed error reporting + function show_extensions() { + $this->ext_string = implode(" ", $this->extensions); + } + function move_upload($tmp_file, $new_file) { + umask(0); + if ($this->existing_file()) { + $newfile = $this->upload_dir.$new_file; + if ($this->check_dir()) { + if (move_uploaded_file($tmp_file, $newfile)) { + if ($this->replace == "y") { + system("chmod 0777 $newfile"); + } else { + system("chmod 0755 $newfile"); + } + return true; + } else { + return false; + } + } else { + $this->message[] = $this->error_text(14); + return false; + } + } else { + $this->message[] = $this->error_text(15); + return false; + } + } + function check_dir() { + if (!is_dir($this->upload_dir)) { + return false; + } else { + return true; + } + } + function existing_file() { + if ($this->replace == "y") { + return true; + } else { + if (file_exists($this->upload_dir.$this->the_file)) { + return false; + } else { + return true; + } + } + } +} +?> \ No newline at end of file diff --git a/ampliar.php b/ampliar.php new file mode 100644 index 0000000..6285de2 --- /dev/null +++ b/ampliar.php @@ -0,0 +1,17 @@ + + + + +clave audio + + + + + + + + + +
NUESTRAS SALAS
+ + \ No newline at end of file diff --git a/articulos.php b/articulos.php new file mode 100644 index 0000000..827bdaf --- /dev/null +++ b/articulos.php @@ -0,0 +1,172 @@ + + + + + +clave audio + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ +
+
+
+
+

+ +
+ ", stripslashes($row['articulo_entradilla'])); ?>

+ ", + str_replace("[/N]", "", + str_replace("[I]", "", + str_replace("[/I]", "", + str_replace("\r", "
", + stripslashes($row['articulo_texto']) + ))))); ?>
+

+ +

+ 1) { + $preload = ''; + mysql_data_seek($result, 0); + // dibujo los thumbnails + for($cur_img = 0, $j = 1; $cur_img < $cuantas_imagenes; $cur_img++, $j++) { + $row_img = mysql_fetch_array($result); + $path_348 = '_pics/' . $row_img['galeria_imagen_name'] . '_348.jpg'; + $path_108 = '_pics/' . $row_img['galeria_imagen_name'] . '_108.jpg'; + if($cur_img > 0 && file_exists($path_348)) { + $preload = $preload . '\'$path_348\', '; +?> +
' : ''); ?> + +
' : ''); ?> + + + 1) + } // hay afotos + } // hay un articulo + } +?> +

+getNum()){ + echo $miBanner->getNextBanner(); + } +?> +
+ + \ No newline at end of file diff --git a/articulos2.php b/articulos2.php new file mode 100644 index 0000000..e16477a --- /dev/null +++ b/articulos2.php @@ -0,0 +1,172 @@ + + + + + +clave audio + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ +
+
+
+
+

+ +
+ ", stripslashes($row['articulo_entradilla'])); ?>

+ ", + str_replace("[/N]", "", + str_replace("[I]", "", + str_replace("[/I]", "", + str_replace("\r", "
", + stripslashes($row['articulo_texto']) + ))))); ?>
+

+ +

+ 1) { + $preload = ''; + mysql_data_seek($result, 0); + // dibujo los thumbnails + for($cur_img = 0, $j = 1; $cur_img < $cuantas_imagenes; $cur_img++, $j++) { + $row_img = mysql_fetch_array($result); + $path_348 = '_pics/' . $row_img['galeria_imagen_name'] . '_348.jpg'; + $path_108 = '_pics/' . $row_img['galeria_imagen_name'] . '_108.jpg'; + if($cur_img > 0 && file_exists($path_348)) { + $preload = $preload . '\'$path_348\', '; +?> +
' : ''); ?> + +
' : ''); ?> + + + 1) + } // hay afotos + } // hay un articulo + } +?> +

+getNum()){ + echo $miBanner->getNextBanner(); + } +?> +
+ + \ No newline at end of file diff --git a/articulos3.php b/articulos3.php new file mode 100644 index 0000000..df942ba --- /dev/null +++ b/articulos3.php @@ -0,0 +1,172 @@ + + + + + +clave audio + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ +
+
+ +
+
+
+
+

+ +
+ ", stripslashes($row['articulo_entradilla'])); ?>

+ ", + str_replace("[/N]", "", + str_replace("[I]", "", + str_replace("[/I]", "", + str_replace("\r", "
", + stripslashes($row['articulo_texto']) + ))))); ?>
+

+ +

+ 1) { + $preload = ''; + mysql_data_seek($result, 0); + // dibujo los thumbnails + for($cur_img = 0, $j = 1; $cur_img < $cuantas_imagenes; $cur_img++, $j++) { + $row_img = mysql_fetch_array($result); + $path_348 = '_pics/' . $row_img['galeria_imagen_name'] . '_348.jpg'; + $path_108 = '_pics/' . $row_img['galeria_imagen_name'] . '_108.jpg'; + if($cur_img > 0 && file_exists($path_348)) { + $preload = $preload . '\'$path_348\', '; +?> +
' : ''); ?> + +
' : ''); ?> + + + 1) + } // hay afotos + } // hay un articulo + } +?> +

+getNum()){ + echo $miBanner->getNextBanner(); + } +?> +
+ + \ No newline at end of file diff --git a/bann1.php b/bann1.php new file mode 100644 index 0000000..e84da23 --- /dev/null +++ b/bann1.php @@ -0,0 +1,11 @@ + + + + +
+
+
+
+

+
+
€'); ?>
diff --git a/bann2.php b/bann2.php new file mode 100644 index 0000000..ba1f883 --- /dev/null +++ b/bann2.php @@ -0,0 +1,19 @@ +
+ + + + + + + + + +
+
+
€'); ?>
+ +
+
+
+
+
\ No newline at end of file diff --git a/bann3.php b/bann3.php new file mode 100644 index 0000000..c438f0e --- /dev/null +++ b/bann3.php @@ -0,0 +1,10 @@ +
+
+ +
+
+
+

+
+
€'); ?>
+
\ No newline at end of file diff --git a/banner epson tw2000.jpg b/banner epson tw2000.jpg new file mode 100644 index 0000000..b7ba285 Binary files /dev/null and b/banner epson tw2000.jpg differ diff --git a/buscar.php b/buscar.php new file mode 100644 index 0000000..47033bb --- /dev/null +++ b/buscar.php @@ -0,0 +1,55 @@ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
BUSCAR 
+ diff --git a/carrito.php b/carrito.php new file mode 100644 index 0000000..149af99 --- /dev/null +++ b/carrito.php @@ -0,0 +1,90 @@ +itemcount; + $subTotal = $cart->total; + } else { + $numProducts = $subTotal = 0; + } +?> + + + + + + + + + +
su compra
+ + + + + + + + + + + +get_contents(); + foreach($items as $item) { +?> + + + + + + + + + + + + + + + + + + + +
1 ? ' productos' : ' producto'); ?> en su cesta
vaciar cesta
+ + + +' . $item['info']['marca'] . ' ' . $item['info']['modelo']; ?>
1) { ?> ( ud. a €) 
Subtotal:
+ = $GLOBALS['no_portes'] ? '¡ENVIO GRATUITO!' : ''); ?>
CONFIRMAR COMPRA 
+ Su cesta está vacía.
diff --git a/carrito_add.php b/carrito_add.php new file mode 100644 index 0000000..5cdb1b6 --- /dev/null +++ b/carrito_add.php @@ -0,0 +1,30 @@ +empty_cart(); + } else { + $cart->add_item($_REQUEST['id'], + 1, + $_REQUEST['precio'], + array( 'tipo'=>$_REQUEST['tipo'], + 'marca'=>$_REQUEST['marca'], + 'modelo'=>$_REQUEST['modelo'], + 'color'=>$_REQUEST['color'], + 'acabados'=>$_REQUEST['acabados'])); + } + header('Location: '.$HTTP_SERVER_VARS['HTTP_REFERER']); +?> \ No newline at end of file diff --git a/carrito_update.php b/carrito_update.php new file mode 100644 index 0000000..00f45a6 --- /dev/null +++ b/carrito_update.php @@ -0,0 +1,27 @@ +get_contents(); + foreach($items as $item) { + $cart->edit_item($item['id'], $_REQUEST['ud' . $item['id']]); + if(isset($_REQUEST['color' . $item['id']])) { + $item['info']['color'] = $_REQUEST['color' . $item['id']]; + $cart->edit_iteminfo($item['id'], $item['info']); + } + } + + header('Location: '.$HTTP_SERVER_VARS['HTTP_REFERER']); +?> \ No newline at end of file diff --git a/categorias.htm b/categorias.htm new file mode 100644 index 0000000..2f567e5 --- /dev/null +++ b/categorias.htm @@ -0,0 +1,73 @@ + \ No newline at end of file diff --git a/categorias.php b/categorias.php new file mode 100644 index 0000000..94ea7e2 --- /dev/null +++ b/categorias.php @@ -0,0 +1,82 @@ + + + diff --git a/categorias2.htm b/categorias2.htm new file mode 100644 index 0000000..ba89a2a --- /dev/null +++ b/categorias2.htm @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/clave.png b/clave.png new file mode 100644 index 0000000..c0fd5f0 Binary files /dev/null and b/clave.png differ diff --git a/clavefaq.php b/clavefaq.php new file mode 100644 index 0000000..41e8ad4 --- /dev/null +++ b/clavefaq.php @@ -0,0 +1,108 @@ + + + + + +clave audio + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + +
+ +
+
", str_replace("\n", "
", stripslashes($faq_pregunta))); ?>
+
+
 
+
+ +
+ + diff --git a/clavelegal.php b/clavelegal.php new file mode 100644 index 0000000..f986815 --- /dev/null +++ b/clavelegal.php @@ -0,0 +1,98 @@ + + + + +clave audio + + + + + + + + + + + + + + + + + + + + + + + + + +

+ +

Condiciones de uso de esta página web

+ 1.General
+ Utilizar esta página web presupone la aceptación de estas condiciones.

+ 2.Propiedad de esta página web
+ Esta página web es propiedad de Clave Audio S.L. Todos los derechos de su contenido ?(imágenes, textos y diseño?) son propiedad de Clave Audio S.L.

+ Todos los elementos de esta página, incluyendo sin limitaciones, su diseño y su contenido están protegidos por las leyes de la Propiedad Intelectual, Propiedad Industrial y tratados internacionales referidos a los Derecho de Autor.

+ 3.Uso de su contenido
+ A menos que sea explícitamente autorizado por Clave Audio S.L., usted no puede reproducir, transmitir o explotar el contenido de esta web de ningún modo.

+ 4.Responsabilidades
+ 4.1. A pesar de que Clave Audio S.L. pone el máximo esfuerzo en garantizar la precisión y exactitud en el contenido de esta página web, ésta puede contener errores o inexactitudes. Consecuentemente no garantizamos la veracidad, la fiabilidad o la exactitud de su contenido.

+ 4.2. Clave Audio S.L.rechaza cualquier responsabilidad sobre la información contenida en páginas web de terceras partes conectadas por enlaces (links), con las páginas web de Clave Audio S.L.

+ 4.3. Bajo ninguna circunstancia, Clave Audio S.L.será tenido como responsable de ningún daño o perjuicio de ningún tipo surgido de, o en relación, al uso de esta página web.

+ 4.4. Deberá indemnizar a Clave Audio S.L.contra cualquier daño o perjuicio que resulte del incumplimiento por su parte de las presentes condiciones o del uso del contenido de esta web sin previa autorización.

+ 5.Divisibilidad
+ Si alguna estipulación de las presentes condiciones carece o pasase a carecer de validez o resultara no ejecutable según el derecho aplicable, dicha estipulación no tendría efecto, pero solamente en la medida de esa precisa falta de validez, y no afectará a ninguna otra estipulación de las presentes condiciones.

+ 6.Legislación y jurisdicción aplicable
+ Estas condiciones de uso deben ser interpretadas y están regidas por la legislación española vigente. Cualquier disputa derivada de estas condiciones deberá dirimirse ante los tribunales de Madrid, España. No obstante, esto no impedirá a Clave Audio S.L. ejercer el derecho a resolver cualquier litigio en otra jurisdicción competente.

+ 7.Modificaciones
+ Clave Audio S.L.se reserva el derecho a cambiar el contenido de esta página web, en cualquier momento y sin aviso previo.

+ 8.Cookies
+ Con la intención de poder ofrecer un mejor servicio, ClaveAudio S.L. se reserva el derecho a usar cookies. + De ser utilizados, estos elementos no servirán para identificar a una persona concreta, sino para ofrecer un mejor servicio a los usuarios y permitir la realización de contenidos avanzados. + No se realizarán estudios comerciales ni darán información acerca de los hábitos de navegación de los usuarios.

+ El usuario podrá deshabilitar a través de las opciones de su navegador el uso de cookies, si bien Clave Audio S.L. no podrá garantizar, en dicho caso, el correcto funcionamiento de todos los servicios ofrecidos en esta Web. +

+ +

+ Política de Gestión de Datos de Carácter Personal

+ 1.General
+ Clave Audio S.L. garantiza expresamente que los datos que usted nos facilite son mantenidos con absoluta confidencialidad.

+ 2.Tratamiento de sus datos personales
+ Al objeto de procesar su pedido, requerimos que nos faciliten ciertos datos personales como el N.I.F., nombre y apellidos, dirección, teléfono y e-mail, datos que serán tratados de forma informatizada.Vd. autoriza a Clave Audio S.L. para el uso y tratamiento informático de los datos personales que facilite, que serán empleados para proporcionarle información de nuestras condiciones de distribución, la promoción de los productos y servicios de Clave Audio SL, y con fines históricos.

+ De conformidad con lo establecido en la Ley Orgánica 15/99, de 13 de Diciembre de Protección de Datos de Carácter Personal y en la normativa de desarollo, usted puede, en cualquier momento, ejercer su derecho de acceso, modificación o cancelación enviando un e-mail a datospersonales@claveaudio.com o mediante correo ordinario a nuestra dirección de contacto.

+ El tratamiento y gestión de los datos cumple lo estipulado en el Real Decreto 994/1999, de 11 de junio, por el que se aprueba el reglamento de medidas de seguridad de los ficheros automatizados que contengan datos de carácter personal.

+ Clave Audio S.L. no venderá, bajo ningún concepto, información sobre sus clientes a terceros ni cederá información alguna de sus datos.

+ 3.Datos de tarjetas de crédito
+ Clave Audio S.L.nunca tendrá acceso a los datos de su tarjeta de crédito. Dichos datos son recogidos y procesados directamente por el sistema de pago seguro del Banco Santander Central Hispano.

+ 4.Seguridad
+ Clave Audio S.L.toma todas las medidas necesarias para proteger la confidencialidad de su información personal. Únicamente aquellos empleados específicamente autorizados tienen acceso a las bases de datos que almacenan información del usuario o a los servidores que hospedan nuestro servicio.

+ 5.Modificaciones
+ Clave Audio S.L.se reserva el derecho de modificar su política de confidencialidad a causa de un cambio legislativo, jurisprudencial o de acuerdo con su criterio o práctica empresarial.

+ Para cualquier duda o aclaración referente a nuestra política de confidencialidad, por favor póngase en contacto con nosotros en datospersonales@claveaudio.com

+ +

+ Información requerida por la LSSI
+ A efectos de la LSSI (Ley de Servicios de la Sociedad de la Información y el Comercio Electrónico), resumimos seguidamente los datos oficiales de Clave Audio, S.L.

+ Datos de Contacto
Padilla, 68
28006 Madrid
91 401 63 07
info@claveaudio.com
http://www.claveaudio.com

+ Denominación:
Clave Audio S.L.

+ Núm. de identificación fiscal
B80475536

+ Datos Registrales
Sociedad inscrita en el Registro Mercantil de Madrid, en el Tomo 4.973, Libro 0, Folio 143, Sección 8, Hoja M-81332.

+
+ + diff --git a/clavemarcas.php b/clavemarcas.php new file mode 100644 index 0000000..084a93d --- /dev/null +++ b/clavemarcas.php @@ -0,0 +1,82 @@ + + + + +clave audio + + + + + + + + + + + + + + + + + + + + + + +

+
+ + + + + + + + + + +
+' : ''); + echo ''; + echo (strlen($faburl) ? '' : ''); + } else { + echo '
' . $fab_nombre; + } +?> +
+ + \ No newline at end of file diff --git a/clavemenu.php b/clavemenu.php new file mode 100644 index 0000000..30147d4 --- /dev/null +++ b/clavemenu.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/clavemenu2.php b/clavemenu2.php new file mode 100644 index 0000000..fb2e03e --- /dev/null +++ b/clavemenu2.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/clavequien.php b/clavequien.php new file mode 100644 index 0000000..6568232 --- /dev/null +++ b/clavequien.php @@ -0,0 +1,183 @@ + + + + +clave audio + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + + + + + + + + +
+ + + + + +
APASIONADOS POR LA MÚSICA + Y EL CINE
+ CLAVE AUDIO es una tienda especializada + en alta fidelidad, home cinema y sistemas multiroom.
+ + + + + + + + +
ALTA FIDELIDAD
+ Incluso en los tiempos de los sistemas de cine en casa, nosotros seguimos manteniendo una sala dedicada exclusivamente al estéreo, donde podemos encontrar los mejores equipos adaptados a todos los presupuestos.

+ Toda nuestra experiencia, junto con la oferta de prácticamente todas las marcas del mercado, hacen que podamos optimizar los resultados de los equipos que aconsejamos.
+
+ + + + + + +
 
+
+ Amplificadores a válvulas, integrados a transistores, conjuntos de previos y etapas, reproductores de cd, sacd, sintonizadores de radio, giradiscos, cableado de modulación, de altavoz, cajas acústicas, y todo tipo de accesorios para completar nuestros sistemas: muebles, conos y puntas de desacoplo, soportes, etc.
+ + + + + + + + + + + + + +
HOME CINEMA
Cómo + no, disponemos de salas de demostración de equipos multicanal: + Dolby Digital, DTS, etc., equipadas con monitores de plasma, TFT, + y lo último + en tecnología de videoproyección. + + Sistemas + de todos los presupuestos, adaptados también, si es necesario, + a los compromisos de decoración: altavoces de columna, monitores + de estantería, empotrables, de diseño, etc.
+
+ Y, por supuesto, + siempre sin comprometer el resultado final de los sistemas.
+ + + + + + + + + + + + + +
SISTEMAS MULTI-ROOM
En + numerosas ocasiones trabajamos a la par con arquitectos y decoradores, + en proyectos en los que nos encargamos de sonorizar distintas + salas de una vivienda.
+
+ Para eso se ha creado el concepto "multiroom", en el que un sistema colocado +en un lugar determinado es capaz de enviar sonido a las distintas habitaciones, +desde las que, mediante un sencillo teclado situado junto al interruptor de la +luz, podremos escoger el tipo de música y el volumen adecuado, todo ello +independientemente de las otras estancias, en las que otros miembros de la familia +pueden disfrutar simultáneamente de otras fuentes de audio.
+

+ En este mismo apartado podemos incluir sistemas domóticos, de seguridad, +y todo lo que rodea el entorno electrónico de una vivienda.
+ + + + + + + + + +
VENGA A VISITARNOS
Como + el concepto de "Tienda especializada" no es del todo conocido + en nuestro país, invitamos a quien esté interesado, + a que nos haga una visita para comprobarlo.
+
  + + + + + + + + + + + + + +
    +
  • Distribuidor zona centro de la serie exclusiva B&W 800.
  • +
  • La oferta más amplia en altavoces de todos los presupuestos.
  • +
  • Demostración permanente de sistemas de altavoces empotrados.
  • +
  • Más de 16 años experimentando con todo tipo de combinaciones entre distintos componentes, conociendo cuáles son los mejores accesorios para su equipo.
  • +
  • Especialistas en la integración de todos los sistemas instalados, incluyendo proyectos de domótica y multiroom.
  • +
  • Programación de mandos a distancia.
  • +
  • Especialistas en Alta Fidelidad y Home Cinema.
  • +
+
+

 

+ + diff --git a/consultar.php b/consultar.php new file mode 100644 index 0000000..8a4db03 --- /dev/null +++ b/consultar.php @@ -0,0 +1,92 @@ + + + + + + + +clave audio + + + + + + + + +
SOLICITUD DE INFORMACIÓN
+
+
+ +
+ + + + + + + + + + +
 Los datos que introduce en este formulario no se conservan en ninguna base de datos. Se utilizan para darle información detallada sobre nuestros productos.
+ Responderemos a su cuestión a la mayor brevedad posible.
Su email:
Su consulta:
+  
+
+ + + \ No newline at end of file diff --git a/curio.htm b/curio.htm new file mode 100644 index 0000000..ae4f922 --- /dev/null +++ b/curio.htm @@ -0,0 +1 @@ +
Tal vez por criterios puramente técnicos, también por estéticos, y por qué no, por satisfacer impulsos excéntricos de constructor o usuario, más de un fabricante saca al mercado artículos “diferentes”. En esta sección presentamos productos de Alta Fidelidad que se salen un poco de la norma. Por una vez, y sin que sirva de precedente, aparecen en nuestra web sin tener en cuenta su sonido. Agradeceremos colaboraciones, fotos, links, etc, que nos ayuden a engrosar esta sección que nos hará pasar un buen rato. Divirtámonos un poco…
\ No newline at end of file diff --git a/db.php b/db.php new file mode 100644 index 0000000..672ff40 --- /dev/null +++ b/db.php @@ -0,0 +1,13 @@ + \ No newline at end of file diff --git a/faq.php b/faq.php new file mode 100644 index 0000000..f5adc36 --- /dev/null +++ b/faq.php @@ -0,0 +1,78 @@ + + + + + + + + + + +
+ +
+
", str_replace("\n", "
", stripslashes($faq_pregunta))); ?>
+
+
 
+
+ + + + diff --git a/firma.html b/firma.html new file mode 100644 index 0000000..c77900e --- /dev/null +++ b/firma.html @@ -0,0 +1,5 @@ + + + + +
Padilla, 68
28006 MADRID
Tel. 91 401 63 07
Fax 91 402 79 48
diff --git a/images/Untitled-1_01.gif b/images/Untitled-1_01.gif new file mode 100644 index 0000000..8f9fb48 Binary files /dev/null and b/images/Untitled-1_01.gif differ diff --git a/images/Untitled-1_02.gif b/images/Untitled-1_02.gif new file mode 100644 index 0000000..3e979ef Binary files /dev/null and b/images/Untitled-1_02.gif differ diff --git a/images/Untitled-1_03.gif b/images/Untitled-1_03.gif new file mode 100644 index 0000000..0e9b17c Binary files /dev/null and b/images/Untitled-1_03.gif differ diff --git a/images/Untitled-1_04.gif b/images/Untitled-1_04.gif new file mode 100644 index 0000000..47f557e Binary files /dev/null and b/images/Untitled-1_04.gif differ diff --git a/images/Untitled-1_05.gif b/images/Untitled-1_05.gif new file mode 100644 index 0000000..805b92d Binary files /dev/null and b/images/Untitled-1_05.gif differ diff --git a/images/Untitled-1_06.gif b/images/Untitled-1_06.gif new file mode 100644 index 0000000..3556978 Binary files /dev/null and b/images/Untitled-1_06.gif differ diff --git a/images/Untitled-1_07.gif b/images/Untitled-1_07.gif new file mode 100644 index 0000000..6c0ec88 Binary files /dev/null and b/images/Untitled-1_07.gif differ diff --git a/images/Untitled-1_08.gif b/images/Untitled-1_08.gif new file mode 100644 index 0000000..b33fc36 Binary files /dev/null and b/images/Untitled-1_08.gif differ diff --git a/images/Untitled-1_09.gif b/images/Untitled-1_09.gif new file mode 100644 index 0000000..8569dc5 Binary files /dev/null and b/images/Untitled-1_09.gif differ diff --git a/images/Untitled-1_10.gif b/images/Untitled-1_10.gif new file mode 100644 index 0000000..357c65c Binary files /dev/null and b/images/Untitled-1_10.gif differ diff --git a/images/Untitled-1_11.gif b/images/Untitled-1_11.gif new file mode 100644 index 0000000..3dfcb28 Binary files /dev/null and b/images/Untitled-1_11.gif differ diff --git a/images/Untitled-1_12.gif b/images/Untitled-1_12.gif new file mode 100644 index 0000000..8701cf1 Binary files /dev/null and b/images/Untitled-1_12.gif differ diff --git a/images/Untitled-1_13.gif b/images/Untitled-1_13.gif new file mode 100644 index 0000000..2b25740 Binary files /dev/null and b/images/Untitled-1_13.gif differ diff --git a/images/Untitled-1_14.gif b/images/Untitled-1_14.gif new file mode 100644 index 0000000..dada166 Binary files /dev/null and b/images/Untitled-1_14.gif differ diff --git a/images/Untitled-1_15.gif b/images/Untitled-1_15.gif new file mode 100644 index 0000000..e6c24d7 Binary files /dev/null and b/images/Untitled-1_15.gif differ diff --git a/images/Untitled-1_16.gif b/images/Untitled-1_16.gif new file mode 100644 index 0000000..cbc68cd Binary files /dev/null and b/images/Untitled-1_16.gif differ diff --git a/images/Untitled-1_17.gif b/images/Untitled-1_17.gif new file mode 100644 index 0000000..a3d9e27 Binary files /dev/null and b/images/Untitled-1_17.gif differ diff --git a/images/Untitled-1_18.gif b/images/Untitled-1_18.gif new file mode 100644 index 0000000..b242703 Binary files /dev/null and b/images/Untitled-1_18.gif differ diff --git a/images/Untitled-1_19.gif b/images/Untitled-1_19.gif new file mode 100644 index 0000000..e3f3a1b Binary files /dev/null and b/images/Untitled-1_19.gif differ diff --git a/images/Untitled-1_20.gif b/images/Untitled-1_20.gif new file mode 100644 index 0000000..c322dc3 Binary files /dev/null and b/images/Untitled-1_20.gif differ diff --git a/images/Untitled-1_21.gif b/images/Untitled-1_21.gif new file mode 100644 index 0000000..1e7d71a Binary files /dev/null and b/images/Untitled-1_21.gif differ diff --git a/images/Untitled-1_22.gif b/images/Untitled-1_22.gif new file mode 100644 index 0000000..8e137eb Binary files /dev/null and b/images/Untitled-1_22.gif differ diff --git a/images/Untitled-1_23.gif b/images/Untitled-1_23.gif new file mode 100644 index 0000000..7580488 Binary files /dev/null and b/images/Untitled-1_23.gif differ diff --git a/images/Untitled-1_24.gif b/images/Untitled-1_24.gif new file mode 100644 index 0000000..19e1497 Binary files /dev/null and b/images/Untitled-1_24.gif differ diff --git a/images/Untitled-1_25.gif b/images/Untitled-1_25.gif new file mode 100644 index 0000000..b2f90cd Binary files /dev/null and b/images/Untitled-1_25.gif differ diff --git a/images/banners_01.png b/images/banners_01.png new file mode 100644 index 0000000..e4c1405 Binary files /dev/null and b/images/banners_01.png differ diff --git a/images/banners_02.png b/images/banners_02.png new file mode 100644 index 0000000..f638361 Binary files /dev/null and b/images/banners_02.png differ diff --git a/images/banners_04.jpg b/images/banners_04.jpg new file mode 100644 index 0000000..dbed644 Binary files /dev/null and b/images/banners_04.jpg differ diff --git a/images/banners_05.gif b/images/banners_05.gif new file mode 100644 index 0000000..82e3fe4 Binary files /dev/null and b/images/banners_05.gif differ diff --git a/images/right_01.gif b/images/right_01.gif new file mode 100644 index 0000000..67baaec Binary files /dev/null and b/images/right_01.gif differ diff --git a/images/right_02.gif b/images/right_02.gif new file mode 100644 index 0000000..b2dc266 Binary files /dev/null and b/images/right_02.gif differ diff --git a/images/right_03.gif b/images/right_03.gif new file mode 100644 index 0000000..1c3a54c Binary files /dev/null and b/images/right_03.gif differ diff --git a/images/right_04.jpg b/images/right_04.jpg new file mode 100644 index 0000000..455face Binary files /dev/null and b/images/right_04.jpg differ diff --git a/images/right_05.gif b/images/right_05.gif new file mode 100644 index 0000000..76da1a6 Binary files /dev/null and b/images/right_05.gif differ diff --git a/images/right_06.jpg b/images/right_06.jpg new file mode 100644 index 0000000..1309950 Binary files /dev/null and b/images/right_06.jpg differ diff --git a/images/right_07.gif b/images/right_07.gif new file mode 100644 index 0000000..056068e Binary files /dev/null and b/images/right_07.gif differ diff --git a/images/right_08.jpg b/images/right_08.jpg new file mode 100644 index 0000000..6c571db Binary files /dev/null and b/images/right_08.jpg differ diff --git a/images/right_09.gif b/images/right_09.gif new file mode 100644 index 0000000..17b7134 Binary files /dev/null and b/images/right_09.gif differ diff --git a/images/right_10.jpg b/images/right_10.jpg new file mode 100644 index 0000000..c1f7594 Binary files /dev/null and b/images/right_10.jpg differ diff --git a/images/spacer.gif b/images/spacer.gif new file mode 100644 index 0000000..5bfd67a Binary files /dev/null and b/images/spacer.gif differ diff --git a/index.php b/index.php new file mode 100644 index 0000000..40aa191 --- /dev/null +++ b/index.php @@ -0,0 +1,285 @@ + + + + +clave audio + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + + + + + +
tienda
+ + + + + + + + + +
+ + + + + + +
RecomendamosOcasiónCuriosidades
+
+
+
+getNum()){ + $arrayOferta = $miOferta->getNextOferta(); + include('bann1.php'); + } +?> +
+
+
+getNum() > 1){ + $arrayOferta = $miOferta->getNextOferta(); + include('bann1.php'); + } +?> +
+
+ + + + + +
+ +
+ + + + + + + + + + + + + +
novedades
+
+ [+]
+ + + +
+ + + + +getNum()){ +?> + + + + + + + + + + +
+ getNum()) + echo $miBanner->getNextBanner(); + ?> +
+ + +
+ + + + +
+ + diff --git a/index_new.php b/index_new.php new file mode 100644 index 0000000..5ec43ff --- /dev/null +++ b/index_new.php @@ -0,0 +1,260 @@ + + + + +clave audio + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ + + + + + + + + +
tienda
+ + + + + + + + + +
+ + + + + + +
RecomendamosLearning CenterCuriosidades
+
+
+
+getNum()){ + $arrayOferta = $miOferta->getNextOferta(); + include('bann1.php'); + } +?> +
+
+
+getNum() > 1){ + $arrayOferta = $miOferta->getNextOferta(); + include('bann1.php'); + } +?> +
+
+ + + + + +
+ +
+ + + + + + + + + + + + + +
novedades
+
+ [+]
+ + + +
+ + + + + + + + + + + + +
+ getNum()) + echo $miBanner->getNextBanner(); + ?> +
+ + +
+ + + + +
+ + diff --git a/marcas.htm b/marcas.htm new file mode 100644 index 0000000..66cb03e --- /dev/null +++ b/marcas.htm @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ocasion.php b/ocasion.php new file mode 100644 index 0000000..770bd9f --- /dev/null +++ b/ocasion.php @@ -0,0 +1,199 @@ + 0 + ORDER BY ocasion_categoria, ocasion_id'; + + $result = mysql_query($query, $conn); + if($result) { + $numProductos = mysql_num_rows($result); + $topLabel = 'Tienda > Material de Ocasión'; + } + } + +// #################################################### +// llegados a este punto sabemos en que estado esta la pagina +// tenemos, incluso, los resultados de la busqueda, if any +?> + + + + + +clave audio + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ +
+ +
+
+ + + + + + + + + + + +

+getNum()){ + $arrayOferta = $miOferta->getNextOferta(); + include('bann2.php'); +?> +
+ + + + + +
Este es un listado parcial de productos en oferta.
Los productos que aparecen a continuación proceden tanto de material de exposición como material recogido a nuestros clientes. También, en algunos casos, se trata de modelos descatalogados. En cualquier caso, todos ellos han sido revisados por nosotros y están garantizados por un período mínimo de tres meses.
+ Estos precios incluyen IVA. +
+ + + + + + + + + + + + + + + + + + +    25 ? '...' : ''); ?> + + +*/ +?> + + + +
PVPOferta
' . $ocasion_estado . ')': "") . (strlen($ocasion_descripcion) ? '
' . $ocasion_descripcion . '': "") ; ?>
' . $prod_fab_id . ' ' . $prod_modelo . ''; ?>CONSULTAR' : miNumberFormat($prod_precio) . '€'); ?>
+ +
+ + \ No newline at end of file diff --git a/ocasion_add.php b/ocasion_add.php new file mode 100644 index 0000000..c8e3b4e --- /dev/null +++ b/ocasion_add.php @@ -0,0 +1,39 @@ +add_item($_REQUEST['id'], + 1, + $_REQUEST['precio'], + array( 'tipo'=>'OCASION', + 'marca'=>'', + 'modelo'=>$_REQUEST['modelo'], + 'color'=>'', + 'acabados'=>'')); + + // elimino el producto de la lista + $conn = db_connect(); + if($conn) { + $query = 'SELECT ocasion_unidades FROM shoop_ocasion WHERE ocasion_id = ' . $_REQUEST['id']; + $result = mysql_query($query); + if($result) { + $row = mysql_fetch_array($result); + $cuantos = $row['ocasion_unidades'] - 1; + $query = 'UPDATE shoop_ocasion SET ocasion_unidades="' . $cuantos . '" WHERE ocasion_id = ' . $_REQUEST['id']; + $result = mysql_query($query); + } + } + header('Location: ' . $HTTP_SERVER_VARS['HTTP_REFERER']); +?> \ No newline at end of file diff --git a/oferta.png b/oferta.png new file mode 100644 index 0000000..cd2f019 Binary files /dev/null and b/oferta.png differ diff --git a/ped.php b/ped.php new file mode 100644 index 0000000..d515095 --- /dev/null +++ b/ped.php @@ -0,0 +1,41 @@ +sessionRegistered()){ + Header('Location:' . $SESSION_LOGIN_PAGE); + exit; + } + } +} + + +if(isset($_REQUEST['op'])){ + $operacion = $_REQUEST['op']; + $rec_id = $_REQUEST['id']; + + if($operacion == 'dal') { + $db = new datosClass($DATA_USER, $DATA_PWD, $DATA_DATABASE, $DATA_HOST); + if($db) { + $db->query('DELETE FROM shoop_pedidos WHERE pedido_id = ' . $rec_id); + $db->query('DELETE FROM shoop_pedi_productos WHERE pp_id_pedido = ' . $rec_id); + $db->query('DELETE FROM shoop_clientes WHERE cliente_id = ' . $rec_id ); + } + } +} + +header('Location:pedidos.php'); +?> \ No newline at end of file diff --git a/ped_v_1.php b/ped_v_1.php new file mode 100644 index 0000000..628520c --- /dev/null +++ b/ped_v_1.php @@ -0,0 +1,23 @@ + \ No newline at end of file diff --git a/ped_v_end.php b/ped_v_end.php new file mode 100644 index 0000000..87d1e69 --- /dev/null +++ b/ped_v_end.php @@ -0,0 +1,7 @@ + \ No newline at end of file diff --git a/ped_v_ok.php b/ped_v_ok.php new file mode 100644 index 0000000..875fd0c --- /dev/null +++ b/ped_v_ok.php @@ -0,0 +1,77 @@ +'; + echo $result; + } + } + +?> \ No newline at end of file diff --git a/ped_v_start.php b/ped_v_start.php new file mode 100644 index 0000000..d6954d1 --- /dev/null +++ b/ped_v_start.php @@ -0,0 +1,37 @@ + \ No newline at end of file diff --git a/ped_v_wrong.php b/ped_v_wrong.php new file mode 100644 index 0000000..e69de29 diff --git a/pedido.php b/pedido.php new file mode 100644 index 0000000..016a5a2 --- /dev/null +++ b/pedido.php @@ -0,0 +1,217 @@ + + + + + +clave audio + + + + + + + + + + + + + + + + + + + + + + + + +
+= 2 AND faq_seccion <=4 ORDER BY RAND() LIMIT 1 "; + $result = mysql_query($query, $conn); + if($result) { + $row = mysql_fetch_array($result); +?> +
¿?
+ +


+ +

1. Este es el contenido de su cesta de la compra.
+Antes de continuar compruebe que los productos, cantidades y, si corresponde, los acabados son correctos. Si desea eliminar algún producto de la cesta cambie la cantidad a 0 (cero).

+itemcount; + $subTotal = $cart->total; + } else { + $numProducts = $subTotal = 0; + } + + if($numProducts) { + $items = $cart->get_contents(); +?> +
+ + + + + + + + + + + + + + + + + + + + += $GLOBALS['no_portes']) { +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Ud.ProductoAcabadosPVP Ud. Subtotal
+ + +
Total:
IVA y Gastos de envío incluidos.
Subtotal:
Gastos de envío:
Total:
IVA incluido.
+ Si ha modificado el pedido haga clic en este botón  
+
+ + + Su cesta está vacía. + +
+

2. Indíquenos ahora sus datos y la dirección donde desea que le enviemos el pedido. +

+
+
+
+ +
+
+
+ +
+
+

3. Por último, seleccione la forma de pago para su pedido.
En la siguiente pantalla podrá ver los detalles de pago.

+ + Tarjeta de Crédito   + Transferencia Bancaria

+
+
+
+ + + + + + + + + + diff --git a/pedido2.php b/pedido2.php new file mode 100644 index 0000000..56c9452 --- /dev/null +++ b/pedido2.php @@ -0,0 +1,216 @@ + + + + + +clave audio + + + + + + + + + + + + + + + + + + + + + + + + +
+= 2 AND faq_seccion <=4 ORDER BY RAND() LIMIT 1 "; + $result = mysql_query($query, $conn); + if($result) { + $row = mysql_fetch_array($result); +?> +
¿?
+ +


+ +

1. Este es el contenido de su cesta de la compra.
+Antes de continuar compruebe que los productos, cantidades y, si corresponde, los acabados son correctos. Si desea eliminar algún producto de la cesta cambie la cantidad a 0 (cero).

+itemcount; + $subTotal = $cart->total; + } else { + $numProducts = $subTotal = 0; + } + + if($numProducts) { + $items = $cart->get_contents(); +?> +
+ + + + + + + + + + + + + + + + + + + + += $GLOBALS['no_portes']) { +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Ud.ProductoAcabadosPVP Ud. Subtotal
+ + +
Total:
IVA y Gastos de envío incluidos.
Subtotal:
Gastos de envío:
Total:
IVA incluido.
+ Si ha modificado el pedido haga clic en este botón  
+
+ + + Su cesta está vacía. + +
+

2. Indíquenos ahora sus datos y la dirección donde desea que le enviemos el pedido. +

+
+
+
+ +
+
+
+ +
+
+

3. Por último, seleccione la forma de pago para su pedido.
En la siguiente pantalla podrá ver los detalles de pago.

+ + Transferencia Bancaria  Tarjeta de Crédito

+
+
+
+ + + + + + + + + + diff --git a/pedido_ok.php b/pedido_ok.php new file mode 100644 index 0000000..3964ca0 --- /dev/null +++ b/pedido_ok.php @@ -0,0 +1,302 @@ + + + + + + +clave audio + + + + + + + + + + + + + + + + + + + + + + + + +
+= 2 AND faq_seccion <=4 ORDER BY RAND() LIMIT 1 "; + $result = mysql_query($query, $conn); + if($result) { + $row = mysql_fetch_array($result); +?> +
¿?
+ + +


+

+itemcount; + $subTotal = $cart->total; + } else { + +// #################################################### +// OJO: como he llegado aqui sin pedido? + } + if(isset($_SESSION['clave.cliente'])) { + $pedidoID = $_SESSION['clave.pedido']; + $clienteID = $_SESSION['clave.cliente']; + $formapago = $_SESSION['clave.pago']; + } + + $conn = db_connect(); + if(!$conn) { + // no tengo conexion + echo '

Ha ocurrido un error intentando conectsar con la base de datos. Intentelo de nuevo pasados unos minutos o pongase en contacto con nosotros en el teléfono 91 401 63 07'; + exit; + } + +?> + + +

Sistema 4B nos confirma que su pago ha sido realizado.

+ +

Imprima esta página como referencia de su pedido. Contiene información importante que puede necesitar más adelante.

+ +

El pedido se considera en firme una vez se ha recibido el pago, bien mediante transferencia, bien mediante pago eletrónico.

+ +

Su número de pedido es el . Utilice este número para cualquier comunicación o consulta sobre el mismo.

+ +

1. Esta es la dirección donde enviaremos su pedido.

+' . $row['cliente_nombre'] . '
'; + echo $row['cliente_direccion'] . '
'; + echo $row['cliente_codigopostal'] . ' ' . $row['cliente_localidad'] . '
'; + echo (strlen ($row['cliente_provincia']) ? $row['cliente_provincia'] . '
' : ''); + echo '
'; + echo (strlen ($row['cliente_telefono']) ? 'Teléfono: ' . $row['cliente_telefono'] . '
' : ''); + echo (strlen ($row['cliente_fax']) ? 'Fax: ' . $row['cliente_fax'] . '
' : ''); + echo (strlen ($row['cliente_email']) ? 'email: ' . $row['cliente_email'] . '
' : ''); + } else { + echo 'Ha ocurrido un error leyendo los datos del cliente'; + } +?> +

+

2. Este es el detalle de su pedido.
+ + + + + + + + +
Ud.ProductoPVP Ud. Subtotal
+ + + + + + + += $GLOBALS['no_portes']) { +?> + + + + + + + + + + + + + + + + + + + + + + + + +
Total:
IVA y Gastos de envío incluidos.
Subtotal:
Gastos de envío:
Total:
IVA incluido.
+ +
+

+ + +

3. Ha elegido, como forma de pago, + +Transferencia Bancaria.
+
+Para formalizar el pedido debe hacer una transferencia por un importe de a la cuenta número 0049 5114 91 2116111854 del Banco Santander Central Hispano.
+
+Indique como referencia el código "Pedido "
+
+Una vez realizada la transferencia envíenos una copia del justificante de la misma a la dirección de email info@claveaudio.com (si es una transferencia electrónica) o al número de fax 91 402 79 48. + +Tarjeta de Crédito.
+
+Para formalizar el pedido sólo necesita utilizar el sistema de pago seguro 4B.

+Haga clic en el enlace 'Realizar pago' para acceder al sistema de pago seguro y completar el pedido.
+
+Será redirigido al servidor de pago seguro de Sistema 4B donde se le solicitarán los datos de su tarjeta de crédito. ClaveAudio no tendrá acceso en ningún momento a dichos datos. +

+

+ + + +
+

+ + +
+ + + + + + + + \ No newline at end of file diff --git a/pedido_procesa.php b/pedido_procesa.php new file mode 100644 index 0000000..eeb59f6 --- /dev/null +++ b/pedido_procesa.php @@ -0,0 +1,225 @@ +IsSMTP(); // set mailer to use SMTP + $mail->Host = "mail.claveaudio.com"; // specify main and backup server + $mail->SMTPAuth = true; // turn on SMTP authentication + $mail->Username = "webbot@claveaudio.com"; // SMTP username + $mail->Password = "IB425"; // SMTP password + + $mail->From = "claveaudio@claveaudio.com"; + $mail->FromName = "Clave Audio"; + $mail->AddAddress($direccion1); + $mail->AddReplyTo("info@claveaudio.com"); + + $mail->IsHTML(false); // set email format to HTML + + $mail->Subject = "Se ha realizado el siguiente pedido:\n\n\n"; + $mail->Body = $body . "\n\n"; + + if(!$mail->Send()) + { +/* + echo "Message could not be sent.

"; + echo "Mailer Error: " . $mail->ErrorInfo; +*/ + return false; + } else { +/* + echo "Message has been sent to " . $emailTo; +*/ + return true; + } +} + +// #################################################### +// cargo el carrito o lo creo nuevo si fuera menester + + $cart =& $_SESSION['cart']; + if(!is_object($cart)) $cart = new wfCart(); + + $numProducts = 0; + $subTotal = 0; + + if(is_object($cart)) { + $numProducts = $cart->itemcount; + $subTotal = $cart->total; + } else { + Header("Location:" . $_SERVER["HTTP_REFERER"]); + exit; +// #################################################### +// OJO: como he llegado aqui sin pedido? + } + + if($numProducts) { + + $conn = db_connect(); + if($conn) { + +// #################################################### +// por un lado tengo los datos del cliente. + $cliente = creaCliente($conn, $_REQUEST, &$cuerpo); + + if($cliente) { + $formaPago = $_REQUEST['formapago']; + $pedidoID = creaPedido($conn, $cliente, $formaPago, &$cuerpo); + +// #################################################### +// por otro lado tengo el pedido + if($pedidoID) { + $totalPedido = 0; + $items = $cart->get_contents(); + foreach($items as $item) { + creaLineaPedido($conn, $pedidoID, $item, &$cuerpo); + $totalPedido += $item['subtotal']; + } // foreach item + // todo ok. guardo el numero de cliente, el de pedido y la forma de pago en sendas variables de sesion y voy a la salida de la tienda + + $cuerpo .= 'Subtotal del pedido: ' . $totalPedido; + + $_SESSION['clave.cliente'] = $cliente; + $_SESSION['clave.pedido'] = $pedidoID; + $_SESSION['clave.pago'] = $formaPago; + + // e informo a la tienda + notifica($cuerpo, 'info@claveaudio.com'); + + Header("Location:pedido_ok.php"); + + } else { // si se ha creado el pedido + // el pedido no se ha creado + + } + } else {// si se ha creado el cliente + // el cliente no se ha creado + } + } else { + // no hay conexion + } + } else { // if $numProductos + // no hay productos + Header("Location:" . $_SERVER["HTTP_REFERER"]); + } +?> \ No newline at end of file diff --git a/phpinfo.php b/phpinfo.php new file mode 100644 index 0000000..89b68b9 --- /dev/null +++ b/phpinfo.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/pie.htm b/pie.htm new file mode 100644 index 0000000..df0056d --- /dev/null +++ b/pie.htm @@ -0,0 +1,5 @@ +

| home | novedades | tienda | ocasión |
+| quiénes somos | learning center | instalaciones | curiosidades | contacto |
+© Clave Audio, S.L. 2005 - 2008 • Padilla, 68 • +28006 Madrid • 91 401 63 07Información LSSI y Protección +de Datos
diff --git a/producto.php b/producto.php new file mode 100644 index 0000000..fb0c827 --- /dev/null +++ b/producto.php @@ -0,0 +1,234 @@ +' . 'Tienda > ' . $seccion_nombre . ' > ' . $cat_nombre . ''; + } +} +?> + + + + + +clave audio + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ +
+ +
+
+


+ + 0) { +?> + + + + + + + + + + + + + + + + + 0) { +?> + + +
+
+
+ '); ?>
+
+ +
+ +
+ find_item($prod_id)) echo $cart->find_item($prod_id) . ' unidad' . ($cart->find_item($prod_id) > 1 ? 'es' : '') . ' en su cesta'; ?>
+
+
+
+ + + + + + + + + + + + + + + + + + + + +
DESCRIPCIÓN
", htmlentities(stripslashes($prod_intro))); ?>
Dimensiones: ' . $prod_dimensiones; ?>
Peso: ' . $prod_peso; ?>
Volumen: ' . $prod_volumen; ?>
' . $row['catop_label'] . ': ' . $row['procat_valor']; ?>
+
+ ventajas +
+ + diff --git a/tienda.php b/tienda.php new file mode 100644 index 0000000..8b1bae8 --- /dev/null +++ b/tienda.php @@ -0,0 +1,382 @@ +'; + +} else { +// #################################################### +// si no estoy en el indice hago aqui la busqueda en funcion de lo que ha pedido el usuario +// la hago en este momento porque saco el dato de secci—n del primer registro, en lugar de hacer +// dos busquedas, uno para obtener ese dato y otra para obtener el contenido de la pagina + + $result = false; + $conn = db_connect(); + if($conn) { + $query = 'SELECT prod_id, seccion_nombre, cat_nombre, fab_nombre, prod_modelo, prod_precio, prod_categoria_id + FROM shoop_secciones, shoop_productos, shoop_fabricantes, shoop_categorias + WHERE cat_seccion=seccion_code AND prod_fab_id=fab_id AND prod_categoria_id=cat_codigo ' . + (strlen($buscar_str) > 0 ? ' AND prod_modelo LIKE "%' . $buscar_str . '%" ' : '') . + (strlen($marcas_str) > 0 ? ' AND prod_fab_id=' . $marcas_str : '') . + (strlen($cat_str) > 0 ? ' AND prod_categoria_id="' . $cat_str . '"' : '') . + ' ORDER BY prod_categoria_id, fab_nombre, prod_modelo'; + + $result = mysql_query($query, $conn); + if($result) { + $numProductos = mysql_num_rows($result); + if($numProductos) { + $row = mysql_fetch_array($result); + + // por que no controlo el numero de resultados en este momento? + // para empezar asumo que la base siempre tendra datos y, entonces: + // si busco por categoria siempre tendre un resultado como minimo + // si busco por un fabricante lo mismo (mentira, puedo buscar por fabricante y texto, pero eso est‡ controlad + // por el hecho de que si el array est‡ vacio, row[fab_nombre]Êdevuelve ''; + // si busco por texto libre no me importa que no haya rows: en el label tengo el texto de busqueda + // en el interface es donde digo que no hay resultados. + + mysql_data_seek($result, 0); // rebobino para volver luego a leer en condiciones. + + if(strlen($buscar_str) + strlen($marcas_str) == 0){ + $estado = CATEGORIA; + $categoria_label = 'Tienda > ' . $row['seccion_nombre'] . ' > ' . $row['cat_nombre']; + } else { + $estado = BUSQUEDA; + $categoria_label = 'Tienda > Buscando: ' . (strlen($marcas_str) ? $row['fab_nombre'] . ' ' : '') . $buscar_str; + } + $topLabel = '' . $categoria_label . ''; + } else { + $topLabel = 'Tienda >'; + } + } else { // tengo un error!!!! + $topLabel = 'Ha ocurrido un error intentando conectar con el servidor'; + } + } +} +// #################################################### +// llegados a este punto sabemos en que estado esta la pagina +// tenemos, incluso, los resultados de la busqueda, if any +?> + + + + + +clave audio + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + +
+ +
+ +
+
+ + + + + + + + + + + +

+getNum()){ + $arrayOferta = $miOferta->getNextOferta(); + include('bann2.php'); + array_push($productos, $arrayOferta['id_modelo']); + if(strlen($cat_str)) $numProductos--; +?> +
+ + + + + + + +
Clave Audio lleva más de 13 años abierta al público en la calle Padilla, 68, en el centro de Madrid. Abrimos + ahora esta tienda on line con el deseo de que nuestros productos, profesionalidad y conocimientos lleguen a un mayor número de buenos aficionados al audio de alta calidad.
+
+ La tienda online no abarca el enorme catálogo de productos que podemos ofrecer. Si no encuentras un determinado producto, no dudes en consultarnos sobre precio y disponibilidad.

+ Condiciones de uso de la tienda
+ + +getNum() >= 3) { +?> + + + + + + + + + + + + + + + + + + + + + + +
+getNextOferta(); + include('bann3.php'); + array_push($productos, $arrayOferta['id_modelo']); + $numProductos--; +?> + +getNextOferta(); + include('bann3.php'); + array_push($productos, $arrayOferta['id_modelo']); + $numProductos-- +?> + +getNextOferta(); + include('bann3.php'); + array_push($productos, $arrayOferta['id_modelo']); + $numProductos-- +?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Otros productos en esta categoría...
Resultados de su Búsqueda por ""
    25 ? '...' : ''); ?>' . $prod_fab_id . ' ' . $prod_modelo . ''; ?>CONSULTAR' : miNumberFormat($prod_precio) . '€'); ?>
+ +
+ + \ No newline at end of file diff --git a/top.htm b/top.htm new file mode 100644 index 0000000..4a383cb --- /dev/null +++ b/top.htm @@ -0,0 +1,14 @@ + + + + + +