<?php
$StrId=V($_POST['TxtId']);
$StrCmd=V($_POST['TxtAc']);
//-------------------------++
$StrEmp=V($_POST['CboEmp']);		
$StrAlm=V($_POST['CboAlm']);		
$StrCom=V($_POST['CboCom']);		
$StrSer=V($_POST['TxtSer']);		
$StrNum=V($_POST['TxtNum']);		
$StrDam=V($_POST['TxtDam']);		
$StrDex=V($_POST['TxtDex']);		
$StrHax=V($_POST['TxtHax']);			
$StrPro=V($_POST['TxtPro']);
$StrSN=V($_POST['CboSN']);
$StrET=V($_POST['CboET']);
//++
if(strlen($StrEmp)==0)$StrEmp=GE("S");
if(strlen($StrAlm)==0)$StrAlm=GA($StrEmp,"S");
//	
if(strlen($StrCom)==0) $StrCom="TODOS";	
if(strlen($StrSN)==0)$StrSN="NO";
if(strlen($StrET)==0)$StrET="NO";
$StrET_=$StrET;
$StrSN_=substr($StrSN,0,1);	
//-------------------------
$StrEmp_=LIKE($StrEmp);
$StrAlm_=LIKE($StrAlm);
$StrCom_=LIKE($StrCom);
$StrSer_="%".$StrSer;
$StrNum_="%".$StrNum;
$StrDam_="%".$StrDam;
$StrDex_=val_dex($StrDex);
$StrHax_=val_hax($StrHax);
$StrPro_=$StrPro."%";
//-------------------------
$FF="ID>0 AND EMPC LIKE '$StrEmp_' AND ALMC LIKE '$StrAlm_' AND 
	 COM LIKE '$StrCom_' AND SER LIKE '$StrSer_' AND
	 NUM LIKE '$StrNum_' AND DAM LIKE '$StrDam_' AND 
	 FEC >= '$StrDex_' AND 
	 FEC <= '$StrHax_' AND PROV LIKE '$StrPro_' AND 
	 ANU LIKE '$StrSN_' AND ET LIKE '$StrET_' ";

?>