weekmail.php 18.3 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
/* Copyright 2008
 * - Simon Lopez < simon dot lopez at ayolo dot org >
 *
 * Ce fichier fait partie du site de l'Association des Étudiants de
 * l'UTBM, http://ae.utbm.fr.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 * 02111-1307, USA.
 */
Krophil's avatar
Krophil committed
23
header("Location: https://ae.utbm.fr/com/weekmail");
Skia's avatar
Skia committed
24

25
26
27
28
$topdir = "../";

require_once($topdir. "include/site.inc.php");
require_once($topdir. "include/cts/sqltable.inc.php");
slopez's avatar
slopez committed
29
30
31
32
33
require_once($topdir.'include/entities/weekmail.inc.php');
require_once($topdir."include/entities/files.inc.php");
require_once($topdir."include/entities/folder.inc.php");


34
35
$site = new site ();
if (!$site->user->is_in_group ("moderateur_site"))
36
37
  $site->error_forbidden("accueil");
$site->start_page("accueil","Weekmail");
slopez's avatar
slopez committed
38
$cts = new contents('<a href="./index.php">gestion ae</a> / <a href="?">Weekmail</a>');
slopez's avatar
slopez committed
39
40
41
42
43
44
45
$list = new itemlist("Outils");
$list->add("<a href=\"?page=modere\">Modérer</a>");
$list->add("<a href=\"?page=custom\">Personaliser</a>");
$list->add("<a href=\"?page=addnews\">Ajouter une nouvelle</a>");
$list->add("<a href=\"?page=preview\">Prévisualiser</a>");
$list->add("<a href=\"?page=send\">Envoyer</a>");
$cts->add($list);
slopez's avatar
slopez committed
46
$site->add_contents($cts);
slopez's avatar
slopez committed
47
$weekmail = new weekmail($site->db,$site->dbrw);
slopez's avatar
slopez committed
48
49
50

if( isset($_REQUEST['get_preview']) )
{
slopez's avatar
slopez committed
51
  $weekmail->load_first_not_sent();
slopez's avatar
slopez committed
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
  $error = null;
  if(!isset($_REQUEST['id_asso']) || is_null($_REQUEST['id_asso']) || empty($_REQUEST['id_asso']))
    $error = 'Veuillez indiquer une association ou un club de référence.';
  elseif(!isset($_REQUEST['titre']) || empty($_REQUEST['titre']))
    $error = 'Veuillez indiquer un titre !';
  elseif(!isset($_REQUEST['content']) || empty($_REQUEST['content']))
    $error = 'Veuillez remplir le corps de la nouvelle.';
  elseif(!isset($_REQUEST['id_weekmail']))
    $error = 'Erreur indéterminée.';
  if(!is_null($error))
  {
    header("Content-Type: text/javascript; charset=utf-8");
    echo $error;
    exit;
  }

  header("Content-Type: text/javascript; charset=utf-8");
  echo "<div class=\"formrow\">";
  echo "<div class=\"formlabel\"></div>";
  echo "<div class=\"formfield\">";
  echo "<input type=\"submit\" id=\"valid_news\" name=\"valid_news\" value=\"Valider\" class=\"isubmit\" />";
  echo "</div></div>\n";
  echo "<h2>Prévisualisation</h2>";
  echo( $weekmail->preview_news($_REQUEST['id_asso'],
                                html_entity_decode($_REQUEST['titre'], ENT_NOQUOTES, 'UTF-8'),
                                html_entity_decode($_REQUEST['content'], ENT_NOQUOTES, 'UTF-8') ));
  exit();
}
80
81


slopez's avatar
slopez committed
82
83
84
85
if(isset($_REQUEST['action'])
   && $_REQUEST['action']=='create'
   && isset($_REQUEST['titre'])
   && !empty($_REQUEST['titre']))
86
{
slopez's avatar
slopez committed
87
  if($weekmail->can_create_new())
88
  {
slopez's avatar
slopez committed
89
90
91
92
93
    $file = new dfile($site->db);
    $weekmail->create($_REQUEST['titre']);
    if(isset($_REQUEST['id_file_header'])
       && $file->load_by_id($_REQUEST['id_file_header'])
      )
94
    {
slopez's avatar
slopez committed
95
96
      $file_info = getimagesize($file->get_real_filename());
      if($file_info)
97
      {
slopez's avatar
slopez committed
98
99
100
        list($width)=$file_info;
        if($width=='600')
          $weekmail->set_header($file->id);
101
102
      }
    }
slopez's avatar
slopez committed
103
    if(isset($_REQUEST['introduction']) && !empty($_REQUEST['introduction']))
slopez's avatar
slopez committed
104
105
106
107
108
      $weekmail->set_intro($_REQUEST['intro']);
    if(isset($_REQUEST['conclusion']) && !empty($_REQUEST['conclusion']))
      $weekmail->set_conclusion($_REQUEST['conclusion']);
    if(isset($_REQUEST['blague']) && !empty($_REQUEST['blague']))
      $weekmail->set_blague($_REQUEST['blague']);
109
110
    if(isset($_REQUEST['astuce']) && !empty($_REQUEST['astuce']))
      $weekmail->set_astuce($_REQUEST['astuce']);
slopez's avatar
slopez committed
111
    $site->add_contents(new contents(false,'Weekmail créé'));
112
  }
slopez's avatar
slopez committed
113
114
  else
    $site->add_contents(new error('','Il y\'a déjà un weekmail en attente d\'envoi et un weekmail ouvert à l\'ajout de nouvelles !'));
115
116
}

slopez's avatar
slopez committed
117
if($_REQUEST['action']
slopez's avatar
slopez committed
118
   && $_REQUEST['action']=='send'
slopez's avatar
slopez committed
119
   && $GLOBALS["svalid_call"]
slopez's avatar
slopez committed
120
   && $weekmail->load_first_not_sent())
121
{
slopez's avatar
slopez committed
122
123
  $_REQUEST['page']='custom';
  if(is_null($weekmail->id_header))
slopez's avatar
slopez committed
124
    $site->add_contents(new error('','Aucun header de défini !'));
slopez's avatar
slopez committed
125
  elseif(is_null($weekmail->titre) || empty($weekmail->titre))
slopez's avatar
slopez committed
126
    $site->add_contents(new error('','Aucun titre de défini !'));
slopez's avatar
slopez committed
127
  elseif(is_null($weekmail->introduction) || empty($weekmail->introduction))
slopez's avatar
slopez committed
128
    $site->add_contents(new error('','Aucune introduction de définie !'));
slopez's avatar
slopez committed
129
  elseif(is_null($weekmail->conclusion) || empty($weekmail->conclusion))
slopez's avatar
slopez committed
130
    $site->add_contents(new error('','Aucune conclusion de définie !'));
slopez's avatar
slopez committed
131
132
//  elseif($site->is_sure ( "","Envoyer le weekmail",null, 2 ))
  else
133
  {
slopez's avatar
slopez committed
134
    unset($_REQUEST['page']);
Skia's avatar
Skia committed
135
136
137
138
    if($weekmail->send()==True)
        $site->add_contents(new contents(false,'Weekmail envoyé avec succès'));
    else
        $site->add_contents(new contents(false,'Erreur dans l\'envoi du weekmail'));
139
140
  }
}
slopez's avatar
slopez committed
141
142
143

$weekmail->load_first_not_sent();
if($_REQUEST['page'] && $weekmail->is_valid())
144
{
slopez's avatar
slopez committed
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
  $page = $_REQUEST['page'];
  // modération des news
  if($page =='modere')
  {
    if($_REQUEST['modere'])
    {
      $modere=$_REQUEST['modere'];
      if($modere=='delete' && $_REQUEST['id_news'])
      {
        new delete($site->dbrw,
                   'weekmail_news',
                   array('id_weekmail'=>$weekmail->id,'id_news'=>$_REQUEST['id_news']));
        unset($_REQUEST['id_news']);
      }
      elseif($modere=='deletes'
         && $_REQUEST['id_news']
         && is_array($_REQUEST['id_news'])
         && !empty($_REQUEST['id_news']))
      {
        foreach($_REQUEST['id_news'] as $id_news)
          new delete($site->dbrw,
                     'weekmail_news',
                     array('id_weekmail'=>$weekmail->id,'id_news'=>$id_news));
slopez's avatar
slopez committed
168
        unset($_REQUEST['id_news']);
slopez's avatar
slopez committed
169
170
171
172
173
174
175
176
177
178
179
      }
      elseif($modere=='moderes'
         && $_REQUEST['id_news']
         && is_array($_REQUEST['id_news'])
         && !empty($_REQUEST['id_news']))
      {
        foreach($_REQUEST['id_news'] as $id_news)
          new update($site->dbrw,
                   'weekmail_news',
                   array('modere'=>1),
                   array('id_weekmail'=>$weekmail->id,'id_news'=>$id_news));
slopez's avatar
slopez committed
180
        unset($_REQUEST['id_news']);
slopez's avatar
slopez committed
181
182
183
184
185
186
187
188
189
190
191
      }
      elseif($modere=='order'
         && $_REQUEST['id_news']
         && is_array($_REQUEST['id_news'])
         && !empty($_REQUEST['id_news']))
      {
        foreach($_REQUEST['id_news'] as $id_news)
          new update($site->dbrw,
                   'weekmail_news',
                   array('rank'=>intval($_REQUEST[$id_news.'_rank'])),
                   array('id_weekmail'=>$weekmail->id,'id_news'=>$id_news));
slopez's avatar
slopez committed
192
        unset($_REQUEST['id_news']);
slopez's avatar
slopez committed
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
      }
      elseif($modere=='update'
             && $_REQUEST['id_news']
             && $_REQUEST['id_asso']
             && $_REQUEST['titre']
             && !empty($_REQUEST['titre'])
             && $_REQUEST['content']
             && !empty($_REQUEST['content']))
      {
        new update($site->dbrw,
                   'weekmail_news',
                   array('id_asso'=>$_REQUEST['id_asso'],
                         'titre'=>$_REQUEST['titre'],
                         'content'=>$_REQUEST['content'],
                         'modere'=>1),
                   array('id_weekmail'=>$weekmail->id,'id_news'=>$_REQUEST['id_news']));
      }
    }
    if(isset($_REQUEST['id_news']))
    {
slopez's avatar
slopez committed
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
      $req = new requete($site->db,
                         'SELECT * '.
                         'FROM weekmail_news '.
                         'WHERE id_news=\''.intval($_REQUEST['id_news']).'\' '.
                         'AND id_weekmail=\''.$weekmail->id.'\'');
      if($req->lines==1)
      {
        $row = $req->get_row();
        $frm = new form('moderenews', '?', false, 'post', 'Modérer une nouvelle');
        $frm->add_hidden('id_weekmail',$weekmail->id);
        $frm->add_hidden('id_news',$row['id_news']);
        $frm->add_hidden('modere','update');
        $frm->add_hidden('page','modere');
        $frm->add_entity_select("id_asso", "Association concern&eacute;e", $site->db, "asso",$row['id_asso'],true);
        $frm->add_info('Le nom du club ou de l\'association sera automatiquement indiqué, il n\'est donc pas nécessaire de le préciser dans le titre !');
        $frm->add_text_field("titre", "Titre : ",$row['titre'],true,80);
        $frm->add_dokuwiki_toolbar('content',null,null,true);
        $frm->add_text_area("content", "contenu : ",$row['content'],80,20,true);
        $frm->add_button('preview','Prévisualiser','javascript:make_preview();');
        $frm->puts("
slopez's avatar
slopez committed
233
234
235
236
237
238
239
240
241
242
243
244
<script language=\"javascript\">
  function make_preview()
  {
    titre = document.".$frm->name.".titre.value;
    id_asso = document.".$frm->name.".id_asso.value;
    content = document.".$frm->name.".content.value;
    id_weekmail = ".$weekmail->id."
    user = ".$site->user->id.";
    openInContents('news_preview', './weekmail.php', 'get_preview&titre='+encodeURIComponent(titre)+'&content='+encodeURIComponent(content)+'&user='+user+'&id_asso='+id_asso+'&id_weekmail='+id_weekmail);
  }
</script>
<div class=\"formrow\"><div id=\"news_preview\"></div></div>\n");
slopez's avatar
slopez committed
245
246
247
248
249
250
251
252
253
254
255
        $site->add_contents ($frm);
        $frm = new form('deletenews', '?', false, 'post', '');
        $frm->add_hidden('page','modere');
        $frm->add_hidden('id_weekmail',$weekmail->id);
        $frm->add_hidden('id_news',$row['id_news']);
        $frm->add_hidden('modere','delete');
        $frm->add_submit("suppr","Supprimer");
        $site->add_contents ($frm);
        $site->end_page ();
        exit();
      }
slopez's avatar
slopez committed
256
    }
slopez's avatar
slopez committed
257
258
259
260
261
262
263
264
265
266
267
268
269

    //liste des news et ordonnanceur
    $frm = new form('moderenews', '?', false, 'post', '');
    $frm->add_hidden('page','modere');
    $table = new table('Liste des nouvelles de ce weekmail');
    $table->add_row(array('','Titre','Modéré?','Rang'));
    $req = new requete($site->db,
                       'SELECT id_news, nom_asso, titre, modere, rank '.
                       'FROM `weekmail_news` '.
                       'LEFT JOIN `asso` USING(`id_asso`) '.
                       'WHERE `id_weekmail`=\''.$weekmail->id.'\' '.
                       'ORDER BY `rank` ASC');
    while(list($id_news,$asso,$titre,$modere,$rank)=$req->get_row())
slopez's avatar
slopez committed
270
    {
slopez's avatar
slopez committed
271
272
273
274
275
276
277
278
279
280
      if(!is_null($asso))
        $titre = '['.$asso.'] '.$titre;
      $mod = 'non';
      if($modere==1)
        $mod = 'oui';
      if(is_null($rank)) $rank='';
      $ln = array();
      $ln[]='<input type="checkbox" class="chkbox" name="id_news['.$id_news.']" value="'.$id_news.'"/>';//case à cocher
      $ln[]='<a href="?page=modere&id_news='.$id_news.'">'.$titre.'</a>';
      $ln[]=$mod;
281
      $ln[]='<input type="text" name="'.$id_news.'_rank" value="'.$rank.'" size="3" maxlength="3" />';//rank field
slopez's avatar
slopez committed
282
      $table->add_row($ln);
slopez's avatar
slopez committed
283
    }
slopez's avatar
slopez committed
284
285
286
287
    $frm->puts($table->html_render ());
    $frm->add_select_field('modere',
                           'Action',
                           array(''=>'',
Antoine Tenart's avatar
WTF    
Antoine Tenart committed
288
                                 'moderes'=>'Accepter',
slopez's avatar
slopez committed
289
290
291
292
293
294
295
296
297
                                 'order'=>'Ordonner',
                                 '-'=>'',
                                 '--'=>'----',
                                 '---'=>'',
                                 'deletes'=>'Supprimer'));
    $frm->add_submit("suppr","Valider");
    $site->add_contents ($frm);
    $site->end_page ();
    exit();
slopez's avatar
slopez committed
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
  }
  elseif($page == 'addnews')
  {

    if(isset($_POST['valid_news']))
    {
      $error = null;
      if(!isset($_REQUEST['id_asso']) || is_null($_REQUEST['id_asso']) || empty($_REQUEST['id_asso']))
        $error = 'Veuillez indiquer une association ou un club de référence.';
      elseif(!isset($_REQUEST['titre']) || empty($_REQUEST['titre']))
        $error = 'Veuillez indiquer un titre !';
      elseif(!isset($_REQUEST['content']) || empty($_REQUEST['content']))
        $error = 'Veuillez remplir le corps de la nouvelle.';
      elseif($GLOBALS['svalid_call'])
      {
        if(is_null($error) && $GLOBALS['svalid_call'])
        {
Antoine Tenart's avatar
plop    
Antoine Tenart committed
315
          $automodere = $site->user->is_in_group ("moderateur_site") && isset ($_REQUEST['automodere']) && $_REQUEST['automodere'] ? 1 : 0;
jlaval's avatar
jlaval committed
316
          $weekmail->add_news($_REQUEST['id_utilisateur'],$_REQUEST['id_asso'],$_REQUEST['titre'],$_REQUEST['content'], $automodere);
Antoine Tenart's avatar
plop    
Antoine Tenart committed
317
318
319
320
321

          if ($automodere)
            $site->add_contents(new contents(false,'Nouvelle postée.'));
          else
            $site->add_contents(new contents(false,'Nouvelle postée et en attente de modération.'));
slopez's avatar
slopez committed
322
323
324
325
326
327
328
329
330
        }
        else
          $site->add_contents (new error('',$error));
      }
    }
    $frm = new form('addnews', '?', false, 'post', 'Proposer une nouvelle');
    $frm->allow_only_one_usage();
    $frm->add_hidden('page','addnews');
    $frm->add_hidden('id_weekmail',$weekmail->id);
slopez's avatar
slopez committed
331
    $utl = new utilisateur($site->db);
slopez's avatar
slopez committed
332
    $utl->load_by_id($site->user->id);
slopez's avatar
slopez committed
333
334
335
336
337
338
    $frm->add_entity_smartselect('id_utilisateur','Auteur',$utl,false,true);
    $frm->add_entity_select("id_asso", "Association concern&eacute;e", $site->db, "asso",1,true);
    $frm->add_info('Le nom du club ou de l\'association sera automatiquement indiqué, il n\'est donc pas nécessaire de le préciser dans le titre !');
    $frm->add_text_field("titre", "Titre : ",'',true,80);
    $frm->add_dokuwiki_toolbar('content',null,null,true);
    $frm->add_text_area("content", "contenu : ",'',80,20,true);
Antoine Tenart's avatar
plop    
Antoine Tenart committed
339
340
    if ($site->user->is_in_group ("moderateur_site"))
        $frm->add_checkbox ('automodere', "Automodération");
slopez's avatar
slopez committed
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
    $frm->add_button('preview','Prévisualiser','javascript:make_preview();');
    $frm->puts("
<script language=\"javascript\">
  function make_preview()
  {
    titre = document.".$frm->name.".titre.value;
    id_asso = document.".$frm->name.".id_asso.value;
    content = document.".$frm->name.".content.value;
    id_weekmail = ".$weekmail->id."
    user = ".$site->user->id.";
    openInContents('news_preview', './weekmail.php', 'get_preview&titre='+encodeURIComponent(titre)+'&content='+encodeURIComponent(content)+'&user='+user+'&id_asso='+id_asso+'&id_weekmail='+id_weekmail);
  }
</script>
<div class=\"formrow\"><div id=\"news_preview\"></div></div>\n");
    $site->add_contents ($frm);
    $site->end_page ();
    exit();
  }
  elseif($page == 'custom')
  {
    if(isset($_POST['update']))
    {
      $file = new dfile($site->db);
      if(isset($_REQUEST['id_file_header'])
        && $file->load_by_id($_REQUEST['id_file_header']))
      {
        $file_info = getimagesize($file->get_real_filename());
        if($file_info)
        {
          list($width)=$file_info;
          if($width=='600')
            $weekmail->set_header($file->id);
        }
      }
slopez's avatar
slopez committed
375
376
      if(isset($_REQUEST['introduction']) && !empty($_REQUEST['introduction']))
        $weekmail->set_intro($_REQUEST['introduction']);
slopez's avatar
slopez committed
377
378
379
380
      if(isset($_REQUEST['conclusion']) && !empty($_REQUEST['conclusion']))
        $weekmail->set_conclusion($_REQUEST['conclusion']);
      if(isset($_REQUEST['blague']))
        $weekmail->set_blague($_REQUEST['blague']);
381
382
      if(isset($_REQUEST['astuce']))
        $weekmail->set_astuce($_REQUEST['astuce']);
slopez's avatar
slopez committed
383
    }
slopez's avatar
slopez committed
384
    $file = new dfile($site->db);
slopez's avatar
slopez committed
385
    if(!is_null($weekmail->id_header) && $weekmail->id_header>0)
slopez's avatar
slopez committed
386
      $file->load_by_id($weekmail->id_header);
slopez's avatar
slopez committed
387
    if($file->is_valid() && getimagesize($file->get_real_filename()))
mbriand's avatar
mbriand committed
388
      $site->add_contents(new image('header',$file->get_url()));
slopez's avatar
slopez committed
389
390
    else
      $file = new dfile($site->db);
slopez's avatar
slopez committed
391
392
393
394
    $frm = new form('custom', '?', false, 'post', 'Personalisation du weekmail');
    $frm->add_hidden('page','custom');
    $frm->add_entity_smartselect('id_file_header','Header',$file,false,true);
    $frm->add_text_field("titre", "Titre : ",$weekmail->titre,true,80);
slopez's avatar
slopez committed
395
396
397
    $frm->add_text_area("introduction", "introduction : ",$weekmail->introduction,80,10,true);
    $frm->add_text_area("conclusion", "conclusion : ",$weekmail->conclusion,80,10,true);
    $frm->add_text_area("blague", "blague : ",$weekmail->blague,80,10,false);
398
    $frm->add_text_area("astuce", "astuce : ",$weekmail->astuce,80,10,false);
slopez's avatar
slopez committed
399
400
401
402
403
404
405
    $frm->add_submit("update","Mettre à jour");
    $site->add_contents ($frm);
    $site->end_page ();
    exit();
  }
  elseif($page == 'preview')
  {
slopez's avatar
slopez committed
406
407
408
409
410
411
412
413
    header("Content-Type: text/html; charset=utf-8");
    echo str_replace('<html><body bgcolor="#333333" width="700px"><table bgcolor="#333333" width="700px">',
                     '<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">'.
                     '<head>'.
                     '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />'.
                     '<title>[weekmail] '.$weekmail->titre.'</title>'.
                     '</head>'.
                     '<body bgcolor="#333333"><table bgcolor="#333333" width="100%">',
slopez's avatar
slopez committed
414
                     $weekmail->test_render());
slopez's avatar
slopez committed
415
    exit();
slopez's avatar
slopez committed
416
417
418
419
420
421
422
423
  }
  elseif($page == 'send')
  {
    $frm = new form("envoyeweekmail", "?", false, "POST", "Envoyer le weekmail");
    $frm->allow_only_one_usage();
    $frm->add_hidden("action","send");
    $frm->add_submit("valid","Envoyer");
    $cts->add($frm,true);
slopez's avatar
slopez committed
424
  }
425
}
slopez's avatar
slopez committed
426
427
428


if($weekmail->can_create_new())
429
{
slopez's avatar
slopez committed
430
  $frm = new form('custom', '?', false, 'post', 'Verrouiller ce weekmail et en ouvrir un nouveau.');
jlaval's avatar
jlaval committed
431
  $frm->add_info('Cette procédure verrouille le weekmail actuel et crée un nouveau weekmail en attente de publication. '.
slopez's avatar
slopez committed
432
433
434
                 'Il vous est alors possible de continuer à éditer le weekmail courant sans modifications externes.');
  $frm->add_hidden('action','create');
  // header par défaut !
slopez's avatar
slopez committed
435
436
  $file = new dfile($site->db);
  $file->load_by_id(4693);
slopez's avatar
slopez committed
437
438
  $frm->add_entity_smartselect('id_file_header','Header',$file,false,true);
  $frm->add_text_field("titre", "Titre : ",'',true,80);
slopez's avatar
slopez committed
439
440
441
  $frm->add_text_area("introduction", "introduction : ",'',80,5,false);
  $frm->add_text_area("conclusion", "conclusion : ",'',80,5,false);
  $frm->add_text_area("blague", "blague : ",'',80,5,false);
442
  $frm->add_text_area("astuce", "astuce : ",'',80,5,false);
slopez's avatar
slopez committed
443
444
  $frm->add_submit("update","Vérouiller");
  $site->add_contents ($frm);
445
446
447
448
449
}

$site->end_page ();

?>