Subversion Repositories Applications.papyrus

Compare Revisions

Ignore whitespace Rev 443 → Rev 448

/trunk/papyrus/applettes/menu/menu.php
19,7 → 19,7
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: menu.php,v 1.20 2005-05-27 14:56:51 alex Exp $
// CVS : $Id: menu.php,v 1.21 2005-09-22 14:02:49 ddelon Exp $
/**
* Applette : menu
*
38,7 → 38,7
//Autres auteurs :
*@author Aucun
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.20 $ $Date: 2005-05-27 14:56:51 $
*@version $Revision: 1.21 $ $Date: 2005-09-22 14:02:49 $
// +------------------------------------------------------------------------------------------------------+
*/
 
75,7 → 75,9
// Initialisation de variable.
$objet_pear_db = $_GEN_commun['pear_db'];
$id_site = $_GEN_commun['info_site']->gs_id_site;
$id_menu = $_GEN_commun['info_menu']->gm_id_menu;
if (isset($_GEN_commun['info_menu'])) {
$id_menu = $_GEN_commun['info_menu']->gm_id_menu;
}
$num_menu = $GLOBALS['_PAPYRUS_']['applette']['comptage'][$GLOBALS['_MENU_']['nom_fonction']];
$id_langue = $_GEN_commun['i18n'];
$i18n_url = '';// Evite d'écrire l'i18n dans l'url demandée.
300,18 → 302,19
(DB::isError($resultat_fils))
? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat_fils->getMessage(), $requete_fils))
: '';
if ($resultat_fils->numRows() != 0 && $ligne->gm_id_menu == $GLOBALS['_GEN_commun']['info_menu']->gm_id_menu
|| GEN_etreAncetre($ligne->gm_id_menu, $GLOBALS['_GEN_commun']['info_menu']->gm_id_menu) || $menu_type == 'deroulant') {
$niveau_actuel++;
$corps .= afficherListeNiveauMultiple( $objet_pear_db, $id_site, $id_langue, $i18n_url, $niveau_depart,
$profondeur, $ligne->gm_id_menu, ($position + 3), $menu_type,
null, null, $_GEN_commun, $num_menu);
// On ramène $niveau_actuel un cran plus bas
$niveau_actuel--;
}
if (isset($_GEN_commun['info_menu'])) {
if ($resultat_fils->numRows() != 0 && $ligne->gm_id_menu == $GLOBALS['_GEN_commun']['info_menu']->gm_id_menu
|| GEN_etreAncetre($ligne->gm_id_menu, $GLOBALS['_GEN_commun']['info_menu']->gm_id_menu) || $menu_type == 'deroulant') {
$niveau_actuel++;
$corps .= afficherListeNiveauMultiple( $objet_pear_db, $id_site, $id_langue, $i18n_url, $niveau_depart,
$profondeur, $ligne->gm_id_menu, ($position + 3), $menu_type,
null, null, $_GEN_commun, $num_menu);
// On ramène $niveau_actuel un cran plus bas
$niveau_actuel--;
}
}
if ($niveau_actuel >= $niveau_depart && $niveau_actuel <= $profondeur) {
$corps .= str_repeat(' ', $indent_origine + ($indent_pas * ($position + 2))).'</li>'."\n";
}
388,6 → 391,9
/* +--Fin du code ----------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.20 2005/05/27 14:56:51 alex
* correction de bug d'affichage des menus communs
*
* Revision 1.19 2005/05/27 10:23:00 jpm
* Modification du style des raccourcis.
*
/trunk/papyrus/pap_initialise_info.inc.php
21,7 → 21,7
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// | |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: pap_initialise_info.inc.php,v 1.22 2005-09-20 17:01:22 ddelon Exp $
// CVS : $Id: pap_initialise_info.inc.php,v 1.23 2005-09-22 14:02:49 ddelon Exp $
/**
*Initialisation de Papyrus : vérification et récupération de paramètres généraux.
*
41,7 → 41,7
*@author Alexandre GRANIER <alex@tela-botanica.org>
*@author Laurent COUDOUNEAU <laurent.coudouneau@ema.fr>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.22 $ $Date: 2005-09-20 17:01:22 $
*@version $Revision: 1.23 $ $Date: 2005-09-22 14:02:49 $
// +------------------------------------------------------------------------------------------------------+
*/
 
308,14 → 308,19
// Nous avons trouvé un menu "défaut" pour le site courant.
$_GEN_commun['info_menu'] = $resultat->fetchRow(DB_FETCHMODE_OBJECT);
$resultat->free();
// Stockage du code du menu demandée dans la variable globale de Papyrus.
if (GEN_URL_ID_TYPE_MENU == 'int') {
$_GEN_commun['url_menu'] = $_GEN_commun['info_menu']->gm_code_num;
} else {
$_GEN_commun['url_menu'] = $_GEN_commun['info_menu']->gm_code_alpha;
if (isset($_GEN_commun['url_menu'])) {
// Stockage du code du menu demandée dans la variable globale de Papyrus.
if (GEN_URL_ID_TYPE_MENU == 'int') {
$_GEN_commun['url_menu'] = $_GEN_commun['info_menu']->gm_code_num;
} else {
$_GEN_commun['url_menu'] = $_GEN_commun['info_menu']->gm_code_alpha;
}
}
} else if (! isset($_GET['url_menu']) && empty($_GEN_commun['url_menu'])) {
}
 
else
if (! isset($_GET['url_menu']) && empty($_GEN_commun['url_menu'])) {
// Le code du menu est présent dans l'url et il n'a pas encore été récupéré
// Nous le récupérons dans la variable globale de Papyrus.
$_GEN_commun['url_menu'] = $_GET[GEN_URL_CLE_MENU];
362,7 → 367,7
 
// Si le résultat de la négociation de l'internationalisation donne une langue différente
// de celle du menu, nous récupérons les éventuelles valeurs traduite pour le menu.
if ($_GEN_commun['i18n'] != $_GEN_commun['info_menu']->gm_ce_i18n) {
if ((isset($_GEN_commun['info_menu'])) && ($_GEN_commun['i18n'] != $_GEN_commun['info_menu']->gm_ce_i18n)) {
// Récupération des informations sur la traduction du menu
$requete = 'SELECT * '.
'FROM gen_menu '.
495,6 → 500,9
 
/* +--Fin du code ---------------------------------------------------------------------------------------+
* $Log: not supported by cvs2svn $
* Revision 1.22 2005/09/20 17:01:22 ddelon
* php5 et bugs divers
*
* Revision 1.21 2005/08/31 17:34:52 ddelon
* Integrateur Wikini et administration des Wikini
*
/trunk/papyrus/pap_rendu.inc.php
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.17 2005-09-20 17:01:22 ddelon Exp $
// CVS : $Id: pap_rendu.inc.php,v 1.18 2005-09-22 14:02:49 ddelon Exp $
/**
* Rendu : programme traitant l'url demandée et retournant la page compressé au navigateur.
*
48,10 → 48,12
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
*@author Laurent COUDOUNEAU <laurent.coudouneau@ema.fr>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.17 $ $Date: 2005-09-20 17:01:22 $
*@version $Revision: 1.18 $ $Date: 2005-09-22 14:02:49 $
// +------------------------------------------------------------------------------------------------------+
*/
 
// TODO : revoir les initialisation en l'absence de menu par defaut
 
// +------------------------------------------------------------------------------------------------------+
// | ENTÊTE du PROGRAMME |
// +------------------------------------------------------------------------------------------------------+
125,14 → 127,21
// +------------------------------------------------------------------------------------------------------+
// Recherche des informations pour la complétion de l'entête du squelette de la page demandée.
 
// 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);
} else {
$GLOBALS['_PAPYRUS_']['page']['titre'] = htmlentities($GLOBALS['_GEN_commun']['info_menu']->gm_nom);
if (isset($GLOBALS['_GEN_commun']['info_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);
} else {
$GLOBALS['_PAPYRUS_']['page']['titre'] = htmlentities($GLOBALS['_GEN_commun']['info_menu']->gm_nom);
}
 
}
else {
$GLOBALS['_PAPYRUS_']['page']['titre']='';
}
 
$GLOBALS['_PAPYRUS_']['rendu']['TITRE_PAGE'] = $GLOBALS['_PAPYRUS_']['page']['titre'];
 
// Construction des infos sur le site
156,19 → 165,32
 
// Construction des Meta "name".
$_GEN_commun['meta_name'] = array();
$GLOBALS['_PAPYRUS_']['page']['robot'] = htmlentities($_GEN_commun['info_menu']->gm_robot);
$GLOBALS['_PAPYRUS_']['page']['auteur'] = htmlentities($_GEN_commun['info_menu']->gm_auteur);
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);
}
else {
$GLOBALS['_PAPYRUS_']['page']['robot'] = '';
$GLOBALS['_PAPYRUS_']['page']['auteur'] = '';
}
if (empty($GLOBALS['_PAPYRUS_']['page']['auteur'])) {
$GLOBALS['_PAPYRUS_']['page']['auteur'] = htmlentities($_GEN_commun['info_site']->gs_auteur);
}
$GLOBALS['_PAPYRUS_']['page']['mots_cles'] = htmlentities($_GEN_commun['info_menu']->gm_mots_cles);
if (isset($GLOBALS['_GEN_commun']['info_menu'])) {
$GLOBALS['_PAPYRUS_']['page']['mots_cles'] = htmlentities($_GEN_commun['info_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']['description_libre'] = htmlentities($_GEN_commun['info_menu']->gm_description_libre);
if (isset($GLOBALS['_GEN_commun']['info_menu'])) {
$GLOBALS['_PAPYRUS_']['page']['description_libre'] = htmlentities($_GEN_commun['info_menu']->gm_description_libre);
}
if (empty($GLOBALS['_PAPYRUS_']['page']['description_libre'])) {
$GLOBALS['_PAPYRUS_']['page']['description_libre'] = htmlentities($_GEN_commun['info_site']->gs_description);
}
 
 
GEN_stockerMetaName('revisit-after', '15 days');
GEN_stockerMetaName('robots', $GLOBALS['_PAPYRUS_']['page']['robot']);
GEN_stockerMetaName('author', $GLOBALS['_PAPYRUS_']['page']['auteur']);
176,31 → 198,61
GEN_stockerMetaName('description', $GLOBALS['_PAPYRUS_']['page']['description_libre']);
 
// Construction des Meta Meta "name" du Dublin Core.
$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']['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);
}
else {
$GLOBALS['_PAPYRUS_']['page']['titre_alternatif'] = '';
$GLOBALS['_PAPYRUS_']['page']['auteur'] = '';
$GLOBALS['_PAPYRUS_']['page']['description_resume'] = '';
$GLOBALS['_PAPYRUS_']['page']['description_table_matieres'] = '';
$GLOBALS['_PAPYRUS_']['page']['publieur'] = '';
$GLOBALS['_PAPYRUS_']['page']['contributeur'] = '';
$GLOBALS['_PAPYRUS_']['page']['date_creation'] = '';
$GLOBALS['_PAPYRUS_']['page']['date_soumission'] = '';
$GLOBALS['_PAPYRUS_']['page']['date_acceptation'] = '';
$GLOBALS['_PAPYRUS_']['page']['periode_validite'] = '';
$GLOBALS['_PAPYRUS_']['page']['date_copyright'] = '';
$GLOBALS['_PAPYRUS_']['page']['source'] = '';
}
 
if ($_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);
} else {
$GLOBALS['_PAPYRUS_']['page']['langue_rfc_3066'] = $GLOBALS['_PAPYRUS_']['page']['langue'];
}
$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']['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);
}
else {
$GLOBALS['_PAPYRUS_']['page']['type_portee_spatiale'] = '';
$GLOBALS['_PAPYRUS_']['page']['portee_spatiale'] = '';
$GLOBALS['_PAPYRUS_']['page']['type_portee_temporelle'] = '';
$GLOBALS['_PAPYRUS_']['page']['portee_temporelle'] = '';
$GLOBALS['_PAPYRUS_']['page']['licence'] = '';
$GLOBALS['_PAPYRUS_']['page']['public'] = '';
$GLOBALS['_PAPYRUS_']['page']['public_niveau'] = '';
}
 
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']);
405,6 → 457,9
/* +--Fin du code ---------------------------------------------------------------------------------------+
*
* $Log: not supported by cvs2svn $
* Revision 1.17 2005/09/20 17:01:22 ddelon
* php5 et bugs divers
*
* Revision 1.16 2005/07/12 09:13:15 alexandre_tb
* déplacement de l'appel de la fonction afficherContenuMenu APRES l'appel de afficherContenuCorps.
* Le menu d'une application étant calculé après les opérations de l'application.