Line 17... |
Line 17... |
17 |
// | |
|
17 |
// | |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
18 |
// | You should have received a copy of the GNU Lesser General Public |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
19 |
// | License along with this library; if not, write to the Free Software |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
20 |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
21 |
// +------------------------------------------------------------------------------------------------------+
|
22 |
// CVS : $Id: menu.php,v 1.2 2004-06-25 08:32:02 alex Exp $
|
22 |
// CVS : $Id: menu.php,v 1.3 2004-07-23 11:21:25 alex Exp $
|
23 |
/**
|
23 |
/**
|
24 |
* Applette : menu
|
24 |
* Applette : menu
|
25 |
*
|
25 |
*
|
26 |
* Génère une liste de listes comportant tous les niveaux des menus "classiques" d'un site.
|
26 |
* Génère une liste de listes comportant tous les niveaux des menus "classiques" d'un site.
|
27 |
* Nécessite :
|
27 |
* Nécessite :
|
Line 36... |
Line 36... |
36 |
//Auteur original :
|
36 |
//Auteur original :
|
37 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
37 |
*@author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
38 |
//Autres auteurs :
|
38 |
//Autres auteurs :
|
39 |
*@author Aucun
|
39 |
*@author Aucun
|
40 |
*@copyright Tela-Botanica 2000-2004
|
40 |
*@copyright Tela-Botanica 2000-2004
|
41 |
*@version $Revision: 1.2 $ $Date: 2004-06-25 08:32:02 $
|
41 |
*@version $Revision: 1.3 $ $Date: 2004-07-23 11:21:25 $
|
42 |
// +------------------------------------------------------------------------------------------------------+
|
42 |
// +------------------------------------------------------------------------------------------------------+
|
43 |
*/
|
43 |
*/
|
Line 44... |
Line 44... |
44 |
|
44 |
|
45 |
// +------------------------------------------------------------------------------------------------------+
|
45 |
// +------------------------------------------------------------------------------------------------------+
|
46 |
// | ENTÊTE du PROGRAMME |
|
46 |
// | ENTÊTE du PROGRAMME |
|
- |
|
47 |
// +------------------------------------------------------------------------------------------------------+
|
- |
|
48 |
|
- |
|
49 |
require_once "papyrus/bibliotheque/fonctions/pap_menu.fonct.php" ;
|
47 |
// +------------------------------------------------------------------------------------------------------+
|
50 |
|
48 |
$_GEN_commun['info_applette_nom_fonction'] = 'afficherMenuNiveauMultiple';
|
51 |
$_GEN_commun['info_applette_nom_fonction'] = 'afficherMenuNiveauMultiple';
|
Line 49... |
Line 52... |
49 |
$_GEN_commun['info_applette_balise'] = 'MENU_([0-9])_([0-9])';
|
52 |
$_GEN_commun['info_applette_balise'] = 'MENU_([0-9])_([0-9])';
|
50 |
|
53 |
|
Line 183... |
Line 186... |
183 |
$resultat_fils = $objet_pear_db->query($requete_fils);
|
186 |
$resultat_fils = $objet_pear_db->query($requete_fils);
|
184 |
(DB::isError($resultat_fils))
|
187 |
(DB::isError($resultat_fils))
|
185 |
? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat_fils->getMessage(), $requete_fils))
|
188 |
? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat_fils->getMessage(), $requete_fils))
|
186 |
: '';
|
189 |
: '';
|
Line 187... |
Line 190... |
187 |
|
190 |
|
- |
|
191 |
if ($resultat_fils->numRows() != 0 && $ligne->gm_id_menu == $GLOBALS['_GEN_commun']['info_menu']->gm_id_menu
|
Line 188... |
Line 192... |
188 |
if ($resultat_fils->numRows() != 0) {
|
192 |
|| GEN_etreAncetre($ligne->gm_id_menu, $GLOBALS['_GEN_commun']['info_menu']->gm_id_menu)) {
|
189 |
|
193 |
|
190 |
$niveau_actuel++;
|
194 |
$niveau_actuel++;
|
191 |
$res .= afficherListeNiveauMultiple($objet_pear_db, $id_site, $id_langue, $i18n_url, $niveau_depart, $profondeur, $ligne->gm_id_menu);
|
195 |
$res .= afficherListeNiveauMultiple($objet_pear_db, $id_site, $id_langue, $i18n_url, $niveau_depart, $profondeur, $ligne->gm_id_menu);
|
Line 243... |
Line 247... |
243 |
$objet_pear_url->addQueryString(GEN_URL_CLE_MENU, $ligne[$champs_code_menu]);
|
247 |
$objet_pear_url->addQueryString(GEN_URL_CLE_MENU, $ligne[$champs_code_menu]);
|
244 |
if (!empty($i18n_url)) {
|
248 |
if (!empty($i18n_url)) {
|
245 |
$objet_pear_url->addQueryString(GEN_URL_CLE_I18N, $i18n_url);
|
249 |
$objet_pear_url->addQueryString(GEN_URL_CLE_I18N, $i18n_url);
|
246 |
}
|
250 |
}
|
247 |
$url = $objet_pear_url->getURL();
|
251 |
$url = $objet_pear_url->getURL();
|
248 |
|
- |
|
- |
|
252 |
//if ($niveau == 1) $url = "#" ;
|
249 |
// On vérifie si le menu est le menu sélectionné
|
253 |
// On vérifie si le menu est le menu sélectionné
|
250 |
if (isset ($GLOBALS[GEN_URL_CLE_MENU]) && $id_menu == $GLOBALS[GEN_URL_CLE_MENU]) {
|
254 |
if (isset ($GLOBALS[GEN_URL_CLE_MENU]) && $id_menu == $GLOBALS[GEN_URL_CLE_MENU]) {
|
251 |
$classe = 'm_select' ;
|
255 |
$classe = 'm_select' ;
|
252 |
} else {
|
256 |
} else {
|
253 |
$classe = 'm_non_select' ;
|
257 |
$classe = 'm_non_select' ;
|
254 |
}
|
258 |
}
|
Line 255... |
Line 259... |
255 |
|
259 |
|
256 |
//Création d'une entrée dans la liste du menu
|
260 |
//Création d'une entrée dans la liste du menu
|
257 |
$lien_menu = '<a href="'.$url.'" title="'.$menu_texte_title.'">'.$menu_nom.'</a>'."\n";
|
261 |
$lien_menu = '<a href="'.$url.'" title="'.$menu_texte_title.'">'.$menu_nom.'</a>'."\n";
|
258 |
$retour = str_repeat(' ', $indent_origine + ($indent_pas * 2));
|
262 |
$retour = str_repeat(' ', $indent_origine + ($indent_pas * 2));
|
Line 259... |
Line 263... |
259 |
$retour .= '<li id="menu_'.$id_menu.'" class="'.$classe.'" onclick="javascript:montre(this);">'.$lien_menu.'</li>'."\n";
|
263 |
$retour .= '<li id="menu_'.$id_menu.'" class="'.$classe.'">'.$lien_menu.'</li>'."\n";
|
260 |
|
264 |
|
Line 261... |
Line 265... |
261 |
return $retour;
|
265 |
return $retour;
|
Line 267... |
Line 271... |
267 |
|
271 |
|
268 |
|
272 |
|
269 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
273 |
/* +--Fin du code ----------------------------------------------------------------------------------------+
|
- |
|
274 |
*
|
- |
|
275 |
* $Log: not supported by cvs2svn $
|
- |
|
276 |
* Revision 1.2 2004/06/25 08:32:02 alex
|
270 |
*
|
277 |
* modification des styles
|
271 |
* $Log: not supported by cvs2svn $
|
278 |
*
|
272 |
* Revision 1.1 2004/06/15 15:04:14 jpm
|
279 |
* Revision 1.1 2004/06/15 15:04:14 jpm
|
273 |
* Changement de nom et d'arborescence de Genesia en Papyrus.
|
280 |
* Changement de nom et d'arborescence de Genesia en Papyrus.
|
274 |
*
|
281 |
*
|