<?
require("../clases/reunion.class.php");
$obj = new reunion();
$t = $_REQUEST["text"];
if($t=="R"){	
         $id = $obj->Correlativo();
		 $idp = $_REQUEST['iddoc_curso'];	
		 $a = $_REQUEST["titulo"];	
		 $u = $_REQUEST["url"];		
		 $det = $_REQUEST["detalle"];		
		 $v = $_REQUEST["visible"];
		
		// echo $id.$idp.$a.$u.$v;
		if($obj->Crear($id,$idp,$a,$u,$det,$v)){		
					echo "<script languaje=javascript>\n"; 
	 				echo "alert('Reunion Registrad0!!!');location.href ='../listareunion.php?id=$idp';";					
	 				echo "</script>"; 
							
		}else{
		       echo "no pasa nada";
		     }
}

if($t=="M"){
         
         $id = $_REQUEST['idreunion'];	
		 $idp = $_REQUEST['iddoc_curso'];	/////para redireccionar	
		 $a = $_REQUEST["titulo"];	
		 $u = $_REQUEST["url"];	
		 $det = $_REQUEST["detalle"];	
		 $v = $_REQUEST["visible"];
		if($obj->Actualizar($id,$a,$u,$det,$v)){		
					echo "<script languaje=javascript>\n"; 
	 				echo "alert('Reunion Actualizado!!!');location.href ='../listareunion.php?id=$idp';";					
	 				echo "</script>"; 
							
		}else{
		       echo "no pasa nada";
		     }
}



if($t=="E"){
 $idp = $_REQUEST["iddoc_curso"];
 $cod = $_REQUEST["id"];
   if($obj->Eliminar($cod)){
   
       echo "<script languaje=javascript>\n"; 
	 	echo "alert('Enlace Eliminado !!!');location.href ='../listareunion.php?id=$idp';";				
	 	echo "</script>";		
   }
   else
   {
    echo "no pasa nada";
	}

}
?>

