/trunk/client/bottin/cartographie.php |
---|
26,11 → 26,11 |
*@version 03 mai 2004 |
// +-----------------------------------------------------------------------------------------------+ |
// |
// $Id: cartographie.php,v 1.2 2005-11-24 16:17:52 florian Exp $ |
// $Id: cartographie.php,v 1.3 2006-04-04 12:23:05 florian Exp $ |
// FICHIER : $RCSfile: cartographie.php,v $ |
// AUTEUR : $Author: florian $ |
// VERSION : $Revision: 1.2 $ |
// DATE : $Date: 2005-11-24 16:17:52 $ |
// VERSION : $Revision: 1.3 $ |
// DATE : $Date: 2006-04-04 12:23:05 $ |
*/ |
include_once PAP_CHEMIN_RACINE.'/client/bottin/configuration/bottin.config.inc.php'; |
include_once INS_CHEMIN_APPLI.'configuration/cartographie.config.inc.php'; |
54,18 → 54,35 |
global $liste_zone_carte; |
//================================================================================================= |
$requete_01 = |
"SELECT CP_ID_Continent,count(cp_id_continent) AS nbr". |
" FROM ".INS_ANNUAIRE.", carto_PAYS". |
" WHERE ".INS_CHAMPS_PAYS." = cp_id_pays". |
" GROUP BY cp_id_continent"; |
//Gestion de la configuration |
$requete = 'SELECT * FROM carto_config WHERE cc_menu_id='.$_GET['menu']; |
$resultat = $GLOBALS['ins_db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
} |
if ($resultat->numRows()>0) { |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
//valeurs par defaut enregistrees dans la table |
$titre=$ligne['cc_titre_carto']; |
$nom_table1=$ligne['cc_table1']; |
$nom_table2=$ligne['cc_table2']; |
$nom_champs_pays=$ligne['cc_pays']; |
$nom_champs_cp=$ligne['cc_cp']; |
$requete_sql=$ligne['cc_sql']; |
} |
//================================================================================================= |
$requete_01 = 'SELECT CP_ID_Continent,count(cp_id_continent) AS nbr'. |
' FROM '.$nom_table1.', carto_PAYS'; |
if ($nom_table2!=0) $requete_01 .= ', '.$nom_table2; |
$requete_01 .= ' WHERE '.$nom_champs_pays.' = cp_id_pays'; |
if ($requete_sql!='') $requete_01 .= ' AND ('.$requete_sql.')'; |
$requete_01 .= ' GROUP BY cp_id_continent'; |
$resultat_01 = $GLOBALS['ins_db']->query($requete_01) ; |
if (DB::isError($resultat_01)) { |
die ($resultat_01->getMessage().'<br />'.$resultat_01->getDebugInfo()) ; |
} |
$tableau_ad_continent=array(); |
} |
$tableau_ad_continent=array(); |
while ($ligne_01 = $resultat_01->fetchRow(DB_FETCHMODE_OBJECT)) { |
$tableau_ad_continent[$ligne_01->CP_ID_Continent] = $ligne_01->nbr; |
89,13 → 106,13 |
} |
while ($ligne_02 = $resultat_02->fetchRow(DB_FETCHMODE_OBJECT)) { |
$requete_03 = |
'SELECT CP_ID_Pays, count(cp_id_pays) as nbr '. |
' FROM '.INS_ANNUAIRE.', carto_PAYS'. |
' WHERE '.INS_CHAMPS_PAYS.'= cp_id_pays'. |
' AND cp_id_continent = "'.$ligne_02->CC_ID_Continent.'"'. |
' GROUP BY cp_id_pays'; |
$requete_03 = 'SELECT CP_ID_Pays, count(cp_id_pays) as nbr '. |
' FROM '.$nom_table1.', carto_PAYS'; |
if ($nom_table2!=0) $requete_03 .= ', '.$nom_table2; |
$requete_03 .= ' WHERE '.$nom_champs_pays.'= cp_id_pays'; |
if ($requete_sql!='') $requete_03 .= ' AND ('.$requete_sql.')'; |
$requete_03 .= ' AND cp_id_continent = "'.$ligne_02->CC_ID_Continent.'"'. |
' GROUP BY cp_id_pays'; |
$resultat_03 = $GLOBALS['ins_db']->query($requete_03) ; |
if (DB::isError($resultat_03)) { |
die ($resultat_03->getMessage().'<br />'.$resultat_03->getDebugInfo()) ; |
102,7 → 119,6 |
} |
$tableau_ad_pays = array(); |
while ($ligne_03 = $resultat_03->fetchRow(DB_FETCHMODE_OBJECT)) { |
$tableau_ad_pays[$ligne_03->CP_ID_Pays] = $ligne_03->nbr; |
} |
117,48 → 133,27 |
$info_pays[$ligne_02->CC_ID_Continent]['tableau_valeurs_zone'] = $tableau_ad_pays; |
} |
//============================================================================================================ |
//récupération du numéro de département à partir du code postal |
$requete_cp = 'SELECT a_code_postal FROM '.INS_ANNUAIRE.' WHERE '.INS_CHAMPS_PAYS.' = "fr"'; |
$resultat_cp = $GLOBALS['ins_db']->query($requete_cp) ; |
if (DB::isError($resultat_cp)) { |
die(' |
<h2 class="erreur">Erreur de requête</h2>'. |
'<b>Requete : </b>'.$requete_cp. |
'<br/><br/><b>Erreur : </b>'.$resultat_cp->getMessage()); |
} |
$tableau_ad_dpt_france = array(); |
while ($ligne_cp = $resultat_cp->fetchRow(DB_FETCHMODE_ASSOC)) { |
if (preg_match("/^97|98[0-9]*/", $ligne_cp['a_code_postal'])) { |
$n_dpt = substr($ligne_cp['a_code_postal'], 0, 3) ; |
} else { |
$n_dpt = substr($ligne_cp['a_code_postal'], 0, 2) ; |
} |
$requete_04 = 'SELECT cd_id_departement '. |
' FROM '.INS_ANNUAIRE.', carto_DEPARTEMENT'. |
' WHERE '.INS_CHAMPS_PAYS.' = "fr"'. |
' AND cd_id_departement = '.$n_dpt; |
$resultat_04 = $GLOBALS['ins_db']->query($requete_04) ; |
if (DB::isError($resultat_04)) { |
die(' |
<H2 class="erreur">Erreur de requête</H2>'. |
'<b>Requete : </b>'.$requete_04. |
'<br/><br/><b>Erreur : </b>'.$resultat_04->getMessage()); |
} |
while ($ligne_04 = $resultat_04->fetchRow(DB_FETCHMODE_OBJECT)) { |
$tableau_ad_dpt_france[$ligne_04->cd_id_departement] = $resultat_04->numRows(); |
} |
} |
//if (!isset($_POST['historique_cartes']) && INS_ECHELLE_DEPART!='france') { |
$requete_04 = 'SELECT CD_ID_Departement, count(cd_id_departement) as nbr'. |
' FROM '.$nom_table1.', carto_DEPARTEMENT'. |
' WHERE '.$nom_champs_pays.' = "fr"'. |
' AND SUBSTRING('.$nom_champs_cp.' FROM 1 FOR 2) = cd_id_Departement'. |
' GROUP BY cd_id_Departement'; |
$resultat_04 = $GLOBALS['ins_db']->query ($requete_04) ; |
$tableau_ad_dpt_france = array(); |
while ($ligne_04 = $resultat_04->fetchRow(DB_FETCHMODE_OBJECT)) { |
$tableau_ad_dpt_france[$ligne_04->CD_ID_Departement] = $ligne_04->nbr; |
} |
$info_dpt_france['nom_table_zone'] = 'carto_DEPARTEMENT'; |
$info_dpt_france['nom_chp_id_zone'] = 'CD_ID_Departement'; |
$info_dpt_france['nom_chp_nom_zone'] = 'CD_Intitule_departement'; |
$info_dpt_france['nom_chp_rouge'] = 'CD_Couleur_R'; |
$info_dpt_france['nom_chp_vert'] = 'CD_Couleur_V'; |
$info_dpt_france['nom_chp_bleu'] = 'CD_Couleur_B'; |
$info_dpt_france['nom_chp_zone_sup'] = 'CD_ID_Pays'; |
$info_dpt_france['tableau_valeurs_zone'] = $tableau_ad_dpt_france; |
//} |
$info_dpt_france['nom_table_zone'] = 'carto_DEPARTEMENT'; |
$info_dpt_france['nom_chp_id_zone'] = 'CD_ID_Departement'; |
$info_dpt_france['nom_chp_nom_zone'] = 'CD_Intitule_departement'; |
$info_dpt_france['nom_chp_rouge'] = 'CD_Couleur_R'; |
$info_dpt_france['nom_chp_vert'] = 'CD_Couleur_V'; |
$info_dpt_france['nom_chp_bleu'] = 'CD_Couleur_B'; |
$info_dpt_france['nom_chp_zone_sup'] = 'CD_ID_Pays'; |
$info_dpt_france['tableau_valeurs_zone'] = $tableau_ad_dpt_france; |
//============================================================================================================ |
165,11 → 160,13 |
//============================================================================================================ |
// On cree tout d'abord l'arborescence |
$monde = new Carto_Carte('continent', '', 'Monde', 'monde_masque5c.png', 'monde5c.png', INS_CHEMIN_APPLI.'presentations/fonds/', $info_continent); |
$monde->definirCouleurs('255', '255', '255','255', '250', '130','255', '204', '0','255', '153', '0') ; |
$monde->historique_cartes = $historique_cartes; |
$monde = new Carto_Carte('continent', '', 'Monde', 'monde_masque5c.png', 'monde5c.png', INS_CHEMIN_APPLI.'presentations/fonds/', $info_continent); |
$monde->definirCouleurs('255', '255', '255','255', '250', '130','255', '204', '0','255', '153', '0') ; |
if (isset($_POST['historique_cartes'])) { |
$monde->historique_cartes = $_POST['historique_cartes']; |
} else { |
$monde->historique_cartes = INS_ECHELLE_DEPART; |
} |
$monde->image_x = $image_x; |
$monde->image_y = $image_y; |
$monde->liste_zone_carte = $liste_zone_carte; |
186,10 → 183,8 |
$resultat_05 = $GLOBALS['ins_db']->query ($requete_05) ; |
if (DB::isError($resultat_05)) { |
die ($resultat_05->getMessage().'<br />'.$resultat_05->getDebugInfo()) ; |
} |
$ligne_05 = $resultat_05->fetchRow(DB_FETCHMODE_OBJECT); |
} |
$ligne_05 = $resultat_05->fetchRow(DB_FETCHMODE_OBJECT); |
$monde->ajouterFils($ligne_05->CDC_ID_Carte, $ligne_05->CDC_ID_Zone_geo_carte, $ligne_05->CDC_Titre_carte, |
$ligne_05->CDC_Carte_masque, $ligne_05->CDC_Carte_fond, $valeur); |
$monde->fils[$ligne_05->CDC_ID_Carte]->definirCouleurs ('255', '255', '255','255', '250', '130','255', '204', '0','255', '153', '0') ; |
201,9 → 196,7 |
// Une fois l'arborescence créée on lance la methode donnerFormulaireImage() pour recuperer la carte |
// (dans $img). S'il n'y a pas de carte a afficher donnerFormulaireImage() renvoi false. On peut alors recuperer |
// le niveau ou on en est grace a $monde->historique (du type continent*namerique*ca). |
$res = ''; |
$img = false; |
if ($mailer == 1 || $fin == true) { |
$objet_carte = $_SESSION['carte'] ; |
211,25 → 204,33 |
else { |
$img = $monde->donnerFormulaireImage(); |
} |
// On teste donc img |
// Quoi qu'il arrive, on ouvre la balise formulaire |
if ($titre!='') $res = '<h1>'.$titre.'</h1>'."\n"; |
else $res = '<h1>'.INS_CARTOGRAPHIE.'</h1>'."\n"; |
$res .= '<form action="'.$monde->url.'" method="post">'."\n"; |
if ((INS_AFFICHE_ECHELLE)and($img)) { |
$historique_carte = new Carto_HistoriqueCarte ($monde, '>', 'chemin_carto'); |
$res .= $historique_carte->afficherHistoriqueCarte()."\n" ; |
} |
if (!$img ) { |
include 'bibliotheque/cartographie.fonct.liste_inscrit.php'; |
//include 'bibliotheque/cartographie.fonct.liste_inscrit.php'; |
$res .= carto_liste_fiches($monde, $nom_table1, $nom_table2, $nom_champs_pays, $nom_champs_cp, $requete_sql); |
return $res; |
} |
else { |
// Quoi qu'il arrive, on ouvre la balise formulaire |
$res = '<form action="'.$monde->url.'" method="post">'."\n"; |
$historique_carte = new Carto_HistoriqueCarte ($monde, '>', 'chemin_carto'); |
$res .= $historique_carte->afficherHistoriqueCarte()."\n" ; |
$res .= $img; |
$res .= '</form>'."\n"; |
$res .= '<p style="text-align: center;">'."\n"; |
} else { |
$res .= $img; |
$res .= '<p class="zone_info">'."\n"; |
$res .= '<strong>'.INS_CLIQUER_ACCEDER.'</strong><br />'."\n"; |
$res .= INS_COULEUR."\n".'</p>'."\n"; |
return $res; |
$res .= INS_COULEUR."\n".'</p>'."\n"; |
} |
$res .= '</form>'."\n"; |
return $res; |
//---------------------------------------------------------------------------------------------------------------------- |
// Cas ou la carto n'a pas encore ete configuree |
} else { |
return '<p class="zone_alert">'.INS_FAUT_CONFIGURER_CARTO.'</p>'."\n"; |
} |
} |
236,6 → 237,9 |
//-- Fin du code source ------------------------------------------------------------ |
/* |
* $Log: not supported by cvs2svn $ |
* Revision 1.2 2005/11/24 16:17:52 florian |
* changement template inscription + modifs carto |
* |
* Revision 1.1 2005/09/22 14:02:49 ddelon |
* nettoyage annuaire et php5 |
* |
/trunk/client/bottin/langues/annuaire.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: annuaire.langue.fr.inc.php,v 1.2 2005-10-03 09:37:56 alexandre_tb Exp $ |
// CVS : $Id: annuaire.langue.fr.inc.php,v 1.3 2006-04-04 12:23:05 florian Exp $ |
/** |
* Fichier de traduction en français de l'application inscription |
* |
31,48 → 31,15 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.2 $ $Date: 2005-10-03 09:37:56 $ |
*@version $Revision: 1.3 $ $Date: 2006-04-04 12:23:05 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
define ("ANN_NOM", "Nom") ; |
define ("ANN_PRENOM", "Prénom") ; |
define ("ANN_VILLE", "Ville") ; |
define ("ANN_PAYS", "Pays") ; |
define ('ANN_PAS_D_INSCRITS', 'Pas d\'inscrits commençant par cette lettre dans l\'annuaire.'); |
define ("ANN_LANGUES_PARLES", "Langues parlés :") ; |
define ("ANN_EMAIL", "Courriel :") ; |
define ("ANN_MOT_DE_PASSE", "Mot de passe :") ; |
define ("ANN_REPETE_MOT_DE_PASSE", "Répéter le mot de passe :") ; |
define ("ANN_RETABLIR", "Rétablir") ; |
define ("ANN_VALIDER", "Valider") ; |
define ("ANN_MESSAGE_BIENVENU", "Vous êtes inscrit au Réseau") ; |
define ("ANN_CLIQUEZ_LETTRE", 'Cliquez sur une lettre pour voir les membres du réseau.') ; |
define ("ANN_LISTE_INSCRIT_LETTRE", "Liste des inscrits à la lettre") ; |
define ("ANN_TITRE", 'Annuaire du réseau') ; |
define ("ANN_CHECK_UNCHECK", "Cocher les cases pour sélectionner votre destinataire ou cocher / décocher tout") ; |
define ("ANN_ENVOYER_MAIL", "Envoyer un message aux personnes cochées") ; |
define ("ANN_SUJET", "Sujet") ; |
define ("ANN_MESSAGE", "Message") ; |
define ("ANN_ENVOYER", "Envoyer") ; |
define ("ANN_CLIC_CONFIRMATION", "Cliquez sur OK pour confirmer") ; |
define ("ANN_PAS_D_INSCRIT", "Pas d'inscrit") ; |
define ('ANN_DATE','Date d\'inscription'); |
// ========================= Labels pour les mails ============================ |
define ("ANN_VERIF_MAIL_COCHE", "Veuillez cocher au moins un destinataire pour votre mail" ); |
define ("ANN_VERIF_TITRE", "Votre message doit comporter un titre <i>et</i> un corps") ; |
define ("ANN_PIED_MESSAGE", "\n---------------------------------------------------------------------------". |
"\nCe message vous est envoyé par l'intermédiaire du site Internet". |
"\n(http://www.domaine.org) du réseau , ". |
"\nauquel vous êtes inscrit. ". |
"\nNe répondez pas à ce message." ) ; |
define ('ANN_LOGUEZ_VOUS', 'Vous devez être inscrit au réseau pour accéder à l\'annuaire'); |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.2 2005/10/03 09:37:56 alexandre_tb |
* ajout d'un label |
* |
* Revision 1.1 2005/09/22 14:02:49 ddelon |
* nettoyage annuaire et php5 |
* |
/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.7 2006-02-28 16:26:40 alexandre_tb Exp $ |
// CVS : $Id: bottin.langue_fr.inc.php,v 1.8 2006-04-04 12:23:05 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.7 $ $Date: 2006-02-28 16:26:40 $ |
*@version $Revision: 1.8 $ $Date: 2006-04-04 12:23:05 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
112,6 → 112,10 |
<li> recevoir un bulletin électronique d\'informations.</li></ul>') ; |
define ('INS_ERREUR_SAISIE', 'Erreur de saisie') ; |
define ('INS_VEUILLEZ_CORRIGER', 'Veuillez corriger.') ; |
define ('INS_CARTOGRAPHIE','Cartographie'); |
define ('INS_CONFIG_MENU','Configuration de la cartographie du menu'); |
define ('INS_TITRE_CARTO','Titre à afficher dans le site pour cette cartographie'); |
define ('INS_FAUT_CONFIGURER_CARTO','Vous ne pouvez pas accéder à cette cartographie car elle n\'a pas encore été configurée.'); |
//============= L'envoie du mot de passe perdu par mail ============================= |
define ('INS_NOUVEAU_MOT_DE_PASSE', 'Votre nouveau mot de passe sur Educ-Envir.org et Ecole-et-Nature.org') ; |
159,7 → 163,7 |
define ('INS_MESSAGE', 'Message') ; |
define ('INS_ENVOYER', 'Envoyer') ; |
define ('INS_LABEL_PROJET', 'en tant que membre du réseau'); |
define ('INS_COULEUR', 'La couleur est proportionnelle au nombre d\'inscrits.') ; |
define ('INS_COULEUR', 'La couleur est proportionnelle au nombre de fiches.') ; |
define ('INS_MONDE', 'Monde') ; |
define ('INS_ECHELLE', 'Echelle : ') ; |
define ('INS_CLIQUER_ACCEDER', 'Cliquer sur la carte pour zoomer ou accéder aux informations ') ; |
176,7 → 180,7 |
'utiles à transmettre au demandeur.'.'\n'. |
'----------------------------------------------------------------------------') ; |
define ('INS_NO_DESTINATAIRE', '<br /><br />Veuillez cocher au moins un destinataire pour votre mail<br />'); |
define ('INS_VOUS_DEVEZ_ETRE_INSCRIT', 'Vous devez être inscrit pour pouvoir envoyer des messages électronique aux personnes ou structure de l\'annuaire.<br />Identifiez-vous ou inscrivez-vous sur la page <a href="http://educ-envir.org/papyrus.php?site=1&menu=29">Inscription</a> du site.'); |
define ('INS_VOUS_DEVEZ_ETRE_INSCRIT', 'Vous devez être inscrit pour pouvoir accèder aux informations.<br />Identifiez-vous ou inscrivez-vous sur la page <a href="/Inscription">inscription</a> du site.'); |
define ('INS_SURVEILLANCE_ENVOI_MAIL', 'Surveillance envois de mails: '); |
define ('INS_ENREGISTRER_ET_QUITTER', 'Enregistrer et quitter'); |
define ('INS_TABLE', 'Nom de la table dans la base SQL contenant des informations à cartographier'); |
185,12 → 189,66 |
define ('INS_NOM_CHAMPS_CP', 'Nom du champs représentant le code postal'); |
define ('INS_REQUETE_SQL_SUPPLEMENTAIRE', 'Complément de requète SQL (conditions supplémentaires pour le WHERE)'); |
define ('INS_PAS_NECESSAIRE', 'Pas nécéssaire'); |
define ('INS_ANNUAIRE_MEMBRES','Annuaire des inscrits au site'); |
define ('INS_RECHERCHE_ANNUAIRE_DES_INSCRITS','Rechercher dans l\'annuaire des inscrits'); |
define ('INS_DIX_DERNIERES_INSCRIPTIONS','Les dix dernières inscriptions'); |
define ('INS_RECHERCHER','Rechercher'); |
define ('INS_PERSONNES_OU_STRUCTURES','des personnes ou des structures'); |
define ('INS_PERSONNES','uniquement des personnes'); |
define ('INS_STRUCTURES','uniquement des structures'); |
define ('INS_JE_RECHERCHE','Je recherche'); |
define ('INS_DEPARTEMENT_POUR_LA_FRANCE','Départements pour le pays France'); |
define ('INS_TOUS_DEPARTEMENTS','tous les départements'); |
define ('INS_TOUS_PAYS','tous les pays'); |
define ('INS_NOM_ANNUAIRE','Nom (voire prénom) de la personne ou de la structure recherchée'); |
define ('INS_ENTREES','entrées trouvées'); |
define ('INS_RESULTATS_RECHERCHE','Les résultats de la recherche'); |
define ('INS_PAS_DE_RESULTATS','Pas de résultats pour cette recherche, veuillez élargir vos critères de recherche.'); |
define ('INS_PAS_IDENTIFIE','Vous pouvez consulter la liste des inscrits, mais pas leur envoyer de message mail. Pour pouvoir les contacter par mail, il faudrait <a href="/Inscription">vous identifier ou vous inscrire au site</a>.'); |
define ('INS_CLIQUER_ELEMENT_LISTE','Cliquer sur un des éléments de la liste pour avoir ses informations détaillées.'); |
define ('INS_PRESENTATION', 'Présentation'); |
define ('INS_ABONNEMENTS', 'Abonnements'); |
define ('INS_ACTUALITES', 'Actualités'); |
define ('INS_RESSOURCES', 'Ressources'); |
define ('INS_COMPETENCES', 'Compétences'); |
//define ('ANN_PAS_D_INSCRITS', 'Pas d\'inscrits commençant par cette lettre dans l\'annuaire.'); |
//define ("ANN_LANGUES_PARLES", "Langues parlés :") ; |
//define ("ANN_EMAIL", "Courriel :") ; |
//define ("ANN_MOT_DE_PASSE", "Mot de passe :") ; |
//define ("ANN_REPETE_MOT_DE_PASSE", "Répéter le mot de passe :") ; |
//define ("ANN_RETABLIR", "Rétablir") ; |
//define ("ANN_VALIDER", "Valider") ; |
//define ("ANN_MESSAGE_BIENVENU", "Vous êtes inscrit au Réseau") ; |
//define ("ANN_CLIQUEZ_LETTRE", 'Cliquez sur une lettre pour voir les membres du réseau.') ; |
//define ("ANN_LISTE_INSCRIT_LETTRE", "Liste des inscrits à la lettre") ; |
//define ("ANN_TITRE", 'Annuaire du réseau') ; |
//define ("ANN_CHECK_UNCHECK", "Cocher les cases pour sélectionner votre destinataire ou cocher / décocher tout") ; |
//define ("ANN_ENVOYER_MAIL", "Envoyer un message aux personnes cochées") ; |
//define ("ANN_SUJET", "Sujet") ; |
//define ("ANN_MESSAGE", "Message") ; |
//define ("ANN_ENVOYER", "Envoyer") ; |
//define ("ANN_CLIC_CONFIRMATION", "Cliquez sur OK pour confirmer") ; |
//define ("ANN_PAS_D_INSCRIT", "Pas d'inscrit") ; |
//define ('ANN_DATE','Date d\'inscription'); |
//// ========================= Labels pour les mails ============================ |
// |
//define ("ANN_VERIF_MAIL_COCHE", "Veuillez cocher au moins un destinataire pour votre mail" ); |
//define ("ANN_VERIF_TITRE", "Votre message doit comporter un titre <i>et</i> un corps") ; |
//define ("ANN_PIED_MESSAGE", "\n---------------------------------------------------------------------------". |
// "\nCe message vous est envoyé par l'intermédiaire du site Internet". |
// "\n(http://www.domaine.org) du réseau , ". |
// "\nauquel vous êtes inscrit. ". |
// "\nNe répondez pas à ce message." ) ; |
// |
//define ('ANN_LOGUEZ_VOUS', 'Vous devez être inscrit au réseau pour accéder à l\'annuaire'); |
// |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.7 2006/02/28 16:26:40 alexandre_tb |
* changement d'une entité |
* |
* Revision 1.6 2006/02/28 14:07:23 alexandre_tb |
* changement de la constante de langue |
* |
/trunk/client/bottin/cartographie.admin.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: cartographie.admin.php,v 1.2 2005-11-24 16:17:52 florian Exp $ |
// CVS : $Id: cartographie.admin.php,v 1.3 2006-04-04 12:23:05 florian Exp $ |
/** |
* |
*@package bazar |
27,7 → 27,7 |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.2 $ $Date: 2005-11-24 16:17:52 $ |
*@version $Revision: 1.3 $ $Date: 2006-04-04 12:23:05 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
// +------------------------------------------------------------------------------------------------------+ |
52,31 → 52,89 |
function afficherContenuCorps() |
{ |
/** Inclusion du fichier de configuration de cette application.*/ |
require_once PAP_CHEMIN_RACINE.'client/bottin/configuration/bottin.config.inc.php'; |
require_once INS_CHEMIN_APPLI.'configuration/cartographie.config.inc.php'; |
require_once PAP_CHEMIN_RACINE.'api/pear/HTML/QuickForm.php' ; |
require_once PAP_CHEMIN_RACINE.'client/bottin/configuration/bottin.config.inc.php'; |
require_once INS_CHEMIN_APPLI.'configuration/cartographie.config.inc.php'; |
require_once 'HTML/QuickForm.php' ; |
//------------------------------------------------------------------------------------------------------------------- |
// Initialisation des attributs |
$this->objet_pear_auth = $GLOBALS['_GEN_commun']['pear_auth']; |
$this->objet_pear_db = $GLOBALS['_GEN_commun']['pear_db']; |
$this->objet_pear_db = $GLOBALS['ins_db']; |
$this->objet_pear_url = $GLOBALS['_GEN_commun']['url']; |
$this->sortie_xhtml = ''; |
$this->sortie_xhtml = '<h1>'.INS_CONFIG_MENU.' '.$_GET['adme_menu_id'].'</h1><br />'."\n"; |
//------------------------------------------------------------------------------------------------------------------- |
// Création du formulaire |
$this->objet_pear_url->addQueryString('adme_site_id', 2); |
$this->objet_pear_url->addQueryString('adme_menu_id', 14); |
// Gestion des boutons de l'interface |
if (isset($_POST['afficheur_annuler'])) { |
return false; |
} else if (isset($_POST['afficheur_enregistrer_quitter'])) { |
// Sauvegarde paramêtres carto |
//on vérifie l'existence de la configuration, pour savoir si l'on fait un INSERT ou un UPDATE |
$requete = 'SELECT cc_menu_id FROM carto_config WHERE cc_menu_id='.$_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()) ; |
} |
if ($resultat->numRows()>0) { |
$requete = 'UPDATE carto_config SET cc_titre_carto="'.$_POST['titre_carto'].'", cc_table1="'.$_POST['nom_table1'].'", cc_table2="'.$_POST['nom_table2']. |
'", cc_pays="'.$_POST['nom_champs_pays'].'", cc_cp="'.$_POST['nom_champs_cp']. |
'", cc_sql="'.$_POST['requete_sql'].'" WHERE cc_menu_id='.$_GET['adme_menu_id']; |
} else { |
$requete = 'INSERT INTO carto_config (cc_titre_carto, cc_menu_id, cc_table1, cc_table2, cc_pays, cc_cp, cc_sql)'. |
' VALUES ( "'.$_POST['titre_carto'].'", '.$_GET['adme_menu_id'].', "'.$_POST['nom_table1'].'", "'.$_POST['nom_table2']. |
'", "'.$_POST['nom_champs_pays'].'", "'.$_POST['nom_champs_cp'].'", "'.$_POST['requete_sql'].'")'; |
} |
$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 carto_config |
$requete = 'SELECT * FROM carto_config WHERE cc_menu_id='.$_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()) ; |
} |
$valeurs_par_defaut = array(); |
if ($resultat->numRows()>0) { |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
//valeurs par defaut enregistrees dans la table |
$valeurs_par_defaut['titre_carto']=$ligne['cc_titre_carto']; |
$valeurs_par_defaut['nom_table1']=$ligne['cc_table1']; |
$valeurs_par_defaut['nom_table2']=$ligne['cc_table2']; |
$valeurs_par_defaut['nom_champs_pays']=$ligne['cc_pays']; |
$valeurs_par_defaut['nom_champs_cp']=$ligne['cc_cp']; |
$valeurs_par_defaut['requete_sql']=$ligne['cc_sql']; |
} |
} else { |
//valeurs par defaut pour afficher une carto des structures |
$valeurs_par_defaut['titre_carto']=''; |
$valeurs_par_defaut['nom_table1']=INS_ANNUAIRE; |
$valeurs_par_defaut['nom_table2']=0; |
$valeurs_par_defaut['nom_champs_pays']=INS_CHAMPS_PAYS; |
$valeurs_par_defaut['nom_champs_cp']=INS_CHAMPS_CODE_POSTAL; |
$valeurs_par_defaut['requete_sql']='a_structure=1'; |
} |
//-------------------------------------------------------------------------------------------------------------- |
// Gestion du formulaire |
$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_carto', 'post', str_replace('&', '&', $this->objet_pear_url->getUrl())); |
$squelette =& $form->defaultRenderer(); |
$squelette->setFormTemplate("\n".'<form{attributes}>'."\n".'<ul>'."\n".'{content}'."\n".'</ul>'."\n".'</form>'."\n"); |
$squelette->setElementTemplate( '<li>'."\n". |
'{label}'."\n". |
'{element}'."\n". |
$squelette->setFormTemplate("\n".'<form{attributes}>'."\n".'<table>'."\n".'{content}'."\n".'</table>'."\n".'</form>'."\n"); |
$squelette->setElementTemplate( '<tr>'."\n". |
'<td style="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". |
'</li>'."\n"); |
' : </td>'."\n". |
'<td style="padding:5px;text-align:left;">{element}</td>'."\n". |
'</tr>'."\n" ); |
$form->addElement('text', 'titre_carto', INS_TITRE_CARTO); |
$requete = 'SHOW TABLES FROM '.$this->objet_pear_db->dsn['database']; |
$resultat = $this->objet_pear_db->query($requete) ; |
if (DB::isError($resultat)) { |
88,40 → 146,26 |
} |
$javascript= array('onchange' => 'javascript:this.form.submit();'); |
$form->addElement('select', 'nom_table1', INS_TABLE, $option_tables, $javascript); |
$requete = $requete = 'SELECT * FROM carto_config WHERE cc_menu_id='.$_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()) ; |
} |
echo '<pre>'.print_r($_POST, true).'</pre>'; |
if (($resultat->numRows()>0)or(isset($_POST['nom_table1']))) { |
if (isset($_POST['nom_table1'])) { |
$ligne['cc_table1']=$_POST['nom_table1']; |
} |
$requete = $requete = 'SHOW COLUMNS FROM '.$ligne['cc_table1']; |
$resultat = $this->objet_pear_db->query($requete) ; |
if (DB::isError($resultat)) { |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
} |
$option_champs = array(); |
$i=0; |
if (isset($_POST['nom_table1'])) { |
$table=$_POST['nom_table1']; |
} else { |
$table=$valeurs_par_defaut['nom_table1']; |
} |
$requete = 'SHOW COLUMNS FROM '.$table; |
$resultat = $this->objet_pear_db->query($requete) ; |
if (DB::isError($resultat)) { |
die ("Echec de la requete<br />".$resultat->getMessage()."<br />".$resultat->getDebugInfo()) ; |
} |
$option_champs = array(); |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$option_champs[$i] = $ligne['Field']; |
$i++; |
$option_champs[$ligne['Field']] = $ligne['Field']; |
} |
$form->addElement('select', 'nom_champs_pays', INS_NOM_CHAMPS_PAYS, $option_champs); |
$form->addElement('select', 'nom_champs_cp', INS_NOM_CHAMPS_CP, $option_champs); |
$option_tables[0] = INS_PAS_NECESSAIRE; |
$form->addElement('select', 'nom_table2', INS_TABLE_SUPPLEMENTAIRE, $option_tables); |
$form->addElement('text', 'requete_sql', INS_REQUETE_SQL_SUPPLEMENTAIRE); |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
//valeurs par defaut |
} |
} |
$form->addElement('select', 'nom_champs_pays', INS_NOM_CHAMPS_PAYS, $option_champs); |
$form->addElement('select', 'nom_champs_cp', INS_NOM_CHAMPS_CP, $option_champs); |
$option_tables[0] = INS_PAS_NECESSAIRE; |
$form->addElement('select', 'nom_table2', INS_TABLE_SUPPLEMENTAIRE, $option_tables); |
$form->addElement('text', 'requete_sql', INS_REQUETE_SQL_SUPPLEMENTAIRE); |
$liste_bouton_debut = '<ul class="liste_bouton">'."\n"; |
$form->addElement('html', $liste_bouton_debut); |
$form->addElement('submit', 'afficheur_enregistrer_quitter', INS_ENREGISTRER_ET_QUITTER); |
128,8 → 172,8 |
$form->addElement('submit', 'afficheur_annuler', INS_ANNULER); |
$liste_bouton_fin = '</ul>'."\n"; |
$form->addElement('html', $liste_bouton_fin); |
$this->sortie_xhtml .= $form->toHTML()."\n"; |
$form->setDefaults($valeurs_par_defaut); |
$this->sortie_xhtml .= $form->toHTML()."\n"; |
return $this->sortie_xhtml; |
} |
138,5 → 182,4 |
// +------------------------------------------------------------------------------------------------------+ |
// | PIED du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
?> |
?> |
/trunk/client/bottin/configuration/cartographie.config.inc.php |
---|
10,10 → 10,14 |
// | Auteur : Alexandre Granier <alexandre@tela-botanica.org> | |
// +----------------------------------------------------------------------------+ |
// |
// $Id: cartographie.config.inc.php,v 1.1 2005-09-22 14:02:49 ddelon Exp $ |
// $Id: cartographie.config.inc.php,v 1.2 2006-04-04 12:23:05 florian Exp $ |
//==================================== CONSTANTES ================================== |
// Constantes |
//================================================================================== |
define ('INS_MAIL_ADMIN', 'florian@ecole-et-nature.org') ; // L'email de l'administrateur de la carto pour envoyer un message en double |
define ('INS_NECESSITE_LOGIN', 0) ; // Precise si les infos sont visibles pour tous (mettre 0) ou pour les identifies seulement (mettre 1) |
define ('INS_ECHELLE_DEPART', 'europe') ; // Affiche l'échelle de départ à afficher pour la carto |
define ('INS_AFFICHE_ECHELLE', 1) ; // Affiche l'échelle de la carto (mettre 1) ou non (mettre 0) |
define ('INS_AFFICHE_ZONE_ROUGE', 1) ; // Affiche la liste déroulante permettant de mettre une zone au choix en rouge pour la reconnaitre (mettre 1) ou non (mettre 0) |
?> |
/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.6 2006-03-15 11:04:27 alexandre_tb Exp $ |
// CVS : $Id: bottin.config.inc.php,v 1.7 2006-04-04 12:23:05 florian Exp $ |
/** |
* Fichier de configuration de l'application d'inscription/annuaire |
* |
32,7 → 32,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.6 $ $Date: 2006-03-15 11:04:27 $ |
*@version $Revision: 1.7 $ $Date: 2006-04-04 12:23:05 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
//================================= CONSTANTES DB ================================== |
41,7 → 41,7 |
/** 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'); |
define ('INS_TABLE_PAYS', 'carto_PAYS'); |
/** Champs identifiant */ |
define ('INS_CHAMPS_ID', 'a_id'); |
/** Champs adresse mail */ |
50,6 → 50,8 |
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 */ |
77,11 → 79,11 |
/** 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'); |
define ('INS_CHAMPS_ID_PAYS', 'CP_ID_Pays'); |
/** Champs nom du pays de la table des pays*/ |
define ('INS_CHAMPS_LABEL_PAYS', 'gip_nom_pays_traduit'); |
define ('INS_CHAMPS_LABEL_PAYS', 'CP_Intitule_pays'); |
/** Champs qui contient la localisation */ |
define ('INS_CHAMPS_I18N_PAYS', 'gip_id_i18n') ; |
define ('INS_CHAMPS_I18N_PAYS', 'CP_Langue_intitule') ; |
/** 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*/ |
231,6 → 233,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.6 2006/03/15 11:04:27 alexandre_tb |
* ajout du tableau mail_admin qui contient la liste des administrateurs qui recevront un double du mail d'inscription |
* |
* Revision 1.5 2005/12/19 13:16:38 alexandre_tb |
* généricité du fichier de config |
* |
/trunk/client/bottin/configuration/annuaire.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: annuaire.config.inc.php,v 1.1 2005-09-22 14:02:49 ddelon Exp $ |
// CVS : $Id: annuaire.config.inc.php,v 1.2 2006-04-04 12:23:05 florian Exp $ |
/** |
* Fichier de configuration de l'annuaire |
* |
31,18 → 31,19 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.1 $ |
*@version $Revision: 1.2 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
include_once INS_CHEMIN_APPLI.'langues/annuaire.langue.'.INS_LANGUE_DEFAUT.'.inc.php'; //appel du fichier de constantes des langues |
/** tableau contenant dans l'ordre les labels des champs à afficher dans l'annuaire*/ |
$GLOBALS['annuaire_champs_visibles']['label_champs']= array (ANN_NOM,ANN_PRENOM,ANN_VILLE,ANN_DATE); |
/** tableau contenant dans l'ordre les champs à afficher dans l'annuaire*/ |
$GLOBALS['annuaire_champs_visibles']['champs_db']= array (INS_CHAMPS_NOM,INS_CHAMPS_PRENOM,INS_CHAMPS_VILLE,INS_CHAMPS_DATE); |
//include_once INS_CHEMIN_APPLI.'langues/annuaire.langue.'.INS_LANGUE_DEFAUT.'.inc.php'; //appel du fichier de constantes des langues |
define ('INS_NECESSITE_LOGIN', 0) ; // Precise si les infos sont visibles pour tous (mettre 0) ou pour les identifies seulement (mettre 1) |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.1 2005/09/22 14:02:49 ddelon |
* nettoyage annuaire et php5 |
* |
* Revision 1.4 2005/09/22 13:30:49 florian |
* modifs pour compatibilité XHTML Strict + corrections de bugs (mais ya encore du boulot!!) |
* |
/trunk/client/bottin/inscription.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: inscription.php,v 1.12 2006-03-15 11:05:45 alexandre_tb Exp $ |
// CVS : $Id: inscription.php,v 1.13 2006-04-04 12:23:05 florian Exp $ |
/** |
* Inscription |
* |
32,7 → 32,7 |
//Autres auteurs : |
*@author Florian SCHMITT <florian@ecole-et-nature.org> |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.12 $ $Date: 2006-03-15 11:05:45 $ |
*@version $Revision: 1.13 $ $Date: 2006-04-04 12:23:05 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
123,7 → 123,7 |
} else { |
$formulaire->addElement('hidden', 'action', 'inscription_v') ; |
$formulaire->setDefaults(array('pays' => 'FR', 'visible' => 1)); |
$formulaire->setDefaults(array('pays' => 'fr', 'visible' => 1,'lettre'=>1)); |
} |
} |
216,6 → 216,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.12 2006/03/15 11:05:45 alexandre_tb |
* ajout de l'action caché inscription_v lors du réaffichage du formulaire après erreur de saisie. |
* |
* Revision 1.11 2006/03/02 14:10:35 alexandre_tb |
* correction du bug desinscription wikini |
* |
/trunk/client/bottin/annuaire.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.php,v 1.3 2005-10-03 09:38:42 alexandre_tb Exp $ |
// CVS : $Id: annuaire.php,v 1.4 2006-04-04 12:23:05 florian Exp $ |
/** |
* programme principal du module annuaire |
* |
32,7 → 32,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.3 $ |
*@version $Revision: 1.4 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
48,6 → 48,14 |
} |
include_once INS_CHEMIN_APPLI."langues/annuaire.langue.".$GLOBALS['lang'].".inc.php" ; |
if (isset($_REQUEST['voir_fiche'])) { |
//---------------le menu de l'appli----------- |
function afficherContenuNavigation () { |
$res =inscription_onglets(); |
return $res ; |
} |
} |
/** |
* Renvoie le code HTML de l'application |
* |
54,34 → 62,33 |
* @return string HTML |
*/ |
function afficherContenuCorps () { |
$res = '<h1 class="annuaire_titre1">'.ANN_TITRE.'</h1>'."\n" ; |
if (!$GLOBALS['AUTH']->getAuth()) { |
$res .= ANN_LOGUEZ_VOUS ; |
if ( isset($_GET['voir_fiche']) or isset($_GET['voir_abonnement']) or isset($_GET['voir_actus']) or isset($_GET['voir_ressources']) or isset($_GET['voir_competences']) ) { |
include_once INS_CHEMIN_APPLI.'bibliotheque/inscription.fonct.php'; |
include_once INS_CHEMIN_APPLI.'bibliotheque/inscription.class.php'; |
if ( isset($_GET['voir_fiche']) ) { |
$res=info($_GET['voir_fiche'], 'fiche'); |
} elseif (isset($_GET['voir_abonnement'])) { |
} elseif (isset($_GET['voir_actus'])) { |
} elseif (isset($_GET['voir_ressources'])) { |
} elseif (isset($_GET['voir_competences'])) { |
} |
} else { |
// Le code javascript des cases à cocher |
$java = |
'function setCheckboxes(the_form) { |
var do_check = document.forms[the_form].elements[\'selecttotal\'].checked; |
var elts = document.forms[the_form].elements[\'select[]\']; |
var elts_cnt = (typeof(elts.length) != \'undefined\') |
? elts.length |
: 0; |
if (elts_cnt) { |
for (var i = 0; i < elts_cnt; i++) { |
elts[i].checked = do_check; |
} // Fin for |
} else { |
elts.checked = do_check; |
}// Fin if... else |
return true; |
} // Fin de la fonction setCheckboxes()'; |
GEN_stockerCodeScript($java) ; |
$res .= '<h2 class="annuaire_titre2">'.ANN_CLIQUEZ_LETTRE.'</h2>'."\n"; |
// S'il y a un mail a envoyé, on l'envoie |
if (isset($_POST['select']) && is_array ($_POST['select'])) $res .= envoie_mail_depuis_annuaire() ; |
$res .= parcourirAnnu() ; |
$res = '<h1 class="annuaire_titre1">'.INS_ANNUAIRE_MEMBRES.'</h1>'."\n" ; |
if (!$GLOBALS['AUTH']->getAuth()&&INS_NECESSITE_LOGIN) { |
$res .= '<p class="zone_alert">'.INS_VOUS_DEVEZ_ETRE_INSCRIT.'</p>'."\n" ; |
} else { |
// S'il y a un mail a envoyé, on l'envoie |
if (isset($_POST['select']) && is_array ($_POST['select'])) $res .= envoie_mail_depuis_annuaire() ; |
//affichage du formulaire de recherche |
$res .= Annuaire_recherche() ; |
} |
} |
return $res; |
} |
88,6 → 95,9 |
/**------------------------------------------------------------------------------ |
* $Log: not supported by cvs2svn $ |
* Revision 1.3 2005/10/03 09:38:42 alexandre_tb |
* Lorsque non loggué, on renvoie un message et non un formulaire |
* |
* Revision 1.2 2005/09/29 16:07:51 alexandre_tb |
* En cours de production. |
* |
/trunk/client/bottin/bibliotheque/cartographie.fonct.liste_inscrit.php |
---|
9,23 → 9,23 |
// | Auteur : Alexandre Granier <alexandre@tela-botanica.org> | |
// +--------------------------------------------------------------------------------+ |
// |
// $Id: cartographie.fonct.liste_inscrit.php,v 1.1 2005-09-22 14:02:49 ddelon Exp $ |
// $Id: cartographie.fonct.liste_inscrit.php,v 1.2 2006-04-04 12:23:05 florian Exp $ |
global $HTTP_USER_AGENT; |
$classe_titre = 'titlePage' ; |
$javascript = "function confirmer () |
$javascript = 'function confirmer () |
{ |
if (window.confirm ('Cliquez sur OK pour confirmer.')) { |
if (window.confirm (\'Cliquez sur OK pour confirmer.\')) { |
window.formmail.submit(); |
} |
} |
function setCheckboxes(the_form) |
{ |
var do_check=document.forms[the_form].elements['selecttotal'].checked; |
var elts = document.forms[the_form].elements['select[]']; |
var elts_cnt = (typeof(elts.length) != 'undefined') |
var do_check=document.forms[the_form].elements[\'selecttotal\'].checked; |
var elts = document.forms[the_form].elements[\'select[]\']; |
var elts_cnt = (typeof(elts.length) != \'undefined\') |
? elts.length |
: 0; |
if (elts_cnt) { |
37,17 → 37,15 |
elts.checked = do_check; |
} // Fin if... else |
return true; |
} // Fin de la fonction 'setCheckboxes()'"; |
} |
'; |
GEN_stockerCodeScript($javascript); |
$res = ""; |
$tabmonde = explode ('*',$monde->historique); |
// Premier cas, on vient de cliquer sur un pays qui n'est pas |
// la France, on affiche les adhérents de ce pays |
if (count($tabmonde) == 3) { |
$argument = $tabmonde[2]; |
$query = 'SELECT * FROM carto_PAYS WHERE CP_ID_pays="'.$argument.'"'; |
104,8 → 102,8 |
} |
$res .= "</div>\n"; |
if ($row2->nbr>0) { |
if (!$GLOBALS['AUTH']->getAuth()) { |
$res .= '<br /><br />'.INS_VOUS_DEVEZ_ETRE_INSCRIT ; |
if ((INS_NECESSITE_LOGIN)and(!$GLOBALS['AUTH']->getAuth())) { |
$res .= '<br /><p class="zone_alert">'.INS_VOUS_DEVEZ_ETRE_INSCRIT.'</p>'."\n" ; |
} |
else { |
$requete = 'SELECT * FROM '.INS_ANNUAIRE. |
186,8 → 184,8 |
} |
$res .= "</div><br />\n"; |
if ($row2->nbr>0) { |
if (!$GLOBALS['AUTH']->getAuth()) { |
$res .= '<br /><br />'.INS_VOUS_DEVEZ_ETRE_INSCRIT ; |
if ((INS_NECESSITE_LOGIN)and(!$GLOBALS['AUTH']->getAuth())) { |
$res .= '<br /><p class="zone_alert">'.INS_VOUS_DEVEZ_ETRE_INSCRIT.'</p>'."\n" ; |
} else { |
$requete = 'SELECT * FROM '.INS_ANNUAIRE. |
' WHERE '.INS_CHAMPS_CODE_POSTAL.' LIKE "'.$argument.'%"'. |
/trunk/client/bottin/bibliotheque/inscription.class.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: inscription.class.php,v 1.9 2006-03-15 11:01:58 alexandre_tb Exp $ |
// CVS : $Id: inscription.class.php,v 1.10 2006-04-04 12:23:05 florian Exp $ |
/** |
* Inscription |
* |
31,7 → 31,7 |
*@author Alexandre GRANIER <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.9 $ $Date: 2006-03-15 11:01:58 $ |
*@version $Revision: 1.10 $ $Date: 2006-04-04 12:23:05 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
39,7 → 39,7 |
// | ENTETE du PROGRAMME | |
// +------------------------------------------------------------------------------------------------------+ |
require_once PAP_CHEMIN_RACINE.'api/pear/HTML/QuickForm.php' ; |
require_once 'HTML/QuickForm.php' ; |
class ListeDePays extends PEAR{ |
104,8 → 104,7 |
$requete = 'select '.INS_CHAMPS_LABEL_PAYS.' from '.INS_TABLE_PAYS. |
' where '.INS_CHAMPS_I18N_PAYS.'="'.$i18n.'" and '. |
INS_CHAMPS_ID_PAYS.'="'.$codeIso.'"'; |
$resultat = $this->_db->query($requete) ; |
$resultat = $this->_db->query($requete) ; |
if (DB::isError($resultat)) { |
die ("Echec de la requete : $requete<br />".$resultat->getMessage()) ; |
} |
190,11 → 189,9 |
if (INS_CHAMPS_LETTRE != '') $this->addElement('checkbox', 'lettre',INS_LETTRE, '<br />') ; |
$this->addElement('checkbox', 'visible',INS_VISIBLE, '<br />') ; |
$this->addElement('hidden', 'est_structure', 0) ; |
$defauts=array ('lettre'=>1,'pays'=>'FR'); |
$this->setDefaults($defauts); |
// on fait un groupe avec les boutons pour les mettres sur la même ligne |
$this->addElement('button', 'annuler', INS_ANNULER, array ("onclick" => "javascript:document.location.href='".$url."'")); |
$this->addElement('submit', 'valider', INS_VALIDER); |
$this->addElement('submit', 'valider', INS_VALIDER); |
} // end of member function construitFormulaire |
/** Modifie le formulaire pour l'adapter au cas des structures |
/trunk/client/bottin/bibliotheque/inscription.fonct.php |
---|
19,8 → 19,8 |
// | 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: inscription.fonct.php,v 1.13 2006-03-21 10:25:33 alexandre_tb Exp $ |
// CVS : $Id: inscription.fonct.php,v 1.13 2006-03-21 10:25:33 alexandre_tb Exp $ |
// CVS : $Id: inscription.fonct.php,v 1.14 2006-04-04 12:23:05 florian Exp $ |
// CVS : $Id: inscription.fonct.php,v 1.14 2006-04-04 12:23:05 florian Exp $ |
/** |
* Fonctions du module inscription |
* |
30,10 → 30,10 |
//Auteur original : |
*@author Alexandre Granier <alexandre@tela-botanica.org> |
//Autres auteurs : |
*@author Aucun |
*@author Florian Schmitt <florian@ecole-et-nature.org> |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.13 $ $Date: 2006-03-21 10:25:33 $ |
*@version $Revision: 1.13 $ $Date: 2006-03-21 10:25:33 $ |
*@version $Revision: 1.14 $ $Date: 2006-04-04 12:23:05 $ |
*@version $Revision: 1.14 $ $Date: 2006-04-04 12:23:05 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
42,10 → 42,11 |
// +------------------------------------------------------------------------------------------------------+ |
include_once 'inscription.fonct.wiki.php' ; |
include_once 'inscription.class.php' ; |
if (INS_UTILISE_SPIP) include_once 'inscription.fonct.spip.php' ; |
require_once PAP_CHEMIN_RACINE.'api/pear/HTML/QuickForm.php' ; |
require_once PAP_CHEMIN_RACINE.'api/pear/HTML/QuickForm/checkbox.php' ; |
require_once PAP_CHEMIN_RACINE.'api/pear/HTML/QuickForm/password.php' ; |
require_once 'HTML/QuickForm.php' ; |
require_once 'HTML/QuickForm/checkbox.php' ; |
require_once 'HTML/QuickForm/password.php' ; |
// +------------------------------------------------------------------------------------------------------+ |
// | LISTE de FONCTIONS | |
199,7 → 200,7 |
$requete = 'update '.INS_ANNUAIRE.' set '. |
requete_annuaire ($valeur). |
'where '.INS_CHAMPS_ID.'="'.$id.'"'; |
$resultat = $GLOBALS['ins_db']->query ($requete) ;echo $requete; |
$resultat = $GLOBALS['ins_db']->query ($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().$resultat->getDebugInfo()) ; |
} |
225,7 → 226,7 |
if (!isset ($valeur[$val])) $valeur[$val] = '' ; |
} |
$req .= INS_CHAMPS_NOM_WIKINI.'="'.$valeur['nom_wiki'].'", ' ; |
//$req .= INS_CHAMPS_NOM_WIKINI.'="'.$valeur['nom_wiki'].'", ' ; |
$req .= INS_CHAMPS_MAIL.'="'.addslashes($valeur['email']).'", ' ; |
$req .= INS_CHAMPS_PASSE.'="'.md5($valeur['mot_de_passe']).'", '. |
INS_CHAMPS_PAYS.'="'.addslashes($valeur['pays']).'", '. |
303,7 → 304,7 |
$valeurs_par_defaut['fax'] = $ligne[INS_CHAMPS_FAX] ; |
if (INS_CHAMPS_STRUCTURE != '') { |
$valeurs_par_defaut['structure'] = $ligne[INS_CHAMPS_STRUCTURE] ; |
$valeurs_par_defaut['type_structure'] = $ligne['a_type_structure']; |
//$valeurs_par_defaut['type_structure'] = $ligne['a_type_structure']; |
} |
$valeurs_par_defaut['site'] = $ligne[INS_CHAMPS_SITE_INTERNET] ; |
$valeurs_par_defaut['lettre'] = $ligne[INS_CHAMPS_LETTRE] ; |
318,9 → 319,10 |
* |
* @return text Code HTML de la fiche |
*/ |
function info() { |
function info($id=-1) { |
if ($id==-1) $id=$GLOBALS['AUTH']->getAuthData(INS_CHAMPS_ID); |
$requete = 'SELECT * FROM '.INS_ANNUAIRE.' WHERE '.INS_ANNUAIRE.'.' |
.INS_CHAMPS_ID.'="'.$GLOBALS['AUTH']->getAuthData(INS_CHAMPS_ID).'"' ; |
.INS_CHAMPS_ID.'="'.$id.'"' ; |
$resultat = $GLOBALS['ins_db'] -> query($requete) ; |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
330,13 → 332,13 |
if ($ligne[INS_CHAMPS_EST_STRUCTURE] == 1) { |
$res = '<h1>'.INS_FICHE_STRUCTURE.'</h1>'."\n" ; |
$res .= '<h2>'.$ligne[INS_CHAMPS_NOM].'</h2>'."\n"; |
$res .= '<dl class="affiche_infos">'."\n"; |
$res .= '<ul class="affiche_infos">'."\n"; |
$res .= ligne_inscription(INS_SIGLE_DE_LA_STRUCTURE, $ligne[INS_CHAMPS_SIGLE_STRUCTURE]) ; |
if (INS_CHAMPS_NUM_AGREMENT != '') $res .= ligne_inscription(INS_NUM_AGREMENT, $ligne[INS_CHAMPS_NUM_AGREMENT]) ; |
} else { |
$res = '<h1>'.INS_FICHE_PERSONNELLE.'</h1>'."\n" ; |
$res .= '<h2>'.$ligne[INS_CHAMPS_PRENOM].' '.$ligne[INS_CHAMPS_NOM].'</h2>'."\n"; |
$res .= '<dl class="affiche_infos">'."\n"; |
$res .= '<ul class="affiche_infos">'."\n"; |
} |
$res .= ligne_inscription(INS_ADRESSE_1, $ligne[INS_CHAMPS_ADRESSE_1]) ; |
347,30 → 349,32 |
$res .= ligne_inscription(INS_PAYS, $pays->getNomPays($ligne[INS_CHAMPS_PAYS], INS_LANGUE_DEFAUT)) ; |
$res .= ligne_inscription(INS_TELEPHONE, $ligne[INS_CHAMPS_TELEPHONE]) ; |
$res .= ligne_inscription(INS_FAX, $ligne[INS_CHAMPS_FAX]) ; |
$res .= ligne_inscription(' ', ' ') ; |
if (INS_UTILISE_WIKINI) { |
$res .= ligne_inscription (INS_NOM_WIKI, $ligne[INS_CHAMPS_NOM_WIKINI]) ; |
} |
$res .= ligne_inscription(INS_EMAIL, $ligne[INS_CHAMPS_MAIL]); |
if ($GLOBALS['AUTH']->getAuth()) $res .= ligne_inscription(INS_EMAIL, '<a href="mailto:'.$ligne[INS_CHAMPS_MAIL].'">'.$ligne[INS_CHAMPS_MAIL].'</a>'); |
else $res .= '<br /><p class="zone_info">'.INS_PAS_IDENTIFIE.'</p>'."\n"; |
if ($ligne[INS_CHAMPS_SITE_INTERNET]!='') { |
$res .= ligne_inscription(INS_SITE_INTERNET, '<a href="'.$ligne[INS_CHAMPS_SITE_INTERNET].'" onclick="javascript:window.open(this.href);return false;">'.$ligne[INS_CHAMPS_SITE_INTERNET].'</a>'); |
} |
$res .= '</dl>'."\n"; |
$res .= '<br />'."\n"; |
$res .= '<ul>'."\n"; |
if ($ligne[INS_CHAMPS_VISIBLE] == 1) { |
$res .= '<li>'.INS_VOUS_APPARAISSEZ.'</li>'."\n"; |
} else $res .= '<li>'.INS_VOUS_APPARAISSEZ_PAS.'</li>'."\n"; |
if ($ligne[INS_CHAMPS_LETTRE] == 1) { |
$res .= '<li>'.INS_VOUS_RECEVEZ_LETTRE.'</li>'."\n"; |
} else $res .= '<li>'.INS_VOUS_RECEVEZ_PAS_LETTRE.'</li>'."\n"; |
$res .= '</ul>'."\n"; |
$res .= '<br />'."\n"; |
$res .= '<ul>'."\n";; |
$res .= '<li><a href="'.$GLOBALS['ins_url']->getURL().'&action=modifier&form_structure='.$ligne[INS_CHAMPS_EST_STRUCTURE].'">'.INS_MODIFIER_INSCRIPTION.'</a></li>'."\n" ; |
$res .= '<li><a href="'.$GLOBALS['ins_url']->getURL().'&action=supprimer&form_structure='.$ligne[INS_CHAMPS_EST_STRUCTURE].'" onclick="javascript:return confirm(\''.INS_SUPPRIMER_INSCRIPTION.'?\');">'.INS_SUPPRIMER_INSCRIPTION.'</a></li>'."\n" ; |
$res .= '<li><a href="'.$GLOBALS['ins_url']->getURL().'&action=deconnexion">'.INS_DECONNEXION.'</a></li>'."\n" ; |
$res .= '</ul>'."\n"; |
if ($id==$GLOBALS['AUTH']->getAuthData(INS_CHAMPS_ID)) { |
$res .= '<br />'."\n"; |
$res .= '<ul>'."\n"; |
if ($ligne[INS_CHAMPS_VISIBLE] == 1) { |
$res .= '<li>'.INS_VOUS_APPARAISSEZ.'</li>'."\n"; |
} else $res .= '<li>'.INS_VOUS_APPARAISSEZ_PAS.'</li>'."\n"; |
if ($ligne[INS_CHAMPS_LETTRE] == 1) { |
$res .= '<li>'.INS_VOUS_RECEVEZ_LETTRE.'</li>'."\n"; |
} else $res .= '<li>'.INS_VOUS_RECEVEZ_PAS_LETTRE.'</li>'."\n"; |
$res .= '</ul>'."\n"; |
$res .= '<br />'."\n"; |
$res .= '<ul>'."\n";; |
$res .= '<li><a href="'.$GLOBALS['ins_url']->getURL().'&action=modifier&form_structure='.$ligne[INS_CHAMPS_EST_STRUCTURE].'">'.INS_MODIFIER_INSCRIPTION.'</a></li>'."\n" ; |
$res .= '<li><a href="'.$GLOBALS['ins_url']->getURL().'&action=supprimer&form_structure='.$ligne[INS_CHAMPS_EST_STRUCTURE].'" onclick="javascript:return confirm(\''.INS_SUPPRIMER_INSCRIPTION.'?\');">'.INS_SUPPRIMER_INSCRIPTION.'</a></li>'."\n" ; |
$res .= '<li><a href="'.$GLOBALS['ins_url']->getURL().'&action=deconnexion">'.INS_DECONNEXION.'</a></li>'."\n" ; |
$res .= '</ul>'."\n"; |
} |
return $res ; |
} |
386,9 → 390,9 |
return; |
} |
if (($label == '')or($label == ' ')) { |
return '<dt> </dt>'."\n".'<dd>'.$valeur.'</dd>'."\n" ; |
return '<li>'."\n".$valeur."\n".'</li>'."\n" ; |
} else { |
return '<dt>'.$label.' : </dt>'."\n".'<dd>'.$valeur.'</dd>'."\n" ; |
return '<li>'."\n".'<strong>'.$label.' : </strong>'."\n".$valeur."\n".'</li>'."\n" ; |
} |
} |
662,6 → 666,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.13 2006/03/21 10:25:33 alexandre_tb |
* ajout d'un template pour le mail de confirmation |
* |
* Revision 1.12 2006/03/15 11:02:35 alexandre_tb |
* ajout de l'insertion du prénom qui avait disparu |
* |
/trunk/client/bottin/bibliotheque/annuaire.fonct.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.fonct.php,v 1.2 2005-09-29 16:13:54 alexandre_tb Exp $ |
// CVS : $Id: annuaire.fonct.php,v 1.3 2006-04-04 12:23:05 florian Exp $ |
/** |
* Fonctions du module annuaire |
* |
31,7 → 31,7 |
//Autres auteurs : |
*@author Aucun |
*@copyright Tela-Botanica 2000-2004 |
*@version $Revision: 1.2 $ |
*@version $Revision: 1.3 $ |
// +------------------------------------------------------------------------------------------------------+ |
*/ |
45,51 → 45,169 |
// | LISTE de FONCTIONS | |
// +------------------------------------------------------------------------------------------------------+ |
/** function parcourirAnnu () Affiche l'annuaire à partir d'une lettre |
/** function inscription_onglets() Affiche les onglets de présentation de la structure |
* |
* |
* |
* @return string HTML |
*/ |
function inscription_onglets() { |
$res='<ul id="onglets_inscription">'."\n"; |
//partie présentation |
$GLOBALS['ins_url']->addQueryString('voir_fiche', $_GET['voir_fiche']); |
$res .= '<li id="fiche"><a href="'.$GLOBALS['ins_url']->getURL().'">'.INS_PRESENTATION.'</a>'."\n".'</li>'."\n"; |
$GLOBALS['ins_url']->removeQueryString('voir_fiche'); |
//partie abonnement |
$GLOBALS['ins_url']->addQueryString('voir_abonnement', $_GET['voir_fiche']); |
$res .= '<li id="abonnements"><a href="'.$GLOBALS['ins_url']->getURL().'">'.INS_ABONNEMENTS.'</a></li>'."\n" ; |
$GLOBALS['ins_url']->removeQueryString('voir_abonnement'); |
//partie actualites |
$GLOBALS['ins_url']->addQueryString('voir_actus', $_GET['voir_fiche']); |
$res .= '<li id="actus"><a href="'.$GLOBALS['ins_url']->getURL().'">'.INS_ACTUALITES.'</a>'."\n".'</li>'."\n"; |
$GLOBALS['ins_url']->removeQueryString('voir_actus'); |
//partie ressources |
$GLOBALS['ins_url']->addQueryString('voir_ressources', $_GET['voir_fiche']); |
$res .= '<li id="ressources"><a href="'.$GLOBALS['ins_url']->getURL().'">'.INS_RESSOURCES.'</a>'."\n".'</li>'."\n"; |
$GLOBALS['ins_url']->removeQueryString('voir_ressources'); |
//partie competences |
$GLOBALS['ins_url']->addQueryString('voir_competences', $_GET['voir_fiche']); |
$res .= '<li id="competences"><a href="'.$GLOBALS['ins_url']->getURL().'">'.INS_COMPETENCES.'</a>'."\n".'</li>'."\n"; |
$GLOBALS['ins_url']->removeQueryString('voir_competences'); |
$res.= '</ul>'."\n"; |
return $res; |
} |
function parcourirAnnu() { |
$res = '<div><table><tr>'; |
// ecrire toutes les lettres avec un lien |
for ($i = 65 ; $i <91 ; $i++) { |
$res .= '<td><a style="font-size:15px;" href="'.$GLOBALS['ins_url']->getURL().'&lettre='; |
$res .= chr($i) ; |
$res .= '">'; |
$res .= chr($i) ; |
$res .= '</a></td>'."\n"; |
} |
$res .= '</tr></table></div>'."\n"; |
// si une lettre est selectionne |
if (!empty($_REQUEST['lettre'])) { |
$requete = 'SELECT '.INS_CHAMPS_ID; |
foreach($GLOBALS['annuaire_champs_visibles']['champs_db'] as $i) { |
$requete .= ', '.$i; |
} |
/** function Annuaire_recherche () Moteur de recherche dans l'annuaire des inscrits |
* |
* |
* |
* @return string HTML |
*/ |
function Annuaire_recherche() { |
$res ='<h2>'.INS_RECHERCHE_ANNUAIRE_DES_INSCRITS.'</h2>'."\n"; |
$form =& new HTML_QuickForm('form_recherche_annuaire', 'post', str_replace('&', '&', $GLOBALS['ins_url']->getURL())); |
$squelette =& $form->defaultRenderer(); |
$squelette->setFormTemplate("\n".'<form{attributes}>'."\n".'<table>'."\n".'{content}'."\n".'</table>'."\n".'</form>'."\n"); |
$squelette->setElementTemplate( '<tr>'."\n". |
'<td style="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". |
' : </td>'."\n". |
'<td style="padding:5px;text-align:left;">{element}</td>'."\n". |
'</tr>'."\n" ); |
$squelette->setElementTemplate( '<tr>'."\n".'<td colspan=2 style="padding:5px;">{label}{element}</td>'."\n".'</tr>'."\n", 'bouton_rechercher'); |
$option_type=array ('0' => INS_PERSONNES_OU_STRUCTURES, |
'1' => INS_PERSONNES, |
'2' => INS_STRUCTURES); |
$form->addElement('select', 'nom_type', INS_JE_RECHERCHE, $option_type); |
//requete pour recuperer la liste des pays |
$requete = 'SELECT '.INS_CHAMPS_ID_PAYS.', '.INS_CHAMPS_LABEL_PAYS.' FROM '.INS_TABLE_PAYS.' WHERE '.INS_CHAMPS_I18N_PAYS.'="fr-FR"'; |
$resultat = $GLOBALS['ins_db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ("Echec de la requete : $requete<br />".$resultat->getMessage()) ; |
} |
$option_pays = array('zz' => INS_TOUS_PAYS) ; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$option_pays[$ligne[INS_CHAMPS_ID_PAYS]] = $ligne[INS_CHAMPS_LABEL_PAYS] ; |
} |
$form->addElement('select', 'nom_pays', INS_PAYS, $option_pays); |
//requete pour recuperer la liste des départements |
$requete = 'SELECT '.INS_CHAMPS_ID_DEPARTEMENT.', '.INS_CHAMPS_NOM_DEPARTEMENT.' FROM '.INS_TABLE_DPT; |
$resultat = $GLOBALS['ins_db']->query($requete) ; |
if (DB::isError($resultat)) { |
die ("Echec de la requete : $requete<br />".$resultat->getMessage()) ; |
} |
$option_departements = array('0' => INS_TOUS_DEPARTEMENTS) ; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$option_departements[$ligne[INS_CHAMPS_ID_DEPARTEMENT]] = $ligne[INS_CHAMPS_NOM_DEPARTEMENT] ; |
} |
$form->addElement('select', 'nom_departement', INS_DEPARTEMENT_POUR_LA_FRANCE, $option_departements); |
$form->addElement('text', 'nom_annuaire', INS_NOM_ANNUAIRE); |
$form->addElement('submit', 'bouton_rechercher', INS_RECHERCHER); |
//valeurs par defaut |
$defauts=array('nom_pays'=>'fr','nom_departement'=>'0'); |
$form->setDefaults($defauts); |
//affichage du formulaire |
$res .=$form->toHtml(); |
//on teste si l'on affiche le resultat de la recherche ou |
if (isset($_POST['nom_type'])) { |
$requete = 'SELECT '.INS_CHAMPS_ID.', '.INS_CHAMPS_NOM.', '.INS_CHAMPS_PRENOM.', '.INS_CHAMPS_VILLE.', '.INS_CHAMPS_CODE_POSTAL; |
$requete .= ' FROM '.INS_ANNUAIRE.' WHERE '; |
if ($_REQUEST['lettre'] != 'tous') { |
$requete .= INS_CHAMPS_NOM.' LIKE "'.$_REQUEST['lettre'].'%"'; |
} else { |
$requete .= '1'; |
$req_where=0; |
if ($_POST['nom_type']==1) { |
$requete .= INS_CHAMPS_EST_STRUCTURE.'=0 '; |
$req_where=1; |
} elseif ($_POST['nom_type']==2) { |
$requete .= INS_CHAMPS_EST_STRUCTURE.'=1 '; |
$req_where=1; |
} |
$requete .= ' ORDER BY '.INS_CHAMPS_NOM ; |
if ($_POST['nom_pays']!='0'and$_POST['nom_pays']!='zz') { |
if ($req_where) { |
$requete .= 'AND '; |
} else { |
$req_where=1; |
} |
$requete .= INS_CHAMPS_PAYS.'="'.$_POST['nom_pays'].'" '; |
} |
if ($_POST['nom_departement']!='0') { |
if ($req_where) { |
$requete .= 'AND '; |
} else { |
$req_where=1; |
} |
$requete .= INS_CHAMPS_DEPARTEMENT.'="'.$_POST['nom_departement'].'" '; |
} |
if ($_POST['nom_annuaire']!='') { |
if ($req_where) { |
$requete .= 'AND '; |
} else { |
$req_where=1; |
} |
$requete .= '('.INS_CHAMPS_NOM.' LIKE "%'.$_POST['nom_annuaire'].'%"'. |
' OR '.INS_CHAMPS_PRENOM.' LIKE "%'.$_POST['nom_annuaire'].'%"'. |
' OR '.INS_CHAMPS_SIGLE_STRUCTURE.' LIKE "%'.$_POST['nom_annuaire'].'%"'. |
' OR '.INS_CHAMPS_DESCRIPTION.' LIKE "%'.$_POST['nom_annuaire'].'%") '; |
} |
if (!$req_where) $requete .= '1'; |
$requete .=' ORDER BY '.INS_CHAMPS_NOM; |
$resultat = $GLOBALS['ins_db']->query($requete); |
if ($resultat->numRows()>0) { |
$res .='<h2>'.INS_RESULTATS_RECHERCHE.' ('.$resultat->numRows().' '.INS_ENTREES.')</h2>'."\n"; |
$res .='<p class="zone_info">'.INS_CLIQUER_ELEMENT_LISTE.'</p>'."\n"; |
$i=0; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$donnees_membres[$i++]=$ligne; |
} |
$res .= listes_inscrit($donnees_membres, $GLOBALS['annuaire_champs_visibles']['label_champs']); |
} else { |
$res .= ANN_PAS_D_INSCRITS; |
$res .= listes_inscrit($donnees_membres); |
} |
} |
else { |
$res .='<h2>'.INS_RESULTATS_RECHERCHE.'</h2>'."\n"; |
$res .= '<p class="zone_alert">'.INS_PAS_DE_RESULTATS.'</p>'."\n"; |
} |
} else { |
$res .='<h2>'.INS_DIX_DERNIERES_INSCRIPTIONS.'</h2>'."\n"; |
$requete = 'SELECT '.INS_CHAMPS_ID.', '.INS_CHAMPS_NOM.', '.INS_CHAMPS_PRENOM.', '.INS_CHAMPS_VILLE.', '.INS_CHAMPS_CODE_POSTAL; |
$requete .= ' FROM '.INS_ANNUAIRE.' ORDER BY '.INS_CHAMPS_DATE.' DESC LIMIT 0 , 10'; |
$resultat = $GLOBALS['ins_db']->query($requete); |
if ($resultat->numRows()>0) { |
$i=0; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
$donnees_membres[$i++]=$ligne; |
} |
$res .= listes_inscrit($donnees_membres, 0); |
} |
else { |
$res .= '<p class="zone_alert">'.INS_PAS_DE_RESULTATS.'</p>'."\n"; |
} |
} |
return $res ; |
} |
100,51 → 218,34 |
* @return Renvoie le code HTML de la liste des inscrits |
*/ |
function listes_inscrit(& $donnees_membres, & $entete , $case_a_cocher=true) { |
$res = '<div>'."\n"; |
if ($case_a_cocher) {$res .= '<form action="'.$GLOBALS['ins_url']->getURL().'"&lettre='.$_REQUEST['lettre'].'" method="post" name="formmail">'."\n";} |
$res .= '<table id="table_inscrit">'."\n".'<colgroup>'."\n"; |
if ($case_a_cocher) {$res .= '<col />';} |
foreach($entete as $i) {$res .= '<col />'; } |
$res .= '</colgroup>'."\n".'<thead>'."\n"; |
if ($case_a_cocher) {$res .= '<th> </th>'."\n";} |
foreach($entete as $i) { |
$res .= '<th>'.$i.'</th>'."\n"; |
} |
$res .= '</thead>'."\n"; |
$indic=0; |
$i=1; |
foreach($entete as $i) { |
if ($indic==0) { |
$res.='<tr class="ligne_impaire">'."\n"; |
$indic=1; |
} |
else { |
$res.='<tr class="ligne_paire">'."\n"; |
$indic=0; |
} |
} |
function listes_inscrit(& $donnees_membres, $affiche_form_mail=1) { |
$res = ''; |
if ($GLOBALS['AUTH']->getAuth()&&$affiche_form_mail) {$res .= '<form action="'.$GLOBALS['ins_url']->getURL().'" method="post" name="formmail">'."\n";} |
$res .= '<ul>'."\n"; |
for ($i=0;$i<count($donnees_membres);$i++) { |
$id = array_shift($donnees_membres[$i]); |
if ($case_a_cocher) {$res.='<td><input type="checkbox" name="select[]" value="'.$id.'"></td>'."\n";} |
foreach($donnees_membres[$i] as $valeur) $res .= '<td>'.$valeur.'</td>'."\n" ; |
$res .= '</tr>'."\n"; |
$id = array_shift($donnees_membres[$i]); |
$GLOBALS['ins_url']->addQueryString('voir_fiche', $id); |
$res .= '<li><a href="'.$GLOBALS['ins_url']->getURL().'">'."\n"; |
if ($GLOBALS['AUTH']->getAuth()&&$affiche_form_mail) { |
$res.='<input type="checkbox" name="select[]" value="'.$id.'">'."\n"; |
} |
$res .= '<strong>'.$donnees_membres[$i][INS_CHAMPS_NOM]. |
' '.$donnees_membres[$i][INS_CHAMPS_PRENOM].'</strong>'."\n". |
' '.$donnees_membres[$i][INS_CHAMPS_CODE_POSTAL]. |
' '.$donnees_membres[$i][INS_CHAMPS_VILLE]; |
$res .= '</a></li>'."\n"; |
} |
$res .= '</table></div>'."\n"; |
if ($case_a_cocher) { |
$res .= '<div class="texte">'.ANN_CHECK_UNCHECK ; |
$res .= ' <input type="checkbox" name="selecttotal" onclick="javascript:setCheckboxes(\'formmail\');"></div>'; |
$res .= '<h3>'.ANN_ENVOYER_MAIL.'</h3>'."\n"; |
$res .= '<div>'."\n".'<table border="0">'."\n" |
.'<tr><td class="texte">'.ANN_SUJET.' :</td>'."\n" |
.'<td><input class="forml" type="text" name="titre_mail" size="60"></td>'."\n" |
.'</tr><tr><td class="texte" valign="top">'.ANN_MESSAGE.' : </td>'."\n" |
.'<td><textarea class="forml" name="corps" rows="5" cols="60"></textarea></td>'."\n" |
.'</tr><tr><td></td><td align="center">'; |
$res.='<input type="submit" value="'.ANN_ENVOYER.'">'; |
$res.='</td>'."\n".'</tr>'."\n".'</table>'."\n".'</div>'."\n".'</form>'."\n"; |
$res .= '</ul>'."\n"; |
if ($GLOBALS['AUTH']->getAuth()&&$affiche_form_mail) { |
$res .= INS_CHECK_UNCHECK ; |
$res .= ' <input type="checkbox" name="selecttotal" onclick="javascript:setCheckboxes(\'formmail\');"><br />'; |
$res .= '<h3>'.INS_ENVOYER_MAIL.'</h3>'."\n"; |
$res .= '<p style="text-align:right;">'.INS_SUJET.' : <input style="border:1px solid #000;width:450px;" type="text" name="titre_mail"><br />'."\n". |
INS_MESSAGE.' : <textarea style="border:1px solid #000;width:450px;" name="corps" rows="5" cols="60"></textarea></p>'."\n". |
'<p style="width:100px;margin:4px auto;text-align:center;"><input type="submit" value="'.INS_ENVOYER.'" /></p>'."\n". |
'</form>'."\n"; |
} else { |
if ($affiche_form_mail) $res .='<br /><p class="zone_info">'.INS_PAS_IDENTIFIE.'</p>'."\n"; |
} |
return $res ; |
} |
192,6 → 293,9 |
/* +--Fin du code ----------------------------------------------------------------------------------------+ |
* |
* $Log: not supported by cvs2svn $ |
* Revision 1.2 2005/09/29 16:13:54 alexandre_tb |
* En cours de production. |
* |
* Revision 1.1 2005/09/22 14:02:49 ddelon |
* nettoyage annuaire et php5 |
* |
/trunk/client/bottin/bibliotheque/tmp/carto/europede4bcb3e96ae78bbfc42739109e5e4cf.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/bottin/bibliotheque/tmp/carto/europede4bcb3e96ae78bbfc42739109e5e4cf.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/bottin/bibliotheque/tmp/carto/france4dfdc34e6c4a6ab2b5e3c4bbdc084ff1.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/bottin/bibliotheque/tmp/carto/france4dfdc34e6c4a6ab2b5e3c4bbdc084ff1.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/bottin/bibliotheque/tmp/carto/continentc4d344f2903f1f1577a52adeb0f27032.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/bottin/bibliotheque/tmp/carto/continentc4d344f2903f1f1577a52adeb0f27032.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/bottin/bibliotheque/tmp/carto/continentd211efc75246c062ebca1fbb68c8702b.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/bottin/bibliotheque/tmp/carto/continentd211efc75246c062ebca1fbb68c8702b.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/bottin/bibliotheque/tmp/carto/france081ceb501879982db623c7fd42ca4078.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/bottin/bibliotheque/tmp/carto/france081ceb501879982db623c7fd42ca4078.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/bottin/bibliotheque/tmp/carto/europe72b0d7d72b4752376be8c2b89c120468.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/bottin/bibliotheque/tmp/carto/europe72b0d7d72b4752376be8c2b89c120468.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/bottin/bibliotheque/tmp/carto/france346615b8e8592117f782d22bf93a8022.png |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/client/bottin/bibliotheque/tmp/carto/france346615b8e8592117f782d22bf93a8022.png |
---|
New file |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/client/bottin/bibliotheque/lib.carto.php |
---|
29,11 → 29,11 |
*@version 01 juillet 2002 |
// +-----------------------------------------------------------------------------------------------+ |
// |
// $Id: lib.carto.php,v 1.3 2005-12-07 14:59:14 alexandre_tb Exp $ |
// $Id: lib.carto.php,v 1.4 2006-04-04 12:23:05 florian Exp $ |
// FICHIER : $RCSfile: lib.carto.php,v $ |
// AUTEUR : $Author: alexandre_tb $ |
// VERSION : $Revision: 1.3 $ |
// DATE : $Date: 2005-12-07 14:59:14 $ |
// AUTEUR : $Author: florian $ |
// VERSION : $Revision: 1.4 $ |
// DATE : $Date: 2006-04-04 12:23:05 $ |
// |
// +-----------------------------------------------------------------------------------------------+ |
// A FAIRE : |
450,7 → 450,9 |
$id_carte_destination = $action['id_carte_destination'] ; |
$this->fils[$id_carte_destination]->liste_zone_carte = $this->liste_zone_carte; |
$res .= ''.$this->fils[$id_carte_destination]->_donnerListeZoneCarte()."<br />\n"; |
if (INS_AFFICHE_ZONE_ROUGE) { |
$res .= ''.$this->fils[$id_carte_destination]->_donnerListeZoneCarte()."<br />\n"; |
} |
$res .= '<input type="image" src="'; |
$id_image = $this->_donnerIdUnique(); |
$this->fils[$id_carte_destination]->_lancerColoriage($id_image); |
465,7 → 467,9 |
//Cette possibilité peut se présenter quand on clique sur un zone blanche d'une carte (càd dans la mer) |
//Là, on recharge la carte précédente : |
elseif ($action['type_action'] == 'Recharger') { |
$res .= ''.$this->_donnerListeZoneCarte()."<br />\n"; |
if (INS_AFFICHE_ZONE_ROUGE) { |
$res .= ''.$this->_donnerListeZoneCarte()."<br />\n"; |
} |
$res .= '<input type="image" src="'; |
$id_image = $this->_donnerIdUnique(); |
$this->_lancerColoriage($id_image); |
491,8 → 495,9 |
} |
} |
$this->liste_zone_carte = $liste_zone_carte; |
$res .= ''.$this->_donnerListeZoneCarte($this->liste_zone_carte)."<br />\n"; |
if (INS_AFFICHE_ZONE_ROUGE) { |
$res .= ''.$this->_donnerListeZoneCarte($this->liste_zone_carte)."<br />\n"; |
} |
$res .= '<input type="image" src="'; |
$id_image = $this->_donnerIdUnique(); |
$this->_lancerColoriage($id_image, '', $this->liste_zone_carte); |
511,8 → 516,9 |
} |
} |
// une foit que l'on a charge le bon objet nous le colorions |
$res .= ''.$this->_donnerListeZoneCarte()."<br />\n"; |
if (INS_AFFICHE_ZONE_ROUGE) { |
$res .= ''.$this->_donnerListeZoneCarte()."<br />\n"; |
} |
$res .= '<input type="image" src="'; |
$id_image = $this->_donnerIdUnique(); |
$this->_lancerColoriage($id_image); |
524,8 → 530,9 |
// et on affiche alors la premiere carte |
else { |
unset ($_SESSION['carte']) ; |
$res .= ''.$this->_donnerListeZoneCarte()."<br />\n"; |
if (INS_AFFICHE_ZONE_ROUGE) { |
$res .= ''.$this->_donnerListeZoneCarte()."<br />\n"; |
} |
$res .= '<input type="image" src="'; |
$id_image = $this->_donnerIdUnique(); |
$this->_lancerColoriage($id_image); |
1186,6 → 1193,9 |
//-- Fin du code source ------------------------------------------------------------ |
/* |
* $Log: not supported by cvs2svn $ |
* Revision 1.3 2005/12/07 14:59:14 alexandre_tb |
* suppression d'un echo |
* |
* Revision 1.2 2005/11/24 16:17:52 florian |
* changement template inscription + modifs carto |
* |
/trunk/client/bottin/bibliotheque/cartographie.fonct.php |
---|
26,19 → 26,229 |
*@version 03 mai 2004 |
// +-----------------------------------------------------------------------------------------------+ |
// |
// $Id: cartographie.fonct.php,v 1.1 2005-09-22 14:02:49 ddelon Exp $ |
// $Id: cartographie.fonct.php,v 1.2 2006-04-04 12:23:05 florian Exp $ |
// FICHIER : $RCSfile: cartographie.fonct.php,v $ |
// AUTEUR : $Author: ddelon $ |
// VERSION : $Revision: 1.1 $ |
// DATE : $Date: 2005-09-22 14:02:49 $ |
// AUTEUR : $Author: florian $ |
// VERSION : $Revision: 1.2 $ |
// DATE : $Date: 2006-04-04 12:23:05 $ |
*/ |
/** function carto_liste_fiches() |
* |
* |
* @return string HTML |
*/ |
function carto_liste_fiches(&$monde, $nom_table1, $nom_table2, $nom_champs_pays, $nom_champs_cp, $requete_sql) { |
global $mailer; |
global $select;//utilisé dans liste_inscrit.php |
$javascript = " |
function confirmer () { |
if (window.confirm ('Cliquez sur OK pour confirmer.')) { |
window.formmail.submit(); |
} |
} |
function setCheckboxes(the_form) |
{ |
var do_check=document.forms[the_form].elements['selecttotal'].checked; |
var elts = document.forms[the_form].elements['select[]']; |
var elts_cnt = (typeof(elts.length) != 'undefined') |
? elts.length |
: 0; |
if (elts_cnt) { |
for (var i = 0; i < elts_cnt; i++) { |
elts[i].checked = do_check; |
} // Fin for |
} |
else { |
elts.checked = do_check; |
} // Fin if... else |
return true; |
} // Fin de la fonction 'setCheckboxes()' |
"; |
GEN_stockerCodeScript($javascript); |
$res = ''; |
$tabmonde = explode ('*',$monde->historique); |
// Premier cas, on vient de cliquer sur un pays qui n'est pas |
// la France, on affiche les adhérents de ce pays |
if (count($tabmonde) == 3) { |
$argument = $tabmonde[2]; |
$query = 'SELECT * FROM carto_PAYS WHERE CP_ID_pays="'.$argument.'"'; |
$result = $GLOBALS['ins_db']->query($query); |
if (DB::isError($result)) { |
die ($result->getMessage().'<br />'.$result->getDebugInfo()) ; |
} |
$row = $result->fetchRow(DB_FETCHMODE_OBJECT) ; |
$pays = $row->CP_Intitule_pays; |
$monde->nom = $monde->nom.'*'.$pays; |
$tabonglet = explode ('*', $monde->historique); |
$tabnom = explode ('*', $monde->nom); |
$res .= "<b>\n"; |
foreach ($tabonglet as $key => $value) { |
if ($key == 0) { |
$chemin = $value; |
$value = 'monde'; |
$res .= "<a class=\"chemin_carto\" href=\"".$monde->url."&historique_cartes=$chemin\"> > ".$tabnom[$key]."</a>"; |
} else if ($key == (count($tabonglet)-1)) { |
$res .= "<a class=\"chemin_carto\"> > $pays</a>"; |
} else { |
$chemin .= '*'.$value; |
$res .= "<a class=\"chemin_carto\" href=\"".$monde->url."&historique_cartes=$chemin\"> > ".$tabnom[$key]."</a>"; |
} |
} |
$res .= "</b>\n"; |
$capitale = $row->CP_Intitule_capitale; |
$query2 = ' SELECT count('.$nom_champs_cp.') as nbr'. |
' FROM '.$nom_table1; |
if ($nom_table2!=0) $query2 .= ', '.$nom_table2; |
$query2 .= ' WHERE '.$nom_champs_pays.'="'.$argument.'"'; |
if ($requete_sql!='') $query2 .= ' AND ('.$requete_sql.')'; |
$result2 = $GLOBALS['ins_db']->query($query2); |
if (DB::isError($result2)) { |
die ($result2->getMessage().'<br />'.$result2->getDebugInfo()) ; |
} |
$row2 = $result2->fetchRow(DB_FETCHMODE_OBJECT) ; |
$res .= '<br /><br /><div class="info_pays">'.$pays.' (capitale: '.$capitale.') : ' ; |
if ($row2->nbr == 0) { |
$res .= INS_AUCUN_INSCRIT.' '.INS_LABEL_PROJET ; |
} |
else if ($row2->nbr == 1) { |
$res .= $row2->nbr.' '.INS_INSCRIT.' '.INS_LABEL_PROJET ; |
} |
else { |
$res .= $row2->nbr.' '.INS_INSCRIT.'s '.INS_LABEL_PROJET ; |
} |
$res .= "</div>\n"; |
if ($row2->nbr>0) { |
if ((INS_NECESSITE_LOGIN)and(!$GLOBALS['AUTH']->getAuth())) { |
$res .= '<br /><p class="zone_alert">'.INS_VOUS_DEVEZ_ETRE_INSCRIT.'</p>'."\n" ; |
} |
else { |
$requete = 'SELECT * FROM '.$nom_table1; |
if ($nom_table2!=0) $requete .= ', '.$nom_table2; |
$requete .= ' WHERE '.$nom_champs_pays.'="'.$argument.'"'; |
if ($requete_sql!='') $requete .= ' AND ('.$requete_sql.')'; |
//todo: gerer l'ordre ' ORDER BY '.INS_CHAMPS_NOM.', '.INS_CHAMPS_PRENOM; |
if ($row2->nbr >= 1) { |
$res .= listes_inscrit($requete, $select, $_SERVER['REQUEST_URI']) ; |
if ($mailer==1) { |
if (!is_array($select)) { |
$res .= "<div>".INS_NO_DESTINATAIRE."</div>"; |
} |
else { |
$res .= '<div class="zone_info">'.INS_MESSAGE_ENVOYE.'</div>'."\n" ; |
carto_envoie_mail() ; |
} |
} |
else { |
$res .= carto_texte_cocher() ; |
} |
$res .= carto_formulaire() ; |
} |
} |
} |
// 2 ème cas, on vient de cliquer sur un département français |
} else if (count($tabmonde) == 4) { |
$argument = $tabmonde[3]; |
$query = 'SELECT * FROM '.INS_TABLE_DPT.' WHERE '.INS_CHAMPS_ID_DEPARTEMENT.'='.$argument; |
$result = $GLOBALS['ins_db']->query($query); |
if (DB::isError($result)) { |
die ($result->getMessage() .'<br />'.$result->getDebugInfo()); |
} |
$row = $result->fetchRow(DB_FETCHMODE_ASSOC); |
$nom = $row[INS_CHAMPS_NOM_DEPARTEMENT]; |
$tabonglet=explode ('*', $monde->historique); |
$tabnom=explode ('*', $monde->nom); |
$res.="<div><b>\n"; |
foreach ($tabonglet as $key=>$value) { |
if ($key==0) { |
$chemin=$value; |
$value='monde'; |
$res.= "<a class=\"chemin_carto\" href=\"".$monde->url."&historique_cartes=$chemin\"> > ".$tabnom[$key]."</a>"; |
} |
else if ($key==(count($tabonglet)-1)) { |
$res.="<a class=\"chemin_carto\"> > $nom</a>"; |
} |
else { |
$chemin.='*'.$value; |
$res.= "<a class=\"chemin_carto\" href=\"".$monde->url."&historique_cartes=$chemin\"> > ".$tabnom[$key]."</a>"; |
} |
} |
$res .= "</b></div>\n"; |
$query2 = ' SELECT count('.$nom_champs_cp.') as nbr'. |
' FROM '.$nom_table1; |
if ($nom_table2!=0) $query2 .= ', '.$nom_table2; |
$query2 .= ' WHERE '.$nom_champs_cp.' LIKE "'.$argument.'%"'. |
' AND '.$nom_champs_pays.'="FR"'; |
if ($requete_sql!='') $query2 .= ' AND ('.$requete_sql.')'; |
$result2 = $GLOBALS['ins_db']->query($query2); |
if (DB::isError($result2)) { |
die ($result2->getMessage().'<br />'.$result2->getDebugInfo()) ; |
} |
$row2 = $result2->fetchRow(DB_FETCHMODE_OBJECT); |
$res .= '<br /><br /><div class="nb_inscrits">' ; |
if ($row2->nbr == 0) { |
$res .= INS_AUCUN_INSCRIT." ".INS_LABEL_PROJET ; |
} |
else if ($row2->nbr == 1) { |
$res .= $row2->nbr." ".INS_INSCRIT." ".INS_LABEL_PROJET ; |
} |
else { |
$res .= $row2->nbr." ".INS_INSCRIT."s ".INS_LABEL_PROJET ; |
} |
$res .= "</div><br />\n"; |
if ($row2->nbr>0) { |
if ((INS_NECESSITE_LOGIN)and(!$GLOBALS['AUTH']->getAuth())) { |
$res .= '<br /><p class="zone_alert">'.INS_VOUS_DEVEZ_ETRE_INSCRIT.'</p>'."\n" ; |
} else { |
$requete = 'SELECT * FROM '.$nom_table1; |
if ($nom_table2!=0) $requete .= ', '.$nom_table2; |
if (strlen($argument)==1) { |
$argument='0'.$argument; |
} |
$requete .= ' WHERE '.$nom_champs_cp.' LIKE "'.$argument.'%"'. |
' AND '.$nom_champs_pays.'="FR"'; |
if ($requete_sql!='') $requete .= ' AND ('.$requete_sql.')'; |
//todo: ' ORDER BY '.INS_CHAMPS_NOM.', '.INS_CHAMPS_PRENOM; |
$res .= listes_inscrit($requete, $select, $_SERVER['REQUEST_URI']) ; |
if ($mailer==1) { |
if (!is_array($select)) { |
$res.= INS_NO_DESTINATAIRE; |
} else { |
$res .= '<p class="zone_info">'.INS_MESSAGE_ENVOYE."</p>\n" ; |
carto_envoie_mail() ; |
} |
} else { |
$res .=carto_texte_cocher() ; |
} |
$res .= carto_formulaire() ; |
} |
} |
} |
return $res; |
} |
/** function carto_texte_cocher () |
* |
* |
* @return string HTML |
*/ |
function carto_texte_cocher() { |
$res = "<div class=\"texte\">".INS_CHECK_UNCHECK ; |
$res .= " <input type=\"checkbox\" name=\"selecttotal\" onclick=\"javascript:setCheckboxes('formmail');\" /></div>"; |
68,54 → 278,19 |
*/ |
function listes_inscrit($requete, $select, $url) { |
$res = '<form action="'.preg_replace('/&/', '&', $url).'&mailer=1&select="'.$select.'" method="post" name="formmail">'."\n"." |
<table id=\"table_outilsreseaux\" width=\"100%\">\n |
<colgroup> |
<col /> |
<col /> |
<col /> |
<col /> |
<col /> |
<col /> |
</colgroup> |
<thead>\n |
<tr> |
<td> </td>\n |
<td>".INS_NOM."</td>\n |
<td>".INS_PRENOM."</td>\n |
<td>".INS_DATE_INS."</td>\n |
<td>".INS_CODE_POSTAL."</td>\n |
<td>".INS_VILLE."</td>\n |
</tr> |
</thead>\n"; |
$res=''; |
$resultat= $GLOBALS['ins_db']->query($requete); |
if (DB::isError($resultat)) { |
die ($resultat->getMessage().'<br />'.$resultat->getDebugInfo()) ; |
} |
$indic=0; |
$i=1; |
while ($ligne = $resultat->fetchRow(DB_FETCHMODE_ASSOC)) { |
if ($indic==0) { |
$res.="<tr class=\"ligne_impaire\">\n"; |
$indic=1; |
} |
else { |
$res.="<tr class=\"ligne_paire\">\n"; |
$indic=0; |
} |
$res.="<td><input type=\"checkbox\" name=\"select[]\" value=\"".$ligne[INS_CHAMPS_MAIL]."\" /></td>\n |
<td>".$ligne[INS_CHAMPS_NOM]." </td>\n |
<td>".$ligne[INS_CHAMPS_PRENOM]." </td>\n |
<td>".date("d.m.Y", strtotime($ligne[INS_CHAMPS_DATE_INSCRIPTION]))." </td>\n |
<td>".$ligne[INS_CHAMPS_CODE_POSTAL]." </td>\n |
<td>".$ligne[INS_CHAMPS_VILLE]." </td>\n" ; |
$res .= "</tr>\n"; |
} |
$res .= "</table>\n"; |
$res.='<input type="checkbox" name="select[]" value="'.$ligne[INS_CHAMPS_MAIL].'" />'."\n". |
$ligne[INS_CHAMPS_NOM].' '.$ligne[INS_CHAMPS_PRENOM].' '. |
$ligne[INS_CHAMPS_CODE_POSTAL].' '.$ligne[INS_CHAMPS_VILLE].' '. |
date("d.m.Y", strtotime($ligne[INS_CHAMPS_DATE_INSCRIPTION])).'<br /><br />'."\n"; |
} |
$res .= '<input type="hidden" name="mailer" value="1" />'."\n"; |
$res .= '<input type="hidden" name="select" value="'.$select.'" /><br />'."\n"; |
return $res ; |
} |
124,7 → 299,6 |
* |
* @return envoie l'email |
*/ |
function carto_envoie_mail() { |
$requete = 'SELECT '.INS_CHAMPS_MAIL.' FROM '.INS_ANNUAIRE.' WHERE '.INS_CHAMPS_ID.'='.$GLOBALS['AUTH']->getAuthData(INS_CHAMPS_ID); |
$resultat = $GLOBALS['ins_db']->query($requete); |
152,6 → 326,9 |
//-- Fin du code source ------------------------------------------------------------ |
/* |
* $Log: not supported by cvs2svn $ |
* Revision 1.1 2005/09/22 14:02:49 ddelon |
* nettoyage annuaire et php5 |
* |
* Revision 1.2 2005/09/22 13:30:49 florian |
* modifs pour compatibilité XHTML Strict + corrections de bugs (mais ya encore du boulot!!) |
* |