<?php
 @session_start();
  $vg_login=$_SESSION["usuario"];
   $vg_empresa=$_SESSION["empresa"];
  if($vg_login<>""){}
 else
  {echo "<script>";
   echo "window.location='../index.php';";
   echo "</script>";
  }	

include "../valida_permisos.php";
$vg_programa = F_programa();
include "../seguridad.php";
$sql_entrada= mysqli_query($conseg,"select login,nombre,perfil,programa,cedula,pais from permiso     
						where login='".$vg_login."'  and programa=".$vg_programa."");
while($datos= mysqli_fetch_row($sql_entrada))
		{ $vg_nombre=$datos[1];
		  $vg_perfil=$datos[2];				
		} 
//permisos a formularios
$modulo="Parametros_empresa";
$permisos=validar_permiso($vg_login,$modulo,$vg_perfil,$vg_programa);
include "../permisos.php";
$valpermiso=F_permiso($permisos);

if($valpermiso[0]==1){}
else
{echo "<script>";
echo "window.location='../erroracceso.php?formulario=Parametros_Empresa';";
echo "</script>";
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php  echo $nombreprograma." - ".$version; ?></title>
  <script src="../js/jquery.min.js"></script>
  <link href="../bootstrap/css/bootstrap.min.css" rel="stylesheet">
 <script src="../bootstrap/js/bootstrap.min.js"></script>
 <link rel="stylesheet" href="../toastn/style.css">
 <script src="../toastn/cute-alert.js"></script>
 
   <link rel="stylesheet" href="../plugins1/datatables-bs4/css/dataTables.bootstrap4.min.css">
  <link rel="stylesheet" href="../plugins1/datatables-responsive/css/responsive.bootstrap4.min.css">
  <link rel="stylesheet" href="../plugins1/datatables-buttons/css/buttons.bootstrap4.min.css">
  
</head>
<body>
<?php
$tabla="empresa";
include "../conexion.php";
$nit="";$nombre="";$direccion="";$email="";
$representante="";	$telefono="";	$contacto="";
$email_contacto=""; $email_fe=""; $estado="";
$notifica="";$clave="";$email_contacto="";$email_notifica="";

$rs_estado=mysqli_query($conexion,"SELECT id,nombre FROM estado where tipo='PARAMETROS' order by nombre asc");


if($_REQUEST["id"]<>'')
	{ $id=$_REQUEST["id"]; 		    
		  $sql_contar=mysqli_query($conexion,"SELECT count(*) as contar FROM $tabla   where id='".$_REQUEST["id"]."'");
			  while($datos= mysqli_fetch_row($sql_contar)){ $contar=$datos[0];}
			  if($contar>=1)
				{$sql_datos =mysqli_query($conexion,"select  nit,nombre,direccion,telefono,email,representante,contacto,email_contacto,emailfe,email_notifica,clave,estado,id
												    FROM $tabla
										  			where id='".$_REQUEST["id"]."'");
						while($datos= mysqli_fetch_row($sql_datos))
						{ 
							$nit=$datos[0]; 						
							$nombre=$datos[1]; 	
							$direccion=$datos[2]; 	
							$telefono=$datos[3]; 	
							$email=$datos[4]; 	
							$representante=$datos[5]; 	
							$contacto=$datos[6]; 	
							$email_contacto=$datos[7]; 	
							$email_fe=$datos[8]; 	
							$email_notifica=$datos[9]; 	
							$clave=$datos[10]; 	
							$estado=$datos[11]; 
					   }
				}
}


if(isset($_REQUEST['oculto']))
  { 
	$id=$_REQUEST['id'];						
	$nit=$_REQUEST['nit'];							
	$nombre=$_REQUEST['nombre'];	
	$direccion=$_REQUEST['direccion'];	
	$telefono=$_REQUEST['telefono'];	
	$email=$_REQUEST['email'];	
	$representante=$_REQUEST['representante'];	
	$contacto=$_REQUEST['contacto'];	
	$email_contacto=$_REQUEST['email_contacto'];	
	$email_fe=$_REQUEST['email_fe'];	
	$email_notifica=$_REQUEST['email_notifica'];	
	$clave=$_REQUEST['clave'];	
	$estado=$_REQUEST['estado'];					
					
if($_REQUEST["oguardar"]==1)
	 {   
		  if($nombre<>"") 
		  {
			  $sql_contar=mysqli_query($conexion,"SELECT count(*) as contar FROM $tabla  where nit='".$nit."'");
			  while($datos= mysqli_fetch_row($sql_contar)){ $contar=$datos[0];}
			  if($contar>=1) {echo "<script>alert('Ya existe el registro');</script>";}
			  else
				{ $busqueda=1;
				  $sql_insert=mysqli_query($conexion,"insert into $tabla(nit,nombre,direccion,telefono,email,representante,contacto,email_contacto,emailfe,email_notifica,clave,estado)
										  values('".$nit."','".$nombre."','".$direccion."','".$telefono."','".$email."','".$representante."','".$contacto."','".$email_contacto."',
										  		'".$email_fe."','".$email_notifica."','".$clave."','".$estado."')"); 
				 if($sql_insert)
				   {
				      $mensaje="Se registro ";
					    ?>				  
						<script>
						cuteToast({
							  type: "success", // or 'info', 'error', 'warning'
							  message: "<?php echo $mensaje; ?>",
							  timer: 3000
							})
						</script>
                       <?php
				   }	
				 else 
				  {
				    $mensaje="Error al registrar ";
					    ?>				  
						<script>
						cuteToast({
							  type: "error", // or 'info', 'error', 'warning'
							  message: "<?php echo $mensaje; ?>",
							  timer: 3000
							})
						</script>
                       <?php
				  }				
				}
		 }
		 else {
			   $mensaje="Digite la Informacion Requerida";
					    ?>				  
						<script>
						cuteToast({
							  type: "error", // or 'info', 'error', 'warning'
							  message: "<?php echo $mensaje; ?>",
							  timer: 3000
							})
						</script>
                       <?php
		 }				

	 }//fin guardar

if($_REQUEST["omodificar"]==1)
	 {   
		  $sql_contar=mysqli_query($conexion,"SELECT count(*) as contar FROM $tabla where id='".$id."'");
		  while($datos= mysqli_fetch_row($sql_contar)){ $contar=$datos[0];}
		  if($contar>=1) 
			{ $busqueda=1;
			  $sql_update=mysqli_query($conexion,"update $tabla set
			  										nit='".$nit."',
													nombre='".$nombre."',
													direccion='".$direccion."',
													telefono='".$telefono."',
													email='".$email."',
													representante='".$representante."',
													contacto='".$contacto."',
													email_contacto='".$email_contacto."',
													emailfe='".$email_fe."',
													email_notifica='".$email_notifica."',
													clave='".$clave."',
													estado='".$estado."'
												  where id='".$id."'"); 
			 if($sql_update)
			   {
			    $mensaje="Se modifico ";
					    ?>				  
						<script>
						cuteToast({
							  type: "success", // or 'info', 'error', 'warning'
							  message: "<?php echo $mensaje; ?>",
							  timer: 3000
							})
						</script>
                       <?php
			   }	
			 else 
			  {
			   $mensaje="Error al modificar";
					    ?>				  
						<script>
						cuteToast({
							  type: "error", // or 'info', 'error', 'warning'
							  message: "<?php echo $mensaje; ?>",
							  timer: 3000
							})
						</script>
                       <?php
			  }				
			}
		  else
		   {
		    $mensaje="No existe el codigo";
					    ?>				  
						<script>
						cuteToast({
							  type: "error", // or 'info', 'error', 'warning'
							  message: "<?php echo $mensaje; ?>",
							  timer: 3000
							})
						</script>
                       <?php
		   }	
	 }//fin guardar


if($_REQUEST["obusca"]==1)
             {   
			     if($id<>"")
				 {
					 $sql_contar=mysqli_query($conexion,"SELECT count(*) as contar FROM $tabla where nit='".$nit."'");
					   while($datos= mysqli_fetch_row($sql_contar)){ $contar=$datos[0];}
					  if($contar>=1)
						{ 	$sql_datos =mysqli_query($conexion,"select  nit,nombre,direccion,telefono,email,representante,contacto,email_contacto,emailfe,email_notifica,clave,estado
												    FROM $tabla
										  			where nit='".$nit."'");
								while($datos= mysqli_fetch_row($sql_datos))
								{ 
									$id=$datos[0]; 						
									$nombre=$datos[1]; 	
									$direccion=$datos[2]; 	
									$telefono=$datos[3]; 	
									$email=$datos[4]; 	
									$representante=$datos[5]; 	
									$contacto=$datos[6]; 	
									$email_contacto=$datos[7]; 	
									$email_fe=$datos[8]; 	
									$email_notifica=$datos[9]; 	
									$clave=$datos[10]; 	
									$estado=$datos[11]; 	
							   }
						}
						else
						  {
						    $mensaje="No existe el codigo";
								?>				  
								<script>
								cuteToast({
									  type: "error", // or 'info', 'error', 'warning'
									  message: "<?php echo $mensaje; ?>",
									  timer: 3000
									})
								</script>
							   <?php
						  }
				  }
             }//fin buscar

	if(isset ($_REQUEST['nuevo']))
	   { 
	   		$nit="";$nombre="";$direccion="";$email="";
			$representante="";	$telefono="";	$contacto="";
			$email_contacto=""; $email_fe=""; 
			$notifica="";$clave="";$email_contacto="";$email_notifica="";
	   }

  }


?>
<form name="frmempresa" method="post" action="" >
  <input name="id" type="hidden"  id="id"    value="<?php echo $id; ?>"  />
 <center>
    <div class="panel panel-primary" style="width:90%;">
      <div class="panel-heading">EMPRESA</div>
       <div align="center">
		<table width="100%" border="0" cellpadding="0" cellspacing="0" bordercolor="#999999" >
          <tr>
            <td width="11%" height="-10"><span class="texto">Nit</span></td>
            <td width="33%"><input name="nit" type="text"  id="nit"    value="<?php echo $nit; ?>"               
              style="width: 100%" class="form-control"/>
            <td width="15%"><span class="texto">Nombre</span></td>
            <td width="41%">
              <input name="nombre" type="text"  id="nombre"    value="<?php echo $nombre; ?>"              
              style="width: 100%" class="form-control"/>           </td>
          </tr>
          <tr>
            <td width="11%" height="-5"><span class="texto">Direccion</span></td>
            <td><input name="direccion" type="text"  id="direccion"    value="<?php echo $direccion; ?>"              
              style="width: 100%" class="form-control"/></td>
            <td width="15%"><span class="texto">Telefono </span></td>
            <td width="41%"><input name="telefono" type="text"  id="telefono"    value="<?php echo $telefono; ?>"              
              style="width: 100%" class="form-control"/></td>
          </tr>
          <tr>
            <td width="11%" height="-2"><span class="texto">Email </span></td>
            <td><input name="email" type="text"  id="email"    value="<?php echo $email; ?>"              
              style="width: 100%" class="form-control"/></td>
            <td width="15%"><span class="texto">Representante</span></td>
            <td width="41%"><input name="representante" type="text"  id="representante"    value="<?php echo $representante; ?>"              
              style="width: 100%" class="form-control"/></td>
          </tr>
          
          <tr>
            <td height="1" align="left"><span class="texto">Contacto</span></td>
            <td height="1" align="center"><input name="contacto" type="text"  id="contacto"    value="<?php echo $contacto; ?>"              
              style="width: 100%" class="form-control"/></td>
            <td height="1" align="left"><span class="texto">Email Contacto</span></td>
            <td height="1" align="center"><input name="email_contacto" type="text"  id="email_contacto"    value="<?php echo $email_contacto; ?>"              
              style="width: 100%" class="form-control"/></td>
            <td height="1" align="center">&nbsp;</td>
          </tr>
          <tr>
            <td height="1" align="left">Email FE</td>
            <td height="1" align="center"><input name="email_fe" type="text"  id="email_fe"    value="<?php echo $email_fe; ?>"              
              style="width: 100%" class="form-control"/></td>
            <td height="1" align="left">Estado</td>
            <td height="1" align="left"><select name="estado"  id="estado"
                            onfocus="this.style.background='#ccffff'" onblur="this.style.background='#FFFFDD'"
                            class="form-control" data-toggle="tooltip" data-placement="right" title="Seleccione el estado del empleado" style="width: 50%" >
              <?php while ($rowba=mysqli_fetch_array($rs_estado))
									{
									 if ($estado==$rowba['id'])
										{echo "<option value=".$rowba['id']." selected>".substr($rowba['nombre'],0,40)."</option>";}
									 else
										{echo "<option value=".$rowba['id'].">".substr($rowba['nombre'],0,40)."</option>";}		
									}
							 ?>
            </select></td>
            <td height="1" align="center">&nbsp;</td>
          </tr>
          <tr>
            <td height="0" align="left">Email Notifica</td>
            <td height="0" align="center"><input name="email_notifica" type="text"  id="email_notifica"    value="<?php echo $email_notifica; ?>" 
              style="width: 100%;" class="form-control"/></td>
            <td height="0" align="left">Clave</td>
            <td height="0" align="center"><input name="clave" type="text"  id="clave"    value="<?php echo $clave; ?>" 
              style="width: 100%;" class="form-control"/></td>
            <td height="0" align="center">&nbsp;</td>
          </tr>
          <tr>
            <td height="-1" colspan="5" align="center">
               <input name="nuevo" type="submit"  id="nuevo"  value="Nuevo" class="btn btn-primary"  style="width: 100px"/>
                <?php
              if($nit=="")
              {
              ?>
              <input name="guardar" type="button"  id="guardar"  value="Guardar" onclick="return pregunta_guardar();" class="btn btn-primary" style="width: 100px"/>
              <?php
			  }
              if($nit<>"")
              {
              ?>
              <input name="modificar" type="button"  id="modificar"  value="Modificar" 	onclick="return pregunta_modificar();" class="btn btn-primary" style="width:100px" />
              <input name="fiscal" type="button"  id="fiscal"  value="Fiscal" 	class="btn btn-primary" style="width:100px" data-toggle="modal" data-target="#modal-fiscal" />
              <input name="resnal" type="resnal"  id="fiscal"  value="Responsabilidad Nacional" 	class="btn btn-primary" style="width:200px" data-toggle="modal" data-target="#modal-resnal" />
              <input name="resmun" type="button"  id="resmun"  value="Responsabiliad Municipal" 	class="btn btn-primary" style="width:200px" data-toggle="modal" data-target="#modal-resmun" />
              <input name="Composicion" type="button"  id="Composicion"  value="Composicion" 	class="btn btn-primary" style="width:110px" data-toggle="modal" data-target="#modal-composicion" />
              <input name="General" type="button"  id="General"  value="General" 	class="btn btn-primary" style="width:100px"  data-toggle="modal" data-target="#modal-general"/>
              <input name="calendario" type="button"  id="calendario"  value="Calendario" 	class="btn btn-primary" style="width:100px"  data-toggle="modal" data-target="#modal-calendario"/>
              
              <input name='rep' type='button'  id='rep' value='Documentos Anexos'   class="btn  btn-primary" 
				  onClick="javascript:window.open('empresa_anexo.php?ne=<?php echo $id;?>&valida=1','TERREPa','menubar=1,toolbar=0,location=0,directories=0,status=1,scrollbars=1,width=500,height=600');" 
                  style="width:150px"  />

			   <?php
			  }
              ?>          
              <input type="hidden" name="oculto" />
              <input name="oguardar" type="hidden" id="oguardar" />
              <input name="omodificar" type="hidden" id="omodificar" />
              <input name="obusca" type="hidden" id="obusca" />
          </tr>
        </table>
   </div>
   
   
<center>
        <table id="example1" class="table table-bordered table-striped" style="font-size:12px; width:100%" cellpadding='0' cellspacing='0'  bordercolor='#cccccc'>
                        <thead>
                            <tr class="btn-primary">
                                <th width='10%'>CODIGO</th>
                                <th width='10%'>NIT</th>
                                <th width='20%'>NOMBRE</th>
                                <th width='20%'>DIRECCION</th>
                                <th width='10%'>TELEFONO</th>
                                <th width='20%'>EMAIL</th>
                                <th width='10%'>REPRESENTANTE</th>
                                <th width='10%'>ESTADO</th>
                            </tr>
                        </thead>
                        <tbody>
<?php


	 $sql_datosrs=mysqli_query($conexion,"SELECT	id,nit,nombre,direccion,telefono,email,representante,contacto,email_contacto,emailfe,email_notifica,clave,estado
  									   from empresa");
  while($datos= mysqli_fetch_row($sql_datosrs))
    { 
			$rsid=$datos[0]; 		
			$nit=$datos[1]; 						
			$nombre=$datos[2]; 	
			$direccion=$datos[3]; 	
			$telefono=$datos[4]; 	
			$email=$datos[5]; 	
			$representante=$datos[6]; 	
			$contacto=$datos[7]; 	
			$email_contacto=$datos[8]; 	
			$email_fe=$datos[9]; 	
			$email_notifica=$datos[10]; 	
			$clave=$datos[11]; 	
			$estado=$datos[12]; 	

			  $rs_estado=mysqli_query($conexion,"SELECT id,nombre FROM estado  where id='".$estado."'");
				while($datoses= mysqli_fetch_row($rs_estado)){ $nestado=$datoses[1];}
				
		   echo " <tr>";
			 echo "<td><a href='empresa.php?tabla=$tabla&id=$rsid'>".$rsid."</a></td>";
			 echo "<td><a href='empresa.php?tabla=$tabla&id=$rsid'>".$nit."</a></td>";
			 echo "<td>".$nombre."</td>";
			 echo "<td>".$direccion."</td>";
			 echo "<td>".$telefono."</td>";
			 echo "<td>".$email."</td>";
			 echo "<td>".$representante."</td>";
			 echo "<td>".$nestado."</td>";
		  echo "</tr>";
	 }

?>
</tbody></table></center> 


 </div>
 </center>  


<div class="modal fade" id="myModalinstruccionformal" role="dialog">
<div class="modal-dialog modal-lg"  >
  <div class="modal-content" >
	<div >
	  <button type="button" class="close" data-dismiss="modal" title="Cerrar">&times;</button>
	  <h4 class="modal-title btn-primary" >DOCUMENTOS EMPRESA</h4>
	</div>
	<div class="modal-body">
		 <iframe src="documentos.php?documento=<?php echo $nit;?>&id=" width="100%" height="300PX" style="border:hidden;"></iframe>
	</div>
	<div class="modal-footer">
	  <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
	</div>
  </div>
</div>
</div>
</div>
 


<SCRIPT type=text/javascript>


function pregunta_guardar(){ 
	cuteAlert({
	  type: "question",
	  title: "Confirmar Para Procesar",
	  message: "",
	  confirmText: "Ok",
	  cancelText: "Cancel"
	}).then((e)=>{
	  
	  if( e == "confirm")
	   {
		   retorno_valida=valida_campos();
		if(retorno_valida==false)
		   {
			document.frmempresa.oguardar.value=0;			
			return false;
			}
		else
		  { document.frmempresa.oguardar.value=1; 
			document.frmempresa.submit();		
		    return true;
		  
		  	}
	   } 
	  else {
			document.frmempresa.oguardar.value=0;
			return false; 
	  }
	})
}




function pregunta_modificar(){ 
	cuteAlert({
	  type: "question",
	  title: "Confirmar Para Modificar",
	  message: "",
	  confirmText: "Ok",
	  cancelText: "Cancel"
	}).then((e)=>{
	  
	  if( e == "confirm")
	   {
		  retorno_valida=valida_campos();
		if(retorno_valida==false)
		   {document.frmempresa.omodificar.value=0; 	
			return false;
			}
		else
		  { document.frmempresa.omodificar.value=1; 
			document.frmempresa.submit();			
		    return true;
	    	}
	   } 
	  else {
			document.frmempresa.omodificar.value=0;
			return false; 
	  }
	})
}

function valida_campos()
{  
	
	var mensaje='';
		 if(document.frmempresa.nit.value!=''){}
		 else {mensaje=mensaje + 'Nit,';    }
		
		/* if(document.frmempresa.nombre.value!=''){}
		 else {mensaje=mensaje + 'Nombre empresa,';    }
		if(document.frmempresa.direccion.value!=''){}	
	 	 else {mensaje=mensaje + 'Direccion,';    }
		 if(document.frmempresa.notifiva.value!=''){}	
	 	 else {mensaje=mensaje + 'Email Notificacion,';    }
		 if(document.frmempresa.clave.value!=''){}	
	 	 else {mensaje=mensaje + 'Clave,';    }
		*/ 
		if(document.frmempresa.nit.value!=''){return true;}
		else {
			cuteAlert({
						  type: "error",
						  title: "JACOME",
						  message: " Informacion Requerida: " + mensaje,
						  buttonText: "Ok"
						})
			  return false;
			 }

}

</script>






<script src="../plugins1/jquery/jquery.min.js"></script>
<script src="../plugins1/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="../plugins1/datatables/jquery.dataTables.min.js"></script>
<script src="../plugins1/datatables-bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="../plugins1/datatables-responsive/js/dataTables.responsive.min.js"></script>
<script src="../plugins1/datatables-responsive/js/responsive.bootstrap4.min.js"></script>
<script src="../plugins1/datatables-buttons/js/dataTables.buttons.min.js"></script>
<script src="../plugins1/datatables-buttons/js/buttons.bootstrap4.min.js"></script>
<script src="../plugins1/jszip/jszip.min.js"></script>
<script src="../plugins1/pdfmake/pdfmake.min.js"></script>
<script src="../plugins1/pdfmake/vfs_fonts.js"></script>
<script src="../plugins1/datatables-buttons/js/buttons.html5.min.js"></script>
<script src="../plugins1/datatables-buttons/js/buttons.print.min.js"></script>
<script src="../plugins1/datatables-buttons/js/buttons.colVis.min.js"></script>
<script>
  $(function () {
    $("#example1").DataTable({
      "responsive": true, "lengthChange": false, "autoWidth": false,
      "buttons": ["excel", "pdf", "print", "colvis"],
	  "order": [ 0, 'asc' ]
    }).buttons().container().appendTo('#example1_wrapper .col-md-6:eq(0)');
   
  });
</script>

              
<div class="modal fade" id="modal-fiscal">
        <div class="modal-dialog modal-xl" style="width:50%;">
          <div class="modal-content">
            <div class="modal-header">
              <h4 class="modal-title">FISCAL</h4>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body">
              <iframe src="empresa_fiscal.php?empresa=<?php echo $id;?>" width="100%" height="450PX" style="border:hidden;"></iframe>
            </div>
            <div class="modal-footer justify-content-between">
              <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
          </div>
        </div>
</div>

<div class="modal fade" id="modal-resnal">
        <div class="modal-dialog modal-xl" style="width:50%;">
          <div class="modal-content">
            <div class="modal-header">
              <h4 class="modal-title">RESPONSABILIDAD NACIONAL</h4>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body">
              <iframe src="empresa_responsabalidadnal.php?empresa=<?php echo $id;?>" width="100%" height="350PX" style="border:hidden;"></iframe>
            </div>
            <div class="modal-footer justify-content-between">
              <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
          </div>
        </div>
</div>

<div class="modal fade" id="modal-resmun">
        <div class="modal-dialog modal-xl" style="width:80%;">
          <div class="modal-content">
            <div class="modal-header">
              <h4 class="modal-title">RESPONSABILIDAD MUNICIPAL</h4>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body">
              <iframe src="empresa_responsabalidadmun.php?empresa=<?php echo $id;?>" width="100%" height="350PX" style="border:hidden;"></iframe>
            </div>
            <div class="modal-footer justify-content-between">
              <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
          </div>
        </div>
</div>


<div class="modal fade" id="modal-composicion">
        <div class="modal-dialog modal-xl" style="width:80%;">
          <div class="modal-content">
            <div class="modal-header">
              <h4 class="modal-title">COMPOSICION</h4>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body">
              <iframe src="empresa_composicion.php?empresa=<?php echo $id;?>" width="100%" height="350PX" style="border:hidden;"></iframe>
            </div>
            <div class="modal-footer justify-content-between">
              <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
          </div>
        </div>
</div>

<div class="modal fade" id="modal-general">
        <div class="modal-dialog modal-xl" style="width:80%;">
          <div class="modal-content">
            <div class="modal-header">
              <h4 class="modal-title">GENERAL</h4>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body">
              <iframe src="empresa_general.php?empresa=<?php echo $id;?>" width="100%" height="350PX" style="border:hidden;"></iframe>
            </div>
            <div class="modal-footer justify-content-between">
              <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
          </div>
        </div>
</div>

<div class="modal fade" id="modal-calendario">
        <div class="modal-dialog modal-xl" style="width:80%;">
          <div class="modal-content">
            <div class="modal-header">
              <h4 class="modal-title">CALENDARIO</h4>
              <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                <span aria-hidden="true">&times;</span>
              </button>
            </div>
            <div class="modal-body">
              <iframe src="empresacalendario.php?empresa=<?php echo $id;?>" width="100%" height="350PX" style="border:hidden;"></iframe>
            </div>
            <div class="modal-footer justify-content-between">
              <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
            </div>
          </div>
        </div>
</div>


</form>
</body>
</html>    
