<?php session_start();
require('../cfg/cfg.php');
require('../cfg/res.php');
$item_sql='select *from item00 where item_codigo="'.$_GET['idx'].'"';
$item_res=mysql_query($item_sql,$link_vcrx);
if(mysql_num_rows($item_res)==0)
{
	die('Parametro invalido');
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>FICHA DE ITEM</title>
<style type="text/css">
body{ font-family:"Courier New", Courier, monospace;}
</style>
</head>

<body>
<?php $xfontsize=24; ?>	
<div align="center">
<div style="width:1000px;">
<table width="100%" cellpadding="2" cellspacing="2" border="1" style="font-size:<?php echo $xfontsize; ?>px;">
	<tr align="center">
    	<td colspan="2">FICHA ITEM <?php echo $_GET['idx'];?></td>
        
    </tr>
	<tr align="center">
    	<td colspan="2">EMPRESA <?php echo $empr_nombre;?></td>
        
    </tr>

    <tr valign="top">
    	<td width="60%">
<!-- XXXXXXXXXX-->      
      	<table>
        	<tr>
            	<td style="font-weight:bolder;">CODIGO:</td>
                <td><?php echo mysql_result($item_res,0,'item_codigo');?></td>
            </tr>
        	<tr valign="top">
            	<td  style="font-weight:bolder;">DESCRIPCION:</td>
                <td><?php echo mysql_result($item_res,0,'item_descri');?></td>
            </tr>

        	<tr>
            	<td  style="font-weight:bolder;">EAN13</td>
                <td><div  style="font-family:'EanP36Tt';src: url('EAN13_36.TTF'); font-size:50px;"><?php echo mysql_result($item_res,0,'bc_ean13');?></div></td>
            </tr>
        	<tr>
            	<td style="font-weight:bolder;">CODIGO AUX:</td>
                <td><?php echo mysql_result($item_res,0,'item_codigov');?></td>
            </tr>

        </table>
      
<!-- XXXXXXXXXX-->              
        </td>
        <td>
<!-- ++++++++++++++-->              
      	<table>
        	<tr>
            	<td style="font-weight:bolder;">LINEA-SUB:</td>
                <td><?php echo mysql_result($item_res,0,'lsub_descri');?></td>
            </tr>
        	<tr>
            	<td style="font-weight:bolder;">MARCA:</td>
                <td><?php echo mysql_result($item_res,0,'mrca_descri');?></td>
            </tr>
        	<tr>
            	<td style="font-weight:bolder;">MODELO:</td>
                <td><?php echo mysql_result($item_res,0,'item_mdlo');?></td>
            </tr>

        </table>
        
        
<!-- ++++++++++++++-->                      
        </td>
    </tr>
    <tr>
    	<td colspan="2">
        	<?php 
				$ext_sql='select item_codigo from item0 where item_codigo like "'.$_GET['idx'].'%" ';
				$ext_res=mysql_query($ext_sql,$link_vcrx);
				if(mysql_num_rows($ext_res)!=0)
				{
					while($ext_r=mysql_fetch_assoc($ext_res)){
					?>
                    	<div><?php echo $ext_r['item_codigo'];?></div>	
                    <?php
					}
					
				}
			?>
        </td>
    </tr>
</table>
</div>
</div>
</body>
</html>