<?php
session_start();
require_once("clases/covensol_fop_c_formulacion.php");
$objfop=new covensol_fop_c_formulacion('');
$objfop->io_conexiones->decodificar_post();
$datos = $objfop->io_conexiones->asignar_post();

$resultado = $objfop->ConsultaSectores($datos);
?>
<link href="../shared/css/catalogos.css" rel="stylesheet" type="text/css">
<link href="../shared/css/ventanas.css" rel="stylesheet" type="text/css">
<link href="../shared/css/general.css" rel="stylesheet" type="text/css">
<link href="../shared/css/tablas.css" rel="stylesheet" type="text/css">
<?php 
$ancho[1] = 40;
$ancho[2] = 600;
$ancho_total = array_sum($ancho);
$clave=0;
?>

<table width="<?php echo $ancho_total; ?>" border="0" cellpadding="0" cellspacing="0"  class='fondo-tabla'>
  <tr class="titulo-celda">
     <td width="<?php echo $ancho[1]; ?>"><div align="center">CODSEC</div></td>
     <td width="<?php echo $ancho[2]; ?>"><div align="center">SECTOR</div></td>    
  </tr>
  <?php foreach($resultado['rs'] as $fila) { ?>
          <?php
		  	$seguridad = true;	
			if($seguridad){	
			$clave++;
			$aceptar="aceptar('".$fila['codsec']."','".$clave."')";
		   
		   ?>    
                  <tr id="consulta">
                    <td width="<?php echo $ancho[1]; ?>"><div align="left"><a href="#" onClick="<?php echo $aceptar; ?>"><?php echo $fila['codsec'];?></a></div></td>
                    <td width="<?php echo $ancho[2]; ?>"><div align="left"><a href="#" onClick="<?php echo $aceptar; ?>"><?php echo $fila['densec'];?></a></div></td>
                  </tr>
                  <tr>
                    <td height="1" bgcolor="#BBBBBB" colspan="3">
                    			<input name="hdensec<?php echo $clave;?>" type="hidden" id="hdensec<?php echo $clave;?>"  value="<?php echo $fila['densec']; ?>"/>
                     	</td>
                  </tr>
          <?php } ?>
  <?php }  ?>
</table>
    