Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 1014 Rev 1765
Line 39... Line 39...
39
	   	$requete_liste_dates = 'SELECT DISTINCT '.
39
	   	$requete_liste_dates = 'SELECT DISTINCT '.
40
    			'date_observation AS id '.
40
    			'date_observation AS id '.
41
           		'FROM cel_obs WHERE '.$condition_requete.' '.
41
           		'FROM cel_obs WHERE '.$condition_requete.' '.
42
           		'ORDER BY date_observation'; 		
42
           		'ORDER BY date_observation'; 		
Line 43... Line 43...
43
        	           		
43
        	           		
Line 44... Line 44...
44
	    $liste_dates = $this->executerRequete($requete_liste_dates);
44
	    $liste_dates = Cel::db()->executerRequete($requete_liste_dates);
Line 45... Line 45...
45
	    		    
45
	    		    
46
        $liste_dates = $this->formaterListeResultats($liste_dates);
46
        $liste_dates = $this->formaterListeResultats($liste_dates);
Line 67... Line 67...
67
        return $liste_dates;
67
        return $liste_dates;
68
	}
68
	}
Line 69... Line 69...
69
	
69
	
Line 70... Line 70...
70
	private function traiterParametresEtConstruireRequete($params) {
70
	private function traiterParametresEtConstruireRequete($params) {
Line 71... Line 71...
71
		
71
		
72
		$requete_condition = ' ce_utilisateur = '.$this->proteger($params[0]);
72
		$requete_condition = ' ce_utilisateur = '.Cel::db()->proteger($params[0]);
73
		
73
		
74
		$taille_tableau_parametres = count($params);
74
		$taille_tableau_parametres = count($params);
75
		for($i=1; $i < $taille_tableau_parametres; $i++) {
75
		for($i=1; $i < $taille_tableau_parametres; $i++) {
76
			if($this->estUnParametreDate($params[$i])) {
76
			if($this->estUnParametreDate($params[$i])) {
77
				$fonction_date = $this->correspondance_fonction[$i]; 
77
				$fonction_date = $this->correspondance_fonction[$i]; 
Line 78... Line 78...
78
				$requete_condition .= ' AND '.$fonction_date.'(date_observation) = '.$this->proteger($params[$i]);
78
				$requete_condition .= ' AND '.$fonction_date.'(date_observation) = '.Cel::db()->proteger($params[$i]);
79
			}
79
			}