4 * SquirrelMail List Commands Plugin
7 * Shows options page for managing non-RFC-compliant list subscriptions.
9 * @copyright © 1999-2007 The SquirrelMail Project Team
10 * @license http://opensource.org/licenses/gpl-license.php GNU Public License
13 * @subpackage listcommands
17 include_once('../../include/init.php');
18 include_once(SM_PATH
. 'plugins/listcommands/functions.php');
20 global $listcommands_allow_non_rfc_list_management, $data_dir, $username;
22 // only allow management of non-RFC lists if admin deems necessary
24 @include_once
(SM_PATH
. 'plugins/listcommands/config.php');
25 if (!$listcommands_allow_non_rfc_list_management)
29 $lists = get_non_rfc_lists();
35 if (sqGetGlobalVar('deletelist', $deletelist, SQ_FORM
)
36 && is_array($deletelist) && !empty($deletelist)) {
38 // interface currently does not support multiple deletions at once
39 // but we'll support it here anyway -- the index values of this
40 // array are the only thing we care about and need to be the
41 // index number of the list to be deleted
43 foreach (array_keys($deletelist) as $index)
44 unset($lists[$index]);
47 $temp_lists = array();
48 foreach ($lists as $index => $list_addr)
49 $temp_lists[] = $index . '_' . $list_addr;
50 setPref($data_dir, $username, 'non_rfc_lists', implode(':', $temp_lists));
58 if (sqGetGlobalVar('addlist', $ignore, SQ_FORM
)
59 && sqGetGlobalVar('newlist', $newlist, SQ_FORM
)) {
64 $temp_lists = array();
65 foreach ($lists as $index => $list_addr)
66 $temp_lists[] = $index . '_' . $list_addr;
67 setPref($data_dir, $username, 'non_rfc_lists', implode(':', $temp_lists));
73 displayPageHeader($color, 'None');
75 $oTemplate->assign('lists', $lists);
76 $oTemplate->display('plugins/listcommands/non_rfc_lists.tpl');
77 $oTemplate->display('footer.tpl');