Subversion Repositories Sites.obs-saisons.fr

Rev

Rev 31 | Rev 91 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 31 Rev 45
Line 35... Line 35...
35
	    	    
35
	    	    
36
	    if (is_numeric($id_individu)) {
36
	    if (is_numeric($id_individu)) {
37
		    $url = $this->url_jrest.self::SERVICE_OBSERVATION.'/'.self::METHODE_OBSERVATION_INDIVIDU.'/'.$id_individu;
37
		    $url = $this->url_jrest.self::SERVICE_OBSERVATION.'/'.self::METHODE_OBSERVATION_INDIVIDU.'/'.$id_individu;
38
	        $json = $this->envoyerRequeteConsultation($url);
38
	        $json = $this->envoyerRequeteConsultation($url);
-
 
39
	        $donnees = json_decode($json, true);
39
	        $donnees = json_decode($json, true);
40
	        
40
	        return $donnees;
41
	        return $donnees;
41
	    }
42
	    }
Line 42... Line 43...
42
	}
43
	}
Line 43... Line 44...
43
	
44
	
-
 
45
	public function ajouterObservation($valeurs_observation_verifiees) {
Line 44... Line 46...
44
	public function ajouterObservation($valeurs_observation_verifiees) {
46
		
45
		
47
		$donnees = $valeurs_individu_verifiees;
46
		$donnees = $valeurs_individu_verifiees;
48
		$donnees['id_participant'] = AppControleur::getIdUtilisateur();
Line 54... Line 56...
54
        }
56
        }
Line 55... Line 57...
55
		
57
		
56
		return true;
58
		return true;
Line 57... Line 59...
57
	}
59
	}
58
	
-
 
59
	public function modifierObservation($id_observation, $valeurs_observation_verifiees) {
-
 
Line -... Line 60...
-
 
60
	
-
 
61
	public function modifierObservation($id_individu, $valeurs_observation_verifiees) {
-
 
62
		
60
		
63
		$donnees = $valeurs_observation_verifiees;
61
		$donnees = observation;
64
		$donnees['id_participant'] = AppControleur::getIdUtilisateur();
62
		
65
				
63
        if (is_numeric($id_individu)) {
66
        if (is_numeric($id_individu)) {
64
            $url = $this->url_jrest.self::SERVICE_OBSERVATION."/$id_observation";
67
            $url = $this->url_jrest.self::SERVICE_OBSERVATION."/$id_individu/";
65
            $json = $this->envoyerRequeteModif($url, $donnees);
68
            $json = $this->envoyerRequeteModif($url, $donnees);
66
            $donnees = json_decode($json, true);
69
            $donnees = json_decode($json, true);