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

if(isset($delete)){
  if($id){
    $o_TesisBean = new TesisBean();
    $o_TesisBean->setTesisId($id);
    
    $o_TesisBean->setUsuarioModificacion(myUser::getUser()->getUserId());
    $o_TesisBean->setFechaModificacion(date("Y-m-d H:i:s"));
    $o_TesisSystemClass = new TesisSystemClass($o_TesisBean);
    $bResult = $o_TesisSystemClass->eliminarTesis();
    
    if($bResult){
      ?>
      <script language="JavaScript">
      parent.objMainTab.reqBody('<?=buildUrl('te/list')?>','001&delete=1&id=<?=$o_TesisBean->getTesisId()?>');
      //parent.objMainTab.windowsCloseAll();
      </script>
      <?
      
    }else{
       $url = buildUrl('te/delete', "block=".$block."&error=1");
    }
  } 
}
