<?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($_SESSION['SYS_HW']);
$StrGT="";$LStrMsg="";$LStrFoc="";$LStrMM="";
$LStrPag=V($_POST['TxtPag']);
//
$MSG="";
include("actualizar_linea_fun.php");
//
$VP_RegXPag=26;
$LStrTR=gn("count(*)","vproductos",$FF);
//
$LStrPag=PagGet($LStrPag,$StrCmd,$LStrTR,$VP_RegXPag);	
$TI=0;
?>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Actualizar Lineas</title>
<!--INI_SCRIPT------------------------------------------------------------------------------>
<?php AddJs(); ?>
<script type="text/javascript" src="fe/funcioney.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:250px;width:550px;position:relative; <?php echo "top:0px";?>}
</style>
<script>
$(document).ready(function(){  
   Inicializar();   
   var msg=gv("TXT_MSG");
   if(jL(msg)>0){
	   alert(msg);
   }
});
</script>
<script language="javascript">
$(document).ready(function() {
	$(".botonExcel").click(function(event) {
		$("#datos_a_enviar").val( $("<div>").append( $("#Exportar_a_Excel").eq(0).clone()).html());
		$("#FormularioExportacion").submit();
});
});


</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="actualizar_linea.php">
<input name="TXT_MSG" id="TXT_MSG" type="hidden" value="<?php echo $MSG;?>">
<!--INI_TITULO-->
<div id="DivT" class="dT"  style="width:550px">
<img src="img/unidades.png" class="iT" />
<div class="tT" style="width:250px" >ACTUALIZAR LINEA</div>
</div>
<!--FIN_TITULO-->
<div class="ad" style="left:35px; top:132px; width: 104px; height: 18px;"><b>DE</b> LINEA</div>
<select name="LinA" id="LinA" 
class="lty" style="left:35px; top:149px; width: 172px;"
tabindex="<?php echo ++$TI;?>"  >
<?php
echo FCBO("lin_nombre","lineas","id_linea>0",$LinA,"N","S");
?>
</select>

<div class="ad" style="left:220px; top:132px; width: 113px; height: 18px;"><b>A</b> LINEA</div>
<select name="LinB" id="LinB" 
class="lty" style="left:218px; top:149px; width: 146px;"
tabindex="<?php echo ++$TI;?>"  >
<?php
echo FCBO("lin_nombre","lineas","id_linea>0",$LinB,"N","S");
?>
</select>
<script>
function flAplicar(){
	if(pre("Esta seguro que desea actualizar la linea?")){
		var linA=gv("LinA");
		var linB=gv("LinB");
		if(jL(linA)==0){
			return AF("Seleccione una linea (DE LINEA)","LinA");
		}
		if(jL(linB)==0){
			return AF("Seleccione una linea (A LINEA)","LinB");
		}
		SM("AL");
	}
}
</script>
<input name="CmdF" type="button" id="CmdF"  
style="position:absolute; top:149px; left:380px; width: 125px;"
value="Aplicar" onClick="flAplicar();"  
tabindex="<?php echo ++$TI;?>" />

<!--INI_TABLA-----><!--FIN_TABLA----->
<!--INI_OCULTOS-------------------------------->
<?php include("ocultox.php");?>
<!--FIN_OCULTOS-------------------------------->
<!--INI_BOTONES----->
<div id="DivBtn"  align="left"
style="position:absolute; left: 33px; top: 71px; width:300px; height: 26px;">
<input name="CmdB" type="button" id="CmdZ" class="btm"
value="Volver" onClick="fBuscar('menu.php');"  
tabindex="<?php echo ++$TI;?>" />
</div>
<!--FIN_BOTONES-->
</form>
<form action="ficheroExcel.php" method="post" target="_blank" id="FormularioExportacion" >
</form>

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