<?php

    include 'sesion.php';
    include '../url_amigable.php';
    include 'concha.php';
    include 'concha_extras.php';

    ?>
<!DOCTYPE html>
<html lang="es">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<!-- Required meta tags -->

	<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 rel="shortcut icon" href="" type="image/x-icon">
  <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="apple-touch-icon" href="">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>

	<!-- Bootstrap CSS -->
	<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
	<!-- Link to your css file -->
	<link rel="stylesheet" href="">

<!--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: #e4e4e4;
        }

        .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;

        }

        /* Small devices (landscape phones, 576px and up) */
        @media (min-width: 576px) {
            .listaPublis {
            column-count: 1;
              }
        }

        /* Medium devices (tablets, 768px and up) The navbar toggle appears at this breakpoint */
        @media (min-width: 768px) {
            .listaPublis {
            column-count: 2;
              }
        }

        /* Large devices (desktops, 992px and up) */
        @media (min-width: 992px) {
            .listaPublis {
            column-count: 3;
           }
        }

    </style>

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


</head>



<body>




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

            <?php

                if($estiloweb == 9 || $estiloweb == 85 || $estiloweb == 86) {
                    include 'menu_estilo9.php';
                } else {
                    include 'menu.php';
                }


            ?>

        </div>

        <div role="main" style="background-color:#fff;<?php if($estiloweb == 9 || $estiloweb == 85 || $estiloweb == 86) {echo 'margin-top:100px;';} else {}?>" class="container pt-3">

            <div class="page-header" style="text-align:center;">

                <h2>PUBLICIDADES CARGADAS</h2>

            </div>



            <div class="col-12">

                      <div class="col-12 text-center p-0 my-3">
                        <a class="btn btn-block btn-outline-primary" href="upload_gif.php">
                    CARGAR UNA PUBLICIDAD NUEVA
                        </a>
                      </div>

                      </div><HR>

                        <ul>

                          <li><? echo $idioma_100833?><li>
                          <li><? echo $idioma_100834?></li>
                          <li><? echo $idioma_100835?></li>
                          <li><? echo $idioma_100836?></li>
                          <li><? echo $idioma_100837?></li>
                          <li><? echo $idioma_100838?></li>
                        </ul>

                        <p><? echo $idioma_100839 ?></p>


<HR>





                    <div class="col-12">

                      <?php

                   

                        $sql = "SELECT * FROM  `publicidades_gif` ORDER BY ID desc";

                        $consulta = $conn->query($sql);
                        while ($row = $consulta->fetch_assoc())
                        {
                        $ID_p = $row["ID"];
                        $img = $row["img"];
                        $img_movil = $row["img_movil"];
                        $carpeta_foto_img_movil = $row["carpeta_foto_img_movil"];
                        $carpetafoto = $row["carpetafoto"];
                        $url = $row["url"];
                        $lugar= $row["lugar"];

                        ?>
                        <div class="container mb-3 border-bottom">

                            <div class="row">

                              <div class="col-12 p-0">

                                  <?php

                                    $formato = substr($img, -3);
                                    if($formato == 'mp4'){?>
                                      <? /* 1 */ if ($domold != '') { $dom_bandera = $dom; $dom = $domold; }; ?>

                                    <div style="position:relative;padding-bottom:56.25%;">
                                        <video style="position:absolute;height:100%;width:100%;" autoplay="true" loop="true" controls="true">
                                          <source type="video/mp4" src="<?php echo $dom ?>/<?php echo $carpetafoto ?>/<?php echo $img ?>">
                                          Your browser does not support the video tag.
                                        </video>
                                    </div>
  <? /* 2 */ $dom = $dom_bandera; ?>
                                    <? } else {?>
<hr><? /* 1 */ if ($domold != '') { $dom_bandera = $dom; $dom = $domold; }; ?>

                                      PCPC<br>
                                        <a href="<?php echo $dom ?>/<?php echo $carpetafoto ?>/<?php echo $img ?>" target="_blank"><img src="<?php echo $dom ?>/<?php echo $carpetafoto ?>/<?php echo $img ?>" class="img-fluid" style="max-height:320px; max-width: 750px;"/></a>

                                        <hr>

                                        MOVIL<br>
                                        <a href="<?php echo $dom ?>/<?php echo $carpeta_foto_img_movil ?>/<?php echo $img_movil ?>" target="_blank"><img src="<?php echo $dom ?>/<?php echo $carpeta_foto_img_movil ?>/<?php echo $img_movil ?>" class="img-fluid" style="max-height:320px; max-width: 750px;"/></a>



<a href="poner_foto_pubi_movil.php?ID=<? echo $ID_p ?>">SUBIR VERSION PARA MOVIL</a>


                                        <hr>

<? /* 2 */ $dom = $dom_bandera; ?>
                                <? } ?>



                              </div>

                              <div class="col-2 p-0 pt-3 text-center">
                                <a href="borrargif.php?ID=<?php echo $ID_p ?>" class="btn btn-outline-danger">
                                    <? echo $idioma_100076 ?> <i class="fas fa-times"></i>
                                </a>
                              </div>

                              <div class="col-10 p-5 text-center">

                                <form id="form2" name="form1" method="post" action="poner_link_imagen_gif.php">
                                  <input class="form-control" name="ID" type="hidden" value="<?php echo $ID_p ?>" />

                                  <div class="form-group row">
                                    <label for="url" class="col-sm-6 col-form-label"><? echo $idioma_100840 ?></label>
                                    <div class="col-sm-6">
                                      <input class="form-control" placeholder="https:// AQUÍ VA EL LINK" name="url" type="text" id="url" value="<?php if ($url == NULL) { ?><?php } else {echo $url; };?>" />
                                    </div>
                                  </div>

                                  <div class="form-group <?php if($estiloweb == 9 || $estiloweb == 85 || $estiloweb == 86){ echo 'd-none';}?> row">
                                    <label for="lugar" class="col-sm-6 col-form-label"><? echo $idioma_100841 ?></label>
                                    <div class="col-sm-6">
                                    <input class="form-control" name="lugar" type="text" id="lugar" value="<?php echo $lugar ?>" />
                                    </div>
                                  </div>

                                    <ul class="d-flex justify-content-center">
                                        <li><a class="btn btn-outline-primary" href="form_quitar_publicidad_gif_lugar.php?ID_i=<?php echo $ID_p ?>"><? echo $idioma_100842 ?></a>
                                        </li>

                                        <li><button type="submit" class="btn btn-primary" name="button" id="button">GUARDAR CAMBIOS</button></li>
                                    </ul>



                                  <div class="text-center m-5">


                                  </div>

                                </form>
                              </div>

                            </div>

                          </div>

                        <?php } $consulta->free_result();?>

                    </div>


            </div>


        </div>

<!-- jQuery first, then Popper.js, then Bootstrap JS -->
  <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
  <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>

<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 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>
