<!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=iso-8859-1" />
<title>Virtual Server .::WMS::. -- || By SIYSC-Solutions ||</title>
<style type="text/css">
<!--
.Estilo4 {
	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
}
.Estilo5 {font-size: 16px; font-family: Arial, Helvetica, sans-serif; }
.Estilo7 {
	font-size: 14px;
	font-family: Arial, Helvetica, sans-serif;
	font-weight: bold;
	color: #FFFFFF;
}
.Estilo9 {font-size: 24px; font-family: Arial, Helvetica, sans-serif; }
.Estilo10 {font-size: 22px; font-family: Arial, Helvetica, sans-serif; font-weight: bold; }
.Estilo11 {font-size: 10px; font-family: Arial, Helvetica, sans-serif; }
.Estilo12 {font-size: 18px; font-family: Arial, Helvetica, sans-serif; font-weight: bold; }
-->
</style>
</head>

<body>
<div align="right">
      <?php
		include ("../../../Conexion.php");
			$UsuEn=$_POST['USUkp'];
			$SKUEnvi=strtoupper($_POST['cmb_SKU']) or $SKUEnvi=strtoupper($_POST['txt_SKU']);
			$NoCopEn=$_POST['cmb_NCopias'];
	
	if ($UsuEn=="")
		{
		echo "<META HTTP-EQUIV=Refresh CONTENT='0; URL=Login.php' target='_parent'>";
		}
		else
		{
		/////////IDENTIFICAR DATOS DE NIVEL///////
		$sql = mysql_query("select * from tabla_usuarios where USUARION='$UsuEn'");
						
	if (mysql_numrows($sql)==0) echo "";
		else{
		$registro=mysql_fetch_array($sql);
		}
		if (mysql_numrows($sql)>0)
		{
		$CNiv=$registro["NIVEL"];
		}
			
	if ($CNiv<>"01")
		{
		echo "<script>alert('No estas autorizado para realizar esta operación');</script>";
		echo "<META HTTP-EQUIV=Refresh CONTENT='0; URL=Contenedor.php'>";
		}
	
	/////////CONSULTAR DATOS DE LA BD///////
		$sql = mysql_query("select * from tabla_altaproducto where SKU='$SKUEnvi'");
						
		if (mysql_numrows($sql)==0) echo "";
		else{
		$registro=mysql_fetch_array($sql);
		}
		if (mysql_numrows($sql)>0)
		{
		$IMPskualt=$registro["SKU_ALT"];
		$IMPdesc=$registro["DESCRIPCION"];
		}
	/////////CONSULTAR AL CONTRATANTE/////////////////////////////////////
		$sql = mysql_query("select * from  tabla_contratante");
						
		if (mysql_numrows($sql)==0) echo "";
		else{
		$registro=mysql_fetch_array($sql);
		}
		if (mysql_numrows($sql)>0)
		{
		$IMPContrata=$registro["LOGOTIPO"];
		}
	/////////FIN CONSULTAR AL CONTRATANTE/////////////////////////////////
	}
	  
		$num = $SKUEnvi;
		$num = isset($_REQUEST) && is_array($_REQUEST) && isset($_REQUEST['num']) ? $_REQUEST['num'] : $num;
	////INICIA LA TABLA
	echo "<div align='right'>";
	echo "<table width='551' height='355' border='0' style='border-collapse: collapse'>";
    echo "<tr>";
    echo "<td width='6' align='left' bgcolor='#000000'>&nbsp;</td>";
    echo "<td width='205' height='21' align='left' bgcolor='#000000'><span class='Estilo7'>www.logsyswms.com</span></td>";
    echo "<td width='206' align='right' bgcolor='#000000'><font size='20' class='Estilo7'>$NomCuentaContrata</font></td>";
  	echo "</tr>";
    echo "<tr>";
    echo "<td>&nbsp;</td>";
    echo "<td height='25' colspan='2'><div align='left'><span class='Estilo11'>ETIQUETA DE PRODUCTO</span></div></td>";
    echo "</tr>";
    echo "<tr>";
    echo "<td>&nbsp;</td>";
    echo "<td height='25'><div align='left'><span class='Estilo9'>SKU</span><span class='Estilo4'>:</span><font size='20' class='Estilo10'>$SKUEnvi</font></div></td>";
    echo "<td height='25'><div align='left'></div></td>";
    echo "</tr>";
    echo "<tr>";
    echo "<td>&nbsp;</td>";
    echo "<td height='25' colspan='2'><div align='left'><span class='Estilo9'>SKU</span><span class='Estilo9'> Alt:</span><font size='20' class='Estilo10'>$IMPskualt</font></div></td>";
    echo "</tr>";
    echo "<tr>";
    echo "<td>&nbsp;</td>";
    echo "<td height='25' colspan='2'><div align='left'><span class='Estilo9'>Descripción</span><span class='Estilo4'>:</span></div></td>";
    echo "</tr>";
    echo "<tr>";
    echo "<td>&nbsp;</td>";
    echo "<td height='25' colspan='2'><div align='left'><font size='20' class='Estilo12'>$IMPdesc</font></div></td>";
    echo "</tr>";
    echo "<tr>";
    echo "<td>&nbsp;</td>";
    echo "<td height='25'><div align='left'></div></td>";
    echo "<td height='25'><div align='left'></div></td>";
    echo "</tr>";
    echo "<tr>";
    echo "<td height='97' colspan='3' align='center'><img src='barcode_img.php?num=$num&type=code128&imgtype=png' alt='PNG: $num' title='PNG: $num' width='90%' height='93%'></td>";
    echo "</tr>";
    echo "</table>";
	echo "</div>";
	
	////////////////IMPRIMIR////////////
		echo "<script language='JavaScript'>window.print();</script>";
		echo "<META HTTP-EQUIV=Refresh CONTENT='1; URL=../../../RedireccionDeCierre.php'>";

?>
</div>
</body>
</html>