<?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_vendedores($opciones);
?>
<link href="../shared/css/catalogos.css" rel="stylesheet" type="text/css">
<?php 
$ancho[1] = 100;
$ancho[2] = 300;
$ancho[1] = 70;

$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">Nombre</div></td> 
     <td width="<?php echo $ancho[3]; ?>"><div align="center">Nivel</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';}
		   
		   ?>    
                  <tr id="consulta">
                    <td width="<?php echo $ancho[1]; ?>"><div align="left"><a href="#" onClick="aceptar(<?php echo $resultado['fila']['id_vend'];?>,'<?php echo $resultado['fila']['codvend']; ?>')"><?php echo $resultado['fila']['codvend'];?></a></div></td>
                  	<td width="<?php echo $ancho[2]; ?>"><div align="left"><a href="#" onClick="aceptar(<?php echo $resultado['fila']['id_vend'];?>,'<?php echo $resultado['fila']['codvend']; ?>')"><?php echo $resultado['fila']['nomvend'];?></a></div></td>
                  	<td width="<?php echo $ancho[3]; ?>"><div align="left"><a href="#" onClick="aceptar(<?php echo $resultado['fila']['id_vend'];?>,'<?php echo $resultado['fila']['codvend']; ?>')"><?php echo $resultado['fila']['nivelvend'];?></a></div></td>
                  </tr>
                  <tr>
                    <td height="1" bgcolor="#BBBBBB" colspan="3">
                    			<input name="hnomvend<?php echo $resultado['fila']['id_vend'];?>" type="hidden" id="hnomvend<?php echo $resultado['fila']['id_vend'];?>"  value="<?php echo $resultado['fila']['nomvend']; ?>"/>
                                
                  	</td>
                  </tr>
          <?php } ?>
  <?php } while ($resultado['fila'] = $obj_sql->fetch_row($resultado['rs'])); ?>
</table>
    