<?php
session_start();
$ruta='../';
require_once("covensol_apr_c_scg.php");
$objscg = new covensol_apr_c_scg();
$objscg->io_conexiones->decodificar_post();
$datos = $objscg->io_conexiones->asignar_post();
$cuentas = $objscg->SelecCuentasDestino($datos);
?>
<link href="../shared/css/catalogos.css" rel="stylesheet" type="text/css">
<?php 
$ancho[1] = 60;
$ancho[2] = 350;
$ancho_total = array_sum($ancho);

?>

<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">CODIGO</div></td>
     <td width="<?php echo $ancho[2]; ?>"><div align="center">DENOMINACIÓN</div></td>   
     
  </tr>
  <?php foreach($cuentas as $fila) { ?>
          <?php
		  	$seguridad = true;	
			if($seguridad){	
			
			$aceptar="aceptar('".$fila['sc_cuenta']."','".$fila['status']."')";
			$colorfila = ($fila['status']=='S')?'class="celdas-blancas"':'class="celdas-azules"';
		    $aceptar = ($fila['status']=='S')?"alert('No es una Cuenta de Movimiento !');":$aceptar;
		   ?>    
                  <tr <?php echo $colorfila; ?> >
                    <td width="<?php echo $ancho[1]; ?>" >
                    	<div  align="left">
                        <?php if($fila['status']=='C'){ ?>
                        <a href="#" onClick="<?php echo $aceptar; ?>">
                        <?php } ?>
						<?php echo $fila['sc_cuenta'];?>
                        <?php if($fila['status']=='C'){ ?>
                        </a>
                        <?php } ?>
                        </div></td>
                    <td width="<?php echo $ancho[2]; ?>"><div align="left"><?php echo $fila['denominacion'];?></div></td>
                  </tr>
                  <tr>
                    <td height="1" bgcolor="#BBBBBB" colspan="3">
                    			<input name="hdenominacion<?php echo $fila['sc_cuenta'];?>" type="hidden" id="hdenominacion<?php echo $fila['sc_cuenta'];?>"  value="<?php echo $fila['denominacion']; ?>"/>
                      	</td>
                  </tr>
          <?php } ?>
  <?php }  ?>
</table>
    