Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Regard whitespace Rev 1104 → Rev 1105

/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() {
170,24 → 170,16
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);
}
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;
return $urlMobile;
}
 
public function getParametresUrlMetaDonnees() {
/trunk/bibliotheque/QrCode.php
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));
65,6 → 69,9
$img = curl_exec($ch);
curl_close($ch);
// For Debugging
//fclose($f);
 
file_put_contents($cheminImg, $img);
}
$urlQrCode = sprintf($this->urlQrCodeTpl, $idQrCode);