<?php include 'sesion.php';?>
<?php include 'concha.php';
$sql = "SELECT * FROM `html_inicio` LIMIT 1";
$consulta = mysql_query ($sql);
while ($row = mysql_fetch_array($consulta))
{
$html_embed = $row["texto"];
}
mysql_free_result($consulta);
?>
<!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="https://cdn.ckeditor.com/4.13.0/standard/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" style="background-color:#F1F2ED;">

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

    </div>

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

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

                <h2>PARTIDOS</h2>

            </div>



<form action="form_cargar_tabla_posiciones.php" method="post">

<HR>
	     <h2>CARGAR UNA POSICIÓN</h2>
<HR>

<input type="text" placeholder="POSICION/PUESTO: 1,2,3, ETC" name="puesto" class="form-control">

<HR>



<p>Seleccione  la <b>zona</b> al que corresponde este partido.</p>
<select class="form-control" name="ID_campeonato">
<?

 echo "<option value ='0'> SELECCIONE ZONA</option>";
			 $sql = "SELECT * FROM `club_1_zonas`";
			 $consulta = mysql_query ($sql);
			 while ($row = mysql_fetch_array($consulta))
			 {
			 $nombre = $row["zona"];
			 $ID = $row["ID"];
			 echo "<option value ='$ID'> $nombre</option>";
			  }
			 mysql_free_result($consulta);
?>
</select>

			<HR>

<p>Seleccione el <b>Club</b>.</p>
			<select class="form-control" name="ID_club">

			<?

			 echo "<option value ='0'> SELECCIONE CLUB</option>";
						 $sql = "SELECT * FROM `club_2_clubes` ";
						 $consulta = mysql_query ($sql);
						 while ($row = mysql_fetch_array($consulta))
						 {
						 $nombre = $row["nombre"];
						 $fecha = $row["fecha"];

						 $ID_club = $row["ID"];
						 echo "<option value ='$ID_club'> $nombre</option>";
							}
						 mysql_free_result($consulta);
			?>
			</select>


			<HR>

LUEGO SE PONEN LOS DATOS <b>PTS 	PJ 	PG 	PE 	PP 	GF 	GC 	DIF</b> 	y <b>COLORES</b>
			<HR>

	<input type="submit" class="btn-primary btn" value="ENVIAR">

</form>
<br>
<br><br>
<HR>
	     <h2>TABLAS CREADAS</h2>
<HR>
	<div class="row" style="border: solid;border-width: 1px;">


		<div class='col-2'>

					 <B style='font-size: 23px;'> - CLUB </B>


					 </div>
					 	<div class='col-1' style='border: solid; border-width: 1px;'>
					 		zona
					 		</div>
		<div class='col-1' style='border: solid; border-width: 1px;'>
		pts
		</div>

		<div class='col-1' style='border: solid; border-width: 1px;'>
		pj
		</div>

		<div class='col-1' style='border: solid; border-width: 1px;'>
		pg
		</div>


		<div class='col-1' style='border: solid; border-width: 1px;'>
		pe
		</div>


		<div class='col-1' style='border: solid; border-width: 1px;'>
		pp
		</div>

		<div class='col-1' style='border: solid; border-width: 1px;'>
		gf
		</div>

		<div class='col-1' style='border: solid; border-width: 1px;'>
		gc
		</div>

		<div class='col-1' style='border: solid; border-width: 1px;'>
		dif
		</div>

		<div class='col-1' style='border: solid; border-width: 1px;'>

		</div>


	</div>
<div class="row" style="border: solid;border-width: 1px;">




<?

		 	 $sql = "SELECT * FROM `club_5_tabla` ORDER BY `club_5_tabla`.`ID_campeonato` DESC  ";
			 $consulta = mysql_query ($sql);
			 while ($row = mysql_fetch_array($consulta))
			 {
				 $puesto = $row["puesto"];
				 $ID_campeonato = $row["ID_campeonato"];
				  $ID_club = $row["ID_club"];

					$pts = $row["pts"];
					$pj = $row["pj"];
					$pg = $row["pg"];
					$pe = $row["pe"];
					$pp = $row["pp"];
					$gf = $row["gf"];
					$gc = $row["gc"];
					$dif = $row["dif"];
					$color = $row["color"];

					$ID = $row["ID"];
$ID_zona = $row["ID_campeonato"];
	$puesto = $row["puesto"];

					$sql3 = "SELECT * FROM `club_1_zonas` WHERE `ID` = $ID_zona LIMIT 1";

		 		 $consulta3 = mysql_query ($sql3);
		 		 while ($row3 = mysql_fetch_array($consulta3))
		 		 {
		 			 $nombrezona = $row3["zona"];



		 		}
				 mysql_free_result($consulta3);


				 $sql3 = "SELECT * FROM `club_2_clubes`  WHERE ID = '$ID_club' LIMIT 1";

				$consulta3 = mysql_query ($sql3);
				while ($row3 = mysql_fetch_array($consulta3))
				{
					$nombre = $row3["nombre"];



			 }
				mysql_free_result($consulta3);


			 echo "

<div class='col-2'  style='border: solid; border-width: 1px;'>

			 <B style='font-size: 23px;'>$puesto º / $nombre </B>


			 </div>




<div class='col-1' style='border: solid; border-width: 1px;'>
$nombrezona
</div>






<div class='col-1' style='border: solid; border-width: 1px;'>
$pts
</div>

<div class='col-1' style='border: solid; border-width: 1px;'>
$pj
</div>

<div class='col-1' style='border: solid; border-width: 1px;'>
$pg
</div>


<div class='col-1' style='border: solid; border-width: 1px;'>
$pe
</div>


<div class='col-1' style='border: solid; border-width: 1px;'>
$pp
</div>

<div class='col-1' style='border: solid; border-width: 1px;'>
$gf
</div>

<div class='col-1' style='border: solid; border-width: 1px;'>
$gc
</div>

<div class='col-1' style='border: solid; border-width: 1px;'>
$dif
</div>

<div class='col-1' style='border: solid; border-width: 1px;'>
			 <a href='editar_lugar_tabla_posicones.php?ID=$ID'><button class='btn-success btn' style='font-size: 12px;'><i class='fa fa-marker'></i> EDITAR </button></a> <a href='eliminar_lugar_tabla_posicones.php?ID=$ID'><button class='btn-danger btn' style='font-size: 12px;'><i class='fa fa-trash'></i>  ELIMINAR </button></a><HR>
</div>



			 ";
				}

			 mysql_free_result($consulta);
?>
</div>
<HR>

<H2><A Href="menu_tabla_deportiva.php">VOLVER</A></H2>







</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>
    <script>
            CKEDITOR.replace( 'ckeditor' );
    </script>
</body>
</html>
