| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236 |
- <?php
- if (isset($_GET['pbusqueda'])) {
- $Pbusqueda = $_GET['pbusqueda'];
- //echo $Pbusqueda
- }else{
- header('Location: 404.php');
- }
- ?>
- <!DOCTYPE html>
- <!--[if IE 8 ]> <html xml:lang="es" lang="es" class="no-js ie8"> <![endif]-->
- <!--[if IE 9 ]> <html xml:lang="es" lang="es" class="no-js ie9"> <![endif]-->
- <html xml:lang="es" lang="es">
- <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
- <head>
- <!-- Global site tag (gtag.js) - Google Analytics -->
- <!--Producción-->
- <script async src="https://www.googletagmanager.com/gtag/js?id=UA-125019062-2"></script>
- <!--Producción-->
- <script>
- window.dataLayer = window.dataLayer || [];
- function gtag(){dataLayer.push(arguments);}
- gtag('js', new Date());
- gtag('config', 'UA-125019062-2');
- </script>
- <!-- End Global site tag (gtag.js) - Google Analytics -->
- <!-- [if IE]> -->
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
- <meta http-equiv="cleartype" content="on"/>
- <!-- <![endif] -->
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
- <title>Resultados de búsqueda</title>
- <meta name="keywords" content="Magento, Varien, E-commerce"/>
- <meta name="robots" content="INDEX,FOLLOW"/>
- <link rel="icon" href="https://statics.solerpalau.com/skin/frontend/solerpalau/default/favicon.ico" type="image/x-icon"/>
- <link rel="shortcut icon" href="https://statics.solerpalau.com/skin/frontend/solerpalau/default/favicon.ico" type="image/x-icon"/>
-
- <meta name="theme-color" content="#ffffff">
- <!-- bootstrap 4 -->
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.js"></script>
- <script type="text/javascript">
- var $j = jQuery.noConflict();
- </script>
- <script type="text/javascript" src="js/events.js"></script>
- <!-- estilo princripal -->
- <link rel="stylesheet" type="text/css" href="css/style-css01.css" media="all" />
- </head>
- <body class=" cms-page-view cms-produccion-distribucion-logistica level-2 customer-logged-out">
- <!-- aqui va el header -->
- <?php include 'header.php' ?>
- <script type="text/javascript">
- //<![CDATA[
- if (typeof HIB.menu == 'object' && typeof HIB.menu.init == 'function') {
- HIB.menu.init();
- }
- //]]>
- </script>
- <div class="main-container col1-layout">
- <div class="breadcrumbs">
- <div class="container">
- <ul xmlns:v="http://rdf.data-vocabulary.org/#">
- <li class="0" typeof="v:Breadcrumb">
- <a href="index.php"
- title="Inicio"
- rel="v:url" property="v:title">
- Inicio</a>
- <div class="arrow-breadcrumbs-level3"><img height="10" width="8" src="https://statics.solerpalau.com/skin/frontend/solerpalau/default/images/svg/arrow-breadcrumbs.svg"/></div>
- <div class="arrow-breadcrumbs-level2"><img height="10" width="8" src="https://statics.solerpalau.com/skin/frontend/solerpalau/default/images/svg/arrow-breadcrumbs-white.svg"/></div>
- <li class="2">
- <a href="#">Resultados de búsqueda</a>
- </li>
- </ul>
- </div>
- </div>
- <div class="main">
- <div class="col-main">
- <main>
- <div id="overlaySearch" class="overlay">
- <!-- Overlay content -->
- <div id="searchResults" class="overlay-content grid"></div>
- </div><div class="std">
- <div class="page-title category-title dark">
- <img src="https://statics.solerpalau.com/media//wysiwyg/post-venta/postventaslider1.png" alt="Search results">
- <div class="category-title-container">
- <div class="category-title-content container">
- <h1 class="h1">Resultados de búsqueda</h1>
- </div>
- </div>
- </div>
- <div class="container grid">
- <div class="row">
- <?php
- $minus = strtolower($Pbusqueda); // Se transforma todas las letras a minúsculas
- $query =" SELECT ID,LINEA,MODELO,SUBMODELO ";
- $query .=" FROM ITT_ALP_GLOBAL ";
- $query .=" WHERE MODELO <> 'Refacciones' AND MODELO <> 'MOTORES' AND MODELO <> 'TRANSMISIONES' AND (lower(LINEA) LIKE '%".$minus."%' OR lower(MODELO) LIKE '%".$minus."%' OR lower(SUBMODELO) LIKE '%".$minus."%') ";
- $resultadoM = mysqli_query($conexion, $query ) or die ( "Ups!, parece que algo ha ido mal con la búsqueda");
- $modeloDatosA = array();
- $arrIds = array();
- $rutaImagenCompleta = "";
- $rutaImagen = 'ALP/';
- $ContarItemsdevueltos = 0;
- while ($columnaM = mysqli_fetch_array( $resultadoM) )
- {
- $ContarItemsdevueltos = count($columnaM);
- $linea = $columnaM['LINEA'];
- $modelo = $columnaM['MODELO'];
- //echo $modelo;
- $submodelo = $columnaM['SUBMODELO'];
- $modeloDatosA[] = $columnaM['SUBMODELO'];
- //revisar las imagenes
- $imagen = $columnaM['ID'].".jpg";
- $fichero = $rutaImagen.$imagen;
- if (file_exists($fichero)) {
- //comprobar si el archivo existe en la carpeta ALP
- $rutaImagenCompleta = "ALP/".$imagen;;
- }
- else{
- //si no existe dejar imagen por default
- $rutaImagenCompleta = 'media/noimagen.jpg';
- }
- if (empty($columnaM['LINEA'])) {
- echo "<p>No se han encontrado resultados de búsqueda</p>";
-
- }
- $queryGet = 'linea='.urlencode($linea).'&modelo='.urlencode($modelo).'&submodelo='.urlencode($submodelo);
-
- ?>
- <div class="col-md-4">
- <div class="card hp-100">
- <p class="text-center producto">
- <a href="producto.php?<?php echo(htmlentities($queryGet)) ?>" title="<?php echo $submodelo ?>" >
-
- <img id="img-producto" src="<?php echo $rutaImagenCompleta ?>"
- alt="<?php echo $submodelo ?>" />
-
- </a> </p>
- <div class="product-info">
- <a href="" title="<?php echo $modelo ?>">
- <p class="text-center">
- <b><?php echo $submodelo ?> </b>
- </p>
- </a>
- </div>
- </div>
- </div>
- <?php
-
- }
-
- ////////////////////////////////
- // Calculadora de atenuadores //
- ////////////////////////////////
- $string = 'calculadora de atenuadores';
- if(!stristr($string, $Pbusqueda) === FALSE) {
-
- echo " <div class='col-md-4'>
- <div class='card hp-100'>
- <p class='text-center producto'>
- <a href='atenuadores.php' title='Calculadora' >";
- echo "<svg aria-hidden='true' style='max-width: 150px; max-height: 150px;' focusable='false' data-prefix='fas' data-icon='calculator' class='svg-inline--fa fa-calculator fa-w-14' role='img' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'><path fill='currentColor' d='M400 0H48C22.4 0 0 22.4 0 48v416c0 25.6 22.4 48 48 48h352c25.6 0 48-22.4 48-48V48c0-25.6-22.4-48-48-48zM128 435.2c0 6.4-6.4 12.8-12.8 12.8H76.8c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm0-128c0 6.4-6.4 12.8-12.8 12.8H76.8c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm128 128c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm0-128c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8v-38.4c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v38.4zm128 128c0 6.4-6.4 12.8-12.8 12.8h-38.4c-6.4 0-12.8-6.4-12.8-12.8V268.8c0-6.4 6.4-12.8 12.8-12.8h38.4c6.4 0 12.8 6.4 12.8 12.8v166.4zm0-256c0 6.4-6.4 12.8-12.8 12.8H76.8c-6.4 0-12.8-6.4-12.8-12.8V76.8C64 70.4 70.4 64 76.8 64h294.4c6.4 0 12.8 6.4 12.8 12.8v102.4z'></path></svg>
- ";
- echo " </a> </p>
- <div class='product-info'>
- <a href=' title='Calculadora'>
- <p class='text-center'>
- <b>Selecciona tu atenuador</b>
- </p>
- </a>
- </div>
- </div>
- </div>";
- }
- if ($ContarItemsdevueltos == 0) {
- echo "<p><strong>No se han encontrado coincidencias...</strong></p>";
- } ?>
- </div>
- <br><br>
- </div>
- <div class="line"></div>
- </div>
- </div>
- </main>
- </div>
- </div>
- </div>
- <!-- aqui va el footer -->
- <?php include 'footer.php' ?>
- </script>
- </div>
- </div>
- </body>
- </html>
|