linea.php 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <?php
  2. require_once('shared/conexionBD.php');
  3. $lineaGet = htmlentities($_GET['linea'], ENT_NOQUOTES,"UTF-8");
  4. if (empty($lineaGet)) {
  5. header('Location: 404.php');
  6. }
  7. mysqli_query($conexion,"SET NAMES utf8");
  8. ?>
  9. <!DOCTYPE html>
  10. <html xml:lang="es" lang="es">
  11. <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
  12. <head>
  13. <!-- Global site tag (gtag.js) - Google Analytics -->
  14. <!--Producción-->
  15. <script async src="https://www.googletagmanager.com/gtag/js?id=UA-125019062-2"></script>
  16. <!--Producción-->
  17. <script>
  18. window.dataLayer = window.dataLayer || [];
  19. function gtag(){dataLayer.push(arguments);}
  20. gtag('js', new Date());
  21. gtag('config', 'UA-125019062-2');
  22. </script>
  23. <!-- End Global site tag (gtag.js) - Google Analytics -->
  24. <!-- [if IE]> -->
  25. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
  26. <meta http-equiv="cleartype" content="on"/>
  27. <!-- <![endif] -->
  28. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  29. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>
  30. <title><?php echo $lineaGet; ?> – S&amp;P</title>
  31. <meta name="keywords" content="Magento, Varien, E-commerce"/>
  32. <meta name="robots" content="INDEX,FOLLOW"/>
  33. <link rel="icon" href="https://statics.solerpalau.com/skin/frontend/solerpalau/default/favicon.ico" type="image/x-icon"/>
  34. <link rel="shortcut icon" href="https://statics.solerpalau.com/skin/frontend/solerpalau/default/favicon.ico" type="image/x-icon"/>
  35. <meta name="msapplication-TileColor" content="#ffffff">
  36. <meta name="theme-color" content="#ffffff">
  37. <!-- bootstrap 4 -->
  38. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
  39. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.js"></script>
  40. <script type="text/javascript">
  41. var $j = jQuery.noConflict();
  42. </script>
  43. <script type="text/javascript" src="js/events.js"></script>
  44. <!-- estilo princripal -->
  45. <link rel="stylesheet" type="text/css" href="css/style-css01.css" media="all" />
  46. <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
  47. </head>
  48. <body class=" cms-page-view cms-produccion-distribucion-logistica level-2 customer-logged-out">
  49. <!-- aqui va el header -->
  50. <?php include 'header.php' ?>
  51. <script type="text/javascript">
  52. //<![CDATA[
  53. if (typeof HIB.menu == 'object' && typeof HIB.menu.init == 'function') {
  54. HIB.menu.init();
  55. }
  56. //]]>
  57. </script>
  58. <div class="main-container col1-layout">
  59. <div class="breadcrumbs">
  60. <div class="container">
  61. <ul xmlns:v="http://rdf.data-vocabulary.org/#">
  62. <li class="0" typeof="v:Breadcrumb">
  63. <a href="index.php"
  64. title="Inicio"
  65. rel="v:url" property="v:title">
  66. Inicio</a>
  67. <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>
  68. <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> &nbsp;
  69. </li>
  70. <li class="2">
  71. <a>División <?php echo "$lineaGet"; ?></a>
  72. </li>
  73. </ul>
  74. </div>
  75. </div>
  76. <div class="main">
  77. <div class="col-main">
  78. <main>
  79. <div id="overlaySearch" class="overlay">
  80. <!-- Overlay content -->
  81. <div id="searchResults" class="overlay-content grid"></div>
  82. </div>
  83. <div class="page-title dark">
  84. <img src="media/home/categories_home/<?php
  85. if(file_exists("media/home/categories_home/".$lineaGet.".jpg")){
  86. echo($lineaGet);
  87. }else{
  88. echo('Habitat');
  89. }
  90. ?>.jpg" alt="<?php echo($lineaGet); ?>" class="category-image" />
  91. <div class="page-title-container">
  92. <div class="page-title-content container">
  93. <h1 class="h1"><?php echo $lineaGet; ?></h1>
  94. </div>
  95. </div>
  96. </div>
  97. <div class="category-products">
  98. <div class="bar-title-simple">
  99. <p class="h2"><?php echo "División $lineaGet"; ?></p>
  100. </div>
  101. <div class="container">
  102. <div class="row mb-5">
  103. <!-- Se comienza a imprimir los submodelos -->
  104. <?php
  105. $rutaImagenCompleta = '';
  106. $linea = trim($lineaGet);
  107. $arrFiltrado = filtrarDatos($modelosGlobal,html_entity_decode($linea),$arrImgs);
  108. if (!empty($arrFiltrado)) {
  109. foreach($arrFiltrado as $datos) {
  110. if (!empty($datos['URL'])) {
  111. $imagen = $datos['URL'];
  112. }else{
  113. $imagen = $datos['ID'].".jpg";
  114. $fichero = 'ALP/'.$imagen;
  115. // si la imagen no esta en el directorio
  116. $imagen = (file_exists($fichero)) ? $rutaImagenCompleta = $fichero : $rutaImagenCompleta = 'media/noimagen.jpg' ;
  117. }
  118. $modelo = $datos['MODELO'];
  119. ?>
  120. <div class="col-md-4">
  121. <div class="card hp-100">
  122. <p class="text-center producto">
  123. <a href="modelo.php?linea=<?php echo ($lineaGet) ?>&modelo=<?php echo(urlencode($modelo)) ?>" title="<?php echo $modelo ?>" >
  124. <img id="img-producto" src="<?php echo $imagen ?>"
  125. alt="<?php echo $modelo ?>" />
  126. </a> </p>
  127. <div class="product-info">
  128. <a href="modelo.php?linea=<?php echo($lineaGet) ?>&modelo=<?php echo(urlencode($modelo)) ?>" title="<?php echo $imagen ?>">
  129. <p class="text-center">
  130. <b><?php echo $modelo ?> </b>
  131. </p>
  132. </a>
  133. </div>
  134. </div>
  135. </div>
  136. <?php } }else{
  137. echo 'No se encontraron modelos disponibles';
  138. } ?>
  139. <!-- Termina seccion de submodelos -->
  140. <?php
  141. if(html_entity_decode($lineaGet) == 'Atenuación Acústica') {
  142. echo "<div class='col-md-4'>
  143. <div class='card hp-100'>
  144. <p class='text-center producto'>
  145. <a class='loader' id='btn-".$cont++."' href='atenuadores.php'>
  146. <img id='img-".$cont++."' class='loadImg' src='media/img/loader2.gif' width='50px' style='position: absolute;display:none' /> ";
  147. echo "<svg aria-hidden='true' style='max-width: 100px; height: 200px;' 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>";
  148. echo "</p>
  149. <div class='product-info'>
  150. <p class='text-center'>
  151. <b> Selecciona tu atenuador </b>
  152. </p>
  153. </div>
  154. </a>
  155. </div>
  156. </div>";
  157. }
  158. ?>
  159. </div>
  160. </div>
  161. </div>
  162. </main>
  163. </div>
  164. </div>
  165. </div>
  166. <style>
  167. .bar {
  168. height: 30px!important;
  169. }
  170. </style>
  171. <!-- aqui va el footer -->
  172. <?php
  173. // cerrar conexión de base de datos
  174. mysqli_close( $conexion );
  175. include 'footer.php' ?>
  176. </script>
  177. </div>
  178. </div>
  179. </body>
  180. </html>