New file |
0,0 → 1,165 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2005 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This file is part of Integrateur eFlore. | |
// | | |
// | Foobar is free software; you can redistribute it and/or modify | |
// | it under the terms of the GNU General Public License as published by | |
// | the Free Software Foundation; either version 2 of the License, or | |
// | (at your option) any later version. | |
// | | |
// | Foobar is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
// | GNU General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU General Public License | |
// | 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_affichage_xhtml.fonct.php,v 1.1 2005-05-24 15:57:48 jpm Exp $ |
/** |
* Fonctions pour l'affichage XHTML. |
* |
*@package eFlore |
*@subpackage Ancien |
//Auteur original : |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.1 $ $Date: 2005-05-24 15:57:48 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
|
/** |
* Gestion des messages d'alerte. |
* |
*Cette fonction retourne un message d'alerte en html. |
* |
* @return string |
*/ |
function message_alerte($type_message) |
{ |
$message_renvoyer=""; |
|
switch ($type_message){ |
case '01' : |
$message_renvoyer = inclusion_html("debut_ligne_alerte")."Veuillez saisir un radical avant d'effectuer la recherche !".inclusion_html("fin_ligne_alerte"); |
break; |
case '02' : |
$message_renvoyer = inclusion_html("debut_ligne_alerte")."Veuillez saisir un radical contenant au moins 3 caractères alphabétiques !".inclusion_html("fin_ligne_alerte"); |
break; |
case '03' : |
$message_renvoyer = inclusion_html("debut_ligne_alerte")."Le symbole % ne peut pas être utilisé sans au moins trois caractères alphabétiques !".inclusion_html("fin_ligne_alerte"); |
break; |
case '04' : |
$message_renvoyer = inclusion_html("debut_ligne_alerte")."Les symboles suivant ne doivent pas être utilisés : & < > \" ".inclusion_html("fin_ligne_alerte"); |
break; |
}//fin du switch |
|
return $message_renvoyer; |
} |
|
/** |
* Gestion des inclusions html dans le code php. |
* |
*Cette fonction retourne du html à insérer dans le php. |
* |
* @return string |
*/ |
function inclusion_html($type_inclusion) |
{ |
global $alerte, $flore, $recherche, $radical, $baseURL; |
$html_renvoyer = ''; |
|
switch ($type_inclusion) { |
case 'rechercher' : |
$html_renvoyer .= inclusion_html($GLOBALS['_EF_ANCIEN_']['type'].'_rechercher_titre'). |
'<h2>Rechercher une plante</h2>'."\n". |
$alerte."\n". |
'<form id="eflore_form_nomenclature" method="post" action="'.$baseURL.'">'."\n". |
'<fieldset>'."\n". |
'<legend>'.EFLORE_LG_RECH_NOM_FORM_TITRE.'</legend>'."\n". |
'<ul>'."\n". |
'<li>'."\n". |
'<label for="radical">Nom :</label>'."\n". |
'<input type="text" name="radical" value="'; |
$html_renvoyer .= (isset($radical) && !empty($radical))? $radical : ''; |
$html_renvoyer .= '" maxlength="100" size="30" />'."\n". |
'</li>'."\n". |
'<li>'."\n". |
'<ul>'."\n". |
'<li>'."\n". |
'<input type="radio" id="ef_nom_scientifique" name="recherche" value="LATIN" '; |
$html_renvoyer .= (!empty($recherche) && $recherche == 'LATIN')? 'checked="checked"': ''; |
$html_renvoyer .= '/>'. |
'<label for="ef_nom_scientifique">nom scientifique</label>'."\n". |
'</li>'."\n".'<li>'."\n". |
'<input type="radio" id="ef_nom_vernaculaire" name="recherche" value="VERNA" '; |
$html_renvoyer .= (!empty($recherche) && $recherche == 'VERNA')? 'checked="checked"': ''; |
$html_renvoyer .= '/>'. |
'<label for="ef_nom_vernaculaire">nom vernaculaire</label>'."\n". |
'</li>'."\n". |
'</ul>'."\n". |
'</li>'."\n". |
'</ul>'."\n". |
'<input type="hidden" name="flore" value="'.$GLOBALS['_EF_ANCIEN_']['type'].'" />'."\n". |
'<input type="hidden" name="numclass" value="1" />'."\n". |
'<input id="eflore_chercher" name="eflore_chercher" type="submit" value="chercher" />'."\n". |
'</fieldset>'."\n". |
'</form>'; |
break; |
case 'ANT_rechercher_titre' : |
$html_renvoyer .= '<h1>Consulter la base eFlore : Guadeloupe-Martinique</h1>'."\n"; |
break; |
case 'REU_rechercher_titre' : |
$html_renvoyer .= '<h1>Consulter la base eFlore : Réunion</h1>'."\n"; |
break; |
case 'rechercher_aide' : |
$html_renvoyer .= '<div id="eflore_exemple_nomenc">'."\n". |
'<h2>'.EFLORE_LG_EXPLE_TITRE.'</h2>'."\n". |
'<p>'.EFLORE_LG_EXPLE_NOMENC.'</p>'."\n". |
'<p>'.EFLORE_LG_EXPLE_ASTUCE.'</p>'."\n". |
'<ul id="eflore_liste_astuces">'."\n". |
' <li>'.sprintf(EFLORE_LG_EXPLE_ASTUCE_DEMO_01, '<tt>', '</tt>', '<tt>', '</tt>').'</li>'."\n". |
' <li>'.sprintf(EFLORE_LG_EXPLE_ASTUCE_DEMO_02, '<tt>', '</tt>').'</li>'."\n". |
'</ul>'."\n". |
'<p>'.EFLORE_LG_EXPLE_LANGUE.'</p>'."\n". |
'<ul id="eflore_liste_langues">'."\n". |
' <li>'.EFLORE_LG_EXPLE_FR.'</li>'."\n". |
' <li>'.EFLORE_LG_EXPLE_ES.'</li>'."\n". |
' <li>'.EFLORE_LG_EXPLE_CA.'</li>'."\n". |
' <li>'.EFLORE_LG_EXPLE_DE.'</li>'."\n". |
' <li>'.EFLORE_LG_EXPLE_EN.'</li>'."\n". |
' <li>'.EFLORE_LG_EXPLE_NL.'</li>'."\n". |
' <li>'.EFLORE_LG_EXPLE_IT.'</li>'."\n". |
' <li>'.EFLORE_LG_EXPLE_ETC.'</li>'."\n". |
'</ul>'."\n". |
'</div>'."\n"; |
break; |
case 'pied_page' : |
$html_renvoyer = '<p id="eflore_pied_page">'.EFLORE_LG_PIED.'</p>'; |
break; |
case 'debut_ligne_alerte' : |
$html_renvoyer = '<p ="attention">Attention'; |
break; |
case 'fin_ligne_alerte' : |
$html_renvoyer = '</p>'; |
break; |
}//fin du switch |
|
return $html_renvoyer; |
}//fin fonction inclusion_html |
|
|
//-- Fin du code source ------------------------------------------------------------ |
?> |