!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/archive/   drwxr-xr-x
Free 9.29 GB of 93.48 GB (9.94%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


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

/**
 * Archive
 *
 * Plugin that adds a new button to the mailbox toolbar
 * to move messages to a (user selectable) archive folder.
 *
 * @version 1.4
 * @author Andre Rodier, Thomas Bruederli
 */
class archive extends rcube_plugin
{
  public 
$task 'mail|settings';

  function 
init()
  {
    
$this->register_action('plugin.archive', array($this'request_action'));

    
# There is no "Archived flags"
    # $GLOBALS['IMAP_FLAGS']['ARCHIVED'] = 'Archive';
    
    
$rcmail rcmail::get_instance();
    if (
$rcmail->task == 'mail' && ($rcmail->action == '' || $rcmail->action == 'show') && ($archive_folder $rcmail->config->get('archive_mbox'))) {
      
$this->include_script('archive.js');
      
$this->add_texts('localization'true);
      
$this->add_button(
        array(
            
'command' => 'plugin.archive',
            
'imagepas' => 'archive_pas.png',
            
'imageact' => 'archive_act.png',
            
'title' => 'buttontitle',
            
'domain' => $this->ID,
        ),
        
'toolbar');
      
      
// register hook to localize the archive folder
      
$this->add_hook('render_mailboxlist', array($this'render_mailboxlist'));

      
// set env variable for client
      
$rcmail->output->set_env('archive_folder'$archive_folder);

      
// add archive folder to the list of default mailboxes
      
if (($default_folders $rcmail->config->get('default_imap_folders')) && !in_array($archive_folder$default_folders)) {
        
$default_folders[] = $archive_folder;
        
$rcmail->config->set('default_imap_folders'$default_folders);
      }
      
    }
    else if (
$rcmail->task == 'settings') {
      
$dont_override $rcmail->config->get('dont_override', array());
      if (!
in_array('archive_mbox'$dont_override)) {
        
$this->add_hook('user_preferences', array($this'prefs_table'));
        
$this->add_hook('save_preferences', array($this'save_prefs'));
      }
    }
  }
  
  function 
render_mailboxlist($p)
  {
    
$rcmail rcmail::get_instance();
    
$archive_folder $rcmail->config->get('archive_mbox');

    
// set localized name for the configured archive folder
    
if ($archive_folder) {
      if (isset(
$p['list'][$archive_folder]))
        
$p['list'][$archive_folder]['name'] = $this->gettext('archivefolder');
      else 
// search in subfolders
        
$this->_mod_folder_name($p['list'], $archive_folder$this->gettext('archivefolder'));
    }

    return 
$p;
  }

  function 
_mod_folder_name(&$list$folder$new_name)
  {
    foreach (
$list as $idx => $item) {
      if (
$item['id'] == $folder) {
        
$list[$idx]['name'] = $new_name;
    return 
true;
      } else if (!empty(
$item['folders']))
        if (
$this->_mod_folder_name($list[$idx]['folders'], $folder$new_name))
      return 
true;
    }
    return 
false;
  }

  function 
request_action()
  {
    
$this->add_texts('localization');
    
    
$uids get_input_value('_uid'RCUBE_INPUT_POST);
    
$mbox get_input_value('_mbox'RCUBE_INPUT_POST);
    
    
$rcmail rcmail::get_instance();
    
    
// There is no "Archive flags", but I left this line in case it may be useful
    // $rcmail->imap->set_flag($uids, 'ARCHIVE');
    
    
if (($archive_mbox $rcmail->config->get('archive_mbox')) && $mbox != $archive_mbox) {
      
$rcmail->output->command('move_messages'$archive_mbox);
      
$rcmail->output->command('display_message'$this->gettext('archived'), 'confirmation');
    }
    
    
$rcmail->output->send();
  }

  function 
prefs_table($args)
  {
    if (
$args['section'] == 'folders') {
      
$this->add_texts('localization');
      
      
$rcmail rcmail::get_instance();
      
$select rcmail_mailbox_select(array('noselection' => '---''realnames' => true'maxlength' => 30));

      
$args['blocks']['main']['options']['archive_mbox'] = array(
          
'title' => $this->gettext('archivefolder'),
          
'content' => $select->show($rcmail->config->get('archive_mbox'), array('name' => "_archive_mbox"))
      );
    }

    return 
$args;
  }

  function 
save_prefs($args)
  {
    if (
$args['section'] == 'folders') {
      
$args['prefs']['archive_mbox'] = get_input_value('_archive_mbox'RCUBE_INPUT_POST);
      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.0059 ]--