<?php
session_start();

if(isset($_SESSION['Login'])){
	if ($_SERVER["REQUEST_METHOD"]=="POST"){
		require_once('../Operaciones/Admin_operacion_Alt.php');
		$Mun=$_POST['Mun'];
		$dato= new Admin_P_Alt();
		echo "El Cliente es :".$Mun;
	}
}else {
	session_start();
	session_destroy();
	header('location: ../index.php?error=acceso');
}

?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
<style>
	*{
		margin: 0;
	}
	.MenuP {
		padding: 5px;
		float: left;
		width: 150px;
		height: 570px;
		border: 1px solid black;
		background-color: rgba(232,232,232,1.00);
		border-radius: 0 0 0 25px;
		overflow-y: auto;
	}
	
	.MenuS {
		float: left;
		width: 600px;
		height: 575px;
		border: 1px solid black;
		background-color:bisque;
		border-radius: 0 0 25px 0;
	}
	.MenuC {
		width: auto;
		height: 30px;
	}
	section p {
		overflow: hidden;
		max-height: 0;
		text-align:center;
		font-family: Consolas, Andale Mono, Lucida Console, Lucida Sans Typewriter, Monaco, Courier New, monospace;
		background-color: #e4e4e4;
		transition: all .2s ease-in-out;
		
	}
	section p:hover {
		text-decoration: none;
		cursor: pointer;
		color:burlywood;
	}
	section a {
		text-decoration: none;
		display: block;
		text-align: left;
		padding: 5px;
		font-family: 'Courier new',Courier, monospace;
		background-color: white;
		border-bottom: 1px solid gray;
	}
	section:target p {
		max-height: 120px;
		padding: 1px;
	}
</style>
</head>

<body>
<div class="MenuC"> Fecha Inicio Fecha Final </div>
<div class="MenuP">
<!-- Presenta los blocks -->

<?php
	$resultado=$dato->ListBlock($Mun);
	 while ($row=$resultado->fetch_assoc()){
		 $tBlock=$row['F_inicio'].'-'.$row['F_final'];
		 $noBlock=$row['Id_block'];
		echo '<section id="'.$noBlock.'"><a href="#'.$noBlock.'">'.$tBlock.'</a>';
		 $Fol_ini=$row['F_inicio'];
		while ( $Fol_ini <= $row['F_final'] ){
			echo '<p onclick="presFolio('.$Fol_ini.')">'.$Fol_ini.'</p>';
			$Fol_ini++;
		}
		 echo '</section>';
	 }
?>
 
</div>
<div class="MenuS"></div>
</body>
</html>