<div id="carrito_cont" align="left">
<?php 

$res_1308=mysql_query($sql_1308,$link_vcrx);
?>
<form name="frm_pedido" id="frm_pedido"  method="post" style="padding:0px; margin:0px;" onkeydown="return numero(event);">
<table>
<?php
$sql_ncat='select item_nctlg from ktlg0 GROUP BY item_nctlg ORDER BY item_nctlg DESC LIMIT 2';
$res_ncat=mysql_query($sql_ncat,$link_vcrx);
//++
while($row_ncat=mysql_fetch_assoc($res_ncat))
{
	
$sql_1308='SELECT
LEFT (item_codigo, 6) AS codigo, 
item_descri,
item_puni
FROM
	ktlg0
WHERE
	item_nctlg = '.$row_ncat['item_nctlg'].'

GROUP BY codigo
ORDER BY item_codigo DESC';

$res_1308=mysql_query($sql_1308,$link_vcrx);

while($row_1308=mysql_fetch_row($res_1308))
{
?>
<tr valign="top" align="left">
	<td><img src="../img/ind.jpg" width="90" /></td>
    <td>
	    <div style="color:#03C; font-weight:bolder;font-size:12px;"><?php echo $row_1308[0];?></div>
        <div style="font-size:12px;"><?php echo $row_1308[1];?></div>
        <div>Talla</div>
<?php
$sql_talla='SELECT
	CASE (RIGHT (item_codigo, 2))
WHEN "00" 
THEN	" U "
WHEN "91" 
THEN	" S "
WHEN "92" 
THEN	" M "
WHEN "93" 
THEN	" L "
WHEN "94" 
THEN	" XL "
WHEN "95" 
THEN	" XXL "
END
as talla,
item_codigo

FROM
	ktlg0
WHERE
	LEFT (item_codigo, 6) = '.$row_1308[0].'
AND LENGTH(item_codigo) = 8 and item_nctlg is not null';
$res_talla=mysql_query($sql_talla,$link_vcrx);
while($row_talla=mysql_fetch_row($res_talla))
{
	echo $row_talla[0];
?>
	<input type="text" name="<?php echo $row_talla[1];?>" id="<?php echo $row_talla[1];?>" class="frm_ped_txt" />	
<?php
}
?>
        
    </td>
    

</tr>
<?php
}
}
//+++

?>
</table>
</form>
<div align="center">

<?php					
		require('../../_lib/valdatenti.php');
		$valdatentix=new valdatenti('../cfg/res.php',$_SESSION['user_vcrx_id']);
		if($valdatentix->existe==1)
		{
		?>
	   
			<input type="image" src="../img/carrito.jpg"  onclick="carrito2();" id="carrito_ico" />        
      <?php  
		}
		else
		{
		?>
      
	  	<a href="?opt=dper" style="color:#F00; text-decoration:none;">Complete su Informacion Aqui.!</a>
	  <?php
	    
		}
	?>
<span id="carrito_error"></span>


</div>
</div>