32,7 → 32,7 |
// pris connaissance de la licence CeCILL, et que vous en avez accepté les |
// termes. |
// ---- |
// CVS : $Id: pap_rendu.inc.php,v 1.29 2006-04-20 09:45:30 alexandre_tb Exp $ |
// CVS : $Id: pap_rendu.inc.php,v 1.29.2.1 2007-01-11 18:22:35 ddelon Exp $ |
/** |
* Rendu : programme traitant l'url demandée et retournant la page compressé au navigateur. |
* |
48,7 → 48,7 |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@author Laurent COUDOUNEAU <laurent.coudouneau@ema.fr> |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.29 $ $Date: 2006-04-20 09:45:30 $ |
*@version $Revision: 1.29.2.1 $ $Date: 2007-01-11 18:22:35 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
|
125,18 → 125,33 |
$GLOBALS['_PAPYRUS_']['general']['contenu_squelette'] = file_get_contents($GLOBALS['_PAPYRUS_']['general']['chemin_squelette']); |
|
|
if (isset($GLOBALS['_GEN_commun']['traduction_info_site'])) { |
$type_site='traduction_info_site'; |
} |
else { |
$type_site='info_site'; |
} |
|
if (isset($GLOBALS['_GEN_commun']['traduction_info_menu'])) { |
$type_menu='traduction_info_menu'; |
} |
else { |
$type_menu='info_menu'; |
} |
|
|
|
// +------------------------------------------------------------------------------------------------------+ |
// Recherche des informations pour la complétion de l'entête du squelette de la page demandée. |
|
if (isset($GLOBALS['_GEN_commun']['info_menu'])) { |
if (isset($GLOBALS['_GEN_commun'][$type_menu])) { |
// Construction du titre. |
if (! empty($GLOBALS['_GEN_commun']['info_menu']->gm_titre)) { |
$GLOBALS['_PAPYRUS_']['page']['titre'] = htmlentities($GLOBALS['_GEN_commun']['info_menu']->gm_titre); |
} else if (! empty($GLOBALS['_GEN_commun']['info_menu']->gm_titre_alternatif)) { |
$GLOBALS['_PAPYRUS_']['page']['titre'] = htmlentities($GLOBALS['_GEN_commun']['info_menu']->gm_titre_alternatif); |
if (! empty($GLOBALS['_GEN_commun'][$type_menu]->gm_titre)) { |
$GLOBALS['_PAPYRUS_']['page']['titre'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_titre); |
} else if (! empty($GLOBALS['_GEN_commun'][$type_menu]->gm_titre_alternatif)) { |
$GLOBALS['_PAPYRUS_']['page']['titre'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_titre_alternatif); |
} else { |
$GLOBALS['_PAPYRUS_']['page']['titre'] = htmlentities($GLOBALS['_GEN_commun']['info_menu']->gm_nom); |
$GLOBALS['_PAPYRUS_']['page']['titre'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_nom); |
} |
|
} |
148,25 → 163,25 |
$GLOBALS['_PAPYRUS_']['rendu']['TITRE_PAGE'] = $GLOBALS['_PAPYRUS_']['page']['titre']; |
|
// Construction des infos sur le site |
$GLOBALS['_PAPYRUS_']['page']['nom_site'] = htmlentities($GLOBALS['_GEN_commun']['info_site']->gs_nom); |
$GLOBALS['_PAPYRUS_']['page']['nom_site'] = htmlentities($GLOBALS['_GEN_commun'][$type_site]->gs_nom); |
$GLOBALS['_PAPYRUS_']['rendu']['SITE_NOM'] = $GLOBALS['_PAPYRUS_']['page']['nom_site']; |
$GLOBALS['_PAPYRUS_']['page']['langue_site'] = htmlentities($GLOBALS['_GEN_commun']['i18n']); |
$GLOBALS['_PAPYRUS_']['rendu']['SITE_LANGUE'] = $GLOBALS['_PAPYRUS_']['page']['langue_site']; |
$GLOBALS['_PAPYRUS_']['page']['code_alpha_site'] = htmlentities($GLOBALS['_GEN_commun']['info_site']->gs_code_alpha); |
$GLOBALS['_PAPYRUS_']['page']['code_alpha_site'] = htmlentities($GLOBALS['_GEN_commun'][$type_site]->gs_code_alpha); |
$GLOBALS['_PAPYRUS_']['rendu']['SITE_CODE_ALPHA'] = $GLOBALS['_PAPYRUS_']['page']['code_alpha_site']; |
|
//Construction des infos sur le contexte d'affichage de la page |
$une_url =new Net_URL(); |
$une_url->addQueryString("site",$_GEN_commun['url_site']); |
$une_url->addQueryString("site",$GLOBALS['_GEN_commun']['url_site']); |
$une_url->removeQueryString("langue"); |
$GLOBALS['_PAPYRUS_']['rendu']['PAGE_URL'] = $une_url->getUrl(); |
|
|
// Construction des Meta "http-equiv". |
$_GEN_commun['meta_http_equiv'] = array(); |
$GLOBALS['_PAPYRUS_']['page']['jeu_de_caracteres'] = htmlentities(strtoupper($_GEN_commun['info_i18n']->gi_jeu_de_caracteres)); |
$GLOBALS['_GEN_commun']['meta_http_equiv'] = array(); |
$GLOBALS['_PAPYRUS_']['page']['jeu_de_caracteres'] = htmlentities(strtoupper($GLOBALS['_GEN_commun']['info_i18n']->gi_jeu_de_caracteres)); |
$GLOBALS['_PAPYRUS_']['rendu']['SITE_JEU_DE_CARACTERES'] = $GLOBALS['_PAPYRUS_']['page']['jeu_de_caracteres']; |
$GLOBALS['_PAPYRUS_']['page']['langue'] = htmlentities($_GEN_commun['info_i18n_langue']->gil_id_langue); |
$GLOBALS['_PAPYRUS_']['page']['langue'] = htmlentities($GLOBALS['_GEN_commun']['info_i18n_langue']->gil_id_langue); |
$GLOBALS['_PAPYRUS_']['rendu']['SITE_LANGUE'] = $GLOBALS['_PAPYRUS_']['page']['langue']; |
GEN_stockerMetaHttpEquiv('Content-Type', 'text/html; charset='.$GLOBALS['_PAPYRUS_']['page']['jeu_de_caracteres']); |
GEN_stockerMetaHttpEquiv('Content-style-type', 'text/css'); |
174,10 → 189,10 |
GEN_stockerMetaHttpEquiv('Content-language', $GLOBALS['_PAPYRUS_']['page']['langue']); |
|
// Construction des Meta "name". |
$_GEN_commun['meta_name'] = array(); |
if (isset($GLOBALS['_GEN_commun']['info_menu'])) { |
$GLOBALS['_PAPYRUS_']['page']['robot'] = htmlentities($_GEN_commun['info_menu']->gm_robot); |
$GLOBALS['_PAPYRUS_']['page']['auteur'] = htmlentities($_GEN_commun['info_menu']->gm_auteur); |
$GLOBALS['_GEN_commun']['meta_name'] = array(); |
if (isset($GLOBALS['_GEN_commun'][$type_menu])) { |
$GLOBALS['_PAPYRUS_']['page']['robot'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_robot); |
$GLOBALS['_PAPYRUS_']['page']['auteur'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_auteur); |
} |
else { |
$GLOBALS['_PAPYRUS_']['page']['robot'] = ''; |
185,19 → 200,20 |
} |
|
if (empty($GLOBALS['_PAPYRUS_']['page']['auteur'])) { |
$GLOBALS['_PAPYRUS_']['page']['auteur'] = htmlentities($_GEN_commun['info_site']->gs_auteur); |
$GLOBALS['_PAPYRUS_']['page']['auteur'] = htmlentities($GLOBALS['_GEN_commun'][$type_site]->gs_auteur); |
|
} |
if (isset($GLOBALS['_GEN_commun']['info_menu'])) { |
$GLOBALS['_PAPYRUS_']['page']['mots_cles'] = htmlentities($_GEN_commun['info_menu']->gm_mots_cles); |
if (isset($GLOBALS['_GEN_commun'][$type_menu])) { |
$GLOBALS['_PAPYRUS_']['page']['mots_cles'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_mots_cles); |
} |
if (empty($GLOBALS['_PAPYRUS_']['page']['mots_cles'])) { |
$GLOBALS['_PAPYRUS_']['page']['mots_cles'] = htmlentities($_GEN_commun['info_site']->gs_mots_cles); |
$GLOBALS['_PAPYRUS_']['page']['mots_cles'] = htmlentities($GLOBALS['_GEN_commun'][$type_site]->gs_mots_cles); |
} |
if (isset($GLOBALS['_GEN_commun']['info_menu'])) { |
$GLOBALS['_PAPYRUS_']['page']['description_libre'] = htmlentities($_GEN_commun['info_menu']->gm_description_libre); |
if (isset($GLOBALS['_GEN_commun'][$type_menu])) { |
$GLOBALS['_PAPYRUS_']['page']['description_libre'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_description_libre); |
} |
if (empty($GLOBALS['_PAPYRUS_']['page']['description_libre'])) { |
$GLOBALS['_PAPYRUS_']['page']['description_libre'] = htmlentities($_GEN_commun['info_site']->gs_description); |
$GLOBALS['_PAPYRUS_']['page']['description_libre'] = htmlentities($GLOBALS['_GEN_commun'][$type_site]->gs_description); |
} |
|
|
209,19 → 225,19 |
|
// Construction des Meta Meta "name" du Dublin Core. |
|
if (isset($GLOBALS['_GEN_commun']['info_menu'])) { |
$GLOBALS['_PAPYRUS_']['page']['titre_alternatif'] = htmlentities($_GEN_commun['info_menu']->gm_titre_alternatif); |
$GLOBALS['_PAPYRUS_']['page']['auteur'] = htmlentities($_GEN_commun['info_menu']->gm_auteur); |
$GLOBALS['_PAPYRUS_']['page']['description_resume'] = htmlentities($_GEN_commun['info_menu']->gm_description_resume); |
$GLOBALS['_PAPYRUS_']['page']['description_table_matieres'] = htmlentities($_GEN_commun['info_menu']->gm_description_table_matieres); |
$GLOBALS['_PAPYRUS_']['page']['publieur'] = htmlentities($_GEN_commun['info_menu']->gm_editeur); |
$GLOBALS['_PAPYRUS_']['page']['contributeur'] = htmlentities($_GEN_commun['info_menu']->gm_contributeur); |
$GLOBALS['_PAPYRUS_']['page']['date_creation'] = htmlentities($_GEN_commun['info_menu']->gm_date_creation); |
$GLOBALS['_PAPYRUS_']['page']['date_soumission'] = htmlentities($_GEN_commun['info_menu']->gm_date_soumission); |
$GLOBALS['_PAPYRUS_']['page']['date_acceptation'] = htmlentities($_GEN_commun['info_menu']->gm_date_acceptation); |
$GLOBALS['_PAPYRUS_']['page']['periode_validite'] = htmlentities($_GEN_commun['info_menu']->gm_date_debut_validite); |
$GLOBALS['_PAPYRUS_']['page']['date_copyright'] = htmlentities($_GEN_commun['info_menu']->gm_date_copyright); |
$GLOBALS['_PAPYRUS_']['page']['source'] = htmlentities($_GEN_commun['info_menu']->gm_source); |
if (isset($GLOBALS['_GEN_commun'][$type_menu])) { |
$GLOBALS['_PAPYRUS_']['page']['titre_alternatif'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_titre_alternatif); |
$GLOBALS['_PAPYRUS_']['page']['auteur'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_auteur); |
$GLOBALS['_PAPYRUS_']['page']['description_resume'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_description_resume); |
$GLOBALS['_PAPYRUS_']['page']['description_table_matieres'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_description_table_matieres); |
$GLOBALS['_PAPYRUS_']['page']['publieur'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_editeur); |
$GLOBALS['_PAPYRUS_']['page']['contributeur'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_contributeur); |
$GLOBALS['_PAPYRUS_']['page']['date_creation'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_date_creation); |
$GLOBALS['_PAPYRUS_']['page']['date_soumission'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_date_soumission); |
$GLOBALS['_PAPYRUS_']['page']['date_acceptation'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_date_acceptation); |
$GLOBALS['_PAPYRUS_']['page']['periode_validite'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_date_debut_validite); |
$GLOBALS['_PAPYRUS_']['page']['date_copyright'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_date_copyright); |
$GLOBALS['_PAPYRUS_']['page']['source'] = htmlentities($GLOBALS['_GEN_commun'][$type_menu]->gm_source); |
} |
else { |
$GLOBALS['_PAPYRUS_']['page']['titre_alternatif'] = ''; |
238,19 → 254,19 |
$GLOBALS['_PAPYRUS_']['page']['source'] = ''; |
} |
|
if ((isset($_GEN_commun['info_i18n_pays'])) && ($_GEN_commun['info_i18n_pays']->gip_id_pays != '')) { |
$GLOBALS['_PAPYRUS_']['page']['langue_rfc_3066'] = $GLOBALS['_PAPYRUS_']['page']['langue'].'-'.htmlentities($_GEN_commun['info_i18n_pays']->gip_id_pays); |
if ((isset($GLOBALS['_GEN_commun']['info_i18n_pays'])) && ($GLOBALS['_GEN_commun']['info_i18n_pays']->gip_id_pays != '')) { |
$GLOBALS['_PAPYRUS_']['page']['langue_rfc_3066'] = $GLOBALS['_PAPYRUS_']['page']['langue'].'-'.htmlentities($GLOBALS['_GEN_commun']['info_i18n_pays']->gip_id_pays); |
} else { |
$GLOBALS['_PAPYRUS_']['page']['langue_rfc_3066'] = $GLOBALS['_PAPYRUS_']['page']['langue']; |
} |
if (isset($GLOBALS['_GEN_commun']['info_menu'])) { |
$GLOBALS['_PAPYRUS_']['page']['type_portee_spatiale'] = htmlentities($_GEN_commun['info_menu']->gm_ce_type_portee_spatiale); |
$GLOBALS['_PAPYRUS_']['page']['portee_spatiale'] = htmlentities($_GEN_commun['info_menu']->gm_portee_spatiale); |
$GLOBALS['_PAPYRUS_']['page']['type_portee_temporelle'] = htmlentities($_GEN_commun['info_menu']->gm_ce_type_portee_temporelle); |
$GLOBALS['_PAPYRUS_']['page']['portee_temporelle'] = htmlentities($_GEN_commun['info_menu']->gm_portee_temporelle); |
$GLOBALS['_PAPYRUS_']['page']['licence'] = htmlentities($_GEN_commun['info_menu']->gm_licence); |
$GLOBALS['_PAPYRUS_']['page']['public'] = htmlentities($_GEN_commun['info_menu']->gm_public); |
$GLOBALS['_PAPYRUS_']['page']['public_niveau'] = htmlentities($_GEN_commun['info_menu']->gm_public_niveau); |
if (isset($GLOBALS['_GEN_commun']['$type_menu'])) { |
$GLOBALS['_PAPYRUS_']['page']['type_portee_spatiale'] = htmlentities($GLOBALS['_GEN_commun']['$type_menu']->gm_ce_type_portee_spatiale); |
$GLOBALS['_PAPYRUS_']['page']['portee_spatiale'] = htmlentities($GLOBALS['_GEN_commun']['$type_menu']->gm_portee_spatiale); |
$GLOBALS['_PAPYRUS_']['page']['type_portee_temporelle'] = htmlentities($GLOBALS['_GEN_commun']['$type_menu']->gm_ce_type_portee_temporelle); |
$GLOBALS['_PAPYRUS_']['page']['portee_temporelle'] = htmlentities($GLOBALS['_GEN_commun']['$type_menu']->gm_portee_temporelle); |
$GLOBALS['_PAPYRUS_']['page']['licence'] = htmlentities($GLOBALS['_GEN_commun']['$type_menu']->gm_licence); |
$GLOBALS['_PAPYRUS_']['page']['public'] = htmlentities($GLOBALS['_GEN_commun']['$type_menu']->gm_public); |
$GLOBALS['_PAPYRUS_']['page']['public_niveau'] = htmlentities($GLOBALS['_GEN_commun']['$type_menu']->gm_public_niveau); |
} |
else { |
$GLOBALS['_PAPYRUS_']['page']['type_portee_spatiale'] = ''; |
263,6 → 279,7 |
|
} |
|
|
GEN_stockerMetaNameDC('DC.Title', $GLOBALS['_PAPYRUS_']['page']['titre'], $GLOBALS['_PAPYRUS_']['page']['langue']); |
GEN_stockerMetaNameDC('DC.Title.alternative', $GLOBALS['_PAPYRUS_']['page']['titre_alternatif'], $GLOBALS['_PAPYRUS_']['page']['langue']); |
GEN_stockerMetaNameDC('DC.Creator', $GLOBALS['_PAPYRUS_']['page']['auteur']); |
304,10 → 321,10 |
// PERF : on inclus des applettes meme s'il elle ne sont pas utilisées, les initialisations peuvent etre |
// longue et c'est source de bug ... |
|
for ($i = 0; $i < count($_GEN_commun['info_applette']); $i++) { |
for ($i = 0; $i < count($GLOBALS['_GEN_commun']['info_applette']); $i++) { |
// Nous vérifions que le chemin vers l'applette existe. |
if (file_exists($_GEN_commun['info_applette'][$i]->gap_chemin)) { |
include_once($_GEN_commun['info_applette'][$i]->gap_chemin); |
if (file_exists($GLOBALS['_GEN_commun']['info_applette'][$i]->gap_chemin)) { |
include_once($GLOBALS['_GEN_commun']['info_applette'][$i]->gap_chemin); |
// Nous récupérons l'expression régulière de la balise pour l'utiliser lors de l'appel |
// de la fonction de l'applette. L'appel des fonctions des applettes à lieu aprés l'appel |
// de l'application pour permettre à l'appli de modifier certains paramêtres (identification, ordre des menus). |
515,7 → 532,7 |
// Remplacement des balises Papyrus dans le squelette |
foreach ($GLOBALS['_PAPYRUS_']['rendu'] as $GLOBALS['_PAPYRUS_']['tmp']['cle'] => $GLOBALS['_PAPYRUS_']['tmp']['val']) { |
$GLOBALS['_PAPYRUS_']['general']['contenu_squelette'] = |
str_replace( '<!-- '.$_GEN_commun['balise_prefixe'].$GLOBALS['_PAPYRUS_']['tmp']['cle'].' -->', |
str_replace( '<!-- '.$GLOBALS['_GEN_commun']['balise_prefixe'].$GLOBALS['_PAPYRUS_']['tmp']['cle'].' -->', |
$GLOBALS['_PAPYRUS_']['tmp']['val'], |
$GLOBALS['_PAPYRUS_']['general']['contenu_squelette']); |
} |
539,6 → 556,10 |
/* +--Fin du code ---------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.29 2006/04/20 09:45:30 alexandre_tb |
* ligne 92, remplacement de gs_fichier_squelette par gm_fichier_squelette, car on appelle le squelette du menu (s'il existe) et non du site. |
* Posait un pb lors de l'affichage de squelettes (de menu) des traductions de menu |
* |
* Revision 1.28 2006/03/13 21:00:20 ddelon |
* Suppression messages d'erreur multilinguisme |
* |
674,7 → 695,7 |
* Changement du modèle de la base de données. |
* |
* Revision 1.23 2004/04/22 08:30:47 jpm |
* Transformation de $GS_GLOBAL en $_GEN_commun. |
* Transformation de $GS_GLOBAL en $GLOBALS['_GEN_commun']. |
* |
* Revision 1.22 2004/04/21 07:55:02 jpm |
* Ajout de la feuille de style de débogage si le débogage de Génésia est activé. |