| Line 19... |
Line 19... |
| 19 |
// | |
|
19 |
// | |
|
| 20 |
// | You should have received a copy of the GNU General Public License |
|
20 |
// | You should have received a copy of the GNU General Public License |
|
| 21 |
// | along with Foobar; if not, write to the Free Software |
|
21 |
// | along with Foobar; if not, write to the Free Software |
|
| 22 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
22 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
| 23 |
// +------------------------------------------------------------------------------------------------------+
|
23 |
// +------------------------------------------------------------------------------------------------------+
|
| 24 |
// CVS : $Id: eflore_chorologie.php,v 1.10 2006-05-31 14:43:35 jp_milcent Exp $
|
24 |
// CVS : $Id: eflore_chorologie.php,v 1.11 2006-05-31 15:11:29 jp_milcent Exp $
|
| 25 |
/**
|
25 |
/**
|
| 26 |
* Affichage des listes de noms de plantes par zones géographiques.
|
26 |
* Affichage des listes de noms de plantes par zones géographiques.
|
| 27 |
*
|
27 |
*
|
| 28 |
* Ce script fournit le code html correspondant aux listes de noms de plantes par zone géographique.
|
28 |
* Ce script fournit le code html correspondant aux listes de noms de plantes par zone géographique.
|
| 29 |
*
|
29 |
*
|
| Line 32... |
Line 32... |
| 32 |
//Auteur original :
|
32 |
//Auteur original :
|
| 33 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
33 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
| 34 |
//Autres auteurs :
|
34 |
//Autres auteurs :
|
| 35 |
*@author Aucun
|
35 |
*@author Aucun
|
| 36 |
*@copyright Tela-Botanica 2000-2004
|
36 |
*@copyright Tela-Botanica 2000-2004
|
| 37 |
*@version $Revision: 1.10 $ $Date: 2006-05-31 14:43:35 $
|
37 |
*@version $Revision: 1.11 $ $Date: 2006-05-31 15:11:29 $
|
| 38 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
// +------------------------------------------------------------------------------------------------------+
|
| 39 |
*/
|
39 |
*/
|
| Line 40... |
Line 40... |
| 40 |
|
40 |
|
| 41 |
// +------------------------------------------------------------------------------------------------------+
|
41 |
// +------------------------------------------------------------------------------------------------------+
|
| Line 343... |
Line 343... |
| 343 |
|
343 |
|
| 344 |
//Nous récupérons toutes les infos sur le département :
|
344 |
//Nous récupérons toutes les infos sur le département :
|
| Line 345... |
Line 345... |
| 345 |
$tableau_infoDep = echoro_recupererInfoDep($departement);
|
345 |
$tableau_infoDep = echoro_recupererInfoDep($departement);
|
| 346 |
|
346 |
|
| 347 |
//Nous affectons les messages d'erreur
|
347 |
//Nous affectons les messages d'erreur
|
| 348 |
if($nombre_taxon != 0){
|
- |
|
| 349 |
$message_alerte = message_alerte('01');
|
348 |
if($nombre_taxon != 0){
|
| 350 |
}
|
349 |
$message_alerte = message_alerte('01');
|
| 351 |
else{
|
350 |
} else {
|
| - |
|
351 |
$message_alerte = message_alerte('02');
|
| 352 |
$message_alerte = message_alerte('02');
|
352 |
}
|
| 353 |
}
|
353 |
|
| 354 |
//La requete qui sélectionne les noms de taxons pour le département
|
354 |
//La requete qui sélectionne les noms de taxons pour le département
|
| 355 |
//et la lettre transmis dans l'url par la variable $lettre.
|
355 |
//et la lettre transmis dans l'url par la variable $lettre.
|
| 356 |
if ($tableau_infoDep['NUMERO'] == 971 || $tableau_infoDep['NUMERO'] == 972) {
|
356 |
if ($tableau_infoDep['NUMERO'] == 971 || $tableau_infoDep['NUMERO'] == 972) {
|
| Line 400... |
Line 400... |
| 400 |
' AND '.ECD_DEP.'='.$tableau_infoDep['NUMERO'].
|
400 |
' AND '.ECD_DEP.'='.$tableau_infoDep['NUMERO'].
|
| 401 |
' AND '.ECD_NUM_NOMEN.' = '.ENT_NUM_NOMEN.
|
401 |
' AND '.ECD_NUM_NOMEN.' = '.ENT_NUM_NOMEN.
|
| 402 |
' AND '.ECD_INDICE.' = '.ECS_ID.
|
402 |
' AND '.ECD_INDICE.' = '.ECS_ID.
|
| 403 |
' ORDER BY '.ENT_NOM_COMPLET_02.' ASC';
|
403 |
' ORDER BY '.ENT_NOM_COMPLET_02.' ASC';
|
| 404 |
}
|
404 |
}
|
| 405 |
if (isset($_GET['action']) && $_GET['action'] == 'export') {
|
- |
|
| 406 |
// Gestion de l'export XLS
|
- |
|
| 407 |
$resultat_export = mysql_query($requete_03, $GLOBALS['_ECHORO_']['bdd']) or die('
|
405 |
$resultat_export = mysql_query($requete_03, $GLOBALS['_ECHORO_']['bdd']) or die('
|
| 408 |
<h2 style='.STYLE_REQUETE.'>Erreur de requête</h2>'.
|
406 |
<h2 style='.STYLE_REQUETE.'>Erreur de requête</h2>'.
|
| 409 |
'<b>Requete : </b>'.$requete_03.
|
407 |
'<b>Requete : </b>'.$requete_03.
|
| 410 |
'<br/><br/><b>Erreur : </b>'.mysql_error());
|
408 |
'<br/><br/><b>Erreur : </b>'.mysql_error());
|
| - |
|
409 |
$GLOBALS['export_bool'] = true;
|
| - |
|
410 |
if (mysql_num_rows($resultat_export) == 0) {
|
| - |
|
411 |
$GLOBALS['export_bool'] = false;
|
| 411 |
|
412 |
}
|
| - |
|
413 |
if (isset($_GET['action']) && $_GET['action'] == 'export') {
|
| - |
|
414 |
// Gestion de l'export XLS
|
| 412 |
$i = 0;
|
415 |
$i = 0;
|
| 413 |
if (isset($_GET['format']) && $_GET['format'] == 'xls') {
|
416 |
if (isset($_GET['format']) && $_GET['format'] == 'xls') {
|
| 414 |
/** Inclusion de la classe PEAR de création de fichiers excell. */
|
417 |
/** Inclusion de la classe PEAR de création de fichiers excell. */
|
| 415 |
require_once ECHORO_CHEMIN_API_PEAR.'Spreadsheet/Excel/Writer.php';
|
418 |
require_once ECHORO_CHEMIN_API_PEAR.'Spreadsheet/Excel/Writer.php';
|
| 416 |
$workbook = new Spreadsheet_Excel_Writer();
|
419 |
$workbook = new Spreadsheet_Excel_Writer();
|
| Line 425... |
Line 428... |
| 425 |
$format_intro = $workbook->addFormat();
|
428 |
$format_intro = $workbook->addFormat();
|
| 426 |
$format_intro->setBold(1);
|
429 |
$format_intro->setBold(1);
|
| 427 |
$format_intro->setSize(12);
|
430 |
$format_intro->setSize(12);
|
| Line 428... |
Line 431... |
| 428 |
|
431 |
|
| - |
|
432 |
$worksheet->mergeCells($i++, 0, $i, 8);
|
| - |
|
433 |
if ($GLOBALS['lettre'] != 'tous') {
|
| - |
|
434 |
$titre = 'Export des taxons commençant par la lettre '.$GLOBALS['lettre'].' présents dans le département '.$tableau_infoDep['NUMERO'];
|
| 429 |
$worksheet->mergeCells($i++, 0, $i, 8);
|
435 |
} else {
|
| - |
|
436 |
$titre = 'Export des taxons présents dans le département '.$tableau_infoDep['NUMERO'];
|
| 430 |
$titre = 'Export des taxons présents dans le département '.$tableau_infoDep['NUMERO'];
|
437 |
}
|
| Line 431... |
Line 438... |
| 431 |
$worksheet->writeString(0, 0, $titre, $format_titre);
|
438 |
$worksheet->writeString(0, 0, $titre, $format_titre);
|
| 432 |
|
439 |
|
| 433 |
$worksheet->mergeCells(++$i, 0, $i, 8);
|
440 |
$worksheet->mergeCells(++$i, 0, $i, 8);
|
| Line 511... |
Line 518... |
| 511 |
//la forme france*numéro_departement
|
518 |
//la forme france*numéro_departement
|
| 512 |
$tableau_departement = explode ('*',$france->historique);
|
519 |
$tableau_departement = explode ('*',$france->historique);
|
| Line 513... |
Line 520... |
| 513 |
|
520 |
|
| 514 |
//Nous récupérons toutes les infos sur le département :
|
521 |
//Nous récupérons toutes les infos sur le département :
|
| - |
|
522 |
$tableau_infoDep = echoro_recupererInfoDep($tableau_departement[1]);
|
| - |
|
523 |
//Attribution à la variable globale du numéro du département
|
| Line 515... |
Line 524... |
| 515 |
$tableau_infoDep = echoro_recupererInfoDep($tableau_departement[1]);
|
524 |
$GLOBALS['departement'] = $tableau_infoDep['NUMERO'];
|
| 516 |
|
525 |
|
| 517 |
if ($tableau_infoDep['NUMERO'] == 971 || $tableau_infoDep['NUMERO'] == 972) {
|
526 |
if ($tableau_infoDep['NUMERO'] == 971 || $tableau_infoDep['NUMERO'] == 972) {
|
| 518 |
$tablo_formatResultat[0]['Col_lien_href'] = $GLOBALS['_ECHORO_']['url_base']->getURL().'bdnfgm_nn';
|
527 |
$tablo_formatResultat[0]['Col_lien_href'] = $GLOBALS['_ECHORO_']['url_base']->getURL().'bdnfgm_nn';
|
| 519 |
} elseif ($tableau_infoDep['NUMERO'] == 974) {
|
528 |
} elseif ($tableau_infoDep['NUMERO'] == 974) {
|
| Line 520... |
Line 529... |
| 520 |
$tablo_formatResultat[0]['Col_lien_href'] = $GLOBALS['_ECHORO_']['url_base']->getURL().'bdnfr_nn';
|
529 |
$tablo_formatResultat[0]['Col_lien_href'] = $GLOBALS['_ECHORO_']['url_base']->getURL().'bdnfr_nn';
|
| 521 |
}
|
530 |
}
|
| 522 |
|
531 |
|
| 523 |
//Nous récupérons le nombre de taxons présent dans le département
|
532 |
//Nous récupérons le nombre de taxons présent dans le département
|
| 524 |
if(isset($tableau_dep_taxons[$tableau_infoDep['NUMERO']]) && $tableau_dep_taxons[$tableau_infoDep['NUMERO']] !=0){
|
- |
|
| 525 |
$nombre_taxon = $tableau_dep_taxons[$tableau_infoDep['NUMERO']];
|
533 |
if(isset($tableau_dep_taxons[$tableau_infoDep['NUMERO']]) && $tableau_dep_taxons[$tableau_infoDep['NUMERO']] != 0) {
|
| 526 |
$message_alerte = message_alerte('01');
|
534 |
$nombre_taxon = $tableau_dep_taxons[$tableau_infoDep['NUMERO']];
|
| 527 |
}
|
535 |
$message_alerte = message_alerte('01');
|
| 528 |
else{
|
536 |
} else {
|
| 529 |
$nombre_taxon = 0;
|
537 |
$nombre_taxon = 0;
|
| 530 |
$message_alerte = message_alerte('02');
|
538 |
$message_alerte = message_alerte('02');
|
| Line 611... |
Line 619... |
| 611 |
|
619 |
|
| 612 |
|
620 |
|
| 613 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
621 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
| - |
|
622 |
*
|
| - |
|
623 |
* $Log: not supported by cvs2svn $
|
| - |
|
624 |
* Revision 1.10 2006/05/31 14:43:35 jp_milcent
|
| - |
|
625 |
* Correction de la gestion des sessions pour l'affichage de la carte.
|
| 614 |
*
|
626 |
* Ajout de l'export au format xls.
|
| 615 |
* $Log: not supported by cvs2svn $
|
627 |
*
|
| 616 |
* Revision 1.9 2005/06/30 15:23:02 jpm
|
628 |
* Revision 1.9 2005/06/30 15:23:02 jpm
|
| 617 |
* Utilisation d'un fichier javascript à part.
|
629 |
* Utilisation d'un fichier javascript à part.
|
| 618 |
*
|
630 |
*
|