1,15 → 1,18 |
<?php |
// declare(encoding='UTF-8'); |
/** |
* Encodage en entrée : utf8 |
* Encodage en sortie : utf8 |
* |
* @author Grégoire Duché <jpm@tela-botanica.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 2009 |
* Service fournissant le nom de visiteur journalier sur le |
* site tela-botanica.org grâce aux stats de Google Analytics. |
* |
* @category php 5.2 |
* @package Annuaire::Services |
* @author Grégoire DUCHÉ <gregoire@tela-botanica.org> |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
* @copyright Copyright (c) 2009, Tela Botanica (accueil@tela-botanica.org) |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL |
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL |
* @version $Id$ |
*/ |
|
class TelaUtilisateurs extends JRestService { |
|
/** |
19,22 → 22,20 |
$this->getElement(array()); |
} |
|
/** |
* Utilise l'API google pour donner le nombre de visiteurs |
* et compte le nombre d'inscrits. |
*/ |
public function getElement($params = array()) { |
|
/** |
* Utilise l'API google pour donner le nombre de visiteurs |
* et compte le nombre d'inscrits. |
* */ |
// Utilisation du fichier de configuration pour récupérer les identifiants de google analytics |
$email_google = $this->config['google']['email_google']; |
$password_google = $this->config['google']['password_google']; |
$id_site_google = $this->config['google']['id_site_google']; |
|
include_once '../services/GoogleAnalyticsAPI.php'; |
$ga = new GoogleAnalyticsAPI($email_google, $password_google, $id_site_google, date('Y-m-d', time() - 60 * 600), date('Y-m-d', time())); |
|
$id_annuaire = Config::get('annuaire_defaut'); |
if(isset($uid[0])) { |
if (isset($uid[0])) { |
$id_annuaire = $uid[0]; |
} |
|