<?php
class vrselcodi1
{
var $codimaes;

	//function vrselcodi1($maes)
	//{
	//echo $maes;
	require('../cfg/res.php');
	
	$sql_maes='select * from '.$maes.'0 where '.$maes.'_status!="X" '



	if (mb_stristr('item.enti.user.usrt',$maes))
	{
	$sql_maes.='order by '.$maes.'_descri'
	}
	else
	{
	$sql_maes.='order by '.$maes.'_codigo'
	}

echo $sql_maes;
	
	$res_maes=mysql_query($sql_maes,$link_vcrx);
	
	//}
?>



<div style=" max-height:100px; overflow-y:scroll; margin-top:5px;">
<table id="tabla_codigos" width="100%" border="0" cellspacing="0" cellpadding="2" style="border-collapse:collapse;font-size:12px; border:#000000 solid 1px;">
<tr align="left" valign="top">
    <th></th>
    <th>CODIGO</th>
    <th>DESCRIPCION</th>
</tr>




	<?php
	$filax=1;
	while($r_maes=mysql_fetch_assoc($res_maes))
	{
	?>
	<tr class="pdc_t1" id="<?php echo $r_maes['idnum1']; ?>" align="center" style=" <?php if($filax==3){echo 'border-bottom:dotted 1px #000;';$filax=1;}else{$filax++;} ?>" >
	<td></td>
	<td><?php echo $res_maes[$maes.'_codigo'];?></td>
	<td><?php echo $res_maes[$maes.'_descri'];?></td>


	</tr>    
    

	<?php
	}
	?>

</table>	
	
	
	
	
<?php	
}
?>