| Line 91... |
Line 91... |
| 91 |
$GLOBALS['_PAPYRUS_']['general']['chemin_squelette'] = $GLOBALS['_GEN_commun']['info_menu']->gm_fichier_squelette;
|
91 |
$GLOBALS['_PAPYRUS_']['general']['chemin_squelette'] = $GLOBALS['_GEN_commun']['info_menu']->gm_fichier_squelette;
|
| 92 |
}
|
92 |
}
|
| 93 |
}
|
93 |
}
|
| Line 94... |
Line 94... |
| 94 |
|
94 |
|
| - |
|
95 |
// Si l'information concernant le chemin est réellement un chemin
|
| - |
|
96 |
/*
|
| - |
|
97 |
* Test du chemin du squelette - modifié
|
| - |
|
98 |
* Teste à présent la présence du squelette dans la lanque par défaut si il n'est pas trouvé dans la langue en cours.
|
| 95 |
// Si l'information concernant le chemin est réellement un chemin
|
99 |
* */
|
| - |
|
100 |
if (! file_exists($GLOBALS['_PAPYRUS_']['general']['chemin_squelette'])) {
|
| - |
|
101 |
|
| - |
|
102 |
if (file_exists(GEN_CHEMIN_SITES.$GLOBALS['_GEN_commun']['info_site']->gs_code_alpha.'/'.
|
| - |
|
103 |
$GLOBALS['_GEN_commun']['i18n'].'/'.GEN_DOSSIER_SQUELETTE.
|
| - |
|
104 |
'/'.$GLOBALS['_PAPYRUS_']['general']['chemin_squelette'])) {
|
| 96 |
if (! file_exists($GLOBALS['_PAPYRUS_']['general']['chemin_squelette'])) {
|
105 |
|
| 97 |
//Si ce n'est qu'un nom de fichier squelette
|
106 |
// Le fichier de la locale courante existe
|
| - |
|
107 |
$GLOBALS['_PAPYRUS_']['general']['chemin_test'] = GEN_CHEMIN_SITES.$GLOBALS['_GEN_commun']['info_site']->gs_code_alpha.'/'.
|
| - |
|
108 |
$GLOBALS['_GEN_commun']['i18n'].'/'.GEN_DOSSIER_SQUELETTE.
|
| - |
|
109 |
'/'.$GLOBALS['_PAPYRUS_']['general']['chemin_squelette'];
|
| - |
|
110 |
|
| 98 |
$GLOBALS['_PAPYRUS_']['general']['chemin_test'] = GEN_CHEMIN_SITES.
|
111 |
} elseif (file_exists(GEN_CHEMIN_SITES.
|
| 99 |
$GLOBALS['_GEN_commun']['info_site']->gs_code_alpha.'/'.
|
112 |
$GLOBALS['_GEN_commun']['info_site']->gs_code_alpha.'/'.GEN_I18N_ID_DEFAUT.
|
| - |
|
113 |
'/'.GEN_DOSSIER_SQUELETTE.'/'.$GLOBALS['_PAPYRUS_']['general']['chemin_squelette'])) {
|
| - |
|
114 |
// Le fichier par défaut existe
|
| - |
|
115 |
$GLOBALS['_PAPYRUS_']['general']['chemin_test'] = GEN_CHEMIN_SITES.$GLOBALS['_GEN_commun']['info_site']->gs_code_alpha.'/'.
|
| 100 |
$GLOBALS['_GEN_commun']['i18n'].'/'.GEN_DOSSIER_SQUELETTE.'/'.$GLOBALS['_PAPYRUS_']['general']['chemin_squelette'];
|
116 |
GEN_I18N_ID_DEFAUT.'/'.GEN_DOSSIER_SQUELETTE.
|
| - |
|
117 |
'/'.$GLOBALS['_PAPYRUS_']['general']['chemin_squelette'];
|
| - |
|
118 |
} else {
|
| 101 |
if (! file_exists($GLOBALS['_PAPYRUS_']['general']['chemin_test'])) {
|
119 |
//Aucun des deux fichiers n'existe.
|
| 102 |
die('ERREUR Papyrus : Impossible de trouver de fichier de squelette. <br />'.
|
120 |
die('ERREUR Papyrus : Impossible de trouver de fichier de squelette. <br />'.
|
| 103 |
'Chemin fichier squelette : '.$GLOBALS['_PAPYRUS_']['general']['chemin_squelette'].' <br />'.
|
121 |
'Chemin fichier squelette : '.$GLOBALS['_PAPYRUS_']['general']['chemin_squelette'].' <br />'.
|
| 104 |
'Ligne n° : '. __LINE__ .'<br />'.
|
122 |
'Ligne n° : '. __LINE__ .'<br />'.
|
| 105 |
'Fichier : '. __FILE__ );
|
- |
|
| 106 |
} else {
|
- |
|
| 107 |
$GLOBALS['_PAPYRUS_']['general']['chemin_squelette'] = $GLOBALS['_PAPYRUS_']['general']['chemin_test'];
|
123 |
'Fichier : '. __FILE__ );
|
| 108 |
}
|
124 |
}
|
| Line 109... |
Line -... |
| 109 |
}
|
- |
|
| 110 |
|
125 |
}
|
| 111 |
// +------------------------------------------------------------------------------------------------------+
|
- |
|
| 112 |
// Récupération du contenu du fichier de squelette de la page demandée.
|
- |
|
| 113 |
/*
|
- |
|
| 114 |
// Lecture du fichier de squelette XHTML en PHP 4.1.2
|
- |
|
| 115 |
$tab_fichier_squelette = file($chemin_squelette);
|
- |
|
| 116 |
$contenu_squelette = '';
|
- |
|
| 117 |
for ($i = 0; $i < count($tab_fichier_squelette); $i++) {
|
126 |
|
| 118 |
$contenu_squelette .= $tab_fichier_squelette[$i];
|
- |
|
| 119 |
}
|
127 |
$GLOBALS['_PAPYRUS_']['general']['chemin_squelette'] = $GLOBALS['_PAPYRUS_']['general']['chemin_test'];
|