require_once(SM_PATH . 'class/mime/Language.class.php');
require_once(SM_PATH . 'class/mime/ContentType.class.php');
-?>
+?>
\ No newline at end of file
}
}
-?>
+?>
\ No newline at end of file
}
}
-?>
+?>
\ No newline at end of file
}
-?>
+?>
\ No newline at end of file
}
function attachment_common_link_image(&$Args) {
- global $attachment_common_show_images, $attachment_common_show_images_list;
+ global $attachment_common_show_images_list;
sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER);
* @return imap-stream resource identifier
*/
function sqimap_create_stream($server,$port,$tls=false) {
- global $username, $use_imap_tls, $squirrelmail_language;
+ global $squirrelmail_language;
if ($tls == true) {
if ((check_php_version(4,3)) and (extension_loaded('openssl'))) {
}
function sqimap_mailbox_tree($imap_stream) {
- global $default_folder_prefix, $unseen_notify, $unseen_type;
+ global $default_folder_prefix;
if (true) {
global $data_dir, $username, $list_special_folders_first,
$folder_prefix, $delimiter, $trash_folder, $move_to_trash,
* @return array $id sorted uid list
*/
function sqimap_get_sort_order($imap_stream, $sSortField, $reverse, $search='ALL') {
- global $default_charset,
- $sent_folder;
+ global $default_charset;
$id = array();
$sort_test = array();
* Deprecated !!!!!!! DO NOT USE THIS, use sqimap_msgs_list_delete instead
*/
function sqimap_messages_delete($imap_stream, $start, $end, $mailbox, $bypass_trash=false) {
- global $move_to_trash, $trash_folder, $auto_expunge;
+ global $move_to_trash, $trash_folder;
if (($move_to_trash == true) && ($bypass_trash != true) &&
(sqimap_mailbox_exists($imap_stream, $trash_folder) && ($mailbox != $trash_folder))) {
function sqimap_search($imapConnection, $search_where, $search_what, $mailbox,
$color, $search_position = '', $search_all, $count_all) {
- global $message_highlight_list, $squirrelmail_language, $languages,
- $index_order, $pos, $allow_charset_search,
- $imap_server_type;
+ global $squirrelmail_language, $languages, $pos, $allow_charset_search,
+ $imap_server_type;
$pos = $search_position;
* primary message. To add more of them, just put them in the
* order that is their priority.
*/
- global $startMessage, $username, $key, $imapServerAddress, $imapPort,
+ global $startMessage, $languages, $squirrelmail_language,
$show_html_default, $sort, $has_unsafe_images, $passed_ent_id;
- global $languages, $squirrelmail_language;
if( !sqgetGlobalVar('view_unsafe_images', $view_unsafe_images, SQ_GET) ) {
$view_unsafe_images = false;
function formatAttachments($message, $exclude_id, $mailbox, $id) {
global $where, $what, $startMessage, $color, $passed_ent_id;
- static $ShownHTML = 0;
$att_ar = $message->getAttachments($exclude_id);
}
function createHTMLWidget() {
- global $javascript_on, $color;
+ global $color;
// Use new value if available
if (!empty($this->new_value)) {
global $hide_sm_attributions, $PHP_SELF, $frame_top,
$compose_new_win, $compose_width, $compose_height,
- $attachemessages, $provider_name, $provider_uri,
- $javascript_on, $default_use_mdn, $mdn_user_support,
- $startMessage;
+ $provider_name, $provider_uri, $startMessage,
+ $javascript_on, $default_use_mdn, $mdn_user_support;
sqgetGlobalVar('base_uri', $base_uri, SQ_SESSION );
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION );
* Locate the first displayable form element (only when JavaScript on)
*/
if($javascript_on) {
- global $delimiter, $base_uri, $PHP_SELF, $data_dir, $username;
+ global $base_uri, $PHP_SELF, $data_dir, $username;
$module = substr( $PHP_SELF, ( strlen( $PHP_SELF ) - strlen( $base_uri ) ) * -1 );
* @return string the hashed location of datafile
*/
function getHashedFile($username, $dir, $datafile, $hash_search = true) {
- global $dir_hash_level;
/* Remove trailing slash from $dir if found */
if (substr($dir, -1) == '/') {
* @return array all option information
*/
function load_optpage_data_display() {
- global $theme, $language, $languages, $js_autodetect_results, $javascript_setting,
- $compose_new_win, $default_use_mdn, $squirrelmail_language, $allow_thread_sort,
- $optmode, $show_alternative_names, $available_languages, $use_icons;
+ global $theme, $language, $languages,
+ $default_use_mdn, $squirrelmail_language, $allow_thread_sort,
+ $show_alternative_names, $available_languages, $use_icons;
/* Build a simple array into which we will build options. */
$optgrps = array();
* This function saves the javascript detection option.
*/
function save_option_javascript_autodetect($option) {
- global $data_dir, $username;
-
save_option($option);
checkForJavascript(TRUE);
}
* This function saves the reply prefix (body_quote) character(s)
*/
function save_option_reply_prefix($option) {
- global $data_dir, $username, $new_javascript_setting;
// save as "NONE" if it was blanked out
//
* @access private
*/
function squirrelmail_plugin_init_administrator() {
- global $squirrelmail_plugin_hooks, $username;
+ global $squirrelmail_plugin_hooks;
if ( adm_check_user() ) {
$squirrelmail_plugin_hooks['optpage_register_block']['administrator'] =
* @access private
*/
function bug_report_button() {
- global $color, $bug_report_visible;
+ global $bug_report_visible;
if (! $bug_report_visible) {
return;
//display upper part of month calendar view
function startcalendar() {
- global $year, $month, $day, $color;
+ global $year, $month, $color;
$prev_date = mktime(0, 0, 0, $month - 1, 1, $year);
$act_date = mktime(0, 0, 0, $month, 1, $year);
$msgs = array();
- global $merak_url, $merak_selfpage, $merak_action, $use_ssl_for_password_change, $debug;
+ global $merak_url, $merak_selfpage, $merak_action;
if (!function_exists('curl_init')) {
* @access private
*/
function filters_bulkquery($filters, $IPs) {
- global $SpamFilters_YourHop, $attachment_dir, $username,
+ global $attachment_dir, $username,
$SpamFilters_DNScache, $SpamFilters_BulkQuery,
$SpamFilters_CacheTTL;
* @access private
*/
function start_filters() {
- global $mailbox, $imapServerAddress, $imapPort, $imap,
- $imap_general, $filters, $imap_stream, $imapConnection,
+ global $imapServerAddress, $imapPort, $imap_stream, $imapConnection,
$UseSeparateImapConnection, $AllowSpamFilters;
sqgetGlobalVar('username', $username, SQ_SESSION);
$old_folder = $args[0];
$new_folder = $args[2];
$action = $args[1];
- global $plugins, $data_dir, $username;
+ global $data_dir, $username;
$filters = array();
$filters = load_filters();
$filter_count = count($filters);
* @access private
*/
function imap_test($imap_stream, $string) {
- global $default_charset;
print "<tr><td>".htmlspecialchars($string)."</td></tr>";
$response = sqimap_run_command_list($imap_stream, trim($string),false, $responses, $message,false);
array_push($response, $responses . ' ' .$message);
* @access private
*/
function show_message_details() {
- global $passed_id, $mailbox, $ent_num, $color,
+ global $passed_id, $mailbox, $ent_num,
$javascript_on;
if (strlen(trim($mailbox)) < 1) {
function CheckNewMailboxSound($imapConnection, $mailbox, $real_box, $delimeter, $unseen, &$total_new) {
- global $folder_prefix, $trash_folder, $sent_folder,
- $color, $move_to_sent, $move_to_trash,
- $unseen_notify, $unseen_type, $newmail_allbox,
- $newmail_recent, $newmail_changetitle;
+ global $trash_folder, $sent_folder,
+ $unseen_notify, $newmail_allbox,
+ $newmail_recent;
$mailboxURL = urlencode($real_box);
$unseen = $recent = 0;
function newmail_plugin() {
- global $username, $key, $imapServerAddress, $imapPort,
- $newmail_media, $newmail_enable, $newmail_popup,
+ global $username, $newmail_media, $newmail_enable, $newmail_popup,
$newmail_recent, $newmail_changetitle, $imapConnection, $PHP_SELF;
if ($newmail_enable == 'on' ||
* creates required imap folders
*/
function sent_subfolders_update_sentfolder() {
- global $sent_folder, $auto_create_special, $auto_create_done;
+ global $sent_folder;
global $sent_subfolders_base, $sent_subfolders_setting;
global $data_dir, $imapServerAddress, $imapPort;
- global $use_sent_subfolders, $move_to_sent, $imap_server_type;
+ global $use_sent_subfolders, $move_to_sent;
sqgetGlobalVar('username', $username, SQ_SESSION);
sqgetGlobalVar('key', $key, SQ_COOKIE);
* @access private
*/
function squirrelmail_plugin_init_spamcop() {
- global $squirrelmail_plugin_hooks, $data_dir, $username,
- $spamcop_is_composing;
+ global $squirrelmail_plugin_hooks, $spamcop_is_composing;
$squirrelmail_plugin_hooks['optpage_register_block']['spamcop'] =
'spamcop_options';
*/
function getMessage_RFC822_Attachment($message, $composeMessage, $passed_id,
$passed_ent_id='', $imapConnection) {
- global $attachments, $attachment_dir, $username, $data_dir;
+ global $attachment_dir, $username;
$hashed_attachment_dir = getHashedDir($username, $attachment_dir);
if (!$passed_ent_id) {
/* Load the stuff already. */
require_once(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod");
-?>
+?>
\ No newline at end of file
global $imapConnection, $wrap_at, $passed_id, $mailbox;
global $translate_gpltrans_url;
- global $translate_babelfish_enabled, $translate_go_enabled,
- $translate_dictionary_enabled, $translate_google_enabled,
- $translate_gpltrans_enabled, $translate_intertran_enabled,
- $translate_promt_enabled, $translate_otenet_enabled;
- global $translate_custom_enabled;
-
if (!$translate_show_read) {
return;
}
$translate_dictionary_enabled, $translate_google_enabled,
$translate_gpltrans_enabled, $translate_intertran_enabled,
$translate_promt_enabled, $translate_otenet_enabled;
- global $translate_custom_enabled;
+ global $translate_custom_enabled, $translate_gpltrans_url;
if ($translate_babelfish_enabled) translate_showoption_internal('server','babelfish', 'Babelfish');
if ($translate_go_enabled) translate_showoption_internal('server','go', 'Go.com');
* @access private
*/
function translate_new_form($action) {
- global $translate_dir, $translate_new_window, $translate_location;
+ global $translate_dir, $translate_location;
global $color, $translate_same_window;
echo '<form action="';
/* This function is used when not sending or adding attachments */
function newMail ($mailbox='', $passed_id='', $passed_ent_id='', $action='', $session='') {
global $editor_size, $default_use_priority, $body, $idents,
- $use_signature, $composesession, $data_dir, $username,
+ $use_signature, $data_dir, $username,
$username, $key, $imapServerAddress, $imapPort, $compose_messages,
$composeMessage, $body_quote;
global $languages, $squirrelmail_language, $default_charset;
function getMessage_RFC822_Attachment($message, $composeMessage, $passed_id,
$passed_ent_id='', $imapConnection) {
- global $attachments, $attachment_dir, $username, $data_dir;
+ global $attachment_dir, $username, $data_dir;
$hashed_attachment_dir = getHashedDir($username, $attachment_dir);
if (!$passed_ent_id) {
$body_a = sqimap_run_command($imapConnection,
}
function showInputForm ($session, $values=false) {
- global $send_to, $send_to_cc, $body, $startMessage,
- $passed_body, $color, $use_signature, $signature, $prefix_sig,
+ global $send_to, $send_to_cc, $body, $startMessage, $action,
+ $color, $use_signature, $signature, $prefix_sig,
$editor_size, $editor_height, $attachments, $subject, $newmail,
$use_javascript_addr_book, $send_to_bcc, $passed_id, $mailbox,
$from_htmladdr_search, $location_of_buttons, $attachment_dir,
- $username, $data_dir, $identity, $idents, $draft_id, $delete_draft,
- $mailprio, $default_use_mdn, $mdn_user_support, $compose_new_win,
- $saved_draft, $mail_sent, $sig_first, $edit_as_new, $action,
+ $username, $data_dir, $identity, $idents, $delete_draft,
+ $mailprio, $compose_new_win, $saved_draft, $mail_sent, $sig_first,
$username, $compose_messages, $composesession, $default_charset;
$composeMessage = $compose_messages[$session];
if (!$useSendmail && !$draft) {
require_once(SM_PATH . 'class/deliver/Deliver_SMTP.class.php');
$deliver = new Deliver_SMTP();
- global $smtpServerAddress, $smtpPort, $pop_before_smtp, $smtp_auth_mech;
+ global $smtpServerAddress, $smtpPort, $pop_before_smtp;
$authPop = (isset($pop_before_smtp) && $pop_before_smtp) ? true : false;
get_smtp_user($user, $pass);
function formatMailboxName($imapConnection, $box_array) {
- global $folder_prefix, $trash_folder, $sent_folder,
- $color, $move_to_sent, $move_to_trash,
- $unseen_notify, $unseen_type, $collapse_folders,
- $draft_folder, $save_as_draft,
- $use_special_folder_color;
+ global $trash_folder, $color, $move_to_trash,
+ $unseen_notify, $unseen_type, $use_special_folder_color;
$real_box = $box_array['unformatted'];
$mailbox = str_replace(' ','',$box_array['formatted']);
$mailboxURL = urlencode($real_box);
* currently appropriate.
*/
function create_collapse_link($boxnum) {
- global $boxes, $imapConnection, $unseen_notify, $color, $use_icons, $icon_theme;
+ global $boxes, $unseen_notify, $color, $use_icons, $icon_theme;
$mailbox = urlencode($boxes[$boxnum]['unformatted']);
/* Create the link for this collapse link. */
* @return array unseen message string (for display), unseen message count
*/
function create_unseen_string($boxName, $boxArray, $imapConnection, $unseen_type) {
- global $boxes, $unseen_type, $color, $unseen_cum;
+ global $boxes, $color, $unseen_cum;
/* Initialize the return value. */
$result = array(0,0);
}
function ListBoxes ($boxes, $j=0 ) {
- global $data_dir, $username, $startmessage, $color, $unseen_notify, $unseen_type,
+ global $data_dir, $username, $color, $unseen_notify, $unseen_type,
$move_to_trash, $trash_folder, $collapse_folders, $imapConnection,
$use_icons, $icon_theme, $use_special_folder_color;
}
function ListAdvancedBoxes ($boxes, $mbx, $j='ID.0000' ) {
- global $data_dir, $username, $startmessage, $color, $unseen_notify, $unseen_type,
+ global $data_dir, $username, $color, $unseen_notify, $unseen_type,
$move_to_trash, $trash_folder, $collapse_folders, $use_special_folder_color;
if (!isset($boxes) || empty($boxes))
* @param int $passed_id
*/
function printer_friendly_link($mailbox, $passed_id, $passed_ent_id) {
- global $javascript_on, $color;
+ global $javascript_on;
$params = '?passed_ent_id=' . urlencode($passed_ent_id) .
'&mailbox=' . urlencode($mailbox) .
}
function SendMDN ( $mailbox, $passed_id, $sender, $message, $imapConnection) {
- global $username, $attachment_dir,
- $version, $attachments, $squirrelmail_language, $default_charset,
- $languages, $useSendmail, $domain, $sent_folder,
- $popuser, $data_dir, $username;
+ global $username, $attachment_dir, $popuser, $username,
+ $version, $squirrelmail_language, $default_charset,
+ $languages, $useSendmail, $domain, $sent_folder;
sqgetGlobalVar('SERVER_NAME', $SERVER_NAME, SQ_SERVER);
} else {
require_once(SM_PATH . 'class/deliver/Deliver_SMTP.class.php');
$deliver = new Deliver_SMTP();
- global $smtpServerAddress, $smtpPort, $smtp_auth_mech, $pop_before_smtp;
+ global $smtpServerAddress, $smtpPort, $pop_before_smtp;
$authPop = (isset($pop_before_smtp) && $pop_before_smtp) ? true : false;
get_smtp_user($user, $pass);
$stream = $deliver->initStream($composeMessage,$domain,0,
function formatEnvheader($aMailbox, $passed_id, $passed_ent_id, $message,
$color, $FirstTimeSee) {
- global $msn_user_support, $default_use_mdn, $default_use_priority,
+ global $default_use_mdn, $default_use_priority,
$show_xmailer_default, $mdn_user_support, $PHP_SELF, $javascript_on,
$squirrelmail_language;
global $base_uri, $draft_folder, $where, $what, $color, $sort,
$startMessage, $PHP_SELF, $save_as_draft,
$enable_forward_as_attachment, $imapConnection, $lastTargetMailbox,
- $data_dir, $username, $delete_prev_next_display,
+ $username, $delete_prev_next_display,
$compose_new_win, $javascript_on;
//FIXME cleanup argument list, use $aMailbox where possible