11f44323 |
1 | {**************************************************************************} |
2 | {* *} |
5ddeb07c |
3 | {* Copyright (C) 2003-2007 Polytechnique.org *} |
11f44323 |
4 | {* http://opensource.polytechnique.org/ *} |
5 | {* *} |
6 | {* This program is free software; you can redistribute it and/or modify *} |
7 | {* it under the terms of the GNU General Public License as published by *} |
8 | {* the Free Software Foundation; either version 2 of the License, or *} |
9 | {* (at your option) any later version. *} |
10 | {* *} |
11 | {* This program is distributed in the hope that it will be useful, *} |
12 | {* but WITHOUT ANY WARRANTY; without even the implied warranty of *} |
13 | {* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *} |
14 | {* GNU General Public License for more details. *} |
15 | {* *} |
16 | {* You should have received a copy of the GNU General Public License *} |
17 | {* along with this program; if not, write to the Free Software *} |
18 | {* Foundation, Inc., *} |
19 | {* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *} |
20 | {* *} |
21 | {**************************************************************************} |
22 | |
11f44323 |
23 | {config_load file="mails.conf" section="newsletter"} |
5b21237d |
24 | {if $mail_part eq 'head'} |
11f44323 |
25 | {from full=#from#} |
26 | {subject text=$nl->title(true)} |
5bc6e9e6 |
27 | {if isset(#replyto#)}{add_header name='Reply-To' value=#replyto#}{/if} |
28 | {if isset(#retpath#)}{add_header name='Return-Path' value=#retpath#}{/if} |
3ad44e08 |
29 | {elseif $mail_part eq 'text'} |
5b21237d |
30 | {if !$is_mail} |
11f44323 |
31 | <pre style="width : 72ex; margin: auto"> |
32 | {/if} |
33 | ==================================================================== |
34 | {$nl->title()} |
35 | ==================================================================== |
36 | |
37 | {$nl->head($prenom, $nom, $sexe, 'text')} |
38 | |
39 | |
40 | {foreach from=$nl->_arts key=cid item=arts name=cats} |
41 | {$smarty.foreach.cats.iteration} *{$nl->_cats[$cid]}* |
42 | {foreach from=$arts item=art} |
43 | - {$art->title()} |
44 | {/foreach} |
45 | |
46 | {/foreach} |
47 | |
48 | {foreach from=$nl->_arts key=cid item=arts} |
49 | -------------------------------------------------------------------- |
50 | *{$nl->_cats[$cid]}* |
51 | -------------------------------------------------------------------- |
52 | |
53 | {foreach from=$arts item=art} |
54 | {$art->toText()} |
55 | |
56 | {/foreach} |
57 | {/foreach} |
58 | |
59 | -------------------------------------------------------------------- |
a7de4ef7 |
60 | Cette lettre est envoyée à tous les Polytechniciens sur Internet par |
61 | l'intermédiaire de Polytechnique.org. |
11f44323 |
62 | |
63 | archives : [https://www.polytechnique.org/nl] |
a7de4ef7 |
64 | écrire : [https://www.polytechnique.org/nl/submit] |
11f44323 |
65 | ne plus recevoir : [https://www.polytechnique.org/nl/out] |
66 | |
d232ae0d |
67 | {if !$is_mail} |
11f44323 |
68 | </pre> |
69 | {/if} |
5b21237d |
70 | {elseif $mail_part eq 'html'} |
11f44323 |
71 | {if $is_mail} |
493b6abe |
72 | <?xml version="1.0" encoding="UTF-8"?> |
11f44323 |
73 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> |
74 | <html xmlns="http://www.w3.org/1999/xhtml"> |
75 | <head> |
183a157b |
76 | <title>Lettre mensuelle de Polytechnique.org</title> |
11f44323 |
77 | <style type="text/css"> |
a46f274c |
78 | {literal} |
79 | body { background-color: #ddd; color: #000; } |
80 | {/literal} |
11f44323 |
81 | <!-- |
4882f4a5 |
82 | {$nl->css()} |
11f44323 |
83 | --> |
84 | </style> |
85 | </head> |
86 | <body> |
a46f274c |
87 | <div class='nl_background'> |
11f44323 |
88 | {/if} |
89 | <div class='nl'> |
90 | <div class="title">{$nl->title()}</div> |
91 | <div class="intro">{$nl->head($prenom, $nom, $sexe, 'html')|smarty:nodefaults}</div> |
92 | <a id="top_lnk"></a> |
93 | {foreach from=$nl->_arts key=cid item=arts name=cats} |
94 | <div class="lnk"> |
2c5cbe69 |
95 | <a href="{$prefix}#cat{$cid}"><strong>{$smarty.foreach.cats.iteration}. {$nl->_cats[$cid]}</strong></a><br /> |
11f44323 |
96 | {foreach from=$arts item=art} |
0b2b7ce0 |
97 | <a href="{$prefix}#art{$art->_aid}"> - {$art->title()}</a><br /> |
11f44323 |
98 | {/foreach} |
99 | </div> |
100 | {/foreach} |
101 | |
102 | {foreach from=$nl->_arts key=cid item=arts name=cats} |
103 | <h1 class="xorg_nl"><a id="cat{$cid}"></a> |
104 | {$nl->_cats[$cid]} |
105 | </h1> |
106 | {foreach from=$arts item=art} |
107 | {$art->toHtml()|smarty:nodefaults} |
108 | <div class="top_lnk"><a href="{$prefix}#top_lnk">Revenir au sommaire</a></div> |
109 | {/foreach} |
110 | {/foreach} |
111 | <div class="foot1"> |
a7de4ef7 |
112 | Cette lettre est envoyée à tous les Polytechniciens sur Internet par l'intermédiaire de Polytechnique.org. |
11f44323 |
113 | </div> |
114 | <div class="foot2"> |
115 | [<a href="https://www.polytechnique.org/nl">archives</a> | |
a7de4ef7 |
116 | <a href="https://www.polytechnique.org/nl/submit">écrire dans la NL</a> | |
11f44323 |
117 | <a href="https://www.polytechnique.org/nl/out">ne plus recevoir</a>] |
118 | </div> |
183a157b |
119 | </div> |
11f44323 |
120 | {if $is_mail} |
a46f274c |
121 | </div> |
11f44323 |
122 | </body> |
123 | </html> |
124 | {/if} |
125 | {/if} |
126 | |
a7de4ef7 |
127 | {* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *} |