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. FusionForge is free software;
10 * you can redistribute it and/or modify it under the terms of the
11 * GNU General Public License as published by the Free Software
12 * Foundation; either version 2 of the Licence, or (at your option)
15 * FusionForge is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License along
21 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 require_once('../../env.inc.php');
26 require_once $gfcommon.'include/pre.php';
27 require_once $gfwww.'mail/admin/../mail_utils.php';
29 require_once $gfcommon.'mail/MailingList.class.php';
31 $group_id = getIntFromRequest('group_id');
39 $group = group_get_object($group_id);
40 if (!$group || !is_object($group)) {
42 } else if ($group->isError()) {
43 exit_error($group->getErrorMessage(),'home');
46 session_require_perm ('project_admin', $group->getID()) ;
48 $ml = new MailingList($group,getIntFromGet('group_list_id'));
50 exit_error($ml->getErrorMessage(),'home');
53 if (getStringFromPost('submit')) {
54 $sure = getStringFromPost('sure');
55 if (!$ml->delete($sure,$sure)) {
56 exit_error($ml->getErrorMessage(),'home');
58 $feedback= _('Mailing List Successfully deleted');
59 session_redirect('/mail/admin/?group_id='.$group_id.'&feedback='.urlencode($feedback));
63 mail_header(array('title' => _('Permanently Delete Mailing List ') . $ml->getName()));
67 <legend><?php echo _('Confirm Delete'); ?></legend>
68 <form method="post" action="<?php echo getStringFromServer('PHP_SELF'); ?>?group_id=<?php echo $group_id; ?>&group_list_id=<?php echo $ml->getID(); ?>">
69 <p>Do you really want to delete mailing list <?php echo $ml->getName(); ?>?</p>
71 <input type="checkbox" name="sure" value="1" /><?php echo _('Confirm Delete'); ?><br />
74 <input type="submit" name="submit" value="<?php echo _('Permanently Delete'); ?>" />