/tags/2014_06_04/upload/vide.txt |
---|
--- 2014_06_04/bazar.php (revision 0) |
+++ 2014_06_04/bazar.php (revision 467) |
@@ -0,0 +1,444 @@ |
+<?php |
+/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
+// +------------------------------------------------------------------------------------------------------+ |
+// | PHP version 4.1 | |
+// +------------------------------------------------------------------------------------------------------+ |
+// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
+// +------------------------------------------------------------------------------------------------------+ |
+// | This library is free software; you can redistribute it and/or | |
+// | modify it under the terms of the GNU Lesser General Public | |
+// | License as published by the Free Software Foundation; either | |
+// | version 2.1 of the License, or (at your option) any later version. | |
+// | | |
+// | This library is distributed in the hope that it will be useful, | |
+// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
+// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
+// | Lesser General Public License for more details. | |
+// | | |
+// | You should have received a copy of the GNU Lesser General Public | |
+// | 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: bazar.php,v 1.52 2008-10-29 15:52:14 alexandre_tb Exp $ |
+/** |
+* |
+*@package bazar |
+//Auteur original : |
+*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
+*@author Florian Schmitt <florian@ecole-et-nature.org> |
+//Autres auteurs : |
+*@copyright Tela-Botanica 2000-2004 |
+*@version $Revision: 1.52 $ $Date: 2008-10-29 15:52:14 $ |
+// +------------------------------------------------------------------------------------------------------+ |
+*/ |
+ |
+// +------------------------------------------------------------------------------------------------------+ |
+// | ENTETE du PROGRAMME | |
+// +------------------------------------------------------------------------------------------------------+ |
+ |
+//error_reporting(E_ALL); |
+require_once PAP_CHEMIN_API_PEAR.'DB.php' ; |
+require_once PAP_CHEMIN_API_PEAR.'Auth.php' ; |
+require_once 'configuration/baz_config.inc.php'; //fichier de configuration de Bazar |
+require_once 'bibliotheque/bazar.class.php'; |
+require_once 'bibliotheque/bazar.fonct.php'; //fichier des fonctions de Bazar |
+ |
+if (defined('PAP_VERSION')) { //si on est dans Papyrus |
+ GEN_stockerStyleExterne( 'bazar_interne', 'client/bazar/bazar.interne.css'); |
+} |
+ |
+//********************************************************************************************************** |
+//initialisation des paramêtres papyrus |
+//********************************************************************************************************** |
+//si un parametre est précisé dans le gestionnaire de menus papyrus, on le prends en compte |
+ |
+//parametre action pour lancer directement l'action indiquée |
+if (!isset($_GET['action'])and(isset($GLOBALS['_GEN_commun']['info_application']->action))) { |
+ $_GET['action']=$GLOBALS['_GEN_commun']['info_application']->action; |
+} |
+ |
+//parametre vue pour afficher directement une vue |
+if (!isset($_GET[BAZ_VARIABLE_VOIR])and(isset($GLOBALS['_GEN_commun']['info_application']->vue))) { |
+ $_GET[BAZ_VARIABLE_VOIR]=$GLOBALS['_GEN_commun']['info_application']->vue; |
+} |
+ |
+// Si le parametre vue est vide on le positionne a 1 |
+if (!isset($_GET[BAZ_VARIABLE_VOIR])) { |
+ $_GET[BAZ_VARIABLE_VOIR] = BAZ_VOIR_CONSULTER; |
+} |
+ |
+ |
+//parametre voir_menu pour afficher le menu ou pas (par défaut, il l'affiche) |
+if ((isset($GLOBALS['_GEN_commun']['info_application']->voir_menu))and($GLOBALS['_GEN_commun']['info_application']->voir_menu==0)) { |
+ $GLOBALS['_BAZAR_']['affiche_menu']=0; |
+} |
+else $GLOBALS['_BAZAR_']['affiche_menu']=1; |
+ |
+//parametre categorie_nature pour préciser quels types de fiches sont montrees (par défaut, il affiche les id_menu=0) |
+if (isset($GLOBALS['_GEN_commun']['info_application']->categorie_nature)) { |
+ $GLOBALS['_BAZAR_']['categorie_nature']=$GLOBALS['_GEN_commun']['info_application']->categorie_nature; |
+} |
+elseif (isset($_REQUEST['categorie_nature'])) { |
+ $GLOBALS['_BAZAR_']['categorie_nature']=$_REQUEST['categorie_nature']; |
+} |
+else $GLOBALS['_BAZAR_']['categorie_nature']=0; |
+ |
+//parametre id_nature pour afficher un certain type de fiche (par défaut, tous les types de fiches) |
+if (isset($GLOBALS['_GEN_commun']['info_application']->id_nature)) { |
+ $GLOBALS['_BAZAR_']['id_typeannonce']=$GLOBALS['_GEN_commun']['info_application']->id_nature; |
+} |
+elseif (!isset($GLOBALS['_BAZAR_']['typeannonce'])) $GLOBALS['_BAZAR_']['typeannonce']='toutes'; |
+ |
+//********************************************************************************************************** |
+//initialisation de la variable globale de bazar |
+//********************************************************************************************************** |
+$GLOBALS['id_user']=$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID); |
+ |
+//Recuperer les eventuelles variables passees en GET ou en POST |
+if (isset($_REQUEST['id_fiche'])) { |
+ $GLOBALS['_BAZAR_']['id_fiche']=$_REQUEST['id_fiche']; |
+ // récupération du type d'annonce à partir de la fiche |
+ $requete = 'select bf_ce_nature from bazar_fiche where bf_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'] ; |
+ $resultat = $GLOBALS['_BAZAR_']['db']->query ($requete) ; |
+ if (DB::isError($resultat)) { |
+ echo $resultat->getMessage().'<br />'.$resultat->getDebugInfo(); |
+ } |
+ $ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT) ; |
+ $GLOBALS['_BAZAR_']['id_typeannonce'] = $ligne->bf_ce_nature ; |
+ $resultat->free(); |
+} |
+if (isset($_REQUEST['typeannonce'])) { |
+ $GLOBALS['_BAZAR_']['id_typeannonce']=$_REQUEST['typeannonce']; |
+} |
+ |
+if ((isset($GLOBALS['_BAZAR_']['id_typeannonce']))and($GLOBALS['_BAZAR_']['id_typeannonce']!='toutes')) { |
+ $requete = 'SELECT bn_label_nature, bn_condition, bn_template, bn_commentaire, bn_appropriation, bn_image_titre, bn_image_logo'; |
+ $requete .= ' FROM bazar_nature WHERE bn_id_nature = '.$GLOBALS['_BAZAR_']['id_typeannonce']; |
+ if (isset($GLOBALS['_BAZAR_']['langue'])) { |
+ $requete .= ' and bn_ce_i18n like "'.$GLOBALS['_BAZAR_']['langue'].'%"'; |
+ } |
+ $resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
+ if (DB::isError($resultat)) { |
+ die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
+ } |
+ $ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC); |
+ $GLOBALS['_BAZAR_']['typeannonce']=$ligne['bn_label_nature']; |
+ $GLOBALS['_BAZAR_']['condition']=$ligne['bn_condition']; |
+ $GLOBALS['_BAZAR_']['template']=$ligne['bn_template']; |
+ $GLOBALS['_BAZAR_']['commentaire']=$ligne['bn_commentaire']; |
+ $GLOBALS['_BAZAR_']['appropriation']=$ligne['bn_appropriation']; |
+ $GLOBALS['_BAZAR_']['image_titre']=$ligne['bn_image_titre']; |
+ $GLOBALS['_BAZAR_']['image_logo']=$ligne['bn_image_logo']; |
+} |
+if (!isset($GLOBALS['_BAZAR_']['id_typeannonce'])) $GLOBALS['_BAZAR_']['id_typeannonce'] = 'toutes' ; |
+// +------------------------------------------------------------------------------------------------------+ |
+// | LISTE de FONCTIONS | |
+// +------------------------------------------------------------------------------------------------------+ |
+if ($GLOBALS['_BAZAR_']['affiche_menu']) { |
+ //---------------le menu de l'appli----------- |
+ function afficherContenuNavigation () { |
+ $res ='<ul class="onglets" id="BAZ_menu">'."\n"; |
+ |
+ // Gestion de la vue par défaut |
+ if (!isset($_GET[BAZ_VARIABLE_VOIR])) { |
+ $_GET[BAZ_VARIABLE_VOIR] = BAZ_VOIR_DEFAUT; |
+ } |
+ |
+ //partie consultation d'annonces |
+ if (strstr(BAZ_VOIR_AFFICHER, strval(BAZ_VOIR_CONSULTER))) { |
+ $GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_CONSULTER); |
+ $res .= '<li id="consulter"'; |
+ if ((isset($_GET[BAZ_VARIABLE_VOIR]) && $_GET[BAZ_VARIABLE_VOIR] == BAZ_VOIR_CONSULTER)) { $res .=' class="menu_actif" '; } else { $res .=' class="menu_inactif" '; } |
+ $res .='><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_CONSULTER.'</a>'."\n".'</li>'."\n"; |
+ } |
+ |
+ // Mes fiches |
+ if (strstr(BAZ_VOIR_AFFICHER, strval(BAZ_VOIR_MES_FICHES))) { |
+ $GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_MES_FICHES); |
+ $res .= '<li id="mes_fiches"'; |
+ if (isset($_GET[BAZ_VARIABLE_VOIR]) && $_GET[BAZ_VARIABLE_VOIR] == BAZ_VOIR_MES_FICHES) { $res .=' class="menu_actif" '; } else { $res .=' class="menu_inactif" '; } |
+ $res .= '><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_VOIR_VOS_ANNONCES.'</a>'."\n".'</li>'."\n"; |
+ } |
+ |
+ //partie abonnement aux annonces |
+ if (strstr(BAZ_VOIR_AFFICHER, strval(BAZ_VOIR_S_ABONNER))) { |
+ $GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_S_ABONNER); |
+ $res .= '<li id="inscrire"'; |
+ if (isset($_GET[BAZ_VARIABLE_VOIR]) && $_GET[BAZ_VARIABLE_VOIR]==BAZ_VOIR_S_ABONNER) { $res .=' class="menu_actif" '; } else { $res .=' class="menu_inactif" '; } |
+ $res .= '><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_S_ABONNER.'</a></li>'."\n" ; |
+ } |
+ |
+ //partie saisie d'annonces |
+ if (strstr(BAZ_VOIR_AFFICHER, strval(BAZ_VOIR_SAISIR))) { |
+ $GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_SAISIR); |
+ $res .= '<li id="deposer"'; |
+ if (isset($_GET[BAZ_VARIABLE_VOIR]) && ($_GET[BAZ_VARIABLE_VOIR]==BAZ_VOIR_SAISIR )) { $res .=' class="menu_actif" '; } else { $res .=' class="menu_inactif" '; } |
+ $res .='><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_SAISIR.'</a>'."\n".'</li>'."\n"; |
+ } |
+ |
+ //choix des administrateurs |
+ $utilisateur = new Administrateur_bazar($GLOBALS['AUTH']) ; |
+ $est_admin=0; |
+ if ($GLOBALS['AUTH']->getAuth()) { |
+ $requete='SELECT bn_id_nature FROM bazar_nature'; |
+ $resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
+ if (DB::isError($resultat)) { |
+ die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
+ } |
+ while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
+ if ($utilisateur->isAdmin ($ligne['bn_id_nature'])) { |
+ $est_admin=1; |
+ } |
+ } |
+ if ($est_admin || $utilisateur->isSuperAdmin()) { |
+ //partie administrer |
+ if (strstr(BAZ_VOIR_AFFICHER, strval(BAZ_VOIR_ADMIN))) { |
+ $GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_ADMIN); |
+ $res .= '<li id="administrer"'; |
+ if (isset($_GET[BAZ_VARIABLE_VOIR]) && $_GET[BAZ_VARIABLE_VOIR]==BAZ_VOIR_ADMIN) { $res .=' class="menu_actif" '; } else { $res .=' class="menu_inactif" '; } |
+ $res .='><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_ADMINISTRER.'</a></li>'."\n"; |
+ } |
+ |
+ if ($utilisateur->isSuperAdmin()) { |
+ if (strstr(BAZ_VOIR_AFFICHER, strval(BAZ_VOIR_GESTION_DROITS))) { |
+ $GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_GESTION_DROITS); |
+ $res .= '<li id="gerer"'; |
+ if (isset($_GET[BAZ_VARIABLE_VOIR]) && $_GET[BAZ_VARIABLE_VOIR]==BAZ_VOIR_GESTION_DROITS) { $res .=' class="menu_actif" '; } else { $res .=' class="menu_inactif" '; } |
+ $res .='><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_GESTION_DES_DROITS.'</a></li>'."\n" ; |
+ } |
+ } |
+ } |
+ } |
+ // Au final, on place dans l url, l action courante |
+ if (isset($_GET[BAZ_VARIABLE_VOIR])) $GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, $_GET[BAZ_VARIABLE_VOIR]); |
+ $res.= '</ul>'."\n"; |
+ return $res ; |
+ } |
+} |
+ |
+function afficherContenuCorps() { |
+ $res = ''; |
+ $res.='<h1 id="titre_bazar">'.$GLOBALS['_GEN_commun']['info_menu']->gm_titre.'</h1>'."\n"; |
+ |
+ // La resolution des actions ci-dessous AVANT l afichage des vues afin |
+ // d afficher des vues correctes |
+ |
+ if (isset($_GET[BAZ_VARIABLE_ACTION])) { |
+ if (($_GET[BAZ_VARIABLE_ACTION]!=BAZ_ACTION_NOUVEAU_V) && ($_GET[BAZ_VARIABLE_ACTION]!=BAZ_ACTION_MODIFIER_V)) { |
+ unset($_SESSION['formulaire_annonce_valide']); |
+ } |
+ switch ($_GET[BAZ_VARIABLE_ACTION]) { |
+ case BAZ_ACTION_VOIR_VOS_ANNONCES : $res .= mes_fiches(); break; |
+ case BAZ_ANNONCES_A_VALIDER : $res .= fiches_a_valider(); break; |
+ case BAZ_ADMINISTRER_ANNONCES : $res .= baz_administrer_annonces(); break; |
+ case BAZ_SUPPRIMER_FICHE : $res .= baz_suppression().baz_liste('',$GLOBALS['id_user'],''); break; |
+ case BAZ_VOIR_FICHE : $res .= baz_voir_fiche(1); break; |
+ case BAZ_ACTION_NOUVEAU_V : $res .= baz_formulaire(BAZ_ACTION_NOUVEAU_V).mes_fiches(); break; |
+ case BAZ_ACTION_SUPPRESSION : $res .= baz_suppression(); unset ($_GET['action']); break; |
+ case BAZ_ACTION_PUBLIER : publier_fiche(1) ; $res .= fiches_a_valider(); break; |
+ case BAZ_ACTION_PAS_PUBLIER : publier_fiche(0) ;$res .= fiches_a_valider(); break; |
+ case BAZ_S_INSCRIRE : $res .= baz_s_inscrire(); break; |
+ case BAZ_VOIR_FLUX_RSS : header('Content-type: text/xml; charset=UTF-8');include("bazarRSS.php");exit(0);break; |
+ case BAZ_ACTION_POST_VALIDATION : $res .= baz_post_validation();break; |
+ } |
+ |
+ } |
+ if (isset ($_GET[BAZ_VARIABLE_VOIR])) { |
+ switch ($_GET[BAZ_VARIABLE_VOIR]) { |
+ case BAZ_VOIR_CONSULTER: |
+ if (isset ($_GET[BAZ_VARIABLE_ACTION]) && $_GET[BAZ_VARIABLE_ACTION] != BAZ_VOIR_TOUTES_ANNONCES) { |
+ $res .= baz_formulaire($_GET[BAZ_VARIABLE_ACTION]) ; |
+ if ($_GET[BAZ_VARIABLE_ACTION] == BAZ_ACTION_MODIFIER_V) $res .= baz_voir_fiche(1); |
+ } else $res .= baz_liste($GLOBALS['_BAZAR_']['id_typeannonce']); |
+ break; |
+ case BAZ_VOIR_MES_FICHES : |
+ if (isset ($_GET[BAZ_VARIABLE_ACTION])) $res .= baz_formulaire($_GET[BAZ_VARIABLE_ACTION]) ; else $res .= mes_fiches(); |
+ break; |
+ case BAZ_VOIR_S_ABONNER : $res .= baz_s_inscrire(); |
+ break; |
+ case BAZ_VOIR_SAISIR : |
+ if (isset ($_GET[BAZ_VARIABLE_ACTION])) $res .= baz_formulaire($_GET[BAZ_VARIABLE_ACTION]) ; else $res .= baz_formulaire(BAZ_DEPOSER_ANNONCE); |
+ break; |
+ case BAZ_VOIR_ADMIN: |
+ if (isset($_GET[BAZ_VARIABLE_ACTION])) $res .= baz_formulaire($_GET[BAZ_VARIABLE_ACTION]) ; else $res .= fiches_a_valider(); |
+ break; |
+ case BAZ_VOIR_GESTION_DROITS: $res .= baz_gestion_droits(); |
+ break; |
+ default : |
+ $res .= baz_liste($GLOBALS['_BAZAR_']['id_typeannonce']); |
+ } |
+ } |
+ return $res ; |
+} |
+ |
+ |
+/* +--Fin du code ----------------------------------------------------------------------------------------+ |
+* |
+* $Log: not supported by cvs2svn $ |
+* Revision 1.51 2008-02-08 08:44:59 alexandre_tb |
+* Mise en pla ce de la constante BAZ_VARIABLE_ACTION |
+* |
+* Revision 1.50 2007-12-04 09:07:21 alexandre_tb |
+* Fusion avec la livraison AHA : 4 déc 2007 |
+* |
+* Revision 1.49 2007-10-24 13:26:02 alexandre_tb |
+* bug : double saisie d url |
+* |
+* Revision 1.48 2007-10-17 08:24:59 alexandre_tb |
+* correction multilinguisme |
+* |
+* Revision 1.47 2007-10-01 12:13:53 alexandre_tb |
+* bug, affichage vue / action pour la vue "administrer" |
+* |
+* Revision 1.46 2007-09-28 14:29:13 jp_milcent |
+* Ajout de la gestion de l'affichage des vues ou pas. |
+* |
+* Revision 1.45 2007-09-18 14:24:01 alexandre_tb |
+* onglet administrer |
+* |
+* Revision 1.44 2007-09-06 15:39:28 alexandre_tb |
+* fixation d une valeur par defaut a la variable vue pour |
+* eviter un ecran vide si pas de parametres dans le menu |
+* |
+* Revision 1.43 2007-08-27 12:26:04 alexandre_tb |
+* Mise en place de l action BAZ_VOIR_ADMIN |
+* |
+* Revision 1.42 2007-07-05 08:29:24 alexandre_tb |
+* modification du charset iso-8859-1 vers utf8 lors l'envoie des entetes xml. |
+* |
+* Revision 1.41 2007-07-04 10:05:12 alexandre_tb |
+* ajout d une variable $_GET['vue'] en complement de la variable action. |
+* Elle correspond aux 6 vues du bazar (consulter, mes fiches, s'abonner, saisir, administrer, gestion des droits) |
+* |
+* Revision 1.40 2007/04/11 08:30:12 neiluj |
+* remise en état du CVS... |
+* |
+* Revision 1.35.2.2 2007/03/07 16:53:17 jp_milcent |
+* Suppression du query string "action" et non pas "nature" |
+* |
+* Revision 1.35.2.1 2007/02/15 13:42:16 jp_milcent |
+* Utilisation de IN à la place du = dans les requêtes traitant les catégories de fiches. |
+* Permet d'utiliser la syntaxe 1,2,3 dans la configuration de categorie_nature. |
+* |
+* Revision 1.35 2006/10/05 08:53:50 florian |
+* amelioration moteur de recherche, correction de bugs |
+* |
+* Revision 1.34 2006/09/04 15:25:12 alexandre_tb |
+* ajout d'un id dans la balise HTML du titre |
+* |
+* Revision 1.33 2006/06/21 15:41:42 alexandre_tb |
+* rétablissement du menu mes fiches |
+* |
+* Revision 1.32 2006/06/21 15:40:15 alexandre_tb |
+* rétablissement du menu mes fiches |
+* |
+* Revision 1.31 2006/05/19 13:54:32 florian |
+* stabilisation du moteur de recherche, corrections bugs, lien recherche avancee |
+* |
+* Revision 1.30 2006/04/28 12:46:14 florian |
+* integration des liens vers annuaire |
+* |
+* Revision 1.29 2006/04/24 10:16:22 alexandre_tb |
+* ajout de la globale filtre. |
+* elle remplace (à terme) catégorie nature |
+* |
+* Revision 1.28 2006/03/29 13:05:41 alexandre_tb |
+* utilisation de la classe Administrateur_bazar |
+* |
+* Revision 1.27 2006/02/07 11:08:36 alexandre_tb |
+* utilisation de la classe Utilisateur_bazar pour la vérification des droits |
+* |
+* Revision 1.26 2006/02/06 09:33:53 alexandre_tb |
+* modification de l'affichage lors de la saisie de fiche |
+* |
+* Revision 1.25 2006/01/30 17:25:38 alexandre_tb |
+* correction de bugs |
+* |
+* Revision 1.24 2006/01/26 11:06:43 alexandre_tb |
+* ajout d'une requete pour recupere l'id_nature si un id_fiche est passé dans l'url |
+* |
+* Revision 1.23 2006/01/17 10:07:36 alexandre_tb |
+* en cours |
+* |
+* Revision 1.22 2006/01/16 15:11:28 alexandre_tb |
+* simplification code |
+* |
+* Revision 1.21 2006/01/13 14:12:52 florian |
+* utilisation des temlates dans la table bazar_nature |
+* |
+* Revision 1.20 2006/01/05 16:28:25 alexandre_tb |
+* prise en chage des checkbox, reste la mise à jour à gérer |
+* |
+* Revision 1.19 2006/01/03 10:19:31 florian |
+* Mise à jour pour accepter des parametres dans papyrus: faire apparaitre ou non le menu, afficher qu'un type de fiches, définir l'action par défaut... |
+* |
+* Revision 1.18 2005/12/02 10:57:03 florian |
+* MAJ pour paramétrage dans gestion de menus papyrus |
+* |
+* Revision 1.17 2005/12/01 16:05:41 florian |
+* changement des chemins pour appli Pear |
+* |
+* Revision 1.16 2005/12/01 15:31:30 florian |
+* correction bug modifs et saisies |
+* |
+* Revision 1.15 2005/11/30 13:58:45 florian |
+* ajouts graphisme (logos, boutons), changement structure SQL bazar_fiche |
+* |
+* Revision 1.14 2005/11/24 16:17:13 florian |
+* corrections bugs, ajout des cases à cocher |
+* |
+* Revision 1.13 2005/11/14 16:04:54 florian |
+* maj bug affichage flux |
+* |
+* Revision 1.12 2005/11/07 17:05:46 florian |
+* amélioration validation conditions de saisie, ajout des règles spécifiques de saisie des formulaires |
+* |
+* Revision 1.11 2005/10/21 16:15:04 florian |
+* mise a jour appropriation |
+* |
+* Revision 1.10 2005/10/12 17:20:33 ddelon |
+* Reorganisation calendrier + applette |
+* |
+* Revision 1.9 2005/10/12 13:35:07 florian |
+* amélioration de l'interface de bazar, de manière a simplifier les consultations, et à harmoniser par rapport aux Ressources |
+* |
+* Revision 1.8 2005/09/30 13:00:05 ddelon |
+* Fiche bazar generique |
+* |
+* Revision 1.7 2005/09/30 12:34:44 ddelon |
+* petite modification pour integration bazar dans papyrus |
+* |
+* Revision 1.6 2005/09/30 12:22:54 florian |
+* Ajouts commentaires pour fiche, modifications graphiques, maj SQL |
+* |
+* Revision 1.4 2005/07/21 19:03:12 florian |
+* nouveautés bazar: templates fiches, correction de bugs, ... |
+* |
+* Revision 1.2 2005/02/22 15:33:32 florian |
+* integration dans Papyrus |
+* |
+* Revision 1.1.1.1 2005/02/17 18:05:11 florian |
+* Import initial de Bazar |
+* |
+* Revision 1.1.1.1 2005/02/17 11:09:50 florian |
+* Import initial |
+* |
+* Revision 1.1.1.1 2005/02/16 18:06:35 florian |
+* import de la nouvelle version |
+* |
+* Revision 1.3 2004/07/05 15:10:14 florian |
+* changement interface de saisie |
+* |
+* Revision 1.2 2004/07/01 10:13:41 florian |
+* modif Florian |
+* |
+* Revision 1.1 2004/06/23 09:58:32 alex |
+* version initiale |
+* |
+* Revision 1.1 2004/06/18 09:00:07 alex |
+* version initiale |
+* |
+* |
+* +-- Fin du code ----------------------------------------------------------------------------------------+ |
+*/ |
+?> |
/tags/2014_06_04/bazar.head.php |
---|
New file |
0,0 → 1,14 |
<?php |
include_once 'configuration/baz_config.inc.php'; //fichier de configuration de Bazar |
$requete = 'SELECT bn_id_nature, bn_label_nature FROM bazar_nature' ; |
$resultat = $GLOBALS['_BAZAR_']['db']->query ($requete) ; |
if (DB::isError($resultat)) { |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
} |
echo '<link rel="alternate" type="application/rss+xml" title="'.BAZ_TOUTES_LES_ANNONCES.'" href="http://'.$_SERVER['HTTP_HOST'].'/bazar/bazarRSS.php" />'."\n"; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
echo '<link rel="alternate" type="application/rss+xml" title="'.$ligne['bn_label_nature'].'" href="http://'.$_SERVER['HTTP_HOST'].'/bazar/bazarRSS.php?annonce='.$ligne['bn_label_nature'].'" />'."\n"; |
} |
?> |
/tags/2014_06_04/jrest/.directory |
---|
New file |
0,0 → 1,5 |
[Dolphin] |
Timestamp=2010,5,25,17,12,16 |
[Settings] |
ShowDotFiles=true |
/tags/2014_06_04/jrest/services/JRestService.php |
---|
New file |
0,0 → 1,238 |
<?php |
/** |
* Classe mère abstraite contenant les méthodes génériques des services. |
* Encodage en entrée : utf8 |
* Encodage en sortie : utf8 |
* |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt> |
* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt> |
* @version $Id$ |
* @copyright 2009 |
*/ |
abstract class JRestService { |
public $config; |
protected $bdd; |
protected $log = array(); |
protected $messages = array(); |
protected $debug = array(); |
protected $distinct = false; |
protected $orderby = null; |
protected $formatRetour = 'objet'; |
protected $start = 0; |
protected $limit = 150; |
public function __construct($config, $demarrer_session = true) { |
// Tableau contenant la config de Jrest |
$this->config = $config; |
// Connection à la base de données |
$this->bdd = $this->connecterPDO($this->config, 'appli'); |
// Nettoyage du $_GET (sécurité) |
if (isset($_GET)) { |
$get_params = array('orderby', 'distinct', 'start', 'limit', 'formatRetour'); |
foreach ($get_params as $get) { |
$verifier = array('NULL', "\n", "\r", "\\", "'", '"', "\x00", "\x1a", ';'); |
$_GET[$get] = str_replace($verifier, '', $_GET[$get]); |
if (isset($_GET[$get]) && $_GET[$get] != '') { |
$this->$get = $_GET[$get]; |
} else { |
$_GET[$get] = null; |
} |
} |
} |
} |
/** |
* Méthode appelée quand aucun paramètre n'est passé dans l'url et avec une requête de type GET. |
*/ |
public function getRessource() { |
$this->getElement(array()); |
} |
protected function envoyer($donnees = null, $mime = 'text/html', $encodage = 'utf-8', $json = true) { |
// Traitements des messages d'erreurs et données |
if (count($this->messages) != 0) { |
header('HTTP/1.1 500 Internal Server Error'); |
$mime = 'text/html'; |
$encodage = 'utf-8'; |
$json = true; |
$sortie = $this->messages; |
} else { |
$sortie = $donnees; |
if (is_null($donnees)) { |
$sortie = 'OK'; |
} |
} |
// Gestion de l'envoie du déboguage |
$this->envoyerDebogage(); |
// Encodage au format et JSON et envoie sur la sortie standard |
$contenu = $json ? json_encode($sortie) : $sortie; |
$this->envoyerContenu($encodage, $mime, $contenu); |
} |
protected function envoyerDebogage() { |
if (!is_array($this->debug)) { |
$this->debug[] = $this->debug; |
} |
if (count($this->debug) != 0) { |
foreach ($this->debug as $cle => $val) { |
if (is_array($val)) { |
$this->debug[$cle] = print_r($val, true); |
} |
} |
header('X-DebugJrest-Data:'.json_encode($this->debug)); |
} |
} |
protected function envoyerContenu($encodage, $mime, $contenu) { |
header("Content-Type: $mime; charset=$encodage"); |
print $contenu; |
} |
private function connecterPDO($config, $base = 'database') { |
$cfg = $config[$base]; |
$dsn = $cfg['phptype'].':dbname='.$cfg['database'].';host='.$cfg['hostspec']; |
try { |
$PDO = new PDO($dsn, $cfg['username'], $cfg['password']); |
} catch (PDOException $e) { |
echo 'La connexion à la base de donnée via PDO a échouée : ' . $e->getMessage(); |
} |
// Passe en UTF-8 la connexion à la BDD |
$PDO->exec("SET NAMES 'utf8'"); |
// Affiche les erreurs détectées par PDO (sinon mode silencieux => aucune erreur affiché) |
$PDO->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
return $PDO; |
} |
protected function getTxt($id) { |
$sortie = ''; |
switch ($id) { |
case 'sql_erreur' : $sortie = 'Requête echec. Fichier : "%s". Ligne : "%s". Message : %s'; break; |
default : $sortie = $id; |
} |
return $sortie; |
} |
protected function traiterParametresUrl($params_attendu, $params, $pourBDD = true) { |
$sortie = array(); |
foreach ($params_attendu as $num => $nom) { |
if (isset($params[$num]) && $params[$num] != '*') { |
if ($pourBDD) { |
$params[$num] = $this->bdd->quote($params[$num]); |
} |
$sortie[$nom] = $params[$num]; |
} |
} |
return $sortie; |
} |
protected function traiterParametresPost($params) { |
$sortie = array(); |
foreach ($params as $cle => $valeur) { |
$sortie[$cle] = $this->bdd->quote($valeur); |
} |
return $sortie; |
} |
protected function getIdentification(&$params) { |
// Initialisation des variables |
$utilisateur = array(0, session_id()); |
// L'id utilisateur est soit passé par le POST soit dans l'url |
if (is_array($params) && isset($params['cmhl_ce_modifier_par'])) { |
$utilisateur[0] = $params['cmhl_ce_modifier_par']; |
unset($params['cmhl_ce_modifier_par']); |
} else if (is_string($params)) { |
$utilisateur[0] = $params; |
} |
return $utilisateur; |
} |
protected function etreAutorise($id_utilisateur) { |
$autorisation = false; |
if (($_SESSION['coel_utilisateur'] != '') && $_SESSION['coel_utilisateur']['id'] != $id_utilisateur) { |
$this->messages[] = 'Accès interdit.'; |
} else if ($_SESSION['coel_utilisateur'] == '') { |
$this->messages[] = 'Veuillez vous identifiez pour accéder à cette fonction.'; |
} else { |
$autorisation = true; |
} |
return $autorisation; |
} |
private function gererIdentificationPermanente() { |
// Pour maintenir l'utilisateur tjrs réellement identifié nous sommes obligé de recréer une SESSION et de le recharger depuis la bdd |
if ($this->getUtilisateur() == '' |
&& isset($_COOKIE['coel_login']) |
&& ($utilisateur = $this->chargerUtilisateur($_COOKIE['coel_login'], $_COOKIE['coel_mot_de_passe']))) { |
$this->setUtilisateur($utilisateur, $_COOKIE['coel_permanence']); |
} |
} |
protected function getUtilisateur() { |
return (isset($_SESSION['coel_utilisateur']) ? $_SESSION['coel_utilisateur'] : ''); |
} |
/** |
* Méthode prenant en paramètre un chemin de fichier squelette et un tableau associatif de données, |
* en extrait les variables, charge le squelette et retourne le résultat des deux combinés. |
* |
* @param String $fichier le chemin du fichier du squelette |
* @param Array $donnees un tableau associatif contenant les variables a injecter dans le squelette. |
* |
* @return boolean false si le squelette n'existe pas, sinon la chaine résultat. |
*/ |
public static function traiterSquelettePhp($fichier, Array $donnees = array()) { |
$sortie = false; |
if (file_exists($fichier)) { |
// Extraction des variables du tableau de données |
extract($donnees); |
// Démarage de la bufferisation de sortie |
ob_start(); |
// Si les tags courts sont activés |
if ((bool) @ini_get('short_open_tag') === true) { |
// Simple inclusion du squelette |
include $fichier; |
} else { |
// Sinon, remplacement des tags courts par la syntaxe classique avec echo |
$html_et_code_php = self::traiterTagsCourts($fichier); |
// Pour évaluer du php mélangé dans du html il est nécessaire de fermer la balise php ouverte par eval |
$html_et_code_php = '?>'.$html_et_code_php; |
// Interprétation du html et du php dans le buffer |
echo eval($html_et_code_php); |
} |
// Récupèration du contenu du buffer |
$sortie = ob_get_contents(); |
// Suppression du buffer |
@ob_end_clean(); |
} else { |
$msg = "Le fichier du squelette '$fichier' n'existe pas."; |
trigger_error($msg, E_USER_WARNING); |
} |
// Retourne le contenu |
return $sortie; |
} |
/** |
* Fonction chargeant le contenu du squelette et remplaçant les tags court php (<?= ...) par un tag long avec echo. |
* |
* @param String $chemin_squelette le chemin du fichier du squelette |
* |
* @return string le contenu du fichier du squelette php avec les tags courts remplacés. |
*/ |
private static function traiterTagsCourts($chemin_squelette) { |
$contenu = file_get_contents($chemin_squelette); |
// Remplacement de tags courts par un tag long avec echo |
$contenu = str_replace('<?=', '<?php echo ', $contenu); |
// Ajout systématique d'un point virgule avant la fermeture php |
$contenu = preg_replace("/;*\s*\?>/", "; ?>", $contenu); |
return $contenu; |
} |
} |
?> |
/tags/2014_06_04/jrest/services/.directory |
---|
New file |
0,0 → 1,5 |
[Dolphin] |
Timestamp=2010,5,25,17,11,22 |
[Settings] |
ShowDotFiles=true |
/tags/2014_06_04/jrest/services/Resume.php |
---|
New file |
0,0 → 1,49 |
<?php |
/** |
* PHP Version 5 |
* |
* @category PHP |
* @package papyrus_bp |
* @author aurelien <aurelien@tela-botanica.org> |
* @copyright 2010 Tela-Botanica |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL |
* @version SVN: <svn_id> |
* @link /doc/papyrus_bp/ |
*/ |
Class Resume extends JRestService { |
public function getElement($uid){ |
$id_utilisateur = $uid[0]; |
$mail_utilisateur = $uid[1]; |
$sql= 'SELECT bf_id_fiche, bf_titre, bf_date_maj_fiche FROM bazar_fiche'. |
' WHERE bf_ce_utilisateur = '.$id_utilisateur. |
' AND bf_statut_fiche = 1'. |
' ORDER BY bf_date_maj_fiche DESC '. |
' LIMIT 0,5'; |
$fiches = $projets = $this->bdd->query($sql)->fetchAll(); |
$resume = array(); |
$resume['titre'] = 'Vos derniers événements publiés'; |
$resume['lien_appli'] = '<a href="http://www.tela-botanica.org/page:evenements" > Consulter tous les évenements </a>'; |
if(!$fiches) { |
$resume['message'] = 'Aucune fiche saisie pour le moment'; |
} else { |
foreach($fiches as $fiche) { |
$cible_lien = 'http://www.tela-botanica.org/page:evenements?vue=1&action=8&id_fiche='.$fiche['bf_id_fiche']; |
$date_pub = ' publiée le '.$fiche['bf_date_maj_fiche']; |
$resume_item = array('element' => htmlspecialchars($fiche['bf_titre']).$date_pub, 'lien' => $cible_lien); |
$resume['elements'][] = $resume_item; |
} |
} |
$this->envoyer($resume); |
} |
} |
?> |
/tags/2014_06_04/jrest/.htaccess |
---|
New file |
0,0 → 1,4 |
RewriteEngine On |
RewriteCond %{REQUEST_FILENAME} !-d |
RewriteCond %{REQUEST_FILENAME} !-f |
RewriteRule ^.*$ /bazar_bp/jrest/index.php/ |
/tags/2014_06_04/jrest/JRest.php |
---|
New file |
0,0 → 1,302 |
<?php |
// In : utf8 url_encoded (get et post) |
// Out : utf8 |
// TODO : gerer les retours : dans ce controleur : code retour et envoi ... |
class JRest { |
/** Parsed configuration file */ |
private $config; |
/** The HTTP request method used. */ |
private $method = 'GET'; |
/** The HTTP request data sent (if any). */ |
private $requestData = NULL; |
/** Array of strings to convert into the HTTP response. */ |
private $output = array(); |
/** Nom resource. */ |
private $resource = NULL; |
/** Identifiant unique resource. */ |
private $uid = NULL; |
/** |
* Constructor. Parses the configuration file "JRest.ini", grabs any request data sent, records the HTTP |
* request method used and parses the request URL to find out the requested resource |
* @param str iniFile Configuration file to use |
*/ |
public function JRest($iniFile = 'jrest.ini.php') { |
$this->config = parse_ini_file($iniFile, TRUE); |
if (isset($_SERVER['REQUEST_URI']) && isset($_SERVER['REQUEST_METHOD']) && isset($_SERVER['QUERY_STRING'])) { |
if (isset($_SERVER['CONTENT_LENGTH']) && $_SERVER['CONTENT_LENGTH'] > 0) { |
$this->requestData = ''; |
$httpContent = fopen('php://input', 'r'); |
while ($data = fread($httpContent, 1024)) { |
$this->requestData .= $data; |
} |
fclose($httpContent); |
} |
if (strlen($_SERVER['QUERY_STRING']) == 0) { |
$len = strlen($_SERVER['REQUEST_URI']); |
} else { |
$len = -(strlen($_SERVER['QUERY_STRING']) + 1); |
} |
$urlString = substr($_SERVER['REQUEST_URI'], strlen($this->config['settings']['baseURL']), $len); |
$urlParts = explode('/', $urlString); |
if (isset($urlParts[0])) $this->resource = $urlParts[0]; |
if (count($urlParts) > 1 && $urlParts[1] != '') { |
array_shift($urlParts); |
foreach ($urlParts as $uid) { |
if ($uid != '') { |
$this->uid[] = urldecode($uid); |
} |
} |
} |
$this->method = $_SERVER['REQUEST_METHOD']; |
} else { |
trigger_error('I require the server variables REQUEST_URI, REQUEST_METHOD and QUERY_STRING to work.', E_USER_ERROR); |
} |
} |
/** |
* Execute the request. |
*/ |
function exec() { |
switch ($this->method) { |
case 'GET': |
$this->get(); |
break; |
case 'POST': |
$this->post(); |
break; |
case 'DELETE': |
$this->delete(); |
break; |
case 'PUT': |
$this->add(); |
break; |
} |
} |
/** |
* Execute a GET request. A GET request fetches a list of resource when no resource name is given, a list of element |
* when a resource name is given, or a resource element when a resource and resource unique identifier are given. It does not change the |
* database contents. |
*/ |
private function get() { |
if ($this->resource) { |
$resource_file = 'services/'.ucfirst($this->resource).'.php'; |
$resource_class = ucfirst($this->resource); |
if (file_exists($resource_file)) { |
include_once $resource_file; |
if (class_exists($resource_class)) { |
$service = new $resource_class($this->config); |
if ($this->uid) { // get a resource element |
if (method_exists($service, 'getElement')) { |
$service->getElement($this->uid); |
} |
} elseif (method_exists($service, 'getRessource')) { // get all elements of a ressource |
$service->getRessource(); |
} |
} |
} |
} else { // get resources |
// include set.jrest.php, instanticiation et appel |
} |
} |
private function post() { |
$pairs = array(); |
// Récupération des paramètres passés dans le contenu de la requête HTTP (= POST) |
if ($this->requestData) { |
$pairs = $this->parseRequestData(); |
} |
// Ajout des informations concernant l'upload de fichier passées dans la variable $_FILE |
if(isset($_FILES)) { |
foreach ($_FILES as $v) { |
$pairs[$v['name']] = $v; |
} |
// Ne pas effacer cette ligne ! Elle est indispensable pour les services du Carnet en ligne |
// qui n'utilisent que le tableau pairs dans les posts |
$pairs = array_merge($pairs, $_POST); |
} |
// gestion du contenu du post |
if(isset($_POST)) |
{ |
// Safari ne sait pas envoyer des DELETE avec gwt... |
// Nous utilisons le parametre "action" passé dans le POST qui doit contenir DELETE pour lancer la supression |
if ($pairs['action'] == 'DELETE') { |
$this->delete(); |
return; |
} |
if (count($pairs) != 0) { |
if ($this->uid) { // get a resource element |
$resource_file = 'services/'.ucfirst($this->resource).'.php'; |
$resource_class = ucfirst($this->resource); |
if (file_exists($resource_file)) { |
include_once $resource_file; |
if (class_exists($resource_class)) { |
$service = new $resource_class($this->config); |
if (method_exists($service,'updateElement')) { // Update element |
// TODO : a voir le retour ... |
if ($service->updateElement($this->uid, $pairs)) { |
$this->created(); |
} |
} |
} |
} |
} else { // get all elements of a ressource |
$this->add($pairs); |
} |
} else { |
$this->lengthRequired(); |
} |
} |
} |
private function delete() { |
$resource_file = 'services/'.ucfirst($this->resource).'.php'; |
$resource_class = ucfirst($this->resource); |
if (file_exists($resource_file)) { |
include_once $resource_file; |
if (class_exists($resource_class)) { |
$service = new $resource_class($this->config); |
if ($this->uid) { // get a resource element |
if (method_exists($service, 'deleteElement')) { // Delete element |
if ($service->deleteElement($this->uid)) { |
$this->noContent(); |
} |
} |
} |
} |
} |
} |
private function add($pairs = null) { |
if (is_null($pairs)) { |
$pairs = array(); |
// Récupération des paramètres passés dans le contenu de la requête HTTP (= POST) |
// FIXME : vérifier que l'on récupère bien les données passées par PUT |
if ($this->requestData) { |
$pairs = $this->parseRequestData(); |
} |
} |
if (count($pairs) != 0) { |
$resource_file = 'services/'.ucfirst($this->resource).'.php'; |
$resource_class = ucfirst($this->resource); |
if (file_exists($resource_file)) { |
include_once $resource_file; |
if (class_exists($resource_class)) { |
$service = new $resource_class($this->config); |
if (method_exists($service,'createElement')) { // Create a new element |
if ($service->createElement($pairs)) { |
$this->created(); |
} |
} |
} |
} |
} else { |
$this->lengthRequired(); |
} |
} |
/** |
* Parse the HTTP request data. |
* @return str[] Array of name value pairs |
*/ |
private function parseRequestData() { |
$values = array(); |
$pairs = explode('&', $this->requestData); |
foreach ($pairs as $pair) { |
$parts = explode('=', $pair); |
if (isset($parts[0]) && isset($parts[1])) { |
$parts[1] = rtrim(urldecode($parts[1])); |
$values[$parts[0]] = $parts[1]; |
} |
} |
return $values; |
} |
/** |
* Send a HTTP 201 response header. |
*/ |
private function created($url = FALSE) { |
header('HTTP/1.0 201 Created'); |
if ($url) { |
header('Location: '.$url); |
} |
} |
/** |
* Send a HTTP 204 response header. |
*/ |
private function noContent() { |
header('HTTP/1.0 204 No Content'); |
} |
/** |
* Send a HTTP 400 response header. |
*/ |
private function badRequest() { |
header('HTTP/1.0 400 Bad Request'); |
} |
/** |
* Send a HTTP 401 response header. |
*/ |
private function unauthorized($realm = 'JRest') { |
if (!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])) { |
header('WWW-Authenticate: Basic realm="'.$realm.'"'); |
} |
header('HTTP/1.0 401 Unauthorized'); |
} |
/** |
* Send a HTTP 404 response header. |
*/ |
private function notFound() { |
header('HTTP/1.0 404 Not Found'); |
} |
/** |
* Send a HTTP 405 response header. |
*/ |
private function methodNotAllowed($allowed = 'GET, HEAD') { |
header('HTTP/1.0 405 Method Not Allowed'); |
header('Allow: '.$allowed); |
} |
/** |
* Send a HTTP 406 response header. |
*/ |
private function notAcceptable() { |
header('HTTP/1.0 406 Not Acceptable'); |
echo join(', ', array_keys($this->config['renderers'])); |
} |
/** |
* Send a HTTP 411 response header. |
*/ |
private function lengthRequired() { |
header('HTTP/1.0 411 Length Required'); |
} |
/** |
* Send a HTTP 500 response header. |
*/ |
private function internalServerError() { |
header('HTTP/1.0 500 Internal Server Error'); |
} |
} |
?> |
/tags/2014_06_04/jrest/index.php |
---|
New file |
0,0 → 1,38 |
<?php |
// Decommenter ces lignes si version de php < 5 |
//require_once 'lib/JSON.php'; |
// Lazy require |
// TODO : voir si on ne peut pas dépacer ces inclusions directement dans les services. |
//require_once 'lib/DBAccessor.php'; |
//require_once 'lib/SpreadsheetProductor.php'; |
//require_once 'lib/PDFProductor.php'; |
//require 'JRest.php'; |
/** |
* La fonction __autoload() charge dynamiquement les classes trouvées dans le code. |
* |
* Cette fonction est appelée par php5 quand il trouve une instanciation de classe dans le code. |
* |
*@param string le nom de la classe appelée. |
*@return void le fichier contenant la classe doit être inclu par la fonction. |
*/ |
function __autoload($classe) |
{ |
if (class_exists($classe)) { |
return null; |
} |
$chemins = array('', 'services/', 'services/include/', 'lib/'); |
foreach ($chemins as $chemin) { |
$chemin = $chemin.$classe.'.php'; |
if (file_exists($chemin)) { |
require_once $chemin; |
} |
} |
} |
$jRest =& new JRest(); |
$jRest->exec(); |
?> |
/tags/2014_06_04/jrest |
---|
New file |
Property changes: |
Added: svn:ignore |
+jrest.ini.php |
/tags/2014_06_04/bazar.desinscription.inc.php |
---|
New file |
0,0 → 1,68 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: bazar.desinscription.inc.php,v 1.3 2007-04-11 08:30:12 neiluj Exp $ |
/** |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.3 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/* Ce programme est appelé depuis inscription.php et |
* se situe dans la fonction afficherContenuCorps() |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | LES CONSTANTES DES ACTIONS DE BAZAR | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// Suppression des entrée dans bazar_droits |
$requete = 'DELETE FROM bazar_droits WHERE bd_id_utilisateur='.$id_utilisateur ; |
$resultat = $GLOBALS['ins_db']->query($requete) ; |
if (DB::isError($resultat)) { |
echo 'Erreur dans la requete sur bazar_droits<br />'.$requete.'<br />'.$resultat->getMessage() ; |
} |
// +------------------------------------------------------------------------------------------------------+ |
// | LISTE de FONCTIONS | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.1.4.1 2007/03/07 16:53:45 jp_milcent |
* Mise en majuscule des mots réservés par SQL |
* |
* Revision 1.1 2005/09/29 16:14:17 alexandre_tb |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2014_06_04/bazar.interne.css |
---|
New file |
0,0 → 1,361 |
/* |
+----------------------------------------------------------------------------+ |
| bazar.css | |
+----------------------------------------------------------------------------+ |
| Copyright (c) 2005 Tela Botanica | |
+----------------------------------------------------------------------------+ |
| Feuille de style interne spécifique a l'application Bazar | |
+----------------------------------------------------------------------------+ |
| Auteur : Jean-Pascal MILCENT <jpm@tela-botanica.org> | |
+----------------------------------------------------------------------------+ |
*/ |
/** |
Spécifique à téla mais cette modif est mise ici |
pour qu'en cas de problème le css ne soit modifié que dans les |
pages contenant bazar |
**/ |
#actualites #zone-droite { |
overflow:visible; |
} |
#formulaire input, #formulaire textarea, #formulaire select { |
border:1px solid #000; |
background-color:#fefffe;} |
input[type ^="submit"]:hover{ |
background-color:#b0cdfc;} |
.enligne { |
padding:0; |
margin:0; |
display:inline; |
list-style:none; |
list-style-type:none; |
background:#FFF;} |
/*-------------Les fiches Bazar-------------------------------------------------*/ |
.BAZ_cadre_fiche{ |
max-width:600px; |
width:auto; |
height:auto; |
padding:10px; |
border: 1px solid #7B9C35;} |
.BAZ_cadre_map { |
padding:0; |
height:250px; |
width:400px; |
overflow:auto;} |
.BAZ_cadre_map .BAZ_cadre_fiche{ |
padding:0 2px 2px 2px;} |
.BAZ_cadre_map .BAZ_fiche_titre, .BAZ_cadre_map .BAZ_fiche{ |
font-size:13px; |
} |
.BAZ_fiche_titre_expo, .BAZ_fiche_titre_sortie, .BAZ_fiche_titre_formation, .BAZ_fiche_titre_evenement { |
text-transform:none;} |
#map{ |
min-height:600px;} |
#fiche_image{ |
float:left; |
height:150px; |
width:210px; |
margin:0 10px 0 0} |
#fiche_image, .BAZ_cadre_fiche{ |
background-color:#fefffe; |
-moz-border-radius:10px;} |
#fiche_titre { |
background:transparent; |
border-bottom:1px solid black; |
color:#1A4881;} |
.bulle_bas{ |
height:0;} |
.BAZ_infos_fiche{ |
margin:0; |
padding:0; |
font-size:10px; |
color:gray;} |
.centrer { |
clear:both; |
margin:0 auto;} |
.BAZ_rubrique { |
padding: 5px 0;} |
.BAZ_label { |
text-align:left; |
color: #3A3633;} |
.rubrique_bulle { |
width:90px; |
text-align:left; |
font: bold 15px arial, sans-serif; |
color: #000;} |
.BAZ_texte{ |
font-weight:bold;} |
.description ul{ |
margin:0;} |
.infos { |
width:70%; |
float:left; |
min-height:120px; |
font: bold 15px arial, sans-serif; |
color:#B1BB7E; |
line-height:25px;} |
.bazar_checkbox { |
float:left; |
width:170px; |
font:10px arial, sans-serif; |
border:0;} |
.lien_wikini{ |
margin:0; |
padding:10px 5px; |
border:2px solid #DBE8C8; |
-moz-border-radius:10px; |
background:#3082AA;} |
div.lien_wikini a{ |
padding-left:100px; |
color:#FFF;} |
#bazar_commentaire { |
max-width: 600 px; |
width: auto; |
} |
#BAZ_bas_page, #BAZ_bas_page .rubrique{ |
font-size:10px; |
text-decoration:none; |
color:gray;} |
#BAZ_bas_page .rubrique{ |
display:inline; |
clear:both;} |
#formation_qualifiante { |
float:right; |
margin:0 -15px 0 5px; |
height:190px; |
width:30px; |
background:url(images/BAZ_formation_qualifiante.gif) bottom right no-repeat;} |
#formation_diplomante { |
float:right; |
margin:0 -15px 0 5px; |
height:190px; |
width:30px; |
background:url(images/BAZ_formation_diplomante.gif) bottom right no-repeat;} |
#formation_continue { |
float:right; |
margin:0 -15px 0 5px; |
height:190px; |
width:30px; |
background:url(images/BAZ_formation_continue.gif) bottom right no-repeat;} |
.table_bazar{ |
width:300px; |
margin:2em 0 0 0;} |
#table_bazar{ |
border-spacing:0; |
text-align:center; |
border: 1px solid black;} |
#table_bazar th{ |
color:white; |
background-color:#598ac4; |
padding:0 5px; |
text-align:center; |
border-bottom: 1px dotted grey; |
border-left: 1px dotted grey;} |
#table_bazar td { |
padding:2px; |
text-align:left; |
border-bottom: 1px dotted grey; |
border-left: 1px dotted grey;} |
#table_bazar .ligne_paire{ |
background-color:#c8ddff;} |
.table_bazar #col2, .table_bazar #col3, #laius_abonnement{ |
display:none;} |
.table_bazar #col1,.table_bazar #col4{ |
width:150px;} |
.BAZ_actions_fiche ul{ |
list-style-type:none;} |
.BAZ_actions_fiche a{ |
display:block; |
text-align:center; |
width:200px; |
border: 1px solid black; |
padding:3px; |
font-size:14px; |
background:#fefffe;} |
.BAZ_actions_fiche a:hover{ |
background-color:#b0cdfc;} |
#bf_description_description {font-weight:normal;} |
/* CALENDRIER */ |
#cal_entete{ |
display:block; |
background:transparent url(/client/bazar/images/cal_titre_fond-grey.png) repeat-x; |
margin:10px 0; |
height:31px; |
min-width:300px; |
border-left: 2px solid #C3C0AD; |
border-right: 2px solid #C3C0AD; |
position: relative; |
} |
#cal_titre{ |
position:absolute; |
background:transparent; |
top:0; |
margin-top: 10px; |
right:20px; |
width:182px;} |
#cal_navigation{ |
display:block; |
position:absolute; |
background:transparent; |
top:10px; |
left:20px;} |
#cal_precedent_lien, #cal_suivant_lien{ |
display:block; |
position:absolute; |
top:2px; |
background:transparent;} |
#cal_suivant_lien img, #cal_precedent_lien img{ |
display:block; |
border:0;} |
#cal_precedent_lien:hover, #cal_suivant_lien:hover, #cal_mois_courrant:hover{ |
background-color:#b0cdfc;} |
#cal_precedent_lien{ |
left:15px;} |
#cal_mois_courrant{ |
display:block; |
position:absolute; |
top:4px; |
left:40px; |
width:110px; |
padding:2px 25px; |
background-color:#fff; |
border:1px inset #113054; |
text-align:center; |
text-transform:uppercase; |
font: bold 14px 'Arial narrow', arial, sans-serif;} |
#cal_suivant_lien{ |
left:205px;} |
.calendrier{ |
font: bold 16px 'Arial narrow', Arial, sans-serif; |
border-collapse:separate; |
border-spacing:2px; |
width:960px; /* pour éviter que le calcul des largeurs des colonnes n'aboutisse à des valeurs différentes et que "dimanche" soit plus fin */ |
} |
/* Problème de la couleur entre les cellules... |
.calendrier tbody{ |
background:white url(/client/bazar/images/cal_img_fond.jpg) 2px 40px repeat-y;}*/ |
.calendrier th, .calendrier_applette th { |
color:white; |
background-color:#C3C0AD; |
border: 1px solid #113054; |
text-align:center;} |
.calendrier th { |
height:20px; |
width:14%; |
border-width:2px;} |
.calendrier td { |
height:83px; |
width:14%; |
border:2px solid #4c4c4c; |
vertical-align:top; |
text-align:left; |
-moz-border-radius:3px;} |
.cal_samedi, .cal_dimanche{ |
background-color:#fff9e7;} |
.cal_j{ |
display:block; |
float:right; |
padding:2px;} |
.cal_jc{ |
background-color:#c4d9fb;} |
.cal_ma{ |
background-color:#eaeaec;} |
.cal_evenemt_liste{ |
font: normal 10px Arial, sans-serif; |
list-style-type:none; |
margin:20px 0 0 0; |
padding:0;} |
.cal_evenemt_liste li{ |
background:transparent url(/client/bazar/images/cal_pastille.png) top left no-repeat !important; |
display:block; |
padding-bottom: 10px; |
padding-top: 2px; |
margin-left: 5px; |
} |
.cal_evenemt_liste li a { |
padding-left: 20px; |
padding-bottom: 5px; |
} |
.cal_evenemt_liste .nature_1{ |
background:transparent url(/client/bazar/images/drapeau_bleu.png) top left no-repeat !important;} |
.filtre_1{ |
background-color:#7CCCFF;} |
.cal_evenemt_liste .nature_2{ |
background:transparent url(/client/bazar/images/drapeau_vert.png) top left no-repeat !important;} |
.filtre_2{ |
background-color:#7ACD69;} |
.cal_evenemt_liste .nature_3{ |
background:transparent url(/client/bazar/images/drapeau_orange.png) top left no-repeat !important;} |
.filtre_3{ |
background-color:#FFAA5D;} |
.cal_evenemt_liste .nature_4{ |
background:transparent url(/client/bazar/images/drapeau_rose.png) top left no-repeat !important;} |
.filtre_4{ |
background-color:#FF81EA;} |
.cal_evenemt{ |
margin:0 0 0 0px; |
padding:0;} |
/* Pour la biblioth�que JS DomToolTip */ |
div.niceTitle { |
background-color: #333333; |
color: #FFFFFF; |
font-weight: bold; |
font-size: 13px; |
font-family: "Trebuchet MS", sans-serif; |
width: 250px; |
left: 0; |
top: 0; |
padding: 4px; |
position: absolute; |
text-align: left; |
z-index: 20; |
-moz-border-radius: 0 10px 10px 10px; |
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); |
-moz-opacity: .87; |
-khtml-opacity: .87; |
opacity: .87;} |
div.niceTitle .contents { |
margin: 0; |
padding: 0 3px; |
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); |
-moz-opacity: 1; |
-khtml-opacity: 1; |
opacity: 1;} |
div.niceTitle p { |
width: 250px; |
color: #D17E62; |
font-size: 9px; |
padding: 3px 0 0 0; |
margin: 0; |
text-align: left; |
-moz-opacity: 1;} |
.bouton_valider { |
color:#7B9C35; |
font-size: 14px; |
width: 208px; |
background-color:#FFFFFF; |
border:1px solid; |
border-color: #000000; |
} |
#label_validite { |
padding-right: 7px; |
} |
#date_validite { |
width: 100px; |
} |
/tags/2014_06_04/bazar_calendrier.applette.php |
---|
New file |
0,0 → 1,75 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// Copyright (C) 1999-2004 Tela Botanica (accueil@tela-botanica.org) |
// |
// Ce logiciel est un programme informatique servant à gérer du contenu et des |
// applications web. |
// Ce logiciel est régi par la licence CeCILL soumise au droit français et |
// respectant les principes de diffusion des logiciels libres. Vous pouvez |
// utiliser, modifier et/ou redistribuer ce programme sous les conditions |
// de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA |
// sur le site "http://www.cecill.info". |
// En contrepartie de l'accessibilité au code source et des droits de copie, |
// de modification et de redistribution accordés par cette licence, il n'est |
// offert aux utilisateurs qu'une garantie limitée. Pour les mêmes raisons, |
// seule une responsabilité restreinte pèse sur l'auteur du programme, le |
// titulaire des droits patrimoniaux et les concédants successifs. |
// A cet égard l'attention de l'utilisateur est attirée sur les risques |
// associés au chargement, à l'utilisation, à la modification et/ou au |
// développement et à la reproduction du logiciel par l'utilisateur étant |
// donné sa spécificité de logiciel libre, qui peut le rendre complexe à |
// manipuler et qui le réserve donc à des développeurs et des professionnels |
// avertis possédant des connaissances informatiques approfondies. Les |
// utilisateurs sont donc invités à charger et tester l'adéquation du |
// logiciel à leurs besoins dans des conditions permettant d'assurer la |
// sécurité de leurs systèmes et ou de leurs données et, plus généralement, |
// à l'utiliser et l'exploiter dans les mêmes conditions de sécurité. |
// Le fait que vous puissiez accéder à cet en-tête signifie que vous avez |
// pris connaissance de la licence CeCILL, et que vous en avez accepté les |
// termes. |
// ---- |
// CVS : $Id: bazar_calendrier.applette.php,v 1.1 2007-06-25 12:37:09 alexandre_tb Exp $ |
/** |
* bazar_calendrier : programme affichant les evenements du bazar sous forme de Calendrier |
* |
* |
*@package Bazar |
//Auteur original : |
*@author David DELON <david.delon@clapas.net> |
*@version $Revision: 1.1 $ $Date: 2007-06-25 12:37:09 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
if (!defined('BAZ_VOIR_FICHE')) { |
define ('BAZ_VOIR_FICHE', 8); |
} |
include_once 'configuration/baz_config.inc.php'; //fichier de configuration de Bazar |
include_once 'bibliotheque/bazar.fonct.php'; //fichier des fonctions de Bazar |
include_once 'bibliotheque/bazar.fonct.cal.php'; //fichier des fonctions de Bazar |
$GLOBALS['_CAL_']['nom_fonction'] = 'afficherCalendrier'; |
$GLOBALS['_GEN_commun']['info_applette_nom_fonction'] = $GLOBALS['_CAL_']['nom_fonction']; |
// Balise : CLIENT_BAZAR_CALENDRIER |
$GLOBALS['_GEN_commun']['info_applette_balise'] = '(?:<!-- '.$GLOBALS['_GEN_commun']['balise_prefixe_client'].'(BAZAR_CALENDRIER) -->|'. |
'\{\{[Bb]azarCalendrier' . |
'(?:\s*' . |
'(?:' . |
'(template="[^"]*")|' . |
')' . |
')+' . |
'\s*\}\})'; |
function afficherCalendrier($arguments) { |
return GestionAffichageCalendrier($arguments, 'calendrier_applette'); |
} |
?> |
/tags/2014_06_04/template_moteur_recherche.txt |
---|
New file |
0,0 → 1,6 |
echo $formtemplate->toHTML(); |
if (!isset($_REQUEST['recherche_effectuee'])) { ?> |
<p class="zone_info">Précisez vos critères de recherche et appuyez sur le bouton "Rechercher" pour consulter les fiches. |
</p> |
{{Syndication titre="Dernières actualités" url="http://www.tela-botanica.org/papyrus.php?menu=441&action=18" nb="10" nouvellefenetre="0" formatdate="jma" template="synd_liste_evenement.tpl.html"}} |
<?php } ?> |
Property changes: |
Added: svn:eol-style |
+native |
\ No newline at end of property |
/tags/2014_06_04/bazar.calendrier.php |
---|
New file |
0,0 → 1,62 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// Copyright (C) 1999-2004 Tela Botanica (accueil@tela-botanica.org) |
// |
// Ce logiciel est un programme informatique servant à gérer du contenu et des |
// applications web. |
// Ce logiciel est régi par la licence CeCILL soumise au droit français et |
// respectant les principes de diffusion des logiciels libres. Vous pouvez |
// utiliser, modifier et/ou redistribuer ce programme sous les conditions |
// de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA |
// sur le site "http://www.cecill.info". |
// En contrepartie de l'accessibilité au code source et des droits de copie, |
// de modification et de redistribution accordés par cette licence, il n'est |
// offert aux utilisateurs qu'une garantie limitée. Pour les mêmes raisons, |
// seule une responsabilité restreinte pèse sur l'auteur du programme, le |
// titulaire des droits patrimoniaux et les concédants successifs. |
// A cet égard l'attention de l'utilisateur est attirée sur les risques |
// associés au chargement, à l'utilisation, à la modification et/ou au |
// développement et à la reproduction du logiciel par l'utilisateur étant |
// donné sa spécificité de logiciel libre, qui peut le rendre complexe à |
// manipuler et qui le réserve donc à des développeurs et des professionnels |
// avertis possédant des connaissances informatiques approfondies. Les |
// utilisateurs sont donc invités à charger et tester l'adéquation du |
// logiciel à leurs besoins dans des conditions permettant d'assurer la |
// sécurité de leurs systèmes et ou de leurs données et, plus généralement, |
// à l'utiliser et l'exploiter dans les mêmes conditions de sécurité. |
// Le fait que vous puissiez accéder à cet en-tête signifie que vous avez |
// pris connaissance de la licence CeCILL, et que vous en avez accepté les |
// termes. |
// ---- |
// CVS : $Id: bazar.calendrier.php,v 1.10 2007-04-11 08:30:12 neiluj Exp $ |
/** |
* bazar_calendrier : programme affichant les evenements du bazar sous forme de Calendrier |
* |
* |
*@package Bazar |
//Auteur original : |
*@author David DELON <david.delon@clapas.net> |
*@version $Revision: 1.10 $ $Date: 2007-04-11 08:30:12 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
if (!defined('BAZ_VOIR_FICHE')) { |
define ('BAZ_VOIR_FICHE', 8); |
} |
include_once 'configuration/baz_config.inc.php'; //fichier de configuration de Bazar |
include_once 'bibliotheque/bazar.fonct.php'; //fichier des fonctions de Bazar |
include_once 'bibliotheque/bazar.fonct.cal.php'; //fichier des fonctions de Bazar |
function afficherContenuCorps() { |
return GestionAffichageCalendrier('calendrier'); |
} |
?> |
/tags/2014_06_04/bazar.inscription.inc.php |
---|
New file |
0,0 → 1,86 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: bazar.inscription.inc.php,v 1.8 2007-07-04 10:06:21 alexandre_tb Exp $ |
/** |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2005 |
*@version $Revision: 1.8 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// RAPPEL : On se situe dans la fonction afficherContenuCorps() de inscription.php |
// requete pour récupérer l'ensemble des type d'annonces |
if (!file_exists (INS_CHEMIN_APPLI.'../bazar/bazar.inscription.local.php')) { |
$requete = 'SELECT bn_id_nature FROM bazar_nature WHERE 1' ; |
$resultat = $GLOBALS['ins_db']->query ($requete); |
$SQL = '' ; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) { |
$SQL .= '('.$id_utilisateur.', '.$ligne->bn_id_nature.', 1),' ; |
} |
$SQL = substr ($SQL, 0, strlen ($SQL) - 1) ; |
$requete = 'INSERT INTO bazar_droits VALUES '.$SQL; |
$resultat = $GLOBALS['ins_db']->query($requete); |
if (DB::isError($resultat)) { |
$msg = $resultat->getMessage().$resultat->getDebugInfo() ; |
} |
unset($resultat) ; |
} else { |
include_once INS_CHEMIN_APPLI.'../bazar/bazar.inscription.local.php'; |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.7 2007-06-01 13:51:09 alexandre_tb |
* suppression de l echo en cas d erreur |
* mise en place de $msg pour recuperer les erreurs |
* |
* Revision 1.6 2007/04/11 08:30:12 neiluj |
* remise en état du CVS... |
* |
* Revision 1.4.2.1 2007/03/07 16:50:42 jp_milcent |
* Mise en majuscule des mots réservés par SQL |
* |
* Revision 1.4 2006/12/01 13:23:17 florian |
* integration annuaire backoffice |
* |
* Revision 1.3 2006/04/28 16:10:17 florian |
* inscrit d'office tous les utilisateurs en rédacteur de fiches |
* |
* Revision 1.2 2006/03/29 13:06:07 alexandre_tb |
* Code initial |
* |
* Revision 1.1 2005/09/29 16:14:17 alexandre_tb |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2014_06_04/index.php |
---|
New file |
0,0 → 1,66 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: index.php,v 1.5 2005-11-30 13:58:45 florian Exp $ |
/** |
* Index |
* |
* Première page chargée du répertoire de l'appli bazar. Sert à tester l'appli |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@author Florian SCHMITT <florian@ecole-et-nature.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.5 $ $Date: 2005-11-30 13:58:45 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | CORPS du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
include "bazar.php"; |
echo afficherContenuCorps(); |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.4 2005/07/21 19:03:12 florian |
* nouveautés bazar: templates fiches, correction de bugs, ... |
* |
* Revision 1.2 2005/02/22 15:34:04 florian |
* integration dans Papyrus |
* |
* Revision 1.1.1.1 2005/02/17 18:05:11 florian |
* Import initial de Bazar |
* |
* Revision 1.1.1.1 2005/02/17 11:09:50 florian |
* Import initial |
* |
* Revision 1.1.1.1 2005/02/16 18:06:35 florian |
* import de la nouvelle version |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2014_06_04/squelettes/baz_cal.tpl.html |
---|
New file |
0,0 → 1,13 |
<!-- ENTETE DU CALENDRIER --> |
<div class="navi"> |
<a href="<?= $prev ; ?>" id="navi_ant"> << </a> |
|
<a href="<?= $cur; ?>"> |
<?= $fr_month[(date('n',$curStamp))]; ?> |
|
<?= date('Y',$curStamp); ?> |
</a> |
|
<a href="<?= $next ;?>" id="navi_post"> >> </a> |
</div> |
<!-- FIN ENTETE CALENDRIER --> |
/tags/2014_06_04/squelettes/baz_post_validation.tpl.html |
---|
New file |
0,0 → 1,8 |
<p>Votre fiche à bien été validée. Vous pouvez : |
<ul> |
<li><a href="<?php echo $lien_duplication; ?>">Dupliquer cette fiche</a> pour proposer par exemple le même évènement à une autre date</li> |
<li><a href="<?php echo $lien_nouvelle_fiche; ?>">Saisir une nouvelle fiche</a></li> |
<li><a href="<?php echo $lien_mes_fiches; ?>">Retourner à ma liste de fiches</a></li> |
<li><a href="<?php echo $lien_visualiser_fiche; ?>">Visualiser la fiche créée</a></li> |
</ul> |
</p> |
/tags/2014_06_04/langues/baz_langue_hu.inc.php |
---|
New file |
0,0 → 1,136 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: baz_langue_hu.inc.php,v 1.1 2007-10-23 14:30:06 alexandre_tb Exp $ |
/** |
* Fichier de traduction en anglais de l'application Bazar |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.1 $ $Date: 2007-10-23 14:30:06 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
define ('BAZ_CONSULTER', 'Kereses'); |
define ('BAZ_VOIR_VOS_ANNONCES', 'Irt Oldala'); |
define ('BAZ_S_ABONNER', 'Regisztrál'); |
define ('BAZ_SAISIR', 'Irjon egy oldalt'); |
define ('BAZ_ADMINISTRER', 'Rendezze'); |
define ('BAZ_GESTION_DES_DROITS', 'Jobb'); |
define ('BAZ_TOUTES_LES_ANNONCES', 'Minden oldal'); |
define ('BAZ_TYPEANNONCE', 'Oldal tipusa'); |
define ('BAZ_TOUS_TYPES_FICHES', 'Minden tipusu oldal'); |
define ('BAZ_VALIDE', 'Jóváhagyás'); |
define ('BAZ_FICHES_PAS_VALIDEES', 'Nem ellenorzott'); |
define ('BAZ_FICHES_VALIDEES', 'Ellenorzott'); |
define ('BAZ_LES_DEUX', 'Ketto egyutt'); |
define ('BAZ_MOT_CLE', 'Kulcsszavak'); |
define ('BAZ_RECHERCHER', 'Keresés'); |
define ('BAZ_MODIFIER', 'Frissít'); |
define ('BAZ_SUPPRIMER', 'Töröl'); |
define ('BAZ_SUIVANT', 'Kovetkezo'); |
define ('BAZ_PRECEDENT', 'Elözõ'); |
define ('BAZ_ANNULER', 'Töröl'); |
define ('BAZ_VALIDER', 'Ok'); |
define ('BAZ_IL_Y_A', ''); |
define ('BAZ_FICHES_CORRESPONDANTES', ' keresés eredmemnyei'); |
define ('BAZ_VOS_ANNONCES', 'Oldala'); |
define ('BAZ_PUBLIEE', 'Editált'); |
define ('BAZ_SAISIR_UNE_NOUVELLE_FICHE', 'irj uj oldalt'); |
define ('BAZ_LE', 'A'); |
define ('BAZ_NB_VUS', 'Ez az oldalmeglátogatott'); |
define ('BAZ_FOIS', ' Hányszor'); |
define ('BAZ_DU', 'Kitõl'); |
define ('BAZ_AU', 'Kinek'); |
define ('BAZ_DATE_CREATION', 'Létrehozott a'); |
define ('BAZ_DATE_MAJ', 'Frissités'); |
define ('BAZ_FICHE_NUMERO', 'Oldal szám'); |
define ('BAZ_ECRITE', ' Valaki írta '); |
define ('BAZ_INVALIDER_LA_FICHE', 'Nem editált'); |
define ('BAZ_MODIFIER_LA_FICHE', 'Módosítás'); |
define ('BAZ_SUPPRIMER_LA_FICHE', 'Törlés'); |
define ('BAZ_S_INSCRIRE_AUX_ANNONCES', 'Regisztrált'); |
define ('BAZ_LAIUS_S_ABONNER', ''); |
define ('BAZ_PAS_ABONNE', 'Nem regisztrált'); |
define ('BAZ_SE_DESABONNER', 'Nem regisztrált'); |
define ('BAZ_ABONNE', 'Regisztrált'); |
define ('BAZ_URL_LIEN', 'URL'); |
define ('BAZ_URL_TEXTE', 'A link szövege'); |
define ('BAZ_FICHIER_DESCRIPTION', 'Fijle leírása'); |
define ('BAZ_FICHIER_JOINT', 'Válassz egy fijlt'); |
define ('BAZ_IMAGE_VALIDE_REQUIS', 'Érvénytelen kép'); |
define ('BAZ_IDENTIFIEZ_VOUS_POUR_SAISIR', 'Please, log in'); |
define ('BAZ_ANNONCES_A_ADMINISTRER', 'Adminisztrativ oldalak'); |
define ('BAZ_OUI', 'Igen'); |
define ('BAZ_NON', 'Nem'); |
define ('BAZ_TOUTES_LES_FICHES', 'Minden oldal'); |
define ('BAZ_DESCRIPTION_GESTION_DES_DROITS', ''); |
define ('BAZ_LABEL_CHOIX_PERSONNE', 'Válassz valakit'); |
define ('BAZ_SELECTION', 'Válassz...'); |
define ('BAZ_PASSER_SUPERADMINISTRATEUR', 'Változtass, hogy kiemelt adminisztrátorlegyél'); |
define ('BAZ_DROITS_PAR_TYPE', 'Tipusonkénti jog'); |
define ('BAZ_LABEL_REDACTEUR', 'Iró'); |
define ('BAZ_AUCUN_DROIT', 'Nem jogosult'); |
define ('BAZ_DROIT_ADMIN', 'Admin'); |
define ('BAZ_JANVIER','Január'); |
define ('BAZ_FEVRIER','Február'); |
define ('BAZ_MARS','Március'); |
define ('BAZ_AVRIL','Április'); |
define ('BAZ_MAI','Május'); |
define ('BAZ_JUIN','Június'); |
define ('BAZ_JUILLET','Július'); |
define ('BAZ_AOUT','Augusztus'); |
define ('BAZ_SEPTEMBRE','Szeptember'); |
define ('BAZ_OCTOBRE','Október'); |
define ('BAZ_NOVEMBRE','November'); |
define ('BAZ_DECEMBRE','December'); |
define ('BAZ_LUNDI','Hétfõ'); |
define ('BAZ_MARDI','Kedd'); |
define ('BAZ_MERCREDI','Szerda'); |
define ('BAZ_JEUDI','Csütörtök'); |
define ('BAZ_VENDREDI','Péntek'); |
define ('BAZ_SAMEDI','Szombat'); |
define ('BAZ_DIMANCHE','Vasárnap'); |
define ('BAZ_LUNDI_COURT','Hét'); |
define ('BAZ_MARDI_COURT','Ked'); |
define ('BAZ_MERCREDI_COURT','Szer'); |
define ('BAZ_JEUDI_COURT','Csut'); |
define ('BAZ_VENDREDI_COURT','Pén'); |
define ('BAZ_SAMEDI_COURT','Szo'); |
define ('BAZ_DIMANCHE_COURT','Vas'); |
?> |
/tags/2014_06_04/langues/baz_langue_it.inc.php |
---|
New file |
0,0 → 1,136 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: baz_langue_it.inc.php,v 1.1 2007-10-23 14:30:06 alexandre_tb Exp $ |
/** |
* Fichier de traduction en anglais de l'application Bazar |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.1 $ $Date: 2007-10-23 14:30:06 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
define ('BAZ_CONSULTER', 'Ricerca'); |
define ('BAZ_VOIR_VOS_ANNONCES', 'I vostri strati'); |
define ('BAZ_S_ABONNER', 'Registrarsi'); |
define ('BAZ_SAISIR', 'Scrivere'); |
define ('BAZ_ADMINISTRER', 'Dirigere'); |
define ('BAZ_GESTION_DES_DROITS', 'Diritti'); |
define ('BAZ_TOUTES_LES_ANNONCES', 'Tutte le schede'); |
define ('BAZ_TYPEANNONCE', 'Tipo di scheda'); |
define ('BAZ_TOUS_TYPES_FICHES', 'Qualsiasi tipo di schede'); |
define ('BAZ_VALIDE', 'Convalida'); |
define ('BAZ_FICHES_PAS_VALIDEES', 'Schede non convalidate'); |
define ('BAZ_FICHES_VALIDEES', 'Schede convalidate'); |
define ('BAZ_LES_DEUX', 'I due'); |
define ('BAZ_MOT_CLE', 'Parole chiave'); |
define ('BAZ_RECHERCHER', 'Cercare'); |
define ('BAZ_MODIFIER', 'Modificare'); |
define ('BAZ_SUPPRIMER', 'distruggere'); |
define ('BAZ_SUIVANT', 'secondo'); |
define ('BAZ_PRECEDENT', 'precedente'); |
define ('BAZ_ANNULER', 'annuler'); |
define ('BAZ_VALIDER', 'Ok'); |
define ('BAZ_IL_Y_A', 'C\'è'); |
define ('BAZ_FICHES_CORRESPONDANTES', ' risultati alla vostra richiesta'); |
define ('BAZ_VOS_ANNONCES', 'le vostre schede'); |
define ('BAZ_PUBLIEE', 'pubblicare'); |
define ('BAZ_SAISIR_UNE_NOUVELLE_FICHE', 'afferrare'); |
define ('BAZ_LE', 'Il'); |
define ('BAZ_NB_VUS', 'Questa pagina è stata visitata '); |
define ('BAZ_FOIS', ' volta'); |
define ('BAZ_DU', 'da allora'); |
define ('BAZ_AU', 'a'); |
define ('BAZ_DATE_CREATION', 'creata il'); |
define ('BAZ_DATE_MAJ', 'Aggiornamento'); |
define ('BAZ_FICHE_NUMERO', 'numero di scheda '); |
define ('BAZ_ECRITE', ' scritta da'); |
define ('BAZ_INVALIDER_LA_FICHE', 'Non convalidare'); |
define ('BAZ_MODIFIER_LA_FICHE', 'Modificare'); |
define ('BAZ_SUPPRIMER_LA_FICHE', 'Destrugere'); |
define ('BAZ_S_INSCRIRE_AUX_ANNONCES', 'apparire'); |
define ('BAZ_LAIUS_S_ABONNER', 'sottoscriversi'); |
define ('BAZ_PAS_ABONNE', 'non sottoscritto'); |
define ('BAZ_SE_DESABONNER', 'annullare la sua sottoscrizione'); |
define ('BAZ_ABONNE', 'abbonato'); |
define ('BAZ_URL_LIEN', 'URL'); |
define ('BAZ_URL_TEXTE', 'testo del legame'); |
define ('BAZ_FICHIER_DESCRIPTION', 'Descrizione dell\'archivio'); |
define ('BAZ_FICHIER_JOINT', 'Scegliete un archivio'); |
define ('BAZ_IMAGE_VALIDE_REQUIS', 'invalidare l\'immagine'); |
define ('BAZ_IDENTIFIEZ_VOUS_POUR_SAISIR', 'Please, log in'); |
define ('BAZ_ANNONCES_A_ADMINISTRER', 'schede da dirigere'); |
define ('BAZ_OUI', 'Si'); |
define ('BAZ_NON', 'No'); |
define ('BAZ_TOUTES_LES_FICHES', 'Tutte le schede'); |
define ('BAZ_DESCRIPTION_GESTION_DES_DROITS', 'Gestione dei diritti'); |
define ('BAZ_LABEL_CHOIX_PERSONNE', 'scegliete qualcuno'); |
define ('BAZ_SELECTION', 'scegliete...'); |
define ('BAZ_PASSER_SUPERADMINISTRATEUR', 'diventare super amministratore'); |
define ('BAZ_DROITS_PAR_TYPE', 'diritti per tipo di sheda'); |
define ('BAZ_LABEL_REDACTEUR', 'autore'); |
define ('BAZ_AUCUN_DROIT', 'senza diritti'); |
define ('BAZ_DROIT_ADMIN', 'Admin'); |
define ('BAZ_JANVIER','Gennaio'); |
define ('BAZ_FEVRIER','Febbraio'); |
define ('BAZ_MARS','Marzo '); |
define ('BAZ_AVRIL','Aprile'); |
define ('BAZ_MAI','Maggio'); |
define ('BAZ_JUIN','Giugno'); |
define ('BAZ_JUILLET','Luglio'); |
define ('BAZ_AOUT','Agosto'); |
define ('BAZ_SEPTEMBRE','Settembre'); |
define ('BAZ_OCTOBRE','Ottobre'); |
define ('BAZ_NOVEMBRE','Novembre'); |
define ('BAZ_DECEMBRE','Dicembre'); |
define ('BAZ_LUNDI','Lunedì'); |
define ('BAZ_MARDI','Martedì '); |
define ('BAZ_MERCREDI','Mercoledì'); |
define ('BAZ_JEUDI','Giovedì '); |
define ('BAZ_VENDREDI','Venerdì'); |
define ('BAZ_SAMEDI','Sabato'); |
define ('BAZ_DIMANCHE','Domenica'); |
define ('BAZ_LUNDI_COURT','Lun'); |
define ('BAZ_MARDI_COURT','Mar'); |
define ('BAZ_MERCREDI_COURT','Mer'); |
define ('BAZ_JEUDI_COURT','Gio'); |
define ('BAZ_VENDREDI_COURT','Ven'); |
define ('BAZ_SAMEDI_COURT','Sab'); |
define ('BAZ_DIMANCHE_COURT','Dom'); |
?> |
/tags/2014_06_04/langues/baz_langue_fr.admin.inc.php |
---|
New file |
0,0 → 1,55 |
<?php |
//vim: set expandtab tabstop=4 shiftwidth=4: |
// Copyright (C) 1999-2004 Tela Botanica (accueil@tela-botanica.org) |
// |
// Ce logiciel est un programme informatique servant à gérer du contenu et des |
// applications web. |
// Ce logiciel est régi par la licence CeCILL soumise au droit français et |
// respectant les principes de diffusion des logiciels libres. Vous pouvez |
// utiliser, modifier et/ou redistribuer ce programme sous les conditions |
// de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA |
// sur le site "http://www.cecill.info". |
// En contrepartie de l'accessibilité au code source et des droits de copie, |
// de modification et de redistribution accordés par cette licence, il n'est |
// offert aux utilisateurs qu'une garantie limitée. Pour les mêmes raisons, |
// seule une responsabilité restreinte pèse sur l'auteur du programme, le |
// titulaire des droits patrimoniaux et les concédants successifs. |
// A cet égard l'attention de l'utilisateur est attirée sur les risques |
// associés au chargement, à l'utilisation, à la modification et/ou au |
// développement et à la reproduction du logiciel par l'utilisateur étant |
// donné sa spécificité de logiciel libre, qui peut le rendre complexe à |
// manipuler et qui le réserve donc à des développeurs et des professionnels |
// avertis possédant des connaissances informatiques approfondies. Les |
// utilisateurs sont donc invités à charger et tester l'adéquation du |
// logiciel à leurs besoins dans des conditions permettant d'assurer la |
// sécurité de leurs systèmes et ou de leurs données et, plus généralement, |
// à l'utiliser et l'exploiter dans les mêmes conditions de sécurité. |
// Le fait que vous puissiez accéder à cet en-tête signifie que vous avez |
// pris connaissance de la licence CeCILL, et que vous en avez accepté les |
// termes. |
// ---- |
// CVS : $Id: baz_langue_fr.admin.inc.php,v 1.1 2007-02-02 14:01:53 alexandre_tb Exp $ |
/** |
* Papyrus : Programme d'administration du bazar |
* |
* Fichier de de langue |
*@package Bazar |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2007 |
*@version $Revision: 1.1 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
/* +--Fin du code ---------------------------------------------------------------------------------------+ |
* $Log: not supported by cvs2svn $ |
* +--Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2014_06_04/langues/baz_langue_en.inc.php |
---|
New file |
0,0 → 1,137 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: baz_langue_en.inc.php,v 1.4 2007-10-23 14:30:23 alexandre_tb Exp $ |
/** |
* Fichier de traduction en anglais de l'application Bazar |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.4 $ $Date: 2007-10-23 14:30:23 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
define ('BAZ_CONSULTER', 'Search'); |
define ('BAZ_VOIR_VOS_ANNONCES', 'Your sheets'); |
define ('BAZ_S_ABONNER', 'Register'); |
define ('BAZ_SAISIR', 'Write sheet'); |
define ('BAZ_ADMINISTRER', 'Administrate'); |
define ('BAZ_GESTION_DES_DROITS', 'Rights'); |
define ('BAZ_TOUTES_LES_ANNONCES', 'All sheets'); |
define ('BAZ_TYPEANNONCE', 'Type of sheet'); |
define ('BAZ_TOUS_TYPES_FICHES', 'All types of sheets'); |
define ('BAZ_VALIDE', 'Confirmation'); |
define ('BAZ_FICHES_PAS_VALIDEES', 'Unchecked'); |
define ('BAZ_FICHES_VALIDEES', 'Checked'); |
define ('BAZ_LES_DEUX', 'Both'); |
define ('BAZ_MOT_CLE', 'Keywords'); |
define ('BAZ_RECHERCHER', 'Search'); |
define ('BAZ_CHOISIR', 'Chose...'); |
define ('BAZ_MODIFIER', 'Update'); |
define ('BAZ_SUPPRIMER', 'Delete'); |
define ('BAZ_SUIVANT', 'Next'); |
define ('BAZ_PRECEDENT', 'Previous'); |
define ('BAZ_ANNULER', 'Cancel'); |
define ('BAZ_VALIDER', 'Ok'); |
define ('BAZ_IL_Y_A', ''); |
define ('BAZ_FICHES_CORRESPONDANTES', ' results match your query'); |
define ('BAZ_VOS_ANNONCES', 'Your sheets'); |
define ('BAZ_PUBLIEE', 'Edited'); |
define ('BAZ_SAISIR_UNE_NOUVELLE_FICHE', 'Write a new sheet'); |
define ('BAZ_LE', 'The'); |
define ('BAZ_NB_VUS', 'This page has been visited '); |
define ('BAZ_FOIS', ' times'); |
define ('BAZ_DU', 'From'); |
define ('BAZ_AU', 'To'); |
define ('BAZ_DATE_CREATION', 'Created on '); |
define ('BAZ_DATE_MAJ', 'Updated'); |
define ('BAZ_FICHE_NUMERO', 'Sheet number '); |
define ('BAZ_ECRITE', ' Written by '); |
define ('BAZ_INVALIDER_LA_FICHE', 'Unedit'); |
define ('BAZ_MODIFIER_LA_FICHE', 'Modify'); |
define ('BAZ_SUPPRIMER_LA_FICHE', 'Delete'); |
define ('BAZ_S_INSCRIRE_AUX_ANNONCES', 'Register'); |
define ('BAZ_LAIUS_S_ABONNER', ''); |
define ('BAZ_PAS_ABONNE', 'Not registered'); |
define ('BAZ_SE_DESABONNER', 'Unregisterd'); |
define ('BAZ_ABONNE', 'Registered'); |
define ('BAZ_URL_LIEN', 'URL'); |
define ('BAZ_URL_TEXTE', 'Text of the link'); |
define ('BAZ_FICHIER_DESCRIPTION', 'File description'); |
define ('BAZ_FICHIER_JOINT', 'Choose a file'); |
define ('BAZ_IMAGE_VALIDE_REQUIS', 'Invalid image'); |
define ('BAZ_ANNONCES_A_ADMINISTRER', 'Sheets to manage'); |
define ('BAZ_OUI', 'Yes'); |
define ('BAZ_NON', 'No'); |
define ('BAZ_TOUTES_LES_FICHES', 'All sheets'); |
define ('BAZ_IDENTIFIEZ_VOUS_POUR_SAISIR', 'Please, log in'); |
define ('BAZ_DESCRIPTION_GESTION_DES_DROITS', ''); |
define ('BAZ_LABEL_CHOIX_PERSONNE', 'Choose someone'); |
define ('BAZ_SELECTION', 'Select...'); |
define ('BAZ_PASSER_SUPERADMINISTRATEUR', 'Change to super admin'); |
define ('BAZ_DROITS_PAR_TYPE', 'Rights by type of sheet'); |
define ('BAZ_LABEL_REDACTEUR', 'Writer'); |
define ('BAZ_AUCUN_DROIT', 'No right'); |
define ('BAZ_DROIT_ADMIN', 'Admin'); |
define ('BAZ_JANVIER','January'); |
define ('BAZ_FEVRIER','February'); |
define ('BAZ_MARS','March'); |
define ('BAZ_AVRIL','April'); |
define ('BAZ_MAI','May'); |
define ('BAZ_JUIN','June'); |
define ('BAZ_JUILLET','July'); |
define ('BAZ_AOUT','August'); |
define ('BAZ_SEPTEMBRE','September'); |
define ('BAZ_OCTOBRE','October'); |
define ('BAZ_NOVEMBRE','November'); |
define ('BAZ_DECEMBRE','December'); |
define ('BAZ_LUNDI','Monday'); |
define ('BAZ_MARDI','Tuesday'); |
define ('BAZ_MERCREDI','Wednesday'); |
define ('BAZ_JEUDI','Thursday'); |
define ('BAZ_VENDREDI','Friday'); |
define ('BAZ_SAMEDI','Saturday'); |
define ('BAZ_DIMANCHE','Sunday'); |
define ('BAZ_LUNDI_COURT','Mon'); |
define ('BAZ_MARDI_COURT','Tue'); |
define ('BAZ_MERCREDI_COURT','Wed'); |
define ('BAZ_JEUDI_COURT','Thu'); |
define ('BAZ_VENDREDI_COURT','Fri'); |
define ('BAZ_SAMEDI_COURT','Sat'); |
define ('BAZ_DIMANCHE_COURT','Sun'); |
?> |
/tags/2014_06_04/langues/baz_langue_es.inc.php |
---|
New file |
0,0 → 1,136 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: baz_langue_es.inc.php,v 1.1 2007-10-23 14:30:06 alexandre_tb Exp $ |
/** |
* Fichier de traduction en anglais de l'application Bazar |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.1 $ $Date: 2007-10-23 14:30:06 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
define ('BAZ_CONSULTER', 'Buscar'); |
define ('BAZ_VOIR_VOS_ANNONCES', 'Sus fichas'); |
define ('BAZ_S_ABONNER', 'validar'); |
define ('BAZ_SAISIR', 'escrivir'); |
define ('BAZ_ADMINISTRER', 'administrar'); |
define ('BAZ_GESTION_DES_DROITS', 'Derechos'); |
define ('BAZ_TOUTES_LES_ANNONCES', 'Todas las fichas'); |
define ('BAZ_TYPEANNONCE', 'Tipo de fichas'); |
define ('BAZ_TOUS_TYPES_FICHES', 'Todos tipos de fichas'); |
define ('BAZ_VALIDE', 'validación'); |
define ('BAZ_FICHES_PAS_VALIDEES', 'fichas no validadas'); |
define ('BAZ_FICHES_VALIDEES', 'fichas validadas'); |
define ('BAZ_LES_DEUX', 'Los dos'); |
define ('BAZ_MOT_CLE', 'Password'); |
define ('BAZ_RECHERCHER', 'Buscar'); |
define ('BAZ_MODIFIER', 'Actualisar'); |
define ('BAZ_SUPPRIMER', 'Cancelar'); |
define ('BAZ_SUIVANT', 'Siguiente'); |
define ('BAZ_PRECEDENT', 'precedente'); |
define ('BAZ_ANNULER', 'Cancelar'); |
define ('BAZ_VALIDER', 'Ok'); |
define ('BAZ_IL_Y_A', 'Hay'); |
define ('BAZ_FICHES_CORRESPONDANTES', ' resultados por su busqueda'); |
define ('BAZ_VOS_ANNONCES', 'sus fichas'); |
define ('BAZ_PUBLIEE', 'Publicada'); |
define ('BAZ_SAISIR_UNE_NOUVELLE_FICHE', 'Escrivir una nueva ficha'); |
define ('BAZ_LE', 'El'); |
define ('BAZ_NB_VUS', 'Se visitó esta página'); |
define ('BAZ_FOIS', ' veces'); |
define ('BAZ_DU', 'desde'); |
define ('BAZ_AU', 'hasta'); |
define ('BAZ_DATE_CREATION', 'creado el '); |
define ('BAZ_DATE_MAJ', 'puesta al día'); |
define ('BAZ_FICHE_NUMERO', 'ficha numero '); |
define ('BAZ_ECRITE', ' escrita por '); |
define ('BAZ_INVALIDER_LA_FICHE', 'No publicar'); |
define ('BAZ_MODIFIER_LA_FICHE', 'Modificar'); |
define ('BAZ_SUPPRIMER_LA_FICHE', 'Cancelar'); |
define ('BAZ_S_INSCRIRE_AUX_ANNONCES', 'Registrar'); |
define ('BAZ_LAIUS_S_ABONNER', 'Suscribirse'); |
define ('BAZ_PAS_ABONNE', 'No registrado'); |
define ('BAZ_SE_DESABONNER', 'retirarse'); |
define ('BAZ_ABONNE', 'Registrado'); |
define ('BAZ_URL_LIEN', 'URL'); |
define ('BAZ_URL_TEXTE', 'exto del vínculo'); |
define ('BAZ_FICHIER_DESCRIPTION', 'descripción del fichero'); |
define ('BAZ_FICHIER_JOINT', 'Eligir un fichiero'); |
define ('BAZ_IMAGE_VALIDE_REQUIS', 'Invalidar imagen'); |
define ('BAZ_IDENTIFIEZ_VOUS_POUR_SAISIR', 'Please, log in'); |
define ('BAZ_ANNONCES_A_ADMINISTRER', 'fichas que deben administrarse'); |
define ('BAZ_OUI', 'Si'); |
define ('BAZ_NON', 'No'); |
define ('BAZ_TOUTES_LES_FICHES', 'Todas fichas'); |
define ('BAZ_DESCRIPTION_GESTION_DES_DROITS', 'Derechos'); |
define ('BAZ_LABEL_CHOIX_PERSONNE', 'Eligir alguien'); |
define ('BAZ_SELECTION', 'Seleccionar'); |
define ('BAZ_PASSER_SUPERADMINISTRATEUR', 'Change to super admin'); |
define ('BAZ_DROITS_PAR_TYPE', 'Derechos por categoria'); |
define ('BAZ_LABEL_REDACTEUR', 'Redactor'); |
define ('BAZ_AUCUN_DROIT', 'No derechos'); |
define ('BAZ_DROIT_ADMIN', 'Admin'); |
define ('BAZ_JANVIER','Enero'); |
define ('BAZ_FEVRIER','Febrero'); |
define ('BAZ_MARS','marzo'); |
define ('BAZ_AVRIL','Abril'); |
define ('BAZ_MAI','Mayo'); |
define ('BAZ_JUIN','Junio'); |
define ('BAZ_JUILLET','Julio'); |
define ('BAZ_AOUT','Agosto'); |
define ('BAZ_SEPTEMBRE','Setiembr'); |
define ('BAZ_OCTOBRE','Octubre'); |
define ('BAZ_NOVEMBRE','noviembre'); |
define ('BAZ_DECEMBRE','Deciembre'); |
define ('BAZ_LUNDI','lunes'); |
define ('BAZ_MARDI','Martes'); |
define ('BAZ_MERCREDI','Miercoles'); |
define ('BAZ_JEUDI','Jueves'); |
define ('BAZ_VENDREDI','viernes'); |
define ('BAZ_SAMEDI','Sabado'); |
define ('BAZ_DIMANCHE','Domingo'); |
define ('BAZ_LUNDI_COURT','Lun'); |
define ('BAZ_MARDI_COURT','Mar'); |
define ('BAZ_MERCREDI_COURT','Mier'); |
define ('BAZ_JEUDI_COURT','Jue'); |
define ('BAZ_VENDREDI_COURT','Vie'); |
define ('BAZ_SAMEDI_COURT','Sab'); |
define ('BAZ_DIMANCHE_COURT','Dom'); |
?> |
/tags/2014_06_04/langues/baz_langue_fr.inc.php |
---|
New file |
0,0 → 1,673 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: baz_langue_fr.inc.php,v 1.67 2008-11-19 09:28:46 aperonnet Exp $ |
/** |
* Fichier de traduction en français de l'application Bazar |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.67 $ $Date: 2008-11-19 09:28:46 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
if (file_exists(BAZ_CHEMIN_APPLI.'langues/baz_langue_fr.local.php')) { |
include_once BAZ_CHEMIN_APPLI.'langues/baz_langue_fr.local.php' ; |
} |
$GLOBALS['jours'] = array (1 => 'lundi', 2 => 'mardi', 3 => 'mercredi', 4 => 'jeudi', 5 => 'vendredi', |
6 => 'samedi', 0 => 'dimanche') ; |
$GLOBALS['mois'] = array (1 => 'janvier', 2 => 'février', 3 => 'mars', 4 => 'avril', 5 => 'mai', 6 => 'juin', |
7 => 'juillet', 8 => 'août', 9 => 'septembre', 10 => 'octobre', 11 =>'novembre', |
12 => 'décembre') ; |
define ('BAZ_TITREAPPLI','Gestionnaire de fiches (Bazar) '); |
define ('BAZ_DESCRIPTIONAPPLI','Découvrez Bazar, une application de gestion de fiches classées, consultables en ligne ou par flux RSS, grandement personnalisable.'); |
define ('BAZ_MOTS_CLES','Bazar, fiches, flux, rss, nouveauté, information, gestionnaire, xml, syndication, info, application, php, dynamique, mise, aacute; , jour '); |
if (!defined ('BAZ_TOUTES_LES_ANNONCES')) define ('BAZ_TOUTES_LES_ANNONCES', 'Consulter les fiches'); |
define ('BAZ_CONSULTER_FICHES_VALIDEES', 'Consulter les fiches validées'); |
define ('BAZ_TOUTES_LES_ANNONCES_DE_TYPE', 'Consulter toutes les fiches de type :'); |
define ('BAZ_TOUS_TYPES_FICHES', 'Tous types de fiches'); |
if (!defined ('BAZ_TOUS_LES_EMETTEURS')) define ('BAZ_TOUS_LES_EMETTEURS', 'Tous les emetteurs'); |
define ('BAZ_ENTRER_VOS_CRITERES_DE_RECHERCHE','Précisez vos critères de recherche et appuyez sur le bouton "Rechercher" pour consulter les fiches.'); |
define ('BAZ_MODIFIE_RSS','Modifié : ' ); |
define ('BAZ_NOM', 'Nom') ; |
define ('BAZ_PRENOM', 'Prénom') ; |
define ('BAZ_TOUS', 'Tous'); |
define ('BAZ_TOUTES', 'Toutes'); |
define ('BAZ_MOT_CLE', 'Mots clés (facultatif)'); |
if (!defined ('BAZ_EMETTEUR')) define ('BAZ_EMETTEUR', 'Émetteur'); |
define ('BAZ_NATURE', 'Nature de la fiche' ); |
define ('BAZ_STATUT', 'Statut' ); |
define ('BAZ_DATE_CREATION', 'Date de création' ); |
define ('BAZ_DATE_MAJ', 'Date de mise à jour' ); |
define ('BAZ_URL_IMAGE', 'Image' ); |
define ('BAZ_LANGUES_PARLES', 'Langues parlés :') ; |
define ('BAZ_EMAIL', 'E-mail :') ; |
define ('BAZ_MOT_DE_PASSE', 'Mot de passe') ; |
define ('BAZ_TITREANNONCE', 'Titre de la fiche') ; |
if (!defined ('BAZ_TYPEANNONCE')) define ('BAZ_TYPEANNONCE', 'Type de fiche') ; |
define ('BAZ_ANNONCEUR', 'Annonceur') ; |
define ('BAZ_REPETE_MOT_DE_PASSE', 'Répéter le mot de passe :') ; |
define ('BAZ_OUI', 'Oui') ; |
define ('BAZ_NON', 'Non') ; |
define ('BAZ_ANNULER', 'Annuler') ; |
define ('BAZ_RETOUR', 'Retour') ; |
define ('BAZ_RETABLIR', 'Rétablir') ; |
define ('BAZ_VALIDER', 'Valider') ; |
define ('BAZ_PUBLIER', 'Valider la publication') ; |
define ('BAZ_ETATPUBLICATION', 'Etat de publication') ; |
define ('BAZ_ENCOURSDEVALIDATION', 'En attente de validation'); |
define ('BAZ_REJETEE', 'Rejetée'); |
define ('BAZ_PUBLIEE', 'Publiée') ; |
define ('BAZ_PAS_DE_FICHE', '<br />Vous n\'avez pas encore déposé de fiches.') ; |
define ('BAZ_PAS_DE_FICHE_A_VALIDER', 'Pas de fiche à valider pour l\'instant.'); |
define ('BAZ_VOS_ANNONCES', 'Vos fiches déposées') ; |
define ('BAZ_ANNONCES_A_ADMINISTRER', 'Les fiches à valider') ; |
define ('BAZ_MOTS_DE_PASSE_DIFFERENTS', 'Les mots de passe sont différents !') ; |
define ('BAZ_EMAIL_REQUIS', 'Vous devez saisir un email.') ; |
define ('BAZ_MOT_DE_PASSE_REQUIS', 'Vous devez saisir un mot de passe.') ; |
define ('BAZ_MAIL_INCORRECT', 'L\'email doit avoir une forme correcte, utilisateur@domaine.ext') ; |
define ('BAZ_MAIL_DOUBLE', 'Cet email est déjà utilisé par quelqu\'un d\'autre') ; |
define ('BAZ_NOTE_REQUIS', 'Indique les champs requis') ; |
define ('BAZ_ERREUR_SAISIE', 'Erreur de saisie ') ; |
define ('BAZ_VEUILLEZ_CORRIGER', 'Veuillez corriger') ; |
define ('BAZ_VOIR_LA_FICHE', 'Voir la fiche'); |
define ('BAZ_MODIFIER', 'Modifier') ; |
define ('BAZ_MODIFIER_LA_FICHE', 'Modifier la fiche') ; |
define ('BAZ_SUPPRIMER', 'Supprimer') ; |
define ('BAZ_SELECTION', '--Sélectionnez ici--'); |
define ('BAZ_DROITS_PAR_TYPE', 'Droits par type de fiches:'); |
define ('BAZ_TITRE_SAISIE_ANNONCE', 'Entrer une fiche de type: '); |
define ('BAZ_ACCUEIL','Accueil'); |
define ('BAZ_SORTIRDELAPPLI','Quittez l\'application Bazar'); |
define ('BAZ_DEPOSE_UNE_NOUVELLE_ANNONCE', 'Saisir une fiche') ; |
define ('BAZ_CHOIX_TYPEANNONCE', 'Choisissez le type de fiche que vous souhaitez déposer :') ; |
if (!defined('BAZ_GESTION_DES_DROITS')) define ('BAZ_GESTION_DES_DROITS', 'Gestion des droits'); |
define ('BAZ_DESCRIPTION_GESTION_DES_DROITS', 'Veuillez choisir un utilisateur dans la liste déroulante ci-dessous pour administrer ses droits.'); |
define ('BAZ_LABEL_CHOIX_PERSONNE', 'Choix de la personne dans l\'annuaire : '); |
define ('BAZ_CONFIRMATION_SUPPRESSION', 'Etes-vous sûr de vouloir supprimer cette fiche ?') ; |
define ('BAZ_NON_VALIDE', 'Non valide') ; |
define ('BAZ_VALIDE', 'Valide') ; |
define ('BAZ_VALIDER_LA_FICHE', 'Valider la fiche') ; |
define ('BAZ_PRECEDENT', 'Précédent') ; |
define ('BAZ_SUIVANT', 'Suivant') ; |
define ('BAZ_PAS_DE_FICHE_CRIT', 'Pas de fiche correspondant à vos critères.') ; |
define ('BAZ_TEXTE_IMG_ALTERNATIF', 'Image de la fiche'); |
define ('BAZ_NUM_FICHE', 'Numéro de fiche'); |
define ('BAZ_ADMIN_ANNONCES', 'Modifier les types de fiches'); |
define ('BAZ_RECHERCHER_DES_ANNONCES', 'Rechercher des fiches'); |
define ('BAZ_RECHERCHE_AVANCEE', 'Recherche avancée >>'); |
define ('BAZ_RECHERCHE_DE_BASE','<< Recherche simple'); |
define ('BAZ_DESCRIPTION_RECHERCHE', 'En précisant, ci dessus, le type de fiche cherché, vous pourrez obtenir des fonctions de recherche avancé.'); |
define ('BAZ_PAS_D_ANNONCES', 'Pas de fiches trouvées.'); |
if (!defined ('BAZ_S_INSCRIRE_AUX_ANNONCES')) define ('BAZ_S_INSCRIRE_AUX_ANNONCES', 'S\'abonner à un type de fiche'); |
define ('BAZ_ABONNE', 'Abonné'); |
define ('BAZ_PAS_ABONNE', 'Pas abonné'); |
define ('BAZ_S_ABONNER', 'S\'abonner'); |
if (!defined ('BAZ_LAIUS_S_ABONNER')) define ('BAZ_LAIUS_S_ABONNER', 'Il y a deux manières de s\'abonner:<br />- soit en s\'abonnant pour recevoir les fiches par mails<br />- soit par flux RSS'); |
define ('BAZ_SE_DESABONNER', 'Se désabonner'); |
define ('BAZ_RSS', 'Flux RSS'); |
define ('BAZ_DERNIERE_ACTU', 'Dernières actualités'); |
if (!defined ('BAZ_DERNIERES_FICHES')) define ('BAZ_DERNIERES_FICHES', 'Les dernières fiches enregistrées'); |
define ('BAZ_A_MODERER',' à modérer'); |
define ('BAZ_CONSULTER','Consulter'); |
define ('BAZ_SAISIR','Saisir'); |
define ('BAZ_ADMINISTRER','Administrer'); |
define ('BAZ_FICHE_ECRITE','Fiche écrite par : '); |
define ('BAZ_NB_VUS','Cette fiche a été consultée '); |
define ('BAZ_FOIS', ' fois depuis sa création.'); |
define ('BAZ_LES_COMMENTAIRES', 'Les commentaires sur cette fiche'); |
define ('BAZ_PAS_DE_COMMENTAIRES', 'Pas de commentaires postés pour l\'instant, identifiez vous pour poster le premier !'); |
define ('BAZ_IL_Y_A', 'Il y a '); |
define ('BAZ_COMMENTAIRE', 'commentaire : '); |
define ('BAZ_COMMENTAIRES', 'commentaires : '); |
define ('BAZ_COMMENTAIRE_AUTH', 'Identifiez vous pour ajouter le votre !'); |
define ('BAZ_ENTREZ_VOTRE_NOM', 'Entrez votre nom : '); |
define ('BAZ_ENTREZ_VOTRE_COMMENTAIRE', 'Entrez votre commentaire : '); |
define ('BAZ_ENVOYER','Envoyer'); |
define ('BAZ_NOM_REQUIS', 'Le champs nom ne doit pas rester vide'); |
define ('BAZ_COMMENTAIRE_REQUIS', 'Le champs commentaire ne doit pas rester vide'); |
define ('BAZ_LES_STRUCTURES_POSSEDANT_UNE_RESSOURCE', 'Les structures possédant cette ressource'); |
define ('BAZ_FICHES_PAS_VALIDEES','Seulement les fiches pas validées'); |
define ('BAZ_FICHES_VALIDEES','Seulement les fiches validées'); |
define ('BAZ_LES_DEUX','Fiches validées et non validées'); |
define ('BAZ_VOIR_VOS_ANNONCES', 'Vos fiches'); |
define ('BAZ_RECHERCHER','Rechercher'); |
define ('BAZ_SAISIR_UNE_NOUVELLE_FICHE','Saisir une nouvelle fiche'); |
define ('BAZ_POUR_CHANGER_IMAGE','Pour changer d\'image, il suffit d\'en saisir une autre ci dessous.'); |
define ('BAZ_CONFIRMATION_SUPPRESSION_LIEN', 'Etes-vous sûr de vouloir supprimer ce lien ?') ; |
define ('BAZ_CONFIRMATION_SUPPRESSION_FICHIER', 'Etes-vous sûr de vouloir supprimer ce fichier ?') ; |
define ('BAZ_CONFIRMATION_SUPPRESSION_IMAGE', 'Etes-vous sûr de vouloir supprimer cette image ?') ; |
define ('BAZ_VALIDER_PUBLICATION', 'Valider la publication'); |
define ('BAZ_ENTRER_PROJET', 'ENTRER SUR L\'ESPACE DU PROJET'); |
define ('BAZ_GOOGLE_MSG', '<br />Si l\'évènement est bien situé vous pouvez valider la fiche<br />'); |
define ('BAZ_SUPPRIMER_LA_FICHE', 'Supprimer la fiche'); |
define ('BAZ_INVALIDER_LA_FICHE', 'Invalider la fiche'); |
define ('BAZ_TOUTES_LES_FICHES', 'Toutes les fiches'); |
define ('BAZ_LATITUDE', 'Latitude'); |
define ('BAZ_LONGITUDE', 'Longitude'); |
define ('BAZ_VERIFIER_MON_ADRESSE', 'Vérifier mon adresse avec la carte'); |
//================Textes pour les libellés====================================== |
define ('BAZ_ANNONCES','annonces'); |
define ('BAZ_PUBLICATIONS','publications'); |
define ('BAZ_EVENEMENTS','évènements'); |
define ('BAZ_FORMATIONS','formations'); |
define ('BAZ_SEJOURS','séjours'); |
define ('BAZ_EMPLOIS','emplois'); |
define ('BAZ_RESS_HUMAINES','Ressources humaines'); |
define ('BAZ_RESS_DOCS','Ressources documentaires'); |
define ('BAZ_RESS_PHYSIQUES','Ressources physiques'); |
define ('BAZ_RESS_FINANCIERES','Ressources financières'); |
define ('BAZ_JEUX','jeux'); |
define ('BAZ_PETITES_ANNONCES','petites annonces'); |
define ('BAZ_BREVES','brèves'); |
define('BAZ_COMPTES_RENDUS','comptes rendus'); |
define ('BAZ_REALISATION','réalisation'); |
define ('BAZ_PERSONNES_EXPERTES','personnes expertes'); |
define ('BAZ_THEMATIQUE','thématique'); |
define ('BAZ_THEMATIQUE_REQUIS','la thematique est requise'); |
define ('BAZ_SITE_INTERNET','site internet'); |
define ('BAZ_ADRESSE_CONTACT','Adresse du contact'); |
define ('BAZ_MAIL_CONTACT','Mail du contact'); |
define ('BAZ_MAIL_CONTACT_REQUIS','Le mail du contact est requis'); |
//================Textes pour les formations==================================== |
define ('BAZ_TITRE_FORMATION','Intitulé de la formation'); |
define ('BAZ_TITRE_FORMATION_REQUIS','L\'intitulé de la formation est obligatoire, veuillez le saisir'); |
define ('BAZ_SI_MODULE','Si plusieurs modules de formation'); |
define ('BAZ_NUMERO_MODULE','Numéro de module'); |
define ('BAZ_NB_TOTAL_MODULE','Nombre total de modules'); |
define ('BAZ_TYPE_FORMATION','Type de la formation'); |
define ('BAZ_TYPE_FORMATION_REQUIS','Le type de la formation est obligatoire, veuillez le saisir'); |
define ('BAZ_SI_DIPLOMANTE','Si la formation est diplomante'); |
define ('BAZ_DIPLOME_PREPARE', 'Diplòme préparé'); |
define ('BAZ_NIVEAU', 'Niveau'); |
define ('BAZ_SI_QUALIFIANTE', 'Si la formation est qualifiante'); |
define ('BAZ_QUALIF_PREPAREE', 'Qualification préparée'); |
define ('BAZ_OBJECTIFS', 'Objectifs'); |
define ('BAZ_OBJECTIFS_REQUIS', 'Entrer les objectifs est obligatoire, veuillez les saisir'); |
define ('BAZ_CONTENU', 'Contenu'); |
define ('BAZ_PUBLIC', 'Publics'); |
define ('BAZ_PUBLIC_REQUIS', 'Publics'); |
define ('BAZ_CONDITIONS_ACCES', 'Conditions d\'accès'); |
define ('BAZ_DATE_DEBUT_FORMATION', 'Date de début de la formation'); |
define ('BAZ_DATE_FIN_FORMATION', 'Date de fin de la formation'); |
define ('BAZ_DATE_FIN_INSCRIPTION', 'Date limite d\'inscription'); |
define ('BAZ_CP_LIEU_EVENEMENT', 'Code postal du lieu de l\'événement'); |
define ('BAZ_TARIF_INDIVIDUEL', 'Tarif individuel (en euros)'); |
define ('BAZ_TARIF_ENTREPRISE', 'Tarif entreprise (en euros)'); |
define ('BAZ_TARIF_OPCA', 'Tarif OPCA (en euros)'); |
define ('BAZ_NUM_AGREMENT', 'Numéro d\'agréement de la structure'); |
define ('BAZ_NUM_AGREMENT_REQUIS', 'Le numéro d\'agréement de la structure est obligatoire, veuillez le saisir'); |
define ('BAZ_ANNONCE_REQUIS','Le corps de l\'annonce est requis'); |
define ('BAZ_PRENOM_CONTACT', 'Prénom'); |
define ('BAZ_PRENOM_CONTACT_REQUIS', 'Le prénom de la personne contact est obligatoire, veuillez le saisir'); |
define ('BAZ_NOM_CONTACT', 'Nom'); |
define ('BAZ_NOM_CONTACT_REQUIS', 'Le nom de la personne contact est obligatoire, veuillez le saisir'); |
define ('BAZ_MAIL', 'Adresse électronique'); |
define ('BAZ_TELEPHONE', 'Téléphone'); |
define ('BAZ_TELEPHONE_REQUIS', 'Le téléphone du contact est obligatoire, veuillez le saisir'); |
define ('BAZ_INTERVENANTS', 'Les intervenants'); |
define ('BAZ_INFOS_COMPLEMENTAIRE', 'Informations complémentaires'); |
define ('BAZ_COORDONNEES_CONTACT', 'Coordonnées de la personne contact<br />'); |
define ('BAZ_DUREE_DE_PARUTION', '<strong>Durée de parution :</strong> la date de début de parution indique le moment ou la fiche devient visible sur le site, et la date de fin de parution, le moment où elle disparait.<br />'); |
define ('BAZ_LIGNE_HORIZONTALE', '<hr />'); |
define ('BAZ_CHAMPS_REQUIS', ': champs requis'); |
define ('BAZ_PAR', 'par'); |
define ('BAZ_CHAMPS_INDISPENSABLES_CLASSES', 'Champs indispensables pour les classes<br />'); |
define ('BAZ_ECRIT_LE',', écrit le '); |
define ('BAZ_FICHES_CORRESPONDANTES', 'fiches correspondant à votre recherche') ; |
define ('BAZ_FICHE_CORRESPONDANTE', 'fiche correspondante à votre recherche') ; |
//================Le formulaire ================================================ |
define ('BAZ_AJOUTER_CHAMPS_DE_BASE', 'Ajouter les informations de base pour la fiche'); |
define ('BAZ_PAYS', 'Pays'); |
define ('BAZ_PAYS_REQUIS', 'Le champs pays est requis!'); |
define ('BAZ_ORGANISME', 'Organisme'); |
define ('BAZ_CONTACT', 'Contact'); |
define ('BAZ_REGION', 'Région'); |
define ('BAZ_REGION_REQUIS', 'Le champs région est requis!'); |
define ('BAZ_DEPARTEMENT', 'Département') ; |
define ('BAZ_DEPARTEMENT_REQUIS', 'Le champs département est requis!'); |
define ('BAZ_LICENCE', 'Type de licence') ; |
define ('BAZ_LICENCE_REQUIS', 'Le type de licence est requis!') ; |
define ('BAZ_TITRE', 'Titre') ; |
define ('BAZ_TITRE_REQUIS', 'Un titre de fiche est requis!') ; |
define ('BAZ_DESCRIPTION', 'Description') ; |
define ('BAZ_DESCRIPTION_REQUIS', 'Une description de la fiche est requise!!') ; |
define ('BAZ_DATEDEBVALID', 'Début de parution' ); |
define ('BAZ_DATEDEBVALID_REQUIS', 'La date de début de parution est requise!!') ; |
define ('BAZ_DATEFINVALID', 'Fin de parution' ); |
define ('BAZ_DATEFINVALID_REQUIS', 'La date de fin de parution est requise!!') ; |
define ('BAZ_DU', 'du') ; |
define ('BAZ_AU', 'au') ; |
define ('BAZ_LE', 'Le') ; |
define ('BAZ_DATE_DEBUT_EVENEMENT', 'Début de l\'évenement' ); |
define ('BAZ_DATE_DEBUT_EVENEMENT_REQUIS', 'La date de début de l\'évenement est requise!!') ; |
define ('BAZ_DATE_FIN_EVENEMENT', 'Fin de l\'évenement' ); |
define ('BAZ_DATE_FIN_EVENEMENT_REQUIS', 'La date de fin de l\'évenement est requise!!') ; |
define ('BAZ_LIEU_EVENEMENT', 'Lieu de l\'évenement' ); |
define ('BAZ_LIEU_EVENEMENT_REQUIS', 'Le lieu de l\'évenement est requis!!') ; |
define ('BAZ_PAS_UNE_IMAGE', 'Ce fichier n\'est pas une image.' ); |
define ('BAZ_AJOUTER_IMAGE', 'Pour l\'instant, pas d\'image associée à la fiche, vous pouvez en ajouter une ci-dessous.' ); |
define ('BAZ_IMAGE', 'Image pour la fiche (facultatif)' ); |
define ('BAZ_IMAGE_VALIDE_REQUIS', 'Le fichier image n\'est pas valide.') ; |
//================Textes pour les parutions===================================== |
define ('BAZ_CODE', 'Code ISBN ou ISSN (s\'il existe)' ); |
define ('BAZ_NOM_AUTEUR', 'Auteur' ); |
define ('BAZ_NOM_AUTEUR_REQUIS', 'L\'auteur est requis'); |
define ('BAZ_EDITEUR', 'Editeur'); |
define ('BAZ_TYPE_PARUTION', 'Type de parution'); |
define ('BAZ_ANNONCE','Annonce'); |
define ('BAZ_CAPACITE_ACCUEIL', 'Capacité d\'accueil' ); |
define ('BAZ_CAPACITE_ACCUEIL_REQUIS', 'La capacité d\'accueil est requise!!') ; |
define ('BAZ_NB_ANIMATEURS', 'Nombre d\'animateurs' ); |
define ('BAZ_NB_ANIMATEURS_REQUIS', 'Le nombre d\'animateurs est requis!!') ; |
define ('BAZ_TARIF', 'Tarif (en euros)' ); |
define ('BAZ_TARIF_REQUIS', 'Le tarif est requis!!') ; |
define ('BAZ_LISTE_TRANCHES_AGES', 'Tranches d\'àges' ); |
define ('BAZ_LISTE_TRANCHES_AGES_REQUIS', 'Les tranches d\'àges sont requises!!') ; |
define ('BAZ_LISTE_URL', 'Liens associés à l\'annonce: '); |
define ('BAZ_PAS_URL', 'Pour l\'instant, pas de lien associé à la fiche, vous pouvez en ajouter ci-dessous.'); |
define ('BAZ_AJOUTER_URL', 'Ajouter un lien (URL) à la fiche'); |
define ('BAZ_LIEN', 'Lien' ); |
define ('BAZ_LIEN_INTERNET', 'Liens Internet' ); |
define ('BAZ_URL_LIEN', 'Adresse du lien (URL)' ); |
define ('BAZ_URL_LIEN_REQUIS', 'L\'adresse du lien (URL) est requise!!') ; |
define ('BAZ_URL_TEXTE', 'Texte du lien' ); |
define ('BAZ_URL_TEXTE_REQUIS', 'Le texte du lien est requis!!') ; |
define ('BAZ_AJOUTER_FICHIER_JOINT','Ajouter un fichier joint à la fiche'); |
define ('BAZ_FICHIER_JOINT', 'Fichier joint' ); |
define ('BAZ_LISTE_FICHIERS_JOINTS', 'Fichiers associés à la fiche '); |
define ('BAZ_PAS_DE_FICHIERS_JOINTS', 'Pour l\'instant, pas de fichier associé à la fiche, vous pouvez en ajouter ci-dessous.'); |
define ('BAZ_FICHIER','Fichier'); |
define ('BAZ_FICHIER_JOINT_REQUIS', 'Le fichier joint est requis!!') ; |
define ('BAZ_FICHIER_DESCRIPTION', 'Description du fichier' ); |
define ('BAZ_FICHIER_TEXTE_REQUIS', 'Le texte du fichier est requis!!') ; |
define ('BAZ_FICHIER_LABEL', 'Label du fichier') ; |
define ('BAZ_FICHIER_LABEL_REQUIS', 'Le label du fichier est requis!!') ; |
define ('BAZ_FICHIER_EXISTANT', 'Il existe déjà un fichier du même nom sur le site.<br />Votre fiche a été associée avec le fichier existant déjà.'); |
define ('BAZ_ACCEPTE_CONDITIONS', 'J\'accepte les conditions de saisie de la fiche'); |
define ('BAZ_ACCEPTE_CONDITIONS_REQUIS', 'Vous devez accepter les conditions de saisie de la fiche'); |
//================Textes pour les emplois======================================= |
define ('BAZ_INTITULE_POSTE', 'Intitulé du poste'); |
define ('BAZ_INTITULE_POSTE_REQUIS', 'L\'intitulé du poste est requis'); |
define ('BAZ_DESCRIPTION_STRUCTURE', 'Description de la structure qui embauche'); |
define ('BAZ_DESCRIPTION_STRUCTURE_REQUIS', 'La description de la structure qui embauche est requise'); |
define ('BAZ_CP_LIEU_TRAVAIL', 'Code postal du lieu de travail'); |
define ('BAZ_LIEU_TRAVAIL', 'Lieu de travail'); |
define ('BAZ_MISSIONS', 'Missions du poste'); |
define ('BAZ_PROFIL', 'Profil du poste'); |
define ('BAZ_PROFIL_REQUIS', 'Le profil du poste est requis'); |
define ('BAZ_NIVEAU_DIPLOME_DEMANDE', 'Niveau de diplome demandé'); |
define ('BAZ_ELEGIBILITE', 'Elegibilité (CES, Emploi jeune,...)'); |
define ('BAZ_TYPE_CONTRAT', 'Type de contrat'); |
define ('BAZ_TYPE_CONTRAT_REQUIS', 'Type de contrat requis'); |
define ('BAZ_FORME_CANDIDATURE', 'Moyen de candidature (envois de CV par mail, lettre manucrite,...)'); |
define ('BAZ_INDICE_SALAIRE', 'Indice salaire'); |
define ('BAZ_SALAIRE_BRUT_MENSUEL', 'Salaire brut mensuel'); |
define ('BAZ_SALAIRE_BRUT_MENSUEL_REQUIS', 'Le salaire brut mensuel est requis'); |
define ('BAZ_ECHEANCE_CANDIDATURE', 'Date d\'échéance de candidature'); |
define ('BAZ_DATE_DEBUT_EMBAUCHE', 'Date de début d\'embauche'); |
//================Textes pour les ressources======================================= |
define ('BAZ_THEME','Thème'); |
define ('BAZ_THEME_REQUIS','Le thème est requis'); |
define ('BAZ_TRANCHES_AGES','Tranches d\'âge'); |
define ('BAZ_TRANCHES_AGES_REQUIS','les tranches d\'â soTRUCTUREnt requises'); |
define ('BAZ_PERIODE', 'Période'); |
define ('BAZ_PERIODE_REQUIS', 'Période requise'); |
define ('BAZ_NIVEAU_SCOLAIRE', 'Niveau scolaire'); |
define ('BAZ_DATE_DEBUT_SEJOUR', 'Date de début du séjour'); |
define ('BAZ_DATE_DEBUT_SEJOUR_REQUIS', 'Date de début du séjour requise'); |
define ('BAZ_DATE_FIN_SEJOUR', 'Date de fin du séjour'); |
define ('BAZ_DATE_FIN_SEJOUR_REQUIS', 'Date de fin du séjour requise'); |
define ('BAZ_LIEU', 'Lieu'); |
define ('BAZ_LIEU_REQUIS', 'Lieu requis'); |
define ('BAZ_MILIEU_DOMINANT', 'Milieu dominant'); |
define ('BAZ_HEBERGEMENT', 'Hébergement'); |
define ('BAZ_HEBERGEMENT_REQUIS', 'Hébergement requis'); |
define ('BAZ_NOMBRE_PLACES', 'Nombre de places'); |
define ('BAZ_NOMBRE_PLACES_REQUIS', 'Nombre de places requis'); |
define ('BAZ_NOMBRE_ANIMS', 'Nombre d\'animateurs'); |
define ('BAZ_NOMBRE_ANIMS_REQUIS', 'Nombre d\'animateurs requis'); |
define ('BAZ_QUALIF_ANIMS', 'Qualification des animateurs'); |
define ('BAZ_QUALIF_ANIMS_REQUIS', 'Qualification des animateurs requise'); |
define ('BAZ_AGREMENTS', 'Agréments'); |
define ('BAZ_ACTIVITES_DOMINANTES', 'Activités dominantes (en 3 mots clés)'); |
define ('BAZ_ACTIVITES_DOMINANTES_REQUIS', 'Activités dominantes requises'); |
define ('BAZ_PRECISION_PRIX', 'Précision sur le prix'); |
define ('BAZ_PRECISION_PRIX_REQUIS', 'Précision sur le prix requise'); |
define ('BAZ_VOYAGE_COMPRIS', 'Voyage compris'); |
define ('BAZ_VOYAGE_COMPRIS_REQUIS', 'Voyage compris requis'); |
define ('BAZ_AIDES_POSSIBLES', 'Aides possibles'); |
define ('BAZ_CHOISIR', 'Choisir...'); |
define ('BAZ_CHOISIR_OBLIGATOIRE', 'Il faut choisir une option dans la liste '); |
define ('BAZ_INDIFFERENT','Indifférent'); |
define ('BAZ_COORDONNEES','Coordonnées'); |
define ('BAZ_ANNEE_PARUTION','Année de parution'); |
define ('BAZ_LANGUE','Langue'); |
define ('BAZ_THEMES','Thèmes'); |
define ('BAZ_PAS_D_APPROPRIATION','Aucune structure ne s\'est approprié cette ressource pour l\'instant.'); |
define ('BAZ_STRUCTURE_POSSEDANT', 'structure possédant cette ressource.'); |
define ('BAZ_STRUCTURES_POSSEDANT', 'structures possédant cette ressource.'); |
define ('BAZ_SI_POSSEDE_RESSOURCE', 'Si vous possèdez cette ressource dans votre structure :'); |
define ('BAZ_POSSEDE_DEJA_RESSOURCE', 'Vous possèdez cette ressource.'); |
define ('BAZ_CLIQUER_POUR_VOUS_ENLEVER', 'cliquez ici pour vous enlever de la liste.'); |
define ('BAZ_IL_FAUT_ETRE_STRUCTURE', 'Seules les structures identifiées peuvent s\'approprier cette ressource.'); |
define ('BAZ_IL_FAUT_ETRE_IDENTIFIE_STRUCTURE', 'En vous identifiant ou ou vous inscrivant en tant que structure, vous pouvez vous associer cette ressource.'); |
define ('BAZ_CLIQUER_POUR_APPARAITRE', 'cliquez ici pour appaitre dans la liste.'); |
define ('BAZ_NON_PRECISE','Non précisé'); |
define ('BAZ_IDENTIFIEZ_VOUS_POUR_SAISIR', 'Pour saisir des fiches, voir vos fiches ou s\'abonner :<br /> veuillez vous identifier ou vous inscrire.'); |
define ('BAZ_EST_SUPERADMINISTRATEUR', 'Cette personne est un super-administrateur.<br />Il peut modifier le droits des utilisateurs et administrer toutes les rubriques de fiches.'); |
define ('BAZ_CHANGER_SUPERADMINISTRATEUR', 'Changer ses droits de super-administrateur pour en faire un utilisateur sans pouvoir'); |
define ('BAZ_AUCUN_DROIT', 'utilisateur sans pouvoir'); |
define ('BAZ_LABEL_REDACTEUR', 'rédacteur'); |
define ('BAZ_DROIT_ADMIN', 'administrateur'); |
define ('BAZ_PASSER_SUPERADMINISTRATEUR', 'Passer la personne en super administrateur'); |
define ('BAZ_ENLEVER_DROIT', 'Passer en utilisateur sans pouvoir'); |
define ('BAZ_TYPE_ANNONCES', 'Types de fiche'); |
define ('BAZ_DROITS_ACTUELS', 'Droits actuels'); |
define ('BAZ_PASSER_EN', 'Passer en'); |
define ('BAZ_OU_PASSER_EN', 'ou passer en'); |
define ('BAZ_CHECKBOX_SUPERADMIN', 'Super administrateur : '); |
define ('BAZ_RADIO_AUCUN', 'aucun '); |
define ('BAZ_RADIO_REDACTEUR', 'rédacteur '); |
define ('BAZ_RADIO_ADMINISTRATEUR', 'administrateur '); |
//================Textes pour les sejours================================== |
define ('BAZ_TITRE_SEJOUR','Titre du séjour'); |
define ('BAZ_TITRE_SEJOUR_REQUIS','Le titre du séjour est obligatoire, veuillez le saisir'); |
define ('BAZ_MAX_60_CAR', '(maximum 60 caractères)'); |
// ================ Texte pour les structures ============================= |
define ('BAZ_FICHE_STRUCTURE', 'Fiche structure') ; |
define ('BAZ_NOM_STRUCTURE', 'Nom de la structure'); |
define ('BAZ_NOM_STRUCTURE_REQUIS', 'Le nom de la structure est requis'); |
define ('BAZ_RAISON_SOCIALE', 'Raison sociale'); |
define ('BAZ_RAISON_SOCIALE_REQUIS', 'Raison sociale requise'); |
define ('BAZ_OBJET', 'Objet'); |
define ('BAZ_OBJET_REQUIS', 'Objet requis'); |
define ('BAZ_ACTIONS', 'Actions'); |
define ('BAZ_PRODUCTIONS', 'Productions'); |
define ('BAZ_RESEAUX', 'Réseaux'); |
define ('BAZ_ADRESSE', 'Adresse'); |
define ('BAZ_ADRESSE_REQUIS', 'Adresse requise'); |
define ('BAZ_FAX', 'Fax'); |
//define ('BAZ_DERNIERES_FICHES', 'Dernières fiches enregistrées'); |
define ('BAZ_FICHE_NUMERO', 'Fiches n°'); |
define ('BAZ_ECRITE', ' écrite par '); |
//================ Administration de Bazar ================================ |
define ('BAZ_CONFIG', 'Configuration du bazar'); |
define ('BAZ_ENREGISTRER_ET_QUITTER', 'Enregistrer et quitter'); |
//================ Calendrier Bazar ======================================= |
define ('BAZ_LUNDI','Lundi'); |
define ('BAZ_MARDI','Mardi'); |
define ('BAZ_MERCREDI','Mercredi'); |
define ('BAZ_JEUDI','Jeudi'); |
define ('BAZ_VENDREDI','Vendredi'); |
define ('BAZ_SAMEDI','Samedi'); |
define ('BAZ_DIMANCHE','Dimanche'); |
define ('BAZ_LUNDI_COURT','Lun'); |
define ('BAZ_MARDI_COURT','Mar'); |
define ('BAZ_MERCREDI_COURT','Mer'); |
define ('BAZ_JEUDI_COURT','Jeu'); |
define ('BAZ_VENDREDI_COURT','Ven'); |
define ('BAZ_SAMEDI_COURT','Sam'); |
define ('BAZ_DIMANCHE_COURT','Dim'); |
define ('BAZ_JANVIER','Janvier'); |
define ('BAZ_FEVRIER','Février'); |
define ('BAZ_MARS','Mars'); |
define ('BAZ_AVRIL','Avril'); |
define ('BAZ_MAI','Mai'); |
define ('BAZ_JUIN','Juin'); |
define ('BAZ_JUILLET','Juillet'); |
define ('BAZ_AOUT','Aoút'); |
define ('BAZ_SEPTEMBRE','Septembre'); |
define ('BAZ_OCTOBRE','Octobre'); |
define ('BAZ_NOVEMBRE','Novembre'); |
define ('BAZ_DECEMBRE','Décembre'); |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.66 2008-10-29 15:46:30 alexandre_tb |
* ajout de globale pour les noms de mois et de jours |
* |
* Revision 1.65 2008-10-27 16:52:58 aperonnet |
* correction de fautes d'orthographe |
* |
* Revision 1.64 2008-09-17 14:08:45 alexandre_tb |
* merge depuis aha |
* |
* Revision 1.63 2008-03-17 14:01:40 jp_milcent |
* Ajout d'un message demandant de s'identifiez pour poser des commentaires. |
* Amélioration du XHTML (me prévenir en cas de pb). |
* |
* Revision 1.62 2007-12-04 09:07:21 alexandre_tb |
* Fusion avec la livraison AHA : 4 déc 2007 |
* |
* Revision 1.61 2007-10-10 13:27:40 alexandre_tb |
* correction encodage |
* |
* Revision 1.60 2007-10-01 12:05:07 alexandre_tb |
* orthographe |
* |
* Revision 1.59 2007-09-28 14:07:01 jp_milcent |
* Correction pour le numéro d'une page. |
* |
* Revision 1.58 2007-08-28 09:41:47 alexandre_tb |
* correction orthographe |
* |
* Revision 1.57 2007-08-27 12:29:09 alexandre_tb |
* quelques constantes rendus modifiable, avec if defined ... |
* |
* Revision 1.56 2007-07-02 13:46:45 alexandre_tb |
* nouveaux labels |
* |
* Revision 1.55 2007-06-25 12:15:06 alexandre_tb |
* merge from narmer |
* |
* Revision 1.54 2007-06-25 09:57:51 alexandre_tb |
* nouveaux labels |
* |
* Revision 1.53 2007-06-04 15:26:42 alexandre_tb |
* nouveaux labels |
* |
* Revision 1.52 2007/04/20 12:47:42 florian |
* correction bugs suite au merge |
* |
* Revision 1.51 2007/04/20 09:57:21 florian |
* correction bugs suite au merge |
* |
* Revision 1.50 2007/04/11 08:30:12 neiluj |
* remise en état du CVS... |
* |
* Revision 1.42.2.2 2007/03/07 17:20:47 jp_milcent |
* Ajout d'une majuscule accentuée. |
* |
* Revision 1.42.2.1 2007/01/29 10:54:25 alexandre_tb |
* Mise en place de la constante BAZ_DERNIERES_FICHES pour remplacer le label en francais dans baz_liste |
* |
* Revision 1.42 2006/10/05 08:53:50 florian |
* amelioration moteur de recherche, correction de bugs |
* |
* Revision 1.41 2006/09/21 14:19:39 florian |
* amélioration des fonctions liés au wikini |
* |
* Revision 1.40 2006/07/19 12:50:00 alexandre_tb |
* Un accent |
* |
* Revision 1.39 2006/06/29 10:30:26 florian |
* correction de BAZ_MOT_CLE |
* |
* Revision 1.38 2006/05/19 13:53:45 florian |
* stabilisation du moteur de recherche, corrections bugs, lien recherche avancee |
* |
* Revision 1.37 2006/04/28 12:46:14 florian |
* integration des liens vers annuaire |
* |
* Revision 1.36 2006/03/14 17:10:21 florian |
* ajout des fonctions de syndication, changement du moteur de recherche |
* |
* Revision 1.35 2006/03/02 20:36:52 florian |
* les entrees du formulaire de saisir ne sont plus dans les constantes mias dans des tables qui gerent le multilinguisme. |
* |
* Revision 1.34 2006/03/01 16:23:22 florian |
* modifs textes fr et correction bug "undefined index" |
* |
* Revision 1.33 2006/03/01 16:00:17 florian |
* ajout de certains mots par rapport aux formulaires de saisie de ressources |
* |
* Revision 1.32 2006/02/09 18:00:17 florian |
* ajout des trois mots, je sais c'est peu de choses!! |
* |
* Revision 1.31 2006/01/18 10:53:28 florian |
* corrections bugs affichage fiche |
* |
* Revision 1.30 2006/01/05 16:28:25 alexandre_tb |
* prise en chage des checkbox, reste la mise à jour à gérer |
* |
* Revision 1.29 2006/01/04 15:31:46 alexandre_tb |
* ajout de label |
* |
* Revision 1.28 2006/01/03 10:19:31 florian |
* Mise à jour pour accepter des parametres dans papyrus: faire apparaitre ou non le menu, afficher qu'un type de fiches, définir l'action par défaut... |
* |
* Revision 1.27 2006/01/02 13:24:23 alexandre_tb |
* ajout de label |
* |
* Revision 1.26 2005/11/30 13:58:45 florian |
* ajouts graphisme (logos, boutons), changement structure SQL bazar_fiche |
* |
* Revision 1.25 2005/11/24 16:17:13 florian |
* corrections bugs, ajout des cases à cocher |
* |
* Revision 1.24 2005/11/08 16:09:26 florian |
* modifs séjours |
* |
* Revision 1.23 2005/11/08 16:06:41 florian |
* modifs séjours |
* |
* Revision 1.22 2005/11/07 17:30:36 florian |
* ajout controle sur les listes pour la saisie |
* |
* Revision 1.21 2005/11/07 17:05:46 florian |
* amélioration validation conditions de saisie, ajout des règles spécifiques de saisie des formulaires |
* |
* Revision 1.20 2005/11/04 17:13:49 florian |
* ajout des textes et du formulaire pour les annonces |
* |
* Revision 1.19 2005/10/31 17:10:56 ddelon |
* Reintegration des commits mysterieusement disparus |
* |
* Revision 1.18 2005/10/24 09:42:21 florian |
* mise a jour appropriation |
* |
* Revision 1.17 2005/10/21 16:15:04 florian |
* mise a jour appropriation |
* |
* Revision 1.13 2005/10/13 14:43:42 florian |
* corrections pb accents |
* |
* Revision 1.12 2005/10/12 16:28:37 florian |
* corrections fautes orthographes |
* |
* Revision 1.11 2005/10/12 16:27:22 florian |
* ajout textes des Ressources |
* |
* Revision 1.10 2005/10/12 16:17:37 florian |
* corrections pb accents |
* |
* Revision 1.9 2005/10/12 16:12:34 florian |
* corrections pb accents |
* |
* Revision 1.8 2005/10/12 15:31:43 florian |
* corrections pb accents |
* |
* Revision 1.7 2005/10/10 16:22:06 alexandre_tb |
* Modification de label pour les rendre plus générique |
* |
* Revision 1.6 2005/09/30 23:04:31 ddelon |
* calendrier bazar |
* |
* Revision 1.5 2005/09/30 12:22:54 florian |
* Ajouts commentaires pour fiche, modifications graphiques, maj SQL |
* |
* Revision 1.3 2005/07/21 19:03:12 florian |
* nouveautés bazar: templates fiches, correction de bugs, ... |
* |
* Revision 1.1.1.1 2005/02/17 18:05:11 florian |
* Import initial de Bazar |
* |
* Revision 1.1.1.1 2005/02/17 11:09:50 florian |
* Import initial |
* |
* Revision 1.1.1.1 2005/02/16 18:06:35 florian |
* import de la nouvelle version |
* |
* Revision 1.6 2004/07/06 16:21:50 florian |
* débuggage modification + MAJ flux RSS |
* |
* Revision 1.5 2004/07/05 15:13:53 florian |
* changement interface de saisie |
* |
* Revision 1.4 2004/07/02 14:51:41 florian |
* ajouts de labels divers |
* |
* Revision 1.3 2004/07/01 16:37:14 florian |
* ajout de labels |
* |
* Revision 1.2 2004/07/01 13:00:24 florian |
* modif Florian |
* |
* Revision 1.1 2004/06/23 09:58:32 alex |
* version initiale |
* |
* Revision 1.1 2004/06/18 09:00:46 alex |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2014_06_04/images/Logo_Emplois.jpg |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Logo_Emplois.jpg |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Bandeau-fiche-Ekotheque.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Bandeau-fiche-Ekotheque.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Puce-etoile-contact.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Puce-etoile-contact.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Logo_Evenements.jpg |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Logo_Evenements.jpg |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Puce-personnes.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Puce-personnes.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Puce-outils-2.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Puce-outils-2.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Puce-outils.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Puce-outils.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Projets-actif.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Projets-actif.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Titre_Annonces.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Titre_Annonces.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Puce-etoile-jaune.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Puce-etoile-jaune.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/cal_pastille.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/cal_pastille.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Logo_Formations.jpg |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Logo_Formations.jpg |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/BAZ_formation_qualifiante.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/BAZ_formation_qualifiante.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Logo_Parutions.jpg |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Logo_Parutions.jpg |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/BAZ_telephone.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/BAZ_telephone.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Titre_Emplois.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Titre_Emplois.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/BAZ_encadre_barre.jpg |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/BAZ_encadre_barre.jpg |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/cal_px_infobulle.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/cal_px_infobulle.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/cal_titre.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/cal_titre.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Logo_Sejours.jpg |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Logo_Sejours.jpg |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/BAZ_encadre_haut.jpg |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/BAZ_encadre_haut.jpg |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Titre_Parutions.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Titre_Parutions.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Puce-site.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Puce-site.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Bandeau-fiche-Projets.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Bandeau-fiche-Projets.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Logo_Annonces.jpg |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Logo_Annonces.jpg |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/drapeau_vert.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/drapeau_vert.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Titre_Sejours.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Titre_Sejours.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/BAZ_formation_diplomante.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/BAZ_formation_diplomante.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/drapeau_bleu.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/drapeau_bleu.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/cal_precedent.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/cal_precedent.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Bandeau-fiche-Actualites.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Bandeau-fiche-Actualites.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/BAZ_mail.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/BAZ_mail.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Titre_Evenements.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Titre_Evenements.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/BAZ_rss.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/BAZ_rss.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/cal_suivant.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/cal_suivant.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Titre_Formations.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Titre_Formations.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/drapeau_rose.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/drapeau_rose.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/BAZ_Enfants.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/BAZ_Enfants.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Puce-groupe-travail.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Puce-groupe-travail.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Puce-documents.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Puce-documents.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/BAZ_cadre_haut.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/BAZ_cadre_haut.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/Zone-image.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/Zone-image.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/cal_titre_fond.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/cal_titre_fond.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/drapeau_orange.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/drapeau_orange.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/BAZ_encadre.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/BAZ_encadre.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/BAZ_encadre_bas.jpg |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/BAZ_encadre_bas.jpg |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/BAZ_formation_continue.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/BAZ_formation_continue.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/BAZ_cadre_bas.gif |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/images/BAZ_cadre_bas.gif |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/images/cal_titre_fond-grey.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
/tags/2014_06_04/images/cal_titre_fond-grey.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+image/png |
\ No newline at end of property |
/tags/2014_06_04/configuration/baz_config.inc.php |
---|
New file |
0,0 → 1,385 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: baz_config.inc.php,v 1.41 2008-10-29 15:45:08 alexandre_tb Exp $ |
/** |
* Fichier de configuration du bazar |
* |
* A éditer de façon spécifique à chaque déploiement |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@author Florian SCHMITT <florian@ecole-et-nature.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.41 $ $Date: 2008-10-29 15:45:08 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | LES CONSTANTES DES ACTIONS DE BAZAR | |
// +------------------------------------------------------------------------------------------------------+ |
define ('BAZ_VOIR_TOUTES_ANNONCES', 1) ; |
define ('BAZ_ACTION_VOIR_VOS_ANNONCES', 2); |
define ('BAZ_DEPOSER_ANNONCE', 3) ; |
define ('BAZ_ANNONCES_A_VALIDER', 4) ; |
define ('BAZ_GERER_DROITS', 5) ; |
define ('BAZ_ADMINISTRER_ANNONCES', 6) ; |
define ('BAZ_MODIFIER_FICHE', 7) ; |
if (!defined('BAZ_VOIR_FICHE')) define ('BAZ_VOIR_FICHE', 8) ; |
define ('BAZ_SUPPRIMER_FICHE', 9) ; |
define ('BAZ_ACTION_NOUVEAU', 10) ; |
define ('BAZ_ACTION_NOUVEAU_V', 11) ; |
define ('BAZ_ACTION_MODIFIER', 12) ; |
define ('BAZ_ACTION_MODIFIER_V', 13) ; |
define ('BAZ_ACTION_SUPPRESSION', 14) ; |
define ('BAZ_ACTION_PUBLIER', 15) ; |
define ('BAZ_ACTION_PAS_PUBLIER', 16) ; |
define ('BAZ_S_INSCRIRE', 17); |
define ('BAZ_VOIR_FLUX_RSS', 18); |
define ('BAZ_ACTION_POST_VALIDATION', 19); // Cette action correspond a la page apres le depot |
// d une fiche et propose de dupliquer la fiche ou |
// de sortir |
// Constante des noms des variables |
define ('BAZ_VARIABLE_VOIR', 'vue'); |
define ('BAZ_VARIABLE_ACTION', 'action'); |
define ('BAZ_VARIABLE_ID_FICHE', 'id_fiche'); |
define ('BAZ_VARIABLE_DUPLICATION', 'duplication'); |
define ('BAZ_VARIABLE_CATEGORIE_NATURE', 'categorie_nature'); |
/** Indique les onglets de vues à afficher.*/ |
define ('BAZ_VOIR_AFFICHER', '1,2,3,4,5,6');// Indiquer les numéros des vues à afficher séparées par des virgules. |
/** Permet d'indiquer la vue par défaut si la variable vue n'est pas défini dans l'url ou dans les paramêtre du menu Papyrus.*/ |
define ('BAZ_VOIR_DEFAUT', '2');// Par défaut 2 : Mes Fiches |
define ('BAZ_VOIR_CONSULTER', 1); |
define ('BAZ_VOIR_MES_FICHES', 2); |
define ('BAZ_VOIR_S_ABONNER', 3); |
define ('BAZ_VOIR_SAISIR', 4); |
define ('BAZ_VOIR_ADMIN', 5); |
define ('BAZ_VOIR_GESTION_DROITS', 6); |
//==================================== LES FLUX RSS================================== |
// Constantes liées aux flux RSS |
//================================================================================== |
define('BAZ_CREER_FICHIERS_XML',0); //0n ne cree pas le fichier XML dans rss/; 1=cree le fichier XML dans rss/ |
define('BAZ_RSS_NOMSITE','Educ-Envir.org'); //Nom du site indiqué dans les flux rss |
define('BAZ_RSS_ADRESSESITE','http://educ-envir.org'); //Adresse Internet du site indiqué dans les flux rss |
define('BAZ_RSS_DESCRIPTIONSITE','Educ-Envir.org, pour mutualiser l\'information en éducation à l\'environnement.'); //Description du site indiquée dans les flux rss |
define('BAZ_RSS_LOGOSITE','http://ecole-et-nature.org/images/Logo_REN-Site.png'); //Logo du site indiqué dans les flux rss |
define('BAZ_RSS_MANAGINGEDITOR', 'nom@domaine.tld') ; //Managing editor du site |
define('BAZ_RSS_WEBMASTER', 'nom@domaine.tld') ; //Mail Webmaster du site |
define('BAZ_RSS_CATEGORIE', 'Education a l\'environnement'); //catégorie du flux RSS |
//==================================== PARAMETRAGE ================================= |
// Pour régler certaines fonctionnalité de l'application |
//================================================================================== |
define ('BAZ_ETAT_VALIDATION', 0); |
//Valeur par défaut d'état de la fiche annonce après saisie |
//Mettre 0 pour 'en attente de validation d'un administrateur' |
//Mettre 1 pour 'directement validée en ligne' |
define ('BAZ_TAILLE_MAX_FICHIER', 2000*1024); |
//Valeur maximale en octets pour la taille d'un fichier joint à télécharger |
define ('BAZ_TYPE_AFFICHAGE_LISTE', 'jma'); |
define ('BAZ_ANNUAIRE','gen_annuaire'); //Table annuaire |
define ('BAZ_CHAMPS_ID','ga_id_administrateur'); //Champs index sur la table annuaire |
define ('BAZ_CHAMPS_NOM','ga_nom'); //Champs nom sur la table annuaire |
define ('BAZ_CHAMPS_PRENOM','ga_prenom'); //Champs prenom sur la table annuaire |
define ('BAZ_CHAMPS_EST_STRUCTURE','a_est_structure'); //Champs indiquant si c'est une structure qui est identifiée |
define ('BAZ_CHAMPS_EMAIL','ga_mail'); //Champs prenom sur la table annuaire |
define ('BAZ_CHAMPS_MOT_DE_PASSE', 'ga_mot_de_passe'); |
define ('BAZ_CHAMPS_NOM_WIKI','a_nom_wikini'); //Champs nom wikini sur la table annuaire |
if (!defined ('PAP_VERSION')) { |
//================================ BASE DE DONNEES ================================= |
define ('BAZ_PROTOCOLE', 'mysql') ; |
define ('BAZ_UTILISATEUR', '') ; |
define ('BAZ_MOT_DE_PASSE_DB', '') ; |
define ('BAZ_HOTE', 'localhost') ; |
define ('BAZ_BASE', '') ; |
define ('BAZ_TYPE_ENCODAGE','MD5'); |
// Formation du dsn |
$dsn = BAZ_PROTOCOLE.'://'.BAZ_UTILISATEUR.':'.BAZ_MOT_DE_PASSE_DB.'@'.BAZ_HOTE.'/'.BAZ_BASE; |
/** Pour les inclusions de bibliotheques PEAR, mieux vaux |
* utiliser celle sur le serveur, sinon utiliser la fonction set_init_path |
*/ |
include_once 'DB.php'; //appel de la librairie DB de PEAR |
/** Variable globale contenant l'objet d'accès à la base de donnée */ |
$GLOBALS['ins_db'] =& DB::connect($dsn); |
//=============================== AUTHENTIFICATION ================================= |
include_once 'Auth.php'; //appel de la librairie Auth de PEAR |
/** Nom de la session PHP */ |
define ('BAZ_NOM_SESSION',''); |
/** Durée de la session PHP */ |
define ('BAZ_DUREE_SESSION',3600*12); |
/** Tableau des parametres de l'authentification */ |
$params = array( |
'dsn' => $dsn, |
'table' => BAZ_ANNUAIRE, |
'usernamecol' => BAZ__CHAMPS_MAIL, |
'passwordcol' => BAZ_CHAMPS_MOT_DE_PASSE |
); |
/** Variable globale contenant l'objet d'authentification de l'application, un objet AUTH*/ |
$GLOBALS['AUTH']= &new Auth($GLOBALS['ins_db'], $params ); |
$GLOBALS['AUTH']->setSessionname(INS_NOM_SESSION); |
$GLOBALS['AUTH']->setExpire(INS_DUREE_SESSION); |
$GLOBALS['AUTH']->setShowLogin(false); |
} else { |
$GLOBALS['_BAZAR_']['db'] =& $GLOBALS['_GEN_commun']['pear_db']; |
$GLOBALS['AUTH'] =& $GLOBALS['_GEN_commun']['pear_auth']; |
} |
/** Réglage des droits pour déposer des annonces */ |
// Mettre à true pour limiter le dépot aux rédacteurs |
define ('BAZ_RESTREINDRE_DEPOT', 0) ; |
/** Réglage de l'affichage de la liste deroulante pour la saisie des dates */ |
// Mettre à true pour afficher une liste deroulante vide pour la saisie des dates |
define ('BAZ_DATE_VIDE', 0); |
/** Réglage de l'URL de l'annuaire */ |
// Mettre l'URL correspondant à l'annuaire |
define ('BAZ_URL_ANNUAIRE', '/page:annuaire'); |
// Mettre à true pour faire apparaitre un champs texte déroulant dans le formulaire |
// de recherche des fiches, pour choisir les émetteurs |
define ('BAZ_RECHERCHE_PAR_EMETTEUR', 1) ; |
$GLOBALS['_BAZAR_']['url'] = $GLOBALS['_GEN_commun']['url']; |
if(!defined(PAP_CHEMIN_RACINE)) { |
define(PAP_CHEMIN_RACINE, ''); |
define('BAZ_CHEMIN_APPLI', PAP_CHEMIN_RACINE.''); |
} else { |
//BAZ_CHEMIN_APPLI : chemin vers l'application bazar METTRE UN SLASH (/) A LA FIN!!!! |
define('BAZ_CHEMIN_APPLI', PAP_CHEMIN_RACINE.'client/bazar/'); |
} |
/**Choix de l'affichage (true) ou pas (false) de l'email du rédacteur dans la fiche.*/ |
define('BAZ_FICHE_REDACTEUR_MAIL', true);// true ou false |
//==================================== LES LANGUES ================================== |
// Constantes liées à l'utilisation des langues |
//================================================================================== |
$GLOBALS['_BAZAR_']['langue'] = 'fr-FR'; |
define ('BAZ_LANGUE_PAR_DEFAUT', 'fr') ; //Indique un code langue par défaut |
define ('BAZ_VAR_URL_LANGUE', 'lang') ; //Nom de la variable GET qui sera passée dans l'URL (Laisser vide pour les sites monolingues) |
//code pour l'inclusion des langues NE PAS MODIFIER |
if (BAZ_VAR_URL_LANGUE != '' && isset (${BAZ_VAR_URL_LANGUE})) { |
include_once BAZ_CHEMIN_APPLI.'langues/baz_langue_'.${BAZ_VAR_URL_LANGUE}.'.inc.php'; |
} else { |
include_once BAZ_CHEMIN_APPLI.'langues/baz_langue_'.BAZ_LANGUE_PAR_DEFAUT.'.inc.php'; |
} |
// Option concernant la division des resultats en pages |
define ('BAZ_NOMBRE_RES_PAR_PAGE', 30); |
define ('BAZ_MODE_DIVISION', 'Jumping'); // 'Jumping' ou 'Sliding' voir http://pear.php.net/manual/fr/package.html.pager.compare.php |
define ('BAZ_DELTA', 12); // Le nombre de page à afficher avant le 'next'; |
/** Réglage de l'affichage du formulaire de recherche avancee */ |
// Mettre à true pour afficher automatiquement le formulaire de recherche avancee, à false pour avoir un lien afficher la recherche avancee |
define ('BAZ_MOTEUR_RECHERCHE_AVANCEE', 1); |
/** Réglage de l'utilisation ou non des templates */ |
// Mettre à true pour afficher les pages incluses dans la base bazar_template, à false sinon |
define ('BAZ_UTILISE_TEMPLATE', 1); |
/** Mettre a 0 pour le pas proposer de filtre dans le moteur de recherche */ |
define ('BAZ_AFFICHER_FILTRE_MOTEUR', 1); |
// Mettre ici le type d'annonce qui va s'afficher dans les calendriers. |
// Il est possible d'indiquer plusieurs identifiant de nature de fiche (bn_id_nature) en séparant les nombre par des |
// virgules : '1,2,3' |
define ('BAZ_NUM_ANNONCE_CALENDRIER', 3); |
define ('BAZ_CHEMIN_SQUELETTE', BAZ_CHEMIN_APPLI.'squelettes'.GEN_SEP); |
define ('BAZ_SQUELETTE_DEFAUT', 'baz_cal.tpl.html'); |
define ('BAZ_GOOGLE_KEY', ''); // Indiquer ici la cle google necessaire pour l appli bazar.carte_google.php |
if (defined ('BAZ_GOOGLE_KEY')) { |
define ('BAZ_GOOGLE_CENTRE_LAT', '43.444943'); |
define ('BAZ_GOOGLE_CENTRE_LON', '3.537598'); |
define ('BAZ_GOOGLE_ALTITUDE', '8'); // de 1 a 15 |
define ('BAZ_GOOGLE_IMAGE_LARGEUR', 600); // en pixel |
define ('BAZ_GOOGLE_IMAGE_HAUTEUR', 450); |
define ('BAZ_GOOGLE_MAXIMISE_TAILLE', false); // Si a true, la carte essaie de s etendre sur toute la largeur disponible |
define ('BAZ_GOOGLE_FOND_KML', ''); |
} |
// Gestion des droits |
// droit minimun pour pouvoir deposer une fiche, pour que le formulaire soit presente |
$GLOBALS['droit_depot'] = '3' ; |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.40 2008-10-27 16:52:38 aperonnet |
* correction de fautes d'orthographe |
* |
* Revision 1.39 2008-09-17 14:08:45 alexandre_tb |
* merge depuis aha |
* |
* Revision 1.38 2008-02-08 08:44:05 alexandre_tb |
* ajout du bloc de configuration si installation hors de papyrus |
* |
* Revision 1.37 2007-12-14 09:53:23 alexandre_tb |
* Fusion avec la livraison AHA : 14 decembre 2007 |
* |
* Revision 1.36 2007-10-01 12:03:19 alexandre_tb |
* constantes liees a la cartographie google des fiches |
* |
* Revision 1.35 2007-09-28 14:29:13 jp_milcent |
* Ajout de la gestion de l'affichage des vues ou pas. |
* |
* Revision 1.34 2007-09-28 13:40:50 jp_milcent |
* Précision sur la constante BAZ_FICHE_REDACTEUR_MAIL. |
* |
* Revision 1.33 2007-09-28 13:39:15 jp_milcent |
* Ajout d'une constante permettant de configurer l'affichage ou pas du courriel du rédacteur d'une fiche. |
* |
* Revision 1.32 2007-09-18 07:38:58 alexandre_tb |
* ajout de la constante BAZ_AFFICHER_FILTRE_MOTEUR pour enlever le choix du type de fiche dans le moteur de recherche. |
* |
* Revision 1.31 2007-08-27 12:29:48 alexandre_tb |
* ajout de la constante BAZ_GOOGLE_KEY |
* |
* Revision 1.30 2007-07-04 10:04:40 alexandre_tb |
* ajout d une variable $_GET['vue'] en complement de la variable action. |
* Elle correspond aux 6 vues du bazar (consulter, mes fiches, s'abonner, saisir, administrer, gestion des droits) |
* |
* Revision 1.29 2007-06-25 09:57:37 alexandre_tb |
* ajout de constante sur le chemin par defaut des squelettes |
* |
* Revision 1.28 2007/04/20 09:57:21 florian |
* correction bugs suite au merge |
* |
* Revision 1.27 2007/04/11 08:30:12 neiluj |
* remise en état du CVS... |
* |
* Revision 1.21.2.1 2007/02/15 13:43:54 jp_milcent |
* Ajout de commentaire pour la constante utilisée par le Calendrier. |
* |
* Revision 1.21 2006/10/05 08:53:50 florian |
* amelioration moteur de recherche, correction de bugs |
* |
* Revision 1.20 2006/07/04 13:59:01 alexandre_tb |
* Ajout de la constante BAZ_NUM_ANNONCE_CALENDRIER dans le fichier de conf. Elle indique le type d'annonce que le calendrier doit afficher |
* |
* Revision 1.19 2006/06/21 15:40:15 alexandre_tb |
* rétablissement du menu mes fiches |
* |
* Revision 1.18 2006/06/02 09:29:30 florian |
* ajout constante nom wikini |
* |
* Revision 1.17 2006/05/19 13:53:57 florian |
* stabilisation du moteur de recherche, corrections bugs, lien recherche avancee |
* |
* Revision 1.16 2006/05/17 09:48:48 alexandre_tb |
* Ajout des constantes pour le découpage en page |
* |
* Revision 1.15 2006/04/28 12:46:14 florian |
* integration des liens vers annuaire |
* |
* Revision 1.14 2006/03/24 09:23:30 alexandre_tb |
* ajout de la variable globale $GLOBALS['_BAZAR_']['filtre'] |
* |
* Revision 1.13 2006/03/14 17:10:21 florian |
* ajout des fonctions de syndication, changement du moteur de recherche |
* |
* Revision 1.12 2006/02/07 13:57:41 alexandre_tb |
* ajout de la constante pour masquer la liste des émetteurs |
* |
* Revision 1.11 2006/01/18 10:03:36 florian |
* recodage de l'insertion et de la maj des données relatives aux listes et checkbox dans des formulaires |
* |
* Revision 1.10 2006/01/03 10:19:31 florian |
* Mise à jour pour accepter des parametres dans papyrus: faire apparaitre ou non le menu, afficher qu'un type de fiches, définir l'action par défaut... |
* |
* Revision 1.9 2005/12/16 15:47:54 alexandre_tb |
* ajout de l'option restreindre dépôt |
* |
* Revision 1.8 2005/10/24 09:42:21 florian |
* mise a jour appropriation |
* |
* Revision 1.7 2005/10/21 16:15:04 florian |
* mise a jour appropriation |
* |
* Revision 1.6 2005/09/30 12:22:54 florian |
* Ajouts commentaires pour fiche, modifications graphiques, maj SQL |
* |
* Revision 1.4 2005/07/21 19:03:12 florian |
* nouveautés bazar: templates fiches, correction de bugs, ... |
* |
* Revision 1.2 2005/02/22 15:34:17 florian |
* integration dans Papyrus |
* |
* Revision 1.1.1.1 2005/02/17 18:05:11 florian |
* Import initial de Bazar |
* |
* Revision 1.1.1.1 2005/02/17 11:09:50 florian |
* Import initial |
* |
* Revision 1.1.1.1 2005/02/16 18:06:35 florian |
* import de la nouvelle version |
* |
* Revision 1.5 2004/07/08 12:15:32 florian |
* ajout constantes pour flux RSS |
* |
* Revision 1.4 2004/07/06 16:21:54 florian |
* débuggage modification + MAJ flux RSS |
* |
* Revision 1.3 2004/07/02 14:50:47 florian |
* ajout configuration de l'etat de l'annonce (visible,masquée,...) |
* |
* Revision 1.2 2004/07/01 10:13:30 florian |
* modif Florian |
* |
* Revision 1.1 2004/06/23 09:58:32 alex |
* version initiale |
* |
* Revision 1.1 2004/06/18 09:00:41 alex |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2014_06_04/configuration/bazar.admin.config.php |
---|
New file |
0,0 → 1,71 |
<?php |
//vim: set expandtab tabstop=4 shiftwidth=4: |
// Copyright (C) 1999-2004 Tela Botanica (accueil@tela-botanica.org) |
// |
// Ce logiciel est un programme informatique servant à gérer du contenu et des |
// applications web. |
// Ce logiciel est régi par la licence CeCILL soumise au droit français et |
// respectant les principes de diffusion des logiciels libres. Vous pouvez |
// utiliser, modifier et/ou redistribuer ce programme sous les conditions |
// de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA |
// sur le site "http://www.cecill.info". |
// En contrepartie de l'accessibilité au code source et des droits de copie, |
// de modification et de redistribution accordés par cette licence, il n'est |
// offert aux utilisateurs qu'une garantie limitée. Pour les mêmes raisons, |
// seule une responsabilité restreinte pèse sur l'auteur du programme, le |
// titulaire des droits patrimoniaux et les concédants successifs. |
// A cet égard l'attention de l'utilisateur est attirée sur les risques |
// associés au chargement, à l'utilisation, à la modification et/ou au |
// développement et à la reproduction du logiciel par l'utilisateur étant |
// donné sa spécificité de logiciel libre, qui peut le rendre complexe à |
// manipuler et qui le réserve donc à des développeurs et des professionnels |
// avertis possédant des connaissances informatiques approfondies. Les |
// utilisateurs sont donc invités à charger et tester l'adéquation du |
// logiciel à leurs besoins dans des conditions permettant d'assurer la |
// sécurité de leurs systèmes et ou de leurs données et, plus généralement, |
// à l'utiliser et l'exploiter dans les mêmes conditions de sécurité. |
// Le fait que vous puissiez accéder à cet en-tête signifie que vous avez |
// pris connaissance de la licence CeCILL, et que vous en avez accepté les |
// termes. |
// ---- |
// CVS : $Id: bazar.admin.config.php,v 1.1 2007-02-02 14:01:20 alexandre_tb Exp $ |
/** |
* Papyrus : Programme d'administration du bazar |
* |
* Fichier de configuration |
*@package Bazar |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2007 |
*@version $Revision: 1.1 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTÊTE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// BAZ_CHEMIN_APPLI : chemin vers l'application bazar METTRE UN SLASH (/) A LA FIN!!!! |
define('BAZ_CHEMIN_APPLI', PAP_CHEMIN_RACINE.'client/bazar/'); |
// Variable action |
define ('BAZ_VARIABLE_ACTION', 'action'); |
// +------------------------------------------------------------------------------------------------------+ |
// | CONSTANTES D ACTION | |
// +------------------------------------------------------------------------------------------------------+ |
define ('BAZ_ACTION_VOIR_TEMPLATE', 1); |
/* +--Fin du code ---------------------------------------------------------------------------------------+ |
* $Log: not supported by cvs2svn $ |
* +--Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2014_06_04/documentation/doc_mise_a_jour.txt |
---|
New file |
0,0 → 1,17 |
Pour mettre à jour le bazar: |
- Mettre en place les tables manquantes (bazar_template) |
- Ajouter tous les templates manquants (il doit y en avoir 8) |
- Mettre à jour l'api de papyrus notament XML_Util |
- vérifier la concordance entre bt_categorie_nature et bn_ce_id_menu |
- dans papyrus, vérifier les arguments passés au menu en particulier l'argument "vue" |
qui remplace dans la plupart des cas l'argument "action" (vue=1 pour consulter etc. voir baz_config.inc.php) |
- puis vérfifier le fichier de configuration, ajouter les constantes qu'il pourrait manquer |
notament BAZ_UTILISE_TEMPLATE qu'il faut mettre à 1, BAZ_AFFICHER_FILTRE_MOTEUR qui peut valoir 0 ou 1 |
- les constantes BAZ_VOIR_* vers le debut |
- vérifier la version de papyrus, en particulier pour les flux RSS qui ont beaucoup évolué |
- envoyer les fichiers de bazar, sauf le fichier de conf et le fichier de style css. - envoyer les fichiers de bazar, sauf le fichier de conf. |
- Ajout du 28-09-2007 (jpm) : BAZ_VOIR_AFFICHER indique les vues (=onglets) que l'on veut afficher, par défaut toutes les vues sont affichées -> remplace l'utilisation des CSS pour cacher les onglets |
- Ajout du 28-09-2007 (jpm) : BAZ_VOIR_DEFAUT permet d'indiquer la vue par défaut. |
- Ajout du 28-09-2007 (jpm) : BAZ_FICHE_REDACTEUR_MAIL permet d'afficher ou pas le mail du rédacteur d'une fiche lors de la consultation de la fiche. |
/tags/2014_06_04/documentation/balises.txt |
---|
New file |
0,0 → 1,2 |
Affichage calendrier : |
CLIENT_BAZAR_CALENDRIER |
/tags/2014_06_04/documentation/bazar_v0.24.sql |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/tags/2014_06_04/documentation/bazar_v0.24.sql |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/tags/2014_06_04/bazar.admin.php |
---|
New file |
0,0 → 1,169 |
<?php |
//vim: set expandtab tabstop=4 shiftwidth=4: |
// Copyright (C) 1999-2004 Tela Botanica (accueil@tela-botanica.org) |
// |
// Ce logiciel est un programme informatique servant à gérer du contenu et des |
// applications web. |
// Ce logiciel est régi par la licence CeCILL soumise au droit français et |
// respectant les principes de diffusion des logiciels libres. Vous pouvez |
// utiliser, modifier et/ou redistribuer ce programme sous les conditions |
// de la licence CeCILL telle que diffusée par le CEA, le CNRS et l'INRIA |
// sur le site "http://www.cecill.info". |
// En contrepartie de l'accessibilité au code source et des droits de copie, |
// de modification et de redistribution accordés par cette licence, il n'est |
// offert aux utilisateurs qu'une garantie limitée. Pour les mêmes raisons, |
// seule une responsabilité restreinte pèse sur l'auteur du programme, le |
// titulaire des droits patrimoniaux et les concédants successifs. |
// A cet égard l'attention de l'utilisateur est attirée sur les risques |
// associés au chargement, à l'utilisation, à la modification et/ou au |
// développement et à la reproduction du logiciel par l'utilisateur étant |
// donné sa spécificité de logiciel libre, qui peut le rendre complexe à |
// manipuler et qui le réserve donc à des développeurs et des professionnels |
// avertis possédant des connaissances informatiques approfondies. Les |
// utilisateurs sont donc invités à charger et tester l'adéquation du |
// logiciel à leurs besoins dans des conditions permettant d'assurer la |
// sécurité de leurs systèmes et ou de leurs données et, plus généralement, |
// à l'utiliser et l'exploiter dans les mêmes conditions de sécurité. |
// Le fait que vous puissiez accéder à cet en-tête signifie que vous avez |
// pris connaissance de la licence CeCILL, et que vous en avez accepté les |
// termes. |
// ---- |
// CVS : $Id: bazar.admin.php,v 1.2 2007-04-20 09:57:21 florian Exp $ |
/** |
* Papyrus : Programme d'administration du bazar |
* |
* La page contient l'appel aux fonctions de l'application de vérification de l'installation puis |
* l'appel du fichier réalisant l'initialisation. Enfin, l'appel du fichier réalisant le rendu et |
* retournant la page au navigateur client. |
* |
*@package Bazar |
//Auteur original : |
*@author Florian SCHMITT <florian.schmitt@laposte.net> |
*@copyright Tela-Botanica 2000-2007 |
*@version $Revision: 1.2 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTÊTE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
include_once 'configuration/baz_config.inc.php'; //fichier de configuration de Bazar |
//appel du fichier de constantes des langues |
include_once 'langues/baz_langue_'.$GLOBALS['_GEN_commun']['i18n'].'.inc.php'; |
// +------------------------------------------------------------------------------------------------------+ |
// | CLASSE | |
// +------------------------------------------------------------------------------------------------------+ |
class Bazar_Admin { |
var $objet_pear_auth; |
var $objet_pear_db; |
var $objet_pear_url; |
var $sortie_xhtml; |
/** Fonction redigerContenu() - Affiche le formulaire de r?action |
* |
* |
* @return string Le HTML |
*/ |
function afficherContenuCorps() |
{ |
//------------------------------------------------------------------------------------------------------------------- |
// Initialisation des attributs |
$this->objet_pear_auth = $GLOBALS['_GEN_commun']['pear_auth']; |
$this->objet_pear_db = $GLOBALS['_GEN_commun']['pear_db']; |
$this->objet_pear_url = $GLOBALS['_GEN_commun']['url']; |
$this->sortie_xhtml = '<h1>'.BAZ_CONFIG.'</h1>'."\n"; |
//------------------------------------------------------------------------------------------------------------------- |
// Gestion des boutons de l'interface |
if (isset($_POST['afficheur_annuler'])) { |
return false; |
} else if (isset($_POST['afficheur_enregistrer_quitter'])) { |
$requete = 'UPDATE gen_menu SET gm_application_arguments="num_questionnaire='.$_POST['num_questionnaire']. |
'||mail_questionnaire='.$_POST['mail_questionnaire'].'||texte_questionnaire_envoye='.$_POST['texte_questionnaire_envoye'].'" WHERE gm_id_menu='.$_GET['adme_menu_id']; |
$resultat = $this->objet_pear_db->query($requete) ; |
if (DB::isError($resultat)) { |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
} |
return false; |
} |
//-------------------------------------------------------------------------------------------------------------- |
// Gestion des valeurs par defauts, en fonctions des donnees sauvees dans le menu |
$requete = 'SELECT gm_application_arguments FROM gen_menu WHERE gm_id_menu='.$_GET['adme_menu_id']; |
$resultat = $this->objet_pear_db->query($requete) ; |
//echo $requete; |
if (DB::isError($resultat)) { |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
} |
$valeurs_par_defaut = array(); |
if ($resultat->numRows()>0) { |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) { |
$arguments = explode('||', $ligne->gm_application_arguments); |
for ($i = 0; $i < count($arguments); $i++) { |
$attr = explode('=', $arguments[$i], 2); |
if ($attr[0] != '') { |
$info_application->$attr[0] = (isset($attr[1]) ? $attr[1] : ''); |
} |
} |
} |
//valeurs par defaut enregistrees dans la table |
if (isset($info_application)) { |
$valeurs_par_defaut['num_questionnaire']=$info_application->num_questionnaire; |
$valeurs_par_defaut['mail_questionnaire']=$info_application->mail_questionnaire; |
$valeurs_par_defaut['texte_questionnaire_envoye']=$info_application->texte_questionnaire_envoye; |
} |
} else { |
//valeurs par defaut pour afficher une carto des structures |
$valeurs_par_defaut['num_questionnaire']=''; |
$valeurs_par_defaut['mail_questionnaire']=''; |
$valeurs_par_defaut['texte_questionnaire_envoye']=''; |
} |
//-------------------------------------------------------------------------------------------------------------- |
// Gestion du questionnaire |
$this->objet_pear_url->addQueryString('adme_site_id', $_GET['adme_site_id']); |
$this->objet_pear_url->addQueryString('adme_menu_id', $_GET['adme_menu_id']); |
$this->objet_pear_url->addQueryString('adme_action', 'administrer'); |
$form =& new HTML_QuickForm('form_param_bazar', 'post', str_replace('&', '&', $this->objet_pear_url->getUrl())); |
$squelette =& $form->defaultRenderer(); |
$squelette->setFormTemplate("\n".'<form {attributes}>'."\n".'{content}'."\n".'</form>'."\n"); |
$squelette->setElementTemplate( '<p>'."\n". |
'<label style="width:100px;padding:5px;text-align:right;">{label}'. |
'<!-- BEGIN required --><span class="symbole_obligatoire">*</span><!-- END required -->'."\n". |
'<!-- BEGIN error --><span class="erreur">{error}</span><!-- END error -->'."\n". |
' : </label>'."\n".'{element}'."\n". |
'</p>'."\n" ); |
$form->addElement('text', 'mail_questionnaire', QUESTIONNAIRE_MAIL); |
$liste_bouton_debut = '<ul class="liste_bouton">'."\n"; |
$form->addElement('html', $liste_bouton_debut); |
$form->addElement('submit', 'afficheur_enregistrer_quitter', BAZ_ENREGISTRER_ET_QUITTER); |
$form->addElement('submit', 'afficheur_annuler', BAZ_ANNULER); |
$liste_bouton_fin = '</ul>'."\n"; |
$form->addElement('html', $liste_bouton_fin); |
$form->setDefaults($valeurs_par_defaut); |
$this->sortie_xhtml .= $form->toHTML()."\n"; |
return $this->sortie_xhtml; |
} |
}// Fin de la classe |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
/* +--Fin du code ---------------------------------------------------------------------------------------+ |
* $Log: not supported by cvs2svn $ |
* Revision 1.1 2007/02/02 14:02:08 alexandre_tb |
* version initiale vide pour le moment |
* |
* +--Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2014_06_04/bibliotheque/bazar.abonnement.inc.php |
---|
New file |
0,0 → 1,68 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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$ |
/** |
* Fonctions d'abonnement a afficher dans la fiche du bottin |
* |
* |
*@package inscription |
//Auteur original : |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
//Autres auteurs : |
* |
*@copyright Outils-Reseaux 2006-2010 |
*@version $Revision$ $Date$ |
*@version $Revision$ $Date$ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
include_once PAP_CHEMIN_RACINE.'client/bazar/configuration/baz_config.inc.php' ; |
include_once PAP_CHEMIN_RACINE.'client/bazar/bibliotheque/bazar.fonct.php' ; |
// +------------------------------------------------------------------------------------------------------+ |
// | LISTE de FONCTIONS | |
// +------------------------------------------------------------------------------------------------------+ |
$GLOBALS['id_user']=$id; |
if (isset($_GET[BAZ_VARIABLE_ACTION]) && $_GET[BAZ_VARIABLE_ACTION]==BAZ_VOIR_FLUX_RSS) { |
header('Content-type: text/xml; charset=ISO-8859-1'); |
include(PAP_CHEMIN_RACINE.'client/bazar/bazarRSS.php');exit(0);break; |
} else { |
$abonnement = baz_s_inscrire(); |
} |
//-- Fin du code source ------------------------------------------------------------ |
/* |
* $Log$ |
* Revision 1.2 2006-10-05 08:53:50 florian |
* amelioration moteur de recherche, correction de bugs |
* |
* Revision 1.1 2006/04/28 12:46:14 florian |
* integration des liens vers annuaire |
* |
* |
*/ |
?> |
/tags/2014_06_04/bibliotheque/bazar.fonct.rss.php |
---|
New file |
0,0 → 1,1693 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: bazar.fonct.rss.php,v 1.99.2.14 2008-11-19 09:30:18 aperonnet Exp $ |
/** |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2006 |
*@version $Revision: 1.99.2.14 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
require_once BAZ_CHEMIN_APPLI.'bibliotheque/bazar.class.php'; |
require_once BAZ_CHEMIN_APPLI.'bibliotheque/bazar.fonct.php'; |
/** baz_valeur_template() - Renvoi des valeurs inscrite dans le fichier de template |
* |
* @param string valeur du template de bazar_nature |
* |
* @return mixed tableau contenant les champs du fichier template |
*/ |
function baz_valeurs_template($valeur_template) { |
//Parcours du fichier de templates, pour mettre les champs specifiques |
$tableau= array(); |
$nblignes=0; |
$chaine = explode ("\n", $valeur_template); |
//array_pop($chaine); |
foreach ($chaine as $ligne) { |
$souschaine = explode ("***", $ligne) ; |
$tableau[$nblignes]['type'] = trim($souschaine[0]) ; |
if (isset($souschaine[1])) {$tableau[$nblignes]['nom_bdd'] = trim($souschaine[1]);} |
else {$tableau[$nblignes]['nom_bdd'] ='';} |
if (isset($souschaine[2])) $tableau[$nblignes]['label'] = trim($souschaine[2]); |
else {$tableau[$nblignes]['label'] ='';} |
if (isset($souschaine[3])) $tableau[$nblignes]['limite1'] = trim($souschaine[3]); |
else {$tableau[$nblignes]['limite1'] ='';} |
if (isset($souschaine[4])) $tableau[$nblignes]['limite2'] = trim($souschaine[4]); |
else {$tableau[$nblignes]['limite2'] ='';} |
if (isset($souschaine[5])) $tableau[$nblignes]['defaut'] = trim($souschaine[5]); |
else {$tableau[$nblignes]['defaut'] ='';} |
if (isset($souschaine[6])) $tableau[$nblignes]['table_source'] = trim($souschaine[6]); |
else {$tableau[$nblignes]['table_source'] ='';} |
if (isset($souschaine[7])) $tableau[$nblignes]['id_source'] = trim($souschaine[7]); |
else {$tableau[$nblignes]['id_source'] ='';} |
if (isset($souschaine[8])) $tableau[$nblignes]['obligatoire'] = trim($souschaine[8]); |
else {$tableau[$nblignes]['obligatoire'] ='';} |
if (isset($souschaine[9])) $tableau[$nblignes]['recherche'] = trim($souschaine[9]); |
else {$tableau[$nblignes]['recherche'] ='';} |
// traitement des cases à cocher, dans ce cas la, on a une table de jointure entre la table |
// de liste et la table bazar_fiche (elle porte un nom du genre bazar_ont_***) |
// dans le template, à la place d'un nom de champs dans 'nom_bdd', on a un nom de table |
// et 2 noms de champs séparés par un virgule ex : bazar_ont_theme,bot_id_theme,bot_id_fiche |
if (isset($tableau[$nblignes]['nom_bdd']) && preg_match('/,/', $tableau[$nblignes]['nom_bdd'])) { |
$tableau_info_jointe = explode (',', $tableau[$nblignes]['nom_bdd']) ; |
$tableau[$nblignes]['table_jointe'] = $tableau_info_jointe[0] ; |
$tableau[$nblignes]['champs_id_fiche'] = $tableau_info_jointe[1] ; |
$tableau[$nblignes]['champs_id_table_jointe'] = $tableau_info_jointe[2] ; |
} |
$nblignes++; |
} |
return $tableau; |
} |
/** baz_voir_fiches() - Permet de visualiser en detail une liste de fiche au format XHTML |
* |
* @global boolean Rajoute des informations internes a l'application (date de modification, lien vers la page de départ de l'appli) |
* @global integer Tableau d(Identifiant des fiches a afficher |
* |
* @return string HTML |
*/ |
function baz_voir_fiches($danslappli, $idfiches=array()) { |
$res=''; |
foreach($idfiches as $idfiche) { |
$res.=baz_voir_fiche($danslappli, $idfiche); |
} |
return $res; |
} |
/** baz_voir_fiche() - Permet de visualiser en detail une fiche au format XHTML |
* |
* @global boolean Rajoute des informations internes a l'application (date de modification, lien vers la page de depart de l'appli) si a 1 |
* @global integer Identifiant de la fiche a afficher |
* |
* @return string HTML |
*/ |
function baz_voir_fiche($danslappli, $idfiche='') { |
$res=''; |
if (isset($_GET['id_fiche'])) $GLOBALS['_BAZAR_']['id_fiche'] = $_GET['id_fiche']; |
if ($idfiche != '') $GLOBALS['_BAZAR_']['id_fiche'] = $idfiche; |
$url = $GLOBALS['_BAZAR_']['url']; |
$url->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_FICHE); |
$url->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']); |
$url = preg_replace ('/&/', '&', $url->getURL()) ; |
//cas ou la fiche a ete validee |
if (isset($_GET['publiee'])) { |
publier_fiche($_GET['publiee']); |
} |
//cas on une structure s'approprie une ressource |
if (isset($_GET['appropriation'])) { |
if ($_GET['appropriation']==1) { |
$requete = 'INSERT INTO bazar_appropriation VALUES ('.$GLOBALS['_BAZAR_']['id_fiche'].', '.$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID).')'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
} |
elseif ($_GET['appropriation']==0) { |
$requete = 'DELETE FROM bazar_appropriation WHERE ba_ce_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'].' AND ba_ce_id_structure='.$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID); |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
} |
} |
//cas ou un commentaire a ete entre |
if (isset($_POST['Nom'])) { |
$requete = 'INSERT INTO bazar_commentaires VALUES ('. |
baz_nextid('bazar_commentaires', 'bc_id_commentaire', $GLOBALS['_BAZAR_']['db']). |
', '.$GLOBALS['_BAZAR_']['id_fiche'].', "'.$_POST['Nom'].'", "'.$_POST['Commentaire']. |
'", NOW() )'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
} |
//cas ou un commentaire va etre supprime |
elseif (isset($_GET['id_commentaire'])) { |
$requete = 'DELETE FROM bazar_commentaires WHERE bc_id_commentaire='.$_GET['id_commentaire'].' LIMIT 1'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
} |
else { |
if (isset($_GET[BAZ_VARIABLE_ACTION])) { |
if ($_GET[BAZ_VARIABLE_ACTION]==BAZ_VOIR_FICHE) { |
//sinon on met a jour le nb de visites pour la fiche, puisque c'est une simple consultation |
$requete = 'UPDATE bazar_fiche SET bf_nb_consultations=bf_nb_consultations+1 WHERE bf_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche']; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
} |
} |
} |
$requete = 'SELECT * FROM bazar_fiche,bazar_nature WHERE bf_ce_nature=bn_id_nature and bf_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche']; |
if (isset($GLOBALS['_BAZAR_']['langue'])) $requete .= ' and bn_ce_i18n like "'.$GLOBALS['_BAZAR_']['langue'].'"'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
$res = '<div class="'.BAZ_classe_erreur.'">'.BAZ_FICHE_INEXISTANTE.'</div> \n' ; |
return res ; |
} |
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC) ; |
$GLOBALS['_BAZAR_']['ligne_resultat'] = $ligne; |
if (!isset($GLOBALS['_BAZAR_']['typeannonce'])) $GLOBALS['_BAZAR_']['typeannonce'] = $ligne['bf_ce_nature']; |
if (!isset($GLOBALS['_BAZAR_']['fiche_valide'])) $GLOBALS['_BAZAR_']['fiche_valide'] = $ligne['bf_statut_fiche']; |
//on verifie si l'utilisateur est administrateur |
$est_admin=0; |
// Si on vient de l applette calendrier, $GLOBALS['_BAZAR_']['id_typeannonce'] est vide ... |
// mais on dispose de la constante BAZ_NUM_ANNONCE_CALENDRIER |
if (!isset($GLOBALS['_BAZAR_']['id_typeannonce']) && defined('BAZ_NUM_ANNONCE_CALENDRIER')) $GLOBALS['_BAZAR_']['id_typeannonce'] = BAZ_NUM_ANNONCE_CALENDRIER; |
if (!isset($GLOBALS['_BAZAR_']['template'])) $GLOBALS['_BAZAR_']['template'] = $ligne['bn_template']; |
if (!isset($GLOBALS['_BAZAR_']['commentaire'])) $GLOBALS['_BAZAR_']['commentaire'] = $ligne['bn_commentaire']; |
if (!isset($GLOBALS['_BAZAR_']['class'])) $GLOBALS['_BAZAR_']['class'] = $ligne['bn_label_class']; |
$utilisateur = new Administrateur_bazar ($GLOBALS['AUTH']); |
if ($utilisateur->isAdmin($ligne['bn_id_nature']) || $utilisateur->isSuperAdmin()) { |
$est_admin=1; |
} |
//debut de la fiche |
$res .= '<div class="BAZ_cadre_fiche BAZ_cadre_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n"; |
//affiche le titre sous forme d'image |
if (isset ($GLOBALS['_BAZAR_']['image_titre']) && $GLOBALS['_BAZAR_']['image_titre']!='') { |
$res .= '<img class="BAZ_img_titre" src="client/bazar/images/'.$GLOBALS['_BAZAR_']['image_titre'].'" alt="'.$ligne['bn_label_nature'].'" />'.'<br />'."\n"; |
} |
//affiche le texte sinon |
else { |
$res .= '<h1 class="BAZ_titre BAZ_titre_'.$GLOBALS['_BAZAR_']['class'].'">'.$ligne['bn_label_nature'].'</h1>'."\n"; |
} |
$GLOBALS['_BAZAR_']['annonceur'] = $ligne['bf_ce_utilisateur'] ; |
//si le template existe, on genere le template |
if ((file_exists(BAZ_CHEMIN_APPLI.'templates/'.$GLOBALS['_BAZAR_']['typeannonce'].'-fiche.php'))) { |
include_once(BAZ_CHEMIN_APPLI.'templates/'.$GLOBALS['_BAZAR_']['typeannonce'].'-fiche.php'); |
$res .=genere_fiche($ligne); |
} |
//on affiche ligne par ligne sinon |
else { |
// Le titre |
$res .= '<h1 class="BAZ_fiche_titre BAZ_fiche_titre_'.$GLOBALS['_BAZAR_']['class'].'">'.$ligne['bf_titre'].'</h1>'."\n"; |
// cas d'une image personalisee |
if (isset($ligne['bf_url_image'])) { |
$res .= '<div class="BAZ_fiche_image BAZ_fiche_image_'.$GLOBALS['_BAZAR_']['class'].'">'."\n"; |
$res .= '<img class="BAZ_image" src="client/bazar/upload/'.$ligne['bf_url_image'].'" border=0 alt="'.BAZ_TEXTE_IMG_ALTERNATIF.'" />'."\n"; |
$res .= '</div>'."\n"; |
} |
//cas d'une image par defaut |
elseif (isset ($GLOBALS['_BAZAR_']['image_logo']) && $GLOBALS['_BAZAR_']['image_logo']!='') { |
$res .= '<div class="BAZ_fiche_image BAZ_fiche_image_'.$GLOBALS['_BAZAR_']['class'].'">'."\n"; |
$res .= '<img class="BAZ_image" src="client/bazar/images/'.$GLOBALS['_BAZAR_']['image_logo'].'" border=0 alt="'.BAZ_TEXTE_IMG_ALTERNATIF.'" width="130" height="130" />'."\n"; |
$res .= '</div>'."\n"; |
} |
//$res .= '<div class="BAZ_description BAZ_description_'.$GLOBALS['_BAZAR_']['class'].'">'.nl2br($ligne['bf_description']).'</div>'."\n"; |
$tableau=baz_valeurs_template($GLOBALS['_BAZAR_']['template']); |
/** Boucle d affichage des resultats |
* |
*/ |
// Le parametre pas_de_carte permet a l element de type cartegoogle |
// de ne pas renvoyer la carte lors de l affichage d une fiche (par exemple dans les fiches du calendrier) |
$danslappli == 1 ? $GLOBALS['pas_de_carte'] = 0 : $GLOBALS['pas_de_carte'] = 1; |
for ($i=0; $i < count($tableau); $i++) { |
if (isset($ligne[$tableau[$i]['nom_bdd']])) { |
$type = $tableau[$i]['type']; |
$valeur = $ligne[$tableau[$i]['nom_bdd']]; |
} else { |
$type = $tableau[$i]['type']; |
$valeur = ''; |
} |
$element = Bazar_element::factory($type, $tableau[$i]); |
if (!PEAR::isError($element)) { |
$res .= $element->toHTML($valeur); |
} else { |
} |
if ( $tableau[$i]['type']=='wikini' ) { |
$res .= '<div class="BAZ_lien_wikini BAZ_lien_wikini_'.$GLOBALS['_BAZAR_']['class'].'"><a href="wikini/'.genere_nom_wiki2($ligne["bf_titre"], TRUE).'">'.BAZ_ENTRER_PROJET.'</a></div>'."\n"; |
} |
} |
//afficher les liens pour l'annonce |
$requete = 'SELECT bu_url, bu_descriptif_url FROM bazar_url WHERE bu_ce_fiche='.$GLOBALS['_BAZAR_']['id_fiche']; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
if ($resultat->numRows()>0) { |
$res .= '<span class="BAZ_label BAZ_label_'.$GLOBALS['_BAZAR_']['class'].'">'.BAZ_LIEN_INTERNET.':</span>'."\n"; |
$res .= '<span class="BAZ_description BAZ_description_'.$GLOBALS['_BAZAR_']['class'].'">'."\n"; |
$res .= '<ul class="BAZ_liste BAZ_liste_'.$GLOBALS['_BAZAR_']['class'].'">'."\n"; |
while ($ligne1 = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$res .= '<li class="BAZ_liste_lien BAZ_liste_lien_'.$GLOBALS['_BAZAR_']['class'].'"><a href="'.$ligne1['bu_url'].'" class="BAZ_lien" target="_blank">'.$ligne1['bu_descriptif_url'].'</a></li>'."\n"; |
} |
$res .= '</ul></span>'."\n"; |
} |
//afficher les fichiers pour l'annonce |
$requete = 'SELECT bfj_description, bfj_fichier FROM bazar_fichier_joint WHERE bfj_ce_fiche='.$GLOBALS['_BAZAR_']['id_fiche']; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
if ($resultat->numRows()>0) { |
$res .= '<span class="BAZ_label BAZ_label_'.$GLOBALS['_BAZAR_']['class'].'">'.BAZ_LISTE_FICHIERS_JOINTS.':</span>'."\n"; |
$res .= '<span class="BAZ_description BAZ_description_'.$GLOBALS['_BAZAR_']['class'].'">'."\n"; |
$res .= '<ul class="BAZ_liste BAZ_liste_'.$GLOBALS['_BAZAR_']['class'].'">'."\n"; |
while ($ligne2 = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$res .= '<li class="BAZ_liste_fichier BAZ_liste_fichier_'.$GLOBALS['_BAZAR_']['class'].'"><a href="client/bazar/upload/'.$ligne2['bfj_fichier'].'">'.$ligne2['bfj_description'].'</a></li>'."\n"; |
} |
$res .= '</ul></span>'."\n"; |
} |
$res .= '<div class="BAZ_bulle_corps BAZ_bulle_corps_'.$GLOBALS['_BAZAR_']['class'].'">'."\n"; |
$res .= '<div class="BAZ_infos_fiche BAZ_infos_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n"; |
$res .= '<span class="BAZ_nb_vues BAZ_nb_vues_'.$GLOBALS['_BAZAR_']['class'].'">'.BAZ_NB_VUS.$ligne['bf_nb_consultations'].BAZ_FOIS.'</span><br />'."\n"; |
//affichage du redacteur de la fiche |
$requete = 'SELECT '.BAZ_CHAMPS_NOM.', '.BAZ_CHAMPS_PRENOM.', '.BAZ_CHAMPS_EMAIL. |
' FROM '.BAZ_ANNUAIRE.' WHERE '.BAZ_CHAMPS_ID.'='.$ligne['bf_ce_utilisateur']; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
if (DB::isError($resultat)) { |
$res = '<div class="'.BAZ_classe_erreur.'">'.BAZ_FICHE_INEXISTANTE.'</div>' ; |
return $res ; |
} |
} |
while ($redacteur = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$res .= '<span class="BAZ_fiche_ecrite">'.BAZ_FICHE_NUMERO.$GLOBALS['_BAZAR_']['id_fiche'].BAZ_ECRITE; |
if (!defined('BAZ_FICHE_REDACTEUR_MAIL') || BAZ_FICHE_REDACTEUR_MAIL) { |
$res .= '<a href="mailto:'.$redacteur[BAZ_CHAMPS_EMAIL].'">'.$redacteur[BAZ_CHAMPS_PRENOM].' '.$redacteur[BAZ_CHAMPS_NOM].'</a>'; |
} else { |
$res .= $redacteur[BAZ_CHAMPS_PRENOM].' '.$redacteur[BAZ_CHAMPS_NOM]; |
} |
$res .= '<br /></span>'."\n"; |
} |
//informations complementaires (id fiche, etat publication,... ) |
if ($danslappli==1) { |
if ($GLOBALS['_BAZAR_']['fiche_valide']==1 && $GLOBALS['_BAZAR_']['appropriation']!=1) { |
if ($ligne['bf_date_debut_validite_fiche'] != '0000-00-00' && $ligne['bf_date_fin_validite_fiche'] != '0000-00-00') { |
$res .= '<span class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'">'.BAZ_PUBLIEE.':</span> '.BAZ_DU. |
' '.strftime('%d.%m.%Y',strtotime($ligne['bf_date_debut_validite_fiche'])).' '. |
BAZ_AU.' '.strftime('%d.%m.%Y',strtotime($ligne['bf_date_fin_validite_fiche'])).'<br />'."\n"; |
} |
} |
elseif ($GLOBALS['_BAZAR_']['appropriation']!=1 || $GLOBALS['_BAZAR_']['fiche_valide']!=1) { |
$res .= '<span class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'">'.BAZ_PUBLIEE.':</span> '.BAZ_NON.'<br />'."\n"; |
} |
//affichage des infos et du lien pour la mise a jour de la fiche |
if ( $est_admin || $GLOBALS['_BAZAR_']['annonceur']==$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID) ) { |
$res .= '<span class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'" id="date_creation">'.BAZ_DATE_CREATION.'</span> '.strftime('%d.%m.%Y %H:%M',strtotime($ligne['bf_date_creation_fiche']))."\n"; |
$res .= '<span class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'" id="date_mise_a_jour">'.BAZ_DATE_MAJ.'</span> '.strftime('%d.%m.%Y %H:%M',strtotime($ligne['bf_date_maj_fiche']))."\n"; |
} |
$res .= '</div>'."\n"; |
if ( $est_admin || $GLOBALS['_BAZAR_']['annonceur']==$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID) ) { |
$res .= '<div class="BAZ_actions_fiche BAZ_actions_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n"; |
$res .= '<ul>'."\n"; |
if ( $est_admin ) { |
$lien_publie = &$GLOBALS['_BAZAR_']['url']; |
$lien_publie->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_FICHE); |
$lien_publie->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']); |
$lien_publie->addQueryString('typeannonce', $ligne['bf_ce_nature']); |
if ($GLOBALS['_BAZAR_']['fiche_valide']==0||$GLOBALS['_BAZAR_']['fiche_valide']==2) { |
$lien_publie->addQueryString('publiee', 1); |
$label_publie=BAZ_VALIDER_LA_FICHE; |
$class_publie='_valider'; |
$res .= '<form method="post" action="'.$lien_publie->getURL().'" ><li><label class="BAZ_label" id="label_validite" for="date_validite"> Date de validité :</label><input id="date_validite" name="date_validite" type="text" value="'.$ligne['bf_date_debut_validite_fiche'].'" /></li> <li><input class="bouton_valider" type="submit" value="Valider la fiche" /></li></form>'; |
} elseif ($GLOBALS['_BAZAR_']['fiche_valide']==1) { |
$lien_publie->addQueryString('publiee', 1); |
$res .= '<form method="post" action="'.$lien_publie->getURL().'" ><li><label class="BAZ_label" id="label_validite" for="date_validite"> Date de validité :</label><input id="date_validite" name="date_validite" type="text" value="'.$ligne['bf_date_debut_validite_fiche'].'" /> <input type="submit" class="bouton_valider" value="Modifier" /></form>'; |
$lien_publie->removeQueryString('publiee'); |
$lien_publie->addQueryString('publiee', 0); |
$label_publie=BAZ_INVALIDER_LA_FICHE; |
$class_publie='_invalider'; |
$res .= '<li class="BAZ_liste'.$class_publie.'"><a href="'.$lien_publie->getURL().'">'.$label_publie.'</a></li>'."\n"; |
} |
} |
$lien_modifier=$GLOBALS['_BAZAR_']['url']; |
$lien_modifier->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_MODIFIER); |
$lien_modifier->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']); |
$lien_modifier->addQueryString('typeannonce', $ligne['bf_ce_nature']); |
$res .= '<li class="BAZ_liste_modifier"><a href="'.$lien_modifier->getURL().'" id="modifier_fiche">'.BAZ_MODIFIER_LA_FICHE.'</a></li>'."\n"; |
$lien_supprimer=$GLOBALS['_BAZAR_']['url']; |
$lien_supprimer->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_SUPPRESSION); |
$lien_supprimer->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']); |
$lien_supprimer->addQueryString('typeannonce', $ligne['bf_ce_nature']); |
$res .= '<li class="BAZ_liste_supprimer"><a href="'.$lien_supprimer->getURL().'" id="supprimer_fiche">'.BAZ_SUPPRIMER_LA_FICHE.'</a></li>'."\n"; |
$res .= '</ul>'."\n"; |
$res .= '</div>'."\n"; |
} |
} |
$res .= '</div>'."\n"; |
$res .= '</div>'."\n"; |
} |
// Nous vérifions comment est appelé la fonction |
if ($danslappli == 0) { |
$lien_voir=$GLOBALS['_BAZAR_']['url']; |
$lien_voir->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_CONSULTER); |
$lien_voir->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']); |
$lien_voir->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_FICHE); |
$res .= '<div class="BAZ_lien_fiche"><a href="'.str_replace('carte_','',$lien_voir->getURL()).'" class="BAZ_lien">'.BAZ_VOIR_LA_FICHE.'</a></div>'."\n"; |
$res .= '</div>'."\n"; |
} else if ($danslappli == 1 ) { |
// Ajout des appropriations, s'il le faut |
if ($GLOBALS['_BAZAR_']['appropriation'] == 1) { |
$res .= '<br />'."\n".'<div class="BAZ_cadre_fiche BAZ_cadre_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n"; |
$res .= '<h2 class="BAZ_titre BAZ_titre_'.$GLOBALS['_BAZAR_']['class'].'">'.BAZ_LES_STRUCTURES_POSSEDANT_UNE_RESSOURCE.'</h2>'."\n"; |
$requete = 'SELECT '.BAZ_CHAMPS_ID.', '.BAZ_CHAMPS_NOM.' FROM bazar_appropriation,'.BAZ_ANNUAIRE.' WHERE ba_ce_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'].' AND ba_ce_id_structure='.BAZ_CHAMPS_ID.' ORDER BY '.BAZ_CHAMPS_NOM.' ASC'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete . ' -- ' . __FILE__ . ':' . __LINE__) ; |
if (DB::isError ($resultat)) { |
return $resultat->getMessage().'<br />'.$resultat->getDebugInfo(); |
} |
$possede_ressource=0; |
if ($resultat->numRows()>0) { |
$res .= BAZ_IL_Y_A.$resultat->numRows().' '; |
if ($resultat->numRows()==1) $res .= BAZ_STRUCTURE_POSSEDANT.'<br />'."\n"; |
else $res .= BAZ_STRUCTURES_POSSEDANT.'<br />'."\n"; |
$res .= '<ul>'."\n"; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$res .= '<li><a href="'.BAZ_URL_ANNUAIRE.'&voir_fiche='.$ligne[BAZ_CHAMPS_ID].'" onclick="javascript:window.open(this.href);return false;">'.$ligne[BAZ_CHAMPS_NOM].'</a></li>'."\n"; |
if ($GLOBALS['AUTH']->getAuth() && $GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_ID)==$ligne[BAZ_CHAMPS_ID]) $possede_ressource=1; |
} |
$res .= '</ul><br />'."\n"; |
} |
else $res .= BAZ_PAS_D_APPROPRIATION.'<br /><br />'."\n"; |
$res .='<p class="BAZ_bulle_corps BAZ_bulle_corps_'.$GLOBALS['_BAZAR_']['class'].'">'."\n"; |
$lien_appropriation = $GLOBALS['_BAZAR_']['url']; |
$lien_appropriation->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_FICHE); |
$lien_appropriation->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']); |
if ($possede_ressource) { |
$lien_appropriation->addQueryString('appropriation', 0); |
$res .= BAZ_POSSEDE_DEJA_RESSOURCE.'<br />'."\n".'<a href="'.$lien_appropriation->getURL().'">'.BAZ_CLIQUER_POUR_VOUS_ENLEVER.'</a>'."\n"; |
$lien_appropriation->removeQueryString('appropriation'); |
} |
elseif ($GLOBALS['AUTH']->getAuth() && $GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_EST_STRUCTURE)) { |
$lien_appropriation->addQueryString('appropriation', 1); |
$res .= BAZ_SI_POSSEDE_RESSOURCE.'<br />'."\n".'<a href="'.$lien_appropriation->getURL().'">'.BAZ_CLIQUER_POUR_APPARAITRE.'</a>'."\n"; |
$lien_appropriation->removeQueryString('appropriation'); |
} |
elseif ($GLOBALS['AUTH']->getAuth() && !$GLOBALS['AUTH']->getAuthData(BAZ_CHAMPS_EST_STRUCTURE)) { |
$res .= BAZ_IL_FAUT_ETRE_STRUCTURE."\n"; |
} |
elseif (!$GLOBALS['AUTH']->getAuth()) { |
$res .= BAZ_IL_FAUT_ETRE_IDENTIFIE_STRUCTURE."\n"; |
} |
$res .='</p>'."\n"; |
$res .= '</div>'."\n"; |
} |
// Ajout des commentaires, s'il le faut |
//if ($GLOBALS['_BAZAR_']['commentaire'] == 1) { |
$res .= '<br />'."\n".'<div class="BAZ_cadre_fiche BAZ_cadre_fiche_'.$GLOBALS['_BAZAR_']['class'].'">'."\n"; |
$res .= '<h2 class="BAZ_titre BAZ_titre_'.$GLOBALS['_BAZAR_']['class'].'">'.BAZ_LES_COMMENTAIRES.'</h2>'."\n"; |
$requete = 'SELECT * FROM bazar_commentaires WHERE bc_ce_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'].' ORDER BY bc_date ASC'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError ($resultat)) { |
return $resultat->getMessage().'<br />'.$resultat->getDebugInfo(); |
} |
if ($resultat->numRows() > 0) { |
// Titre avec nombre de commentaires |
$res .= '<p>'.BAZ_IL_Y_A.$resultat->numRows().' '; |
// Ajout du "s" ou pas |
$res .= ($resultat->numRows() == 1) ? BAZ_COMMENTAIRE : BAZ_COMMENTAIRES; |
$res .= '</p>'."\n"; |
// Info pour ajotuer ces commentaires si on n'est pas identifié |
if (!$GLOBALS['AUTH']->getAuth()) { |
$res .= '<p class="information">'.BAZ_COMMENTAIRE_AUTH.'</p>'; |
} |
// Affichages des commentaires |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$res .= '<p class="BAZ_bulle_corps BAZ_bulle_corps_'.$GLOBALS['_BAZAR_']['class'].'">'."\n"; |
// Affichage du commentaire |
$res .= $ligne['bc_commentaire'].'<br />'."\n"; |
$res .= '<span class="BAZ_commentaire_admin">'.BAZ_PAR.' : <strong>'.$ligne['bc_nom'].'</strong>'.BAZ_ECRIT_LE.strftime('%d.%m.%Y %H:%M',strtotime($ligne['bc_date'])); |
// Pour les identifies seulement, administrateurs de la rubrique ou superadmins |
if ($est_admin == 1) { |
$url_comment= $GLOBALS['_BAZAR_']['url']; |
$url_comment->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_FICHE); |
$url_comment->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']); |
$url_comment->addQueryString('id_commentaire', $ligne['bc_id_commentaire']); |
$res .= ' <a href="'.$url_comment->getURL().'">'.BAZ_SUPPRIMER.'</a>'."\n"; |
} |
$res .= '</span>'."\n"; |
$res .= '</p>'."\n"; |
} |
} else { |
$res .= BAZ_PAS_DE_COMMENTAIRES.'<br /><br />'."\n"; |
} |
//} |
//formulaire des commentaires |
if ($GLOBALS['AUTH']->getAuth()) { |
$form_commentaire = new HTML_QuickForm('bazar_commentaire', 'post', $url); |
$squelette =& $form_commentaire->defaultRenderer(); |
$squelette->setFormTemplate("\n".'<form {attributes}>'."\n".'{content}'."\n".'</form>'."\n"); |
$squelette->setElementTemplate( '<label style="width:200px;">{label}'. |
'<!-- BEGIN required --><span class="symbole_obligatoire"> *</span><!-- END required -->'."\n". |
'</label><br />'."\n".'{element}<br />'."\n"); |
$squelette->setRequiredNoteTemplate("\n".'<span class="symbole_obligatoire"> *{requiredNote}</span>'."\n"); |
$option=array('style'=>'width:300px;border:1px solid #000;', 'maxlength'=>100); |
$form_commentaire->addElement('text', 'Nom', BAZ_ENTREZ_VOTRE_NOM, $option); |
$option=array('style'=>'width:95%;height:100px;white-space: pre;padding:3px;border:1px solid #000;'); |
require_once PAP_CHEMIN_API_PEAR.'HTML/QuickForm/textarea.php'; |
$formtexte= new HTML_QuickForm_textarea('Commentaire', BAZ_ENTREZ_VOTRE_COMMENTAIRE, $option); |
$form_commentaire->addElement($formtexte) ; |
$option=array('style'=>'border:1px solid #000;'); |
$form_commentaire->addElement('submit', 'Envoyer', BAZ_ENVOYER, $option); |
$form_commentaire->addRule('Nom', BAZ_NOM_REQUIS, 'required', '', 'client') ; |
$form_commentaire->addRule('Commentaire', BAZ_COMMENTAIRE_REQUIS, 'required', '', 'client') ; |
$form_commentaire->setRequiredNote(BAZ_CHAMPS_REQUIS) ; |
$res .= $form_commentaire->toHTML(); |
} |
$res .= '</div>'."\n"; |
} |
// Nettoyage de l'url avant les return : apparement inutile sinon pose pb dans Papyrus (url applette deconnexion et moteur de recherche) [jpm le 17 mars 2008] |
//$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
//$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_commentaire'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce'); |
return $res ; |
} |
// merci PHP 5 ... |
function mb_str_split2($str, $length = 1) { |
if ($length < 1) return FALSE; |
$result = array(); |
for ($i = 0; $i < strlen($str); $i += $length) { |
$result[] = substr($str, $i, $length); |
} |
return $result; |
} |
function remove_accents2( $string ) |
{ |
$string = htmlentities($string); |
return preg_replace("/&([a-z])[a-z]+;/i","$1",$string); |
} |
function genere_nom_wiki2($nom, $spaces = FALSE) |
{ |
// traitement des accents |
$nom = remove_accents2($nom); |
$temp = mb_str_split2($nom); |
$count = 0; |
$final = NULL; |
foreach($temp as $letter) |
{ |
if(preg_match('/([[:space:]]|[[:punct:]])/', $letter)) |
{ |
$final .= ($spaces ? '_' : ''); |
} elseif(preg_match ('/[a-zA-Z0-9]/', $letter)) { |
$final .= (($count == 0 || $count == (strlen($nom) - 1)) ? strtoupper($letter) : strtolower($letter)); |
} |
$count++; |
} |
// vérifions que le retour n'est pas uniquement un underscore |
if(preg_match('/^[[:punct:]]+$/', $final)) return FALSE; |
// sinon retour du nom formaté |
return($final); |
} |
/** RSSversHTML () transforme un flux RSS (en XML) en page HTML |
* |
* On passe en paramètre le contenu du flux RSS, on affiche ou non la description, |
* et on choisit de format de la date à l'affichage. On a en sortie du code HTML à afficher |
* |
* @param string le contenu du flux RSS |
* @param boolean afficher ou non la description |
* @param string choisir le format de date: jmah (12/02/2004 12h34) jmh (12/02 12h34) jma (12/02/2004) jm (12/02) ou rien |
* |
* @return string le code HTML |
*/ |
function RSSversHTML($rss, $voirdesc, $formatdate, $affichenb) { |
if ($rss!='') { |
$rawitems='';$title='';$url='';$cat='';$date=''; |
$res=''; |
if( eregi('<item>(.*)</item>', $rss, $rawitems ) ) { |
$items = explode('<item>', $rawitems[0]); |
$res.='<ul id="BAZ_liste_fiche">'."\n"; |
for( $i = 0; $i < count($items)-1; $i++ ) { |
eregi('<title>(.*)</title>',$items[$i+1], $title ); |
eregi('<link>(.*)</link>',$items[$i+1], $url ); |
eregi('<description>(.*)</description>',$items[$i+1], $cat); |
eregi('<pubDate>(.*)</pubDate>',$items[$i+1], $date); |
$res.='<li>'; |
if ($formatdate=='jm') {$res.=strftime('%d.%m',strtotime($date[1])).': ';} |
if ($formatdate=='jma') {$res.=strftime('%d.%m.%Y',strtotime($date[1])).': ';} |
if ($formatdate=='jmh') {$res.=strftime('%d.%m %H:%M',strtotime($date[1])).': ';} |
if ($formatdate=='jmah') {$res.=strftime('%d.%m.%Y %H:%M',strtotime($date[1])).': ';} |
$res.='<a href="'.preg_replace ('/&/', '&', $url[1]).'">'.$title[1].'</a>'; |
if ($voirdesc) {$res.=$cat[1];} |
// Ajout du bouton supprimer pour les superadministrateur |
$utilisateur = new Administrateur_bazar($GLOBALS['AUTH']); |
if (($GLOBALS['AUTH']->getAuth() && $utilisateur->isSuperAdmin())and($url[1]!='#')) { |
$mon_url = preg_replace ('/&/', '&', $url[1]) ; |
$url_suppr = new Net_URL(preg_replace ('/&/', '&', $mon_url)) ; |
$url_suppr->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_SUPPRESSION) ; |
$res .= ' ( <a href="'.$url_suppr->getURL(). |
'" onclick="javascript:return confirm(\''.BAZ_SUPPRIMER.' ?\');">'. |
BAZ_SUPPRIMER.'</a> )'."\n" ; |
} |
$res.='</li>'."\n"; |
} |
$res.='</ul>'."\n"; |
if ($affichenb==1) { |
//une annonce trouvee, on accorde au singulier |
if (((count($items)-1)==1)and($title!=BAZ_PAS_D_ANNONCES)) { |
$res = '<br /><h4>'.BAZ_IL_Y_A.' 1 '.BAZ_FICHE_CORRESPONDANTE.'</h4><br />'."\n".$res; |
} |
//plusieures annonces trouvees, on accorde au pluriel |
else { |
$res = '<br /><h4>'.BAZ_IL_Y_A.(count($items)-1).' '.BAZ_FICHES_CORRESPONDANTES.'</h4><br />'."\n".$res; |
} |
} |
//cas des fiches pas trouvées |
if (((count($items)-1)==1)and($title[1]==BAZ_PAS_D_ANNONCES)) { |
$res = '<br /><h4>'.BAZ_PAS_D_ANNONCES.'</h4><br />'."\n"; |
} |
} |
} |
else $res = BAZ_PAS_D_ANNONCES; |
// Nettoyage de l'url |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
return $res; |
} |
/** gen_RSS() - generer un fichier de flux RSS par type d'annonce |
* |
* @param string Le type de l'annonce (laisser vide pour tout type d'annonce) |
* @param integer Le nombre d'annonces a regrouper dans le fichier XML (laisser vide pour toutes) |
* @param integer L'identifiant de l'emetteur (laisser vide pour tous) |
* @param integer L'etat de validation de l'annonce (laisser 1 pour les annonces validees, 0 pour les non-validees) |
* @param string La requete SQL personnalisee |
* @param integer La categorie des fiches bazar |
* |
* @return string Le code du flux RSS |
*/ |
function gen_RSS($typeannonce='', $nbitem='', $emetteur='', $valide=1, $requeteSQL='', $requeteSQLFrom = '', $requeteWhereListe = '', $categorie_nature='', $order = '') { |
// generation de la requete MySQL personnalisee |
$requete = 'SELECT DISTINCT bf_id_fiche, bf_titre, bf_date_debut_validite_fiche, bf_description,bf_date_debut_evenement, bn_label_nature, bf_date_creation_fiche, bf_ce_utilisateur '. |
'FROM bazar_fiche, bazar_nature '.$requeteSQLFrom.' WHERE '.$requeteWhereListe; |
$where_cond = array(); |
if ($valide!=2) { |
$where_cond[] = 'bf_statut_fiche='.$valide; |
} |
$nomflux=html_entity_decode(BAZ_DERNIERE_ACTU); |
if (!is_array ($typeannonce) && $typeannonce!='' and $typeannonce!='toutes') { |
$where_cond[] = 'bf_ce_nature='.$typeannonce; |
$where_cond[] = ' bf_ce_nature=bn_id_nature'; |
//le nom du flux devient le type d'annonce |
$requete_nom_flux = 'select bn_label_nature from bazar_nature where bn_id_nature = '.$typeannonce; |
$nomflux = $GLOBALS['_BAZAR_']['db']->getOne($requete_nom_flux) ; |
} |
// cas où on veut toutes les annonces |
if ($typeannonce == 'toutes') { |
$where_cond[] = 'bf_ce_nature IN (1,2,3,4)'; |
$where_cond[] = 'bf_ce_nature=bn_id_nature'; |
} |
// Cas ou il y plusieurs type d annonce demande |
if (is_array($typeannonce) && ! empty($typeannonce)) { |
$where_cond[] = 'bf_ce_nature IN (' . '"' . implode('","', $typeannonce) . '"' . ')'; |
$where_cond[] = 'bf_ce_nature=bn_id_nature'; |
} |
// useless ? |
// $utilisateur = new Administrateur_bazar ($GLOBALS['AUTH']) ; |
$where_cond[] = 'bf_date_debut_evenement >= NOW()'; |
$where_cond[] = 'bn_id_nature=bf_ce_nature'; |
if ($emetteur!='' && $emetteur!='tous') { |
$where_cond[] = 'bf_ce_utilisateur='.$emetteur; |
//requete pour afficher le nom de la structure |
$requetenom = 'SELECT '.BAZ_CHAMPS_NOM.', '.BAZ_CHAMPS_PRENOM.' FROM '. |
BAZ_ANNUAIRE.' WHERE '.BAZ_CHAMPS_ID.'='.$emetteur; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requetenom) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC); |
$nomflux .= ' ('.$ligne[BAZ_CHAMPS_NOM].' '.$ligne[BAZ_CHAMPS_PRENOM].')'; |
} |
if ($requeteSQL) { |
$where_cond[] = $requeteSQL; |
} |
if ($categorie_nature!='') { |
$where_cond[] = 'bn_ce_id_menu IN ('.$categorie_nature.')'; |
$where_cond[] = 'bf_ce_nature=bn_id_nature'; |
} |
if (isset($_REQUEST['departement'])) { |
$where_cond[] = 'bf_cp_lieu_evenement LIKE "'.$_REQUEST['departement'].'%"'; |
} |
$requete .= implode(' AND ', $where_cond); |
$requete .= ' ORDER BY bf_date_debut_evenement ASC '; |
if ($nbitem!='') {$requete .= ' LIMIT 0,'.$nbitem;} |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete . ' -- ' . __FILE__ . ':' . __LINE__) ; |
//mail('aurelien@tela-botanica.org','requete',$requete); |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
include_once PAP_CHEMIN_API_PEAR . 'XML/Util.php' ; |
// passage en utf-8 --julien |
// -- |
// setlocale() pour avoir les formats de date valides (w3c) --julien |
setlocale(LC_TIME, "C"); |
$xml = XML_Util::getXMLDeclaration('1.0', 'UTF-8', 'yes') ; |
$xml .= "\r\n "; |
$xml .= XML_Util::createStartElement ('rss', array('version' => '2.0')) ; |
$xml .= "\r\n "; |
$xml .= XML_Util::createStartElement ('channel'); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('title', null, utf8_encode(html_entity_decode($nomflux))); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('link', null, utf8_encode(html_entity_decode(BAZ_RSS_ADRESSESITE))); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('description', null, utf8_encode(html_entity_decode(BAZ_RSS_DESCRIPTIONSITE))); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('language', null, 'fr-FR'); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('copyright', null, 'Copyright (c) '. date('Y') .' '. BAZ_RSS_NOMSITE); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('lastBuildDate', null, strftime('%a, %d %b %Y %H:%M:%S GMT')); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('docs', null, 'http://www.stervinou.com/projets/rss/'); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('category', null, BAZ_RSS_CATEGORIE); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('managingEditor', null, BAZ_RSS_MANAGINGEDITOR); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('webMaster', null, BAZ_RSS_WEBMASTER); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('ttl', null, '60'); |
$xml .= "\r\n "; |
$xml .= XML_Util::createStartElement ('image'); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('title', null, BAZ_RSS_NOMSITE); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('url', null, BAZ_RSS_LOGOSITE); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('link', null, BAZ_RSS_ADRESSESITE); |
$xml .= "\r\n "; |
$xml .= XML_Util::createEndElement ('image'); |
if ($resultat->numRows() > 0) { |
// Creation des items : titre + lien + description + date de publication |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$requetenom = 'SELECT '.BAZ_CHAMPS_NOM.', '.BAZ_CHAMPS_PRENOM.' FROM '. |
BAZ_ANNUAIRE.' WHERE '.BAZ_CHAMPS_ID.'='.$ligne['bf_ce_utilisateur']; |
$res = $GLOBALS['_BAZAR_']['db']->query($requetenom) ; |
if (DB::isError($res)) { |
die ($res->getMessage().$res->getDebugInfo()) ; |
} |
$nomprenom = $res->fetchRow(DB_FETCHMODE_ASSOC); |
$xml .= "\r\n "; |
$xml .= XML_Util::createStartElement ('item'); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag('title', null, transformerTxtPourRss($ligne['bf_titre'])); |
$xml .= "\r\n "; |
$lien=$GLOBALS['_BAZAR_']['url']; |
$lien->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_FICHE); |
$lien->addQueryString('id_fiche', $ligne['bf_id_fiche']); |
$xml .= XML_Util::createTag ('link', null, $lien->getURL()); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('guid', null, $lien->getURL()); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('category', null, transformerTxtPourRss($ligne['bn_label_nature'])); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('author', null, transformerTxtPourRss($nomprenom[BAZ_CHAMPS_NOM].' '.$nomprenom[BAZ_CHAMPS_PRENOM])); |
$xml .= "\r\n "; |
$xml .= XML_Util::createStartElement ('description'); |
$xml .= "\r\n "; |
if ($_GET[BAZ_VARIABLE_ACTION] != BAZ_VOIR_TOUTES_ANNONCES) { |
$xml .= XML_Util::createCDataSection(transformerTxtPourRss(subtext($ligne['bf_description']))); |
} |
$xml .= "\r\n "; |
$xml .= XML_Util::createEndElement ('description'); |
$xml .= "\r\n "; |
/*if ($ligne['bf_date_debut_validite_fiche'] != '0000-00-00' && |
$ligne['bf_date_debut_validite_fiche']>$ligne['bf_date_creation_fiche']) { |
$date_pub = $ligne['bf_date_debut_validite_fiche']; |
} else $date_pub = $ligne['bf_date_creation_fiche'] ;*/ |
$date_pub = $ligne['bf_date_debut_evenement'] ; |
$xml .= XML_Util::createTag ('pubDate', null, strftime('%a, %d %b %Y %H:%M:%S GMT',strtotime($date_pub))); |
$xml .= "\r\n "; |
$xml .= XML_Util::createEndElement ('item'); |
} |
} |
else {//pas d'annonces |
$xml .= "\r\n "; |
$xml .= XML_Util::createStartElement ('item'); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('title', null, utf8_encode(html_entity_decode(BAZ_PAS_D_ANNONCES))); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('link', null, utf8_encode(html_entity_decode($GLOBALS['_BAZAR_']['url']->getUrl()))); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('guid', null, utf8_encode(html_entity_decode($GLOBALS['_BAZAR_']['url']->getUrl()))); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('description', null, utf8_encode(html_entity_decode(BAZ_PAS_D_ANNONCES))); |
$xml .= "\r\n "; |
$xml .= XML_Util::createTag ('pubDate', null, strftime('%a, %d %b %Y %H:%M:%S GMT',time())); |
$xml .= "\r\n "; |
$xml .= XML_Util::createEndElement ('item'); |
} |
$xml .= "\r\n "; |
$xml .= XML_Util::createEndElement ('channel'); |
$xml .= "\r\n "; |
$xml .= XML_Util::createEndElement('rss') ; |
// Nettoyage de l'url |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche'); |
return $xml; |
} |
/** baz_liste() Formate la liste de toutes les annonces actuelles |
* |
* @return string le code HTML a afficher |
*/ |
function baz_liste($typeannonce='toutes') { |
if(isset($_REQUEST['liste31']) && !empty($_REQUEST['liste31'])) { |
if($_REQUEST['liste31'] != "0") |
{ |
$GLOBALS['_BAZAR_']['categorie_nature'] = $_REQUEST['liste31'] ; |
} |
else |
{ |
$GLOBALS['_BAZAR_']['categorie_nature'] = 'toutes' ; |
} |
} |
//pour les super-administrateurs, on peut voir les annonces non validees |
//on verifie si l'utilisateur est administrateur |
$utilisateur = new Administrateur_bazar($GLOBALS['AUTH']) ; |
//creation du lien pour le formulaire de recherche |
$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_TOUTES_ANNONCES); |
if (isset($_REQUEST['recherche_avancee'])) $GLOBALS['_BAZAR_']['url']->addQueryString ('recherche_avancee', $_REQUEST['recherche_avancee']); |
$lien_formulaire = preg_replace ('/&/', '&', $GLOBALS['_BAZAR_']['url']->getURL()) ; |
$formtemplate = new HTML_QuickForm('formulaire', 'post', $lien_formulaire) ; |
$squelette =& $formtemplate->defaultRenderer(); |
$squelette->setFormTemplate("\n".'<form {attributes}>'."\n".'<table>'."\n".'{content}'."\n".'</table>'."\n".'</form>'."\n"); |
$squelette->setElementTemplate( '<tr>'."\n".'<td>'."\n".'{label}'. |
'<!-- BEGIN required --><span class="symbole_obligatoire"> *</span><!-- END required -->'."\n". |
' :</td>'."\n".'<td style="text-align:left;padding:5px;"> '."\n".'{element}'."\n". |
'<!-- BEGIN error --><span class="erreur">{error}</span><!-- END error -->'."\n". |
'</td>'."\n".'</tr>'."\n"); |
$squelette->setElementTemplate( '<tr>'."\n".'<td colspan="2" class="liste_a_cocher"><strong>{label} {element}</strong>'."\n". |
'<!-- BEGIN required --><span class="symbole_obligatoire"> *</span><!-- END required -->'."\n".'</td>'."\n".'</tr>'."\n", 'accept_condition'); |
$squelette->setElementTemplate( '<tr><td colspan="2">{label}{element}</td></tr>'."\n", 'rechercher'); |
$squelette->setRequiredNoteTemplate("\n".'<tr>'."\n".'<td colspan="2" class="symbole_obligatoire">* {requiredNote}</td></tr>'."\n"); |
//Traduction de champs requis |
$formtemplate->setRequiredNote(BAZ_CHAMPS_REQUIS) ; |
$formtemplate->setJsWarnings(BAZ_ERREUR_SAISIE,BAZ_VEUILLEZ_CORRIGER); |
GEN_stockerFichierScript('jquery', 'http://code.jquery.com/jquery-latest.js'); |
GEN_stockerFichierScript('jquery_date_picker', 'api/js/jquery/ui.datepicker.js'); |
GEN_stockerFichierScript('jquery_date_picker_fr', 'api/js/jquery/ui.datepicker-fr.js'); |
GEN_stockerStyleExterne( 'jquery_date_picker_style', 'api/js/jquery/ui.datepicker.css'); |
$formtemplate->addElement('html', '<tr><td>Dates: </td><td>'.bazar::getFiltrePlageDeDate().'</td></tr>'); |
//cas du formulaire de recherche proposant de chercher parmis tous les types d'annonces |
//requete pour obtenir l'id et le label des types d'annonces |
$requete = 'SELECT bn_id_nature, bn_label_nature '. |
'FROM bazar_nature' ; |
$suite = false; |
if(isset($GLOBALS['_BAZAR_']['categorie_nature']) && !empty($GLOBALS['_BAZAR_']['categorie_nature']) && $GLOBALS['_BAZAR_']['categorie_nature'] != 'toutes') { |
$requete .= ' WHERE bn_ce_id_menu IN ('.$GLOBALS['_BAZAR_']['categorie_nature'].') '; |
$suite = true; |
} |
if (isset($GLOBALS['_BAZAR_']['langue'])) { |
if($suite) { |
$requete .= 'AND'; |
} else { |
$requete .= ' WHERE'; |
} |
$requete .= ' bn_ce_i18n like "'.$GLOBALS['_BAZAR_']['langue'].'%" '; |
//'ORDER BY bn_label_nature ASC'; |
} |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
return ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
//on recupere le nb de types de fiches, pour plus tard |
$nb_type_de_fiches=$resultat->numRows(); |
$type_annonce_select['toutes']=BAZ_TOUS_TYPES_FICHES; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$type_annonce_select[$ligne['bn_id_nature']] = $ligne['bn_label_nature']; |
$tableau_typeannonces[] = $ligne['bn_id_nature'] ; |
} |
if ($nb_type_de_fiches>1 && $GLOBALS['_BAZAR_']['typeannonce']=='toutes' && BAZ_AFFICHER_FILTRE_MOTEUR) { |
$res= ''; |
$option=array('onchange' => 'javascript:this.form.submit();'); |
$formtemplate->addElement ('select', 'nature', BAZ_TYPEANNONCE, $type_annonce_select, $option) ; |
if (isset($_REQUEST['nature'])) { |
$defauts=array('nature'=>$_REQUEST['nature']); |
$formtemplate->setDefaults($defauts); |
} |
} |
//cas du type d'annonces predefini |
else { |
if ($nb_type_de_fiches==1 && key($type_annonce_select) != 'toutes') { |
$GLOBALS['_BAZAR_']['typeannonce']=end($type_annonce_select); |
$GLOBALS['_BAZAR_']['id_typeannonce']=key($type_annonce_select); |
} |
$res = '<h2 class="bazar_titre2">'.BAZ_RECHERCHE_FICHE.'</h2>'."\n"; |
} |
//requete pour obtenir l'id, le nom et prenom de toutes les personnes ayant depose une fiche |
// dans le but de construire l'element de formulaire select avec les noms des emetteurs de fiche |
if (BAZ_RECHERCHE_PAR_EMETTEUR && ($utilisateur->isAdmin(1) || $utilisateur->isSuperAdmin())) { |
$requete = 'SELECT DISTINCT '.BAZ_CHAMPS_ID.', '.BAZ_CHAMPS_NOM.', '.BAZ_CHAMPS_PRENOM.' '. |
'FROM bazar_fiche,'.BAZ_ANNUAIRE.' WHERE ' ; |
$requete .= ' bf_date_debut_validite_fiche<=NOW() AND'; |
$requete .= ' bf_ce_utilisateur='.BAZ_CHAMPS_ID.' '; |
if (!isset($_REQUEST['nature'])) { |
if (isset($GLOBALS['_BAZAR_']['id_typeannonce']) && $GLOBALS['_BAZAR_']['id_typeannonce'] != 'toutes') { |
$requete .= 'AND bf_ce_nature="'.$GLOBALS['_BAZAR_']['id_typeannonce'].'" '; |
} |
} |
else { |
if ($_REQUEST['nature']!='toutes') { |
$requete .= 'AND bf_ce_nature='.$_REQUEST['nature'].' '; |
} |
} |
$requete .= 'ORDER BY '.BAZ_CHAMPS_NOM.' ASC'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
$personnes_select['tous']=BAZ_TOUS_LES_EMETTEURS; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$personnes_select[$ligne[BAZ_CHAMPS_ID]] = $ligne[BAZ_CHAMPS_NOM]." ".$ligne[BAZ_CHAMPS_PRENOM] ; |
} |
$option=array('style'=>'border:1px solid #000;width: 200px;font:12px Myriad, Arial, sans-serif;'); |
$formtemplate->addElement ('select', 'personnes', BAZ_EMETTEUR, $personnes_select, $option) ; |
} else { |
$formtemplate->addElement ('hidden', 'personnes', 'tous') ; |
} |
if ($utilisateur->isSuperAdmin()) { |
$option=array('style'=>'border:1px solid #000;width: 200px;font:12px Myriad, Arial, sans-serif;'); |
$valide_select[0] = BAZ_FICHES_VALIDEES; |
$valide_select[1] = BAZ_FICHES_PAS_VALIDEES; |
$valide_select[2] = BAZ_LES_DEUX; |
$formtemplate->addElement ('select', 'valides', BAZ_VALIDE, $valide_select, $option) ; |
$defauts=array('valides'=>0); |
$formtemplate->setDefaults($defauts); |
} |
//champs texte pour entrer les mots cles |
$option=array('maxlength'=>60,'style'=>'border:1px solid #000;width:200px;font:12px Myriad, Arial, sans-serif;'); |
$formtemplate->addElement('text', 'recherche_mots_cles', BAZ_MOT_CLE, $option) ; |
//option cachee pour savoir si le formulaire a ete appele deja |
$formtemplate->addElement('hidden', 'recherche_effectuee', 1) ; |
// Ajout des options si un type de fiche a ete choisie |
if ( (isset($_REQUEST['nature']) && $_REQUEST['nature'] != 'toutes') || (isset($GLOBALS['_BAZAR_']['categorie_nature']) && $nb_type_de_fiches==1)) { |
if ( BAZ_MOTEUR_RECHERCHE_AVANCEE || ( isset($_REQUEST['recherche_avancee'])&&$_REQUEST['recherche_avancee']==1) ) { |
if ($GLOBALS['_BAZAR_']['categorie_nature'] != '') { |
$champs_requete = '' ; |
if (!isset($_REQUEST['nature']) || $_REQUEST['nature'] == '') { |
$_REQUEST['nature'] = $tableau_typeannonces[0]; |
} |
} |
// Recuperation du template |
$requete = 'SELECT bn_template FROM bazar_nature WHERE bn_id_nature = '.$_REQUEST['nature']; |
$resultat = $GLOBALS['_BAZAR_']['db']->getOne($requete) ; |
if (DB::isError($resultat)) { |
return ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
} |
if (isset($_REQUEST['recherche_avancee']) && $_REQUEST['recherche_avancee']==1) { |
foreach(array_merge($_POST, $_GET) as $cle => $valeur) $GLOBALS['_BAZAR_']['url']->addQueryString($cle, $valeur); |
$GLOBALS['_BAZAR_']['url']->addQueryString('recherche_avancee', '0'); |
$lien_recherche_de_base = '<a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.BAZ_RECHERCHE_DE_BASE.'</a><br />'; |
//lien recherche de base |
labelhtml($formtemplate,'',$lien_recherche_de_base,'','','','',''); |
} |
$tableau = baz_valeurs_template($resultat) ; |
for ($i=0; $i<count($tableau); $i++) { |
if (($tableau[$i]['type'] == 'liste' || $tableau[$i]['type'] == 'checkbox' || $tableau[$i]['type'] == 'labelhtml') && $tableau[$i]['recherche'] == 1) { |
$tableau[$i]['type']($formtemplate, $tableau[$i]['nom_bdd'], $tableau[$i]['label'], $tableau[$i]['limite1'], |
$tableau[$i]['limite2'], $tableau[$i]['defaut'], $tableau[$i]['table_source'], $tableau[$i]['obligatoire'], 1, 'bazar') ; |
} |
} |
} |
else { |
$url_rech_avance = $GLOBALS['_BAZAR_']['url']; |
foreach(array_merge($_POST, $_GET) as $cle => $valeur) $url_rech_avance->addQueryString($cle, $valeur); |
$url_rech_avance->addQueryString('recherche_avancee', '1'); |
$lien_recherche_avancee = '<a href="'.$url_rech_avance->getURL().'">'.BAZ_RECHERCHE_AVANCEE.'</a><br />'; |
unset ($url_rech_avance); |
} |
} |
//lien recherche avancee |
if (isset($lien_recherche_avancee)) { |
labelhtml($formtemplate,'',$lien_recherche_avancee,'','','','',''); |
} |
//Bouton de validation du formulaire |
$option=array('style'=>'border:1px solid #000;width:100px;font:12px Myriad, Arial, sans-serif;','class'=>'baz_rech'); |
$formtemplate->addElement('submit', 'rechercher', BAZ_RECHERCHER, $option); |
//affichage du formulaire |
//$res.=$formtemplate->toHTML()."\n"; |
// Ajout de la table bazar_fiche_liste_valeur dans le from de la requete |
$case_coche = false ; |
$nb_jointures=0; |
$requeteFrom = '' ; |
$requeteWhere = ''; |
if ($GLOBALS['_BAZAR_']['id_typeannonce'] != 'toutes') { |
$requeteWhere .= 'bn_id_nature='.$GLOBALS['_BAZAR_']['id_typeannonce'].' AND ' ; |
} |
$requeteWhere .= ' bn_id_nature=bf_ce_nature AND ' ; |
if (isset($GLOBALS['_BAZAR_']['langue'])) { |
$requeteWhere .= ' bn_ce_i18n like "'.$GLOBALS['_BAZAR_']['langue'].'%" and '; |
} |
$requeteWhereListe = '' ; |
if ( isset($tableau) ) { |
for ($i = 0; $i < count ($tableau); $i++) { |
if ($tableau[$i]['type'] == 'checkbox' || $tableau[$i]['type'] == 'liste') { |
$nb_jointures++; |
$nom_liste = $tableau[$i]['type'].$tableau[$i]['nom_bdd'] ; |
if (isset($_REQUEST[$nom_liste]) && is_array($_REQUEST[$nom_liste])) { |
$case_coche = true; |
$requeteFrom .= ', bazar_fiche_valeur_liste as bfvl'.($nb_jointures) ; |
$requeteWhereListe .= ' bfvl'.$nb_jointures.'.bfvl_ce_liste='.$tableau[$i]['nom_bdd'].' AND ' ; // Numéro de la liste |
$requeteWhere .= ' bfvl'.($nb_jointures).'.bfvl_ce_fiche=bf_id_fiche AND '; |
$requeteWhereListe .= ' bfvl'.$nb_jointures.'.bfvl_valeur IN (' ; |
$chaine = ''; |
//var_dump($_REQUEST[$nom_liste]); |
foreach ($_REQUEST[$nom_liste] as $cle =>$valeur) { |
if ($valeur == 1) { |
$chaine .= '"'.$cle.'",' ; |
} |
} |
$requeteWhereListe .= substr ($chaine, 0, strlen ($chaine)-1) ; |
$requeteWhereListe .= ') AND '; |
} else { |
if (isset ($_REQUEST[$nom_liste]) && $_REQUEST[$nom_liste]!=0) { |
$requeteFrom .= ', bazar_fiche_valeur_liste as bfvl'.($nb_jointures) ; |
$requeteWhereListe .= ' bfvl'.$nb_jointures.'.bfvl_ce_liste='.$tableau[$i]['nom_bdd'].' AND ' ; // Numéro de la liste |
$requeteWhereListe .= ' bfvl'.$nb_jointures.'.bfvl_valeur='.$_REQUEST[$nom_liste].' AND '; |
$requeteWhere .= ' bfvl'.($nb_jointures).'.bfvl_ce_fiche=bf_id_fiche AND '; |
$case_coche = true; |
} |
} |
} |
} |
} |
if ($case_coche) { |
$requeteWhere .= $requeteWhereListe; |
} |
if (isset($_REQUEST['liste31']) && $_REQUEST['liste31'] != '0' && $_REQUEST['nature']!='toutes') { |
$requeteWhere = 'bf_ce_nature="'.$_REQUEST['nature'].'" AND '.$requeteWhere; |
} |
/*if (BAZ_UTILISE_TEMPLATE) { |
// Appel du template n 1 |
include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php' ; |
$template = new bazarTemplate ($GLOBALS['_BAZAR_']['db']) ; |
$chaine = $template->getTemplate(1, $GLOBALS['_BAZAR_']['langue'], $GLOBALS['_BAZAR_']['categorie_nature']); |
if (bazarTemplate::isError ($chaine)) return $chaine->getMessage() ; |
ob_start(); |
eval ($chaine) ; |
$res .= ob_get_contents(); |
ob_end_clean() ; |
} else {*/ |
$res .= $formtemplate->toHTML(); |
if (!isset($_REQUEST['recherche_effectuee'])) { |
$res .= '<p class="zone_info">'.BAZ_ENTRER_VOS_CRITERES_DE_RECHERCHE.'</p>'."\n"; |
$requete = 'SELECT DISTINCT bf_id_fiche, '.BAZ_CHAMPS_PRENOM.', '.BAZ_CHAMPS_NOM.', bf_titre, bf_date_debut_validite_fiche, bf_date_debut_evenement, bf_description, bn_label_nature, bf_date_creation_fiche |
FROM bazar_fiche, bazar_nature, '.BAZ_ANNUAIRE.' |
WHERE bn_id_nature=bn_id_nature |
AND bf_ce_utilisateur = '.BAZ_CHAMPS_ID.' |
AND bf_statut_fiche = 1 |
AND bf_date_debut_evenement >= NOW() |
GROUP BY bf_titre |
ORDER BY bf_date_debut_evenement ASC |
LIMIT 0 , 12'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete); |
if (DB::isError($resultat)) { |
return ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
if($resultat->numRows() != 0) { |
$res .= '<h2>'.BAZ_PROCHAINS_EVENEMENTS.'</h2>'; |
$res .= '<ul class="liste_rss">'; |
while($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_FICHE); |
$GLOBALS['_BAZAR_']['url']->addQueryString('id_fiche', $ligne['bf_id_fiche']); |
$res .= '<div class="menu_titre"> |
<h1 class="intituler_rubrique"><a class="lien_rss" href="'.$GLOBALS['_BAZAR_']['url']->getURL() .'" alt="lire la fiche"> '.$ligne['bf_titre'].'</a></h1> |
<p class="date">'.baz_valeur_champs(31,$ligne['bf_id_fiche']).' début le '.$GLOBALS['jours'][date ('w', strtotime ($ligne['bf_date_debut_evenement']))].' '.date('d', strtotime($ligne['bf_date_debut_evenement'])). |
' '.$GLOBALS['mois'][date('n', strtotime ($ligne['bf_date_debut_evenement']))].' '.date ('Y', strtotime ($ligne['bf_date_debut_evenement'])).' par '.$ligne[BAZ_CHAMPS_PRENOM].' '.$ligne[BAZ_CHAMPS_NOM].' </p> |
<p class="descriptif_contenu">'.substr($ligne['bf_description'], 0, 400).'</p> |
</div> |
<hr />'; |
} |
$res .= '</ul>'; |
} |
} |
//} |
//affichage des resultats de la recherche si le formulaire a ete envoye |
$requeteSQL=''; |
if (isset($_REQUEST['recherche_effectuee'])) { |
//preparation de la requete pour trouver les mots cles |
if (($_REQUEST['recherche_mots_cles']!='')and($_REQUEST['recherche_mots_cles']!=BAZ_MOT_CLE)) { |
//decoupage des mots cles |
$recherche = split(' ', $_REQUEST['recherche_mots_cles']) ; |
$nbmots=count($recherche); |
$requeteSQL=''; |
if (isset($GLOBALS['_BAZAR_']['categorie_nature'])) |
{ |
$tableau=baz_valeurs_template($GLOBALS['_BAZAR_']['template']); |
} |
for ($i=0; $i<$nbmots; $i++) { |
for ($j=0; $j<count($tableau); $j++) { |
if ( $tableau[$j]['type']=='texte' || $tableau[$j]['type']=='textelong') { |
//if ($i>0) $requeteSQL.=' OR '; |
$requeteSQL.= $tableau[$j]['nom_bdd'].' LIKE "%'.$recherche[$i].'%" or '; |
} |
} |
} |
$requeteSQL = substr($requeteSQL, 0, count($requeteSQL) - 4); |
} |
if (!isset($_REQUEST['nature'])) { |
if (!isset ($GLOBALS['_BAZAR_']['id_nature'])) $typedefiches = $tableau_typeannonces; |
else $typedefiches = $GLOBALS['_BAZAR_']['id_nature'] ; |
} else { |
$typedefiches = $_REQUEST['nature'] ; |
if ($typedefiches == 'toutes') $typedefiches = $tableau_typeannonces ; |
} |
$valides = 1 ; |
if ($typeannonce!='toutes') $typedefiches=$typeannonce; |
if (isset($_REQUEST['valides'])) {$valides=$_REQUEST['valides'];} |
else {$valides=1;} |
//generation de la liste de flux a afficher |
if (!isset($_REQUEST['personnes'])) { |
$_REQUEST['personnes']='tous'; |
} |
if($_SERVER['REMOTE_ADDR'] == '162.38.234.9') { |
if (isset($_REQUEST['departement'])) { |
$requeteWhere = ' bf_cp_lieu_evenement LIKE "'.$_REQUEST['departement'].'%" AND '; |
} |
} |
if ((isset($_REQUEST['date_debut']) && $_REQUEST['date_debut'] != '') || (isset($_REQUEST['date_fin']) && $_REQUEST['date_fin'] != '')) { |
if (isset($_REQUEST['date_debut']) && $_REQUEST['date_debut'] != '' && isset($_REQUEST['date_fin']) && $_REQUEST['date_fin'] != '') { |
$requeteWhere .= ' (bf_date_debut_evenement >="'.date('Y-m-d', strtotime($_REQUEST['date_debut'])).'" |
and bf_date_fin_evenement <="'.date('Y-m-d', strtotime($_REQUEST['date_fin'])).'") AND '; |
} |
else { |
if (isset($_REQUEST['date_debut']) && $_REQUEST['date_debut'] != '') { |
$requeteWhere .= ' (bf_date_debut_evenement >="'.date('Y-m-d', strtotime($_REQUEST['date_debut'])).'" |
) AND '; |
} |
if(isset($_REQUEST['date_fin']) && $_REQUEST['date_fin'] != '') { |
$requeteWhere .= ' (bf_date_fin_evenement >="'.date('Y-m-d', strtotime($_REQUEST['date_fin'])).'" |
) AND '; |
} |
} |
} |
else { |
$requeteWhere .= '(bf_date_fin_evenement >= NOW() AND (bf_date_fin_evenement >= NOW() OR bf_date_fin_evenement="0000-00-00")) AND ' ; |
} |
$res .= baz_liste_pagine_HTML($typedefiches, '', $_REQUEST['personnes'], $valides, $requeteSQL, $requeteFrom, $requeteWhere); |
} |
// Nettoyage de l'url |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('annonce'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('categorie_nature'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('recherche_avancee'); |
return $res; |
} |
/** |
* Cette fonction renvoie du HTML |
*/ |
function baz_liste_pagine_HTML($typeannonce, $nbitem, $emetteur, $valide, $requeteSQL = '', $requeteFrom = '', $requeteWhere = '') { |
$utilisateur = new Administrateur_bazar ($GLOBALS['AUTH']) ; |
// generation de la requete MySQL personnalisee |
$req_where=0; |
$requete = 'SELECT * '. |
'FROM bazar_fiche, bazar_nature '.$requeteFrom.' WHERE '.$requeteWhere; |
if($utilisateur->isSuperAdmin()) { |
if ($valide!=2) { |
if ($req_where==1) {$requete .= ' AND ';} |
if($valide == 0) { |
$req_where=1; |
$requete .= 'bf_statut_fiche=1'; |
} |
else { |
$req_where=1; |
$requete .= 'bf_statut_fiche=0'; |
} |
} else { |
$requete .= '1 ' ; |
} |
} |
else |
{ |
if($requeteWhere == 1) { |
$requete = ' AND ' ; |
} |
$requete .= 'bf_statut_fiche=1'; |
} |
$requete .= ' AND bn_id_nature=bf_ce_nature '; |
if ($emetteur!='' && $emetteur!='tous') { |
if ($req_where==1) {$requete .= ' AND ';} |
$requete .= 'bf_ce_utilisateur='.$emetteur; |
$req_where=1; |
} |
if ($requeteSQL!='') { |
$requete .= ' AND '; |
$requete .= '('.$requeteSQL.')'; |
$req_where=1; |
} |
$requete .= ' ORDER BY bf_date_debut_evenement DESC, bf_date_debut_validite_fiche DESC, bf_date_fin_validite_fiche DESC, bf_date_maj_fiche DESC'; |
if ($nbitem!='') {$requete .= ' LIMIT 0,'.$nbitem;} |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
return $resultat->getMessage().'<br /><br />'.$resultat->getDebugInfo() ; |
} |
$res = '<br /><h4>'.BAZ_IL_Y_A.($resultat->numRows()).' '.BAZ_FICHES_CORRESPONDANTES.'</h4><br />'."\n"; |
//$res .= 'requete: '. $requete. '<br />'; |
$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_FICHE); |
$donnees = array(); |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$GLOBALS['_BAZAR_']['url']->addQueryString('id_fiche', $ligne['bf_id_fiche']) ; |
array_push ($donnees, $ligne); |
} |
// Mise en place du Pager |
include_once PAP_CHEMIN_API_PEAR.'Pager/Pager.php'; |
$params = array( |
'mode' => BAZ_MODE_DIVISION, |
'perPage' => BAZ_NOMBRE_RES_PAR_PAGE, |
'delta' => BAZ_DELTA, |
'httpMethod' => 'GET', |
'extraVars' => array_merge($_POST, $_GET), |
'altNext' => BAZ_SUIVANT, |
'altPrev' => BAZ_PRECEDENT, |
'nextImg' => BAZ_SUIVANT, |
'prevImg' => BAZ_PRECEDENT, |
'itemData' => $donnees |
); |
$pager = & Pager::factory($params); |
$data = $pager->getPageData(); |
$links = $pager->getLinks(); |
if (BAZ_UTILISE_TEMPLATE) { |
//Appel du template n 2 |
include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php' ; |
$template = new bazarTemplate ($GLOBALS['_BAZAR_']['db']) ; |
$chaine = $template->getTemplate(2, $GLOBALS['_BAZAR_']['langue'], $GLOBALS['_BAZAR_']['categorie_nature']); |
if (bazarTemplate::isError ($chaine)) return $chaine->getMessage() ; |
ob_start(); |
eval ($chaine) ; |
$res .= ob_get_contents(); |
ob_end_clean() ; |
} else { |
$res .= '<ul>' ; |
$res .= '<div class="bazar_numero">'.$pager->links.'</div>'."\n"; |
foreach ($data as $valeur) { |
$res .='<li class="BAZ_'.$valeur['bn_label_class'].'">'."\n"; |
$GLOBALS['_BAZAR_']['url']->addQueryString('id_fiche', $valeur['bf_id_fiche']) ; |
if ($utilisateur->isSuperAdmin() || $GLOBALS['id_user']==$valeur['bf_ce_utilisateur']) { |
$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_MODIFIER); |
$GLOBALS['_BAZAR_']['url']->addQueryString('typeannonce', $valeur['bf_ce_nature']); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('personnes'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('recherche_effectuee'); |
$res .= '<a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">('.BAZ_MODIFIER.')</a> '."\n"; |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_SUPPRESSION); |
$res .='<a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'" onclick="javascript:return confirm(\''.BAZ_SUPPRIMER.'\');">('.BAZ_SUPPRIMER.')</a> '."\n"; |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
} |
$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_FICHE) ; |
$res .= '<a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'">'.$valeur['bf_titre'].'</a>'."\n"; |
$res .='</li>'."\n"; |
} |
$res .= '</ul>'."\n".'<div class="bazar_numero">'.$pager->links.'</div>'."\n"; |
} |
// Nettoyage de l'url |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('recherche_avancee'); |
return $res ; |
} |
function transformerTxtPourRss($txt) { |
$txt_utf8 = encoderEnUtf8($txt); |
$txt_utf8 = remplacerEsperluettesIsoleesParEntiteHtml($txt_utf8); |
$txt_utf8 = remplacerCaracteresAsciiInvisibles($txt_utf8); |
$txt_utf8 = remplacerCaracteresCp1252Problematiques($txt_utf8); |
return $txt_utf8; |
} |
function encoderEnUtf8($txtEnIso88591) { |
$txtEnUtf8 = utf8_encode($txtEnIso88591); |
return $txtEnUtf8; |
} |
function remplacerEsperluettesIsoleesParEntiteHtml($txtEnUtf8) { |
$txtEnUtf8 = preg_replace('/ \x{0026} /u', ' & ', $txtEnUtf8);// Remplacement des & isolés |
return $txtEnUtf8; |
} |
function remplacerCaracteresAsciiInvisibles($txtEnUtf8) { |
$ascii_remplacements = array ( |
'\x00' => '', // NUL : Null (nul) |
'\x01' => '', // SOH : Start of Header (début d'en-tête) |
'\x02' => '', // STX : Start of Text (début du texte) |
'\x03' => '', // ETX : End of Text (fin du texte) |
'\x04' => '', // EOT : End of Transmission (fin de transmission) |
'\x05' => '', // ENQ : Enquiry (End of Line) (demande, fin de ligne) |
'\x06' => '', // ACK : Acknowledge (accusé de réception) |
'\x07' => '', // BEL : Bell (caractère d'appel) |
'\x08' => '', // BS : Backspace (espacement arrière) |
'\x09' => ' ', // HT : Horizontal Tab (tabulation horizontale) |
'\x0A' => '', // LF : Line Feed (saut de ligne) |
'\x0B' => '', // VT : Vertical Tab (tabulation verticale) |
'\x0C' => '', // FF : Form Feed (saut de page) |
'\x0D' => '', // CR : Carriage Return (retour chariot) |
'\x0E' => '', // SO : Shift Out (fin d'extension) |
'\x0F' => '', // SI : Shift In (démarrage d'extension) |
'\x10' => '', // DLE : Data Link Escape |
'\x11' => '', // DC1 : Device Control 1 à 4 (DC1 et DC3 sont généralement utilisés pour coder XON et XOFF dans un canal de communication duplex) |
'\x12' => '', // DC2 : |
'\x13' => '', // DC3 : |
'\x14' => '', // DC4 : |
'\x15' => '', // NAK : Negative Acknowledge (accusé de réception négatif) |
'\x16' => '', // SYN : Synchronous Idle |
'\x17' => '', // ETB : End of Transmission Block (fin du bloc de transmission) |
'\x18' => '', // CAN : Cancel (annulation) |
'\x19' => '', // EM : End of Medium (fin de support) |
'\x1A' => '', // SUB : Substitute (substitution) |
'\x1B' => '', // ESC : Escape (échappement) |
'\x1C' => '', // FS : File Separator (séparateur de fichier) |
'\x1D' => '', // GS : Group Separator (séparateur de groupe) |
'\x1E' => '', // RS : Record Separator (séparateur d'enregistrement) |
'\x1F' => '', // US : Unit Separator (séparateur d'unité) |
'\x20' => ' '); // SP : Espace (Space en anglais) |
$txtEnUtf8 = strtr($txtEnUtf8, $ascii_remplacements); |
return $txtEnUtf8; |
} |
function remplacerCaracteresCp1252Problematiques($txtEnUtf8) { |
$cp1252_remplacements = array ( |
'\xc2\x80' => '\xe2\x82\xac', // EURO SIGN |
'\xc2\x82' => '\xe2\x80\x9a', // SINGLE LOW-9 QUOTATION MARK |
'\xc2\x83' => '\xc6\x92', // LATIN SMALL LETTER F WITH HOOK |
'\xc2\x84' => '\xe2\x80\x9e', // DOUBLE LOW-9 QUOTATION MARK |
'\xc2\x85' => '\xe2\x80\xa6', // HORIZONTAL ELLIPSIS |
'\xc2\x86' => '\xe2\x80\xa0', // DAGGER |
'\xc2\x87' => '\xe2\x80\xa1', // DOUBLE DAGGER |
'\xc2\x88' => '\xcb\x86', // MODIFIER LETTER CIRCUMFLEX ACCENT |
'\xc2\x89' => '\xe2\x80\xb0', // PER MILLE SIGN |
'\xc2\x8a' => '\xc5\xa0', // LATIN CAPITAL LETTER S WITH CARON |
'\xc2\x8b' => '\xe2\x80\xb9', // SINGLE LEFT-POINTING ANGLE QUOTATION |
'\xc2\x8c' => '\xc5\x92', // LATIN CAPITAL LIGATURE OE |
'\xc2\x8e' => '\xc5\xbd', // LATIN CAPITAL LETTER Z WITH CARON |
'\xc2\x91' => '\xe2\x80\x98', // LEFT SINGLE QUOTATION MARK |
'\xc2\x92' => '\xe2\x80\x99', // RIGHT SINGLE QUOTATION MARK |
'\xc2\x93' => '\xe2\x80\x9c', // LEFT DOUBLE QUOTATION MARK |
'\xc2\x94' => '\xe2\x80\x9d', // RIGHT DOUBLE QUOTATION MARK |
'\xc2\x95' => '\xe2\x80\xa2', // BULLET |
'\xc2\x96' => '\xe2\x80\x93', // EN DASH |
'\xc2\x97' => '\xe2\x80\x94', // EM DASH |
'\xc2\x98' => '\xcb\x9c', // SMALL TILDE |
'\xc2\x99' => '\xe2\x84\xa2', // TRADE MARK SIGN |
'\xc2\x9a' => '\xc5\xa1', // LATIN SMALL LETTER S WITH CARON |
'\xc2\x9b' => '\xe2\x80\xba', // SINGLE RIGHT-POINTING ANGLE QUOTATION*/ |
'\xc2\x9c' => '\xc5\x93', // LATIN SMALL LIGATURE OE |
'\xc2\x9e' => '\xc5\xbe', // LATIN SMALL LETTER Z WITH CARON |
'\xc2\x9f' => '\xc5\xb8'); // LATIN CAPITAL LETTER Y WITH DIAERESIS*/ |
$txtEnUtf8 = strtr($txtEnUtf8, $cp1252_remplacements); |
return $txtEnUtf8; |
} |
function subtext($text, $offset = 500) { |
preg_match('!.{0,'.$offset.'}\s!si', $text, $match); |
return $match[0].'...'; |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.99.2.13 2008-04-16 12:39:56 alexandre_tb |
* simplification du code en utilisant la classe Bazar_element |
* |
* Revision 1.99.2.12 2008-03-17 14:02:53 jp_milcent |
* Ajout d'un message demandant de s'identifiez pour poser des commentaires. |
* Amélioration du XHTML (me prévenir en cas de pb). |
* |
* Revision 1.99.2.11 2008-03-17 11:03:02 jp_milcent |
* Ajout de l'authentification nécessaire pour déposer des commentaires. |
* Corrections sur la gestion des paramêtres dans les urls (compatibilité applette Identification et Moteur de Recherche). |
* |
* Revision 1.99.2.10 2008-02-04 13:03:09 alexandre_tb |
* ajout d un class css dans les h2 |
* |
* Revision 1.99.2.9 2008-02-01 16:24:10 florian |
* ajout champs_mail, décommenter les traductions des javascripts |
* |
* Revision 1.99.2.8 2008-01-29 09:35:37 alexandre_tb |
* remplacement des variables action par une constante |
* Utilisation d un redirection pour eviter que les formulaires soient valides 2 fois |
* simplification de la suppression d un lien associe a une liste |
* |
* Revision 1.99.2.7 2008-01-11 14:09:17 alexandre_tb |
* Remplacement de la variable action ecrite en dur par la constante BAZ_VARIABLE_ACTION |
* |
* Revision 1.99.2.6 2007-12-14 15:55:38 alexandre_tb |
* les commentaires peuvent maintenant apparaitre dans le moteur de recherche et dans les fiches, il faut mettre a 1 respectivement le champs recherche et obligatoire |
* |
* Revision 1.99.2.5 2007-12-10 12:57:34 jp_milcent |
* Correction du problèmes des & non remplacées par des & |
* |
* Revision 1.99.2.4 2007-12-04 08:58:26 alexandre_tb |
* modification de styles dans les formulaires |
* |
* Revision 1.99.2.3 2007-12-03 15:16:21 jp_milcent |
* Correction problème de la div mystère! |
* |
* Revision 1.99.2.2 2007-11-30 15:02:50 alexandre_tb |
* simplification du code et correction du bug (les fiches de la carto n affichent pas la bonne nature |
* |
* Revision 1.99.2.1 2007-11-30 14:14:36 jp_milcent |
* Ajout d'un décodage des apostrophes de type RIGHT SINGLE QUOTATION MARK. |
* |
* Revision 1.99 2007-11-05 10:17:19 alexandre_tb |
* correction bug: retrait inorportun de la variable menu dans la globale URL |
* |
* Revision 1.98 2007-10-24 13:27:45 alexandre_tb |
* bug d'affichage multiple lorsqu'il y a +sieurs langues |
* |
* Revision 1.97 2007-10-24 08:56:27 alexandre_tb |
* bug d'affichage multiple lorsqu'il y a +sieurs langues |
* |
* Revision 1.96 2007-10-22 10:09:21 florian |
* correction template |
* |
* Revision 1.95 2007-10-22 09:22:02 alexandre_tb |
* prise en compte de la langue dans les requetes sur bazar_nature |
* |
* Revision 1.94 2007-10-10 13:26:00 alexandre_tb |
* utilisation de la classe Administrateur_bazar a la place de niveau_droit |
* |
* Revision 1.93 2007-10-01 11:59:51 alexandre_tb |
* cosmetique d affichage de la date de l evenement |
* |
* Revision 1.92 2007-09-28 15:02:43 jp_milcent |
* Suppression d'une div fermante jamais ouverte! |
* |
* Revision 1.91 2007-09-28 14:43:29 jp_milcent |
* Correction bogue sur la gestion du mail des rédacteurs. |
* |
* Revision 1.90 2007-09-28 13:39:15 jp_milcent |
* Ajout d'une constante permettant de configurer l'affichage ou pas du courriel du rédacteur d'une fiche. |
* |
* Revision 1.89 2007-09-18 07:38:43 alexandre_tb |
* ajout de la constante BAZ_AFFICHER_FILTRE_MOTEUR pour enlever le choix du type de fiche dans le moteur de recherche. |
* |
* Revision 1.88 2007-08-27 12:32:14 alexandre_tb |
* suppression de un notice |
* |
* Revision 1.87 2007-07-05 08:27:35 alexandre_tb |
* dans le flux ajout utf8_encode pour la description et le titre des flux |
* |
* indentation du code, et correction bug lorsque plusieurs catégories nature étaient demandé lors de consultation de fiche. |
* |
* Revision 1.86 2007-07-04 10:02:42 alexandre_tb |
* deplacement d une balise <ul> dans la liste des resultats pour conformite xhtml |
* |
* Revision 1.85 2007-06-25 12:15:06 alexandre_tb |
* merge from narmer |
* |
* Revision 1.84 2007-06-25 09:56:55 alexandre_tb |
* correction de bug |
* |
* Revision 1.83 2007-06-04 15:26:02 alexandre_tb |
* remplacement d un die en return |
* |
* Revision 1.82 2007/04/20 12:47:42 florian |
* correction bugs suite au merge |
* |
* Revision 1.81 2007/04/20 09:59:41 florian |
* et un echo en moins! |
* |
* Revision 1.80 2007/04/20 09:57:21 florian |
* correction bugs suite au merge |
* |
* Revision 1.79 2007/04/19 14:57:41 alexandre_tb |
* merge |
* |
* Revision 1.77 2007/04/04 15:15:22 neiluj |
* débug pour nom wiki |
* |
* Revision 1.76 2007/04/04 15:09:59 florian |
* modif class fichiers |
* |
* Revision 1.75 2007/04/04 08:51:01 florian |
* gestion des classes spécifiques pour habiller par CSS les fiches bazar |
* |
* Revision 1.74 2007/03/28 15:54:32 florian |
* correction de bugs |
* |
* Revision 1.73 2007/03/28 10:01:47 florian |
* ajout de la constante BAZ_UTILISE_TEMPLATE, pour utiliser ou non les templates pour l'affichage du moteur de recherche |
* |
* Revision 1.72 2007/03/28 08:51:22 neiluj |
* passage des flux RSS en UTF-8 |
* ajout de l'indentation du code |
* Vérification validation w3c = OK |
* |
* Revision 1.71 2007/03/19 15:17:37 alexandre_tb |
* correction de la requete de recherche |
* |
* Revision 1.70 2007/03/08 15:12:13 jp_milcent |
* Fusion avec la livraison Menes : 08 mars 2007 |
* |
* Revision 1.60.2.11 2007/03/07 17:20:19 jp_milcent |
* Ajout du nettoyage systématique des URLs. |
* |
* Revision 1.60.2.10 2007/03/06 09:41:15 alexandre_tb |
* backport de corrections de bugs de la branche principale |
* |
* Revision 1.69 2007/03/06 09:39:00 alexandre_tb |
* correction de bug sur les jointures et sur les flux rss |
* |
* Revision 1.68 2007/03/05 10:27:06 alexandre_tb |
* ajout d identifiant dans les span qui affiche le detail d une fiche. |
* ajout d un modele pour les fiches -> du code a ete deplace dans |
* bazar_template |
* |
* Revision 1.67 2007/02/28 10:18:56 alexandre_tb |
* backport de bug depuis la 1.60 de menes |
* |
* Revision 1.60.2.9 2007/02/27 15:32:40 alexandre_tb |
* utilisation de la fonction xmlEntities pour transformer les & en &#...; |
* fixe les plantages des flux rss lorsque des guillemets ou des esperluettes étaient présents |
* |
* Revision 1.60.2.8 2007/02/27 15:11:00 alexandre_tb |
* correction d une jointure dans la requete pour les flux rss |
* utilisation de la librairie XML_Util de pear pour generer le flux RSS -> plus clair |
* |
* Revision 1.60.2.7 2007/02/15 17:39:00 jp_milcent |
* Remise dans le code d'un bogue... |
* A corriger! |
* |
* Revision 1.60.2.6 2007/02/15 13:42:16 jp_milcent |
* Utilisation de IN à la place du = dans les requêtes traitant les catégories de fiches. |
* Permet d'utiliser la syntaxe 1,2,3 dans la configuration de categorie_nature. |
* |
* Revision 1.64 2007/02/02 14:00:41 alexandre_tb |
* mise en place d'un template pour l'affichage du moteur de recherche |
* |
* Revision 1.60.2.5 2007/02/02 13:46:54 alexandre_tb |
* correction bug sur une date |
* |
* Revision 1.60.2.4 2007/01/30 15:45:01 alexandre_tb |
* affichage de la date de création e la fiche lorsque la date de début de validité n'est plus bonne |
* |
* Revision 1.60.2.3 2007/01/29 10:53:46 alexandre_tb |
* Mise en place de la constante BAZ_DERNIERES_FICHES pour remplacer le label en francais dans baz_liste |
* |
* Revision 1.63 2007/01/18 14:37:34 alexandre_tb |
* backport |
* les dates ne s'affichent pas si elles sont vides. |
* les champs dates propose 4 années avant l'année actuelle |
* |
* Revision 1.60.2.2 2007/01/17 16:01:27 alexandre_tb |
* les dates ne s'affichent pas si elles sont vides. |
* les champs dates propose 4 années avant l'année actuelle |
* |
* Revision 1.60.2.1 2007/01/05 14:41:49 alexandre_tb |
* backport ordre d affichage des dernieres news et suppression de la taille des images uploadees |
* |
* Revision 1.60 2006/10/05 08:53:50 florian |
* amelioration moteur de recherche, correction de bugs |
* |
* Revision 1.59 2006/09/21 14:19:39 florian |
* amélioration des fonctions liés au wikini |
* |
* Revision 1.58 2006/09/15 12:31:40 alexandre_tb |
* correction du nom du flux RSS. |
* |
* Revision 1.57 2006/07/25 13:22:27 alexandre_tb |
* réorganisation du code, sans grand changement |
* |
* Revision 1.56 2006/07/18 14:13:35 alexandre_tb |
* Ajout d identifiant HTML |
* |
* Revision 1.55 2006/07/04 14:29:18 alexandre_tb |
* Ajout du bouton supprimer pour les administrateurs |
* |
* Revision 1.54 2006/07/03 09:51:21 alexandre_tb |
* correction du bug recherche sur fiches validés et invalidés. |
* |
* Revision 1.53 2006/06/29 10:29:51 florian |
* correction bug moteur de recherche |
* |
* Revision 1.52 2006/06/02 09:29:07 florian |
* debut d'integration de wikini |
* |
* Revision 1.51 2006/05/23 15:41:27 alexandre_tb |
* ajout de la numérotation des pages en haut et en bas ds résultats et ajout d'une div class=bazar_numero pour les entourer |
* |
* Revision 1.50 2006/05/22 09:55:12 alexandre_tb |
* ajout de la variable recherche_avancee dans l'action du formulaire |
* |
* Revision 1.49 2006/05/19 13:54:11 florian |
* stabilisation du moteur de recherche, corrections bugs, lien recherche avancee |
* |
* Revision 1.48 2006/05/17 09:50:13 alexandre_tb |
* Ajout du moteur de recherche évolué et du découpage par page |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2014_06_04/bibliotheque/bazarTemplate.class.php |
---|
New file |
0,0 → 1,102 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU General Public | |
// | 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: bazarTemplate.class.php,v 1.7 2008-10-29 15:44:02 alexandre_tb Exp $ |
/** |
* Application projet |
* |
* La classe d acces aux templates du bazar |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.7 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
include_once PAP_CHEMIN_API_PEAR.'PEAR.php' ; |
// +------------------------------------------------------------------------------------------------------+ |
// | CONSTANTE DES TEMPLATES | |
// +------------------------------------------------------------------------------------------------------+ |
define ('BAZ_TEMPLATE_CONSULTER', 1); // Squelette de l onglet "consulter" |
define ('BAZ_TEMPLATE_LISTE_DES_FICHES', 2); // Modele de la liste des fiches |
define ('BAZ_TEMPLATE_MAIL_NOUVELLE_FICHE_SUJET', 3); // Modele du mail pour prevenir les admins d une nouvelle fiche (sujet) |
define ('BAZ_TEMPLATE_MAIL_NOUVELLE_FICHE_CORPS', 4); // Modele du mail pour prevenir les admins d une nouvelle fiche (corps) |
define ('BAZ_TEMPLATE_MESSAGE_LOGIN', 5); // Modele du message lorsque l utilisateur n est pas logue |
define ('BAZ_TEMPLATE_ACCUEIL_CARTE_GOOGLE', 6); // Modele de la page d accueil de l appli bazar.carte_google.php |
define ('BAZ_TEMPLATE_FORMULAIRE_ACCUEIL', 7); // Modele, de la page saisie formulaire ou l'on choisit le type de fiche a saisir |
define ('BAZ_TEMPLATE_FORMULAIRE', 8); // Modele du formulaire (different de celui ci-dessus) |
define ('BAZ_TEMPLATE_MAIL_MODIFIER_FICHE_SUJET', 9); // Modele du mail pour prevenir les admins d une modification de fiche (sujet) |
define ('BAZ_TEMPLATE_MAIL_MODIFIER_FICHE_CORPS', 10); // Modele du mail pour prevenir les admins d une modification de fiche (corps) |
class bazarTemplate extends PEAR { |
var $_db ; |
function bazarTemplate(&$objetDB) { |
$this->_db = $objetDB ; |
} |
function getTemplate ($id_template, $lang='fr-FR', $categorie_nature = 'toutes') { |
$requete = 'select bt_template from bazar_template where bt_id_template='.$id_template. |
' and bt_id_i18n like "'.$lang.'%" ' ; |
if($categorie_nature != 'toutes') { |
$requete .= ' and bt_categorie_nature='.$categorie_nature ; |
} |
else |
{ |
//si toutes les catégories natures sont affichées, on affiche par défaut le template du numéro 1 |
$requete .= ' and bt_categorie_nature=1' ; |
} |
$resultat = $this->_db->query($requete) ; |
if (DB::isError($resultat)) { |
return $this->raiseError ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
} |
if ($resultat->numRows() == 0) { |
return $this->raiseError ('Aucun template avec l\'identifiant: '.$id_template. |
' et la langue: '.$lang.'<br />'.$requete) ; |
} |
$ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT) ; |
return $ligne->bt_template ; |
} |
} |
?> |
/tags/2014_06_04/bibliotheque/bazar.fonct.formulaire.controles.php |
---|
New file |
0,0 → 1,51 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: bazar.fonct.formulaire.controles.php,v 1.1 2005-11-07 17:05:45 florian Exp $ |
/** |
* Formulaire controles |
* |
* Les fonctions de controles de saisie des formulaires |
* |
*@package bazar |
//Auteur original : |
*@author Florian SCHMITT <florian@ecole-et-nature.org> |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.1 $ $Date: 2005-11-07 17:05:45 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
//-------------------FONCTIONS DE MISE EN PAGE DES FORMULAIRES |
/** liste_choisir() - Teste si une valeur à été choisie pour une liste |
* |
* |
*/ |
function liste_choisir($element_name,$element_value) { |
if ($element_value == 0) { |
return false; |
} |
else { |
return true; |
} |
} |
?> |
/tags/2014_06_04/bibliotheque/bazar.fonct.google.php |
---|
New file |
0,0 → 1,132 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: bazar.fonct.google.php,v 1.1 2007-06-04 15:24:00 alexandre_tb Exp $ |
/** |
* Formulaire |
* |
* Les fonctions et script specifique a un carto google |
* |
*@package bazar |
//Auteur original : |
*@author Aleandre GRANIER <alexandre@tela-botanica.org> |
*@copyright Tela-Botanica 2000-2007 |
*@version $Revision: 1.1 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
$script = ' |
// Variables globales |
var map = null; |
var geocoder = null; |
var lat = document.getElementById("latitude"); |
var lon = document.getElementById("longitude"); |
function load() { |
if (GBrowserIsCompatible()) { |
map = new GMap2(document.getElementById("map")); |
map.addControl(new GSmallMapControl()); |
map.addControl(new GMapTypeControl()); |
map.addControl(new GScaleControl()); |
map.enableContinuousZoom(); |
// On centre la carte sur le languedoc roussillon |
center = new GLatLng(43.84245116699036, 3.768310546875); |
map.setCenter(center, 7); |
//marker = new GMarker(center, {draggable: true}) ; |
GEvent.addListener(map, "click", function(marker, point) { |
if (marker) { |
map.removeOverlay(marker); |
var lat = document.getElementById("latitude"); |
var lon = document.getElementById("longitude"); |
lat.value = ""; |
lon.value = ""; |
} else { |
// On ajoute un marqueur a l endroit du clic et on place les coordonnees dans les champs latitude et longitude |
marker = new GMarker(point, {draggable: true}) ; |
GEvent.addListener(marker, "dragend", function () { |
coordMarker = marker.getPoint() ; |
var lat = document.getElementById("latitude"); |
var lon = document.getElementById("longitude"); |
lat.value = coordMarker.lat(); |
lon.value = coordMarker.lng(); |
}); |
map.addOverlay(marker); |
setLatLonForm(marker); |
} |
});' ; |
if ($formtemplate->getElementValue ('latitude') != '' && $formtemplate->getElementValue('longitude') != '') { |
$script .= ' |
point = new GLatLng('.$formtemplate->getElementValue('latitude').', '.$formtemplate->getElementValue('longitude').'); |
marker = new GMarker(point, {draggable: true}); |
map.addOverlay(marker);' ; |
} |
$script .= 'geocoder = new GClientGeocoder(); |
} |
}; |
function showAddress() { |
var adresse = document.getElementById("bf_adresse").value ; |
var ville = document.getElementById("bf_ville").value ; |
var cp = document.getElementById("bf_cp_lieu_evenement").value ; |
var selectIndex = document.getElementById("liste30").selectedIndex; |
var pays = document.getElementById("liste30").options[selectIndex].text ; |
var address = adresse + \' \' + \' \' + cp + \' \' + ville + \' \' +pays ; |
if (geocoder) { |
geocoder.getLatLng( |
address, |
function(point) { |
if (!point) { |
alert(address + " not found"); |
} else { |
map.setCenter(point, 13); |
var marker = new GMarker(point, {draggable: true}); |
GEvent.addListener(marker, "dragend", function () { |
coordMarker = marker.getPoint() ; |
var lat = document.getElementById("latitude"); |
var lon = document.getElementById("longitude"); |
lat.value = coordMarker.lat(); |
lon.value = coordMarker.lng(); |
}); |
map.addOverlay(marker); |
setLatLonForm(marker) |
marker.openInfoWindowHtml(address+ "'.BAZ_GOOGLE_MSG.'"); |
} |
} |
); |
} |
} |
function setLatLonForm(marker) { |
coordMarker = marker.getPoint() ; |
var lat = document.getElementById("latitude"); |
var lon = document.getElementById("longitude"); |
lat.value = coordMarker.lat(); |
lon.value = coordMarker.lng(); |
} |
'; |
/* |
* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
/tags/2014_06_04/bibliotheque/bazar.class.php |
---|
New file |
0,0 → 1,456 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: bazar.class.php,v 1.11 2008-10-29 10:38:14 alexandre_tb Exp $ |
/** |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.11 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | LES CONSTANTES DES NIVEAUX DE DROIT | |
// +------------------------------------------------------------------------------------------------------+ |
define ('BAZ_DROIT_SUPER_ADMINISTRATEUR', 0); |
define ('BAZ_DROIT_ADMINISTRATEUR', 2); |
define ('BAZ_DROIT_REDACTEUR', 1); |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
include_once PAP_CHEMIN_API_PEAR.'PEAR.php'; |
include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php'; |
class Administrateur_bazar { |
var $_auth ; |
/** |
* Identifiant de l'utilisateur |
*/ |
var $_id_utilisateur ; |
/** |
* Vaut true si l'utilisateur est un administrateur |
*/ |
var $_isSuperAdmin ; |
/** Constructeur |
* |
* @param object Un objet authentification |
* @return void |
* |
*/ |
function Administrateur_bazar (&$AUTH) { |
$this->_auth = $AUTH ; |
if ($AUTH->getAuth())$this->_id_utilisateur = $this->_auth->getAuthData(BAZ_CHAMPS_ID) ; |
} |
/** isSuperAdmin () - Renvoie true si l'utilisateur est un super administrateur |
* |
*/ |
function isSuperAdmin() { |
if(empty($this->_id_utilisateur)) |
return FALSE; |
// On court-circuite si la question a déjà été posé pour ne pas refaire la requete |
if (isset ($this->_isSuperAdmin)) return $this->_isSuperAdmin ; |
// On court-circuite si l'utilisateur n'est pas logué |
if (!$this->_auth->getAuth()) return false ; |
// Sinon on interroge la base |
$requete = 'SELECT bd_niveau_droit FROM bazar_droits WHERE bd_id_utilisateur='. |
$this->_id_utilisateur. |
' AND bd_niveau_droit=0'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query ($requete) ; |
if (DB::isError($resultat)) { |
return ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
} |
if ($resultat->numRows() != 0) { |
$this->_isSuperAdmin = true ; |
} else { |
$this->_isSuperAdmin = false ; |
} |
return $this->_isSuperAdmin; |
} |
/** isAdmin () - Renvoie true si l'utilisateur est administrateur du type de fiche spécifié |
* |
* @param interger type_annonce Le type de l'annonce |
* |
*/ |
function isAdmin($id_nature) { |
// on court-circuite si l'utilisateur n'est pas logué |
if (!$this->_auth->getAuth()) return false ; |
return $this->_requeteDroit ($id_nature, 2) ; |
} |
/** isRedacteur() - Renvoie true si l'utilisateur est redacteur du type de fiche specifie |
* |
*/ |
function isRedacteur($id_nature) { |
if (isset($GLOBALS['droit_depot']) && $GLOBALS['droit_depot'] == 3) return true; |
return $this->_requeteDroit ($id_nature, 1) ; |
} |
/** _requeteDroit() - fait une requete sur la table bazar_droit |
* |
*/ |
function _requeteDroit ($id_nature, $niveau) { |
if(empty($this->_id_utilisateur)) |
return false; |
$requete = 'SELECT bd_niveau_droit FROM bazar_droits WHERE bd_id_utilisateur=' |
.$this->_id_utilisateur. |
' AND bd_id_nature_offre="'.$id_nature.'" and bd_niveau_droit='.$niveau; |
$resultat = $GLOBALS['_BAZAR_']['db']->query ($requete) ; |
if (DB::isError($resultat)) { |
return ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
} |
if ($resultat->numRows() != 0) { |
return true ; |
} |
return false ; |
} |
} |
class Utilisateur_bazar extends Administrateur_bazar { |
function Utilisateur_bazar($id_utilisateur) { |
$this->_id_utilisateur = $id_utilisateur ; |
} |
function isAdmin($id_nature) { |
return $this->_requeteDroit ($id_nature, 2) ; |
} |
/** isSuperAdmin () - Renvoie true si l'utilisateur est un super administrateur |
* |
*/ |
function isSuperAdmin() { |
if(empty($this->_id_utilisateur)) |
return false; |
// On court-circuite si la question a déjà été posé pour ne pas refaire la requete |
if (isset ($this->_isSuperAdmin)) return $this->_isSuperAdmin ; |
// Sinon on interroge la base |
$requete = 'SELECT bd_niveau_droit FROM bazar_droits WHERE bd_id_utilisateur='. |
$this->_id_utilisateur. |
' AND bd_niveau_droit=0'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query ($requete) ; |
if (DB::isError($resultat)) { |
return ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
} |
if ($resultat->numRows() != 0) { |
$this->_isSuperAdmin = true ; |
} else { |
$this->_isSuperAdmin = false ; |
} |
return $this->_isSuperAdmin; |
} |
} |
define ('BAZAR_NOTIFICATION_NOUVELLE_FICHE', 1); |
define ('BAZAR_NOTIFICATION_MODIFICATION_FICHE', 2); |
class bazar extends PEAR { |
/** |
* getMailAdmin Renvoie un tableau de mail des administrateurs du type |
* de fiche passe en parametre |
* |
* @global DB Un objet DB de PEAR $GLOBALS['_BAZAR_']['db'] |
* @param integer L identifiant de la nature |
*/ |
function getMailAdmin($id_nature) { |
$requete = 'select '.BAZ_CHAMPS_EMAIL.' from '.BAZ_ANNUAIRE.', bazar_droits ' . |
'where bd_id_nature_offre="'.$id_nature.'" and bd_niveau_droit="'.BAZ_DROIT_ADMINISTRATEUR.'"' . |
' and '.BAZ_CHAMPS_ID.'= bd_id_utilisateur'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete); |
if (DB::isError($resultat)) $this->raiseError(); |
$tableau_mail = array(); |
if ($resultat->numRows() == 0) return false; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
array_push ($tableau_mail, $ligne[BAZ_CHAMPS_EMAIL]) ; |
} |
return $tableau_mail; |
} |
/** |
* getMailAdmin Renvoie un tableau de mail des super administrateurs |
* |
* @global DB Un objet DB de PEAR $GLOBALS['_BAZAR_']['db'] |
*/ |
function getMailSuperAdmin() { |
$requete = 'select '.BAZ_CHAMPS_EMAIL.' from '.BAZ_ANNUAIRE.', bazar_droits ' . |
'where bd_niveau_droit="'.BAZ_DROIT_SUPER_ADMINISTRATEUR.'"' . |
' and '.BAZ_CHAMPS_ID.'= bd_id_utilisateur'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete); |
if (DB::isError($resultat)) $this->raiseError(); |
$tableau_mail = array(); |
if ($resultat->numRows() == 0) return false; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
array_push ($tableau_mail, $ligne[BAZ_CHAMPS_EMAIL]) ; |
} |
return $tableau_mail; |
} |
/** |
* notifier() envoie un message aux administrateurs |
* |
* par defaut lors du depot ou de la modification d une fiche |
*/ |
function notifier($type = BAZAR_NOTIFICATION_NOUVELLE_FICHE) { |
switch ($type) { |
case BAZAR_NOTIFICATION_NOUVELLE_FICHE : |
$id_sujet = BAZ_TEMPLATE_MAIL_NOUVELLE_FICHE_SUJET; |
$id_corps = BAZ_TEMPLATE_MAIL_NOUVELLE_FICHE_CORPS; |
break ; |
case BAZAR_NOTIFICATION_MODIFICATION_FICHE : |
$id_sujet = BAZ_TEMPLATE_MAIL_MODIFIER_FICHE_SUJET; |
$id_corps = BAZ_TEMPLATE_MAIL_MODIFIER_FICHE_CORPS; |
break; |
} |
$template = new bazarTemplate($GLOBALS['_BAZAR_']['db']); |
//print ('toto'.$id_sujet); |
$sujet = html_entity_decode($template->getTemplate($id_sujet, $GLOBALS['_BAZAR_']['langue'], $GLOBALS['_BAZAR_']['id_typeannonce'])); |
$corps = html_entity_decode($template->getTemplate($id_corps, $GLOBALS['_BAZAR_']['langue'], $GLOBALS['_BAZAR_']['id_typeannonce'])); |
$corps.= $GLOBALS['_BAZAR_']['id_fiche'].'&typeannonce='.$GLOBALS['_BAZAR_']['id_typeannonce'] ; |
$mails = bazar::getMailSuperAdmin($GLOBALS['_BAZAR_']['id_typeannonce']); |
if (is_array ($mails)) { |
foreach ($mails as $mail) { |
mail ($mail, $sujet, $corps); |
} |
} |
} |
/** Effectue une requete sur bazar_nature pour remplir diverses |
* globales |
* |
* @global string la globale de langue (ex fr-FR) |
* @global int $GLOBALS['_BAZAR_']['id_typeannonce'] |
* |
* @return mixed true ou PEAR_Error |
*/ |
function chargeNature() { |
$requete = 'SELECT bn_label_nature, bn_condition, bn_template, bn_commentaire, bn_appropriation, bn_image_titre, bn_image_logo'; |
$requete .= ' FROM bazar_nature WHERE bn_id_nature = '.$GLOBALS['_BAZAR_']['id_typeannonce']; |
if (isset($GLOBALS['_BAZAR_']['langue'])) { |
$requete .= ' and bn_ce_i18n like "'.$GLOBALS['_BAZAR_']['langue'].'%"'; |
} |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
return $resultat->getMessage().$resultat->getDebugInfo() ; |
} |
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC); |
$GLOBALS['_BAZAR_']['typeannonce']=$ligne['bn_label_nature']; |
$GLOBALS['_BAZAR_']['condition']=$ligne['bn_condition']; |
$GLOBALS['_BAZAR_']['template']=$ligne['bn_template']; |
$GLOBALS['_BAZAR_']['commentaire']=$ligne['bn_commentaire']; |
$GLOBALS['_BAZAR_']['appropriation']=$ligne['bn_appropriation']; |
$GLOBALS['_BAZAR_']['image_titre']=$ligne['bn_image_titre']; |
$GLOBALS['_BAZAR_']['image_logo']=$ligne['bn_image_logo']; |
return true; |
} |
/** Renvoie un element de formulaire de type select ou radio |
* au vue de filtrer les resultats du bazar |
* @global mixed $GLOBALS['_BAZAR_']['db'] identifiant de connexion a la bd |
* |
* @return string html |
*/ |
function getFiltre($numero_liste, $multiple = false, $type = 'select') { |
$type == 'select' ? $balise = 'select' : $balise = 'radio' ; |
// chargement du template |
$tableau_template = baz_valeurs_template($GLOBALS['_BAZAR_']['template']); |
$html_filtre = '<select name="bazar_filtre_'.$numero_liste.'" onchange="javascript:this.form.submit();">'."\n"; |
// Requete dans bazar_liste_valeurs |
$requete = 'select blv_valeur, blv_label from bazar_liste_valeurs where blv_ce_liste="'.$numero_liste.'"'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete); |
if (DB::isError($resultat)) { |
return $resultat->getMessage().$resultat->getDebugInfo() ; |
} |
$html_filtre .= '<option id="filtre_tous" value="*" '; |
if (isset($_POST['bazar_filtre_'.$numero_liste]) && '*' == $_POST['bazar_filtre_'.$numero_liste]) { |
$html_filtre .= 'selected="selected" '; |
} |
$html_filtre .= '>'.'Tout afficher'.'</option>'; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) { |
$html_filtre .= '<option class="filtre_'.$ligne->blv_valeur.'" value="'.$ligne->blv_valeur.'"'; |
if (isset($_POST['bazar_filtre_'.$numero_liste]) && $ligne->blv_valeur == $_POST['bazar_filtre_'.$numero_liste]) { |
$html_filtre .= 'selected="selected" '; |
} |
$html_filtre .= '>'.$ligne->blv_label.'</option>'."\n"; |
} |
$html_filtre .= '</select>'."\n"; |
$resultat->free(); |
return $html_filtre; |
} |
function getFiltrePlageDeDate () { |
if (isset ($_POST['date_debut'])) { |
$defaut_debut = $_POST['date_debut']; |
} else { |
$defaut_debut = ''; |
} |
if (isset ($_POST['date_fin'])) { |
$defaut_fin = $_POST['date_fin']; |
} else { |
$defaut_fin = ''; |
} |
$formulaire_filtre = ''; |
$formulaire_filtre .= 'de <input type="text" readonly size="10" name="date_debut" class="inputDate" id="date_debut" value="'.$defaut_debut.'" />'; |
$formulaire_filtre .= ' à <input type="text" readonly size="10" name="date_fin" class="inputDate" id="date_fin" value="'.$defaut_fin.'" />'; |
$formulaire_filtre .= "\n".'<script language="javascript" type="text/javascript">' ."\n". |
'$(document).ready(function() { $(\'#date_debut, #date_fin\').datepicker($.extend({}, $.datepicker.regional["fr-FR"],{ |
dateFormat:\'dd-mm-yy\', |
buttonImage: "client/bazar/images/cal.png", |
showOn: "both", |
beforeShow: customRange, |
buttonImageOnly: true'."\n". |
'}));})' ."\n". |
'function customRange(input) { return {minDate: (input.id == "date_fin" ? $("#date_debut").datepicker("getDate") : null), |
maxDate: (input.id == "date_debut" ? $("#date_fin").datepicker("getDate") : null)};}' ."\n". |
'</script>'; |
return $formulaire_filtre; |
} |
/** Renvoie le formulaire d un filtre |
* utile dans la carte google ou dans le calendrier |
* |
* @param string le template avec des filtres ecrits comme {filtre liste="12"} |
* @global mixed $GLOBALS['_BAZAR_']['url'] |
* @return string html |
*/ |
function getFormulaireFiltre($template) { |
if (preg_match_all ('/{filtre liste="([0-9]+)"}/', $template, $subpattern)) { |
$formulaire_filtre = '<form action="'.$GLOBALS['_BAZAR_']['url']->getURL().'" method="post">'."\n"; |
$formulaire_filtre .= '<fieldset><legend>Filtrer : </legend>'; |
for ($i = 0; $i <count($subpattern[1]); $i++) { |
$formulaire_filtre .= bazar::getFiltre($subpattern[1][$i]) ; |
} |
$formulaire_filtre .= bazar::getFiltrePlageDeDate(); |
$formulaire_filtre .= '<input type="submit" value="Filtrer" />'; |
$formulaire_filtre .= '</fieldset>'; |
$formulaire_filtre .= '</form>'."\n"; |
$html = preg_replace ('/{filtre liste="([0-9]+)"}/', $formulaire_filtre, $template); |
} |
return $html; |
} |
} |
class Bazar_element { |
function &factory($type, $options = false) |
{ |
if (file_exists (BAZ_CHEMIN_APPLI."bibliotheque/elements/{$type}.php")) include_once BAZ_CHEMIN_APPLI."bibliotheque/elements/{$type}.php"; |
else return PEAR::raiseError("Impossible d inclure le fichier /{$type}.php", "Impossible d inclure le fichier ". |
BAZ_CHEMIN_APPLI."bibliotheque/elements/{$type}.php<br />", null, null, |
"Impossible d inclure le fichier /{$type}.php" |
, 'PEAR_Error', true);; |
$classname = "Bazar_{$type}"; |
if (!class_exists($classname)) { |
$tmp = PEAR::raiseError(null, -2, null, null, |
"la classe $classname n'existe pas" |
, 'PEAR_Error', true); |
return $tmp; |
} |
@$obj =& new $classname($options); |
return $obj; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.10 2008-09-17 14:08:45 alexandre_tb |
* merge depuis aha |
* |
* Revision 1.9 2007-10-10 13:27:06 alexandre_tb |
* encodage et remplacement de die en return |
* |
* Revision 1.8 2007-10-01 10:35:14 alexandre_tb |
* petit hack pour tester la presence de $GLOBALS['droit_depot'] qui indique le niveau de droit minimum pour pouvoir deposer une fiche. |
* |
* Revision 1.7 2007-07-04 09:59:09 alexandre_tb |
* ajout de la classe bazar, premices d une structuration du code |
* |
* Revision 1.6 2007/04/20 09:58:06 neiluj |
* correction bug $this->_id_utilisateur |
* |
* Revision 1.5 2007/04/11 08:30:12 neiluj |
* remise en état du CVS... |
* |
* Revision 1.3.2.1 2007/03/07 16:49:21 jp_milcent |
* Mise en majuscule de select |
* |
* Revision 1.3 2006/03/29 13:05:12 alexandre_tb |
* ajout de la classe Administrateur_bazar |
* |
* Revision 1.2 2006/02/09 11:06:12 alexandre_tb |
* changement dans les id des droit |
* 0 => super administrateur |
* 1 => redacteur |
* 2 => administrateur |
* |
* Revision 1.1 2006/02/07 11:08:06 alexandre_tb |
* version initiale |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2014_06_04/bibliotheque/bazar.fonct.cal.php |
---|
New file |
0,0 → 1,506 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: bazar.fonct.cal.php,v 1.29 2008-10-29 10:38:51 alexandre_tb Exp $ |
/** |
* |
* Fonctions calendrier du module bazar |
* |
* TODO : ajouter la gestion du multilinguisme |
* |
*@package bazar |
//Auteur original : |
*@author David Delon <david.delon@clapas.net> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.29 $ $Date: 2008-10-29 10:38:51 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
require_once PAP_CHEMIN_RACINE.'api/pear/Calendar/Month/Weekdays.php'; |
require_once PAP_CHEMIN_RACINE.'api/pear/Calendar/Day.php'; |
require_once PAP_CHEMIN_RACINE.'api/pear/Calendar/Decorator.php'; |
// +------------------------------------------------------------------------------------------------------+ |
// | LISTE de FONCTIONS | |
// +------------------------------------------------------------------------------------------------------+ |
// Classe Utilitaire pour Calendrier |
class DiaryEvent extends Calendar_Decorator { |
var $entry = array(); |
function DiaryEvent($calendar) |
{ |
Calendar_Decorator::Calendar_Decorator($calendar); |
} |
function setEntry($entry) |
{ |
$this->entry[] = $entry; |
} |
function getEntry() |
{ |
return $this->entry; |
} |
} |
// $type : calendrier |
// $type : calendrier_appplette |
function GestionAffichageCalendrier($arguments = array(), $type = 'calendrier') { |
$script = ''; |
// recuperation des arguments de l applette |
$balise = isset ($arguments[0]) ? $arguments[0] : ''; |
$tab_arguments = $arguments; |
if (is_string ($tab_arguments)) { |
$tab_arguments = substr($tab_arguments, 1); |
} else { |
unset($tab_arguments[0]); |
} |
if (is_array($tab_arguments)) { |
foreach($tab_arguments as $argument) { |
if ($argument != '') { |
$tab_parametres = explode('=', $argument, 2); |
if (is_array($tab_parametres)) { |
$options[$tab_parametres[0]] = |
(isset($tab_parametres[1])? trim($tab_parametres[1], '"') : '') ; |
} |
} |
} |
} |
if (!isset($options['template'])) { |
$options['template'] = BAZ_CHEMIN_SQUELETTE.BAZ_SQUELETTE_DEFAUT; |
} else { |
if (file_exists(BAZ_CHEMIN_SQUELETTE.$options['template'])) { |
$options['template'] = BAZ_CHEMIN_SQUELETTE.$options['template']; |
} |
} |
$retour = ''; |
$url = $GLOBALS['_GEN_commun']['url'] ; |
$db =& $GLOBALS['_GEN_commun']['pear_db'] ; |
$auth =& $GLOBALS['_GEN_commun']['pear_auth'] ; |
// Nettoyage de l'url de la query string |
$chaine_url = $url->getQueryString(); |
$tab_params = explode('&', $chaine_url); |
if (count($tab_params) == 0) { |
$tab_params = explode('&', $chaine_url); |
} |
foreach ($tab_params as $param) { |
$tab_parametre = explode('=', $param); |
$url->removeQueryString($tab_parametre[0]); |
} |
if (!isset($_GET['y'])) { |
$_GET['y'] = date('Y'); |
} |
if (!isset($_GET['m'])) { |
$_GET['m'] = date('m'); |
} |
// Construction Mois en Cours |
$month = new Calendar_Month_Weekdays($_GET['y'],$_GET['m']); |
$curStamp = $month->getTimeStamp(); |
$url->addQueryString('y', date('Y',$curStamp)); |
$url->addQueryString('m', date('n',$curStamp)); |
$url->addQueryString('d', date('j',$curStamp)); |
$cur = $url->getUrl(); |
// Gestion de l'affichage du filtre des natures d'évènements |
$cal_num_annonce = BAZ_NUM_ANNONCE_CALENDRIER; |
$ficnat_id = null; |
if (isset($_GET['ficnat']) && $_GET['ficnat'] != '*') { |
$ficnat_id = $_GET['ficnat']; |
$url->addQueryString('ficnat', $_GET['ficnat']); |
$cal_num_annonce = $_GET['ficnat']; |
} |
// Gestion de l'affichage des titres des évènements |
if (isset($_GET['ctt']) && $_GET['ctt'] == '1') { |
$url->addQueryString('tt', '0'); |
if (isset($_GET['tt']) && $_GET['tt'] == '0') { |
$url->addQueryString('tt', '1'); |
} |
$tc_lien = $url->getUrl(); |
} else { |
$url->addQueryString('tt', '0'); |
if (isset($_GET['tt']) && $_GET['tt'] == '0') { |
$url->addQueryString('tt', '1'); |
} |
$url->addQueryString('ctt', '1'); |
$tc_lien = $url->getUrl(); |
} |
$url->removeQueryString('ctt'); |
$url->removeQueryString('tt'); |
$tc_txt = 'Afficher les titres complets des évènements'; |
if (isset($_GET['tt']) && $_GET['tt'] == '0') { |
$tc_txt = 'Tronquer les titres des évènements'; |
$url->addQueryString('tt', $_GET['tt']); |
} |
// Gestion des champs cachés pour le formulaire de filtre |
// Attention à la position dans le fichier... |
$ficnat_chps_cache = $url->querystring; |
unset($ficnat_chps_cache['ficnat']); |
// Navigation |
$prevStamp = $month->prevMonth(true); |
$url->addQueryString('y', date('Y',$prevStamp)); |
$url->addQueryString('m', date('n',$prevStamp)); |
$url->addQueryString('d', date('j',$prevStamp)); |
$prev = $url->getUrl(); |
$nextStamp = $month->nextMonth(true); |
$url->addQueryString('y', date('Y',$nextStamp)); |
$url->addQueryString('m', date('n',$nextStamp)); |
$url->addQueryString('d', date('j',$nextStamp)); |
$next = $url->getUrl(); |
// Suppression du paramêtre de troncage des titres |
$url->removeQueryString('tt'); |
$fr_month = array( "1"=>BAZ_JANVIER,"2"=>BAZ_FEVRIER,"3"=>BAZ_MARS,"4"=>BAZ_AVRIL,"5"=>BAZ_MAI,"6"=>BAZ_JUIN, |
"7"=>BAZ_JUILLET,"8"=>BAZ_AOUT,"9"=>BAZ_SEPTEMBRE,"10"=>BAZ_OCTOBRE,"11"=>BAZ_NOVEMBRE,"12"=>BAZ_DECEMBRE); |
// Récupération des infos sur les natures des fiches pour le filtre |
$requete_nature_fiche = 'SELECT DISTINCT bn_id_nature, bn_ce_i18n, bn_label_nature '. |
'FROM bazar_nature '. |
'WHERE bn_id_nature IN ('.BAZ_NUM_ANNONCE_CALENDRIER.') '; |
$resultat_nature_fiche = $db->query($requete_nature_fiche); |
(DB::isError($resultat_nature_fiche)) ? trigger_error(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat_nature_fiche->getMessage(), $requete_nature_fiche), E_USER_WARNING) : ''; |
// Ajout du javascript et des styles du bazar |
if (defined('PAP_VERSION')) { //si on est dans Papyrus |
GEN_stockerStyleExterne( 'bazar_interne', 'client/bazar/bazar.interne.css'); |
GEN_stockerFichierScript('domLib', '/api/js/domtooltip/domLib.js'); |
GEN_stockerFichierScript('domTT', '/api/js/domtooltip/domTT.js'); |
// DomToolTip |
$script = 'var domTT_styleClass = "niceTitle";'."\n"; |
$script .= 'function nicetitleDecorator(el) {'."\n"; |
$script .= ' var result = el.title;'."\n"; |
$script .= ' result = result.replace(new RegExp("\n", "g"), "<br />");'."\n"; |
$script .= ' //if (el.href) {'."\n"; |
$script .= ' //result += "<p>" + el.href + "<\/p>";'."\n"; |
$script .= ' //}'."\n"; |
$script .= ' return result;'."\n"; |
$script .= '}'."\n"; |
$script .= 'domTT_replaceTitles(nicetitleDecorator);'."\n"; |
GEN_stockerCodeScript('var domTT_styleClass = "niceTitle";'."\n"); |
} |
// Titre |
if ($type == 'calendrier') { |
$retour .= '<div id="cal_entete">'."\n"; |
$retour .= '<span class="cal_navigation">'."\n"; |
$retour .= '<a id="cal_precedent_lien" href="'.$prev.'" title="Allez au mois précédent"><img id="cal_precedent_img" src="client/bazar/images/cal_precedent.png" alt="<<"/></a>'."\n"; |
$retour .= ' '."\n"; |
$retour .= '<span id="cal_encadre_mois_courrant"><a id="cal_mois_courrant" href="'.$cur.'">'; |
$retour .= $fr_month[(date('n',$curStamp))]; |
$retour .= ' '; |
$retour .= (date('Y',$curStamp)); |
$retour .= '</a></span>'."\n"; |
$retour .= ' '."\n"; |
$retour .= '<a id="cal_suivant_lien" href="'.$next.'" title="Allez au mois suivant"><img id="cal_suivant_img" src="client/bazar/images/cal_suivant.png" alt=">>"/></a>'."\n"; |
$retour .= '</span>'."\n"; |
$retour .= '<h1 id="cal_titre"><img id="cal_titre_img" src="client/bazar/images/cal_titre.png" alt="Calendrier"/></h1>'."\n"; |
$retour .= '</div>'."\n"; |
$retour .= '<form action="'.$tc_lien.'" method="get">'."\n"; |
$retour .= '<a href="'.$tc_lien.'">'.$tc_txt.'</a>'."\n"; |
$retour .= '<fieldset>'."\n"; |
$retour .= '<legend>'.'Filtrer : '.'</legend>'."\n"; |
$retour .= '<select id="ficnat" name="ficnat" class="filtre_'.((!is_null($ficnat_id)) ? $ficnat_id: 'tous').'" onchange="javascript:this.form.submit();">'."\n"; |
$retour .= '<option id="filtre_tous" value="*" '; |
if (isset($_GET['ficnat']) && '*' == $_GET['ficnat']) { |
$retour .= 'selected="selected" '; |
} |
$retour .= '>'.'Tout afficher'.'</option>'; |
while ($ligne_nature_fiche = $resultat_nature_fiche->fetchRow(DB_FETCHMODE_OBJECT)) { |
$opt = '<option class="filtre_'.$ligne_nature_fiche->bn_id_nature.'" value="'.$ligne_nature_fiche->bn_id_nature.'" '; |
if (isset($_GET['ficnat']) && $ligne_nature_fiche->bn_id_nature == $_GET['ficnat']) { |
$opt .= 'selected="selected" '; |
} |
$opt .= '>'; |
$retour .= $opt.$ligne_nature_fiche->bn_label_nature.'</option>'."\n"; |
} |
$retour .= '</select>'."\n"; |
$retour .= '<input id="ficnat_ok" type="submit" value="'.'OK'.'" onload="javascript:this.setAttribute(\'style\', \'display:none;\')"/>'."\n"; |
$script_ok = 'if (document.getElementById(\'ficnat_ok\')) {'. |
' document.getElementById(\'ficnat_ok\').style.display = \'none\';'. |
'}'; |
$retour.= '<script type="text/javascript">//<![CDATA['."\n".$script_ok.'//]]></script>'."\n"; |
foreach ($ficnat_chps_cache as $cle => $val) { |
$retour .= '<input id="'.$cle.'" name="'.$cle.'" type="hidden" value="'.$val.'" />'."\n"; |
} |
$retour .= '</fieldset>'."\n"; |
$retour .= '</form>'."\n"; |
} else { |
// Appel du template |
ob_start(); |
include $options['template']; |
$retour .= ob_get_contents(); |
ob_end_clean(); |
} |
// Vue Mois calendrier ou vue applette |
if ((!isset($_GET['id_fiche']) && $type == 'calendrier') || ($type == 'calendrier_applette')){ |
// trigger_error('ICI', E_USER_NOTICE); |
// Recherche evenement de la periode selectionnée |
$ts_jour_fin_mois = $month->nextMonth('timestamp'); |
$ts_jour_debut_mois = $month->thisMonth('timestamp');; |
$requete_evenements = "SELECT DISTINCT bf_id_fiche, bf_titre, bf_lieu_evenement, ". |
" DAY(bf_date_debut_evenement) AS bf_jour_debut_evenement, bf_date_debut_evenement, ". |
" bf_date_fin_evenement, bf_description, bn_id_nature ". |
"FROM bazar_fiche, bazar_nature ". |
"WHERE bf_date_debut_evenement < '".date('Y-m-d', $ts_jour_fin_mois)."' ". |
"AND bf_date_fin_evenement >= '".date('Y-m-d', $ts_jour_debut_mois)."' ". |
"AND bf_ce_nature = bn_id_nature ". |
"AND bn_id_nature IN (".$cal_num_annonce.") ". |
"AND bf_statut_fiche = 1 ". |
"ORDER BY bf_jour_debut_evenement"; |
$resultat_evenement = $db->query($requete_evenements); |
(DB::isError($resultat_evenement)) ? trigger_error(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat_evenement->getMessage(), $requete_evenements), E_USER_WARNING) : ''; |
$selection = array(); |
$evenements = array(); |
$annee = date('Y', $curStamp); |
$mois = date('m', $curStamp); |
$tablo_jours = array(); |
while ($ligne_evenements = $resultat_evenement->fetchRow(DB_FETCHMODE_OBJECT)) { |
list($annee_debut, $mois_debut, $jour_debut) = explode('-', $ligne_evenements->bf_date_debut_evenement); |
list($annee_fin, $mois_fin, $jour_fin) = explode('-', $ligne_evenements->bf_date_fin_evenement); |
$Calendrier = new Calendar($annee_debut, $mois_debut, $jour_debut); |
$ts_jour_suivant = $Calendrier->thisDay('timestamp'); |
$ts_jour_fin = mktime(0,0,0,$mois_fin, $jour_fin, $annee_fin); |
$naviguer = true; |
while ($naviguer && ($ts_jour_suivant <= $ts_jour_fin)) { |
// Si le jours suivant est inferieur a la date de fin du mois courrant, on continue... |
if ($ts_jour_suivant < $ts_jour_fin_mois) { |
$cle_j = date('Y-m-d', $ts_jour_suivant); |
if (!isset($tablo_jours[$cle_j])) { |
$tablo_jours[$cle_j]['Calendar_Day'] = new Calendar_Day(date('Y', $ts_jour_suivant),date('m', $ts_jour_suivant), date('d', $ts_jour_suivant)); |
$tablo_jours[$cle_j]['Diary_Event'] = new DiaryEvent($tablo_jours[$cle_j]['Calendar_Day']); |
} |
$tablo_jours[$cle_j]['Diary_Event']->setEntry($ligne_evenements); |
$ts_jour_suivant = $Calendrier->nextDay('timestamp'); |
//echo "ici$ts_jour_suivant-"; |
$Calendrier->setTimestamp($ts_jour_suivant); |
//echo "la".$Calendrier->thisDay('timestamp')."-"; |
} else { |
$naviguer = false; |
} |
} |
} |
// Add the decorator to the selection |
foreach ($tablo_jours as $jour) { |
$selection[] = $jour['Diary_Event']; |
} |
// Affichage Calendrier |
$month->build($selection); |
if ($type == 'calendrier') { |
$retour.= '<table class="calendrier">'. |
'<colgroup>'. |
'<col class="cal_lundi"/>'. |
'<col class="cal_mardi"/>'. |
'<col class="cal_mercredi"/>'. |
'<col class="cal_jeudi"/>'. |
'<col class="cal_vendredi"/>'. |
'<col class="cal_samedi"/>'. |
'<col class="cal_dimanche"/>'. |
'</colgroup>'. |
'<thead>'. |
"<tr> |
<th> ". BAZ_LUNDI ."</th> |
<th> ". BAZ_MARDI ."</th> |
<th> ". BAZ_MERCREDI ."</th> |
<th> ". BAZ_JEUDI ."</th> |
<th> ". BAZ_VENDREDI ."</th> |
<th> ". BAZ_SAMEDI ."</th> |
<th> ". BAZ_DIMANCHE ."</th> |
</tr> |
".'</thead>'.'<tbody>'; |
} else { |
$retour.= '<table class="calendrier_applette">'. |
'<colgroup>'. |
'<col class="cal_lundi"/>'. |
'<col class="cal_mardi"/>'. |
'<col class="cal_mercredi"/>'. |
'<col class="cal_jeudi"/>'. |
'<col class="cal_vendredi"/>'. |
'<col class="cal_samedi"/>'. |
'<col class="cal_dimanche"/>'. |
'</colgroup>'. |
'<thead>'. |
"<tr> |
<th> ". BAZ_LUNDI_COURT ."</th> |
<th> ". BAZ_MARDI_COURT ."</th> |
<th> ". BAZ_MERCREDI_COURT ."</th> |
<th> ". BAZ_JEUDI_COURT ."</th> |
<th> ". BAZ_VENDREDI_COURT ."</th> |
<th> ". BAZ_SAMEDI_COURT ."</th> |
<th> ". BAZ_DIMANCHE_COURT ."</th> |
</tr> |
".'</thead>'.'<tbody>'; |
} |
$todayStamp=time(); |
$today_ymd=date('Ymd',$todayStamp); |
// Other month : mois |
while ($day = $month->fetch() ) { |
$dayStamp = $day->thisDay(true); |
$day_ymd = date('Ymd',$dayStamp); |
if ( $day->isEmpty() ) { |
$class = "cal_ma other_month"; |
} else { |
if (($day_ymd < $today_ymd)) { |
$class= "cal_mp previous_month"; |
} else { |
if ($day_ymd == $today_ymd) { |
$class= "cal_jc current_day"; |
} else { |
$class="cal_mc current_month"; |
} |
} |
} |
$url->addQueryString ('y', date('Y',$dayStamp)); |
$url->addQueryString ('m', date('n',$dayStamp)); |
$url->addQueryString ('d', date('j',$dayStamp)); |
$link = $url->getUrl(); |
// isFirst() to find start of week |
if ($day->isFirst()) { |
$retour.= ( "<tr>\n" ); |
} |
if ($type == 'calendrier') { |
$retour.= "<td class=\"".$class."\">".'<span class="cal_j">'.$day->thisDay().'</span>'."\n"; |
if ($day->isSelected() ) { |
$evenements = $day->getEntry(); |
$evenements_nbre = count($evenements); |
$evenemt_xhtml = ''; |
while ($ligne_evenement = array_pop($evenements)) { |
$id_fiches = array(); |
$id_fiches[] = $ligne_evenement->bf_id_fiche; |
$url->addQueryString ('id_fiches',$id_fiches); |
$link = $url->getUrl(); |
if (!isset($_GET['tt']) || (isset($_GET['tt']) && $_GET['tt'] == '1')) { |
$titre_taille = strlen($ligne_evenement->bf_titre); |
$titre = ($titre_taille > 20)?substr($ligne_evenement->bf_titre, 0, 20).'...':$ligne_evenement->bf_titre; |
} else { |
$titre = $ligne_evenement->bf_titre; |
} |
$evenemt_xhtml .= '<li class="tooltip nature_'.$ligne_evenement->bn_id_nature.'" title="'.str_replace('"', '\'', $ligne_evenement->bf_titre).'"><a class="cal_evenemt" href="'.$link.'">'.$titre.'</a></li>'."\n"; |
$url->removeQueryString ('id_fiches'); |
} |
if ($evenements_nbre > 0) { |
$retour .= '<ul class="cal_evenemt_liste">'; |
$retour .= $evenemt_xhtml; |
$retour .= '</ul>'; |
} |
} |
} else { |
$lien_date= "<td class=\"".$class."\">".$day->thisDay(); |
if ($day->isSelected() ) { |
$evenements = $day->getEntry(); |
$id_fiches = array(); |
$info_fiches = null; |
while ($ligne_evenement = array_pop($evenements)) { |
$id_fiches[] = $ligne_evenement->bf_id_fiche; |
$info_fiches .= '⇒ '.str_replace('"', '\'', $ligne_evenement->bf_titre)."\n"; |
} |
$url->addQueryString('id_fiches', $id_fiches); |
$link = $url->getUrl(); |
$lien_date = '<td class="'.$class.'"><a href="'.$link.'" class="tooltip" title="'.$info_fiches.'">'.$day->thisDay()."</a>\n"; |
$url->removeQueryString('id_fiches'); |
} |
$retour .= $lien_date; |
} |
$retour.= ( "</td>\n" ); |
// isLast() to find end of week |
if ( $day->isLast() ) { |
$retour.= ( "</tr>\n" ); |
} |
} |
$retour.= "</tbody></table>"; |
} |
$retour.= '<script type="text/javascript">//<![CDATA['."\n".$script.'//]]></script>'."\n"; |
// Vue detail |
if ((isset($_GET['id_fiches']))) { |
// Ajout d'un titre pour la page avec la date |
$jours = array ('dimanche', 'lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi', 'samedi') ; |
$mois = array ('janvier', 'février', 'mars', 'avril', 'mai', 'juin', 'juillet', 'août', 'septembre', |
'octobre', 'novembre', 'décembre') ; |
$timestamp = strtotime ($_GET['y'].'/'.$_GET['m'].'/'.$_GET['d']) ; |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_NAVIGATION'] = ''; |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_TETE'] = ''; |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_CORPS'] = '<h1>'.$jours[date('w', $timestamp)]. |
' '.$_GET['d'].' '.$mois[$_GET['m']-1].' '.$_GET['y'].'</h1>' ; |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_CORPS'] .= baz_voir_fiches(0,$_GET['id_fiches'] ); |
$GLOBALS['_GEN_commun']['info_menu'] = ''; |
// Un lien pour retourner au calendrier |
$url->removeQueryString('id_fiches'); |
$url->removeQueryString('y'); |
$url->removeQueryString('m'); |
$url->removeQueryString('d'); |
$GLOBALS['_PAPYRUS_']['rendu']['CONTENU_PIED'] = '<div class="retour"><a href="'.$url->getURL().'">Retour au calendrier</a></div>'; |
} |
// Nettoyage de l'url |
$url->removeQueryString('id_fiches'); |
$url->removeQueryString('y'); |
$url->removeQueryString('m'); |
$url->removeQueryString('d'); |
return $retour; |
} |
?> |
/tags/2014_06_04/bibliotheque/elements/labelhtml.php |
---|
New file |
0,0 → 1,67 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: labelhtml.php,v 1.2 2008-09-17 14:18:12 alexandre_tb Exp $ |
/** |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.2 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
include_once PAP_CHEMIN_API_PEAR.'PEAR.php'; |
class Bazar_labelhtml extends PEAR { |
var $option = array(); |
function Bazar_labelhtml($options) { |
$this->options = $options; |
} |
function toHTML($valeur) { |
$html = ''; |
$val = $this->options['nom_bdd']; |
// On ecrit le label uniquement si le champs obligatoire est a 1 |
if ($this->options['obligatoire'] == 1) { |
$html .= '<div class="BAZ_label BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'">'. |
$this->options['label'].'</div>'."\n"; |
} |
return $html; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.1.2.1 2008-04-16 12:35:25 alexandre_tb |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2014_06_04/bibliotheque/elements/checkbox.php |
---|
New file |
0,0 → 1,85 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: checkbox.php,v 1.3 2008-11-19 09:28:46 aperonnet Exp $ |
/** |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.3 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
include_once PAP_CHEMIN_API_PEAR.'PEAR.php'; |
class Bazar_checkbox extends PEAR { |
var $option = array(); |
function Bazar_checkbox($options) { |
$this->options = $options; |
} |
function toHTML($valeur) { |
$html = ''; |
$val = $this->options['nom_bdd']; |
//pour les champs renseignes par une liste, on va chercher le label de la liste, plutot que l'id |
$requete = 'SELECT blv_label FROM bazar_fiche_valeur_liste, bazar_liste_valeurs WHERE bfvl_ce_fiche='. |
$GLOBALS['_BAZAR_']['id_fiche'].' AND bfvl_ce_liste='.$this->options['nom_bdd']. |
' AND bfvl_valeur=blv_valeur AND blv_ce_liste='.$this->options['nom_bdd']. |
' AND blv_ce_i18n="'.$GLOBALS['_BAZAR_']['langue'].'"'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError ($resultat)) { |
return ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
} |
$val='';$nb=0; |
while ($tab = $resultat->fetchRow()) { |
if ($nb>0) $val .= ', '; |
$val .= $tab[0]; |
$nb++; |
} |
if ($val != '' and $val != BAZ_CHOISIR and $val != BAZ_NON_PRECISE) { |
$html .= '<div class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'">'. |
"\n".'<span class="BAZ_label" id="rubrique_'.$this->options['nom_bdd'].'">'.$this->options['label'].' : </span>'."\n"; |
$html .= '<span class="BAZ_texte BAZ_texte_'.$GLOBALS['_BAZAR_']['class'].'" id="description_'.$this->options['nom_bdd']. |
'"> '.$val.'</span>'."\n".'</div>'."\n"; |
} |
return $html; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.2 2008-09-17 14:18:12 alexandre_tb |
* fusion avec aha |
* |
* Revision 1.1.2.1 2008-04-16 12:35:25 alexandre_tb |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2014_06_04/bibliotheque/elements/boutonsradio.php |
---|
New file |
0,0 → 1,69 |
<?php |
/** |
* PHP Version 5 |
* |
* @category PHP |
* @package bazar_bp |
* @author aurelien <aurelien@tela-botanica.org> |
* @copyright 2009 Tela-Botanica |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL |
* @version SVN: <svn_id> |
* @link /doc/bazar_bp/ |
*/ |
include_once PAP_CHEMIN_API_PEAR.'PEAR.php'; |
class Bazar_radio extends PEAR { |
var $option = array(); |
function Bazar_radio($options) { |
$this->options = $options; |
} |
function toHTML($valeur) { |
$html = ''; |
$val = $this->options['nom_bdd']; |
//pour les champs renseignes par une liste, on va chercher le label de la liste, plutot que l'id |
$requete = 'SELECT blv_label FROM bazar_fiche_valeur_liste, bazar_liste_valeurs WHERE bfvl_ce_fiche='. |
$GLOBALS['_BAZAR_']['id_fiche'].' AND bfvl_ce_liste='.$this->options['nom_bdd']. |
' AND bfvl_valeur=blv_valeur AND blv_ce_liste='.$this->options['nom_bdd']. |
' AND blv_ce_i18n="'.$GLOBALS['_BAZAR_']['langue'].'"'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError ($resultat)) { |
return ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
} |
$val='';$nb=0; |
while ($tab = $resultat->fetchRow()) { |
if ($nb>0) $val .= ', '; |
$val .= $tab[0]; |
$nb++; |
} |
if ($val != '' and $val != BAZ_CHOISIR and $val != BAZ_NON_PRECISE) { |
$html .= '<div class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'">'. |
"\n".'<span class="BAZ_label" id="rubrique_'.$this->options['nom_bdd'].'">'.$this->options['label'].' : </span>'."\n"; |
$html .= '<span class="BAZ_texte BAZ_texte_'.$GLOBALS['_BAZAR_']['class'].'" id="description_'.$this->options['nom_bdd']. |
'"> '.$val.'</span>'."\n".'</div>'."\n"; |
} |
return $html; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.2 2008-09-17 14:18:12 alexandre_tb |
* fusion avec aha |
* |
* Revision 1.1.2.1 2008-04-16 12:35:25 alexandre_tb |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
?> |
/tags/2014_06_04/bibliotheque/elements/listedatedeb.php |
---|
New file |
0,0 → 1,102 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: listedatedeb.php,v 1.3 2008-11-19 09:28:46 aperonnet Exp $ |
/** |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.3 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
include_once PAP_CHEMIN_API_PEAR.'PEAR.php'; |
class Bazar_listedatedeb extends PEAR { |
var $option = array(); |
function Bazar_listedatedeb($options) { |
$this->options = $options; |
} |
function toHTML($valeur) { |
$html = ''; |
$val = $this->options['nom_bdd']; |
if (!in_array($val, array ('bf_date_debut_validite_fiche', 'bf_date_fin_validite_fiche'))) { |
if ($valeur != '' && $valeur != '0000-00-00') { |
// Petit test pour afficher la date de debut et de fin d evenement |
if ($val == 'bf_date_debut_evenement' || $val == 'bf_date_fin_evenement') { |
if ($GLOBALS['_BAZAR_']['ligne_resultat']['bf_date_debut_evenement'] == $GLOBALS['_BAZAR_']['ligne_resultat']['bf_date_fin_evenement']) { |
if ($val == 'bf_date_debut_evenement') return; |
$html .= '<div class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'">'."\n". |
'<span class="BAZ_label" id="'.$this->options['nom_bdd'].'_rubrique">'.BAZ_LE.' : </span>'."\n"; |
$html .= '<span class="BAZ_texte BAZ_texte_'.$GLOBALS['_BAZAR_']['class'].'" id="'.$this->options['nom_bdd']. |
'_description"> '.strftime('%d.%m.%Y',strtotime($GLOBALS['_BAZAR_']['ligne_resultat']['bf_date_debut_evenement'])).'</span>'. |
"\n".'</div>'."\n"; |
continue; |
} else { |
if ($val == 'bf_date_debut_evenement') { |
$html .= '<div class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'">'."\n". |
'<span class="BAZ_label" id="'.$this->options['nom_bdd'].'_rubrique">'; |
$html .= BAZ_DU; |
$html .= '</span>'."\n".'<span class="BAZ_texte BAZ_texte_'.$GLOBALS['_BAZAR_']['class'].'" id="'. |
$this->options['nom_bdd'].'_description"> '.strftime('%d.%m.%Y',strtotime($valeur)).'</span>'."\n"; |
} else { |
$html .= '<span class="BAZ_label" id="'.$this->options['nom_bdd'].'_rubrique">'.BAZ_AU; |
$html .= '</span>'."\n".'<span class="BAZ_texte BAZ_texte_'.$GLOBALS['_BAZAR_']['class'].'" id="'. |
$this->options['nom_bdd'].'_description"> '.strftime('%d.%m.%Y',strtotime($valeur)). |
'</span>'."\n".'</div>'."\n"; |
} |
return $html; |
} |
} |
$html .= '<div class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'">'."\n". |
'<span class="BAZ_label" id="'.$this->options['nom_bdd'].'_rubrique">'.$this->options['label'].' : </span>'."\n"; |
$html .= '<span class="BAZ_texte BAZ_texte_'.$GLOBALS['_BAZAR_']['class'].'" id="'.$this->options['nom_bdd']. |
'_description"> '.strftime('%d.%m.%Y',strtotime($valeur)).'</span>'."\n".'</div>'."\n"; |
} |
} |
return $html; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.2 2008-09-17 14:18:12 alexandre_tb |
* fusion avec aha |
* |
* Revision 1.1.2.1 2008-04-16 12:35:25 alexandre_tb |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2014_06_04/bibliotheque/elements/texte.php |
---|
New file |
0,0 → 1,83 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: texte.php,v 1.4 2008-11-19 09:28:46 aperonnet Exp $ |
/** |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.4 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
include_once PAP_CHEMIN_API_PEAR.'PEAR.php'; |
class Bazar_texte extends PEAR { |
var $option = array(); |
function Bazar_texte($options) { |
$this->options = $options; |
} |
function toHTML($valeur) { |
if ($valeur == '') return ; |
$html = ''; |
$val = $this->options['nom_bdd']; |
//if (!in_array($val, array ('bf_titre', 'bf_description'))) { |
$html .= '<div class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'">'."\n". |
'<span class="BAZ_label" id="'.$this->options['nom_bdd'].'_rubrique">'.$this->options['label'].' : </span>'."\n"; |
$html .= '<span class="BAZ_texte BAZ_texte_'.$GLOBALS['_BAZAR_']['class'].'" id="'.$this->options['nom_bdd'].'_description"> '. |
nl2br($valeur).'</span>'."\n".'</div>'."\n"; |
//} |
return $html; |
} |
function toForm($valeur_defaut = '') { |
if ($valeur_defaut != '') $this->option['defaut'] = $valeur_defaut; |
$html = $this->options['label'].'<input type="text" size="'.$this->option['limite1']. |
'" maxlength="'.$this->option['limite2'].'" id="'.$this->option['nom_bdd']. |
'" value="'.$this->option['defaut'].'" />'; |
return $html; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.3 2008-10-29 10:36:44 alexandre_tb |
* l'element texte s affiche meme pour le titre et la description |
* |
* Revision 1.2 2008-09-17 14:18:12 alexandre_tb |
* fusion avec aha |
* |
* Revision 1.1.2.1 2008-04-16 12:35:25 alexandre_tb |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2014_06_04/bibliotheque/elements/textelong.php |
---|
New file |
0,0 → 1,73 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: textelong.php,v 1.4 2008-11-19 09:28:46 aperonnet Exp $ |
/** |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.4 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
include_once PAP_CHEMIN_API_PEAR.'PEAR.php'; |
class Bazar_textelong extends PEAR { |
var $option = array(); |
function Bazar_textelong($options) { |
$this->options = $options; |
} |
function toHTML($valeur) { |
$html = ''; |
$val = $this->options['nom_bdd']; |
//if (!in_array($val, array ('bf_titre', 'bf_description'))) { |
$html .= '<div class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'">'."\n". |
'<span class="BAZ_label" id="'.$this->options['nom_bdd'].'_rubrique">'.$this->options['label'].' : </span>'."\n"; |
$html .= '<span class="BAZ_texte BAZ_texte_'.$GLOBALS['_BAZAR_']['class'].'" id="'.$this->options['nom_bdd'].'_description"> '. |
nl2br($valeur).'</span>'."\n".'</div>'."\n"; |
//} |
return $html; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.3 2008-10-29 10:35:40 alexandre_tb |
* l'element textlong s affiche meme pour le titre et la description |
* |
* Revision 1.2 2008-09-17 14:18:12 alexandre_tb |
* fusion avec aha |
* |
* Revision 1.1.2.1 2008-04-16 12:35:25 alexandre_tb |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2014_06_04/bibliotheque/elements/carte_google.php |
---|
New file |
0,0 → 1,92 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: carte_google.php,v 1.2 2008-09-17 14:18:12 alexandre_tb Exp $ |
/** |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.2 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
include_once PAP_CHEMIN_API_PEAR.'PEAR.php'; |
class Bazar_carte_google extends PEAR { |
var $option = array(); |
function Bazar_carte_google($options) { |
$this->options = $options; |
} |
function toHTML($valeur) { |
if ($GLOBALS['pas_de_carte']) return; |
$html = ''; |
$val = $this->options['nom_bdd']; |
$script = ' |
// Variables globales |
var map = null; |
var geocoder = null; |
var lat = document.getElementById("latitude"); |
var lon = document.getElementById("longitude"); |
function load() { |
if (GBrowserIsCompatible()) { |
map = new GMap2(document.getElementById("map"), G_HYBRID_MAP); |
map.addControl(new GSmallMapControl()); |
map.addControl(new GMapTypeControl()); |
map.addControl(new GScaleControl()); |
map.enableContinuousZoom(); |
// On centre la carte sur le marqueur |
center = new GLatLng('.$GLOBALS['_BAZAR_']['ligne_resultat']['bf_latitude'].', '.$GLOBALS['_BAZAR_']['ligne_resultat']['bf_longitude'].'); |
map.setCenter(center, 7);map.setMapType(G_HYBRID_MAP); |
point = new GLatLng('.$GLOBALS['_BAZAR_']['ligne_resultat']['bf_latitude'].', '.$GLOBALS['_BAZAR_']['ligne_resultat']['bf_longitude'].'); |
marker = new GMarker(point, {draggable: true}); |
map.addOverlay(marker); |
} |
};' ; |
GEN_stockerCodeScript($script); |
GEN_stockerFichierScript('googleMapScript', $this->options['nom_bdd']); |
// On ajoute l attribut load a la balise body |
GEN_AttributsBody('onload', 'load()'); |
$html = '<div id="map" style="width: 400px; height: 300px"></div>'; |
return $html; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.1.2.1 2008-04-16 12:35:25 alexandre_tb |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2014_06_04/bibliotheque/elements/listedatefin.php |
---|
New file |
0,0 → 1,102 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: listedatefin.php,v 1.3 2008-11-19 09:28:46 aperonnet Exp $ |
/** |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.3 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
include_once PAP_CHEMIN_API_PEAR.'PEAR.php'; |
class Bazar_listedatefin extends PEAR { |
var $option = array(); |
function Bazar_listedatefin($options) { |
$this->options = $options; |
} |
function toHTML($valeur) { |
$html = ''; |
$val = $this->options['nom_bdd']; |
if (!in_array($val, array ('bf_date_debut_validite_fiche', 'bf_date_fin_validite_fiche'))) { |
if ($valeur != '' && $valeur != '0000-00-00') { |
// Petit test pour afficher la date de debut et de fin d evenement |
if ($val == 'bf_date_debut_evenement' || $val == 'bf_date_fin_evenement') { |
if ($GLOBALS['_BAZAR_']['ligne_resultat']['bf_date_debut_evenement'] == $GLOBALS['_BAZAR_']['ligne_resultat']['bf_date_fin_evenement']) { |
if ($val == 'bf_date_debut_evenement') continue; |
$html .= '<div class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'">'."\n". |
'<span class="BAZ_label" id="'.$this->options['nom_bdd'].'_rubrique">'.BAZ_LE.' : </span>'."\n"; |
$html .= '<span class="BAZ_texte BAZ_texte_'.$GLOBALS['_BAZAR_']['class'].'" id="'.$this->options['nom_bdd']. |
'_description"> '.strftime('%d.%m.%Y',strtotime($GLOBALS['_BAZAR_']['ligne_resultat']['bf_date_debut_evenement'])).'</span>'. |
"\n".'</div>'."\n"; |
return $html; |
} else { |
if ($val == 'bf_date_debut_evenement') { |
$html .= '<div class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'">'."\n". |
'<span class="BAZ_label" id="'.$this->options['nom_bdd'].'_rubrique">'; |
$html .= BAZ_DU; |
$html .= '</span>'."\n".'<span class="BAZ_texte BAZ_texte_'.$GLOBALS['_BAZAR_']['class'].'" id="'. |
$this->options['nom_bdd'].'_description"> '.strftime('%d.%m.%Y',strtotime($valeur)).'</span>'."\n"; |
} else { |
$html .= '<span class="BAZ_label" id="'.$this->options['nom_bdd'].'_rubrique">'.BAZ_AU; |
$html .= '</span>'."\n".'<span class="BAZ_texte BAZ_texte_'.$GLOBALS['_BAZAR_']['class'].'" id="'. |
$this->options['nom_bdd'].'_description"> '.strftime('%d.%m.%Y',strtotime($valeur)). |
'</span>'."\n".'</div>'."\n"; |
} |
return $html; |
} |
} |
$html .= '<div class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'">'."\n". |
'<span class="BAZ_label" id="'.$this->options['nom_bdd'].'_rubrique">'.$this->options['label'].' : </span>'."\n"; |
$html .= '<span class="BAZ_texte BAZ_texte_'.$GLOBALS['_BAZAR_']['class'].'" id="'.$this->options['nom_bdd']. |
'_description"> '.strftime('%d.%m.%Y',strtotime($valeur)).'</span>'."\n".'</div>'."\n"; |
} |
} |
return $html; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.2 2008-09-17 14:18:12 alexandre_tb |
* fusion avec aha |
* |
* Revision 1.1.2.1 2008-04-16 12:35:25 alexandre_tb |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2014_06_04/bibliotheque/elements/champs_mail.php |
---|
New file |
0,0 → 1,71 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: champs_mail.php,v 1.3 2008-11-19 09:28:46 aperonnet Exp $ |
/** |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.3 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
include_once PAP_CHEMIN_API_PEAR.'PEAR.php'; |
class Bazar_champs_mail extends PEAR { |
var $option = array(); |
function Bazar_champs_mail($options) { |
$this->options = $options; |
} |
function toHTML($valeur) { |
$html = ''; |
$val = $this->options['nom_bdd']; |
if (!in_array($val, array ('bf_titre', 'bf_description'))) { |
$html .= '<div class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'">'."\n". |
'<span class="BAZ_label" id="'.$this->options['nom_bdd'].'_rubrique">'.$this->options['label'].' :</span>'."\n"; |
$html .= '<span class="BAZ_texte BAZ_texte_'.$GLOBALS['_BAZAR_']['class'].'" id="'.$this->options['nom_bdd'].'_description"> '. |
'<a href="mailto:'.$valeur.'">'. |
nl2br($valeur).'</a></span>'."\n".'</div>'."\n"; |
} |
return $html; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.2 2008-09-17 14:18:12 alexandre_tb |
* fusion avec aha |
* |
* Revision 1.1.2.1 2008-04-16 12:35:25 alexandre_tb |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2014_06_04/bibliotheque/elements/liste.php |
---|
New file |
0,0 → 1,89 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: liste.php,v 1.3 2008-11-19 09:28:46 aperonnet Exp $ |
/** |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2008 |
*@version $Revision: 1.3 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// TODO : Semble inutilise cf ; formulaire.fonct.inc |
include_once PAP_CHEMIN_API_PEAR.'PEAR.php'; |
class Bazar_liste extends PEAR { |
var $option = array(); |
function Bazar_liste($options) { |
$this->options = $options; |
} |
function toHTML($valeur) { |
$html = ''; |
$val = $this->options['nom_bdd']; |
//pour les champs renseignes par une liste, on va chercher le label de la liste, plutot que l'id |
$requete = 'SELECT blv_label FROM bazar_fiche_valeur_liste, bazar_liste_valeurs WHERE bfvl_ce_fiche='. |
$GLOBALS['_BAZAR_']['id_fiche'].' AND bfvl_ce_liste='.$this->options['nom_bdd']. |
' AND bfvl_valeur=blv_valeur AND blv_ce_liste='.$this->options['nom_bdd']. |
' AND blv_ce_i18n="'.$GLOBALS['_BAZAR_']['langue'].'" ORDER by blv_valeur'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError ($resultat)) { |
return ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
} |
$val='';$nb=0; |
while ($tab = $resultat->fetchRow()) { |
if ($nb>0) $val .= ', '; |
$val .= $tab[0]; |
$nb++; |
} |
if ($val != '' and $val != BAZ_CHOISIR and $val != BAZ_NON_PRECISE) { |
$html .= '<div class="BAZ_rubrique BAZ_rubrique_'.$GLOBALS['_BAZAR_']['class'].'">'. |
"\n".'<span class="BAZ_label" id="rubrique_'.$this->options['nom_bdd'].'">'.$this->options['label'].' : </span>'."\n"; |
$html .= '<span class="BAZ_texte BAZ_texte_'.$GLOBALS['_BAZAR_']['class'].'" id="description_'.$this->options['nom_bdd']. |
'"> '.$val.'</span>'."\n".'</div>'."\n"; |
} |
return $html; |
} |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.2 2008-09-17 14:18:12 alexandre_tb |
* fusion avec aha |
* |
* Revision 1.1.2.1 2008-04-16 12:35:25 alexandre_tb |
* version initiale |
* |
* |
* +-- Fin du code ----------------------------------------------------------------------------------------+ |
*/ |
?> |
/tags/2014_06_04/bibliotheque/bazar.fonct.php |
---|
New file |
0,0 → 1,1878 |
<?php |
/*vim: set expandtab tabstop=4 shiftwidth=4: */ |
// +------------------------------------------------------------------------------------------------------+ |
// | PHP version 4.1 | |
// +------------------------------------------------------------------------------------------------------+ |
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org) | |
// +------------------------------------------------------------------------------------------------------+ |
// | This library is free software; you can redistribute it and/or | |
// | modify it under the terms of the GNU Lesser General Public | |
// | License as published by the Free Software Foundation; either | |
// | version 2.1 of the License, or (at your option) any later version. | |
// | | |
// | This library is distributed in the hope that it will be useful, | |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
// | Lesser General Public License for more details. | |
// | | |
// | You should have received a copy of the GNU Lesser General Public | |
// | 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: bazar.fonct.php,v 1.79 2008-10-29 10:41:48 alexandre_tb Exp $ |
/** |
* |
* Fonctions du module bazar |
* |
* |
*@package bazar |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.79 $ $Date: 2008-10-29 10:41:48 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
require_once PAP_CHEMIN_API_PEAR.'HTML/QuickForm.php' ; |
require_once PAP_CHEMIN_API_PEAR.'HTML/QuickForm/checkbox.php' ; |
require_once PAP_CHEMIN_API_PEAR.'HTML/QuickForm/textarea.php' ; |
require_once PAP_CHEMIN_API_PEAR.'HTML/Table.php' ; |
require_once GEN_CHEMIN_API.'formulaire/formulaire.fonct.inc.php'; |
require_once 'bazar.fonct.rss.php'; |
/** fiches_a_valider () - Renvoie les annonces restant a valider par un administrateur |
* |
* @return string HTML |
*/ |
function fiches_a_valider() { |
$utilisateur = new Administrateur_bazar($GLOBALS['AUTH']); |
// sortie anticipée en cas d'accès non autorisé |
// ceci limite l'accès au supers admins |
// TODO: voir si l'on ne pourrait afficher que les fiches |
// des catégories dont la personne est admin |
// des catégories dont la personne est admin, ce qui permettrait un accès plus fin |
if(!$utilisateur->isSuperAdmin()) { |
return; |
} |
// Pour les administrateurs d'une rubrique, on affiche les fiches a valider de cette rubrique |
// On effectue une requete sur le bazar pour voir les fiches a administrer |
$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_ADMIN); |
$res= '<h2>'.BAZ_ANNONCES_A_ADMINISTRER.'</h2><br />'."\n"; |
$requete = 'SELECT * FROM bazar_fiche, bazar_nature WHERE bf_statut_fiche=0 AND ' . |
'bn_id_nature=bf_ce_nature AND bn_ce_id_menu IN ('.$GLOBALS['_BAZAR_']['categorie_nature'].') ' ; |
if (isset($GLOBALS['_BAZAR_']['langue'])) { |
$requete .= ' and bn_ce_i18n like "'.$GLOBALS['_BAZAR_']['langue'].'%" '; |
} |
$requete .= 'ORDER BY bf_date_maj_fiche DESC' ; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ('Echec de la requete<br />'.$resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
} |
if ($resultat->numRows() != 0) { |
$tableAttr = array('id' => 'table_bazar') ; |
$table = new HTML_Table($tableAttr) ; |
$entete = array (BAZ_TITREANNONCE ,BAZ_ANNONCEUR, BAZ_TYPEANNONCE, BAZ_PUBLIER, BAZ_SUPPRIMER) ; |
$table->addRow($entete) ; |
$table->setRowType (0, 'th') ; |
// On affiche une ligne par proposition |
while ($ligne = $resultat->fetchRow (DB_FETCHMODE_ASSOC)) { |
//Requete pour trouver le nom et prenom de l'annonceur |
$requetenomprenom = 'SELECT '.BAZ_CHAMPS_PRENOM.', '.BAZ_CHAMPS_NOM.' FROM '.BAZ_ANNUAIRE. |
' WHERE '.BAZ_CHAMPS_ID.'='.$ligne['bf_ce_utilisateur'] ; |
$resultatnomprenom = $GLOBALS['_BAZAR_']['db']->query ($requetenomprenom) ; |
if (DB::isError($resultatnomprenom)) { |
echo ("Echec de la requete<br />".$resultatnomprenom->getMessage()."<br />".$resultatnomprenom->getDebugInfo()) ; |
} |
while ($lignenomprenom = $resultatnomprenom->fetchRow (DB_FETCHMODE_ASSOC)) { |
$annonceur=$lignenomprenom[BAZ_CHAMPS_PRENOM]." ".$lignenomprenom[BAZ_CHAMPS_NOM]; |
} |
$lien_voir=$GLOBALS['_BAZAR_']['url']; |
$lien_voir->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_FICHE); |
$lien_voir->addQueryString('id_fiche', $ligne['bf_id_fiche']); |
$lien_voir->addQueryString('typeannonce', $ligne['bn_id_nature']); |
// Nettoyage de l'url |
// NOTE (jpm - 23 mai 2007): pour �tre compatible avec PHP5 il faut utiliser tjrs $GLOBALS['_BAZAR_']['url'] car en php4 on |
// copie bien une variable mais pas en php5, cela reste une r�f�rence... |
$GLOBALS['_BAZAR_']['url']->removeQueryString('action'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce'); |
$GLOBALS['_BAZAR_']['url']->addQueryString('id_fiche', $ligne['bf_id_fiche']); |
$GLOBALS['_BAZAR_']['url']->addQueryString('typeannonce', $ligne['bn_id_nature']); |
$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_FICHE); |
$lien_voir = $GLOBALS['_BAZAR_']['url']->getURL(); |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_PUBLIER); |
$lien_publie_oui = $GLOBALS['_BAZAR_']['url']->getURL(); |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_PAS_PUBLIER); |
$lien_publie_non = $GLOBALS['_BAZAR_']['url']->getURL(); |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_SUPPRESSION); |
$lien_supprimer = $GLOBALS['_BAZAR_']['url']->getURL(); |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce'); |
$table->addRow (array( |
'<a href="'.$lien_voir.'">'.$ligne['bf_titre'].'</a>'."\n", // col 1 : le nom |
$annonceur."\n", // col 2 : annonceur |
$ligne['bn_label_nature']."\n", // col 3 : type annonce |
"<a href=\"".$lien_publie_oui."\">".BAZ_OUI."</a> / \n". |
"<a href=\"".$lien_publie_non."\">".BAZ_NON."</a>", // col 4 : publier ou pas |
"<a href=\"".$lien_supprimer."\"". |
" onclick=\"javascript:return confirm('".BAZ_CONFIRMATION_SUPPRESSION."');\">".BAZ_SUPPRIMER."</a>\n")) ; // col 5 : supprimer |
} |
$table->altRowAttributes(1, array("class" => "ligne_impaire"), array("class" => "ligne_paire")); |
$table->updateColAttributes(1, array("align" => "center")); |
$table->updateColAttributes(2, array("align" => "center")); |
$table->updateColAttributes(3, array("align" => "center")); |
$table->updateColAttributes(4, array("align" => "center")); |
$res .= $table->toHTML() ; |
} |
else { |
$res .= '<p class="zone_info">'.BAZ_PAS_DE_FICHE_A_VALIDER.'</p>'."\n" ; |
} |
$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_TOUTES_ANNONCES); |
//$res .= '<br /><ul style="clear:both;"><li><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'" title="'.BAZ_CONSULTER_FICHES_VALIDEES.'">'.BAZ_CONSULTER_FICHES_VALIDEES.'</a></li></ul>'; |
// Nettoyage de l'url |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce'); |
// Les autres fiches, deja validees |
$res .= '<h2>'.BAZ_TOUTES_LES_FICHES.'</h2>'."\n"; |
$requete = 'SELECT * FROM bazar_fiche, bazar_nature WHERE bf_statut_fiche=1 AND ' . |
'bn_id_nature=bf_ce_nature AND bn_ce_id_menu IN ('.$GLOBALS['_BAZAR_']['categorie_nature'].') '; |
if (isset($GLOBALS['_BAZAR_']['langue'])) { |
$requete .= ' and bn_ce_i18n like "'.$GLOBALS['_BAZAR_']['langue'].'%" '; |
} |
$requete .= 'ORDER BY bf_date_maj_fiche DESC' ; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ('Echec de la requete<br />'.$resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
} |
if ($resultat->numRows() != 0) { |
$tableAttr = array('id' => 'table_bazar') ; |
$table = new HTML_Table($tableAttr) ; |
$entete = array (BAZ_TITREANNONCE ,BAZ_ANNONCEUR, BAZ_TYPEANNONCE, BAZ_PUBLIER, BAZ_SUPPRIMER) ; |
$table->addRow($entete) ; |
$table->setRowType (0, 'th') ; |
// On affiche une ligne par proposition |
while ($ligne = $resultat->fetchRow (DB_FETCHMODE_ASSOC)) { |
//Requete pour trouver le nom et prenom de l'annonceur |
$requetenomprenom = 'SELECT '.BAZ_CHAMPS_PRENOM.', '.BAZ_CHAMPS_NOM.' FROM '.BAZ_ANNUAIRE. |
' WHERE '.BAZ_CHAMPS_ID.'='.$ligne['bf_ce_utilisateur'] ; |
$resultatnomprenom = $GLOBALS['_BAZAR_']['db']->query ($requetenomprenom) ; |
if (DB::isError($resultatnomprenom)) { |
echo ("Echec de la requete<br />".$resultatnomprenom->getMessage()."<br />".$resultatnomprenom->getDebugInfo()) ; |
} |
while ($lignenomprenom = $resultatnomprenom->fetchRow (DB_FETCHMODE_ASSOC)) { |
$annonceur=$lignenomprenom[BAZ_CHAMPS_PRENOM]." ".$lignenomprenom[BAZ_CHAMPS_NOM]; |
} |
$lien_voir=$GLOBALS['_BAZAR_']['url']; |
$lien_voir->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_FICHE); |
$lien_voir->addQueryString('id_fiche', $ligne['bf_id_fiche']); |
$lien_voir->addQueryString('typeannonce', $ligne['bn_id_nature']); |
// Nettoyage de l'url |
// NOTE (jpm - 23 mai 2007): pour �tre compatible avec PHP5 il faut utiliser tjrs $GLOBALS['_BAZAR_']['url'] car en php4 on |
// copie bien une variable mais pas en php5, cela reste une r�f�rence... |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce'); |
$GLOBALS['_BAZAR_']['url']->addQueryString('id_fiche', $ligne['bf_id_fiche']); |
$GLOBALS['_BAZAR_']['url']->addQueryString('typeannonce', $ligne['bn_id_nature']); |
$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_FICHE); |
$lien_voir = $GLOBALS['_BAZAR_']['url']->getURL(); |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_PUBLIER); |
$lien_publie_oui = $GLOBALS['_BAZAR_']['url']->getURL(); |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_PAS_PUBLIER); |
$lien_publie_non = $GLOBALS['_BAZAR_']['url']->getURL(); |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_SUPPRESSION); |
$lien_supprimer = $GLOBALS['_BAZAR_']['url']->getURL(); |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce'); |
$table->addRow (array( |
'<a href="'.$lien_voir.'">'.$ligne['bf_titre'].'</a>'."\n", // col 1 : le nom |
$annonceur."\n", // col 2 : annonceur |
$ligne['bn_label_nature']."\n", // col 3 : type annonce |
"<a href=\"".$lien_publie_oui."\">".BAZ_OUI."</a> / \n". |
"<a href=\"".$lien_publie_non."\">".BAZ_NON."</a>", // col 4 : publier ou pas |
"<a href=\"".$lien_supprimer."\"". |
" onclick=\"javascript:return confirm('".BAZ_CONFIRMATION_SUPPRESSION."');\">".BAZ_SUPPRIMER."</a>\n")) ; // col 5 : supprimer |
} |
$table->altRowAttributes(1, array("class" => "ligne_impaire"), array("class" => "ligne_paire")); |
$table->updateColAttributes(1, array("align" => "center")); |
$table->updateColAttributes(2, array("align" => "center")); |
$table->updateColAttributes(3, array("align" => "center")); |
$table->updateColAttributes(4, array("align" => "center")); |
$res .= $table->toHTML() ; |
} |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_VOIR); |
return $res; |
} |
/** mes_fiches () - Renvoie les fiches bazar d'un utilisateur |
* |
* @return string HTML |
*/ |
function mes_fiches() { |
$res= '<h2>'.BAZ_VOS_ANNONCES.'</h2><br />'."\n"; |
if ($GLOBALS['AUTH']->getAuth()) { |
// requete pour voir si l'utilisateur a des fiches a son nom, classees par date de MAJ et nature d'annonce |
$requete = 'SELECT * FROM bazar_fiche, bazar_nature WHERE bf_ce_utilisateur='. $GLOBALS['id_user']. |
' AND bn_id_nature=bf_ce_nature AND bn_ce_id_menu IN ('.$GLOBALS['_BAZAR_']['categorie_nature'].') '; |
if (isset($GLOBALS['_BAZAR_']['langue'])) $requete .= ' and bn_ce_i18n like "'.$GLOBALS['_BAZAR_']['langue'].'%" '; |
$requete .= ' ORDER BY bf_date_maj_fiche DESC,bf_ce_nature ASC'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ('Echec de la requete<br />'.$resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
} |
if ($resultat->numRows() != 0) { |
$tableAttr = array('id' => 'table_bazar') ; |
$table = new HTML_Table($tableAttr) ; |
$entete = array (BAZ_TITREANNONCE , BAZ_TYPEANNONCE, BAZ_ETATPUBLICATION, BAZ_MODIFIER, BAZ_SUPPRIMER, 'Dupliquer') ; |
$table->addRow($entete) ; |
$table->setRowType (0, "th") ; |
// On affiche une ligne par proposition |
while ($ligne = $resultat->fetchRow (DB_FETCHMODE_ASSOC)) { |
if ($ligne['bf_statut_fiche']==1) $publiee=BAZ_PUBLIEE; |
elseif ($ligne['bf_statut_fiche']==0) $publiee=BAZ_ENCOURSDEVALIDATION; |
else $publiee=BAZ_REJETEE; |
$lien_voir = $GLOBALS['_BAZAR_']['url']; |
$lien_voir->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_FICHE); |
$lien_voir->addQueryString('id_fiche', $ligne['bf_id_fiche']); |
$lien_voir->addQueryString('typeannonce', $ligne['bn_id_nature']); |
$lien_voir_url=$lien_voir->getURL(); |
$lien_modifier = $GLOBALS['_BAZAR_']['url']; |
$lien_modifier->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_MODIFIER); |
$lien_modifier->addQueryString('id_fiche', $ligne['bf_id_fiche']); |
$lien_modifier->addQueryString('typeannonce', $ligne['bn_id_nature']); |
$lien_modifier_url=$lien_modifier->getURL(); |
$lien_supprimer = $GLOBALS['_BAZAR_']['url']; |
$lien_supprimer->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_SUPPRESSION); |
$lien_supprimer->addQueryString('id_fiche', $ligne['bf_id_fiche']); |
$lien_supprimer->addQueryString('typeannonce', $ligne['bn_id_nature']); |
$lien_supprimer_url=$lien_supprimer->getURL(); |
$lien_dupliquer = $GLOBALS['_BAZAR_']['url']; |
$lien_dupliquer->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_NOUVEAU); |
$lien_dupliquer->addQueryString(BAZ_VARIABLE_ID_FICHE, $ligne['bf_id_fiche']); |
$lien_dupliquer->addQueryString(BAZ_VARIABLE_DUPLICATION, 1); |
$lien_dupliquer=$lien_dupliquer->getURL(); |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_DUPLICATION); |
$table->addRow (array( |
'<a href="'.$lien_voir_url.'">'.$ligne['bf_titre'].'</a>'."\n", // col 1 : le nom |
$ligne['bn_label_nature']."\n", // col 2: type annonce |
$publiee."\n", // col 3 : publiee ou non |
'<a href="'.$lien_modifier_url.'">'.BAZ_MODIFIER.'</a>'."\n", // col 4 : modifier |
'<a href="'.$lien_supprimer_url.'" onclick="javascript:return '. |
'confirm(\''.BAZ_CONFIRMATION_SUPPRESSION.'\');" >'.BAZ_SUPPRIMER.'</a>'."\n", // col 5 : supprimer |
'<a href="'.$lien_dupliquer.'">Dupliquer</a>'."\n")) ; |
} |
$table->altRowAttributes(1, array("class" => "ligne_impaire"), array("class" => "ligne_paire")); |
$table->updateColAttributes(1, array("align" => "left")); |
$table->updateColAttributes(2, array("align" => "center")); |
$table->updateColAttributes(3, array("align" => "center")); |
$table->updateColAttributes(4, array("align" => "center")); |
$res .= $table->toHTML() ; |
} |
else { |
$res .= '<p class="zone_info">'.BAZ_PAS_DE_FICHE.'</p>'."\n" ; |
} |
$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_SAISIR); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('typeannonce'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
$res .= '<br /><ul id="liste_liens"><li id="lien_saisir"><a href="'.$GLOBALS['_BAZAR_']['url']->getURL().'" title="'.BAZ_SAISIR_UNE_NOUVELLE_FICHE.'">'.BAZ_SAISIR_UNE_NOUVELLE_FICHE.'</a></li></ul>'; |
} |
else { |
include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php'; |
$modele = new bazarTemplate($GLOBALS['_BAZAR_']['db']); |
$res .= $modele->getTemplate(BAZ_TEMPLATE_MESSAGE_LOGIN, $GLOBALS['_BAZAR_']['langue'], $GLOBALS['_BAZAR_']['categorie_nature']); |
} |
return $res; |
} |
/** baz_gestion_droits() interface de gestion des droits |
* |
* return string le code HTML |
*/ |
function baz_gestion_droits() { |
$lien_formulaire=$GLOBALS['_BAZAR_']['url']; |
$lien_formulaire->addQueryString(BAZ_VARIABLE_ACTION, BAZ_GERER_DROITS); |
//contruction du squelette du formulaire |
$formtemplate = new HTML_QuickForm('formulaire', 'post', preg_replace ('/&/', '&', $lien_formulaire->getURL()) ); |
$squelette =& $formtemplate->defaultRenderer(); |
$squelette->setFormTemplate("\n".'<form {attributes}>'."\n".'<table style="border:0;">'."\n".'{content}'."\n".'</table>'."\n".'</form>'."\n"); |
$squelette->setElementTemplate( '<tr>'."\n".'<td style="font-size:12px;width:150px;text-align:right;">'."\n".'{label} :</td>'."\n".'<td style="text-align:left;padding:5px;"> '."\n".'{element}'."\n". |
'<!-- BEGIN required --><span class="symbole_obligatoire">*</span><!-- END required -->'."\n". |
'<!-- BEGIN error --><span class="erreur">{error}</span><!-- END error -->'."\n". |
'</td>'."\n".'</tr>'."\n"); |
$squelette->setElementTemplate( '<tr>'."\n".'<td colspan="2" class="liste_a_cocher"><strong>{label} {element}</strong>'."\n". |
'<!-- BEGIN required --><span class="symbole_obligatoire"> *</span><!-- END required -->'."\n".'</td>'."\n".'</tr>'."\n", 'accept_condition'); |
$squelette->setElementTemplate( '<tr><td colspan="2" class="bouton">{label}{element}</td></tr>'."\n", 'valider'); |
$squelette->setRequiredNoteTemplate("\n".'<tr>'."\n".'<td colspan="2" class="symbole_obligatoire">* {requiredNote}</td></tr>'."\n"); |
//Traduction de champs requis |
$formtemplate->setRequiredNote(BAZ_CHAMPS_REQUIS) ; |
$formtemplate->setJsWarnings(BAZ_ERREUR_SAISIE,BAZ_VEUILLEZ_CORRIGER); |
//Initialisation de la variable personne |
if ( isset($_POST['personnes']) ) { |
$personne=$_POST['personnes']; |
} |
else $personne=0; |
//Cas ou les droits ont etes changes |
if (isset($_GET['pers'])) { |
$personne=$_GET['pers']; |
//CAS DES DROITS POUR UN TYPE D'ANNONCE: On efface tous les droits de la personne pour ce type d'annonce |
if (isset($_GET['idtypeannonce'])) { |
$requete = 'DELETE FROM bazar_droits WHERE bd_id_utilisateur='.$_GET['pers']. |
' AND bd_id_nature_offre='.$_GET['idtypeannonce']; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
} |
//CAS DU SUPER ADMIN: On efface tous les droits de la personne en general |
else { |
$requete = 'DELETE FROM bazar_droits WHERE bd_id_utilisateur='.$_GET['pers']; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
} |
if ($_GET['droits']=='superadmin') { |
$requete = 'INSERT INTO bazar_droits VALUES ('.$_GET['pers'].',0,0)'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
} |
elseif ($_GET['droits']=='redacteur') { |
$requete = 'INSERT INTO bazar_droits VALUES ('.$_GET['pers'].','.$_GET['idtypeannonce'].',1)'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
} |
elseif ($_GET['droits']=='admin') { |
$requete = 'INSERT INTO bazar_droits VALUES ('.$_GET['pers'].','.$_GET['idtypeannonce'].',2)'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
} |
} |
//requete pour obtenir l'id, le nom et prenom des personnes inscrites a l'annuaire sauf soi meme |
$requete = 'SELECT '.BAZ_CHAMPS_ID.', '.BAZ_CHAMPS_NOM.', '.BAZ_CHAMPS_PRENOM.' FROM '.BAZ_ANNUAIRE. |
' WHERE '.BAZ_CHAMPS_ID." != ".$GLOBALS['id_user'].' ORDER BY '.BAZ_CHAMPS_NOM.' ASC'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
echo ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
$res='<h2>'.BAZ_GESTION_DES_DROITS.'</h2><br />'."\n"; |
$res.=BAZ_DESCRIPTION_GESTION_DES_DROITS.'<br /><br />'."\n"; |
$personnes_select[0]=BAZ_SELECTION; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$personnes_select[$ligne[BAZ_CHAMPS_ID]] = $ligne[BAZ_CHAMPS_NOM]." ".$ligne[BAZ_CHAMPS_PRENOM] ; |
} |
$java=array ('style'=>'width:250px;','onchange'=>'this.form.submit();'); |
$formtemplate->addElement ('select', 'personnes', BAZ_LABEL_CHOIX_PERSONNE, $personnes_select, $java) ; |
$defauts=array ('personnes'=>$personne); |
$formtemplate->setDefaults($defauts); |
$res.= $formtemplate->toHTML().'<br />'."\n" ; |
if ($personne!=0) { |
//cas du super utilisateur |
$utilisateur = new Utilisateur_bazar($personne) ; |
if ($utilisateur->isSuperAdmin()) { |
$res.= '<br />'.BAZ_EST_SUPERADMINISTRATEUR.'<br /><br />'."\n"; |
$lien_enlever_superadmin=$GLOBALS['_BAZAR_']['url']; |
$lien_enlever_superadmin->addQueryString(BAZ_VARIABLE_ACTION, BAZ_GERER_DROITS); |
$lien_enlever_superadmin->addQueryString('pers', $personne); |
$lien_enlever_superadmin->addQueryString('droits', 'aucun'); |
$res.= '<a href='.$lien_enlever_superadmin->getURL().'>'.BAZ_CHANGER_SUPERADMINISTRATEUR.'</a><br />'."\n"; |
} |
else { |
$lien_passer_superadmin=$GLOBALS['_BAZAR_']['url']; |
$lien_passer_superadmin->addQueryString(BAZ_VARIABLE_ACTION, BAZ_GERER_DROITS); |
$lien_passer_superadmin->addQueryString('pers', $personne); |
$lien_passer_superadmin->addQueryString('droits', 'superadmin'); |
$res.= '<a href='.$lien_passer_superadmin->getURL().'>'.BAZ_PASSER_SUPERADMINISTRATEUR.'</a><br />'."\n"; |
//on cherche les differentes rubriques d'annonces |
$requete = 'SELECT bn_id_nature, bn_label_nature, bn_image_titre FROM bazar_nature'; |
if (isset($GLOBALS['_BAZAR_']['langue'])) $requete .= ' where bn_ce_i18n like "'.$GLOBALS['_BAZAR_']['langue'].'%"'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
$res.='<br /><b>'.BAZ_DROITS_PAR_TYPE.'</b><br /><br />'; |
$table = new HTML_Table(array ('width' => '100%', 'class' => 'table_bazar')) ; |
$table->addRow(array ('<strong>'.BAZ_TYPE_ANNONCES.'</strong>', |
'<strong>'.BAZ_DROITS_ACTUELS.'</strong>', |
'<strong>'.BAZ_PASSER_EN.'</strong>', |
'<strong>'.BAZ_OU_PASSER_EN.'</strong>')) ; |
$table->setRowType (0, 'th') ; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$lien_aucun_droit=$GLOBALS['_BAZAR_']['url']; |
$lien_aucun_droit->addQueryString(BAZ_VARIABLE_ACTION, BAZ_GERER_DROITS); |
$lien_aucun_droit->addQueryString('pers', $personne); |
$lien_aucun_droit->addQueryString('droits', 'aucun'); |
$lien_aucun_droit->addQueryString('idtypeannonce', $ligne["bn_id_nature"]); |
$lien_passer_redacteur=$GLOBALS['_BAZAR_']['url']; |
$lien_passer_redacteur->addQueryString(BAZ_VARIABLE_ACTION, BAZ_GERER_DROITS); |
$lien_passer_redacteur->addQueryString('pers', $personne); |
$lien_passer_redacteur->addQueryString('droits', 'redacteur'); |
$lien_passer_redacteur->addQueryString('idtypeannonce', $ligne["bn_id_nature"]); |
$lien_passer_admin=$GLOBALS['_BAZAR_']['url']; |
$lien_passer_admin->addQueryString(BAZ_VARIABLE_ACTION, BAZ_GERER_DROITS); |
$lien_passer_admin->addQueryString('pers', $personne); |
$lien_passer_admin->addQueryString('droits', 'admin'); |
$lien_passer_admin->addQueryString('idtypeannonce', $ligne["bn_id_nature"]); |
if (isset($ligne['bn_image_titre'])) { |
$titre=' <img src="client/bazar/images/'.$ligne['bn_image_titre'].'" alt="'.$ligne['bn_label_nature'].'" />'."\n"; |
} else { |
$titre='<strong> '.$ligne['bn_label_nature'].'</strong>'."\n"; |
} |
if ($utilisateur->isAdmin($ligne['bn_id_nature'])) { |
$table->addRow(array($titre, |
BAZ_DROIT_ADMIN, |
'<a href='.$lien_aucun_droit->getURL().'>'.BAZ_AUCUN_DROIT.'</a>', |
'<a href='.$lien_passer_redacteur->getURL().'>'.BAZ_LABEL_REDACTEUR.'</a>')); |
} |
elseif ($utilisateur->isRedacteur($ligne['bn_id_nature'])) { |
$table->addRow(array($titre, |
BAZ_LABEL_REDACTEUR, |
'<a href='.$lien_aucun_droit->getURL().'>'.BAZ_AUCUN_DROIT.'</a>', |
'<a href='.$lien_passer_admin->getURL().'>'.BAZ_DROIT_ADMIN.'</a>')); |
} |
else { |
$table->addRow(array($titre, |
BAZ_AUCUN_DROIT, |
'<a href='.$lien_passer_redacteur->getURL().'>'.BAZ_LABEL_REDACTEUR.'</a>', |
'<a href='.$lien_passer_admin->getURL().'>'.BAZ_DROIT_ADMIN.'</a>')); |
} |
} |
$table->altRowAttributes(1, array('class' => 'ligne_impaire'), array('class' => 'ligne_paire')); |
$table->updateColAttributes(0, array('align' => 'left')); |
$table->updateColAttributes(1, array('align' => 'left')); |
$table->updateColAttributes(2, array('align' => 'left')); |
$table->updateColAttributes(3, array('align' => 'left')); |
$res.=$table->toHTML() ; |
} |
} |
// Nettoyage de l'url |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('pers'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('droits'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('idtypeannonce'); |
return $res; |
} |
/** baz_formulaire() - Renvoie le menu pour les saisies et modification des annonces |
* |
* @param string choix du formulaire a afficher (soit formulaire personnalise de |
* l'annonce, soit choix du type d'annonce) |
* |
* @return string HTML |
*/ |
function baz_formulaire($mode) { |
$res = ''; |
if ($GLOBALS['AUTH']->getAuth()) { |
$lien_formulaire=$GLOBALS['_BAZAR_']['url']; |
//Definir le lien du formulaire en fonction du mode de formulaire choisi |
if ($mode == BAZ_DEPOSER_ANNONCE) { |
$lien_formulaire->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_NOUVEAU); |
if (isset($GLOBALS['_BAZAR_']['id_typeannonce']) && $GLOBALS['_BAZAR_']['id_typeannonce'] != 'toutes') { |
$mode = BAZ_ACTION_NOUVEAU ; |
} |
} |
if ($mode == BAZ_ACTION_NOUVEAU) { |
if ((!isset($_POST['accept_condition']))and($GLOBALS['_BAZAR_']['condition']!=NULL)) { |
$lien_formulaire->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_NOUVEAU); |
} else { |
$lien_formulaire->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_NOUVEAU_V); |
} |
} |
if ($mode == BAZ_ACTION_MODIFIER) { |
if (!isset($_POST['accept_condition'])and($GLOBALS['_BAZAR_']['condition']!=NULL)) { |
$lien_formulaire->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_MODIFIER); |
} else { |
$lien_formulaire->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_MODIFIER_V); |
if (isset ($_SESSION['_BAZAR_']['fichier'])) unset($_SESSION['_BAZAR_']['fichier']) ; |
if (isset ($_SESSION['_BAZAR_']['image'])) unset($_SESSION['_BAZAR_']['image']); |
if (isset ($_SESSION['_BAZAR_']['lien'])) unset($_SESSION['_BAZAR_']['lien']); |
} |
$lien_formulaire->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']); |
} |
if ($mode == BAZ_ACTION_MODIFIER_V) { |
$lien_formulaire->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_MODIFIER_V); |
$lien_formulaire->addQueryString('id_fiche', $GLOBALS['_BAZAR_']['id_fiche']); |
} |
//contruction du squelette du formulaire |
$formtemplate = new HTML_QuickForm('formulaire', 'post', preg_replace ('/&/', '&', $lien_formulaire->getURL()) ); |
$squelette =& $formtemplate->defaultRenderer(); |
$squelette->setFormTemplate("\n".'<form {attributes}>'."\n".'<table style="border:0;width:100%;">'."\n".'{content}'."\n".'</table>'."\n".'</form>'."\n"); |
$squelette->setElementTemplate( '<tr>'."\n".'<td>'."\n".'{label}'. |
'<!-- BEGIN required --><span class="symbole_obligatoire"> *</span><!-- END required -->'."\n". |
' </td>'."\n".'<td style="text-align:left;padding:5px;"> '."\n".'{element}'."\n". |
'<!-- BEGIN error --><span class="erreur">{error}</span><!-- END error -->'."\n". |
'</td>'."\n".'</tr>'."\n"); |
$squelette->setElementTemplate( '<tr>'."\n".'<td colspan="2" class="liste_a_cocher"><strong>{label} {element}</strong>'."\n". |
'<!-- BEGIN required --><span class="symbole_obligatoire"> *</span><!-- END required -->'."\n".'</td>'."\n".'</tr>'."\n", 'accept_condition'); |
$squelette->setElementTemplate( '<tr><td colspan="2" class="bouton">{label}{element}</td></tr>'."\n", 'valider'); |
$squelette->setRequiredNoteTemplate("\n".'<tr>'."\n".'<td colspan="2" class="symbole_obligatoire">* {requiredNote}</td></tr>'."\n"); |
//Traduction de champs requis |
$formtemplate->setRequiredNote(BAZ_CHAMPS_REQUIS) ; |
$formtemplate->setJsWarnings(BAZ_ERREUR_SAISIE,BAZ_VEUILLEZ_CORRIGER); |
//------------------------------------------------------------------------------------------------ |
//AFFICHAGE DU FORMULAIRE GENERAL DE CHOIX DU TYPE D'ANNONCE |
//------------------------------------------------------------------------------------------------ |
if ($mode == BAZ_DEPOSER_ANNONCE) { |
$res = ''; |
//requete pour obtenir le nom et la description des types d'annonce |
$requete = 'SELECT * FROM bazar_nature WHERE bn_ce_id_menu IN ('.$GLOBALS['_BAZAR_']['categorie_nature'].') '; |
if (isset($GLOBALS['_BAZAR_']['langue'])) { |
$requete .= ' and bn_ce_i18n like "'.$GLOBALS['_BAZAR_']['langue'].'%" '; |
} |
$requete .= 'ORDER BY bn_label_nature ASC'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
return ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
//$res.='<h2>'.BAZ_DEPOSE_UNE_NOUVELLE_ANNONCE.'</h2>'."\n"; |
include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php'; |
$modele = new bazarTemplate($GLOBALS['_BAZAR_']['db']); |
$res .= $modele->getTemplate(BAZ_TEMPLATE_FORMULAIRE_ACCUEIL, $GLOBALS['_BAZAR_']['langue'], $GLOBALS['_BAZAR_']['categorie_nature']); |
if ($resultat->numRows()==1) { |
$ligne = $resultat->fetchRow (DB_FETCHMODE_ASSOC); |
$GLOBALS['_BAZAR_']['id_typeannonce']=$ligne['bn_id_nature']; |
$GLOBALS['_BAZAR_']['typeannonce']=$ligne['bn_label_nature']; |
$GLOBALS['_BAZAR_']['condition']=$ligne['bn_condition']; |
$GLOBALS['_BAZAR_']['template']=$ligne['bn_template']; |
$GLOBALS['_BAZAR_']['commentaire']=$ligne['bn_commentaire']; |
$GLOBALS['_BAZAR_']['appropriation']=$ligne['bn_appropriation']; |
$GLOBALS['_BAZAR_']['image_titre']=$ligne['bn_image_titre']; |
$GLOBALS['_BAZAR_']['image_logo']=$ligne['bn_image_logo']; |
$mode = BAZ_ACTION_NOUVEAU; |
$lien_formulaire->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_NOUVEAU_V); |
} else { |
//$res.='<br />'.BAZ_CHOIX_TYPEANNONCE.'<br /><br />'."\n"; |
while ($ligne = $resultat->fetchRow (DB_FETCHMODE_ASSOC)) { |
$utilisateur = new Administrateur_bazar($GLOBALS['AUTH']); |
if (($utilisateur->isRedacteur($ligne['bn_id_nature'])) || ($utilisateur->isAdmin($ligne['bn_id_nature'])) |
|| ($utilisateur->isSuperAdmin() || !BAZ_RESTREINDRE_DEPOT)) { |
if ($ligne['bn_image_titre']!='') { |
$titre=' <img src="client/bazar/images/'.$ligne['bn_image_titre'].'" alt="'. |
$ligne['bn_label_nature'].'" />'.'<br />'."\n"; |
} else { |
$titre='<h3>'.$ligne['bn_label_nature'].' : </h3>'."\n"; |
} |
$formtemplate->addElement('radio', 'typeannonce', '', |
$titre.$ligne['bn_description'].'<br /><br />'."\n", |
$ligne['bn_id_nature'], array("id" => 'select'.$ligne['bn_id_nature'], |
"style" => 'float:left;')); |
$formtemplate->addRule('typeannonce', 'Il faut choisir un type de fiche', 'required', '', 'client') ; |
} |
} |
$squelette->setElementTemplate( '<div class="listechoix">'."\n".'{element}'."\n".'</div>'."\n"); |
//Mettre les annonces en choix par defaut |
$formtemplate->setdefaults(array('typeannonce'=>'1')); |
// Bouton d annulation |
$lien_formulaire->removeQueryString('action'); |
$buttons[] = &HTML_QuickForm::createElement('link', 'annuler', BAZ_ANNULER, |
preg_replace ("/&/", "&", $lien_formulaire->getURL()), BAZ_ANNULER); // Le preg_replace contourne un pb de QuickForm et Net_URL |
// ce qui fait �chouer le lien |
//Bouton de validation du formulaire |
$buttons[] = &HTML_QuickForm::createElement('submit', 'valider', BAZ_VALIDER); |
$formtemplate->addGroup($buttons, null, null, ' '); |
//Affichage a l'ecran |
$res.= $formtemplate->toHTML()."\n"; |
} |
} |
//------------------------------------------------------------------------------------------------ |
//AFFICHAGE DU FORMULAIRE CORRESPONDANT AU TYPE DE L'ANNONCE CHOISI PAR L'UTILISATEUR |
//------------------------------------------------------------------------------------------------ |
if ($mode == BAZ_ACTION_NOUVEAU) { |
$utilisateur = new Administrateur_bazar($GLOBALS['AUTH']); |
if ($utilisateur->isRedacteur($GLOBALS['_BAZAR_']['id_typeannonce']) || |
$utilisateur->isAdmin($GLOBALS['_BAZAR_']['id_typeannonce'])|| |
$utilisateur->isSuperAdmin()) { |
$lien_formulaire->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_NOUVEAU_V); |
$formtemplate->updateAttributes(array('action' => str_replace('&', '&', $lien_formulaire->getURL()))); |
// Appel du modele |
include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php'; |
$modele = new bazarTemplate($GLOBALS['_BAZAR_']['db']); |
$html = $modele->getTemplate(BAZ_TEMPLATE_FORMULAIRE, $GLOBALS['_BAZAR_']['langue'],$GLOBALS['_BAZAR_']['categorie_nature']); |
if (!PEAR::isError($html)) { |
if (isset($_GET[BAZ_VARIABLE_DUPLICATION])) { |
$res = str_replace ('{FORMULAIRE}', baz_afficher_formulaire_annonce('duplication',$formtemplate), $html); |
} else { |
$res = str_replace ('{FORMULAIRE}', baz_afficher_formulaire_annonce('insertion',$formtemplate), $html); |
} |
} else { |
if (isset($_GET[BAZ_VARIABLE_DUPLICATION])) { |
$res = baz_afficher_formulaire_annonce('duplication',$formtemplate); |
} else { |
$res = baz_afficher_formulaire_annonce('insertion',$formtemplate); |
} |
} |
} else { |
// Pas de droit pour deposer un annonce |
return '<div>Pas de droits suffisants</div>'; |
} |
} |
//------------------------------------------------------------------------------------------------ |
//CAS DE LA MODIFICATION D'UNE ANNONCE (FORMULAIRE DE MODIFICATION) |
//------------------------------------------------------------------------------------------------ |
if ($mode == BAZ_ACTION_MODIFIER) { |
$res=baz_afficher_formulaire_annonce('modification',$formtemplate); |
} |
// Nettoyage de l'url avant les return : apparement inutile sinon pose pb (url applette deconnexion et moteur de recherche) [jpm le 17 mars 2008] |
//$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
//$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche'); |
//------------------------------------------------------------------------------------------------ |
//CAS DE L'INSCRIPTION D'UNE ANNONCE |
//------------------------------------------------------------------------------------------------ |
if ($mode == BAZ_ACTION_NOUVEAU_V) { |
if ($formtemplate->validate() && !isset($_SESSION['formulaire_annonce_valide'])) { |
//$formtemplate->process('baz_insertion', false) ; |
$id_fiche = baz_insertion ($formtemplate->getSubmitValues()); |
// Redirection vers mes_fiches pour eviter la revalidation du formulaire |
$GLOBALS['_BAZAR_']['url']->addQueryString (BAZ_VARIABLE_ACTION, BAZ_ACTION_POST_VALIDATION); |
$GLOBALS['_BAZAR_']['url']->addQueryString (BAZ_VARIABLE_ID_FICHE, $id_fiche); |
return baz_post_validation(); |
} |
} |
//------------------------------------------------------------------------------------------------ |
//CAS DE LA MODIFICATION D'UNE ANNONCE (VALIDATION ET MAJ) |
//------------------------------------------------------------------------------------------------ |
if ($mode == BAZ_ACTION_MODIFIER_V) { |
if ($formtemplate->validate()) { |
$formtemplate->process('baz_mise_a_jour', false) ; |
// Redirection vers mes_fiches pour eviter la revalidation du formulaire |
$GLOBALS['_BAZAR_']['url']->addQueryString (BAZ_VARIABLE_VOIR, BAZ_VOIR_MES_FICHES); |
header ('Location: '.str_replace ('&', '&', $GLOBALS['_BAZAR_']['url']->getURL())) ; |
exit(); |
} |
} |
} else { |
include_once BAZ_CHEMIN_APPLI.'bibliotheque/bazarTemplate.class.php'; |
$modele = new bazarTemplate($GLOBALS['_BAZAR_']['db']); |
$res .= $modele->getTemplate(BAZ_TEMPLATE_MESSAGE_LOGIN, $GLOBALS['_BAZAR_']['langue'], $GLOBALS['_BAZAR_']['categorie_nature']); |
} |
return $res; |
} |
/** baz_afficher_formulaire_annonce() - Genere le formulaire de saisie d'une annonce |
* |
* @param string type de formulaire: insertion ou modification |
* @param mixed objet quickform du formulaire |
* |
* @return string code HTML avec formulaire |
*/ |
function baz_afficher_formulaire_annonce($mode='insertion',$formtemplate) { |
if ($mode=='modification' || $mode == 'duplication') { |
//initialisation de la variable globale id_fiche |
$GLOBALS['_BAZAR_']['id_fiche'] = $_REQUEST[BAZ_VARIABLE_ID_FICHE]; |
//suppression eventuelle d'une url, d'un fichier ou d'une image |
if (isset($_GET['id_url'])) { |
baz_suppression_url($_GET['id_url']); |
} |
if (isset($_GET['id_fichier'])) { |
baz_suppression_fichier($_GET['id_fichier']); |
} |
if (isset($_GET['image'])) { |
baz_suppression_image($GLOBALS['_BAZAR_']['id_fiche']); |
} |
} |
$res = ''; |
//titre de la rubrique |
if (!BAZ_UTILISE_TEMPLATE) $res= '<h2>'.BAZ_TITRE_SAISIE_ANNONCE.' '.$GLOBALS['_BAZAR_']['typeannonce'].'</h2><br />'."\n"; |
if (($GLOBALS['_BAZAR_']['condition']!='')AND(!isset($_POST['accept_condition']))AND(!isset($_GET['url'])OR(!isset($_GET['fichier']))OR(!isset($_GET['image'])))) { |
require_once PAP_CHEMIN_API_PEAR.'HTML/QuickForm/html.php'; |
$conditions= new HTML_QuickForm_html('<tr><td colspan="2" style="padding:5px; margin:5px; width: 90%; background: #C1CBA7;">'.$GLOBALS['_BAZAR_']['condition'].'</td>'."\n".'</tr>'."\n"); |
$formtemplate->addElement($conditions); |
$formtemplate->addElement('checkbox', 'accept_condition',BAZ_ACCEPTE_CONDITIONS) ; |
$formtemplate->addElement('hidden', 'typeannonce', $GLOBALS['_BAZAR_']['id_typeannonce']); |
$formtemplate->addRule('accept_condition', BAZ_ACCEPTE_CONDITIONS_REQUIS, 'required', '', 'client') ; |
$formtemplate->addElement('submit', 'valider', BAZ_VALIDER); |
} |
//affichage du formulaire si conditions acceptees |
else { |
//Parcours du fichier de templates, pour mettre les valeurs des champs |
$tableau=baz_valeurs_template($GLOBALS['_BAZAR_']['template']); |
if ($mode=='modification' || $mode == 'duplication') { |
//Ajout des valeurs par defaut |
$valeurs_par_defaut = baz_valeurs_fiche($GLOBALS['_BAZAR_']['id_fiche']) ; |
for ($i=0; $i<count($tableau); $i++) { |
if (isset($ligne[$tableau[$i]['nom_bdd']])) { |
$type = $tableau[$i]['type']; |
$valeur = $ligne[$tableau[$i]['nom_bdd']]; |
} else { |
$type = $tableau[$i]['type']; |
$valeur = ''; |
} |
/* |
$element = Bazar_element::factory($type, $tableau[$i]); |
if (!PEAR::isError($element)) { |
if (method_exists($element, 'toForm'))$res .= $element->toForm($valeur); |
} |
*/ |
if ( $tableau[$i]['type']=='liste' || $tableau[$i]['type']=='checkbox' || $tableau[$i]['type']=='radio') { |
$def=$tableau[$i]['type'].$tableau[$i]['nom_bdd']; |
} |
elseif ( $tableau[$i]['type']=='texte' || $tableau[$i]['type']=='textelong' || $tableau[$i]['type']=='listedatedeb' |
|| $tableau[$i]['type']=='listedatefin' || $tableau[$i]['type']=='champs_cache' |
|| $tableau[$i]['type']=='labelhtml' ) { |
$def=$tableau[$i]['nom_bdd']; |
} elseif ($tableau[$i]['type']=='carte_google') { |
$def = 'carte_google'; |
$valeurs_par_defaut[$def] = array ('latitude' => $valeurs_par_defaut['bf_latitude'], 'longitude' => $valeurs_par_defaut['bf_longitude']); |
} |
// certain type n ont pas de valeur par defaut (labelhtml par exemple) |
// on teste l existence de $valeur_par_defaut[$def] avant de le passer en parametre |
$tableau[$i]['type']($formtemplate, $tableau[$i]['nom_bdd'], $tableau[$i]['label'], $tableau[$i]['limite1'], |
$tableau[$i]['limite2'], |
isset ($valeurs_par_defaut[$def]) ? $valeurs_par_defaut[$def] : '', |
$tableau[$i]['table_source'], $tableau[$i]['obligatoire']) ; |
if ($tableau[$i]['type']=='carte_google') { |
include_once GEN_CHEMIN_API.'formulaire/formulaire.fonct.google.php'; |
GEN_stockerCodeScript($script); |
// On ajoute l attribut load a la balise body |
GEN_AttributsBody('onload', 'load()'); |
} |
} |
} |
else { |
for ($i=0; $i<count($tableau); $i++) { |
if($tableau[$i]['type'] != '') { |
$tableau[$i]['type']($formtemplate, $tableau[$i]['nom_bdd'], $tableau[$i]['label'], $tableau[$i]['limite1'], |
$tableau[$i]['limite2'], $tableau[$i]['defaut'], $tableau[$i]['table_source'], $tableau[$i]['obligatoire']) ; |
if ($tableau[$i]['type'] == 'carte_google') { |
include_once GEN_CHEMIN_API.'formulaire/formulaire.fonct.google.php'; |
GEN_stockerCodeScript($script); |
// On ajoute l attribut load a la balise body |
GEN_AttributsBody('onload', 'load()'); |
} |
} |
} |
} |
$formtemplate->addElement('hidden', 'typeannonce', $GLOBALS['_BAZAR_']['id_typeannonce']); |
// Un champs cache pour la duplication |
if ($mode == 'duplication') $formtemplate->addElement('hidden', 'fiche_dupliquee', $GLOBALS['_BAZAR_']['id_fiche']); |
// Bouton d annulation |
$attr = $formtemplate->getAttributes(); |
$lien_formulaire = new Net_URL($attr[BAZ_VARIABLE_ACTION]); |
$lien_formulaire->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_VOIR_VOS_ANNONCES); |
$buttons[] = &HTML_QuickForm::createElement('link', 'annuler', BAZ_ANNULER, |
preg_replace ("/&/", "&", $lien_formulaire->getURL()), BAZ_ANNULER); // Le preg_replace contourne un pb de QuickForm et Net_URL |
// qui remplacent deux fois les & par des & |
//Bouton de validation du formulaire // ce qui fait �chouer le lien |
$buttons[] = &HTML_QuickForm::createElement('submit', 'valider', BAZ_VALIDER); |
$formtemplate->addGroup($buttons, null, null, ' '); |
} |
//Affichage a l'ecran |
$res .= $formtemplate->toHTML()."\n"; |
return $res; |
} |
/** requete_bazar_fiche() - preparer la requete d'insertion ou de MAJ de la table bazar_fiche a partir du template |
* |
* @global mixed L'objet contenant les valeurs issues de la saisie du formulaire |
* @return void |
*/ |
function requete_bazar_fiche(&$valeur) { |
$requete=NULL; |
//l'annonce est directement publi�e pour les admins |
$utilisateur = new Administrateur_bazar($GLOBALS['AUTH']); |
if ($utilisateur->isAdmin($GLOBALS['_BAZAR_']['id_typeannonce']) || |
$utilisateur->isSuperAdmin()) { |
$requete.='bf_statut_fiche=1, '; |
} |
else { |
$requete.='bf_statut_fiche="'.BAZ_ETAT_VALIDATION.'", '; |
} |
$tableau=baz_valeurs_template($GLOBALS['_BAZAR_']['template']); |
for ($i=0; $i<count($tableau); $i++) { |
//cas des checkbox et des listes |
if ($tableau[$i]['type']=='checkbox' || $tableau[$i]['type']=='liste') { |
//on supprime les anciennes valeurs de la table bazar_fiche_valeur_liste |
$requetesuppression='DELETE FROM bazar_fiche_valeur_liste WHERE bfvl_ce_fiche='.$GLOBALS['_BAZAR_']['id_fiche'].' AND bfvl_ce_liste='.$tableau[$i]['nom_bdd']; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requetesuppression) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
if (isset($valeur[$tableau[$i]['type'].$tableau[$i]['nom_bdd']]) && ($valeur[$tableau[$i]['type'].$tableau[$i]['nom_bdd']]!=0)) { |
//on insere les nouvelles valeurs |
$requeteinsertion='INSERT INTO bazar_fiche_valeur_liste (bfvl_ce_fiche, bfvl_ce_liste, bfvl_valeur) VALUES '; |
//pour les checkbox, les diff�rentes valeurs sont dans un tableau |
if (is_array($valeur[$tableau[$i]['type'].$tableau[$i]['nom_bdd']])) { |
$nb=0; |
while (list($cle, $val) = each($valeur[$tableau[$i]['type'].$tableau[$i]['nom_bdd']])) { |
if ($nb>0) $requeteinsertion .= ', '; |
$requeteinsertion .= '('.$GLOBALS['_BAZAR_']['id_fiche'].', '.$tableau[$i]['nom_bdd'].', '.$cle.') '; |
$nb++; |
} |
} |
//pour les listes, une insertion de la valeur suffit |
else { |
$requeteinsertion .= '('.$GLOBALS['_BAZAR_']['id_fiche'].', '.$tableau[$i]['nom_bdd'].', '.$valeur[$tableau[$i]['type'].$tableau[$i]['nom_bdd']].')'; |
} |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requeteinsertion) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
} |
} |
//cas des fichiers |
elseif ($tableau[$i]['type']=='fichier') { |
if ((isset($valeur['texte_fichier'.$tableau[$i]['nom_bdd']]) && $valeur['texte_fichier'.$tableau[$i]['nom_bdd']]!='') |
|| isset($_POST['fiche_dupliquee'])){ |
baz_insertion_fichier($valeur['texte_fichier'.$tableau[$i]['nom_bdd']], $GLOBALS['_BAZAR_']['id_fiche'], 'fichier'.$tableau[$i]['nom_bdd']); |
} |
} |
//cas des urls |
// On affine les criteres pour l insertion d une url |
// il faut que le lien soit saisie, different de http:// ET que le texte du lien soit saisie aussi |
// et ce afin d eviter d avoir des liens vides |
elseif ($tableau[$i]['type']=='url') { |
if ((isset($valeur['url_lien'.$tableau[$i]['nom_bdd']]) && |
$valeur['url_lien'.$tableau[$i]['nom_bdd']]!='http://' |
&& isset($valeur['url_texte'.$tableau[$i]['nom_bdd']]) && |
strlen ($valeur['url_texte'.$tableau[$i]['nom_bdd']])) || isset($_POST['fiche_dupliquee'])) { |
baz_insertion_url($valeur['url_lien'.$tableau[$i]['nom_bdd']], $valeur['url_texte'.$tableau[$i]['nom_bdd']], $GLOBALS['_BAZAR_']['id_fiche']); |
} |
} |
//cas des images |
elseif ($tableau[$i]['type']=='image') { |
if (isset($_FILES['image']['name']) && $_FILES['image']['name']!='') { |
$requete .= baz_insertion_image($GLOBALS['_BAZAR_']['id_fiche']); |
} |
} |
//cas des dates |
elseif ( $tableau[$i]['type']=='listedatedeb' || $tableau[$i]['type']=='listedatefin' ) { |
// On construit la date selon le format YYYY-mm-dd |
$date = $valeur[$tableau[$i]['nom_bdd']]['Y'].'-'.$valeur[$tableau[$i]['nom_bdd']]['m'].'-'.$valeur[$tableau[$i]['nom_bdd']]['d'] ; |
// si la date de fin evenement est anterieure a la date de debut, on met la date de debut |
// pour eviter les incoherence |
if ($tableau[$i]['nom_bdd'] == 'bf_date_fin_evenement' && |
mktime(0,0,0, $valeur['bf_date_debut_evenement']['m'], $valeur['bf_date_debut_evenement']['d'], $valeur['bf_date_debut_evenement']['Y']) > |
mktime(0,0,0, $valeur['bf_date_fin_evenement']['m'], $valeur['bf_date_fin_evenement']['d'], $valeur['bf_date_fin_evenement']['Y'])) { |
$val = $valeur['bf_date_debut_evenement']['Y'].'-'.$valeur['bf_date_debut_evenement']['m'].'-'.$valeur['bf_date_debut_evenement']['d'] ; |
} else { |
$val = $valeur[$tableau[$i]['nom_bdd']]['Y'].'-'.$valeur[$tableau[$i]['nom_bdd']]['m'].'-'.$valeur[$tableau[$i]['nom_bdd']]['d'] ; |
} |
$requete .= $tableau[$i]['nom_bdd'].'="'.$val.'", ' ; |
} |
//cas des champs texte |
elseif ( $tableau[$i]['type']=='texte' || $tableau[$i]['type']=='textelong' || $tableau[$i]['type']=='champs_cache' || $tableau[$i]['type']=='champs_mail' ) { |
//on mets les slashes pour les saisies dans les champs texte et textearea |
$val=addslashes($valeur[$tableau[$i]['nom_bdd']]) ; |
$requete .= $tableau[$i]['nom_bdd'].'="'.$val.'", ' ; |
} |
/* |
//cas des wikinis |
elseif ( $tableau[$i]['type']=='wikini' && $_REQUEST[BAZ_VARIABLE_ACTION]==BAZ_ACTION_NOUVEAU_V ) { |
//on appelle les pages des apis et de l'integrateur wikini |
include_once PAP_CHEMIN_RACINE.'api/sql/SQL_manipulation.fonct.php'; |
include_once PAP_CHEMIN_RACINE.'client/integrateur_wikini/configuration/adwi_configuration.inc.php' ; |
include_once PAP_CHEMIN_RACINE.'client/integrateur_wikini/bibliotheque/adwi_wikini.fonct.php' ; |
//g�n�ration du titre du wiki, sous la forme id-titre du projet |
$titre=baz_titre_wiki($valeur["bf_titre"]); |
//cr�ation du wiki |
$valeur=array ("action"=> "nouveau_v", "code_alpha_wikini"=>$titre, "page"=>"AccueiL", "bdd_hote"=> "", |
"bdd_nom"=> "", "bdd_utilisateur"=> "", "bdd_mdp" => "", "table_prefix"=> "", "chemin" => "wikini/".$titre, "valider"=> "Valider"); |
$val = insertion($valeur, $GLOBALS['_BAZAR_']['db']); |
} |
*/ |
// Cas de la carte google |
elseif ($tableau[$i]['type'] == 'carte_google') { |
$requete .= 'bf_latitude="'.$valeur['latitude'].'", bf_longitude="'.$valeur['longitude'].'",'; |
} |
} |
$requete.=' bf_date_maj_fiche=NOW()'; |
return $requete; |
} |
/** baz_insertion() - inserer une nouvelle fiche |
* |
* @array Le tableau des valeurs a inserer |
* @integer Valeur de l'identifiant de la fiche |
* @return void |
*/ |
function baz_insertion($valeur) { |
// =========== Insertion d'une nouvelle fiche =================== |
//requete d'insertion dans bazar_fiche |
$GLOBALS['_BAZAR_']['id_fiche'] = baz_nextid('bazar_fiche', 'bf_id_fiche', $GLOBALS['_BAZAR_']['db']) ; |
$requete = 'INSERT INTO bazar_fiche SET bf_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche'].','. |
'bf_ce_utilisateur='.$GLOBALS['id_user'].', bf_ce_nature='.$GLOBALS['_BAZAR_']['id_typeannonce'].','. |
'bf_date_creation_fiche=NOW(),'; |
if (!isset($_REQUEST['bf_date_debut_validite_fiche'])) { |
$requete .= 'bf_date_debut_validite_fiche=now(), bf_date_fin_validite_fiche="0000-00-00", ' ; |
} |
$requete .=requete_bazar_fiche($valeur) ; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
return ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
// Envoie d un mail aux administrateurs |
$utilisateur = new Administrateur_bazar($GLOBALS['AUTH']); |
if (!$utilisateur->isAdmin($GLOBALS['_BAZAR_']['id_typeannonce']) || !$utilisateur->isSuperAdmin()) { |
bazar::notifier(); |
} |
// On redirige |
return $GLOBALS['_BAZAR_']['id_fiche']; |
} |
/** baz_insertion_url() - inserer un lien URL a une fiche |
* |
* @global string L'url du lien |
* @global string Le texte du lien |
* @global integer L'identifiant de la fiche |
* @return void |
*/ |
function baz_insertion_url($url_lien, $url_texte, $idfiche) { |
if (isset ($_POST['fiche_dupliquee'])) { |
$id_url = baz_nextId('bazar_url', 'bu_id_url', $GLOBALS['_BAZAR_']['db']) ; |
$requete = 'insert into bazar_url select '.$id_url.','.$idfiche.',bu_url, bu_descriptif_url '. |
' from bazar_url where bu_ce_fiche="'.$_POST['fiche_dupliquee'].'"'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
return; |
} |
//requete d'insertion dans bazar_url |
if (!isset($_SESSION['_BAZAR_']['lien'])) { |
$id_url = baz_nextId('bazar_url', 'bu_id_url', $GLOBALS['_BAZAR_']['db']) ; |
$requete = 'INSERT INTO bazar_url SET bu_id_url='.$id_url.', bu_ce_fiche='.$idfiche.', '. |
'bu_url="'.$url_lien.'", bu_descriptif_url="'.addslashes($url_texte).'"'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
return $resultat->getMessage().$resultat->getDebugInfo() ; |
} |
$_SESSION['_BAZAR_']['lien'] = 1; |
return; |
} |
} |
/** baz_insertion_fichier() - inserer un fichier a une fiche |
* |
* @global string Le label du fichier |
* @global string La description du fichier |
* @global integer L'identifiant de la fiche |
* @return void |
*/ |
function baz_insertion_fichier($fichier_description, $idfiche, $nom_fichier='fichier_joint') { |
//verification de la presence de ce fichier |
// En cas de duplication on ajoute simplement une ligne dans la base de donnee |
// pour chaque fichier associe a la fiche d origine |
if (isset ($_POST['fiche_dupliquee'])) { |
$id_fichier_joint = baz_nextId('bazar_fichier_joint', 'bfj_id_fichier', $GLOBALS['_BAZAR_']['db']) ; |
$requete = 'insert into bazar_fichier_joint select '.$id_fichier_joint.','.$idfiche.',bfj_description,bfj_fichier '. |
' from bazar_fichier_joint where bfj_ce_fiche="'.$_POST['fiche_dupliquee'].'"'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
return; |
} |
$requete = 'SELECT bfj_id_fichier FROM bazar_fichier_joint WHERE bfj_fichier="'.$_FILES[$nom_fichier]['name'].'"'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
if (!isset ($_SESSION['_BAZAR_']['fichier'])) { |
if ($resultat->numRows()==0) { |
$chemin_destination=BAZ_CHEMIN_APPLI.'upload/'.$_FILES[$nom_fichier]['name']; |
move_uploaded_file($_FILES[$nom_fichier]['tmp_name'], $chemin_destination); |
chmod ($chemin_destination, 0755); |
} |
$id_fichier_joint = baz_nextId('bazar_fichier_joint', 'bfj_id_fichier', $GLOBALS['_BAZAR_']['db']) ; |
$requete = 'INSERT INTO bazar_fichier_joint SET bfj_id_fichier='.$id_fichier_joint.', bfj_ce_fiche='.$idfiche. |
', bfj_description="'.addslashes($fichier_description).'", bfj_fichier="'.$_FILES[$nom_fichier]['name'].'"'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
return $resultat->getMessage().$resultat->getDebugInfo() ; |
} |
} |
$_SESSION['_BAZAR_']['fichier'] = 1; |
return; |
} |
/** baz_insertion_image() - inserer une image a une fiche |
* |
* @global integer L'identifiant de la fiche |
* @return string requete SQL |
*/ |
function baz_insertion_image($idfiche) { |
//verification de la presence de ce fichier |
$requete = 'SELECT bf_id_fiche FROM bazar_fiche WHERE bf_url_image="'.$_FILES['image']['name'].'" AND bf_id_fiche!='.$idfiche; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
if ($resultat->numRows()==0) { |
$chemin_destination=BAZ_CHEMIN_APPLI.'upload/'.$_FILES['image']['name']; |
move_uploaded_file($_FILES['image']['tmp_name'], $chemin_destination); |
chmod ($chemin_destination, 0755); |
} |
$_SESSION['_BAZAR_']['image'] = 1; |
return 'bf_url_image="'.$_FILES['image']['name'].'", ' ; |
} |
/** baz_mise_a_jour() - Mettre a jour une fiche |
* |
* @global Le contenu du formulaire de saisie de l'annonce |
* @return void |
*/ |
function baz_mise_a_jour($valeur) { |
//MAJ de bazar_fiche |
$requete = 'UPDATE bazar_fiche SET '.requete_bazar_fiche($valeur,$GLOBALS['_BAZAR_']['id_typeannonce']); |
$requete.= ' WHERE bf_id_fiche='.$GLOBALS['_BAZAR_']['id_fiche']; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
return ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
// Envoie d un mail aux administrateurs |
$utilisateur = new Administrateur_bazar($GLOBALS['AUTH']); |
if (!$utilisateur->isAdmin($GLOBALS['_BAZAR_']['id_typeannonce']) || !$utilisateur->isSuperAdmin()) { |
bazar::notifier(BAZAR_NOTIFICATION_MODIFICATION_FICHE); |
} |
return; |
} |
/** baz_post_validation () |
* |
* Cette fonction renvoie une page qui invite l utilisateur a : |
* - saisir une nouvelle fiche a partir de celle qu il vient de saisir (pour changer de date) |
* - retour a la liste de ces fiches |
* - saisir une nouvelle fiche |
* |
*/ |
function baz_post_validation() { |
$lien_duplication = clone $GLOBALS['_BAZAR_']['url']; |
$lien_nouvelle_fiche = clone $GLOBALS['_BAZAR_']['url']; |
$lien_mes_fiches = clone $GLOBALS['_BAZAR_']['url']; |
$lien_visualiser_fiche = clone $GLOBALS['_BAZAR_']['url']; |
$lien_duplication->addQueryString(BAZ_VARIABLE_DUPLICATION, 1); |
$lien_duplication->addQueryString(BAZ_VARIABLE_ACTION, BAZ_ACTION_NOUVEAU); |
$lien_duplication = $lien_duplication->getURL(); |
$lien_visualiser_fiche->addQueryString(BAZ_VARIABLE_VOIR, BAZ_GERER_DROITS); |
$lien_visualiser_fiche->addQueryString(BAZ_VARIABLE_ACTION, BAZ_VOIR_FICHE); |
$lien_visualiser_fiche = $lien_visualiser_fiche->getUrl() ; |
$lien_nouvelle_fiche->removeQueryString(BAZ_VARIABLE_ID_FICHE); |
$lien_nouvelle_fiche->addQueryString(BAZ_VARIABLE_ACTION, BAZ_DEPOSER_ANNONCE); |
$lien_nouvelle_fiche->addQueryString(BAZ_VARIABLE_CATEGORIE_NATURE, $GLOBALS['_BAZAR_']['categorie_nature']); |
$lien_nouvelle_fiche = $lien_nouvelle_fiche->getURL(); |
$lien_mes_fiches->removeQueryString(BAZ_VARIABLE_ID_FICHE); |
$lien_mes_fiches->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_MES_FICHES); |
$lien_mes_fiches = $lien_mes_fiches->getURL(); |
ob_start(); |
if (file_exists(BAZ_CHEMIN_SQUELETTE.'baz_post_validation.tpl.html')) { |
include_once BAZ_CHEMIN_SQUELETTE.'baz_post_validation.tpl.html'; |
} |
$res = ob_get_contents(); |
ob_end_clean(); |
return $res ; |
} |
/** baz_suppression() - Supprime une fiche |
* |
* @global L'identifiant de la fiche a supprimer |
* @return void |
*/ |
function baz_suppression() { |
if ($GLOBALS['AUTH']->getAuth()) { |
$valeurs = baz_valeurs_fiche($_GET['id_fiche']); |
//suppression des wikinis associes |
//g�n�ration du titre du wiki, sous la forme id-titre du projet |
/* |
$titre=baz_titre_wiki($valeurs["bf_titre"]); |
$requete = 'SELECT gewi_id_wikini FROM gen_wikini WHERE gewi_code_alpha_wikini = "'.$titre.'"'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if ($resultat->numRows()>0) { |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$id_wikini=$ligne['gewi_id_wikini']; |
} |
include_once PAP_CHEMIN_RACINE.'api/sql/SQL_manipulation.fonct.php'; |
include_once PAP_CHEMIN_RACINE.'client/integrateur_wikini/configuration/adwi_configuration.inc.php' ; |
include_once PAP_CHEMIN_RACINE.'client/integrateur_wikini/bibliotheque/adwi_wikini.fonct.php' ; |
adwi_supprimer_wikini($id_wikini, $GLOBALS['_BAZAR_']['db']); |
} |
*/ |
// suppression des valeurs des listes et des cases � cocher |
$requete = 'DELETE FROM bazar_fiche_valeur_liste WHERE bfvl_ce_fiche='.$_GET['id_fiche']; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
return ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
//suppression des urls associes |
$requete = 'SELECT bu_id_url FROM bazar_url WHERE bu_ce_fiche = '.$_GET['id_fiche']; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
return ('Echec de la requete<br />'.$resultat->getMessage().'<br />'.$resultat->getDebugInfo().'<br />'."\n") ; |
} |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
baz_suppression_url($ligne['bu_id_url']); |
} |
//suppression des fichiers associes |
$requete = 'SELECT bfj_id_fichier FROM bazar_fichier_joint WHERE bfj_ce_fiche = '.$_GET['id_fiche']; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
return ('Echec de la requete<br />'.$resultat->getMessage().'<br />'.$resultat->getDebugInfo().'<br />'."\n") ; |
} |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
baz_suppression_fichier($ligne['bfj_id_fichier']); |
} |
//suppression dans bazar_fiche |
$requete = 'DELETE FROM bazar_fiche WHERE bf_id_fiche = '.$_GET['id_fiche']; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
return ('Echec de la requete<br />'.$resultat->getMessage().'<br />'.$resultat->getDebugInfo().'<br />'."\n") ; |
} |
// Redirection vers Mes fiches |
$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_VOIR, BAZ_VOIR_MES_FICHES); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('id_fiche'); |
header ('Location:'.$GLOBALS['_BAZAR_']['url']->getURL()); |
exit; |
return ; |
} |
} |
/** baz_suppression_url() - Supprimer un lien d'une fiche |
* |
* @global integer L'identifiant du lien |
* @return void |
*/ |
function baz_suppression_url($id_url) { |
if ($GLOBALS['AUTH']->getAuth()) { |
//suppression dans bazar_url |
$requete = 'DELETE FROM bazar_url WHERE bu_id_url = '.$id_url; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ('Echec de la requete<br />'.$resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
} |
return; |
} |
} |
/** baz_suppression_fichier() - Supprimer un fichier d'une fiche |
* |
* @global integer L'identifiant du fichier |
* @return void |
*/ |
function baz_suppression_fichier($id_fichier) { |
if ($GLOBALS['AUTH']->getAuth()) { |
//verification de l'utilisation du fichier joint pour une autre annonce |
$requete = 'SELECT bfj_fichier FROM bazar_fichier_joint WHERE bfj_id_fichier='.$id_fichier; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC); |
$requete = 'SELECT bfj_fichier FROM bazar_fichier_joint WHERE bfj_fichier="'.$ligne['bfj_fichier'].'"'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
//si le fichier n'est que utilise dans cette fiche, on le supprime, on le laisse sinon |
if ($resultat->numRows()==1) { |
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC); |
unlink(BAZ_CHEMIN_APPLI.'upload/'.$ligne['bfj_fichier']); |
} |
//suppression dans la table bazar_fichier |
$requete = 'DELETE FROM bazar_fichier_joint WHERE bfj_id_fichier = '.$id_fichier; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ('Echec de la requete<br />'.$resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
} |
return; |
} |
} |
/** baz_suppression_image() - Supprimer une image d'une fiche |
* |
* @global integer L'identifiant de la fiche |
* @return void |
*/ |
function baz_suppression_image($id_fiche) { |
if ($GLOBALS['AUTH']->getAuth()) { |
//verification de l'utilisation de l'image pour une autre annonce |
$requete = 'SELECT bf_url_image FROM bazar_fiche WHERE bf_id_fiche='.$id_fiche; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC); |
$requete = 'SELECT bf_url_image FROM bazar_fiche WHERE bf_url_image="'.$ligne['bf_url_image'].'"'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
//si le fichier n'est que utilise dans cette fiche, on le supprime, on le laisse sinon |
if ($resultat->numRows()==1) { |
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC); |
unlink(BAZ_CHEMIN_APPLI.'upload/'.$ligne['bf_url_image']); |
} |
//suppression dans la table bazar_fiche |
$requete = 'UPDATE bazar_fiche SET bf_url_image=NULL WHERE bf_id_fiche = '.$id_fiche; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ('Echec de la requete<br />'.$resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
} |
return; |
} |
} |
/** publier_fiche () - Publie ou non dans les fichiers XML la fiche bazar d'un utilisateur |
* |
* @global boolean Valide: oui ou non |
* @return void |
*/ |
function publier_fiche($valid) { |
$utilisateur = new Administrateur_bazar($GLOBALS['AUTH']); |
// sortie anticipée en cas d'accès non autorisé |
// ceci limite l'accès au supers admins |
// TODO: voir si l'on ne pourrait valider que les fiches |
// des catégories dont la personne est admin, ce qui permettrait un accès plus fin |
if(!$utilisateur->isSuperAdmin()) { |
return; |
} |
if (isset($_GET['id_fiche'])) $GLOBALS['_BAZAR_']['id_fiche']=$_GET['id_fiche']; |
if(isset($_POST['date_validite']) && date('Y-m-d', strtotime($_POST['date_validite']))) { |
$date_validite = '"'.date('Y-m-d', strtotime($_POST['date_validite'])).'"'; |
} else { |
$date_validite = 'now()'; |
} |
if (isset($_GET['typeannonce'])) $typeannonce=$_GET['typeannonce']; |
if ($valid==0) { |
$requete = 'UPDATE bazar_fiche SET bf_statut_fiche=2 WHERE bf_id_fiche="'.$GLOBALS['_BAZAR_']['id_fiche'].'"' ; |
} |
else { |
$requete = 'UPDATE bazar_fiche SET bf_date_debut_validite_fiche='.$date_validite.' , bf_statut_fiche=1 WHERE bf_id_fiche="'.$GLOBALS['_BAZAR_']['id_fiche'].'"' ; |
} |
// ====================Mise a jour de la table bazar_fiche==================== |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
unset ($resultat) ; |
//TODO envoie mail annonceur |
return; |
} |
/** baz_s_inscrire() affiche le formulaire qui permet de s'inscrire pour recevoir des annonces d'un type |
* |
* @return string le code HTML |
*/ |
function baz_s_inscrire() { |
$res= '<h2>'.BAZ_S_INSCRIRE_AUX_ANNONCES.'</h2>'."\n"; |
if (isset($_GET['inscrip'])) { |
//cas d'une desinscription |
if ($_GET['inscrip']==0) { |
$requete='DELETE FROM bazar_abonnement WHERE ba_id_utilisateur='.$GLOBALS['id_user'].' AND ba_id_rubrique='.$_GET['idtypeannonce']; |
} |
//cas d'une inscription |
else { |
$requete='INSERT INTO bazar_abonnement VALUES ('.$GLOBALS['id_user'].', '.$_GET['idtypeannonce'].')'; |
} |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
} |
if ($GLOBALS['AUTH']->getAuth()) { |
$res .= '<p id="laius_abonnement">'.BAZ_LAIUS_S_ABONNER.'</p>'."\n"; |
//requete pour obtenir l'id et le label des types d'annonces |
$requete = 'SELECT bn_id_nature, bn_label_nature, bn_image_titre '. |
'FROM bazar_nature WHERE 1'; /*bn_ce_id_menu='.$GLOBALS['_BAZAR_']['categorie_nature'];*/ |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
// Nettoyage de l url |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_VOIR); |
//$table = new HTML_Table(array ('width' => '100%', 'class' => 'table_bazar')); |
//$table->addRow(array(BAZ_TYPE_ANNONCES,/* BAZ_STATUT, BAZ_PASSER_EN, */ BAZ_RSS)); |
//$table->setRowType(0, 'th');*/ |
$res .= '<div>'.BAZ_TYPE_ANNONCES.'</div>' ; |
$res .= '<ul>' ; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$lien_RSS=$GLOBALS['_BAZAR_']['url']; |
$lien_RSS->addQueryString('action', BAZ_VOIR_FLUX_RSS); |
//requete pour savoir si la personne est inscrite a ce type d'annonce |
$requete = 'SELECT ba_id_utilisateur '. |
'FROM bazar_abonnement '. |
'WHERE ba_id_utilisateur='.$GLOBALS['id_user'].' AND ba_id_rubrique='.$ligne['bn_id_nature']; |
$resultat2 = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat2)) { |
die ($resultat2->getMessage().$resultat2->getDebugInfo()) ; |
} |
$lien_RSS->addQueryString('annonce', $ligne['bn_id_nature']); |
$res .= '<li>'. '<a href="'.$lien_RSS->getURL().'">'.$ligne['bn_label_nature'].'</a></li>' ; |
$lien_RSS->removeQueryString('annonce'); |
} |
$res .= '</ul>' ; |
} |
else { |
$res .= '<p class="zone_info">'.BAZ_IDENTIFIEZ_VOUS_POUR_SAISIR.'</p>'."\n" ; |
$res .= '<form id="form_connexion" style="clear:both;" class="form_identification" action="' ; |
$GLOBALS['_BAZAR_']['url']->addQueryString(BAZ_VARIABLE_ACTION, BAZ_S_INSCRIRE); |
$res .= $GLOBALS['_BAZAR_']['url']->getURL(); |
$res .= '" method="post"> |
<fieldset> |
<legend>Identifiez vous</legend> |
<label for="username">Courriel : </label> |
<input type="text" id="username" name="username" maxlength="80" tabindex="1" value="courriel" /> |
<label for="password">Mot de passe : </label> |
<input type="password" id="password" name="password" maxlength="80" tabindex="2" value="mot de passe" /> |
<input type="submit" id="connexion" name="connexion" tabindex="3" value="ok" /> |
</fieldset> |
</form>'; |
} |
// Nettoyage de l'url |
$GLOBALS['_BAZAR_']['url']->removeQueryString(BAZ_VARIABLE_ACTION); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('idtypeannonce'); |
$GLOBALS['_BAZAR_']['url']->removeQueryString('inscrip'); |
return $res; |
} |
/** baz_valeurs_fiche() - Renvoie un tableau avec les valeurs par defaut du formulaire d'inscription |
* |
* @param integer Identifiant de la fiche |
* |
* @return array Valeurs enregistrees pour cette fiche |
*/ |
function baz_valeurs_fiche($idfiche) { |
$requete = 'SELECT * FROM bazar_fiche WHERE bf_id_fiche='.$idfiche; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
} |
$ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC) ; |
$valeurs_fiche = array() ; |
$tableau = baz_valeurs_template($GLOBALS['_BAZAR_']['template']); |
for ($i=0; $i<count($tableau); $i++) { |
if ($tableau[$i]['type']=='liste' || $tableau[$i]['type']=='checkbox' || $tableau[$i]['type']=='radio') { |
$requete = 'SELECT bfvl_valeur FROM bazar_fiche_valeur_liste WHERE bfvl_ce_fiche='.$idfiche. |
' AND bfvl_ce_liste='.$tableau[$i]['nom_bdd']; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError ($resultat)) { |
die ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
} |
$nb=0;$val=''; |
while ($result = $resultat->fetchRow()) { |
if ($nb>0) $val .= ', '; |
$val .= $result[0]; |
$nb++; |
} |
$valeurs_fiche[$tableau[$i]['type'].$tableau[$i]['nom_bdd']] = $val; |
} |
elseif ($tableau[$i]['type']=='champs_cache' || $tableau[$i]['type']=='texte' || $tableau[$i]['type']=='textelong' || $tableau[$i]['type']=='listedatedeb' || $tableau[$i]['type']=='listedatefin') { |
$valeurs_fiche[$tableau[$i]['nom_bdd']] = stripslashes($ligne[$tableau[$i]['nom_bdd']]); |
} elseif ($tableau[$i]['type']=='carte_google') { |
$valeurs_fiche['bf_latitude'] = $ligne['bf_latitude']; |
$valeurs_fiche['bf_longitude'] = $ligne['bf_longitude']; |
} |
} |
return $valeurs_fiche; |
} |
/** baz_valeurs_champ() - Renvoie les valeurs d'un champ pour une fiche donn�e |
* |
* @param string le nom du champ de la fiche |
* @param integer Identifiant de la fiche |
* |
* @return string Valeurs enregistrees pour cette fiche |
*/ |
function baz_valeur_champs($nom_champs,$id_fiche) { |
$requete = 'SELECT blv_label FROM bazar_fiche_valeur_liste, bazar_liste_valeurs WHERE bfvl_ce_fiche='. |
$id_fiche.' AND bfvl_ce_liste='.$nom_champs. |
' AND bfvl_valeur=blv_valeur AND blv_ce_liste='.$nom_champs. |
' AND blv_ce_i18n="'.$GLOBALS['_BAZAR_']['langue'].'"'; |
$resultat = $GLOBALS['_BAZAR_']['db']->query($requete) ; |
if (DB::isError ($resultat)) { |
return ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
} |
else { |
$res = ''; |
while($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
if($ligne['blv_label'] != 'Autre') { |
$res .= $ligne['blv_label'].', '; |
} |
} |
$res = rtrim($res,', '); |
return $res; |
} |
} |
/** function baz_nextId () Renvoie le prochain identifiant numerique libre d'une table |
* |
* @param string Nom de la table |
* @param string Nom du champs identifiant |
* @param mixed Objet DB de PEAR pour la connexion a la base de donnees |
* |
* return integer Le prochain numero d'identifiant disponible |
*/ |
function baz_nextId($table, $colonne_identifiant, $bdd) { |
$requete = 'SELECT MAX('.$colonne_identifiant.') AS maxi FROM '.$table; |
$resultat = $bdd->query($requete) ; |
if (DB::isError($resultat)) { |
die (__FILE__ . __LINE__ . $resultat->getMessage() . $requete); |
return $bdd->raiseError($resultat) ; |
} |
if ($resultat->numRows() > 1) { |
return $bdd->raiseError('<br />La table '.$table.' a un identifiant non unique<br />') ; |
} |
$ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT) ; |
return $ligne->maxi + 1 ; |
} |
/** function baz_titre_wiki () Renvoie la chaine de caractere sous une forme compatible avec wikini |
* |
* @param string mot � transformer (enlever accents, espaces) |
* |
* return string mot transform� |
*/ |
function baz_titre_wiki($nom) { |
$titre=trim($nom); |
for ($j = 0; $j < strlen ($titre); $j++) { |
if (!preg_match ('/[a-zA-Z0-9]/', $titre[$j])) { |
$titre[$j] = '_' ; |
} |
} |
return $titre; |
} |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.78 2008-09-17 14:08:45 alexandre_tb |
* merge depuis aha |
* |
* Revision 1.77 2008-03-17 11:02:59 jp_milcent |
* Ajout de l'authentification n�cessaire pour d�poser des commentaires. |
* Corrections sur la gestion des param�tres dans les urls (compatibilit� applette Identification et Moteur de Recherche). |
* |
* Revision 1.76 2007-12-14 09:56:02 alexandre_tb |
* Fusion avec la livraison AHA : 14 decembre 2007 |
* |
* Revision 1.75 2007-12-04 09:07:21 alexandre_tb |
* Fusion avec la livraison AHA : 4 d�c 2007 |
* |
* Revision 1.74 2007-10-25 09:41:31 alexandre_tb |
* mise en place de variable de session pour eviter que les formulaires soit valider 2 fois, pour les url, fichiers et image |
* |
* Revision 1.73 2007-10-24 13:27:00 alexandre_tb |
* bug : double saisie d url |
* suppression de warning sur variable |
* |
* Revision 1.72 2007-10-22 10:09:21 florian |
* correction template |
* |
* Revision 1.71 2007-10-22 09:18:39 alexandre_tb |
* prise en compte de la langue dans les requetes sur bazar_nature |
* |
* Revision 1.70 2007-10-10 13:26:36 alexandre_tb |
* utilisation de la classe Administrateur_bazar a la place de niveau_droit |
* suppression de fonction niveau_droit |
* |
* Revision 1.69 2007-09-18 07:39:42 alexandre_tb |
* correction d un bug lors d une insertion |
* |
* Revision 1.68 2007-08-27 12:31:31 alexandre_tb |
* mise en place de modele |
* |
* Revision 1.67 2007-07-04 10:01:30 alexandre_tb |
* mise en place de divers templates : |
* - mail pour admin (sujet et corps) |
* - modele carte_google |
* ajout de lignes dans bazar_template |
* |
* Revision 1.66 2007-06-25 12:15:06 alexandre_tb |
* merge from narmer |
* |
* Revision 1.65 2007-06-25 08:31:17 alexandre_tb |
* utilisation de la bibliotheque generale api/formulaire/formulaire.fonct.inc.php a la place de bazar.fonct.formulaire.php |
* |
* Revision 1.64 2007-06-04 15:25:39 alexandre_tb |
* ajout de la carto google |
* |
* Revision 1.63 2007/04/11 08:30:12 neiluj |
* remise en �tat du CVS... |
* |
* Revision 1.57.2.12 2007/03/16 14:49:24 alexandre_tb |
* si la date de debut d evenement est superieure a la date de fin alors on met |
* la meme date dans les deux champs (coherence) |
* |
* Revision 1.57.2.11 2007/03/07 17:40:57 jp_milcent |
* Ajout d'id sur les colonnes et gestion par les CSS des styles du tableau des abonnements. |
* |
* Revision 1.57.2.10 2007/03/07 17:20:19 jp_milcent |
* Ajout du nettoyage syst�matique des URLs. |
* |
* Revision 1.57.2.9 2007/03/06 16:23:24 jp_milcent |
* Nettoyage de l'url pour la gestion des droits. |
* |
* Revision 1.57.2.8 2007/03/05 14:33:44 jp_milcent |
* Suppression de l'appel � Mes_Fiches dans la fonction baz_formulaire |
* |
* Revision 1.57.2.7 2007/03/05 10:28:03 alexandre_tb |
* correction d un commentaire |
* |
* Revision 1.57.2.6 2007/02/15 13:42:16 jp_milcent |
* Utilisation de IN � la place du = dans les requ�tes traitant les cat�gories de fiches. |
* Permet d'utiliser la syntaxe 1,2,3 dans la configuration de categorie_nature. |
* |
* Revision 1.57.2.5 2007/02/12 16:16:31 alexand |