1 | <?php |
---|
2 | /***************************************************************************\ |
---|
3 | * Associaspip, extension de SPIP pour gestion d'associations * |
---|
4 | * * |
---|
5 | * Copyright (c) 2007 Bernard Blazin & François de Montlivault (V1) * |
---|
6 | * Copyright (c) 2010-2011 Emmanuel Saint-James & Jeannot Lapin (V2) * |
---|
7 | * * |
---|
8 | * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * |
---|
9 | * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. * |
---|
10 | \***************************************************************************/ |
---|
11 | |
---|
12 | |
---|
13 | if (!defined("_ECRIRE_INC_VERSION")) return; |
---|
14 | |
---|
15 | |
---|
16 | include_spip ('inc/presentation'); |
---|
17 | include_spip ('inc/navigation_modules'); |
---|
18 | include_spip ('inc/mail'); |
---|
19 | //include_spip ('inc/charsets'); |
---|
20 | |
---|
21 | function exec_action_relances(){ |
---|
22 | |
---|
23 | include_spip('inc/autoriser'); |
---|
24 | if (!autoriser('associer', 'comptes')) { |
---|
25 | include_spip('inc/minipres'); |
---|
26 | echo minipres(); |
---|
27 | } else { |
---|
28 | |
---|
29 | $url_retour=$_POST['url_retour']; |
---|
30 | |
---|
31 | //On récupère les données globales |
---|
32 | |
---|
33 | $sujet=$_POST['sujet']; |
---|
34 | $message=$_POST['message'] ; |
---|
35 | $id_tab=(isset($_POST["id"])) ? $_POST["id"]:array(); |
---|
36 | $statut_tab=(isset($_POST["statut"])) ? $_POST["statut"]:array(); |
---|
37 | $count=count ($id_tab); |
---|
38 | |
---|
39 | $commencer_page = charger_fonction('commencer_page', 'inc'); |
---|
40 | echo $commencer_page(_T('asso:titre_gestion_pour_association')) ; |
---|
41 | association_onglets(); |
---|
42 | echo debut_gauche("",true); |
---|
43 | echo debut_boite_info(true); |
---|
44 | echo association_date_du_jour(); |
---|
45 | echo fin_boite_info(true); |
---|
46 | echo association_retour(); |
---|
47 | echo debut_droite("",true); |
---|
48 | |
---|
49 | debut_cadre_relief( "", false, "", $titre = _T('asso:relance_de_cotisations')); |
---|
50 | |
---|
51 | echo '<p><strong>', _T('asso:vous_vous_appretez_a_envoyer') . " $count "; |
---|
52 | if ($count==1) |
---|
53 | { echo _T('asso:relance');} |
---|
54 | else |
---|
55 | { echo _T('asso:relances');} |
---|
56 | echo '</strong></p>'; |
---|
57 | echo '<p>'.$sujet.'</p>'; |
---|
58 | echo '<fieldset>'; |
---|
59 | echo nl2br($message); |
---|
60 | echo '</fieldset>'; |
---|
61 | |
---|
62 | $res = ''; |
---|
63 | |
---|
64 | /* on fait passer en hidden un tableau id_auteur => statut_interne contenant uniquement les auteurs selectionnes */ |
---|
65 | foreach ($id_tab as $id_auteur) { |
---|
66 | $res .= '<input name="statut['.$id_auteur.']" type="hidden" value="'.$statut_tab[$id_auteur].'" />'; |
---|
67 | } |
---|
68 | |
---|
69 | $res .= '<input name="sujet" type="hidden" value="'.$sujet.'" />'; |
---|
70 | $res .= '<input name="message" type="hidden" value="'.htmlentities($message, ENT_QUOTES, 'UTF-8').'" />'; |
---|
71 | $res .= '<div style="float:right;"><input type="submit" value="'._T('asso:bouton_envoyer').'" class="fondo" /></div>'; |
---|
72 | |
---|
73 | echo redirige_action_post('modifier_relances', $count, 'adherents', '', "\n<div>$res</div>\n"); |
---|
74 | |
---|
75 | fin_cadre_relief(); |
---|
76 | echo fin_page_association(); |
---|
77 | } |
---|
78 | } |
---|
79 | ?> |
---|