/system/expressionengine/libraries/Messages.php
PHP | 5249 lines | 4593 code | 359 blank | 297 comment | 199 complexity | a6729e73dc11ea75ddbd542e5527bf56 MD5 | raw file
Large files files are truncated, but you can click here to view the full file
- <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
- /**
- * ExpressionEngine - by EllisLab
- *
- * @package ExpressionEngine
- * @author EllisLab Dev Team
- * @copyright Copyright (c) 2003 - 2012, EllisLab, Inc.
- * @license http://ellislab.com/expressionengine/user-guide/license.html
- * @link http://ellislab.com
- * @since Version 2.0
- * @filesource
- */
-
- // ------------------------------------------------------------------------
- /**
- * ExpressionEngine Core Private Messaging Class
- *
- * @package ExpressionEngine
- * @subpackage Core
- * @category Core
- * @author EllisLab Dev Team
- * @link http://ellislab.com
- */
- class EE_Messages {
- // URL Writing
- var $allegiance = 'cp'; // Side of the divide: cp or user
- var $messages_cp = FALSE; // CP Object
- var $base_url = ''; // Base URL used throughout
- var $form_url = ''; // For CP Forms, since Rick was a doofus and changed how they work
- var $path = 'member/'; // User Side Path
- var $request = 'inbox'; // User Side Request
- var $cur_id = ''; // User Side ID, if any
- var $theme_class = 'profile_theme';
- var $images_folder = ''; // Location of Forum Images
- // Member Specific
- var $member_id = '';
- var $private_messages = '0'; // Number of unread private messages
- var $block_tracking = 'n'; // Block Sender Tracking
-
- // Member Group Specific
- var $allow_pm = 'y'; // Allowed to PM?
- var $attach_allowed = 'y'; // Attachments allowed?
-
- // Private Message Preferences
- var $storage_limit = 60; // Limit for messages to store per user (does not count deleted)
- var $send_limit = 20; // Limit for messages sent a day
- var $upload_path = ''; // Upload path for files
- var $attach_maxsize = 250; // Max size for attachments (KB)
- var $attach_total = 100; // Maximum amount for all PM attachments (MB)
- var $html_format = 'safe'; // HTML Formatting?
- var $auto_links = 'y'; // Auto convert URLs to links
- var $max_chars = 6000; // Maximum number of characters in a messages
- var $max_attachments = 1; // Maximum number of attachments per message
-
- // User Data Variables
- var $total_messages = ''; // Total Store Messages for User
- var $current_folder = '1'; // If any...
- var $folders = array(); // Folders for User
- var $hide_preview = FALSE; // Whether to show the Preview of Message
- var $attachments = array(); // Attachments for current message
- var $baddies = array(); // Blocked List; IDs only
- var $goodies = array(); // Buddies List; IDs only
- var $blocked = FALSE; // Blocked List
- var $buddies = FALSE; // Buddies List
- var $invalid_name = FALSE; // Invalid name submitted?
-
- // Menu Content
- var $menu_items = array(); // Abstracted data for creating menu
- var $menu = ''; // Menu fully formed
-
- // Processing and Returned Data
- var $title = ''; // Title of Page
- var $crumb = ''; // Crumb text for page
- var $return_data = ''; // Output data
- var $header_javascript = ''; // User Side Header JavaScript
- var $error = ''; // Submission Error
- var $single_parts = array(); // Parts of a page: text, form, images, content
- var $conditionals = array(); // Conditionals
- var $mimes = '';
-
- // Changeable Class Variables
- var $default_folders = array('Inbox', 'Sent');
- var $max_folders = 10; // Maximum number of folders per user
- var $per_page = 5; // Messages on a Folder's Page
- var $graph_width = '300'; // Width of Total Messages Graph
- var $emoticons_per_row = 5; // Number of Images Per Table Row
- var $delete_expiration = 30; // Erase deleted messages after X days
- var $disable_emoticons = 'n'; // Disable the showing of emoticons
- var $spellcheck_enabled = TRUE; // Enabled Spellcheck?
- /** -----------------------------------
- /** Constructor
- /** -----------------------------------*/
- function __construct()
- {
- // Make a local reference to the ExpressionEngine super object
- $this->EE =& get_instance();
- /** -----------------------------------
- /** A Few Things to Define, Batman
- /** -----------------------------------*/
-
- $this->member_id = $this->EE->session->userdata['member_id'];
- $this->allow_pm = ($this->EE->session->userdata['group_id'] == '1') ? 'y' : $this->EE->session->userdata['can_send_private_messages'];
- $this->allow_pm = ($this->allow_pm == 'y' && $this->EE->session->userdata['accept_messages'] == 'y') ? 'y' : 'n';
-
- $this->attach_allowed = $this->EE->session->userdata('can_attach_in_private_messages');
-
- $this->storage_limit = ($this->EE->session->userdata['group_id'] == '1') ? 0 : $this->EE->session->userdata['prv_msg_storage_limit'];
- $this->send_limit = $this->EE->session->userdata['prv_msg_send_limit'];
- if ( ! defined('AMP')) define('AMP', '&');
- if ( ! defined('BR')) define('BR', '<br />');
- if ( ! defined('NL')) define('NL', "\n");
- if ( ! defined('NBS')) define('NBS', " ");
-
- $prefs = array( 'prv_msg_attach_maxsize',
- 'prv_msg_attach_total',
- 'prv_msg_html_format',
- 'prv_msg_auto_links',
- 'prv_msg_max_chars',
- 'prv_msg_max_attachments'
- );
-
- for($i=0, $t = count($prefs); $i < $t; ++$i)
- {
- if (FALSE !== ($value = $this->EE->config->item($prefs[$i])))
- {
- $name = str_replace('prv_msg_', '', $prefs[$i]);
-
- $this->{$name} = $value;
- }
- }
- $this->upload_path = $this->EE->config->slash_item('prv_msg_upload_path');
-
- // -----------------------------------
- // Nearly every page requires this,
- // so just load it for all of them
- // -----------------------------------
-
- $this->EE->lang->loadfile('messages');
-
- $this->title = $this->EE->lang->line('private_messages');
- $this->crumb = $this->EE->lang->line('private_messages');
-
- $this->images_folder = $this->EE->config->slash_item('theme_folder_url').'cp_global_images/';
-
- $this->single_parts['path']['image_url'] = $this->images_folder;
-
- /** -----------------------------------
- /** Maintenance
- /** -----------------------------------*/
-
- srand(time());
-
- if ((rand() % 100) < 5)
- {
- $this->maintenance();
- }
- }
-
- /** -----------------------------------
- /** Determine request
- /** -----------------------------------*/
-
- function _determine_request()
- {
- if ($this->allegiance == 'cp')
- {
- $this->base_url = BASE.AMP.'C=myaccount'.AMP.'M=messages'.AMP.'P=';
- $this->form_url = 'C=myaccount'.AMP.'M=messages'.AMP.'P=';
- $this->request = ($this->EE->input->get_post('P') !== FALSE) ? $this->EE->input->get_post('P') : 'inbox';
- }
- else
- {
- $this->form_url = $this->base_url;
- }
- }
-
-
-
- /** -----------------------------------
- /** Create Path
- /** -----------------------------------*/
- function _create_path($uri='', $hidden='')
- {
- if ($this->allegiance == 'user')
- {
- return $this->EE->functions->remove_double_slashes($this->base_url.'/'.$uri);
- }
- else
- {
- return $this->EE->functions->remove_double_slashes($this->base_url.'/'.$uri.$hidden);
- }
- }
-
- // -----------------------------------
- // Process Page :
- // Convert and Template into Content
- // -----------------------------------
- function _process_template($template, $data = '')
- {
- /** -------------------------------
- /** Process Conditionals
- /** -------------------------------*/
-
- if (count($this->conditionals) > 0)
- {
- foreach($this->conditionals as $key => $value)
- {
- if ($value == 'y')
- {
- $template = preg_replace("/\{if\s+".$key."\}(.+?)\{\/if\}/si", "\\1", $template);
- $template = preg_replace("/\{if\s+not_".$key."\}(.+?)\{\/if\}/si", '', $template);
- }
- else
- {
- $template = preg_replace("/\{if\s+".$key."\}.+?\{\/if\}/si", '', $template);
- $template = preg_replace("/\{if\s+not_".$key."\}(.+?)\{\/if\}/si", "\\1", $template);
- }
- }
- }
-
-
- /** --------------------------
- /** Process any sent data
- /** --------------------------*/
-
- if (is_array($data) && count($data) > 0)
- {
- foreach($data as $key => $value)
- {
- $template = str_replace(LD.$key.RD, $value, $template);
- }
- }
-
- /** -----------------------------
- /** Process any universal data
- /** -----------------------------*/
-
- if (count($this->single_parts) > 0)
- {
- foreach($this->single_parts as $key => $value)
- {
- if (is_array($value) && count($value) > 0)
- {
- foreach($value as $key2 => $value2)
- {
- if (is_array($value2) && count($value2) > 0)
- {
- foreach($value2 as $key3 => $value3)
- {
- $template = str_replace(LD.$key.':'.$key2.':'.$key3.RD, $value3, $template);
- }
- }
- else
- {
- if ($key == 'input' && $key2 == 'body')
- {
- $value2 = $this->EE->functions->encode_ee_tags($value2, TRUE);
- }
-
- $template = str_replace(LD.$key.':'.$key2.RD,
- ($key == 'input' && $key2 != 'body' && $key2 != 'folder_name') ? htmlspecialchars($value2, ENT_QUOTES) : $value2,
- $template);
- }
- }
- }
- elseif( ! is_array($value))
- {
- if ($key != 'title' && ! stristr($value, '<option')) $value = htmlspecialchars($value, ENT_QUOTES); // {title} is link title for message menu
-
- $template = str_replace(LD.$key.RD, $value, $template);
- }
- }
- }
-
- /** -------------------------------------
- /** Finally, process all language text
- /** -------------------------------------*/
-
- if (isset($this->EE->lang->language) && is_array($this->EE->lang->language) && count($this->EE->lang->language) > 0)
- {
- foreach($this->EE->lang->language as $key => $value)
- {
- $template = str_replace(LD.'lang:'.$key.RD, $value, $template);
- }
- }
-
- return $template;
- }
-
-
- /** -----------------------------------
- /** Manage Request
- /** -----------------------------------*/
- function manager()
- {
- if ($this->allow_pm != 'y')
- {
- return;
- }
-
- $this->_determine_request();
-
- if (count($this->folders) == 0)
- {
- $this->fetch_folders();
- }
-
- if ($this->disable_emoticons == 'y')
- {
- $this->EE->config->set_item('enable_emoticons', 'n');
- }
-
- /** -----------------------------------
- /** Call request
- /** -----------------------------------*/
-
- if (method_exists($this, $this->request))
- {
- $this->{$this->request}();
- }
- else
- {
- $this->inbox();
- }
-
- /* -----------------------------------
- /* Member Module - Fixeroo
- /* - Rick has some legacy code in the member module that converts
- /* certain path variables automatically. We, however, do not want that
- /* in our most precious Private Messages, and so we do a bit of conversion
- /* -----------------------------------*/
-
- $this->return_data = preg_replace("/".LD."\s*path=(.*?)".RD."/", '{path=\\1}', $this->return_data);
- $this->return_data = preg_replace("#".LD."\s*(profile_path\s*=.*?)".RD."#", '{\\1}', $this->return_data);
-
- /** -----------------------------------
- /** Name to ID in Form Switch - Fixeroo
- /** -----------------------------------*/
-
- $this->return_data = str_replace('opener.document.submit_message.', "opener.document.getElementById('submit_message').", $this->return_data);
- }
-
-
- /** -----------------------------------
- /** Fetch Buddy and Block Lists
- /** -----------------------------------*/
-
- function fetch_lists($which='')
- {
- if ($which == 'buddy')
- {
- $this->goodies = array();
- $this->buddies = array();
- }
- elseif($which == 'blocked')
- {
- $this->baddies = array();
- $this->blocked = array();
- }
- else
- {
- $this->goodies = array();
- $this->buddies = array();
- $this->baddies = array();
- $this->blocked = array();
- }
-
- $extra = ($which != '') ? "AND l.listed_type = '{$which}'" : '';
-
- $query = $this->EE->db->query("SELECT l.*, m.username, m.screen_name, m.member_id
- FROM exp_message_listed l, exp_members m
- WHERE l.listed_member = m.member_id
- AND l.member_id = '{$this->member_id}'
- $extra");
-
- if ($query->num_rows() > 0)
- {
- foreach($query->result_array() as $row)
- {
- if (empty($row['username']))
- {
- continue;
- }
-
- if ($row['listed_type'] == 'buddy')
- {
- $this->buddies[] = array($row['listed_member'], $row['username'], $row['screen_name'], $row['listed_description'], $row['listed_id'], $row['member_id']);
- $this->goodies[] = $row['listed_member'];
- }
- else
- {
- $this->blocked[] = array($row['listed_member'], $row['username'], $row['screen_name'], $row['listed_description'], $row['listed_id'], $row['member_id']);
- $this->baddies[] = $row['listed_member'];
- }
- }
- }
- }
-
-
- /** -----------------------------------
- /** Determine Folders for this User
- /** -----------------------------------*/
-
- function fetch_folders()
- {
- $this->folders = array();
-
- $query = $this->EE->db->query("SELECT * FROM exp_message_folders WHERE member_id = '{$this->member_id}'");
-
- if ($query->num_rows() == 0)
- {
- $this->EE->db->query($this->EE->db->insert_string('exp_message_folders', array('member_id' => $this->member_id)));
-
- $this->folders['1'] = array($this->default_folders['0'], '0');
- $this->folders['2'] = array($this->default_folders['1'], '0');
- }
- else
- {
- $required = array('1' => array($query->row('folder1_name') , '0'), '2' => array($query->row('folder2_name') , '0'));
-
- for($i=3; $i <= $this->max_folders; $i++)
- {
- $this->folders[$i] = htmlspecialchars($query->row('folder'.$i.'_name') , ENT_QUOTES);
- }
-
- asort($this->folders);
-
- foreach($this->folders as $key => $value)
- {
- $this->folders[$key] = array($value, '0');
- }
-
- $this->folders = $required + $this->folders;
-
- $results = $this->EE->db->query("SELECT COUNT(*) AS count, message_folder FROM exp_message_copies
- WHERE recipient_id = '{$this->member_id}'
- AND message_deleted = 'n'
- GROUP BY message_folder");
-
- if ($results->num_rows() > 0)
- {
- foreach($results->result_array() as $row)
- {
- $this->folders[$row['message_folder']]['1'] = $row['count'];
- }
- }
- }
- }
-
-
- /** -----------------------------------
- /** Edit Folders
- /** -----------------------------------*/
-
- function folders()
- {
- $template = $this->retrieve_template('message_edit_folders');
- $rows = $this->retrieve_template('message_edit_folders_row');
-
- $form_details = array('action' => $this->base_url.'edit_folders',
- 'id' => 'edit_folders',
- 'secure' => ($this->allegiance == 'cp') ? FALSE : TRUE
- );
-
- $this->single_parts['form']['form_declaration']['edit_folders'] = $this->EE->functions->form_declaration($form_details);
- $this->single_parts['include']['current_folders'] = '';
- $this->single_parts['include']['new_folder'] = '';
-
- if ( ! isset($this->single_parts['include']['success_message']))
- {
- $this->single_parts['include']['success_message'] = '';
- }
-
- /** -----------------------------------------
- /** Create Folder Rows
- /** -----------------------------------------*/
-
- $t=1;
-
- foreach($this->folders as $key => $value)
- {
- if ($value['0'] == '')
- {
- continue;
- }
-
- $t++;
- $this->single_parts['lang']['required'] = ($key < 3) ? $this->EE->lang->line('folder_required') : '';
- $this->single_parts['input']['folder_name'] = $value['0'];
- $this->single_parts['input']['folder_id'] = $key;
- $this->single_parts['style'] = ($t % 2) ? 'tableCellOne' : 'tableCellTwo';
-
- $this->single_parts['include']['current_folders'] .= $this->_process_template($rows);
- }
-
- /** -----------------------------------------
- /** Create New Folder Row, If Allowed
- /** -----------------------------------------*/
-
- if ($t <= $this->max_folders)
- {
- $t++;
- $this->single_parts['lang']['required'] = '';
- $this->single_parts['input']['folder_name'] = '';
- $this->single_parts['input']['folder_id'] = 'new';
- $this->single_parts['style'] = ($t % 2) ? 'tableCellOne' : 'tableCellTwo';
-
- $this->single_parts['include']['new_folder'] = $this->_process_template($rows);
- }
-
- /** ----------------------------------------
- /** Return the Folder's Contents
- /** ----------------------------------------*/
-
- $this->title = $this->EE->lang->line('edit_folders');
- $this->crumb = $this->EE->lang->line('edit_folders');
- $this->return_data = $this->_process_template($template);
- }
-
-
-
- /** -----------------------------------
- /** Edit Folders
- /** -----------------------------------*/
-
- function edit_folders()
- {
- /** -----------------------------------
- /** Check Required
- /** -----------------------------------*/
-
- if ( ! isset($_POST['folder_1']) OR ! isset($_POST['folder_2']) OR $_POST['folder_1'] == '' OR $_POST['folder_2'] == '')
- {
- return $this->_error_page('missing_required_field');
- }
-
- /** -----------------------------------
- /** Get Our Modified Data
- /** -----------------------------------*/
-
- for($i=1, $data = array(); $i <= $this->max_folders; $i++)
- {
- if ( ! isset($_POST['folder_'.$i]) OR $_POST['folder_'.$i] == '')
- {
- $data['folder'.$i.'_name'] = '';
- $this->EE->db->query("UPDATE exp_message_copies SET message_deleted = 'y'
- WHERE recipient_id = '{$this->member_id}' AND message_folder = '{$i}'");
-
- if ( ! isset($empty)) $empty = 'folder'.$i.'_name';
- }
- else
- {
- $data['folder'.$i.'_name'] = $this->EE->security->xss_clean($_POST['folder_'.$i]);
- }
- }
-
- /** -----------------------------------
- /** Get Our New Folder
- /** -----------------------------------*/
-
- if (isset($_POST['folder_new']) && $_POST['folder_new'] != '' && isset($empty))
- {
- $data[$empty] = $this->EE->security->xss_clean($_POST['folder_new']);
- }
-
- $this->EE->db->query($this->EE->db->update_string('exp_message_folders', $data, "member_id = '{$this->member_id}'"));
-
- $this->fetch_folders();
-
- /** -----------------------------------
- /** Success Message
- /** -----------------------------------*/
-
- $this->single_parts['lang']['message'] = $this->EE->lang->line('folders_updated');
- $this->single_parts['include']['success_message'] = $this->_process_template($this->retrieve_template('message_success'));
-
- /** ----------------------------------------
- /** Return us back to Oz
- /** ----------------------------------------*/
-
- return $this->folders();
- }
- /** -----------------------------------
- /** Abstracted Default Menu
- /** -----------------------------------*/
- function abstract_menu()
- {
- /** ------------------------------
- /** Bulletin Board
- /** ------------------------------*/
-
- $style = ($this->EE->session->userdata['last_view_bulletins'] <= $this->EE->session->userdata['last_bulletin_date']) ? 'defaultBold' : '';
-
- $this->menu_items['single_items']['bulletin_board'] = array('text' => $this->EE->lang->line('bulletin_board'),
- 'link' => $this->_create_path('bulletin_board'),
- 'image' => '',
- 'style' => $style);
-
- /** ------------------------
- /** Compose New Message
- /** ------------------------*/
-
- $this->menu_items['single_items']['compose_message'] = array('text' => $this->EE->lang->line('compose_message'),
- 'link' => $this->_create_path('compose'),
- 'image' => '',
- 'style' => 'defaultBold');
-
-
- /** ------------------------
- /** Drafts Folder
- /** ------------------------*/
-
- $query = $this->EE->db->query("SELECT COUNT(*) AS count FROM exp_message_data
- WHERE sender_id = '{$this->member_id}'
- AND message_status = 'draft'");
-
- if ($query->row('count') > 0)
- {
- $this->menu_items['repeat_items']['folders'][] = array('text' => $this->EE->lang->line('draft_messages') .' ('.$query->row('count') .')',
- 'link' => $this->_create_path('drafts'),
- 'image' => '',
- 'style' => '');
- }
-
-
- /** -------------------------------
- /** User Folders
- /** -------------------------------*/
-
- if (count($this->folders) == 0)
- {
- $this->fetch_folders();
- }
-
- foreach($this->folders as $key => $value)
- {
- if ($value['0'] != '')
- {
- if ($this->allegiance == 'user')
- {
- $url = $this->base_url.'/'.'view_folder/'.$key.'/';
- }
- else
- {
- $url = $this->base_url.'view_folder'.AMP.'folder='.$key;
- }
-
- $this->menu_items['repeat_items']['folders'][] = array('text' => ' - '.$value['0'].' ('.$value['1'].')',
- 'link' => $url,
- 'image' => '',
- 'style' => '');
- }
- }
-
- /** ------------------------
- /** Deleted Folder
- /** ------------------------*/
-
- $query = $this->EE->db->query("SELECT COUNT(*) AS count FROM exp_message_copies
- WHERE recipient_id = '{$this->member_id}'
- AND message_deleted = 'y'");
-
- $this->menu_items['repeat_items']['folders'][] = array('text' => $this->EE->lang->line('deleted_messages').' ('.$query->row('count') .')',
- 'link' => $this->_create_path('deleted'),
- 'image' => '',
- 'style' => '');
-
- /* ------------------------
- // Message Tracking
- // ------------------------
-
- $this->menu_items['single_items']['track_messages'] = array('text' => $this->EE->lang->line('track_messages'),
- 'link' => $this->_create_path('track'),
- 'image' => '',
- 'style' => '');
- */
- /** ------------------------
- /** Edit Message Folders
- /** ------------------------*/
-
- $this->menu_items['single_items']['edit_folders'] = array('text' => $this->EE->lang->line('edit_folders'),
- 'link' => $this->_create_path('folders'),
- 'image' => '',
- 'style' => '');
-
- /** ------------------------
- /** Buddy List
- /** ------------------------*/
- $this->menu_items['single_items']['buddy_list'] = array('text' => $this->EE->lang->line('buddy_list'),
- 'link' => $this->_create_path('buddies'),
- 'image' => '',
- 'style' => '');
-
- /** ------------------------
- /** Block List
- /** ------------------------*/
-
- $this->menu_items['single_items']['block_list'] = array('text' => $this->EE->lang->line('blocked_list'),
- 'link' => $this->_create_path('blocked'),
- 'image' => '',
- 'style' => '');
-
- }
- function menu_array()
- {
- if ($this->allow_pm == 'n')
- {
- return;
- }
- $this->_determine_request();
- $this->abstract_menu();
- return $this->menu_items;
- }
- /** -----------------------------------
- /** Create Messages Menu
- /** -----------------------------------*/
- function create_menu()
- {
- if ($this->allow_pm == 'n')
- {
- return;
- }
-
- $this->_determine_request();
-
- $this->abstract_menu();
-
- /** --------------------------------
- /** Open/Close JavaScript
- /** --------------------------------*/
-
- if ($this->EE->input->cookie('myaccount_messages') !== FALSE && $this->EE->input->cookie('myaccount_messages') == 'on')
- {
- $text = '[-]';
- $hidden_style = '';
- }
- else
- {
- $text = '[+]';
- $hidden_style = 'display: none; padding:0;';
- }
-
- $hidden_link = '<a href="javascript:void(0);" id="extLink1" class="altLinks" onclick="showHide(1,this);return false;">'.$text.'</a>';
-
- /** --------------------------------
- /** Create Menu
- /** --------------------------------*/
-
- $map = array('bulletin_board', 'compose_message', 'folders', 'edit_folders', 'buddy_list', 'block_list');
- $template = $this->retrieve_template('message_menu');
- $rows = $this->retrieve_template('message_menu_rows');
-
- $this->single_parts['include']['hide_menu_style'] = $hidden_style;
- $this->single_parts['include']['hide_menu_link'] = $hidden_link;
- $this->single_parts['include']['hide_menu_js'] = $this->showhide_js();
-
- $this->single_parts['include']['menu_items'] = '';
-
- foreach($map as $item)
- {
- if (isset($this->menu_items['repeat_items'][$item]))
- {
- foreach($this->menu_items['repeat_items'][$item] as $item_member)
- {
- $this->single_parts['title'] = $item_member['text'];
- $this->single_parts['link'] = $item_member['link'];
-
- $this->single_parts['include']['menu_items'] .= $this->_process_template($rows);
- }
- }
- else
- {
- $this->single_parts['title'] = $this->menu_items['single_items'][$item]['text'];
- $this->single_parts['link'] = $this->menu_items['single_items'][$item]['link'];
-
- $this->single_parts['include']['menu_items'] .= $this->_process_template($rows);
- }
- }
-
- $this->menu = $this->_process_template($template);
- }
- // -----------------------------------
- // Inbox
- // This function is kind of superfluous, but I find it comforting
- // to know that there is an inbox function for a messaging system.
- // Besides, it makes it a tad easier to understand certain parts
- // of the code to have this function called opposed to what is
- // really being calling. That is all, move along now...
- // -----------------------------------
- function inbox()
- {
- $this->view_folder('1');
- }
-
- /** -----------------------------------
- /** Deleted Messages
- /** -----------------------------------*/
- function deleted()
- {
- $this->view_folder('0');
- }
- /** -----------------------------------
- /** View Folder Contents
- /** -----------------------------------*/
- function drafts()
- {
- $row_count = 0; // How many rows shown this far (i.e. offset)
-
- if ($this->allegiance == 'user')
- {
- $row_count = $this->cur_id;
- }
- else
- {
- $row_count = ($this->EE->input->get_post('page') === false) ? 0 : $this->EE->input->get_post('page');
- }
-
- if ( ! is_numeric($row_count))
- {
- $row_count = 0;
- }
-
- $this->single_parts['lang']['folder_id'] = '1';
- $this->single_parts['lang']['folder_name'] = $this->EE->lang->line('draft_messages');
- $this->conditionals['paginate'] = 'n';
-
- $this->conditionals['drafts_folder'] = 'y';
- $this->conditionals['sent_folder'] = 'n';
- $this->conditionals['trash_folder'] = 'n';
- $this->conditionals['regular_folder'] = 'n';
-
- /** ---------------------------------------
- /** Retrieve Folder Contents Query
- /** ---------------------------------------*/
-
- $dql = "SELECT
- exp_message_data.sender_id,
- exp_message_data.message_date,
- exp_message_data.message_id,
- exp_message_data.message_subject,
- exp_message_data.message_recipients,
- exp_message_data.message_cc,
- exp_message_data.message_attachments,
- exp_members.screen_name as sender,
- exp_members.username as sender_username ";
-
- $sql = "FROM exp_message_data
- LEFT JOIN exp_members ON exp_members.member_id = exp_message_data.sender_id
- WHERE exp_message_data.message_status = 'draft'
- AND exp_message_data.sender_id = '{$this->member_id}'
- ORDER BY exp_message_data.message_date ";
-
- /** ----------------------------------------
- /** Run "count" query for pagination
- /** ----------------------------------------*/
-
- $query = $this->EE->db->query("SELECT COUNT(exp_message_data.message_id) AS count ".$sql);
-
- /** ----------------------------------------
- /** If No Messages, we say so.
- /** ----------------------------------------*/
-
- if ($query->row('count') == 0)
- {
- $this->title = $this->EE->lang->line('draft_messages');
- $this->crumb = $this->EE->lang->line('draft_messages');
-
- $this->single_parts['include']['folder_rows'] = $this->retrieve_template('message_no_folder_rows');
- $this->single_parts['form']['form_declaration']['modify_messages'] = '';
-
- $this->return_data = $this->folder_wrapper(($folder_id == '0') ? 'n' : 'y');
-
- return;
- }
-
- /** ----------------------------------------
- /** Determine Current Page
- /** ----------------------------------------*/
-
- $current_page = ($row_count / $this->per_page) + 1;
-
- $total_pages = intval($query->row('count') / $this->per_page);
-
- if ($query->row('count') % $this->per_page)
- {
- $total_pages++;
- }
-
- $this->single_parts['include']['page_count'] = $this->EE->lang->line('folder_page').' '.$current_page.' '.$this->EE->lang->line('of').' '.$total_pages;
-
- /** -----------------------------
- /** Do we need pagination?
- /** -----------------------------*/
-
- $pager = '';
-
- if ($query->row('count') > $this->per_page)
- {
- $this->EE->load->library('pagination');
-
- if ($this->allegiance == 'user')
- {
- $config['base_url'] = $this->_create_path('drafts');
- }
- else
- {
- $config['page_query_string'] = TRUE;
- $config['base_url'] = $this->_create_path('drafts');
- $config['query_string_segment'] = 'page';
- }
-
- $config['total_rows'] = $query->row('count');
- $config['per_page'] = $this->per_page;
- $config['cur_page'] = $row_count;
- $config['first_link'] = $this->EE->lang->line('pag_first_link');
- $config['last_link'] = $this->EE->lang->line('pag_last_link');
-
- $this->EE->pagination->initialize($config);
- $this->single_parts['include']['pagination_link'] = $this->EE->pagination->create_links();
- $this->conditionals['paginate'] = 'y';
-
- $sql .= " LIMIT ".$row_count.", ".$this->per_page;
- }
-
- /** ----------------------------------------
- /** Retrieve Folder Contents
- /** ----------------------------------------*/
-
- $folder_rows_template = $this->retrieve_template('message_folder_rows');
- $r = '';
- $i = 0;
- $censor = FALSE;
-
- if ($this->EE->config->item('enable_censoring') == 'y' && $this->EE->config->item('censored_words') != '')
- {
- $this->EE->load->library('typography');
- $this->EE->typography->initialize();
- $censor = TRUE;
- }
-
- $query = $this->EE->db->query($dql.$sql);
-
- foreach($query->result_array() as $row)
- {
- ++$i;
- $data = $row;
- $data['msg_id'] = 'd'.$row['message_id'];
- $data['message_date'] = $this->EE->localize->set_human_time($data['message_date']);
- $data['style'] = ($i % 2) ? 'tableCellTwo' : 'tableCellOne';
- $data['message_subject'] = ($censor === FALSE) ? $data['message_subject'] : $this->EE->typography->filter_censored_words($data['message_subject']);
-
- if ($this->allegiance == 'user')
- {
- $data['message_url'] = $this->base_url.'compose/'.$row['message_id'].'/';
- }
- else
- {
- $data['message_url'] = $this->base_url.'compose'.AMP.'msg='.$row['message_id'];
- }
-
- $data['message_status'] = '';
-
- // This Requires Extra Queries and Processing
- // So We Only Do It When Those Variables Are Found
-
- if (stristr($folder_rows_template, '{recipients}') !== FALSE)
- {
- $data['recipients'] = htmlspecialchars($this->convert_recipients($row['message_recipients']), ENT_QUOTES);
- }
-
- if (stristr($folder_rows_template, '{cc}') !== FALSE)
- {
- $data['cc'] = htmlspecialchars($this->convert_recipients($row['message_cc']), ENT_QUOTES);
- }
-
- $r .= $this->_process_template($folder_rows_template, $data);
- }
-
- $this->single_parts['include']['folder_rows'] = $r;
-
- /** ----------------------------------------
- /** Return the Folder's Contents
- /** ----------------------------------------*/
-
- $this->title = $this->EE->lang->line('draft_messages');
- $this->crumb = $this->EE->lang->line('draft_messages');
- $this->return_data = $this->folder_wrapper('y', 'n', 'n');
- }
-
-
- /** -----------------------------------
- /** View Folder Contents
- /** -----------------------------------*/
- function view_folder($folder_id='')
- {
- // ---------------------------------
- // Find Requested Folder ID
- // $this->EE->uri->query_string - User
- // $this->EE->input->get_post('folder') - CP
- // ---------------------------------
-
- $row_count = 0; // How many rows shown this far (i.e. offset)
-
- if ($folder_id == '')
- {
- if ($this->allegiance == 'user')
- {
- // Unknown, probably will have to do something similar to
- // the list of members where we have to create
- // a pseudo-query string in one of the URI segments
- // folder_pagenum : 1_1
-
- if ($this->cur_id == '')
- {
- $folder_id = 1;
- }
- else
- {
- $x = explode('_', $this->cur_id);
-
- $folder_id = ( ! is_numeric($x['0'])) ? 1 : $x['0'];
- $row_count = ( ! isset($x['1']) OR ! is_numeric($x['1'])) ? 0 : $x['1'];
- }
- }
- else
- {
- $folder_id = ($this->EE->input->get_post('folder') === false) ? '1' : $this->EE->input->get_post('folder');
- $row_count = ($this->EE->input->get_post('page') === false) ? 0 : $this->EE->input->get_post('page');
- }
- }
-
- if ( ! is_numeric($folder_id) OR $folder_id > $this->max_folders)
- {
- $folder_id = '1';
- }
-
- if ( ! is_numeric($row_count))
- {
- $row_count = 0;
- }
-
-
- /** ---------------------------------------
- /** Retrieve Folder Name for User
- /** ---------------------------------------*/
-
- if ($folder_id == '0')
- {
- $folder_name = $this->EE->lang->line('deleted_messages');
- }
- elseif ( ! isset($this->folders[$folder_id]['0']) OR $this->folders[$folder_id]['0'] == '')
- {
- if ($this->allegiance == 'cp')
- {
- show_error($this->lang->line('unauthorized_access'));
- }
- else
- {
- return $this->EE->output->show_user_error('general', array($this->EE->lang->line('not_authorized')));
- }
- }
- else
- {
- $folder_name = $this->folders[$folder_id]['0'];
- }
-
- $this->single_parts['lang']['folder_name'] = $this->EE->lang->line('messages_folder').' - '.$folder_name;
- $this->single_parts['lang']['folder_id'] = $folder_id;
- $this->current_folder = $folder_id;
- $this->conditionals['paginate'] = 'n';
-
- /** -----------------------------------
- /** Folder Conditionals
- /** -----------------------------------*/
-
- $this->conditionals['drafts_folder'] = 'n';
- $this->conditionals['sent_folder'] = 'n';
- $this->conditionals['trash_folder'] = 'n';
- $this->conditionals['regular_folder'] = 'n';
-
- if ($folder_id == '0')
- {
- $this->conditionals['trash_folder'] = 'y';
- }
- elseif ($folder_id == '2')
- {
- $this->conditionals['sent_folder'] = 'y';
- }
- else
- {
- $this->conditionals['regular_folder'] = 'y';
- }
-
- /** ---------------------------------------
- /** Retrieve Folder Contents Query
- /** ---------------------------------------*/
-
- $dql = "SELECT
- exp_message_copies.message_status,
- exp_message_copies.message_id,
- exp_message_copies.message_read,
- exp_message_copies.copy_id as msg_id,
- exp_message_data.sender_id,
- exp_message_data.message_date,
- exp_message_data.message_subject,
- exp_message_data.message_recipients,
- exp_message_data.message_cc,
- exp_message_data.message_attachments,
- exp_members.screen_name as sender,
- exp_members.username as sender_username ";
-
- $sql = "FROM exp_message_copies
- LEFT JOIN exp_message_data ON exp_message_data.message_id = exp_message_copies.message_id
- LEFT JOIN exp_members ON exp_members.member_id = exp_message_copies.sender_id
- WHERE exp_message_copies.recipient_id = '{$this->member_id}' ";
-
- if ($folder_id == '0')
- {
- $sql .= "AND exp_message_copies.message_deleted = 'y' ";
- }
- else
- {
- $sql .= "AND exp_message_copies.message_folder = '{$folder_id}'
- AND exp_message_copies.message_deleted = 'n' ";
- }
-
- $sql .= "AND exp_message_data.message_status = 'sent'
- ORDER BY exp_message_data.message_date desc";
-
- /** ----------------------------------------
- /** Run "count" query for pagination
- /** ----------------------------------------*/
-
- $query = $this->EE->db->query("SELECT COUNT(exp_message_copies.copy_id) AS count ".$sql);
-
- /** ----------------------------------------
- /** If No Messages, we say so.
- /** ----------------------------------------*/
-
- if ($query->row('count') == 0)
- {
- $this->title = $folder_name;
- $this->crumb = $folder_name;
-
- $this->single_parts['include']['folder_rows'] = $this->retrieve_template('message_no_folder_rows');
- $this->single_parts['form']['form_declaration']['modify_messages'] = '';
-
- $this->return_data = $this->folder_wrapper(($folder_id == '0') ? 'n' : 'y');
-
- return;
- }
-
- /** ----------------------------------------
- /** Determine Current Page
- /** ----------------------------------------*/
-
- $current_page = ($row_count / $this->per_page) + 1;
-
- $total_pages = intval($query->row('count') / $this->per_page);
-
- if ($query->row('count') % $this->per_page)
- {
- $total_pages++;
- }
-
- $this->single_parts['include']['page_count'] = $this->EE->lang->line('folder_page').' '.$current_page.' '.$this->EE->lang->line('of').' '.$total_pages;
-
- /** -----------------------------
- /** Do we need pagination?
- /** -----------------------------*/
-
- $pager = '';
-
- if ($query->row('count') > $this->per_page)
- {
- $this->EE->load->library('pagination');
-
- if ($this->allegiance == 'user')
- {
- //$config['base_url'] = $this->base_url.'view_folder/'.$folder_id.'_';
- $config['base_url'] = $this->base_url.'view_folder/';
- $config['prefix'] = $folder_id.'_';
- }
- else
- {
- $config['page_query_string'] = TRUE;
- $config['base_url'] = $this->base_url.'view_folder'.AMP.'folder='.$folder_id;
- $config['query_string_segment'] = 'page';
- }
-
- $config['total_rows'] = $query->row('count');
- $config['per_page'] = $this->per_page;
- $config['cur_page'] = $row_count;
- $config['first_link'] = $this->EE->lang->line('pag_first_link');
- $config['last_link'] = $this->EE->lang->line('pag_last_link');
-
- $this->EE->pagination->initialize($config);
- $this->single_parts['include']['pagination_link'] = $this->EE->pagination->create_links();
- $this->conditionals['paginate'] = 'y';
-
- $sql .= " LIMIT ".$row_count.", ".$this->per_page;
- }
-
- /** ----------------------------------------
- /** Retrieve Folder Contents
- /** ----------------------------------------*/
-
- $message_ids = array();
- $folder_rows_template = $this->retrieve_template('message_folder_rows');
- $i = 0;
- $r = '';
- $censor = FALSE;
-
- if ($this->EE->config->item('enable_censoring') == 'y' && $this->EE->config->item('censored_words') != '')
- {
- $this->EE->load->library('typography');
- $this->EE->typography->initialize();
- $censor = TRUE;
- }
- $query = $this->EE->db->query($dql.$sql);
-
- foreach($query->result_array() as $row)
- {
- $i++;
- $data = $row;
- $message_ids[] = $row['message_id'];
- $data['msg_id'] = ($row['message_read'] == 'n') ? 'u'.$row['msg_id'] : $row['msg_id'];
- $data['buddy_list_link'] = '';
- $data['block_list_link'] = '';
- $data['message_date'] = $this->EE->localize->set_human_time($data['message_date']);
- $data['style'] = ($i % 2) ? 'tableCellTwo' : 'tableCellOne';
- $data['message_subject'] = ($censor === FALSE) ? $data['message_subject'] : $this->EE->typography->filter_censored_words($data['message_subject']);
-
- if ($this->allegiance == 'user')
- {
- $data['message_url'] = $this->base_url.'view_message/'.$row['msg_id'].'/';
- //$data['buddy_list_link'] = $this->_create_path('add_buddy').$row['sender_id'].'/';
- //$data['block_list_link'] = $this->_create_path('add_block').$row['sender_id'].'/';
- }
- else
- {
- $data['message_url'] = $this->base_url.'view_message'.AMP.'msg='.$row['msg_id'];
- //$data['buddy_list_link'] = $this->_create_path('add_buddy').AMP.'id='.$row['sender_id'];
- //$data['block_list_link'] = $this->_create_path('add_block').AMP.'id='.$row['sender_id'];
- }
-
- // --------------------------------
- // Message Status Entities:
- // • - unread
- // → - forwarded
- // ↵ - Reply
- // --------------------------------
-
- if ($row['message_status'] == 'replied')
- {
- $data['message_status'] = '↵';
- }
- elseif ($row['message_status'] == 'forwarded')
- {
- $data['message_status'] = '→';
- }
- elseif ($row['message_read'] == 'y')
- {
- $data['message_status'] = '';
- }
- elseif($row['message_read'] == 'n')
- {
- $data['message_status'] = '•';
- }
-
- // This Requires Extra Queries and Processing
- // So We Only Do It When Those Variables Are Found
-
- if (stristr($folder_rows_template, '{recipients}') !== FALSE)
- {
- $data['recipients'] = htmlspecialchars($this->convert_recipients($row['message_recipients']), ENT_QUOTES);
- }
-
- if (stristr($folder_rows_template, '{cc}') !== FALSE)
- {
- $data['cc'] = htmlspecialchars($this->convert_recipients($row['message_cc']), ENT_QUOTES);
- }
-
- $r .= $this->_process_template($folder_rows_template, $data);
- }
-
- $this->single_parts['include']['folder_rows'] = $r;
-
- /** ----------------------------------------
- /** If Displayed, Messages are Received (not read)
- /** ----------------------------------------*/
-
- if (count($message_ids) > 0 && $this->block_tracking == 'n')
- {
- $this->EE->db->query("UPDATE exp_message_copies SET message_received = 'y'
- WHERE recipient_id = '{$this->member_id}'
- AND message_id IN ('".implode("','",$message_ids)."')");
- }
-
- /** ----------------------------------------
- /** Return the Folder's Contents
- /** ----------------------------------------*/
-
- $this->title = $folder_name;
- $this->crumb = $folder_name;
- $this->return_data = $this->folder_wrapper(($folder_id == '0') ? 'n' : 'y');
- }
-
-
-
-
-
-
- /** ----------------------------------------
- /** Wrapper for a Folder and its Contents
- /** ----------------------------------------*/
- function folder_wrapper($deleted='y', $moved='y', $copied = 'y')
- {
- $folder_template = $this->retrieve_template('message_folder');
-
- $this->folders_pulldown();
-
- $this->single_parts['include']['hidden_js'] = $this->hidden_js();
- $this->single_parts['include']['toggle_js'] = $this->toggle_js();
- $this->single_parts['path']['compose_message'] = $this->_create_path('compose');
- $this->single_parts['path']['erase_messages'] = $this->_create_path('erase');
-
- $details = array('hidden_fields' => array('this_folder' => $this->single_parts['lang']['folder_id'], 'daction' => ''),
- 'action' => $this->_create_path('modify_messages'),
- 'id' => 'target',
- 'enctype' => 'multi',
- 'secure' => ($this->allegiance == 'cp') ? FALSE : TRUE
- );
-
- $this->single_parts['form']['form_declaration']['modify_messages'] = $this->EE->functions->form_declaration($details);
- /** ---------------------------------
- /** Move, Copy, Delete Buttons
- /** ---------------------------------*/
-
- $this->_buttons($deleted, $moved, $copied);
-
- /** -------------------------------
- /** Storage Graph
- /** -------------------------------*/
-
- if ( ! isset($this->single_parts['image']['messages_graph']))
- {
- $this->storage_graph();
- }
-
- return $this->_process_template($folder_template);
- }
-
-
- /** ----------------------------------------
- /** Buttons for Various Pages
- /** ----------------------------------------*/
- function _buttons($deleted='y', $moved='y', $copied = 'y')
- {
- $style = 'buttons';
-
-
- /** ---------------------------------
- /** Move, Copy, Delete Buttons
- /** ---------------------------------*/
-
- if ($deleted == 'n')
- {
- $this->single_parts['form']['delete_button'] = '';
- }
- else
- {
- $this->single_parts['form']['delete_button'] = "<button type='submit' id='delete' name='delete' value='delete' ".
- "class='{$style}' title='{lang:delete_selected}' ".
- "onclick='dynamic_action(\"delete\");'>".
- "{lang:messages_delete}</button> ";
- }
-
- if ($moved == 'n')
- {
- $this->single_parts['form']['move_button'] = '';
- }
- else
- {
- $this->single_parts['form']['move_button'] = "<button type='submit' id='move' name='move' value='move' ".
- "class='{$style}' title='{lang:move_selected}' ".
- "onclick='dynamic_move();return false;'>".
- "{lang:messages_move}</button>".NBS.NBS;
- }
-
- if ($copied == 'n')
- {
- $this->single_parts['form']['copy_button'] = '';
- }
- else
- {
- $this->single_parts['form']['copy_button'] = "<button type='submit' id='copy' name='copy' value='copy' ".
- "class='{$style}' title='{lang:copy_selected}' ".
- "onclick='dynamic_copy();return false;'>".
- "{lang:messages_copy}</button>".NBS.NBS;
- }
-
- $this->single_parts['form']['forward_button'] = "<button type='submit' id='forward' name='forward' value='forward' ".
- "class='{$style}' title='{lang:messages_forward}' ".
- "onclick='dynamic_action(\"forward\");'>".
- "{lang:messages_forward}</button>".NBS.NBS;
-
-
- $this->single_parts['form']['reply_button'] = "<button type='submit' id='reply' name='reply' value='reply' ".
- "class='{$style}' title='{lang:messages_reply}' ".
- "onclick='dynamic_action(\"reply\");'>".
- "{lang:messages_reply}</button>".NBS.NBS;
-
- $this->single_parts['form']['reply_all_button'] = "<button type='submit' id='reply_all' name='reply_all' value='reply_all' ".
- "class='{$style}' title='{lang:messages_reply_all}' ".
- "onclick='dynamic_action(\"reply_all\");'>".
- "{lang:messages_reply_all}</button>".NBS.NBS;
-
- $this->single_parts['form']['add_button'] = $this->list_js().
- "<button type='submit' id='add' name='add' value='add' ".
- "class='{$style}' title='{lang:add_member}' ".
- "onclick='list_addition();return false;'>".
- "{lang:add_member}</button>".NBS.NBS;
-
-
- }
-
-
- /** ----------------------------------------
- /** Retrieve a Template for Processing
- /** ----------------------------------------*/
- function retrieve_template($which='')
- {
- if ($which == '')
- {
- $which = 'message_folder';
- }
-
- /** ----------------------------------
- /** CP Templates - Quick, Easy
- /** ----------------------------------*/
-
- if ($this->allegiance == 'cp')
- {
- if ( ! class_exists('Messages_mcp'))
- {
- require APPPATH.'cp/cp.messages.php';
- $this->messages_cp = new Messages_mcp();
- }
-
- $which = $which.'_cp';
- return $this->messages_cp->{$which}();
- }
- /** ----------------------------------
- /** User Templates - Slow, Painful
- /** ----------------------------------*/
- //$debug = debug_backtrace();
- //echo '<pre>';print_r($debug[1]);echo'</pre>';exit;
- if ($this->theme_path == '')
- {
- $theme = ($this->EE->config->item('member_theme') == '') ? 'default' : $this->EE->config->item('member_theme');
- $this->theme_path = PATH_MBR_THEMES."{$theme}/";
- }
- if ( ! file_exists($this->theme_path.$which.'.html'))
- {
- $data = array( 'title' => $this->EE->lang->line('error'),
- 'heading' => $this->EE->lang->line('general_error'),
- 'content' => $this->EE->lang->line('nonexistent_page'),
- 'redirect' => '',
- 'link' => array($this->EE->config->item('site_url'), stripslashes($this->EE->config->item('site_name')))
- );
- return $this->EE->output->show_message($data, 0);
- }
-
- return $this->MS->_prep_element(trim(file_get_contents($this->theme_path.$which.'.html')));
- }
-
-
- /** -----------------------------------
- /** Folders Pulldown Menu
- /** -----------------------------------*/
- function folders_pulldown()
- {
- $str=NL; $str2=NL;
-
- foreach($this->folders as $key => $value)
- {
- if ($value['0'] != '')
- {
- if ($this->allegiance == 'user')
- {
- $url = $this->base_url.'view_folder/'.$key.'/';
- }
- else
- {
- $url = $this->base_url.'view_folder'.AMP.'folder='.$key;
- }
-
- $selected = ($key == $this->current_folder) ? ' selected="selected"' : '';
-
- $str .= '<option value="'.$url.'"'.$selected.'>'.$value['0'].'</option>'.NL;
- $str2 .= '<option value="'.$key.'"'.$selected.'>'.$value['0'].'</option>'.NL;
- }
- }
-
- $str .= '</select>'.NL;
- $str2 .= '</select>'.NL;
-
- $yoffset = ($this->allegiance == 'cp') ? 30 : 20;
-
- $move_js = <<<DOH
- <script type="text/javascript">
- //<![CDATA[
- var movepopup = new PopupWindow("movemenu");
- movepopup.offsetY={$yoffset};
- movepopup.autoHide();
- //]]>
- </script>
- DOH;
- $copy_js = <<<DOH
- <script type="text/javascript">
- //<![CDATA[
- var copypopup = new PopupWindow("copymenu");
- copypopup.offsetY={$yoffset};
- copypopup.autoHide();
- //]]>
- </script>
- DOH;
-
- $this->single_parts['include']['folder_pulldown']['change'] = '<select name="change_folder" class="select" onchange="location.href=this.value">'.$str;
-
- $this->single_parts['include']['folder_pulldown']['move'] = '<div id="movemenu" class="tableCellOne" style="border: 1px solid #666; position:absolute;visibility:hidden;">'.
- '<select name="moveto" class="select" onchange="this.form.submit();">'.
- '<option value="none">'.$this->EE->lang->line('choose_folder').'</option>'.NL.
- $str2.
- '</div>'.NL.
- $move_js;
-
- $this->single_parts['include']['folder_pulldown']['copy'] = '<div id="copymenu" class="tableCellOne" style="border: 1px solid #666; position:absolute;visibility:hidden;">'.
- '<select name="copyto" class="select" onchange="this.form.submit();">'.
- '<option value="none">'.$this->EE->lang->line('choose_folder').'</option>'.NL.
- $str2.
- '</div>'.NL.
- $copy_js;
- }
-
-
-
-
- /** -----------------------------------
- /** Member Search Popup
- /** -----------------------------------*/
- function member_search($message='')
- {
- $this->title = …
Large files files are truncated, but you can click here to view the full file