<?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']);
//----------FUN PART-----------------------
$_PDF="";
$StrId=V($_POST['TxtId']);
$StrCmd=V($_POST['TxtAc']);
$LIMPIAR=0;
//
$P_C="TXT_DATA";
//
//$LStrMsg=BL($StrGT,$LStrMsg,$LStrFoc,$P_C);
//-----------------------------------------
$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="ja/funcionex.js"></script>
<script type="text/javascript" src="ja/lq_com_xls_05.js"></script>
<!--FIN_SCRIPT------------------------------------->
<link rel="stylesheet" type="text/css" href="css/estilox.css"  />
<link rel="stylesheet" type="text/css" href="css/basix.css"  />
<style type="text/css">
.cF {height:470px;width:1000px;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();
}

function ZO(){
	return window.devicePixelRatio;
}
</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:1000px">
<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, Measures, Piezas, Cajas, Unidades, Total piezas, total unidades 1, Total unidades 2, Precio)
</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:926px; 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;">
<label for="Auto">Autoregistrar codigos nuevos </label></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-------------------------------->
<input name="TxtId" type="hidden" id="TxtId" value="<?php echo $StrId;?>"/>
<input name="TxtAc" type="hidden" id="TxtAc" value="" />
<input name="W" type="hidden" id="W" value="<?php echo $W;?>" />
<input name="TxtPag" type="hidden" id="TxtPag" value="<?php echo $LStrPag; ?>" />
<input name="TxtFEC" type="hidden" id="TxtFEC" value="<?php echo date("d-m-y"); ?>" />
<!--FIN_OCULTOS-------------------------------->
<!--INI_BOTONES-----><!--FIN_BOTONES-->
</form>


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