<?
require("../clases/aviso.class.php");
$obj = new aviso();
$t = $_REQUEST["text"];
if($t=="R"){		
		 $a = $_REQUEST["aviso"];	
		 $i = $_REQUEST["iddoc"];		
		if($obj->Crear($i,$a)){		
					echo "<script languaje=javascript>\n"; 
	 				echo "location.href ='../manaviso.php?iddc=$i';";					
	 				echo "</script>"; 
							
		}else{
		       echo "no pasa nada";
		     }
}

if($t=="e"){
 $id = $_REQUEST["coddoc"];
 $cod = $_REQUEST["id"];
   if($obj->Eliminar($cod)){
   
       echo "<script languaje=javascript>\n"; 
	 	echo "location.href ='../manaviso.php?iddc=$id';";					
	 	echo "</script>";		
   }
   else
   {
    echo "no pasa nada";
	}

}
?>

