source: trunk/spip/esqueleto-redcta/plugins/zabomailmans/exec/abomailmans_envoyer.php @ 357

Last change on this file since 357 was 76, checked in by sebas, 16 years ago

plugin de abonomailman para enviar boletin electronico
basado sobre los cambios de sebas para arreglar los envios.

  • Property svn:executable set to *
File size: 3.4 KB
Line 
1<?php
2
3/*
4 * Abomailmans
5 * MaZiaR - NetAktiv
6 * tech@netaktiv.com
7 * Printemps 2007
8 * Inspire de Spip-Listes
9*/
10
11
12include_spip('inc/abomailmans');
13        include_spip('inc/barre');
14
15
16
17function exec_abomailmans_envoyer(){
18
19       
20
21        //
22        // Affichage de la page
23        //
24
25        debut_page(_T("abomailmans:envoyer_mailmans"), "documents", "abomailmans","");
26
27        debut_gauche();
28        debut_boite_info();
29                icone_horizontale (_T("abomailmans:icone_envoyer_mail_liste"), generer_url_ecrire("abomailmans_envoyer",""), "../"._DIR_PLUGIN_ABOMAILMANS."/img_pack/configure_mail.png", "");
30        fin_boite_info();
31
32        debut_droite();
33
34        debut_cadre_formulaire();
35
36                $liste_templates = find_all_in_path("templates/","[.]html$");
37                echo "<div id=\"ajax-loader\" align=\"right\"><img src=\""._DIR_PLUGIN_ABOMAILMANS. "/img_pack/ajax_indicator.gif\" /></div>";
38                echo "<div class='verdana2' id='envoyer'>";
39       
40                echo "<form method='POST' action='?exec=abomailmans_affiche_template' style='border: 0px; margin: 0px;' id='template' name='template'>";
41                echo "<br/><strong><label for='template'>"._T("abomailmans:template")."</label></strong><br/>";
42                echo "<select name='template'  CLASS='formo'>";
43                foreach($liste_templates as $titre_option) {
44                        $titre_option = basename($titre_option,".html");               
45                        echo "<option value='".$titre_option."'>".$titre_option."</option>\n";
46                }
47                echo "</select><br />";
48                       
49       
50                echo "<label for=\"date\">Contenu a partir de cette date</label><br />\n";
51                echo "<input name=\"date\" id=\"date\" class=\"date-picker\"  /><br /><br /><br />\n";
52
53                echo "<strong><label for='sujet'>"._T("abomailmans:rubrique")."</label></strong>";
54                echo "<br />";
55               
56                echo "<select name=\"id_rubrique\"  CLASS='formo'>";
57                echo "<option value=\"\"></option>";
58                echo abomailman_arbo_rubriques(0);
59                echo "</select><br />";
60
61
62                echo "<strong><label for='sujet'>"._T("abomailmans:mot")."</label></strong>";
63                echo "<br />";
64               
65                echo "<select name=\"id_mot\"  CLASS='formo'>";
66                echo "<option value=\"\"></option>";
67                $rqt_gmc = spip_query ("SELECT id_groupe, titre FROM spip_groupes_mots WHERE articles='oui'");
68                while ($row = spip_fetch_array($rqt_gmc)) {
69                $id_groupe = $row['id_groupe'];
70                $titre = $row['titre'];
71                        echo "<option value='' disabled=\"disabled\">". supprimer_numero (typo($titre)) . "</option>";
72
73                        $rqt_mc = spip_query ("SELECT id_mot, titre FROM spip_mots WHERE id_groupe='".$id_groupe."'");
74
75                        while ($row = spip_fetch_array($rqt_mc)) {
76                                $id_mot = $row['id_mot'];
77                                $titre = $row['titre'];
78                                echo "<option value='".$id_mot ."'>--". supprimer_numero (typo($titre)) . "</option>";
79                        }
80               
81                }
82                echo "</select><br />";
83
84                echo "<strong><label for='sujet'>"._T("abomailmans:sujet")."</label></strong> "._T('info_obligatoire_02');
85                echo "<br />";
86               
87                echo "<input type='text' name='sujet' id='sujet' CLASS='formo' value=\"\" size='40'$js_titre /><br />\n";
88
89                echo "<strong><label for='message'>"._T("abomailmans:message")."</label></strong>";
90                echo aide ("raccourcis");
91                echo "<br />";
92                echo afficher_barre('document.template.message');
93                echo "<textarea id='text_area' name='message' ".$GLOBALS['browser_caret']." class='formo' rows='5' cols='40' wrap=soft>";
94                echo $texte;
95                echo "</textarea>\n";
96                echo "<div align='right'>";
97                echo "<input type='submit' name='Valider' value='"._T('abomailmans:envoi_apercu')."' class='fondo'></div>\n";
98                echo "</form>";
99                echo "</div>\n";
100       
101
102        fin_cadre_formulaire();
103               
104                echo "<div id='apercu'></div>";
105
106        fin_page();
107}
108?>
Note: See TracBrowser for help on using the repository browser.