[HOME]

Path : /home/hermanostamargo/ftp/home/amp/
Upload :
Current File : /home/hermanostamargo/ftp/home/amp/index.php

<? 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");
?>



	<!-- 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 class="caption text-center">
					      <?=strip_tags($row_img2['leyenda'])?>
					</div>
					
				</div>
			<? } ?>
		</amp-carousel>
	<? } ?>
	<!-- ./ carousel -->


	<!-- principal -->
	<section class="container">
		<article class="content-1-home">
			<h1 class="text-center"><?=strip_tags($titulo)?></h1>
			<div class="texto-home"><?=borra_style($descripcion)?></div>
			<div class="col text-center">

				<br>
				<a class="btn btn-primary btn-lg contact" title="Llama ahora" href="tel:<?=$row_dir["tel"]?>">Llama ahora <br><i class="fa fa-phone" aria-hidden="true"></i>&nbsp; <strong><?=$row_dir['tel']?></strong> </a>
				<br>

			</div>
			<? //include("form.php"); ?>				
		</article>
	</section>


	<!-- bloques -->
	<? include("../../bloques/bloques-amp.php");?>
	<!-- ./ bloques -->

	<!-- destacados -->
	<section class="container">
		<? function while_destacados($res,$carpeta){
			while ($row_bloques = mysqli_fetch_assoc($res)){ 
				$img_size = URL_ROOT."/images/" . $row_bloques['img'];
				list($width_img, $height_img) = getimagesize($img_size);
				?>
				<article class="bloques">
					<amp-img width="<?=$width_img?>" height="<?=$height_img?>" src="<?=PROTOCOL.DOMAIN_NAME?>images/<?=$row_bloques['img']?>" alt="strip_tags(<?=$row_bloques['leyenda']?>)" layout="responsive"></amp-img>
					<a href="<?=PROTOCOL.DOMAIN_NAME.$carpeta?>/<?=$row_bloques['serv_id']?>-<?=toAscii($row_bloques['titulo'], "'")?>/amp/"><h2 class="text-primary"><?=strip_tags($row_bloques['titulo'])?></h2></a>
					<p><?=wordlimit(strip_tags($row_bloques['descripcion']), $length = 25, $ellipsis = "...")?></p>
					<a href="<?=PROTOCOL.DOMAIN_NAME.$carpeta?>/<?=$row_bloques['serv_id']?>-<?=toAscii($row_bloques['titulo'], "'")?>/amp/" class="btn bg-secondary text-white">Leer más &nbsp;<i class="fa fa-angle-double-right" aria-hidden="true"></i></a>
				</article>
				<hr>
			<? } 
		}
		while_destacados($res_servicios,$secciones[0][0]);
		while_destacados($res_flota,$secciones[1][0]);		
		?>
	</section>
	<!-- ./ destacados -->
	

	<aside class="container">
		<article class="text-center">
			<? if( $descripcion1 != "" ) { ?>
				<div class="col-md-6 bg-light p-20 mt-20">
					<?
					$text1 = preg_replace("/<img (.+?)>/", '', $descripcion1); //borramos imágenes del texto
					echo borra_style($text1); 
					?>
				</div>
			<? } ?>
			<? if( $descripcion2 != "" ) { ?>
				<div class="col-md-6 bg-light p-20 mt-20">
					<?
					$text2 = preg_replace("/<img (.+?)>/", '', $descripcion2); //borramos imágenes del texto
					echo borra_style($text2); 
					?>
				</div>
			<? } ?>
			<? if( $descripcion3 != "" ) { ?>
				<div class="col-md-6 bg-light p-20 mt-20">
					<?
					$text3 = preg_replace("/<img (.+?)>/", '', $descripcion3); //borramos imágenes del texto
					echo borra_style($text3); 
					?>
				</div>
			<? } ?>
		</article>
		<br>
	</aside>




<?php
include("../../includes/footer_amp.php");
?>

</body>
</html>