Source for file options.php

Documentation is available at options.php

  1. <?php
  2.  
  3. /**
  4.  * SquirrelMail List Commands Plugin
  5.  * options.php
  6.  *
  7.  * Shows options page for managing non-RFC-compliant list subscriptions.
  8.  *
  9.  * @copyright 1999-2020 The SquirrelMail Project Team
  10.  * @license http://opensource.org/licenses/gpl-license.php GNU Public License
  11.  * @version $Id: options.php 14845 2020-01-07 08:09:34Z pdontthink $
  12.  * @package plugins
  13.  * @subpackage listcommands
  14.  */
  15.  
  16.  
  17. include_once('../../include/init.php');
  18. include_once(SM_PATH 'plugins/listcommands/functions.php');
  19.  
  20. global $listcommands_allow_non_rfc_list_management$data_dir$username;
  21.  
  22. // only allow management of non-RFC lists if admin deems necessary
  23. //
  24. @include_once(SM_PATH 'plugins/listcommands/config.php');
  25. if (!$listcommands_allow_non_rfc_list_management)
  26.     return;
  27.  
  28.  
  29. $lists get_non_rfc_lists();
  30.  
  31.  
  32.  
  33. // remove list?
  34. //
  35. if (sqGetGlobalVar('deletelist'$deletelistSQ_FORM
  36.  && is_array($deletelist&& !empty($deletelist)) {
  37.  
  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 
  42.    //
  43.    foreach (array_keys($deletelistas $index)
  44.       unset($lists[$index]);
  45.  
  46.     sort($lists);
  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));
  51.  
  52. }
  53.  
  54.  
  55.  
  56. // add list?
  57. //
  58. if (sqGetGlobalVar('addlist'$ignoreSQ_FORM
  59.  && sqGetGlobalVar('newlist'$newlistSQ_FORM)) {
  60.  
  61.     $lists[$newlist;
  62.  
  63.     sort($lists);
  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));
  68.  
  69. }
  70.  
  71.  
  72.  
  73.  
  74. $oTemplate->assign('lists'$lists);
  75. $oTemplate->display('plugins/listcommands/non_rfc_lists.tpl');
  76. $oTemplate->display('footer.tpl');

Documentation generated on Mon, 13 Jan 2020 04:23:12 +0100 by phpDocumentor 1.4.3