<?php  include 'sesion.php';?>
 <?php  include '../url_amigable.php';?>
 <?php include 'concha.php';?>
<!DOCTYPE html>
<html lang="es">
<head>
	<!-- Required meta tags -->
	<meta charset="utf-8">
	<meta name="description" content="Panel de Administracion">
	<meta name="author" content="<?php echo $nombresitio ?>">
	<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <title><?php echo $nombresitio ?> - Panel de Administracion</title>
  <!--link href='http://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'-->
  <link href="https://fonts.googleapis.com/css?family=Montserrat:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900&display=swap" rel="stylesheet">
  <link rel="shortcut icon" href="" type="image/x-icon">
	<link rel="apple-touch-icon" href="">

	<!-- Bootstrap CSS -->
	<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">

  <!-- Link to your css file -->
	<link rel="stylesheet" href="">
  <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
  <script src="../js/jquery.fittext.js"></script>

<script>
$(".tamaĆ±oMenu").fitText(1.2, { minFontSize: '14px', maxFontSize: '32px' });
</script>
  <!--script type="text/javascript" src="//recursos.radiosnethosting.com/ckeditor/ckeditor.js"></script-->

    <style>

        .carousel-cell {
          width: 66%;
          margin-right: 5px;
        }

        .display-flex{
            display: flex;
            justify-content: center;
            align-items: center;
        }

        *{
            border-radius: 0!important;

        }

        body {
            background-image: url(../fondeux.jpg);
            background-position:top center;
            background-repeat: repeat-x;
            background-color:#EBEBEB;
            height:100%;
        }

        .btn, a, h1, h2, h3, h4, h5, h6, b{
          font-family: 'Montserrat', sans-serif;
        }

        .btn, h1, h2, h3, h4, h5, h6 {
          font-weight: 600;
        }

        .navbar {
            position: relative;
        min-height: 50px;
        padding-bottom:  20px;
        /* border: 1px solid transparent; */

        }

      .btn-primary {
        color: #fff!important;
        background-color: #0066FF;
        border-color: #0066FF;
            }

        .page-header{
            margin: 0;
            padding: 1em;
            background-color: #0066FF;
            border: 0;
            text-align:center;
        }

        .page-header h2{

            color: #ffffff;
            font-weight: bold;
        }

        .bloqueAzul{
          /*  background-color: #0066FF;*/
          /* border: 1px solid #e4e4e4;*/
          /*  padding: 1em;*/
            text-align: center;
        }

        .bloqueAzul .div {
          border: 1px solid #e4e4e4;
            background-color: #fff;
        }

        ul{
            list-style: none;
            padding: 0;
        }

        .far{
            color:#0066FF;
        }
        .faso {
            color:#fff;
        }

        .colorAzul h3{
            color:#0066FF;

        }

    </style>

    <script language=javascript>
      function ventanaSecundaria (URL){
        window.open(URL,"ventana1","width=550,height=450,scrollbars=NO")
      }
    </script>

</head>

<body>



        <div class="container p-0" style="background-color:#F1F2ED;">



            <?php include 'menu.php';  ?>



        </div>

                  <div  style="background-color:#fff;" class="container pt-3">

                    <div class="row">


    <div class="col-12 col-lg-12" >


<h1><? echo $texto_personas ?></h1>
<hr>

 <a href="agregar_persona.php"><button type="button">Agregar Persona</button></a>

<hr>
<!-- Agrega este bloque antes o despu«±s del bucle while -->
<div class="col-12 mt-3 mb-3">
    <form action="buscar_persona.php" method="POST">
        <div class="input-group">
            <input type="text" name="q" class="form-control" placeholder="Buscar persona">
            <div class="input-group-append">
                <button class="btn btn-outline-primary" type="submit">Buscar</button>
            </div>
        </div>
    </form>
</div>


<hr>
<div class="row">
<?php
$busca = $_POST['q'];

// Establece la conexi«Ńn a la base de datos
mysql_connect("$host", "$usuario", "$contra");
mysql_select_db("$basedatos");

// Construye la consulta SQL
$sql = "SELECT * FROM `personas` WHERE `nombre` LIKE '%$busca%' ORDER BY `ID` DESC";


// Ejecuta la consulta
$consulta = mysql_query($sql);

// Verifica si hay resultados
while ($row = mysql_fetch_array($consulta)) {
    $ID = $row["ID"];
    $nombre = $row["nombre"];
    $email = $row["email"];
    $telefono = $row["telefono"];
    $facebook = $row["facebook"];
    $instagram = $row["instagram"];
    $foto = $row["foto"];
    $categoria = $row["categoria"];
    $puesto = $row["puesto"];
    $sobre_mi = $row["sobre_mi"];
    $carpetafoto = $row["carpetafoto"];
    $localidad = $row["localidad"];
    $nacimiento = $row["nacimiento"];
    $extra1 = $row["extra1"];
    $extra2 = $row["extra2"];
    $extra3 = $row["extra3"];
    $extra4 = $row["extra4"];
    $extra5 = $row["extra5"];
    $extra6 = $row["extra6"];
    ?>

     <div class="col-12 mb-3 px-2">           
        <div class="col-12 border">
             <?php if ($foto != '') { ?>
            <div class="col-12 px-0 py-3">
                <img src="<?php echo "$dom/$foto"; ?>" class="img-fluid"> 
            </div>
        <?php } ?>
            <div class="col-12 p-0">
                <h4><?php echo $nombre; ?></h4>
            </div>
            <div class="col-12 text-center mb-3">
                <a class="btn btn-outline-danger" href="ver_ficha_persona.php?ID=<?php echo $ID; ?>">
                    Ver Ficha</a>
            </div>
        </div>
    </div>
    <?php 
}

// Libera los resultados de la consulta
mysql_free_result($consulta);
?>
</div>
</div>
                      </div>

                    </div>








              <!-- jQuery first, then Popper.js, then Bootstrap JS -->
              <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
              <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
              <!-- JavaScript -->


           <script src="https://unpkg.com/isotope-layout@3/dist/isotope.pkgd.js"></script>
           <script type="text/javascript">
           window.setInterval(function(){
             $('.grid').isotope({
             itemSelector: '.grid-item'
           });
           }, 500);
           </script>
              <script>
                  var elem = document.querySelector('.grido');
                  var iso = new Isotope( elem, {
                  // options
                  itemSelector: '.grido-item',
                  layoutMode: 'fitRows'
                  });

              </script>
            <script defer src="https://use.fontawesome.com/releases/v5.8.1/js/all.js" integrity="sha384-g5uSoOSBd7KkhAMlnQILrecXvzst9TdC09/VM+pjDTCM+1il8RHz5fKANTFFb+gQ" crossorigin="anonymous"></script>
           </body>
           </html>
