Changeset 48002 in spip-zone
- Timestamp:
- May 22, 2011, 2:37:21 PM (10 years ago)
- Location:
- _plugins_/Association/Associaspip/exec
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
_plugins_/Association/Associaspip/exec/association.php
r47991 r48002 15 15 include_spip('inc/presentation'); 16 16 include_spip ('inc/navigation_modules'); 17 include_spip ('inc/voir_adherent'); // pour voir_adherent_infos18 17 19 18 function exec_association() { … … 55 54 echo fin_cadre_formulaire(true); 56 55 57 /* Provisoirement supprimé en attendant 1.9.3*/ 58 56 $coordonnees_actif = plugin_actif('COORDONNEES'); 57 include_spip('inc/association_coordonnees'); 58 59 /* on recupere tout dans un tableau php pour pouvoir extraire le tableau des id_auteur a envoyer en parametre aux fonction de recuperation d'emails et telephone */ 60 $all = sql_allfetsel("id_auteur, statut_interne, fonction, nom_famille, prenom, sexe", 'spip_asso_membres', "fonction <> '' AND statut_interne <> 'sorti'", '', "nom_famille"); 61 $tr_class = "pair"; 62 $id_auteurs = array(); 63 foreach ($all as $data) { 64 $id_auteurs[] = $data['id_auteur']; 65 } 66 67 $emails = association_recuperer_emails_string($id_auteurs); 68 59 69 echo '<br />'; 60 echo gros_titre(_T('asso: votre_equipe'),'',false);70 echo gros_titre(_T('asso:le_bureau'),'',false); 61 71 echo '<br />'; 62 72 … … 67 77 echo '<th>' . _T('asso:nom') . "</th>\n"; 68 78 echo '<th>' . _T('asso:fonction') . "</th>\n"; 69 echo '<th>' . _T('asso:portable') . "</th>\n"; 70 echo '<th>' . _T('asso:telephone') . ' / ' . _T('asso:email') . "</th>\n"; 79 if ($coordonnees_actif) { 80 $telephones = association_recuperer_telephones_string($id_auteurs); 81 echo '<th>' . _T('asso:telephone') . "</th>\n"; 82 } 83 echo '<th>' . _T('asso:email') . "</th>\n"; 84 71 85 echo '</tr>'; 72 $query = voir_adherent_infos("*", '', "fonction !='' AND statut_interne != 'sorti'", '', "nom_famille");73 86 74 while ($data = sql_fetch($query)) {87 foreach ($all as $data) { 75 88 $id_auteur=$data['id_auteur']; 76 89 $nom_affiche = association_calculer_nom_membre($data['sexe'], $data['prenom'], $data['nom_famille']); 77 $mob = print_tel($data['mobile']); 78 $tel = print_tel($data['telephone']); 79 if ($email = $data['email']) 80 $tel = "<a href='mailto:$email' title='" 81 . _L('Ecrire à') . ' ' . $email . "'>" 82 . ($tel ? $tel : 'mail') 83 . '</a>'; 90 84 91 $auteur = generer_url_ecrire('auteur_infos',"id_auteur=$id_auteur"); 85 92 $adh = generer_url_ecrire('voir_adherent',"id=$id_auteur"); 86 echo "\n<tr style='background-color: #EEEEEE;'>\n"; 93 echo "\n<tr class='".$tr_class."'>\n"; 94 $tr_class = ($tr_class == "pair")?"impair":"pair"; 87 95 88 96 echo "<td class='arial11 border1'>", … … 99 107 htmlspecialchars($data['fonction']), 100 108 "</a></td>\n"; 101 102 echo '<td class="arial1 border1">'.$mob.'</td>'; 103 echo '<td class="arial1 border1" style="text-align:center">'.$tel.'</td>'; 109 if ($coordonnees_actif) { 110 echo '<td class="arial1 border1">'.$telephones[$id_auteur].'</td>'; 111 } 112 echo '<td class="arial1 border1" style="text-align:center">'.$emails[$id_auteur].'</td>'; 104 113 echo "</tr>\n"; 105 114 } … … 115 124 } 116 125 } 117 118 function print_tel($n)119 {120 $n = preg_replace('/\D/', '', $n);121 if (!intval($n)) return '';122 return preg_replace('/(\d\d)/', '\1 ', $n);123 }124 125 126 ?> -
_plugins_/Association/Associaspip/exec/edit_relances.php
r47991 r48002 15 15 include_spip('inc/presentation'); 16 16 include_spip ('inc/navigation_modules'); 17 include_spip ('inc/voir_adherent'); // pour voir_adherent_infos18 17 19 18 function exec_edit_relances(){ … … 61 60 if ($corps) { 62 61 63 $ corps = '<fieldset>'62 $res = '<fieldset>' 64 63 . '<legend>Message de relance</legend>' 65 64 . '<label for="sujet"><strong>'._T('asso:Sujet') … … 76 75 . "</strong></td>\n" 77 76 . '<th>' . _T('asso:nom') . "</th>\n" 78 . '<th>' . _T('asso:telephone') . "</th>\n"79 . '<th>' . _T('asso:portable') . "</th>\n"80 77 . '<th>' . _T('asso:validite') . "</th>\n" 81 78 . '<th>' . _T('asso:envoi') . "</th>\n" … … 86 83 $bouton = isset($action) ? _T('asso:bouton_'.$action) : _T('asso:bouton_envoyer'); 87 84 88 echo generer_form_ecrire('action_relances', $ corps, '', $bouton);85 echo generer_form_ecrire('action_relances', $res, '', $bouton); 89 86 } 90 87 fin_cadre_relief(); … … 94 91 function relances_while($statut_interne) 95 92 { 96 $query = voir_adherent_infos("*", '', " B.email <> '' AND statut_interne like '$statut_interne' AND statut_interne <> 'sorti'", '', "nom_famille" ); 93 include_spip('inc/association_coordonnees'); 94 $query = sql_select("id_auteur, sexe, nom_famille, prenom, statut_interne, validite", "spip_asso_membres", " statut_interne like '$statut_interne' AND statut_interne <> 'sorti'", '', "nom_famille" ); 97 95 98 96 $res = ''; 97 $tr_class = 'pair'; 99 98 while ($data = sql_fetch($query)) { 100 99 $id_auteur=$data['id_auteur']; 101 $ email=$data["email"];100 $nom_membre = association_calculer_nom_membre($data['sexe'], $data['prenom'], $data['nom_famille']); 102 101 $class = $GLOBALS['association_styles_des_statuts'][$data['statut_interne']] . " border1"; 103 $res .= "\n<tr>"104 .'<td class="$class" style="text-align: right">'105 . $data['id ']102 $res .= '<tr class="'.$tr_class.'">' 103 .'<td class="$class" style="text-align:center">' 104 . $data['id_auteur'] 106 105 ."</td>\n" 107 .'<td class="$class">'.$data["nom_famille"].' '.$data['prenom']."</td>\n" 108 .'<td class="$class">'.$data['telephone']."</td>\n" 109 .'<td class="$class">'.$data['mobile']."</td>\n" 106 .'<td class="$class">'.$nom_membre."</td>\n" 110 107 .'<td class="$class">'.association_datefr($data['validite'])."</td>\n" 111 108 .'<td class="$class" style="text-align:center;">' … … 114 111 ."</td>\n" 115 112 .'</tr>'; 113 $tr_class = ($tr_class == "pair")?"impair":"pair"; 116 114 } 117 115 return $res; -
_plugins_/Association/Associaspip/exec/voir_adherent.php
r47991 r48002 21 21 $id_auteur= intval($_GET['id']); 22 22 $full = autoriser('associer', 'adherents'); 23 $query = voir_adherent_infos("*", 'LEFT JOIN spip_asso_categories as C ON A.categorie=C.id_categorie', "A.id_auteur=$id_auteur"); 24 $data = sql_fetch($query); 23 $data = sql_fetsel("m.sexe, m.nom_famille, m.prenom, m.validite, m.id_asso, c.libelle",'spip_asso_membres as m LEFT JOIN spip_asso_categories as c ON m.categorie=c.id_categorie', "m.id_auteur=$id_auteur"); 25 24 if ((!$full AND ($id_auteur !== $GLOBALS['visiteur_session']['id_auteur'])) OR !$data) { 26 25 include_spip('inc/minipres'); 27 26 echo minipres(); 28 27 } else { 28 include_spip('inc/association_coordonnees'); 29 29 $nom_membre = association_calculer_nom_membre($data['sexe'], $data['prenom'], $data['nom_famille']); 30 30 $validite=$data['validite']; 31 $adresse = $data['adresse']; 32 $cp = $data['code_postal']; 33 $ville = $data['ville']; 34 $telephone = $data["telephone"]; 35 $mobile = $data["mobile"]; 36 $email = $data['email']; 31 $adresses = association_recuperer_adresses_string($id_auteur); 32 $emails = association_recuperer_emails_string(array($id_auteur)); 33 $telephones = association_recuperer_telephones_string(array($id_auteur)); 34 37 35 $categorie = $data['libelle']?$data['libelle']:_T('asso:pas_de_categorie_attribuee'); 38 36 … … 58 56 "</a>"; 59 57 60 $coord = '<br /><div style="font-weight: bold; text-align: center" class="verdana1 spip_xx-small">' . $adresse . '<br />' . $cp . ' ' . $ville . '<br/>' . $telephone . '<br />' . $mobile . '<br />' .$email . '<br />' .$categorie."</div>\n";58 $coord = '<br /><div style="font-weight: bold; text-align: center" class="verdana1 spip_xx-small">' . $adresses . '<br />' . $emails[$id_auteur] . '<br/>' . $telephones[$id_auteur] . "<p>".$categorie."</p></div>\n"; 61 59 62 60 } else $coord = ''; … … 71 69 72 70 echo '<br /><div style="text-align:center;">'.association_date_du_jour().'</div>'; 73 echo fin_boite_info(true);71 echo fin_boite_info(true); 74 72 75 echo association_retour();73 echo association_retour(); 76 74 77 echo debut_droite("",true);75 echo debut_droite("",true); 78 76 79 debut_cadre_relief( "", false, "", $titre = $nom_membre);77 debut_cadre_relief( "", false, "", $titre = $nom_membre); 80 78 81 echo _L('Liens_vers_les_justificatifs'), ' ', voir_adherent_recus($id_auteur), '<br /><br />';79 echo _L('Liens_vers_les_justificatifs'), ' ', voir_adherent_recus($id_auteur), '<br /><br />'; 82 80 83 81 // FICHE HISTORIQUE COTISATIONS
Note: See TracChangeset
for help on using the changeset viewer.