<?php
include_once "../class/clsDocReceiveSend.php";
include_once 
"../class/clsPersonEo.php";

$oCe = new clsConnection($GLOBALS['DBHOST'], $GLOBALS['DBNAME_EOFFICE'], $GLOBALS['DBUSER_EOFFICE'], $GLOBALS['DBPASS_EOFFICE']);
$oDrs = new DocReceiveSend($oCe);
$oPse = new personeo($oCe);

$checkdoc=$oDrs->SearchCountPsDoc($ps);
if(
$method=="delps"){
//-------del people
                
$oPS->SearchByKey($ps);
                if(
$oPS->GetRecord()=="1"){
                    
$oPS->Deleteps($ps);
                }
//-------del ums
                
$oUms->SearchByUsPsCode($ps);
                if(
$oUms->GetRecord()=="1"){
                        
$oUms->Deleteps($ps);
                } 
                
//-------del eoffice
                
$oPse->SearchByKey($ps);
                if(
$oPse->GetRecord()=="1"){
                    
$oPse->Deleteps($ps);
                }            
}
?>