git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-166
from="Equipe Polytechnique.org" <validation+epouse@polytechnique.org>
cc="Equipe Polytechnique.org" <validation+epouse@polytechnique.org>
-[valid_liste]
-from="Equipe Polytechnique.org" <validation+listes@polytechnique.org>
-cc="Equipe Polytechnique.org" <validation+listes@polytechnique.org>
-
-[valid_photos]
-from="Equipe Polytechnique.org" <validation+trombino@polytechnique.org>
-cc="Equipe Polytechnique.org" <validation+trombino@polytechnique.org>
-
[valid_evts]
from="Equipe Polytechnique.org" <validation+evts@polytechnique.org>
cc="Equipe Polytechnique.org" <validation+evts@polytechnique.org>
require_once("xorg.inc.php");
new_skinned_page('listes/create.tpl', AUTH_MDP);
-$owners = preg_split("/[\r\n]+/",Post::get('owners'));
-$members = preg_split("/[\r\n]+/",Post::get('members'));
+$owners = preg_split("/[\r\n]+/",Post::get('owners'), -1, PREG_SPLIT_NO_EMPTY);
+$members = preg_split("/[\r\n]+/",Post::get('members'), -1, PREG_SPLIT_NO_EMPTY);
if (Post::has('add_owner_sub') && Post::has('add_owner')) {
require_once('user.func.inc.php');
{ return 'include/form.valid.listes.tpl'; }
// }}}
- // {{{ function handle_formu()
+ // {{{ function _mail_subj
- function handle_formu()
+ function _mail_subj()
{
- if (Env::get('submit') != "Accepter" && Env::get('submit') != "Refuser") {
- return false;
- }
+ return "[Polytechnique.org/LISTES] Demande de la liste {$this->liste}";
+ }
- require_once("xorg.mailer.inc.php");
- $mymail = new XOrgMailer('valid.liste.tpl');
- $mymail->assign('alias', $this->liste);
- $mymail->assign('bestalias', $this->bestalias);
- $mymail->assign('motif', stripslashes(Env::get('motif')));
+ // }}}
+ // {{{ function _mail_body
- if (Env::get('submit') == "Accepter") {
- $mymail->assign('answer', 'yes');
- if (!$this->commit()) {
- return 'problème';
- }
+ function _mail_body($isok)
+ {
+ if ($isok) {
+ return " La mailing list {$this->liste} que tu avais demandée vient d'être créée.";
} else {
- $mymail->assign('answer', 'no');
+ return " La demande que tu avais faite pour la mailing list {$this->liste} a été refusée.";
}
- $mymail->send();
-
- //Suppression de la demande
- $this->clean();
- return "Mail envoyé";
}
// }}}
{ return 'include/form.valid.photos.tpl'; }
// }}}
- // {{{ function handle_formu()
-
- function handle_formu ()
+ // {{{ function _mail_subj
+
+ function _mail_subj()
{
- if (Post::get('submit') != "Accepter" && Post::get('submit') != "Refuser") {
- return false;
- }
-
- require_once("xorg.mailer.inc.php");
- $mymail = new XOrgMailer('valid.photos.tpl');
- $mymail->assign('bestalias', $this->bestalias);
+ return "[Polytechnique.org/PHOTO] Changement de photo";
+ }
- if (Post::get('submit') == "Accepter") {
- $mymail->assign('answer','yes');
- $this->commit();
+ // }}}
+ // {{{ function _mail_body
+
+ function _mail_body($isok)
+ {
+ if ($isok) {
+ return " La demande de changement de photo que tu as demandée vient d'être effectuée.";
} else {
- $mymail->assign('answer','no');
+ return " La demande de changement de photo que tu avais faite a été refusée.";
}
-
- $mymail->send();
-
- $this->clean();
- return "Mail envoyé";
}
// }}}
$this->uid, $this->mimetype, $this->data, $this->x, $this->y);
require_once('notifs.inc.php');
register_watch_op($this->uid,WATCH_FICHE);
+ return true;
}
// }}}
{***************************************************************************
- * Copyright (C) 2003-2004 Polytechnique.org *
- * http://opensource.polytechnique.org/ *
- * *
- * 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 *
- ***************************************************************************}
+* Copyright (C) 2003-2004 Polytechnique.org *
+* http://opensource.polytechnique.org/ *
+* *
+* 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 *
+***************************************************************************}
-<form action="{$smarty.server.PHP_SELF}" method="post">
- <table class="bicol" cellpadding="4" summary="Demande d'alias">
- <tr>
- <td>Demandeur :
- </td>
- <td>
- <a href="{"fiche.php"|url}?user={$valid->bestalias}" class="popup2">
- {$valid->bestalias}</a>
- </td>
- </tr>
- <tr>
- <td>Liste :</td>
- <td>{$valid->liste}@polytechnique.org</td>
- </tr>
- <tr>
- <td>Desc :</td>
- <td style="border: 1px dotted inherit">
- {$valid->desc}
- </td>
- </tr>
- <tr>
- <td>Propriétés :</td>
- <td>
- <table cellpadding='2' cellspacing='0'>
- <tr>
- <td>visibilité:</td>
- <td>{if $valid->advertise}publique{else}privée{/if}</td>
- </tr>
- <tr>
- <td>diffusion:</td>
- <td>{if $valid->modlevel eq 2}modérée{elseif $valid->modlevel}restreinte{else}libre{/if}</td>
- </tr>
- <tr>
- <td>inscription:</td>
- <td>{if $valid->inslevel}modérée{else}libre{/if}</td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td>Getionnaires :</td>
- <td>
- {foreach from=$valid->owners item=o}
- <a href="{"fiche.php"|url}?user={$o}" class="popup2">{$o}</a>
- {/foreach}
- </td>
- </tr>
- <tr>
- <td>Membres :</td>
- <td>
- {foreach from=$valid->members item=o}
- <a href="{"fiche.php"|url}?user={$o}" class="popup2">{$o}</a>
- {/foreach}
- </td>
- </tr>
- <tr>
- <td class="middle">
- <input type="hidden" name="uid" value="{$valid->uid}" />
- <input type="hidden" name="type" value="{$valid->type}" />
- <input type="hidden" name="stamp" value="{$valid->stamp}" />
- <input type="submit" name="submit" value="Accepter" />
- <br /><br />
- <input type="submit" name="submit" value="Refuser" />
- </td>
- <td>
- <textarea rows="5" cols="50" name="motif"></textarea>
- </td>
- </tr>
- </table>
-</form>
+<tr class="pair">
+ <td class="titre">Liste :</td>
+ <td>{$valid->liste}@polytechnique.org</td>
+</tr>
+<tr class="pair">
+ <td class="titre">Desc :</td>
+ <td style="border: 1px dotted inherit">
+ {$valid->desc}
+ </td>
+</tr>
+<tr class="pair">
+ <td class="titre">Propriétés :</td>
+ <td>
+ <table cellpadding='2' cellspacing='0'>
+ <tr>
+ <td>visibilité:</td>
+ <td>{if $valid->advertise}publique{else}privée{/if}</td>
+ </tr>
+ <tr>
+ <td>diffusion:</td>
+ <td>{if $valid->modlevel eq 2}modérée{elseif $valid->modlevel}restreinte{else}libre{/if}</td>
+ </tr>
+ <tr>
+ <td>inscription:</td>
+ <td>{if $valid->inslevel}modérée{else}libre{/if}</td>
+ </tr>
+ </table>
+ </td>
+</tr>
+<tr class="pair">
+ <td class="titre">Gestionnaires :</td>
+ <td>
+ {foreach from=$valid->owners item=o}
+ <a href="{rel}/fiche.php?user={$o}" class="popup2">{$o}</a>
+ {/foreach}
+ </td>
+</tr>
+<tr class="pair">
+ <td class="titre">Membres :</td>
+ <td>
+ {foreach from=$valid->members item=o}
+ <a href="{rel}/fiche.php?user={$o}" class="popup2">{$o}</a>
+ {/foreach}
+ </td>
+</tr>
{* vim:set et sw=2 sts=2 sws=2: *}
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
***************************************************************************}
-
-<form action="{$smarty.server.PHP_SELF}" method="post">
-<table class="bicol" summary="Demande d'alias">
-<tr>
- <td>Demandeur :</td>
- <td><a href="{"fiche.php"|url}?user={$valid->bestalias}" class="popup2">
- {$valid->prenom} {$valid->nom}
- </a>
- </td>
-</tr>
-<tr>
- <td class="middle" colspan="2">
- <img src="{"getphoto.php"|url}?x={$valid->uid}" style="width:110px;" alt=" [ PHOTO ] " />
-
- <img src="{"getphoto.php"|url}?x={$valid->uid}&req=true" style="width:110px;" alt=" [ PHOTO ] " />
- </td>
-</tr>
-<tr>
- <td class="middle">
- <input type="hidden" name="uid" value="{$valid->uid}" />
- <input type="hidden" name="type" value="{$valid->type}" />
- <input type="hidden" name="stamp" value="{$valid->stamp}" />
- <input type="submit" name="submit" value="Accepter" />
- <br /><br />
- <input type="submit" name="submit" value="Refuser" />
- </td>
+<tr class="pair">
+ <td class="titre">Photos</td>
<td>
- <p>Raison du refus:</p>
- <textarea rows="5" cols="50" name="motif"></textarea>
+ <img src="{rel}/getphoto.php?x={$valid->uid}" style="width:110px;" alt=" [ PHOTO ] " />
+
+ <img src="{rel}/getphoto.php?x={$valid->uid}&req=true" style="width:110px;" alt=" [ PHOTO ] " />
</td>
</tr>
-</table>
-</form>
{* vim:set et sw=2 sts=2 sws=2: *}
+++ /dev/null
-{***************************************************************************
- * Copyright (C) 2003-2004 Polytechnique.org *
- * http://opensource.polytechnique.org/ *
- * *
- * 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 *
- ***************************************************************************}
-
-{config_load file="mails.conf" section="valid_liste"}
-{subject text="[Polytechnique.org/LISTES] Demande de la liste $alias par $bestalias"}
-{from full=#from#}
-{to addr="$bestalias@polytechnique.org"}
-{cc full=#cc#}
-{if $answer eq "yes"}
-Cher(e) camarade,
-
- La mailing list {$alias} que tu avais demandée vient d'être créée.
-{if $motif}
-Informations complémentaires:
-{$motif|stripslashes}
-{/if}
-
-Cordialement,
-L'équipe X.org
-{elseif $answer eq 'no'}
-Cher(e) camarade,
-
- La demande que tu avais faite pour la mailing list {$alias} a été refusée.
-La raison de ce refus est :
-{$motif|stripslashes}
-
-Cordialement,
-L'équipe X.org
-{/if}
-{* vim:set et sw=2 sts=2 sws=2: *}
+++ /dev/null
-{***************************************************************************
- * Copyright (C) 2003-2004 Polytechnique.org *
- * http://opensource.polytechnique.org/ *
- * *
- * 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 *
- ***************************************************************************}
-
-{config_load file="mails.conf" section="valid_photos"}
-{subject text="[Polytechnique.org/PHOTO] Changement de photo de $bestalias"}
-{from full=#from#}
-{to addr="$bestalias@polytechnique.org"}
-{cc full=#cc#}
-{if $answer eq "yes"}
-Cher(e) camarade,
-
- La demande de changement de photo que tu as demandée vient d'être effectuée.
-
-Cordialement,
-L'équipe X.org
-{elseif $answer eq 'no'}
-Cher(e) camarade,
-
- La demande de changement de photo que tu avais faite a été refusée.
-La raison de ce refus est :
-{$smarty.request.motif|stripslashes}
-
-Cordialement,
-L'équipe X.org
-{/if}
-{* vim:set et sw=2 sts=2 sws=2: *}