<?php
session_start();
require_once($ruta."clases/covensol_cxc_c_cuentasxcobrar.php");
$obj_principal = new covensol_cxc_cuentasxcobrar();
$obj_principal->io_conexiones->decodificar_post();
$opciones = $obj_principal->io_conexiones->asignar_post();
$resultado = $obj_principal->consulta_monedas($opciones);
?>
<link href="../shared/css/catalogos.css" rel="stylesheet" type="text/css">
<?php 
$ancho[1] = 100;
$ancho[2] = 200;
$ancho[3] = 30;

$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">Código</div></td>    
     <td width="<?php echo $ancho[2]; ?>"><div align="center">Descripción</div></td>
     <td width="<?php echo $ancho[3]; ?>"><div align="center">Símbolo</div></td>              
  </tr>
  <?php do { ?>
          <?php
		  	$seguridad = true;	
			if($seguridad or $_SESSION['autent_administrador']){	 ?>
           <?php 
		   		if($resultado['fila']['nombre_oficina']==''){$resultado['fila']['nombre_oficina']='Todas';}
		   				if($resultado['fila']['abvrmoneda']=='E'){$resultado['fila']['abvrmoneda']='€';}
		   ?>    
                  <tr id="consulta">
                    <td width="<?php echo $ancho[1]; ?>"><div align="left"><a href="#" onClick="aceptar(<?php echo $resultado['fila']['id_moneda'];?>,'<?php echo $resultado['fila']['codmoneda']; ?>')"><?php echo $resultado['fila']['codmoneda'];?></a></div></td>
                  	<td width="<?php echo $ancho[2]; ?>"><div align="left"><a href="#" onClick="aceptar(<?php echo $resultado['fila']['id_moneda'];?>,'<?php echo $resultado['fila']['codmoneda']; ?>')"><?php echo $resultado['fila']['descmoneda'];?></a></div></td>
                    <td width="<?php echo $ancho[3]; ?>"><div align="left"><a href="#" onClick="aceptar(<?php echo $resultado['fila']['id_moneda'];?>,'<?php echo $resultado['fila']['codmoneda']; ?>')"><?php echo $resultado['fila']['abvrmoneda'];?></a></div></td>
                  </tr>
                  <tr>
                    <td height="1" bgcolor="#BBBBBB" colspan="3">
                    			<input name="hdescmoneda<?php echo $resultado['fila']['id_moneda'];?>" type="hidden" id="hdescmoneda<?php echo $resultado['fila']['id_moneda'];?>"  value="<?php echo $resultado['fila']['descmoneda']; ?>"/>
                                
                  	</td>
                  </tr>
          <?php } ?>
  <?php } while ($resultado['fila'] = $obj_sql->fetch_row($resultado['rs'])); ?>
</table>
    