1 |
<?php
|
1 |
<?php
|
2 |
/*vim: set expandtab tabstop=4 shiftwidth=4: */
|
2 |
/*vim: set expandtab tabstop=4 shiftwidth=4: */
|
3 |
// +------------------------------------------------------------------------------------------------------+
|
3 |
// +------------------------------------------------------------------------------------------------------+
|
4 |
// | PHP version 5.1 |
|
4 |
// | PHP version 5.1 |
|
5 |
// +------------------------------------------------------------------------------------------------------+
|
5 |
// +------------------------------------------------------------------------------------------------------+
|
6 |
// | Copyright (C) 1999-2006 Tela Botanica (accueil@tela-botanica.org) |
|
6 |
// | Copyright (C) 1999-2006 Tela Botanica (accueil@tela-botanica.org) |
|
7 |
// +------------------------------------------------------------------------------------------------------+
|
7 |
// +------------------------------------------------------------------------------------------------------+
|
8 |
// | This file is part of papyrus_bp. |
|
8 |
// | This file is part of papyrus_bp. |
|
9 |
// | |
|
9 |
// | |
|
10 |
// | Foobar is free software; you can redistribute it and/or modify |
|
10 |
// | Foobar is free software; you can redistribute it and/or modify |
|
11 |
// | it under the terms of the GNU General Public License as published by |
|
11 |
// | it under the terms of the GNU General Public License as published by |
|
12 |
// | the Free Software Foundation; either version 2 of the License, or |
|
12 |
// | the Free Software Foundation; either version 2 of the License, or |
|
13 |
// | (at your option) any later version. |
|
13 |
// | (at your option) any later version. |
|
14 |
// | |
|
14 |
// | |
|
15 |
// | Foobar is distributed in the hope that it will be useful, |
|
15 |
// | Foobar is distributed in the hope that it will be useful, |
|
16 |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
17 |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
18 |
// | GNU General Public License for more details. |
|
18 |
// | GNU General Public License for more details. |
|
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: nouveaute.php,v 1.3 2006-12-13 09:27:42 jp_milcent Exp $
|
24 |
// CVS : $Id: nouveaute.php,v 1.3 2006-12-13 09:27:42 jp_milcent Exp $
|
25 |
/**
|
25 |
/**
|
26 |
* papyrus_bp - nouveaute.php
|
26 |
* papyrus_bp - nouveaute.php
|
27 |
*
|
27 |
*
|
28 |
* Description :
|
28 |
* Description :
|
29 |
*
|
29 |
*
|
30 |
*@package papyrus_bp
|
30 |
*@package papyrus_bp
|
31 |
//Auteur original :
|
31 |
//Auteur original :
|
32 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
32 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
33 |
//Autres auteurs :
|
33 |
//Autres auteurs :
|
34 |
*@author Aucun
|
34 |
*@author Aucun
|
35 |
*@copyright Tela-Botanica 1999-2006
|
35 |
*@copyright Tela-Botanica 1999-2006
|
36 |
*@version $Revision: 1.3 $ $Date: 2006-12-13 09:27:42 $
|
36 |
*@version $Revision: 1.3 $ $Date: 2006-12-13 09:27:42 $
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
37 |
// +------------------------------------------------------------------------------------------------------+
|
38 |
*/
|
38 |
*/
|
39 |
|
39 |
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
40 |
// +------------------------------------------------------------------------------------------------------+
|
41 |
// | ENTÊTE du PROGRAMME |
|
41 |
// | ENTÊTE du PROGRAMME |
|
42 |
// +------------------------------------------------------------------------------------------------------+
|
42 |
// +------------------------------------------------------------------------------------------------------+
|
43 |
$GLOBALS['_GEN_commun']['info_applette_nom_fonction'] = 'afficherNouveaute';
|
43 |
$GLOBALS['_GEN_commun']['info_applette_nom_fonction'] = 'afficherNouveaute';
|
44 |
$GLOBALS['_GEN_commun']['info_applette_balise'] = '\{\{[Nn]ouveaute'.
|
44 |
$GLOBALS['_GEN_commun']['info_applette_balise'] = '\{\{[Nn]ouveaute'.
|
45 |
'(?:\s*'.
|
45 |
'(?:\s*'.
|
46 |
'(?:'.
|
46 |
'(?:'.
|
47 |
'(nombre="[^"]+")|'.
|
47 |
'(nombre="[^"]+")|'.
|
48 |
'(categorie="[^"]+")|'.
|
48 |
'(categorie="[^"]+")|'.
|
49 |
'(type="[^"]+")|'.
|
49 |
'(type="[^"]+")|'.
|
50 |
'(site="[^"]+")|'.
|
50 |
'(site="[^"]+")|'.
|
51 |
')'.
|
51 |
')'.
|
52 |
')+'.
|
52 |
')+'.
|
53 |
'\s*\}\}';
|
53 |
'\s*\}\}';
|
54 |
|
54 |
|
55 |
// --------------------------------------------------------------------------------------------------------
|
55 |
// --------------------------------------------------------------------------------------------------------
|
56 |
/** Inclusion du fichier de configuration de cette application.*/
|
56 |
/** Inclusion du fichier de configuration de cette application.*/
|
57 |
require_once GEN_CHEMIN_APPLETTE.'nouveaute'.GEN_SEP.'configuration'.GEN_SEP.'nouv_configuration.inc.php';
|
57 |
require_once GEN_CHEMIN_APPLETTE.'nouveaute'.GEN_SEP.'configuration'.GEN_SEP.'nouv_configuration.inc.php';
|
58 |
|
58 |
|
59 |
// Inclusion des fichiers de traduction de l'applette NOUV de Papyrus
|
59 |
// Inclusion des fichiers de traduction de l'applette NOUV de Papyrus
|
60 |
if (file_exists(NOUV_CHEMIN_LANGUE.'nouv_langue_'.$GLOBALS['_GEN_commun']['i18n'].'.inc.php')) {
|
60 |
if (file_exists(NOUV_CHEMIN_LANGUE.'nouv_langue_'.$GLOBALS['_GEN_commun']['i18n'].'.inc.php')) {
|
61 |
/** Inclusion du fichier de traduction suite à la transaction avec le navigateur.*/
|
61 |
/** Inclusion du fichier de traduction suite à la transaction avec le navigateur.*/
|
62 |
require_once NOUV_CHEMIN_LANGUE.'nouv_langue_'.$GLOBALS['_GEN_commun']['i18n'].'.inc.php';
|
62 |
require_once NOUV_CHEMIN_LANGUE.'nouv_langue_'.$GLOBALS['_GEN_commun']['i18n'].'.inc.php';
|
63 |
} else {
|
63 |
} else {
|
64 |
/** Inclusion du fichier de traduction par défaut.*/
|
64 |
/** Inclusion du fichier de traduction par défaut.*/
|
65 |
require_once NOUV_CHEMIN_LANGUE.'nouv_langue_'.NOUV_I18N_DEFAUT.'.inc.php';
|
65 |
require_once NOUV_CHEMIN_LANGUE.'nouv_langue_'.NOUV_I18N_DEFAUT.'.inc.php';
|
66 |
}
|
66 |
}
|
67 |
|
67 |
|
68 |
// +------------------------------------------------------------------------------------------------------+
|
68 |
// +------------------------------------------------------------------------------------------------------+
|
69 |
// | CORPS du PROGRAMME |
|
69 |
// | CORPS du PROGRAMME |
|
70 |
// +------------------------------------------------------------------------------------------------------+
|
70 |
// +------------------------------------------------------------------------------------------------------+
|
71 |
/** Fonction afficherNouveaute() - Retourne la liste des pages modifiées récement.
|
71 |
/** Fonction afficherNouveaute() - Retourne la liste des pages modifiées récement.
|
72 |
*
|
72 |
*
|
73 |
* Cette fonction retourne la liste des pages modifiées récement.
|
73 |
* Cette fonction retourne la liste des pages modifiées récement.
|
74 |
*
|
74 |
*
|
75 |
* @param array contient les arguments de la fonction.
|
75 |
* @param array contient les arguments de la fonction.
|
76 |
* @param array tableau global de Papyrus.
|
76 |
* @param array tableau global de Papyrus.
|
77 |
* @return string HTML la liste de menus.
|
77 |
* @return string HTML la liste de menus.
|
78 |
*/
|
78 |
*/
|
79 |
function afficherNouveaute($tab_applette_arguments, $_GEN_commun)
|
79 |
function afficherNouveaute($tab_applette_arguments, $_GEN_commun)
|
80 |
{
|
80 |
{
|
81 |
// Initialisation des variables
|
81 |
// Initialisation des variables
|
82 |
$sortie = '';
|
82 |
$sortie = '';
|
83 |
$GLOBALS['_NOUVEAUTE_']['erreurs'] = array();
|
83 |
$GLOBALS['_NOUVEAUTE_']['erreurs'] = array();
|
84 |
$GLOBALS['_NOUVEAUTE_']['informations'] = array();
|
84 |
$GLOBALS['_NOUVEAUTE_']['informations'] = array();
|
85 |
$GLOBALS['_NOUVEAUTE_']['pages'] = array();
|
85 |
$GLOBALS['_NOUVEAUTE_']['pages'] = array();
|
86 |
|
86 |
|
87 |
//+----------------------------------------------------------------------------------------------------------------+
|
87 |
//+----------------------------------------------------------------------------------------------------------------+
|
88 |
// Gestion des arguments
|
88 |
// Gestion des arguments
|
89 |
$balise = $tab_applette_arguments[0];
|
89 |
$balise = $tab_applette_arguments[0];
|
90 |
$tab_arguments = $tab_applette_arguments;
|
90 |
$tab_arguments = $tab_applette_arguments;
|
91 |
unset($tab_arguments[0]);
|
91 |
unset($tab_arguments[0]);
|
92 |
foreach($tab_arguments as $argument) {
|
92 |
foreach($tab_arguments as $argument) {
|
93 |
if ($argument != '') {
|
93 |
if ($argument != '') {
|
94 |
$tab_parametres = explode('=', $argument);
|
94 |
$tab_parametres = explode('=', $argument);
|
95 |
$options[$tab_parametres[0]] = trim($tab_parametres[1], '"');
|
95 |
$options[$tab_parametres[0]] = trim($tab_parametres[1], '"');
|
96 |
}
|
96 |
}
|
97 |
}
|
97 |
}
|
98 |
|
98 |
|
99 |
//+----------------------------------------------------------------------------------------------------------------+
|
99 |
//+----------------------------------------------------------------------------------------------------------------+
|
100 |
// Gestion des erreurs de paramètrage
|
100 |
// Gestion des erreurs de paramètrage
|
101 |
if (!isset($options['nombre'])) {
|
101 |
if (!isset($options['nombre'])) {
|
102 |
$GLOBALS['_NOUVEAUTE_']['erreurs'][] = sprintf(NOUV_LG_ERREUR_NOMBRE, $balise);
|
102 |
$GLOBALS['_NOUVEAUTE_']['erreurs'][] = sprintf(NOUV_LG_ERREUR_NOMBRE, $balise);
|
103 |
}
|
103 |
}
|
104 |
if (!isset($options['type'])) {
|
104 |
if (!isset($options['type'])) {
|
105 |
$options['type'] = '';
|
105 |
$options['type'] = '';
|
106 |
}
|
106 |
}
|
107 |
if (isset($options['type']) && $options['type'] != '' && $options['type'] != 'mineure' && $options['type'] != 'majeure') {
|
107 |
if (isset($options['type']) && $options['type'] != '' && $options['type'] != 'mineure' && $options['type'] != 'majeure') {
|
108 |
$GLOBALS['_NOUVEAUTE_']['erreurs'][] = sprintf(NOUV_LG_ERREUR_TYPE, $balise);
|
108 |
$GLOBALS['_NOUVEAUTE_']['erreurs'][] = sprintf(NOUV_LG_ERREUR_TYPE, $balise);
|
109 |
} else {
|
109 |
} else {
|
110 |
if ($options['type'] == 'mineure') {
|
110 |
if ($options['type'] == 'mineure') {
|
111 |
$options['type'] = 1;
|
111 |
$options['type'] = 1;
|
112 |
} else if ($options['type'] == 'majeure') {
|
112 |
} else if ($options['type'] == 'majeure') {
|
113 |
$options['type'] = 2;
|
113 |
$options['type'] = 2;
|
114 |
}
|
114 |
}
|
115 |
}
|
115 |
}
|
116 |
if (!isset($options['site'])) {
|
116 |
if (!isset($options['site'])) {
|
117 |
$options['site'] = '';
|
117 |
$options['site'] = '';
|
118 |
}
|
118 |
}
|
119 |
if (!isset($options['categorie'])) {
|
119 |
if (!isset($options['categorie'])) {
|
120 |
$options['categorie'] = '';
|
120 |
$options['categorie'] = '';
|
121 |
}
|
121 |
}
|
122 |
|
122 |
|
123 |
//+----------------------------------------------------------------------------------------------------------------+
|
123 |
//+----------------------------------------------------------------------------------------------------------------+
|
124 |
// Récupération des données
|
124 |
// Récupération des données
|
125 |
if (count($GLOBALS['_NOUVEAUTE_']['erreurs']) == 0) {
|
125 |
if (count($GLOBALS['_NOUVEAUTE_']['erreurs']) == 0) {
|
126 |
$aso_info_menu = GEN_lireInfoMenuContenuDate($GLOBALS['_GEN_commun']['pear_db'], $options['type'], $options['site'], $options['categorie']);
|
126 |
$aso_info_menu = GEN_lireInfoMenuContenuDate($GLOBALS['_GEN_commun']['pear_db'], $options['type'], $options['site'], $options['categorie']);
|
127 |
if (count($aso_info_menu) == 0) {
|
127 |
if (count($aso_info_menu) == 0) {
|
128 |
$GLOBALS['_NOUVEAUTE_']['informations'][] = sprintf(NOUV_LG_INFO_ZERO_PAGE, $options['mots']);
|
128 |
$GLOBALS['_NOUVEAUTE_']['informations'][] = sprintf(NOUV_LG_INFO_ZERO_PAGE, $options['mots']);
|
129 |
} else {
|
129 |
} else {
|
130 |
$i = 0;
|
130 |
$i = 0;
|
131 |
foreach ($aso_info_menu as $id_menu => $un_menu) {
|
131 |
foreach ($aso_info_menu as $id_menu => $un_menu) {
|
132 |
// On stope l'affichage si le nombre de nouveauté demandé est atteint.
|
132 |
// On stope l'affichage si le nombre de nouveauté demandé est atteint.
|
133 |
if ($i == $options['nombre']) {
|
133 |
if ($i == $options['nombre']) {
|
134 |
break;
|
134 |
break;
|
135 |
} else {
|
135 |
} else {
|
136 |
$i++;
|
136 |
$i++;
|
137 |
}
|
137 |
}
|
138 |
|
138 |
|
139 |
// Initialisation
|
139 |
// Initialisation
|
140 |
$aso_page = array();
|
140 |
$aso_page = array();
|
141 |
$aso_page['url'] = NOUV_LG_INCONNU_URL;
|
141 |
$aso_page['url'] = NOUV_LG_INCONNU_URL;
|
142 |
$aso_page['auteur'] = NOUV_LG_INCONNU_AUTEUR;
|
142 |
$aso_page['auteur'] = NOUV_LG_INCONNU_AUTEUR;
|
143 |
$aso_page['contributeur'] = NOUV_LG_INCONNU_GENERAL;
|
143 |
$aso_page['contributeur'] = NOUV_LG_INCONNU_GENERAL;
|
144 |
$aso_page['titre'] = NOUV_LG_INCONNU_TITRE;
|
144 |
$aso_page['titre'] = NOUV_LG_INCONNU_TITRE;
|
145 |
$aso_page['heure'] = NOUV_LG_INCONNU_GENERAL;
|
145 |
$aso_page['heure'] = NOUV_LG_INCONNU_GENERAL;
|
146 |
$aso_page['minute'] = NOUV_LG_INCONNU_GENERAL;
|
146 |
$aso_page['minute'] = NOUV_LG_INCONNU_GENERAL;
|
147 |
$aso_page['seconde'] = NOUV_LG_INCONNU_GENERAL;
|
147 |
$aso_page['seconde'] = NOUV_LG_INCONNU_GENERAL;
|
148 |
$aso_page['jours'] = NOUV_LG_INCONNU_GENERAL;
|
148 |
$aso_page['jours'] = NOUV_LG_INCONNU_GENERAL;
|
149 |
$aso_page['mois'] = NOUV_LG_INCONNU_GENERAL;
|
149 |
$aso_page['mois'] = NOUV_LG_INCONNU_GENERAL;
|
150 |
$aso_page['annee'] = NOUV_LG_INCONNU_GENERAL;
|
150 |
$aso_page['annee'] = NOUV_LG_INCONNU_GENERAL;
|
151 |
$aso_page['description'] = NOUV_LG_INCONNU_GENERAL;
|
151 |
$aso_page['description'] = NOUV_LG_INCONNU_GENERAL;
|
152 |
$aso_page['resumer'] = NOUV_LG_INCONNU_GENERAL;
|
152 |
$aso_page['resumer'] = NOUV_LG_INCONNU_GENERAL;
|
153 |
|
153 |
|
154 |
// Création de l'url
|
154 |
// Création de l'url
|
155 |
$une_url =& new Pap_URL();
|
155 |
$une_url =& new Pap_URL();
|
156 |
$une_url->setId($id_menu);
|
156 |
$une_url->setId($id_menu);
|
157 |
$aso_page['url'] = $une_url->getURL();
|
157 |
$aso_page['url'] = $une_url->getURL();
|
158 |
|
158 |
|
159 |
// Affichage du type de modification de la page
|
159 |
// Affichage du type de modification de la page
|
160 |
if ($un_menu->gmc_ce_type_modification = 1) {
|
160 |
if ($un_menu->gmc_ce_type_modification = 1) {
|
161 |
$aso_page['type'] = 'mineure';
|
161 |
$aso_page['type'] = 'mineure';
|
162 |
} elseif ($un_menu->gmc_ce_type_modification = 2) {
|
162 |
} elseif ($un_menu->gmc_ce_type_modification = 2) {
|
163 |
$aso_page['type'] = 'majeure';
|
163 |
$aso_page['type'] = 'majeure';
|
164 |
}
|
164 |
}
|
165 |
|
165 |
|
166 |
// Affichage de l'auteur(s)
|
166 |
// Affichage de l'auteur(s)
|
167 |
if ($un_menu->gm_auteur != '') {
|
167 |
if ($un_menu->gm_auteur != '') {
|
168 |
$aso_page['auteur'] = $un_menu->gm_auteur;
|
168 |
$aso_page['auteur'] = $un_menu->gm_auteur;
|
169 |
}
|
169 |
}
|
170 |
|
170 |
|
171 |
// Affichage des contributeur(s)
|
171 |
// Affichage des contributeur(s)
|
172 |
if (!empty($un_menu->gm_contributeur)) {
|
172 |
if (!empty($un_menu->gm_contributeur)) {
|
173 |
$sortie .= '<dt class="page_contributeur"> Contributeur(s) : '.'</dt>'."\n";
|
173 |
$sortie .= '<dt class="page_contributeur"> Contributeur(s) : '.'</dt>'."\n";
|
174 |
$sortie .= '<dd>'.$un_menu->gm_contributeur.'</dd>'."\n";
|
174 |
$sortie .= '<dd>'.$un_menu->gm_contributeur.'</dd>'."\n";
|
175 |
$aso_page['contributeur'] = $un_menu->gm_contributeur;
|
175 |
$aso_page['contributeur'] = $un_menu->gm_contributeur;
|
176 |
}
|
176 |
}
|
177 |
|
177 |
|
178 |
// Affichage du titre
|
178 |
// Affichage du titre
|
179 |
if (!empty($un_menu->gm_titre)) {
|
179 |
if (!empty($un_menu->gm_titre)) {
|
180 |
$aso_page['titre'] = $un_menu->gm_titre;
|
180 |
$aso_page['titre'] = $un_menu->gm_titre;
|
181 |
} elseif (!empty($un_menu->gm_titre_alternatif)) {
|
181 |
} elseif (!empty($un_menu->gm_titre_alternatif)) {
|
182 |
$aso_page['titre'] = $un_menu->gm_titre_alternatif;
|
182 |
$aso_page['titre'] = $un_menu->gm_titre_alternatif;
|
183 |
} else {
|
183 |
} else {
|
184 |
$aso_page['titre'] = $un_menu->gm_nom;
|
184 |
$aso_page['titre'] = $un_menu->gm_nom;
|
185 |
}
|
185 |
}
|
186 |
|
186 |
|
187 |
// Affichage de l'horaire de la création de la page
|
187 |
// Affichage de l'horaire de la création de la page
|
188 |
if (($heure = date('G', strtotime($un_menu->gm_date_creation)) ) != 0 ) {
|
188 |
if (($heure = date('G', strtotime($un_menu->gm_date_creation)) ) != 0 ) {
|
189 |
$aso_page['heure'] = $heure;
|
189 |
$aso_page['heure'] = $heure;
|
190 |
$minute = date('i', strtotime($un_menu->gm_date_creation));
|
190 |
$minute = date('i', strtotime($un_menu->gm_date_creation));
|
191 |
$aso_page['minute'] = $minute;
|
191 |
$aso_page['minute'] = $minute;
|
192 |
if (($seconde = date('s', strtotime($un_menu->gm_date_creation)) ) != 0 ) {
|
192 |
if (($seconde = date('s', strtotime($un_menu->gm_date_creation)) ) != 0 ) {
|
193 |
$aso_page['seconde'] = $seconde;
|
193 |
$aso_page['seconde'] = $seconde;
|
194 |
}
|
194 |
}
|
195 |
}
|
195 |
}
|
196 |
|
196 |
|
197 |
// Affichage de la date de la création de la page
|
197 |
// Affichage de la date de la création de la page
|
198 |
if (($jour = date('d', strtotime($un_menu->gm_date_creation)) ) != 0 ) {
|
198 |
if (($jour = date('d', strtotime($un_menu->gm_date_creation)) ) != 0 ) {
|
199 |
$aso_page['jour'] = $jour;
|
199 |
$aso_page['jour'] = $jour;
|
200 |
}
|
200 |
}
|
201 |
if (($mois = _traduireMois(date('m', strtotime($un_menu->gm_date_creation))) ) != '' ) {
|
201 |
if (($mois = _traduireMois(date('m', strtotime($un_menu->gm_date_creation))) ) != '' ) {
|
202 |
$aso_page['mois'] = $mois;
|
202 |
$aso_page['mois'] = $mois;
|
203 |
}
|
203 |
}
|
204 |
if (($annee = date('Y', strtotime($un_menu->gm_date_creation)) ) != 0 ) {
|
204 |
if (($annee = date('Y', strtotime($un_menu->gm_date_creation)) ) != 0 ) {
|
205 |
$aso_page['annee'] = $annee;
|
205 |
$aso_page['annee'] = $annee;
|
206 |
}
|
206 |
}
|
207 |
|
207 |
|
208 |
// Affichage de la description
|
208 |
// Affichage de la description
|
209 |
if (!empty($un_menu->gm_description_libre)) {
|
209 |
if (!empty($un_menu->gm_description_libre)) {
|
210 |
$aso_page['decription'] = $un_menu->gm_description_libre;
|
210 |
$aso_page['decription'] = $un_menu->gm_description_libre;
|
211 |
}
|
211 |
}
|
212 |
|
212 |
|
213 |
// Affichage du résumé de la modification
|
213 |
// Affichage du résumé de la modification
|
214 |
if (!empty($un_menu->gmc_resume_modification)) {
|
214 |
if (!empty($un_menu->gmc_resume_modification)) {
|
215 |
$aso_page['resumer'] = $un_menu->gmc_resume_modification;
|
215 |
$aso_page['resumer'] = $un_menu->gmc_resume_modification;
|
216 |
}
|
216 |
}
|
217 |
|
217 |
|
218 |
$GLOBALS['_NOUVEAUTE_']['pages'][] = $aso_page;
|
218 |
$GLOBALS['_NOUVEAUTE_']['pages'][] = $aso_page;
|
219 |
}
|
219 |
}
|
220 |
}
|
220 |
}
|
221 |
}
|
221 |
}
|
222 |
|
222 |
|
223 |
//+----------------------------------------------------------------------------------------------------------------+
|
223 |
//+----------------------------------------------------------------------------------------------------------------+
|
224 |
// Extrait les variables et les ajoutes à l'espace de noms local
|
224 |
// Extrait les variables et les ajoutes à l'espace de noms local
|
225 |
// Gestion des squelettes
|
225 |
// Gestion des squelettes
|
226 |
extract($GLOBALS['_NOUVEAUTE_']);
|
226 |
extract($GLOBALS['_NOUVEAUTE_']);
|
227 |
// Démarre le buffer
|
227 |
// Démarre le buffer
|
228 |
ob_start();
|
228 |
ob_start();
|
229 |
// Inclusion du fichier
|
229 |
// Inclusion du fichier
|
230 |
include(NOUV_CHEMIN_SQUELETTE.NOUV_SQUELETTE_LISTE);
|
230 |
include(NOUV_CHEMIN_SQUELETTE.NOUV_SQUELETTE_LISTE);
|
231 |
// Récupérer le contenu du buffer
|
231 |
// Récupérer le contenu du buffer
|
232 |
$sortie = ob_get_contents();
|
232 |
$sortie = ob_get_contents();
|
233 |
// Arrête et détruit le buffer
|
233 |
// Arrête et détruit le buffer
|
234 |
ob_end_clean();
|
234 |
ob_end_clean();
|
235 |
|
235 |
|
236 |
//+----------------------------------------------------------------------------------------------------------------+
|
236 |
//+----------------------------------------------------------------------------------------------------------------+
|
237 |
// Sortie
|
237 |
// Sortie
|
238 |
return $sortie;
|
238 |
return $sortie;
|
239 |
}
|
239 |
}
|
240 |
|
240 |
|
241 |
if (!function_exists('_traduireMois')) {
|
241 |
if (!function_exists('_traduireMois')) {
|
242 |
function _traduireMois($mois_numerique)
|
242 |
function _traduireMois($mois_numerique)
|
243 |
{
|
243 |
{
|
244 |
switch ($mois_numerique) {
|
244 |
switch ($mois_numerique) {
|
245 |
case '01' :
|
245 |
case '01' :
|
246 |
return NOUV_LG_MOIS_01;
|
246 |
return NOUV_LG_MOIS_01;
|
247 |
case '02' :
|
247 |
case '02' :
|
248 |
return NOUV_LG_MOIS_02;
|
248 |
return NOUV_LG_MOIS_02;
|
249 |
case '03' :
|
249 |
case '03' :
|
250 |
return NOUV_LG_MOIS_03;
|
250 |
return NOUV_LG_MOIS_03;
|
251 |
case '04' :
|
251 |
case '04' :
|
252 |
return NOUV_LG_MOIS_04;
|
252 |
return NOUV_LG_MOIS_04;
|
253 |
case '05' :
|
253 |
case '05' :
|
254 |
return NOUV_LG_MOIS_05;
|
254 |
return NOUV_LG_MOIS_05;
|
255 |
case '06' :
|
255 |
case '06' :
|
256 |
return NOUV_LG_MOIS_06;
|
256 |
return NOUV_LG_MOIS_06;
|
257 |
case '07' :
|
257 |
case '07' :
|
258 |
return NOUV_LG_MOIS_07;
|
258 |
return NOUV_LG_MOIS_07;
|
259 |
case '08' :
|
259 |
case '08' :
|
260 |
return NOUV_LG_MOIS_08;
|
260 |
return NOUV_LG_MOIS_08;
|
261 |
case '09' :
|
261 |
case '09' :
|
262 |
return NOUV_LG_MOIS_09;
|
262 |
return NOUV_LG_MOIS_09;
|
263 |
case '10' :
|
263 |
case '10' :
|
264 |
return NOUV_LG_MOIS_10;
|
264 |
return NOUV_LG_MOIS_10;
|
265 |
case '11' :
|
265 |
case '11' :
|
266 |
return NOUV_LG_MOIS_11;
|
266 |
return NOUV_LG_MOIS_11;
|
267 |
case '12' :
|
267 |
case '12' :
|
268 |
return NOUV_LG_MOIS_12;
|
268 |
return NOUV_LG_MOIS_12;
|
269 |
default:
|
269 |
default:
|
270 |
return '';
|
270 |
return '';
|
271 |
}
|
271 |
}
|
272 |
}
|
272 |
}
|
273 |
}
|
273 |
}
|
274 |
|
274 |
|
275 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
275 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
276 |
*
|
276 |
*
|
277 |
* $Log: not supported by cvs2svn $
|
277 |
* $Log: nouveaute.php,v $
|
- |
|
278 |
* Revision 1.3 2006-12-13 09:27:42 jp_milcent
|
- |
|
279 |
* Ajout d'une valeur pour l'url vide.
|
- |
|
280 |
*
|
278 |
* Revision 1.2 2006/12/13 09:26:44 jp_milcent
|
281 |
* Revision 1.2 2006/12/13 09:26:44 jp_milcent
|
279 |
* Ajout d'une valeur pour les champs vides.
|
282 |
* Ajout d'une valeur pour les champs vides.
|
280 |
*
|
283 |
*
|
281 |
* Revision 1.1 2006/12/12 17:16:22 jp_milcent
|
284 |
* Revision 1.1 2006/12/12 17:16:22 jp_milcent
|
282 |
* Ajout de l'applette Nouveaute.
|
285 |
* Ajout de l'applette Nouveaute.
|
283 |
*
|
286 |
*
|
284 |
*
|
287 |
*
|
285 |
* +-- Fin du code ----------------------------------------------------------------------------------------+
|
288 |
* +-- Fin du code ----------------------------------------------------------------------------------------+
|
286 |
*/
|
289 |
*/
|
287 |
?>
|
290 |
?>
|