!C99Shell v.2.1 [PHP 7 Update] [1.12.2019]!

Software: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/5.4.16. PHP/5.4.16 

uname -a: Linux roko-bkp 3.10.0-1160.102.1.el7.x86_64 #1 SMP Tue Oct 17 15:42:21 UTC 2023 x86_64 

uid=48(apache) gid=48(apache) groups=48(apache),1003(webmaster) 

Safe-mode: OFF (not secure)

/var/www/html/admin/webmail/plugins/subscriptions_option/   drwxr-xr-x
Free 9.32 GB of 93.48 GB (9.97%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     subscriptions_option.php (3.34 KB)      -rwxr-xr-x
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

/**
 * Subscription Options
 *
 * A plugin which can enable or disable the use of imap subscriptions.
 * It includes a toggle on the settings page under "Server Settings".
 * The preference can also be locked
 *
 * Add it to the plugins list in config/main.inc.php to enable the user option
 * The user option can be hidden and set globally by adding 'use_subscriptions'
 * to the the 'dont_override' configure line:
 * $rcmail_config['dont_override'] = array('use_subscriptions');
 * and then set the global preference
 * $rcmail_config['use_subscriptions'] = true; // or false
 *
 * Roundcube caches folder lists.  When a user changes this option or visits
 * their folder list, this cache is refreshed.  If the option is on the
 * 'dont_override' list and the global option has changed, don't expect
 * to see the change until the folder list cache is refreshed.
 *
 * @version 1.0
 * @author Ziba Scott
 */
class subscriptions_option extends rcube_plugin
{
    public 
$task 'mail|settings';
    
    function 
init()
    {
        
$this->add_texts('localization/'false);
        
$dont_override rcmail::get_instance()->config->get('dont_override', array());
        if (!
in_array('use_subscriptions'$dont_override)) {
            
$this->add_hook('user_preferences', array($this'settings_blocks'));
            
$this->add_hook('save_preferences', array($this'save_prefs'));
        }
        
$this->add_hook('list_mailboxes', array($this'list_mailboxes'));
        
$this->add_hook('manage_folders', array($this'manage_folders'));
    }

    function 
settings_blocks($args)
    {
        if (
$args['section'] == 'server') {
            
$use_subscriptions rcmail::get_instance()->config->get('use_subscriptions');
            
$field_id 'rcmfd_use_subscriptions';
            
$checkbox = new html_checkbox(array('name' => '_use_subscriptions''id' => $field_id'value' => 1));

            
$args['blocks']['main']['options']['use_subscriptions'] = array(
        
'title' => html::label($field_idQ($this->gettext('useimapsubscriptions'))),
                
'content' => $checkbox->show($use_subscriptions?1:0),
        );
        }

        return 
$args;
    }

    function 
save_prefs($args)
    {
        if (
$args['section'] == 'server') {
            
$rcmail rcmail::get_instance();
            
$use_subscriptions $rcmail->config->get('use_subscriptions');

            
$args['prefs']['use_subscriptions'] = isset($_POST['_use_subscriptions']) ? true false;

            
// if the use_subscriptions preference changes, flush the folder cache
            
if (($use_subscriptions && !isset($_POST['_use_subscriptions'])) ||
            (!
$use_subscriptions && isset($_POST['_use_subscriptions']))) {
                    
$rcmail->imap_init(true);
                    
$rcmail->imap->clear_cache('mailboxes');
            }
    }
        return 
$args;
    }

    function 
list_mailboxes($args)
    {
        
$rcmail rcmail::get_instance();
        if (!
$rcmail->config->get('use_subscriptions'true)) {
            
$args['folders'] = iil_C_ListMailboxes($rcmail->imap->conn$rcmail->imap->mod_mailbox($args['root']), $args['filter']);
        }
        return 
$args;
    }

    function 
manage_folders($args)
    {
        
$rcmail rcmail::get_instance();
        if (!
$rcmail->config->get('use_subscriptions'true)) {
            
$args['table']->remove_column('subscribed');
        }
        return 
$args;
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v.2.1 [PHP 7 Update] [1.12.2019] maintained by KaizenLouie and updated by cermmik | C99Shell Github (MySQL update) | Generation time: 0.0047 ]--