Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 797 → Rev 798

/branches/v1.5-cisaille/widget/modules/stats/squelettes/nbres.tpl.html
New file
0,0 → 1,10
<h2>Nombres</h2>
<ul>
<li>Nombre d'observations publiques / total : <strong><?=number_format($observationsPubliques, 0, ',', ' ')?></strong> / <strong><?=number_format($observations, 0, ',', ' ')?></strong></li>
<li>Nombre d'images : <strong><?=number_format($images, 0, ',', ' ')?></strong></li>
<li>Nombre d'images liées aux observations : <strong><?=number_format($imagesLiees, 0, ',', ' ')?></strong></li>
<li>Nombre d'observations liées aux images : <strong><?=number_format($observationsLiees, 0, ',', ' ')?></strong></li>
<li>Moyenne images par observation : <strong><?=number_format($moyImagesParObs, 2, ',', ' ')?></strong></li>
<li title="Hors observations géoréférencées mais non liées à une commune.">Nombre de communes possédant des observations : <strong><?=number_format($communes, 0, ',', ' ')?></strong></li>
<li>Nombre d'observations par communes (mini / moyenne / maxi) : <strong><?=number_format($observationsParCommunesMin, 0, ',', ' ')?></strong> / <strong><?=number_format($observationsParCommunesMoyenne, 2, ',', ' ')?></strong> / <strong><?=number_format($observationsParCommunesMax, 0, ',', ' ')?></strong></li>
</ul>
/branches/v1.5-cisaille/widget/modules/stats/squelettes/liste_taxons_nbre_photos.tpl.html
New file
0,0 → 1,52
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta http-equiv="Content-style-type" content="text/css" />
<meta http-equiv="Content-script-type" content="text/javascript" />
<meta http-equiv="Content-language" content="fr" />
<meta name="revisit-after" content="15 days" />
<meta name="robots" content="index,follow" />
<meta name="author" content="Jean-Pascal MILCENT" />
<meta name="keywords" content="Statistiques, CEL, Tela Botanica, photo, liste, taxon" />
<meta name="description" content="Liste des taxons possédant le plus grand nombre de photographies publiques dans le Carnet en Ligne (CEL)" />
<title>Liste des taxons possédant le plus grand nombre de photographies publiques</title>
<style>
img{display:block;margin:0.5em;border:1px solid black;}
hr.nettoyeur {clear:both;width:0;}
.flottant-gauche img{float:left;}
</style>
<!-- Stats : Google Analytics -->
<script type="text/javascript">
//<![CDATA[
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-20092557-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
//]]>
</script>
</head>
<body>
<h1>Liste des taxons possédant le plus grand nombre de photographies publiques</h1>
<div class="flottant-gauche">
<?php include('filtres.tpl.html') ?>
<p>Classement / Nom retenu du taxon / Nombre de photographies</p>
<ol>
<?php foreach ($taxons as $taxon => $nbre) : ?>
<li><?=$taxon?> : <?=$nbre?></li>
<?php endforeach; ?>
</ol>
</div>
<hr class="nettoyeur" />
<div class="flottant-gauche">
<?php include('navigation.tpl.html') ?>
</div>
</body>
</html>
/branches/v1.5-cisaille/widget/modules/stats/squelettes/stats.tpl.html
New file
0,0 → 1,87
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta http-equiv="Content-style-type" content="text/css" />
<meta http-equiv="Content-script-type" content="text/javascript" />
<meta http-equiv="Content-language" content="fr" />
<meta name="revisit-after" content="15 days" />
<meta name="robots" content="index,follow" />
<meta name="author" content="Jean-Pascal MILCENT" />
<meta name="keywords" content="Statistiques, CEL, Tela Botanica, graphiques" />
<meta name="description" content="Graphiques et statistiques sur les observations et images du Carnet en Ligne (CEL)" />
<title>Statistiques du Carnet En Ligne</title>
<style>
img{display:block;margin:0.5em;border:1px solid black;}
hr.nettoyeur {clear:both;width:0;}
.flottant-gauche img{float:left;}
</style>
<!-- Stats : Google Analytics -->
<script type="text/javascript">
//<![CDATA[
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-20092557-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
//]]>
</script>
</head>
<body>
<?php $i=0;?>
<h1>Statistiques du CEL</h1>
<?php include('filtres.tpl.html') ?>
<div class="flottant-gauche">
<?php include('nbres.tpl.html') ?>
</div>
<hr class="nettoyeur" />
<div class="flottant-gauche">
<h2>Observations - Activité</h2>
<img src="<?=$url_service?>/UtilisationJournaliere?serveur=<?=$i++?>/<?=date("Y-m-d", (time() - 86400))?>" alt="Intensité d'utilisation pour la journée d'hier" />
<img src="<?=$url_service?>/UtilisationJournaliere?serveur=<?=$i++?>" alt="Intensité d'utilisation pour aujourd'hui" />
</div>
<hr class="nettoyeur" />
<div class="flottant-gauche">
<h2>Observations - Données</h2>
<img src="<?=$url_service?>/NbreObsIdVsTest?serveur=<?=$i++?>" alt="Nombre d'observations identifiées versus tests" />
<img src="<?=$url_service?>/NbreObsPublicVsPrivee?serveur=<?=$i++?>" alt="Nombre d'observations publiques versus privées" />
<img src="<?=$url_service?>/NbreObsDetermineeVsInconnue?serveur=<?=$i++?>" alt="Nombre d'observations déterminées versus inconnues" />
<hr class="nettoyeur" />
<img src="<?=$url_service?>/NbreObsAvecIndicationGeo?serveur=<?=$i++?>" alt="Nombre d'observations avec indications géographiques" />
</div>
<hr class="nettoyeur" />
<div>
<h2>Observations - Évolution</h2>
<img src="<?=$url_service?>/EvolObsParMoisGlissant?serveur=<?=$i++?>" alt="Évolutions des observation sur le dernier mois glissant" />
<img src="<?=$url_service?>/EvolObsParMois?serveur=<?=$i++?>" alt="Évolutions des observation par mois" />
<img src="<?=$url_service?>/EvolObsParAn?serveur=<?=$i++?>" alt="Évolutions des observation par an" />
</div>
<hr class="nettoyeur" />
<div class="flottant-gauche">
<h2>Utilisateurs</h2>
<img src="<?=$url_service?>/NuagePointsObsParHeureEtJourSemaine?serveur=<?=$i++?>" alt="Nuage de points d'observation par heure et jour de la semaine" />
<img src="<?=$url_service?>/NuagePointsObsAnciennete?serveur=<?=$i++?>" alt="Répartition des utilisateurs en fonction du nombre d'observations et de l'ancienneté" />
<hr class="nettoyeur" />
<img src="<?=$url_service?>/NbreObsParUtilisateur?serveur=<?=$i++?>" alt="Nombre d'observations par utilisateur" />
<img src="<?=$url_service?>/NbreObsParUtilisateurEtTest?serveur=<?=$i++?>" alt="Nombre d'observations par utilisateur et test" />
<hr class="nettoyeur" />
<img src="<?=$url_service?>/EvolUtilisateurParMois?serveur=<?=$i++?>" alt="Nombre d'observations par utilisateur et test" />
</div>
<hr class="nettoyeur" />
<div>
<h2>Images</h2>
<img src="<?=$url_service?>/EvolImgParMois?serveur=<?=$i++?>" alt="Évolutions du dépôt d'images par mois" />
<img src="<?=$url_service?>/EvolImgLieesParMois?serveur=<?=$i++?>" alt="Évolutions des images liées aux observations par mois" />
</div>
<hr class="nettoyeur" />
<div class="flottant-gauche">
<?php include('navigation.tpl.html') ?>
</div>
</body>
</html>
/branches/v1.5-cisaille/widget/modules/stats/squelettes/liste_utilisateurs_nbre_photos.tpl.html
New file
0,0 → 1,56
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta http-equiv="Content-style-type" content="text/css" />
<meta http-equiv="Content-script-type" content="text/javascript" />
<meta http-equiv="Content-language" content="fr" />
<meta name="revisit-after" content="15 days" />
<meta name="robots" content="index,follow" />
<meta name="author" content="Jean-Pascal MILCENT" />
<meta name="keywords" content="Statistiques, CEL, Tela Botanica, photo, liste, utilisateurs" />
<meta name="description" content="Liste des utilisateurs possédant le plus grand nombre de photographies publiques dans le Carnet en Ligne (CEL)" />
<title>Liste des utilisateurs possédant le plus grand nombre de photographies publiques</title>
<style>
img{display:block;margin:0.5em;border:1px solid black;}
hr.nettoyeur {clear:both;width:0;}
.flottant-gauche img{float:left;}
</style>
<!-- Stats : Google Analytics -->
<script type="text/javascript">
//<![CDATA[
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-20092557-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
//]]>
</script>
</head>
<body>
<h1>Liste des utilisateurs possédant le plus grand nombre de photographies publiques</h1>
<div class="flottant-gauche">
<?php include('filtres.tpl.html') ?>
<?php if (isset($utilisateurs)) : ?>
<p>Classement / Utilisateur / Nombre de photographies</p>
<ol>
<?php foreach ($utilisateurs as $nomPrenom => $nbre) : ?>
<li><?=$nomPrenom?> : <?=$nbre?></li>
<?php endforeach; ?>
</ol>
<?php else : ?>
<p>Aucun résultat ne correspond à vos filtres</p>
<?php endif; ?>
</div>
<hr class="nettoyeur" />
<div class="flottant-gauche">
<?php include('navigation.tpl.html') ?>
</div>
</body>
</html>
/branches/v1.5-cisaille/widget/modules/stats/squelettes/navigation.tpl.html
New file
0,0 → 1,6
<ul>
<li><a href="/widget:cel:stats">Stats globales</a> (<a href="/widget:cel:stats?mode=<?=Stats::MODE_UTILISATEUR?>">les miennes</a>)</li>
<li><a href="/widget:cel:stats?page=nombres">Nombres</a> (<a href="/widget:cel:stats?page=nombres&mode=<?=Stats::MODE_UTILISATEUR?>">les miens</a>)</li>
<li><a href="/widget:cel:stats?page=liste-utilisateurs-nbre-photos">Liste des utilisateurs ayant le plus de photographies publiques</a></li>
<li><a href="/widget:cel:stats?page=liste-taxons-nbre-photos">Liste des taxons ayant le plus de photographies publiques</a></li>
</ul>
/branches/v1.5-cisaille/widget/modules/stats/squelettes/stats_nbres.tpl.html
New file
0,0 → 1,48
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta http-equiv="Content-style-type" content="text/css" />
<meta http-equiv="Content-script-type" content="text/javascript" />
<meta http-equiv="Content-language" content="fr" />
<meta name="revisit-after" content="15 days" />
<meta name="robots" content="index,follow" />
<meta name="author" content="Jean-Pascal MILCENT" />
<meta name="keywords" content="Statistiques, CEL, Tela Botanica, graphiques" />
<meta name="description" content="Graphiques et statistiques sur les observations et images du Carnet en Ligne (CEL)" />
<title>Statistiques du Carnet En Ligne</title>
<style>
img{display:block;margin:0.5em;border:1px solid black;}
hr.nettoyeur {clear:both;width:0;}
.flottant-gauche img{float:left;}
</style>
<!-- Stats : Google Analytics -->
<script type="text/javascript">
//<![CDATA[
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-20092557-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
//]]>
</script>
</head>
<body>
<?php $i=0;?>
<h1>Statistiques du CEL <?=(isset($utilisateur_nom_prenom) ? '- '.$utilisateur_nom_prenom : '')?> <?=(isset($taxon) ? '- '.$taxon : '')?></h1>
<?php include('filtres.tpl.html') ?>
<div class="flottant-gauche">
<?php include('nbres.tpl.html')?>
</div>
<hr class="nettoyeur" />
<div class="flottant-gauche">
<?php include('navigation.tpl.html') ?>
</div>
</body>
</html>
/branches/v1.5-cisaille/widget/modules/stats/squelettes/filtres.tpl.html
New file
0,0 → 1,14
<?php if (array_key_exists('taxon', $filtres) || array_key_exists('num_taxon', $filtres) || array_key_exists('tag', $filtres)) : ?>
<h2>Filtes actifs</h2>
<ul>
<?php if (array_key_exists('taxon', $filtres)) : ?>
<li>nom du taxon=<?=$filtres['taxon']?></li>
<?php endif; ?>
<?php if (array_key_exists('num_taxon', $filtres)) : ?>
<li>numéro du taxon=<?=$filtres['num_taxon']?></li>
<?php endif; ?>
<?php if (array_key_exists('tag', $filtres)) : ?>
<li>Mots-clés des images=<?=$filtres['tag']?></li>
<?php endif; ?>
</ul>
<?php endif; ?>
/branches/v1.5-cisaille/widget/modules/stats/squelettes/stats_utilisateur.tpl.html
New file
0,0 → 1,78
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<meta http-equiv="Content-style-type" content="text/css" />
<meta http-equiv="Content-script-type" content="text/javascript" />
<meta http-equiv="Content-language" content="fr" />
<meta name="revisit-after" content="15 days" />
<meta name="robots" content="index,follow" />
<meta name="author" content="Jean-Pascal MILCENT" />
<meta name="keywords" content="Statistiques, CEL, Tela Botanica, graphiques" />
<meta name="description" content="Graphiques et statistiques sur les observations et images du Carnet en Ligne (CEL)" />
<title>Statistiques du Carnet En Ligne</title>
<style>
img{display:block;margin:0.5em;border:1px solid black;}
hr.nettoyeur {clear:both;width:0;}
.flottant-gauche img{float:left;}
</style>
<!-- Stats : Google Analytics -->
<script type="text/javascript">
//<![CDATA[
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-20092557-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
//]]>
</script>
</head>
<body>
<?php $i=0;?>
<h1>Statistiques du CEL de <?=$utilisateur_nom_prenom?></h1>
<div class="flottant-gauche">
<?php include('nbres.tpl.html')?>
</div>
<div class="flottant-gauche">
<h2>Observations - Activité</h2>
<img src="<?=$url_service?>/UtilisationJournaliere/<?=date("Y-m-d", (time() - 86400))?>?serveur=<?=$i++?>&amp;utilisateur=<?=$utilisateur?>" alt="Intensité d'utilisation pour la journée d'hier" />
<img src="<?=$url_service?>/UtilisationJournaliere?serveur=<?=$i++?>&amp;utilisateur=<?=$utilisateur?>" alt="Intensité d'utilisation pour aujourd'hui" />
</div>
<hr class="nettoyeur" />
<div class="flottant-gauche">
<h2>Observations - Données</h2>
<img src="<?=$url_service?>/NbreObsPublicVsPrivee?serveur=<?=$i++?>&amp;utilisateur=<?=$utilisateur?>" alt="Nombre d'observations publiques versus privées" />
<img src="<?=$url_service?>/NbreObsDetermineeVsInconnue?serveur=<?=$i++?>&amp;utilisateur=<?=$utilisateur?>" alt="Nombre d'observations déterminées versus inconnues" />
<hr class="nettoyeur" />
<img src="<?=$url_service?>/NbreObsAvecIndicationGeo?serveur=<?=$i++?>&amp;utilisateur=<?=$utilisateur?>" alt="Nombre d'observations avec indications géographiques" />
</div>
<hr class="nettoyeur" />
<div>
<h2>Observations - Évolution</h2>
<img src="<?=$url_service?>/EvolObsParMoisGlissant?serveur=<?=$i++?>&amp;utilisateur=<?=$utilisateur?>" alt="Évolutions des observation sur le dernier mois glissant" />
<img src="<?=$url_service?>/EvolObsParMois?serveur=<?=$i++?>&amp;utilisateur=<?=$utilisateur?>" alt="Évolutions des observation par mois" />
<img src="<?=$url_service?>/EvolObsParAn?serveur=<?=$i++?>&amp;utilisateur=<?=$utilisateur?>" alt="Évolutions des observation par an" />
</div>
<hr class="nettoyeur" />
<div class="flottant-gauche">
<h2>Utilisateurs</h2>
<img src="<?=$url_service?>/NuagePointsObsParHeureEtJourSemaine?serveur=<?=$i++?>&amp;utilisateur=<?=$utilisateur?>" alt="Nuage de points d'observation par heure et jour de la semaine" />
</div>
<hr class="nettoyeur" />
<div>
<h2>Images</h2>
<img src="<?=$url_service?>/EvolImgParMois?serveur=<?=$i++?>&amp;utilisateur=<?=$utilisateur?>" alt="Évolutions du dépôt d'images par mois" />
<img src="<?=$url_service?>/EvolImgLieesParMois?serveur=<?=$i++?>&amp;utilisateur=<?=$utilisateur?>" alt="Évolutions des images liées aux observations par mois" />
</div>
<hr class="nettoyeur" />
<div class="flottant-gauche">
<?php include('navigation.tpl.html') ?>
</div>
</body>
</html>
/branches/v1.5-cisaille/widget/modules/stats/Stats.php
New file
0,0 → 1,219
<?php
/**
* Widget fournissant des stats graphiques du CEL.
* Encodage en entrée : utf8
* Encodage en sortie : utf8
*
* @author Jean-Pascal MILCENT <jpm@clapas.org>
* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>
* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
* @version $Id$
* @copyright © 2010, Jean-Pascal MILCENT
*/
class Stats extends WidgetCommun {
const PAGE_DEFAUT = 'defaut';
const MODE_DEFAUT = 'defaut';
const MODE_UTILISATEUR = 'utilisateur';
private $page;
private $mode;
/**
* Méthode appelée avec une requête de type GET.
*/
public function executer() {
$retour = null;
extract($this->parametres);
$this->mode = (isset($mode)) ? $mode : self::MODE_DEFAUT;
$this->page = (isset($page)) ? $page : self::PAGE_DEFAUT;
$methode = $this->traiterNomMethodeExecuter($this->page);
if (method_exists($this, $methode)) {
$retour = $this->$methode();
} else {
$this->messages[] = "Ce type de carte '$methode' n'est pas disponible.";
}
 
if (is_null($retour)) {
$info = 'Un problème est survenu : '.print_r($this->messages, true);
$this->envoyer($info);
} else {
$squelette = dirname(__FILE__).DIRECTORY_SEPARATOR.'squelettes'.DIRECTORY_SEPARATOR.$retour['squelette'].'.tpl.html';
$html = $this->traiterSquelettePhp($squelette, $retour['donnees']);
$this->envoyer($html);
}
}
 
/**
* Stats par défaut
*/
public function executerDefaut() {
$widget = null;
switch ($this->mode) {
case self::MODE_DEFAUT :
$widget['donnees'] = (array) $this->recupererStatsTxtNombres();
$widget['squelette'] = 'stats';
break;
case self::MODE_UTILISATEUR :
if ($this->authentifierUtilisateur()) {
$widget['donnees'] = (array) $this->recupererStatsTxtNombres();
$widget['donnees']['utilisateur'] = $this->getAuthIdentifiant();
$widget['donnees']['utilisateur_nom_prenom'] = $this->recupererPrenomNomIdentifie();
$widget['squelette'] = 'stats_utilisateur';
}
break;
default :
$this->messages[] = "Le mode '{$this->mode}' est inconnu.";
}
if (!is_null($widget)) {
$widget['donnees']['url_service'] = sprintf($this->config['chemins']['baseURLServicesCelTpl'], 'CelStatistique');
$widget['donnees']['filtres'] = $this->parametres;
}
return $widget;
}
private function recupererPrenomNomIdentifie() {
$nom = '';
if ($this->getAuthIdentifiant() != null) {
$infos_utilisateur = $this->recupererUtilisateursNomPrenom(array($this->getAuthIdentifiant()));
if (array_key_exists($this->getAuthIdentifiant(), $infos_utilisateur)) {
$utilisateur = (array) $infos_utilisateur[$this->getAuthIdentifiant()];
$nom = $utilisateur['prenom'].' '.$utilisateur['nom'];
} else {
$nom = $this->getAuthIdentifiant();
}
}
return $nom;
}
public function executerNombres() {
$widget = null;
switch ($this->mode) {
case self::MODE_DEFAUT :
$widget['donnees'] = (array) $this->recupererStatsTxtNombres();
break;
case self::MODE_UTILISATEUR :
if ($this->authentifierUtilisateur()) {
$widget['donnees'] = (array) $this->recupererStatsTxtNombres();
$widget['donnees']['utilisateur_nom_prenom'] = $this->recupererPrenomNomIdentifie();
}
break;
default:
$this->messages[] = "Le mode '{$this->mode}' est inconnu.";
}
if (!is_null($widget)) {
$widget['squelette'] = 'stats_nbres';
$widget['donnees']['filtres'] = $this->parametres;
}
return $widget;
}
private function recupererStatsTxtNombres() {
// Récupération des données au format Json
$service = "CelStatistiqueTxt/Nombres";
$parametres = array();
if (isset($this->parametres['mode']) && $this->parametres['mode'] == self::MODE_UTILISATEUR && $this->getAuthIdentifiant() != null) {
$parametres[] = 'utilisateur='.$this->getAuthIdentifiant();
}
if (isset($this->parametres['num_taxon'])) {
$parametres[] = 'num_taxon='.$this->parametres['num_taxon'];
}
if (isset($this->parametres['taxon'])) {
$parametres[] = 'taxon='.$this->parametres['taxon'];
}
$service .= (count($parametres) > 0) ? '?'.implode('&', $parametres) : '';
$url = sprintf($this->config['chemins']['baseURLServicesCelTpl'], $service);
$json = $this->getDao()->consulter($url);
return (array) json_decode($json);
}
public function executerListeTaxonsNbrePhotos() {
$widget = null;
$widget['donnees']['taxons'] = $this->recupererStatsTxtListeTaxonsNbrePhotos();
$widget['donnees']['utilisateur'] = $this->getAuthIdentifiant();
$widget['donnees']['filtres'] = $this->parametres;
$widget['squelette'] = 'liste_taxons_nbre_photos';
return $widget;
}
private function recupererStatsTxtListeTaxonsNbrePhotos() {
// Récupération des données au format Json
$service = "CelStatistiqueTxt/ListeTaxonsNbrePhotos";
$parametres = array();
if (isset($this->parametres['mode']) && $this->parametres['mode'] == self::MODE_UTILISATEUR && $this->getAuthIdentifiant() != null) {
$parametres[] = 'utilisateur='.$this->getAuthIdentifiant();
}
if (isset($this->parametres['num_taxon'])) {
$parametres[] = 'num_taxon='.$this->parametres['num_taxon'];
}
if (isset($this->parametres['taxon'])) {
$parametres[] = 'taxon='.$this->parametres['taxon'];
}
if (isset($this->parametres['start'])) {
$parametres[] = 'start='.$this->parametres['start'];
}
if (isset($this->parametres['limit'])) {
$parametres[] = 'limit='.$this->parametres['limit'];
}
$service .= (count($parametres) > 0) ? '?'.implode('&', $parametres) : '';
$url = sprintf($this->config['chemins']['baseURLServicesCelTpl'], $service);
$json = $this->getDao()->consulter($url);
return (array) json_decode($json);
}
public function executerListeUtilisateursNbrePhotos() {
$widget = null;
$utilisateurs = $this->recupererStatsTxtListeUtilisateursNbrePhotos();
if (isset($utilisateurs)) {
$noms = $this->recupererUtilisateursNomPrenom(array_keys($utilisateurs));
foreach ($utilisateurs as $courriel => $infos) {
if (array_key_exists($courriel, $noms)) {
$nom_infos = (array) $noms[$courriel];
$nom_fmt = $nom_infos['prenom'].' '.$nom_infos['nom'];
$widget['donnees']['utilisateurs'][$nom_fmt] = $infos;
}
}
}
$widget['donnees']['filtres'] = $this->parametres;
$widget['squelette'] = 'liste_utilisateurs_nbre_photos';
return $widget;
}
private function recupererStatsTxtListeUtilisateursNbrePhotos() {
// Récupération des données au format Json
$service = "CelStatistiqueTxt/ListeUtilisateursNbrePhotos";
if (isset($this->parametres['mode']) && $this->parametres['mode'] == self::MODE_UTILISATEUR && $this->getAuthIdentifiant() != null) {
$this->getDao()->ajouterParametre('utilisateur', $this->getAuthIdentifiant());
}
if (isset($this->parametres['num_taxon'])) {
$this->getDao()->ajouterParametre('num_taxon', $this->parametres['num_taxon']);
}
if (isset($this->parametres['taxon'])) {
$this->getDao()->ajouterParametre('taxon', $this->parametres['taxon']);
}
if (isset($this->parametres['start'])) {
$this->getDao()->ajouterParametre('start', $this->parametres['start']);
}
if (isset($this->parametres['limit'])) {
$this->getDao()->ajouterParametre('limit', $this->parametres['limit']);
}
if (isset($this->parametres['tag'])) {
$this->getDao()->ajouterParametre('tag', $this->parametres['tag']);
}
$url = sprintf($this->config['chemins']['baseURLServicesCelTpl'], $service);
$json = $this->getDao()->consulter($url);
return (array) json_decode($json);
}
}