/trunk/client/bottin/annuaire_backoffice.php |
---|
19,7 → 19,7 |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: annuaire_backoffice.php,v 1.3 2006-12-01 13:23:17 florian Exp $ |
// CVS : $Id: annuaire_backoffice.php,v 1.4 2006-12-01 16:02:16 florian Exp $ |
/** |
* programme principal du module annuaire_moteur |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.3 $ |
*@version $Revision: 1.4 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
38,10 → 38,6 |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
// +------------------------------------------------------------------------------------------------------+ |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
include_once 'configuration/bottin.config.inc.php'; |
include_once INS_CHEMIN_APPLI.'bibliotheque/annuaire.fonct.php'; |
include_once INS_CHEMIN_APPLI.'bibliotheque/annuaire_backoffice.fonct.php'; |
51,27 → 47,6 |
define ("ANN_MAIL_TOUS", 1) ; |
define ("ANN_MAIL_TOUS_ENVOIE", 2) ; |
// Recherche parametres menu actif : ils ne sont pas present dans le contexte, quel dommage ! |
$requete_menu = 'SELECT gm_application_arguments '. |
'FROM gen_menu '. |
'WHERE gm_id_menu = '.$_GET['menu']; |
$resultat_menu = $GLOBALS['_GEN_commun']['pear_db']->query($requete_menu); |
$info_menu = $resultat_menu->fetchRow(DB_FETCHMODE_OBJECT); |
$resultat_menu->free(); |
if (isset($info_menu->gm_application_arguments)) { |
$arguments = explode(' ', $info_menu->gm_application_arguments); |
for ($i = 0; $i < count($arguments); $i++) { |
$attr = explode('=', $arguments[$i]); |
if ($attr[0] != '') { |
$info_application->$attr[0] = (isset($attr[1]) ? $attr[1] : ''); |
} |
} |
} |
//cas de l'annuaire admin papyrus, on modifie certaines constantes |
if ($info_application->type_annuaire==1) { |
include_once INS_CHEMIN_APPLI.'configuration/annuaire_backoffice.config.inc.php'; |
} |
function afficherContenuCorps () { |
global $statut ; |
/trunk/client/bottin/configuration/bottin.config.inc.php |
---|
19,7 → 19,7 |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: bottin.config.inc.php,v 1.14 2006-12-01 13:23:17 florian Exp $ |
// CVS : $Id: bottin.config.inc.php,v 1.15 2006-12-01 16:02:15 florian Exp $ |
/** |
* Fichier de configuration de l'application d'inscription/annuaire |
* |
32,83 → 32,11 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.14 $ $Date: 2006-12-01 13:23:17 $ |
*@version $Revision: 1.15 $ $Date: 2006-12-01 16:02:15 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
//================================= CONSTANTES DB ================================== |
/** Nom de la table Annuaire */ |
define ('INS_ANNUAIRE', 'annuaire'); |
/** Nom de la table des départements */ |
define ('INS_TABLE_DPT', 'gen_departement'); |
/** Nom de la table des pays */ |
define ('INS_TABLE_PAYS', 'gen_i18n_pays'); |
/** Champs identifiant */ |
define ('INS_CHAMPS_ID', 'a_id'); |
/** Champs adresse mail */ |
define ('INS_CHAMPS_MAIL', 'a_mail'); |
/** Champs nom */ |
define ('INS_CHAMPS_NOM', 'a_nom'); |
/** Champs prénom */ |
define ('INS_CHAMPS_PRENOM', 'a_prenom'); |
/** Champs description */ |
define ('INS_CHAMPS_DESCRIPTION','a_description'); |
/** Champs mot de passe */ |
define ('INS_CHAMPS_PASSE', 'a_mot_de_passe'); |
/** Champs identifiant pays */ |
define ('INS_CHAMPS_PAYS', 'a_ce_pays'); |
/** Champs code postal */ |
define ('INS_CHAMPS_CODE_POSTAL', 'a_code_postal'); |
/** Champs département */ |
define ('INS_CHAMPS_DEPARTEMENT', 'a_numero_dpt'); |
/** Champs adresse 1 */ |
define ('INS_CHAMPS_ADRESSE_1', 'a_adresse1'); |
/** Champs adresse 2 */ |
define ('INS_CHAMPS_ADRESSE_2', 'a_adresse2'); |
/** Champs ville */ |
define ('INS_CHAMPS_VILLE', 'a_ville'); |
/** Champs date de l'inscription */ |
define ('INS_CHAMPS_DATE_INSCRIPTION', 'a_date_inscription'); |
/** Champs pour désigner si c'est l'inscription d'une structure */ |
define ('INS_CHAMPS_EST_STRUCTURE', 'a_est_structure'); |
/** Champs sigle de la structure */ |
define ('INS_CHAMPS_SIGLE_STRUCTURE', 'a_sigle_structure'); |
/** Champs numéro de téléphone */ |
define ('INS_CHAMPS_TELEPHONE', 'a_telephone'); |
/** Champs numéro de fax */ |
define ('INS_CHAMPS_FAX', 'a_fax'); |
/** Champs d'appartenance à une structure */ |
define ('INS_CHAMPS_STRUCTURE', 'a_ce_structure'); |
/** Champs identifiant du pays de la table des pays*/ |
define ('INS_CHAMPS_ID_PAYS', 'gip_id_pays'); |
/** Champs nom du pays de la table des pays*/ |
define ('INS_CHAMPS_LABEL_PAYS', 'gip_nom_pays_traduit'); |
/** Champs qui contient la localisation */ |
define ('INS_CHAMPS_I18N_PAYS', ' gip_id_i18n') ; |
/** Champs identifiant du département de la table des departement*/ |
define ('INS_CHAMPS_ID_DEPARTEMENT','gd_id_departement'); |
/** Champs nom du département de la table des departement*/ |
define ('INS_CHAMPS_NOM_DEPARTEMENT','gd_nom'); |
/** Champs pour l'abonnement à une liste, laisser vide si vous ne souhaitez pas d'inscription' */ |
define ('INS_CHAMPS_LETTRE', 'a_lettre'); |
/** Champs de la date d'inscription */ |
define ('INS_CHAMPS_DATE', 'a_date_inscription'); |
/** Champs du site Internet*/ |
define ('INS_CHAMPS_SITE_INTERNET', 'a_site_internet'); |
/** Champs pour la vue sur carto*/ |
define ('INS_CHAMPS_VISIBLE', 'a_voir_sur_carto'); |
/** Champs pour la vue sur carto*/ |
define ('INS_CHAMPS_NUM_AGREMENT', 'a_num_agrement_fpc'); |
/** Champs pour le logo*/ |
define ('INS_CHAMPS_LOGO', 'a_logo'); |
if (INS_CHAMPS_LETTRE != '') { |
/** adresse d'inscription à la newsletter */ |
define ('INS_MAIL_INSCRIPTION_LISTE', 'newsletter-subscribe@domaine.org'); |
/** adresse de désinscription à la newsletter */ |
define ('INS_MAIL_DESINSCRIPTION_LISTE', 'newsletter-unsubscribe@domaine.org'); |
} |
//teste si l'on est dans l'application Papyrus |
if (!defined('PAP_VERSION')) { //pas dans Papyrus |
//================================ BASE DE DONNEES ================================= |
183,7 → 111,36 |
include_once INS_CHEMIN_APPLI.'langues/bottin.langue_'.INS_LANGUE_DEFAUT.'.inc.php'; //appel du fichier de constantes des langues |
} |
// Recherche parametres menu actif : ils ne sont pas present dans le contexte, quel dommage ! |
$requete_menu = 'SELECT gm_application_arguments '. |
'FROM gen_menu '. |
'WHERE gm_id_menu = '.$_GET['menu']; |
$resultat_menu = $GLOBALS['_GEN_commun']['pear_db']->query($requete_menu); |
$info_menu = $resultat_menu->fetchRow(DB_FETCHMODE_OBJECT); |
$resultat_menu->free(); |
if (isset($info_menu->gm_application_arguments)) { |
$arguments = explode(' ', $info_menu->gm_application_arguments); |
for ($i = 0; $i < count($arguments); $i++) { |
$attr = explode('=', $arguments[$i]); |
if ($attr[0] != '') { |
$info_application->$attr[0] = (isset($attr[1]) ? $attr[1] : ''); |
} |
} |
} |
//cas de l'annuaire admin papyrus, on modifie certaines constantes |
if (isset($info_application) && $info_application->type_annuaire==1) { |
include_once INS_CHEMIN_APPLI.'configuration/annuaire_backoffice.config.inc.php'; |
} else { |
include_once INS_CHEMIN_APPLI.'configuration/annuaire_backoffice_bottin.config.inc.php'; |
} |
if (defined('INS_CHAMPS_LETTRE')) { |
/** adresse d'inscription à la newsletter */ |
define ('INS_MAIL_INSCRIPTION_LISTE', 'newsletter-subscribe@domaine.org'); |
/** adresse de désinscription à la newsletter */ |
define ('INS_MAIL_DESINSCRIPTION_LISTE', 'newsletter-unsubscribe@domaine.org'); |
} |
/** Définir la présence d'un formulaire d'inscription de structure (mettre à 1 pour oui, 0 pour non */ |
define ('INS_FORMULAIRE_STRUCTURE', 1); |
243,6 → 200,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.14 2006/12/01 13:23:17 florian |
* integration annuaire backoffice |
* |
* Revision 1.13 2006/09/20 14:56:41 alexandre_tb |
* correction de la valeur par défaut INS_CHAMPS_I18N_PAYS |
* |
/trunk/client/bottin/configuration/annuaire_backoffice_bottin.config.inc.php |
---|
New file |
0,0 → 1,103 |
<?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$ |
/** |
* Fichier de configuration de l'application d'inscription/annuaire |
* |
* A éditer de façon spécifique à chaque déploiement |
* |
*@package ins_annuaire |
//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$ $Date$ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
//================================= CONSTANTES DB ================================== |
/** Nom de la table Annuaire */ |
define ('INS_ANNUAIRE', 'annuaire'); |
/** Nom de la table des départements */ |
define ('INS_TABLE_DPT', 'gen_departement'); |
/** Nom de la table des pays */ |
define ('INS_TABLE_PAYS', 'gen_i18n_pays'); |
/** Champs identifiant */ |
define ('INS_CHAMPS_ID', 'a_id'); |
/** Champs adresse mail */ |
define ('INS_CHAMPS_MAIL', 'a_mail'); |
/** Champs nom */ |
define ('INS_CHAMPS_NOM', 'a_nom'); |
/** Champs prénom */ |
define ('INS_CHAMPS_PRENOM', 'a_prenom'); |
/** Champs description */ |
define ('INS_CHAMPS_DESCRIPTION','a_description'); |
/** Champs mot de passe */ |
define ('INS_CHAMPS_PASSE', 'a_mot_de_passe'); |
/** Champs identifiant pays */ |
define ('INS_CHAMPS_PAYS', 'a_ce_pays'); |
/** Champs code postal */ |
define ('INS_CHAMPS_CODE_POSTAL', 'a_code_postal'); |
/** Champs département */ |
define ('INS_CHAMPS_DEPARTEMENT', 'a_numero_dpt'); |
/** Champs adresse 1 */ |
define ('INS_CHAMPS_ADRESSE_1', 'a_adresse1'); |
/** Champs adresse 2 */ |
define ('INS_CHAMPS_ADRESSE_2', 'a_adresse2'); |
/** Champs ville */ |
define ('INS_CHAMPS_VILLE', 'a_ville'); |
/** Champs date de l'inscription */ |
define ('INS_CHAMPS_DATE_INSCRIPTION', 'a_date_inscription'); |
/** Champs pour désigner si c'est l'inscription d'une structure */ |
define ('INS_CHAMPS_EST_STRUCTURE', 'a_est_structure'); |
/** Champs sigle de la structure */ |
define ('INS_CHAMPS_SIGLE_STRUCTURE', 'a_sigle_structure'); |
/** Champs numéro de téléphone */ |
define ('INS_CHAMPS_TELEPHONE', 'a_telephone'); |
/** Champs numéro de fax */ |
define ('INS_CHAMPS_FAX', 'a_fax'); |
/** Champs d'appartenance à une structure */ |
define ('INS_CHAMPS_STRUCTURE', 'a_ce_structure'); |
/** Champs identifiant du pays de la table des pays*/ |
define ('INS_CHAMPS_ID_PAYS', 'gip_id_pays'); |
/** Champs nom du pays de la table des pays*/ |
define ('INS_CHAMPS_LABEL_PAYS', 'gip_nom_pays_traduit'); |
/** Champs qui contient la localisation */ |
define ('INS_CHAMPS_I18N_PAYS', ' gip_id_i18n') ; |
/** Champs identifiant du département de la table des departement*/ |
define ('INS_CHAMPS_ID_DEPARTEMENT','gd_id_departement'); |
/** Champs nom du département de la table des departement*/ |
define ('INS_CHAMPS_NOM_DEPARTEMENT','gd_nom'); |
/** Champs pour l'abonnement à une liste, laisser vide si vous ne souhaitez pas d'inscription' */ |
define ('INS_CHAMPS_LETTRE', 'a_lettre'); |
/** Champs de la date d'inscription */ |
define ('INS_CHAMPS_DATE', 'a_date_inscription'); |
/** Champs du site Internet*/ |
define ('INS_CHAMPS_SITE_INTERNET', 'a_site_internet'); |
/** Champs pour la vue sur carto*/ |
define ('INS_CHAMPS_VISIBLE', 'a_voir_sur_carto'); |
/** Champs pour la vue sur carto*/ |
define ('INS_CHAMPS_NUM_AGREMENT', 'a_num_agrement_fpc'); |
/** Champs pour le logo*/ |
define ('INS_CHAMPS_LOGO', 'a_logo'); |
?> |
/trunk/client/bottin/configuration/annuaire_backoffice.config.inc.php |
---|
10,7 → 10,7 |
// | Auteur : Alexandre Granier <alexandre@tela-botanica.org> | |
// +--------------------------------------------------------------------------------+ |
// |
// $Id: annuaire_backoffice.config.inc.php,v 1.2 2006-12-01 13:23:16 florian Exp $ |
// $Id: annuaire_backoffice.config.inc.php,v 1.3 2006-12-01 16:02:15 florian Exp $ |
/** |
//==================================== CONSTANTES ================================== |
30,4 → 30,16 |
define ('INS_CHAMPS_PRENOM', 'ga_prenom'); |
/** Champs mot de passe */ |
define ('INS_CHAMPS_PASSE', 'ga_mot_de_passe'); |
/** Champs identifiant pays */ |
define ('INS_CHAMPS_PAYS', 'ga_ce_i18n'); |
/** Nom de la table des départements */ |
define ('INS_TABLE_DPT', 'gen_departement'); |
/** Nom de la table des pays */ |
define ('INS_TABLE_PAYS', 'gen_i18n_pays'); |
/** Champs identifiant du pays de la table des pays*/ |
define ('INS_CHAMPS_ID_PAYS', 'gip_id_pays'); |
/** Champs nom du pays de la table des pays*/ |
define ('INS_CHAMPS_LABEL_PAYS', 'gip_nom_pays_traduit'); |
/** Champs qui contient la localisation */ |
define ('INS_CHAMPS_I18N_PAYS', ' gip_id_i18n') ; |
?> |
/trunk/client/bottin/annuaire_backoffice.admin.php |
---|
85,9 → 85,8 |
} |
$valeurs_par_defaut = array(); |
if ($resultat->numRows()>0) { |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_OBJECT)) { |
$arguments = explode(' ', $ligne->gm_application_arguments); |
var_dump($arguments); |
for ($i = 0; $i < count($arguments); $i++) { |
$attr = explode('=', $arguments[$i]); |
if ($attr[0] != '') { |
/trunk/client/bottin/bibliotheque/annuaire_backoffice.fonct.php |
---|
10,7 → 10,7 |
// | Auteur : Alexandre Granier <alexandre@tela-botanica.org> | |
// +--------------------------------------------------------------------------------+ |
// |
// $Id: annuaire_backoffice.fonct.php,v 1.6 2006-12-01 13:23:15 florian Exp $ |
// $Id: annuaire_backoffice.fonct.php,v 1.7 2006-12-01 16:02:16 florian Exp $ |
/** function mkengine () |
54,9 → 54,7 |
) ; |
$pager = & Pager::factory($param_pager); |
$mes_vars = array ("recherche", "nom", "ville", "mail" ,"dept", "prenom", "cotisant", "pays", "sort", "T_REPONSE", "lettre","statut") ; |
// Deux cas , soit on a cliqué sur rechercher, soit on a cliqué sur un lien |
foreach ($mes_vars as $key=>$value) { |
if (!$bouton) { // on a cliqué sur un lien |
72,24 → 70,9 |
} |
} |
} |
// Comptage du nombre total de données dans la table (hors CACHER = 1) |
$requete_nbre_inscrit = "select count(*) as CPT from ".INS_ANNUAIRE; |
$resultat_nbre_inscrit = $GLOBALS['ins_db']->query($requete_nbre_inscrit) ; |
if ($resultat_nbre_inscrit->numRows() == 1) { |
$tmp_nb = $resultat_nbre_inscrit->fetchRow(DB_FETCHMODE_OBJECT); |
$nbr_total = $tmp_nb->CPT; |
$chaine = "parmi $nbr_total données"; |
if ($nbr_total <= 0) $ret .= "<B>Erreur</B> lors du comptage des structures ($nbr_total trouvées) : $requete_nbre_inscrit"; |
} |
else $ret .= "<B>Erreur</B> lors du comptage des structures : $requete_nbre_inscrit"; |
// fin comptage |
$ret = ''; |
$ret .= '<h1>'.AM_L_TITRE.' '.$chaine.'</h1>'."\n" ; |
$ret .= '<h1>'.AM_L_TITRE.'</h1>'."\n" ; |
// construction du moteur de str |
$ret .= '<form action="'.$GLOBALS['ins_url']->getURL().'" method="post">'."\n"; |
127,6 → 110,7 |
$ret .= "<td>".AM_L_DEPARTEMENT." : </td>\n<td>" ; |
// Construction du <select> des départements |
if (defined('INS_CHAMPS_NOM_DEPARTEMENT')) { |
$requete_dpt = 'select '.INS_CHAMPS_ID_DEPARTEMENT.', '.INS_CHAMPS_NOM_DEPARTEMENT.' from '.INS_TABLE_DPT ; |
$resultat_dpt = $GLOBALS['ins_db']->query($requete_dpt) ; |
if (DB::isError($resultat_dpt)) { |
140,7 → 124,7 |
$ret .= '>'.$ligne_dpt[INS_CHAMPS_ID_DEPARTEMENT].' - '.$ligne_dpt[INS_CHAMPS_NOM_DEPARTEMENT].'</option>'."\n" ; |
} |
$ret .= "</select></td>\n" ; |
} |
$ret .= '<td>'.AM_L_MAIL.' : </td><td colspan="3">'.form_mk_chaineI(isset ($_REQUEST['mail']) ? stripslashes($_REQUEST['mail']) : '', "mail")."</td>\n" ; |
$ret .= "</tr>" ; |
167,7 → 151,20 |
$GLOBALS['ins_url']->addQueryString ('lettre', 'tous') ; |
$ret .= " <a href=\"".$GLOBALS['ins_url']->getURL().'">'.AM_L_TOUS."</a>\n" ; |
$ret .= "</div>\n" ; |
$ret .= '<div>'.$nbr_final.' résultat(s)</div>' ; |
// Comptage du nombre total de données dans la table (hors CACHER = 1) |
$requete_nbre_inscrit = "select count(*) as CPT from ".INS_ANNUAIRE; |
$resultat_nbre_inscrit = $GLOBALS['ins_db']->query($requete_nbre_inscrit) ; |
if ($resultat_nbre_inscrit->numRows() == 1) { |
$tmp_nb = $resultat_nbre_inscrit->fetchRow(DB_FETCHMODE_OBJECT); |
$nbr_total = $tmp_nb->CPT; |
$chaine = " sur $nbr_total entrées"; |
if ($nbr_total <= 0) $ret .= "<B>Erreur</B> lors du comptage des structures ($nbr_total trouvées) : $requete_nbre_inscrit"; |
} |
else $ret .= "<B>Erreur</B> lors du comptage des structures : $requete_nbre_inscrit"; |
// fin comptage |
$ret .= '<p class="zone_info">'.$nbr_final.' résultat(s)'.$chaine.'</p>' ; |
$GLOBALS['ins_url']->removeQueryString('lettre') ; |
// Menu Ajouter un inscrit |
176,6 → 173,7 |
$data = $pager->getPageData(); |
$table = new HTML_Table(array ('class' => 'table_bazar')) ; |
if (defined('INS_CHAMPS_VILLE')) { |
$table->addRow(array( |
'<a href="'.$GLOBALS['ins_url']->getURL().'&sort='.INS_CHAMPS_NOM.'">Identité</a>', |
'<a href="'.$GLOBALS['ins_url']->getURL().'&sort='.INS_CHAMPS_MAIL.'">Adresse mail</a>', |
182,6 → 180,13 |
'<a href="'.$GLOBALS['ins_url']->getURL().'&sort='.INS_CHAMPS_VILLE.'">'.AM_L_VILLE.'</a>', |
'Pays ou Dpt (fr)' |
), '', 'TH') ; |
} else { |
$table->addRow(array( |
'<a href="'.$GLOBALS['ins_url']->getURL().'&sort='.INS_CHAMPS_NOM.'">Identité</a>', |
'<a href="'.$GLOBALS['ins_url']->getURL().'&sort='.INS_CHAMPS_MAIL.'">Adresse mail</a>', |
'Pays ou Dpt (fr)' |
), '', 'TH') ; |
} |
$debut = isset($_REQUEST['pageID']) ? $_REQUEST['pageID'] : 1 ; |
for ($i = ($debut - 1) * $_REQUEST['setPerPage']; |
190,13 → 195,19 |
// On teste s'il y une valeur, si oui on ajoute la ligne |
if (isset ($data[$i])) { |
$urlPop = $GLOBALS['ins_url']->getURL().'&'.INS_CHAMPS_ID.'='.$data[$i][INS_CHAMPS_ID]; |
if (defined('INS_CHAMPS_VILLE')) { |
$ligne_inscrit = array ("<a href=\"$urlPop\">".$data[$i][INS_CHAMPS_NOM].' '.$data[$i][INS_CHAMPS_PRENOM]. |
'</a>', $data[$i][INS_CHAMPS_MAIL], $data[$i][INS_CHAMPS_VILLE]) ; |
} else { |
$ligne_inscrit = array ("<a href=\"$urlPop\">".$data[$i][INS_CHAMPS_NOM].' '.$data[$i][INS_CHAMPS_PRENOM]. |
'</a>', $data[$i][INS_CHAMPS_MAIL]) ; |
} |
// Pour la france on met le département, sinon on laisse le nom du pays |
if ($data[$i][INS_CHAMPS_PAYS] != 'fr') { |
array_push ($ligne_inscrit, $data[$i][INS_CHAMPS_LABEL_PAYS]); |
} else { |
if (defined('INS_CHAMPS_NOM_DEPARTEMENT')) { |
$req_dpt = 'select '.INS_CHAMPS_NOM_DEPARTEMENT.' from '.INS_TABLE_DPT.",".INS_ANNUAIRE. |
" where ".INS_ANNUAIRE.'.'.INS_CHAMPS_ID.'='.$data[$i][INS_CHAMPS_ID] ; |
$req_dpt .= " and ".INS_ANNUAIRE.'.'.INS_CHAMPS_DEPARTEMENT.'='.INS_TABLE_DPT.'.' |
208,6 → 219,7 |
$ligne_dpt = $resultat_dpt->fetchRow(DB_FETCHMODE_ASSOC) ; |
array_push ($ligne_inscrit, $ligne_dpt[INS_CHAMPS_NOM_DEPARTEMENT]) ; |
} |
} |
$table->addRow($ligne_inscrit) ; |
} |
256,14 → 268,20 |
// l'état de la cotisation (jointure) |
// le tableau suivant contient tous les champs de la table annuaire_tela sur lesquels on peut effectuer une recherche |
$fields_annu = array("nom" => INS_CHAMPS_NOM, "prenom" => INS_CHAMPS_PRENOM , "mail" => INS_CHAMPS_MAIL , "ville" => INS_CHAMPS_VILLE, |
if (defined('INS_CHAMPS_DEPARTEMENT')) { |
$fields_annu = array("nom" => INS_CHAMPS_NOM, "prenom" => INS_CHAMPS_PRENOM , "mail" => INS_CHAMPS_MAIL , |
"dept" => INS_CHAMPS_DEPARTEMENT, "pays" => INS_CHAMPS_PAYS ) ; |
} |
else { |
$fields_annu = array("nom" => INS_CHAMPS_NOM, "prenom" => INS_CHAMPS_PRENOM , "mail" => INS_CHAMPS_MAIL , |
"pays" => INS_CHAMPS_PAYS ) ; |
} |
if (defined('INS_CHAMPS_VILLE')) $fields_annu["ville"]=INS_CHAMPS_VILLE; |
$mes_vars = array ("recherche", "nom", "ville", "mail" ,"dept", "prenom", "pays", "sort", "T_REPONSE", "lettre", "statut") ; |
$mes_vars = array ("recherche", "nom", "ville", "mail" ,"dept", "prenom", "cotisant", "pays", "sort", "T_REPONSE", "lettre","statut") ; |
$queries = "select ".INS_ANNUAIRE.".*" ; |
$queries = "SELECT ".INS_ANNUAIRE.".*" ; |
$queries .= ", ".INS_TABLE_PAYS.'.'.INS_CHAMPS_LABEL_PAYS ; |
$queries .= " from ".INS_ANNUAIRE ; |
$queries .= " FROM ".INS_ANNUAIRE ; |
$queries .= ",".INS_TABLE_PAYS ; |
// Construction en fonction des champs saisies |
270,7 → 288,7 |
// juste le champs "rechercher", on regarde partout |
$where = ' where ' ; |
$where = ' WHERE ' ; |
if (isset ($_REQUEST['recherche']) && $_REQUEST['recherche'] != "") { |
$where .= '('.INS_CHAMPS_NOM.' like "%'.$_REQUEST['recherche'].'%"' ; // le premier |
foreach($fields_annu as $key=>$value) { |
291,9 → 309,9 |
if ($key != "") { |
if ($key == "pays") { |
if (!isset($_REQUEST[$key]) || $_REQUEST[$key] == "tous") { |
$where .= " and ".INS_CHAMPS_PAYS." like '%'"; |
$where .= ' '.INS_CHAMPS_PAYS." like '%'"." and "; |
} else { |
$where .= " and $valeur like \"%".$_REQUEST[$key]."%\"" ; |
$where .= " $valeur like \"%".$_REQUEST[$key]."%\""." and " ; |
} |
} else { |
if ($key == "dept") { |
304,16 → 322,16 |
} else { |
if (isset ($_REQUEST[$key]) && $or_flag) { |
$where .= "$valeur like \"%".$_REQUEST[$key]."%\"" ; |
$where .= "$valeur like \"%".$_REQUEST[$key]."%\" and " ; ; |
} else { |
$where .= "$valeur like \"%%\"" ; |
$where .= "$valeur like \"%%\" and " ; ; |
} |
if ($key != "ville") $where .= " and " ; |
} |
} |
$or_flag = true ; |
} |
} |
$where = substr($where, 0, strlen($where)-5); |
// ici le cas ou rien n'a été saisie du tout, on affiche tout |
if (!$or_flag) { |
$where .= INS_CHAMPS_NOM." like '%')" ; |
322,7 → 340,7 |
if (isset($_REQUEST['lettre'])) { |
if ($_REQUEST['lettre'] == 'tous') $_REQUEST['lettre'] = ''; |
$where = ' where '.INS_CHAMPS_NOM.' like "'.$_REQUEST['lettre'].'%"' ; |
$where = ' WHERE '.INS_CHAMPS_NOM.' LIKE "'.$_REQUEST['lettre'].'%"' ; |
} |
$where .= " and ".INS_ANNUAIRE.".".INS_CHAMPS_PAYS."=".INS_TABLE_PAYS.".".INS_CHAMPS_ID_PAYS."" ; |
337,7 → 355,7 |
if (!isset ($_REQUEST['lettre'])) $_REQUEST['lettre'] = '' ; |
$queries .= $where ; |
$queries .= $where.' AND '.INS_CHAMPS_ID.'!=0'; |
if (isset($_REQUEST['sort']) && $_REQUEST['sort'] != "") $queries .= ' order by '.$_REQUEST['sort'] ; |
return $queries; |
/trunk/client/bottin/langues/bottin.langue_fr.inc.php |
---|
19,7 → 19,7 |
// | License along with this library; if not, write to the Free Software | |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
// +------------------------------------------------------------------------------------------------------+ |
// CVS : $Id: bottin.langue_fr.inc.php,v 1.15 2006-12-01 13:23:16 florian Exp $ |
// CVS : $Id: bottin.langue_fr.inc.php,v 1.16 2006-12-01 16:02:16 florian Exp $ |
/** |
* Fichier de traduction en français de l'application ins_annuaire |
* |
29,7 → 29,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.15 $ $Date: 2006-12-01 13:23:16 $ |
*@version $Revision: 1.16 $ $Date: 2006-12-01 16:02:16 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
226,7 → 226,7 |
define ('INS_TYPE_ANNUAIRE','Type d\'annuaire à configurer'); |
define ('INS_ANNUAIRE_BOTTIN','Annuaire du bottin'); |
define ('INS_ANNUAIRE_ADMIN_PAPYRUS','Annuaire des administrateurs Papyrus'); |
define ("AM_L_TITRE", "Chercher un adhérent") ; |
define ("AM_L_TITRE", "Gestion des annuaires") ; |
define ("AM_L_RECHERCHER", "Rechercher") ; |
define ("AM_L_PAYS", "Pays") ; |
define ("AM_L_NOM", "Nom") ; |
274,6 → 274,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.15 2006/12/01 13:23:16 florian |
* integration annuaire backoffice |
* |
* Revision 1.14 2006/10/05 13:53:54 florian |
* amélioration des fichiers sql |
* |