Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 1104 → Rev 1105

/trunk/bibliotheque/QrCode.php
33,7 → 33,7
public function setUrl($url = '') {
$this->contenu = $url;
}
 
/**
* Taille du QRcode en pixel. Cela sera forcément un carré.
*
42,7 → 42,7
public function setTaille($taille) {
$this->taille = $taille;
}
 
/**
* Generate QR code image
*
56,6 → 56,10
$cheminImg = $this->dossierQrCode.$idQrCode;
if (file_exists($cheminImg) == false) {
$ch = curl_init();
// For Debugging
//curl_setopt($ch, CURLOPT_VERBOSE, TRUE);
//curl_setopt($ch, CURLOPT_STDERR, $f = fopen("$cheminImg.txt", "w+"));
 
curl_setopt($ch, CURLOPT_URL, $this->API_CHART_URL);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, "chs={$this->taille}x{$this->taille}&cht=qr&chl=".urlencode($this->contenu));
64,7 → 68,10
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
$img = curl_exec($ch);
curl_close($ch);
 
// For Debugging
//fclose($f);
 
file_put_contents($cheminImg, $img);
}
$urlQrCode = sprintf($this->urlQrCodeTpl, $idQrCode);
/trunk/bibliotheque/AppUrls.php
11,7 → 11,7
$this->urlBase = (is_null($urlBase)) ? Registre::get('eFlore.urlBase') : $urlBase;
$this->urlBaseDossier = (is_null($urlBaseDossier)) ? Registre::get('eFlore.urlBaseDossier') : $urlBaseDossier;
$this->urlPopUp = (is_null($urlPopUp)) ? Registre::get('eFlore.urlPopUp') : $urlPopUp;
$this->urlMobile = (is_null($urlMobile)) ? Registre::get('eFlore.urlMobile') : $urlMobile;
$this->urlMobileTpl = (is_null($urlMobile)) ? Registre::get('eFlore.urlMobileTpl') : $urlMobile;
}
 
public function obtenirUrlBase() {
60,10 → 60,10
 
public function getParametresUrlRecherche() {
$parametres = array(
'referentiel' => Registre::get('parametres.referentiel'),
'module' => 'recherche',
'action' => 'rechercheSimple',
'submit' => 'Rechercher'
'referentiel' => Registre::get('parametres.referentiel'),
'module' => 'recherche',
'action' => 'rechercheSimple',
'submit' => 'Rechercher'
);
return $parametres;
}
76,18 → 76,18
$url = $this->urlBase->getURL();
return $url;
}
 
public function getParametresUrlRechercheAvancee() {
$parametres = array(
'referentiel' => Registre::get('parametres.referentiel'),
'niveau' => Registre::get('parametres.niveau'),
'module' => 'recherche',
'action' => 'rechercheAvancee',
'type_nom' => 'nom_scientifique'
);
'referentiel' => Registre::get('parametres.referentiel'),
'niveau' => Registre::get('parametres.niveau'),
'module' => 'recherche',
'action' => 'rechercheAvancee',
'type_nom' => 'nom_scientifique'
);
return $parametres;
}
 
public function obtenirUrlResultatAvanceOnglets($onglet, $params = array()) {
$parametres = $this->getParametresUrlRechercheAvancee();
$parametres['resultat'] = $onglet;
96,7 → 96,7
$url = $this->urlBase->getURL();
return $url;
}
 
public function obtenirUrlRechercheAvancee($params = array()) {
$parametres = $this->getParametresUrlRechercheAvancee();
$parametres = array_merge($parametres,$params);
107,13 → 107,13
 
public function getParametresUrlResultat() {
$parametres = array(
'referentiel' => Registre::get('parametres.referentiel'),
'module' => 'recherche',
'niveau' => Registre::get('parametres.niveau'),
'action' => Registre::get('parametres.action'),
'submit' => 'Rechercher',
'type_nom' => isset($_GET['type_nom']) ? $_GET['type_nom'] : 'nom_scientifique',
'nom' => isset($_GET['nom']) ? $_GET['nom'] : ''
'referentiel' => Registre::get('parametres.referentiel'),
'module' => 'recherche',
'niveau' => Registre::get('parametres.niveau'),
'action' => Registre::get('parametres.action'),
'submit' => 'Rechercher',
'type_nom' => isset($_GET['type_nom']) ? $_GET['type_nom'] : 'nom_scientifique',
'nom' => isset($_GET['nom']) ? $_GET['nom'] : ''
);
return $parametres;
}
133,7 → 133,7
$url = $this->urlBase->getURL();
return $url;
}
 
public function obtenirUrlResultatRetenu() {
$parametres = $this->getParametresUrlResultat();
$parametres['resultat'] = 'retenu';
169,26 → 169,18
$url = $this->urlBase->getURL();
return $url;
}
public function getParametresUrlMobile() {
 
public function obtenirUrlMobile($numNom) {
$parametres = array(
'referentiel' => Registre::get('parametres.referentiel'),
'niveau' => 1,
'module' => 'mobile',
'action' => 'fiche'
'num_nom' => $numNom
);
return $parametres;
$urlMobile = $this->urlMobileTpl;
foreach ($parametres as $cle => $val) {
$urlMobile = str_replace('{'.$cle.'}', rawurlencode($val), $urlMobile);
}
return $urlMobile;
}
public function obtenirUrlMobile($numNom, $type_nom = 'nom_vernaculaire', $nom = '') {
$parametres = $this->getParametresUrlMobile();
$parametres['num_nom'] = $numNom;
$parametres['type_nom'] = $type_nom;
$parametres['nom'] = $nom;
$this->urlMobile->setRequete($parametres);
$url = $this->urlMobile->getURL();
return $url;
}
 
public function getParametresUrlMetaDonnees() {
$parametres = array(
205,16 → 197,16
$url = $this->urlBase->getURL();
return $url;
}
 
 
public function getParametresUrlListeFancyBoxPhytosocio() {
$parametres = array(
'module' => 'liste-fancy-box-phytosocio',
'action' => 'lister'
'module' => 'liste-fancy-box-phytosocio',
'action' => 'lister'
);
return $parametres;
}
 
public function obtenirUrlListeFancyBoxPhytosocio($liste,$referentiel,$num_nom, $catminat) {
$parametres = $this->getParametresUrlListeFancyBoxPhytosocio();
$parametres['type'] = $liste;
228,9 → 220,9
 
public function getParametresUrlPopUpIllustrations() {
$parametres = array(
'module' => 'popup-illustrations',
'action' => 'fiche',
'referentiel' => Registre::get('parametres.referentiel')
'module' => 'popup-illustrations',
'action' => 'fiche',
'referentiel' => Registre::get('parametres.referentiel')
);
return $parametres;
}
242,18 → 234,18
$url = $this->urlPopUp->getURL();
return $url;
}
 
public function getParametresPdfExport() {
$parametres = array(
'referentiel' => Registre::get('parametres.referentiel'),
'niveau' => Registre::get('parametres.niveau'),
'module' => 'pdf-export',
'action' => 'pdf-export'
'referentiel' => Registre::get('parametres.referentiel'),
'niveau' => Registre::get('parametres.niveau'),
'module' => 'pdf-export',
'action' => 'pdf-export'
);
return $parametres;
}
 
 
public function obtenirUrlPdfExport($numNom) {
$parametres = $this->getParametresPdfExport();
$parametres['num_nom'] = $numNom;
265,9 → 257,9
public function getParametresUrlPopUpContact($action) {
$action = is_null($action) ? 'form' : $action;
$parametres = array(
'module' => 'popup-contact',
'action' => $action,
'referentiel' => Registre::get('parametres.referentiel')
'module' => 'popup-contact',
'action' => $action,
'referentiel' => Registre::get('parametres.referentiel')
);
return $parametres;
}