<? session_start(); ?>
<? include("../includes/sesiones.php"); ?>
<? include("vars.php"); ?>
<? include("../includes/traducciones.php");?>
<!doctype html>
<?php
include("../defines.php");
include("../administracion/bd-con.php");
include("../administracion/funciones.php");
include("../includes/consultas-generales.php");
include("sql.php");
if( $title == "" ){
$title = $row['titulo'];
} else {
$title = $row['title'];
}
if( $description == "" ){
$description = $row['descripcion'];
} else {
$description = wordlimit(strip_tags($row['descripcion']), $length = 25, $ellipsis = "");
}
include("../includes/header.php");
?>
<main class="interiores <?=$seccion?>">
<section class="container">
<div class="row">
<nav class="d-none menu-izquierda col-lg-3">
<ul class="menu-static sticky-top nav flex-column">
<?
$band=0;
while($row_serv = mysqli_fetch_array($res)){
if($_GET['id'] == ""){
if($band == 0){
$band = $row_serv['id'];
$idcarga = $row_serv['id'];
$clase_active = "";
} ?>
<li class="nav-item">
<a class="nav-link <?=$clase_active?>" href="<?=PROTOCOL.DOMAIN_NAME. $seccion . "/" . $row_serv['id'] . "-". toAscii($row_serv['titulo'], "'");?>/" ><?= $row_serv['titulo']; ?></a>
</li>
<? } else {
$idcarga = $_GET['id'];
$tituloSeccion = $row_serv['titulo'];
if($row_serv['id'] == $_GET['id']) { $clase_active = "active text-muted"; } else { $clase_active = ""; } ?>
<li class="nav-item">
<a class="nav-link <?=$clase_active?>" href="<?= PROTOCOL.DOMAIN_NAME. $seccion . "/" . $row_serv['id'] . "-". toAscii($row_serv['titulo'], "'") ?>/" ><?= $row_serv['titulo']; ?></a>
</li>
<? }
} ?>
</ul>
</nav>
<? include "sql_textos.php"; ?>
<div class="col-lg-12">
<? if ( isset($carrusel) && $carrusel == "SI" ) { ?>
<? if ( mysqli_num_rows($res_img) ) { ?>
<section id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<? $cont_img = 0; ?>
<? while ($row_img = mysqli_fetch_assoc($res_img)){ ?>
<li data-target="#carouselExampleIndicators" data-slide-to="<?=$cont_img?>" <? if ( $cont_img == 0 ) { echo 'class="active"'; } ?>></li>
<? $cont_img++; ?>
<? } ?>
</ol>
<div class="carousel-inner">
<? $cont_img2 = 0; ?>
<? while ($row_img2 = mysqli_fetch_assoc($res_img2)){
$img_size = $_SERVER['DOCUMENT_ROOT']."/images/" . $row_img2['imagen'];
list($width_img, $height_img) = getimagesize($img_size);
?>
<div class="carousel-item <? if ( $cont_img2 == 0 ) { echo ' active'; } ?>">
<picture>
<source class="d-block w-100" media="(min-width: 1025px)" srcset="<?=PROTOCOL.DOMAIN_NAME?>images/<?=$row_img2['imagen']?>">
<source class="d-block w-100" media="(min-width: 700px)" srcset="<?=PROTOCOL.DOMAIN_NAME?>images/med-<?=$row_img2['imagen']?>">
<source class="d-block w-100" media="(min-width: 200px)" srcset="<?=PROTOCOL.DOMAIN_NAME?>images/thumbnail-<?=$row_img2['imagen']?>">
<img class="d-block w-100" src="<?=PROTOCOL.DOMAIN_NAME?>images/med-<?=$row_img2['imagen']?>" alt="<?=$row_img2['leyenda']?>">
</picture>
<div class="carousel-caption d-none d-md-block wow bounceInDown">
<h3><?=$row_img2['leyenda']?></h3>
</div>
</div>
<? $cont_img2++; ?>
<? } ?>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Anterior</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Siguiente</span>
</a>
</section>
<br>
<? } ?>
<? } ?>
<article id="ancla">
<h1 class="titulo-articulo"><?= $row_textos['titulo']; ?></h1>
<?= $row_textos['descripcion'];?>
<? if ( !isset($carrusel) || $carrusel == "NO" ) { ?>
<div class="row">
<? while($row_img = mysqli_fetch_array($res_img)){ ?>
<figure class="col-lg-4">
<a title="<?=$row_img['leyenda']?>" rel="grupo" class="zoomIt enlaceGaleria" href="<?=PROTOCOL.DOMAIN_NAME?>images/<?=$row_img['imagen']?>">
<img class="d-block w-100" src="<?=PROTOCOL.DOMAIN_NAME?>images/<?=$row_img['imagen_thumb']?>" alt="<?=$row_img['leyenda']?>">
</a>
</figure>
<? } ?>
</div>
<? } ?>
<? if ( $row_textos['fichero'] != "" ) { ?>
<a class="btn btn-success" target="_blank" href="<?=PROTOCOL.DOMAIN_NAME?>ficheros/<?=$row_textos['fichero']?>"><?=$ficha?> <i class="fa fa-download" aria-hidden="true"></i></a>
<? } ?>
</article>
</div>
</div>
</section>
</main>
<?php
include("../includes/footer.php");
?>
<script>
jQuery(document).ready(function() {
function navegacion_movil(){
var ventana_ancho = $(window).width();
if(ventana_ancho <= 850){
//clic en un enlace de la lista
$('.menu-izquierda a').click(function(e){
link = location.href.replace(/\?.*/,"");
location.href = $(this).attr("href") + "#ancla2";
e.preventDefault();
});
var x = location.hash;
if( x == "#ancla2") {
$('html, body').animate({
scrollTop: $("#ancla").offset().top - 175
}, 500)
}
}
}
navegacion_movil();
$(window).resize(function(e) {
navegacion_movil();
});
});
</script>
</body>
</html>