<?php
$StrCmd=V($_POST['TxtAc']);
//+++++++
$EmiRuc=V($_POST['EmiRuc']);			
$EmiNom=V($_POST['EmiNom']);		
$FacSer=V($_POST['FacSer']);		
$FacNum=V($_POST['FacNum']);		
$Dex=V($_POST['Dex']);
$Hax=V($_POST['Hax']);
$CliRuc=V($_POST['CliRuc']);
$CliNom=V($_POST['CliNom']);
$Pag=V($_POST['Pag']);
$Ret=V($_POST['Ret']);
$Lot=V($_POST['Lot']);
//++++++
if(strlen($Dex)==0)$Dex="01-01-26";
if(strlen($Hax)==0)$Hax=date("d-m-y");
if(strlen($Pag)==0)$Pag="TODOS";
if(strlen($Ret)==0)$Ret="TODOS";
//++++++
$EmiRuc_=$EmiRuc."%";
$EmiNom_=$EmiNom."%";
$FacSer_=$FacSer."%";
$FacNum_="%".$FacNum;
$Dex_=ToDate($Dex);
$Hax_=ToDate($Hax);
$CliRuc_=$CliRuc."%";
$CliNom_=$CliNom."%";
$Pag_=LIKE($Pag);
$Ret_=LIKE($Ret);
$Lot_=$Lot."%";
//
$FF="id_xml>0 AND xml_emi_ruc LIKE '$EmiRuc_' AND 
     xml_emi_nom LIKE '$EmiNom_' AND xml_ser LIKE '$FacSer_' AND 
	 xml_num LIKE '$FacNum_' AND 
	 xml_fec>='$Dex_' AND xml_fec<='$Hax_' AND 
	 xml_cli_ruc LIKE '$CliRuc_' AND xml_cli_nom LIKE '$CliNom_' AND 
	 xml_pagado LIKE '$Pag_' AND xml_ret LIKE '$Ret_' AND xml_nom_tmp LIKE '$Lot_' ";
//++
$LStrTR=gn("count(*)","ges_xml",$FF);
$LStrPag=V($_POST['TxtPag']);
if($StrCmd=="F"){$LStrPag="1";}
$VP_RegXPag=19;	
$LStrPag=PagGet($LStrPag,$StrCmd,$LStrTR,$VP_RegXPag);
?>