Subversion Repositories eFlore/Applications.coel-consultation

Compare Revisions

No changes between revisions

Ignore whitespace Rev 209 → Rev 210

/tags/v1.8-irancy/index_iso-8859-15.php
New file
0,0 → 1,85
<?php
// declare(encoding='ISO-8859-15');
/** Inclusion du fichier principal de l'application*/
require_once 'collection.php';
?>
<!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" >
<head xml:lang="fr" lang="fr">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15" />
<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" />
 
<title><?php echo AppControleur::getMetaTitre(); ?></title>
<meta name="description" content="<?php echo AppControleur::getMetaDescription();?>" />
<meta name="keywords" content="<?php echo AppControleur::getMetaTags();?>" />
<meta name="revisit-after" content="15 days" />
<meta name="robots" content="index,follow" />
<meta name="author" content="Tela Botanica" />
 
<link rel="shortcut icon" type="image/x-icon" href="http://www.tela-botanica.org/favicon.ico" />
<link rel="icon" type="image/png" href="http://www.tela-botanica.org/sites/commun/generique/images/favicones/tela_botanica.png" />
 
<link rel="stylesheet" type="text/css" media="screen" href="squelettes/css/collection/generale.css" />
<link rel="stylesheet" type="text/css" media="screen" href="squelettes/css/collection/collection.css" />
<link rel="stylesheet" type="text/css" media="screen" href="squelettes/css/humanity/jquery-ui-1.8.custom.css" />
<link rel="stylesheet" type="text/css" media="print" href="http://www.tela-botanica.org/sites/commun/fr/styles/impression.css" />
<script type="text/javascript" src="squelettes/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="squelettes/js/jquery.cookie.min.js"></script>
<script type="text/javascript" src="squelettes/js/jquery-ui-1.8.custom.min.js"></script>
<script type="text/javascript" src="squelettes/js/jquery-collection.min.js"></script>
</head>
<body xml:lang="fr" lang="fr">
<div id="reducteur">
 
<div id="logo_tela">
<a href="/" title="Retour à l'accueil du site">
<img src="http://www.tela-botanica.org/sites/reseau/generique/images/graphisme/logo_jaune.gif" alt="le logo de Tela Botanica"/>
</a>
</div>
<div id="bandeau">
<div id="bandeau_contenu">
<div id="titre_monde">
<h1>Collections</h1>
</div>
</div>
</div>
<div id="droite">
<div id="onglets">
<?php echo AppControleur::getContenuNavigation(); ?>
</div>
<div id="contenu">
<div id="entete">
<?php echo AppControleur::getContenuTete(); ?>
</div>
<div id="texte">
<?php echo AppControleur::getContenuCorps(); ?>
</div>
<div id="pied_texte">
<?php echo AppControleur::getContenuPied(); ?>
</div>
</div>
<div>
<?php echo AppControleur::getExceptions(); ?>
</div>
<div id="pied">
<p> &copy;<a href="http://www.tela-botanica.org/" accesskey="1">Tela Botanica</a> / 2000-<?=date('Y')?> - Le réseau des Botanistes Francophones</p>
</div>
</div>
<div id="nav_gauche">
<ul>
<li><a href="<?=basename(__FILE__)?>?module=Recherche">Recherche</a></li>
<li><a href="<?=basename(__FILE__)?>?module=Carte">Carte</a></li>
<li><a href="<?=basename(__FILE__)?>?module=Syndication">Syndication</a></li>
</ul>
</div>
</div>
</body>
</html>
/tags/v1.8-irancy/AUTEURS.txt
New file
0,0 → 1,0
Jean-Pascal MILCENT <jpm@tela-botanica.org>.
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
Added: svn:eol-style
+native
\ No newline at end of property
/tags/v1.8-irancy/A_LIRE.txt
New file
0,0 → 1,4
Cette application nécessite le framework de Tela Botanica pour fonctionner.
Il est disponible ici : http://svn.tela-botanica.net/websvn/listing.php?repname=Applications.framework
 
L'ensemble des fichiers de l'application sont dans l'encodage UTF-8.
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
Added: svn:eol-style
+native
\ No newline at end of property
/tags/v1.8-irancy/.htaccess
New file
0,0 → 1,13
#AddHandler x-httpd-php5 .php
#AddDefaultCharset UTF-8
 
# Activation de la réecriture d'url
RewriteEngine on
 
# si le fichier ou le dossier existe dans le système de fichier on l'utilise directement
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
 
RewriteRule ^urn:lsid:tela-botanica.org:coel:str([0-9]+)$ index.php?module=FicheStructure&id=$1 [L]
RewriteRule ^urn:lsid:tela-botanica.org:coel:col([0-9]+)$ index.php?module=FicheCollection&id=$1 [L]
RewriteRule ^urn:lsid:tela-botanica.org:coel:per([0-9]+)$ index.php?module=FichePersonne&id=$1 [L]
/tags/v1.8-irancy/bibliotheque/dao/CollectionDao.php
New file
0,0 → 1,149
<?php
// declare(encoding='UTF-8');
/**
* DAO des Collections pour le module Collections.
*
* @package Collection
* @category php 5.2
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @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 SVN: $Id$
*
*/
class CollectionDao extends Dao {
const SERVICE_COLLECTION = 'CoelCollection';
const SERVICE_COLLECTION_A_PERSONNE = 'CoelCollectionAPersonne';
const SERVICE_COLLECTION_A_PUBLICATION = 'CoelCollectionAPublication';
const SERVICE_COLLECTION_A_COMMENTAIRE = 'CoelCollectionACommentaire';
/**
* Retourne l'ensemble des information sur une collection.
*
* @param integer l'id de la collection.
* @return array un tableau contenant les informations sur la collection.
*/
public function getCollection($id) {
$url = $this->url_jrest.self::SERVICE_COLLECTION."/$id/*";
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
return $donnees['collections'];
}
/**
* Retourne le nombre de collections correspondant à un id strucutre précis.
*
* @param integer l'id d'une structure.
* @return array un tableau contenant les collections correspondant à l'id structure.
*/
public function getNbreParIdStructure($id_structure) {
$url = $this->url_jrest.self::SERVICE_COLLECTION."/NbreParIdStructure/$id_structure";
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
return $donnees;
}
/**
* Retourne les collection correspondant à un id strucutre précis.
*
* @param integer l'id d'une structure.
* @return array un tableau contenant les collections correspondant à l'id structure.
*/
public function getParIdStructure($id_structure) {
$url = $this->url_jrest.self::SERVICE_COLLECTION."/ParIdStructure/$id_structure";
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
return $donnees;
}
/**
* Retourne l'ensemble des personnes liées à une collection.
*
* @param integer l'id de la collection.
* @return array un tableau contenant les informations sur les personnes liées à la collection.
*/
public function getPersonnesLiees($id_collection) {
$this->addOrdre('cp_nom');
$donnees = $this->getCollectionAPersonne($id_collection);
return $donnees['collectionsAPersonne'];
}
/**
* Retourne le nombre de personnes liées à une collection.
*
* @param integer l'id de la collection.
* @return integer le nombre de personnes liées à la collection.
*/
public function getNbrePersonnesLiees($id_collection) {
$donnees = $this->getCollectionAPersonne($id_collection);
return $donnees['nbElements'];
}
private function getCollectionAPersonne($id_collection) {
$url = $this->url_jrest.self::SERVICE_COLLECTION_A_PERSONNE."/$id_collection";
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
return $donnees;
}
/**
* Retourne l'ensemble des publications liées à une collection.
*
* @param integer l'id de la collection.
* @return array un tableau contenant les informations sur les publications liées à la collection.
*/
public function getPublicationsLiees($id_collection) {
$donnees = $this->getCollectionAPublication($id_collection);
return $donnees['collectionsAPublication'];
}
/**
* Retourne le nombre de publications liées à une collection.
*
* @param integer l'id de la collection.
* @return integer le nombre de publications liées à la collection.
*/
public function getNbrePublicationsLiees($id_collection) {
$donnees = $this->getCollectionAPublication($id_collection);
return $donnees['nbElements'];
}
private function getCollectionAPublication($id_collection) {
$url = $this->url_jrest.self::SERVICE_COLLECTION_A_PUBLICATION."/$id_collection";
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
return $donnees;
}
/**
* Retourne l'ensemble des commentaires publics liés à une collection.
*
* @param integer l'id de la collection.
* @return array un tableau contenant les informations sur les publications liées à la collection.
*/
public function getCommentairesLies($id_collection) {
$donnees = $this->getCollectionACommentaire($id_collection);
return $donnees['collectionsACommentaire'];
}
/**
* Retourne le nombre de commentaires publics liés à une collection.
*
* @param integer l'id de la collection.
* @return integer le nombre de commentaires publics liés à la collection.
*/
public function getNbreCommentairesLies($id_collection) {
$donnees = $this->getCollectionACommentaire($id_collection);
return $donnees['nbElements'];
}
private function getCollectionACommentaire($id_collection) {
$commentaire_public = '1';
$url = $this->url_jrest.self::SERVICE_COLLECTION_A_COMMENTAIRE."/$id_collection/$commentaire_public";
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
return $donnees;
}
}
?>
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/bibliotheque/dao/Ontologie.php
New file
0,0 → 1,133
<?php
// declare(encoding='UTF-8');
/**
* Classe contenant les données de l'ontologie des Collections en Ligne.
* Elle contient un cache de l'ontologie.
* C'est un Singleton.
*
* @package Collection
* @category php 5.2
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @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 SVN: $Id$
*
*/
class Ontologie {
public static $ontologie_liste = array();
public static $ontologie_valeur = array();
 
public static function chargerListe($id_liste) {
$retour = false;
if (!isset(self::$ontologie_liste[$id_liste])) {
$metadonnees = new MetadonneeDao();
$donnees = $metadonnees->getOntologie($id_liste);
$traitementValeursOk = self::traiterValeurs($donnees['valeurs']);
if ($traitementValeursOk) {
self::$ontologie_liste[$id_liste] = $donnees['valeurs'];
$retour = true;
}
} else {
$retour = true;
}
return $retour;
}
public static function getListe($id_liste) {
$retour = false;
$chargementOk = self::chargerListe($id_liste);
if ($chargementOk) {
$retour = self::$ontologie_liste[$id_liste];
}
return $retour;
}
public static function getListeFormatee($id_liste) {
$retour = false;
$liste = self::getListe($id_liste);
if ($liste !== false) {
foreach ($liste as $cle => $valeur) {
$liste[$cle] = self::formaterTableauValeur($valeur);
}
$retour = $liste;
}
return $retour;
}
 
public static function getListeTrieeParAbreviation($id_liste) {
$retour = false;
$liste = self::getListe($id_liste);
if ($liste !== false) {
$liste_par_abr = array();
foreach ($liste as $cle => $valeur) {
$valeur_fromatee = self::formaterTableauValeur($valeur);
$abreviation = $valeur_fromatee['abreviation'];
$liste_par_abr[$abreviation] = $valeur_fromatee;
}
$retour = $liste_par_abr;
}
return $retour;
}
public static function chargerValeur($id_valeur) {
$retour = true;
if (empty($id_valeur)) {
$retour = false;
} else if (!isset(self::$ontologie_valeur[$id_valeur])) {
$metadonnees = new MetadonneeDao();
$donnees = $metadonnees->getOntologieValeur($id_valeur);
$retour = self::traiterValeurs($donnees['valeurs']);
}
return $retour;
}
public static function getValeur($id_valeur) {
$retour = false;
$chargementOk = self::chargerValeur($id_valeur);
if ($chargementOk) {
$retour = self::$ontologie_valeur[$id_valeur];
}
return $retour;
}
public static function getValeurNom($id_valeur) {
$retour = false;
$valeur = self::getValeur($id_valeur);
if ($valeur !== false) {
$retour = $valeur['nom'];
}
return $retour;
}
private static function traiterValeurs($valeurs) {
$retour = true;
if (is_null($valeurs)) {
$retour = false;
} else {
if (count($valeurs) == 0) {
$retour = false;
} else {
foreach ($valeurs as $valeur) {
self::$ontologie_valeur[$valeur['cmlv_id_valeur']] = self::formaterTableauValeur($valeur);
}
}
}
return $retour;
}
private static function formaterTableauValeur($valeur) {
$valeur_formatee = array();
if (is_array($valeur) && count($valeur) > 0) {
$valeur_formatee = array(
'id' => $valeur['cmlv_id_valeur'],
'parent' => $valeur['cmlv_ce_parent'],
'nom' => $valeur['cmlv_nom'],
'abreviation' => $valeur['cmlv_abreviation'],
'description' => $valeur['cmlv_description'],
'meta' => $valeur['cmlv_ce_meta']);
}
return $valeur_formatee;
}
}
?>
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/bibliotheque/dao/Dao.php
New file
0,0 → 1,217
<?php
// declare(encoding='UTF-8');
/**
* Classe modèle spécifique à l'application, donc d'accés au données, elle ne devrait pas être appelée de l'extérieur.
* Elle est abstraite donc doit obligatoirement être étendue.
*
* @category Php5
* @package Referentiel
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @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 SVN: $Id$
*/
abstract class Dao {
const ORDRE_ASCENDANT = 'ASC';
const ORDRE_DESCENDANT = 'DESC';
const HTTP_REQUETE_SEPARATEUR = '&';
protected $distinction = '0';
protected $limite_debut = null;
protected $limite_nbre = null;
protected $ordre = null;
protected $url_jrest = null;
public function __construct() {
$this->url_jrest = Config::get('url_jrest');
}
//+----------------------------------------------------------------------------------------------------------------+
// ACCESSEURS
public function setDistinction($distinct) {
$this->distinction = $distinct;
}
public function getDistinction() {
return $this->distinction;
}
public function viderDistinction() {
$this->distinction = null;
}
 
public function avoirLimitation() {
$limitation = false;
if (!is_null($this->limite_debut) && !is_null($this->limite_nbre)) {
$limitation = true;
}
return $limitation;
}
public function setLimitation($limite_debut, $limite_nbre) {
$this->limite_debut = $limite_debut;
$this->limite_nbre = $limite_nbre;
}
public function getLimiteDebut() {
return $this->limite_debut;
}
public function getLimiteNbre() {
return $this->limite_nbre;
}
public function viderLimite() {
$this->limite_debut = null;
$this->limite_nbre = null;
}
public function addOrdre($champ, $trie = self::ORDRE_ASCENDANT) {
if (!isset($this->ordre[$champ])) {
if (self::ORDRE_ASCENDANT == $trie || self::ORDRE_DESCENDANT == $trie) {
$this->ordre[$champ] = $trie;
} else {
$e = "La valeur pour le trie doit être : {self::ORDRE_ASCENDANT} ou {self::ORDRE_DESCENDANT}.";
trigger_error($e, E_USER_WARNING);
}
} else {
$e = "Le champ $champ existe déjà dans le tableau des ordres.";
trigger_error($e, E_USER_WARNING);
}
}
public function getOrdre() {
$champs = array();
foreach ($this->ordre as $champ => $trie) {
$champs[] = "$champ $trie";
}
return implode(', ', $champs);
}
public function viderOrdre() {
$this->ordre = null;
}
//+----------------------------------------------------------------------------------------------------------------+
// MÉTHODES
protected function envoyerRequeteConsultation($url) {
$url = $this->traiterUrlParametres($url);
$retour = $this->envoyerRequete($url, 'GET');
return $retour;
}
protected function envoyerRequeteAjout($url, Array $donnees) {
$retour = $this->envoyerRequete($url, 'PUT', $donnees);
return $retour;
}
protected function envoyerRequeteModif($url, Array $donnees) {
$retour = $this->envoyerRequete($url, 'POST', $donnees);
return $retour;
}
protected function envoyerRequeteSuppression($url) {
$retour = $this->envoyerRequete($url, 'DELETE');
return $retour;
}
private function envoyerRequete($url, $mode, Array $donnees = array()) {
$contenu = false;
if ($mode != 'GET' && $mode != 'PUT' && $mode != 'POST' && $mode != 'DELETE') {
$e = "Le mode de requête '$mode' n'est pas accepté!";
trigger_error($e, E_USER_WARNING);
} else {
$contexte = stream_context_create(array(
'http' => array(
'method' => $mode,
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'content' => http_build_query($donnees, null, self::HTTP_REQUETE_SEPARATEUR))));
$flux = @fopen($url, 'r', false, $contexte);
if (!$flux) {
$this->traiterEntete($http_response_header, $url);
$e = "L'ouverture de l'url '$url' par la méthode HTTP '$mode' a échoué!";
trigger_error($e, E_USER_WARNING);
} else {
// Informations sur les en-têtes et métadonnées du flux
$entetes = stream_get_meta_data($flux);
$this->traiterEntete($entetes, $url);
// Contenu actuel de $url
$contenu = stream_get_contents($flux);
fclose($flux);
}
}
$this->reinitialiser();
return $contenu;
}
private function traiterUrlParametres($url) {
$parametres = array();
if (! is_null($this->getLimiteDebut())) {
$parametres[] = 'start='.$this->getLimiteDebut();
}
if (! is_null($this->getLimiteNbre())) {
$parametres[] = 'limit='.$this->getLimiteNbre();
}
if (! is_null($this->ordre)) {
$parametres[] = 'orderby='.urlencode($this->getOrdre());
}
if ($this->getDistinction() != 0) {
$parametres[] = 'distinct='.$this->getDistinction();
}
if (count($parametres) > 0) {
$url_parametres = implode('&', $parametres);
$url = $url.'?'.$url_parametres;
}
return $url;
}
private function traiterEntete($entetes, $uri) {
$infos = $this->analyserEntete($entetes, $uri);
$this->traiterEnteteDebug($infos);
$this->traiterEnteteMessage($infos);
}
private function analyserEntete($entetes, $uri) {
$infos = array('date' => null, 'uri' => $uri, 'debugs' => null, 'messages' => null);
if (isset($entetes['wrapper_data'])) {
$entetes = $entetes['wrapper_data'];
}
foreach ($entetes as $entete) {
if (preg_match('/^X-DebugJrest-Data: (.+)$/', $entete, $match)) {
$infos['debugs'] = json_decode($match[1]);
}
if (preg_match('/^X-MessageJrest-Data: (.+)$/', $entete, $match)) {
$infos['messages'] = json_decode($match[1]);
}
if (preg_match('/^Date: .+ ([012][0-9]:[012345][0-9]:[012345][0-9]) .*$/', $entete, $match)) {
$infos['date'] = $match[1];
}
}
return $infos;
}
private function traiterEnteteDebug($entetes) {
if (isset($entetes['debugs'])) {
$date = $entetes['date'];
$uri = $entetes['uri'];
$debugs = $entetes['debugs'];
foreach ($debugs as $debug) {
Debug::printr("DEBUG : $date - $uri :\n$debug");
}
}
}
private function traiterEnteteMessage($entetes) {
if (isset($entetes['messages'])) {
$date = $entetes['date'];
$uri = $entetes['uri'];
$messages = $entetes['messages'];
foreach ($messages as $message) {
Debug::printr("MESSAGE : $date - $uri :\n$message");
}
}
}
private function reinitialiser() {
$this->viderDistinction();
$this->viderLimite();
$this->viderOrdre();
}
}
/tags/v1.8-irancy/bibliotheque/dao/MetadonneeDao.php
New file
0,0 → 1,47
<?php
// declare(encoding='UTF-8');
/**
* Modèle d'accès à la base de données des Collections pour le module Métadonnées.
*
* @package Collection
* @category php 5.2
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @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 SVN: $Id$
*
*/
class MetadonneeDao extends Dao {
const SERVICE_ONTOLOGIE = 'CoelValeurListe';
/**
* Retourne l'ensemble des information d'une liste de valeurs.
*
* @param integer l'id de la liste.
* @return array un tableau contenant les valeurs de la liste.
*/
public function getOntologie($id) {
$url = $this->url_jrest.self::SERVICE_ONTOLOGIE."/id/$id?limit=500";
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
return $donnees;
}
/**
* Retourne l'ensemble des information d'une liste de valeurs.
*
* @param integer l'id d'une valeur ou un ensemble d'id de valeurs séparés par des virgules.
* @return array un tableau contenant les valeurs.
*/
public function getOntologieValeur($id_valeurs) {
$donnees = array();
if (!empty($id_valeurs)) {
$url = $this->url_jrest.self::SERVICE_ONTOLOGIE."/idv/$id_valeurs";
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
}
return $donnees;
}
}
?>
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/bibliotheque/dao/StructureDao.php
New file
0,0 → 1,88
<?php
// declare(encoding='UTF-8');
/**
* Modèle d'accès à la base de données des Collections pour le module Structure.
*
* @package Collection
* @category php 5.2
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @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 SVN: $Id$
*
*/
class StructureDao extends Dao {
const ROLE_EQUIPE = 2027;
const SERVICE_STRUCTURE = 'CoelStructure';
const SERVICE_STRUCTURE_A_PERSONNE = 'CoelStructureAPersonne';
/**
* Retourne l'ensemble des information sur une structure.
*
* @param integer l'id de la structure.
* @return array un tableau contenant les informations sur la structure.
*/
public function getStructure($id_structure) {
$url = $this->url_jrest.self::SERVICE_STRUCTURE."/$id_structure/*";
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
return $donnees['structures'];
}
/**
* Retourne le nombre de structure par zone géographique.
*
* @param integer le type de recherche à effectuée.
* @return array un tableau contenant les informations sur le nombre de structures par zone.
*/
public function getStructureParZoneGeo($type_recherche) {
$url = $this->url_jrest.self::SERVICE_STRUCTURE."/ParZoneGeo/$type_recherche";
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
return $donnees;
}
/**
* Retourne l'ensemble des informations du personnel d'une structure.
*
* @param integer l'id de la structure.
* @return array un tableau contenant les informations sur le personnel de la structure.
*/
public function getPersonnel($id_structure) {
$donnees = $this->getStructureAPersonne($id_structure);
$personnel = $this->filtrerRoleEquipe($donnees['structuresAPersonne']);
return $personnel;
}
/**
* Retourne le nombre de personnel d'une structure.
*
* @param integer l'id de la structure.
* @return integer le nombre de personnel de la structure.
*/
public function getNbrePersonnel($id_structure) {
$donnees = $this->getStructureAPersonne($id_structure);
$personnel = $this->filtrerRoleEquipe($donnees['structuresAPersonne']);
$nbre_personnel = count($personnel);
return $nbre_personnel;
}
private function getStructureAPersonne($id_structure) {
$url = $this->url_jrest.self::SERVICE_STRUCTURE_A_PERSONNE."/$id_structure";
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
return $donnees;
}
private function filtrerRoleEquipe($personnes) {
$personnel = array();
foreach ($personnes as $personne) {
if ($personne['csap_id_role'] == self::ROLE_EQUIPE) {
$personnel[] = $personne;
}
}
return $personnel;
}
}
?>
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/bibliotheque/dao/SyndicationDao.php
New file
0,0 → 1,30
<?php
// declare(encoding='UTF-8');
/**
* Modèle d'accès à la base de données des Collections pour les flux de Syndication.
*
* @package Collection
* @category php 5.2
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @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 SVN: $Id$
*
*/
class SyndicationDao extends Dao {
const SERVICE = 'CoelSyndication';
/**
* Retourne l'ensemble des information sur les flux de syndication disponibles.
*
* @return array un tableau contenant les informations.
*/
public function getListeDesFlux() {
$url = $this->url_jrest.self::SERVICE.'/liste_des_flux';
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
return $donnees;
}
}
?>
/tags/v1.8-irancy/bibliotheque/dao/RechercheDao.php
New file
0,0 → 1,103
<?php
// declare(encoding='UTF-8');
/**
* Modèle d'accès à la base de données des Collections pour la Recherche
*
* @package Collection
* @category php5
* @author aurelien <aurelien@tela-botanica.org>
* @author mathias <mathias@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @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 SVN: $Id$
*
*/
class RechercheDao extends Dao {
const SERVICE = 'CoelRecherche';
 
/** @deprecated retro-compatibilité */
public function chercherStructureNbre($parametres) {
return $this->chercherCollectionsNbre($parametres);
}
/** @deprecated retro-compatibilité */
public function chercher($parametres) {
return $this->chercherCollections($parametres);
}
 
// recherche du nombre de collections : nouveau
public function chercherCollectionsNbre($parametres) {
$url = $this->construireUrlRechercheCollections('NombreCollections', $parametres, false);
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
 
return $donnees;
}
 
// recherche du nombre de personnes : nouveau
public function chercherPersonnesNbre($parametres) {
$url = $this->construireUrlRecherchePersonnes('NombrePersonnes', $parametres, false);
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
 
return $donnees;
}
 
// recherche de collections : nouveau
public function chercherCollections($parametres) {
$url = $this->construireUrlRechercheCollections('Collections', $parametres);
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
 
return $donnees;
}
 
// recherche de personnes : nouveau
public function chercherPersonnes($parametres) {
$url = $this->construireUrlRecherchePersonnes('Personnes', $parametres);
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
 
return $donnees;
}
 
// construit l'URL du service CoelRecherche pour obtenir des collections
// Attention au nombre et à l'ordre des paramètres !
private function construireUrlRechercheCollections($type, $parametres, $limitation = true) {
return $this->construireUrlRecherche(
$type,
$parametres,
$limitation,
array('mots', 'sci', 'bot', 'lieu-stockage', 'zg', 'p', 'pr', 'str-d', 'veg')
);
}
 
// construit l'URL du service CoelRecherche pour obtenir des personnes
// Attention au nombre et à l'ordre des paramètres !
private function construireUrlRecherchePersonnes($type, $parametres, $limitation = true) {
return $this->construireUrlRecherche(
$type,
$parametres,
$limitation,
array('nom-famille', 'adresse', 'date-vivant')
);
}
 
// fabrique une URL pour le service CoelRecherche en collant les paramètres fournis (sinon "*")
// dans l'ordre attendu par le service demandé ($type)
private function construireUrlRecherche($type, $parametres, $limitation, $paramsAPasser) {
 
$url = $this->url_jrest . self::SERVICE . '/' . $type;
 
foreach ($paramsAPasser as $param_cle) {
if (isset($parametres[$param_cle]) && $parametres[$param_cle] != '') {
$valeur = rawurlencode(trim($parametres[$param_cle]));
$url .= '/'.$valeur;
} else {
$url .= '/*';
}
}
return $url;
}
}
?>
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/bibliotheque/dao/PersonneDao.php
New file
0,0 → 1,183
<?php
// declare(encoding='UTF-8');
/**
* Modèle d'accès à la base de données des Collections pour le module Personnes.
*
* @package Collection
* @category php 5.2
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @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 SVN: $Id$
*
*/
class PersonneDao extends Dao {
const SERVICE_PERSONNE = 'CoelPersonne';
const SERVICE_PERSONNE_A_PUBLICATION = 'CoelPublicationAPersonne';
const SERVICE_PERSONNE_A_COLLECTION = 'CoelCollectionAPersonne';
const SERVICE_PERSONNE_A_STRUCTURE = 'CoelStructureAPersonne';
private $cache = array();
 
/**
* Retourne l'ensemble des information d'une personne.
*
* @param integer l'id de la personne.
* @return array un tableau contenant les informations sur la personne.
*/
public function getPersonne($id) {
$donnees = array();
if (is_numeric($id)) {
$url = $this->url_jrest.self::SERVICE_PERSONNE."/$id";
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
if ($donnees['nbElements'] == 1) {
$donnees = $donnees['personnes'][0];
}
}
return $donnees;
}
/**
* Retourne l'ensemble des publications liées à une personne.
*
* @param integer l'id de la personne.
* @return array un tableau contenant les informations sur les publications liées à la personne.
*/
public function getPublicationsLiees($id_personne) {
$donnees = $this->getPersonneAPublication($id_personne);
return $donnees['publicationsAPersonne'];
}
/**
* Retourne le nombre des publications liées à une personne.
*
* @param integer l'id de la personne.
* @return integer le nombre de publications liées à la personne.
*/
public function getNbrePublicationsLiees($id_personne) {
$donnees = $this->getPersonneAPublication($id_personne);
return $donnees['nbElements'];
}
private function getPersonneAPublication($id_personne) {
$cache =& $this->cache['PersonneAPublication'];
if (isset($cache[$id_personne])) {
$donnees = $cache[$id_personne];
} else {
$url = $this->url_jrest.self::SERVICE_PERSONNE_A_PUBLICATION."/*/$id_personne/2361,2362,2363";
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
$cache[$id_personne] = $donnees;
}
return $donnees;
}
/**
* Retourne l'ensemble des collections liées à une personne.
*
* @param integer l'id de la personne.
* @return array un tableau contenant les informations sur les collections liées à la personne.
*/
public function getCollectionsLiees($id_personne) {
$donnees = $this->getPersonneACollection($id_personne);
return $donnees['collectionsAPersonne'];
}
/**
* Retourne le nombre de collections liées à une personne.
*
* @param integer l'id de la personne.
* @return integer le nombre de collections liées à la personne.
*/
public function getNbreCollectionsLiees($id_personne) {
$donnees = $this->getPersonneACollection($id_personne);
return $donnees['nbElements'];
}
private function getPersonneACollection($id_personne) {
$cache =& $this->cache['PersonneACollection'];
if (isset($cache[$id_personne])) {
$donnees = $cache[$id_personne];
} else {
$url = $this->url_jrest.self::SERVICE_PERSONNE_A_COLLECTION."/*/*/$id_personne";
$this->addOrdre('cc_nom', self::ORDRE_ASCENDANT);
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
$cache[$id_personne] = $donnees;
}
return $donnees;
}
/**
* Retourne l'ensemble des structures liées à une personne.
*
* @param integer l'id de la personne.
* @return array un tableau contenant les informations sur les structures liées à la personne.
*/
public function getStructuresLiees($id_personne) {
$donnees = $this->getPersonneAStructure($id_personne);
return $donnees['structuresAPersonne'];
}
/**
* Retourne le nombre de structures liées à une personne.
*
* @param integer l'id de la personne.
* @return integer le nombre de structures liées à la personne.
*/
public function getNbreStructuresLiees($id_personne) {
$donnees = $this->getPersonneAStructure($id_personne);
return $donnees['nbElements'];
}
private function getPersonneAStructure($id_personne) {
$cache =& $this->cache['PersonneAStructure'];
if (isset($cache[$id_personne])) {
$donnees = $cache[$id_personne];
} else {
$url = $this->url_jrest.self::SERVICE_PERSONNE_A_STRUCTURE."/*/*/$id_personne";
$this->addOrdre('cp_nom', self::ORDRE_ASCENDANT);
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
$cache[$id_personne] = $donnees;
}
return $donnees;
}
/**
* Retourne le nom complet d'une personne.
*
* @param integer l'id de la personne.
* @return string le nom complet de la personne.
*/
public function getPersonneNomComplet($id) {
$nom_complet = '';
$donnees = $this->getPersonne($id);
if (isset($donnees['nbElements']) && $donnees['nbElements'] >= 1) {
$nom_complet = $donnees['personnes'][0]['cp_fmt_nom_complet'];
} else if (isset($donnees['cp_fmt_nom_complet'])) {
$nom_complet = $donnees['cp_fmt_nom_complet'];
}
return $nom_complet;
}
/**
* Retourne la chaine "truk" des courriels d'une personne.
*
* @param integer l'id de la personne.
* @return string la chaine "truk" des courriels de la personne.
*/
public function getPersonneCourriels($id) {
$courriels = '';
$donnees = $this->getPersonne($id);
if (isset($donnees['nbElements']) && $donnees['nbElements'] >= 1) {
$courriels = $donnees['personnes'][0]['cp_truk_courriel'];
} else if (isset($donnees['cp_truk_courriel'])) {
$courriels = $donnees['cp_truk_courriel'];
}
return $courriels;
}
}
?>
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/bibliotheque/pear/Pager.php
New file
0,0 → 1,193
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
 
/**
* Contains the Pager class
*
* PHP versions 4 and 5
*
* LICENSE: Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @category HTML
* @package Pager
* @author Lorenzo Alberton <l dot alberton at quipo dot it>
* @author Richard Heyes <richard@phpguru.org>
* @copyright 2003-2006 Lorenzo Alberton, Richard Heyes
* @license http://www.debian.org/misc/bsd.license BSD License (3 Clause)
* @version CVS: $Id$
* @link http://pear.php.net/package/Pager
*/
 
/**
* Pager - Wrapper class for [Sliding|Jumping]-window Pager
* Usage examples can be found in the PEAR manual
*
* @category HTML
* @package Pager
* @author Lorenzo Alberton <l dot alberton at quipo dot it>
* @author Richard Heyes <richard@phpguru.org>,
* @copyright 2003-2005 Lorenzo Alberton, Richard Heyes
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @link http://pear.php.net/package/Pager
*/
class Pager
{
// {{{ Pager()
 
/**
* Constructor
*
* -------------------------------------------------------------------------
* VALID options are (default values are set some lines before):
* - mode (string): "Jumping" or "Sliding" -window - It determines
* pager behaviour. See the manual for more details
* - totalItems (int): # of items to page.
* - perPage (int): # of items per page.
* - delta (int): # of page #s to show before and after the current
* one
* - linkClass (string): name of CSS class used for link styling.
* - append (bool): if true pageID is appended as GET value to the
* URL - if false it is embedded in the URL
* according to "fileName" specs
* - httpMethod (string): Specifies the HTTP method to use. Valid values
* are 'GET' or 'POST'
* according to "fileName" specs
* - importQuery (bool): if true (default behaviour), variables and
* values are imported from the submitted data
* (query string) and used in the generated links
* otherwise they're ignored completely
* - path (string): complete path to the page (without the page name)
* - fileName (string): name of the page, with a %d if append=true
* - urlVar (string): name of pageNumber URL var, for example "pageID"
* - altPrev (string): alt text to display for prev page, on prev link.
* - altNext (string): alt text to display for next page, on next link.
* - altPage (string): alt text to display before the page number.
* - prevImg (string): sth (it can be text such as "<< PREV" or an
* <img/> as well...) to display instead of "<<".
* - nextImg (string): same as prevImg, used for NEXT link, instead of
* the default value, which is ">>".
* - separator (string): what to use to separate numbers (can be an
* <img/>, a comma, an hyphen, or whatever.
* - spacesBeforeSeparator
* (int): number of spaces before the separator.
* - firstPagePre (string):
* string used before first page number (can be an
* <img/>, a "{", an empty string, or whatever.
* - firstPageText (string):
* string used in place of first page number
* - firstPagePost (string):
* string used after first page number (can be an
* <img/>, a "}", an empty string, or whatever.
* - lastPagePre (string):
* similar to firstPagePre.
* - lastPageText (string):
* similar to firstPageText.
* - lastPagePost (string):
* similar to firstPagePost.
* - spacesAfterSeparator
* (int): number of spaces after the separator.
* - firstLinkTitle (string):
* string used as title in <link rel="first"> tag
* - lastLinkTitle (string):
* string used as title in <link rel="last"> tag
* - prevLinkTitle (string):
* string used as title in <link rel="prev"> tag
* - nextLinkTitle (string):
* string used as title in <link rel="next"> tag
* - curPageLinkClassName
* (string): name of CSS class used for current page link.
* - clearIfVoid(bool): if there's only one page, don't display pager.
* - extraVars (array): additional URL vars to be added to the querystring
* - excludeVars (array): URL vars to be excluded in the querystring
* - itemData (array): array of items to page.
* - useSessions (bool): if true, number of items to display per page is
* stored in the $_SESSION[$_sessionVar] var.
* - closeSession (bool): if true, the session is closed just after R/W.
* - sessionVar (string): name of the session var for perPage value.
* A value != from default can be useful when
* using more than one Pager istance in the page.
* - pearErrorMode (constant):
* PEAR_ERROR mode for raiseError().
* Default is PEAR_ERROR_RETURN.
* -------------------------------------------------------------------------
* REQUIRED options are:
* - fileName IF append==false (default is true)
* - itemData OR totalItems (if itemData is set, totalItems is overwritten)
* -------------------------------------------------------------------------
*
* @param mixed $options An associative array of option names and
* their values.
* @access public
*/
function Pager($options = array())
{
//this check evaluates to true on 5.0.0RC-dev,
//so i'm using another one, for now...
//if (version_compare(phpversion(), '5.0.0') == -1) {
if (get_class($this) == 'pager') { //php4 lowers class names
// assign factoried method to this for PHP 4
eval('$this = Pager::factory($options);');
} else { //php5 is case sensitive
$msg = 'Pager constructor is deprecated.'
.' You must use the "Pager::factory($params)" method'
.' instead of "new Pager($params)"';
trigger_error($msg, E_USER_ERROR);
}
}
 
// }}}
// {{{ factory()
 
/**
* Return a pager based on $mode and $options
*
* @param array $options Optional parameters for the storage class
* @return object Object Storage object
* @static
* @access public
*/
static function &factory($options = array())
{
$mode = (isset($options['mode']) ? ucfirst($options['mode']) : 'Jumping');
$classname = 'Pager_' . $mode;
$classfile = 'Pager' . DIRECTORY_SEPARATOR . $mode . '.php';
 
// Attempt to include a custom version of the named class, but don't treat
// a failure as fatal. The caller may have already included their own
// version of the named class.
if (!class_exists($classname)) {
include_once $classfile;
}
 
// If the class exists, return a new instance of it.
if (class_exists($classname)) {
$pager = new $classname($options);
return $pager;
}
 
$null = null;
return $null;
}
 
// }}}
}
?>
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/bibliotheque/pear/A_LIRE.txt
New file
0,0 → 1,4
Paquetages PEAR :
PEAR -> 1.6.2
Pager -> 2.4.4
Auth -> 1.5.4
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
Added: svn:eol-style
+native
\ No newline at end of property
/tags/v1.8-irancy/bibliotheque/pear/PEAR.php
New file
0,0 → 1,1108
<?php
/**
* PEAR, the PHP Extension and Application Repository
*
* PEAR class and PEAR_Error class
*
* PHP versions 4 and 5
*
* LICENSE: This source file is subject to version 3.0 of the PHP license
* that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_0.txt. If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately.
*
* @category pear
* @package PEAR
* @author Sterling Hughes <sterling@php.net>
* @author Stig Bakken <ssb@php.net>
* @author Tomas V.V.Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version CVS: $Id$
* @link http://pear.php.net/package/PEAR
* @since File available since Release 0.1
*/
 
/**#@+
* ERROR constants
*/
define('PEAR_ERROR_RETURN', 1);
define('PEAR_ERROR_PRINT', 2);
define('PEAR_ERROR_TRIGGER', 4);
define('PEAR_ERROR_DIE', 8);
define('PEAR_ERROR_CALLBACK', 16);
/**
* WARNING: obsolete
* @deprecated
*/
define('PEAR_ERROR_EXCEPTION', 32);
/**#@-*/
define('PEAR_ZE2', (function_exists('version_compare') &&
version_compare(zend_version(), "2-dev", "ge")));
 
if (substr(PHP_OS, 0, 3) == 'WIN') {
define('OS_WINDOWS', true);
define('OS_UNIX', false);
define('PEAR_OS', 'Windows');
} else {
define('OS_WINDOWS', false);
define('OS_UNIX', true);
define('PEAR_OS', 'Unix'); // blatant assumption
}
 
// instant backwards compatibility
if (!defined('PATH_SEPARATOR')) {
if (OS_WINDOWS) {
define('PATH_SEPARATOR', ';');
} else {
define('PATH_SEPARATOR', ':');
}
}
 
$GLOBALS['_PEAR_default_error_mode'] = PEAR_ERROR_RETURN;
$GLOBALS['_PEAR_default_error_options'] = E_USER_NOTICE;
$GLOBALS['_PEAR_destructor_object_list'] = array();
$GLOBALS['_PEAR_shutdown_funcs'] = array();
$GLOBALS['_PEAR_error_handler_stack'] = array();
 
@ini_set('track_errors', true);
 
/**
* Base class for other PEAR classes. Provides rudimentary
* emulation of destructors.
*
* If you want a destructor in your class, inherit PEAR and make a
* destructor method called _yourclassname (same name as the
* constructor, but with a "_" prefix). Also, in your constructor you
* have to call the PEAR constructor: $this->PEAR();.
* The destructor method will be called without parameters. Note that
* at in some SAPI implementations (such as Apache), any output during
* the request shutdown (in which destructors are called) seems to be
* discarded. If you need to get any debug information from your
* destructor, use error_log(), syslog() or something similar.
*
* IMPORTANT! To use the emulated destructors you need to create the
* objects by reference: $obj =& new PEAR_child;
*
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Tomas V.V. Cox <cox@idecnet.com>
* @author Greg Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version Release: 1.6.1
* @link http://pear.php.net/package/PEAR
* @see PEAR_Error
* @since Class available since PHP 4.0.2
* @link http://pear.php.net/manual/en/core.pear.php#core.pear.pear
*/
class PEAR
{
// {{{ properties
 
/**
* Whether to enable internal debug messages.
*
* @var bool
* @access private
*/
var $_debug = false;
 
/**
* Default error mode for this object.
*
* @var int
* @access private
*/
var $_default_error_mode = null;
 
/**
* Default error options used for this object when error mode
* is PEAR_ERROR_TRIGGER.
*
* @var int
* @access private
*/
var $_default_error_options = null;
 
/**
* Default error handler (callback) for this object, if error mode is
* PEAR_ERROR_CALLBACK.
*
* @var string
* @access private
*/
var $_default_error_handler = '';
 
/**
* Which class to use for error objects.
*
* @var string
* @access private
*/
var $_error_class = 'PEAR_Error';
 
/**
* An array of expected errors.
*
* @var array
* @access private
*/
var $_expected_errors = array();
 
// }}}
 
// {{{ constructor
 
/**
* Constructor. Registers this object in
* $_PEAR_destructor_object_list for destructor emulation if a
* destructor object exists.
*
* @param string $error_class (optional) which class to use for
* error objects, defaults to PEAR_Error.
* @access public
* @return void
*/
function PEAR($error_class = null)
{
$classname = strtolower(get_class($this));
if ($this->_debug) {
print "PEAR constructor called, class=$classname\n";
}
if ($error_class !== null) {
$this->_error_class = $error_class;
}
while ($classname && strcasecmp($classname, "pear")) {
$destructor = "_$classname";
if (method_exists($this, $destructor)) {
global $_PEAR_destructor_object_list;
$_PEAR_destructor_object_list[] = &$this;
if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) {
register_shutdown_function("_PEAR_call_destructors");
$GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true;
}
break;
} else {
$classname = get_parent_class($classname);
}
}
}
 
// }}}
// {{{ destructor
 
/**
* Destructor (the emulated type of...). Does nothing right now,
* but is included for forward compatibility, so subclass
* destructors should always call it.
*
* See the note in the class desciption about output from
* destructors.
*
* @access public
* @return void
*/
function _PEAR() {
if ($this->_debug) {
printf("PEAR destructor called, class=%s\n", strtolower(get_class($this)));
}
}
 
// }}}
// {{{ getStaticProperty()
 
/**
* If you have a class that's mostly/entirely static, and you need static
* properties, you can use this method to simulate them. Eg. in your method(s)
* do this: $myVar = &PEAR::getStaticProperty('myclass', 'myVar');
* You MUST use a reference, or they will not persist!
*
* @access public
* @param string $class The calling classname, to prevent clashes
* @param string $var The variable to retrieve.
* @return mixed A reference to the variable. If not set it will be
* auto initialised to NULL.
*/
function &getStaticProperty($class, $var)
{
static $properties;
if (!isset($properties[$class])) {
$properties[$class] = array();
}
if (!array_key_exists($var, $properties[$class])) {
$properties[$class][$var] = null;
}
return $properties[$class][$var];
}
 
// }}}
// {{{ registerShutdownFunc()
 
/**
* Use this function to register a shutdown method for static
* classes.
*
* @access public
* @param mixed $func The function name (or array of class/method) to call
* @param mixed $args The arguments to pass to the function
* @return void
*/
function registerShutdownFunc($func, $args = array())
{
// if we are called statically, there is a potential
// that no shutdown func is registered. Bug #6445
if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) {
register_shutdown_function("_PEAR_call_destructors");
$GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true;
}
$GLOBALS['_PEAR_shutdown_funcs'][] = array($func, $args);
}
 
// }}}
// {{{ isError()
 
/**
* Tell whether a value is a PEAR error.
*
* @param mixed $data the value to test
* @param int $code if $data is an error object, return true
* only if $code is a string and
* $obj->getMessage() == $code or
* $code is an integer and $obj->getCode() == $code
* @access public
* @return bool true if parameter is an error
*/
function isError($data, $code = null)
{
if (is_a($data, 'PEAR_Error')) {
if (is_null($code)) {
return true;
} elseif (is_string($code)) {
return $data->getMessage() == $code;
} else {
return $data->getCode() == $code;
}
}
return false;
}
 
// }}}
// {{{ setErrorHandling()
 
/**
* Sets how errors generated by this object should be handled.
* Can be invoked both in objects and statically. If called
* statically, setErrorHandling sets the default behaviour for all
* PEAR objects. If called in an object, setErrorHandling sets
* the default behaviour for that object.
*
* @param int $mode
* One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT,
* PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE,
* PEAR_ERROR_CALLBACK or PEAR_ERROR_EXCEPTION.
*
* @param mixed $options
* When $mode is PEAR_ERROR_TRIGGER, this is the error level (one
* of E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR).
*
* When $mode is PEAR_ERROR_CALLBACK, this parameter is expected
* to be the callback function or method. A callback
* function is a string with the name of the function, a
* callback method is an array of two elements: the element
* at index 0 is the object, and the element at index 1 is
* the name of the method to call in the object.
*
* When $mode is PEAR_ERROR_PRINT or PEAR_ERROR_DIE, this is
* a printf format string used when printing the error
* message.
*
* @access public
* @return void
* @see PEAR_ERROR_RETURN
* @see PEAR_ERROR_PRINT
* @see PEAR_ERROR_TRIGGER
* @see PEAR_ERROR_DIE
* @see PEAR_ERROR_CALLBACK
* @see PEAR_ERROR_EXCEPTION
*
* @since PHP 4.0.5
*/
 
function setErrorHandling($mode = null, $options = null)
{
if (isset($this) && is_a($this, 'PEAR')) {
$setmode = &$this->_default_error_mode;
$setoptions = &$this->_default_error_options;
} else {
$setmode = &$GLOBALS['_PEAR_default_error_mode'];
$setoptions = &$GLOBALS['_PEAR_default_error_options'];
}
 
switch ($mode) {
case PEAR_ERROR_EXCEPTION:
case PEAR_ERROR_RETURN:
case PEAR_ERROR_PRINT:
case PEAR_ERROR_TRIGGER:
case PEAR_ERROR_DIE:
case null:
$setmode = $mode;
$setoptions = $options;
break;
 
case PEAR_ERROR_CALLBACK:
$setmode = $mode;
// class/object method callback
if (is_callable($options)) {
$setoptions = $options;
} else {
trigger_error("invalid error callback", E_USER_WARNING);
}
break;
 
default:
trigger_error("invalid error mode", E_USER_WARNING);
break;
}
}
 
// }}}
// {{{ expectError()
 
/**
* This method is used to tell which errors you expect to get.
* Expected errors are always returned with error mode
* PEAR_ERROR_RETURN. Expected error codes are stored in a stack,
* and this method pushes a new element onto it. The list of
* expected errors are in effect until they are popped off the
* stack with the popExpect() method.
*
* Note that this method can not be called statically
*
* @param mixed $code a single error code or an array of error codes to expect
*
* @return int the new depth of the "expected errors" stack
* @access public
*/
function expectError($code = '*')
{
if (is_array($code)) {
array_push($this->_expected_errors, $code);
} else {
array_push($this->_expected_errors, array($code));
}
return sizeof($this->_expected_errors);
}
 
// }}}
// {{{ popExpect()
 
/**
* This method pops one element off the expected error codes
* stack.
*
* @return array the list of error codes that were popped
*/
function popExpect()
{
return array_pop($this->_expected_errors);
}
 
// }}}
// {{{ _checkDelExpect()
 
/**
* This method checks unsets an error code if available
*
* @param mixed error code
* @return bool true if the error code was unset, false otherwise
* @access private
* @since PHP 4.3.0
*/
function _checkDelExpect($error_code)
{
$deleted = false;
 
foreach ($this->_expected_errors AS $key => $error_array) {
if (in_array($error_code, $error_array)) {
unset($this->_expected_errors[$key][array_search($error_code, $error_array)]);
$deleted = true;
}
 
// clean up empty arrays
if (0 == count($this->_expected_errors[$key])) {
unset($this->_expected_errors[$key]);
}
}
return $deleted;
}
 
// }}}
// {{{ delExpect()
 
/**
* This method deletes all occurences of the specified element from
* the expected error codes stack.
*
* @param mixed $error_code error code that should be deleted
* @return mixed list of error codes that were deleted or error
* @access public
* @since PHP 4.3.0
*/
function delExpect($error_code)
{
$deleted = false;
 
if ((is_array($error_code) && (0 != count($error_code)))) {
// $error_code is a non-empty array here;
// we walk through it trying to unset all
// values
foreach($error_code as $key => $error) {
if ($this->_checkDelExpect($error)) {
$deleted = true;
} else {
$deleted = false;
}
}
return $deleted ? true : PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME
} elseif (!empty($error_code)) {
// $error_code comes alone, trying to unset it
if ($this->_checkDelExpect($error_code)) {
return true;
} else {
return PEAR::raiseError("The expected error you submitted does not exist"); // IMPROVE ME
}
} else {
// $error_code is empty
return PEAR::raiseError("The expected error you submitted is empty"); // IMPROVE ME
}
}
 
// }}}
// {{{ raiseError()
 
/**
* This method is a wrapper that returns an instance of the
* configured error class with this object's default error
* handling applied. If the $mode and $options parameters are not
* specified, the object's defaults are used.
*
* @param mixed $message a text error message or a PEAR error object
*
* @param int $code a numeric error code (it is up to your class
* to define these if you want to use codes)
*
* @param int $mode One of PEAR_ERROR_RETURN, PEAR_ERROR_PRINT,
* PEAR_ERROR_TRIGGER, PEAR_ERROR_DIE,
* PEAR_ERROR_CALLBACK, PEAR_ERROR_EXCEPTION.
*
* @param mixed $options If $mode is PEAR_ERROR_TRIGGER, this parameter
* specifies the PHP-internal error level (one of
* E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR).
* If $mode is PEAR_ERROR_CALLBACK, this
* parameter specifies the callback function or
* method. In other error modes this parameter
* is ignored.
*
* @param string $userinfo If you need to pass along for example debug
* information, this parameter is meant for that.
*
* @param string $error_class The returned error object will be
* instantiated from this class, if specified.
*
* @param bool $skipmsg If true, raiseError will only pass error codes,
* the error message parameter will be dropped.
*
* @access public
* @return object a PEAR error object
* @see PEAR::setErrorHandling
* @since PHP 4.0.5
*/
function &raiseError($message = null,
$code = null,
$mode = null,
$options = null,
$userinfo = null,
$error_class = null,
$skipmsg = false)
{
// The error is yet a PEAR error object
if (is_object($message)) {
$code = $message->getCode();
$userinfo = $message->getUserInfo();
$error_class = $message->getType();
$message->error_message_prefix = '';
$message = $message->getMessage();
}
 
if (isset($this) && isset($this->_expected_errors) && sizeof($this->_expected_errors) > 0 && sizeof($exp = end($this->_expected_errors))) {
if ($exp[0] == "*" ||
(is_int(reset($exp)) && in_array($code, $exp)) ||
(is_string(reset($exp)) && in_array($message, $exp))) {
$mode = PEAR_ERROR_RETURN;
}
}
// No mode given, try global ones
if ($mode === null) {
// Class error handler
if (isset($this) && isset($this->_default_error_mode)) {
$mode = $this->_default_error_mode;
$options = $this->_default_error_options;
// Global error handler
} elseif (isset($GLOBALS['_PEAR_default_error_mode'])) {
$mode = $GLOBALS['_PEAR_default_error_mode'];
$options = $GLOBALS['_PEAR_default_error_options'];
}
}
 
if ($error_class !== null) {
$ec = $error_class;
} elseif (isset($this) && isset($this->_error_class)) {
$ec = $this->_error_class;
} else {
$ec = 'PEAR_Error';
}
if ($skipmsg) {
$a = &new $ec($code, $mode, $options, $userinfo);
return $a;
} else {
$a = &new $ec($message, $code, $mode, $options, $userinfo);
return $a;
}
}
 
// }}}
// {{{ throwError()
 
/**
* Simpler form of raiseError with fewer options. In most cases
* message, code and userinfo are enough.
*
* @param string $message
*
*/
function &throwError($message = null,
$code = null,
$userinfo = null)
{
if (isset($this) && is_a($this, 'PEAR')) {
$a = &$this->raiseError($message, $code, null, null, $userinfo);
return $a;
} else {
$a = &PEAR::raiseError($message, $code, null, null, $userinfo);
return $a;
}
}
 
// }}}
function staticPushErrorHandling($mode, $options = null)
{
$stack = &$GLOBALS['_PEAR_error_handler_stack'];
$def_mode = &$GLOBALS['_PEAR_default_error_mode'];
$def_options = &$GLOBALS['_PEAR_default_error_options'];
$stack[] = array($def_mode, $def_options);
switch ($mode) {
case PEAR_ERROR_EXCEPTION:
case PEAR_ERROR_RETURN:
case PEAR_ERROR_PRINT:
case PEAR_ERROR_TRIGGER:
case PEAR_ERROR_DIE:
case null:
$def_mode = $mode;
$def_options = $options;
break;
 
case PEAR_ERROR_CALLBACK:
$def_mode = $mode;
// class/object method callback
if (is_callable($options)) {
$def_options = $options;
} else {
trigger_error("invalid error callback", E_USER_WARNING);
}
break;
 
default:
trigger_error("invalid error mode", E_USER_WARNING);
break;
}
$stack[] = array($mode, $options);
return true;
}
 
function staticPopErrorHandling()
{
$stack = &$GLOBALS['_PEAR_error_handler_stack'];
$setmode = &$GLOBALS['_PEAR_default_error_mode'];
$setoptions = &$GLOBALS['_PEAR_default_error_options'];
array_pop($stack);
list($mode, $options) = $stack[sizeof($stack) - 1];
array_pop($stack);
switch ($mode) {
case PEAR_ERROR_EXCEPTION:
case PEAR_ERROR_RETURN:
case PEAR_ERROR_PRINT:
case PEAR_ERROR_TRIGGER:
case PEAR_ERROR_DIE:
case null:
$setmode = $mode;
$setoptions = $options;
break;
 
case PEAR_ERROR_CALLBACK:
$setmode = $mode;
// class/object method callback
if (is_callable($options)) {
$setoptions = $options;
} else {
trigger_error("invalid error callback", E_USER_WARNING);
}
break;
 
default:
trigger_error("invalid error mode", E_USER_WARNING);
break;
}
return true;
}
 
// {{{ pushErrorHandling()
 
/**
* Push a new error handler on top of the error handler options stack. With this
* you can easily override the actual error handler for some code and restore
* it later with popErrorHandling.
*
* @param mixed $mode (same as setErrorHandling)
* @param mixed $options (same as setErrorHandling)
*
* @return bool Always true
*
* @see PEAR::setErrorHandling
*/
function pushErrorHandling($mode, $options = null)
{
$stack = &$GLOBALS['_PEAR_error_handler_stack'];
if (isset($this) && is_a($this, 'PEAR')) {
$def_mode = &$this->_default_error_mode;
$def_options = &$this->_default_error_options;
} else {
$def_mode = &$GLOBALS['_PEAR_default_error_mode'];
$def_options = &$GLOBALS['_PEAR_default_error_options'];
}
$stack[] = array($def_mode, $def_options);
 
if (isset($this) && is_a($this, 'PEAR')) {
$this->setErrorHandling($mode, $options);
} else {
PEAR::setErrorHandling($mode, $options);
}
$stack[] = array($mode, $options);
return true;
}
 
// }}}
// {{{ popErrorHandling()
 
/**
* Pop the last error handler used
*
* @return bool Always true
*
* @see PEAR::pushErrorHandling
*/
function popErrorHandling()
{
$stack = &$GLOBALS['_PEAR_error_handler_stack'];
array_pop($stack);
list($mode, $options) = $stack[sizeof($stack) - 1];
array_pop($stack);
if (isset($this) && is_a($this, 'PEAR')) {
$this->setErrorHandling($mode, $options);
} else {
PEAR::setErrorHandling($mode, $options);
}
return true;
}
 
// }}}
// {{{ loadExtension()
 
/**
* OS independant PHP extension load. Remember to take care
* on the correct extension name for case sensitive OSes.
*
* @param string $ext The extension name
* @return bool Success or not on the dl() call
*/
function loadExtension($ext)
{
if (!extension_loaded($ext)) {
// if either returns true dl() will produce a FATAL error, stop that
if ((ini_get('enable_dl') != 1) || (ini_get('safe_mode') == 1)) {
return false;
}
if (OS_WINDOWS) {
$suffix = '.dll';
} elseif (PHP_OS == 'HP-UX') {
$suffix = '.sl';
} elseif (PHP_OS == 'AIX') {
$suffix = '.a';
} elseif (PHP_OS == 'OSX') {
$suffix = '.bundle';
} else {
$suffix = '.so';
}
return @dl('php_'.$ext.$suffix) || @dl($ext.$suffix);
}
return true;
}
 
// }}}
}
 
// {{{ _PEAR_call_destructors()
 
function _PEAR_call_destructors()
{
global $_PEAR_destructor_object_list;
if (is_array($_PEAR_destructor_object_list) &&
sizeof($_PEAR_destructor_object_list))
{
reset($_PEAR_destructor_object_list);
if (PEAR::getStaticProperty('PEAR', 'destructlifo')) {
$_PEAR_destructor_object_list = array_reverse($_PEAR_destructor_object_list);
}
while (list($k, $objref) = each($_PEAR_destructor_object_list)) {
$classname = get_class($objref);
while ($classname) {
$destructor = "_$classname";
if (method_exists($objref, $destructor)) {
$objref->$destructor();
break;
} else {
$classname = get_parent_class($classname);
}
}
}
// Empty the object list to ensure that destructors are
// not called more than once.
$_PEAR_destructor_object_list = array();
}
 
// Now call the shutdown functions
if (is_array($GLOBALS['_PEAR_shutdown_funcs']) AND !empty($GLOBALS['_PEAR_shutdown_funcs'])) {
foreach ($GLOBALS['_PEAR_shutdown_funcs'] as $value) {
call_user_func_array($value[0], $value[1]);
}
}
}
 
// }}}
/**
* Standard PEAR error class for PHP 4
*
* This class is supserseded by {@link PEAR_Exception} in PHP 5
*
* @category pear
* @package PEAR
* @author Stig Bakken <ssb@php.net>
* @author Tomas V.V. Cox <cox@idecnet.com>
* @author Gregory Beaver <cellog@php.net>
* @copyright 1997-2006 The PHP Group
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @version Release: 1.6.1
* @link http://pear.php.net/manual/en/core.pear.pear-error.php
* @see PEAR::raiseError(), PEAR::throwError()
* @since Class available since PHP 4.0.2
*/
class PEAR_Error
{
// {{{ properties
 
var $error_message_prefix = '';
var $mode = PEAR_ERROR_RETURN;
var $level = E_USER_NOTICE;
var $code = -1;
var $message = '';
var $userinfo = '';
var $backtrace = null;
 
// }}}
// {{{ constructor
 
/**
* PEAR_Error constructor
*
* @param string $message message
*
* @param int $code (optional) error code
*
* @param int $mode (optional) error mode, one of: PEAR_ERROR_RETURN,
* PEAR_ERROR_PRINT, PEAR_ERROR_DIE, PEAR_ERROR_TRIGGER,
* PEAR_ERROR_CALLBACK or PEAR_ERROR_EXCEPTION
*
* @param mixed $options (optional) error level, _OR_ in the case of
* PEAR_ERROR_CALLBACK, the callback function or object/method
* tuple.
*
* @param string $userinfo (optional) additional user/debug info
*
* @access public
*
*/
function PEAR_Error($message = 'unknown error', $code = null,
$mode = null, $options = null, $userinfo = null)
{
if ($mode === null) {
$mode = PEAR_ERROR_RETURN;
}
$this->message = $message;
$this->code = $code;
$this->mode = $mode;
$this->userinfo = $userinfo;
if (!PEAR::getStaticProperty('PEAR_Error', 'skiptrace')) {
$this->backtrace = debug_backtrace();
if (isset($this->backtrace[0]) && isset($this->backtrace[0]['object'])) {
unset($this->backtrace[0]['object']);
}
}
if ($mode & PEAR_ERROR_CALLBACK) {
$this->level = E_USER_NOTICE;
$this->callback = $options;
} else {
if ($options === null) {
$options = E_USER_NOTICE;
}
$this->level = $options;
$this->callback = null;
}
if ($this->mode & PEAR_ERROR_PRINT) {
if (is_null($options) || is_int($options)) {
$format = "%s";
} else {
$format = $options;
}
printf($format, $this->getMessage());
}
if ($this->mode & PEAR_ERROR_TRIGGER) {
trigger_error($this->getMessage(), $this->level);
}
if ($this->mode & PEAR_ERROR_DIE) {
$msg = $this->getMessage();
if (is_null($options) || is_int($options)) {
$format = "%s";
if (substr($msg, -1) != "\n") {
$msg .= "\n";
}
} else {
$format = $options;
}
die(sprintf($format, $msg));
}
if ($this->mode & PEAR_ERROR_CALLBACK) {
if (is_callable($this->callback)) {
call_user_func($this->callback, $this);
}
}
if ($this->mode & PEAR_ERROR_EXCEPTION) {
trigger_error("PEAR_ERROR_EXCEPTION is obsolete, use class PEAR_Exception for exceptions", E_USER_WARNING);
eval('$e = new Exception($this->message, $this->code);throw($e);');
}
}
 
// }}}
// {{{ getMode()
 
/**
* Get the error mode from an error object.
*
* @return int error mode
* @access public
*/
function getMode() {
return $this->mode;
}
 
// }}}
// {{{ getCallback()
 
/**
* Get the callback function/method from an error object.
*
* @return mixed callback function or object/method array
* @access public
*/
function getCallback() {
return $this->callback;
}
 
// }}}
// {{{ getMessage()
 
 
/**
* Get the error message from an error object.
*
* @return string full error message
* @access public
*/
function getMessage()
{
return ($this->error_message_prefix . $this->message);
}
 
 
// }}}
// {{{ getCode()
 
/**
* Get error code from an error object
*
* @return int error code
* @access public
*/
function getCode()
{
return $this->code;
}
 
// }}}
// {{{ getType()
 
/**
* Get the name of this error/exception.
*
* @return string error/exception name (type)
* @access public
*/
function getType()
{
return get_class($this);
}
 
// }}}
// {{{ getUserInfo()
 
/**
* Get additional user-supplied information.
*
* @return string user-supplied information
* @access public
*/
function getUserInfo()
{
return $this->userinfo;
}
 
// }}}
// {{{ getDebugInfo()
 
/**
* Get additional debug information supplied by the application.
*
* @return string debug information
* @access public
*/
function getDebugInfo()
{
return $this->getUserInfo();
}
 
// }}}
// {{{ getBacktrace()
 
/**
* Get the call backtrace from where the error was generated.
* Supported with PHP 4.3.0 or newer.
*
* @param int $frame (optional) what frame to fetch
* @return array Backtrace, or NULL if not available.
* @access public
*/
function getBacktrace($frame = null)
{
if (defined('PEAR_IGNORE_BACKTRACE')) {
return null;
}
if ($frame === null) {
return $this->backtrace;
}
return $this->backtrace[$frame];
}
 
// }}}
// {{{ addUserInfo()
 
function addUserInfo($info)
{
if (empty($this->userinfo)) {
$this->userinfo = $info;
} else {
$this->userinfo .= " ** $info";
}
}
 
// }}}
// {{{ toString()
 
/**
* Make a string representation of this object.
*
* @return string a string with an object summary
* @access public
*/
function toString() {
$modes = array();
$levels = array(E_USER_NOTICE => 'notice',
E_USER_WARNING => 'warning',
E_USER_ERROR => 'error');
if ($this->mode & PEAR_ERROR_CALLBACK) {
if (is_array($this->callback)) {
$callback = (is_object($this->callback[0]) ?
strtolower(get_class($this->callback[0])) :
$this->callback[0]) . '::' .
$this->callback[1];
} else {
$callback = $this->callback;
}
return sprintf('[%s: message="%s" code=%d mode=callback '.
'callback=%s prefix="%s" info="%s"]',
strtolower(get_class($this)), $this->message, $this->code,
$callback, $this->error_message_prefix,
$this->userinfo);
}
if ($this->mode & PEAR_ERROR_PRINT) {
$modes[] = 'print';
}
if ($this->mode & PEAR_ERROR_TRIGGER) {
$modes[] = 'trigger';
}
if ($this->mode & PEAR_ERROR_DIE) {
$modes[] = 'die';
}
if ($this->mode & PEAR_ERROR_RETURN) {
$modes[] = 'return';
}
return sprintf('[%s: message="%s" code=%d mode=%s level=%s '.
'prefix="%s" info="%s"]',
strtolower(get_class($this)), $this->message, $this->code,
implode("|", $modes), $levels[$this->level],
$this->error_message_prefix,
$this->userinfo);
}
 
// }}}
}
 
/*
* Local Variables:
* mode: php
* tab-width: 4
* c-basic-offset: 4
* End:
*/
?>
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/bibliotheque/pear/Pager/Common.php
New file
0,0 → 1,1539
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
 
/**
* Contains the Pager_Common class
*
* PHP versions 4 and 5
*
* LICENSE: Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @category HTML
* @package Pager
* @author Lorenzo Alberton <l dot alberton at quipo dot it>
* @author Richard Heyes <richard@phpguru.org>
* @copyright 2003-2006 Lorenzo Alberton, Richard Heyes
* @license http://www.debian.org/misc/bsd.license BSD License (3 Clause)
* @version CVS: $Id$
* @link http://pear.php.net/package/Pager
*/
 
/**
* Two constants used to guess the path- and file-name of the page
* when the user doesn't set any other value
*/
if (substr($_SERVER['PHP_SELF'], -1) == '/') {
$http = !empty($_SERVER['HTTPS']) ? 'https://' : 'http://';
define('CURRENT_FILENAME', '');
define('CURRENT_PATHNAME', $http.$_SERVER['HTTP_HOST'].str_replace('\\', '/', $_SERVER['PHP_SELF']));
} else {
define('CURRENT_FILENAME', preg_replace('/(.*)\?.*/', '\\1', basename($_SERVER['PHP_SELF'])));
define('CURRENT_PATHNAME', str_replace('\\', '/', dirname($_SERVER['PHP_SELF'])));
}
/**
* Error codes
*/
define('PAGER_OK', 0);
define('ERROR_PAGER', -1);
define('ERROR_PAGER_INVALID', -2);
define('ERROR_PAGER_INVALID_PLACEHOLDER', -3);
define('ERROR_PAGER_INVALID_USAGE', -4);
define('ERROR_PAGER_NOT_IMPLEMENTED', -5);
 
/**
* Pager_Common - Common base class for [Sliding|Jumping] Window Pager
* Extend this class to write a custom paging class
*
* @category HTML
* @package Pager
* @author Lorenzo Alberton <l dot alberton at quipo dot it>
* @author Richard Heyes <richard@phpguru.org>
* @copyright 2003-2005 Lorenzo Alberton, Richard Heyes
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @link http://pear.php.net/package/Pager
*/
class Pager_Common
{
// {{{ class vars
 
/**
* @var integer number of items
* @access private
*/
var $_totalItems;
 
/**
* @var integer number of items per page
* @access private
*/
var $_perPage = 10;
 
/**
* @var integer number of page links for each window
* @access private
*/
var $_delta = 10;
 
/**
* @var integer current page number
* @access private
*/
var $_currentPage = 1;
 
/**
* @var integer total pages number
* @access private
*/
var $_totalPages = 1;
 
/**
* @var string CSS class for links
* @access private
*/
var $_linkClass = '';
 
/**
* @var string wrapper for CSS class name
* @access private
*/
var $_classString = '';
 
/**
* @var string path name
* @access private
*/
var $_path = CURRENT_PATHNAME;
 
/**
* @var string file name
* @access private
*/
var $_fileName = CURRENT_FILENAME;
/**
* @var boolean If false, don't override the fileName option. Use at your own risk.
* @access private
*/
var $_fixFileName = true;
 
/**
* @var boolean you have to use FALSE with mod_rewrite
* @access private
*/
var $_append = true;
 
/**
* @var string specifies which HTTP method to use
* @access private
*/
var $_httpMethod = 'GET';
/**
* @var string specifies which HTML form to use
* @access private
*/
var $_formID = '';
 
/**
* @var boolean whether or not to import submitted data
* @access private
*/
var $_importQuery = true;
 
/**
* @var string name of the querystring var for pageID
* @access private
*/
var $_urlVar = 'pageID';
 
/**
* @var array data to pass through the link
* @access private
*/
var $_linkData = array();
 
/**
* @var array additional URL vars
* @access private
*/
var $_extraVars = array();
/**
* @var array URL vars to ignore
* @access private
*/
var $_excludeVars = array();
 
/**
* @var boolean TRUE => expanded mode (for Pager_Sliding)
* @access private
*/
var $_expanded = true;
/**
* @var boolean TRUE => show accesskey attribute on <a> tags
* @access private
*/
var $_accesskey = false;
 
/**
* @var string extra attributes for the <a> tag
* @access private
*/
var $_attributes = '';
/**
* @var string onclick
* @access private
*/
var $_onclick = '';
 
/**
* @var string alt text for "first page" (use "%d" placeholder for page number)
* @access private
*/
var $_altFirst = 'first page';
 
/**
* @var string alt text for "previous page"
* @access private
*/
var $_altPrev = 'previous page';
 
/**
* @var string alt text for "next page"
* @access private
*/
var $_altNext = 'next page';
 
/**
* @var string alt text for "last page" (use "%d" placeholder for page number)
* @access private
*/
var $_altLast = 'last page';
 
/**
* @var string alt text for "page"
* @access private
*/
var $_altPage = 'page';
 
/**
* @var string image/text to use as "prev" link
* @access private
*/
var $_prevImg = '&lt;&lt; Back';
 
/**
* @var string image/text to use as "next" link
* @access private
*/
var $_nextImg = 'Next &gt;&gt;';
 
/**
* @var string link separator
* @access private
*/
var $_separator = '';
 
/**
* @var integer number of spaces before separator
* @access private
*/
var $_spacesBeforeSeparator = 0;
 
/**
* @var integer number of spaces after separator
* @access private
*/
var $_spacesAfterSeparator = 1;
 
/**
* @var string CSS class name for current page link
* @access private
*/
var $_curPageLinkClassName = '';
 
/**
* @var string Text before current page link
* @access private
*/
var $_curPageSpanPre = '';
 
/**
* @var string Text after current page link
* @access private
*/
var $_curPageSpanPost = '';
 
/**
* @var string Text before first page link
* @access private
*/
var $_firstPagePre = '[';
 
/**
* @var string Text to be used for first page link
* @access private
*/
var $_firstPageText = '';
 
/**
* @var string Text after first page link
* @access private
*/
var $_firstPagePost = ']';
 
/**
* @var string Text before last page link
* @access private
*/
var $_lastPagePre = '[';
 
/**
* @var string Text to be used for last page link
* @access private
*/
var $_lastPageText = '';
 
/**
* @var string Text after last page link
* @access private
*/
var $_lastPagePost = ']';
 
/**
* @var string Will contain the HTML code for the spaces
* @access private
*/
var $_spacesBefore = '';
 
/**
* @var string Will contain the HTML code for the spaces
* @access private
*/
var $_spacesAfter = '';
 
/**
* @var string $_firstLinkTitle
* @access private
*/
var $_firstLinkTitle = 'first page';
 
/**
* @var string $_nextLinkTitle
* @access private
*/
var $_nextLinkTitle = 'next page';
 
/**
* @var string $_prevLinkTitle
* @access private
*/
var $_prevLinkTitle = 'previous page';
 
/**
* @var string $_lastLinkTitle
* @access private
*/
var $_lastLinkTitle = 'last page';
 
/**
* @var string Text to be used for the 'show all' option in the select box
* @access private
*/
var $_showAllText = '';
 
/**
* @var array data to be paged
* @access private
*/
var $_itemData = null;
 
/**
* @var boolean If TRUE and there's only one page, links aren't shown
* @access private
*/
var $_clearIfVoid = true;
 
/**
* @var boolean Use session for storing the number of items per page
* @access private
*/
var $_useSessions = false;
 
/**
* @var boolean Close the session when finished reading/writing data
* @access private
*/
var $_closeSession = false;
 
/**
* @var string name of the session var for number of items per page
* @access private
*/
var $_sessionVar = 'setPerPage';
 
/**
* Pear error mode (when raiseError is called)
* (see PEAR doc)
*
* @var int $_pearErrorMode
* @access private
*/
var $_pearErrorMode = null;
 
// }}}
// {{{ public vars
 
/**
* @var string Complete set of links
* @access public
*/
var $links = '';
 
/**
* @var string Complete set of link tags
* @access public
*/
var $linkTags = '';
 
/**
* @var array Array with a key => value pair representing
* page# => bool value (true if key==currentPageNumber).
* can be used for extreme customization.
* @access public
*/
var $range = array();
/**
* @var array list of available options (safety check)
* @access private
*/
var $_allowed_options = array(
'totalItems',
'perPage',
'delta',
'linkClass',
'path',
'fileName',
'fixFileName',
'append',
'httpMethod',
'formID',
'importQuery',
'urlVar',
'altFirst',
'altPrev',
'altNext',
'altLast',
'altPage',
'prevImg',
'nextImg',
'expanded',
'accesskey',
'attributes',
'onclick',
'separator',
'spacesBeforeSeparator',
'spacesAfterSeparator',
'curPageLinkClassName',
'curPageSpanPre',
'curPageSpanPost',
'firstPagePre',
'firstPageText',
'firstPagePost',
'lastPagePre',
'lastPageText',
'lastPagePost',
'firstLinkTitle',
'nextLinkTitle',
'prevLinkTitle',
'lastLinkTitle',
'showAllText',
'itemData',
'clearIfVoid',
'useSessions',
'closeSession',
'sessionVar',
'pearErrorMode',
'extraVars',
'excludeVars',
'currentPage',
);
 
// }}}
// {{{ build()
 
/**
* Generate or refresh the links and paged data after a call to setOptions()
*
* @access public
*/
function build()
{
//reset
$this->_pageData = array();
$this->links = '';
 
$this->_generatePageData();
$this->_setFirstLastText();
 
if ($this->_totalPages > (2 * $this->_delta + 1)) {
$this->links .= $this->_printFirstPage();
}
 
$this->links .= $this->_getBackLink();
$this->links .= $this->_getPageLinks();
$this->links .= $this->_getNextLink();
 
$this->linkTags .= $this->_getFirstLinkTag();
$this->linkTags .= $this->_getPrevLinkTag();
$this->linkTags .= $this->_getNextLinkTag();
$this->linkTags .= $this->_getLastLinkTag();
 
if ($this->_totalPages > (2 * $this->_delta + 1)) {
$this->links .= $this->_printLastPage();
}
}
 
// }}}
// {{{ getPageData()
 
/**
* Returns an array of current pages data
*
* @param $pageID Desired page ID (optional)
* @return array Page data
* @access public
*/
function getPageData($pageID = null)
{
$pageID = empty($pageID) ? $this->_currentPage : $pageID;
 
if (!isset($this->_pageData)) {
$this->_generatePageData();
}
if (!empty($this->_pageData[$pageID])) {
return $this->_pageData[$pageID];
}
return array();
}
 
// }}}
// {{{ getPageIdByOffset()
 
/**
* Returns pageID for given offset
*
* @param $index Offset to get pageID for
* @return int PageID for given offset
*/
function getPageIdByOffset($index)
{
$msg = '<b>PEAR::Pager Error:</b>'
.' function "getPageIdByOffset()" not implemented.';
return $this->raiseError($msg, ERROR_PAGER_NOT_IMPLEMENTED);
}
 
// }}}
// {{{ getOffsetByPageId()
 
/**
* Returns offsets for given pageID. Eg, if you
* pass it pageID one and your perPage limit is 10
* it will return (1, 10). PageID of 2 would
* give you (11, 20).
*
* @param integer PageID to get offsets for
* @return array First and last offsets
* @access public
*/
function getOffsetByPageId($pageid = null)
{
$pageid = isset($pageid) ? $pageid : $this->_currentPage;
if (!isset($this->_pageData)) {
$this->_generatePageData();
}
 
if (isset($this->_pageData[$pageid]) || is_null($this->_itemData)) {
return array(
max(($this->_perPage * ($pageid - 1)) + 1, 1),
min($this->_totalItems, $this->_perPage * $pageid)
);
} else {
return array(0, 0);
}
}
 
// }}}
// {{{ getPageRangeByPageId()
 
/**
* @param integer PageID to get offsets for
* @return array First and last offsets
*/
function getPageRangeByPageId($pageID)
{
$msg = '<b>PEAR::Pager Error:</b>'
.' function "getPageRangeByPageId()" not implemented.';
return $this->raiseError($msg, ERROR_PAGER_NOT_IMPLEMENTED);
}
 
// }}}
// {{{ getLinks()
 
/**
* Returns back/next/first/last and page links,
* both as ordered and associative array.
*
* NB: in original PEAR::Pager this method accepted two parameters,
* $back_html and $next_html. Now the only parameter accepted is
* an integer ($pageID), since the html text for prev/next links can
* be set in the factory. If a second parameter is provided, then
* the method act as it previously did. This hack was done to mantain
* backward compatibility only.
*
* @param integer $pageID Optional pageID. If specified, links
* for that page are provided instead of current one. [ADDED IN NEW PAGER VERSION]
* @param string $next_html HTML to put inside the next link [deprecated: use the factory instead]
* @return array back/next/first/last and page links
*/
function getLinks($pageID=null, $next_html='')
{
$msg = '<b>PEAR::Pager Error:</b>'
.' function "getLinks()" not implemented.';
return $this->raiseError($msg, ERROR_PAGER_NOT_IMPLEMENTED);
}
 
// }}}
// {{{ getCurrentPageID()
 
/**
* Returns ID of current page
*
* @return integer ID of current page
*/
function getCurrentPageID()
{
return $this->_currentPage;
}
 
// }}}
// {{{ getNextPageID()
 
/**
* Returns next page ID. If current page is last page
* this function returns FALSE
*
* @return mixed Next page ID
*/
function getNextPageID()
{
return ($this->getCurrentPageID() == $this->numPages() ? false : $this->getCurrentPageID() + 1);
}
 
// }}}
// {{{ getPreviousPageID()
 
/**
* Returns previous page ID. If current page is first page
* this function returns FALSE
*
* @return mixed Previous pages' ID
*/
function getPreviousPageID()
{
return $this->isFirstPage() ? false : $this->getCurrentPageID() - 1;
}
 
// }}}
// {{{ numItems()
 
/**
* Returns number of items
*
* @return int Number of items
*/
function numItems()
{
return $this->_totalItems;
}
 
// }}}
// {{{ numPages()
 
/**
* Returns number of pages
*
* @return int Number of pages
*/
function numPages()
{
return (int)$this->_totalPages;
}
 
// }}}
// {{{ isFirstPage()
 
/**
* Returns whether current page is first page
*
* @return bool First page or not
*/
function isFirstPage()
{
return ($this->_currentPage < 2);
}
 
// }}}
// {{{ isLastPage()
 
/**
* Returns whether current page is last page
*
* @return bool Last page or not
*/
function isLastPage()
{
return ($this->_currentPage == $this->_totalPages);
}
 
// }}}
// {{{ isLastPageComplete()
 
/**
* Returns whether last page is complete
*
* @return bool Last age complete or not
*/
function isLastPageComplete()
{
return !($this->_totalItems % $this->_perPage);
}
 
// }}}
// {{{ _generatePageData()
 
/**
* Calculates all page data
* @access private
*/
function _generatePageData()
{
// Been supplied an array of data?
if (!is_null($this->_itemData)) {
$this->_totalItems = count($this->_itemData);
}
$this->_totalPages = ceil((float)$this->_totalItems / (float)$this->_perPage);
$i = 1;
if (!empty($this->_itemData)) {
foreach ($this->_itemData as $key => $value) {
$this->_pageData[$i][$key] = $value;
if (count($this->_pageData[$i]) >= $this->_perPage) {
$i++;
}
}
} else {
$this->_pageData = array();
}
 
//prevent URL modification
$this->_currentPage = min($this->_currentPage, $this->_totalPages);
}
 
// }}}
// {{{ _renderLink()
 
/**
* Renders a link using the appropriate method
*
* @param altText Alternative text for this link (title property)
* @param linkText Text contained by this link
* @return string The link in string form
* @access private
*/
function _renderLink($altText, $linkText)
{
if ($this->_httpMethod == 'GET') {
if ($this->_append) {
$href = '?' . $this->_http_build_query_wrapper($this->_linkData);
} else {
$href = str_replace('%d', $this->_linkData[$this->_urlVar], $this->_fileName);
}
$onclick = '';
if (array_key_exists($this->_urlVar, $this->_linkData)) {
$onclick = str_replace('%d', $this->_linkData[$this->_urlVar], $this->_onclick);
}
return sprintf('<a href="%s"%s%s%s%s title="%s">%s</a>',
htmlentities($this->_url . $href),
empty($this->_classString) ? '' : ' '.$this->_classString,
empty($this->_attributes) ? '' : ' '.$this->_attributes,
empty($this->_accesskey) ? '' : ' accesskey="'.$this->_linkData[$this->_urlVar].'"',
empty($onclick) ? '' : ' onclick="'.$onclick.'"',
$altText,
$linkText
);
} elseif ($this->_httpMethod == 'POST') {
return sprintf("<a href='javascript:void(0)' onclick='%s'%s%s%s title='%s'>%s</a>",
$this->_generateFormOnClick($this->_url, $this->_linkData),
empty($this->_classString) ? '' : ' '.$this->_classString,
empty($this->_attributes) ? '' : ' '.$this->_attributes,
empty($this->_accesskey) ? '' : ' accesskey=\''.$this->_linkData[$this->_urlVar].'\'',
$altText,
$linkText
);
}
return '';
}
 
// }}}
// {{{ _generateFormOnClick()
 
/**
* Mimics http_build_query() behavior in the way the data
* in $data will appear when it makes it back to the server.
* For example:
* $arr = array('array' => array(array('hello', 'world'),
* 'things' => array('stuff', 'junk'));
* http_build_query($arr)
* and _generateFormOnClick('foo.php', $arr)
* will yield
* $_REQUEST['array'][0][0] === 'hello'
* $_REQUEST['array'][0][1] === 'world'
* $_REQUEST['array']['things'][0] === 'stuff'
* $_REQUEST['array']['things'][1] === 'junk'
*
* However, instead of generating a query string, it generates
* Javascript to create and submit a form.
*
* @param string $formAction where the form should be submitted
* @param array $data the associative array of names and values
* @return string A string of javascript that generates a form and submits it
* @access private
*/
function _generateFormOnClick($formAction, $data)
{
// Check we have an array to work with
if (!is_array($data)) {
trigger_error(
'_generateForm() Parameter 1 expected to be Array or Object. Incorrect value given.',
E_USER_WARNING
);
return false;
}
 
if (!empty($this->_formID)) {
$str = 'var form = document.getElementById("'.$this->_formID.'"); var input = ""; ';
} else {
$str = 'var form = document.createElement("form"); var input = ""; ';
}
// We /shouldn't/ need to escape the URL ...
$str .= sprintf('form.action = "%s"; ', htmlentities($formAction));
$str .= sprintf('form.method = "%s"; ', $this->_httpMethod);
foreach ($data as $key => $val) {
$str .= $this->_generateFormOnClickHelper($val, $key);
}
 
if (empty($this->_formID)) {
$str .= 'document.getElementsByTagName("body")[0].appendChild(form);';
}
$str .= 'form.submit(); return false;';
return $str;
}
 
// }}}
// {{{ _generateFormOnClickHelper
 
/**
* This is used by _generateFormOnClick().
* Recursively processes the arrays, objects, and literal values.
*
* @param data Data that should be rendered
* @param prev The name so far
* @return string A string of Javascript that creates form inputs
* representing the data
* @access private
*/
function _generateFormOnClickHelper($data, $prev = '')
{
$str = '';
if (is_array($data) || is_object($data)) {
// foreach key/visible member
foreach ((array)$data as $key => $val) {
// append [$key] to prev
$tempKey = sprintf('%s[%s]', $prev, $key);
$str .= $this->_generateFormOnClickHelper($val, $tempKey);
}
} else { // must be a literal value
// escape newlines and carriage returns
$search = array("\n", "\r");
$replace = array('\n', '\n');
$escapedData = str_replace($search, $replace, $data);
// am I forgetting any dangerous whitespace?
// would a regex be faster?
// if it's already encoded, don't encode it again
if (!$this->_isEncoded($escapedData)) {
$escapedData = urlencode($escapedData);
}
$escapedData = htmlentities($escapedData, ENT_QUOTES, 'UTF-8');
 
$str .= 'input = document.createElement("input"); ';
$str .= 'input.type = "hidden"; ';
$str .= sprintf('input.name = "%s"; ', $prev);
$str .= sprintf('input.value = "%s"; ', $escapedData);
$str .= 'form.appendChild(input); ';
}
return $str;
}
 
// }}}
// {{{ _getLinksData()
 
/**
* Returns the correct link for the back/pages/next links
*
* @return array Data
* @access private
*/
function _getLinksData()
{
$qs = array();
if ($this->_importQuery) {
if ($this->_httpMethod == 'POST') {
$qs = $_POST;
} elseif ($this->_httpMethod == 'GET') {
$qs = $_GET;
}
}
foreach ($this->_excludeVars as $exclude) {
if (array_key_exists($exclude, $qs)) {
unset($qs[$exclude]);
}
}
if (count($this->_extraVars)){
$this->_recursive_urldecode($this->_extraVars);
$qs = array_merge($qs, $this->_extraVars);
}
if (count($qs) && get_magic_quotes_gpc()){
$this->_recursive_stripslashes($qs);
}
return $qs;
}
 
// }}}
// {{{ _recursive_stripslashes()
/**
* Helper method
* @param mixed $var
* @access private
*/
function _recursive_stripslashes(&$var)
{
if (is_array($var)) {
foreach (array_keys($var) as $k) {
$this->_recursive_stripslashes($var[$k]);
}
} else {
$var = stripslashes($var);
}
}
 
// }}}
// {{{ _recursive_urldecode()
 
/**
* Helper method
* @param mixed $var
* @access private
*/
function _recursive_urldecode(&$var)
{
if (is_array($var)) {
foreach (array_keys($var) as $k) {
$this->_recursive_urldecode($var[$k]);
}
} else {
$trans_tbl = array_flip(get_html_translation_table(HTML_ENTITIES));
$var = strtr($var, $trans_tbl);
}
}
 
// }}}
// {{{ _getBackLink()
 
/**
* Returns back link
*
* @param $url URL to use in the link [deprecated: use the factory instead]
* @param $link HTML to use as the link [deprecated: use the factory instead]
* @return string The link
* @access private
*/
function _getBackLink($url='', $link='')
{
//legacy settings... the preferred way to set an option
//now is passing it to the factory
if (!empty($url)) {
$this->_path = $url;
}
if (!empty($link)) {
$this->_prevImg = $link;
}
$back = '';
if ($this->_currentPage > 1) {
$this->_linkData[$this->_urlVar] = $this->getPreviousPageID();
$back = $this->_renderLink($this->_altPrev, $this->_prevImg)
. $this->_spacesBefore . $this->_spacesAfter;
}
return $back;
}
 
// }}}
// {{{ _getPageLinks()
 
/**
* Returns pages link
*
* @param $url URL to use in the link [deprecated: use the factory instead]
* @return string Links
* @access private
*/
function _getPageLinks($url='')
{
$msg = '<b>PEAR::Pager Error:</b>'
.' function "_getPageLinks()" not implemented.';
return $this->raiseError($msg, ERROR_PAGER_NOT_IMPLEMENTED);
}
 
// }}}
// {{{ _getNextLink()
 
/**
* Returns next link
*
* @param $url URL to use in the link [deprecated: use the factory instead]
* @param $link HTML to use as the link [deprecated: use the factory instead]
* @return string The link
* @access private
*/
function _getNextLink($url='', $link='')
{
//legacy settings... the preferred way to set an option
//now is passing it to the factory
if (!empty($url)) {
$this->_path = $url;
}
if (!empty($link)) {
$this->_nextImg = $link;
}
$next = '';
if ($this->_currentPage < $this->_totalPages) {
$this->_linkData[$this->_urlVar] = $this->getNextPageID();
$next = $this->_spacesAfter
. $this->_renderLink($this->_altNext, $this->_nextImg)
. $this->_spacesBefore . $this->_spacesAfter;
}
return $next;
}
 
// }}}
// {{{ _getFirstLinkTag()
 
/**
* @return string
* @access private
*/
function _getFirstLinkTag()
{
if ($this->isFirstPage() || ($this->_httpMethod != 'GET')) {
return '';
}
return sprintf('<link rel="first" href="%s" title="%s" />'."\n",
$this->_getLinkTagUrl(1),
$this->_firstLinkTitle
);
}
 
// }}}
// {{{ _getPrevLinkTag()
 
/**
* Returns previous link tag
*
* @return string the link tag
* @access private
*/
function _getPrevLinkTag()
{
if ($this->isFirstPage() || ($this->_httpMethod != 'GET')) {
return '';
}
return sprintf('<link rel="previous" href="%s" title="%s" />'."\n",
$this->_getLinkTagUrl($this->getPreviousPageID()),
$this->_prevLinkTitle
);
}
 
// }}}
// {{{ _getNextLinkTag()
 
/**
* Returns next link tag
*
* @return string the link tag
* @access private
*/
function _getNextLinkTag()
{
if ($this->isLastPage() || ($this->_httpMethod != 'GET')) {
return '';
}
return sprintf('<link rel="next" href="%s" title="%s" />'."\n",
$this->_getLinkTagUrl($this->getNextPageID()),
$this->_nextLinkTitle
);
}
 
// }}}
// {{{ _getLastLinkTag()
 
/**
* @return string the link tag
* @access private
*/
function _getLastLinkTag()
{
if ($this->isLastPage() || ($this->_httpMethod != 'GET')) {
return '';
}
return sprintf('<link rel="last" href="%s" title="%s" />'."\n",
$this->_getLinkTagUrl($this->_totalPages),
$this->_lastLinkTitle
);
}
 
// }}}
// {{{ _getLinkTagUrl()
 
/**
* Helper method
* @return string the link tag url
* @access private
*/
function _getLinkTagUrl($pageID)
{
$this->_linkData[$this->_urlVar] = $pageID;
if ($this->_append) {
$href = '?' . $this->_http_build_query_wrapper($this->_linkData);
} else {
$href = str_replace('%d', $this->_linkData[$this->_urlVar], $this->_fileName);
}
return htmlentities($this->_url . $href);
}
// }}}
// {{{ getPerPageSelectBox()
 
/**
* Returns a string with a XHTML SELECT menu,
* useful for letting the user choose how many items per page should be
* displayed. If parameter useSessions is TRUE, this value is stored in
* a session var. The string isn't echoed right now so you can use it
* with template engines.
*
* @param integer $start
* @param integer $end
* @param integer $step
* @param boolean $showAllData If true, perPage is set equal to totalItems.
* @param array (or string $optionText for BC reasons)
* - 'optionText': text to show in each option.
* Use '%d' where you want to see the number of pages selected.
* - 'attributes': (html attributes) Tag attributes or
* HTML attributes (id="foo" pairs), will be inserted in the
* <select> tag
* @return string xhtml select box
* @access public
*/
function getPerPageSelectBox($start=5, $end=30, $step=5, $showAllData=false, $extraParams=array())
{
require_once 'Pager/HtmlWidgets.php';
$widget =& new Pager_HtmlWidgets($this);
return $widget->getPerPageSelectBox($start, $end, $step, $showAllData, $extraParams);
}
 
// }}}
// {{{ getPageSelectBox()
 
/**
* Returns a string with a XHTML SELECT menu with the page numbers,
* useful as an alternative to the links
*
* @param array - 'optionText': text to show in each option.
* Use '%d' where you want to see the number of pages selected.
* - 'autoSubmit': if TRUE, add some js code to submit the
* form on the onChange event
* @param string $extraAttributes (html attributes) Tag attributes or
* HTML attributes (id="foo" pairs), will be inserted in the
* <select> tag
* @return string xhtml select box
* @access public
*/
function getPageSelectBox($params = array(), $extraAttributes = '')
{
require_once 'Pager/HtmlWidgets.php';
$widget =& new Pager_HtmlWidgets($this);
return $widget->getPageSelectBox($params, $extraAttributes);
}
 
// }}}
// {{{ _printFirstPage()
 
/**
* Print [1]
*
* @return string String with link to 1st page,
* or empty string if this is the 1st page.
* @access private
*/
function _printFirstPage()
{
if ($this->isFirstPage()) {
return '';
}
$this->_linkData[$this->_urlVar] = 1;
return $this->_renderLink(
str_replace('%d', 1, $this->_altFirst),
$this->_firstPagePre . $this->_firstPageText . $this->_firstPagePost
) . $this->_spacesBefore . $this->_spacesAfter;
}
 
// }}}
// {{{ _printLastPage()
 
/**
* Print [numPages()]
*
* @return string String with link to last page,
* or empty string if this is the 1st page.
* @access private
*/
function _printLastPage()
{
if ($this->isLastPage()) {
return '';
}
$this->_linkData[$this->_urlVar] = $this->_totalPages;
return $this->_renderLink(
str_replace('%d', $this->_totalPages, $this->_altLast),
$this->_lastPagePre . $this->_lastPageText . $this->_lastPagePost
);
}
 
// }}}
// {{{ _setFirstLastText()
 
/**
* sets the private _firstPageText, _lastPageText variables
* based on whether they were set in the options
*
* @access private
*/
function _setFirstLastText()
{
if ($this->_firstPageText == '') {
$this->_firstPageText = '1';
}
if ($this->_lastPageText == '') {
$this->_lastPageText = $this->_totalPages;
}
}
 
// }}}
// {{{ _http_build_query_wrapper()
/**
* This is a slightly modified version of the http_build_query() function;
* it heavily borrows code from PHP_Compat's http_build_query().
* The main change is the usage of htmlentities instead of urlencode,
* since it's too aggressive
*
* @author Stephan Schmidt <schst@php.net>
* @author Aidan Lister <aidan@php.net>
* @author Lorenzo Alberton <l dot alberton at quipo dot it>
* @param array $data
* @return string
* @access private
*/
function _http_build_query_wrapper($data)
{
$data = (array)$data;
if (empty($data)) {
return '';
}
$separator = ini_get('arg_separator.output');
if ($separator == '&amp;') {
$separator = '&'; //the string is escaped by htmlentities anyway...
}
$tmp = array ();
foreach ($data as $key => $val) {
if (is_scalar($val)) {
//array_push($tmp, $key.'='.$val);
$val = urlencode($val);
array_push($tmp, $key .'='. str_replace('%2F', '/', $val));
continue;
}
// If the value is an array, recursively parse it
if (is_array($val)) {
array_push($tmp, $this->__http_build_query($val, htmlentities($key)));
continue;
}
}
return implode($separator, $tmp);
}
 
// }}}
// {{{ __http_build_query()
 
/**
* Helper function
* @author Stephan Schmidt <schst@php.net>
* @author Aidan Lister <aidan@php.net>
* @access private
*/
function __http_build_query($array, $name)
{
$tmp = array ();
$separator = ini_get('arg_separator.output');
if ($separator == '&amp;') {
$separator = '&'; //the string is escaped by htmlentities anyway...
}
foreach ($array as $key => $value) {
if (is_array($value)) {
//array_push($tmp, $this->__http_build_query($value, sprintf('%s[%s]', $name, $key)));
array_push($tmp, $this->__http_build_query($value, $name.'%5B'.$key.'%5D'));
} elseif (is_scalar($value)) {
//array_push($tmp, sprintf('%s[%s]=%s', $name, htmlentities($key), htmlentities($value)));
array_push($tmp, $name.'%5B'.htmlentities($key).'%5D='.htmlentities($value));
} elseif (is_object($value)) {
//array_push($tmp, $this->__http_build_query(get_object_vars($value), sprintf('%s[%s]', $name, $key)));
array_push($tmp, $this->__http_build_query(get_object_vars($value), $name.'%5B'.$key.'%5D'));
}
}
return implode($separator, $tmp);
}
 
// }}}
// {{{ _isEncoded()
 
/**
* Helper function
* Check if a string is an encoded multibyte string
* @param string $string
* @return boolean
* @access private
*/
function _isEncoded($string)
{
$hexchar = '&#[\dA-Fx]{2,};';
return preg_match("/^(\s|($hexchar))*$/Uims", $string) ? true : false;
}
 
// }}}
// {{{ raiseError()
 
/**
* conditionally includes PEAR base class and raise an error
*
* @param string $msg Error message
* @param int $code Error code
* @access private
*/
function raiseError($msg, $code)
{
include_once 'PEAR.php';
if (empty($this->_pearErrorMode)) {
$this->_pearErrorMode = PEAR_ERROR_RETURN;
}
return PEAR::raiseError($msg, $code, $this->_pearErrorMode);
}
 
// }}}
// {{{ setOptions()
 
/**
* Set and sanitize options
*
* @param mixed $options An associative array of option names and
* their values.
* @return integer error code (PAGER_OK on success)
* @access public
*/
function setOptions($options)
{
foreach ($options as $key => $value) {
if (in_array($key, $this->_allowed_options) && (!is_null($value))) {
$this->{'_' . $key} = $value;
}
}
 
//autodetect http method
if (!isset($options['httpMethod'])
&& !isset($_GET[$this->_urlVar])
&& isset($_POST[$this->_urlVar])
) {
$this->_httpMethod = 'POST';
} else {
$this->_httpMethod = strtoupper($this->_httpMethod);
}
 
$this->_fileName = ltrim($this->_fileName, '/'); //strip leading slash
$this->_path = rtrim($this->_path, '/'); //strip trailing slash
 
if ($this->_append) {
if ($this->_fixFileName) {
$this->_fileName = CURRENT_FILENAME; //avoid possible user error;
}
$this->_url = $this->_path.'/'.$this->_fileName;
} else {
$this->_url = $this->_path;
if (strncasecmp($this->_fileName, 'javascript', 10) != 0) {
$this->_url .= '/';
}
if (strpos($this->_fileName, '%d') === false) {
trigger_error($this->errorMessage(ERROR_PAGER_INVALID_USAGE), E_USER_WARNING);
}
}
 
$this->_classString = '';
if (strlen($this->_linkClass)) {
$this->_classString = 'class="'.$this->_linkClass.'"';
}
 
if (strlen($this->_curPageLinkClassName)) {
$this->_curPageSpanPre = '<span class="'.$this->_curPageLinkClassName.'">';
$this->_curPageSpanPost = '</span>';
}
 
$this->_perPage = max($this->_perPage, 1); //avoid possible user errors
 
if ($this->_useSessions && !isset($_SESSION)) {
session_start();
}
if (!empty($_REQUEST[$this->_sessionVar])) {
$this->_perPage = max(1, (int)$_REQUEST[$this->_sessionVar]);
if ($this->_useSessions) {
$_SESSION[$this->_sessionVar] = $this->_perPage;
}
}
 
if (!empty($_SESSION[$this->_sessionVar])) {
$this->_perPage = $_SESSION[$this->_sessionVar];
}
 
if ($this->_closeSession) {
session_write_close();
}
 
$this->_spacesBefore = str_repeat('&nbsp;', $this->_spacesBeforeSeparator);
$this->_spacesAfter = str_repeat('&nbsp;', $this->_spacesAfterSeparator);
 
if (isset($_REQUEST[$this->_urlVar]) && empty($options['currentPage'])) {
$this->_currentPage = (int)$_REQUEST[$this->_urlVar];
}
$this->_currentPage = max($this->_currentPage, 1);
$this->_linkData = $this->_getLinksData();
 
return PAGER_OK;
}
 
// }}}
// {{{ getOption()
/**
* Return the current value of a given option
*
* @param string option name
* @return mixed option value
*/
function getOption($name)
{
if (!in_array($name, $this->_allowed_options)) {
$msg = '<b>PEAR::Pager Error:</b>'
.' invalid option: '.$name;
return $this->raiseError($msg, ERROR_PAGER_INVALID);
}
return $this->{'_' . $name};
}
 
// }}}
// {{{ getOptions()
 
/**
* Return an array with all the current pager options
*
* @return array list of all the pager options
*/
function getOptions()
{
$options = array();
foreach ($this->_allowed_options as $option) {
$options[$option] = $this->{'_' . $option};
}
return $options;
}
 
// }}}
// {{{ errorMessage()
 
/**
* Return a textual error message for a PAGER error code
*
* @param int $code error code
* @return string error message
* @access public
*/
function errorMessage($code)
{
static $errorMessages;
if (!isset($errorMessages)) {
$errorMessages = array(
ERROR_PAGER => 'unknown error',
ERROR_PAGER_INVALID => 'invalid',
ERROR_PAGER_INVALID_PLACEHOLDER => 'invalid format - use "%d" as placeholder.',
ERROR_PAGER_INVALID_USAGE => 'if $options[\'append\'] is set to false, '
.' $options[\'fileName\'] MUST contain the "%d" placeholder.',
ERROR_PAGER_NOT_IMPLEMENTED => 'not implemented'
);
}
 
return '<b>PEAR::Pager error:</b> '. (isset($errorMessages[$code]) ?
$errorMessages[$code] : $errorMessages[ERROR_PAGER]);
}
 
// }}}
}
?>
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/bibliotheque/pear/Pager/Jumping.php
New file
0,0 → 1,254
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
 
/**
* Contains the Pager_Jumping class
*
* PHP versions 4 and 5
*
* LICENSE: Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @category HTML
* @package Pager
* @author Lorenzo Alberton <l dot alberton at quipo dot it>
* @author Richard Heyes <richard@phpguru.org>,
* @copyright 2003-2006 Lorenzo Alberton, Richard Heyes
* @license http://www.debian.org/misc/bsd.license BSD License (3 Clause)
* @version CVS: $Id$
* @link http://pear.php.net/package/Pager
*/
 
/**
* require PEAR::Pager_Common base class
*/
require_once 'Pager/Common.php';
 
/**
* Pager_Jumping - Generic data paging class ("jumping window" style)
* Handles paging a set of data. For usage see the example.php provided.
*
* @category HTML
* @package Pager
* @author Lorenzo Alberton <l dot alberton at quipo dot it>
* @author Richard Heyes <richard@phpguru.org>,
* @copyright 2003-2005 Lorenzo Alberton, Richard Heyes
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @link http://pear.php.net/package/Pager
*/
class Pager_Jumping extends Pager_Common
{
// {{{ Pager_Jumping()
 
/**
* Constructor
*
* @param array $options An associative array of option names
* and their values
* @access public
*/
function Pager_Jumping($options = array())
{
$err = $this->setOptions($options);
if ($err !== PAGER_OK) {
return $this->raiseError($this->errorMessage($err), $err);
}
$this->build();
}
 
// }}}
// {{{ getPageIdByOffset()
 
/**
* Returns pageID for given offset
*
* @param $index Offset to get pageID for
* @return int PageID for given offset
*/
function getPageIdByOffset($index)
{
if (!isset($this->_pageData)) {
$this->_generatePageData();
}
 
if (($index % $this->_perPage) > 0) {
$pageID = ceil((float)$index / (float)$this->_perPage);
} else {
$pageID = $index / $this->_perPage;
}
return $pageID;
}
 
// }}}
// {{{ getPageRangeByPageId()
 
/**
* Given a PageId, it returns the limits of the range of pages displayed.
* While getOffsetByPageId() returns the offset of the data within the
* current page, this method returns the offsets of the page numbers interval.
* E.g., if you have pageId=3 and delta=10, it will return (1, 10).
* PageID of 8 would give you (1, 10) as well, because 1 <= 8 <= 10.
* PageID of 11 would give you (11, 20).
* If the method is called without parameter, pageID is set to currentPage#.
*
* @param integer PageID to get offsets for
* @return array First and last offsets
* @access public
*/
function getPageRangeByPageId($pageid = null)
{
$pageid = isset($pageid) ? (int)$pageid : $this->_currentPage;
if (isset($this->_pageData[$pageid]) || is_null($this->_itemData)) {
// I'm sure I'm missing something here, but this formula works
// so I'm using it until I find something simpler.
$start = ((($pageid + (($this->_delta - ($pageid % $this->_delta))) % $this->_delta) / $this->_delta) - 1) * $this->_delta +1;
return array(
max($start, 1),
min($start+$this->_delta-1, $this->_totalPages)
);
} else {
return array(0, 0);
}
}
 
// }}}
// {{{ getLinks()
 
/**
* Returns back/next/first/last and page links,
* both as ordered and associative array.
*
* NB: in original PEAR::Pager this method accepted two parameters,
* $back_html and $next_html. Now the only parameter accepted is
* an integer ($pageID), since the html text for prev/next links can
* be set in the constructor. If a second parameter is provided, then
* the method act as it previously did. This hack's only purpose is to
* mantain backward compatibility.
*
* @param integer $pageID Optional pageID. If specified, links
* for that page are provided instead of current one.
* [ADDED IN NEW PAGER VERSION]
* @param string $next_html HTML to put inside the next link
* [deprecated: use the constructor instead]
* @return array Back/pages/next links
*/
function getLinks($pageID=null, $next_html='')
{
//BC hack
if (!empty($next_html)) {
$back_html = $pageID;
$pageID = null;
} else {
$back_html = '';
}
 
if (!is_null($pageID)) {
$this->links = '';
if ($this->_totalPages > $this->_delta) {
$this->links .= $this->_printFirstPage();
}
 
$_sav = $this->_currentPage;
$this->_currentPage = $pageID;
 
$this->links .= $this->_getBackLink('', $back_html);
$this->links .= $this->_getPageLinks();
$this->links .= $this->_getNextLink('', $next_html);
if ($this->_totalPages > $this->_delta) {
$this->links .= $this->_printLastPage();
}
}
 
$back = str_replace('&nbsp;', '', $this->_getBackLink());
$next = str_replace('&nbsp;', '', $this->_getNextLink());
$pages = $this->_getPageLinks();
$first = $this->_printFirstPage();
$last = $this->_printLastPage();
$all = $this->links;
$linkTags = $this->linkTags;
 
if (!is_null($pageID)) {
$this->_currentPage = $_sav;
}
 
return array(
$back,
$pages,
trim($next),
$first,
$last,
$all,
$linkTags,
'back' => $back,
'pages' => $pages,
'next' => $next,
'first' => $first,
'last' => $last,
'all' => $all,
'linktags' => $linkTags
);
}
 
// }}}
// {{{ _getPageLinks()
 
/**
* Returns pages link
*
* @param $url URL to use in the link
* [deprecated: use the constructor instead]
* @return string Links
* @access private
*/
function _getPageLinks($url = '')
{
//legacy setting... the preferred way to set an option now
//is adding it to the constuctor
if (!empty($url)) {
$this->_path = $url;
}
 
//If there's only one page, don't display links
if ($this->_clearIfVoid && ($this->_totalPages < 2)) {
return '';
}
 
$links = '';
$limits = $this->getPageRangeByPageId($this->_currentPage);
 
for ($i=$limits[0]; $i<=min($limits[1], $this->_totalPages); $i++) {
if ($i != $this->_currentPage) {
$this->range[$i] = false;
$this->_linkData[$this->_urlVar] = $i;
$links .= $this->_renderLink($this->_altPage.' '.$i, $i);
} else {
$this->range[$i] = true;
$links .= $this->_curPageSpanPre . $i . $this->_curPageSpanPost;
}
$links .= $this->_spacesBefore
. (($i != $this->_totalPages) ? $this->_separator.$this->_spacesAfter : '');
}
return $links;
}
 
// }}}
}
?>
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/bibliotheque/pear/Pager/Sliding.php
New file
0,0 → 1,289
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
 
/**
* Contains the Pager_Sliding class
*
* PHP versions 4 and 5
*
* LICENSE: Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @category HTML
* @package Pager
* @author Lorenzo Alberton <l dot alberton at quipo dot it>
* @copyright 2003-2006 Lorenzo Alberton
* @license http://www.debian.org/misc/bsd.license BSD License (3 Clause)
* @version CVS: $Id$
* @link http://pear.php.net/package/Pager
*/
 
/**
* require PEAR::Pager_Common base class
*/
require_once dirname(__FILE__).'/Common.php';
 
/**
* Pager_Sliding - Generic data paging class ("sliding window" style)
* Usage examples can be found in the PEAR manual
*
* @category HTML
* @package Pager
* @author Lorenzo Alberton <l dot alberton at quipo dot it>
* @copyright 2003-2005 Lorenzo Alberton
* @license http://www.php.net/license/3_0.txt PHP License 3.0
* @link http://pear.php.net/package/Pager
*/
class Pager_Sliding extends Pager_Common
{
// {{{ Pager_Sliding()
 
/**
* Constructor
*
* @param array $options An associative array of option names
* and their values
* @access public
*/
function Pager_Sliding($options = array())
{
//set default Pager_Sliding options
$this->_delta = 2;
$this->_prevImg = '&laquo;';
$this->_nextImg = '&raquo;';
$this->_separator = '|';
$this->_spacesBeforeSeparator = 3;
$this->_spacesAfterSeparator = 3;
$this->_curPageSpanPre = '<b><u>';
$this->_curPageSpanPost = '</u></b>';
 
//set custom options
$err = $this->setOptions($options);
if ($err !== PAGER_OK) {
return $this->raiseError($this->errorMessage($err), $err);
}
$this->build();
}
 
// }}}
// {{{ getPageIdByOffset()
 
/**
* "Overload" PEAR::Pager method. VOID. Not needed here...
* @param integer $index Offset to get pageID for
* @deprecated
* @access public
*/
function getPageIdByOffset($index=null) { }
 
// }}}
// {{{ getPageRangeByPageId()
 
/**
* Given a PageId, it returns the limits of the range of pages displayed.
* While getOffsetByPageId() returns the offset of the data within the
* current page, this method returns the offsets of the page numbers interval.
* E.g., if you have pageId=5 and delta=2, it will return (3, 7).
* PageID of 9 would give you (4, 8).
* If the method is called without parameter, pageID is set to currentPage#.
*
* @param integer PageID to get offsets for
* @return array First and last offsets
* @access public
*/
function getPageRangeByPageId($pageid = null)
{
$pageid = isset($pageid) ? (int)$pageid : $this->_currentPage;
if (!isset($this->_pageData)) {
$this->_generatePageData();
}
if (isset($this->_pageData[$pageid]) || is_null($this->_itemData)) {
if ($this->_expanded) {
$min_surplus = ($pageid <= $this->_delta) ? ($this->_delta - $pageid + 1) : 0;
$max_surplus = ($pageid >= ($this->_totalPages - $this->_delta)) ?
($pageid - ($this->_totalPages - $this->_delta)) : 0;
} else {
$min_surplus = $max_surplus = 0;
}
return array(
max($pageid - $this->_delta - $max_surplus, 1),
min($pageid + $this->_delta + $min_surplus, $this->_totalPages)
);
}
return array(0, 0);
}
 
// }}}
// {{{ getLinks()
 
/**
* Returns back/next/first/last and page links,
* both as ordered and associative array.
*
* @param integer $pageID Optional pageID. If specified, links
* for that page are provided instead of current one.
* @return array back/pages/next/first/last/all links
* @access public
*/
function getLinks($pageID = null)
{
if ($pageID != null) {
$_sav = $this->_currentPage;
$this->_currentPage = $pageID;
 
$this->links = '';
if ($this->_totalPages > (2 * $this->_delta + 1)) {
$this->links .= $this->_printFirstPage();
}
$this->links .= $this->_getBackLink();
$this->links .= $this->_getPageLinks();
$this->links .= $this->_getNextLink();
if ($this->_totalPages > (2 * $this->_delta + 1)) {
$this->links .= $this->_printLastPage();
}
}
 
$back = str_replace('&nbsp;', '', $this->_getBackLink());
$next = str_replace('&nbsp;', '', $this->_getNextLink());
$pages = $this->_getPageLinks();
$first = $this->_printFirstPage();
$last = $this->_printLastPage();
$all = $this->links;
$linkTags = $this->linkTags;
 
if ($pageID != null) {
$this->_currentPage = $_sav;
}
 
return array(
$back,
$pages,
trim($next),
$first,
$last,
$all,
$linkTags,
'back' => $back,
'pages' => $pages,
'next' => $next,
'first' => $first,
'last' => $last,
'all' => $all,
'linktags' => $linkTags
);
}
 
// }}}
// {{{ _getPageLinks()
 
/**
* Returns pages link
*
* @return string Links
* @access private
*/
function _getPageLinks($url = '')
{
//legacy setting... the preferred way to set an option now
//is adding it to the constuctor
if (!empty($url)) {
$this->_path = $url;
}
//If there's only one page, don't display links
if ($this->_clearIfVoid && ($this->_totalPages < 2)) {
return '';
}
 
$links = '';
if ($this->_totalPages > (2 * $this->_delta + 1)) {
if ($this->_expanded) {
if (($this->_totalPages - $this->_delta) <= $this->_currentPage) {
$expansion_before = $this->_currentPage - ($this->_totalPages - $this->_delta);
} else {
$expansion_before = 0;
}
for ($i = $this->_currentPage - $this->_delta - $expansion_before; $expansion_before; $expansion_before--, $i++) {
$print_separator_flag = ($i != $this->_currentPage + $this->_delta); // && ($i != $this->_totalPages - 1)
$this->range[$i] = false;
$this->_linkData[$this->_urlVar] = $i;
$links .= $this->_renderLink($this->_altPage.' '.$i, $i)
. $this->_spacesBefore
. ($print_separator_flag ? $this->_separator.$this->_spacesAfter : '');
}
}
 
$expansion_after = 0;
for ($i = $this->_currentPage - $this->_delta; ($i <= $this->_currentPage + $this->_delta) && ($i <= $this->_totalPages); $i++) {
if ($i < 1) {
++$expansion_after;
continue;
}
 
// check when to print separator
$print_separator_flag = (($i != $this->_currentPage + $this->_delta) && ($i != $this->_totalPages));
 
if ($i == $this->_currentPage) {
$this->range[$i] = true;
$links .= $this->_curPageSpanPre . $i . $this->_curPageSpanPost;
} else {
$this->range[$i] = false;
$this->_linkData[$this->_urlVar] = $i;
$links .= $this->_renderLink($this->_altPage.' '.$i, $i);
}
$links .= $this->_spacesBefore
. ($print_separator_flag ? $this->_separator.$this->_spacesAfter : '');
}
 
if ($this->_expanded && $expansion_after) {
$links .= $this->_separator . $this->_spacesAfter;
for ($i = $this->_currentPage + $this->_delta +1; $expansion_after; $expansion_after--, $i++) {
$print_separator_flag = ($expansion_after != 1);
$this->range[$i] = false;
$this->_linkData[$this->_urlVar] = $i;
$links .= $this->_renderLink($this->_altPage.' '.$i, $i)
. $this->_spacesBefore
. ($print_separator_flag ? $this->_separator.$this->_spacesAfter : '');
}
}
 
} else {
//if $this->_totalPages <= (2*Delta+1) show them all
for ($i=1; $i<=$this->_totalPages; $i++) {
if ($i != $this->_currentPage) {
$this->range[$i] = false;
$this->_linkData[$this->_urlVar] = $i;
$links .= $this->_renderLink($this->_altPage.' '.$i, $i);
} else {
$this->range[$i] = true;
$links .= $this->_curPageSpanPre . $i . $this->_curPageSpanPost;
}
$links .= $this->_spacesBefore
. (($i != $this->_totalPages) ? $this->_separator.$this->_spacesAfter : '');
}
}
return $links;
}
 
// }}}
}
?>
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/bibliotheque/pear/Pager/HtmlWidgets.php
New file
0,0 → 1,229
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
 
/**
* Contains the Pager_HtmlWidgets class
*
* PHP versions 4 and 5
*
* LICENSE: Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* @category HTML
* @package Pager
* @author Lorenzo Alberton <l dot alberton at quipo dot it>
* @copyright 2003-2006 Lorenzo Alberton
* @license http://www.debian.org/misc/bsd.license BSD License (3 Clause)
* @version CVS: $Id$
* @link http://pear.php.net/package/Pager
*/
 
/**
* Two constants used to guess the path- and file-name of the page
* when the user doesn't set any other value
*/
class Pager_HtmlWidgets
{
var $pager = null;
// {{{ constructor
function Pager_HtmlWidgets(&$pager)
{
$this->pager =& $pager;
}
// }}}
// {{{ getPerPageSelectBox()
 
/**
* Returns a string with a XHTML SELECT menu,
* useful for letting the user choose how many items per page should be
* displayed. If parameter useSessions is TRUE, this value is stored in
* a session var. The string isn't echoed right now so you can use it
* with template engines.
*
* @param integer $start
* @param integer $end
* @param integer $step
* @param boolean $showAllData If true, perPage is set equal to totalItems.
* @param array (or string $optionText for BC reasons)
* - 'optionText': text to show in each option.
* Use '%d' where you want to see the number of pages selected.
* - 'attributes': (html attributes) Tag attributes or
* HTML attributes (id="foo" pairs), will be inserted in the
* <select> tag
* - 'checkMaxLimit': if true, Pager checks if $end is bigger
* than $totalItems, and doesn't show the extra select options
* @return string xhtml select box
* @access public
*/
function getPerPageSelectBox($start=5, $end=30, $step=5, $showAllData=false, $extraParams=array())
{
// FIXME: needs POST support
$optionText = '%d';
$attributes = '';
$checkMaxLimit = false;
if (is_string($extraParams)) {
//old behavior, BC maintained
$optionText = $extraParams;
} else {
if (array_key_exists('optionText', $extraParams)) {
$optionText = $extraParams['optionText'];
}
if (array_key_exists('attributes', $extraParams)) {
$attributes = $extraParams['attributes'];
}
if (array_key_exists('checkMaxLimit', $extraParams)) {
$checkMaxLimit = $extraParams['checkMaxLimit'];
}
}
 
if (!strstr($optionText, '%d')) {
return $this->pager->raiseError(
$this->pager->errorMessage(ERROR_PAGER_INVALID_PLACEHOLDER),
ERROR_PAGER_INVALID_PLACEHOLDER
);
}
$start = (int)$start;
$end = (int)$end;
$step = (int)$step;
if (!empty($_SESSION[$this->pager->_sessionVar])) {
$selected = (int)$_SESSION[$this->pager->_sessionVar];
} else {
$selected = $this->pager->_perPage;
}
if ($checkMaxLimit && $this->pager->_totalItems > 0 && $this->pager->_totalItems < $end) {
$end = $this->pager->_totalItems;
}
 
$tmp = '<select name="'.$this->pager->_sessionVar.'"';
if (!empty($attributes)) {
$tmp .= ' '.$attributes;
}
$tmp .= '>';
$last = $start;
for ($i=$start; $i<=$end; $i+=$step) {
$last = $i;
$tmp .= '<option value="'.$i.'"';
if ($i == $selected) {
$tmp .= ' selected="selected"';
}
$tmp .= '>'.sprintf($optionText, $i).'</option>';
}
if ($showAllData && $last != $this->pager->_totalItems) {
$tmp .= '<option value="'.$this->pager->_totalItems.'"';
if ($this->pager->_totalItems == $selected) {
$tmp .= ' selected="selected"';
}
$tmp .= '>';
if (empty($this->pager->_showAllText)) {
$tmp .= str_replace('%d', $this->pager->_totalItems, $optionText);
} else {
$tmp .= $this->pager->_showAllText;
}
$tmp .= '</option>';
}
$tmp .= '</select>';
return $tmp;
}
 
// }}}
// {{{ getPageSelectBox()
 
/**
* Returns a string with a XHTML SELECT menu with the page numbers,
* useful as an alternative to the links
*
* @param array - 'optionText': text to show in each option.
* Use '%d' where you want to see the number of pages selected.
* - 'autoSubmit': if TRUE, add some js code to submit the
* form on the onChange event
* @param string $extraAttributes (html attributes) Tag attributes or
* HTML attributes (id="foo" pairs), will be inserted in the
* <select> tag
* @return string xhtml select box
* @access public
*/
function getPageSelectBox($params = array(), $extraAttributes = '')
{
$optionText = '%d';
if (array_key_exists('optionText', $params)) {
$optionText = $params['optionText'];
}
 
if (!strstr($optionText, '%d')) {
return $this->pager->raiseError(
$this->pager->errorMessage(ERROR_PAGER_INVALID_PLACEHOLDER),
ERROR_PAGER_INVALID_PLACEHOLDER
);
}
$tmp = '<select name="'.$this->pager->_urlVar.'"';
if (!empty($extraAttributes)) {
$tmp .= ' '.$extraAttributes;
}
if (!empty($params['autoSubmit'])) {
if ($this->pager->_httpMethod == 'GET') {
$selector = '\' + '.'this.options[this.selectedIndex].value + \'';
if ($this->pager->_append) {
$href = '?' . $this->pager->_http_build_query_wrapper($this->pager->_linkData);
$href = htmlentities($this->pager->_url). preg_replace(
'/(&|&amp;|\?)('.$this->pager->_urlVar.'=)(\d+)/',
'\\1\\2'.$selector,
htmlentities($href)
);
} else {
$href = htmlentities($this->pager->_url . str_replace('%d', $selector, $this->pager->_fileName));
}
$tmp .= ' onchange="document.location.href=\''
. $href .'\''
. '"';
} elseif ($this->pager->_httpMethod == 'POST') {
$tmp .= " onchange='"
. $this->pager->_generateFormOnClick($this->pager->_url, $this->pager->_linkData)
. "'";
$tmp = preg_replace(
'/(input\.name = \"'.$this->pager->_urlVar.'\"; input\.value =) \"(\d+)\";/',
'\\1 this.options[this.selectedIndex].value;',
$tmp
);
}
}
$tmp .= '>';
$start = 1;
$end = $this->pager->numPages();
$selected = $this->pager->getCurrentPageID();
for ($i=$start; $i<=$end; $i++) {
$tmp .= '<option value="'.$i.'"';
if ($i == $selected) {
$tmp .= ' selected="selected"';
}
$tmp .= '>'.sprintf($optionText, $i).'</option>';
}
$tmp .= '</select>';
return $tmp;
}
// }}}
}
?>
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/bibliotheque/pear/Pager/Pager_savebc.php
New file
0,0 → 1,3
<?php
require_once 'Pager.php';
?>
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/controleurs/FicheCollection.php
New file
0,0 → 1,450
<?php
// declare(encoding='UTF-8');
/**
* Classe Controleur du module Fiche Collection.
*
* @category Php 5.2
* @package Collection
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @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 SVN: $Id: Fiche.php 96 2010-06-21 16:46:31Z jpm $
*/
class FicheCollection extends Fiche {
private $donnees = array();
protected $collectionDao = null;
//+----------------------------------------------------------------------------------------------------------------+
// Méthodes
/**
* Fonction d'affichage par défaut
*/
public function executerActionParDefaut() {
return $this->afficherCollection();
}
// +---------------------------------------------------------------------------------------------------------------+
// FICHE COLLECTION
public function afficherCollection() {
// Gestion des actions par défaut
$this->executerAction('Recherche', 'chargerMoteurRecherche');
// Gestion des données de la requête
if (!isset($_GET['id'])) {
} else {
// Récupération des données
$this->donnees['id'] = $_GET['id'];
$this->donnees['info'] = $this->collectionDao->getCollection($this->donnees['id']);
$this->creerPaginationPersonnes($this->donnees['id']);
$this->creerPaginationPublications($this->donnees['id']);
$this->creerPaginationCommentaires($this->donnees['id']);
 
// Traitements des données
$this->traiterDonneesCollection($this->donnees['info']);
$this->traiterDonneesCollectionAPersonne($this->donnees['personnes']);
$this->traiterDonneesElementAPublication($this->donnees['publications']);
$this->traiterDonneesCollectionDescription($this->donnees['info']);
$this->traiterDonneesCollectionContenu($this->donnees['info']);
$this->traiterDonneesCollectionInventaire($this->donnees['info']);
$this->traiterDonneesCollectionACommentaire($this->donnees['commentaires']);
$this->postraiterDonnees($this->donnees);
$this->donnees['metadonnees'] = $this->traiterMetaDonnees($this->donnees['info']);
// Création des méta-données de la page
$titre = $this->donnees['info']['cc_nom'];
$description = $this->donnees['info']['cc_description'];
$tags = "Collection, id:{$this->donnees['id']}, {$this->donnees['info']['_guid_']}";
// Envoie à la sortie
//Debug::printr($this->donnees);
$this->setSortie(self::META_TITRE, $titre);
$this->setSortie(self::META_DESCRIPTION, $description);
$this->setSortie(self::META_TAGS, $tags);
$this->setSortie(self::RENDU_CORPS, $this->getVue('fiche_collection', $this->donnees));
$this->chargerPiedDePage();
}
}
private function creerPaginationPersonnes($id_collection) {
// Gestion du nombre de résultats
$donnees_total = $this->collectionDao->getNbrePersonnesLiees($id_collection);
// Gestion du fragmenteur
$urlFiche = $this->obtenirObjetUrlFicheCollection($id_collection);
$options = array(
'url' => $urlFiche,
'donnees_total' => $donnees_total,
'donnees_par_page' => Config::get('resultat_par_page_defaut'),
'donnees_par_page_choix' => Config::get('resultat_par_page_choix'),
);
$fragmenteur = Composant::fabrique('fragmenteur', $options);
$this->donnees['personnesFrag'] = $fragmenteur->executer();
list($de, $a) = $fragmenteur->getDeplacementParPageId();
$this->url->unsetVariablesRequete(array('page'));
 
// Gestion de l'accès aux données
$this->collectionDao->setLimitation(($de - 1), $fragmenteur->getDonneesParPage());
$this->collectionDao->setDistinction(1);
$this->donnees['personnes'] = $this->collectionDao->getPersonnesLiees($id_collection);
}
private function creerPaginationPublications($id_collection) {
// Gestion du nombre de résultats
$donnees_total = $this->collectionDao->getNbrePublicationsLiees($id_collection);
// Gestion du fragmenteur
$urlFiche = $this->obtenirObjetUrlFicheCollection($id_collection);
$options = array(
'url' => $urlFiche,
'donnees_total' => $donnees_total,
'donnees_par_page' => Config::get('resultat_par_page_defaut'),
'donnees_par_page_choix' => Config::get('resultat_par_page_choix'),
);
$fragmenteur = Composant::fabrique('fragmenteur', $options);
$this->donnees['publicationsFrag'] = $fragmenteur->executer();
list($de, $a) = $fragmenteur->getDeplacementParPageId();
$this->url->unsetVariablesRequete(array('page'));
 
// Gestion de l'accès aux données
$this->collectionDao->setLimitation(($de - 1), $fragmenteur->getDonneesParPage());
$this->collectionDao->setDistinction(1);
$this->donnees['publications'] = $this->collectionDao->getPublicationsLiees($id_collection);
}
private function creerPaginationCommentaires($id_collection) {
// Gestion du nombre de résultats
$donnees_total = $this->collectionDao->getNbreCommentairesLies($id_collection);
// Gestion du fragmenteur
$urlFiche = $this->obtenirObjetUrlFicheCollection($id_collection);
$options = array(
'url' => $urlFiche,
'donnees_total' => $donnees_total,
'donnees_par_page' => Config::get('resultat_par_page_defaut'),
'donnees_par_page_choix' => Config::get('resultat_par_page_choix'),
);
$fragmenteur = Composant::fabrique('fragmenteur', $options);
$this->donnees['commentairesFrag'] = $fragmenteur->executer();
list($de, $a) = $fragmenteur->getDeplacementParPageId();
$this->url->unsetVariablesRequete(array('page'));
 
// Gestion de l'accès aux données
$this->collectionDao->setLimitation(($de - 1), $fragmenteur->getDonneesParPage());
$this->collectionDao->setDistinction(1);
$this->donnees['commentaires'] = $this->collectionDao->getCommentairesLies($id_collection);
}
 
private function traiterDonneesCollection(&$donnees) {
// liste 29 : Liste des types de collection dans le standard NCD
Ontologie::chargerListe(1032);
// liste 30 : Liste des types de dépôt de collection
Ontologie::chargerListe(1033);
// liste 31 : Liste des principes de groupement d'une collection dans le standard NCD
Ontologie::chargerListe(1034);
// liste 32 : Liste des buts de réalisation d'une collection dans le standard NCD
Ontologie::chargerListe(1035);
// liste 38 : Liste indéterminé/peut-être/oui/non
Ontologie::chargerListe(1041);
// liste 39 : Liste des types de classement des spécimens types dans une collection
Ontologie::chargerListe(1042);
// liste 79 : Liste exact/approximatif
Ontologie::chargerListe(1082);
$guid_id_valeur = Config::get('guid_id_collection').$donnees['cc_id_collection'];
$donnees['_guid_'] = sprintf(Config::get('guid'), $guid_id_valeur);
$donnees['_structure_url_'] = $this->obtenirUrlFicheStructure($donnees['cc_ce_structure']);
$donnees['_nom_alternatif_'] = $this->construireTxtTruck($donnees['cc_truk_nom_alternatif']);
$donnees['_type_ncd_'] = $this->construireTxtListeOntologie($donnees['cc_ce_type']);
$donnees['_type_depot_'] = $this->construireTxtListeOntologie($donnees['cc_ce_type_depot']);
$donnees['_identifiant_alternatif_'] = $this->construireTxtTruckSansMajuscule($donnees['cc_truk_identifiant_alternatif']);
$donnees['_code_'] = $this->construireTxtTruckSansMajuscule($donnees['cc_truk_code']);
$donnees['_url_'] = $this->construireTxtTruckSansMajuscule($donnees['cc_truk_url']);
$donnees['_specimen_type_'] = $this->construireTxtListeOntologie($donnees['cc_ce_specimen_type']);
$donnees['_specimen_type_nbre_'] = ($donnees['cc_specimen_type_nbre'] == 0) ? '' : $donnees['cc_specimen_type_nbre'];
$donnees['_specimen_type_nbre_precision_'] = $this->construireTxtListeOntologie($donnees['cc_ce_specimen_type_nbre_precision']);
$donnees['_specimen_type_nbre_precision_'] = $this->formaterParenthese($donnees['_specimen_type_nbre_precision_']);
$donnees['_specimen_type_classement_'] = $this->construireTxtListeOntologie($donnees['cc_ce_specimen_type_classement']);
$donnees['_groupement_principe_'] = $this->construireTxtListeOntologie($donnees['cc_truk_groupement_principe']);
$donnees['_groupement_but_'] = $this->construireTxtListeOntologie($donnees['cc_truk_groupement_but']);
$donnees['_couverture_lieu_'] = $this->construireTxtTruck($donnees['cc_truk_couverture_lieu']);
}
private function traiterDonneesCollectionAPersonne(&$personnes) {
// liste 27 : Liste des relations entre une collection et une personne
Ontologie::chargerListe(1030);
// liste 77 : Liste indéterminé/oui/non
Ontologie::chargerListe(1080);
foreach ($personnes as &$personne) {
$personne['_role_'] = $this->construireTxtListeOntologie($personne['ccap_id_role']);
$personne['_deces_'] = $this->construireTxtListeOntologie($personne['cp_ce_deces']);
$personne['_naissance_date_'] = $this->formaterDate($personne['cp_naissance_date'], aControleur::FMT_DATE);
$personne['_deces_date_'] = $this->formaterDate($personne['cp_deces_date'], aControleur::FMT_DATE, '');
$personne['_url_'] = $this->obtenirUrlFichePersonne($personne['ccap_id_personne']);
}
}
private function traiterDonneesCollectionDescription(&$donnees) {
// liste 22 : Liste de traitement anti-insecte pour les collections botaniques
Ontologie::chargerListe(1025);
// liste 23 : Liste des poisons utilisés pour les collections botaniques
Ontologie::chargerListe(1026);
// liste 38 : Liste indéterminé/peut-être/oui/non
Ontologie::chargerListe(1041);
// liste 41 : Liste des types d'unité de rangement pour les collections botaniques
Ontologie::chargerListe(1044);
// liste 42 : Liste des états
Ontologie::chargerListe(1045);
// liste 43 : Liste des types de support pour les spécimens des collections botaniques
Ontologie::chargerListe(1046);
// liste 44 : Liste des types de papier de support pour les spécimens des collections botaniques
Ontologie::chargerListe(1047);
// liste 45 : Liste des méthodes de rangement des supports pour les spécimens des collections botaniques
Ontologie::chargerListe(1048);
// liste 46 : Liste des méthodes de fixation sur le support pour les collections botaniques
Ontologie::chargerListe(1049);
// liste 47 : Liste des méthodes de fixation des étiquettes sur les spécimens pour les collections botaniques
Ontologie::chargerListe(1050);
// liste 48 : Liste des types d'écriture d'étiquette
Ontologie::chargerListe(1051);
// liste 49 : Liste des origines des dégradations des spécimens de collections botaniques
Ontologie::chargerListe(1052);
// liste 50 : Liste des origines des dégradations des supports de collections botaniques
Ontologie::chargerListe(1053);
// liste 51 : Liste des niveaux de détermination des spécimens de collections botaniques
Ontologie::chargerListe(1054);
 
$donnees['_type_'] = $this->construireTxtListeOntologie($donnees['ccb_ce_truk_type']);
$donnees['_unite_rangement_etat_'] = $this->construireTxtListeOntologie($donnees['ccb_ce_unite_rangement_etat']);
$donnees['_rangements_'] = $this->parserValeurUniteRangement($donnees['ccb_truk_unite_rangement']);
$donnees['_unites_base_'] = $this->parserValeurUniteBase($donnees['ccb_truk_unite_base']);
$donnees['_conservation_papier_type_'] = $this->construireTxtListeOntologie($donnees['ccb_truk_conservation_papier_type']);
$donnees['_conservation_methode_'] = $this->construireTxtListeOntologie($donnees['ccb_truk_conservation_methode']);
$donnees['_specimen_fixation_methode_'] = $this->construireTxtListeOntologie($donnees['ccb_truk_specimen_fixation_methode']);
$donnees['_etiquette_fixation_support_'] = $this->construireTxtListeOntologie($donnees['ccb_truk_etiquette_fixation_support']);
$donnees['_etiquette_fixation_specimen_'] = $this->construireTxtListeOntologie($donnees['ccb_truk_etiquette_fixation_specimen']);
$donnees['_etiquette_ecriture_'] = $this->construireTxtListeOntologie($donnees['ccb_truk_etiquette_ecriture']);
$donnees['_traitement_'] = $this->construireTxtListeOntologie($donnees['ccb_ce_traitement']);
$donnees['_traitement_poison_'] = $this->construireTxtListeOntologie($donnees['ccb_truk_traitement_poison']);
$donnees['_traitement_insecte_'] = $this->construireTxtListeOntologie($donnees['ccb_truk_traitement_insecte']);
$donnees['_etat_general_'] = $this->construireTxtListeOntologie($donnees['ccb_ce_etat_general']);
$valeurEstOntologie = false;
$typeEstOntologie = true;
$donneeEstOntologie = true;
$donnees['_degradation_specimen_'] = $this->construireTxtListeOntologie($donnees['ccb_truk_degradation_specimen'], $valeurEstOntologie, $typeEstOntologie, $donneeEstOntologie);
$donnees['_degradation_presentation_'] = $this->construireTxtListeOntologie($donnees['ccb_truk_degradation_presentation'], $valeurEstOntologie, $typeEstOntologie, $donneeEstOntologie);
$donnees['_determination_'] = $this->construireTxtListeOntologie($donnees['ccb_ce_determination']);
}
private function traiterDonneesCollectionContenu(&$donnees) {
// liste 20 : Liste oui/non/en partie
Ontologie::chargerListe(1023);
// liste 37 : Liste des siècles pour les collections naturalistes
Ontologie::chargerListe(1040);
// liste 38 : Liste indéterminé/peut-être/oui/non
Ontologie::chargerListe(1041);
// liste 42 : Liste des états
Ontologie::chargerListe(1045);
// liste 52 : Liste des types de date de début
Ontologie::chargerListe(1055);
// liste 53 : Liste des types de date de fin
Ontologie::chargerListe(1056);
// liste 80 : Liste des types de collection botanique
Ontologie::chargerListe(1083);
$donnees['_nature_'] = $this->construireTxtListeOntologie($donnees['ccb_truk_nature']);
$donnees['_periode_constitution_'] = $this->construireTxtListeOntologie($donnees['cc_truk_periode_constitution']);
$donnees['_recolte_date_debut_'] = $this->formaterDate($donnees['ccb_recolte_date_debut'], aControleur::FMT_DATE);
$donnees['_recolte_date_debut_type_'] = $this->construireTxtListeOntologie($donnees['ccb_ce_recolte_date_debut_type']);
$donnees['_recolte_date_debut_type_'] = $this->formaterParenthese($donnees['_recolte_date_debut_type_']);
$donnees['_recolte_date_fin_'] = $this->formaterDate($donnees['ccb_recolte_date_fin'], aControleur::FMT_DATE);
$donnees['_recolte_date_fin_type_'] = $this->construireTxtListeOntologie($donnees['ccb_ce_recolte_date_fin_type']);
$donnees['_recolte_date_fin_type_'] = $this->formaterParenthese($donnees['_recolte_date_fin_type_']);
$donnees['_classement_etat_'] = $this->construireTxtListeOntologie($donnees['ccb_ce_classement_etat']);
$donnees['_etiquette_renseignement_'] = $this->construireTxtEtiquetteRenseignement($donnees['ccb_truk_etiquette_renseignement']);
$donnees['_precision_localite_'] = $this->construireTxtListeOntologie($donnees['ccb_ce_precision_localite']);
$donnees['_precision_date_'] = $this->construireTxtListeOntologie($donnees['ccb_ce_precision_date']);
$donnees['_collection_integre_'] = $this->construireTxtListeOntologie($donnees['ccb_ce_collection_integre']);
$donnees['_collection_integre_info_'] = $this->construireTxtListeOntologie($donnees['ccb_ce_collection_integre_info']);
}
private function traiterDonneesCollectionInventaire(&$donnees) {
// liste 38 : Liste indéterminé/peut-être/oui/non
Ontologie::chargerListe(1041);
// liste 57 : Liste indéterminé/parfois/oui/non
Ontologie::chargerListe(1060);
// liste 58 : Liste des formes d'inventaire
Ontologie::chargerListe(1061);
// liste 59 : Liste des types de logiciel pour les inventaires informatiques
Ontologie::chargerListe(1062);
// liste 60 : Liste des états d'inventaire
Ontologie::chargerListe(1063);
$donnees['_inventaire_'] = $this->construireTxtListeOntologie($donnees['ccb_ce_inventaire']);
$donnees['_inventaire_auteur_'] = $this->construireTxtListeOntologie($donnees['ccb_ce_inventaire_auteur']);
$donnees['_inventaire_forme_'] = $this->construireTxtListeOntologie($donnees['ccb_ce_inventaire_forme']);
$donnees['_inventaire_digital_'] = $this->construireTxtListeOntologie($donnees['ccb_ce_truk_inventaire_digital']);
$donnees['_inventaire_etat_'] = $this->construireTxtListeOntologie($donnees['ccb_ce_inventaire_etat']);
}
private function traiterDonneesCollectionACommentaire(&$commentaires) {
// liste 65 : Liste des types de commentaires associés à une collection
Ontologie::chargerListe(1068);
foreach ($commentaires as &$commentaire) {
$commentaire['_type_'] = $this->construireTxtListeOntologie($commentaire['ccac_truk_type']);
}
}
private function construireTxtEtiquetteRenseignement($valeur) {
$etiquetteRenseignements = '';
$infos = $this->parserEtiquetteRenseignement($valeur);
if (count($infos) > 0) {
foreach ($infos as $cle => $info) {
if ($cle == 'AT') {
$etiquetteRenseignements .= 'auteur de la collection';
} else if ($cle == 'F') {
$etiquetteRenseignements .= 'famille';
} else if ($cle == 'G') {
$etiquetteRenseignements .= 'genre';
} else if ($cle == 'SP') {
$etiquetteRenseignements .= 'espèce';
} else if ($cle == 'ASP') {
$etiquetteRenseignements .= "auteur de l'espèce";
} else if ($cle == 'L') {
$etiquetteRenseignements .= 'localité';
} else if ($cle == 'D') {
$etiquetteRenseignements .= 'date de récolte';
} else {
$etiquetteRenseignements .= 'Inconnue';
}
$etiquetteRenseignements .= ': '.$info.'%, ';
}
$etiquetteRenseignements = rtrim($etiquetteRenseignements, ', ').'.';
}
return $etiquetteRenseignements;
}
private function parserEtiquetteRenseignement($valeurTruk) {
$infos = array();
if ($valeurTruk != '') {
$pourcentages = explode(self::SEPARATEUR_VALEURS, $valeurTruk);
foreach ($pourcentages as $pourcentage) {
$pourcentageIdValeur = explode(self::SEPARATEUR_TYPE_VALEUR, $pourcentage);
$id = $pourcentageIdValeur[0];
$valeur = $pourcentageIdValeur[1];
$infos[$id] = $valeur;
}
}
return $infos;
}
private function parserValeurUniteBase($valeurTruk) {
$unitesEnregistrees = array();
if ($valeurTruk != '') {
$unites = explode(self::SEPARATEUR_VALEURS, $valeurTruk);
$unites_nbre = count($unites);
for ($i = 0; $i < $unites_nbre; $i++) {
$uniteTypeIdDonnees = explode(self::SEPARATEUR_TYPE_VALEUR, $unites[$i]);
$uniteChaineDonnees = $uniteTypeIdDonnees[1];
$uniteDonnees = explode(self::SEPARATEUR_DONNEES, $uniteChaineDonnees);
$uniteDonneesNbre = count($uniteDonnees);
$uniteBase = array();
if ($uniteDonneesNbre > 0) {
$uniteBase['nbre'] = $uniteDonnees[0];
}
if ($uniteDonnees[0] > 0 || $uniteDonnees[2] != '' || $uniteDonnees[3] > 0 || $uniteDonnees[5] > 0) {
if ($uniteDonneesNbre > 1) {
$uniteBase['precision'] = self::getPrecisionNom($uniteDonnees[1]);
}
if ($uniteDonneesNbre > 2) {
$uniteBase['format'] = $uniteDonnees[2];
}
if ($uniteDonneesNbre > 3) {
$uniteBase['part_nbre'] = $uniteDonnees[3];
}
if ($uniteDonneesNbre > 4) {
$uniteBase['part_precision'] = self::getPrecisionNom($uniteDonnees[4]);
}
if ($uniteDonneesNbre > 5) {
$uniteBase['sp_nbre'] = $uniteDonnees[5];
}
if ($uniteDonneesNbre > 6) {
$uniteBase['sp_precision'] = self::getPrecisionNom($uniteDonnees[6]);
}
if (preg_match('/^[0-9]+$/', $uniteTypeIdDonnees[0])) {
$uniteBase['id'] = $uniteTypeIdDonnees[0];
$uniteBase['type'] = Ontologie::getValeurNom($uniteTypeIdDonnees[0]);
} else {
$uniteBase['type'] = $uniteTypeIdDonnees[0];
}
$unitesEnregistrees[] = $uniteBase;
}
}
}
return $unitesEnregistrees;
}
private function parserValeurUniteRangement($valeurTruk) {
$unitesEnregistrees = array();
if ($valeurTruk != '') {
$unites = explode(self::SEPARATEUR_VALEURS, $valeurTruk);
$unites_nbre = count($unites);
for ($i = 0; $i < $unites_nbre; $i++) {
$uniteTypeIdDonnees = explode(self::SEPARATEUR_TYPE_VALEUR, $unites[$i]);
$uniteChaineDonnees = $uniteTypeIdDonnees[1];
$uniteDonnees = explode(self::SEPARATEUR_DONNEES, $uniteChaineDonnees);
$uniteDonneesNbre = count($uniteDonnees);
$uniteRangement = array();
if ($uniteDonneesNbre > 0) {
$uniteRangement['nbre'] = $uniteDonnees[0];
}
if ($uniteRangement['nbre'] > 0) {
if ($uniteDonneesNbre > 1) {
$uniteRangement['precision'] = self::getPrecisionNom($uniteDonnees[1]);
}
if ($uniteDonneesNbre > 2) {
$uniteRangement['format'] = $uniteDonnees[2];
}
if (preg_match('/^[0-9]+$/', $uniteTypeIdDonnees[0])) {
$uniteRangement['id'] = $uniteTypeIdDonnees[0];
$uniteRangement['type'] = Ontologie::getValeurNom($uniteTypeIdDonnees[0]);
} else {
$uniteRangement['type'] = $uniteTypeIdDonnees[0];
}
$unitesEnregistrees[] = $uniteRangement;
}
}
}
return $unitesEnregistrees;
}
private static function getPrecisionNom($precisionAbr) {
$precision_nom = '';
if ($precisionAbr != 'NULL') {
// liste 79 : Liste exact/approximatif
$precisions = Ontologie::getListeFormatee(1082);
foreach ($precisions as $precision) {
if ($precision['abreviation'] == $precisionAbr) {
$precision_nom = $precision['nom'];
break;
}
}
}
return $precision_nom;
}
}
/tags/v1.8-irancy/controleurs/AppControleur.php
New file
0,0 → 1,205
<?php
// declare(encoding='UTF-8');
/**
* Collection est le controlleur principal de l'application.
* Elle repartie les demandes utilisateurs dans les différents modules, executent les actions et redistribue le code
* html dans les différentes fonctions d'affichage.
* C'est une Singleton.
*
* @category PHP 5.2
* @package Collection
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @license GPL-v3 et CECILL-v2
* @version $Id$
*/
 
class AppControleur extends Controleur {
/**
* Instance de la classe pointant sur elle même (pour le pattern singleton)
*/
private static $instance = null;
/**
* Paramètres pour les collections
*/
private static $parametres = array();
/**
* Constructeur vide
*/
public function __construct() {
$sortie = array('titre' => '', 'description' => '', 'tags' => '',
'corps' => '', 'tete' => '', 'pied' => '', 'navigation' => '');
$url = new Url(Config::get('url_base_index'));
self::$parametres = array( 'module' => 'Recherche',
'action' => 'executerActionParDefaut',
'sortie' => $sortie,
'url' => $url);
parent::__construct();
}
/**
* Initialisation du controleur principal en fonction des paramêtres de l'url.
*/
public static function initialiser() {
self::verifierCreationInstance();
self::gererSession();
if (isset($_GET['module'])) {
self::$parametres['module'] = $_GET['module'];
}
self::$parametres['url']->setVariableRequete('module', self::$parametres['module']);
if (isset($_GET['action'])) {
self::$parametres['action'] = $_GET['action'];
}
self::$parametres['url']->setVariableRequete('action', self::$parametres['action']);
self::initialiserRegistre();
$ClasseModule = self::$parametres['module'];
$action = self::$parametres['action'];
$module = new $ClasseModule();
$module->$action();
self::fusionnerSortie($module->getSortie());
}
private static function initialiserRegistre() {
$registre = Registre::getInstance();
// Ajout des paramètres au registre
$registre->set('parametres', self::$parametres);
// Ajout du contexte au registre
if (isset($_GET['contexte'])) {
$registre->set('contexte', $_GET['contexte']);
}
}
private static function gererSession() {
if (Config::get('session_demarrage')) {
// Attribution d'un nom à la session
session_name(Config::get('session_nom'));
// Démarrage de la session
session_start();
}
}
/**
* Fusionne un tableau de sortie par défaut avec le tableau renvoyé par l'action du module.
* @param array le tableau à fusionner
*/
private static function fusionnerSortie($sortie) {
self::$parametres['sortie'] = array_merge(self::$parametres['sortie'], $sortie);
}
/**
* Vérifie si l'instance de classe à été crée, si non la crée.
*/
private static function verifierCreationInstance() {
if (empty(self::$instance)) {
self::$instance = new AppControleur();
}
}
/**
* Retourne le titre du contenu de l'application.
*/
public static function getMetaTitre() {
$sortie = self::$parametres['sortie']['titre'];
if (Config::get('sortie_encodage') != Config::get('appli_encodage')) {
$sortie = mb_convert_encoding($sortie, Config::get('sortie_encodage'), Config::get('appli_encodage'));
}
return $sortie;
}
/**
* Retourne la description du contenu de l'application.
*/
public static function getMetaDescription() {
$sortie = self::$parametres['sortie']['description'];
if (Config::get('sortie_encodage') != Config::get('appli_encodage')) {
$sortie = mb_convert_encoding($sortie, Config::get('sortie_encodage'), Config::get('appli_encodage'));
}
return $sortie;
}
/**
* Retourne les mots-clés (tags) du contenu de l'application.
*/
public static function getMetaTags() {
$sortie = self::$parametres['sortie']['tags'];
if (Config::get('sortie_encodage') != Config::get('appli_encodage')) {
$sortie = mb_convert_encoding($sortie, Config::get('sortie_encodage'), Config::get('appli_encodage'));
}
return $sortie;
}
/**
* Retourne le contenu du corps de l'application.
*/
public static function getContenuCorps() {
$sortie = self::$parametres['sortie']['corps'];
if (Config::get('sortie_encodage') != Config::get('appli_encodage')) {
$sortie = mb_convert_encoding($sortie, Config::get('sortie_encodage'), Config::get('appli_encodage'));
}
return $sortie;
}
/**
* Retourne le contenu de la tête de l'application.
*/
public static function getContenuTete() {
$sortie = self::$parametres['sortie']['tete'];
if (Config::get('sortie_encodage') != Config::get('appli_encodage')) {
$sortie = mb_convert_encoding($sortie, Config::get('sortie_encodage'), Config::get('appli_encodage'));
}
return $sortie;
}
/**
* Retourne le contenu du pied de l'application.
*/
public static function getContenuPied() {
$sortie = self::$parametres['sortie']['pied'];
if (Config::get('sortie_encodage') != Config::get('appli_encodage')) {
$sortie = mb_convert_encoding($sortie, Config::get('sortie_encodage'), Config::get('appli_encodage'));
}
return $sortie;
}
/**
* Retourne les éléments de navigation de l'application.
*/
public static function getContenuNavigation() {
$sortie = self::$parametres['sortie']['navigation'];
if (Config::get('sortie_encodage') != Config::get('appli_encodage')) {
$sortie = mb_convert_encoding($sortie, Config::get('sortie_encodage'), Config::get('appli_encodage'));
}
return $sortie;
}
/**
* Retourne les chronos pris dans l'appli
*/
public static function getChrono() {
$sortie = '';
if (Config::get('chronometrage')) {
$chrono = Chronometre::afficherChrono();
$sortie = mb_convert_encoding($chrono, Config::get('sortie_encodage'), Config::get('appli_encodage'));
}
return $sortie;
}
/**
* Retourne les messages d'exceptions et d'erreurs.
*/
public static function getExceptions() {
$sortie = (Config::get('fw_debogage')) ? GestionnaireException::getExceptions() : '';
if (Config::get('sortie_encodage') != Config::get('appli_encodage')) {
$sortie = mb_convert_encoding($sortie, Config::get('sortie_encodage'), Config::get('appli_encodage'));
}
return $sortie;
}
}
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/controleurs/aControleur.php
New file
0,0 → 1,468
<?php
// declare(encoding='UTF-8');
/**
* Classe Controleur générale de l'application Collection.
*
* @category php5.2
* @package Collection
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @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 SVN: $Id$
*/
abstract class aControleur extends Controleur {
const FMT_DATE = '%d/%m/%Y';// Supporte les formats de dates non valides (1989-00-00)
const FMT_DATE_TXT = '%A %d %B %Y';
const FMT_DATE_HEURE = '%d/%m/%Y %H:%i:%s';// Supporte les formats de dates non valides (1989-00-00 00:00:00)
const FMT_DATE_HEURE_TXT = '%A %d %B %Y à %H:%M';
const META_TITRE = 'titre';
const META_DESCRIPTION = 'description';
const META_TAGS = 'tags';
const RENDU_TETE = 'tete';
const RENDU_CORPS = 'corps';
const RENDU_PIED = 'pied';
const TYPE_AUTRE = 'AUTRE';
const TYPE_TOTAL = 'TOTAL';
const SEPARATEUR_TYPE_VALEUR = '##';
const SEPARATEUR_VALEURS = ';;';
const SEPARATEUR_DONNEES = '||';
const VALEUR_NULL = 'NC';
private $sortie = array();
private $parametres = array();
// FIXME : voir s'il est plus intéressant d'utiliser une méthode dans les classes filles
protected $url = null;
protected $registre = array();
public function __construct() {
$this->registre = Registre::getInstance();
$this->parametres = $this->registre->get('parametres');
$this->url = $this->parametres['url'];
parent::__construct();
}
/**
* Attribue une position de sortie à un contenu.
*/
protected function setSortie($position, $contenu, $fusionner = false) {
if ($this->verifierExistenceTypeSortie($position)) {
if ($fusionner) {
$this->sortie[$position] .= $contenu;
} else {
$this->sortie[$position] = $contenu;
}
}
}
/**
* Vérifie l'existence du type de sortie indiqué pour son utilisation dans le tableau de sortie.
* @param string le type de sortie à tester.
* @return bool true si le type de sortie est valide, sinon false.
*/
private function verifierExistenceTypeSortie($type) {
$existe = true;
if ($type != self::RENDU_TETE &&
$type != self::RENDU_CORPS &&
$type != self::RENDU_PIED &&
$type != self::META_TITRE &&
$type != self::META_DESCRIPTION &&
$type != self::META_TAGS) {
trigger_error("Le type de sortie '$type' n'est pas une valeur prédéfinie.", E_USER_WARNING);
$existe = false;
}
return $existe;
}
/**
* Retourne le tableau de sortie à utiliser dans le controleur principal de l'application.
*/
public function getSortie() {
return $this->sortie;
}
 
/**
* Execute l'action d'un module donnée et fusionne le résultat avec le tableau de sortie.
*/
protected function executerAction($ClasseModule, $action) {
$module = new $ClasseModule();
$module->$action();
$this->fusionnerSortie($module->getSortie());
}
/**
* Fusionne un tableau de sortie par défaut avec le tableau passé en paramêtre.
* @param array le tableau à fusionner
*/
private function fusionnerSortie($sortie) {
$this->sortie = array_merge($this->sortie, $sortie);
}
protected function construireTxtTruckSimple($chaine_a_analyser) {
return $this->construireTxtTruck($chaine_a_analyser, false, false);
}
protected function construireTxtTruckSansMajuscule($chaine_a_analyser) {
return $this->construireTxtTruck($chaine_a_analyser, false, true);
}
protected function construireTxtTruckSansPointFinal($chaine_a_analyser) {
return $this->construireTxtTruck($chaine_a_analyser, true, false);
}
protected function construireTxtTruck($chaine_a_analyser, $majuscule = true, $point_final = true) {
$termes = $this->traiterTxtTruck($chaine_a_analyser);
$chaine_a_retourner = $this->formaterTableauDeTxt($termes, $majuscule, $point_final);
return $chaine_a_retourner;
}
protected function traiterTxtTruck($chaine_a_analyser) {
$termes = array();
if ((!is_null($chaine_a_analyser)) && (trim($chaine_a_analyser) != '')) {
$valeurs = explode(self::SEPARATEUR_VALEURS, $chaine_a_analyser);
$nbre_valeurs = count($valeurs);
if ($nbre_valeurs > 0) {
for ($i = 0; $i < $nbre_valeurs; $i++) {
$valeur = trim($valeurs[$i]);
if ($valeur != '') {
$valeur_formatee = $this->formaterValeurTruck($valeur);
$termes[] = $valeur_formatee;
}
}
}
}
return $termes;
}
protected function getTxtTruckParPosition($chaine_a_analyser, $position = 1) {
$retour = '';
if ((!is_null($chaine_a_analyser)) && (trim($chaine_a_analyser) != '')) {
$valeurs = explode(self::SEPARATEUR_VALEURS, $chaine_a_analyser);
$nbre_valeurs = count($valeurs);
if ($nbre_valeurs > 0) {
$position = $position - 1;
$valeur = trim($valeurs[$position]);
if ($valeur != '') {
$retour = $this->formaterValeurTruck($valeur);
}
}
}
return $retour;
}
protected function getTableauTruck($chaine_a_analyser) {
$tableau_retour = array();
if ((!is_null($chaine_a_analyser)) && (trim($chaine_a_analyser) != '')) {
$valeurs = explode(self::SEPARATEUR_VALEURS, $chaine_a_analyser);
$nbre_valeurs = count($valeurs);
if ($nbre_valeurs > 0) {
for ($i = 0; $i < $nbre_valeurs; $i++) {
$valeur = trim($valeurs[$i]);
if ($valeur != '') {
$tableau_retour[] = $valeur;
}
}
}
}
return $tableau_retour;
}
private function formaterValeurTruck($valeur) {
$chaine_a_retourner = '';
if (preg_match('/^[^#]+##[^$]+$/', $valeur)) {
$cle_valeur = explode(self::SEPARATEUR_TYPE_VALEUR, $valeur);
$chaine_a_retourner = (($cle_valeur[1] == '' || $cle_valeur[1] == 'null') ? self::VALEUR_NULL : $cle_valeur[1]);
$chaine_a_retourner .= ' '.$this->formaterParenthese($cle_valeur[0]);
} else if ($valeur != '') {
$chaine_a_retourner = $valeur;
} else {
trigger_error("Valeur truck posant problème :$valeur", E_USER_NOTICE);
}
return $chaine_a_retourner;
}
protected function formaterParenthese($chaine_a_afficher) {
if ($chaine_a_afficher != '') {
$chaine_a_afficher = '('.$chaine_a_afficher.')';
}
return $chaine_a_afficher;
}
protected function formaterSautDeLigne($chaine_a_formater) {
$txt_a_retourner = preg_replace('/\n/', '<br />', $chaine_a_formater);
return $txt_a_retourner;
}
protected function formaterTableauDeTxt($tableau_de_txt, $majuscule = true, $point_final = true) {
$chaine_a_afficher = '';
$taille_du_tableau = count($tableau_de_txt);
if ($taille_du_tableau > 0) {
$index_avt_dernier = $taille_du_tableau - 1;
for ($i = 0; $i < $taille_du_tableau; $i++) {
$mot = $tableau_de_txt[$i];
if ($i != $index_avt_dernier) {
$chaine_a_afficher .= $mot.', ';
} else {
$chaine_a_afficher .= $this->nettoyerPointFinal($mot);
if ($point_final) {
$chaine_a_afficher .= '.';
}
}
}
}
if ($majuscule) {
$chaine_a_afficher = ucfirst($chaine_a_afficher);
}
return $chaine_a_afficher;
}
protected function formaterAutre($chaine_a_afficher) {
if ($chaine_a_afficher != '') {
$chaine_a_afficher = ' [Autre : '.$chaine_a_afficher.']';
}
return $chaine_a_afficher;
}
protected function formaterOuiNon($chaine_a_formater) {
$txt_a_retourner = '';
if ($chaine_a_formater == '0') {
$txt_a_retourner = 'non';
} else if ($chaine_a_formater == '1') {
$txt_a_retourner = 'oui';
}
return $txt_a_retourner;
}
protected function formaterDate($date, $format = self::FMT_DATE_HEURE, $chaineSiVide = 'Inconnue') {
if ($date == '' || $date == '0000-00-00' || $date == '0000-00-00 00:00:00') {
$date = $chaineSiVide;
} else {
if (preg_match('/^([0-9]{4})-([0-9]{2})-([0-9]{2})(?: ([0-9]{2}):([0-9]{2}):([0-9]{2})|)$/', $date, $match)) {// Date Heure
$annee = $match[1];
$mois = $match[2];
$jour = $match[3];
$heure = (isset($match[4])) ? $match[4] : '00';
$minute = (isset($match[5])) ? $match[5] : '00';
$seconde = (isset($match[6])) ? $match[6] : '00';
if ($format == self::FMT_DATE && $jour == '00' && $mois == '00') {
$date = $annee;
} else if ($format == self::FMT_DATE && $jour == '00') {
$date = strftime('%b', mktime(0, 0, 0, $mois, 1)).' '.$annee;
} else {
$timestamp = strtotime($date);
if ($timestamp !== false) {
$date = strftime($format, $timestamp);
}
}
} else {
$e = "La chaine '$date' n'est pas reconnue.";
trigger_error($e, E_USER_WARNING);
}
}
return $date;
}
protected function formaterCourriels($courriels) {
$fmt_courriels = '';
if (!empty($courriels)) {
$courriels = (is_array($courriels)) ? $courriels : array($courriels);
foreach ($courriels as $cle => $courriel) {
$courriel = preg_replace('/@/', ' [arrobase] ', $courriel);
$courriel = preg_replace('/[.]([^.]+)$/', " [point] $1", $courriel);
$fmt_courriels[] = $this->getVue('courriel', array('courriel' => $courriel));
}
$fmt_courriels = implode(', ', $fmt_courriels);
}
return $fmt_courriels;
}
protected function nettoyerPointFinal($mot) {
$mot = preg_replace('/[.]$/', '', $mot);
return $mot;
}
public function construireTxtListeOntologie($chaineAAnalyser, $valeurEstOntologie = true, $typeEstOntologie = true, $donneeEstOntologie = false) {
$termes = array();
$autres = array();
$chaineAAnalyser = trim($chaineAAnalyser);
if ($chaineAAnalyser != '') {
$valeurs = explode(self::SEPARATEUR_VALEURS, $chaineAAnalyser);
$nbreValeurs = count($valeurs);
if ($nbreValeurs > 0) {
for ($i = 0; $i < $nbreValeurs; $i++) {
$valeur = $valeurs[$i];
// VALEUR SANS TYPE
// La valeur sans type est une entrée de l'ontologie
if ($valeurEstOntologie && preg_match('/^[0-9]+$/u', $valeur)) {
if ($valeur == '0') {
$valeur = '';
} else {
$valeurOntologie = Ontologie::getValeur($valeur);
if ($valeurOntologie != '') {
$valeur = $valeurOntologie['nom'];
}
}
}
// VALEUR AVEC TYPE
// Type : AUTRE
$valeurTypeAutre = self::TYPE_AUTRE.self::SEPARATEUR_TYPE_VALEUR;
if (preg_match('/^'.$valeurTypeAutre.'.+$/u', $valeur)) {
$txtAutre = preg_replace('/^'.$valeurTypeAutre.'/u', '', $valeur);
if ($txtAutre != '') {
$autres[] = $txtAutre;
}
$valeur = '';
}
// Type correspondant à une entrée de l'ontologie
if ($typeEstOntologie) {
$valeurTypeOntologie = '([0-9]+)'.self::SEPARATEUR_TYPE_VALEUR;
$valeurTypeAutre = '([[:alnum:]]+)'.self::SEPARATEUR_TYPE_VALEUR;
if (preg_match('/^'.$valeurTypeOntologie.'.*$/u', $valeur, $match)) {// Cas type : réf. numérique
$type = $match[1];
$valeurOntologieNom = Ontologie::getValeurNom($type);
if ($valeurOntologieNom !== false) {
$valeurOntologieNom .= ' : ';
$valeur = preg_replace('/^'.$type.'/u', $valeurOntologieNom, $valeur);
}
} else if (preg_match('/^'.$valeurTypeAutre.'.*$/u', $valeur, $match)) {// Cas type : AUTRE
$type = $match[1];
$valeur = preg_replace('/^'.$type.'/u', $type.' : ', $valeur);
}
}
// Donnée correspondant à une entrée de l'ontologie
if ($donneeEstOntologie) {
$donneeOntologie = self::SEPARATEUR_TYPE_VALEUR.'([0-9]+)';
if (preg_match('/^.+'.$donneeOntologie.'$/u', $valeur, $match)) {
$donnee = $match[1];
$donnee = str_replace(self::SEPARATEUR_TYPE_VALEUR, '', $donnee);
$valeurOntologieNom = Ontologie::getValeurNom($donnee);
if ($valeurOntologieNom !== false) {
$valeur = preg_replace('/'.$donnee.'$/u', $valeurOntologieNom, $valeur);
}
}
}
// Nettoyage final
$valeur = preg_replace('/'.self::SEPARATEUR_TYPE_VALEUR.'/', '', $valeur);
if ($valeur != '') {
$termes[] = $valeur;
}
}
}
}
$chaineTermes = $this->formaterTableauDeTxt($termes);
$chaineAutres = $this->formaterTableauDeTxt($autres);
$chaineARetourner = $chaineTermes.$this->formaterAutre($chaineAutres);
return $chaineARetourner;
}
protected function obtenirUrlRecherche($txt = null) {
$this->url->setRequete(false);
if (!is_null($this->registre->get('contexte'))) {
$this->url->setVariableRequete('contexte', $this->registre->get('contexte'));
}
$this->url->setVariableRequete('module', 'Recherche');
$this->url->setVariableRequete('action', 'rechercher');
if (!is_null($txt)) {
$this->url->setVariableRequete('recherche', $txt);
}
$url = $this->url->getURL();
$this->url->unsetVariablesRequete(array('module', 'action', 'recherche'));
return $url;
}
protected function obtenirUrlFicheStructure($id_structure) {
$url = $this->obtenirObjetUrlFicheStructure($id_structure);
return $url->getURL();
}
protected function obtenirObjetUrlFicheStructure($id_structure) {
$this->url->setRequete(false);
if (!is_null($this->registre->get('contexte'))) {
$this->url->setVariableRequete('contexte', $this->registre->get('contexte'));
}
$this->url->setVariableRequete('module', 'FicheStructure');
$this->url->setVariableRequete('id', $id_structure);
$url = clone $this->url;
$this->url->unsetVariablesRequete(array('module', 'id'));
return $url;
}
protected function obtenirUrlFicheCollection($id_collection) {
$url = $this->obtenirObjetUrlFicheCollection($id_collection);
return $url->getURL();
}
protected function obtenirObjetUrlFicheCollection($id_collection) {
$this->url->setRequete(false);
if (!is_null($this->registre->get('contexte'))) {
$this->url->setVariableRequete('contexte', $this->registre->get('contexte'));
}
$this->url->setVariableRequete('module', 'FicheCollection');
$this->url->setVariableRequete('id', $id_collection);
$url = clone $this->url;
$this->url->unsetVariablesRequete(array('module', 'id'));
return $url;
}
protected function obtenirUrlFichePersonne($id_personne) {
$url = $this->obtenirObjetUrlFichePersonne($id_personne);
return $url->getURL();
}
protected function obtenirObjetUrlFichePersonne($id_personne) {
$this->url->setRequete(false);
if (!is_null($this->registre->get('contexte'))) {
$this->url->setVariableRequete('contexte', $this->registre->get('contexte'));
}
$this->url->setVariableRequete('module', 'FichePersonne');
$this->url->setVariableRequete('id', $id_personne);
$url = clone $this->url;
$this->url->unsetVariablesRequete(array('module', 'id'));
return $url;
}
protected function obtenirPermalienGuid($guid) {
$url = Config::get('url_base_permalien');
$url .= (substr($url, -1, 1) == '/') ? '' : '/';
$url .= $guid;
return $url;
}
protected function postraiterDonnees(&$tableau) {
if (count($tableau) > 0) {
foreach ($tableau as $cle => &$valeur) {
// ajout d'un nbsp pour ne pas fausser l'affichage du template
// afin que les <dd> et <dt> aient la même largeur
if ($valeur == '') {
$valeur = '&nbsp;';
} else if (is_string($valeur)) {
$valeur = $this->remplacerEsperluette($valeur);
} else if (is_array($valeur)) {
$this->postraiterDonnees($valeur);
}
}
}
}
private function remplacerEsperluette($txt) {
$txt = preg_replace('/&(?!([a-z]+|#[0-9]+|#x[0-9a-f]+);)/i', '&amp;', $txt, -1);
return $txt;
}
protected function chargerPiedDePage() {
$donnees['appli'] = Application::getInfo();
$this->setSortie(self::RENDU_PIED, $this->getVue('pied', $donnees));
}
}
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/controleurs/Carte.php
New file
0,0 → 1,93
<?php
// declare(encoding='UTF-8');
/**
* classe Controleur du module Carte.
*
* @package Collection
* @category Php5
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @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 SVN: $Id$
*/
class Carte extends aControleur {
//+----------------------------------------------------------------------------------------------------------------+
// Méthodes
/**
* Fonction d'affichage par défaut, elle appelle la liste des administrateurs
*/
public function executerActionParDefaut() {
return $this->cartographier();
}
/**
* Cartographier les collections.
* @return string la vue correspondante
*/
public function cartographier() {
// Initialisation de variable
$donnees = array();
// Création de la carte
$options = array(
'carte_nom' => Config::get('carte_genere_nom'),
'formule' => Cartographie::FORMULE_PROPORTIONNEL,
'couleur_claire' => Config::get('carte_couleur_claire'),
'couleur_foncee' => Config::get('carte_couleur_foncee'),
'fond_fichier' => Config::get('carte_base_nom'),
'fond_dossier' => Application::getChemin().Config::get('carte_fonds_chemin'),
'stock_dossier' => Config::get('carte_sotckage_chemin'),
'stock_url' => Config::get('carte_sotckage_url'),
'debug' => Config::get('carte_mode_debug'));
$cartographie = Composant::fabrique('cartographie', $options);
// Construction des données nécessaires à la cartographie
$zones = $cartographie->getCarteZones();
$this->chargerZonesNbre($zones);
$this->chargerZonesUrls($zones);
$cartographie->setCarteZones($zones);
//Debug::printr($zones);
$cartographie->creerCarte();
$donnees['map'] = $cartographie->getImageMap();
//$donnees['i18n'] = I18n::get('carte');
$resultat = $this->getVue('carte', $donnees);
$this->setSortie(self::RENDU_CORPS, $resultat);
$this->chargerPiedDePage();
}
private function chargerZonesNbre(&$zones) {
$paca = array("04" => '', "05" => '', "06" => '', 13 => '', 83 => '', 84 => '');
$structureDao = new StructureDao();
$zones_infos = $structureDao->getStructureParZoneGeo('FRD');
foreach ($zones as $id => &$infos) {
if ($this->registre->get('contexte') == 'paca') {
if (isset($zones_infos[$id]) && isset($paca[$id])) {
$nbre = $zones_infos[$id];
$infos['info_nombre'] = $nbre;
} else {
$infos['info_nombre'] = 0;
}
} else {
if (isset($zones_infos[$id])) {
$nbre = $zones_infos[$id];
$infos['info_nombre'] = $nbre;
} else {
$infos['info_nombre'] = 0;
}
}
}
}
private function chargerZonesUrls(&$zones) {
$url = $this->obtenirUrlRecherche('str-d:%s');
foreach ($zones as $id => &$infos) {
$infos['url'] = sprintf($url, $id);
}
}
}
?>
/tags/v1.8-irancy/controleurs/Fiche.php
New file
0,0 → 1,61
<?php
// declare(encoding='UTF-8');
/**
* Classe mère des Controleurs des modules présentant des Fiches.
*
* @package Collection
* @category Php 5.2
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @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 SVN: $Id$
*/
abstract class Fiche extends aControleur {
protected $structureDao = null;
protected $collectionDao = null;
protected $personneDao = null;
public function __construct() {
parent::__construct();
$this->structureDao = new StructureDao();
$this->collectionDao = new CollectionDao();
$this->personneDao = new PersonneDao();
}
// +---------------------------------------------------------------------------------------------------------------+
// MÉTHODES GÉNÉRIQUES
protected function obtenirNomCompletPersonne($personne_id) {
$personne_nom = $this->personneDao->getPersonneNomComplet($personne_id);
return $personne_nom;
}
protected function obtenirCourrielsPersonne($personne_id) {
$courriels = $this->personneDao->getPersonneCourriels($personne_id);
$courriels = $this->traiterTxtTruck($courriels);
$courriels = $this->formaterCourriels($courriels);
return $courriels;
}
protected function traiterDonneesElementAPublication(&$publications) {
foreach ($publications as &$publication) {
$publication['_editeur_'] = $this->construireTxtTruck($publication['cpu_ce_truk_editeur']);
$publication['_date_parution_'] = rtrim($publication['cpu_date_parution'],'-00-00');
}
}
protected function traiterMetaDonnees(&$donnees) {
$meta = array();
$meta['_guid_'] = $donnees['_guid_'];
$meta['_guid_url_'] = $this->obtenirPermalienGuid($donnees['_guid_']);
$meta['_notes_'] = $donnees['cmhl_notes'];
$meta['_source_'] = $donnees['cmhl_source'];
$meta['_date_modification_'] = $donnees['cmhl_date_modification'];
$meta['_modifier_par_'] = $this->obtenirNomCompletPersonne($donnees['cmhl_ce_modifier_par']);
$meta['_modifier_par_courriel_'] = $this->obtenirCourrielsPersonne($donnees['cmhl_ce_modifier_par']);
$meta['_etat_'] = $this->construireTxtListeOntologie($donnees['cmhl_ce_etat']);
return $this->getVue('metadonnees', $meta);
}
}
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/controleurs/FicheStructure.php
New file
0,0 → 1,240
<?php
// declare(encoding='UTF-8');
/**
* Classe Controleur du module Fiche Structure.
*
* @category Php 5.2
* @package Collection
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @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 SVN: $Id: Fiche.php 96 2010-06-21 16:46:31Z jpm $
*/
class FicheStructure extends Fiche {
private $donnees = array();
//+----------------------------------------------------------------------------------------------------------------+
// Méthodes
/**
* Fonction d'affichage par défaut
*/
public function executerActionParDefaut() {
return $this->afficherStructure();
}
// +---------------------------------------------------------------------------------------------------------------+
// FICHE STRUCTURE
public function afficherStructure() {
// Gestion des actions par défaut
$this->executerAction('Recherche', 'chargerMoteurRecherche');
// Gestion des données de la requête
if (!isset($_GET['id'])) {
} else {
// Gestion des données
$this->donnees['id'] = $_GET['id'];
$this->donnees['info'] = $this->structureDao->getStructure($this->donnees['id']);
 
$this->traiterDonneesStructure($this->donnees['info']);
$this->creerPaginationPersonnel($this->donnees['id']);
$this->traiterDonneesStructureConservation($this->donnees['info']);
$this->traiterDonneesStructureValorisation($this->donnees['info']);
$this->creerPaginationCollections($this->donnees['id']);
$this->postraiterDonnees($this->donnees);
$this->donnees['metadonnees'] = $this->traiterMetaDonnees($this->donnees['info']);
// Création des méta-données de la page
$titre = $this->donnees['info']['cs_nom'];
$description = $this->donnees['info']['cs_description'];
$tags = "Structure, id:{$this->donnees['id']}, {$this->donnees['info']['_guid_']}";
// Envoie à la sortie
//Debug::printr($donnees);
$this->setSortie(self::META_TITRE, $titre);
$this->setSortie(self::META_DESCRIPTION, $description);
$this->setSortie(self::META_TAGS, $tags);
$this->setSortie(self::RENDU_CORPS, $this->getVue('fiche_structure', $this->donnees));
$this->chargerPiedDePage();
}
}
private function traiterDonneesStructure(&$donnees) {
// liste 01 : Liste des états des enregistrements de la base de données
Ontologie::chargerListe(1001);
// liste 12 : Liste des types de structure privé
Ontologie::chargerListe(1015);
// liste 13 : Liste des types de structure public
Ontologie::chargerListe(1016);
// liste 71 : Liste des pays du standard ISO-3166-1
Ontologie::chargerListe(1074);
$guid_id_valeur = Config::get('guid_id_structure').$donnees['cs_id_structure'];
$donnees['_guid_'] = sprintf(Config::get('guid'), $guid_id_valeur);
$donnees['_date_fondation_'] = $this->formaterDate($donnees['cs_date_fondation'], aControleur::FMT_DATE);
$donnees['_nbre_personne_'] = (empty($donnees['cs_nbre_personne'])) ? '' : $donnees['cs_nbre_personne'];
$donnees['_acronyme_'] = $this->construireTxtTruck($donnees['cs_truk_identifiant_alternatif']);
$donnees['_telephone_fax_'] = $this->construireTxtTruck($donnees['cs_truk_telephone']);
$donnees['_type_prive_'] = $this->construireTxtListeOntologie($donnees['cs_ce_truk_type_prive']);
$donnees['_type_public_'] = $this->construireTxtListeOntologie($donnees['cs_ce_truk_type_public']);
$donnees['_region_'] = Ontologie::getValeurNom($donnees['cs_ce_truk_region']);
$donnees['_pays_'] = $this->construireTxtListeOntologie($donnees['cs_ce_truk_pays']);
$donnees['_web_'] = $this->construireTxtTruckSansMajuscule($donnees['cs_truk_url']);
$donnees['_courriel_'] = $this->formaterCourriels($donnees['cs_courriel']);
$latitude = $donnees['cs_latitude'];
$longitude = $donnees['cs_longitude'];
$donnees['_latitude_longitude_'] = ($longitude != '' && $latitude != '') ? "$latitude / $longitude" : '';
$donnees['_latitude_dcm_en_'] = ($latitude != '') ? str_replace(',', '.', $latitude) : '';
$donnees['_longitude_dcm_en_'] = ($longitude != '') ? str_replace(',', '.', $longitude) : '';
$donnees['_lien_carte_'] = sprintf(Config::get('lien_vers_carte'), $donnees['_latitude_dcm_en_'], $donnees['_longitude_dcm_en_']);
$donnees['_url_img_carte_'] = sprintf(Config::get('url_img'), Config::get('img_carte'));
}
private function traiterDonneesStructureConservation(&$donnees) {
// liste 15 : Liste des types de local de stockage de collections
Ontologie::chargerListe(1018);
// liste 16 : Liste des types de mobilier de stockage de collections
Ontologie::chargerListe(1019);
// liste 17 : Liste des paramètres de contrôle environnemental d'un local
Ontologie::chargerListe(1020);
// liste 18 : Liste des types de collection non botanique
Ontologie::chargerListe(1021);
// liste 19 : Liste des types d'opération de restauration pour les collections botaniques
Ontologie::chargerListe(1022);
// liste 20 : Liste oui/non/en partie
Ontologie::chargerListe(1023);
// liste 21 : Liste du matériel dit de nom conservation des parts d'herbier
Ontologie::chargerListe(1024);
$donnees['_formation_'] = $this->formaterOuiNon($donnees['csc_mark_formation']);
$donnees['_formation_info_'] = $this->formaterParenthese($donnees['csc_formation']);
$donnees['_formation_info_'] = $this->formaterSautDeLigne($donnees['_formation_info_']);
$donnees['_formation_interet_'] = $this->formaterOuiNon($donnees['csc_mark_formation_interet']);
$donnees['_stockage_local_'] = $this->construireTxtListeOntologie($donnees['csc_truk_stockage_local']);
$donnees['_stockage_meuble_'] = $this->construireTxtListeOntologie($donnees['csc_truk_stockage_meuble']);
$donnees['_stockage_parametre_'] = $this->construireTxtListeOntologie($donnees['csc_truk_stockage_parametre']);
$donnees['_collection_commune_'] = $this->formaterOuiNon($donnees['csc_mark_collection_commune']);
$donnees['_collection_commune_autre_'] = $this->construireTxtListeOntologie($donnees['csc_truk_collection_autre']);
$donnees['_collection_commune_autre_'] = $this->formaterParenthese($donnees['_collection_commune_autre_']);
$donnees['_acces_controle_'] = $this->formaterOuiNon($donnees['csc_mark_acces_controle']);
$donnees['_restauration_'] = $this->formaterOuiNon($donnees['csc_mark_restauration']);
$donnees['_restauration_operation_'] = $this->construireTxtListeOntologie($donnees['csc_truk_restauration_operation']);
$donnees['_restauration_operation_'] = $this->formaterParenthese($donnees['_restauration_operation_']);
$donnees['_materiel_conservation_'] = $this->construireTxtListeOntologie($donnees['csc_ce_materiel_conservation']);
$donnees['_materiel_autre_'] = $this->construireTxtListeOntologie($donnees['csc_truk_materiel_autre']);
$donnees['_materiel_autre_'] = $this->formaterParenthese($donnees['_materiel_autre_']);
$donnees['_traitement_'] = $this->formaterOuiNon($donnees['csc_mark_traitement']);
$donnees['_traitement_liste_'] = $this->construireTxtListeOntologie($donnees['csc_truk_traitement']);
$donnees['_traitement_liste_'] = $this->formaterParenthese($donnees['_traitement_liste_']);
$donnees['_acquisition_collection_'] = $this->formaterOuiNon($donnees['csc_mark_acquisition_collection']);
$donnees['_acquisition_echantillon_'] = $this->formaterOuiNon($donnees['csc_mark_acquisition_echantillon']);
if ($donnees['csc_mark_acquisition_echantillon'] == '1') {
$donnees['_acquisition_traitement_'] = $this->formaterOuiNon($donnees['csc_mark_acquisition_traitement']);
if ($donnees['csc_mark_acquisition_traitement'] == '1') {
$donnees['_acquisition_traitement_poison_'] = $this->construireTxtListeOntologie($donnees['csc_truk_acquisition_traitement_poison']);
$donnees['_acquisition_traitement_insecte_'] = $this->construireTxtListeOntologie($donnees['csc_truk_acquisition_traitement_insecte']);
}
}
}
private function traiterDonneesStructureValorisation(&$donnees) {
// liste 24 : Liste des actions de valorisation des collections
Ontologie::chargerListe(1027);
// liste 25 : Liste des continents habités incluant aussi le pays France
Ontologie::chargerListe(1028);
// liste 26 : Liste des types de recherche nécessitant la consultation de collection botanique
Ontologie::chargerListe(1029);
$donnees['_action_'] = $this->formaterOuiNon($donnees['csv_mark_action']);
$donnees['_action_info_'] = $this->construireTxtListeOntologie($donnees['csv_truk_action']);
$donnees['_action_info_'] = $this->formaterParenthese($donnees['_action_info_']);
$donnees['_collection_autre_'] = $this->construireTxtListeOntologie($donnees['csv_collection_autre']);
$donnees['_action_future_'] = $this->formaterOuiNon($donnees['csv_mark_action_future']);
$donnees['_action_future_info_'] = $this->formaterParenthese($donnees['csv_action_future']);
$donnees['_recherche_'] = $this->formaterOuiNon($donnees['csv_mark_recherche']);
if ($donnees['csv_mark_recherche'] == '1') {
$donnees['_recherche_provenance_'] = $this->construireTxtListeOntologie($donnees['csv_truk_recherche_provenance']);
$donnees['_recherche_type_'] = $this->construireTxtListeOntologie($donnees['csv_truk_recherche_type']);
}
$donnees['_acces_ss_motif_'] = $this->formaterOuiNon($donnees['csv_mark_acces_ss_motif']);
$donnees['_acces_ss_motif_info_'] = $this->formaterParenthese($donnees['csv_acces_ss_motif']);
$donnees['_visite_avec_motif_'] = $this->formaterOuiNon($donnees['csv_mark_visite_avec_motif']);
$donnees['_visite_avec_motif_info_'] = $this->formaterParenthese($donnees['csv_visite_avec_motif']);
}
private function creerPaginationCollections($id_structure) {
// Gestion du nombre de résultats
$donnees_total = $this->collectionDao->getNbreParIdStructure($id_structure);
// Gestion du fragmenteur
$urlFiche = $this->obtenirObjetUrlFicheStructure($id_structure);
$options = array(
'url' => $urlFiche,
'donnees_total' => $donnees_total,
'donnees_par_page' => Config::get('resultat_par_page_defaut'),
'donnees_par_page_choix' => Config::get('resultat_par_page_choix'),
);
$fragmenteur = Composant::fabrique('fragmenteur', $options);
$this->donnees['collectionsFrag'] = $fragmenteur->executer();
list($de, $a) = $fragmenteur->getDeplacementParPageId();
$this->url->unsetVariablesRequete(array('page'));
 
// Gestion de l'accès aux données
$this->collectionDao->setLimitation(($de - 1), $fragmenteur->getDonneesParPage());
$this->collectionDao->setDistinction(1);
$this->donnees['collections'] = $this->collectionDao->getParIdStructure($id_structure);
$this->traiterDonneesStructureCollections($this->donnees['collections']);
}
 
private function traiterDonneesStructureCollections(&$collections) {
foreach ($collections as &$collection) {
$collection['_url_'] = $this->obtenirUrlFicheCollection($collection['cc_id_collection']);
}
}
private function creerPaginationPersonnel($id_structure) {
// Gestion du nombre de résultats
$donnees_total = $this->structureDao->getNbrePersonnel($id_structure);
// Gestion du fragmenteur
$urlFiche = $this->obtenirObjetUrlFicheStructure($id_structure);
$options = array(
'url' => $urlFiche,
'donnees_total' => $donnees_total,
'donnees_par_page' => Config::get('resultat_par_page_defaut'),
'donnees_par_page_choix' => Config::get('resultat_par_page_choix'),
);
$fragmenteur = Composant::fabrique('fragmenteur', $options);
$this->donnees['personnelFrag'] = $fragmenteur->executer();
list($de, $a) = $fragmenteur->getDeplacementParPageId();
$this->url->unsetVariablesRequete(array('page'));
 
// Gestion de l'accès aux données
$this->structureDao->setLimitation(($de - 1), $fragmenteur->getDonneesParPage());
$this->structureDao->setDistinction(1);
$this->donnees['personnel'] = $this->structureDao->getPersonnel($id_structure);
$this->traiterPersonnel($this->donnees['personnel']);
}
private function traiterPersonnel(&$donnees) {
// liste 09 : Liste des fonctions d'une personne au sein d'une structure
Ontologie::chargerListe(1012);
// liste 10 : Liste des statuts d'une personne au sein d'une structure
Ontologie::chargerListe(1013);
foreach ($donnees as &$personnel) {
$personnel['_fonction_'] = $this->construireTxtListeOntologie($personnel['csap_ce_truk_fonction']);
$personnel['_statut_'] = $this->construireTxtListeOntologie($personnel['csap_ce_truk_statut']);
$personnel['_tel_fax_'] = $this->construireTxtListeOntologie($personnel['cp_truk_telephone']);
$personnel['_courriel_'] = $this->traiterTxtTruck($personnel['cp_truk_courriel']);
$personnel['_courriel_'] = $this->formaterCourriels($personnel['_courriel_']);
$personnel['_contact_'] = $this->formaterOuiNon($personnel['csap_mark_contact']);
$personnel['_specialite_'] = $this->construireTxtListeOntologie($personnel['cp_ce_truk_specialite']);
$personnel['_url_'] = $this->obtenirUrlFichePersonne($personnel['csap_id_personne']);
}
}
}
/tags/v1.8-irancy/controleurs/Syndication.php
New file
0,0 → 1,46
<?php
// declare(encoding='UTF-8');
/**
* classe Controleur du module Syndication.
*
* @package Collection
* @category Php5
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @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 SVN: $Id$
*/
class Syndication extends aControleur {
//+----------------------------------------------------------------------------------------------------------------+
// Méthodes
/**
* Fonction d'affichage par défaut
*/
public function executerActionParDefaut() {
return $this->afficher();
}
/**
* Cartographier les collections.
* @return string la vue correspondante
*/
public function afficher() {
// Initialisation de variable
$donnees = array();
// Récupération des infos sur les flux disponibles
$syndicationDao = new SyndicationDao();
$donnees['syndications'] = $syndicationDao->getListeDesFlux();
// Limitation des entrées des flux
$donnees['limite'] = Config::get('flux_limite');
// Traitement du squelette et retour
$resultat = $this->getVue('syndication', $donnees);
$this->setSortie(self::RENDU_CORPS, $resultat);
$this->chargerPiedDePage();
}
}
?>
/tags/v1.8-irancy/controleurs/FichePersonne.php
New file
0,0 → 1,215
<?php
// declare(encoding='UTF-8');
/**
* Classe Controleur du module Fiche Personne.
*
* @category Php 5.2
* @package Collection
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @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 SVN: $Id: Fiche.php 96 2010-06-21 16:46:31Z jpm $
*/
class FichePersonne extends Fiche {
private $donnees = array();
//+----------------------------------------------------------------------------------------------------------------+
// Méthodes
/**
* Fonction d'affichage par défaut
*/
public function executerActionParDefaut() {
return $this->afficherPersonne();
}
// +---------------------------------------------------------------------------------------------------------------+
// FICHE PERSONNE
public function afficherPersonne() {
// Gestion des actions par défaut
$this->executerAction('Recherche', 'chargerMoteurRecherche');
// Gestion des données de la requête
if (!isset($_GET['id'])) {
} else {
// Récupération des données
$this->donnees['id'] = $_GET['id'];
$this->donnees['info'] = $this->personneDao->getPersonne($this->donnees['id']);
// Création des paginations
$this->creerPaginationPublications($this->donnees['id']);
$this->creerPaginationCollections($this->donnees['id']);
$this->creerPaginationStructures($this->donnees['id']);
// Traitement des données
$this->traiterDonneesPersonne($this->donnees['info']);
$this->traiterDonneesPersonneAPublication($this->donnees['publications']);
$this->traiterDonneesPersonneACollection($this->donnees['collections']);
$this->traiterDonneesPersonneAStructure($this->donnees['structures']);
$this->postraiterDonnees($this->donnees);
$this->donnees['metadonnees'] = $this->traiterMetaDonnees($this->donnees['info']);
// Création des méta-données de la page
$this->definirMetadonneesPageWeb();
// Envoie à la sortie
//Debug::printr($donnees);
$this->setSortie(self::RENDU_CORPS, $this->getVue('fiche_personne', $this->donnees));
$this->chargerPiedDePage();
}
}
private function creerPaginationPublications($id_personne) {
// Gestion du nombre de résultats
$donnees_total = $this->personneDao->getNbrePublicationsLiees($id_personne);
// Gestion du fragmenteur
$urlFiche = $this->obtenirObjetUrlFichePersonne($id_personne);
$options = array(
'url' => $urlFiche,
'donnees_total' => $donnees_total,
'donnees_par_page' => Config::get('resultat_par_page_defaut'),
'donnees_par_page_choix' => Config::get('resultat_par_page_choix'),
);
$fragmenteur = Composant::fabrique('fragmenteur', $options);
$this->donnees['publicationsFrag'] = $fragmenteur->executer();
list($de, $a) = $fragmenteur->getDeplacementParPageId();
$this->url->unsetVariablesRequete(array('page'));
 
// Gestion de l'accès aux données
$this->personneDao->setLimitation(($de - 1), $fragmenteur->getDonneesParPage());
$this->personneDao->setDistinction(1);
$this->donnees['publications'] = $this->personneDao->getPublicationsLiees($id_personne);
}
private function creerPaginationCollections($id_personne) {
// Gestion du nombre de résultats
$donnees_total = $this->personneDao->getNbreCollectionsLiees($id_personne);
// Gestion du fragmenteur
$urlFiche = $this->obtenirObjetUrlFichePersonne($id_personne);
$options = array(
'url' => $urlFiche,
'donnees_total' => $donnees_total,
'donnees_par_page' => Config::get('resultat_par_page_defaut'),
'donnees_par_page_choix' => Config::get('resultat_par_page_choix'),
);
$fragmenteur = Composant::fabrique('fragmenteur', $options);
$this->donnees['collectionsFrag'] = $fragmenteur->executer();
list($de, $a) = $fragmenteur->getDeplacementParPageId();
$this->url->unsetVariablesRequete(array('page'));
 
// Gestion de l'accès aux données
$this->personneDao->setLimitation(($de - 1), $fragmenteur->getDonneesParPage());
$this->personneDao->setDistinction(1);
$this->donnees['collections'] = $this->personneDao->getCollectionsLiees($id_personne);
}
private function creerPaginationStructures($id_personne) {
// Gestion du nombre de résultats
$donnees_total = $this->personneDao->getNbreStructuresLiees($id_personne);
// Gestion du fragmenteur
$urlFiche = $this->obtenirObjetUrlFichePersonne($id_personne);
$options = array(
'url' => $urlFiche,
'donnees_total' => $donnees_total,
'donnees_par_page' => Config::get('resultat_par_page_defaut'),
'donnees_par_page_choix' => Config::get('resultat_par_page_choix'),
);
$fragmenteur = Composant::fabrique('fragmenteur', $options);
$this->donnees['structuresFrag'] = $fragmenteur->executer();
list($de, $a) = $fragmenteur->getDeplacementParPageId();
$this->url->unsetVariablesRequete(array('page'));
 
// Gestion de l'accès aux données
$this->personneDao->setLimitation(($de - 1), $fragmenteur->getDonneesParPage());
$this->personneDao->setDistinction(1);
$this->donnees['structures'] = $this->personneDao->getStructuresLiees($id_personne);
}
private function traiterDonneesPersonne(&$donnees) {
// Liste des préfixes
Ontologie::chargerListe(1004);
// Liste des suffixes
Ontologie::chargerListe(1005);
// Liste tel:
Ontologie::chargerListe(1007);
// Liste sexe:
Ontologie::chargerListe(1067);
// liste 77 : Liste indéterminé/oui/non
Ontologie::chargerListe(1080);
// Liste des types de publication vis à vis d'une personne
//relationPersonnePublication:1065,
$guid_id_valeur = Config::get('guid_id_personne').$donnees['cp_id_personne'];
$donnees['_guid_'] = sprintf(Config::get('guid'), $guid_id_valeur);
$donnees['_sexe_'] = $this->construireTxtListeOntologie($donnees['cp_ce_sexe']);
$donnees['_prefixe_'] = $this->construireTxtListeOntologie($donnees['cp_ce_truk_prefix']);
$donnees['_suffixe_'] = $this->construireTxtListeOntologie($donnees['cp_ce_truk_suffix']);
$donnees['_autre_noms_'] = $this->construireTxtTruck($donnees['cp_truk_nom_autre']);
$donnees['_autre_abreviations_'] = $this->construireTxtTruck($donnees['cp_truk_abreviation_autre']);
$donnees['_deces_'] = $this->construireTxtListeOntologie($donnees['cp_ce_deces']);
$donnees['_naissance_date_'] = $this->formaterDate($donnees['cp_naissance_date'], aControleur::FMT_DATE);
$donnees['_deces_date_'] = $this->formaterDate($donnees['cp_deces_date'], aControleur::FMT_DATE, '');
$donnees['_telephones_'] = $this->construireTxtListeOntologie($donnees['cp_truk_telephone']);
$donnees['_courriels_'] = $this->traiterTxtTruck($donnees['cp_truk_courriel']);
$donnees['_courriels_'] = $this->formaterCourriels($donnees['_courriels_']);
$donnees['_sites_web_'] = $this->getTableauTruck($donnees['cp_truk_url']);
$donnees['_image_principale_url_'] = $this->getTxtTruckParPosition($donnees['cp_truk_logo'], 1);
$donnees['_region_'] = $this->construireTxtListeOntologie($donnees['cp_ce_truk_region']);
$donnees['_pays_'] = $this->construireTxtListeOntologie($donnees['cp_ce_truk_pays']);
$donnees['_specialites_'] = $this->construireTxtListeOntologie($donnees['cp_ce_truk_specialite']);
$donnees['_recoltes_'] = $this->construireTxtListeOntologie($donnees['cp_truk_recolte']);
$donnees['_logos_'] = $this->getTableauTruck($donnees['cp_truk_logo']);
}
private function traiterDonneesPersonneAPublication(&$publications) {
$this->traiterDonneesElementAPublication($publications);
// liste 62 : Liste des types de publication vis à vis d'une personne
Ontologie::chargerListe(1065);
foreach ($publications as &$publication) {
$publication['_role_'] = $this->construireTxtListeOntologie($publication['cpuap_id_role']);
}
}
private function traiterDonneesPersonneACollection(&$collections) {
// liste 27 : Liste des relations entre une collection et une personne
Ontologie::chargerListe(1030);
foreach ($collections as &$collection) {
$collection['_role_'] = $this->construireTxtListeOntologie($collection['ccap_id_role']);
$collection['_url_'] = $this->obtenirUrlFicheCollection($collection['ccap_id_collection']);
}
}
private function traiterDonneesPersonneAStructure(&$structures) {
// liste 09 : Liste des fonctions d'une personne au sein d'une structure
Ontologie::chargerListe(1012);
// liste 10 : Liste des statuts d'une personne au sein d'une structure
Ontologie::chargerListe(1013);
foreach ($structures as &$structure) {
$structure['_fonction_'] = $this->construireTxtListeOntologie($structure['csap_ce_truk_fonction']);
$structure['_statut_'] = $this->construireTxtListeOntologie($structure['csap_ce_truk_statut']);
$structure['_url_'] = $this->obtenirUrlFicheStructure($structure['csap_id_structure']);
}
}
private function definirMetadonneesPageWeb() {
$titre = $this->donnees['info']['cp_fmt_nom_complet'];
$description = $this->donnees['info']['cp_description'];
$tags = "Botaniste, naturaliste, personne, id:{$this->donnees['id']}, {$this->donnees['info']['_guid_']}";
// Envoie à la sortie
$this->setSortie(self::META_TITRE, $titre);
$this->setSortie(self::META_DESCRIPTION, $description);
$this->setSortie(self::META_TAGS, $tags);
}
}
/tags/v1.8-irancy/controleurs/Recherche.php
New file
0,0 → 1,282
<?php
// declare(encoding='UTF-8');
/**
* classe Controleur du module Recherche.
*
* @package Collection
* @category Php5
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @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 SVN: $Id$
*/
class Recherche extends aControleur {
//private $chaine_recherche = null;
private $masque = null;
private static $url_exemple = null;
//+----------------------------------------------------------------------------------------------------------------+
// Méthodes
/**
* Fonction d'affichage par défaut, elle appelle la liste des administrateurs
*/
public function executerActionParDefaut() {
return $this->rechercher();
}
/**
* Charge le moteur de recherche et l'envoie à la vue.
*/
public function chargerMoteurRecherche() {
$donnees = array();
// Gestion des données de la requête
//$donnees['recherche'] = htmlspecialchars($this->obtenirChaineRecherche());
// masque multi-critères
$donnees['masque'] = $this->obtenirMasqueRecherche();
 
// Gestion des urls
$donnees['url_form'] = $this->obtenirUrlRecherche();
$donnees['url_module'] = 'Recherche';
$donnees['url_action'] = 'rechercher';
$donnees['url_contexte'] = $this->registre->get('contexte');
self::$url_exemple = $this->obtenirUrlRecherche('%s');
// remplissage de case de tableaux vides pour éviter des warnings
$donnees['masque'] = $this->initialiserMasquesVides($donnees['masque']);
//echo '<pre>'.print_r($donnees['masque'],true).'</pre>';exit;
// Gestion du squelette et de la sortie
$this->setSortie(self::RENDU_TETE, $this->getVue('moteur', $donnees));
}
 
private function obtenirMasqueRecherche() {
$masque = array();
if (!is_null($this->masque)) {
$masque = $this->masque;
} else if (isset($_GET['masque'])) {
$masque = $_GET['masque'];
$_SESSION['col']['masque'] = $masque;
} else if (isset($_SESSION['col']['masque'])) {
$masque = $_SESSION['col']['masque'];
}
$this->masque = $masque;
return $masque;
}
 
/*private function obtenirChaineRecherche() {
$chaine = '';
if (!is_null($this->chaine_recherche)) {
$chaine = $this->chaine_recherche;
} else if (isset($_GET['recherche'])) {
// Pré-traitement de la chaine de recherche
$chaine = $_GET['recherche'];
// Suppression des slash ajouté automatiquement par PHP devant les guillemets
$chaine = stripslashes($chaine);
// Mémorisation de la chaine
$this->memoriserChaineRecherche($chaine);
// Stockage dans la classe pour éviter d'effectuer à nouveau le traitement ci-dessus
$this->chaine_recherche = $chaine;
} else if (isset($_SESSION['col']['recherche'])) {
$chaine = $_SESSION['col']['recherche'];
}
return $chaine;
}*/
 
/*private function memoriserChaineRecherche($chaine) {
$_SESSION['col']['recherche'] = $chaine;
}*/
 
public static function getUrlExemple($chaine) {
$url = '';
if (!is_null(self::$url_exemple)) {
// L'utilisation d'urlencode nécessiate de pré-encodé la chaine dans le format de sortie si nécessaire
if (Config::get('sortie_encodage') != Config::get('appli_encodage')) {
$chaine = mb_convert_encoding($chaine, Config::get('sortie_encodage'), Config::get('appli_encodage'));
}
$chaine = urlencode($chaine);
$url = sprintf(self::$url_exemple, $chaine);
}
return $url;
}
 
// recherche des collections ou des personnes, dépendemment de la cible
public function rechercher() {
// un seul pour les collections ou les personnes, on ne cherche pas 2 choses à la fois !
$masque = $this->obtenirMasqueRecherche();
 
$donnees = array();
$donnees['masque'] = $masque;
$rechercheDao = new RechercheDao();
$parametres = array('mots' => '*');
// Récupération des paramêtres de l'url
/*$chaine_de_recherche = $this->obtenirChaineRecherche();
echo "CH RECH: $chaine_de_recherche<br/>";
if (!empty($chaine_de_recherche)) {
$this->url->setVariableRequete('recherche', $chaine_de_recherche);
}
$parametres = $this->parserChaineDeRecherche($chaine_de_recherche);*/
 
// Récupération des paramètres depuis le masque
$parametres = $masque;
 
$this->remplacerAbreviationParId($parametres);
//echo "PARAM 2: <pre>" . print_r($parametres, true) . "</pre><br/>";
// Gestion du nombre de résultats
switch ($masque['cible']) {
case 'collections':
$donnees_total = $rechercheDao->chercherCollectionsNbre($parametres);
break;
case 'personnes':
$donnees_total = $rechercheDao->chercherPersonnesNbre($parametres);
break;
default:
// @TODO qu'est-ce qui se passe ?
}
 
// Gestion du fragmenteur
$options = array(
'url' => $this->url,
'donnees_total' => $donnees_total,
'donnees_par_page' => Config::get('resultat_par_page_defaut'),
'donnees_par_page_choix' => Config::get('resultat_par_page_choix'),
);
$fragmenteur = Composant::fabrique('fragmenteur', $options);
$donnees['fragmenteur'] = $fragmenteur->executer();
list($de, $a) = $fragmenteur->getDeplacementParPageId();
$this->url->unsetVariablesRequete(array('recherche', 'page'));
 
// Gestion de l'accès aux données
$rechercheDao->setLimitation(($de - 1), $fragmenteur->getDonneesParPage());
$rechercheDao->setDistinction(1);
// Récupération des résultats
switch ($masque['cible']) {
case 'collections':
$resultats = $rechercheDao->chercherCollections($parametres);
break;
case 'personnes':
$resultats = $rechercheDao->chercherPersonnes($parametres);
break;
default:
}
 
// Affichage de la liste de résultats
switch ($masque['cible']) {
case 'collections':
foreach ($resultats as $resultat) {
// Ajout des données concernant la structure si ce n'est pas déjà fait
$structure_id = $resultat['cs_id_structure'];
if (!isset($donnees['infos'][$structure_id])) {
$structure = array(
'nom' => $resultat['cs_nom'],
'ville' => $resultat['cs_ville'],
'url' => $this->obtenirUrlFicheStructure($resultat['cs_id_structure'])
);
$donnees['infos'][$structure_id]['structure'] = $structure;
}
// Si la structure possède des collections
if (!empty($resultat['cc_id_collection'])) {
$collection = array(
'nom' => $resultat['cc_nom'],
'url' => $this->obtenirUrlFicheCollection($resultat['cc_id_collection'])
);
$donnees['infos'][$structure_id]['collections'][] = $collection;
}
}
break;
 
case 'personnes':
foreach ($resultats as $resultat) {
//echo "<pre>".print_r($resultat,true)."</pre>";
if (!empty($resultat['cp_id_personne'])) {
$personne = array(
'nomcomplet' => $resultat['cp_fmt_nom_complet'],
'nom' => $resultat['cp_nom'],
'prenom' => $resultat['cp_prenom'],
'url' => $this->obtenirUrlFichePersonne($resultat['cp_id_personne'])
);
$donnees['infos']['personnes'][] = $personne;
}
}
break;
 
default:
}
 
// Post-traitement des résultats pour l'affichage
$this->postraiterDonnees($donnees['infos']);
// Gestion des squelettes
$this->chargerMoteurRecherche();
$resultat = $this->getVue('resultat', $donnees);
$this->setSortie(self::RENDU_CORPS, $resultat);
$this->chargerPiedDePage();
}
private function initialiserMasquesVides($masque) {
$masques_possibles = array('lieu-stockage',
'veg','zg','bot','p','pr','nom-famille','date-vivant','date-deces','adresse');
foreach($masques_possibles as $masque_possible) {
if(!isset($masque[$masque_possible])) {
$masque[$masque_possible] = '';
}
}
return $masque;
}
/*private function parserChaineDeRecherche($chaine) {
$mots = preg_split('/ /i', $chaine, -1, PREG_SPLIT_NO_EMPTY);
$parametres = array('mots' => '');
$cle_precedente = null;
foreach ($mots as $mot) {
if (preg_match('/^(sci|veg|bot|zg|p|pr|str-d):(.*)$/', $mot, $match)) {
$cle = $match[1];
$cle_precedente = $cle;
$valeur = $match[2];
$parametres[$cle] = $valeur;
} else if (!is_null($cle_precedente)) {
$parametres[$cle_precedente] .= ' '.$mot;
} else if (is_null($cle_precedente)) {
if (empty($parametres['mots'])) {
$parametres['mots'] = $mot;
} else {
$parametres['mots'] .= ' '.$mot;
}
}
}
$this->remplacerAbreviationParId($parametres);
return $parametres;
}*/
 
private function remplacerAbreviationParId(&$parametres) {
// liste 27 : Liste des relations entre une collection et une personne (id:1030)
// liste 80 : Liste des types de collection botanique (id:1083)
$params_a_remplacer = array('veg' => 1043, 'bot' => 1083, 'pr' => 1030);
foreach ($params_a_remplacer as $param => $id_liste) {
if (isset($parametres[$param])) {
// Si plusieurs valeurs séparées par des virgules
$valeurs = explode(',', $parametres[$param]);
$valeurs_nbre = count($valeurs);
$liste = Ontologie::getListeTrieeParAbreviation($id_liste);
foreach ($valeurs as $valeur) {
$cle = strtoupper($valeur);
if (isset($liste[$cle])) {
if ($valeurs_nbre == 1) {
$parametres[$param] = $liste[$cle]['id'];
} else if ($valeurs_nbre > 1) {
$valeur = preg_quote($valeur, '/');
$parametres[$param] = preg_replace("/$valeur/", $liste[$cle]['id'], $parametres[$param]);
}
}
}
}
}
}
}
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/i18n/en.ini
New file
0,0 → 1,3
carte.titre.avertissement = Disclaimer :
[carte]
titre.principal = Map of the structures hosting collections
/tags/v1.8-irancy/i18n/fr.ini
New file
0,0 → 1,3
[carte]
titre = Carte des structures hébergeant des collections
titre.avertissement = Avertissement et déni de responsabilité :
/tags/v1.8-irancy/collection.php
New file
0,0 → 1,54
<?php
// declare(encoding='UTF-8');
/**
* Application de consultation des Collections.
* Fichier principal d'initialisation.
*
* @category PHP5
* @package Collection
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @license GPL-v3 et CECILL-v2
* @version $Id$
*/
// Autoload pour cette application
function __autoload($nom_classe) {
// Tableau des chemins à inclure pour trouver une classe relatif à ce fichier
$chemins = array(
'bibliotheque'.DS.'dao',
'bibliotheque'.DS.'pear',
'bibliotheque'.DS.'utilitaires',
'controleurs',
'composants',
'composants'.DS.'cartographie');
foreach ($chemins as $chemin) {
$fichier_a_inclure = dirname(__FILE__).DS.$chemin.DS.$nom_classe.'.php';
if (file_exists($fichier_a_inclure)) {
include_once $fichier_a_inclure;
return null;
}
}
}
 
// Le fichier autoload.inc.php du Framework de Tela Botanica doit être appelée avant tout autre chose dans l'application.
// Sinon, rien ne sera chargé.
// Chemin du fichier chargeant le framework requis
$framework = dirname(__FILE__).'/framework.php';
if (!file_exists($framework)) {
$e = "Veuillez paramêtrer l'emplacement et la version du Framework dans le fichier $framework";
trigger_error($e, E_USER_ERROR);
} else {
// Inclusion du Framework
require_once(realpath($framework));
// Ajout d'information concernant cette application
Application::setChemin(__FILE__);// Obligatoire
Application::setInfo(Config::get('info'));
// Lancement du débogage si nécessaire
if (Config::get('chronometrage')) {
Chronometre::chrono('Collection.php - début');
}
// Lancement de l'application
AppControleur::initialiser();
}
?>
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/composants/cartographie/Cartographie.php
New file
0,0 → 1,635
<?php
// declare(encoding='UTF-8');
/**
* Composant Cartographie gérant les images représentant le fond de carte à insérer dans un fichier html contenant une
* image map.
* Avantage :
* - pas de base de données liée au composant (simplicité d'utilisation dans les applications)
* - facilite l'utilisation du Javascript et CSS pour intéragir avec la carte (affichage du nom des zones au survol)
* - l'application qui utilise le composant définie elle-même l'intéraction avec le clic sur une zone
* Inconvénient :
* - l'utilisation d'une balise map alourdie la page à renvoyer
*
* Il est possible de créer des fond de carte en vraies couleurs
* (16 millions de zones maxi sur la carte) ou en couleurs indexées (255 zones maxi sur la carte).
* Les couleurs réservées et a ne pas utiliser pour créer l'image png de fond sont :
* - le blanc (rvb : 255-255-255)
* - le noir (rvb : 0-0-0)
* - le gris (rvb : 128-128-128)
* - le rouge (rvb : 255-0-0)
* Pour activer le cache indiquer la date de dernière mise à jour des données servant à créer la carte de cette façon :
* $Carte->setCarteInfo(array('donnees_date_maj' => $date_maj_donnees));
*
* @category PHP5
* @package Collection
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @copyright 2010 Tela-Botanica
* @license GPL-v3 et CECILL-v2
* @version SVN:$Id$
*/
 
class Cartographie {
/*** Constantes : ***/
const FORMULE_PROPORTIONNEL = 'proportionnel';
const FORMULE_LEGENDE = 'legende';
 
//+----------------------------------------------------------------------------------------------------------------+
/*** Attributs : ***/
/**
* L'image de la carte.
* @var string l'image de la carte.
*/
private $carte;
/**
* Le nom du fichier contenant la carte sans l'extension.
* @var string le nom du fichier de la carte.
*/
private $carte_nom;
/**
* @var string le chemin et le nom du fichier de l'image de la carte générée.
*/
private $carte_fichier;
/**
* Tableaux associatif contenant les informations sur la carte.
* donnees_date_maj = date de dernière mise à jour des données servant à créer la carte, si plus récente que la carte
* déjà créée getCarteCache renvoie false.
*
* @var array le tableau des infos sur la carte.
*/
private $carte_info = array();
 
/**
* Indique si la carte existe déjà et à besoin ou pas d'être créée.
* @var bool true si la carte existe..
*/
private $carte_cache = false;
/**
* Le nom du fichier de la carte de fond.
* @var string nom du fichier de la carte de fond.
*/
private $carte_fond_fichier;
/**
* Le nom du dossier contenant les cartes de fond.
* @var string nom du dossier contenant les cartes de fond.
*/
private $carte_fond_dossier;
/**
* Le nom du dossier où stocker les cartes créer via la classe Cartographie.
* @var string nom du dossier contenant les cartes créées.
*/
private $carte_stockage_dossier;
/**
* L'url correspondant au dossier où sont stockées les cartes crées via la classe Cartographie.
* L'url est passé à la fonction sprintf est doit donc contennir %s afin d'indiquer l'endroite où ajouter le nom du
* fichier de la carte.
* @var string url des cartes créées.
*/
private $carte_stockage_url;
 
/**
* Format du tableau :
* carte_zone est un tableau de tableaux associatifs.
* Chaque zone de la carte doit avoir son entrée dans ce tableau. Le code de la zone sert de clé.
* Chaque zone est représentée par :
* - nom : (string)
* le nom de la zone qui sera affiché dans l'attribut title de la balise map html.
* - rvb_fond : (string) Exemple : 255-255-255.
* les valeurs entre 0 et 255 séparées par des tirets (-) de la couleur de la zone sur la carte de fond
* Ne pas utiliser le blanc (255-255-255) et utiliser le noir pour les contours (0-0-0).
* - poly : (string)
* les coordonnées pour la balise map html. Si une même zone à plusieurs polygones, les séparer par le
* caractère pipe "|".
* - info_nombre : (int) Exemple : nombre de personnes présentent dans un département.
* nombre d'occurence dans cette zone.
* - url : (string) l'url qui doit être appelée sur un clic dans la zone.
* - rvb_carte : (string) Exemple : 255-255-255.
* les valeurs entre 0 et 255 séparées par des tirets (-) de la couleur de remplacement dans le cas de la formule
* de coloriage de type "légende".
* @var array les informations sur les zones de la carte.
*/
private $carte_zones = null;
/**
* Tableau contenant la valeur RVB de la zone du fond de carte en clé et la valeur RVB venant la remplacer en valeur.
* @var array valeur RVB de la zone du fond de carte en clé et valeur RVB venant la remplacer en valeur.
*/
private $carte_correspondance_couleurs = array();
/**
* La valeur RVB, sous forme de chaine de nombres séparées par des tirets (-), de la zone géographique à mettre en
* surbrillance.
* @var string la valeur RVB de la zone à repérer.
*/
private $zone_marker;
/**
* La formule de coloriage de la carte. Les formules disponibles sont : légende, proportionnel.
* @var string la formule de coloriage.
*/
private $formule_coloriage;
/**
* Les valeurs RVB séparés par des virgules pour la couleur la plus foncée utilisée, entre autre, par la formule de
* coloriage "proportionnel".
* @var string les valeurs RVB séparées par des virgules.
*/
private $coloriage_couleur_max;
/**
* Les valeurs RVB séparés par des virgules pour la couleur la plus claire utilisée, entre autre, par la formule de
* coloriage "proportionnel".
* @var string les valeurs RVB séparées par des virgules.
*/
private $coloriage_couleur_min;
 
/**
* Contient le nombre de couleurs différentes utilisées par le coloriage pour créer l'image finale.
* @var int le nombre de couleurs.
*/
private $coloriage_couleurs;
/**
* Contient le tableau des fréquences et des couleurs correspondantes.
* @var array les frequences et leurs couleurs.
*/
private $coloriage_tableau_frequence = array();
 
/**
* Permet de savoir si la cartographie est en mode déboguage ou pas.
* @var bool true si on est en mode débug, sinon false.
*/
private $mode_debug;
//+----------------------------------------------------------------------------------------------------------------+
/*** Constructeur : ***/
public function __construct($options = array()) {
// Initialisation de l'objet Cartographie
$this->setCarteNom(isset($options['carte_nom']) ? $options['carte_nom'] : '');
$this->setFormuleColoriage(isset($options['formule']) ? $options['formule'] : '');
$this->setColoriageCouleurClaire(isset($options['couleur_claire']) ? $options['couleur_claire'] : '');
$this->setColoriageCouleurFoncee(isset($options['couleur_foncee']) ? $options['couleur_foncee'] : '');
$this->setCarteFondFichier(isset($options['fond_fichier']) ? $options['fond_fichier'] : '');
$this->setCarteFondDossier(isset($options['fond_dossier']) ? $options['fond_dossier'] : '');
$this->setCarteStockageDossier(isset($options['stock_dossier']) ? $options['stock_dossier'] : '');
$this->setCarteStockageUrl(isset($options['stock_url']) ? $options['stock_url'] : '');
$this->setCarteZones(isset($options['zones']) ? $options['zones'] : null);
$this->setZoneMarker(isset($options['zone_marker']) ? $options['zone_marker'] : '');
$this->setModeDebug(isset($options['debug']) ? $options['debug'] : false);
}
 
//+----------------------------------------------------------------------------------------------------------------+
/*** Accesseur : ***/
public function getTableauFrequence() {
ksort($this->coloriage_tableau_frequence);
return $this->coloriage_tableau_frequence;
}
public function getCarteCache() {
// Gestion du cache
if ($this->getCarteNom() != '') {
$fichier_carte = $this->carte_stockage_dossier.$this->getCarteNom().'.png';
if (file_exists($fichier_carte)) {
//echo filemtime($fichier_carte).'-'.strtotime($this->carte_info['donnees_date_maj']);
if (filemtime($fichier_carte) < strtotime($this->carte_info['donnees_date_maj'])) {
$this->carte_cache = false;
} else {
$this->carte_cache = true;
}
}
}
return $this->carte_cache;
}
public function getCarteInfo() {
return $this->carte_info;
}
public function setCarteInfo($ci) {
$this->carte_info = $ci;
}
public function getColoriageCouleurClaire() {
return $this->coloriage_couleur_min;
}
public function setColoriageCouleurClaire($ccmi) {
$this->coloriage_couleur_min = $ccmi;
}
public function getColoriageCouleurFoncee() {
return $this->coloriage_couleur_max;
}
public function setColoriageCouleurFoncee($ccma) {
$this->coloriage_couleur_max = $ccma;
}
public function getFormuleColoriage() {
return $this->formule_coloriage;
}
public function setFormuleColoriage($fc) {
$this->formule_coloriage = $fc;
}
public function getCarteNom() {
return $this->carte_nom;
}
public function setCarteNom($cn) {
$this->carte_nom = $cn;
}
public function getCarteFichier() {
return $this->carte_fichier;
}
public function setCarteFichier($cf) {
$this->carte_fichier = $cf;
}
public function getCarteFondFichier() {
return $this->carte_fond_fichier;
}
public function setCarteFondFichier($cff) {
$this->carte_fond_fichier = $cff;
}
public function getCarteFondDossier() {
return $this->carte_fond_dossier;
}
public function setCarteFondDossier($cfd) {
$this->carte_fond_dossier = $cfd;
}
public function getCarteStockageDossier() {
return $this->carte_stockage_dossier;
}
public function setCarteStockageDossier($csd) {
$this->carte_stockage_dossier = $csd;
}
public function getCarteStockageUrl() {
return $this->carte_stockage_url;
}
public function setCarteStockageUrl($csu) {
$this->carte_stockage_url = $csu;
}
public function getCarteZones() {
if (is_null($this->carte_zones)) {
$this->chargerZones();
}
return $this->carte_zones;
}
public function setCarteZones($cz) {
$this->carte_zones = $cz;
}
public function getZoneMarker() {
return $this->zone_marker;
}
public function setZoneMarker($zm) {
$this->zone_marker = $zm;
}
public function getModeDebug() {
return $this->mode_debug;
}
public function setModeDebug($md) {
$this->mode_debug = $md;
}
 
//+----------------------------------------------------------------------------------------------------------------+
/*** Méthodes PUBLIQUES : ***/
public function creerCarte() {
// Création de la carte car aucun cache ou cache à vider
$carte_fond_fichier = $this->carte_fond_dossier.$this->getCarteFondFichier().'.png';
$this->carte = imagecreatefrompng($carte_fond_fichier);
// Vérification que la création à fonctionnée
if (!$this->carte) {
// Une erreur est survenue : création d'une image blanche
$this->carte = imagecreatetruecolor(520, 60);
$bgc = imagecolorallocate($this->carte, 255, 255, 255);
$tc = imagecolorallocate($this->carte, 0, 0, 0);
imagefilledrectangle($this->carte, 0, 0, 520, 60, $bgc);
// Affichage d'un message d'erreur
imagestring($this->carte, 1, 5, 5, "Erreur de chargement de l'image :", $tc);
imagestring($this->carte, 1, 5, 15, $carte_fond_fichier, $tc);
} else {
// Nous construison le tableau de correspondance entre les couleurs présente sur l'image de fond
// et les couleurs qui doivent les remplacer.
$this->construireCorrespondanceCouleur();
// Nous lançons la création de la carte
$this->colorierCarte();
}
 
// Nous chercons à créer une image indéxées en sortie
if (imageistruecolor(&$this->carte) && $this->formule_coloriage != 'legende') {
if ($this->coloriage_couleurs <= 253) {
//imagetruecolortopalette(&$this->carte, false, ($this->coloriage_couleurs + 2));// + 2 car noir et blanc réservés.
} else {
// On force la création d'une palette... si cela pose problème ajouter un attribut permettant de désactiver
// ce fonctionnement.
imagetruecolortopalette(&$this->carte, false, 255);
}
}
// Nous écrivons le fichier de la carte.
if ($this->getCarteNom() == '') {
$this->setCarteNom(md5($this->carte));
}
$this->setCarteFichier($this->carte_stockage_dossier.$this->getCarteNom().'.png');
imagepng(&$this->carte, $this->getCarteFichier());
return true;
}
public function getImageMap() {
// Initialisation de variables
$carte_map = '';
// Gestion de l'image map
$chemin_carte_map_fond = $this->getCarteFondDossier().$this->getCarteFondFichier().'.tpl.html';
$chemin_carte_map = $this->getCarteStockageDossier().$this->getCarteNom().'.html';
if (file_exists($chemin_carte_map)) {
$carte_map = file_get_contents($chemin_carte_map);
} else {
$nom_carte_png = $this->getCarteNom().'.png';
$chemin_carte_png = $this->getCarteStockageDossier().$nom_carte_png;
$donnees['carte_url'] = sprintf($this->getCarteStockageUrl(), $nom_carte_png);
$donnees['carte_alt'] = 'info';
$donnees['zones'] = $this->getCarteZones();
//Debug::printr($donnees);
$carte_map = SquelettePhp::analyser($chemin_carte_map_fond, $donnees);
if (!file_put_contents($chemin_carte_map, $carte_map)) {
$e = "Écriture du fichier contenant le html de la carte impossible : $chemin_carte_map";
trigger_error($e, E_USER_WARNING);
}
}
return $carte_map;
}
//+----------------------------------------------------------------------------------------------------------------+
/*** Méthodes PRIVÉES : ***/
/**
* Charge en mémoire les données du fichier csv des zones géographique de la carte
*/
private function chargerZones() {
$fichier_csv = $this->getCarteFondDossier().$this->getCarteFondFichier().'.csv';
$zones = array();
if (($handle = fopen($fichier_csv, 'r')) !== false) {
$ligne = 1;
$cles = array();
while (($donnees = fgetcsv($handle, 1000, ',')) !== false) {
$cle = array_shift($donnees);
if ($ligne == 1) {
// Ligne 1 : les noms des champs
$cles = $donnees;
} else {
// Ligne > 1 : traitements des données
$zones[$cle] = array_combine($cles, $donnees);
}
$ligne++;
}
fclose($handle);
}
$this->setCarteZones($zones);
}
private function construireCorrespondanceCouleur() {
switch ($this->formule_coloriage) {
case self::FORMULE_LEGENDE :
$this->construireCorrespondanceCouleurLegende();
break;
case self::FORMULE_PROPORTIONNEL :
$this->construireCorrespondanceCouleurProportionnel();
break;
default :
$e = "Aucune formule de coloriage n'a été définie parmis : ".
self::FORMULE_LEGENDE.' et '.self::FORMULE_PROPORTIONNEL.'. '.
"Veuillez la définir avec la méthode setFormuleColoriage().";
trigger_error($e, E_USER_ERROR);
}
}
private function construireCorrespondanceCouleurProportionnel() {
// Création d'un tableau contenant seulement les nombres d'information pour chaque zone.
$tab_valeurs = array();
foreach ($this->getCarteZones() as $cle => $valeur) {
//Nous recherchons le minimum, le maximum et le la valeur médium juste au dessous du maximum.
if (isset($valeur['info_nombre'])) {
$tab_valeurs[] = $valeur['info_nombre'];
if ($valeur['info_nombre'] == 0){
//trigger_error($valeur['nom'], E_USER_NOTICE);
}
}
}
//Nombre d'entrées dans le tableau de valeurs non nulles :
$valeurs_nbre = count($tab_valeurs);
$valeurs_somme = array_sum($tab_valeurs);
// Tabeau des fréquences trié de la plus petite à la plus grande clé.
$tab_frequences = array_count_values($tab_valeurs);
krsort($tab_frequences);
//trigger_error(print_r($tab_frequences, true), E_USER_NOTICE);
$frequences_nbre = count($tab_frequences);
if ($valeurs_nbre > 0){
// Nous trions le tableau dans l'ordre croissant :
sort($tab_valeurs);
// Nous récupérons la valeur la plus petite :
$mini = $tab_valeurs[0];
$maxi = $tab_valeurs[$valeurs_nbre - 1];
$medium = isset($tab_valeurs[$valeurs_nbre - 2]) ? $tab_valeurs[$valeurs_nbre - 2] : 0;
$moyenne = $valeurs_somme / $valeurs_nbre;
$ecart_au_carre_moyen = 0;
for ($i = 0; $i < $valeurs_nbre; $i++) {
$ecart_au_carre_moyen += pow(($tab_valeurs[$i] - $moyenne), 2);
}
$variance = $ecart_au_carre_moyen / $valeurs_nbre;
$ecart_type = round(sqrt($variance), 0);
$moyenne = round($moyenne, 0);
$variance = round($variance, 0);
}
// Calcul de l'écart moyen pour chaque élément R, V et B.
list($r_min, $v_min, $b_min) = explode(',', $this->coloriage_couleur_max);
list($r_max, $v_max, $b_max) = explode(',', $this->coloriage_couleur_min);
$r_diff = $r_min - $r_max;
$r_ecart_moyen = abs($r_diff / $frequences_nbre);
$v_diff = $v_min - $v_max;
$v_ecart_moyen = abs($v_diff / $frequences_nbre);
$b_diff = $b_min - $b_max;
$b_ecart_moyen = abs($b_diff / $frequences_nbre);
// Pour chaque fréquence nous attribuons une couleur.
$i = 1;
foreach ($tab_frequences as $cle => $valeur){
if ($cle == 0) {
$this->coloriage_tableau_frequence[$cle] = '255-255-255';
} else {
$r = $r_min + round(($i * $r_ecart_moyen), 0);
$v = $v_min + round(($i * $v_ecart_moyen), 0);
$b = $b_min + round(($i * $b_ecart_moyen), 0);
$this->coloriage_tableau_frequence[$cle] = $r.'-'.$v.'-'.$b;
}
$i++;
}
// Attribution du nombre de couleurs utilisé pour réaliser la carte
$this->coloriage_couleurs = count(array_count_values($this->coloriage_tableau_frequence));
//trigger_error('<pre>'.print_r($this->coloriage_couleurs, true).'</pre>', E_USER_ERROR);
// Nous attribuons les couleurs à chaque zone géographique
foreach ($this->getCarteZones() as $cle => $zg) {
if (isset($this->coloriage_tableau_frequence[$zg['info_nombre']])) {
$this->carte_correspondance_couleurs[$zg['rvb_fond']] = $this->coloriage_tableau_frequence[$zg['info_nombre']];
} else {
$this->carte_correspondance_couleurs[$zg['rvb_fond']] = '128-128-128';
if ($this->getModeDebug()) {
$e = "La zone ".$zg['nom']." (".$zg['rvb_fond'].") ne possède pas de couleur RVB pour la remplir. ".
"La valeur 128-128-128 lui a été attribué.";
trigger_error($e, E_USER_WARNING);
}
}
}
}
private function construireCorrespondanceCouleurLegende() {
$tab_couleurs = array();
foreach ($this->getCarteZones() as $cle => $zg) {
if ($zg['rvb_carte'] != '') {
$this->carte_correspondance_couleurs[$zg['rvb_fond']] = $zg['rvb_carte'];
} else {
$this->carte_correspondance_couleurs[$zg['rvb_fond']] = '128-128-128';
if ($this->getModeDebug()) {
$e = "La zone ".$zg['nom']." (".$zg['rvb_fond'].") ne possède pas d'information pour la légende dans le champ".
" rvb_carte. La valeur 128-128-128 lui a été attribué.";
trigger_error($e, E_USER_WARNING);
}
}
if (!isset($tab_couleurs[$this->carte_correspondance_couleurs[$zg['rvb_fond']]])) {
$tab_couleurs[$this->carte_correspondance_couleurs[$zg['rvb_fond']]] = 1;
}
}
// Attribution du nombre de couleurs utilisé pour réaliser la carte
$this->coloriage_couleurs = count($tab_couleurs);
}
private function colorierCarte() {
if (imageistruecolor(&$this->carte)) {
//+--------------------------------------------------------------------------------------------------------+
// Remplacement des couleurs sur la carte en mode vraies couleurs (RGB)
$this->colorierCarteModeVraiCouleur();
} else {
//+--------------------------------------------------------------------------------------------------------+
// Remplacement des couleurs sur la carte en mode couleurs indexées (palette de couleurs)
$this->colorierCarteModeIndexe();
}
}
private function colorierCarteModeVraiCouleur() {
// Nous commençons le rempalcement des couleurs sur la carte de fond.
$hauteur = imagesy(&$this->carte);
$largeur = imagesx(&$this->carte);
// Tableau contenant les couleurs traitées, pour éviter de traiter plusieurs fois la même couleur
$tab_rvb_ok = array();
for ($x = 0; $x < $largeur; $x++) {
for ($y = 0; $y < $hauteur; $y++) {
$rvb = ImageColorAt(&$this->carte, $x, $y);
if (!isset($tab_rvb_ok[$rvb])) {
// Récupération de la couleur rvb au format xxx-xxx-xxx
$cle = (($rvb >> 16) & 0xFF).'-'.(($rvb >> 8) & 0xFF).'-'.($rvb & 0xFF);
// Si nous n'avons pas à faire à la couleur noire (utilisé pour délimité les zones), nous continuons
if ($cle != '255-255-255') {
$rvb_final = null;
if (isset($this->carte_correspondance_couleurs[$cle])) {
if ($this->zone_marker != '' && $cle == $this->zone_marker) {
$rvb_final = '255'<<16 | '0'<<8 | '0';
} else {
list($rouge, $vert, $bleu) = explode('-', $this->carte_correspondance_couleurs[$cle]);
$rvb_final = $rouge<<16 | $vert<<8 | $bleu;
}
// Si le nombre de couleurs sur la carte finale est infèrieur à 255 nous créons une image indexée
imagefill(&$this->carte, $x, $y, $rvb_final);
} else {
$rvb_final = '128'<<16 | '128'<<8 | '128';
imagefill(&$this->carte, $x, $y, $rvb_final);
}
// Nous ajoutons la couleur ajoutée à la carte dans le tableau des couleurs traitées
$tab_rvb_ok[$rvb_final] = true;
}
// Nous ajoutons la couleur trouvées sur la carte de fond dans le tableau des couleurs traitées
$tab_rvb_ok[$rvb] = true;
}
}
}
}
private function colorierCarteModeIndexe() {
// Nous attribuons à chaque zone présente dans le tableau $this->getCarteZones() la valeur de l'index
// de la couleur RVB représentant cette zone sur la carte de fond.
$this->construireAssociationIndexZone();
 
foreach ($this->getCarteZones() as $zg) {
if (isset($this->carte_correspondance_couleurs[$zg['rvb_fond']])) {
//Dans le cas où nous voulons repérer une zone sur la carte :
if ($this->getZoneMarker() != '' && $zg['rvb_fond'] == $this->getZoneMarker()) {
$rouge = 255;
$vert = 0;
$bleu = 0;
} else {
list($rouge, $vert, $bleu) = explode('-', $this->carte_correspondance_couleurs[$zg['rvb_fond']]);
}
if (isset($zg['index'])) {
imagecolorset(&$this->carte, $zg['index'], $rouge, $vert, $bleu);
} else if ($this->getModeDebug()) {
$e = "La zone '{$zg['nom']}' n'est pas présente sur la carte.";
trigger_error($e, E_USER_WARNING);
}
}
}
}
private function construireAssociationIndexZone() {
// Nous récupérons le nombre de couleur différentes contenues dans l'image.
$taille_palette = imagecolorstotal($this->carte);
// Pour chaque couleur contenue dans l'image, nous cherchons l'objet correspondant
// dans le tableau $this->getCarteZones(), qui contient des informations sur chaque zone de l'image,
// et nous attribuons la valeur de l'index de sa couleur sur la carte de fond.
for ($i = 0; $i < $taille_palette; $i++) {
$rvb = array();
$rvb = imagecolorsforindex($this->carte, $i);
$rvb_cle = $rvb['red'].'-'.$rvb['green'].'-'.$rvb['blue'];
// La couleur ne doit pas correspondre au noir ou au blanc car ces couleurs ne sont pas traitées
if ($rvb_cle != '255-255-255' && $rvb_cle != '0-0-0') {
$index_ok = false;
foreach($this->getCarteZones() as $cle => $zg) {
if (isset($zg['rvb_fond']) && $zg['rvb_fond'] == $rvb_cle) {
$this->carte_zones[$cle]['index'] = $i;
$index_ok = true;
break;
}
}
if (!$index_ok && $rvb_cle != '0-0-0' && $this->getModeDebug()) {
$e = "Aucune information n'est fournie pour la zone sur la carte d'index $i : $rvb_cle";
trigger_error($e, E_USER_WARNING);
//$this->carte_zones[] = array('rvb_fond' => $rvb_cle, 'rvb_carte' => '128-128-128', 'index' => $i);
}
}
}
}
}
?>
/tags/v1.8-irancy/composants/cartographie/squelettes/france.tpl.html
New file
0,0 → 1,12
<div id="cartographie">
<img id="carte-img" src="<?=$carte_url;?>" alt="<?=$carte_alt;?>" usemap="#carte-map" />
<map name="carte-map">
<?php foreach ($zones as $code => $zone) : ?>
<?php if (!empty($zone['poly'])) : ?>
<?php foreach (explode('|', $zone['poly']) as $coords) : ?>
<area shape="poly" title="<?=$zone['nom']?>" class="zone-<?=$code?>" href="<?=$zone['url']?>" coords="<?=$coords?>" />
<?php endforeach; ?>
<?php endif; ?>
<?php endforeach; ?>
</map>
</div>
/tags/v1.8-irancy/composants/cartographie/squelettes/france.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/composants/cartographie/squelettes/france.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/tags/v1.8-irancy/composants/cartographie/squelettes/france.csv
New file
0,0 → 1,108
"code","rvb_fond","nom","poly"
"01","0-204-51","Ain","483,314, 486,313, 489,308, 489,305, 491,303, 493,302, 494,298, 495,296, 492,293, 487,299, 484,303, 478,303, 477,301, 474,301, 472,303, 468,304, 467,301, 463,298, 462,296, 460,295, 459,293, 456,291, 451,292, 448,291, 447,296, 445,299, 445,302, 443,309, 443,311, 444,313, 443,322, 446,323, 449,326, 450,329, 457,329, 459,331, 462,331, 465,326, 467,326, 468,329, 475,336, 476,339, 478,339, 482,332, 482,330, 484,321, 484,319"
"02","240-240-255","Aisne","389,160, 394,155, 395,150, 393,147, 393,145, 396,142, 395,135, 400,132, 402,132, 404,130, 406,130, 408,131, 409,127, 408,125, 409,117, 415,112, 415,102, 414,98, 408,98, 406,95, 402,95, 395,94, 393,95, 391,94, 388,96, 384,95, 391,94, 388,96, 384,95, 379,96, 379,99, 377,102, 377,104, 375,105, 375,109, 376,113, 378,115, 378,117, 377,120, 378,124, 377,126, 379,129, 375,136, 373,136, 375,138, 375,140, 377,143, 377,147, 379,149, 379,152, 386,159"
"03","255-125-125","Allier","393,320, 397,320, 400,323, 402,321, 404,321, 405,314, 404,305, 409,299, 409,294, 406,294, 403,292, 401,292, 399,290, 399,287, 398,284, 395,283, 392,285, 390,285, 388,283, 382,283, 380,284, 377,281, 373,278, 370,278, 367,282, 362,282, 359,285, 360,289, 356,293, 349,293, 347,296, 352,302, 355,304, 358,311, 358,314, 361,314, 364,310, 366,310, 368,307, 370,307, 372,312, 375,315, 377,315, 379,317, 387,317, 389,318, 391,317"
"04","51-51-153","Alpes-de-Haute-Provence","491,443, 494,442, 496,444, 499,444, 500,442, 502,442, 505,438, 509,441, 512,441, 512,439, 519,438, 522,437, 523,434, 527,433, 528,431, 530,431, 528,428, 524,425, 524,422, 522,420, 522,415, 525,411, 525,409, 527,407, 530,406, 530,403, 531,401, 528,398, 528,396, 531,394, 531,390, 530,390, 526,394, 521,398, 520,402, 514,403, 512,401, 509,399, 503,404, 501,404, 500,402, 498,402, 492,408, 491,412, 488,413, 488,415, 489,417, 482,418, 482,420, 477,421, 476,425, 478,426, 478,429, 477,431, 479,433, 481,434, 480,438, 482,438, 484,440, 487,442, 489,442"
"05","51-51-204","Hautes-Alpes","478,409, 480,412, 482,413, 482,417, 488,417, 487,413, 490,412, 490,410, 493,405, 498,401, 500,401, 501,403, 503,403, 504,401, 508,398, 515,402, 519,402, 519,400, 520,397, 529,390, 531,388, 535,387, 533,380, 527,379, 525,377, 523,376, 522,370, 520,370, 518,368, 518,365, 517,365, 512,367, 511,369, 506,369, 505,366, 502,367, 501,371, 505,371, 507,376, 507,380, 505,381, 503,380, 498,381, 495,383, 493,383, 492,386, 487,387, 487,390, 485,393, 483,393, 480,394, 479,398, 480,401, 478,403, 475,403, 473,402, 474,405, 472,406, 473,408, 475,408"
"06","51-51-102","Alpes-Maritimes","550,442, 551,440, 553,440, 555,437, 557,436, 556,431, 558,430, 559,427, 562,425, 562,422, 564,420, 562,417, 562,414, 557,417, 554,417, 550,418, 546,417, 539,413, 535,413, 534,410, 532,409, 531,407, 529,407, 526,409, 526,411, 524,413, 523,420, 525,422, 525,425, 531,430, 530,432, 528,432, 527,434, 524,434, 523,440, 525,440, 528,442, 528,445, 529,447, 533,447, 534,450, 539,450, 542,449, 542,445, 547,441"
"07","0-102-51","Ardèche","422,413, 424,413, 427,411, 431,411, 434,410, 438,413, 440,413, 441,407, 443,405, 443,399, 445,396, 445,388, 448,384, 448,381, 449,377, 447,374, 448,371, 446,369, 446,364, 445,362, 446,358, 443,356, 440,357, 439,361, 437,363, 434,363, 432,365, 432,368, 429,370, 429,372, 426,375, 424,378, 422,379, 421,382, 415,383, 413,386, 411,387, 410,395, 411,398, 413,399, 414,404, 417,406, 417,411, 420,411"
"08","0-255-0","Ardennes","446,132, 448,131, 448,126, 447,123, 448,120, 451,118, 454,119, 456,117, 456,114, 451,113, 447,109, 444,107, 440,108, 439,103, 440,101, 439,99, 437,98, 437,95, 439,90, 439,88, 437,88, 433,92, 433,96, 428,98, 426,100, 423,100, 416,99, 416,112, 410,118, 410,124, 409,126, 410,129, 412,129, 416,130, 421,135, 426,137, 431,136, 432,138, 440,138, 445,137"
"09","255-102-102","Ariège","311,508, 313,508, 314,506, 317,506, 322,507, 324,509, 329,510, 334,506, 336,506, 341,505, 340,503, 337,501, 332,501, 329,497, 330,495, 333,494, 333,484, 332,480, 327,478, 325,478, 323,476, 323,474, 319,474, 315,473, 315,475, 313,477, 310,475, 308,478, 306,478, 306,482, 304,484, 302,483, 301,481, 297,481, 295,482, 294,486, 295,488, 293,490, 291,490, 288,493, 289,496, 294,498, 297,498, 299,500, 299,502, 307,502, 310,504"
"10","50-255-50","Aube","405,209, 407,211, 414,211, 418,210, 420,211, 422,209, 429,209, 432,205, 437,206, 437,203, 441,202, 442,197, 441,195, 442,192, 440,190, 434,183, 434,178, 431,178, 428,179, 423,176, 422,170, 419,169, 412,170, 411,172, 409,173, 408,175, 405,177, 405,179, 397,180, 395,178, 394,176, 391,176, 391,178, 388,181, 388,187, 390,187, 395,192, 395,197, 397,199, 399,199, 403,202, 403,204, 405,207"
"11","102-51-0","Aude","371,493, 373,495, 375,495, 375,493, 377,492, 377,487, 378,485, 376,485, 374,483, 374,481, 376,480, 380,481, 383,477, 383,475, 380,475, 378,473, 376,473, 375,471, 369,471, 367,474, 364,474, 362,472, 359,472, 358,470, 356,469, 356,466, 357,464, 348,464, 344,463, 344,465, 337,466, 330,465, 328,464, 327,468, 324,469, 323,473, 324,476, 328,477, 333,480, 333,483, 334,494, 330,497, 333,500, 337,500, 339,502, 342,504, 343,506, 345,506, 346,504, 348,504, 349,497, 351,496, 356,497, 358,496, 365,497, 368,493"
"12","255-153-0","Aveyron","358,442, 362,446, 366,447, 371,446, 372,448, 377,448, 377,442, 384,441, 384,439, 386,437, 388,437, 389,434, 392,431, 392,429, 389,428, 387,426, 387,423, 389,421, 384,420, 382,417, 380,416, 380,412, 379,405, 377,403, 377,399, 374,396, 372,396, 370,393, 370,390, 367,385, 364,383, 364,381, 361,382, 359,385, 359,387, 357,389, 357,392, 355,394, 354,396, 347,396, 345,395, 341,400, 339,400, 335,401, 331,405, 329,405, 329,408, 331,411, 331,413, 330,416, 333,416, 334,418, 332,419, 332,423, 331,425, 336,424, 338,422, 341,422, 342,424, 348,425, 352,429, 354,430, 358,439"
"13","0-0-153","Bouches-du-Rhône","479,472, 480,474, 484,473, 488,469, 485,466, 485,463, 488,462, 485,458, 485,454, 484,450, 488,447, 488,445, 486,445, 483,446, 482,448, 475,448, 470,445, 468,445, 465,444, 462,445, 457,441, 454,437, 452,437, 450,435, 448,435, 446,433, 444,433, 441,437, 441,442, 438,447, 434,447, 433,452, 430,455, 426,458, 424,458, 424,462, 426,462, 427,460, 441,460, 443,462, 446,462, 447,464, 450,465, 450,463, 453,461, 455,461, 457,463, 458,466, 466,466, 468,464, 470,464, 472,467, 472,472"
"14","150-150-255","Calvados","266,155, 271,155, 273,154, 277,155, 278,151, 277,146, 278,144, 276,139, 276,136, 274,135, 274,130, 271,129, 268,130, 264,134, 259,136, 253,136, 251,134, 245,133, 243,132, 241,133, 234,132, 230,129, 225,129, 223,136, 225,137, 229,142, 232,147, 232,151, 230,152, 228,155, 225,155, 225,158, 223,160, 223,162, 229,163, 232,164, 235,163, 237,161, 240,161, 245,159, 248,159, 255,160, 257,162, 262,158, 264,158"
"15","255-175-175","Cantal","367,383, 371,390, 371,393, 372,395, 374,394, 374,392, 376,389, 376,386, 378,385, 378,383, 383,382, 385,379, 388,378, 386,375, 386,370, 384,368, 384,365, 380,361, 378,361, 374,360, 372,358, 371,356, 369,356, 364,355, 361,352, 357,352, 357,354, 355,356, 351,356, 348,359, 344,364, 345,367, 341,374, 342,376, 338,380, 338,383, 340,386, 340,393, 341,396, 343,397, 345,394, 354,395, 356,392, 356,389, 358,387, 358,385, 360,383, 361,381, 364,380, 365,383"
"16","175-255-175","Charente","250,358, 253,361, 262,362, 264,360, 266,357, 266,353, 268,350, 271,348, 273,348, 276,344, 276,341, 280,338, 283,333, 285,331, 287,331, 290,324, 293,323, 293,319, 289,316, 289,314, 285,313, 283,315, 279,315, 278,313, 277,313, 276,316, 274,317, 272,316, 269,317, 268,315, 265,315, 261,314, 259,316, 257,317, 256,321, 254,322, 253,327, 252,330, 249,331, 246,330, 242,331, 241,340, 245,343, 245,345, 247,347, 247,353, 246,358"
"17","150-255-150","Charente-Maritime","210,326, 211,322, 210,318, 208,318, 205,316, 205,320, 207,322, 209,323|204,306, 203,304, 200,304, 207,308, 208,307|254,367, 256,366, 256,363, 252,362, 250,359, 246,359, 245,354, 246,347, 244,345, 244,343, 242,341, 240,340, 240,332, 242,330, 245,330, 248,329, 251,330, 251,328, 253,321, 253,319, 242,313, 240,313, 238,311, 236,311, 233,309, 230,305, 230,302, 221,301, 220,299, 217,299, 214,302, 214,304, 212,307, 215,310, 217,317, 216,323, 213,326, 213,328, 210,329, 210,333, 212,335, 215,336, 219,340, 220,342, 227,348, 229,353, 229,355, 228,357, 233,356, 237,357, 239,359, 239,362, 240,365, 242,365, 246,368, 250,369, 252,368, 254,369"
"18","125-255-255","Cher","343,297, 346,297, 349,292, 356,292, 359,289, 359,287, 358,285, 362,281, 367,281, 374,273, 374,262, 373,257, 371,252, 371,250, 369,248, 367,247, 367,244, 369,241, 368,238, 364,238, 362,239, 358,235, 354,235, 353,233, 351,233, 349,234, 347,232, 344,232, 342,233, 345,236, 346,242, 342,243, 341,249, 338,251, 333,251, 333,253, 329,257, 335,258, 338,260, 338,263, 340,265, 340,267, 339,269, 342,271, 341,273, 339,274, 339,276, 340,280, 342,282, 342,284, 344,286, 344,288, 343,291, 344,295"
"19","255-255-150","Corrèze","330,378, 333,378, 336,377, 337,379, 339,377, 341,376, 340,373, 342,371, 344,366, 343,364, 347,360, 351,355, 355,355, 356,352, 355,348, 356,345, 354,343, 356,340, 356,336, 354,336, 350,337, 348,339, 341,336, 339,336, 336,335, 331,337, 331,339, 328,340, 326,342, 324,342, 321,345, 319,345, 315,346, 314,348, 310,351, 307,351, 305,352, 306,356, 304,357, 304,364, 305,367, 309,368, 311,371, 311,375, 313,375, 320,374, 324,378, 325,380"
"2A","200-150-90","Corse-du-Sud","549,543, 555,548, 558,549, 558,545, 560,542, 560,539, 562,537, 562,534, 564,529, 564,526, 563,523, 558,524, 555,522, 555,516, 554,514, 552,514, 551,511, 547,507, 547,505, 544,504, 542,502, 538,499, 536,499, 531,497, 529,497, 530,499, 532,500, 531,502, 528,503, 528,505, 529,508, 533,509, 535,512, 535,514, 533,515, 533,517, 531,518, 531,520, 535,520, 537,519, 538,526, 536,527, 536,530, 538,530, 543,533, 540,537, 540,540, 542,540, 544,542"
"2B","200-150-60","Haute-Corse","548,507, 552,511, 552,513, 554,513, 556,516, 556,522, 561,523, 563,522, 563,514, 564,510, 567,509, 568,506, 567,504, 568,502, 566,489, 566,487, 565,482, 563,482, 561,477, 561,470, 562,467, 560,460, 559,458, 556,458, 556,460, 557,462, 556,468, 557,473, 555,476, 552,474, 548,474, 546,476, 546,478, 543,480, 540,480, 538,482, 536,482, 536,484, 533,485, 531,487, 531,492, 528,493, 527,496, 532,496, 539,499, 541,501, 548,505"
"21","50-151-255","Côte-d'Or","459,260, 461,258, 464,256, 466,251, 466,248, 467,246, 466,242, 464,240, 464,238, 462,236, 463,234, 466,232, 466,229, 465,227, 462,229, 457,229, 454,226, 450,226, 448,224, 446,223, 446,216, 444,214, 443,212, 439,209, 438,207, 434,207, 432,206, 430,208, 429,210, 422,210, 421,217, 423,218, 423,223, 421,225, 417,234, 415,236, 416,240, 415,245, 417,246, 417,250, 419,250, 421,252, 421,255, 423,258, 432,263, 435,266, 438,268, 443,267, 448,265, 450,265, 452,264, 455,265, 459,262"
"22","75-75-255","Côtes-d'Armor","176,196, 178,195, 178,193, 182,189, 184,189, 188,188, 188,186, 190,177, 188,175, 186,175, 182,172, 180,171, 179,169, 176,167, 172,168, 170,170, 165,174, 162,174, 158,169, 158,166, 156,165, 154,162, 154,160, 152,159, 152,157, 150,157, 149,154, 146,155, 144,154, 137,157, 135,155, 133,155, 144,154, 137,157, 135,155, 133,155, 132,158, 133,160, 131,161, 131,163, 128,165, 128,168, 130,170, 130,173, 129,180, 130,185, 131,187, 130,189, 134,190, 136,192, 138,192, 142,193, 146,190, 148,190, 152,193, 154,193, 156,195, 158,195, 163,196, 164,199, 167,197, 169,194, 172,194, 173,196"
"23","255-255-125","Creuse","338,334, 342,335, 347,338, 350,336, 353,336, 354,333, 352,331, 353,329, 355,328, 359,321, 359,318, 357,316, 357,310, 353,303, 347,298, 341,298, 336,299, 327,298, 325,300, 315,300, 312,307, 312,310, 316,314, 316,316, 317,320, 318,322, 317,324, 320,325, 321,329, 324,330, 326,329, 328,331, 331,333, 331,336"
"24","102-153-102","Dordogne","295,395, 297,397, 299,397, 301,395, 302,393, 307,390, 307,387, 309,386, 312,382, 312,378, 310,375, 310,371, 309,369, 307,369, 304,367, 304,365, 303,357, 305,356, 305,354, 303,351, 300,350, 299,347, 297,346, 296,343, 292,342, 289,344, 285,341, 285,338, 283,338, 281,337, 277,342, 277,344, 274,347, 273,349, 271,349, 267,353, 267,358, 265,359, 262,363, 258,363, 256,368, 259,368, 260,373, 258,378, 258,383, 263,384, 266,382, 268,382, 269,385, 268,388, 270,389, 271,394, 273,394, 278,393, 281,392, 287,393, 289,392, 290,396"
"25","255-255-50","Doubs","493,279, 494,282, 501,276, 505,273, 505,263, 510,260, 512,260, 514,257, 514,255, 517,252, 519,251, 523,246, 523,244, 525,242, 526,239, 524,239, 522,240, 521,237, 523,235, 523,232, 521,232, 517,231, 513,228, 512,228, 510,231, 508,231, 508,233, 504,234, 499,233, 495,238, 490,241, 488,243, 484,243, 480,246, 478,247, 478,250, 481,253, 481,257, 480,259, 482,261, 486,262, 488,264, 488,267, 491,270, 496,273, 497,275"
"26","1-51-51","Drôme","481,420, 481,413, 477,410, 473,409, 471,407, 473,404, 472,402, 474,401, 478,402, 479,399, 478,395, 480,393, 482,393, 485,392, 482,390, 480,390, 476,386, 473,386, 471,383, 471,381, 472,378, 471,376, 472,373, 463,372, 460,371, 459,369, 460,367, 459,362, 453,357, 448,359, 452,357, 449,359, 447,359, 447,361, 446,363, 447,369, 449,371, 448,374, 450,377, 450,380, 449,384, 447,386, 446,396, 444,399, 444,405, 442,407, 442,412, 445,412, 446,416, 449,416, 454,413, 457,413, 461,417, 466,417, 469,420, 471,420, 472,422, 475,422, 477,420"
"27","204-255-0","Eure","318,149, 321,149, 323,146, 323,143, 326,142, 326,140, 328,139, 328,137, 327,133, 323,132, 321,130, 318,130, 312,129, 309,134, 307,134, 305,135, 304,137, 302,137, 301,139, 299,139, 298,137, 296,136, 296,132, 287,131, 282,127, 281,127, 276,129, 274,128, 275,135, 277,136, 277,140, 279,145, 278,150, 279,154, 277,156, 279,158, 284,158, 287,163, 291,166, 291,170, 293,170, 306,166, 311,166, 312,163, 316,159, 315,157, 317,156, 317,154, 316,151"
"28","0-255-255","Eure-et-Loir","308,211, 312,211, 314,210, 315,208, 321,208, 323,206, 327,206, 331,205, 332,201, 334,199, 334,193, 333,187, 332,185, 330,185, 326,181, 326,178, 321,174, 321,172, 319,161, 316,157, 317,160, 313,163, 313,165, 311,167, 304,167, 297,170, 294,170, 292,171, 292,173, 296,178, 296,186, 293,189, 291,189, 290,194, 291,198, 294,199, 299,204, 303,204, 304,207, 307,209"
"29","25-25-255","Finistère","103,210, 105,209, 105,207, 109,206, 112,207, 113,205, 116,207, 116,209, 117,211, 122,211, 127,213, 129,213, 132,208, 134,206, 131,205, 129,203, 126,203, 124,201, 124,199, 122,197, 122,194, 124,192, 126,192, 129,190, 129,188, 130,186, 128,177, 128,174, 129,170, 127,168, 127,165, 128,163, 125,161, 122,161, 120,164, 115,160, 109,161, 107,163, 105,163, 103,161, 100,162, 98,164, 95,163, 94,165, 89,166, 86,169, 86,178, 89,177, 92,178, 97,176, 98,179, 102,179, 103,181, 101,183, 99,183, 93,182, 93,186, 95,184, 99,185, 102,187, 102,189, 103,192, 93,193, 87,194, 90,196, 92,196, 97,200, 99,205, 99,207, 98,209, 101,209"
"30","255-204-0","Gard","423,452, 421,454, 419,454, 422,459, 424,457, 426,457, 429,454, 432,452, 432,449, 434,446, 438,446, 440,441, 440,437, 443,434, 444,432, 446,431, 446,427, 443,426, 442,420, 440,418, 440,415, 436,412, 432,411, 427,412, 424,414, 422,414, 420,412, 417,412, 416,409, 414,408, 411,409, 411,411, 413,420, 410,424, 407,424, 404,422, 401,422, 399,425, 393,425, 392,423, 389,422, 388,426, 393,429, 393,431, 390,434, 390,436, 393,439, 395,439, 398,440, 401,436, 404,434, 406,434, 408,436, 408,439, 411,438, 415,442, 420,446, 422,447, 422,449"
"31","204-102-102","Haute-Garonne","280,495, 283,494, 286,495, 287,492, 291,489, 293,489, 294,487, 293,484, 295,481, 301,480, 304,483, 305,478, 308,477, 310,474, 313,476, 314,473, 318,472, 322,473, 322,470, 324,468, 326,468, 326,466, 328,463, 334,464, 334,462, 329,459, 327,456, 322,454, 321,452, 322,448, 320,446, 317,442, 316,439, 314,439, 309,440, 309,443, 306,445, 303,445, 301,443, 298,443, 294,444, 301,453, 303,454, 303,456, 297,461, 297,463, 295,465, 294,467, 292,467, 289,465, 287,465, 278,473, 278,475, 274,478, 274,480, 277,483, 277,485, 279,486, 279,491, 276,495, 273,495, 273,502, 277,502, 280,503, 280,501, 279,498"
"32","204-153-51","Gers","269,467, 270,469, 275,468, 278,470, 280,470, 282,468, 283,466, 288,464, 293,466, 296,463, 296,461, 298,458, 302,455, 297,450, 292,444, 290,443, 289,437, 285,436, 284,434, 287,431, 282,429, 280,430, 278,428, 273,428, 272,430, 270,430, 264,431, 262,430, 260,432, 257,432, 258,435, 254,436, 252,434, 247,435, 247,440, 246,445, 244,448, 244,451, 246,451, 251,453, 253,453, 256,457, 259,459, 259,463, 262,466, 266,466"
"33","153-204-153","Gironde","256,405, 255,403, 257,400, 259,400, 261,397, 261,391, 263,389, 267,389, 267,386, 268,383, 266,383, 263,385, 259,385, 257,383, 257,377, 259,372, 259,369, 255,369, 253,370, 251,369, 248,370, 244,367, 240,366, 238,361, 238,359, 231,357, 230,362, 231,367, 232,369, 230,370, 227,363, 227,358, 224,353, 214,343, 212,352, 212,357, 209,376, 209,378, 208,384, 207,388, 209,388, 210,386, 215,390, 214,392, 209,392, 206,399, 206,402, 215,400, 217,401, 217,404, 219,404, 223,405, 230,404, 231,407, 236,411, 238,411, 240,414, 240,418, 243,418, 245,419, 245,416, 248,415, 249,417, 253,417, 254,414, 253,412, 256,409"
"34","204-153-0","Hérault","369,470, 375,470, 376,472, 378,472, 380,474, 383,474, 385,475, 389,471, 396,470, 398,468, 398,464, 401,461, 403,461, 407,462, 410,457, 412,455, 414,455, 415,453, 422,452, 422,450, 421,447, 416,443, 414,443, 411,439, 408,440, 407,436, 404,435, 402,437, 399,439, 398,441, 396,441, 392,440, 390,437, 386,438, 385,441, 378,442, 378,448, 372,449, 371,451, 364,453, 361,452, 360,456, 362,458, 362,461, 359,463, 359,465, 357,466, 357,469, 360,471, 362,471, 364,473, 367,473"
"35","100-100-255","Ille-et-Vilaine","197,219, 199,216, 203,215, 204,213, 208,213, 210,215, 213,215, 213,212, 215,210, 215,208, 218,205, 220,205, 220,202, 218,193, 218,190, 220,188, 220,184, 219,178, 215,177, 213,179, 210,181, 204,176, 204,171, 199,171, 195,170, 194,166, 191,166, 188,169, 183,169, 183,171, 184,173, 188,174, 191,177, 191,180, 190,185, 189,188, 182,190, 179,193, 179,195, 177,196, 177,198, 178,200, 176,203, 176,205, 179,205, 183,208, 183,210, 182,214, 183,216, 181,221, 182,222, 185,220, 188,220"
"36","100-255-255","Indre","327,297, 335,297, 340,298, 342,297, 343,292, 342,289, 343,286, 341,284, 341,282, 339,280, 339,277, 338,274, 341,271, 338,269, 339,265, 337,263, 337,260, 329,259, 328,257, 330,255, 330,253, 326,252, 323,250, 321,250, 318,252, 314,252, 311,255, 313,258, 307,265, 302,264, 300,269, 300,272, 297,279, 292,280, 292,283, 291,285, 297,291, 299,291, 300,294, 304,298, 304,300, 308,300, 310,299, 312,301, 315,299, 325,299"
"37","75-255-255","Indre-et-Loire","288,274, 288,276, 291,279, 296,279, 299,272, 299,268, 300,265, 302,263, 305,263, 307,264, 312,259, 309,252, 306,249, 303,249, 302,246, 303,243, 300,233, 297,230, 294,230, 292,227, 290,227, 283,225, 282,227, 279,227, 277,229, 275,230, 274,232, 271,230, 268,230, 266,231, 268,234, 265,244, 262,247, 262,253, 261,257, 263,257, 264,260, 268,261, 269,267, 276,268, 281,267, 283,266, 285,271"
"38","51-102-102","Isère","483,389, 487,386, 491,386, 492,383, 499,380, 502,380, 504,379, 506,380, 506,375, 505,372, 501,372, 500,369, 502,364, 500,364, 497,360, 497,357, 499,355, 499,351, 496,348, 492,348, 491,346, 489,347, 487,350, 485,350, 482,349, 480,344, 475,339, 474,336, 467,329, 467,327, 465,327, 464,330, 462,332, 459,332, 457,331, 457,333, 458,336, 455,339, 454,341, 449,342, 447,344, 447,347, 444,350, 444,354, 445,357, 449,357, 451,355, 453,355, 457,358, 459,359, 461,362, 461,366, 462,369, 471,370, 474,373, 474,375, 473,377, 474,381, 473,383, 476,384, 478,386"
"39","255-255-75","Jura","477,300, 478,302, 484,302, 486,300, 490,295, 492,292, 492,290, 494,287, 493,281, 492,279, 496,275, 495,273, 492,271, 490,271, 487,267, 487,264, 482,262, 479,259, 480,253, 477,250, 476,248, 473,249, 467,248, 467,252, 464,257, 462,259, 460,260, 460,262, 459,265, 466,270, 463,274, 466,281, 466,284, 464,286, 464,288, 466,290, 466,292, 462,293, 462,295, 464,297, 466,300, 468,301, 468,303, 470,303, 474,300"
"40","153-255-153","Landes","246,435, 250,434, 252,433, 254,435, 257,435, 256,432, 260,425, 257,424, 255,422, 251,422, 250,418, 247,416, 246,419, 244,420, 240,419, 239,414, 238,412, 236,412, 233,409, 230,407, 230,405, 224,405, 220,406, 217,405, 216,401, 212,401, 208,402, 206,403, 206,405, 203,421, 200,431, 200,433, 197,443, 197,445, 194,452, 197,455, 203,455, 205,453, 207,453, 209,455, 212,455, 219,453, 221,453, 223,452, 232,454, 239,453, 241,454, 243,452, 243,448, 245,445, 245,441"
"41","50-255-255","Loir-et-Cher","340,244, 342,242, 345,242, 345,238, 343,235, 341,234, 342,232, 344,231, 344,228, 336,228, 334,229, 331,228, 327,229, 326,226, 324,224, 321,224, 319,222, 318,219, 320,218, 320,215, 318,213, 318,209, 315,209, 314,211, 308,212, 306,210, 305,208, 303,207, 303,205, 299,205, 295,201, 293,201, 291,204, 291,206, 292,208, 291,213, 289,215, 289,218, 286,221, 283,223, 286,225, 289,225, 292,226, 295,229, 297,229, 301,233, 301,235, 303,240, 303,242, 304,245, 303,248, 306,248, 311,253, 314,251, 318,251, 321,249, 323,249, 326,251, 329,251, 331,253, 333,250, 338,250, 340,249"
"42","0-153-51","Loire","443,352, 442,350, 440,350, 438,348, 438,346, 435,344, 432,344, 427,339, 427,335, 426,332, 427,328, 425,326, 425,324, 424,320, 422,318, 424,315, 424,313, 427,311, 425,310, 421,311, 414,310, 411,311, 410,309, 408,309, 405,306, 405,313, 406,320, 404,322, 402,322, 403,329, 402,331, 405,335, 405,338, 412,344, 412,346, 413,350, 410,353, 412,353, 416,354, 418,352, 422,352, 426,353, 428,355, 428,358, 430,358, 434,362, 437,362, 439,357, 442,356"
"43","255-200-200","Haute-Loire","399,384, 403,385, 408,390, 410,388, 412,385, 414,384, 415,382, 420,382, 421,379, 423,377, 425,376, 425,374, 428,372, 428,370, 431,367, 431,365, 432,361, 430,359, 428,359, 427,355, 420,353, 418,353, 416,355, 413,355, 408,354, 403,356, 401,355, 398,356, 397,354, 384,354, 381,357, 378,357, 378,360, 380,360, 383,362, 385,365, 385,368, 387,370, 387,375, 389,377, 390,381, 393,385, 397,385"
"44","255-0-0","Loire-Atlantique","173,260, 174,258, 173,258|201,261, 203,260, 204,265, 207,265, 207,263, 209,260, 211,260, 213,259, 215,260, 215,258, 213,258, 212,254, 215,253, 215,250, 213,250, 211,248, 211,246, 210,244, 212,242, 216,242, 224,241, 223,237, 218,236, 216,234, 216,231, 219,230, 216,227, 216,224, 213,221, 213,216, 210,216, 208,214, 204,214, 203,216, 201,216, 198,218, 197,220, 189,220, 185,221, 180,224, 180,228, 178,230, 173,230, 169,234, 167,235, 166,243, 171,243, 173,246, 176,245, 178,242, 182,242, 183,244, 179,245, 178,247, 179,249, 176,252, 180,253, 183,255, 184,259, 190,265, 192,265, 194,268, 198,268, 201,269, 202,265"
"45","25-255-255","Loiret","353,232, 354,234, 358,234, 362,238, 367,237, 367,234, 369,232, 369,228, 368,226, 366,225, 366,222, 370,221, 372,220, 372,214, 376,210, 375,207, 373,205, 373,203, 371,201, 363,201, 361,203, 355,202, 353,200, 353,196, 350,194, 350,192, 345,192, 342,191, 340,193, 337,193, 335,194, 335,199, 333,201, 333,204, 331,206, 328,206, 323,207, 321,209, 319,209, 319,213, 321,215, 321,218, 319,219, 320,222, 324,223, 327,226, 327,228, 330,228, 333,227, 335,228, 344,227, 345,231, 347,231, 349,233"
"46","204-102-0","Lot","328,413, 330,413, 330,411, 328,408, 328,405, 331,404, 335,400, 338,400, 341,399, 341,397, 339,392, 339,386, 337,383, 337,380, 336,378, 334,378, 329,379, 326,381, 323,379, 320,375, 314,375, 312,376, 313,382, 308,388, 308,390, 306,392, 300,397, 298,400, 296,401, 296,405, 298,407, 298,410, 299,413, 302,416, 305,417, 306,419, 311,419, 314,417, 317,419, 324,415, 326,415"
"47","204-255-204","Lot-et-Garonne","280,429, 284,426, 285,424, 290,423, 290,420, 292,415, 290,413, 291,411, 293,411, 297,410, 297,407, 295,405, 295,401, 298,398, 295,396, 292,396, 290,397, 289,393, 282,394, 279,393, 274,394, 271,395, 270,391, 269,389, 263,390, 262,398, 260,399, 259,401, 257,401, 256,404, 257,410, 254,412, 255,416, 253,418, 251,419, 251,421, 255,421, 257,423, 260,423, 261,425, 258,430, 260,431, 262,429, 269,430, 272,429, 273,427, 278,427"
"48","153-102-0","Lozère","407,423, 410,423, 412,420, 412,417, 411,412, 410,409, 415,407, 416,406, 413,404, 413,401, 412,399, 410,398, 410,396, 409,392, 403,386, 400,386, 398,385, 392,386, 389,381, 389,379, 387,379, 384,381, 383,383, 379,383, 379,385, 377,386, 377,389, 375,392, 375,396, 378,399, 378,403, 380,405, 380,411, 381,416, 385,419, 389,419, 391,422, 394,424, 399,424, 401,421, 404,421"
"49","255-100-100","Maine-et-Loire","244,259, 249,257, 252,259, 255,259, 258,258, 258,255, 261,253, 261,247, 264,244, 265,239, 267,234, 263,230, 258,227, 254,228, 253,225, 248,224, 247,221, 244,221, 241,220, 238,222, 234,222, 231,220, 228,220, 225,219, 221,220, 214,219, 214,221, 217,224, 217,227, 220,229, 219,231, 217,231, 217,234, 222,235, 224,237, 224,239, 225,241, 217,242, 212,243, 211,245, 212,248, 215,249, 216,253, 213,254, 213,257, 215,257, 216,261, 231,263, 235,263, 238,261, 239,259"
"50","125-125-255","Manche","224,164, 222,162, 222,160, 224,158, 224,155, 228,154, 231,150, 231,147, 226,140, 222,136, 222,134, 223,131, 221,130, 221,127, 219,125, 217,122, 217,118, 219,117, 219,114, 218,112, 213,111, 209,114, 205,114, 202,112, 200,112, 195,109, 194,109, 198,114, 198,117, 196,119, 198,124, 198,128, 201,130, 205,139, 205,149, 206,156, 205,164, 207,166, 207,168, 204,169, 205,176, 209,180, 216,176, 222,176, 231,178, 235,174, 234,171, 235,169, 233,168, 232,165, 230,165"
"51","25-255-25","Marne","423,175, 428,178, 430,178, 434,177, 438,178, 437,175, 440,173, 443,169, 446,170, 446,166, 442,162, 442,157, 446,154, 446,150, 445,146, 443,143, 443,141, 444,139, 441,138, 432,139, 431,137, 427,137, 425,138, 420,135, 416,131, 413,131, 410,130, 408,132, 404,131, 402,133, 400,133, 396,136, 396,140, 397,143, 394,145, 394,147, 396,150, 396,153, 390,160, 390,162, 388,164, 388,167, 390,169, 389,172, 391,172, 396,177, 397,179, 404,179, 404,177, 412,169, 418,169, 421,168, 423,170"
"52","75-255-75","Haute-Marne","472,223, 472,221, 473,219, 472,217, 476,213, 479,211, 479,208, 476,206, 476,204, 472,201, 472,197, 474,196, 472,193, 470,192, 469,190, 465,187, 463,187, 462,182, 461,180, 458,178, 455,178, 452,175, 449,174, 448,172, 446,172, 443,170, 441,172, 438,176, 439,178, 435,179, 435,183, 441,189, 443,192, 443,194, 442,196, 443,201, 441,203, 438,203, 438,206, 440,208, 442,211, 445,213, 447,216, 447,223, 450,225, 454,225, 457,228, 462,228, 463,225, 468,223"
"53","255-75-75","Mayenne","224,219, 227,218, 231,219, 234,221, 238,221, 241,219, 243,219, 246,220, 246,217, 247,213, 250,211, 250,206, 253,205, 253,199, 256,197, 256,190, 259,187, 259,182, 257,182, 255,180, 255,177, 252,176, 251,178, 249,178, 246,179, 244,178, 241,180, 234,180, 232,181, 230,179, 228,179, 220,178, 220,183, 221,188, 219,190, 219,196, 221,205, 218,206, 216,208, 216,210, 214,212, 214,217, 220,218"
"54","102-0-102","Meurthe-et-Moselle","508,179, 509,181, 512,181, 514,182, 517,181, 523,175, 521,172, 514,169, 512,169, 509,168, 507,166, 504,164, 502,164, 498,163, 494,159, 494,155, 492,155, 488,154, 484,151, 483,149, 480,147, 482,144, 482,140, 483,137, 479,130, 479,125, 480,123, 477,123, 473,120, 468,121, 463,123, 462,127, 469,128, 471,130, 472,139, 473,144, 476,146, 476,153, 474,156, 474,159, 475,163, 473,165, 473,167, 474,173, 473,176, 476,178, 480,178, 481,183, 484,186, 486,186, 489,185, 490,183, 493,183, 496,182, 499,183, 504,181, 506,179"
"55","153-0-153","Meuse","465,185, 465,183, 469,182, 471,180, 474,180, 474,177, 472,176, 472,174, 473,168, 472,165, 474,163, 474,160, 473,156, 475,153, 475,146, 472,144, 472,140, 471,132, 469,129, 464,129, 461,127, 461,120, 460,117, 459,117, 458,119, 454,122, 449,121, 448,125, 449,131, 447,132, 447,136, 445,138, 445,140, 444,143, 446,146, 446,149, 447,155, 443,158, 443,162, 447,166, 447,171, 454,176, 458,177, 460,179, 462,180, 463,186"
"56","50-50-255","Morbihan","144,241, 140,237, 138,237, 138,240, 141,240|173,229, 178,229, 180,220, 182,215, 181,211, 182,208, 179,206, 176,206, 175,203, 177,200, 176,197, 173,197, 172,195, 169,195, 165,200, 163,199, 163,197, 159,197, 156,196, 154,194, 151,194, 150,192, 146,191, 144,193, 139,194, 136,193, 134,191, 132,191, 130,190, 128,192, 124,193, 123,197, 125,199, 125,201, 129,202, 131,204, 134,204, 135,206, 131,211, 130,216, 135,217, 144,225, 148,225, 150,226, 154,223, 156,223, 158,225, 158,227, 154,228, 154,230, 156,231, 160,230, 162,229, 164,230, 166,229, 169,231, 171,231"
"57","204-0-204","Moselle","519,155, 518,151, 520,150, 520,147, 522,146, 523,148, 527,148, 529,150, 533,150, 535,149, 539,150, 541,143, 535,138, 532,138, 531,140, 524,141, 520,140, 518,137, 514,137, 512,140, 509,140, 507,138, 505,133, 502,131, 503,128, 498,124, 494,124, 492,122, 487,122, 485,124, 480,125, 480,131, 482,133, 484,138, 483,145, 481,146, 482,148, 485,150, 486,152, 491,153, 494,154, 495,159, 498,162, 501,162, 504,163, 506,165, 509,167, 511,167, 522,172, 525,175, 529,171, 529,169, 530,166, 529,163, 530,160, 528,157, 522,156"
"58","100-151-255","Nièvre","414,273, 415,271, 413,269, 414,266, 413,264, 414,259, 417,256, 420,255, 420,252, 417,251, 416,246, 411,246, 410,244, 405,244, 401,243, 398,240, 396,240, 395,237, 392,236, 385,238, 382,238, 377,233, 373,234, 369,233, 368,237, 370,240, 368,245, 368,247, 372,250, 372,253, 374,258, 374,261, 375,274, 373,275, 373,277, 376,280, 380,283, 388,282, 390,284, 392,284, 395,282, 396,280, 399,280, 403,279, 404,281, 406,281, 413,277"
"59","153-153-51","Nord","413,89, 413,85, 415,83, 414,81, 411,80, 409,78, 406,78, 404,79, 399,78, 398,80, 396,79, 395,76, 396,73, 393,70, 391,70, 390,68, 387,70, 383,69, 382,65, 380,62, 381,59, 378,57, 378,55, 376,54, 372,55, 370,56, 369,58, 366,58, 363,55, 361,52, 359,52, 358,44, 356,42, 356,39, 353,38, 347,39, 342,41, 341,43, 344,48, 344,51, 347,54, 350,54, 351,60, 354,62, 356,62, 364,63, 366,65, 367,68, 371,69, 374,71, 375,75, 374,78, 375,82, 378,83, 379,88, 376,95, 383,95, 386,94, 388,95, 391,93, 394,94, 401,93, 406,94, 409,97, 413,97, 413,95, 416,93, 415,90"
"60","225-225-255","Oise","372,137, 373,135, 375,135, 376,131, 378,130, 376,125, 377,121, 376,118, 377,115, 371,115, 369,117, 365,117, 365,119, 360,121, 358,121, 356,119, 354,119, 351,117, 349,117, 346,115, 342,115, 339,116, 336,114, 332,114, 330,112, 327,112, 327,115, 326,121, 327,124, 329,125, 327,128, 327,132, 329,139, 327,140, 327,142, 333,143, 338,141, 341,143, 345,143, 348,145, 350,145, 354,146, 356,148, 359,147, 361,149, 363,149, 371,148, 376,146, 376,143, 374,140, 374,138"
"61","175-175-255","Orne","259,181, 260,184, 264,184, 266,181, 268,181, 272,180, 275,182, 276,189, 279,190, 282,193, 286,193, 289,196, 290,195, 289,190, 291,188, 293,188, 295,186, 295,178, 292,175, 290,170, 290,166, 288,164, 285,162, 284,159, 279,159, 275,156, 272,155, 266,156, 264,159, 262,159, 258,163, 255,161, 249,161, 244,160, 239,162, 237,162, 235,164, 233,164, 233,166, 234,168, 236,169, 235,172, 236,174, 234,177, 232,178, 232,180, 241,179, 244,177, 248,178, 251,177, 252,175, 254,175, 256,177, 256,180"
"62","102-102-51","Pas-de-Calais","361,89, 368,94, 371,94, 376,93, 378,86, 378,84, 375,83, 373,76, 374,73, 373,71, 369,70, 366,68, 365,65, 357,64, 352,62, 350,60, 350,55, 346,55, 343,51, 343,48, 340,43, 334,42, 332,44, 330,44, 324,49, 322,49, 323,56, 322,73, 321,77, 326,77, 329,76, 331,78, 334,78, 335,81, 338,82, 339,85, 344,85, 347,83, 350,83, 354,86, 353,89, 356,89, 359,91"
"63","255-150-150","Puy-de-Dôme","397,353, 398,355, 400,355, 402,354, 404,355, 407,354, 410,351, 412,350, 412,347, 411,344, 407,340, 404,338, 404,335, 402,333, 401,330, 402,324, 399,324, 397,321, 393,321, 390,318, 388,319, 379,318, 377,316, 375,316, 371,312, 370,308, 368,308, 366,311, 364,311, 362,313, 361,315, 358,315, 360,318, 360,322, 358,324, 355,329, 353,330, 357,337, 357,340, 355,342, 357,345, 357,347, 356,350, 362,351, 364,354, 368,354, 371,355, 373,357, 374,359, 376,359, 378,356, 381,356, 384,353"
"64","102-255-102","Pyrénées-Atlantiques","198,481, 199,479, 203,480, 206,482, 208,482, 210,484, 212,484, 213,486, 222,486, 223,490, 230,496, 237,495, 239,493, 239,490, 240,486, 243,483, 245,482, 245,479, 247,478, 251,473, 252,470, 251,468, 254,467, 253,461, 251,458, 251,456, 248,453, 244,452, 241,455, 233,454, 229,455, 224,454, 222,453, 209,456, 207,454, 205,454, 203,456, 197,456, 195,454, 192,455, 190,457, 186,462, 182,462, 183,465, 187,465, 188,468, 190,468, 191,466, 194,468, 196,468, 198,470, 198,472, 194,479, 196,481"
"65","153-102-51","Hautes-Pyrénées","265,503, 267,501, 270,503, 272,503, 272,495, 276,494, 278,491, 278,486, 276,485, 276,483, 273,480, 273,478, 277,474, 278,471, 275,469, 272,469, 270,470, 269,468, 267,468, 261,467, 258,463, 258,459, 252,454, 251,454, 252,458, 254,461, 254,465, 255,467, 252,468, 253,471, 250,476, 248,477, 246,480, 246,482, 244,484, 241,486, 241,489, 240,493, 239,495, 243,495, 246,496, 251,502, 255,502, 259,501, 261,500"
"66","51-51-0","Pyrénées-Orientales","338,522, 340,519, 343,519, 347,518, 350,520, 352,520, 355,523, 357,523, 359,522, 362,523, 362,520, 367,519, 370,516, 377,516, 379,518, 382,518, 382,516, 381,514, 378,513, 377,497, 373,496, 371,494, 368,494, 365,498, 359,498, 357,497, 352,498, 350,497, 350,503, 348,505, 346,505, 345,507, 343,507, 337,506, 334,507, 333,509, 328,511, 326,511, 324,512, 324,514, 328,515, 330,517, 332,517, 334,522"
"67","204-204-51","Bas-Rhin","532,186, 536,190, 538,190, 540,192, 540,194, 544,195, 544,193, 547,188, 547,185, 548,178, 550,173, 550,168, 555,162, 555,160, 557,159, 558,157, 560,156, 560,152, 563,148, 560,147, 558,145, 556,145, 542,144, 541,149, 539,151, 536,151, 534,150, 529,151, 527,149, 523,149, 522,147, 521,150, 519,151, 519,154, 521,154, 526,155, 530,158, 531,162, 530,165, 531,168, 530,171, 526,175, 525,184, 527,184, 530,186"
"68","153-153-0","Haut-Rhin","544,229, 544,227, 545,223, 542,220, 543,209, 545,204, 545,202, 543,200, 543,196, 540,195, 539,192, 536,191, 532,187, 528,187, 525,194, 525,198, 523,200, 523,202, 520,205, 520,209, 518,216, 521,217, 528,230, 528,233, 530,233, 539,234"
"69","0-255-51","Rhône","446,344, 449,341, 452,341, 454,340, 457,336, 457,334, 456,330, 450,330, 447,325, 444,324, 442,322, 442,314, 443,312, 442,310, 440,310, 438,308, 438,306, 431,305, 428,304, 428,307, 427,309, 428,311, 425,314, 423,317, 425,320, 425,323, 426,326, 428,328, 428,331, 427,334, 428,339, 432,343, 435,343, 439,346, 439,348, 444,349, 446,347"
"70","255-255-0","Haute-Saône","488,242, 491,239, 496,236, 499,232, 503,232, 507,233, 507,231, 510,230, 512,227, 514,227, 515,222, 514,217, 515,215, 511,212, 508,211, 507,209, 505,211, 501,211, 499,208, 492,210, 489,208, 489,206, 486,206, 486,208, 483,210, 480,210, 477,214, 473,217, 474,220, 473,223, 467,224, 464,225, 466,227, 467,232, 463,236, 465,238, 465,240, 467,242, 467,245, 468,247, 472,247, 474,248, 477,247, 479,245, 484,242"
"71","150-151-255","Saône-et-Loire","437,304, 439,306, 439,308, 442,309, 442,307, 447,291, 450,290, 454,291, 457,290, 458,292, 461,293, 465,292, 465,290, 463,288, 463,286, 465,284, 465,281, 462,274, 463,272, 465,271, 464,269, 462,269, 460,266, 456,265, 453,266, 451,265, 438,269, 436,267, 429,262, 426,261, 424,259, 420,256, 419,256, 415,259, 415,263, 414,265, 415,267, 414,269, 416,271, 415,277, 412,278, 410,280, 405,282, 402,280, 400,280, 397,281, 399,284, 399,286, 400,290, 407,293, 409,293, 410,299, 406,303, 406,305, 408,308, 410,308, 411,310, 413,310, 420,309, 424,310, 426,309, 427,304, 430,303"
"72","255-25-25","Sarthe","271,229, 273,231, 276,228, 279,226, 282,226, 282,223, 285,220, 288,218, 288,215, 290,213, 290,209, 291,207, 290,204, 292,201, 290,198, 287,196, 286,194, 281,194, 279,191, 276,190, 275,184, 274,182, 269,181, 266,182, 264,185, 260,186, 257,190, 257,197, 254,200, 254,205, 251,206, 251,211, 248,214, 248,216, 247,220, 248,223, 252,223, 254,225, 254,227, 256,227, 258,226, 261,227, 262,229, 267,230"
"73","51-153-153","Savoie","500,355, 498,357, 498,360, 501,363, 506,366, 506,368, 511,368, 512,366, 525,362, 527,362, 530,360, 531,358, 534,358, 536,356, 536,351, 538,348, 534,344, 531,343, 529,334, 527,334, 521,329, 518,329, 514,328, 512,326, 512,322, 510,322, 508,324, 508,327, 505,330, 505,332, 502,335, 499,333, 498,331, 496,331, 492,332, 490,330, 489,328, 485,325, 483,332, 483,334, 481,335, 480,338, 478,340, 481,344, 482,348, 484,348, 487,349, 490,345, 493,347, 496,347, 500,351"
"74","0-204-204","Haute-Savoie","504,330, 507,327, 507,324, 510,321, 512,321, 513,326, 520,328, 522,327, 522,325, 525,323, 527,323, 529,321, 530,316, 526,312, 524,311, 524,308, 521,308, 520,306, 522,299, 519,296, 520,293, 508,293, 506,296, 501,296, 500,302, 501,304, 495,309, 489,309, 489,311, 487,312, 486,314, 484,314, 484,318, 485,323, 487,325, 488,327, 491,329, 492,331, 495,331, 498,330, 500,332, 501,334, 504,332"
"75","199-255-175","Paris","350,164, 351,161, 348,160, 346,161, 346,163|503,55, 507,52, 509,52, 512,54, 515,54, 516,50, 512,49, 510,46, 510,43, 507,39, 507,36, 495,36, 493,38, 489,41, 487,41, 484,42, 482,44, 482,47, 485,48, 487,51, 490,51, 497,55"
"76","204-204-0","Seine-Maritime","300,138, 302,136, 304,136, 305,134, 309,133, 310,130, 312,128, 317,128, 321,129, 323,131, 326,131, 326,128, 328,126, 326,124, 326,122, 325,116, 326,112, 327,110, 325,103, 323,101, 318,97, 315,95, 313,95, 307,100, 302,102, 299,102, 292,105, 286,105, 282,108, 279,109, 277,111, 273,112, 270,114, 270,117, 267,122, 267,124, 270,124, 273,126, 275,126, 276,128, 283,126, 285,129, 294,130, 297,132, 297,136"
"77","199-255-75","Seine-et-Marne","371,198, 373,196, 373,190, 376,188, 385,188, 387,187, 387,181, 390,178, 390,176, 392,175, 391,173, 389,173, 388,171, 389,169, 387,167, 387,164, 388,161, 378,152, 378,149, 376,147, 375,147, 370,149, 364,149, 361,150, 359,148, 357,153, 359,158, 359,160, 358,162, 359,169, 357,172, 357,178, 356,188, 353,190, 351,193, 352,195, 354,196, 354,200, 359,201, 361,202, 363,200, 371,200"
"78","199-255-25","Yvelines","337,178, 337,172, 340,170, 341,168, 343,168, 343,166, 341,164, 341,161, 342,155, 337,154, 332,152, 330,150, 326,151, 318,150, 317,153, 318,158, 320,161, 320,165, 321,171, 322,174, 324,175, 325,177, 327,178, 327,181, 330,184, 332,182, 334,182"
"79","100-255-100","Deux-Sèvres","254,319, 254,321, 257,316, 261,313, 264,313, 266,314, 266,311, 263,309, 265,304, 265,301, 263,300, 261,301, 258,297, 258,294, 257,292, 259,290, 259,288, 260,285, 258,283, 258,281, 259,278, 258,273, 259,267, 258,264, 253,260, 250,258, 248,258, 243,260, 239,260, 237,263, 228,264, 229,270, 232,272, 232,275, 234,278, 234,280, 236,287, 236,289, 235,294, 237,296, 237,298, 233,301, 231,301, 231,305, 236,310, 238,310, 240,312, 242,312, 245,314, 247,314, 249,316, 251,316, 252,318"
"80","200-200-255","Somme","375,114, 375,110, 374,105, 376,104, 376,102, 378,99, 378,97, 374,94, 372,94, 367,95, 366,93, 364,93, 362,90, 360,92, 355,90, 353,90, 352,88, 353,86, 350,84, 347,84, 344,86, 339,86, 338,83, 335,82, 334,79, 331,79, 329,77, 327,77, 321,78, 321,80, 320,83, 321,85, 319,86, 318,90, 315,94, 317,96, 326,103, 326,105, 327,109, 332,113, 336,113, 339,115, 341,115, 346,114, 349,116, 351,116, 354,118, 356,118, 358,120, 361,120, 364,119, 364,117, 369,116, 371,114"
"81","153-102-102","Tarn","343,463, 347,462, 358,463, 361,460, 361,458, 359,456, 359,453, 361,451, 363,451, 366,452, 371,450, 371,447, 367,447, 364,448, 361,447, 357,442, 357,439, 353,430, 351,430, 348,426, 344,426, 340,423, 338,423, 336,425, 333,425, 331,426, 329,425, 327,428, 322,427, 324,429, 324,431, 321,433, 320,435, 318,435, 318,437, 317,440, 321,445, 323,448, 323,451, 322,453, 327,455, 332,460, 335,462, 337,465, 343,465"
"82","153-51-0","Tarn-et-Garonne","320,434, 323,430, 321,428, 322,426, 325,426, 327,427, 329,424, 331,423, 331,419, 333,418, 330,417, 329,414, 326,416, 323,416, 321,418, 318,420, 316,420, 315,418, 310,420, 306,420, 305,418, 302,417, 298,413, 298,411, 294,411, 291,412, 293,415, 291,422, 290,424, 287,424, 285,425, 285,427, 284,429, 287,429, 288,431, 285,434, 290,437, 290,441, 291,443, 297,443, 301,442, 303,444, 306,444, 308,443, 308,440, 313,439, 317,436, 318,434"
"83","0-0-204","Var","490,478, 491,480, 495,479, 496,477, 498,477, 504,478, 506,476, 510,476, 512,477, 512,475, 521,471, 524,471, 524,469, 525,467, 522,468, 521,466, 526,461, 526,459, 531,458, 534,456, 534,451, 533,448, 529,448, 527,445, 527,442, 523,441, 521,438, 513,439, 513,441, 509,442, 506,439, 504,440, 502,443, 500,443, 499,445, 496,445, 494,443, 492,443, 490,444, 487,443, 489,445, 489,448, 485,451, 485,453, 486,458, 489,461, 488,463, 486,463, 486,466, 489,469, 488,471, 485,473, 485,475, 488,476"
"84","0-0-102","Vaucluse","482,439, 480,439, 479,436, 480,434, 476,431, 477,426, 475,425, 475,423, 472,423, 471,421, 469,421, 466,418, 461,418, 457,414, 454,414, 449,417, 446,417, 445,413, 441,413, 441,418, 443,420, 443,425, 445,425, 447,427, 447,433, 450,434, 452,436, 454,436, 458,440, 460,443, 464,444, 467,443, 476,447, 482,447, 483,445, 485,445, 485,441|454,408, 452,407, 451,411, 453,411"
"85","255-50-50","Vendée","170,275, 169,275|234,294, 234,290, 235,285, 233,278, 231,275, 231,272, 228,270, 228,266, 227,264, 225,264, 217,263, 213,260, 209,261, 208,265, 204,266, 203,261, 202,264, 203,268, 201,270, 199,270, 194,269, 191,266, 186,263, 184,260, 182,260, 182,262, 178,266, 178,269, 179,271, 183,274, 187,279, 189,284, 189,286, 194,291, 197,293, 200,293, 202,295, 202,297, 206,297, 209,300, 212,301, 215,300, 217,298, 220,298, 221,300, 228,300, 230,301, 233,300, 236,297"
"86","125-255-125","Vienne","283,314, 285,312, 287,312, 289,313, 290,310, 289,308, 293,304, 296,304, 297,301, 301,300, 303,299, 299,294, 299,292, 297,292, 290,285, 291,280, 287,276, 287,274, 284,271, 283,267, 272,269, 270,269, 268,267, 268,262, 265,262, 263,260, 263,258, 261,258, 260,256, 259,256, 259,258, 256,259, 255,261, 259,264, 259,266, 260,272, 259,277, 260,280, 259,283, 261,285, 261,287, 260,290, 258,292, 259,297, 262,300, 264,299, 266,301, 266,305, 264,308, 265,310, 267,311, 267,314, 270,316, 273,315, 275,316, 275,314, 277,312, 280,314"
"87","255-255-100","Haute-Vienne","315,345, 318,345, 321,344, 324,341, 326,341, 328,339, 330,339, 330,333, 326,330, 323,331, 320,329, 320,326, 318,326, 316,324, 317,321, 315,314, 311,310, 311,307, 313,302, 310,300, 304,301, 302,300, 298,301, 297,304, 293,305, 290,308, 291,312, 290,316, 294,319, 294,323, 290,326, 288,331, 285,332, 283,335, 283,337, 285,337, 286,341, 288,343, 293,341, 296,342, 300,347, 300,349, 305,351, 310,350"
"88","255-0-255","Vosges","475,203, 477,204, 477,206, 481,209, 483,209, 485,208, 485,206, 489,205, 490,208, 494,209, 499,207, 502,210, 505,210, 506,208, 510,211, 513,212, 514,214, 517,215, 519,206, 522,202, 522,200, 524,198, 524,194, 527,187, 527,185, 525,185, 524,176, 523,176, 517,182, 515,182, 513,183, 509,182, 508,180, 506,180, 504,182, 497,184, 494,183, 490,184, 489,186, 487,186, 484,187, 480,183, 480,179, 477,179, 474,181, 471,181, 469,183, 466,183, 466,186, 468,189, 475,195, 473,198, 473,201"
"89","0-151-255","Yonne","401,242, 404,242, 410,243, 411,245, 414,245, 414,241, 415,238, 414,236, 417,233, 417,231, 422,222, 422,218, 420,217, 420,212, 415,211, 407,212, 404,209, 404,207, 402,204, 402,202, 399,200, 397,200, 394,197, 394,192, 390,188, 386,188, 376,189, 374,190, 374,196, 372,198, 372,201, 374,203, 374,205, 376,207, 377,210, 373,214, 373,220, 370,222, 367,222, 367,225, 369,226, 370,231, 373,233, 375,233, 378,232, 382,237, 387,237, 394,235, 396,237, 396,239, 398,239"
"90","255-255-25","Territoire de Belfort","527,231, 527,229, 525,227, 521,218, 519,218, 516,216, 515,221, 516,226, 515,229, 524,231"
"91","199-255-50","Essonne","340,192, 342,190, 344,190, 352,191, 355,187, 355,179, 356,171, 350,171, 345,169, 344,168, 341,169, 338,173, 338,179, 335,181, 333,184, 333,186, 334,192, 336,193"
"92","199-255-100","Hauts-de-Seine","345,163, 345,161, 347,160, 347,154, 344,154, 343,160, 342,164, 347,169, 348,165|495,60, 495,55, 490,52, 487,52, 483,48, 481,47, 481,44, 484,41, 486,41, 489,40, 492,37, 495,35, 495,33, 498,30, 498,27, 494,26, 492,25, 485,29, 475,39, 492,25, 485,29, 479,35, 474,39, 473,48, 472,54, 475,54, 477,56, 477,58, 479,58, 483,62, 484,65, 489,66, 491,68, 491,71, 494,71, 495,66, 497,64, 497,62"
"93","199-255-125","Seine-Saint-Denis","350,159, 352,161, 357,161, 358,157, 357,154, 356,154, 354,156, 348,156, 348,159|519,45, 522,46, 525,49, 529,52, 530,55, 534,56, 535,52, 532,50, 532,45, 530,43, 530,39, 533,36, 533,31, 535,30, 535,28, 531,23, 530,19, 531,15, 527,14, 524,19, 520,23, 518,23, 517,25, 507,25, 504,22, 502,22, 498,25, 493,24, 498,26, 499,30, 496,33, 496,35, 507,35, 508,39, 510,41, 511,46, 514,47"
"94","199-255-150","Val-de-Marne","357,170, 358,163, 352,162, 349,166, 349,169|517,74, 524,73, 525,78, 527,80, 531,81, 531,78, 533,73, 533,71, 535,69, 535,66, 533,64, 533,62, 534,57, 532,57, 529,55, 528,52, 526,50, 522,47, 518,46, 515,47, 517,50, 517,53, 515,55, 512,55, 509,53, 507,53, 505,55, 496,56, 496,60, 498,62, 498,64, 496,66, 496,69, 498,69, 503,70, 504,75, 507,75"
"95","199-255-0","Val-d'Oise","347,153, 349,155, 354,155, 356,153, 357,149, 354,147, 351,147, 344,144, 341,144, 338,142, 337,142, 332,144, 329,144, 324,143, 324,146, 323,149, 325,149, 328,150, 330,149, 332,151, 342,154"
"971","161-161-25","Guadeloupe","80,269, 80,172, 1,172, 1,269"
"972","161-161-125","Martinique","79,362, 79,271, 1,271, 1,362"
"973","161-161-200","Guyane","78,449, 78,365, 3,365, 3,449"
"974","161-161-225","Réunion","78,524, 78,453, 2,453, 2,524"
"975","25-161-161","Saint-Pierre-et-Miquelon","158,130, 158,4, 88,4, 88,130"
"976","125-161-161","Mayotte","81,101, 81,4, 3,4, 3,101"
"977","0-0-0","Saint-Barthélémy",""
"978","0-0-0","Saint-Martin",""
"986","200-161-161","Wallis-et-Futuna","161,527, 161,465, 160,405, 93,405, 93,464, 81,465, 81,527"
"987","225-161-161","Polynésie française","162,401, 162,306, 83,306, 83,401"
"988","225-225-161","Nouvelle-Calédonie","281,82, 281,7, 197,7, 197,82"
/tags/v1.8-irancy/composants/Composant.php
New file
0,0 → 1,13
<?php
 
class Composant {
 
public static function fabrique($classe, $options = array()) {
$classe_nom = implode('', array_map('ucfirst', explode('_', $classe)));
require_once dirname(__FILE__).DS.$classe.DS.$classe_nom.'.php';
$Composant = new $classe_nom($options);
return $Composant;
}
}
?>
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/composants/fragmenteur/squelettes/defaut.tpl.html
New file
0,0 → 1,56
<!-- FRAGMENTEUR : début -->
<div class="fragmenteur" style="clear:left;">
<h2>Navigation dans les résultats :</h2>
<?php if (isset($alphabet)) : ?>
<p style="margin:0;" class="aide">Cliquer sur une lettre pour faire apparaitre la liste des taxons correspondante :</p>
<p>
<strong>
<?php foreach ($alphabet as $lettre) : ?>
<?php if ($lettre['lettre'] == $lettre_selected) : ?>
<span class="frag_alpha_lien_selection"><?=$lettre['lettre'];?></span>&nbsp;
<?php else : ?>
<a class="frag_alpha_lien" href="<?=$lettre['url']?>"><?=$lettre['lettre'];?></a>&nbsp;
<?php endif; ?>
<?php endforeach; ?>
</strong>
</p>
<?php endif; ?>
<form id="fragmenteur_quantite" action="<?=$url;?>" method="get">
<p>
<?php if ($pager_links['pages']) : ?>
Pages&nbsp;:
<?php if (!empty($pager_links['first'])) : ?>
<span class="frag_premier frag_boite"><?=trim($pager_links['first']);?></span>
<?php endif; ?>
<?php if (!empty($pager_links['back'])) : ?>
<span class="frag_precedent frag_boite"><?=$pager_links['back'];?></span>
<?php endif; ?>
<?php if (!empty($pager_links['pages'])) : ?>
<span class="frag_pages"><?=$pager_links['pages'];?></span>
<?php endif; ?>
<?php if (!empty($pager_links['next'])) : ?>
<span class="frag_suivant frag_boite"><?=$pager_links['next'];?></span>
<?php endif; ?>
<?php if (!empty($pager_links['last'])) : ?>
<span class="frag_dernier frag_boite"><?=$pager_links['last'];?></span>
<?php endif; ?>
.
<?php endif; ?>
Résultats : <span class="frag_resultats"><?=$frag_donnee_debut;?> à <?=$frag_donnee_fin;?> sur <?=$frag_donnee_total;?></span> avec
<select id="frag_nbre" name="frag_nbre" onchange="javascript:this.form.submit();">
<option value="*" <?= ($par_page_selected == '*') ? 'selected="selected"': '';?>>tous</option>
<?php foreach ($par_page as $nbre) : ?>
<option value="<?=$nbre;?>" <?=$nbre == $par_page_selected? 'selected="selected"': '';?>><?=$nbre;?></option>
<?php endforeach; ?>
</select>
résultats par page.
<?php foreach ($form_get_url_chp_hidden as $cle => $val) : ?>
<input type="hidden" name="<?=$cle;?>" value="<?=$val;?>" />
<?php endforeach; ?>
</p>
</form>
</div>
<!-- FRAGMENTEUR : fin -->
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/composants/fragmenteur/squelettes/fragmenteur_defaut.css
New file
0,0 → 1,15
.fragmenteur select,.fragmenteur a,.fragmenteur .frag_page_courrante, .fragmenteur .frag_resultats{
color:white;
padding:5px;
margin:0 2px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;}
.fragmenteur select,.fragmenteur a{
background-color:#5D5C5C;
border:1px solid black;}
.fragmenteur a:hover,.fragmenteur .frag_page_courrante, .fragmenteur .frag_resultats{
font-weight:bold;
background-color:#AEDC43;
border:1px solid #86A736;}
.frag_separateur{display:none;}
/tags/v1.8-irancy/composants/fragmenteur/Fragmenteur.php
New file
0,0 → 1,178
<?php
 
class Fragmenteur {
const PAGER_MODE = 'Sliding';
const PAGE_DELTA = 2;
const PAGE_SEPARATEUR = '<span class="frag_separateur">-</span>';
const URL_VAR = 'page';
const SQUELETTE = 'defaut';
const DONNEES_PAR_PAGE_CHOIX = '10,20,50,100';
const DONNEES_PAR_PAGE_DEFAUT = 10;
const ALPHABET_AFFICHAGE_DEFAUT = false;
const ALPHABET_LETTRE_DEFAUT = 'A';
const CSS_CLASS_PAGE_COURRANTE = 'frag_page_courrante frag_boite';
const PAGE_SEPARATEUR_ESPACE = 0;
private $pager_mode;
private $pager;
private $url;
private $parametres_url = null;
private $lettre;
private $page_delta;
private $page_separateur;
private $donnees_total;
private $donnees_par_page;
private $donnees_par_page_choix;
private $url_var;
private $squelette;
private $chemin_squelette;
private $recherche_alphabetique;
private $squelette_donnees = array();
public function __construct($options) {
// Gestion de l'url
if (isset($options['url'])) {
if ($options['url'] instanceof Url) {
$this->url = $options['url'];
$this->parametres_url = $this->url->getVariablesRequete();
} else {
$msg = "Fragmenteur nécessite nécessite un objet Url du Framework de Tela Botanica pour fonctionner.";
trigger_error($msg, E_USER_ERROR);
}
} else {
$msg = "Fragmenteur nécessite de renseigner dans le tableau d'options l'url pour la clé 'url'".
trigger_error($msg, E_USER_ERROR);
}
// Gestion de la liste alphabétique
$this->alphabet_affichage = (isset($options['alphabet_affichage']) ? $options['alphabet_affichage'] : self::ALPHABET_AFFICHAGE_DEFAUT);
if ($this->alphabet_affichage == true) {
$lettre = (isset($options['lettre']) ? $options['lettre'] : self::ALPHABET_LETTRE_DEFAUT);
$this->setLettre($lettre);
if (isset($_GET['lettre'])) {
$this->setLettre(urldecode($_GET['lettre']));
}
}
// Gestion des infos pour le pager
$this->squelette = (isset($options['squelette']) ? $options['squelette'] : self::SQUELETTE).'.tpl.html';
$this->chemin_squelette = dirname(__FILE__).DS.'squelettes'.DS.$this->squelette;
$this->pager_mode = (isset($options['pager_mode']) ? $options['pager_mode'] : self::PAGER_MODE);
$this->page_delta = (isset($options['page_delta']) ? $options['page_delta'] : self::PAGE_DELTA);
$this->page_separateur = (isset($options['page_separateur']) ? $options['page_separateur'] : self::PAGE_SEPARATEUR);
$this->url_var = (isset($options['url_var']) ? $options['url_var'] : self::URL_VAR);
$this->donnees_par_page = (isset($options['donnees_par_page']) ? $options['donnees_par_page'] : self::DONNEES_PAR_PAGE_DEFAUT);
$this->donnees_par_page_choix = (isset($options['donnees_par_page_choix']) ? $options['donnees_par_page_choix'] : self::DONNEES_PAR_PAGE_CHOIX);
$this->donnees_total = (isset($options['donnees_total']) ? $options['donnees_total'] : 0);
// Gestion du nombre de données à afficher par page.
if (isset($_GET['frag_nbre'])) {
if ($_GET['frag_nbre'] == '*') {
$_GET['page'] = 1;
}
$_SESSION['fragmenteur']['donnees_par_page'] = $_GET['frag_nbre'];
} else {
$_SESSION['fragmenteur']['donnees_par_page'] = $this->donnees_par_page;
}
$this->donnees_par_page = $_SESSION['fragmenteur']['donnees_par_page'];
if ($this->donnees_par_page == '*') {
$this->donnees_par_page = $this->donnees_total;
}
// Gestion du Fragmenteur (basé sur le Pager de Pear)
$pager_options = array( 'mode' => $this->pager_mode,
'perPage' => $this->donnees_par_page,
'delta' => $this->page_delta,
'totalItems' => $this->donnees_total,
'urlVar' => $this->url_var,
'separator' => $this->page_separateur,
'curPageLinkClassName' => self::CSS_CLASS_PAGE_COURRANTE,
'spacesBeforeSeparator' => self::PAGE_SEPARATEUR_ESPACE,
'spacesAfterSeparator' => self::PAGE_SEPARATEUR_ESPACE,
);
$this->pager = Pager::factory($pager_options);
}
public function getDonneesParPage() {
return $this->donnees_par_page;
}
public function getDeplacementParPageId() {
return $this->pager->getOffsetByPageId();
}
public function getLettre() {
return $this->lettre;
}
public function setLettre($l) {
$this->lettre = $l;
}
public function getDonneesTotal() {
return $this->donnees_total;
}
public function setDonneesTotal($dt) {
$this->donnees_total = $dt;
}
 
private function getSqueletteDonnees() {
return $this->squelette_donnees;
}
private function setSqueletteDonnees($cle, $valeur) {
$this->squelette_donnees[$cle] = $valeur;
}
public function executer() {
// Gestion de la liste alphabétique
if ($this->alphabet_affichage == true) {
$alphabet = array();
$this->url->setVariableRequete('lettre', '*');
$alphabet['*'] = array('url' => $this->url->getURL(),
'lettre' => 'tous');
$this->url->unsetVariableRequete('lettre');
for ($i = 65; $i <= 90; $i++){
$this->url->setVariableRequete('lettre', chr($i));
$alphabet[chr($i)] = array('url' => $this->url->getURL(),
'lettre' => chr($i));
$this->url->unsetVariableRequete('lettre');
}
$this->setSqueletteDonnees('alphabet', $alphabet);
// Gestion de la lettre
$this->setSqueletteDonnees('lettre_selected', $this->getLettre());
// Gestion de l'url
$this->url->setVariableRequete('lettre', $this->getLettre());
}
// Gestion des urls
$this->url->setVariableRequete('page', $this->pager->getCurrentPageID());
$this->setSqueletteDonnees('url', $this->url->getURL());
// Gestion du fragmenteur
$this->setSqueletteDonnees('frag_donnee_total', $this->donnees_total);
$page_id_x_saut = ($this->pager->getCurrentPageID() * $this->donnees_par_page);
$this->setSqueletteDonnees('frag_donnee_debut', (($page_id_x_saut - $this->donnees_par_page) > 0 ? ($page_id_x_saut - $this->donnees_par_page) : 0));
$this->setSqueletteDonnees('frag_donnee_fin', ($page_id_x_saut >= $this->donnees_total ? $this->donnees_total : $page_id_x_saut));
$this->setSqueletteDonnees('par_page', explode(',', $this->donnees_par_page_choix));
$this->setSqueletteDonnees('par_page_selected', $_SESSION['fragmenteur']['donnees_par_page']);
$this->setSqueletteDonnees('pager_links', $this->pager->getLinks());
// Gestion des paramêtres pour le formulaire du Fragmenteur
$form_get_url_chp_hidden = array();
foreach ($this->parametres_url as $cle => $valeur) {
$form_get_url_chp_hidden[$cle] = $valeur;
}
$this->setSqueletteDonnees('form_get_url_chp_hidden', $form_get_url_chp_hidden);
// Création du rendu à partir du squelette et de ses données
$sortie = SquelettePhp::analyser($this->chemin_squelette, $this->getSqueletteDonnees());
return $sortie;
}
}
?>
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/CHANGELOG
New file
0,0 → 1,2
Changements 2014-01-06 [création de la branche "v1.7-Hermitage"]:
* Nouveau moteur de recherche collections + personnes
/tags/v1.8-irancy/configurations/config.default.ini
New file
0,0 → 1,95
; +------------------------------------------------------------------------------------------------------+
; Général
; Séparateur de dossier
ds = DIRECTORY_SEPARATOR
 
; +------------------------------------------------------------------------------------------------------+
; Info sur l'application
info.nom = Consultation des Collections
; Abréviation de l'application
info.abr = COLL
; Code numérique de la version de l'application
info.version.code.num = "1.5"
; Code alphabétique de la version de l'application
info.version.code.alpha = "graves"
; Nom de la version de l'application
info.version.nom = "Graves"
; Version du Framework nécessaire au fonctionnement de cette application
info.framework.version = 0.2
;Encodage de l'application
appli_encodage = "UTF-8"
; Nom de domaine pour l'URL de base de l'application : 162.38.234.6
domaine = "www.tela-botanica.org"
; URL de base de l'application, si elle est laissée vide, l'application fonctionnera en Stand-alone
url_base = "http://{ref:domaine}/client/collection/v{ref:info.version.code.num}-{ref:info.version.code.alpha}/"
; URL de base de l'application avec l'indication du fichier de départ
url_base_index = "{ref:url_base}index.php"
; URL de base où se situe le .htacces réalisant la réecriture d'URL pour les permaliens de l'application
url_base_permalien = "{ref:url_base}"
; Mettre à true si l'application nécessite de s'identifier.
identification = false
 
; +------------------------------------------------------------------------------------------------------+
; Paramètrage de la session
; Devons nous démarrer une session : oui (true) ou non (false)
session_demarrage = "php:true"
; Définition du nom de la session à utiliser
session_nom = "collection"
 
; +------------------------------------------------------------------------------------------------------+
; Débogage
; Indique si oui ou non on veut afficher le débogage.
fw_debogage = true
; Indique si oui ou non on veut lancer le chronométrage
chronometrage = false
 
; +------------------------------------------------------------------------------------------------------+
; Spécifique à l'application
; Url du Jrest utilisé pour les services web fournissant les données à l'application
url_jrest = "http://www.tela-botanica.org/eflore/coel/jrest/"
; Template d'URL pour les images de l'application
url_img = "{ref:url_base}squelettes/img/%s"
; Nom du fichier de l'image à utiliser pour des liens vers des cartes
img_carte = "carte.png"
; Template d'URL pour le lien vers une carte (Google Map ou OSM)
; OSM : http://www.openstreetmap.org/?lat=%s&lon=%s&zoom=17
; GGM : http://maps.google.fr/?ll=%s,%s
lien_vers_carte = "http://www.openstreetmap.org/?lat=%s&lon=%s&zoom=17"
 
; +------------------------------------------------------------------------------------------------------+
; Spécifique au module Rechercher
; Nombre de résultats par page par défaut
resultat_par_page_defaut = "50"
; Nombre de résultats par page, choix proposés
resultat_par_page_choix = "20,50,100,200"
 
; +------------------------------------------------------------------------------------------------------+
; Spécifique au module Fiche
guid = "urn:lsid:tela-botanica.org:coel:%s"
guid_id_structure = "str"
guid_id_collection = "col"
guid_id_personne = "per"
 
; +------------------------------------------------------------------------------------------------------+
; Spécifique au module Carte
; Active (=true) ou désactive (=false) le mode de débogage de la cartographie
carte_mode_debug = false
; Nom du fichier sans l'extension de la carte de base de fond à utiliser
carte_base_nom = "france"
; Chemin vers le dossier des fonds de cartes relatif à l'application
carte_fonds_chemin = "composants{ref:ds}cartographie{ref:ds}squelettes{ref:ds}"
; Chemin vers le dossier où seront stockée les cartes créées
carte_sotckage_chemin = "/home/jpm/web/collection/cartes/"
; Url du dossier où seront stockée les cartes créées avec %s pour indiquer le fichier
carte_sotckage_url = "http://{ref:domaine}/collection/cartes/%s"
; Nom du fichier de carte généré
carte_genere_nom = "col_str_dep"
; Constante stockant la couleur la plus foncé utilisée pour les cartes "proportionnelles".0,127,0
carte_couleur_foncee = "140,168,68"
; Constante stockant la couleur la plus claire utilisée pour les cartes "proportionnelles".210,230,210
carte_couleur_claire = "243,247,224"
 
; +------------------------------------------------------------------------------------------------------+
; Spécifique au module Syndication
; Limite du nombre d'entrées pour les flux de la syndication
flux_limite = "50"
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/configurations/config_paca.ini
New file
0,0 → 1,41
; +------------------------------------------------------------------------------------------------------+
; Général
; Séparateur de dossier
ds = DIRECTORY_SEPARATOR
 
; +------------------------------------------------------------------------------------------------------+
; Infos sur l'application
info.nom = Consultation des Collections PACA
info.abr = COLL
; Code numérique de la version de l'application
info.version.code.num = "1.4"
; Code alphabétique de la version de l'application
info.version.code.alpha = "gigondas"
; Nom de la version de l'application
info.version.nom = "Gigondas"
; URL de base de l'application avec l'indicaiton du fichier de départ
url_base_index = "{ref:url_base}paca.php"
 
; +------------------------------------------------------------------------------------------------------+
; Paramètrage de la session
; Devons nous démarrer une session : oui (true) ou non (false)
session_demarrage = "php:true"
; Définition du nom de la session à utiliser
session_nom = "collection-paca"
 
; +------------------------------------------------------------------------------------------------------+
; Débogage
; Indique si oui ou non on veut afficher le débogage.
fw_debogage = false
 
; +------------------------------------------------------------------------------------------------------+
; Spécifique à l'application
; Nom du fichier de l'image à utiliser pour des liens vers des cartes
img_carte = "carte_paca.png"
 
; +------------------------------------------------------------------------------------------------------+
; Spécifique au module Carte
; Active (=true) ou désactive (=false) le mode de débogage de la cartographie
carte_mode_debug = false
; Nom du fichier de carte généré
carte_genere_nom = "col_str_dep_paca"
/tags/v1.8-irancy/configurations/config_papyrus.default.ini
New file
0,0 → 1,12
; +------------------------------------------------------------------------------------------------------+
; Paramètrage de la session
; Devons nous démarrer une session : oui (true) ou non (false)
session_demarrage = "php:false"
; Encodage de sortie de l'application dans le contexte de Papyrus
sortie_encodage = "ISO-8859-1"
; URL de base de l'application, si elle est laissée vide, l'application fonctionnera en Stand-alone
url_base = "php:$GLOBALS['_GEN_commun']['url']->getUrl()"
; URL de base de l'application avec l'indicaiton du fichier de départ
url_base_index = "{ref:url_base}"
; URL de base où se situe le .htacces réalisant la réécriture d'URL pour les permaliens de l'application
url_base_permalien = "http://www.tela-botanica.org/"
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/configurations/.htaccess
New file
0,0 → 1,2
# Ce fichier est là pour éviter l'accès au fichier .ini depuis un navigateur.
deny from all
/tags/v1.8-irancy/configurations
New file
Property changes:
Added: svn:ignore
+config.ini
+config_papyrus.ini
/tags/v1.8-irancy/framework.defaut.php
New file
0,0 → 1,6
<?php
// Inclusion du Framework
// Renomer ce fichier en "framework.php"
// Indiquyer ci-dessous le chemin vers le fichier autoload.inc.php de la bonne version du Framework
require_once '/framework/0.2/autoload.inc.php';
?>
/tags/v1.8-irancy/paca.php
New file
0,0 → 1,63
<?php
// declare(encoding='UTF-8');
// Nous forçons le parametre "contexte" avec la valeur "paca"
$_GET['contexte'] = 'paca';
/** Inclusion du fichier principal de l'application*/
require_once 'collection.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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" />
 
<title><?php echo AppControleur::getMetaTitre(); ?></title>
<meta name="description" content="<?php echo AppControleur::getMetaDescription();?>" />
<meta name="keywords" content="<?php echo AppControleur::getMetaTags();?>" />
<meta name="revisit-after" content="15 days" />
<meta name="robots" content="index,follow" />
<meta name="author" content="Tela Botanica" />
 
<link rel="stylesheet" type="text/css" media="screen" href="squelettes/css/collection/generale.css" />
<link rel="stylesheet" type="text/css" media="screen" href="squelettes/css/collection/collection.css" />
<link rel="stylesheet" type="text/css" media="screen" href="squelettes/css/humanity/jquery-ui-1.8.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="squelettes/css/collection/debogage.css" />
<link rel="stylesheet" type="text/css" media="print" href="http://www.tela-botanica.org/sites/commun/fr/styles/impression.css" />
<script type="text/javascript" src="squelettes/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="squelettes/js/jquery.cookie.min.js"></script>
<script type="text/javascript" src="squelettes/js/jquery-ui-1.8.custom.min.js"></script>
<script type="text/javascript" src="squelettes/js/jquery-collection.min.js"></script>
</head>
<body>
<div id="zone-centrale">
<div id="zone-corps">
<div id="zone-navigation">
<?php echo AppControleur::getContenuNavigation(); ?>
</div>
<div id="zone-corps-contenu">
<div id="entete">
<?php echo AppControleur::getContenuTete(); ?>
</div>
<div id="texte">
<?php echo AppControleur::getContenuCorps(); ?>
</div>
<div id="pied_texte">
<?php echo AppControleur::getContenuPied(); ?>
</div>
</div>
<div>
<?php echo AppControleur::getChrono(); ?>
<?php echo AppControleur::getExceptions(); ?>
</div>
<div id="zone-pied">
<p> &copy;<a href="http://www.tela-botanica.org/" accesskey="1">Tela Botanica</a> / 2000-<?=date('Y')?> - Le réseau des Botanistes Francophones</p>
</div>
</div>
</div>
</body>
</html>
/tags/v1.8-irancy/index.php
New file
0,0 → 1,88
<?php
// declare(encoding='UTF-8');
/** Inclusion du fichier principal de l'application*/
require_once 'collection.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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" />
 
<title><?php echo AppControleur::getMetaTitre(); ?></title>
<meta name="description" content="<?php echo AppControleur::getMetaDescription();?>" />
<meta name="keywords" content="<?php echo AppControleur::getMetaTags();?>" />
<meta name="revisit-after" content="15 days" />
<meta name="robots" content="index,follow" />
<meta name="author" content="Tela Botanica" />
 
<link rel="shortcut icon" type="image/x-icon" href="http://www.tela-botanica.org/favicon.ico" />
<link rel="icon" type="image/png" href="http://www.tela-botanica.org/sites/commun/generique/images/favicones/tela_botanica.png" />
 
<link rel="stylesheet" type="text/css" media="screen" href="squelettes/css/collection/generale.css" />
<link rel="stylesheet" type="text/css" media="screen" href="squelettes/css/collection/collection.css" />
<link rel="stylesheet" type="text/css" media="screen" href="squelettes/css/humanity/jquery-ui-1.8.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="squelettes/css/collection/debogage.css" />
<link rel="stylesheet" type="text/css" media="print" href="http://www.tela-botanica.org/sites/commun/fr/styles/impression.css" />
<script type="text/javascript" src="squelettes/js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="squelettes/js/jquery.cookie.min.js"></script>
<script type="text/javascript" src="squelettes/js/jquery-ui-1.8.custom.min.js"></script>
<script type="text/javascript" src="squelettes/js/jquery-collection.min.js"></script>
</head>
<body>
<div id="reducteur">
 
<div id="logo_tela">
<a href="/" title="Retour à l'accueil du site">
<img src="http://www.tela-botanica.org/sites/reseau/generique/images/graphisme/logo_jaune.gif" alt="le logo de Tela Botanica"/>
</a>
</div>
<div id="bandeau">
<div id="bandeau_contenu">
<div id="titre_monde">
<h1>Collections</h1>
</div>
</div>
</div>
<div id="droite">
<div id="onglets">
<?php echo AppControleur::getContenuNavigation(); ?>
</div>
<div id="contenu">
<div id="entete">
<?php echo AppControleur::getContenuTete(); ?>
</div>
<div id="texte">
<?php echo AppControleur::getContenuCorps(); ?>
</div>
<div id="pied_texte">
<?php echo AppControleur::getContenuPied(); ?>
</div>
</div>
<div>
<?php echo AppControleur::getChrono(); ?>
<?php echo AppControleur::getExceptions(); ?>
</div>
<div id="pied">
<p> &copy;<a href="http://www.tela-botanica.org/" accesskey="1">Tela Botanica</a> / 2000-<?=date('Y')?> - Le réseau des Botanistes Francophones</p>
</div>
</div>
<div id="nav_gauche">
<ul>
<li><a href="<?=basename(__FILE__)?>?module=Recherche">Recherche</a></li>
<li><a href="<?=basename(__FILE__)?>?module=Carte">Carte</a></li>
<li><a href="<?=basename(__FILE__)?>?module=Syndication">Syndication</a></li>
</ul>
</div>
</div>
</body>
</html>
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/pied.tpl.html
New file
0,0 → 1,21
<!-- COL - DEBUT PIED DE PAGE -->
<script type="text/javascript">
$(document).ready(function() {
$('span.courriel').courriel();
});
</script>
<p>
Pour plus d'informations ou nous faire part d'une erreur dans les informations affichées, veuillez nous contacter à l'adresse
<span class="courriel">coel [arrobase] tela-botanica [point] org</span>.
</p>
<p>
Merci de signaler
<a href="http://suivi.tela-botanica.org/index.php?project=36&amp;do=index" class="lien_ext">
les bogues et améliorations pour l'application
<span class="coll-appli-info">
«&nbsp;<?=$appli['nom']?>&nbsp;» [<?=$appli['abr']?>]
v.<?=$appli['version']['code']['num']?> - <?=$appli['version']['nom']?>
</span>
</a>.
</p>
<!-- COL - FIN PIED DE PAGE -->
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/metadonnees.tpl.html
New file
0,0 → 1,10
<h2>Méta-données</h2>
<dl class="label-moyen">
<dt>GUID (Permalien)</dt> <dd><a href="<?=$_guid_url_?>"><?=$_guid_?></a></dd>
<dt>Notes</dt> <dd><?=$_notes_?></dd>
<dt>Sources</dt> <dd><?=$_source_?></dd>
<dt>Modifié par</dt> <dd><?=$_modifier_par_?> (<?=$_modifier_par_courriel_?>)</dd>
<dt>Date de dernière modification</dt> <dd><?=$_date_modification_?> </dd>
<dt>État de l'enregistrement</dt> <dd><?=$_etat_?> </dd>
</dl>
<hr class="nettoyeur"/>
/tags/v1.8-irancy/squelettes/resultat.tpl.html
New file
0,0 → 1,39
<!-- COL - DEBUT RESULTAT -->
<div id="col_resultat">
<?=$fragmenteur;?>
<?php if (isset($infos)) : ?>
<ul>
<!-- recherche de collections -->
<?php if ($masque['cible'] == 'collections'): ?>
<?php foreach ($infos as $info) : ?>
<li><?=$info['structure']['ville']?> - <a href="<?=$info['structure']['url']?>"><?=$info['structure']['nom']?></a>
<?php if (isset($info['collections'])) : ?>
<ul>
<?php foreach ($info['collections'] as $collection) : ?>
<li><a href="<?=$collection['url']?>"><?=$collection['nom']?></a></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
</li>
<?php endforeach; ?>
<!-- recherche de personnes -->
<?php elseif ($masque['cible'] == 'personnes'): ?>
<?php foreach ($infos['personnes'] as $personne) : ?>
<li>
<a href="<?=$personne['url']?>">
<?php if($personne['nomcomplet']): ?>
<?=$personne['nomcomplet']?>
<?php else: ?>
<?=$personne['prenom']?> <?=$personne['nom']?>
<?php endif; ?>
</a>
<?php if($personne['surnom']): ?>
(<?=$personne['surnom']?>)
<?php endif; ?>
</li>
<?php endforeach; ?>
<?php endif; ?>
</ul>
<?php endif; ?>
</div>
<!-- COL - FIN RESULTAT -->
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/courriel.tpl.html
New file
0,0 → 1,0
<span class="courriel" title="Envoyer un courriel"><?=$courriel?></span>
/tags/v1.8-irancy/squelettes/syndication.tpl.html
New file
0,0 → 1,20
<!-- COL - DEBUT SYNDICATION -->
<div id="col-syndication">
<h1>Liste des flux RSS de l'application Collection En Ligne (COEL)</h1>
<p>Veuillez sélectionner un des flux RSS ci-dessous pour obtenir la liste des dernières modifications correspondantes.</p>
<ul>
<?php foreach ($syndications as $flux) : ?>
<li><h2><?=$flux['titre']?></h2>
<p><?=$flux['description']?></p>
<ul>
<?php foreach ($flux['urls'] as $format => $url) : ?>
<li class="icone icone-<?=$format?>"><a href="<?=$url?>?limit=<?=$limite?>" class="lien_ext"><?=$format?></a></li>
<?php endforeach; ?>
</ul>
</li>
<?php endforeach; ?>
</ul>
<p>Vous pouvez limiter le nombre de résultat des flux en ajoutant le paramêtre "limit" suivit du nombre de résultats
attendus. Exemple : </p>
</div>
<!-- COL - FIN SYNDICATION -->
/tags/v1.8-irancy/squelettes/css/ui-darkness/jquery-ui-1.8.custom.css
New file
0,0 → 1,296
/*
* jQuery UI CSS Framework
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
*/
 
/* Layout helpers
----------------------------------*/
.ui-helper-hidden { display: none; }
.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.ui-helper-clearfix { display: inline-block; }
/* required comment for clearfix to work in Opera \*/
* html .ui-helper-clearfix { height:1%; }
.ui-helper-clearfix { display:block; }
/* end clearfix */
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
 
 
/* Interaction Cues
----------------------------------*/
.ui-state-disabled { cursor: default !important; }
 
 
/* Icons
----------------------------------*/
 
/* states and images */
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
 
 
/* Misc visuals
----------------------------------*/
 
/* Overlays */
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
 
 
/*
* jQuery UI CSS Framework
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Segoe%20UI,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=333333&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=25&borderColorHeader=333333&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=000000&bgTextureContent=05_inset_soft.png&bgImgOpacityContent=25&borderColorContent=666666&fcContent=ffffff&iconColorContent=cccccc&bgColorDefault=555555&bgTextureDefault=02_glass.png&bgImgOpacityDefault=20&borderColorDefault=666666&fcDefault=eeeeee&iconColorDefault=cccccc&bgColorHover=0078a3&bgTextureHover=02_glass.png&bgImgOpacityHover=40&borderColorHover=59b4d4&fcHover=ffffff&iconColorHover=ffffff&bgColorActive=f58400&bgTextureActive=05_inset_soft.png&bgImgOpacityActive=30&borderColorActive=ffaf0f&fcActive=ffffff&iconColorActive=222222&bgColorHighlight=eeeeee&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=80&borderColorHighlight=cccccc&fcHighlight=2e7db2&iconColorHighlight=4b8e0b&bgColorError=ffc73d&bgTextureError=02_glass.png&bgImgOpacityError=40&borderColorError=ffb73d&fcError=111111&iconColorError=a83300&bgColorOverlay=5c5c5c&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=50&opacityOverlay=80&bgColorShadow=cccccc&bgTextureShadow=01_flat.png&bgImgOpacityShadow=30&opacityShadow=60&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px
*/
 
 
/* Component containers
----------------------------------*/
.ui-widget { font-family: Segoe UI, Arial, sans-serif; font-size: 1.1em; }
.ui-widget .ui-widget { font-size: 1em; }
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Segoe UI, Arial, sans-serif; font-size: 1em; }
.ui-widget-content { border: 1px solid #666666; background: #000000 url(images/ui-bg_inset-soft_25_000000_1x100.png) 50% bottom repeat-x; color: #ffffff; }
.ui-widget-content a { color: #ffffff; }
.ui-widget-header { border: 1px solid #333333; background: #333333 url(images/ui-bg_gloss-wave_25_333333_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
.ui-widget-header a { color: #ffffff; }
 
/* Interaction states
----------------------------------*/
.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #666666; background: #555555 url(images/ui-bg_glass_20_555555_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eeeeee; }
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #eeeeee; text-decoration: none; }
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #59b4d4; background: #0078a3 url(images/ui-bg_glass_40_0078a3_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; }
.ui-state-hover a, .ui-state-hover a:hover { color: #ffffff; text-decoration: none; }
.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #ffaf0f; background: #f58400 url(images/ui-bg_inset-soft_30_f58400_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; }
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; text-decoration: none; }
.ui-widget :active { outline: none; }
 
/* Interaction Cues
----------------------------------*/
.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #cccccc; background: #eeeeee url(images/ui-bg_highlight-soft_80_eeeeee_1x100.png) 50% top repeat-x; color: #2e7db2; }
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #2e7db2; }
.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #ffb73d; background: #ffc73d url(images/ui-bg_glass_40_ffc73d_1x400.png) 50% 50% repeat-x; color: #111111; }
.ui-state-error a, .ui-widget-content .ui-state-error a { color: #111111; }
.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #111111; }
.ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; }
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
 
/* Icons
----------------------------------*/
 
/* states and images */
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_cccccc_256x240.png); }
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_cccccc_256x240.png); }
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
.ui-state-default .ui-icon { background-image: url(images/ui-icons_cccccc_256x240.png); }
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
.ui-state-active .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); }
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_4b8e0b_256x240.png); }
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_a83300_256x240.png); }
 
/* positioning */
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -64px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -64px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-off { background-position: -96px -144px; }
.ui-icon-radio-on { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
 
 
/* Misc visuals
----------------------------------*/
 
/* Corner radius */
.ui-corner-tl { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; }
.ui-corner-tr { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; }
.ui-corner-bl { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; }
.ui-corner-br { -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
.ui-corner-top { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; }
.ui-corner-bottom { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
.ui-corner-right { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
.ui-corner-left { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; }
.ui-corner-all { -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; }
 
/* Overlays */
.ui-widget-overlay { background: #5c5c5c url(images/ui-bg_flat_50_5c5c5c_40x100.png) 50% 50% repeat-x; opacity: .80;filter:Alpha(Opacity=80); }
.ui-widget-shadow { margin: -7px 0 0 -7px; padding: 7px; background: #cccccc url(images/ui-bg_flat_30_cccccc_40x100.png) 50% 50% repeat-x; opacity: .60;filter:Alpha(Opacity=60); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* Tabs
----------------------------------*/
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
.ui-tabs .ui-tabs-panel { display: block; border: 0; padding: 1em 1.4em; background: none; }
.ui-tabs .ui-tabs-hide { display: none !important; }
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-icons_222222_256x240.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-icons_222222_256x240.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-bg_inset-soft_25_000000_1x100.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-bg_inset-soft_25_000000_1x100.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-bg_glass_40_0078a3_1x400.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-bg_glass_40_0078a3_1x400.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-bg_gloss-wave_25_333333_500x100.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-bg_gloss-wave_25_333333_500x100.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-icons_a83300_256x240.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-icons_a83300_256x240.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-bg_inset-soft_30_f58400_1x100.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-bg_inset-soft_30_f58400_1x100.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-bg_flat_50_5c5c5c_40x100.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-bg_flat_50_5c5c5c_40x100.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-bg_highlight-soft_80_eeeeee_1x100.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-bg_highlight-soft_80_eeeeee_1x100.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-icons_cccccc_256x240.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-icons_cccccc_256x240.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-icons_ffffff_256x240.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-icons_ffffff_256x240.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-icons_4b8e0b_256x240.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-icons_4b8e0b_256x240.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-bg_glass_20_555555_1x400.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-bg_glass_20_555555_1x400.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-bg_glass_40_ffc73d_1x400.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-bg_glass_40_ffc73d_1x400.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-bg_flat_30_cccccc_40x100.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/ui-darkness/images/ui-bg_flat_30_cccccc_40x100.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/collection/collection.css
New file
0,0 → 1,181
@charset "UTF-8";
/*--------------------------------------------------------------------------------------------------------------*/
/* Général */
/*Correction CSS Tela */
#texte, h1{
position:relative;/*Pour IE*/}
#contenu{
clear:none;/*Pour IE*/}
/*Titres*/
h2, h3{
margin:0;
padding:1em 0 0 0;}
/* Liste de définitions */
dl{
margin:0;
padding:0;
width:auto;}
dt{
background-color:#EEE;
width:18em;
float:left;
text-align:right;
margin:0;
padding:.3em;
border-top:1px solid #999;
font-weight:normal;}
#zone_contenu_corps li {
list-style-image:none;}
.label-grand dt{
width:28em;}
.label-court dt{
width:12em;}
dt:after{
content:" : ";}
/* hack de commentaire avec un antislash pour ie5 mac \*/
h2, h3, dt, .nettoyeur{
clear:both;}
/* end hack */
dd{
background-color:#FFF;
margin:0;
padding:.3em;
border-top:1px solid #999;}
.nettoyeur{
visibility:hidden;}
/* Table */
table{
border:1px solid #1C3C78;
border-collapse:collapse;
width:100% !important;width:95%;/*Pour IE*/
margin:auto;}
thead, tfoot{
background-color:#EEE;
border:1px solid #1C3C78;}
tbody{
background-color:#FFF;
border:1px solid #1C3C78;}
th{
font-family:monospace;
border:1px dotted #1C3C78;
padding:5px;
background-color:#EEE;}
td{
font-family:sans-serif;
font-size:80%;
border:1px solid #1C3C78;
padding:5px;
text-align:left;}
caption{
font-family:sans-serif;}
/*--------------------------------------------------------------------------------------------------------------*/
/* Présentation Moteur */
label#col-rech{
display:none;}
/* Navigation dans les résultats */
.fragmenteur select,.fragmenteur a,.fragmenteur .frag_page_courrante, .fragmenteur .frag_resultats{
color:white;
padding:5px;
margin:0 2px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
border-radius: 4px;}
.fragmenteur select,.fragmenteur a{
background-color:#5D5C5C;
border:1px solid black;}
.fragmenteur a:hover,.fragmenteur .frag_page_courrante, .fragmenteur .frag_resultats{
font-weight:bold;
background-color:#AEDC43;
border:1px solid #86A736;}
.frag_separateur{display:none;}
 
/*--------- Masque de recherche avancée ---------*/
#col-rech-masque {
width: 725px;
/*padding: 10px;*/
/*border: solid #ddd 1px;*/
}
 
h2.titre-moteur-recherche {
margin-bottom: 10px;
}
 
.champ-masque {
display: inline-block;
width: 360px;
margin-top: 2px;
}
.champ-masque input {
width: 200px;
}
.champ-masque select {
max-width: 190px;
}
.champ-masque label {
display: inline-block;
text-align: right;
}
.champ-masque label.label-gauche {
width: 130px;
vertical-align: middle;
}
.champ-masque label.label-droite {
width: 120px;
}
.champ-masque input.input-droite {
width: 210px;
}
 
/*--------------------------------------------------------------------------------------------------------------*/
/* Présentation Fiche */
.discretion{
color:#A9A9A9;
font-size:10px;
font-weight:normal;}
.txt-long{
white-space:pre-wrap;}
p.txt-long{
width:53.6em;
padding:.3em;
background-color:#FFF;}
#texte li{
margin:3px 0;}
.col-sommaire a{
background:none;}
/* Liste d'images */
ul.gallerie{
list-style-type:none;}
ul.gallerie li{
float:left;}
ul.gallerie li img {
margin:0.3em;
border: 1px solid;
border-color:#444 #AAA #AAA #444;
padding:10px;}
/*--------------------------------------------------------------------------------------------------------------*/
/* Présentation Carte */
#carte-img{
border:none;}
/*--------------------------------------------------------------------------------------------------------------*/
/* Présentation Syndication */
#col-syndication{
width:800px;
background:url("images/flux.png") no-repeat scroll 560px 60px white;}
.icone{
line-height:20px;
padding-left:20px;}
.icone-atom{
background:url(images/atom.png) no-repeat center left;}
.icone-rss1{
background:url(images/rss1.png) no-repeat center left;}
.icone-rss2{
background:url(images/rss2.png) no-repeat center left;}
/*--------------------------------------------------------------------------------------------------------------*/
/* Jquery UI : tabs */
.ui-tabs .ui-tabs-hide{
display: none;}
/* Nécessaire à IE 6 et 7 pour éviter un décalage vers le bas!*/
.col-onglets{
margin:0;/*Pour IE*/
padding:0;/*Pour IE*/
height:auto !important;height:100%;/*Pour IE*/}
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/collection/collection.min.css
New file
0,0 → 1,0
@charset "UTF-8";#texte,h1{position:relative}#contenu{clear:none}h2,h3{margin:0;padding:1em 0 0}dl{margin:0;padding:0;width:auto}dt{background-color:#EEE;width:18em;float:left;text-align:right;margin:0;padding:.3em;border-top:1px solid #999;font-weight:400}#zone_contenu_corps li{list-style-image:none}.label-grand dt{width:28em}.label-court dt{width:12em}dt:after{content:" : "}.nettoyeur,dt,h2,h3{clear:both}dd{background-color:#FFF;margin:0;padding:.3em;border-top:1px solid #999}.nettoyeur{visibility:hidden}table{border:1px solid #1C3C78;border-collapse:collapse;width:100%!important;width:95%;margin:auto}tfoot,thead{background-color:#EEE;border:1px solid #1C3C78}tbody{background-color:#FFF;border:1px solid #1C3C78}th{font-family:monospace;border:1px dotted #1C3C78;padding:5px;background-color:#EEE}td{font-family:sans-serif;font-size:80%;border:1px solid #1C3C78;padding:5px;text-align:left}caption{font-family:sans-serif}label#col-rech{display:none}.fragmenteur .frag_page_courrante,.fragmenteur .frag_resultats,.fragmenteur a,.fragmenteur select{color:#fff;padding:5px;margin:0 2px;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}.fragmenteur a,.fragmenteur select{background-color:#5D5C5C;border:1px solid #000}.fragmenteur .frag_page_courrante,.fragmenteur .frag_resultats,.fragmenteur a:hover{font-weight:700;background-color:#AEDC43;border:1px solid #86A736}.frag_separateur{display:none}#col-rech-masque{width:725px}h2.titre-moteur-recherche{margin-bottom:10px}.champ-masque{display:inline-block;width:360px;margin-top:2px}.champ-masque input{width:200px}.champ-masque select{max-width:190px}.champ-masque label{display:inline-block;text-align:right}.champ-masque label.label-gauche{width:130px;vertical-align:middle}.champ-masque label.label-droite{width:120px}.champ-masque input.input-droite{width:210px}.discretion{color:#A9A9A9;font-size:10px;font-weight:400}.txt-long{white-space:pre-wrap}p.txt-long{width:53.6em;padding:.3em;background-color:#FFF}#texte li{margin:3px 0}.col-sommaire a{background:0 0}ul.gallerie{list-style-type:none}ul.gallerie li{float:left}ul.gallerie li img{margin:.3em;border:1px solid;border-color:#444 #AAA #AAA #444;padding:10px}#carte-img{border:0}#col-syndication{width:800px;background:url(images/flux.png) no-repeat scroll 560px 60px #fff}.icone{line-height:20px;padding-left:20px}.icone-atom{background:url(images/atom.png) no-repeat center left}.icone-rss1{background:url(images/rss1.png) no-repeat center left}.icone-rss2{background:url(images/rss2.png) no-repeat center left}.ui-tabs .ui-tabs-hide{display:none}.col-onglets{margin:0;padding:0;height:auto!important;height:100%}
/tags/v1.8-irancy/squelettes/css/collection/debogage.css
New file
0,0 → 1,40
/*--------------------------------------------------------------------------------------------------------------*/
/* Débogage */
.debogage{
color:black;
border:3px solid #6495ed;}
.debogage_fichier, .debogage_ligne{
font-size:10px;
color:#A9A9A9;}
 
/*--------------------------------------------------------------------------------------------------------------*/
/* Tableau du chronométrage du programme */
table#chrono{
display:block;
border:3px solid #6495ed;
border-collapse:collapse;
text-align: center;
margin:0 auto;}
#chrono thead, tfoot{
background-color:#D0E3FA;
border:1px solid #6495ed;}
#chrono tbody{
background-color:#FFFFFF;
border:1px solid #6495ed;}
#chrono th{
font-family:monospace;
border:1px dotted #6495ed;
padding:5px;
background-color:#EFF6FF;
width:25%;}
#chrono td{
font-family:sans-serif;
font-size:80%;
border:1px solid #6495ed;
padding:5px;
text-align:center;}
#chrono caption{
font-family:sans-serif;
text-align: center;
width:90%;
margin:auto;}
/tags/v1.8-irancy/squelettes/css/collection/images/rss1.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/collection/images/rss1.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/collection/images/rss2.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/collection/images/rss2.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/collection/images/flux.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/collection/images/flux.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/collection/images/atom.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/collection/images/atom.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/collection/images/fleche_externe.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/collection/images/fleche_externe.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/collection/images/licences.txt
New file
0,0 → 1,6
+----------------------------------------------------------------------------------------------------------------------+
Icon set : Supra RSS
Designer : Webdesigner Depot
License : Free for commercial use.
Fichiers : flux.png, rss1.png, rss2.png, atom.png
+----------------------------------------------------------------------------------------------------------------------+
Property changes:
Added: svn:eol-style
+native
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/collection/images/aide.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/collection/images/aide.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/collection/images/fichier_pdf.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/collection/images/fichier_pdf.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/collection/images/mail.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/collection/images/mail.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/collection/generale.css
New file
0,0 → 1,703
/*+------------------------------------------------------------------------------------------------------------------+
COMMUN SIMPLE
+------------------------------------------------------------------------------------------------------------------+*/
/*Feuille de style support? par Nescape 4.78
Auteur: Magali Giaume*/
body {
font-family:Arial, Helvetica, Verdana, sans-serif;
font-size:12px;
background-color:#fff;
margin:2px;}
h1 {
font-size:17px;
font-weight:bold;
padding:0 0 2px 5px;
line-height:1.3em;
margin:10px 0 4px 0;}
h2 {
font-size:13px;
font-weight:bold;
color:black;
text-transform:uppercase;
line-height:1.3em;
margin:10px 0 4px 0;}
h3, #more_resultat li h2, .titre2_cartographie, .titre2_inscription, .inscription_titre2, .titre2_cartographie {
font-size:15px;
color:black;
font-weight:bold;
line-height:1.3em;
margin:8px 0 4px 0;
text-transform:none;}
h4 {
font-size:13px;
color:black;
font-weight:bold;
letter-spacing:0.1em;
line-height:1.3em;
margin:8px 0 2px 0;}
h5 {
font-size:13px;
color:black;
font-style:italic;
line-height:1.2em;
margin:4px 0 1px 0;}
h6 {
font-size:12px;
color:black;
font-style:italic;
line-height:1.2em;
margin:4px 0 1px 0;}
caption {
font-size:12px;
font-weight:bold;
margin:2px;}
table {
border-collapse:collapse;}
/*bandeau*/
#titre_monde h1 {
font-size:20px}
#pos_recherche p {
margin:0;
padding:0;}
/*tableau*/
/* Tableau */
.table_bordure th {
background-color:#E4B842;
padding:0 5px;
text-align:center;
border-bottom: 1px dotted grey;
border-left: 1px dotted grey;}
 
.table_bordure {
border-spacing:0;
text-align:center;
border: 1px solid black;}
 
.table_bordure td {
padding:2px;
text-align:left;
border-bottom: 1px dotted grey;
border-left: 1px dotted grey;}
/*Nom latin*/
.nom_latin{font-style:italic;}
.nom_latin_rang, .nom_latin_auteur{font-style:normal;}
 
/*+------------------------------------------------------------------------------------------------------------------+
COMMUN COMPLEXE
+------------------------------------------------------------------------------------------------------------------+*/
 
/*icones*/
a.lien_ext:after {
content: " "url(images/fleche_externe.png);}
a.pdf:before {
content: url(images/fichier_pdf.png)" ";}
/*CSS3 : ajout d'un espace entre href et ^ pour konqueror*/
a.mail:after, a[href ^="mailto:"]:after {
content: " "url(images/mail.png);}
.table_bordure th[title]:after {
content: " "url(images/aide.png);}
/*abbr {
background :url(/client/eflore_chorologie/presentations/images/info.png) no-repeat 100% 5%;
padding-right:16px;
cursor:help;
border:none;}*/
 
/* presentation des liens */
a {
color:black;
text-decoration:none;
border-bottom:1px dotted #95ae5d;}
a:hover {
color:#FD8C13;
border-bottom:1px dotted #FD8C13;
 
/* Texte trouvé par le moteur de recherche */
.surlignage {
background-color:yellow;}
 
/* presentation des listes de definitions */
dl {width:100%;}
dt {
float:left;
font-weight: bold;
text-align:top left;
margin-right:0.3em;}
dd {
width:auto;
margin-left:0;
margin:0.5em 0;}
.ajout_2point dt:after {content:" : ";}
 
/* presentation des listes */
#texte li {
margin:4px;}
.liste_decale li, .liste_decale dt {
margin-left:2em;}
ul ul {
margin-left:2em;}
#zone_menu ul, #menus ul{
line-height:1.5em;}
 
/* presentation des images */
img{
border:0;}
img a{
display:block;}
#logo_tela img {
border:0;}
#logo_tela a {
position:absolute;
top:0;
left:0;}
#logo_tela a:hover {
border:1px dotted;}
#logo_tela a:hover:after {
content: " Retour à l'accueil ";}
.img_gch_txt_drte img, .flottant_gauche {
float:left;
margin:5px 10px 5px 5px;}
.img_gch_txt_drte li {
margin-left:40px;}
.img_drte_txt_gch img, .flottant_droit {
float:right;
margin-left:10px;}
.img_drte_txt_gch > img {
float:right;
margin-left:10px;}
.img_milieu {
display:inline;
margin:0 10px;}
.image_legendee {
width: 300px;
font-style:italic;
margin: 5px}
.image_legendee img {
margin: 0 auto}
.legende {
display:block;
font-weight:bold;
text-align:center;}
.clear {
clear:both;}
/* presentation fichiers audio */
.fichier_audio {
border: 1px solid #99a;}
.legende_audio {
margin-top:-0.8em;
margin-left:10px;
float:left;}
.fichier_audio img {
float:left;
padding-right:25px}
.fichier_audio p {
padding-right:25px;}
.legende_audio span {
padding:0 10px;
background-color:#fff;}
 
/* autres classes de presentation*/
.texte_inactif {
font-size:10px;
color:gray;}
.erreur {
color:#F00;}
.en_evidence {
font-size:16px;
font-weight:bold;}
.attention {
display:block;
background: #ffffcc url(http://www.tela-botanica.org/sites/commun/generique/images/graphisme/attention.png) no-repeat 2% 50%;
text-align:center;
border: 1px solid red;
min-height: 30px;
max-width: 800px;
padding:10px 5px 5px 50px;}
.information {
background: #e7ebfd url(http://www.tela-botanica.org/sites/commun/generique/images/graphisme/information.png) no-repeat 2% 50%;
text-align:center;
border:1px solid #5D81BA;
max-width: 800px;
min-height:30px;
padding:10px 5px 5px 50px;}
#bb_liste_fascicule li{
clear:both;
height:100%;}
.bb_img_fascicule {
display:block;}
blockquote {
font-style:italic;
text-align:center;}
legend {
text-align:center;}
.fin_texte{
width:0;
height:0;
text-align: center;
clear: both;}
 
/*DIFFERENTS BLOCS DE LA PAGE*/
#reducteur {
text-align:center;}
/*bandeau*/
#bandeau, #zone_bandeau {
height:77px;
margin:0 0 0 190px;}
#titre_monde, #site_nom {
margin:0;
text-align:right;
height:38px;}
#titre_monde h1, #site_nom h1 {
background-color:transparent;
font-weight: bold;
font-size: 28px;
margin:0 20px 0 0;
padding:0;}
#plan_contact {
margin:0 5px 0 0;
text-align:right;
height:25px;
padding:7px 15px 0 0;}
#plan_contact a {
font-weight:bold;
margin-left:10px;
background-repeat: repeat-x;
background-position:center bottom;}
#plan_contact a:hover {
font-weight:bold;
margin-left:10px;
background-repeat: repeat-x;
background-position:center bottom;}
 
/*droite*/
#droite {
margin:0 5px 0 207px;
position:relative;
/* text-align est nécessaire pour IE */
text-align:left;
}
 
/* droite -> pos_recherche */
#pos_recherche, #moteur_recherche {
font-size:13px;
font-weight:bold;
min-height:30px;
padding:5px 0 5px 20px;
text-align:left;}
#form_more_recherche, #form_recherche {
text-align:right;
padding:0;
margin:0;}
#form_more_recherche legend {
display:none;}
#form_more_recherche fieldset {
float:right;
border:0;
margin:0;
padding:0;}
#form_more_recherche label {
display:none;}
#more_resultat, #more_resultat li {
clear:left;
display: inline;
margin: 0;
padding: 0;
list-style-type:none;}
.more_iid, .more_dui {
display:none;}
.more_ivd {
width:600px;}
.more_duv a {
color:#008000;}
.more_dsv, .more_dsi {
color:#C1C1C1;}
.more_detail, .more_detail li {
display: inline;
margin: 0;
padding: 0;
list-style-type:none;}
 
/*droite -> onglets */
#onglets {
position:relative;
float:left;
text-align:left;
z-index:2;
font-weight:bold;}
#onglets ul {
margin:0;
padding:0;
list-style:none;}
#onglets li {
background:url(http://www.tela-botanica.org/sites/commun/generique/images/graphisme/norm_right_both.gif) no-repeat right top;
float:left;
margin:0;
padding:0;}
#onglets a {
float:left; /* ligne ajoutee pour compatibilite IE5-Mac */
display:block;
background:url("http://www.tela-botanica.org/sites/commun/generique/images/graphisme/norm_left_both.gif") no-repeat left top;
width:.1em;
white-space:nowrap;/*2 lignes ajoutees pour compatibilite IE : extension de la zone cliquable a l'ensemble de l'onglet*/
padding:5px 15px 4px;
text-decoration:none;}
/* On retablit le float a sa valeur correct mais le hack de l'antislash commente cache cette regle a IE5-Mac \*/
#header a {float:none;}
/* End IE5-Mac hack */
#onglets > ul a {
width:auto;} /*propriete ajoutee pour contredire la ligne speciale IE (ci dessus) pour les autres navigateurs*/
#onglets li:hover {
background-position:100% -150px;}
#onglets li:hover a {
background-position:0% -150px;}
#onglets .menu_inactif {
border-bottom:1px solid;}
#onglets .menu_actif, #onglets .onglet_actif {
position:relative;
background-position:100% -150px;
padding-bottom:2px;
z-index:3;
font-weight:bold;}
#onglets .menu_actif a, #onglets .onglet_actif a {
position:relative;
background-position:0% -150px;
padding-bottom:3px;
z-index:4;}
 
/* droite -> contenu */
#contenu, #zone_contenu, #contenu_accueil {
position:relative;
top:-1px;
/* Modif David Delon 26/08/2005 car conflit avec Fckeditor (menu deroulant)
/* z-index:1;*/
clear:both;
padding:0 2px 0 2px;
text-align:justify;
min-height:300px;}
#texte{
line-height:1.2em;
text-align:justify;
clear:both;
padding:0 5px 7px 5px;}
#texte .image_lien {
background-image:none;}
/* Hides from IE-mac \*/
* html #texte {height: 1%;}
/* Bug qui inactive les liens sous IE */
 
 
/* Droite -> pied_page */
#pied_text, #pied_page, #zone_pied {
clear:both;
text-align:center;
font-size:11px;}
#pied_page p, #zone_pied p{
position:center;}
#pied_page a {
margin:0 10px;}
.menu_commun_n1 {
padding:0;}
.menu_commun_n1 li {
display:inline;}
.menu_commun_n1 li+li {
display:inline;
padding-left:10px;}
 
/* Tableau */
.table_cadre {
border-spacing:0;
text-align:center;}
.table_cadre th {
text-align:center;}
.table_cadre td {
padding:2px;
text-align:left;}
 
/*nav_gauche*/
#navigation, #nav_gauche {
position:absolute;
top:2px;
left:2px;
width:188px;
padding-top:150px;
min-height:292px;}
 
/* nav_gauche -> logo_tela */
#logo_tela, #logo {
margin:7px 10px;
position:absolute;
top:2px;
left:18px;
z-index:1;}
#logo_tela a, #logo a {
background:none;}
#acces_direct, #accessibilite {
display:none;}
 
/* nav_gauche -> selecteur_sites */
#sesi_site {
text-align:center;
font-size:12px;
font-weight:bold;
width:180px;
height:20px;}
#sesi_selecteur fieldset, #selecteur_monde fieldset{
border:0;
margin:0;
padding:0;}
#sesi_selecteur legend, #selecteur_monde legend{
display: none;}
#sesi_selecteur option {
font-size:11px;}
#lien_inscription{
margin:2em 0 0 0;
font-size:11px;}
 
/* nav_gauche -> menus */
#zone_menu, #menus {
font-size:13px;
margin:10px 0;
text-align:left;}
#zone_menu a, #menus a {
background:none;
color:#000;
display:block;
height:1.2em;}
#zone_menu .menu_actif>a, #menus .menu_actif>a {
border:1px solid;}
#zone_menu > ul a, #menus > ul a {
height:auto;}
#navigation hr, #nav_gauche hr {
width:40%;
text-align:center;}
 
/* nav_gauche -> form connexion et deconnexion */
#form_connexion legend, #identification legend {
font-size:14px;
font-weight:bold;
padding-left:32px;}
#form_connexion label, #identification label {
display:none;}
label#persistant_label {
display:block;
margin:0.5em 0 1em 1em;
color:black;}
#form_connexion fieldset, #identification fieldset{
border:none;}
#username, #password {
width:10em;
text-align:left;
margin:0.5em 1em;}
#persistant {
text-align:left;
float:left;
margin:0.5em 0.5em 1em 1em;}
#identification_info, #identification, #formconnexion, #iden_action {
display:block;
width:auto;
text-align:center;
font-size:11px;
margin: 0;
padding-bottom:2px;}
#menu_contextuel {
border:1px solid;}
#deconnexion, #lien_inscription_modif, #lien_inscription {
font-size:12px;}
#inscription_info {
text-align:center;}
#inscription_aide {
margin-left:1em;}
#identification_message, #menu_contextuel h2, #hba_info h1, #hba_info p {
display:block;
font-size:14px;
text-align:center;
font-weight:bold;
text-transform:none;
margin:0 0 5px 0;}
#identification_prenom, #identification_nom{
font-size:13px;
font-weight:bold;
color:black;}
#identification_nom {
text-transform:uppercase;}
#iden_action a {
line-height:15px;}
 
/* presentation des menus */
.menu_classique_n1, .menu_n1 {
padding:0;
margin:0;
font-weight:bold;
list-style-type:none;}
.menu_classique_n1 a {
padding:3px 0;}
.menu_classique_n2, .menu_n2 {
padding:0;
margin:0;
font-weight:normal;
list-style-type:none;}
.menu_classique_n2 a {
padding:3px 0 3px 15px;}
.menu_n3 {
margin:0 0 0 10px;
padding:0;
text-align:left;}
.menu_inactif a, .menu_actif a {
color:#000;
text-decoration:none;
background-color:transparent;}
 
/*presentation des syntheses*/
.page_separateur_date_heure, .page_creation_jour, .page_creation_heure, .page_creation_minute, .page_creation_seconde, .page_separateur_heure, .page_separateur_minute, .page_modification_heure, .page_modification_minute{
display:none;}
.page_titre {
font-weight:bold;}
 
/* Texte champ d'une fiche */
.champ_cle {
font-weight:bold;}
.champ_valeur {
font-weight:normal;}p_cle {
font-weight:bold;}
.champ_valeur {
font-weight:normal;}
.bp_titre {
font-weight:bold;}
.bp_titre_revue, .nom_latin {
font-weight:normal;}
.bp_annee, .bp_num_revue {
font-weight:normal;}
/*menu_commun*/
.question {
font-weight:bold;}
 
/*Gestion de l'affichage du chronomètre des applications.*/
#chrono{display:none;}
 
/* Gestion de l'affichage du bandeau */
#bandeau_annonce {
height:28px;
margin:0 0 0 0px;
padding-right:20px;
text-align:right;
}
 
#bandeau_annonce a {
 
font-size: 15px;
padding: 3px;
font-weight:bold;
vertical-align:middle;
}
 
#bandeau_annonce a:hover {
background-image:url(http://www.tela-botanica.org/sites/commun/generique/images/graphisme/img_underline_hover_plan_site_black.png);
background-position:center bottom;
background-repeat:repeat-x;
}
 
/*+------------------------------------------------------------------------------------------------------------------+
SITE - PARLONS BOTA
+------------------------------------------------------------------------------------------------------------------+*/
/*Feuille de style du monde debuter en botanique
Auteur : Magali Giaume, Tamara Le Bourg*/
h1 {
color:#36560B;
background-color:#CFDB86;}
h2, #identification_message, #form_connexion legend, #identification legend, #identification_info, #iden_action {
color:#36560B;}
hr {
color: #d1dc8d;}
table {
border:1px solid #36560B;
border-collapse: collapse;}
td, th {
border:1px solid #36560B;
padding:5px;}
img {
display:block;}
a img {
border:1px dotted #36560B;}
 
/*DIFFERENTS BLOCS DE LA PAGE*/
 
/*bandeau*/
#bandeau {
background: url(http://www.tela-botanica.org/sites/parlons_bota/generique/images/graphisme/bandeau_parlons_bota_fond.png) repeat-x;}
#bandeau_contenu {
background:transparent url(http://www.tela-botanica.org/sites/parlons_bota/generique/images/graphisme/bandeau_parlons_bota.jpg) no-repeat;
height:77px;}
#titre_monde h1 {
color:#F3F6E2;}
#plan_contact a {
color:#000;
background-image: url(http://www.tela-botanica.org/sites/commun/generique/images/graphisme/img_underline_plan_site_black.png);}
#plan_contact a:hover {
background-image: url(http://www.tela-botanica.org/sites/commun/generique/images/graphisme/img_underline_hover_plan_site_black.png);}
 
/*droite -> onglets */
#onglets li {
background:url("http://www.tela-botanica.org/sites/parlons_bota/generique/images/graphisme/onglet_D_bota.gif") no-repeat right top;}
#onglets a {
background:url("http://www.tela-botanica.org/sites/parlons_bota/generique/images/graphisme/onglet_G_bota.gif") no-repeat left top;}
#onglets li:hover {
color:#becf5c;}
#onglets li:hover a {
color:#36560B;}
#onglets .menu_inactif {
border-bottom:#BECF5C;}
#onglets .menu_actif a {
color:#36560B;}
 
/* droite -> contenu */
#contenu {
border:1px solid #becf5c;}
#wikini_page ul{
line-height:1em;}
.commentsheader {
display:none;}
 
/* droite -> pied_page */
.eflore_pied_page {
color:grey;
text-align:center;
font-size:10px;}
 
/*nav_gauche*/
#nav_gauche {
background: #fff url(http://www.tela-botanica.org/sites/parlons_bota/generique/images/graphisme/degrade_vertpomme.png) repeat-x;}
 
/* nav_gauche -> menus */
#menus .menu_actif>a {
background-color:#CFDB86;
border-color: rgb(221, 230, 170);}
#menus a:hover {
background-color:#CFDB86;}
.form_identification input, .form_identification textarea, .form_identification select {
background-color:#f4f6e4;}
#menu_contextuel {
color:#BECF5C;}
/* presentation des menus */
.menu_classique_n2 .menu_actif {
background-color:red;}
.menu_actif a {
color:#36560B;}
 
/*Styles pour presentation des syntheses et articles en ligne*/
.nom_latin {
font-style:italic;}
.auteur_msg {
color:#990000;
font-weight:bold;}
.txt_souligne {
text-decoration:underline;}
/*styles pour ne pas afficher les noms d'auteur et date */
#sans_auteur .page_auteur, #sans_auteur .page_separateur_auteur, #sans_auteur .page_separateur_titre, #sans_auteur .page_creation_mois, #sans_auteur .page_creation_annee {
display:none;}
/*************************
Apercu de bota - Glossaire
*************************/
 
#glossaire dd {
padding-right:10px;}
/tags/v1.8-irancy/squelettes/css/humanity/jquery-ui-1.8.custom.css
New file
0,0 → 1,296
/*
* jQuery UI CSS Framework
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
*/
 
/* Layout helpers
----------------------------------*/
.ui-helper-hidden { display: none; }
.ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.ui-helper-clearfix { display: inline-block; }
/* required comment for clearfix to work in Opera \*/
* html .ui-helper-clearfix { height:1%; }
.ui-helper-clearfix { display:block; }
/* end clearfix */
.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
 
 
/* Interaction Cues
----------------------------------*/
.ui-state-disabled { cursor: default !important; }
 
 
/* Icons
----------------------------------*/
 
/* states and images */
.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
 
 
/* Misc visuals
----------------------------------*/
 
/* Overlays */
.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
 
 
/*
* jQuery UI CSS Framework
* Copyright (c) 2010 AUTHORS.txt (http://jqueryui.com/about)
* Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses.
* To view and modify this theme, visit http://jqueryui.com/themeroller/?tr=ffDefault=Helvetica,Arial,sans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=cb842e&bgTextureHeader=02_glass.png&bgImgOpacityHeader=25&borderColorHeader=d49768&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=f4f0ec&bgTextureContent=05_inset_soft.png&bgImgOpacityContent=100&borderColorContent=e0cfc2&fcContent=1e1b1d&iconColorContent=c47a23&bgColorDefault=ede4d4&bgTextureDefault=02_glass.png&bgImgOpacityDefault=70&borderColorDefault=cdc3b7&fcDefault=3f3731&iconColorDefault=f08000&bgColorHover=f5f0e5&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=f5ad66&fcHover=a46313&iconColorHover=f08000&bgColorActive=f4f0ec&bgTextureActive=04_highlight_hard.png&bgImgOpacityActive=100&borderColorActive=e0cfc2&fcActive=b85700&iconColorActive=f35f07&bgColorHighlight=f5f5b5&bgTextureHighlight=04_highlight_hard.png&bgImgOpacityHighlight=75&borderColorHighlight=d9bb73&fcHighlight=060200&iconColorHighlight=cb672b&bgColorError=fee4bd&bgTextureError=04_highlight_hard.png&bgImgOpacityError=65&borderColorError=f8893f&fcError=592003&iconColorError=ff7519&bgColorOverlay=aaaaaa&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=75&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=01_flat.png&bgImgOpacityShadow=75&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
*/
 
 
/* Component containers
----------------------------------*/
.ui-widget { font-family: Verdana,Arial,sans-serif; font-size: 1.1em; }
.ui-widget .ui-widget { font-size: 1em; }
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; }
.ui-widget-content { border: 1px solid #e0cfc2; background: #f4f0ec url(images/ui-bg_inset-soft_100_f4f0ec_1x100.png) 50% bottom repeat-x; color: #1e1b1d; }
.ui-widget-content a { color: #1e1b1d; }
.ui-widget-header { border: 1px solid #d49768; background: #cb842e url(images/ui-bg_glass_25_cb842e_1x400.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
.ui-widget-header a { color: #ffffff; }
 
/* Interaction states
----------------------------------*/
.ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #cdc3b7; background: #ede4d4 url(images/ui-bg_glass_70_ede4d4_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #3f3731; }
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #3f3731; text-decoration: none; }
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #f5ad66; background: #f5f0e5 url(images/ui-bg_glass_100_f5f0e5_1x400.png) 50% 50% repeat-x; font-weight: normal; color: #a46313; }
.ui-state-hover a, .ui-state-hover a:hover { color: #a46313; text-decoration: none; }
.ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #e0cfc2; background: #f4f0ec url(images/ui-bg_highlight-hard_100_f4f0ec_1x100.png) 50% 50% repeat-x; font-weight: normal; color: #b85700; }
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #b85700; text-decoration: none; }
.ui-widget :active { outline: none; }
 
/* Interaction Cues
----------------------------------*/
.ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #d9bb73; background: #f5f5b5 url(images/ui-bg_highlight-hard_75_f5f5b5_1x100.png) 50% top repeat-x; color: #060200; }
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #060200; }
.ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #f8893f; background: #fee4bd url(images/ui-bg_highlight-hard_65_fee4bd_1x100.png) 50% top repeat-x; color: #592003; }
.ui-state-error a, .ui-widget-content .ui-state-error a { color: #592003; }
.ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #592003; }
.ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; }
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
.ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
 
/* Icons
----------------------------------*/
 
/* states and images */
.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_c47a23_256x240.png); }
.ui-widget-content .ui-icon {background-image: url(images/ui-icons_c47a23_256x240.png); }
.ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
.ui-state-default .ui-icon { background-image: url(images/ui-icons_f08000_256x240.png); }
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_f08000_256x240.png); }
.ui-state-active .ui-icon {background-image: url(images/ui-icons_f35f07_256x240.png); }
.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_cb672b_256x240.png); }
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ff7519_256x240.png); }
 
/* positioning */
.ui-icon-carat-1-n { background-position: 0 0; }
.ui-icon-carat-1-ne { background-position: -16px 0; }
.ui-icon-carat-1-e { background-position: -32px 0; }
.ui-icon-carat-1-se { background-position: -48px 0; }
.ui-icon-carat-1-s { background-position: -64px 0; }
.ui-icon-carat-1-sw { background-position: -80px 0; }
.ui-icon-carat-1-w { background-position: -96px 0; }
.ui-icon-carat-1-nw { background-position: -112px 0; }
.ui-icon-carat-2-n-s { background-position: -128px 0; }
.ui-icon-carat-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -64px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -64px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-off { background-position: -96px -144px; }
.ui-icon-radio-on { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
 
 
/* Misc visuals
----------------------------------*/
 
/* Corner radius */
.ui-corner-tl { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; }
.ui-corner-tr { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; }
.ui-corner-bl { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; }
.ui-corner-br { -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
.ui-corner-top { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; }
.ui-corner-bottom { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
.ui-corner-right { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
.ui-corner-left { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; }
.ui-corner-all { -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; }
 
/* Overlays */
.ui-widget-overlay { background: #aaaaaa url(images/ui-bg_flat_75_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); }
.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(images/ui-bg_flat_75_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/* Tabs
----------------------------------*/
.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 0px; }
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
.ui-tabs .ui-tabs-panel { display: block; border: 0; padding: 1em 1.4em; background: none; }
.ui-tabs .ui-tabs-hide { display: none !important; }
Property changes:
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/humanity/jquery-ui-1.8.custom.min.css
New file
0,0 → 1,237
.ui-helper-hidden{display:none;}
.ui-helper-hidden-accessible{position:absolute;left:-99999999px;}
.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none;}
.ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden;}
.ui-helper-clearfix{display:inline-block;}
/* required comment for clearfix to work in Opera \*/
* html .ui-helper-clearfix{height:1%;}
.ui-helper-clearfix{display:block;}
/* end clearfix */
.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0);}
.ui-state-disabled{cursor:default !important;}
.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;}
.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%;}
.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em;}
.ui-widget .ui-widget{font-size:1em;}
.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em;}
.ui-widget-content{border:1px solid #e0cfc2;background:#f4f0ec url(images/ui-bg_inset-soft_100_f4f0ec_1x100.png) 50% bottom repeat-x;color:#1e1b1d;}
.ui-widget-content a{color:#1e1b1d;}
.ui-widget-header{border:1px solid #d49768;background:#cb842e url(images/ui-bg_glass_25_cb842e_1x400.png) 50% 50% repeat-x;color:#ffffff;font-weight:bold;}
.ui-widget-header a{color:#ffffff;}
.ui-state-default, .ui-widget-content .ui-state-default{border:1px solid #cdc3b7;background:#ede4d4 url(images/ui-bg_glass_70_ede4d4_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#3f3731;}
.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited{color:#3f3731;text-decoration:none;}
.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus{border:1px solid #f5ad66;background:#f5f0e5 url(images/ui-bg_glass_100_f5f0e5_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#a46313;}
.ui-state-hover a, .ui-state-hover a:hover{color:#a46313;text-decoration:none;}
.ui-state-active, .ui-widget-content .ui-state-active{border:1px solid #e0cfc2;background:#f4f0ec url(images/ui-bg_highlight-hard_100_f4f0ec_1x100.png) 50% 50% repeat-x;font-weight:normal;color:#b85700;}
.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited{color:#b85700;text-decoration:none;}
.ui-widget:active{outline:none;}
.ui-state-highlight, .ui-widget-content .ui-state-highlight{border:1px solid #d9bb73;background:#f5f5b5 url(images/ui-bg_highlight-hard_75_f5f5b5_1x100.png) 50% top repeat-x;color:#060200;}
.ui-state-highlight a, .ui-widget-content .ui-state-highlight a{color:#060200;}
.ui-state-error, .ui-widget-content .ui-state-error{border:1px solid #f8893f;background:#fee4bd url(images/ui-bg_highlight-hard_65_fee4bd_1x100.png) 50% top repeat-x;color:#592003;}
.ui-state-error a, .ui-widget-content .ui-state-error a{color:#592003;}
.ui-state-error-text, .ui-widget-content .ui-state-error-text{color:#592003;}
.ui-priority-primary, .ui-widget-content .ui-priority-primary{font-weight:bold;}
.ui-priority-secondary, .ui-widget-content .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal;}
.ui-state-disabled, .ui-widget-content .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none;}
.ui-icon{width:16px;height:16px;background-image:url(images/ui-icons_c47a23_256x240.png);}
.ui-widget-content .ui-icon{background-image:url(images/ui-icons_c47a23_256x240.png);}
.ui-widget-header .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png);}
.ui-state-default .ui-icon{background-image:url(images/ui-icons_f08000_256x240.png);}
.ui-state-hover .ui-icon, .ui-state-focus .ui-icon{background-image:url(images/ui-icons_f08000_256x240.png);}
.ui-state-active .ui-icon{background-image:url(images/ui-icons_f35f07_256x240.png);}
.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_cb672b_256x240.png);}
.ui-state-error .ui-icon, .ui-state-error-text .ui-icon{background-image:url(images/ui-icons_ff7519_256x240.png);}
.ui-icon-carat-1-n{background-position:0 0;}
.ui-icon-carat-1-ne{background-position:-16px 0;}
.ui-icon-carat-1-e{background-position:-32px 0;}
.ui-icon-carat-1-se{background-position:-48px 0;}
.ui-icon-carat-1-s{background-position:-64px 0;}
.ui-icon-carat-1-sw{background-position:-80px 0;}
.ui-icon-carat-1-w{background-position:-96px 0;}
.ui-icon-carat-1-nw{background-position:-112px 0;}
.ui-icon-carat-2-n-s{background-position:-128px 0;}
.ui-icon-carat-2-e-w{background-position:-144px 0;}
.ui-icon-triangle-1-n{background-position:0 -16px;}
.ui-icon-triangle-1-ne{background-position:-16px -16px;}
.ui-icon-triangle-1-e{background-position:-32px -16px;}
.ui-icon-triangle-1-se{background-position:-48px -16px;}
.ui-icon-triangle-1-s{background-position:-64px -16px;}
.ui-icon-triangle-1-sw{background-position:-80px -16px;}
.ui-icon-triangle-1-w{background-position:-96px -16px;}
.ui-icon-triangle-1-nw{background-position:-112px -16px;}
.ui-icon-triangle-2-n-s{background-position:-128px -16px;}
.ui-icon-triangle-2-e-w{background-position:-144px -16px;}
.ui-icon-arrow-1-n{background-position:0 -32px;}
.ui-icon-arrow-1-ne{background-position:-16px -32px;}
.ui-icon-arrow-1-e{background-position:-32px -32px;}
.ui-icon-arrow-1-se{background-position:-48px -32px;}
.ui-icon-arrow-1-s{background-position:-64px -32px;}
.ui-icon-arrow-1-sw{background-position:-80px -32px;}
.ui-icon-arrow-1-w{background-position:-96px -32px;}
.ui-icon-arrow-1-nw{background-position:-112px -32px;}
.ui-icon-arrow-2-n-s{background-position:-128px -32px;}
.ui-icon-arrow-2-ne-sw{background-position:-144px -32px;}
.ui-icon-arrow-2-e-w{background-position:-160px -32px;}
.ui-icon-arrow-2-se-nw{background-position:-176px -32px;}
.ui-icon-arrowstop-1-n{background-position:-192px -32px;}
.ui-icon-arrowstop-1-e{background-position:-208px -32px;}
.ui-icon-arrowstop-1-s{background-position:-224px -32px;}
.ui-icon-arrowstop-1-w{background-position:-240px -32px;}
.ui-icon-arrowthick-1-n{background-position:0 -48px;}
.ui-icon-arrowthick-1-ne{background-position:-16px -48px;}
.ui-icon-arrowthick-1-e{background-position:-32px -48px;}
.ui-icon-arrowthick-1-se{background-position:-48px -48px;}
.ui-icon-arrowthick-1-s{background-position:-64px -48px;}
.ui-icon-arrowthick-1-sw{background-position:-80px -48px;}
.ui-icon-arrowthick-1-w{background-position:-96px -48px;}
.ui-icon-arrowthick-1-nw{background-position:-112px -48px;}
.ui-icon-arrowthick-2-n-s{background-position:-128px -48px;}
.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px;}
.ui-icon-arrowthick-2-e-w{background-position:-160px -48px;}
.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px;}
.ui-icon-arrowthickstop-1-n{background-position:-192px -48px;}
.ui-icon-arrowthickstop-1-e{background-position:-208px -48px;}
.ui-icon-arrowthickstop-1-s{background-position:-224px -48px;}
.ui-icon-arrowthickstop-1-w{background-position:-240px -48px;}
.ui-icon-arrowreturnthick-1-w{background-position:0 -64px;}
.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px;}
.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px;}
.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px;}
.ui-icon-arrowreturn-1-w{background-position:-64px -64px;}
.ui-icon-arrowreturn-1-n{background-position:-80px -64px;}
.ui-icon-arrowreturn-1-e{background-position:-96px -64px;}
.ui-icon-arrowreturn-1-s{background-position:-112px -64px;}
.ui-icon-arrowrefresh-1-w{background-position:-128px -64px;}
.ui-icon-arrowrefresh-1-n{background-position:-144px -64px;}
.ui-icon-arrowrefresh-1-e{background-position:-160px -64px;}
.ui-icon-arrowrefresh-1-s{background-position:-176px -64px;}
.ui-icon-arrow-4{background-position:0 -80px;}
.ui-icon-arrow-4-diag{background-position:-16px -80px;}
.ui-icon-extlink{background-position:-32px -80px;}
.ui-icon-newwin{background-position:-48px -80px;}
.ui-icon-refresh{background-position:-64px -80px;}
.ui-icon-shuffle{background-position:-80px -80px;}
.ui-icon-transfer-e-w{background-position:-96px -80px;}
.ui-icon-transferthick-e-w{background-position:-112px -80px;}
.ui-icon-folder-collapsed{background-position:0 -96px;}
.ui-icon-folder-open{background-position:-16px -96px;}
.ui-icon-document{background-position:-32px -96px;}
.ui-icon-document-b{background-position:-48px -96px;}
.ui-icon-note{background-position:-64px -96px;}
.ui-icon-mail-closed{background-position:-80px -96px;}
.ui-icon-mail-open{background-position:-96px -96px;}
.ui-icon-suitcase{background-position:-112px -96px;}
.ui-icon-comment{background-position:-128px -96px;}
.ui-icon-person{background-position:-144px -96px;}
.ui-icon-print{background-position:-160px -96px;}
.ui-icon-trash{background-position:-176px -96px;}
.ui-icon-locked{background-position:-192px -96px;}
.ui-icon-unlocked{background-position:-208px -96px;}
.ui-icon-bookmark{background-position:-224px -96px;}
.ui-icon-tag{background-position:-240px -96px;}
.ui-icon-home{background-position:0 -112px;}
.ui-icon-flag{background-position:-16px -112px;}
.ui-icon-calendar{background-position:-32px -112px;}
.ui-icon-cart{background-position:-48px -112px;}
.ui-icon-pencil{background-position:-64px -112px;}
.ui-icon-clock{background-position:-80px -112px;}
.ui-icon-disk{background-position:-96px -112px;}
.ui-icon-calculator{background-position:-112px -112px;}
.ui-icon-zoomin{background-position:-128px -112px;}
.ui-icon-zoomout{background-position:-144px -112px;}
.ui-icon-search{background-position:-160px -112px;}
.ui-icon-wrench{background-position:-176px -112px;}
.ui-icon-gear{background-position:-192px -112px;}
.ui-icon-heart{background-position:-208px -112px;}
.ui-icon-star{background-position:-224px -112px;}
.ui-icon-link{background-position:-240px -112px;}
.ui-icon-cancel{background-position:0 -128px;}
.ui-icon-plus{background-position:-16px -128px;}
.ui-icon-plusthick{background-position:-32px -128px;}
.ui-icon-minus{background-position:-48px -128px;}
.ui-icon-minusthick{background-position:-64px -128px;}
.ui-icon-close{background-position:-80px -128px;}
.ui-icon-closethick{background-position:-96px -128px;}
.ui-icon-key{background-position:-112px -128px;}
.ui-icon-lightbulb{background-position:-128px -128px;}
.ui-icon-scissors{background-position:-144px -128px;}
.ui-icon-clipboard{background-position:-160px -128px;}
.ui-icon-copy{background-position:-176px -128px;}
.ui-icon-contact{background-position:-192px -128px;}
.ui-icon-image{background-position:-208px -128px;}
.ui-icon-video{background-position:-224px -128px;}
.ui-icon-script{background-position:-240px -128px;}
.ui-icon-alert{background-position:0 -144px;}
.ui-icon-info{background-position:-16px -144px;}
.ui-icon-notice{background-position:-32px -144px;}
.ui-icon-help{background-position:-48px -144px;}
.ui-icon-check{background-position:-64px -144px;}
.ui-icon-bullet{background-position:-80px -144px;}
.ui-icon-radio-off{background-position:-96px -144px;}
.ui-icon-radio-on{background-position:-112px -144px;}
.ui-icon-pin-w{background-position:-128px -144px;}
.ui-icon-pin-s{background-position:-144px -144px;}
.ui-icon-play{background-position:0 -160px;}
.ui-icon-pause{background-position:-16px -160px;}
.ui-icon-seek-next{background-position:-32px -160px;}
.ui-icon-seek-prev{background-position:-48px -160px;}
.ui-icon-seek-end{background-position:-64px -160px;}
.ui-icon-seek-start{background-position:-80px -160px;}
.ui-icon-seek-first{background-position:-80px -160px;}
.ui-icon-stop{background-position:-96px -160px;}
.ui-icon-eject{background-position:-112px -160px;}
.ui-icon-volume-off{background-position:-128px -160px;}
.ui-icon-volume-on{background-position:-144px -160px;}
.ui-icon-power{background-position:0 -176px;}
.ui-icon-signal-diag{background-position:-16px -176px;}
.ui-icon-signal{background-position:-32px -176px;}
.ui-icon-battery-0{background-position:-48px -176px;}
.ui-icon-battery-1{background-position:-64px -176px;}
.ui-icon-battery-2{background-position:-80px -176px;}
.ui-icon-battery-3{background-position:-96px -176px;}
.ui-icon-circle-plus{background-position:0 -192px;}
.ui-icon-circle-minus{background-position:-16px -192px;}
.ui-icon-circle-close{background-position:-32px -192px;}
.ui-icon-circle-triangle-e{background-position:-48px -192px;}
.ui-icon-circle-triangle-s{background-position:-64px -192px;}
.ui-icon-circle-triangle-w{background-position:-80px -192px;}
.ui-icon-circle-triangle-n{background-position:-96px -192px;}
.ui-icon-circle-arrow-e{background-position:-112px -192px;}
.ui-icon-circle-arrow-s{background-position:-128px -192px;}
.ui-icon-circle-arrow-w{background-position:-144px -192px;}
.ui-icon-circle-arrow-n{background-position:-160px -192px;}
.ui-icon-circle-zoomin{background-position:-176px -192px;}
.ui-icon-circle-zoomout{background-position:-192px -192px;}
.ui-icon-circle-check{background-position:-208px -192px;}
.ui-icon-circlesmall-plus{background-position:0 -208px;}
.ui-icon-circlesmall-minus{background-position:-16px -208px;}
.ui-icon-circlesmall-close{background-position:-32px -208px;}
.ui-icon-squaresmall-plus{background-position:-48px -208px;}
.ui-icon-squaresmall-minus{background-position:-64px -208px;}
.ui-icon-squaresmall-close{background-position:-80px -208px;}
.ui-icon-grip-dotted-vertical{background-position:0 -224px;}
.ui-icon-grip-dotted-horizontal{background-position:-16px -224px;}
.ui-icon-grip-solid-vertical{background-position:-32px -224px;}
.ui-icon-grip-solid-horizontal{background-position:-48px -224px;}
.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px;}
.ui-icon-grip-diagonal-se{background-position:-80px -224px;}
.ui-corner-tl{-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;}
.ui-corner-tr{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;}
.ui-corner-bl{-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;}
.ui-corner-br{-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;}
.ui-corner-top{-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;}
.ui-corner-bottom{-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;}
.ui-corner-right{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;}
.ui-corner-left{-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;}
.ui-corner-all{-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;}
.ui-widget-overlay{background:#aaaaaa url(images/ui-bg_flat_75_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.30;filter:Alpha(Opacity=30);}
.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaaaaa url(images/ui-bg_flat_75_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.30;filter:Alpha(Opacity=30);-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px;}
.ui-tabs{position:relative;padding:.2em;zoom:1;}
.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0;}
.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:1px;margin:0 .2em 1px 0;border-bottom:0 !important;padding:0;white-space:nowrap;}
.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none;}
.ui-tabs .ui-tabs-nav li.ui-tabs-selected{margin-bottom:0;padding-bottom:0px;}
.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a{cursor:text;}
.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer;}
.ui-tabs .ui-tabs-panel{display:block;border:0;padding:1em 1.4em;background:none;}
.ui-tabs .ui-tabs-hide{display:none !important;}
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-icons_f35f07_256x240.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-icons_f35f07_256x240.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-icons_f08000_256x240.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-icons_f08000_256x240.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-bg_inset-soft_100_f4f0ec_1x100.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-bg_inset-soft_100_f4f0ec_1x100.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-icons_ff7519_256x240.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-icons_ff7519_256x240.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-bg_glass_100_f5f0e5_1x400.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-bg_glass_100_f5f0e5_1x400.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-bg_highlight-hard_65_fee4bd_1x100.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-bg_highlight-hard_65_fee4bd_1x100.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-icons_c47a23_256x240.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-icons_c47a23_256x240.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-icons_ffffff_256x240.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-icons_ffffff_256x240.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-bg_flat_75_aaaaaa_40x100.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-bg_flat_75_aaaaaa_40x100.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-bg_glass_25_cb842e_1x400.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-bg_glass_25_cb842e_1x400.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-icons_cb672b_256x240.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-icons_cb672b_256x240.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-bg_highlight-hard_100_f4f0ec_1x100.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-bg_highlight-hard_100_f4f0ec_1x100.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-bg_highlight-hard_75_f5f5b5_1x100.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-bg_highlight-hard_75_f5f5b5_1x100.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-bg_glass_70_ede4d4_1x400.png
Cannot display: file marked as a binary type.
svn:mime-type = image/png
/tags/v1.8-irancy/squelettes/css/humanity/images/ui-bg_glass_70_ede4d4_1x400.png
New file
Property changes:
Added: svn:mime-type
+image/png
\ No newline at end of property
Added: svn:keywords
+Id Author Date Revision HeadURL
\ No newline at end of property
/tags/v1.8-irancy/squelettes/fiche_personne.tpl.html
New file
0,0 → 1,211
<!-- COL - DEBUT FICHE PERSONNE -->
<script type="text/javascript">
$(document).ready(function() {
$("#col-per").tabs({
cookie: {expires: 1}// Stocke un cookie pour 1 jour
});
});
</script>
<h1><?=$info['cp_fmt_nom_complet']?> <span class="discretion">(id:<?=$id?>)</span></h1>
<hr class="nettoyeur"/>
<div id="col-per" class="col-onglets">
<ul class="col-sommaire">
<li><a href="#col-per-general">Général</a></li>
<li><a href="#col-per-adresse">Adresses</a></li>
<li><a href="#col-per-info-nat">Informations naturalistes</a></li>
<li><a href="#col-per-publication">Publications liées</a></li>
<li><a href="#col-per-collection">Collections liées</a></li>
<li><a href="#col-per-institution">Institutions liées</a></li>
<li><a href="#col-per-image">Images</a></li>
<li><a href="#col-per-meta">Méta-données</a></li>
</ul>
<div id="col-per-general">
<h2>Général</h2>
<h3>Identité</h3>
<div style="width:100%;">
<?php if ($info['_image_principale_url_'] != '&nbsp;') : ?>
<img style="background-color:#FFF;float:left;margin-right:.3em;padding:0.3em;" src="<?=$info['_image_principale_url_']?>" alt="Illustration de l'auteur"/>
<?php endif; ?>
 
<dl class="label-court" style="float:left;width:40%;">
<dt>Préfixe</dt> <dd><?=$info['_prefixe_']?></dd>
<dt>Prénom</dt> <dd><?=$info['cp_prenom']?></dd>
<dt>Nom</dt> <dd><?=$info['cp_nom']?></dd>
<dt>Suffixe</dt> <dd><?=$info['_suffixe_']?></dd>
<dt>Autres noms</dt> <dd><?=$info['_autre_noms_']?></dd>
<dt>Abréviation</dt> <dd><?=$info['cp_abreviation']?></dd>
<dt>Autres abréviations</dt> <dd><?=$info['_autre_abreviations_']?></dd>
<dt>Sexe</dt> <dd><?=$info['_sexe_']?></dd>
</dl>
</div>
<h3>Description</h3>
<p class="txt-long"><?=$info['cp_description']?></p>
<h3>Naissance &amp; décès</h3>
<dl class="label-court">
<dt>Date de naissance</dt> <dd><?=$info['_naissance_date_']?></dd>
<dt>Lieu de naissance</dt> <dd><?=$info['cp_naissance_lieu']?></dd>
<dt>Est décédée?</dt> <dd><?=$info['_deces_']?></dd>
<dt>Date de décès</dt> <dd><?=$info['_deces_date_']?></dd>
<dt>Lieu de décès</dt> <dd><?=$info['cp_deces_lieu']?></dd>
</dl>
<h3>Contact</h3>
<dl class="label-court">
<dt>Téléphones</dt> <dd><?=$info['_telephones_']?></dd>
<dt>Courriels</dt> <dd><?=$info['_courriels_']?></dd>
<dt>Sites web</dt>
<dd>
<?php if (($nbre_url = count($info['_sites_web_'])) > 0) : ?>
<?php while (list($i, $url) = each($info['_sites_web_'])) : ?>
<a class="lien_ext" href="<?=$url?>"><?=$url?></a><?=(($nbre_url - 1) == $i) ? '.' : ', ';?>
<?php endwhile; ?>
<?php else : ?>
&nbsp;
<?php endif; ?>
</dd>
</dl>
<hr class="nettoyeur"/>
</div>
 
<div id="col-per-adresse">
<h2>Adresses</h2>
<dl class="label-court">
<dt>Adresse</dt> <dd><?=$info['cp_adresse_01']?></dd>
<dt>Complément</dt> <dd><?=$info['cp_adresse_02']?></dd>
<dt>Boite postale</dt> <dd><?=$info['cp_bp']?></dd>
<dt>Code postal</dt> <dd><?=$info['cp_code_postal']?></dd>
<dt>Ville</dt> <dd><?=$info['cp_ville']?></dd>
<dt>Région</dt> <dd><?=$info['_region_']?></dd>
<dt>Pays</dt> <dd><?=$info['_pays_']?></dd>
</dl>
<hr class="nettoyeur"/>
</div>
<div id="col-per-info-nat">
<h2>Informations naturalistes</h2>
<h3>Vie et renommée de l'auteur</h3>
<p class="txt-long"><?=$info['cp_biographie']?></p>
<h3>Spécialité(s)</h3>
<p class="txt-long"><?=$info['_specialites_']?></p>
<h3>Récolte(s)</h3>
<p class="txt-long"><?=$info['_recoltes_']?></p>
<hr class="nettoyeur"/>
</div>
 
<div id="col-per-publication">
<h2>Publications liées</h2>
<?php if (count($publications) > 0) : ?>
<?=$publicationsFrag?>
<table>
<thead>
<tr>
<th>Relation</th>
<th>Auteurs</th>
<th>Titre</th>
<th>Nom de la revue / collection</th>
<th>Éditeur</th>
<th>Année</th>
<th>Série / Tome</th>
<th>Fascicule</th>
<th>Page(s)</th>
</tr>
</thead>
<tbody>
<?php foreach ($publications as $publication) : ?>
<tr>
<td><?=$publication['_role_']?></td>
<td><?=$publication['cpu_fmt_auteu