21,7 → 21,7 |
// | along with Foobar; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: eflore_chorologie.php,v 1.9 2005-06-30 15:23:02 jpm Exp $ |
// CVS : $Id: eflore_chorologie.php,v 1.10 2006-05-31 14:43:35 jp_milcent Exp $ |
/** |
* Affichage des listes de noms de plantes par zones géographiques. |
* |
34,7 → 34,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.9 $ $Date: 2005-06-30 15:23:02 $ |
*@version $Revision: 1.10 $ $Date: 2006-05-31 14:43:35 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
49,11 → 49,9 |
require_once ECHORO_CHEMIN_LANGUE.'echoro_langue_'.ECHORO_LANGUE.'.inc.php'; |
|
/** Inclusion de la bibliothèque PEAR de conception de formulaire.*/ |
require_once 'HTML/QuickForm.php'; |
require_once ECHORO_CHEMIN_API_PEAR.'HTML/QuickForm.php'; |
/** Inclusion de la bibliothèque PEAR de gestion des URL.*/ |
require_once 'Net/URL.php'; |
/** Inclusion de la classe PEAR d'abstraction de base de donnée. */ |
//require_once 'DB.php'; |
require_once ECHORO_CHEMIN_API_PEAR.'Net/URL.php'; |
|
// Ajout d'une feuille de style propre à eFlore. |
GEN_stockerStyleExterne('echoro', ECHORO_CHEMIN_STYLE.'echoro.css'); |
404,7 → 402,92 |
' AND '.ECD_INDICE.' = '.ECS_ID. |
' ORDER BY '.ENT_NOM_COMPLET_02.' ASC'; |
} |
if (isset($_GET['action']) && $_GET['action'] == 'export') { |
// Gestion de l'export XLS |
$resultat_export = mysql_query($requete_03, $GLOBALS['_ECHORO_']['bdd']) or die(' |
<h2 style='.STYLE_REQUETE.'>Erreur de requête</h2>'. |
'<b>Requete : </b>'.$requete_03. |
'<br/><br/><b>Erreur : </b>'.mysql_error()); |
|
$i = 0; |
if (isset($_GET['format']) && $_GET['format'] == 'xls') { |
/** Inclusion de la classe PEAR de création de fichiers excell. */ |
require_once ECHORO_CHEMIN_API_PEAR.'Spreadsheet/Excel/Writer.php'; |
$workbook = new Spreadsheet_Excel_Writer(); |
$nom_feuille = 'Département '.$tableau_infoDep['NUMERO']; |
$nom_fichier = 'Chorologie - '.$nom_feuille.'.xls'; |
$worksheet = $workbook->addWorksheet($nom_feuille); |
|
$format_titre = $workbook->addFormat(); |
$format_titre->setBold(1); |
$format_titre->setSize(16); |
|
$format_intro = $workbook->addFormat(); |
$format_intro->setBold(1); |
$format_intro->setSize(12); |
|
$worksheet->mergeCells($i++, 0, $i, 8); |
$titre = 'Export des taxons présents dans le département '.$tableau_infoDep['NUMERO']; |
$worksheet->writeString(0, 0, $titre, $format_titre); |
|
$worksheet->mergeCells(++$i, 0, $i, 8); |
$titre_projet = 'Projet :'; |
$worksheet->writeString($i++, 0, $titre_projet, $format_intro); |
$worksheet->mergeCells($i, 0, $i, 8); |
$txt_projet = 'Phytochorologie départementale - Coordinateur : Philippe JULVE'; |
$worksheet->writeString($i++, 0, $txt_projet); |
|
$worksheet->mergeCells($i, 0, $i, 8); |
$titre_licence = 'Licence :'; |
$worksheet->writeString($i++, 0, $titre_licence, $format_intro); |
$worksheet->mergeCells($i, 0, $i, 8); |
$txt_licence = 'http://creativecommons.org/licenses/by-sa/2.0/fr/'; |
$worksheet->writeString($i++, 0, $txt_licence); |
|
$worksheet->mergeCells($i, 0, $i, 8); |
$titre_contributeur = 'Contributeurs :'; |
$worksheet->writeString($i++, 0, $titre_contributeur, $format_intro); |
for ($j = 0; $j < count($tableau_infoDep['CORRESPONDANTS']); $j++){ |
if(ereg("[@]", $tableau_infoDep['CORRESPONDANTS'][$j]['COURRIEL'])){ |
$worksheet->writeString($i, 0, $tableau_infoDep['CORRESPONDANTS'][$j]['PRENOM']); |
$worksheet->writeString($i, 1, $tableau_infoDep['CORRESPONDANTS'][$j]['NOM']); |
$worksheet->writeString($i++, 2, $tableau_infoDep['CORRESPONDANTS'][$j]['COURRIEL']); |
} else { |
$worksheet->writeString($i, 0, $tableau_infoDep['CORRESPONDANTS'][$j]['PRENOM']); |
$worksheet->writeString($i++, 1, $tableau_infoDep['CORRESPONDANTS'][$j]['NOM']); |
} |
} |
|
$worksheet->mergeCells($i, 0, $i, 8); |
$titre_source = 'Sources :'; |
$worksheet->writeString($i++, 0, $titre_source, $format_intro); |
for ($j = 0; $j < count($tableau_infoDep['SOURCES']); $j++){ |
$worksheet->mergeCells($i, 0, $i, 8); |
$worksheet->writeString($i++, 0, $tableau_infoDep['SOURCES'][$j]); |
} |
|
$worksheet->setColumn(0, 1, 20); |
$worksheet->setColumn(2, 2, 60); |
$worksheet->setColumn(3, 3, 20); |
$worksheet->writeString($i, 0, 'N° taxonomique', $format_intro); |
$worksheet->writeString($i, 1, 'N° nomenclatural', $format_intro); |
$worksheet->writeString($i, 2, 'Nom complet', $format_intro); |
$worksheet->writeString($i++, 3, 'Indice', $format_intro); |
|
while ($ligne = mysql_fetch_array($resultat_export)) { |
//echo '<pre>'.print_r($ligne).'</pre>'; |
$worksheet->writeNumber($i, 0, $ligne[ENT_NUM_TAXO]); |
$worksheet->writeNumber($i, 1, $ligne[ENT_NUM_NOMEN]); |
$worksheet->writeString($i, 2, $ligne[ENT_NOM_COMPLET_02]); |
$worksheet->writeString($i++, 3, $ligne[ECS_INTITULE]); |
} |
$workbook->send($nom_fichier); |
$workbook->close(); |
exit(); |
} else { |
return remplaceEntiteHTLM(message_alerte('03')); |
} |
} else { |
//Nous plaçons des données javascripts pour la gestion des infos bulles: |
$tableau_inclusion = array($tableau_infoDep['NOM'], $nombre_taxon); |
$res = inclusion_html('titre_liste', $tableau_inclusion); |
416,6 → 499,7 |
inclusion_html('tab_ouvre_liste_taxon', $tablo_inclusion), inclusion_html('tab_evol_ferme'), $tablo_formatLigne, |
$tablo_formatResultat, $message_alerte, $fragmenteur); |
return remplaceEntiteHTLM($res); |
} |
} else { |
if (!$carte_france) { |
//Affichage quand il n'y a plus de carte. |
485,7 → 569,7 |
' AND '.ECD_INDICE.' = '.ECS_ID. |
' ORDER BY '.ENT_NOM_COMPLET_02.' ASC'; |
} |
|
// Gestion de l'affichage XHTML |
$tableau_inclusion = array($tableau_infoDep['NOM'], $nombre_taxon); |
$res = inclusion_html('titre_liste', $tableau_inclusion); |
|
529,6 → 613,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.9 2005/06/30 15:23:02 jpm |
* Utilisation d'un fichier javascript à part. |
* |
* Revision 1.8 2005/05/31 13:45:10 jpm |
* Mise en place de la gestion entités html. |
* |