| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503 |
- <?php
- require_once('shared/conexionBD.php');
- // Desactivar toda notificación de error
- error_reporting(0);
- $title = $_GET["submodelo"];
- /*
- Se obtienen la linea, el modelo y el submodelo del producto
- */
- if (isset($_GET['linea']) && isset($_GET['modelo']) && isset($_GET['submodelo'])) {
- $lineaGet = htmlentities($_GET['linea']);
- $articulo = htmlentities($_GET['modelo']);
- $submodelo = htmlentities($_GET['submodelo']);
- }
- /*
- Si no se obtiene ningún dato, entonces mandará a un 404
- */
- if (empty($lineaGet) || empty($articulo) || empty($submodelo)) {
- header('Location: 404.php');
- }
- /*
- Se obtienen datos de a base de datos según su modelo
- */
- mysqli_query($conexion,"SET NAMES utf8");
- $easyventUrl = '';
- $queryS = "SELECT DESCRIPCION,ID,EASYVENTURL FROM ITT_ALP_GLOBAL WHERE SUBMODELO='".html_entity_decode($submodelo)."' ";
- $resultado = mysqli_query($conexion, $queryS );
- if($resultado) {
- if(mysqli_num_rows($resultado)>0) {
- $descripcion= '';
- $rutaImagen = 'ALP/';
- $rutaImagenCompleta = '';
- //Hacemos la consulta
- $rowDatos = mysqli_fetch_assoc($resultado);
- $descripcion = $rowDatos['DESCRIPCION'];
- $id = $rowDatos['ID'];
- $easyventUrl = $rowDatos['EASYVENTURL'];
- //revisar las imagenes
- $imagen = $rowDatos['ID'].'.jpg';
- $fichero = $rutaImagen.$imagen;
- //comprobar si el archivo existe en la carpeta ALP
- $imagen = (file_exists($fichero)) ? $rutaImagenCompleta = $fichero : $rutaImagenCompleta = 'media/noimagen.jpg' ;
- }else{
- $strMensaje = 'Este producto aún no tiene información disponible, intente más tarde. :) ';
- }
- }else{
- $strMensaje = 'No se pudo realizar la consulta en la Base de datos, favor de reportar este problema.';
- }
- $queryArchivos = "SELECT * FROM ITT_ASW_PROD WHERE SUBM=UPPER('".html_entity_decode($submodelo)."') ";
- $resultadoArchivos = mysqli_query($conexion, $queryArchivos );
- $arrArchivos = array();
- if($resultadoArchivos) {
- if((mysqli_num_rows($resultadoArchivos)>0)) {
- while ($row = mysqli_fetch_array($resultadoArchivos,MYSQLI_ASSOC)) { $arrArchivos[] = $row;}
- }
- }else{
- $strMensaje = 'No se pudo realizar la consulta en la Base de datos, favor de reportar este problema.';
- }
- ///////////////////////////////////////
- // Buscamos imagenes para corrrousel //
- ///////////////////////////////////////
- // Ruta del directorio donde están los archivos
- $path = 'ALP/';
- // Arreglo con todos los nombres de los archivos
- $files = array_diff(scandir($path), array('.', '..'));
- //Filtramos por ID
- $searchId = $id.'-';
- $arrImgsCarrousel = array_filter($files, function ($obj) use ($searchId) {
- return (stripos($obj, $searchId) !== false) ? true: false ;
- });
- ?>
- <!DOCTYPE html>
- <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 content="width=device-width, initial-scale=1" name="viewport"/>
- <title><?php echo $title;?> – S&P</title>
- <meta name="keywords" content="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"/>
- <!-- ================================================================================ -->
- <script type="text/javascript" src="js/events.js"></script>
- <script>
- var easyventUrl = '<?php echo html_entity_decode($easyventUrl) ?>';
- var modeloGlobal = '<?php echo html_entity_decode($articulo)?>';
- var submodelo = '<?php echo html_entity_decode($submodelo)?>';
- </script>
- <!-- ================================================================================ -->
- <link rel="stylesheet" type="text/css" href="css/style-css01.css" media="all" />
- <!-- ================================================================================ -->
- <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
- <link href="css/flexslider.css" rel="stylesheet">
- <!-- ================================================================================ -->
- </head>
- <body class=" cms-page-view cms-produccion-distribucion-logistica level-2 customer-logged-out">
- <?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="https://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>
- <li class="1" typeof="v:Breadcrumb">
- <a href="linea.php?linea=<?php echo $lineaGet ?>">División <?php echo $lineaGet; ?></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>
- <li class="2">
- <a href="modelo.php?linea=<?php echo $lineaGet ?>&modelo=<?php echo $articulo; ?>" title="<?php echo $articulo; ?>"><?php echo $articulo;?></a>
- </li>
- <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="3">
- <a><?php echo $submodelo ?></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>
- <main>
- <div class="page-title category-title dark">
- <img src="media/home/categories_home/<?php if(file_exists("media/home/categories_home/".$lineaGet.".jpg")) {
- echo($lineaGet);
- } else {
- echo('Habitat');
- } ?>.jpg" alt="<?php echo($lineaGet); ?>" class="category-image" />
- <div class="category-title-container">
- <div class="category-title-content container">
- <h2 class="seriesTitle m-top10"><?php echo html_entity_decode($articulo); ?><br>
- <b>Serie <?php echo($submodelo); ?></b>
- </h2>
- </div>
- </div>
- <div class="clearfix"></div>
- </div>
- <input type="hidden" id="idProducto" value=" <?php echo $id; ?>">
-
- <?php if (!empty($id)){ ?>
- <div class="container grid">
- <div class="hcol-4-12 m-hcol-4-12 mobil-hcol-1-12">
- <div class="grid">
- <center>
- <?php if (!empty($arrImgsCarrousel)) { ?>
- <div class="flexslider">
- <ul class="slides">
- <!-- Imprimimos la imagen principal -->
- <li data-thumb="<?php echo $imagen ?>">
- <img src="<?php echo $imagen ?>" />
- </li>
- <!-- Imprimimos imagenes secundarias -->
- <?php foreach ($arrImgsCarrousel as $imgDir) {
- $img = 'ALP/'.$imgDir;
- echo "<li data-thumb='".$img."'> <img src='".$img."' /> </li>";
- }?>
- </ul>
- </div>
- <?php } else { ?>
- <img class="img-producto" src="<?php echo $imagen; ?>" alt="<?php echo $submodelo ?>" />
- <?php } ?>
- <div class="text-center" style="margin-top: 10px;">
- <button type="button" id="ver-3d" class="btn btn-default" style="display:none;">
- <i class="fa fa-cube" aria-hidden="true" ></i>
- <span>Ver modelo 3D</span>
- </button>
- </div>
- </center>
- </div>
- </div>
- <div class="hcol-8-12 m-hcol-8-12 mobil-hcol-1-12">
- <div class="grid just m-bottom50 ">
- <div class="tab">
- <button class="tablinks active">DESCRIPCIÓN</button>
- </div>
- <div id="descripcion" class="tabcontent m-bottom10">
- <p><?php echo $descripcion; ?></p>
- </div>
- <?php
- // Filtramos los datos para ver solo fichas técnicas
- $arrFichaTecnica = array_filter($arrArchivos, function ($obj) use ($search) {
- if ($obj['ARCH_FICH'] !== '') {
- return true;
- }
- return false;
- });?>
- <?php if (!empty($arrFichaTecnica)): ?>
- <?php if ($arrFichaTecnica[0]['ARCH_FICH'] != ''){ ?>
- <div id="archivos" class="m-bottom10 ">
- <a href="<?php echo $arrFichaTecnica[0]['ARCH_FICH'] ?>" target="_blank" type="button" id="ficha" class="btn btn-default a-btn">
- <i class="fa fa-envelope" aria-hidden="true" ></i>
- <span>DESCARGAR FICHA TÉCNICA</span>
- </a>
- </div>
- <?php } endif; ?>
- <?php if ($arrArchivos[0]['ARCH_CAD'] != '' ||
- $arrArchivos[0]['ARCH_ZIP'] != '' ||
- $arrArchivos[0]['ARCH_OTR'] != ''):
- ?>
- <div id="dimension" style="padding: 10px;">
- <table class="display nowrap table table-hover table-striped dt-responsive no-wrap" style="width:100%">
- <thead>
- <tr>
- <th>VERSIONES</th>
- <th>AUTOCAD</th>
- <th>ZIP</th>
- <th>OTROS FORMATOS</th>
- </tr>
- </thead>
- <tbody>
- <?php foreach ($arrArchivos as $key => $dato) {
- echo "<tr>";
- echo "<td>".$dato['MODELO']."</td>";
- echo "<td>";
- if (!empty($dato['ARCH_CAD'])) {
- echo "<a href='".$dato['ARCH_CAD']."' target='_blank'>";
- echo "<i class='fa fa-file-text fa-2x' style='color: #ff5c64;'></i>";
- echo "</a>";
- }
- echo "</td>";
- echo "<td>";
- if (!empty($dato['ARCH_ZIP'])) {
- echo "<a href='".$dato['ARCH_ZIP']."' target='_blank'>";
- echo "<i class='fa fa-file-text fa-2x' style='color: #ff5c64;'></i>";
- echo "</a>";
- }
- echo "</td>";
- echo "<td>";
- if (!empty($dato['ARCH_OTR'])) {
- echo "<a href='".$dato['ARCH_OTR']."' target='_blank'>";
- echo "<i class='fa fa-file-text fa-2x' style='color: #ff5c64;'></i>";
- echo "</a>";
- }
- echo "</td>";
- echo "</tr>";
- } ?>
- </tbody>
- </table>
- </div>
- <?php endif ?>
- </div>
- </div>
- </div>
- <div class="container grid">
- <div class="hcol-12-12 m-hcol-12-12 mobil-hcol-1-12">
- <div class="grid m-bottom10">
- <div id="cerrar3d" align="right" style="display: none">
- <button style="background: gainsboro;margin-right:100px" type="button" class="btn btn-default"><i class="fa fa-times"></i> <span>Cerrar</span></button>
- </div>
- <center>
- <div id="modelo3d">
- <div id="cargando" style="display: none">
- <img src="media/img/loader2.gif" alt="Cargando" width="100px">
- <p style="padding: 5px">Cargando modelo ...</p>
- </div>
- </div>
- </center>
- </div>
- </div>
- </div>
- <!-- aqui se carga la tabla -->
- <div id="tabla" style="margin-bottom: 10px;">
- <div id="cargando" style="display: block">
- <center>
- <img src="media/img/loader2.gif" alt="Cargando" width="100px">
- <p style="padding: 5px">Cargando tabla ...</p>
- </center>
- </div>
- </div>
- <div class="section grid">
- <div class="col-sm-12" id="comparador"></div>
- </div>
- <!-- URL PRIMER ITEM -->
- <input type="hidden" id="urlItem1" value="" />
- <!-- validacion si no mandamos nada por url -->
- <?php }else{ ?>
- <div class="container grid">
- <div class="hcol-12-12 m-hcol-12-12 mobil-hcol-1-12">
- <h3><?php echo($strMensaje); ?></h3>
- </div>
- </div>
- <?php } ?>
- <style>
- #dimension {
- height:250px;
- overflow: auto;
- }
- #dimension table thead tr th,table tbody tr td {
- font-size: 14px;
- font-weight: bold;
- text-align: center;
- }
- /* Style the tab */
- .tab {
- overflow: hidden;
- border-bottom: 1px solid #ccc;
- padding: 5px;
- }
- /* Style the buttons inside the tab */
- .tab button {
- background-color: inherit;
- float: left;
- border: none;
- outline: none;
- padding: 14px 16px;
- transition: 0.1s;
- font-size: 17px;
- margin: 7px;
- color: #969696;
- }
- /* Change background color of buttons on hover */
- .tab button:hover {
- /*background-color: #ddd;*/
- border-bottom: 3px solid #4b4b4b;
- color:black;
- }
- /* Create an active/current tablink class */
- .tab button.active {
- border-bottom: 3px solid #4b4b4b;
- color:black;
- }
- /* Style the tab content */
- .tabcontent {
- display: none;
- padding: 25px;
- border: 1px solid #ccc;
- border-top: none;
- }
- .tabcontent p {
- font-size: 14px;
- }
- /*---------------------------------------*/
- select.input-sm {
- line-height: 0px !important;
- font-size: 14px !important;
- }
- #ficha {
- background: cornflowerblue;
- height: 37px;
- border-radius: 0px!important;
- transition: background 0.3s ease 0s;
- color:white;
- }
- #ver-3d {
- background: cornflowerblue;
- height: 34px;
- transition: background 0.3s ease 0s;
- }
- #ver-3d:hover,#ficha:hover {
- background: #4673c5;
- color: #fff;
- }
- #tblSeriesModels_info {
- margin-bottom: 20px!important;
- }
- .a-btn{
- font-size: 1.6rem !important;
- height: 36px;
- background: transparent none repeat scroll 0% 0%;
- padding-top: 11px !important;
- padding-bottom: 0px !important;
- }
- </style>
- </main>
- <aside></aside>
- <script type="text/javascript">
- //<![CDATA[
- if (typeof HIB == 'object' && typeof HIB.filter == 'object' && typeof HIB.filter.init == 'function') {
- HIB.filter.init();
- }
- //]]>
- </script>
- </main>
- </div>
- </div>
- </div>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.js"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/flexslider/2.7.2/jquery.flexslider.js"></script>
- <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css" media="all" />
- <link rel="stylesheet" type="text/css" href="css/responsive.dataTables.min.css" media="all" />
- <link rel="stylesheet" type="text/css" href="css/style-table.css" media="all" />
- <script src="js/jquery.dataTables.min.js"></script>
- <script src="js/dataTables.bootstrap.min.js"></script>
- <script src="js/dataTables.responsive.min.js"></script>
- <script type="text/javascript">
- var $j = jQuery.noConflict();
- document.getElementById('descripcion').style.display = "block";
- // -----------------------TABS---------------
- var cargando = document.getElementById('cargando');
- var url = easyventUrl;
- var idProducto = document.getElementById('idProducto').value;
- $j('.flexslider').flexslider({
- animation: "slide",
- controlNav: "thumbnails"
- });
- if(url != ""){
- getTable(url);
- }else{
- $j('#tabla').html('<div class="h2-2" style="text-align:center"></div>');
- }
- // Se obtienen los datos de la tabla
- function getTable($url) {
- $j.ajax({
- url: 'comparador.php',
- type: 'POST',
- data: {
- table: url,
- id: idProducto
- },
- success: function (respuesta) {
- $j('#tabla').html(respuesta);
- if (respuesta != "") {
- cargando.style.display = 'none';
-
- $j('html,body').animate({ scrollTop: $j("#tabla").offset().top }, 'slow');
- $j.getScript("js/controlador-js.js");
- }
- }, error: function () {
- cargando.style.display = 'none';
- }
- });
- }
- </script>
- <?php include 'footer.php' ?>
- </div>
- </div>
- </body>
- </html>
|