<?php
session_start();
require('../../Operaciones/Admin_operacion.php');
if(isset($_SESSION['Login'])){
$Id	=$_SESSION['Login'];
}else {
	session_start();
	session_destroy();
	header('location: ../index.php?error=acceso');
}
$dato=new Admin_P();
$Muni= filter_input(INPUT_POST,'List_Mpios',FILTER_VALIDATE_INT) ? true : false;
$Log_In=filter_input(INPUT_POST,'Log_in',FILTER_SANITIZE_STRING) ? true : false;
$Descrip=filter_input(INPUT_POST,'Descrip',FILTER_SANITIZE_STRING) ? true : false;
$Pass=filter_input(INPUT_POST,'Contrase',FILTER_SANITIZE_STRING) ?  true : false;

if ($Muni==1 and $Log_In==1 and $Pass==1){
	$Ganadera=$_POST['List_Ganaderas'];
	$Muni=$_POST['List_Mpios'];
	$Log_In=$_POST['Log_in'];
	$Pass=$_POST['Contrase'];
	$Descrip=$_POST['Descrip'];
	$dato=$dato->Alta_Usr($Ganadera,$Muni, $Log_In, $Descrip, $Pass);
	echo $dato;

}else{
	echo "¡¡ ERROR 102: Error de Captura ¡¡";
	//echo "Municipio Val : ".$Muni." Log In Val : ".$Log_In. " Contraseña Val : ".$Pass;
}
	


?>
