<?php use_helper('UrlFunctions'); ?>
<?php

if(isset($delete)){
  if($id){
  	
     $o_ConvTema = new ConvTemaDP();
     
     $o_ConvTema->setIdTema($id);
     $o_ConvTema->setFechaEliminado(date("Y-m-d H:i:s"));
     $o_ConvTema->setUsuarioEliminado(myUser::getUser()->getUserId());
    
    $bResult =  $o_ConvTema->delete();
   
    if($bResult){
      ?>
      <script language="JavaScript">
      parent.objMainTab.reqBody('<?=buildUrl('texto/list')?>','001&msg=Se elimino el registro correctamente');
      parent.objMainTab.windowsCloseAll();
      </script>
      <?
      
    }else{
       $url = buildUrl('texto/delete', "block=".$block."&error=1");
    }
  } 
}
