From e561749cfe91ec76377c66d3fbac87e7346d7bca Mon Sep 17 00:00:00 2001 From: x2000habouzit Date: Fri, 8 Oct 2004 11:30:46 +0000 Subject: [PATCH] not used anymore --- htdocs/admin/postfix_blacklist.php | 35 ++++++------------------ templates/admin/postfix.common.tpl | 55 -------------------------------------- 2 files changed, 8 insertions(+), 82 deletions(-) delete mode 100644 templates/admin/postfix.common.tpl diff --git a/htdocs/admin/postfix_blacklist.php b/htdocs/admin/postfix_blacklist.php index 7ce35b7..73e1816 100644 --- a/htdocs/admin/postfix_blacklist.php +++ b/htdocs/admin/postfix_blacklist.php @@ -18,36 +18,17 @@ * Foundation, Inc., * * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * *************************************************************************** - $Id: postfix_blacklist.php,v 1.6 2004-09-02 23:33:56 x2000bedo Exp $ + $Id: postfix_blacklist.php,v 1.7 2004-10-08 11:30:46 x2000habouzit Exp $ ***************************************************************************/ -require("auto.prepend.inc.php"); -new_admin_page('admin/postfix.common.tpl'); +require('auto.prepend.inc.php'); +new_admin_table_editor('postfix_blacklist','email',true); -if(isset($_REQUEST['nomligne'])) { - $nomligne = $_REQUEST['nomligne']; +$editor->assign('title', 'Blacklist de postfix'); +$editor->hide_id(); - if (!empty($_REQUEST['del'])) { - exec("/home/web/spam/effacerBlacklist $nomligne {$_SESSION['forlife']}"); - $page->assign('erreur', "Action: DEL($nomligne)"); - } else if (!empty($_REQUEST['add'])) { - exec("/home/web/spam/ajouterBlacklist ".$nomligne); - $page->assign('erreur', "Action: ADD($nomligne)"); - } -} +$editor->describe('email','email',true); +$editor->describe('reject_text','Texte de rejet',true); -$blacklist = Array(); -$fd = @fopen ("/etc/postfix/spamaccess", "r"); -while ($fd && !feof ($fd)) { - $buffer = fgets($fd, 4096); - if ($buffer[0]!='#' && (strlen($buffer)>1)) { # FIXME $string[i] is deprecated - $blacklist[] = $buffer; - } -} -@fclose($fd); - -$page->assign_by_ref('list',$blacklist); -$page->assign('title','Bannis de polytechnique.org'); -$page->assign('expl','Ne mettre dans les cases que des emails (aucun espace ni commentaire supplémentaire)'); -$page->run(); +$editor->run(); ?> diff --git a/templates/admin/postfix.common.tpl b/templates/admin/postfix.common.tpl deleted file mode 100644 index 5a45b90..0000000 --- a/templates/admin/postfix.common.tpl +++ /dev/null @@ -1,55 +0,0 @@ -{*************************************************************************** - * 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 * - *************************************************************************** - $Id: postfix.common.tpl,v 1.7 2004-08-31 11:25:39 x2000habouzit Exp $ - ***************************************************************************} - - -{dynamic} -

{$erreur}

- -
-{$title} -
- -page d'admin | -blacklist | -permissions | -mails retardés - -

-{$expl} -

- -
-
- - -
-
- -{foreach item=line from=$list} -
- - -
-{/foreach} -{/dynamic} - -{* vim:set et sw=2 sts=2 sws=2: *} -- 2.1.4