<?php
ini_set("session.cookie_lifetime",60*60*10);
ini_set("session.gc_maxlifetime", 60*60*10);
session_start();
include("cls_conexion.php");$CNN=new ClsMySQL();include("conexion23.php");
include("fx_funciones.php");
//
$SYS_MSG="";$SYS_FOC="";$OK=1;
$StrId=V($_POST['TxtId']);$StrCmd=V($_POST['TxtAc']);$LStrPag=V($_POST['TxtPag']);
//
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;
}
//
//--------------------------------------------------------------------------++
$VEN_KOD=vbval(V($_GET['KEY']));
if($VEN_KOD==0){
	$VEN_KOD=vbval(V($_POST['VEN_KOD']));
}
$SYS_MSG="";
include("validacion_manual_fun.php");
//
$TI=0;
?>

<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Validacion Manual</title>
<?php AddJs(); ?>

<script type="text/javascript" src="js/sis_funciones_fes.js"></script>
<script type="text/javascript" src="js/validacion_manual.js"></script>

<link rel="stylesheet" type="text/css" href="css/estiloss.css"  />
<link rel="stylesheet" type="text/css" href="css/basic.css"  />

<style type="text/css">
.mM {height:34px;width:1250px;position:relative;top:0px;background-color:#09C; z-index:500;}
.cF {height:450px;width:450px;position:relative;top:0px}
</style>

<script>
$(document).ready(function(){  
	Inicializar();
	var sys_msg=gv("SYS_MSG");
	if(jL(sys_msg)>0){
		if(sys_msg=="VAL"){
			alert("Comprobante ya validado");
			window.opener.document.Frm.CmdXYZ.click();
			window.close();
			return;
		}
		if(sys_msg=="OK"){
			alert("Proceso completado");
			window.opener.document.Frm.CmdXYZ.click();
			window.close();
		}else{
			alert(sys_msg);
		}
	}
});
</script>

</head>
<body>

<div align="center">
<div Id="DivFRM"  class="cF" style="background-color:#FFFFFF;">
<form id="Frm" name="Frm" method="post" action="validacion_manual.php" onSubmit="return false;" enctype="multipart/form-data">

<!--INI_TITULO--------------------------------->
<div id="DivT" class="dT" style="width:450px" >
<img src="bng/prod.png" class="iT" style="width:48px; height:48px" />
<div class="tT" style="width:250px">VALIDACION MANUAL</div>
</div>
<!--FIN_TITULO--------------------------------->

<div class="s1" style="left: 20px; top: 74px; width: 264px;">
<b>DATOS DEL COMPROBANTE</b></div>

<div class="s1" style="left: 20px; top:100px; width: 380px;">

<table width="100%" border="0">
  <tr>
    <td width="21%">TIPO</td>
    <td width="4%">:</td>
    <td width="5%">&nbsp;</td>
    <td width="70%"><?php echo $COM;?></td>
  </tr>
  <tr>
    <td>NUMERO</td>
    <td>:</td>
    <td>&nbsp;</td>
    <td><?php echo $NUM;?></td>
  </tr>
  <tr>
    <td>FECHA</td>
    <td>:</td>
    <td>&nbsp;</td>
    <td><?php echo $FEC;?></td>
  </tr>
  <tr>
    <td>TOTAL</td>
    <td>:</td>
    <td>&nbsp;</td>
    <td><?php echo $TOT;?></td>
  </tr>
</table>

</div>
<div class="s1" style="left:20px; top:218px; width: 316px;">
ARCHIVO XML (zip)</div>
<?php
$DIS="";
if($VAL=="S"){
	$DIS="disabled";
}
?>
<div class="s1" style="left:20px; top:235px; width: 386px;">
<input name="AdjXml" type="file" <?php echo $DIS;?> id="AdjXml"/>
</div>

<div class="s1" style="left:20px; top:264px; width: 316px;">
ADJUNTAR CDR (zip)
</div>

<div class="s1" style="left:20px; top:281px; width: 395px;">
<input name="AdjCdr" type="file" <?php echo $DIS;?>  id="AdjCdr"/>
</div>

<div class="s1" style="left:20px; top:327px; width: 316px;">
<input type="button" name="CmdVal" id="CmdVal"  <?php echo $DIS;?> 
value="Validar comprobante" onClick="fxValidar()" 
style="background:#0C9; height:2.5rem">
</div>

<!--INI_BOTONES-------------------------------->
<!--FIN_BOTONES-------------------------------->
<input name="VEN_KOD" type="hidden" id="VEN_KOD" value="<?php echo $VEN_KOD;?>"/>
<input name="TxtAc" type="hidden" id="TxtAc" value="" />
<input name="SYS_MSG" type="hidden" id="SYS_MSG" value="<?php echo $SYS_MSG;?>" />
 
</form>
</div>
</div>
</body>
</html>
