3 * FusionForge Mailing Lists Facility
5 * Copyright 1999-2001, VA Linux Systems, Inc.
6 * Copyright 2003-2004 (c) Guillaume Smet - Open Wide
7 * Copyright 2010 (c) Franck Villaume
9 * This file is part of FusionForge.
11 * FusionForge is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published
13 * by the Free Software Foundation; either version 2 of the License,
14 * or (at your option) any later version.
16 * FusionForge is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with FusionForge; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
27 require_once('../../env.inc.php');
28 require_once $gfcommon.'include/pre.php';
29 require_once $gfwww.'mail/admin/../mail_utils.php';
31 require_once $gfcommon.'mail/MailingList.class.php';
33 $group_id = getIntFromRequest('group_id');
41 $group = group_get_object($group_id);
42 if (!$group || !is_object($group)) {
44 } else if ($group->isError()) {
45 exit_error($group->getErrorMessage(),'home');
48 session_require_perm ('project_admin', $group->getID()) ;
50 $ml = new MailingList($group,getIntFromGet('group_list_id'));
52 if (getStringFromPost('submit')) {
53 $sure = getStringFromPost('sure');
54 if (!$ml->delete($sure,$sure)) {
55 exit_error($ml->getErrorMessage(),'home');
57 $feedback= _('Mailing List Successfully deleted');
58 session_redirect('?group_id='.$group_id.'&feedback='.urlencode($feedback));
62 mail_header(array('title' => _('Permanently Delete List')));
65 <h2><?php echo $ml->getName(); ?></h2>
66 <form method="post" action="<?php echo getStringFromServer('PHP_SELF'); ?>?group_id=<?php echo $group_id; ?>&group_list_id=<?php echo $ml->getID(); ?>">
68 <input type="checkbox" name="sure" value="1" /><?php echo _('Confirm Delete'); ?><br />
71 <input type="submit" name="submit" value="<?php echo _('Permanently Delete'); ?>" />