<? 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");
include("../../includes/header_amp.php");
?>
<main class="interiores <?=$seccion?>">
<section class="container">
<div class="row">
<nav class="menu-izquierda col-lg-3">
<ul class="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'], "'");?>/amp/" ><?= strip_tags($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'], "'") ?>/amp/" ><?= strip_tags($row_serv['titulo']); ?></a>
</li>
<? }
} ?>
</ul>
</nav>
<br>
<? include "../sql_textos.php"; ?>
<div class="col-lg-9">
<? if ( isset($carrusel) && $carrusel == "SI" ) { ?>
<!-- carousel -->
<? if ( mysqli_num_rows($res_img2) > 0 ) { ?>
<? while ($row_imgSize = mysqli_fetch_assoc($res_img2_amp)){
$img_size = URL_ROOT."/images/med-" . $row_imgSize['imagen'];
list($width_img, $height_img) = getimagesize($img_size);
}
if ( !isset($width_img) || $width_img == "" ) { $width_img = "1024"; }
if ( !isset($height_img) || $height_img == "" ) { $height_img = "796"; }
?>
<amp-carousel width="<?=$width_img?>"
height="<?=$height_img?>"
type="slides"
layout="responsive"
autoplay
delay="2000">
<? while ($row_img2 = mysqli_fetch_assoc($res_img2)){
$img_size = URL_ROOT."/images/med-" . $row_img2['imagen'];
list($width_img, $height_img) = getimagesize($img_size);
?>
<div class="carousel slide">
<amp-img src="<?=PROTOCOL.DOMAIN_NAME?>images/med-<?=$row_img2['imagen']?>"
width="<?=$width_img?>"
height="<?=$height_img?>"
layout="responsive"
alt="<?=strip_tags($row_img2['leyenda'])?>">
</amp-img>
</div>
<? } ?>
</amp-carousel>
<? } ?>
<!-- ./ carousel -->
<? } // ./ isset($carrusel) ?>
<article id="ancla">
<h1 class="titulo-articulo"><?= strip_tags($row_textos['titulo']); ?></h1>
<? $textos = borra_style($row_textos['descripcion']); ?>
<?= ampify($textos)?>
<? if ( !isset($carrusel) || $carrusel == "NO" ) { ?>
<div>
<? while($row_img = mysqli_fetch_array($res_img)){ ?>
<?
$img_size = URL_ROOT."/images/" . $row_img['imagen'];
list($width_img, $height_img) = getimagesize($img_size);
?>
<figure class="col-2">
<a title="<?=strip_tags($row_img['leyenda'])?>" rel="grupo" class="zoomIt enlaceGaleria" href="<?=PROTOCOL.DOMAIN_NAME?>images/<?=$row_img['imagen']?>">
<amp-img src="<?=PROTOCOL.DOMAIN_NAME?>images/<?=$row_img['imagen']?>"
srcset="<?=PROTOCOL.DOMAIN_NAME?>images/<?=$row_img['imagen']?> 1025w,
<?=PROTOCOL.DOMAIN_NAME?>images/<?=$row_img['imagen_med']?> 700w,
<?=PROTOCOL.DOMAIN_NAME?>images/<?=$row_img['imagen_thumb']?> 400w"
width="<?=$width_img?>"
height="<?=$height_img?>"
layout="responsive"
alt="<?=strip_tags($row_img['leyenda'])?>">
</amp-img>
</a>
</figure>
<? } ?>
</div>
<? } ?>
<div class="row"></div>
<br>
<? if ( $row_textos['fichero'] != "" ) { ?>
<a class="btn btn-primary" 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_amp.php");
?>
</body>
</html>