Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 357 Rev 363
Line 69... Line 69...
69
		        case 'masque.ad' :
69
		        case 'masque.ad' :
70
		        	$this->ajouterFiltreMasque('nom_addendum', $val);
70
		        	$this->ajouterFiltreMasque('nom_addendum', $val);
71
		        	break;
71
		        	break;
72
		        case 'masque.nn' :
72
		        case 'masque.nn' :
73
		        	$this->requete_condition []= 'num_nom IN ('.$val.')';	
73
		        	$this->requete_condition []= 'num_nom IN ('.$val.')';	
74
		        	$this->masque['num_nom'] = "num_nom=$val";						
74
		        	$this->masque['num_nom'] = "num_nom=$val";
75
		        	break;
75
		        	break;
76
		        case 'masque.rg' :
76
		        case 'masque.rg' :
77
		        	$this->ajouterFiltreMasque('rang', $val);						
77
		        	$this->ajouterFiltreMasque('rang', $val);
78
		        	break;
78
		        	break;
79
		        case 'retour.champs' :
79
		        case 'retour.champs' :
80
		        	$this->verifierParamChamps($param, $val);
80
		        	$this->verifierParamChamps($param, $val);
81
		        	break;
81
		        	break;
82
		        case 'distinct' :
82
		        case 'distinct' :
83
		        	$this->distinct = $val;								
83
		        	$this->distinct = $val;
84
		        	break;
84
		        	break;
85
			}
85
			}
86
			$this->ajouterNomDistinct();
86
			$this->ajouterNomDistinct();
87
		}
87
		}
88
	}
88
	}
Line 89... Line 89...
89
	
89
	
90
	public function verifierParamChamps($param, $val) {
90
	public function verifierParamChamps($param, $val) {
91
		$this->recupererTableSignification('correspondance_champs,champs_api,champs_comp');
91
		$this->recupererTableSignification('correspondance_champs,champs_api,champs_comp');
92
		$champs_demandes = explode(',', $val);
92
		$champs_demandes = explode(',', $val);
93
		$champs_verifies = array();
93
		$champs_verifies = array();
-
 
94
		$champs_api = array_flip($this->champs_api); 
-
 
95
		$champs_supp = array('nom_retenu_complet'=>'num_nom_retenu', 'basionyme_complet'=>'basionyme');
94
		$champs_api = array_flip($this->champs_api);
96
		$champs_api = array_merge($champs_api, $champs_supp);
95
		foreach ($champs_demandes as $champ) {
97
		foreach ($champs_demandes as $champ) {
96
			if (array_key_exists($champ, $champs_api)) {
98
			if (array_key_exists($champ, $champs_api)) {
97
				$champs_verifies[] = $champs_api[$champ];
99
				$champs_verifies[] = $champs_api[$champ];
98
			}
100
			}
Line 246... Line 248...
246
		}
248
		}
247
		$requete = 	' SELECT '.$this->requete_champ.
249
		$requete = 	' SELECT '.$this->requete_champ.
248
      				' FROM '.$this->table
250
      				' FROM '.$this->table
249
      				.$this->retournerRequeteCondition()
251
      				.$this->retournerRequeteCondition()
250
      				.$this->requete_group_by
252
      				.$this->requete_group_by
251
      				.$this->formerRequeteLimite(); 
253
      				.$this->formerRequeteLimite();
252
      	return $requete;
254
      	return $requete;
Line 253... Line 255...
253
      	
255
      	
Line 254... Line 256...
254
	}
256
	}