[HOME]

Path : /home/hermanostamargo/www/home/
Upload :
Current File : /home/hermanostamargo/www/home/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.php");
?>
<main>
	
	<section id="carouselExampleIndicators" class="carousel slide" data-interval="15000" data-ride="carousel">

		<? $rowcount = mysqli_num_rows($res_img);?>
		<? if ( $rowcount > 1 ) { ?>
			<ol class="d-none 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="position-relative carousel-inner">
			<? $cont_img2 = 0; //descomentar si quitamos el video ?>
			<? 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 carousel-item-fotos <? if ( $cont_img2 == 0 ) { echo ' active'; } //descomentar si quitamos el video ?>">
					<picture>
						<source class="my-img d-block w-100" media="(min-width: 1025px)" srcset="<?=PROTOCOL.DOMAIN_NAME?>images/<?=$row_img2['imagen']?>">
						<source class="my-img d-block w-100" media="(min-width: 700px)" srcset="<?=PROTOCOL.DOMAIN_NAME?>images/med-<?=$row_img2['imagen']?>">
						<source class="my-img d-block w-100" media="(min-width: 200px)" srcset="<?=PROTOCOL.DOMAIN_NAME?>images/thumbnail-<?=$row_img2['imagen']?>">
						<img class="my-img d-block w-100" src="<?=PROTOCOL.DOMAIN_NAME?>images/med-<?=$row_img2['imagen']?>" alt="<?=$row_img2['leyenda']?>">
					</picture>

					<div class="px-3 carousel-caption carousel-caption-home wow bounceInDown text-md-right">
						<? if( $row_img2['leyenda'] != "" ) {?>
							<h3 class="p-0 mb-md-4"><span><?=$row_img2['leyenda']?></span></h3>
						<? } ?>	
						<? if( $row_img2['leyenda2'] != "" ) {?>
							<p class="mb-lg-5"><span><?=$row_img2['leyenda2']?></span></p>
						<? } ?>						
					</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>

		<div class="container text-white d-none d-lg-block content-home-datos p-3">
				<div class="row">
	                <? if ( $row_dir['tel'] != "") { ?>
	                	<div class="col-md-3">
	                  		<a class="text-white" href="tel:<?=$row_dir['tel']?>"><i class="mr-3 float-left fa fa-phone-square fa-3x" aria-hidden="true"></i> <?=$ftel?><br><?=$row_dir['tel']?></a>
	                  	</div>
	                <? } ?>
	                <div class="col-md-5">
		                  <? if ( $row_dir['direccion'] != "") { ?>
		                   <i class="mr-3 float-left fa fa-3x fa-map-marker" aria-hidden="true"></i> <?=$row_dir['direccion'];?>
		                  <? } ?>
		                  <? //if ( $row_dir["cp"] != "" ) { echo " | " . $row_dir["cp"]; } ?>
		                  <? if ( $row_dir["localidad"] != "" ) { echo " <br>" . $row_dir["localidad"]; } ?>
		                  <? if ( $row_dir["provincia"] != "" ) { echo " (" . $row_dir["provincia"] . ")"; } ?>  
	                </div> 

	                <div class="col-md-4">
		                  <? if ( $row_dir['email'] != "") { ?>
		                   <i class="mr-3 float-left fa fa-3x fa-envelope-o" aria-hidden="true"></i> Correo<br><?=$row_dir['email'];?>
		                  <? } ?>
	                </div> 	 


 
 
                </div>

		</div>


	</section>

	<? /*
	//redes
	<section class="bg-corporate p-1 text-right">
		<div class="container pr-md-0">
		    <? if(mysqli_num_rows($result_redes_home) > 0){ ?>
				<? while ($row_redes = mysqli_fetch_assoc($result_redes_home)){  ?>
			          &nbsp;<a href="<?=$row_redes['enlace']?>" alt="<?=$row_redes['titulo']?>"><? if ( $row_redes['imagen'] == "" && $row_redes['id'] == 1 ) { //facebook ?><i class="text-white fa fa-facebook-square fa-3x" aria-hidden="true"></i><? } else if ( $row_redes['imagen'] == "" && $row_redes['id'] == 2 ) { //twitter ?><i class="text-white fa fa-twitter-square fa-3x" aria-hidden="true"></i><? } else if ( $row_redes['imagen'] == "" && $row_redes['id'] == 3 ) { //youtube ?><i class="text-white fa fa-youtube-square fa-3x" aria-hidden="true"></i><? } else if ( $row_redes['imagen'] == "" && $row_redes['id'] == 4 ) { //instagram ?><i class="text-white fa fa-instagram fa-3x" aria-hidden="true"></i><? } else if ( $row_redes['imagen'] == "" && $row_redes['id'] == 5 ) { //linkedin ?><i class="text-white fa fa-linkedin-square fa-3x" aria-hidden="true"></i><? } else { ?><img src="<?=PROTOCOL.DOMAIN_NAME?><?=$row_redes['imagen']?>" alt="<?=$row_redes['titulo']?>"><? } ?></a>
				<? } ?>
			<? } ?>
		</div>
	</section> */ ?>

	<section>
		<div class="container">
			<div class="row justify-content-md-center">
				<article class="col-lg-12 content-1-home">
					<h1 class="text-center"><?=$titulo;?></h1>
					<div class="texto-home"><?=$descripcion;?></div>
					<?/*
					<div class="col text-center">
						<a class="btn btn-primary btn-lg" href="#" data-toggle="modal" data-target="#formModal"><i class="fa fa-info-circle" aria-hidden="true"></i>&nbsp;&nbsp;<?=$contratarTxt;?></a>
					</div>
					<? include("form.php"); ?>
					*/?>				
				</article>
			</div>
		</div>

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


		<div class="parallax text-center" data-movimiento="10" style="background-image: url(<?=PROTOCOL.DOMAIN_NAME?>images/<?=$row_fotoprincipal['fotoprincipal']?>)">
				<a class="btn-parallax btn btn-warning btn-lg" href="#" data-toggle="modal" data-target="#formModal"><i class="fa fa-info-circle" aria-hidden="true"></i>&nbsp;&nbsp;<?=$contacto;?></a>
				<? include("form.php"); ?>

		</div>


		<? // boton aviso
		if (mysqli_num_rows($res_pop) > 0 ){ ?> 
		  <!-- Button trigger modal -->
		  <div class="text-center">
			  <button type="button" class="btn btn-warning my-buttom-modal btn-lg" data-toggle="modal" data-target="#exampleModal">
			    	<?=$row_pop['titulo']?>
			  </button>
		  </div>
		  <br>
		<? } // boton aviso ?>


			<div class="content-padding">
				<div class="container">
					<div class="row">

					<? function while_destacados($res,$carpeta){

						while ($row_bloques = mysqli_fetch_assoc($res)){ 
							$img_size = $_SERVER['DOCUMENT_ROOT']."/images/" . $row_bloques['img'];
							list($width_img, $height_img) = getimagesize($img_size);
							?>
							<article class="mt-5 col-md-4 bloques wow bounceInUp">
								<a class="text-info" href="<?=PROTOCOL.DOMAIN_NAME.$carpeta?>/<?=$row_bloques['serv_id']?>-<?=toAscii($row_bloques['titulo'], "'")?>/">
									<img class="img-fluid" width="<?=$width_img?>" height="<?=$height_img?>" src="<?=PROTOCOL.DOMAIN_NAME?>images/<?=$row_bloques['img']?>" alt="<?=$row_bloques['leyenda']?>">
								</a>
								<a class="text-info" href="<?=PROTOCOL.DOMAIN_NAME.$carpeta?>/<?=$row_bloques['serv_id']?>-<?=toAscii($row_bloques['titulo'], "'")?>/"><h2><?=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'], "'")?>/" class="btn btn-secondary">
								<? global $leerMas; echo $leerMas;?> &nbsp;<i class="fa fa-angle-double-right" aria-hidden="true"></i></a>
							</article>
						<? } 
				
					}
					while_destacados($res_servicios,$secciones[0][0]);
					while_destacados($res_flota,$secciones[1][0]);
					?>

					</div>

				</div>

			</div>

	</section>

	<aside class="container">
		<br><br>
		<article class="row justify-content-center wow bounceInUp">
			<? if( $descripcion1 != "" ) { ?>
				<div class="col-md-4 text-center">
					<?=$descripcion1?>
				</div>
			<? } ?>
			<? if( $descripcion2 != "" ) { ?>
				<div class="col-md-4 text-center wow bounceInUp">
					<?=$descripcion2?>
				</div>
			<? } ?>
			<? if( $descripcion3 != "" ) { ?>
				<div class="col-md-4 text-center wow bounceInUp">
					<?=$descripcion3?>
				</div>
			<? } ?>
		</article>
		<br>
	</aside>

</main>






<?php
include("../includes/footer.php");
?>
<script>
$(document).ready(function(){

    //parallax
    jQuerypantalla = jQuery(window);
    jQuery('.parallax').each(function(){
        var jQuerythis = jQuery(this);
        jQuerypantalla.scroll(function() {
            var y = -(jQuerypantalla.scrollTop() / jQuerythis.data('movimiento')); 
            var xy = '50% '+ y + 'px';
             jQuerythis.css({ backgroundPosition: xy });
       });
    });

    //ajustamos la altura del div contenedor del video
	/*function ajuste_video(){ 
		if ($(".carousel-video:first").length){
			$(".carousel-video").css({"height" : $(".carousel-item-fotos:first").outerHeight() + 'px' });
			//alert($(".carousel-item-fotos:first").outerHeight());
		}
	}
	ajuste_video(); 

	$(window).resize(function(e) {
		ajuste_video();
	});
	*/

    $(".privacidad a").click(function(e){
        event.preventDefault();
        $(".privacidad-content").toggle("slow");
    });


});	
</script>

</body>
</html>