<?php
session_start();
include("cls_conexion.php");$CNN=new ClsMySQL();include("conexion23.php");

if(strlen($_SESSION['SYS_USER_ID'])==0){JsDir("login.php");	return;}
if(vbval($_SESSION['SYS_USER_GI'])!=USU_GET_GI($_SESSION['SYS_USER_ID'])){
	JsDir("cerrar.php");return;
}

$HW=V($_POST['HW']);
if(strlen($HW)==0)$HW=V($_GET['HW']);
$Z=V($_POST['Z']);
if(strlen($Z)==0)$Z=V($_GET['Z']);

$StrGT="";$LStrMsg="";$LStrFoc="";$LStrMM="";
$LStrPag=V($_POST['TxtPag']);
//
include("lq_com_xls_01_fun.php");
//
$VP_RegXPag=100;
$LStrTR=100;
$LStrPag=PagGet($LStrPag,$StrCmd,$LStrTR,$VP_RegXPag);	
$TI=0;
?>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Importar datos</title>
<!--INI_SCRIPT------------------------------------------------------------------------------>
<?php AddJs(); ?>
<script type="text/javascript" src="fe/funcionex.js"></script>
<script type="text/javascript" src="fe/lq_com_xls_02.js"></script>
<script type="text/javascript" src="fe/leo.js"></script>
<!--FIN_SCRIPT------------------------------------->
<link rel="stylesheet" type="text/css" href="estilox.css"  />
<link rel="stylesheet" type="text/css" href="basix.css"  />
<style type="text/css">
.cF {height:470px;width:900px;position:relative; <?php echo "top:0px";?>}
</style>
<script>
$(document).ready(function(){  
   Inicializar();   
});
function fNuevo(){
	document.getElementById("CmdAx").disabled=false;
	document.getElementById("CmdRe").disabled=false;
	sv("TXT_DATA","");
	document.getElementById("TXT_DATA").focus();
}

</script>

</head>

<body  <?php echo $LStrMsg;?> >
<div align="center">

<div Id="DivFRM"  class="cF" style="background-color:#FFFFFF;" >
<form id="Frm" name="Frm" method="post" action="lq_com_xls_01.php">
<input name="L_USU" type="hidden" id="L_USU" value="<?php echo vbval(V($_SESSION['SYS_USER_ID']))?>">
<input name="COM_DATA" type="hidden" id="COM_DATA" value="">
<input name="HW" type="hidden" id="HW" value="<?php echo $HW;?>">
<input name="Z" type="hidden" id="Z" value="<?php echo $Z;?>">
<!--INI_TITULO-->
<div id="DivT" class="dT"  style="width:900px">
<img src="img/unidades.png" class="iT" />
<div class="tT">IMPORTAR</div>
</div>
<!--FIN_TITULO-->
<div class="s1" style="left:177px; top: 114px; width: 142px; height: 18px;">
  <?php
	if(strlen($_PDF)>0){
		echo "<a href=\"$_PDF\" target=\"_new\">DESCARGAR</a>";	
	}
?>
  
</div>

<div class="ad" style="left:35px; top:71px; width: 826px; height: 18px;">
<b>DATOS A IMPORTAR</b> (Codigo, Descripcion, Linea, Cant, Piezas, PrecioVentaMinimo, PrecioVentaMaximo,Rojo,Ambar,PrecioCompra)
</div>
<div class="ad" style="left:38px; top:438px; width: 822px; height: 18px; color:#C00">
<b>Importante :</b> El codigo/numero de piezas no puede estar repetido
</div>
<textarea name="TXT_DATA" cols="" rows="" id="TXT_DATA" 
style="position:absolute; left:35px; top:94px; height:289px; width:825px; resize:none" >
</textarea>
<input name="Auto" id="Auto" type="checkbox" value="0" style="position:absolute; left:31px; top:386px">
<div class="ad" style="left:56px; top:389px; width: 205px; height: 18px;">Autoregistrar codigos nuevos</div>
<input name="CmdAx" type="button" id="CmdAx"  
style="position:absolute; top:408px; left:35px; width: 85px;"
value="Anexar" onClick="fAnexar();"  
tabindex="<?php echo ++$TI;?>" />

<input name="CmdRe" type="button" id="CmdRe"  
style="position:absolute; top:408px; left:128px; width: 105px;"
value="Reemplazar" onClick="fReemplazar();"  
tabindex="<?php echo ++$TI;?>" />

<input name="CmdL" type="button" id="CmdL"  
style="position:absolute; top:408px; left:241px; width: 105px;"
value="Nuevo" onClick="fNuevo();"  
tabindex="<?php echo ++$TI;?>" />


<input name="CmdX" type="button" id="CmdX"  
style="position:absolute; top:408px; left:355px; width: 105px;"
value="Cerrar" onClick="window.close();"  
tabindex="<?php echo ++$TI;?>" />

<!--INI_TABLA----->
<!--FIN_TABLA----->
<!--INI_OCULTOS-------------------------------->
<?php include("ocultox.php");?>
<!--FIN_OCULTOS-------------------------------->
<!--INI_BOTONES-----><!--FIN_BOTONES-->
</form>


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