/trunk/jrest/services/NameMap.php |
---|
41,7 → 41,7 |
$nt = null; |
if(isset($uid[0])) { |
$recherche_infos_taxon = new RechercheInfosTaxon($this->config); |
$recherche_infos_taxon = new RechercheInfosTaxonBeta($this->config); |
$nt = $recherche_infos_taxon->rechercherNumTaxSurNumNom($uid[0]); |
} |
/trunk/jrest/services/Name.php |
---|
31,7 → 31,7 |
$retour = array("null"); |
if (isset($uid[0])) { |
$chercheur_info_taxon = new RechercheInfosTaxon($this->config); |
$chercheur_info_taxon = new RechercheInfosTaxonBeta($this->config); |
$retour = $chercheur_info_taxon->effectuerRequeteInfosComplementairesEtFormaterNom($uid[0]); |
} |
/trunk/jrest/services/InventoryUserList.php |
---|
27,10 → 27,13 |
$this->controleUtilisateur($uid[0]); |
$requete_utilisateurs ='SELECT DISTINCT id_utilisateur, courriel FROM cel_utilisateurs' ; |
$condition = $this->construireRequeteCondition($uid); |
$requete_utilisateurs .= $condition; |
$requete_utilisateurs .= ' LIMIT 0,50'; |
$requete_utilisateurs ='SELECT DISTINCT id_utilisateur, courriel FROM cel_utilisateurs '. |
$this->construireRequeteConditionTableUtilisateurs($uid).' '. |
'UNION '. |
'SELECT DISTINCT ce_utilisateur as id_utilisateur, courriel_utilisateur as courriel '. |
'FROM cel_obs '. |
$this->construireRequeteConditionTableObs($uid).' '. |
'LIMIT 0,50'; |
$utilisateurs = $this->executerRequete($requete_utilisateurs); |
49,7 → 52,7 |
return true; |
} |
private function construireRequeteCondition($params) { |
private function construireRequeteConditionTableUtilisateurs($params) { |
$condition = ''; |
59,14 → 62,25 |
return $condition; |
} |
private function construireRequeteConditionTableObs($params) { |
$condition = ''; |
if (isset($params[1]) && $params[1] != null && $params[1] != '*') { |
$condition .= ' WHERE courriel_utilisateur LIKE '.$this->proteger($params[1].'%'); |
} |
return $condition; |
} |
} |
function trierUtilisateurs($val1, $val2) { |
if (strstr($val1,'@')) { |
if (strstr($val1['courriel'],'@')) { |
if (strstr($val2,'@')) { |
return strcmp($val1,$val2); |
if (strstr($val2['courriel'],'@')) { |
return strcmp($val1['courriel'],$val2['courriel']); |
} |
else |
{ |
75,12 → 89,12 |
} |
else |
{ |
if (strstr($val2,'@')) { |
if (strstr($val2['courriel'],'@')) { |
return 1 ; |
} |
else |
{ |
return strcmp($val1,$val2) ; |
return strcmp($val1['courriel'],$val2['courriel']) ; |
} |
} |
} |
/trunk/jrest/services/InventoryKeyWordList.php |
---|
247,10 → 247,17 |
$nom_racine = $this->suffixe; |
$id_racine = $this->suffixe; |
} |
$md5_racine = $this->proteger(md5($nom_racine)); |
$id_racine = $this->proteger($id_racine); |
$nom_racine = $this->proteger($nom_racine); |
$id_utilisateur = $this->proteger($id); |
if ($valeurs == 0) { |
$requete = 'INSERT INTO cel_mots_cles'.$this->suffixe_table.' '. |
'VALUES ("'.$nom_racine.'", 1, 2, "'.$id_racine.'", "'.$id_racine.'", '.$this->proteger($id).', "", 0) '; |
if ($valeurs == 0) { |
$requete = "INSERT INTO cel_mots_cles{$this->suffixe_table} ". |
"VALUES ($id_racine, $id_utilisateur, $nom_racine, $md5_racine, ". |
"1, 2, 0, '') "; |
$this->executer($requete); |
} |
} |
/trunk/jrest/services/NameImage.php |
---|
45,7 → 45,7 |
$nt = null; |
if(isset($uid[0])) { |
$recherche_infos_taxon = new RechercheInfosTaxon($this->config); |
$recherche_infos_taxon = new RechercheInfosTaxonBeta($this->config); |
$nt = $recherche_infos_taxon->rechercherNumTaxSurNumNom($uid[0]); |
} |
/trunk/jrest/services/InventoryByDept.php |
---|
71,7 → 71,7 |
$chercheur_infos_taxon = null; |
if (is_array($resultat_obs)) { |
$observations = &$resultat_obs; |
$chercheur_infos_taxon = new RechercheInfosTaxon($this->config); |
$chercheur_infos_taxon = new RechercheInfosTaxonBeta($this->config); |
} |
foreach ($observations as $obs) { |
/trunk/jrest/services/NameSearch.php |
---|
50,7 → 50,11 |
$espece = $uid[1]; |
} |
$chercheur_infos_taxon = new RechercheInfosTaxon($this->config); |
$chercheur_infos_taxon = new RechercheInfosTaxonBeta($this->config); |
$infos = $chercheur_infos_taxon->taxonEstPresentDansDepartement('1320','75'); |
echo '<pre>'.print_r($infos,true).'</pre>';exit; |
$infos = $chercheur_infos_taxon->rechercherInformationsComplementairesSurNom('Iris australis Tod.'); |
$liste_genre_espece = $chercheur_infos_taxon->rechercherGenreEspeceSurPrefixe($genre,$espece); |
$this->envoyerJson($liste_genre_espece); |