From 91e0dccca7b2452d8b450791cae3aa4125e8889e Mon Sep 17 00:00:00 2001 From: jervfors Date: Tue, 2 Nov 2004 22:21:34 +0000 Subject: [PATCH] Replacing tabs with spaces, trimming white space at EOL and newline at EOF git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@8321 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- class/deliver/Deliver.class.php | 14 +- class/deliver/Deliver_IMAP.class.php | 6 +- class/deliver/Deliver_SMTP.class.php | 70 +-- class/deliver/Deliver_SendMail.class.php | 56 +- class/deliver/index.php | 2 +- class/html.class.php | 70 +-- class/index.php | 2 +- class/l10n.class.php | 2 +- class/l10n/gettext.class.php | 18 +- class/mime/AddressStructure.class.php | 4 +- class/mime/Language.class.php | 2 +- class/mime/Message.class.php | 24 +- class/mime/MessageHeader.class.php | 2 +- class/mime/index.php | 2 +- config/config_default.php | 68 +-- config/config_local.php | 4 +- config/index.php | 2 +- contrib/RPM/config.php.redhat | 2 +- data/index.php | 2 +- functions/abook_database.php | 6 +- functions/abook_local_file.php | 4 +- functions/addressbook.php | 6 +- functions/auth.php | 14 +- functions/date.php | 8 +- functions/decode/cp1250.php | 260 ++++----- functions/decode/cp1251.php | 260 ++++----- functions/decode/cp1252.php | 260 ++++----- functions/decode/cp1253.php | 260 ++++----- functions/decode/cp1254.php | 260 ++++----- functions/decode/cp1255.php | 260 ++++----- functions/decode/cp1256.php | 260 ++++----- functions/decode/cp1257.php | 236 ++++---- functions/decode/cp1258.php | 260 ++++----- functions/decode/cp855.php | 262 ++++----- functions/decode/cp866.php | 262 ++++----- functions/decode/iso_8859_10.php | 2 +- functions/decode/iso_8859_11.php | 220 ++++---- functions/decode/iso_8859_13.php | 2 +- functions/decode/iso_8859_14.php | 4 +- functions/decode/iso_8859_15.php | 2 +- functions/decode/iso_8859_16.php | 2 +- functions/decode/iso_8859_2.php | 2 +- functions/decode/iso_8859_3.php | 2 +- functions/decode/iso_8859_4.php | 2 +- functions/decode/iso_8859_5.php | 2 +- functions/decode/iso_8859_6.php | 2 +- functions/decode/iso_8859_7.php | 2 +- functions/decode/iso_8859_8.php | 2 +- functions/decode/iso_8859_9.php | 2 +- functions/decode/iso_ir_111.php | 12 +- functions/decode/koi8_r.php | 2 +- functions/decode/koi8_u.php | 2 +- functions/decode/ns_4551_1.php | 4 +- functions/decode/tis_620.php | 4 +- functions/decode/utf_8.php | 2 +- functions/display_messages.php | 2 +- functions/encode/cp1251.php | 10 +- functions/encode/cp1255.php | 10 +- functions/encode/cp1256.php | 10 +- functions/encode/iso_8859_1.php | 10 +- functions/encode/iso_8859_15.php | 10 +- functions/encode/iso_8859_2.php | 10 +- functions/encode/iso_8859_7.php | 10 +- functions/encode/iso_8859_9.php | 10 +- functions/encode/koi8_r.php | 10 +- functions/encode/koi8_u.php | 10 +- functions/encode/tis_620.php | 10 +- functions/encode/us_ascii.php | 8 +- functions/encode/utf_8.php | 12 +- functions/html.php | 8 +- functions/htmlentities/index.php | 2 +- functions/htmlentities/iso-8859-1.php | 194 +++---- functions/htmlentities/readme.php | 4 +- functions/htmlentities/utf-8.php | 524 +++++++++--------- functions/i18n.php | 8 +- functions/imap_asearch.php | 38 +- functions/imap_general.php | 12 +- functions/imap_mailbox.php | 4 +- functions/imap_search.php | 2 +- functions/imap_utf7_local.php | 320 +++++------ functions/mailbox_display.php | 4 +- functions/page_header.php | 4 +- functions/plugin.php | 2 +- functions/strings.php | 8 +- functions/url_parser.php | 14 +- help/index.php | 2 +- images/index.php | 2 +- images/themes/default/index.php | 2 +- images/themes/default/theme.php | 2 +- images/themes/index.php | 2 +- images/themes/none/index.php | 2 +- images/themes/none/theme.php | 2 +- images/themes/xp/index.php | 2 +- images/themes/xp/theme.php | 2 +- include/index.php | 2 +- include/options/display.php | 2 +- include/options/index.php | 2 +- include/options/personal.php | 4 +- include/validate.php | 22 +- index.php | 2 +- locale/index.php | 2 +- plugins/abook_take/functions.php | 2 +- plugins/abook_take/setup.php | 2 +- plugins/abook_take/take.php | 2 +- plugins/administrator/auth.php | 2 +- plugins/administrator/index.php | 2 +- plugins/administrator/options.php | 20 +- plugins/administrator/setup.php | 2 +- plugins/bug_report/bug_report.php | 6 +- plugins/bug_report/functions.php | 2 +- plugins/bug_report/index.php | 2 +- plugins/bug_report/setup.php | 2 +- plugins/bug_report/show_system_specs.php | 2 +- plugins/calendar/calendar.php | 2 +- plugins/calendar/calendar_data.php | 10 +- plugins/calendar/day.php | 4 +- plugins/calendar/event_create.php | 2 +- plugins/calendar/event_delete.php | 4 +- plugins/calendar/event_edit.php | 4 +- plugins/calendar/index.php | 2 +- plugins/calendar/setup.php | 4 +- plugins/change_password/backend/index.php | 2 +- plugins/change_password/backend/merak.php | 6 +- plugins/change_password/backend/mysql.php | 12 +- plugins/change_password/backend/poppassd.php | 4 +- plugins/change_password/backend/template.php | 12 +- plugins/change_password/config.php | 2 +- plugins/change_password/functions.php | 2 +- plugins/change_password/index.php | 2 +- plugins/change_password/options.php | 6 +- plugins/filters/filters.php | 4 +- plugins/filters/index.php | 2 +- plugins/filters/options.php | 2 +- plugins/filters/setup.php | 6 +- plugins/filters/spamoptions.php | 12 +- plugins/fortune/config_default.php | 2 +- plugins/index.php | 2 +- plugins/info/functions.php | 2 +- plugins/info/index.php | 2 +- plugins/info/options.php | 10 +- plugins/info/setup.php | 4 +- plugins/listcommands/index.php | 2 +- plugins/listcommands/mailout.php | 2 +- plugins/listcommands/setup.php | 16 +- plugins/mail_fetch/class.POP3.php | 8 +- plugins/mail_fetch/fetch.php | 16 +- plugins/mail_fetch/functions.php | 2 +- plugins/mail_fetch/index.php | 2 +- plugins/mail_fetch/options.php | 10 +- plugins/mail_fetch/setup.php | 6 +- .../message_details_bottom.php | 26 +- .../message_details/message_details_main.php | 2 +- .../message_details/message_details_top.php | 4 +- plugins/message_details/setup.php | 6 +- plugins/newmail/newmail.php | 2 +- plugins/newmail/newmail_opt.php | 2 +- plugins/newmail/setup.php | 22 +- plugins/newmail/testsound.php | 4 +- plugins/sent_subfolders/index.php | 2 +- plugins/sent_subfolders/setup.php | 26 +- plugins/spamcop/index.php | 2 +- plugins/spamcop/options.php | 190 +++---- plugins/spamcop/setup.php | 154 ++--- plugins/spamcop/spamcop.php | 40 +- plugins/squirrelspell/doc/index.php | 2 +- plugins/squirrelspell/index.php | 2 +- plugins/squirrelspell/js/index.php | 2 +- plugins/squirrelspell/modules/WHATISTHIS | 2 +- plugins/squirrelspell/modules/check_me.mod | 32 +- plugins/squirrelspell/modules/crypto.mod | 10 +- .../squirrelspell/modules/crypto_badkey.mod | 16 +- plugins/squirrelspell/modules/edit_dic.mod | 16 +- plugins/squirrelspell/modules/enc_setup.mod | 14 +- plugins/squirrelspell/modules/forget_me.mod | 14 +- .../squirrelspell/modules/forget_me_not.mod | 12 +- plugins/squirrelspell/modules/init.mod | 10 +- plugins/squirrelspell/modules/lang_change.mod | 8 +- plugins/squirrelspell/modules/lang_setup.mod | 14 +- .../squirrelspell/modules/options_main.mod | 6 +- plugins/squirrelspell/setup.php | 8 +- plugins/squirrelspell/sqspell_config.php | 6 +- plugins/squirrelspell/sqspell_functions.php | 108 ++-- plugins/squirrelspell/sqspell_interface.php | 12 +- plugins/squirrelspell/sqspell_options.php | 6 +- plugins/translate/config-sample.php | 2 +- po/index.php | 2 +- src/addrbook_popup.php | 4 +- src/addrbook_search.php | 42 +- src/addrbook_search_html.php | 14 +- src/addressbook.php | 8 +- src/configtest.php | 34 +- src/folders.php | 10 +- src/folders_delete.php | 4 +- src/folders_rename_do.php | 2 +- src/folders_subscribe.php | 2 +- src/help.php | 12 +- src/image.php | 6 +- src/index.php | 2 +- src/left_main.php | 2 +- src/login.php | 8 +- src/options.php | 14 +- src/options_highlight.php | 10 +- src/options_identities.php | 20 +- src/options_order.php | 30 +- src/printer_friendly_bottom.php | 8 +- src/printer_friendly_main.php | 4 +- src/printer_friendly_top.php | 2 +- src/redirect.php | 12 +- src/signout.php | 6 +- src/view_header.php | 20 +- src/view_text.php | 2 +- src/webmail.php | 4 +- 212 files changed, 3072 insertions(+), 3072 deletions(-) diff --git a/class/deliver/Deliver.class.php b/class/deliver/Deliver.class.php index 093f5a27..1b916a0f 100644 --- a/class/deliver/Deliver.class.php +++ b/class/deliver/Deliver.class.php @@ -465,14 +465,14 @@ class Deliver { switch($rfc822_header->priority) { case 1: - $header[] = 'X-Priority: 1 (Highest)'.$rn; - $header[] = 'Importance: High'. $rn; break; + $header[] = 'X-Priority: 1 (Highest)'.$rn; + $header[] = 'Importance: High'. $rn; break; case 3: - $header[] = 'X-Priority: 3 (Normal)'.$rn; - $header[] = 'Importance: Normal'. $rn; break; + $header[] = 'X-Priority: 3 (Normal)'.$rn; + $header[] = 'Importance: Normal'. $rn; break; case 5: - $header[] = 'X-Priority: 5 (Lowest)'.$rn; - $header[] = 'Importance: Low'. $rn; break; + $header[] = 'X-Priority: 5 (Lowest)'.$rn; + $header[] = 'Importance: Low'. $rn; break; default: break; } } @@ -686,4 +686,4 @@ class Deliver { return $refer; } } -?> +?> \ No newline at end of file diff --git a/class/deliver/Deliver_IMAP.class.php b/class/deliver/Deliver_IMAP.class.php index db97527b..ac244d70 100644 --- a/class/deliver/Deliver_IMAP.class.php +++ b/class/deliver/Deliver_IMAP.class.php @@ -24,10 +24,10 @@ class Deliver_IMAP extends Deliver { function getBcc() { return true; } - - /* to do: finishing the imap-class so the initStream function can call the + + /* to do: finishing the imap-class so the initStream function can call the imap-class */ } -?> +?> \ No newline at end of file diff --git a/class/deliver/Deliver_SMTP.class.php b/class/deliver/Deliver_SMTP.class.php index 1042d383..03aa6bc4 100644 --- a/class/deliver/Deliver_SMTP.class.php +++ b/class/deliver/Deliver_SMTP.class.php @@ -26,16 +26,16 @@ class Deliver_SMTP extends Deliver { $s = str_replace("\n.","\n..",$s); } } - + function initStream($message, $domain, $length=0, $host='', $port='', $user='', $pass='', $authpop=false) { global $use_smtp_tls,$smtp_auth_mech; - + if ($authpop) { $this->authPop($host, '', $user, $pass); } - + $rfc822_header = $message->rfc822_header; - + $from = $rfc822_header->from[0]; $to = $rfc822_header->to; $cc = $rfc822_header->cc; @@ -43,20 +43,20 @@ class Deliver_SMTP extends Deliver { $content_type = $rfc822_header->content_type; // MAIL FROM: MUST be empty in cae of MDN (RFC2298) - if ($content_type->type0 == 'multipart' && + if ($content_type->type0 == 'multipart' && $content_type->type1 == 'report' && isset($content_type->properties['report-type']) && $content_type->properties['report-type']=='disposition-notification') { $from->host = ''; $from->mailbox = ''; - } - + } + if (($use_smtp_tls == true) and (check_php_version(4,3)) and (extension_loaded('openssl'))) { $stream = fsockopen('tls://' . $host, $port, $errorNumber, $errorString); } else { $stream = fsockopen($host, $port, $errorNumber, $errorString); } - + if (!$stream) { $this->dlv_msg = $errorString; $this->dlv_ret_nr = $errorNumber; @@ -66,10 +66,10 @@ class Deliver_SMTP extends Deliver { if ($this->errorCheck($tmp, $stream)) { return(0); } - - /* + + /* * If $_SERVER['HTTP_HOST'] is set, use that in our HELO to the SMTP - * server. This should fix the DNS issues some people have had + * server. This should fix the DNS issues some people have had */ if (sqgetGlobalVar('HTTP_HOST', $HTTP_HOST, SQ_SERVER)) { // HTTP_HOST is set // optionally trim off port number @@ -80,7 +80,7 @@ class Deliver_SMTP extends Deliver { } else { // For some reason, HTTP_HOST is not set - revert to old behavior $helohost = $domain; } - + /* Lets introduce ourselves */ fputs($stream, "EHLO $helohost\r\n"); $tmp = fgets($stream,1024); @@ -96,7 +96,7 @@ class Deliver_SMTP extends Deliver { return(0); } } - + if (( $smtp_auth_mech == 'cram-md5') or ( $smtp_auth_mech == 'digest-md5' )) { // Doing some form of non-plain auth if ($smtp_auth_mech == 'cram-md5') { @@ -104,35 +104,35 @@ class Deliver_SMTP extends Deliver { } elseif ($smtp_auth_mech == 'digest-md5') { fputs($stream, "AUTH DIGEST-MD5\r\n"); } - + $tmp = fgets($stream,1024); - + if ($this->errorCheck($tmp,$stream)) { return(0); } - + // At this point, $tmp should hold "334 " $chall = substr($tmp,4); - // Depending on mechanism, generate response string + // Depending on mechanism, generate response string if ($smtp_auth_mech == 'cram-md5') { $response = cram_md5_response($user,$pass,$chall); } elseif ($smtp_auth_mech == 'digest-md5') { $response = digest_md5_response($user,$pass,$chall,'smtp',$host); } fputs($stream, $response); - + // Let's see what the server had to say about that $tmp = fgets($stream,1024); if ($this->errorCheck($tmp,$stream)) { return(0); } - + // CRAM-MD5 is done at this point. If DIGEST-MD5, there's a bit more to go if ($smtp_auth_mech == 'digest-md5') { // $tmp contains rspauth, but I don't store that yet. (No need yet) fputs($stream,"\r\n"); $tmp = fgets($stream,1024); - + if ($this->errorCheck($tmp,$stream)) { return(0); } @@ -145,7 +145,7 @@ class Deliver_SMTP extends Deliver { // The LOGIN method fputs($stream, "AUTH LOGIN\r\n"); $tmp = fgets($stream, 1024); - + if ($this->errorCheck($tmp, $stream)) { return(0); } @@ -154,7 +154,7 @@ class Deliver_SMTP extends Deliver { if ($this->errorCheck($tmp, $stream)) { return(0); } - + fputs($stream, base64_encode($pass) . "\r\n"); $tmp = fgets($stream, 1024); if ($this->errorCheck($tmp, $stream)) { @@ -163,16 +163,16 @@ class Deliver_SMTP extends Deliver { } elseif ($smtp_auth_mech == "plain") { /* SASL Plain */ $auth = base64_encode("$user\0$user\0$pass"); - + $query = "AUTH PLAIN\r\n"; fputs($stream, $query); $read=fgets($stream, 1024); - + if (substr($read,0,3) == '334') { // OK so far.. fputs($stream, "$auth\r\n"); $read = fgets($stream, 1024); } - + $results=explode(" ",$read,3); $response=$results[1]; $message=$results[2]; @@ -184,16 +184,16 @@ class Deliver_SMTP extends Deliver { return(0); } } - + /* Ok, who is sending the message? */ - $fromaddress = ($from->mailbox && $from->host) ? + $fromaddress = ($from->mailbox && $from->host) ? $from->mailbox.'@'.$from->host : ''; fputs($stream, 'MAIL FROM:<'.$fromaddress.">\r\n"); $tmp = fgets($stream, 1024); if ($this->errorCheck($tmp, $stream)) { return(0); } - + /* send who the recipients are */ for ($i = 0, $cnt = count($to); $i < $cnt; $i++) { if (!$to[$i]->host) $to[$i]->host = $domain; @@ -205,8 +205,8 @@ class Deliver_SMTP extends Deliver { } } } - - for ($i = 0, $cnt = count($cc); $i < $cnt; $i++) { + + for ($i = 0, $cnt = count($cc); $i < $cnt; $i++) { if (!$cc[$i]->host) $cc[$i]->host = $domain; if ($cc[$i]->mailbox) { fputs($stream, 'RCPT TO:<'.$cc[$i]->mailbox.'@'.$cc[$i]->host.">\r\n"); @@ -216,7 +216,7 @@ class Deliver_SMTP extends Deliver { } } } - + for ($i = 0, $cnt = count($bcc); $i < $cnt; $i++) { if (!$bcc[$i]->host) $bcc[$i]->host = $domain; if ($bcc[$i]->mailbox) { @@ -235,7 +235,7 @@ class Deliver_SMTP extends Deliver { } return $stream; } - + function finalizeStream($stream) { fputs($stream, "\r\n.\r\n"); /* end the DATA part */ $tmp = fgets($stream, 1024); @@ -247,7 +247,7 @@ class Deliver_SMTP extends Deliver { fclose($stream); return true; } - + /* check if an SMTP reply is an error and set an error message) */ function errorCheck($line, $smtpConnection) { @@ -286,7 +286,7 @@ class Deliver_SMTP extends Deliver { case '503': $message = _("Bad sequence of commands"); break; case '504': $message = _("Command parameter not implemented"); - break; + break; case '530': $message = _("Authentication required"); break; case '534': $message = _("Authentication mechanism is too weak"); @@ -314,7 +314,7 @@ class Deliver_SMTP extends Deliver { return true; } - + function authPop($pop_server='', $pop_port='', $user, $pass) { if (!$pop_port) { $pop_port = 110; diff --git a/class/deliver/Deliver_SendMail.class.php b/class/deliver/Deliver_SendMail.class.php index 109a5d30..327bc6b0 100644 --- a/class/deliver/Deliver_SendMail.class.php +++ b/class/deliver/Deliver_SendMail.class.php @@ -15,7 +15,7 @@ /** This of course depends upon Deliver */ require_once(SM_PATH . 'class/deliver/Deliver.class.php'); - + /** * Delivers messages using the sendmail binary * @package squirrelmail @@ -27,15 +27,15 @@ class Deliver_SendMail extends Deliver { * * Sendmail needs LF's as line endings instead of CRLF. * This function translates the line endings to LF and should be called - * before each line is written to the stream. - * + * before each line is written to the stream. + * * @param string $s Line to process * @return void * @access private - */ + */ function preWriteToStream(&$s) { if ($s) { - $s = str_replace("\r\n", "\n", $s); + $s = str_replace("\r\n", "\n", $s); } } @@ -43,63 +43,63 @@ class Deliver_SendMail extends Deliver { * function initStream * * Initialise the sendmail connection. - * + * * @param Message $message Message object containing the from address * @param string $sendmail_path Location of sendmail binary * @return void - * @access public - */ + * @access public + */ function initStream($message, $sendmail_path) { $rfc822_header = $message->rfc822_header; - $from = $rfc822_header->from[0]; - $envelopefrom = trim($from->mailbox.'@'.$from->host); + $from = $rfc822_header->from[0]; + $envelopefrom = trim($from->mailbox.'@'.$from->host); $envelopefrom = str_replace(array("\0","\n"),array('',''),$envelopefrom); - if (strstr($sendmail_path, "qmail-inject")) { - $stream = popen (escapeshellcmd("$sendmail_path -f$envelopefrom"), "w"); - } else { - $stream = popen (escapeshellcmd("$sendmail_path -i -t -f$envelopefrom"), "w"); - } - return $stream; + if (strstr($sendmail_path, "qmail-inject")) { + $stream = popen (escapeshellcmd("$sendmail_path -f$envelopefrom"), "w"); + } else { + $stream = popen (escapeshellcmd("$sendmail_path -i -t -f$envelopefrom"), "w"); + } + return $stream; } /** * function finalizeStream * * Close the stream. - * + * * @param resource $stream * @return boolean * @access public - */ + */ function finalizeStream($stream) { - pclose($stream); - return true; + pclose($stream); + return true; } /** * function getBcc * * In case of sendmail, the rfc822header must contain the bcc header. - * + * * @return boolean true if rfc822header should include the bcc header. * @access private */ function getBcc() { return true; } - + /** * function clean_crlf * * Cleans each line to only end in a LF - * Returns the length of the line including a CR, + * Returns the length of the line including a CR, * so that length is correct when the message is saved to imap - * Implemented to fix sendmail->postfix rejection of messages with + * Implemented to fix sendmail->postfix rejection of messages with * attachments because of stray LF's * - * @param string $s string to strip of CR's + * @param string $s string to strip of CR's * @return integer length of string including a CR for each LF - * @access private + * @access private */ function clean_crlf(&$s) { $s = str_replace("\r\n", "\n", $s); @@ -107,7 +107,7 @@ class Deliver_SendMail extends Deliver { $s2 = str_replace("\n", "\r\n", $s); return strlen($s2); } - + } -?> +?> \ No newline at end of file diff --git a/class/deliver/index.php b/class/deliver/index.php index 7e4fc5ca..c5e70db3 100644 --- a/class/deliver/index.php +++ b/class/deliver/index.php @@ -1,3 +1,3 @@ +?> \ No newline at end of file diff --git a/class/html.class.php b/class/html.class.php index fba98feb..6c6ea3a4 100644 --- a/class/html.class.php +++ b/class/html.class.php @@ -16,7 +16,7 @@ * @package squirrelmail */ class html { - var $tag, $text, $style, $class, + var $tag, $text, $style, $class, $id, $html_el = array(), $javascript, $xtr_prop; function html($tag='', $text='', $style ='', $class='', $id='', @@ -29,59 +29,59 @@ class html { $this->xtr_prop = $xtr_prop; $this->javascript = $javascript; } - + function htmlAdd($el, $last=true) { if ($last) { $this->html_el[] = $el; } else { - $new_html_el = array(); - $new_html_el[] = $el; - foreach ($this->html_el as $html_el) { - $new_html_el[] = $html_el; - } - $this->html_el = $new_html_el; + $new_html_el = array(); + $new_html_el[] = $el; + foreach ($this->html_el as $html_el) { + $new_html_el[] = $html_el; + } + $this->html_el = $new_html_el; } } - + function AddChild($tag='', $text='', $style ='', $class='', $id='', $xtr_prop = '', $javascript = '') { $el = new html ($tag, $text, $style, $class, $id, $xtr_prop, $javascript); $this->htmlAdd($el); } - + function FindId($id) { $cnt = count($this->html_el); $el = false; if ($cnt) { for ($i = 0 ; $i < $cnt; $i++) { - if ($this->html_el[$i]->id == $id) { - $ret = $this->html_el[$i]; - return $ret; - } else if (count($this->html_el[$i]->html_el)) { - $el = $this->html_el[$i]->FindId($id); - } - if ($el) return $el; + if ($this->html_el[$i]->id == $id) { + $ret = $this->html_el[$i]; + return $ret; + } else if (count($this->html_el[$i]->html_el)) { + $el = $this->html_el[$i]->FindId($id); + } + if ($el) return $el; } } return $el; - } + } function InsToId( $el, $id, $last=true) { $html_el = &$this->FindId($id); if ($html_el) { $html_el->htmlAdd($el, $last); } - } - + } + function scriptAdd($script) { $s = "\n".''."\n"; + $script . + "\n".'// -->'."\n"; $el = new html ('script',$s,'','','',array('language' => 'JavaScript', 'type' => 'text/javascript')); $this->htmlAdd($el); } - + function echoHtml( $usecss=false, $indent='x') { if ($indent == 'x') { $indent = ''; $indentmore = ''; @@ -99,26 +99,26 @@ class html { $prop = ''; foreach ($xtr_prop as $k => $v) { if (is_string($k)) { - $prop.=' '.$k.'="'.$v.'"'; - } else { - $prop.=' '.$v; - } + $prop.=' '.$k.'="'.$v.'"'; + } else { + $prop.=' '.$v; + } } - } + } if ($javascript) { $js = ''; foreach ($javascript as $k => $v) { /* here we put the onclick, onmouseover etc entries */ $js.=' '.$k.'="'.$v.'";'; } } - if ($tag) { + if ($tag) { echo $indent . '<' . $tag; } else { echo $indent; } if ($class) { echo ' class="'.$class.'"'; - } + } if ($id) { echo ' id="'.$id.'"'; } @@ -127,7 +127,7 @@ class html { } if ($style && !$usecss && !is_array($style)) { /* last premisse is to prevent 'style="Array"' in the output */ - echo ' style="'.$style.'"'; + echo ' style="'.$style.'"'; } if ($javascript) { echo ' '.$js; @@ -142,9 +142,9 @@ class html { } foreach ($style as $k => $v) { /* if value of key value = true close the tag */ - if ($v) { + if ($v) { $closestyles .= ''; - } + } } } echo $openstyles; @@ -158,7 +158,7 @@ class html { echo "\n"; for($i = 0;$i<$cnt;$i++) { $el = $this->html_el[$i]; - $el->echoHtml($usecss,$indentmore); + $el->echoHtml($usecss,$indentmore); } echo $indent; } @@ -170,6 +170,6 @@ class html { } } } - + ?> \ No newline at end of file diff --git a/class/index.php b/class/index.php index 3d2bdc51..ac57affb 100644 --- a/class/index.php +++ b/class/index.php @@ -18,4 +18,4 @@ header("Location:../index.php"); /* pretty impressive huh? */ -?> +?> \ No newline at end of file diff --git a/class/l10n.class.php b/class/l10n.class.php index ae449637..95b3c31f 100644 --- a/class/l10n.class.php +++ b/class/l10n.class.php @@ -5,7 +5,7 @@ * Copyright (c) 2003-2004 The SquirrelMail Project Team * Licensed under the GNU GPL. For full terms see the file COPYING. * - * This contains internal squirrelmail functions needed to handle + * This contains internal squirrelmail functions needed to handle * translations when php gettext extension is missing or some functions * are not available. * diff --git a/class/l10n/gettext.class.php b/class/l10n/gettext.class.php index cc1278c7..bb9c6422 100644 --- a/class/l10n/gettext.class.php +++ b/class/l10n/gettext.class.php @@ -21,7 +21,7 @@ * @package squirrelmail * @subpackage i18n */ - + /** * Class that uses parsed translation input objects * @package squirrelmail @@ -57,9 +57,9 @@ class gettext_reader { $byte[$i]=ord($this->STREAM->read(1)); } //print sprintf("pos: %d\n",$this->STREAM->currentpos()); - if ($this->BYTEORDER == 0) + if ($this->BYTEORDER == 0) return (int)(($byte[0]) | ($byte[1]<<8) | ($byte[2]<<16) | ($byte[3]<<24)); - else + else return (int)(($byte[3]) | ($byte[2]<<8) | ($byte[1]<<16) | ($byte[0]<<24)); } @@ -161,7 +161,7 @@ class gettext_reader { $data = $this->STREAM->read($length); return (string)$data; } - + /** * binary search for string * @param string $string @@ -190,7 +190,7 @@ class gettext_reader { if ($cmp == 0) { $this->_HASHED[$string] = $half; return $half; - } elseif ($cmp<0) + } elseif ($cmp<0) return $this->find_string($string,$start,$half); else return $this->find_string($string,$half,$end); @@ -203,11 +203,11 @@ class gettext_reader { * @return string translated string */ function translate($string) { - if ($this->error > 0) return $string; + if ($this->error > 0) return $string; $num = $this->find_string($string, 0, $this->total); if ($num == -1) return $string; - else + else return $this->get_translation_number($num); } @@ -220,7 +220,7 @@ class gettext_reader { // this is true, right? // cache header field for plural forms - if (isset($this->pluralheader) && is_string($this->pluralheader)) + if (isset($this->pluralheader) && is_string($this->pluralheader)) return $this->pluralheader; else { $header = $this->get_translation_number(0); @@ -266,7 +266,7 @@ class gettext_reader { $result=-1; } else { // find out the appropriate form - $select = $this->select_string($number); + $select = $this->select_string($number); // this should contains all strings separated by NULLs $result = $this->find_string($single.chr(0).$plural,0,$this->total); diff --git a/class/mime/AddressStructure.class.php b/class/mime/AddressStructure.class.php index b3201e23..d3f6976a 100644 --- a/class/mime/AddressStructure.class.php +++ b/class/mime/AddressStructure.class.php @@ -47,7 +47,7 @@ class AddressStructure { } } $addr = ($email ? $personal . ' <' .$email.'>' - : $this->personal); + : $this->personal); $best_dpl = $this->personal; } else { $addr = $email; @@ -57,7 +57,7 @@ class AddressStructure { } return $result; } - + function getEncodedAddress() { return $this->getAddress(true, true); } diff --git a/class/mime/Language.class.php b/class/mime/Language.class.php index 6f39e3d7..7e3b7600 100644 --- a/class/mime/Language.class.php +++ b/class/mime/Language.class.php @@ -23,4 +23,4 @@ class Language { } } -?> +?> \ No newline at end of file diff --git a/class/mime/Message.class.php b/class/mime/Message.class.php index 94e59c3e..fbfbd3b5 100644 --- a/class/mime/Message.class.php +++ b/class/mime/Message.class.php @@ -74,7 +74,7 @@ class Message { $cur_ent_a = explode('.', $this->entity_id); } $ent_a = explode('.', $ent); - + for ($i = 0,$entCount = count($ent_a) - 1; $i < $entCount; ++$i) { if (isset($cur_ent_a[$i]) && ($cur_ent_a[$i] != $ent_a[$i])) { $msg = $msg->parent; @@ -145,12 +145,12 @@ class Message { if($msg) $msg->setEntIds($msg,false,0); return $msg; } - + function setEntIds(&$msg,$init=false,$i=0) { $iCnt = count($msg->entities); if ($init !==false) { $iEntSub = $i+1; - if ($msg->parent->type0 == 'message' && + if ($msg->parent->type0 == 'message' && $msg->parent->type1 == 'rfc822' && $msg->type0 == 'multipart') { $iEntSub = '0'; @@ -166,8 +166,8 @@ class Message { $msg->entity_id='1'; } for ($i=0;$i<$iCnt;++$i) { - $msg->entities[$i]->parent =& $msg; - if (strrchr($msg->entity_id, '.') != '.0') { + $msg->entities[$i]->parent =& $msg; + if (strrchr($msg->entity_id, '.') != '.0') { $msg->entities[$i]->setEntIds($msg->entities[$i],$msg->entity_id,$i); } else { $msg->entities[$i]->setEntIds($msg->entities[$i],$msg->parent->entity_id,$i); @@ -183,7 +183,7 @@ class Message { } else { $message = new Message(); } - + for ($cnt = strlen($read); $i < $cnt; ++$i) { $char = strtoupper($read{$i}); switch ($char) { @@ -294,7 +294,7 @@ class Message { $arg_a[] = $msg->parseLiteral($read, $i); ++$arg_no; break; - case '0': + case '0': case is_numeric($read{$i}): /* process integers */ if ($read{$i} == ' ') { break; } @@ -442,7 +442,7 @@ class Message { if (count($arg_a) > 9) { $d = strtr($arg_a[0], array(' ' => ' ')); $d = explode(' ', $d); - if (!$arg_a[1]) $arg_a[1] = _("(no subject)"); + if (!$arg_a[1]) $arg_a[1] = _("(no subject)"); $hdr->date = getTimeStamp($d); /* argument 1: date */ $hdr->subject = $arg_a[1]; /* argument 2: subject */ @@ -691,7 +691,7 @@ class Message { // $alt_order[] = "message/rfc822"; foreach ($alt_order as $alt) { if( ($alt == $type) && isset($this->entity_id) ) { - if ((count($this->entities) == 0) && + if ((count($this->entities) == 0) && (!isset($ent->header->parameters['filename'])) && (!isset($ent->header->parameters['name'])) && (strtolower($this->header->disposition->name) != 'attachment')) { @@ -765,7 +765,7 @@ class Message { function getAttachments($exclude_id=array(), $result = array()) { /* - if (($this->type0 == 'message') && + if (($this->type0 == 'message') && ($this->type1 == 'rfc822') && ($this->entity_id) ) { $this = $this->entities[0]; @@ -801,7 +801,7 @@ class Message { } return $result; } - + function initAttachment($type, $name, $location) { $attachment = new Message(); $mime_header = new MessageHeader(); @@ -822,4 +822,4 @@ class Message { } } -?> +?> \ No newline at end of file diff --git a/class/mime/MessageHeader.class.php b/class/mime/MessageHeader.class.php index d8cc46c0..a4b5ec9b 100644 --- a/class/mime/MessageHeader.class.php +++ b/class/mime/MessageHeader.class.php @@ -13,7 +13,7 @@ */ /** - * Contains all variables available in a bodystructure + * Contains all variables available in a bodystructure * @package squirrelmail */ class MessageHeader { diff --git a/class/mime/index.php b/class/mime/index.php index 7e4fc5ca..c5e70db3 100644 --- a/class/mime/index.php +++ b/class/mime/index.php @@ -1,3 +1,3 @@ +?> \ No newline at end of file diff --git a/config/config_default.php b/config/config_default.php index a526f6e7..228cb827 100644 --- a/config/config_default.php +++ b/config/config_default.php @@ -80,7 +80,7 @@ $frame_top = '_top'; * * Here you can set name of the link displayed on the right side of main page. * - * Link will be displayed only if you have $hide_sm_attributions + * Link will be displayed only if you have $hide_sm_attributions * option set to true. * @global string $provider_name */ @@ -91,7 +91,7 @@ $provider_name = 'SquirrelMail'; * * Here you can set URL of the link displayed on the right side of main page. * - * Link will be displayed only if you have $hide_sm_attributions + * Link will be displayed only if you have $hide_sm_attributions * option set to true. * @global string $provider_uri */ @@ -125,7 +125,7 @@ $invert_time = false; * * What should be used when sending email. * If it is set to false, SquirrelMail will use SMTP server settings. - * If it is set to true, SquirrelMail will use program defined in + * If it is set to true, SquirrelMail will use program defined in * $sendmail_path * @global bool $useSendmail */ @@ -149,8 +149,8 @@ $smtpPort = 25; * This can increase user's privacy and solve problems with spam filters * that increase spam marks for dynamic dialup addresses. * - * If admin enables this setting, system should have some logging facility - * or other tools to control users. SquirrelMail's Received: header provides + * If admin enables this setting, system should have some logging facility + * or other tools to control users. SquirrelMail's Received: header provides * information, that can't be forged by webmail user. * @global bool $skip_SM_header */ @@ -160,12 +160,12 @@ $skip_SM_header = false; * Path to Sendmail * * Program that should be used when sending email. SquirrelMail expects that - * this program will follow options used by original sendmail + * this program will follow options used by original sendmail * (http://www.sendmail.org). * @global string $sendmail_path */ $sendmail_path = '/usr/sbin/sendmail'; - + /** * IMAP server address * @@ -360,7 +360,7 @@ $auto_create_special = true; * List Special Folders First Control * * Whether or not to list the special folders first (true/false). - * @global bool $list_special_folders_first + * @global bool $list_special_folders_first */ $list_special_folders_first = true; @@ -382,7 +382,7 @@ $default_sub_of_inbox = true; * option during folder creation. The option toggles which type of * folder it should be. * - * If this option confuses you, just set it to 'true'. You can not hurt + * If this option confuses you, just set it to 'true'. You can not hurt * anything if it's true, but some servers will respond weird if it's * false. (Cyrus works fine whether it's true OR false). * @global bool $show_contain_subfolders_option @@ -393,7 +393,7 @@ $show_contain_subfolders_option = false; * These next two options set the defaults for the way that the * users see their folder list. * $default_unseen_notify - * Specifies whether or not the users will see the number of + * Specifies whether or not the users will see the number of * unseen in each folder by default and also which folders to * do this to. Valid values are: 1=none, 2=inbox, 3=all. * $default_unseen_type @@ -445,7 +445,7 @@ $data_dir = SM_PATH . 'data/'; * list files in this directory. Confidential data might be laying * around there. * + Since the webserver is not able to list the files in the content - * is also impossible for the webserver to delete files lying around + * is also impossible for the webserver to delete files lying around * there for too long. * + It should probably be another directory than data_dir. * @global string $attachment_dir @@ -454,12 +454,12 @@ $attachment_dir = $data_dir; /** * Hash level used for data directory. - * + * * This option allows spliting file based squirrelmail user * data storage directory into several subfolders. Number from * 0 to 4 allows allows having up to four subfolder levels. * - * Hashing should speed up directory access if you have big number + * Hashing should speed up directory access if you have big number * of users (500 and more). * @global integer $dir_hash_level */ @@ -496,7 +496,7 @@ $default_use_priority = true; /** * SquirrelMail Attributions Control * - * This option disables display of "created by squirrelmail developers" + * This option disables display of "created by squirrelmail developers" * strings and provider link * @global bool $hide_sm_attributions */ @@ -528,7 +528,7 @@ $edit_name = true; * Server Side Threading Control * * If you want to enable server side thread sorting options - * Your IMAP server must support the THREAD extension for + * Your IMAP server must support the THREAD extension for * this to work. * @global bool $allow_thread_sort */ @@ -548,7 +548,7 @@ $allow_server_sort = false; * IMAP Charset Use Control * * This option allows you to choose if SM uses charset search - * Your imap server should support SEARCH CHARSET command for + * Your imap server should support SEARCH CHARSET command for * this to work. * @global bool $allow_charset_search */ @@ -582,9 +582,9 @@ $session_name = 'SQMSESSID'; * * To add a new theme to the options that users can choose from, just * add a new number to the array at the bottom, and follow the pattern. - * + * * $theme_default sets theme that will be used by default - * $theme_css sets stylesheet (from theme/css directory) that will be + * $theme_css sets stylesheet (from theme/css directory) that will be * used by default. * @global integer $theme_default * @global string $theme_css @@ -718,7 +718,7 @@ $theme[36]['NAME'] = 'Redmond'; * 'host' => 'memberdir.netscape.com', * 'name' => 'Netcenter Member Directory', * 'base' => 'ou=member_directory,o=netcenter.com' - * ); + * ); */ // Add your ldap server options here @@ -749,7 +749,7 @@ $abook_global_file_writeable = false; /** * MOTD * - * This is a message that is displayed immediately after a user logs in. + * This is a message that is displayed immediately after a user logs in. * @global string $motd */ $motd = ""; @@ -768,7 +768,7 @@ $motd = ""; /*** Database ***/ /** - * Read doc/database.txt in order to get more information + * Read doc/database.txt in order to get more information * about these settings. */ /** @@ -805,7 +805,7 @@ $addrbook_global_listing = false; * * This is the default language. It is used as a last resort * if SquirrelMail can't figure out which language to display. - * Language names usually consist of language code, undercore + * Language names usually consist of language code, undercore * symbol and country code * @global string $squirrelmail_default_language */ @@ -839,7 +839,7 @@ $available_languages = 'all'; /** * Alternative Language Names Control * - * This options allows displaying native language names in language + * This options allows displaying native language names in language * selection box. * @global bool $show_alternative_names * @since 1.5.0 @@ -849,7 +849,7 @@ $show_alternative_names = false; /** * Aggressive Decoding Control * - * This option enables reading of Eastern multibyte encodings. + * This option enables reading of Eastern multibyte encodings. * Functions that provide this support are very cpu and memory intensive. * Don't enable this option unless you really need it. * @global bool $aggressive_decoding @@ -860,8 +860,8 @@ $aggressive_decoding = false; /** * Lossy Encoding Control * - * This option allows charset conversions when output charset does not support - * all symbols used in original charset. Symbols unsupported by output charset + * This option allows charset conversions when output charset does not support + * all symbols used in original charset. Symbols unsupported by output charset * will be replaced with question marks. * @global bool $lossy_encoding * @since 1.5.1 @@ -870,7 +870,7 @@ $lossy_encoding = false; /*** Tweaks ***/ /** - * Advanced DHTML tree control + * Advanced DHTML tree control * * Use experimental DHTML folder listing * @global bool $advanced_tree @@ -900,8 +900,8 @@ $use_icons = false; * Use experimental code with php recode functions when reading messages with * different encoding. This code is faster that original SM functions, * but it require php with recode support. - * - * Don't enable this option if you are not sure about availability of + * + * Don't enable this option if you are not sure about availability of * recode support. * @global bool $use_php_recode * @since 1.5.0 @@ -914,8 +914,8 @@ $use_php_recode = false; * Use experimental code with php iconv functions when reading messages with * different encoding. This code is faster that original SM functions, * but it require php with iconv support and works only with some translations. - * - * Don't enable this option if you are not sure about availability of + * + * Don't enable this option if you are not sure about availability of * iconv support. * @global bool $use_php_iconv * @since 1.5.0 @@ -929,7 +929,7 @@ $use_php_iconv = false; * generate the folder subscribe listbox (this can take a long time * when you have a lot of folders). Instead, a textbox will be * displayed allowing users to enter a specific folder name to subscribe to - * + * * This option can't be changed by conf.pl * @global bool $no_list_for_subscribe */ @@ -939,7 +939,7 @@ $no_list_for_subscribe = false; * Color in config control * * This option is used only by conf.pl script to generate configuration - * menu with some colors and is provided here only as reference. + * menu with some colors and is provided here only as reference. * @global integer $config_use_color */ $config_use_color = 2; @@ -956,4 +956,4 @@ $config_use_color = 2; * sent and regular output to begin, which will majorly screw * things up when we try to send more headers later. */ -?> +?> \ No newline at end of file diff --git a/config/config_local.php b/config/config_local.php index e043ca75..cf58be5e 100644 --- a/config/config_local.php +++ b/config/config_local.php @@ -4,10 +4,10 @@ * * You can override the config.php settings here. * Don't do it unless you know what you're doing. - * Use standard PHP syntax, see config.php for examples. + * Use standard PHP syntax, see config.php for examples. * * @package squirrelmail * @subpackage config */ -?> +?> \ No newline at end of file diff --git a/config/index.php b/config/index.php index 80f6931b..586f2153 100644 --- a/config/index.php +++ b/config/index.php @@ -17,4 +17,4 @@ header("Location:../index.php"); /* pretty impressive huh? */ -?> +?> \ No newline at end of file diff --git a/contrib/RPM/config.php.redhat b/contrib/RPM/config.php.redhat index d646dc71..e6d35ebc 100644 --- a/contrib/RPM/config.php.redhat +++ b/contrib/RPM/config.php.redhat @@ -174,4 +174,4 @@ $session_name = 'SQMSESSID'; * sent and regular output to begin, which will majorly screw * things up when we try to send more headers later. */ -?> +?> \ No newline at end of file diff --git a/data/index.php b/data/index.php index b86832a0..5f28c145 100644 --- a/data/index.php +++ b/data/index.php @@ -17,4 +17,4 @@ header("Location:../index.php"); /* pretty impressive huh? */ -?> +?> \ No newline at end of file diff --git a/functions/abook_database.php b/functions/abook_database.php index 20efeb65..5ac5ac5f 100644 --- a/functions/abook_database.php +++ b/functions/abook_database.php @@ -212,9 +212,9 @@ class abook_database extends addressbook_backend { return false; } - if(isset($this->listing) && !$this->listing) { - return array(); - } + if(isset($this->listing) && !$this->listing) { + return array(); + } $query = sprintf("SELECT * FROM %s WHERE owner='%s'", diff --git a/functions/abook_local_file.php b/functions/abook_local_file.php index e8d43c1c..cf910998 100644 --- a/functions/abook_local_file.php +++ b/functions/abook_local_file.php @@ -22,7 +22,7 @@ * ? create => if true: file is created if it does not exist. * ? umask => umask set before opening file. * ? name => name of address book. - * ? detect_writeable => detect address book access permissions by + * ? detect_writeable => detect address book access permissions by * checking file permissions. * ? writeable => allow writing into address book. Used only when * detect_writeable is set to false. @@ -34,7 +34,7 @@ class abook_local_file extends addressbook_backend { /** * Backend type - * @var string + * @var string */ var $btype = 'local'; /** diff --git a/functions/addressbook.php b/functions/addressbook.php index f5efb80d..fc3174f4 100644 --- a/functions/addressbook.php +++ b/functions/addressbook.php @@ -76,7 +76,7 @@ function addressbook_init($showerr = true, $onlylocal = false) { /* This would be for the global addressbook */ if (isset($abook_global_file) && isset($abook_global_file_writeable) - && trim($abook_global_file)!=''){ + && trim($abook_global_file)!=''){ // Detect place of address book if (! preg_match("/[\/\\\]/",$abook_global_file)) { // no path chars @@ -620,7 +620,7 @@ class AddressBook { } /** - * Create a new address + * Create a new address * @param array $userdata added address record * @param integer $bnum backend number * @return integer the backend number that the/ address was added @@ -671,7 +671,7 @@ class AddressBook { /** * Remove the entries from address book - * @param mixed $alias entries that have to be removed. Can be string with nickname or array with list of nicknames + * @param mixed $alias entries that have to be removed. Can be string with nickname or array with list of nicknames * @param integer $bnum backend number * @return bool true if removed successfully. false if there s an error. $this->error contains error message */ diff --git a/functions/auth.php b/functions/auth.php index caef3b5e..f8c45768 100644 --- a/functions/auth.php +++ b/functions/auth.php @@ -43,13 +43,13 @@ function is_logged_in() { return; } else { global $PHP_SELF, $session_expired_post, - $session_expired_location, $squirrelmail_language; + $session_expired_location, $squirrelmail_language; /* First we store some information in the new session to prevent * information-loss. */ - $session_expired_post = $_POST; + $session_expired_post = $_POST; $session_expired_location = $PHP_SELF; if (!sqsession_is_registered('session_expired_post')) { sqsession_register($session_expired_post,'session_expired_post'); @@ -110,7 +110,7 @@ function digest_md5_response ($username,$password,$challenge,$service,$host) { /* This can be auth (authentication only), auth-int (integrity protection), or auth-conf (confidentiality protection). Right now only auth is supported. - DO NOT CHANGE THIS VALUE */ + DO NOT CHANGE THIS VALUE */ $qop_value = "auth"; $digest_uri_value = $service . '/' . $host; @@ -175,10 +175,10 @@ function digest_md5_parse_challenge($challenge) { // We're in a "simple" value - explode to next comma $val=explode(',',$challenge,2); if (isset($val[1])) { - $challenge=$val[1]; - } else { - unset($challenge); - } + $challenge=$val[1]; + } else { + unset($challenge); + } $value=$val[0]; } $parsed["$key"]=$value; diff --git a/functions/date.php b/functions/date.php index e51db12b..8b8d49c6 100644 --- a/functions/date.php +++ b/functions/date.php @@ -290,9 +290,9 @@ function date_intl( $date_format, $stamp ) { $aParts = explode('#',$ret); $ret = str_replace(array('$1','$4','$2','$3',), array(getDayAbrv($aParts[0]), getMonthAbrv($aParts[1]), - getMonthName($aParts[1]), - getDayName($aParts[0])), - $aParts[2]); + getMonthName($aParts[1]), + getDayName($aParts[0])), + $aParts[2]); return( $ret ); } @@ -447,4 +447,4 @@ function getTimeStamp($dateParts) { return ($mtime); } */ -?> +?> \ No newline at end of file diff --git a/functions/decode/cp1250.php b/functions/decode/cp1250.php index 779e6b68..e2156c63 100644 --- a/functions/decode/cp1250.php +++ b/functions/decode/cp1250.php @@ -7,7 +7,7 @@ * * This file contains cp1250 decoding function that is needed to read * cp1250 encoded mails in non-cp1250 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1250.TXT * @@ -39,134 +39,134 @@ function charset_decode_cp1250 ($string) { return $string; $cp1250 = array( - "\x80" => '€', - "\x81" => '�', - "\x82" => '‚', - "\x83" => '�', - "\x84" => '„', - "\x85" => '…', - "\x86" => '†', - "\x87" => '‡', - "\x88" => '�', - "\x89" => '‰', - "\x8A" => 'Š', - "\x8B" => '‹', - "\x8C" => 'Ś', - "\x8D" => 'Ť', - "\x8E" => 'Ž', - "\x8F" => 'Ź', - "\x90" => '�', - "\x91" => '‘', - "\x92" => '’', - "\x93" => '“', - "\x94" => '”', - "\x95" => '•', - "\x96" => '–', - "\x97" => '—', - "\x98" => '�', - "\x99" => '™', - "\x9A" => 'š', - "\x9B" => '›', - "\x9C" => 'ś', - "\x9D" => 'ť', - "\x9E" => 'ž', - "\x9F" => 'ź', - "\xA0" => ' ', - "\xA1" => 'ˇ', - "\xA2" => '˘', - "\xA3" => 'Ł', - "\xA4" => '¤', - "\xA5" => 'Ą', - "\xA6" => '¦', - "\xA7" => '§', - "\xA8" => '¨', - "\xA9" => '©', - "\xAA" => 'Ş', - "\xAB" => '«', - "\xAC" => '¬', - "\xAD" => '­', - "\xAE" => '®', - "\xAF" => 'Ż', - "\xB0" => '°', - "\xB1" => '±', - "\xB2" => '˛', - "\xB3" => 'ł', - "\xB4" => '´', - "\xB5" => 'µ', - "\xB6" => '¶', - "\xB7" => '·', - "\xB8" => '¸', - "\xB9" => 'ą', - "\xBA" => 'ş', - "\xBB" => '»', - "\xBC" => 'Ľ', - "\xBD" => '˝', - "\xBE" => 'ľ', - "\xBF" => 'ż', - "\xC0" => 'Ŕ', - "\xC1" => 'Á', - "\xC2" => 'Â', - "\xC3" => 'Ă', - "\xC4" => 'Ä', - "\xC5" => 'Ĺ', - "\xC6" => 'Ć', - "\xC7" => 'Ç', - "\xC8" => 'Č', - "\xC9" => 'É', - "\xCA" => 'Ę', - "\xCB" => 'Ë', - "\xCC" => 'Ě', - "\xCD" => 'Í', - "\xCE" => 'Î', - "\xCF" => 'Ď', - "\xD0" => 'Đ', - "\xD1" => 'Ń', - "\xD2" => 'Ň', - "\xD3" => 'Ó', - "\xD4" => 'Ô', - "\xD5" => 'Ő', - "\xD6" => 'Ö', - "\xD7" => '×', - "\xD8" => 'Ř', - "\xD9" => 'Ů', - "\xDA" => 'Ú', - "\xDB" => 'Ű', - "\xDC" => 'Ü', - "\xDD" => 'Ý', - "\xDE" => 'Ţ', - "\xDF" => 'ß', - "\xE0" => 'ŕ', - "\xE1" => 'á', - "\xE2" => 'â', - "\xE3" => 'ă', - "\xE4" => 'ä', - "\xE5" => 'ĺ', - "\xE6" => 'ć', - "\xE7" => 'ç', - "\xE8" => 'č', - "\xE9" => 'é', - "\xEA" => 'ę', - "\xEB" => 'ë', - "\xEC" => 'ě', - "\xED" => 'í', - "\xEE" => 'î', - "\xEF" => 'ď', - "\xF0" => 'đ', - "\xF1" => 'ń', - "\xF2" => 'ň', - "\xF3" => 'ó', - "\xF4" => 'ô', - "\xF5" => 'ő', - "\xF6" => 'ö', - "\xF7" => '÷', - "\xF8" => 'ř', - "\xF9" => 'ů', - "\xFA" => 'ú', - "\xFB" => 'ű', - "\xFC" => 'ü', - "\xFD" => 'ý', - "\xFE" => 'ţ', - "\xFF" => '˙' + "\x80" => '€', + "\x81" => '�', + "\x82" => '‚', + "\x83" => '�', + "\x84" => '„', + "\x85" => '…', + "\x86" => '†', + "\x87" => '‡', + "\x88" => '�', + "\x89" => '‰', + "\x8A" => 'Š', + "\x8B" => '‹', + "\x8C" => 'Ś', + "\x8D" => 'Ť', + "\x8E" => 'Ž', + "\x8F" => 'Ź', + "\x90" => '�', + "\x91" => '‘', + "\x92" => '’', + "\x93" => '“', + "\x94" => '”', + "\x95" => '•', + "\x96" => '–', + "\x97" => '—', + "\x98" => '�', + "\x99" => '™', + "\x9A" => 'š', + "\x9B" => '›', + "\x9C" => 'ś', + "\x9D" => 'ť', + "\x9E" => 'ž', + "\x9F" => 'ź', + "\xA0" => ' ', + "\xA1" => 'ˇ', + "\xA2" => '˘', + "\xA3" => 'Ł', + "\xA4" => '¤', + "\xA5" => 'Ą', + "\xA6" => '¦', + "\xA7" => '§', + "\xA8" => '¨', + "\xA9" => '©', + "\xAA" => 'Ş', + "\xAB" => '«', + "\xAC" => '¬', + "\xAD" => '­', + "\xAE" => '®', + "\xAF" => 'Ż', + "\xB0" => '°', + "\xB1" => '±', + "\xB2" => '˛', + "\xB3" => 'ł', + "\xB4" => '´', + "\xB5" => 'µ', + "\xB6" => '¶', + "\xB7" => '·', + "\xB8" => '¸', + "\xB9" => 'ą', + "\xBA" => 'ş', + "\xBB" => '»', + "\xBC" => 'Ľ', + "\xBD" => '˝', + "\xBE" => 'ľ', + "\xBF" => 'ż', + "\xC0" => 'Ŕ', + "\xC1" => 'Á', + "\xC2" => 'Â', + "\xC3" => 'Ă', + "\xC4" => 'Ä', + "\xC5" => 'Ĺ', + "\xC6" => 'Ć', + "\xC7" => 'Ç', + "\xC8" => 'Č', + "\xC9" => 'É', + "\xCA" => 'Ę', + "\xCB" => 'Ë', + "\xCC" => 'Ě', + "\xCD" => 'Í', + "\xCE" => 'Î', + "\xCF" => 'Ď', + "\xD0" => 'Đ', + "\xD1" => 'Ń', + "\xD2" => 'Ň', + "\xD3" => 'Ó', + "\xD4" => 'Ô', + "\xD5" => 'Ő', + "\xD6" => 'Ö', + "\xD7" => '×', + "\xD8" => 'Ř', + "\xD9" => 'Ů', + "\xDA" => 'Ú', + "\xDB" => 'Ű', + "\xDC" => 'Ü', + "\xDD" => 'Ý', + "\xDE" => 'Ţ', + "\xDF" => 'ß', + "\xE0" => 'ŕ', + "\xE1" => 'á', + "\xE2" => 'â', + "\xE3" => 'ă', + "\xE4" => 'ä', + "\xE5" => 'ĺ', + "\xE6" => 'ć', + "\xE7" => 'ç', + "\xE8" => 'č', + "\xE9" => 'é', + "\xEA" => 'ę', + "\xEB" => 'ë', + "\xEC" => 'ě', + "\xED" => 'í', + "\xEE" => 'î', + "\xEF" => 'ď', + "\xF0" => 'đ', + "\xF1" => 'ń', + "\xF2" => 'ň', + "\xF3" => 'ó', + "\xF4" => 'ô', + "\xF5" => 'ő', + "\xF6" => 'ö', + "\xF7" => '÷', + "\xF8" => 'ř', + "\xF9" => 'ů', + "\xFA" => 'ú', + "\xFB" => 'ű', + "\xFC" => 'ü', + "\xFD" => 'ý', + "\xFE" => 'ţ', + "\xFF" => '˙' ); $string = str_replace(array_keys($cp1250), array_values($cp1250), $string); @@ -174,4 +174,4 @@ function charset_decode_cp1250 ($string) { return $string; } -?> +?> \ No newline at end of file diff --git a/functions/decode/cp1251.php b/functions/decode/cp1251.php index 5ac43697..3a0c3ac4 100644 --- a/functions/decode/cp1251.php +++ b/functions/decode/cp1251.php @@ -7,7 +7,7 @@ * * This file contains cp1251 decoding function that is needed to read * cp1251 encoded mails in non-cp1251 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1250.TXT * @@ -39,134 +39,134 @@ function charset_decode_cp1251 ($string) { return $string; $cp1251 = array( - "\x80" => 'Ђ', - "\x81" => 'Ѓ', - "\x82" => '‚', - "\x83" => 'ѓ', - "\x84" => '„', - "\x85" => '…', - "\x86" => '†', - "\x87" => '‡', - "\x88" => '€', - "\x89" => '‰', - "\x8A" => 'Љ', - "\x8B" => '‹', - "\x8C" => 'Њ', - "\x8D" => 'Ќ', - "\x8E" => 'Ћ', - "\x8F" => 'Џ', - "\x90" => 'ђ', - "\x91" => '‘', - "\x92" => '’', - "\x93" => '“', - "\x94" => '”', - "\x95" => '•', - "\x96" => '–', - "\x97" => '—', - "\x98" => '�', - "\x99" => '™', - "\x9A" => 'љ', - "\x9B" => '›', - "\x9C" => 'њ', - "\x9D" => 'ќ', - "\x9E" => 'ћ', - "\x9F" => 'џ', - "\xA0" => ' ', - "\xA1" => 'Ў', - "\xA2" => 'ў', - "\xA3" => 'Ј', - "\xA4" => '¤', - "\xA5" => 'Ґ', - "\xA6" => '¦', - "\xA7" => '§', - "\xA8" => 'Ё', - "\xA9" => '©', - "\xAA" => 'Є', - "\xAB" => '«', - "\xAC" => '¬', - "\xAD" => '­', - "\xAE" => '®', - "\xAF" => 'Ї', - "\xB0" => '°', - "\xB1" => '±', - "\xB2" => 'І', - "\xB3" => 'і', - "\xB4" => 'ґ', - "\xB5" => 'µ', - "\xB6" => '¶', - "\xB7" => '·', - "\xB8" => 'ё', - "\xB9" => '№', - "\xBA" => 'є', - "\xBB" => '»', - "\xBC" => 'ј', - "\xBD" => 'Ѕ', - "\xBE" => 'ѕ', - "\xBF" => 'ї', - "\xC0" => 'А', - "\xC1" => 'Б', - "\xC2" => 'В', - "\xC3" => 'Г', - "\xC4" => 'Д', - "\xC5" => 'Е', - "\xC6" => 'Ж', - "\xC7" => 'З', - "\xC8" => 'И', - "\xC9" => 'Й', - "\xCA" => 'К', - "\xCB" => 'Л', - "\xCC" => 'М', - "\xCD" => 'Н', - "\xCE" => 'О', - "\xCF" => 'П', - "\xD0" => 'Р', - "\xD1" => 'С', - "\xD2" => 'Т', - "\xD3" => 'У', - "\xD4" => 'Ф', - "\xD5" => 'Х', - "\xD6" => 'Ц', - "\xD7" => 'Ч', - "\xD8" => 'Ш', - "\xD9" => 'Щ', - "\xDA" => 'Ъ', - "\xDB" => 'Ы', - "\xDC" => 'Ь', - "\xDD" => 'Э', - "\xDE" => 'Ю', - "\xDF" => 'Я', - "\xE0" => 'а', - "\xE1" => 'б', - "\xE2" => 'в', - "\xE3" => 'г', - "\xE4" => 'д', - "\xE5" => 'е', - "\xE6" => 'ж', - "\xE7" => 'з', - "\xE8" => 'и', - "\xE9" => 'й', - "\xEA" => 'к', - "\xEB" => 'л', - "\xEC" => 'м', - "\xED" => 'н', - "\xEE" => 'о', - "\xEF" => 'п', - "\xF0" => 'р', - "\xF1" => 'с', - "\xF2" => 'т', - "\xF3" => 'у', - "\xF4" => 'ф', - "\xF5" => 'х', - "\xF6" => 'ц', - "\xF7" => 'ч', - "\xF8" => 'ш', - "\xF9" => 'щ', - "\xFA" => 'ъ', - "\xFB" => 'ы', - "\xFC" => 'ь', - "\xFD" => 'э', - "\xFE" => 'ю', - "\xFF" => 'я' + "\x80" => 'Ђ', + "\x81" => 'Ѓ', + "\x82" => '‚', + "\x83" => 'ѓ', + "\x84" => '„', + "\x85" => '…', + "\x86" => '†', + "\x87" => '‡', + "\x88" => '€', + "\x89" => '‰', + "\x8A" => 'Љ', + "\x8B" => '‹', + "\x8C" => 'Њ', + "\x8D" => 'Ќ', + "\x8E" => 'Ћ', + "\x8F" => 'Џ', + "\x90" => 'ђ', + "\x91" => '‘', + "\x92" => '’', + "\x93" => '“', + "\x94" => '”', + "\x95" => '•', + "\x96" => '–', + "\x97" => '—', + "\x98" => '�', + "\x99" => '™', + "\x9A" => 'љ', + "\x9B" => '›', + "\x9C" => 'њ', + "\x9D" => 'ќ', + "\x9E" => 'ћ', + "\x9F" => 'џ', + "\xA0" => ' ', + "\xA1" => 'Ў', + "\xA2" => 'ў', + "\xA3" => 'Ј', + "\xA4" => '¤', + "\xA5" => 'Ґ', + "\xA6" => '¦', + "\xA7" => '§', + "\xA8" => 'Ё', + "\xA9" => '©', + "\xAA" => 'Є', + "\xAB" => '«', + "\xAC" => '¬', + "\xAD" => '­', + "\xAE" => '®', + "\xAF" => 'Ї', + "\xB0" => '°', + "\xB1" => '±', + "\xB2" => 'І', + "\xB3" => 'і', + "\xB4" => 'ґ', + "\xB5" => 'µ', + "\xB6" => '¶', + "\xB7" => '·', + "\xB8" => 'ё', + "\xB9" => '№', + "\xBA" => 'є', + "\xBB" => '»', + "\xBC" => 'ј', + "\xBD" => 'Ѕ', + "\xBE" => 'ѕ', + "\xBF" => 'ї', + "\xC0" => 'А', + "\xC1" => 'Б', + "\xC2" => 'В', + "\xC3" => 'Г', + "\xC4" => 'Д', + "\xC5" => 'Е', + "\xC6" => 'Ж', + "\xC7" => 'З', + "\xC8" => 'И', + "\xC9" => 'Й', + "\xCA" => 'К', + "\xCB" => 'Л', + "\xCC" => 'М', + "\xCD" => 'Н', + "\xCE" => 'О', + "\xCF" => 'П', + "\xD0" => 'Р', + "\xD1" => 'С', + "\xD2" => 'Т', + "\xD3" => 'У', + "\xD4" => 'Ф', + "\xD5" => 'Х', + "\xD6" => 'Ц', + "\xD7" => 'Ч', + "\xD8" => 'Ш', + "\xD9" => 'Щ', + "\xDA" => 'Ъ', + "\xDB" => 'Ы', + "\xDC" => 'Ь', + "\xDD" => 'Э', + "\xDE" => 'Ю', + "\xDF" => 'Я', + "\xE0" => 'а', + "\xE1" => 'б', + "\xE2" => 'в', + "\xE3" => 'г', + "\xE4" => 'д', + "\xE5" => 'е', + "\xE6" => 'ж', + "\xE7" => 'з', + "\xE8" => 'и', + "\xE9" => 'й', + "\xEA" => 'к', + "\xEB" => 'л', + "\xEC" => 'м', + "\xED" => 'н', + "\xEE" => 'о', + "\xEF" => 'п', + "\xF0" => 'р', + "\xF1" => 'с', + "\xF2" => 'т', + "\xF3" => 'у', + "\xF4" => 'ф', + "\xF5" => 'х', + "\xF6" => 'ц', + "\xF7" => 'ч', + "\xF8" => 'ш', + "\xF9" => 'щ', + "\xFA" => 'ъ', + "\xFB" => 'ы', + "\xFC" => 'ь', + "\xFD" => 'э', + "\xFE" => 'ю', + "\xFF" => 'я' ); $string = str_replace(array_keys($cp1251), array_values($cp1251), $string); @@ -174,4 +174,4 @@ function charset_decode_cp1251 ($string) { return $string; } -?> +?> \ No newline at end of file diff --git a/functions/decode/cp1252.php b/functions/decode/cp1252.php index ed69e3ac..382381fb 100644 --- a/functions/decode/cp1252.php +++ b/functions/decode/cp1252.php @@ -7,7 +7,7 @@ * * This file contains cp1252 decoding function that is needed to read * cp1252 encoded mails in non-cp1252 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1252.TXT * @@ -40,134 +40,134 @@ function charset_decode_cp1252 ($string) { return $string; $cp1252 = array( - "\x80" => '€', - "\x81" => '�', - "\x82" => '‚', - "\x83" => 'ƒ', - "\x84" => '„', - "\x85" => '…', - "\x86" => '†', - "\x87" => '‡', - "\x88" => 'ˆ', - "\x89" => '‰', - "\x8A" => 'Š', - "\x8B" => '‹', - "\x8C" => 'Œ', - "\x8D" => '�', - "\x8E" => 'Ž', - "\x8F" => '�', - "\x90" => '�', - "\x91" => '‘', - "\x92" => '’', - "\x93" => '“', - "\x94" => '”', - "\x95" => '•', - "\x96" => '–', - "\x97" => '—', - "\x98" => '˜', - "\x99" => '™', - "\x9A" => 'š', - "\x9B" => '›', - "\x9C" => 'œ', - "\x9D" => '�', - "\x9E" => 'ž', - "\x9F" => 'Ÿ', - "\xA0" => ' ', - "\xA1" => '¡', - "\xA2" => '¢', - "\xA3" => '£', - "\xA4" => '¤', - "\xA5" => '¥', - "\xA6" => '¦', - "\xA7" => '§', - "\xA8" => '¨', - "\xA9" => '©', - "\xAA" => 'ª', - "\xAB" => '«', - "\xAC" => '¬', - "\xAD" => '­', - "\xAE" => '®', - "\xAF" => '¯', - "\xB0" => '°', - "\xB1" => '±', - "\xB2" => '²', - "\xB3" => '³', - "\xB4" => '´', - "\xB5" => 'µ', - "\xB6" => '¶', - "\xB7" => '·', - "\xB8" => '¸', - "\xB9" => '¹', - "\xBA" => 'º', - "\xBB" => '»', - "\xBC" => '¼', - "\xBD" => '½', - "\xBE" => '¾', - "\xBF" => '¿', - "\xC0" => 'À', - "\xC1" => 'Á', - "\xC2" => 'Â', - "\xC3" => 'Ã', - "\xC4" => 'Ä', - "\xC5" => 'Å', - "\xC6" => 'Æ', - "\xC7" => 'Ç', - "\xC8" => 'È', - "\xC9" => 'É', - "\xCA" => 'Ê', - "\xCB" => 'Ë', - "\xCC" => 'Ì', - "\xCD" => 'Í', - "\xCE" => 'Î', - "\xCF" => 'Ï', - "\xD0" => 'Ð', - "\xD1" => 'Ñ', - "\xD2" => 'Ò', - "\xD3" => 'Ó', - "\xD4" => 'Ô', - "\xD5" => 'Õ', - "\xD6" => 'Ö', - "\xD7" => '×', - "\xD8" => 'Ø', - "\xD9" => 'Ù', - "\xDA" => 'Ú', - "\xDB" => 'Û', - "\xDC" => 'Ü', - "\xDD" => 'Ý', - "\xDE" => 'Þ', - "\xDF" => 'ß', - "\xE0" => 'à', - "\xE1" => 'á', - "\xE2" => 'â', - "\xE3" => 'ã', - "\xE4" => 'ä', - "\xE5" => 'å', - "\xE6" => 'æ', - "\xE7" => 'ç', - "\xE8" => 'è', - "\xE9" => 'é', - "\xEA" => 'ê', - "\xEB" => 'ë', - "\xEC" => 'ì', - "\xED" => 'í', - "\xEE" => 'î', - "\xEF" => 'ï', - "\xF0" => 'ð', - "\xF1" => 'ñ', - "\xF2" => 'ò', - "\xF3" => 'ó', - "\xF4" => 'ô', - "\xF5" => 'õ', - "\xF6" => 'ö', - "\xF7" => '÷', - "\xF8" => 'ø', - "\xF9" => 'ù', - "\xFA" => 'ú', - "\xFB" => 'û', - "\xFC" => 'ü', - "\xFD" => 'ý', - "\xFE" => 'þ', - "\xFF" => 'ÿ' + "\x80" => '€', + "\x81" => '�', + "\x82" => '‚', + "\x83" => 'ƒ', + "\x84" => '„', + "\x85" => '…', + "\x86" => '†', + "\x87" => '‡', + "\x88" => 'ˆ', + "\x89" => '‰', + "\x8A" => 'Š', + "\x8B" => '‹', + "\x8C" => 'Œ', + "\x8D" => '�', + "\x8E" => 'Ž', + "\x8F" => '�', + "\x90" => '�', + "\x91" => '‘', + "\x92" => '’', + "\x93" => '“', + "\x94" => '”', + "\x95" => '•', + "\x96" => '–', + "\x97" => '—', + "\x98" => '˜', + "\x99" => '™', + "\x9A" => 'š', + "\x9B" => '›', + "\x9C" => 'œ', + "\x9D" => '�', + "\x9E" => 'ž', + "\x9F" => 'Ÿ', + "\xA0" => ' ', + "\xA1" => '¡', + "\xA2" => '¢', + "\xA3" => '£', + "\xA4" => '¤', + "\xA5" => '¥', + "\xA6" => '¦', + "\xA7" => '§', + "\xA8" => '¨', + "\xA9" => '©', + "\xAA" => 'ª', + "\xAB" => '«', + "\xAC" => '¬', + "\xAD" => '­', + "\xAE" => '®', + "\xAF" => '¯', + "\xB0" => '°', + "\xB1" => '±', + "\xB2" => '²', + "\xB3" => '³', + "\xB4" => '´', + "\xB5" => 'µ', + "\xB6" => '¶', + "\xB7" => '·', + "\xB8" => '¸', + "\xB9" => '¹', + "\xBA" => 'º', + "\xBB" => '»', + "\xBC" => '¼', + "\xBD" => '½', + "\xBE" => '¾', + "\xBF" => '¿', + "\xC0" => 'À', + "\xC1" => 'Á', + "\xC2" => 'Â', + "\xC3" => 'Ã', + "\xC4" => 'Ä', + "\xC5" => 'Å', + "\xC6" => 'Æ', + "\xC7" => 'Ç', + "\xC8" => 'È', + "\xC9" => 'É', + "\xCA" => 'Ê', + "\xCB" => 'Ë', + "\xCC" => 'Ì', + "\xCD" => 'Í', + "\xCE" => 'Î', + "\xCF" => 'Ï', + "\xD0" => 'Ð', + "\xD1" => 'Ñ', + "\xD2" => 'Ò', + "\xD3" => 'Ó', + "\xD4" => 'Ô', + "\xD5" => 'Õ', + "\xD6" => 'Ö', + "\xD7" => '×', + "\xD8" => 'Ø', + "\xD9" => 'Ù', + "\xDA" => 'Ú', + "\xDB" => 'Û', + "\xDC" => 'Ü', + "\xDD" => 'Ý', + "\xDE" => 'Þ', + "\xDF" => 'ß', + "\xE0" => 'à', + "\xE1" => 'á', + "\xE2" => 'â', + "\xE3" => 'ã', + "\xE4" => 'ä', + "\xE5" => 'å', + "\xE6" => 'æ', + "\xE7" => 'ç', + "\xE8" => 'è', + "\xE9" => 'é', + "\xEA" => 'ê', + "\xEB" => 'ë', + "\xEC" => 'ì', + "\xED" => 'í', + "\xEE" => 'î', + "\xEF" => 'ï', + "\xF0" => 'ð', + "\xF1" => 'ñ', + "\xF2" => 'ò', + "\xF3" => 'ó', + "\xF4" => 'ô', + "\xF5" => 'õ', + "\xF6" => 'ö', + "\xF7" => '÷', + "\xF8" => 'ø', + "\xF9" => 'ù', + "\xFA" => 'ú', + "\xFB" => 'û', + "\xFC" => 'ü', + "\xFD" => 'ý', + "\xFE" => 'þ', + "\xFF" => 'ÿ' ); $string = str_replace(array_keys($cp1252), array_values($cp1252), $string); @@ -175,4 +175,4 @@ function charset_decode_cp1252 ($string) { return $string; } -?> +?> \ No newline at end of file diff --git a/functions/decode/cp1253.php b/functions/decode/cp1253.php index ff69088d..bc852daa 100644 --- a/functions/decode/cp1253.php +++ b/functions/decode/cp1253.php @@ -7,7 +7,7 @@ * * This file contains cp1253 decoding function that is needed to read * cp1253 encoded mails in non-cp1253 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1253.TXT * @@ -39,134 +39,134 @@ function charset_decode_cp1253 ($string) { return $string; $cp1253 = array( - "\x80" => '€', - "\x81" => '�', - "\x82" => '‚', - "\x83" => 'ƒ', - "\x84" => '„', - "\x85" => '…', - "\x86" => '†', - "\x87" => '‡', - "\x88" => '�', - "\x89" => '‰', - "\x8A" => '�', - "\x8B" => '‹', - "\x8C" => '�', - "\x8D" => '�', - "\x8E" => '�', - "\x8F" => '�', - "\x90" => '�', - "\x91" => '‘', - "\x92" => '’', - "\x93" => '“', - "\x94" => '”', - "\x95" => '•', - "\x96" => '–', - "\x97" => '—', - "\x98" => '�', - "\x99" => '™', - "\x9A" => '�', - "\x9B" => '›', - "\x9C" => '�', - "\x9D" => '�', - "\x9E" => '�', - "\x9F" => '�', - "\xA0" => ' ', - "\xA1" => '΅', - "\xA2" => 'Ά', - "\xA3" => '£', - "\xA4" => '¤', - "\xA5" => '¥', - "\xA6" => '¦', - "\xA7" => '§', - "\xA8" => '¨', - "\xA9" => '©', - "\xAA" => '�', - "\xAB" => '«', - "\xAC" => '¬', - "\xAD" => '­', - "\xAE" => '®', - "\xAF" => '―', - "\xB0" => '°', - "\xB1" => '±', - "\xB2" => '²', - "\xB3" => '³', - "\xB4" => '΄', - "\xB5" => 'µ', - "\xB6" => '¶', - "\xB7" => '·', - "\xB8" => 'Έ', - "\xB9" => 'Ή', - "\xBA" => 'Ί', - "\xBB" => '»', - "\xBC" => 'Ό', - "\xBD" => '½', - "\xBE" => 'Ύ', - "\xBF" => 'Ώ', - "\xC0" => 'ΐ', - "\xC1" => 'Α', - "\xC2" => 'Β', - "\xC3" => 'Γ', - "\xC4" => 'Δ', - "\xC5" => 'Ε', - "\xC6" => 'Ζ', - "\xC7" => 'Η', - "\xC8" => 'Θ', - "\xC9" => 'Ι', - "\xCA" => 'Κ', - "\xCB" => 'Λ', - "\xCC" => 'Μ', - "\xCD" => 'Ν', - "\xCE" => 'Ξ', - "\xCF" => 'Ο', - "\xD0" => 'Π', - "\xD1" => 'Ρ', - "\xD2" => '�', - "\xD3" => 'Σ', - "\xD4" => 'Τ', - "\xD5" => 'Υ', - "\xD6" => 'Φ', - "\xD7" => 'Χ', - "\xD8" => 'Ψ', - "\xD9" => 'Ω', - "\xDA" => 'Ϊ', - "\xDB" => 'Ϋ', - "\xDC" => 'ά', - "\xDD" => 'έ', - "\xDE" => 'ή', - "\xDF" => 'ί', - "\xE0" => 'ΰ', - "\xE1" => 'α', - "\xE2" => 'β', - "\xE3" => 'γ', - "\xE4" => 'δ', - "\xE5" => 'ε', - "\xE6" => 'ζ', - "\xE7" => 'η', - "\xE8" => 'θ', - "\xE9" => 'ι', - "\xEA" => 'κ', - "\xEB" => 'λ', - "\xEC" => 'μ', - "\xED" => 'ν', - "\xEE" => 'ξ', - "\xEF" => 'ο', - "\xF0" => 'π', - "\xF1" => 'ρ', - "\xF2" => 'ς', - "\xF3" => 'σ', - "\xF4" => 'τ', - "\xF5" => 'υ', - "\xF6" => 'φ', - "\xF7" => 'χ', - "\xF8" => 'ψ', - "\xF9" => 'ω', - "\xFA" => 'ϊ', - "\xFB" => 'ϋ', - "\xFC" => 'ό', - "\xFD" => 'ύ', - "\xFE" => 'ώ', - "\xFF" => '�' + "\x80" => '€', + "\x81" => '�', + "\x82" => '‚', + "\x83" => 'ƒ', + "\x84" => '„', + "\x85" => '…', + "\x86" => '†', + "\x87" => '‡', + "\x88" => '�', + "\x89" => '‰', + "\x8A" => '�', + "\x8B" => '‹', + "\x8C" => '�', + "\x8D" => '�', + "\x8E" => '�', + "\x8F" => '�', + "\x90" => '�', + "\x91" => '‘', + "\x92" => '’', + "\x93" => '“', + "\x94" => '”', + "\x95" => '•', + "\x96" => '–', + "\x97" => '—', + "\x98" => '�', + "\x99" => '™', + "\x9A" => '�', + "\x9B" => '›', + "\x9C" => '�', + "\x9D" => '�', + "\x9E" => '�', + "\x9F" => '�', + "\xA0" => ' ', + "\xA1" => '΅', + "\xA2" => 'Ά', + "\xA3" => '£', + "\xA4" => '¤', + "\xA5" => '¥', + "\xA6" => '¦', + "\xA7" => '§', + "\xA8" => '¨', + "\xA9" => '©', + "\xAA" => '�', + "\xAB" => '«', + "\xAC" => '¬', + "\xAD" => '­', + "\xAE" => '®', + "\xAF" => '―', + "\xB0" => '°', + "\xB1" => '±', + "\xB2" => '²', + "\xB3" => '³', + "\xB4" => '΄', + "\xB5" => 'µ', + "\xB6" => '¶', + "\xB7" => '·', + "\xB8" => 'Έ', + "\xB9" => 'Ή', + "\xBA" => 'Ί', + "\xBB" => '»', + "\xBC" => 'Ό', + "\xBD" => '½', + "\xBE" => 'Ύ', + "\xBF" => 'Ώ', + "\xC0" => 'ΐ', + "\xC1" => 'Α', + "\xC2" => 'Β', + "\xC3" => 'Γ', + "\xC4" => 'Δ', + "\xC5" => 'Ε', + "\xC6" => 'Ζ', + "\xC7" => 'Η', + "\xC8" => 'Θ', + "\xC9" => 'Ι', + "\xCA" => 'Κ', + "\xCB" => 'Λ', + "\xCC" => 'Μ', + "\xCD" => 'Ν', + "\xCE" => 'Ξ', + "\xCF" => 'Ο', + "\xD0" => 'Π', + "\xD1" => 'Ρ', + "\xD2" => '�', + "\xD3" => 'Σ', + "\xD4" => 'Τ', + "\xD5" => 'Υ', + "\xD6" => 'Φ', + "\xD7" => 'Χ', + "\xD8" => 'Ψ', + "\xD9" => 'Ω', + "\xDA" => 'Ϊ', + "\xDB" => 'Ϋ', + "\xDC" => 'ά', + "\xDD" => 'έ', + "\xDE" => 'ή', + "\xDF" => 'ί', + "\xE0" => 'ΰ', + "\xE1" => 'α', + "\xE2" => 'β', + "\xE3" => 'γ', + "\xE4" => 'δ', + "\xE5" => 'ε', + "\xE6" => 'ζ', + "\xE7" => 'η', + "\xE8" => 'θ', + "\xE9" => 'ι', + "\xEA" => 'κ', + "\xEB" => 'λ', + "\xEC" => 'μ', + "\xED" => 'ν', + "\xEE" => 'ξ', + "\xEF" => 'ο', + "\xF0" => 'π', + "\xF1" => 'ρ', + "\xF2" => 'ς', + "\xF3" => 'σ', + "\xF4" => 'τ', + "\xF5" => 'υ', + "\xF6" => 'φ', + "\xF7" => 'χ', + "\xF8" => 'ψ', + "\xF9" => 'ω', + "\xFA" => 'ϊ', + "\xFB" => 'ϋ', + "\xFC" => 'ό', + "\xFD" => 'ύ', + "\xFE" => 'ώ', + "\xFF" => '�' ); $string = str_replace(array_keys($cp1253), array_values($cp1253), $string); @@ -174,4 +174,4 @@ function charset_decode_cp1253 ($string) { return $string; } -?> +?> \ No newline at end of file diff --git a/functions/decode/cp1254.php b/functions/decode/cp1254.php index 10916c0a..7cfe140f 100644 --- a/functions/decode/cp1254.php +++ b/functions/decode/cp1254.php @@ -7,7 +7,7 @@ * * This file contains cp1254 decoding function that is needed to read * cp1254 encoded mails in non-cp1254 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1254.TXT * @@ -39,134 +39,134 @@ function charset_decode_cp1254 ($string) { return $string; $cp1254 = array( - "\x80" => '€', - "\x81" => '�', - "\x82" => '‚', - "\x83" => 'ƒ', - "\x84" => '„', - "\x85" => '…', - "\x86" => '†', - "\x87" => '‡', - "\x88" => 'ˆ', - "\x89" => '‰', - "\x8A" => 'Š', - "\x8B" => '‹', - "\x8C" => 'Œ', - "\x8D" => '�', - "\x8E" => '�', - "\x8F" => '�', - "\x90" => '�', - "\x91" => '‘', - "\x92" => '’', - "\x93" => '“', - "\x94" => '”', - "\x95" => '•', - "\x96" => '–', - "\x97" => '—', - "\x98" => '˜', - "\x99" => '™', - "\x9A" => 'š', - "\x9B" => '›', - "\x9C" => 'œ', - "\x9D" => '�', - "\x9E" => '�', - "\x9F" => 'Ÿ', - "\xA0" => ' ', - "\xA1" => '¡', - "\xA2" => '¢', - "\xA3" => '£', - "\xA4" => '¤', - "\xA5" => '¥', - "\xA6" => '¦', - "\xA7" => '§', - "\xA8" => '¨', - "\xA9" => '©', - "\xAA" => 'ª', - "\xAB" => '«', - "\xAC" => '¬', - "\xAD" => '­', - "\xAE" => '®', - "\xAF" => '¯', - "\xB0" => '°', - "\xB1" => '±', - "\xB2" => '²', - "\xB3" => '³', - "\xB4" => '´', - "\xB5" => 'µ', - "\xB6" => '¶', - "\xB7" => '·', - "\xB8" => '¸', - "\xB9" => '¹', - "\xBA" => 'º', - "\xBB" => '»', - "\xBC" => '¼', - "\xBD" => '½', - "\xBE" => '¾', - "\xBF" => '¿', - "\xC0" => 'À', - "\xC1" => 'Á', - "\xC2" => 'Â', - "\xC3" => 'Ã', - "\xC4" => 'Ä', - "\xC5" => 'Å', - "\xC6" => 'Æ', - "\xC7" => 'Ç', - "\xC8" => 'È', - "\xC9" => 'É', - "\xCA" => 'Ê', - "\xCB" => 'Ë', - "\xCC" => 'Ì', - "\xCD" => 'Í', - "\xCE" => 'Î', - "\xCF" => 'Ï', - "\xD0" => 'Ğ', - "\xD1" => 'Ñ', - "\xD2" => 'Ò', - "\xD3" => 'Ó', - "\xD4" => 'Ô', - "\xD5" => 'Õ', - "\xD6" => 'Ö', - "\xD7" => '×', - "\xD8" => 'Ø', - "\xD9" => 'Ù', - "\xDA" => 'Ú', - "\xDB" => 'Û', - "\xDC" => 'Ü', - "\xDD" => 'İ', - "\xDE" => 'Ş', - "\xDF" => 'ß', - "\xE0" => 'à', - "\xE1" => 'á', - "\xE2" => 'â', - "\xE3" => 'ã', - "\xE4" => 'ä', - "\xE5" => 'å', - "\xE6" => 'æ', - "\xE7" => 'ç', - "\xE8" => 'è', - "\xE9" => 'é', - "\xEA" => 'ê', - "\xEB" => 'ë', - "\xEC" => 'ì', - "\xED" => 'í', - "\xEE" => 'î', - "\xEF" => 'ï', - "\xF0" => 'ğ', - "\xF1" => 'ñ', - "\xF2" => 'ò', - "\xF3" => 'ó', - "\xF4" => 'ô', - "\xF5" => 'õ', - "\xF6" => 'ö', - "\xF7" => '÷', - "\xF8" => 'ø', - "\xF9" => 'ù', - "\xFA" => 'ú', - "\xFB" => 'û', - "\xFC" => 'ü', - "\xFD" => 'ı', - "\xFE" => 'ş', - "\xFF" => 'ÿ' + "\x80" => '€', + "\x81" => '�', + "\x82" => '‚', + "\x83" => 'ƒ', + "\x84" => '„', + "\x85" => '…', + "\x86" => '†', + "\x87" => '‡', + "\x88" => 'ˆ', + "\x89" => '‰', + "\x8A" => 'Š', + "\x8B" => '‹', + "\x8C" => 'Œ', + "\x8D" => '�', + "\x8E" => '�', + "\x8F" => '�', + "\x90" => '�', + "\x91" => '‘', + "\x92" => '’', + "\x93" => '“', + "\x94" => '”', + "\x95" => '•', + "\x96" => '–', + "\x97" => '—', + "\x98" => '˜', + "\x99" => '™', + "\x9A" => 'š', + "\x9B" => '›', + "\x9C" => 'œ', + "\x9D" => '�', + "\x9E" => '�', + "\x9F" => 'Ÿ', + "\xA0" => ' ', + "\xA1" => '¡', + "\xA2" => '¢', + "\xA3" => '£', + "\xA4" => '¤', + "\xA5" => '¥', + "\xA6" => '¦', + "\xA7" => '§', + "\xA8" => '¨', + "\xA9" => '©', + "\xAA" => 'ª', + "\xAB" => '«', + "\xAC" => '¬', + "\xAD" => '­', + "\xAE" => '®', + "\xAF" => '¯', + "\xB0" => '°', + "\xB1" => '±', + "\xB2" => '²', + "\xB3" => '³', + "\xB4" => '´', + "\xB5" => 'µ', + "\xB6" => '¶', + "\xB7" => '·', + "\xB8" => '¸', + "\xB9" => '¹', + "\xBA" => 'º', + "\xBB" => '»', + "\xBC" => '¼', + "\xBD" => '½', + "\xBE" => '¾', + "\xBF" => '¿', + "\xC0" => 'À', + "\xC1" => 'Á', + "\xC2" => 'Â', + "\xC3" => 'Ã', + "\xC4" => 'Ä', + "\xC5" => 'Å', + "\xC6" => 'Æ', + "\xC7" => 'Ç', + "\xC8" => 'È', + "\xC9" => 'É', + "\xCA" => 'Ê', + "\xCB" => 'Ë', + "\xCC" => 'Ì', + "\xCD" => 'Í', + "\xCE" => 'Î', + "\xCF" => 'Ï', + "\xD0" => 'Ğ', + "\xD1" => 'Ñ', + "\xD2" => 'Ò', + "\xD3" => 'Ó', + "\xD4" => 'Ô', + "\xD5" => 'Õ', + "\xD6" => 'Ö', + "\xD7" => '×', + "\xD8" => 'Ø', + "\xD9" => 'Ù', + "\xDA" => 'Ú', + "\xDB" => 'Û', + "\xDC" => 'Ü', + "\xDD" => 'İ', + "\xDE" => 'Ş', + "\xDF" => 'ß', + "\xE0" => 'à', + "\xE1" => 'á', + "\xE2" => 'â', + "\xE3" => 'ã', + "\xE4" => 'ä', + "\xE5" => 'å', + "\xE6" => 'æ', + "\xE7" => 'ç', + "\xE8" => 'è', + "\xE9" => 'é', + "\xEA" => 'ê', + "\xEB" => 'ë', + "\xEC" => 'ì', + "\xED" => 'í', + "\xEE" => 'î', + "\xEF" => 'ï', + "\xF0" => 'ğ', + "\xF1" => 'ñ', + "\xF2" => 'ò', + "\xF3" => 'ó', + "\xF4" => 'ô', + "\xF5" => 'õ', + "\xF6" => 'ö', + "\xF7" => '÷', + "\xF8" => 'ø', + "\xF9" => 'ù', + "\xFA" => 'ú', + "\xFB" => 'û', + "\xFC" => 'ü', + "\xFD" => 'ı', + "\xFE" => 'ş', + "\xFF" => 'ÿ' ); $string = str_replace(array_keys($cp1254), array_values($cp1254), $string); @@ -174,4 +174,4 @@ function charset_decode_cp1254 ($string) { return $string; } -?> +?> \ No newline at end of file diff --git a/functions/decode/cp1255.php b/functions/decode/cp1255.php index 1d443fe2..f6c1c05f 100644 --- a/functions/decode/cp1255.php +++ b/functions/decode/cp1255.php @@ -7,7 +7,7 @@ * * This file contains cp1255 decoding function that is needed to read * cp1255 encoded mails in non-cp1255 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1255.TXT * @@ -39,134 +39,134 @@ function charset_decode_cp1255 ($string) { return $string; $cp1255 = array( - "\x80" => '€', - "\x81" => '�', - "\x82" => '‚', - "\x83" => 'ƒ', - "\x84" => '„', - "\x85" => '…', - "\x86" => '†', - "\x87" => '‡', - "\x88" => 'ˆ', - "\x89" => '‰', - "\x8A" => '�', - "\x8B" => '‹', - "\x8C" => '�', - "\x8D" => '�', - "\x8E" => '�', - "\x8F" => '�', - "\x90" => '�', - "\x91" => '‘', - "\x92" => '’', - "\x93" => '“', - "\x94" => '”', - "\x95" => '•', - "\x96" => '–', - "\x97" => '—', - "\x98" => '˜', - "\x99" => '™', - "\x9A" => '�', - "\x9B" => '›', - "\x9C" => '�', - "\x9D" => '�', - "\x9E" => '�', - "\x9F" => '�', - "\xA0" => ' ', - "\xA1" => '¡', - "\xA2" => '¢', - "\xA3" => '£', - "\xA4" => '₪', - "\xA5" => '¥', - "\xA6" => '¦', - "\xA7" => '§', - "\xA8" => '¨', - "\xA9" => '©', - "\xAA" => '×', - "\xAB" => '«', - "\xAC" => '¬', - "\xAD" => '­', - "\xAE" => '®', - "\xAF" => '¯', - "\xB0" => '°', - "\xB1" => '±', - "\xB2" => '²', - "\xB3" => '³', - "\xB4" => '´', - "\xB5" => 'µ', - "\xB6" => '¶', - "\xB7" => '·', - "\xB8" => '¸', - "\xB9" => '¹', - "\xBA" => '÷', - "\xBB" => '»', - "\xBC" => '¼', - "\xBD" => '½', - "\xBE" => '¾', - "\xBF" => '¿', - "\xC0" => 'ְ', - "\xC1" => 'ֱ', - "\xC2" => 'ֲ', - "\xC3" => 'ֳ', - "\xC4" => 'ִ', - "\xC5" => 'ֵ', - "\xC6" => 'ֶ', - "\xC7" => 'ַ', - "\xC8" => 'ָ', - "\xC9" => 'ֹ', - "\xCA" => '�', - "\xCB" => 'ֻ', - "\xCC" => 'ּ', - "\xCD" => 'ֽ', - "\xCE" => '־', - "\xCF" => 'ֿ', - "\xD0" => '׀', - "\xD1" => 'ׁ', - "\xD2" => 'ׂ', - "\xD3" => '׃', - "\xD4" => 'װ', - "\xD5" => 'ױ', - "\xD6" => 'ײ', - "\xD7" => '׳', - "\xD8" => '״', - "\xD9" => '�', - "\xDA" => '�', - "\xDB" => '�', - "\xDC" => '�', - "\xDD" => '�', - "\xDE" => '�', - "\xDF" => '�', - "\xE0" => 'א', - "\xE1" => 'ב', - "\xE2" => 'ג', - "\xE3" => 'ד', - "\xE4" => 'ה', - "\xE5" => 'ו', - "\xE6" => 'ז', - "\xE7" => 'ח', - "\xE8" => 'ט', - "\xE9" => 'י', - "\xEA" => 'ך', - "\xEB" => 'כ', - "\xEC" => 'ל', - "\xED" => 'ם', - "\xEE" => 'מ', - "\xEF" => 'ן', - "\xF0" => 'נ', - "\xF1" => 'ס', - "\xF2" => 'ע', - "\xF3" => 'ף', - "\xF4" => 'פ', - "\xF5" => 'ץ', - "\xF6" => 'צ', - "\xF7" => 'ק', - "\xF8" => 'ר', - "\xF9" => 'ש', - "\xFA" => 'ת', - "\xFB" => '�', - "\xFC" => '�', - "\xFD" => '‎', - "\xFE" => '‏', - "\xFF" => '�' + "\x80" => '€', + "\x81" => '�', + "\x82" => '‚', + "\x83" => 'ƒ', + "\x84" => '„', + "\x85" => '…', + "\x86" => '†', + "\x87" => '‡', + "\x88" => 'ˆ', + "\x89" => '‰', + "\x8A" => '�', + "\x8B" => '‹', + "\x8C" => '�', + "\x8D" => '�', + "\x8E" => '�', + "\x8F" => '�', + "\x90" => '�', + "\x91" => '‘', + "\x92" => '’', + "\x93" => '“', + "\x94" => '”', + "\x95" => '•', + "\x96" => '–', + "\x97" => '—', + "\x98" => '˜', + "\x99" => '™', + "\x9A" => '�', + "\x9B" => '›', + "\x9C" => '�', + "\x9D" => '�', + "\x9E" => '�', + "\x9F" => '�', + "\xA0" => ' ', + "\xA1" => '¡', + "\xA2" => '¢', + "\xA3" => '£', + "\xA4" => '₪', + "\xA5" => '¥', + "\xA6" => '¦', + "\xA7" => '§', + "\xA8" => '¨', + "\xA9" => '©', + "\xAA" => '×', + "\xAB" => '«', + "\xAC" => '¬', + "\xAD" => '­', + "\xAE" => '®', + "\xAF" => '¯', + "\xB0" => '°', + "\xB1" => '±', + "\xB2" => '²', + "\xB3" => '³', + "\xB4" => '´', + "\xB5" => 'µ', + "\xB6" => '¶', + "\xB7" => '·', + "\xB8" => '¸', + "\xB9" => '¹', + "\xBA" => '÷', + "\xBB" => '»', + "\xBC" => '¼', + "\xBD" => '½', + "\xBE" => '¾', + "\xBF" => '¿', + "\xC0" => 'ְ', + "\xC1" => 'ֱ', + "\xC2" => 'ֲ', + "\xC3" => 'ֳ', + "\xC4" => 'ִ', + "\xC5" => 'ֵ', + "\xC6" => 'ֶ', + "\xC7" => 'ַ', + "\xC8" => 'ָ', + "\xC9" => 'ֹ', + "\xCA" => '�', + "\xCB" => 'ֻ', + "\xCC" => 'ּ', + "\xCD" => 'ֽ', + "\xCE" => '־', + "\xCF" => 'ֿ', + "\xD0" => '׀', + "\xD1" => 'ׁ', + "\xD2" => 'ׂ', + "\xD3" => '׃', + "\xD4" => 'װ', + "\xD5" => 'ױ', + "\xD6" => 'ײ', + "\xD7" => '׳', + "\xD8" => '״', + "\xD9" => '�', + "\xDA" => '�', + "\xDB" => '�', + "\xDC" => '�', + "\xDD" => '�', + "\xDE" => '�', + "\xDF" => '�', + "\xE0" => 'א', + "\xE1" => 'ב', + "\xE2" => 'ג', + "\xE3" => 'ד', + "\xE4" => 'ה', + "\xE5" => 'ו', + "\xE6" => 'ז', + "\xE7" => 'ח', + "\xE8" => 'ט', + "\xE9" => 'י', + "\xEA" => 'ך', + "\xEB" => 'כ', + "\xEC" => 'ל', + "\xED" => 'ם', + "\xEE" => 'מ', + "\xEF" => 'ן', + "\xF0" => 'נ', + "\xF1" => 'ס', + "\xF2" => 'ע', + "\xF3" => 'ף', + "\xF4" => 'פ', + "\xF5" => 'ץ', + "\xF6" => 'צ', + "\xF7" => 'ק', + "\xF8" => 'ר', + "\xF9" => 'ש', + "\xFA" => 'ת', + "\xFB" => '�', + "\xFC" => '�', + "\xFD" => '‎', + "\xFE" => '‏', + "\xFF" => '�' ); $string = str_replace(array_keys($cp1255), array_values($cp1255), $string); @@ -174,4 +174,4 @@ function charset_decode_cp1255 ($string) { return $string; } -?> +?> \ No newline at end of file diff --git a/functions/decode/cp1256.php b/functions/decode/cp1256.php index 832a2556..3608263a 100644 --- a/functions/decode/cp1256.php +++ b/functions/decode/cp1256.php @@ -7,7 +7,7 @@ * * This file contains cp1256 decoding function that is needed to read * cp1256 encoded mails in non-cp1256 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1256.TXT * @@ -39,134 +39,134 @@ function charset_decode_cp1256 ($string) { return $string; $cp1256 = array( - "\x80" => '€', - "\x81" => 'پ', - "\x82" => '‚', - "\x83" => 'ƒ', - "\x84" => '„', - "\x85" => '…', - "\x86" => '†', - "\x87" => '‡', - "\x88" => 'ˆ', - "\x89" => '‰', - "\x8A" => 'ٹ', - "\x8B" => '‹', - "\x8C" => 'Œ', - "\x8D" => 'چ', - "\x8E" => 'ژ', - "\x8F" => 'ڈ', - "\x90" => 'گ', - "\x91" => '‘', - "\x92" => '’', - "\x93" => '“', - "\x94" => '”', - "\x95" => '•', - "\x96" => '–', - "\x97" => '—', - "\x98" => 'ک', - "\x99" => '™', - "\x9A" => 'ڑ', - "\x9B" => '›', - "\x9C" => 'œ', - "\x9D" => '‌', - "\x9E" => '‍', - "\x9F" => 'ں', - "\xA0" => ' ', - "\xA1" => '،', - "\xA2" => '¢', - "\xA3" => '£', - "\xA4" => '¤', - "\xA5" => '¥', - "\xA6" => '¦', - "\xA7" => '§', - "\xA8" => '¨', - "\xA9" => '©', - "\xAA" => 'ھ', - "\xAB" => '«', - "\xAC" => '¬', - "\xAD" => '­', - "\xAE" => '®', - "\xAF" => '¯', - "\xB0" => '°', - "\xB1" => '±', - "\xB2" => '²', - "\xB3" => '³', - "\xB4" => '´', - "\xB5" => 'µ', - "\xB6" => '¶', - "\xB7" => '·', - "\xB8" => '¸', - "\xB9" => '¹', - "\xBA" => '؛', - "\xBB" => '»', - "\xBC" => '¼', - "\xBD" => '½', - "\xBE" => '¾', - "\xBF" => '؟', - "\xC0" => 'ہ', - "\xC1" => 'ء', - "\xC2" => 'آ', - "\xC3" => 'أ', - "\xC4" => 'ؤ', - "\xC5" => 'إ', - "\xC6" => 'ئ', - "\xC7" => 'ا', - "\xC8" => 'ب', - "\xC9" => 'ة', - "\xCA" => 'ت', - "\xCB" => 'ث', - "\xCC" => 'ج', - "\xCD" => 'ح', - "\xCE" => 'خ', - "\xCF" => 'د', - "\xD0" => 'ذ', - "\xD1" => 'ر', - "\xD2" => 'ز', - "\xD3" => 'س', - "\xD4" => 'ش', - "\xD5" => 'ص', - "\xD6" => 'ض', - "\xD7" => '×', - "\xD8" => 'ط', - "\xD9" => 'ظ', - "\xDA" => 'ع', - "\xDB" => 'غ', - "\xDC" => 'ـ', - "\xDD" => 'ف', - "\xDE" => 'ق', - "\xDF" => 'ك', - "\xE0" => 'à', - "\xE1" => 'ل', - "\xE2" => 'â', - "\xE3" => 'م', - "\xE4" => 'ن', - "\xE5" => 'ه', - "\xE6" => 'و', - "\xE7" => 'ç', - "\xE8" => 'è', - "\xE9" => 'é', - "\xEA" => 'ê', - "\xEB" => 'ë', - "\xEC" => 'ى', - "\xED" => 'ي', - "\xEE" => 'î', - "\xEF" => 'ï', - "\xF0" => 'ً', - "\xF1" => 'ٌ', - "\xF2" => 'ٍ', - "\xF3" => 'َ', - "\xF4" => 'ô', - "\xF5" => 'ُ', - "\xF6" => 'ِ', - "\xF7" => '÷', - "\xF8" => 'ّ', - "\xF9" => 'ù', - "\xFA" => 'ْ', - "\xFB" => 'û', - "\xFC" => 'ü', - "\xFD" => '‎', - "\xFE" => '‏', - "\xFF" => 'ے' + "\x80" => '€', + "\x81" => 'پ', + "\x82" => '‚', + "\x83" => 'ƒ', + "\x84" => '„', + "\x85" => '…', + "\x86" => '†', + "\x87" => '‡', + "\x88" => 'ˆ', + "\x89" => '‰', + "\x8A" => 'ٹ', + "\x8B" => '‹', + "\x8C" => 'Œ', + "\x8D" => 'چ', + "\x8E" => 'ژ', + "\x8F" => 'ڈ', + "\x90" => 'گ', + "\x91" => '‘', + "\x92" => '’', + "\x93" => '“', + "\x94" => '”', + "\x95" => '•', + "\x96" => '–', + "\x97" => '—', + "\x98" => 'ک', + "\x99" => '™', + "\x9A" => 'ڑ', + "\x9B" => '›', + "\x9C" => 'œ', + "\x9D" => '‌', + "\x9E" => '‍', + "\x9F" => 'ں', + "\xA0" => ' ', + "\xA1" => '،', + "\xA2" => '¢', + "\xA3" => '£', + "\xA4" => '¤', + "\xA5" => '¥', + "\xA6" => '¦', + "\xA7" => '§', + "\xA8" => '¨', + "\xA9" => '©', + "\xAA" => 'ھ', + "\xAB" => '«', + "\xAC" => '¬', + "\xAD" => '­', + "\xAE" => '®', + "\xAF" => '¯', + "\xB0" => '°', + "\xB1" => '±', + "\xB2" => '²', + "\xB3" => '³', + "\xB4" => '´', + "\xB5" => 'µ', + "\xB6" => '¶', + "\xB7" => '·', + "\xB8" => '¸', + "\xB9" => '¹', + "\xBA" => '؛', + "\xBB" => '»', + "\xBC" => '¼', + "\xBD" => '½', + "\xBE" => '¾', + "\xBF" => '؟', + "\xC0" => 'ہ', + "\xC1" => 'ء', + "\xC2" => 'آ', + "\xC3" => 'أ', + "\xC4" => 'ؤ', + "\xC5" => 'إ', + "\xC6" => 'ئ', + "\xC7" => 'ا', + "\xC8" => 'ب', + "\xC9" => 'ة', + "\xCA" => 'ت', + "\xCB" => 'ث', + "\xCC" => 'ج', + "\xCD" => 'ح', + "\xCE" => 'خ', + "\xCF" => 'د', + "\xD0" => 'ذ', + "\xD1" => 'ر', + "\xD2" => 'ز', + "\xD3" => 'س', + "\xD4" => 'ش', + "\xD5" => 'ص', + "\xD6" => 'ض', + "\xD7" => '×', + "\xD8" => 'ط', + "\xD9" => 'ظ', + "\xDA" => 'ع', + "\xDB" => 'غ', + "\xDC" => 'ـ', + "\xDD" => 'ف', + "\xDE" => 'ق', + "\xDF" => 'ك', + "\xE0" => 'à', + "\xE1" => 'ل', + "\xE2" => 'â', + "\xE3" => 'م', + "\xE4" => 'ن', + "\xE5" => 'ه', + "\xE6" => 'و', + "\xE7" => 'ç', + "\xE8" => 'è', + "\xE9" => 'é', + "\xEA" => 'ê', + "\xEB" => 'ë', + "\xEC" => 'ى', + "\xED" => 'ي', + "\xEE" => 'î', + "\xEF" => 'ï', + "\xF0" => 'ً', + "\xF1" => 'ٌ', + "\xF2" => 'ٍ', + "\xF3" => 'َ', + "\xF4" => 'ô', + "\xF5" => 'ُ', + "\xF6" => 'ِ', + "\xF7" => '÷', + "\xF8" => 'ّ', + "\xF9" => 'ù', + "\xFA" => 'ْ', + "\xFB" => 'û', + "\xFC" => 'ü', + "\xFD" => '‎', + "\xFE" => '‏', + "\xFF" => 'ے' ); $string = str_replace(array_keys($cp1256), array_values($cp1256), $string); @@ -174,4 +174,4 @@ function charset_decode_cp1256 ($string) { return $string; } -?> +?> \ No newline at end of file diff --git a/functions/decode/cp1257.php b/functions/decode/cp1257.php index 0b50e4c0..12fc82f6 100644 --- a/functions/decode/cp1257.php +++ b/functions/decode/cp1257.php @@ -7,7 +7,7 @@ * * This file contains cp1257 decoding function that is needed to read * cp1257 encoded mails in non-cp1257 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1257.TXT * @@ -39,122 +39,122 @@ function charset_decode_cp1257 ($string) { return $string; $cp1257 = array( - "\x80" => '€', - "\x82" => '‚', - "\x84" => '„', - "\x85" => '…', - "\x86" => '†', - "\x87" => '‡', - "\x89" => '‰', - "\x8B" => '‹', - "\x8D" => '¨', - "\x8E" => 'ˇ', - "\x8F" => '¸', - "\x91" => '‘', - "\x92" => '’', - "\x93" => '“', - "\x94" => '”', - "\x95" => '•', - "\x96" => '–', - "\x97" => '—', - "\x99" => '™', - "\x9B" => '›', - "\x9D" => '¯', - "\x9E" => '˛', - "\xA0" => ' ', - "\xA2" => '¢', - "\xA3" => '£', - "\xA4" => '¤', - "\xA6" => '¦', - "\xA7" => '§', - "\xA8" => 'Ø', - "\xA9" => '©', - "\xAA" => 'Ŗ', - "\xAB" => '«', - "\xAC" => '¬', - "\xAD" => '­', - "\xAE" => '®', - "\xAF" => 'Æ', - "\xB0" => '°', - "\xB1" => '±', - "\xB2" => '²', - "\xB3" => '³', - "\xB4" => '´', - "\xB5" => 'µ', - "\xB6" => '¶', - "\xB7" => '·', - "\xB8" => 'ø', - "\xB9" => '¹', - "\xBA" => 'ŗ', - "\xBB" => '»', - "\xBC" => '¼', - "\xBD" => '½', - "\xBE" => '¾', - "\xBF" => 'æ', - "\xC0" => 'Ą', - "\xC1" => 'Į', - "\xC2" => 'Ā', - "\xC3" => 'Ć', - "\xC4" => 'Ä', - "\xC5" => 'Å', - "\xC6" => 'Ę', - "\xC7" => 'Ē', - "\xC8" => 'Č', - "\xC9" => 'É', - "\xCA" => 'Ź', - "\xCB" => 'Ė', - "\xCC" => 'Ģ', - "\xCD" => 'Ķ', - "\xCE" => 'Ī', - "\xCF" => 'Ļ', - "\xD0" => 'Š', - "\xD1" => 'Ń', - "\xD2" => 'Ņ', - "\xD3" => 'Ó', - "\xD4" => 'Ō', - "\xD5" => 'Õ', - "\xD6" => 'Ö', - "\xD7" => '×', - "\xD8" => 'Ų', - "\xD9" => 'Ł', - "\xDA" => 'Ś', - "\xDB" => 'Ū', - "\xDC" => 'Ü', - "\xDD" => 'Ż', - "\xDE" => 'Ž', - "\xDF" => 'ß', - "\xE0" => 'ą', - "\xE1" => 'į', - "\xE2" => 'ā', - "\xE3" => 'ć', - "\xE4" => 'ä', - "\xE5" => 'å', - "\xE6" => 'ę', - "\xE7" => 'ē', - "\xE8" => 'č', - "\xE9" => 'é', - "\xEA" => 'ź', - "\xEB" => 'ė', - "\xEC" => 'ģ', - "\xED" => 'ķ', - "\xEE" => 'ī', - "\xEF" => 'ļ', - "\xF0" => 'š', - "\xF1" => 'ń', - "\xF2" => 'ņ', - "\xF3" => 'ó', - "\xF4" => 'ō', - "\xF5" => 'õ', - "\xF6" => 'ö', - "\xF7" => '÷', - "\xF8" => 'ų', - "\xF9" => 'ł', - "\xFA" => 'ś', - "\xFB" => 'ū', - "\xFC" => 'ü', - "\xFD" => 'ż', - "\xFE" => 'ž', - "\xFF" => '˙' + "\x80" => '€', + "\x82" => '‚', + "\x84" => '„', + "\x85" => '…', + "\x86" => '†', + "\x87" => '‡', + "\x89" => '‰', + "\x8B" => '‹', + "\x8D" => '¨', + "\x8E" => 'ˇ', + "\x8F" => '¸', + "\x91" => '‘', + "\x92" => '’', + "\x93" => '“', + "\x94" => '”', + "\x95" => '•', + "\x96" => '–', + "\x97" => '—', + "\x99" => '™', + "\x9B" => '›', + "\x9D" => '¯', + "\x9E" => '˛', + "\xA0" => ' ', + "\xA2" => '¢', + "\xA3" => '£', + "\xA4" => '¤', + "\xA6" => '¦', + "\xA7" => '§', + "\xA8" => 'Ø', + "\xA9" => '©', + "\xAA" => 'Ŗ', + "\xAB" => '«', + "\xAC" => '¬', + "\xAD" => '­', + "\xAE" => '®', + "\xAF" => 'Æ', + "\xB0" => '°', + "\xB1" => '±', + "\xB2" => '²', + "\xB3" => '³', + "\xB4" => '´', + "\xB5" => 'µ', + "\xB6" => '¶', + "\xB7" => '·', + "\xB8" => 'ø', + "\xB9" => '¹', + "\xBA" => 'ŗ', + "\xBB" => '»', + "\xBC" => '¼', + "\xBD" => '½', + "\xBE" => '¾', + "\xBF" => 'æ', + "\xC0" => 'Ą', + "\xC1" => 'Į', + "\xC2" => 'Ā', + "\xC3" => 'Ć', + "\xC4" => 'Ä', + "\xC5" => 'Å', + "\xC6" => 'Ę', + "\xC7" => 'Ē', + "\xC8" => 'Č', + "\xC9" => 'É', + "\xCA" => 'Ź', + "\xCB" => 'Ė', + "\xCC" => 'Ģ', + "\xCD" => 'Ķ', + "\xCE" => 'Ī', + "\xCF" => 'Ļ', + "\xD0" => 'Š', + "\xD1" => 'Ń', + "\xD2" => 'Ņ', + "\xD3" => 'Ó', + "\xD4" => 'Ō', + "\xD5" => 'Õ', + "\xD6" => 'Ö', + "\xD7" => '×', + "\xD8" => 'Ų', + "\xD9" => 'Ł', + "\xDA" => 'Ś', + "\xDB" => 'Ū', + "\xDC" => 'Ü', + "\xDD" => 'Ż', + "\xDE" => 'Ž', + "\xDF" => 'ß', + "\xE0" => 'ą', + "\xE1" => 'į', + "\xE2" => 'ā', + "\xE3" => 'ć', + "\xE4" => 'ä', + "\xE5" => 'å', + "\xE6" => 'ę', + "\xE7" => 'ē', + "\xE8" => 'č', + "\xE9" => 'é', + "\xEA" => 'ź', + "\xEB" => 'ė', + "\xEC" => 'ģ', + "\xED" => 'ķ', + "\xEE" => 'ī', + "\xEF" => 'ļ', + "\xF0" => 'š', + "\xF1" => 'ń', + "\xF2" => 'ņ', + "\xF3" => 'ó', + "\xF4" => 'ō', + "\xF5" => 'õ', + "\xF6" => 'ö', + "\xF7" => '÷', + "\xF8" => 'ų', + "\xF9" => 'ł', + "\xFA" => 'ś', + "\xFB" => 'ū', + "\xFC" => 'ü', + "\xFD" => 'ż', + "\xFE" => 'ž', + "\xFF" => '˙' ); $string = str_replace(array_keys($cp1257), array_values($cp1257), $string); @@ -162,4 +162,4 @@ function charset_decode_cp1257 ($string) { return $string; } -?> +?> \ No newline at end of file diff --git a/functions/decode/cp1258.php b/functions/decode/cp1258.php index 4f336e95..c9b42bd3 100644 --- a/functions/decode/cp1258.php +++ b/functions/decode/cp1258.php @@ -7,7 +7,7 @@ * * This file contains cp1258 decoding function that is needed to read * cp1258 encoded mails in non-cp1258 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1258.TXT * @@ -39,134 +39,134 @@ function charset_decode_cp1258 ($string) { return $string; $cp1258 = array( - "\x80" => '€', - "\x81" => '�', - "\x82" => '‚', - "\x83" => 'ƒ', - "\x84" => '„', - "\x85" => '…', - "\x86" => '†', - "\x87" => '‡', - "\x88" => 'ˆ', - "\x89" => '‰', - "\x8A" => '�', - "\x8B" => '‹', - "\x8C" => 'Œ', - "\x8D" => '�', - "\x8E" => '�', - "\x8F" => '�', - "\x90" => '�', - "\x91" => '‘', - "\x92" => '’', - "\x93" => '“', - "\x94" => '”', - "\x95" => '•', - "\x96" => '–', - "\x97" => '—', - "\x98" => '˜', - "\x99" => '™', - "\x9A" => '�', - "\x9B" => '›', - "\x9C" => 'œ', - "\x9D" => '�', - "\x9E" => '�', - "\x9F" => 'Ÿ', - "\xA0" => ' ', - "\xA1" => '¡', - "\xA2" => '¢', - "\xA3" => '£', - "\xA4" => '¤', - "\xA5" => '¥', - "\xA6" => '¦', - "\xA7" => '§', - "\xA8" => '¨', - "\xA9" => '©', - "\xAA" => 'ª', - "\xAB" => '«', - "\xAC" => '¬', - "\xAD" => '­', - "\xAE" => '®', - "\xAF" => '¯', - "\xB0" => '°', - "\xB1" => '±', - "\xB2" => '²', - "\xB3" => '³', - "\xB4" => '´', - "\xB5" => 'µ', - "\xB6" => '¶', - "\xB7" => '·', - "\xB8" => '¸', - "\xB9" => '¹', - "\xBA" => 'º', - "\xBB" => '»', - "\xBC" => '¼', - "\xBD" => '½', - "\xBE" => '¾', - "\xBF" => '¿', - "\xC0" => 'À', - "\xC1" => 'Á', - "\xC2" => 'Â', - "\xC3" => 'Ă', - "\xC4" => 'Ä', - "\xC5" => 'Å', - "\xC6" => 'Æ', - "\xC7" => 'Ç', - "\xC8" => 'È', - "\xC9" => 'É', - "\xCA" => 'Ê', - "\xCB" => 'Ë', - "\xCC" => '̀', - "\xCD" => 'Í', - "\xCE" => 'Î', - "\xCF" => 'Ï', - "\xD0" => 'Đ', - "\xD1" => 'Ñ', - "\xD2" => '̉', - "\xD3" => 'Ó', - "\xD4" => 'Ô', - "\xD5" => 'Ơ', - "\xD6" => 'Ö', - "\xD7" => '×', - "\xD8" => 'Ø', - "\xD9" => 'Ù', - "\xDA" => 'Ú', - "\xDB" => 'Û', - "\xDC" => 'Ü', - "\xDD" => 'Ư', - "\xDE" => '̃', - "\xDF" => 'ß', - "\xE0" => 'à', - "\xE1" => 'á', - "\xE2" => 'â', - "\xE3" => 'ă', - "\xE4" => 'ä', - "\xE5" => 'å', - "\xE6" => 'æ', - "\xE7" => 'ç', - "\xE8" => 'è', - "\xE9" => 'é', - "\xEA" => 'ê', - "\xEB" => 'ë', - "\xEC" => '́', - "\xED" => 'í', - "\xEE" => 'î', - "\xEF" => 'ï', - "\xF0" => 'đ', - "\xF1" => 'ñ', - "\xF2" => '̣', - "\xF3" => 'ó', - "\xF4" => 'ô', - "\xF5" => 'ơ', - "\xF6" => 'ö', - "\xF7" => '÷', - "\xF8" => 'ø', - "\xF9" => 'ù', - "\xFA" => 'ú', - "\xFB" => 'û', - "\xFC" => 'ü', - "\xFD" => 'ư', - "\xFE" => '₫', - "\xFF" => 'ÿ' + "\x80" => '€', + "\x81" => '�', + "\x82" => '‚', + "\x83" => 'ƒ', + "\x84" => '„', + "\x85" => '…', + "\x86" => '†', + "\x87" => '‡', + "\x88" => 'ˆ', + "\x89" => '‰', + "\x8A" => '�', + "\x8B" => '‹', + "\x8C" => 'Œ', + "\x8D" => '�', + "\x8E" => '�', + "\x8F" => '�', + "\x90" => '�', + "\x91" => '‘', + "\x92" => '’', + "\x93" => '“', + "\x94" => '”', + "\x95" => '•', + "\x96" => '–', + "\x97" => '—', + "\x98" => '˜', + "\x99" => '™', + "\x9A" => '�', + "\x9B" => '›', + "\x9C" => 'œ', + "\x9D" => '�', + "\x9E" => '�', + "\x9F" => 'Ÿ', + "\xA0" => ' ', + "\xA1" => '¡', + "\xA2" => '¢', + "\xA3" => '£', + "\xA4" => '¤', + "\xA5" => '¥', + "\xA6" => '¦', + "\xA7" => '§', + "\xA8" => '¨', + "\xA9" => '©', + "\xAA" => 'ª', + "\xAB" => '«', + "\xAC" => '¬', + "\xAD" => '­', + "\xAE" => '®', + "\xAF" => '¯', + "\xB0" => '°', + "\xB1" => '±', + "\xB2" => '²', + "\xB3" => '³', + "\xB4" => '´', + "\xB5" => 'µ', + "\xB6" => '¶', + "\xB7" => '·', + "\xB8" => '¸', + "\xB9" => '¹', + "\xBA" => 'º', + "\xBB" => '»', + "\xBC" => '¼', + "\xBD" => '½', + "\xBE" => '¾', + "\xBF" => '¿', + "\xC0" => 'À', + "\xC1" => 'Á', + "\xC2" => 'Â', + "\xC3" => 'Ă', + "\xC4" => 'Ä', + "\xC5" => 'Å', + "\xC6" => 'Æ', + "\xC7" => 'Ç', + "\xC8" => 'È', + "\xC9" => 'É', + "\xCA" => 'Ê', + "\xCB" => 'Ë', + "\xCC" => '̀', + "\xCD" => 'Í', + "\xCE" => 'Î', + "\xCF" => 'Ï', + "\xD0" => 'Đ', + "\xD1" => 'Ñ', + "\xD2" => '̉', + "\xD3" => 'Ó', + "\xD4" => 'Ô', + "\xD5" => 'Ơ', + "\xD6" => 'Ö', + "\xD7" => '×', + "\xD8" => 'Ø', + "\xD9" => 'Ù', + "\xDA" => 'Ú', + "\xDB" => 'Û', + "\xDC" => 'Ü', + "\xDD" => 'Ư', + "\xDE" => '̃', + "\xDF" => 'ß', + "\xE0" => 'à', + "\xE1" => 'á', + "\xE2" => 'â', + "\xE3" => 'ă', + "\xE4" => 'ä', + "\xE5" => 'å', + "\xE6" => 'æ', + "\xE7" => 'ç', + "\xE8" => 'è', + "\xE9" => 'é', + "\xEA" => 'ê', + "\xEB" => 'ë', + "\xEC" => '́', + "\xED" => 'í', + "\xEE" => 'î', + "\xEF" => 'ï', + "\xF0" => 'đ', + "\xF1" => 'ñ', + "\xF2" => '̣', + "\xF3" => 'ó', + "\xF4" => 'ô', + "\xF5" => 'ơ', + "\xF6" => 'ö', + "\xF7" => '÷', + "\xF8" => 'ø', + "\xF9" => 'ù', + "\xFA" => 'ú', + "\xFB" => 'û', + "\xFC" => 'ü', + "\xFD" => 'ư', + "\xFE" => '₫', + "\xFF" => 'ÿ' ); $string = str_replace(array_keys($cp1258), array_values($cp1258), $string); @@ -174,4 +174,4 @@ function charset_decode_cp1258 ($string) { return $string; } -?> +?> \ No newline at end of file diff --git a/functions/decode/cp855.php b/functions/decode/cp855.php index 160f9471..bfcd2b2b 100644 --- a/functions/decode/cp855.php +++ b/functions/decode/cp855.php @@ -7,7 +7,7 @@ * * This file contains cp855 decoding function that is needed to read * cp855 encoded mails in non-cp855 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/PC/CP855.TXT * Name: cp855_DOSCyrillic to Unicode table @@ -17,7 +17,7 @@ * Date: 04/24/96 * Authors: Lori Brownell * K.D. Chang - * + * * @version $Id$ * @package squirrelmail * @subpackage decode @@ -39,134 +39,134 @@ function charset_decode_cp855 ($string) { return $string; $cp855 = array( - "\x80" => 'ђ', - "\x81" => 'Ђ', - "\x82" => 'ѓ', - "\x83" => 'Ѓ', - "\x84" => 'ё', - "\x85" => 'Ё', - "\x86" => 'є', - "\x87" => 'Є', - "\x88" => 'ѕ', - "\x89" => 'Ѕ', - "\x8a" => 'і', - "\x8b" => 'І', - "\x8c" => 'ї', - "\x8d" => 'Ї', - "\x8e" => 'ј', - "\x8f" => 'Ј', - "\x90" => 'љ', - "\x91" => 'Љ', - "\x92" => 'њ', - "\x93" => 'Њ', - "\x94" => 'ћ', - "\x95" => 'Ћ', - "\x96" => 'ќ', - "\x97" => 'Ќ', - "\x98" => 'ў', - "\x99" => 'Ў', - "\x9a" => 'џ', - "\x9b" => 'Џ', - "\x9c" => 'ю', - "\x9d" => 'Ю', - "\x9e" => 'ъ', - "\x9f" => 'Ъ', - "\xa0" => 'а', - "\xa1" => 'А', - "\xa2" => 'б', - "\xa3" => 'Б', - "\xa4" => 'ц', - "\xa5" => 'Ц', - "\xa6" => 'д', - "\xa7" => 'Д', - "\xa8" => 'е', - "\xa9" => 'Е', - "\xaa" => 'ф', - "\xab" => 'Ф', - "\xac" => 'г', - "\xad" => 'Г', - "\xae" => '«', - "\xaf" => '»', - "\xb0" => '░', - "\xb1" => '▒', - "\xb2" => '▓', - "\xb3" => '│', - "\xb4" => '┤', - "\xb5" => 'х', - "\xb6" => 'Х', - "\xb7" => 'и', - "\xb8" => 'И', - "\xb9" => '╣', - "\xba" => '║', - "\xbb" => '╗', - "\xbc" => '╝', - "\xbd" => 'й', - "\xbe" => 'Й', - "\xbf" => '┐', - "\xc0" => '└', - "\xc1" => '┴', - "\xc2" => '┬', - "\xc3" => '├', - "\xc4" => '─', - "\xc5" => '┼', - "\xc6" => 'к', - "\xc7" => 'К', - "\xc8" => '╚', - "\xc9" => '╔', - "\xca" => '╩', - "\xcb" => '╦', - "\xcc" => '╠', - "\xcd" => '═', - "\xce" => '╬', - "\xcf" => '¤', - "\xd0" => 'л', - "\xd1" => 'Л', - "\xd2" => 'м', - "\xd3" => 'М', - "\xd4" => 'н', - "\xd5" => 'Н', - "\xd6" => 'о', - "\xd7" => 'О', - "\xd8" => 'п', - "\xd9" => '┘', - "\xda" => '┌', - "\xdb" => '█', - "\xdc" => '▄', - "\xdd" => 'П', - "\xde" => 'я', - "\xdf" => '▀', - "\xe0" => 'Я', - "\xe1" => 'р', - "\xe2" => 'Р', - "\xe3" => 'с', - "\xe4" => 'С', - "\xe5" => 'т', - "\xe6" => 'Т', - "\xe7" => 'у', - "\xe8" => 'У', - "\xe9" => 'ж', - "\xea" => 'Ж', - "\xeb" => 'в', - "\xec" => 'В', - "\xed" => 'ь', - "\xee" => 'Ь', - "\xef" => '№', - "\xf0" => '­', - "\xf1" => 'ы', - "\xf2" => 'Ы', - "\xf3" => 'з', - "\xf4" => 'З', - "\xf5" => 'ш', - "\xf6" => 'Ш', - "\xf7" => 'э', - "\xf8" => 'Э', - "\xf9" => 'щ', - "\xfa" => 'Щ', - "\xfb" => 'ч', - "\xfc" => 'Ч', - "\xfd" => '§', - "\xfe" => '■', - "\xff" => ' ' + "\x80" => 'ђ', + "\x81" => 'Ђ', + "\x82" => 'ѓ', + "\x83" => 'Ѓ', + "\x84" => 'ё', + "\x85" => 'Ё', + "\x86" => 'є', + "\x87" => 'Є', + "\x88" => 'ѕ', + "\x89" => 'Ѕ', + "\x8a" => 'і', + "\x8b" => 'І', + "\x8c" => 'ї', + "\x8d" => 'Ї', + "\x8e" => 'ј', + "\x8f" => 'Ј', + "\x90" => 'љ', + "\x91" => 'Љ', + "\x92" => 'њ', + "\x93" => 'Њ', + "\x94" => 'ћ', + "\x95" => 'Ћ', + "\x96" => 'ќ', + "\x97" => 'Ќ', + "\x98" => 'ў', + "\x99" => 'Ў', + "\x9a" => 'џ', + "\x9b" => 'Џ', + "\x9c" => 'ю', + "\x9d" => 'Ю', + "\x9e" => 'ъ', + "\x9f" => 'Ъ', + "\xa0" => 'а', + "\xa1" => 'А', + "\xa2" => 'б', + "\xa3" => 'Б', + "\xa4" => 'ц', + "\xa5" => 'Ц', + "\xa6" => 'д', + "\xa7" => 'Д', + "\xa8" => 'е', + "\xa9" => 'Е', + "\xaa" => 'ф', + "\xab" => 'Ф', + "\xac" => 'г', + "\xad" => 'Г', + "\xae" => '«', + "\xaf" => '»', + "\xb0" => '░', + "\xb1" => '▒', + "\xb2" => '▓', + "\xb3" => '│', + "\xb4" => '┤', + "\xb5" => 'х', + "\xb6" => 'Х', + "\xb7" => 'и', + "\xb8" => 'И', + "\xb9" => '╣', + "\xba" => '║', + "\xbb" => '╗', + "\xbc" => '╝', + "\xbd" => 'й', + "\xbe" => 'Й', + "\xbf" => '┐', + "\xc0" => '└', + "\xc1" => '┴', + "\xc2" => '┬', + "\xc3" => '├', + "\xc4" => '─', + "\xc5" => '┼', + "\xc6" => 'к', + "\xc7" => 'К', + "\xc8" => '╚', + "\xc9" => '╔', + "\xca" => '╩', + "\xcb" => '╦', + "\xcc" => '╠', + "\xcd" => '═', + "\xce" => '╬', + "\xcf" => '¤', + "\xd0" => 'л', + "\xd1" => 'Л', + "\xd2" => 'м', + "\xd3" => 'М', + "\xd4" => 'н', + "\xd5" => 'Н', + "\xd6" => 'о', + "\xd7" => 'О', + "\xd8" => 'п', + "\xd9" => '┘', + "\xda" => '┌', + "\xdb" => '█', + "\xdc" => '▄', + "\xdd" => 'П', + "\xde" => 'я', + "\xdf" => '▀', + "\xe0" => 'Я', + "\xe1" => 'р', + "\xe2" => 'Р', + "\xe3" => 'с', + "\xe4" => 'С', + "\xe5" => 'т', + "\xe6" => 'Т', + "\xe7" => 'у', + "\xe8" => 'У', + "\xe9" => 'ж', + "\xea" => 'Ж', + "\xeb" => 'в', + "\xec" => 'В', + "\xed" => 'ь', + "\xee" => 'Ь', + "\xef" => '№', + "\xf0" => '­', + "\xf1" => 'ы', + "\xf2" => 'Ы', + "\xf3" => 'з', + "\xf4" => 'З', + "\xf5" => 'ш', + "\xf6" => 'Ш', + "\xf7" => 'э', + "\xf8" => 'Э', + "\xf9" => 'щ', + "\xfa" => 'Щ', + "\xfb" => 'ч', + "\xfc" => 'Ч', + "\xfd" => '§', + "\xfe" => '■', + "\xff" => ' ' ); $string = str_replace(array_keys($cp855), array_values($cp855), $string); @@ -174,4 +174,4 @@ function charset_decode_cp855 ($string) { return $string; } -?> +?> \ No newline at end of file diff --git a/functions/decode/cp866.php b/functions/decode/cp866.php index 20681d9d..4493333e 100644 --- a/functions/decode/cp866.php +++ b/functions/decode/cp866.php @@ -7,7 +7,7 @@ * * This file contains cp866 decoding function that is needed to read * cp866 encoded mails in non-cp866 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/ @@ -19,7 +19,7 @@ Authors: Lori Brownell K.D. Chang The entries are in cp866_DOSCyrillicRussian order - * + * * @version $Id$ * @package squirrelmail * @subpackage decode @@ -41,137 +41,137 @@ function charset_decode_cp866 ($string) { return $string; $cp866 = array( - "\x80" => 'А', - "\x81" => 'Б', - "\x82" => 'В', - "\x83" => 'Г', - "\x84" => 'Д', - "\x85" => 'Е', - "\x86" => 'Ж', - "\x87" => 'З', - "\x88" => 'И', - "\x89" => 'Й', - "\x8a" => 'К', - "\x8b" => 'Л', - "\x8c" => 'М', - "\x8d" => 'Н', - "\x8e" => 'О', - "\x8f" => 'П', - "\x90" => 'Р', - "\x91" => 'С', - "\x92" => 'Т', - "\x93" => 'У', - "\x94" => 'Ф', - "\x95" => 'Х', - "\x96" => 'Ц', - "\x97" => 'Ч', - "\x98" => 'Ш', - "\x99" => 'Щ', - "\x9a" => 'Ъ', - "\x9b" => 'Ы', - "\x9c" => 'Ь', - "\x9d" => 'Э', - "\x9e" => 'Ю', - "\x9f" => 'Я', - "\xa0" => 'а', - "\xa1" => 'б', - "\xa2" => 'в', - "\xa3" => 'г', - "\xa4" => 'д', - "\xa5" => 'е', - "\xa6" => 'ж', - "\xa7" => 'з', - "\xa8" => 'и', - "\xa9" => 'й', - "\xaa" => 'к', - "\xab" => 'л', - "\xac" => 'м', - "\xad" => 'н', - "\xae" => 'о', - "\xaf" => 'п', - "\xb0" => '░', - "\xb1" => '▒', - "\xb2" => '▓', - "\xb3" => '│', - "\xb4" => '┤', - "\xb5" => '╡', - "\xb6" => '╢', - "\xb7" => '╖', - "\xb8" => '╕', - "\xb9" => '╣', - "\xba" => '║', - "\xbb" => '╗', - "\xbc" => '╝', - "\xbd" => '╜', - "\xbe" => '╛', - "\xbf" => '┐', - "\xc0" => '└', - "\xc1" => '┴', - "\xc2" => '┬', - "\xc3" => '├', - "\xc4" => '─', - "\xc5" => '┼', - "\xc6" => '╞', - "\xc7" => '╟', - "\xc8" => '╚', - "\xc9" => '╔', - "\xca" => '╩', - "\xcb" => '╦', - "\xcc" => '╠', - "\xcd" => '═', - "\xce" => '╬', - "\xcf" => '╧', - "\xd0" => '╨', - "\xd1" => '╤', - "\xd2" => '╥', - "\xd3" => '╙', - "\xd4" => '╘', - "\xd5" => '╒', - "\xd6" => '╓', - "\xd7" => '╫', - "\xd8" => '╪', - "\xd9" => '┘', - "\xda" => '┌', - "\xdb" => '█', - "\xdc" => '▄', - "\xdd" => '▌', - "\xde" => '▐', - "\xdf" => '▀', - "\xe0" => 'р', - "\xe1" => 'с', - "\xe2" => 'т', - "\xe3" => 'у', - "\xe4" => 'ф', - "\xe5" => 'х', - "\xe6" => 'ц', - "\xe7" => 'ч', - "\xe8" => 'ш', - "\xe9" => 'щ', - "\xea" => 'ъ', - "\xeb" => 'ы', - "\xec" => 'ь', - "\xed" => 'э', - "\xee" => 'ю', - "\xef" => 'я', - "\xf0" => 'Ё', - "\xf1" => 'ё', - "\xf2" => 'Є', - "\xf3" => 'є', - "\xf4" => 'Ї', - "\xf5" => 'ї', - "\xf6" => 'Ў', - "\xf7" => 'ў', - "\xf8" => '°', - "\xf9" => '∙', - "\xfa" => '·', - "\xfb" => '√', - "\xfc" => '№', - "\xfd" => '¤', - "\xfe" => '■', - "\xff" => ' ' + "\x80" => 'А', + "\x81" => 'Б', + "\x82" => 'В', + "\x83" => 'Г', + "\x84" => 'Д', + "\x85" => 'Е', + "\x86" => 'Ж', + "\x87" => 'З', + "\x88" => 'И', + "\x89" => 'Й', + "\x8a" => 'К', + "\x8b" => 'Л', + "\x8c" => 'М', + "\x8d" => 'Н', + "\x8e" => 'О', + "\x8f" => 'П', + "\x90" => 'Р', + "\x91" => 'С', + "\x92" => 'Т', + "\x93" => 'У', + "\x94" => 'Ф', + "\x95" => 'Х', + "\x96" => 'Ц', + "\x97" => 'Ч', + "\x98" => 'Ш', + "\x99" => 'Щ', + "\x9a" => 'Ъ', + "\x9b" => 'Ы', + "\x9c" => 'Ь', + "\x9d" => 'Э', + "\x9e" => 'Ю', + "\x9f" => 'Я', + "\xa0" => 'а', + "\xa1" => 'б', + "\xa2" => 'в', + "\xa3" => 'г', + "\xa4" => 'д', + "\xa5" => 'е', + "\xa6" => 'ж', + "\xa7" => 'з', + "\xa8" => 'и', + "\xa9" => 'й', + "\xaa" => 'к', + "\xab" => 'л', + "\xac" => 'м', + "\xad" => 'н', + "\xae" => 'о', + "\xaf" => 'п', + "\xb0" => '░', + "\xb1" => '▒', + "\xb2" => '▓', + "\xb3" => '│', + "\xb4" => '┤', + "\xb5" => '╡', + "\xb6" => '╢', + "\xb7" => '╖', + "\xb8" => '╕', + "\xb9" => '╣', + "\xba" => '║', + "\xbb" => '╗', + "\xbc" => '╝', + "\xbd" => '╜', + "\xbe" => '╛', + "\xbf" => '┐', + "\xc0" => '└', + "\xc1" => '┴', + "\xc2" => '┬', + "\xc3" => '├', + "\xc4" => '─', + "\xc5" => '┼', + "\xc6" => '╞', + "\xc7" => '╟', + "\xc8" => '╚', + "\xc9" => '╔', + "\xca" => '╩', + "\xcb" => '╦', + "\xcc" => '╠', + "\xcd" => '═', + "\xce" => '╬', + "\xcf" => '╧', + "\xd0" => '╨', + "\xd1" => '╤', + "\xd2" => '╥', + "\xd3" => '╙', + "\xd4" => '╘', + "\xd5" => '╒', + "\xd6" => '╓', + "\xd7" => '╫', + "\xd8" => '╪', + "\xd9" => '┘', + "\xda" => '┌', + "\xdb" => '█', + "\xdc" => '▄', + "\xdd" => '▌', + "\xde" => '▐', + "\xdf" => '▀', + "\xe0" => 'р', + "\xe1" => 'с', + "\xe2" => 'т', + "\xe3" => 'у', + "\xe4" => 'ф', + "\xe5" => 'х', + "\xe6" => 'ц', + "\xe7" => 'ч', + "\xe8" => 'ш', + "\xe9" => 'щ', + "\xea" => 'ъ', + "\xeb" => 'ы', + "\xec" => 'ь', + "\xed" => 'э', + "\xee" => 'ю', + "\xef" => 'я', + "\xf0" => 'Ё', + "\xf1" => 'ё', + "\xf2" => 'Є', + "\xf3" => 'є', + "\xf4" => 'Ї', + "\xf5" => 'ї', + "\xf6" => 'Ў', + "\xf7" => 'ў', + "\xf8" => '°', + "\xf9" => '∙', + "\xfa" => '·', + "\xfb" => '√', + "\xfc" => '№', + "\xfd" => '¤', + "\xfe" => '■', + "\xff" => ' ' ); $string = str_replace(array_keys($cp866), array_values($cp866), $string); return $string; -} +} \ No newline at end of file diff --git a/functions/decode/iso_8859_10.php b/functions/decode/iso_8859_10.php index 99978302..e032d25d 100644 --- a/functions/decode/iso_8859_10.php +++ b/functions/decode/iso_8859_10.php @@ -7,7 +7,7 @@ * * This file contains iso-8859-10 decoding function that is needed to read * iso-8859-10 encoded mails in non-iso-8859-10 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-10.TXT * diff --git a/functions/decode/iso_8859_11.php b/functions/decode/iso_8859_11.php index 0629e1fe..3fb9e881 100644 --- a/functions/decode/iso_8859_11.php +++ b/functions/decode/iso_8859_11.php @@ -7,33 +7,33 @@ * * This file contains iso-8859-11 decoding function that is needed to read * iso-8859-11 encoded mails in non-iso-8859-11 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-11.TXT * - * Name: ISO/IEC 8859-11:2001 to Unicode - * Unicode version: 3.2 - * Table version: 1.0 - * Table format: Format A - * Date: 2002 October 7 - * Authors: Ken Whistler + * Name: ISO/IEC 8859-11:2001 to Unicode + * Unicode version: 3.2 + * Table version: 1.0 + * Table format: Format A + * Date: 2002 October 7 + * Authors: Ken Whistler * * Original copyright: - * Copyright (c) 1999 Unicode, Inc. All Rights reserved. + * Copyright (c) 1999 Unicode, Inc. All Rights reserved. * - * This file is provided as-is by Unicode, Inc. (The Unicode Consortium). - * No claims are made as to fitness for any particular purpose. No - * warranties of any kind are expressed or implied. The recipient - * agrees to determine applicability of information provided. If this - * file has been provided on optical media by Unicode, Inc., the sole - * remedy for any claim will be exchange of defective media within 90 - * days of receipt. + * This file is provided as-is by Unicode, Inc. (The Unicode Consortium). + * No claims are made as to fitness for any particular purpose. No + * warranties of any kind are expressed or implied. The recipient + * agrees to determine applicability of information provided. If this + * file has been provided on optical media by Unicode, Inc., the sole + * remedy for any claim will be exchange of defective media within 90 + * days of receipt. * - * Unicode, Inc. hereby grants the right to freely use the information - * supplied in this file in the creation of products supporting the - * Unicode Standard, and to make copies of this file in any form for - * internal or external distribution as long as this notice remains - * attached. + * Unicode, Inc. hereby grants the right to freely use the information + * supplied in this file in the creation of products supporting the + * Unicode Standard, and to make copies of this file in any form for + * internal or external distribution as long as this notice remains + * attached. * * @version $Id$ * @package squirrelmail @@ -43,7 +43,7 @@ /** * Decode iso8859-11 string * @param string $string Encoded string - * @return string $string Decoded string + * @return string $string Decoded string */ function charset_decode_iso_8859_11 ($string) { global $default_charset; @@ -56,94 +56,94 @@ function charset_decode_iso_8859_11 ($string) { return $string; $iso8859_11 = array( - "\xA0" => ' ', - "\xA1" => 'ก', - "\xA2" => 'ข', - "\xA3" => 'ฃ', - "\xA4" => 'ค', - "\xA5" => 'ฅ', - "\xA6" => 'ฆ', - "\xA7" => 'ง', - "\xA8" => 'จ', - "\xA9" => 'ฉ', - "\xAA" => 'ช', - "\xAB" => 'ซ', - "\xAC" => 'ฌ', - "\xAD" => 'ญ', - "\xAE" => 'ฎ', - "\xAF" => 'ฏ', - "\xB0" => 'ฐ', - "\xB1" => 'ฑ', - "\xB2" => 'ฒ', - "\xB3" => 'ณ', - "\xB4" => 'ด', - "\xB5" => 'ต', - "\xB6" => 'ถ', - "\xB7" => 'ท', - "\xB8" => 'ธ', - "\xB9" => 'น', - "\xBA" => 'บ', - "\xBB" => 'ป', - "\xBC" => 'ผ', - "\xBD" => 'ฝ', - "\xBE" => 'พ', - "\xBF" => 'ฟ', - "\xC0" => 'ภ', - "\xC1" => 'ม', - "\xC2" => 'ย', - "\xC3" => 'ร', - "\xC4" => 'ฤ', - "\xC5" => 'ล', - "\xC6" => 'ฦ', - "\xC7" => 'ว', - "\xC8" => 'ศ', - "\xC9" => 'ษ', - "\xCA" => 'ส', - "\xCB" => 'ห', - "\xCC" => 'ฬ', - "\xCD" => 'อ', - "\xCE" => 'ฮ', - "\xCF" => 'ฯ', - "\xD0" => 'ะ', - "\xD1" => 'ั', - "\xD2" => 'า', - "\xD3" => 'ำ', - "\xD4" => 'ิ', - "\xD5" => 'ี', - "\xD6" => 'ึ', - "\xD7" => 'ื', - "\xD8" => 'ุ', - "\xD9" => 'ู', - "\xDA" => 'ฺ', - "\xDF" => '฿', - "\xE0" => 'เ', - "\xE1" => 'แ', - "\xE2" => 'โ', - "\xE3" => 'ใ', - "\xE4" => 'ไ', - "\xE5" => 'ๅ', - "\xE6" => 'ๆ', - "\xE7" => '็', - "\xE8" => '่', - "\xE9" => '้', - "\xEA" => '๊', - "\xEB" => '๋', - "\xEC" => '์', - "\xED" => 'ํ', - "\xEE" => '๎', - "\xEF" => '๏', - "\xF0" => '๐', - "\xF1" => '๑', - "\xF2" => '๒', - "\xF3" => '๓', - "\xF4" => '๔', - "\xF5" => '๕', - "\xF6" => '๖', - "\xF7" => '๗', - "\xF8" => '๘', - "\xF9" => '๙', - "\xFA" => '๚', - "\xFB" => '๛' + "\xA0" => ' ', + "\xA1" => 'ก', + "\xA2" => 'ข', + "\xA3" => 'ฃ', + "\xA4" => 'ค', + "\xA5" => 'ฅ', + "\xA6" => 'ฆ', + "\xA7" => 'ง', + "\xA8" => 'จ', + "\xA9" => 'ฉ', + "\xAA" => 'ช', + "\xAB" => 'ซ', + "\xAC" => 'ฌ', + "\xAD" => 'ญ', + "\xAE" => 'ฎ', + "\xAF" => 'ฏ', + "\xB0" => 'ฐ', + "\xB1" => 'ฑ', + "\xB2" => 'ฒ', + "\xB3" => 'ณ', + "\xB4" => 'ด', + "\xB5" => 'ต', + "\xB6" => 'ถ', + "\xB7" => 'ท', + "\xB8" => 'ธ', + "\xB9" => 'น', + "\xBA" => 'บ', + "\xBB" => 'ป', + "\xBC" => 'ผ', + "\xBD" => 'ฝ', + "\xBE" => 'พ', + "\xBF" => 'ฟ', + "\xC0" => 'ภ', + "\xC1" => 'ม', + "\xC2" => 'ย', + "\xC3" => 'ร', + "\xC4" => 'ฤ', + "\xC5" => 'ล', + "\xC6" => 'ฦ', + "\xC7" => 'ว', + "\xC8" => 'ศ', + "\xC9" => 'ษ', + "\xCA" => 'ส', + "\xCB" => 'ห', + "\xCC" => 'ฬ', + "\xCD" => 'อ', + "\xCE" => 'ฮ', + "\xCF" => 'ฯ', + "\xD0" => 'ะ', + "\xD1" => 'ั', + "\xD2" => 'า', + "\xD3" => 'ำ', + "\xD4" => 'ิ', + "\xD5" => 'ี', + "\xD6" => 'ึ', + "\xD7" => 'ื', + "\xD8" => 'ุ', + "\xD9" => 'ู', + "\xDA" => 'ฺ', + "\xDF" => '฿', + "\xE0" => 'เ', + "\xE1" => 'แ', + "\xE2" => 'โ', + "\xE3" => 'ใ', + "\xE4" => 'ไ', + "\xE5" => 'ๅ', + "\xE6" => 'ๆ', + "\xE7" => '็', + "\xE8" => '่', + "\xE9" => '้', + "\xEA" => '๊', + "\xEB" => '๋', + "\xEC" => '์', + "\xED" => 'ํ', + "\xEE" => '๎', + "\xEF" => '๏', + "\xF0" => '๐', + "\xF1" => '๑', + "\xF2" => '๒', + "\xF3" => '๓', + "\xF4" => '๔', + "\xF5" => '๕', + "\xF6" => '๖', + "\xF7" => '๗', + "\xF8" => '๘', + "\xF9" => '๙', + "\xFA" => '๚', + "\xFB" => '๛' ); $string = str_replace(array_keys($iso8859_11), array_values($iso8859_11), $string); @@ -151,4 +151,4 @@ function charset_decode_iso_8859_11 ($string) { return $string; } -?> +?> \ No newline at end of file diff --git a/functions/decode/iso_8859_13.php b/functions/decode/iso_8859_13.php index 98f1ef08..02459a7c 100644 --- a/functions/decode/iso_8859_13.php +++ b/functions/decode/iso_8859_13.php @@ -7,7 +7,7 @@ * * This file contains iso-8859-13 decoding function that is needed to read * iso-8859-13 encoded mails in non-iso-8859-13 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-13.TXT * diff --git a/functions/decode/iso_8859_14.php b/functions/decode/iso_8859_14.php index 50fae3f8..4306387d 100644 --- a/functions/decode/iso_8859_14.php +++ b/functions/decode/iso_8859_14.php @@ -7,7 +7,7 @@ * * This file contains iso-8859-14 decoding function that is needed to read * iso-8859-14 encoded mails in non-iso-8859-14 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-14.TXT * @@ -44,7 +44,7 @@ /** * Decode iso8859-14 encoded string * @param string $string Encoded string - * @return string $string Decoded string + * @return string $string Decoded string */ function charset_decode_iso_8859_14 ($string) { global $default_charset; diff --git a/functions/decode/iso_8859_15.php b/functions/decode/iso_8859_15.php index f6dc426f..7b2f3357 100644 --- a/functions/decode/iso_8859_15.php +++ b/functions/decode/iso_8859_15.php @@ -7,7 +7,7 @@ * * This file contains iso-8859-15 decoding function that is needed to read * iso-8859-15 encoded mails in non-iso-8859-15 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-15.TXT * diff --git a/functions/decode/iso_8859_16.php b/functions/decode/iso_8859_16.php index 8ba49bbe..5703c31e 100644 --- a/functions/decode/iso_8859_16.php +++ b/functions/decode/iso_8859_16.php @@ -7,7 +7,7 @@ * * This file contains iso-8859-16 decoding function that is needed to read * iso-8859-16 encoded mails in non-iso-8859-16 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-16.TXT * diff --git a/functions/decode/iso_8859_2.php b/functions/decode/iso_8859_2.php index cde643bb..1ef1515b 100644 --- a/functions/decode/iso_8859_2.php +++ b/functions/decode/iso_8859_2.php @@ -7,7 +7,7 @@ * * This file contains iso-8859-2 decoding function that is needed to read * iso-8859-2 encoded mails in non-iso-8859-2 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-2.TXT * diff --git a/functions/decode/iso_8859_3.php b/functions/decode/iso_8859_3.php index a7410fe8..b28cee66 100644 --- a/functions/decode/iso_8859_3.php +++ b/functions/decode/iso_8859_3.php @@ -7,7 +7,7 @@ * * This file contains iso-8859-3 decoding function that is needed to read * iso-8859-3 encoded mails in non-iso-8859-3 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-3.TXT * diff --git a/functions/decode/iso_8859_4.php b/functions/decode/iso_8859_4.php index d0044708..cdd14441 100644 --- a/functions/decode/iso_8859_4.php +++ b/functions/decode/iso_8859_4.php @@ -7,7 +7,7 @@ * * This file contains iso-8859-4 decoding function that is needed to read * iso-8859-4 encoded mails in non-iso-8859-4 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-4.TXT * diff --git a/functions/decode/iso_8859_5.php b/functions/decode/iso_8859_5.php index cbefcb17..5d0af76a 100644 --- a/functions/decode/iso_8859_5.php +++ b/functions/decode/iso_8859_5.php @@ -7,7 +7,7 @@ * * This file contains iso-8859-5 decoding function that is needed to read * iso-8859-5 encoded mails in non-iso-8859-5 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-5.TXT * diff --git a/functions/decode/iso_8859_6.php b/functions/decode/iso_8859_6.php index 60c6833f..a7201503 100644 --- a/functions/decode/iso_8859_6.php +++ b/functions/decode/iso_8859_6.php @@ -7,7 +7,7 @@ * * This file contains iso-8859-6 decoding function that is needed to read * iso-8859-6 encoded mails in non-iso-8859-6 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-6.TXT * diff --git a/functions/decode/iso_8859_7.php b/functions/decode/iso_8859_7.php index b4a0aaa6..9e0e7017 100644 --- a/functions/decode/iso_8859_7.php +++ b/functions/decode/iso_8859_7.php @@ -7,7 +7,7 @@ * * This file contains iso-8859-7 decoding function that is needed to read * iso-8859-7 encoded mails in non-iso-8859-7 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-7.TXT * diff --git a/functions/decode/iso_8859_8.php b/functions/decode/iso_8859_8.php index e4abf4fa..a5668ca6 100644 --- a/functions/decode/iso_8859_8.php +++ b/functions/decode/iso_8859_8.php @@ -7,7 +7,7 @@ * * This file contains iso-8859-8 decoding function that is needed to read * iso-8859-8 encoded mails in non-iso-8859-8 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-8.TXT * diff --git a/functions/decode/iso_8859_9.php b/functions/decode/iso_8859_9.php index 6229edc6..997d8633 100644 --- a/functions/decode/iso_8859_9.php +++ b/functions/decode/iso_8859_9.php @@ -7,7 +7,7 @@ * * This file contains iso-8859-9 decoding function that is needed to read * iso-8859-9 encoded mails in non-iso-8859-9 locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/ISO8859/8859-9.TXT * diff --git a/functions/decode/iso_ir_111.php b/functions/decode/iso_ir_111.php index d610e86a..c391214a 100644 --- a/functions/decode/iso_ir_111.php +++ b/functions/decode/iso_ir_111.php @@ -7,30 +7,30 @@ * * This file contains iso-ir-111 decoding function that is needed to read * iso-ir-111 encoded mails in non-iso-ir-111 locale. - * + * * Original data taken from: * http://crl.nmsu.edu/~mleisher/csets/ISOIR111.TXT * - * Original ID: Id: ISOIR111.TXT,v 1.2 1999/08/23 18:34:15 mleisher Exp + * Original ID: Id: ISOIR111.TXT,v 1.2 1999/08/23 18:34:15 mleisher Exp * Name: ISO IR 111/ECMA Cyrillic to Unicode 2.1 mapping table. - * Typed in by hand from + * Typed in by hand from * http://www.fingertipsoft.com/ref/cyrillic/charsets.html * Author: Mark Leisher * Date: 05 March 1998 * * Original copyright: * Copyright 1999 Computing Research Labs, New Mexico State University - * + * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the ""Software""), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL diff --git a/functions/decode/koi8_r.php b/functions/decode/koi8_r.php index ef2a1689..6da34125 100644 --- a/functions/decode/koi8_r.php +++ b/functions/decode/koi8_r.php @@ -7,7 +7,7 @@ * * This file contains koi8-r decoding function that is needed to read * koi8-r encoded mails in non-koi8-r locale. - * + * * Original data taken from: * ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MISC/KOI8-R.TXT * diff --git a/functions/decode/koi8_u.php b/functions/decode/koi8_u.php index 06c11b0c..37620763 100644 --- a/functions/decode/koi8_u.php +++ b/functions/decode/koi8_u.php @@ -7,7 +7,7 @@ * * This file contains koi8-u decoding function that is needed to read * koi8-u encoded mails in non-koi8-u locale. - * + * * Original data taken from rfc2319 * * Original copyright: diff --git a/functions/decode/ns_4551_1.php b/functions/decode/ns_4551_1.php index dfed843c..795f5f93 100644 --- a/functions/decode/ns_4551_1.php +++ b/functions/decode/ns_4551_1.php @@ -10,7 +10,7 @@ * ns_4551-1 encoded mails in non-ns_4551-1 locale. * * This is the same as ISO-646-NO and is used by some - * Microsoft programs when sending Norwegian characters + * Microsoft programs when sending Norwegian characters * * @version $Id$ * @package squirrelmail @@ -21,7 +21,7 @@ * ns_4551_1 decoding function * * @param string $string - * @return string + * @return string */ function charset_decode_ns_4551_1 ($string) { /* diff --git a/functions/decode/tis_620.php b/functions/decode/tis_620.php index b4a43c20..6596821c 100644 --- a/functions/decode/tis_620.php +++ b/functions/decode/tis_620.php @@ -7,14 +7,14 @@ * * This file contains tis620 decoding function that is needed to read * tis620 encoded mails in non-tis620 locale. - * + * * Original data taken from: * http://www.inet.co.th/cyberclub/trin/thairef/tis620-iso10646.html * * Original copyright: * Note: The information contained herein is provided as-is. It was * complied from various references given at the end of the page. - * The author (trin@mozart.inet.co.th) believes all information + * The author (trin@mozart.inet.co.th) believes all information * presented here is accurate. * * References diff --git a/functions/decode/utf_8.php b/functions/decode/utf_8.php index c3bd951f..d7aac46c 100644 --- a/functions/decode/utf_8.php +++ b/functions/decode/utf_8.php @@ -15,7 +15,7 @@ * \a\b\c characters are decoded to html code octdec(a-340)*64*64 + octdec(b-200)*64 + octdec(c-200) * * decoding cycle is unfinished. please test and report problems to tokul@users.sourceforge.net - * + * * @version $Id$ * @package squirrelmail * @subpackage decode diff --git a/functions/display_messages.php b/functions/display_messages.php index 9f9d4774..b22a4e0e 100644 --- a/functions/display_messages.php +++ b/functions/display_messages.php @@ -173,7 +173,7 @@ function error_option_save($message) { global $optpage_save_error; if (! is_array($optpage_save_error) ) - $optpage_save_error=array(); + $optpage_save_error=array(); $optpage_save_error=array_merge($optpage_save_error,array($message)); } diff --git a/functions/encode/cp1251.php b/functions/encode/cp1251.php index 7755d1c9..4992f5cc 100644 --- a/functions/encode/cp1251.php +++ b/functions/encode/cp1251.php @@ -22,17 +22,17 @@ function charset_encode_cp1251 ($string) { $string=preg_replace("/&#([0-9]+);/e","unicodetocp1251('\\1')",$string); // $string=preg_replace("/&#[xX]([0-9A-F]+);/e","unicodetocp1251(hexdec('\\1'))",$string); - + return $string; } /** * Return cp1251 symbol when unicode character number is provided - * - * This function is used internally by charset_encode_cp1251 + * + * This function is used internally by charset_encode_cp1251 * function. It might be unavailable to other squirrelmail functions. - * Don't use it or make sure, that functions/encode/cp1251.php is - * included. + * Don't use it or make sure, that functions/encode/cp1251.php is + * included. * * @param int $var decimal unicode value * @return string cp1251 character diff --git a/functions/encode/cp1255.php b/functions/encode/cp1255.php index 06ef050e..93d475d5 100644 --- a/functions/encode/cp1255.php +++ b/functions/encode/cp1255.php @@ -22,17 +22,17 @@ function charset_encode_cp1255 ($string) { $string=preg_replace("/&#([0-9]+);/e","unicodetocp1255('\\1')",$string); // $string=preg_replace("/&#[xX]([0-9A-F]+);/e","unicodetocp1255(hexdec('\\1'))",$string); - + return $string; } /** * Return cp1255 symbol when unicode character number is provided - * - * This function is used internally by charset_encode_cp1255 + * + * This function is used internally by charset_encode_cp1255 * function. It might be unavailable to other squirrelmail functions. - * Don't use it or make sure, that functions/encode/cp1255.php is - * included. + * Don't use it or make sure, that functions/encode/cp1255.php is + * included. * * @param int $var decimal unicode value * @return string cp1255 character diff --git a/functions/encode/cp1256.php b/functions/encode/cp1256.php index cfeac38c..13736e42 100644 --- a/functions/encode/cp1256.php +++ b/functions/encode/cp1256.php @@ -22,17 +22,17 @@ function charset_encode_cp1256 ($string) { $string=preg_replace("/&#([0-9]+);/e","unicodetocp1256('\\1')",$string); // $string=preg_replace("/&#[xX]([0-9A-F]+);/e","unicodetocp1256(hexdec('\\1'))",$string); - + return $string; } /** * Return cp1256 symbol when unicode character number is provided - * - * This function is used internally by charset_encode_cp1256 + * + * This function is used internally by charset_encode_cp1256 * function. It might be unavailable to other squirrelmail functions. - * Don't use it or make sure, that functions/encode/cp1256.php is - * included. + * Don't use it or make sure, that functions/encode/cp1256.php is + * included. * * @param int $var decimal unicode value * @return string cp1256 character diff --git a/functions/encode/iso_8859_1.php b/functions/encode/iso_8859_1.php index 6fc411e2..7b1e5e5d 100644 --- a/functions/encode/iso_8859_1.php +++ b/functions/encode/iso_8859_1.php @@ -22,17 +22,17 @@ function charset_encode_iso_8859_1 ($string) { $string=preg_replace("/&#([0-9]+);/e","unicodetoiso88591('\\1')",$string); // $string=preg_replace("/&#[xX]([0-9A-F]+);/e","unicodetoiso88591(hexdec('\\1'))",$string); - + return $string; } /** * Return iso-8859-1 symbol when unicode character number is provided - * - * This function is used internally by charset_encode_iso_8859_1 + * + * This function is used internally by charset_encode_iso_8859_1 * function. It might be unavailable to other squirrelmail functions. - * Don't use it or make sure, that functions/encode/iso_8859_1.php is - * included. + * Don't use it or make sure, that functions/encode/iso_8859_1.php is + * included. * * @param int $var decimal unicode value * @return string iso-8859-1 character diff --git a/functions/encode/iso_8859_15.php b/functions/encode/iso_8859_15.php index 93bb5228..66fc9a8d 100644 --- a/functions/encode/iso_8859_15.php +++ b/functions/encode/iso_8859_15.php @@ -22,17 +22,17 @@ function charset_encode_iso_8859_15 ($string) { $string=preg_replace("/&#([0-9]+);/e","unicodetoiso885915('\\1')",$string); // $string=preg_replace("/&#[xX]([0-9A-F]+);/e","unicodetoiso885915(hexdec('\\1'))",$string); - + return $string; } /** * Return iso-8859-15 symbol when unicode character number is provided - * - * This function is used internally by charset_encode_iso_8859_15 + * + * This function is used internally by charset_encode_iso_8859_15 * function. It might be unavailable to other squirrelmail functions. - * Don't use it or make sure, that functions/encode/iso_8859_15.php is - * included. + * Don't use it or make sure, that functions/encode/iso_8859_15.php is + * included. * * @param int $var decimal unicode value * @return string iso-8859-15 character diff --git a/functions/encode/iso_8859_2.php b/functions/encode/iso_8859_2.php index afbcf80b..a0472dc0 100644 --- a/functions/encode/iso_8859_2.php +++ b/functions/encode/iso_8859_2.php @@ -22,17 +22,17 @@ function charset_encode_iso_8859_2 ($string) { $string=preg_replace("/&#([0-9]+);/e","unicodetoiso88592('\\1')",$string); // $string=preg_replace("/&#[xX]([0-9A-F]+);/e","unicodetoiso88592(hexdec('\\1'))",$string); - + return $string; } /** * Return iso-8859-2 symbol when unicode character number is provided - * - * This function is used internally by charset_encode_iso_8859_2 + * + * This function is used internally by charset_encode_iso_8859_2 * function. It might be unavailable to other squirrelmail functions. - * Don't use it or make sure, that functions/encode/iso_8859_2.php is - * included. + * Don't use it or make sure, that functions/encode/iso_8859_2.php is + * included. * * @param int $var decimal unicode value * @return string iso-8859-2 character diff --git a/functions/encode/iso_8859_7.php b/functions/encode/iso_8859_7.php index d86f4f61..d02ae87b 100644 --- a/functions/encode/iso_8859_7.php +++ b/functions/encode/iso_8859_7.php @@ -22,17 +22,17 @@ function charset_encode_iso_8859_7 ($string) { $string=preg_replace("/&#([0-9]+);/e","unicodetoiso88597('\\1')",$string); // $string=preg_replace("/&#[xX]([0-9A-F]+);/e","unicodetoiso88597(hexdec('\\1'))",$string); - + return $string; } /** * Return iso-8859-7 symbol when unicode character number is provided - * - * This function is used internally by charset_encode_iso_8859_7 + * + * This function is used internally by charset_encode_iso_8859_7 * function. It might be unavailable to other squirrelmail functions. - * Don't use it or make sure, that functions/encode/iso_8859_7.php is - * included. + * Don't use it or make sure, that functions/encode/iso_8859_7.php is + * included. * * @param int $var decimal unicode value * @return string iso-8859-7 character diff --git a/functions/encode/iso_8859_9.php b/functions/encode/iso_8859_9.php index 9dafdb7a..e968c15f 100644 --- a/functions/encode/iso_8859_9.php +++ b/functions/encode/iso_8859_9.php @@ -22,17 +22,17 @@ function charset_encode_iso_8859_9 ($string) { $string=preg_replace("/&#([0-9]+);/e","unicodetoiso88599('\\1')",$string); // $string=preg_replace("/&#[xX]([0-9A-F]+);/e","unicodetoiso88599(hexdec('\\1'))",$string); - + return $string; } /** * Return iso-8859-9 symbol when unicode character number is provided - * - * This function is used internally by charset_encode_iso_8859_9 + * + * This function is used internally by charset_encode_iso_8859_9 * function. It might be unavailable to other squirrelmail functions. - * Don't use it or make sure, that functions/encode/iso_8859_9.php is - * included. + * Don't use it or make sure, that functions/encode/iso_8859_9.php is + * included. * * @param int $var decimal unicode value * @return string iso-8859-9 character diff --git a/functions/encode/koi8_r.php b/functions/encode/koi8_r.php index 78075ea1..19c2abe8 100644 --- a/functions/encode/koi8_r.php +++ b/functions/encode/koi8_r.php @@ -22,17 +22,17 @@ function charset_encode_koi8_r ($string) { $string=preg_replace("/&#([0-9]+);/e","unicodetokoi8r('\\1')",$string); // $string=preg_replace("/&#[xX]([0-9A-F]+);/e","unicodetokoi8r(hexdec('\\1'))",$string); - + return $string; } /** * Return koi8-r symbol when unicode character number is provided - * - * This function is used internally by charset_encode_koi8_r + * + * This function is used internally by charset_encode_koi8_r * function. It might be unavailable to other squirrelmail functions. - * Don't use it or make sure, that functions/encode/koi8_r.php is - * included. + * Don't use it or make sure, that functions/encode/koi8_r.php is + * included. * * @param int $var decimal unicode value * @return string koi8-r character diff --git a/functions/encode/koi8_u.php b/functions/encode/koi8_u.php index 882a5190..97eeaad6 100644 --- a/functions/encode/koi8_u.php +++ b/functions/encode/koi8_u.php @@ -22,17 +22,17 @@ function charset_encode_koi8_u ($string) { $string=preg_replace("/&#([0-9]+);/e","unicodetokoi8u('\\1')",$string); // $string=preg_replace("/&#[xX]([0-9A-F]+);/e","unicodetokoi8u(hexdec('\\1'))",$string); - + return $string; } /** * Return koi8-u symbol when unicode character number is provided - * - * This function is used internally by charset_encode_koi8_u + * + * This function is used internally by charset_encode_koi8_u * function. It might be unavailable to other squirrelmail functions. - * Don't use it or make sure, that functions/encode/koi8_u.php is - * included. + * Don't use it or make sure, that functions/encode/koi8_u.php is + * included. * * @param int $var decimal unicode value * @return string koi8-u character diff --git a/functions/encode/tis_620.php b/functions/encode/tis_620.php index 50664b2f..689fa609 100644 --- a/functions/encode/tis_620.php +++ b/functions/encode/tis_620.php @@ -22,17 +22,17 @@ function charset_encode_tis_620 ($string) { $string=preg_replace("/&#([0-9]+);/e","unicodetotis620('\\1')",$string); // $string=preg_replace("/&#[xX]([0-9A-F]+);/e","unicodetotis620(hexdec('\\1'))",$string); - + return $string; } /** * Return tis-620 symbol when unicode character number is provided - * - * This function is used internally by charset_encode_tis_620 + * + * This function is used internally by charset_encode_tis_620 * function. It might be unavailable to other squirrelmail functions. - * Don't use it or make sure, that functions/encode/tis_620.php is - * included. + * Don't use it or make sure, that functions/encode/tis_620.php is + * included. * * @param int $var decimal unicode value * @return string tis-620 character diff --git a/functions/encode/us_ascii.php b/functions/encode/us_ascii.php index f424e42f..a54946ec 100644 --- a/functions/encode/us_ascii.php +++ b/functions/encode/us_ascii.php @@ -22,17 +22,17 @@ function charset_encode_us_ascii ($string) { $string=preg_replace("/&#([0-9]+);/e","unicodetousascii('\\1')",$string); // $string=preg_replace("/&#[xX]([0-9A-F]+);/e","unicodetousascii(hexdec('\\1'))",$string); - + return $string; } /** * Return us-ascii symbol when unicode character number is provided - * + * * This function is used internally by charset_encode_us_ascii * function. It might be unavailable to other squirrelmail functions. - * Don't use it or make sure, that functions/encode/us_ascii.php is - * included. + * Don't use it or make sure, that functions/encode/us_ascii.php is + * included. * * @param int $var decimal unicode value * @return string us-ascii character diff --git a/functions/encode/utf_8.php b/functions/encode/utf_8.php index c1c45b52..a1e2eb67 100644 --- a/functions/encode/utf_8.php +++ b/functions/encode/utf_8.php @@ -26,17 +26,17 @@ function charset_encode_utf_8 ($string) { $string=preg_replace("/&#([0-9]+);/e","unicodetoutf8('\\1')",$string); // $string=preg_replace("/&#[xX]([0-9A-F]+);/e","unicodetoutf8(hexdec('\\1'))",$string); - + return $string; } /** * Return utf8 symbol when unicode character number is provided - * - * This function is used internally by charset_encode_utf_8 + * + * This function is used internally by charset_encode_utf_8 * function. It might be unavailable to other squirrelmail functions. - * Don't use it or make sure, that functions/encode/utf_8.php is - * included. + * Don't use it or make sure, that functions/encode/utf_8.php is + * included. * * @param int $var decimal unicode value * @return string utf8 character @@ -50,7 +50,7 @@ function unicodetoutf8($var) { $binVal = str_pad (decbin ($var), 11, "0", STR_PAD_LEFT); $binPart1 = substr ($binVal, 0, 5); $binPart2 = substr ($binVal, 5); - + $char1 = chr (192 + bindec ($binPart1)); $char2 = chr (128 + bindec ($binPart2)); $ret = $char1 . $char2; diff --git a/functions/html.php b/functions/html.php index 92c21b1c..747d68ed 100644 --- a/functions/html.php +++ b/functions/html.php @@ -99,7 +99,7 @@ function html_tag( $tag, // Tag to output '/.+(\\?'.$var.')=(.*)$/AU', /* at front and only var */ '/.+(\\&'.$var.')=(.*)$/AU' /* at the end */ ); - preg_replace('/&/','&',$url); + preg_replace('/&/','&',$url); switch (true) { case (preg_match($pat_a[0],$url,$regs)): $k = $regs[1]; @@ -131,9 +131,9 @@ function html_tag( $tag, // Tag to output if ($k) { if ($val) { $rpl = "$k=$val"; - if ($link) { - $rpl = preg_replace('/&/','&',$rpl); - } + if ($link) { + $rpl = preg_replace('/&/','&',$rpl); + } } else { $rpl = ''; } diff --git a/functions/htmlentities/index.php b/functions/htmlentities/index.php index 5963dfd6..7ff3c393 100644 --- a/functions/htmlentities/index.php +++ b/functions/htmlentities/index.php @@ -10,4 +10,4 @@ */ header("Location:../../src/login.php\n\n"); exit(); -?> +?> \ No newline at end of file diff --git a/functions/htmlentities/iso-8859-1.php b/functions/htmlentities/iso-8859-1.php index 981eccb7..f6321206 100644 --- a/functions/htmlentities/iso-8859-1.php +++ b/functions/htmlentities/iso-8859-1.php @@ -9,101 +9,101 @@ * @subpackage strings */ $sq_html_ent_table = array_merge($sq_html_ent_table, - array("\xA0" => ' ', - "\xA1" => '¡', - "\xA2" => '¢', - "\xA3" => '£', - "\xA4" => '¤', - "\xA5" => '¥', - "\xA6" => '¦', - "\xA7" => '§', - "\xA8" => '¨', - "\xA9" => '©', - "\xAA" => 'ª', - "\xAB" => '«', - "\xAC" => '¬', - "\xAD" => '­', - "\xAE" => '®', - "\xAF" => '¯', - "\xB0" => '°', - "\xB1" => '±', - "\xB2" => '²', - "\xB3" => '³', - "\xB4" => '´', - "\xB5" => 'µ', - "\xB6" => '¶', - "\xB7" => '·', - "\xB8" => '¸', - "\xB9" => '¹', - "\xBA" => 'º', - "\xBB" => '»', - "\xBC" => '¼', - "\xBD" => '½', - "\xBE" => '¾', - "\xBF" => '¿', - "\xC0" => 'À', - "\xC1" => 'Á', - "\xC2" => 'Â', - "\xC3" => 'Ã', - "\xC4" => 'Ä', - "\xC5" => 'Å', - "\xC6" => 'Æ', - "\xC7" => 'Ç', - "\xC8" => 'È', - "\xC9" => 'É', - "\xCA" => 'Ê', - "\xCB" => 'Ë', - "\xCC" => 'Ì', - "\xCD" => 'Í', - "\xCE" => 'Î', - "\xCF" => 'Ï', - "\xD0" => 'Ð', - "\xD1" => 'Ñ', - "\xD2" => 'Ò', - "\xD3" => 'Ó', - "\xD4" => 'Ô', - "\xD5" => 'Õ', - "\xD6" => 'Ö', - "\xD7" => '×', - "\xD8" => 'Ø', - "\xD9" => 'Ù', - "\xDA" => 'Ú', - "\xDB" => 'Û', - "\xDC" => 'Ü', - "\xDD" => 'Ý', - "\xDE" => 'Þ', - "\xDF" => 'ß', - "\xE0" => 'à', - "\xE1" => 'á', - "\xE2" => 'â', - "\xE3" => 'ã', - "\xE4" => 'ä', - "\xE5" => 'å', - "\xE6" => 'æ', - "\xE7" => 'ç', - "\xE8" => 'è', - "\xE9" => 'é', - "\xEA" => 'ê', - "\xEB" => 'ë', - "\xEC" => 'ì', - "\xED" => 'í', - "\xEE" => 'î', - "\xEF" => 'ï', - "\xF0" => 'ð', - "\xF1" => 'ñ', - "\xF2" => 'ò', - "\xF3" => 'ó', - "\xF4" => 'ô', - "\xF5" => 'õ', - "\xF6" => 'ö', - "\xF7" => '÷', - "\xF8" => 'ø', - "\xF9" => 'ù', - "\xFA" => 'ú', - "\xFB" => 'û', - "\xFC" => 'ü', - "\xFD" => 'ý', - "\xFE" => 'þ', - "\xFF" => 'ÿ') - ); + array("\xA0" => ' ', + "\xA1" => '¡', + "\xA2" => '¢', + "\xA3" => '£', + "\xA4" => '¤', + "\xA5" => '¥', + "\xA6" => '¦', + "\xA7" => '§', + "\xA8" => '¨', + "\xA9" => '©', + "\xAA" => 'ª', + "\xAB" => '«', + "\xAC" => '¬', + "\xAD" => '­', + "\xAE" => '®', + "\xAF" => '¯', + "\xB0" => '°', + "\xB1" => '±', + "\xB2" => '²', + "\xB3" => '³', + "\xB4" => '´', + "\xB5" => 'µ', + "\xB6" => '¶', + "\xB7" => '·', + "\xB8" => '¸', + "\xB9" => '¹', + "\xBA" => 'º', + "\xBB" => '»', + "\xBC" => '¼', + "\xBD" => '½', + "\xBE" => '¾', + "\xBF" => '¿', + "\xC0" => 'À', + "\xC1" => 'Á', + "\xC2" => 'Â', + "\xC3" => 'Ã', + "\xC4" => 'Ä', + "\xC5" => 'Å', + "\xC6" => 'Æ', + "\xC7" => 'Ç', + "\xC8" => 'È', + "\xC9" => 'É', + "\xCA" => 'Ê', + "\xCB" => 'Ë', + "\xCC" => 'Ì', + "\xCD" => 'Í', + "\xCE" => 'Î', + "\xCF" => 'Ï', + "\xD0" => 'Ð', + "\xD1" => 'Ñ', + "\xD2" => 'Ò', + "\xD3" => 'Ó', + "\xD4" => 'Ô', + "\xD5" => 'Õ', + "\xD6" => 'Ö', + "\xD7" => '×', + "\xD8" => 'Ø', + "\xD9" => 'Ù', + "\xDA" => 'Ú', + "\xDB" => 'Û', + "\xDC" => 'Ü', + "\xDD" => 'Ý', + "\xDE" => 'Þ', + "\xDF" => 'ß', + "\xE0" => 'à', + "\xE1" => 'á', + "\xE2" => 'â', + "\xE3" => 'ã', + "\xE4" => 'ä', + "\xE5" => 'å', + "\xE6" => 'æ', + "\xE7" => 'ç', + "\xE8" => 'è', + "\xE9" => 'é', + "\xEA" => 'ê', + "\xEB" => 'ë', + "\xEC" => 'ì', + "\xED" => 'í', + "\xEE" => 'î', + "\xEF" => 'ï', + "\xF0" => 'ð', + "\xF1" => 'ñ', + "\xF2" => 'ò', + "\xF3" => 'ó', + "\xF4" => 'ô', + "\xF5" => 'õ', + "\xF6" => 'ö', + "\xF7" => '÷', + "\xF8" => 'ø', + "\xF9" => 'ù', + "\xFA" => 'ú', + "\xFB" => 'û', + "\xFC" => 'ü', + "\xFD" => 'ý', + "\xFE" => 'þ', + "\xFF" => 'ÿ') + ); ?> \ No newline at end of file diff --git a/functions/htmlentities/readme.php b/functions/htmlentities/readme.php index b86ca155..616525ee 100644 --- a/functions/htmlentities/readme.php +++ b/functions/htmlentities/readme.php @@ -4,7 +4,7 @@ * * SquirrelMail provides own implementation of htmlentities() and * get_html_translation_table() functions. Functions are called - * sq_get_html_translation_table() and sq_htmlentities(). They are + * sq_get_html_translation_table() and sq_htmlentities(). They are * included in functions/strings.php * * sq_htmlentities uses same syntax as functions available in php 4.1.0 @@ -20,7 +20,7 @@ * it returns translation table defined by charset. Function defaults to us-ascii charset * and not to iso-8859-1. * - * Why own functions are used instead of htmlspecialchars() and + * Why own functions are used instead of htmlspecialchars() and * htmlentities() provided by php. * *
    diff --git a/functions/htmlentities/utf-8.php b/functions/htmlentities/utf-8.php index 5d806f06..b6aa6d80 100644 --- a/functions/htmlentities/utf-8.php +++ b/functions/htmlentities/utf-8.php @@ -9,267 +9,267 @@ * @subpackage strings */ $sq_html_ent_table = array_merge($sq_html_ent_table, - array(// Latin1 - "\xC2\xA0" => ' ', - "\xC2\xA1" => '¡', - "\xC2\xA2" => '¢', - "\xC2\xA3" => '£', - "\xC2\xA4" => '¤', - "\xC2\xA5" => '¥', - "\xC2\xA6" => '¦', - "\xC2\xA7" => '§', - "\xC2\xA8" => '¨', - "\xC2\xA9" => '©', - "\xC2\xAA" => 'ª', - "\xC2\xAB" => '«', - "\xC2\xAC" => '¬', - "\xC2\xAD" => '­', - "\xC2\xAE" => '®', - "\xC2\xAF" => '¯', - "\xC2\xB0" => '°', - "\xC2\xB1" => '±', - "\xC2\xB2" => '²', - "\xC2\xB3" => '³', - "\xC2\xB4" => '´', - "\xC2\xB5" => 'µ', - "\xC2\xB6" => '¶', - "\xC2\xB7" => '·', - "\xC2\xB8" => '¸', - "\xC2\xB9" => '¹', - "\xC2\xBA" => 'º', - "\xC2\xBB" => '»', - "\xC2\xBC" => '¼', - "\xC2\xBD" => '½', - "\xC2\xBE" => '¾', - "\xC2\xBF" => '¿', - "\xC3\x80" => 'À', - "\xC3\x81" => 'Á', - "\xC3\x82" => 'Â', - "\xC3\x83" => 'Ã', - "\xC3\x84" => 'Ä', - "\xC3\x85" => 'Å', - "\xC3\x86" => 'Æ', - "\xC3\x87" => 'Ç', - "\xC3\x88" => 'È', - "\xC3\x89" => 'É', - "\xC3\x8A" => 'Ê', - "\xC3\x8B" => 'Ë', - "\xC3\x8C" => 'Ì', - "\xC3\x8D" => 'Í', - "\xC3\x8E" => 'Î', - "\xC3\x8F" => 'Ï', - "\xC3\x90" => 'Ð', - "\xC3\x91" => 'Ñ', - "\xC3\x92" => 'Ò', - "\xC3\x93" => 'Ó', - "\xC3\x94" => 'Ô', - "\xC3\x95" => 'Õ', - "\xC3\x96" => 'Ö', - "\xC3\x97" => '×', - "\xC3\x98" => 'Ø', - "\xC3\x99" => 'Ù', - "\xC3\x9A" => 'Ú', - "\xC3\x9B" => 'Û', - "\xC3\x9C" => 'Ü', - "\xC3\x9D" => 'Ý', - "\xC3\x9E" => 'Þ', - "\xC3\x9F" => 'ß', - "\xC3\xA0" => 'à', - "\xC3\xA1" => 'á', - "\xC3\xA2" => 'â', - "\xC3\xA3" => 'ã', - "\xC3\xA4" => 'ä', - "\xC3\xA5" => 'å', - "\xC3\xA6" => 'æ', - "\xC3\xA7" => 'ç', - "\xC3\xA8" => 'è', - "\xC3\xA9" => 'é', - "\xC3\xAA" => 'ê', - "\xC3\xAB" => 'ë', - "\xC3\xAC" => 'ì', - "\xC3\xAD" => 'í', - "\xC3\xAE" => 'î', - "\xC3\xAF" => 'ï', - "\xC3\xB0" => 'ð', - "\xC3\xB1" => 'ñ', - "\xC3\xB2" => 'ò', - "\xC3\xB3" => 'ó', - "\xC3\xB4" => 'ô', - "\xC3\xB5" => 'õ', - "\xC3\xB6" => 'ö', - "\xC3\xB7" => '÷', - "\xC3\xB8" => 'ø', - "\xC3\xB9" => 'ù', - "\xC3\xBA" => 'ú', - "\xC3\xBB" => 'û', - "\xC3\xBC" => 'ü', - "\xC3\xBD" => 'ý', - "\xC3\xBE" => 'þ', - "\xC3\xBF" => 'ÿ', - // Latin Extended-A - "\xC5\x92" => 'Œ', - "\xC5\x93" => 'œ', - "\xC5\xA0" => 'Š', - "\xC5\xA1" => 'š', - "\xC5\xB8" => 'Ÿ', - // Spacing Modifier Letters - "\xCB\x86" => 'ˆ', - "\xCB\x9C" => '˜', - // General Punctuation - "\xE2\x80\x82" => ' ', - "\xE2\x80\x83" => ' ', - "\xE2\x80\x89" => ' ', - "\xE2\x80\x8C" => '‌', - "\xE2\x80\x8D" => '‍', - "\xE2\x80\x8E" => '‎', - "\xE2\x80\x8F" => '‏', - "\xE2\x80\x93" => '–', - "\xE2\x80\x94" => '—', - "\xE2\x80\x98" => '‘', - "\xE2\x80\x99" => '’', - "\xE2\x80\x9A" => '‚', - "\xE2\x80\x9C" => '“', - "\xE2\x80\x9D" => '”', - "\xE2\x80\x9E" => '„', - "\xE2\x80\xA0" => '†', - "\xE2\x80\xA1" => '‡', - "\xE2\x80\xB0" => '‰', - "\xE2\x80\xB9" => '‹', - "\xE2\x80\xBA" => '›', - "\xE2\x82\xAC" => '€', - // Latin Extended-B - "\xC6\x92" => 'ƒ', - // Greek - "\xCE\x91" => 'Α', - "\xCE\x92" => 'Β', - "\xCE\x93" => 'Γ', - "\xCE\x94" => 'Δ', - "\xCE\x95" => 'Ε', - "\xCE\x96" => 'Ζ', - "\xCE\x97" => 'Η', - "\xCE\x98" => 'Θ', - "\xCE\x99" => 'Ι', - "\xCE\x9A" => 'Κ', - "\xCE\x9B" => 'Λ', - "\xCE\x9C" => 'Μ', - "\xCE\x9D" => 'Ν', - "\xCE\x9E" => 'Ξ', - "\xCE\x9F" => 'Ο', - "\xCE\xA0" => 'Π', - "\xCE\xA1" => 'Ρ', - "\xCE\xA3" => 'Σ', - "\xCE\xA4" => 'Τ', - "\xCE\xA5" => 'Υ', - "\xCE\xA6" => 'Φ', - "\xCE\xA7" => 'Χ', - "\xCE\xA8" => 'Ψ', - "\xCE\xA9" => 'Ω', - "\xCE\xB1" => 'α', - "\xCE\xB2" => 'β', - "\xCE\xB3" => 'γ', - "\xCE\xB4" => 'δ', - "\xCE\xB5" => 'ε', - "\xCE\xB6" => 'ζ', - "\xCE\xB7" => 'η', - "\xCE\xB8" => 'θ', - "\xCE\xB9" => 'ι', - "\xCE\xBA" => 'κ', - "\xCE\xBB" => 'λ', - "\xCE\xBC" => 'μ', - "\xCE\xBD" => 'ν', - "\xCE\xBE" => 'ξ', - "\xCE\xBF" => 'ο', - "\xCF\x80" => 'π', - "\xCF\x81" => 'ρ', - "\xCF\x82" => 'ς', - "\xCF\x83" => 'σ', - "\xCF\x84" => 'τ', - "\xCF\x85" => 'υ', - "\xCF\x86" => 'φ', - "\xCF\x87" => 'χ', - "\xCF\x88" => 'ψ', - "\xCF\x89" => 'ω', - "\xCF\x91" => 'ϑ', - "\xCF\x92" => 'ϒ', - "\xCF\x96" => 'ϖ', - // General Punctuation - "\xE2\x80\xA2" => '•', - "\xE2\x80\xA6" => '…', - "\xE2\x80\xB2" => '′', - "\xE2\x80\xB3" => '″', - "\xE2\x80\xBE" => '‾', - "\xE2\x81\x84" => '⁄', - // Letterlike Symbols - "\xE2\x84\x98" => '℘', - "\xE2\x84\x91" => 'ℑ', - "\xE2\x84\x9C" => 'ℜ', - "\xE2\x84\xA2" => '™', - "\xE2\x84\xB5" => 'ℵ', - // Arrows - "\xE2\x86\x90" => '←', - "\xE2\x86\x91" => '↑', - "\xE2\x86\x92" => '→', - "\xE2\x86\x93" => '↓', - "\xE2\x86\x94" => '↔', - "\xE2\x86\xB5" => '↵', - "\xE2\x87\x90" => '⇐', - "\xE2\x87\x91" => '⇑', - "\xE2\x87\x92" => '⇒', - "\xE2\x87\x93" => '⇓', - "\xE2\x87\x94" => '⇔', - // Mathematical Operators - "\xE2\x88\x80" => '∀', - "\xE2\x88\x82" => '∂', - "\xE2\x88\x83" => '∃', - "\xE2\x88\x85" => '∅', - "\xE2\x88\x87" => '∇', - "\xE2\x88\x88" => '∈', - "\xE2\x88\x89" => '∉', - "\xE2\x88\x8B" => '∋', - "\xE2\x88\x8F" => '∏', - "\xE2\x88\x91" => '∑', - "\xE2\x88\x92" => '−', - "\xE2\x88\x97" => '∗', - "\xE2\x88\x9A" => '√', - "\xE2\x88\x9D" => '∝', - "\xE2\x88\x9E" => '∞', - "\xE2\x88\xA0" => '∠', - "\xE2\x88\xA7" => '∧', - "\xE2\x88\xA8" => '∨', - "\xE2\x88\xA9" => '∩', - "\xE2\x88\xAA" => '∪', - "\xE2\x88\xAB" => '∫', - "\xE2\x88\xB4" => '∴', - "\xE2\x88\xBC" => '∼', - "\xE2\x89\x85" => '≅', - "\xE2\x89\x88" => '≈', - "\xE2\x89\xA0" => '≠', - "\xE2\x89\xA1" => '≡', - "\xE2\x89\xA4" => '≤', - "\xE2\x89\xA5" => '≥', - "\xE2\x8A\x82" => '⊂', - "\xE2\x8A\x83" => '⊃', - "\xE2\x8A\x84" => '⊄', - "\xE2\x8A\x86" => '⊆', - "\xE2\x8A\x87" => '⊇', - "\xE2\x8A\x95" => '⊕', - "\xE2\x8A\x97" => '⊗', - "\xE2\x8A\xA5" => '⊥', - "\xE2\x8B\x85" => '⋅', - // Miscellaneous Technical - "\xE2\x8C\x88" => '⌈', - "\xE2\x8C\x89" => '⌉', - "\xE2\x8C\x8A" => '⌊', - "\xE2\x8C\x8B" => '⌋', - "\xE2\x8C\xA9" => '⟨', - "\xE2\x8C\xAA" => '⟩', - // Geometric Shapes - "\xE2\x97\x8A" => '◊', - // Miscellaneous Symbols - "\xE2\x99\xA0" => '♠', - "\xE2\x99\xA3" => '♣', - "\xE2\x99\xA5" => '♥', - "\xE2\x99\xA6" => '♦' - ) + array(// Latin1 + "\xC2\xA0" => ' ', + "\xC2\xA1" => '¡', + "\xC2\xA2" => '¢', + "\xC2\xA3" => '£', + "\xC2\xA4" => '¤', + "\xC2\xA5" => '¥', + "\xC2\xA6" => '¦', + "\xC2\xA7" => '§', + "\xC2\xA8" => '¨', + "\xC2\xA9" => '©', + "\xC2\xAA" => 'ª', + "\xC2\xAB" => '«', + "\xC2\xAC" => '¬', + "\xC2\xAD" => '­', + "\xC2\xAE" => '®', + "\xC2\xAF" => '¯', + "\xC2\xB0" => '°', + "\xC2\xB1" => '±', + "\xC2\xB2" => '²', + "\xC2\xB3" => '³', + "\xC2\xB4" => '´', + "\xC2\xB5" => 'µ', + "\xC2\xB6" => '¶', + "\xC2\xB7" => '·', + "\xC2\xB8" => '¸', + "\xC2\xB9" => '¹', + "\xC2\xBA" => 'º', + "\xC2\xBB" => '»', + "\xC2\xBC" => '¼', + "\xC2\xBD" => '½', + "\xC2\xBE" => '¾', + "\xC2\xBF" => '¿', + "\xC3\x80" => 'À', + "\xC3\x81" => 'Á', + "\xC3\x82" => 'Â', + "\xC3\x83" => 'Ã', + "\xC3\x84" => 'Ä', + "\xC3\x85" => 'Å', + "\xC3\x86" => 'Æ', + "\xC3\x87" => 'Ç', + "\xC3\x88" => 'È', + "\xC3\x89" => 'É', + "\xC3\x8A" => 'Ê', + "\xC3\x8B" => 'Ë', + "\xC3\x8C" => 'Ì', + "\xC3\x8D" => 'Í', + "\xC3\x8E" => 'Î', + "\xC3\x8F" => 'Ï', + "\xC3\x90" => 'Ð', + "\xC3\x91" => 'Ñ', + "\xC3\x92" => 'Ò', + "\xC3\x93" => 'Ó', + "\xC3\x94" => 'Ô', + "\xC3\x95" => 'Õ', + "\xC3\x96" => 'Ö', + "\xC3\x97" => '×', + "\xC3\x98" => 'Ø', + "\xC3\x99" => 'Ù', + "\xC3\x9A" => 'Ú', + "\xC3\x9B" => 'Û', + "\xC3\x9C" => 'Ü', + "\xC3\x9D" => 'Ý', + "\xC3\x9E" => 'Þ', + "\xC3\x9F" => 'ß', + "\xC3\xA0" => 'à', + "\xC3\xA1" => 'á', + "\xC3\xA2" => 'â', + "\xC3\xA3" => 'ã', + "\xC3\xA4" => 'ä', + "\xC3\xA5" => 'å', + "\xC3\xA6" => 'æ', + "\xC3\xA7" => 'ç', + "\xC3\xA8" => 'è', + "\xC3\xA9" => 'é', + "\xC3\xAA" => 'ê', + "\xC3\xAB" => 'ë', + "\xC3\xAC" => 'ì', + "\xC3\xAD" => 'í', + "\xC3\xAE" => 'î', + "\xC3\xAF" => 'ï', + "\xC3\xB0" => 'ð', + "\xC3\xB1" => 'ñ', + "\xC3\xB2" => 'ò', + "\xC3\xB3" => 'ó', + "\xC3\xB4" => 'ô', + "\xC3\xB5" => 'õ', + "\xC3\xB6" => 'ö', + "\xC3\xB7" => '÷', + "\xC3\xB8" => 'ø', + "\xC3\xB9" => 'ù', + "\xC3\xBA" => 'ú', + "\xC3\xBB" => 'û', + "\xC3\xBC" => 'ü', + "\xC3\xBD" => 'ý', + "\xC3\xBE" => 'þ', + "\xC3\xBF" => 'ÿ', + // Latin Extended-A + "\xC5\x92" => 'Œ', + "\xC5\x93" => 'œ', + "\xC5\xA0" => 'Š', + "\xC5\xA1" => 'š', + "\xC5\xB8" => 'Ÿ', + // Spacing Modifier Letters + "\xCB\x86" => 'ˆ', + "\xCB\x9C" => '˜', + // General Punctuation + "\xE2\x80\x82" => ' ', + "\xE2\x80\x83" => ' ', + "\xE2\x80\x89" => ' ', + "\xE2\x80\x8C" => '‌', + "\xE2\x80\x8D" => '‍', + "\xE2\x80\x8E" => '‎', + "\xE2\x80\x8F" => '‏', + "\xE2\x80\x93" => '–', + "\xE2\x80\x94" => '—', + "\xE2\x80\x98" => '‘', + "\xE2\x80\x99" => '’', + "\xE2\x80\x9A" => '‚', + "\xE2\x80\x9C" => '“', + "\xE2\x80\x9D" => '”', + "\xE2\x80\x9E" => '„', + "\xE2\x80\xA0" => '†', + "\xE2\x80\xA1" => '‡', + "\xE2\x80\xB0" => '‰', + "\xE2\x80\xB9" => '‹', + "\xE2\x80\xBA" => '›', + "\xE2\x82\xAC" => '€', + // Latin Extended-B + "\xC6\x92" => 'ƒ', + // Greek + "\xCE\x91" => 'Α', + "\xCE\x92" => 'Β', + "\xCE\x93" => 'Γ', + "\xCE\x94" => 'Δ', + "\xCE\x95" => 'Ε', + "\xCE\x96" => 'Ζ', + "\xCE\x97" => 'Η', + "\xCE\x98" => 'Θ', + "\xCE\x99" => 'Ι', + "\xCE\x9A" => 'Κ', + "\xCE\x9B" => 'Λ', + "\xCE\x9C" => 'Μ', + "\xCE\x9D" => 'Ν', + "\xCE\x9E" => 'Ξ', + "\xCE\x9F" => 'Ο', + "\xCE\xA0" => 'Π', + "\xCE\xA1" => 'Ρ', + "\xCE\xA3" => 'Σ', + "\xCE\xA4" => 'Τ', + "\xCE\xA5" => 'Υ', + "\xCE\xA6" => 'Φ', + "\xCE\xA7" => 'Χ', + "\xCE\xA8" => 'Ψ', + "\xCE\xA9" => 'Ω', + "\xCE\xB1" => 'α', + "\xCE\xB2" => 'β', + "\xCE\xB3" => 'γ', + "\xCE\xB4" => 'δ', + "\xCE\xB5" => 'ε', + "\xCE\xB6" => 'ζ', + "\xCE\xB7" => 'η', + "\xCE\xB8" => 'θ', + "\xCE\xB9" => 'ι', + "\xCE\xBA" => 'κ', + "\xCE\xBB" => 'λ', + "\xCE\xBC" => 'μ', + "\xCE\xBD" => 'ν', + "\xCE\xBE" => 'ξ', + "\xCE\xBF" => 'ο', + "\xCF\x80" => 'π', + "\xCF\x81" => 'ρ', + "\xCF\x82" => 'ς', + "\xCF\x83" => 'σ', + "\xCF\x84" => 'τ', + "\xCF\x85" => 'υ', + "\xCF\x86" => 'φ', + "\xCF\x87" => 'χ', + "\xCF\x88" => 'ψ', + "\xCF\x89" => 'ω', + "\xCF\x91" => 'ϑ', + "\xCF\x92" => 'ϒ', + "\xCF\x96" => 'ϖ', + // General Punctuation + "\xE2\x80\xA2" => '•', + "\xE2\x80\xA6" => '…', + "\xE2\x80\xB2" => '′', + "\xE2\x80\xB3" => '″', + "\xE2\x80\xBE" => '‾', + "\xE2\x81\x84" => '⁄', + // Letterlike Symbols + "\xE2\x84\x98" => '℘', + "\xE2\x84\x91" => 'ℑ', + "\xE2\x84\x9C" => 'ℜ', + "\xE2\x84\xA2" => '™', + "\xE2\x84\xB5" => 'ℵ', + // Arrows + "\xE2\x86\x90" => '←', + "\xE2\x86\x91" => '↑', + "\xE2\x86\x92" => '→', + "\xE2\x86\x93" => '↓', + "\xE2\x86\x94" => '↔', + "\xE2\x86\xB5" => '↵', + "\xE2\x87\x90" => '⇐', + "\xE2\x87\x91" => '⇑', + "\xE2\x87\x92" => '⇒', + "\xE2\x87\x93" => '⇓', + "\xE2\x87\x94" => '⇔', + // Mathematical Operators + "\xE2\x88\x80" => '∀', + "\xE2\x88\x82" => '∂', + "\xE2\x88\x83" => '∃', + "\xE2\x88\x85" => '∅', + "\xE2\x88\x87" => '∇', + "\xE2\x88\x88" => '∈', + "\xE2\x88\x89" => '∉', + "\xE2\x88\x8B" => '∋', + "\xE2\x88\x8F" => '∏', + "\xE2\x88\x91" => '∑', + "\xE2\x88\x92" => '−', + "\xE2\x88\x97" => '∗', + "\xE2\x88\x9A" => '√', + "\xE2\x88\x9D" => '∝', + "\xE2\x88\x9E" => '∞', + "\xE2\x88\xA0" => '∠', + "\xE2\x88\xA7" => '∧', + "\xE2\x88\xA8" => '∨', + "\xE2\x88\xA9" => '∩', + "\xE2\x88\xAA" => '∪', + "\xE2\x88\xAB" => '∫', + "\xE2\x88\xB4" => '∴', + "\xE2\x88\xBC" => '∼', + "\xE2\x89\x85" => '≅', + "\xE2\x89\x88" => '≈', + "\xE2\x89\xA0" => '≠', + "\xE2\x89\xA1" => '≡', + "\xE2\x89\xA4" => '≤', + "\xE2\x89\xA5" => '≥', + "\xE2\x8A\x82" => '⊂', + "\xE2\x8A\x83" => '⊃', + "\xE2\x8A\x84" => '⊄', + "\xE2\x8A\x86" => '⊆', + "\xE2\x8A\x87" => '⊇', + "\xE2\x8A\x95" => '⊕', + "\xE2\x8A\x97" => '⊗', + "\xE2\x8A\xA5" => '⊥', + "\xE2\x8B\x85" => '⋅', + // Miscellaneous Technical + "\xE2\x8C\x88" => '⌈', + "\xE2\x8C\x89" => '⌉', + "\xE2\x8C\x8A" => '⌊', + "\xE2\x8C\x8B" => '⌋', + "\xE2\x8C\xA9" => '⟨', + "\xE2\x8C\xAA" => '⟩', + // Geometric Shapes + "\xE2\x97\x8A" => '◊', + // Miscellaneous Symbols + "\xE2\x99\xA0" => '♠', + "\xE2\x99\xA3" => '♣', + "\xE2\x99\xA5" => '♥', + "\xE2\x99\xA6" => '♦' + ) ); ?> \ No newline at end of file diff --git a/functions/i18n.php b/functions/i18n.php index f43fb909..58395b5c 100644 --- a/functions/i18n.php +++ b/functions/i18n.php @@ -200,7 +200,7 @@ function charset_convert($in_charset,$string,$out_charset,$htmlencode=true) { * @return string $charset Adjusted name of charset */ function fixcharset($charset) { - /* remove minus and characters that might be used in paths from charset + /* remove minus and characters that might be used in paths from charset * name in order to be able to use it in function names and include calls. */ $charset=preg_replace("/[-:.\/\\\]/",'_',$charset); @@ -299,8 +299,8 @@ function set_up_language($sm_language, $do_search = false, $default = false) { } setlocale(LC_ALL, $longlocale); // Workaround for plugins that use numbers with floating point - // It might be removed if plugins use correct decimal delimiters - // according to locale settings. + // It might be removed if plugins use correct decimal delimiters + // according to locale settings. setlocale(LC_NUMERIC, 'C'); // Workaround for specific Turkish strtolower/strtoupper rules. // Many functions expect English conversion rules. @@ -717,7 +717,7 @@ function is_conversion_safe($input_charset) { global $languages, $sm_notAlias, $default_charset, $lossy_encoding; if (isset($lossy_encoding) && $lossy_encoding ) - return true; + return true; // convert to lower case $input_charset = strtolower($input_charset); diff --git a/functions/imap_asearch.php b/functions/imap_asearch.php index c60b8d10..ae4b48dc 100644 --- a/functions/imap_asearch.php +++ b/functions/imap_asearch.php @@ -33,7 +33,7 @@ $imap_asearch_debug_dump = FALSE; */ global $imap_asearch_opcodes; $imap_asearch_opcodes = array( -/* => 'asequence', */ // Special handling, @see sqimap_asearch_build_criteria() +/* => 'asequence', */ // Special handling, @see sqimap_asearch_build_criteria() /*'ALL' is binary operator */ 'ANSWERED' => '', 'BCC' => 'astring', @@ -44,7 +44,7 @@ $imap_asearch_opcodes = array( 'DRAFT' => '', 'FLAGGED' => '', 'FROM' => 'astring', - 'HEADER' => 'afield', // Special syntax for this one, @see sqimap_asearch_build_criteria() + 'HEADER' => 'afield', // Special syntax for this one, @see sqimap_asearch_build_criteria() 'KEYWORD' => 'akeyword', 'LARGER' => 'anum', 'NEW' => '', @@ -123,7 +123,7 @@ function sqimap_asearch_error_box($response, $query, $message, $link = '') $message_title = _("Possible reason : "); if (function_exists('sqimap_error_box')) sqimap_error_box($title, $query, $message_title, $message, $link); - else { //Straight copy of 1.5 imap_general.php:sqimap_error_box(). Can be removed at a later time + else { //Straight copy of 1.5 imap_general.php:sqimap_error_box(). Can be removed at a later time global $color; require_once(SM_PATH . 'functions/display_messages.php'); $string = "\n" . $title . "
    \n"; @@ -161,7 +161,7 @@ function asearch_nz(&$var, $def = '') */ function asearch_unhtmlentities($string) { $trans_tbl = array_flip(get_html_translation_table(HTML_ENTITIES)); - for ($i=127; $i<255; $i++) /* Add &#; entities */ + for ($i=127; $i<255; $i++) /* Add &#; entities */ $trans_tbl['&#' . $i . ';'] = chr($i); return strtr($string, $trans_tbl); /* I think the one above is quicker, though it should be benchmarked @@ -180,8 +180,8 @@ function s_debug_dump($var_name, $var_var) { global $imap_asearch_debug_dump; if ($imap_asearch_debug_dump) { - if (function_exists('sm_print_r')) //Only exists since 1.4.2 - sm_print_r($var_name, $var_var); //Better be the 'varargs' version ;) + if (function_exists('sm_print_r')) //Only exists since 1.4.2 + sm_print_r($var_name, $var_var); //Better be the 'varargs' version ;) else { echo '
    ';
                 echo htmlentities($var_name);
    @@ -194,21 +194,21 @@ function s_debug_dump($var_name, $var_var)
     /** Encode a string to quoted or literal as defined in rfc 3501
     *
     * -  4.3 String:
    -*	A quoted string is a sequence of zero or more 7-bit characters,
    -*	 excluding CR and LF, with double quote (<">) characters at each end.
    +*        A quoted string is a sequence of zero or more 7-bit characters,
    +*         excluding CR and LF, with double quote (<">) characters at each end.
     * -  9. Formal Syntax:
    -*	quoted-specials = DQUOTE / "\"
    +*        quoted-specials = DQUOTE / "\"
     * @param string $what string to encode
     * @param string $charset search charset used
     * @return string encoded string
     */
     function sqimap_asearch_encode_string($what, $charset)
     {
    -    if (strtoupper($charset) == 'ISO-2022-JP')	// This should be now handled in imap_utf7_local?
    +    if (strtoupper($charset) == 'ISO-2022-JP')    // This should be now handled in imap_utf7_local?
             $what = mb_convert_encoding($what, 'JIS', 'auto');
         if (preg_match('/["\\\\\r\n\x80-\xff]/', $what))
    -        return '{' . strlen($what) . "}\r\n" . $what;	// 4.3 literal form
    -    return '"' . $what . '"';	// 4.3 quoted string form
    +        return '{' . strlen($what) . "}\r\n" . $what;    // 4.3 literal form
    +    return '"' . $what . '"';    // 4.3 quoted string form
     }
     
     /**
    @@ -232,7 +232,7 @@ function sqimap_asearch_parse_date($what)
             preg_match('/^([0-9]+)-+([^\-]+)-+([0-9]+)$/', $what, $what_parts);
             if (count($what_parts) == 4) {
                 $what_month = strtolower(asearch_unhtmlentities($what_parts[2]));
    -/*		if (!in_array($what_month, $imap_asearch_months)) {*/
    +/*                if (!in_array($what_month, $imap_asearch_months)) {*/
                     foreach ($imap_asearch_months as $month_number => $month_code) {
                         if (($what_month == $month_number)
                         || ($what_month == $month_code)
    @@ -244,7 +244,7 @@ function sqimap_asearch_parse_date($what)
                             break;
                         }
                     }
    -/*		}*/
    +/*                }*/
             }
         }
         else
    @@ -285,10 +285,10 @@ function sqimap_asearch_build_criteria($opcode, $what, $charset)
                     $criteria = $opcode . ' ' . $what . ' ';
                 }
             break;
    -        case '':	//aflag
    +        case '':    //aflag
                 $criteria = $opcode . ' ';
             break;
    -        case 'afield':	/* HEADER field-name: field-body */
    +        case 'afield':    /* HEADER field-name: field-body */
                 preg_match('/^([^:]+):(.*)$/', $what, $what_parts);
                 if (count($what_parts) == 3)
                     $criteria = $opcode . ' ' .
    @@ -364,7 +364,7 @@ function sqimap_run_search($imapConnection, $search_string, $search_charset)
         }
         $messagelist = parseUidList($readin,'SEARCH');
     
    -    if (empty($messagelist))	//Empty search response, ie '* SEARCH'
    +    if (empty($messagelist))    //Empty search response, ie '* SEARCH'
             return array();
     
         $cnt = count($messagelist);
    @@ -449,13 +449,13 @@ function sqimap_asearch($imapConnection, &$mailbox_array, &$biop_array, &$unop_a
         $mbox_search = array();
         $search_string = '';
         $cur_mailbox = $mailbox_array[0];
    -    $cur_biop = '';	/* Start with ALL */
    +    $cur_biop = '';    /* Start with ALL */
         /* We loop one more time than the real array count, so the last search gets fired */
         for ($cur_crit=0,$iCnt=count($where_array); $cur_crit <= $iCnt; ++$cur_crit) {
             if (empty($exclude_array[$cur_crit])) {
                 $next_mailbox = (isset($mailbox_array[$cur_crit])) ? $mailbox_array[$cur_crit] : false;
                 if ($next_mailbox != $cur_mailbox) {
    -                $search_string = trim($search_string);	/* Trim out last space */
    +                $search_string = trim($search_string);    /* Trim out last space */
                     if ($cur_mailbox == 'All Folders')
                         $search_mboxes = $mboxes_array;
                     else if ((!empty($sub_array[$cur_crit - 1])) || (!in_array($cur_mailbox, $mboxes_array)))
    diff --git a/functions/imap_general.php b/functions/imap_general.php
    index 8a117dec..46e4f998 100755
    --- a/functions/imap_general.php
    +++ b/functions/imap_general.php
    @@ -72,7 +72,7 @@ function sqimap_run_command ($imap_stream, $query, $handle_errors, &$response,
     
             $read = sqimap_read_data ($imap_stream, $tag, $handle_errors, $response,
                                       $message, $query,$filter,$outputstream,$no_return);
    -        if (empty($read)) {	//Imap server dropped its connection
    +        if (empty($read)) {    //Imap server dropped its connection
                 $response = '';
                 $message = '';
                 return false;
    @@ -816,7 +816,7 @@ function sqimap_get_delimiter ($imap_stream = false) {
             } else {
                 fputs ($imap_stream, ". LIST \"INBOX\" \"\"\r\n");
                 $read = sqimap_read_data($imap_stream, '.', true, $a, $b);
    -            $read = $read['.'][0];	//sqimap_read_data() now returns a tag array of response array
    +            $read = $read['.'][0];    //sqimap_read_data() now returns a tag array of response array
                 $quote_position = strpos ($read[0], '"');
                 $sqimap_delimiter = substr ($read[0], $quote_position+1, 1);
             }
    @@ -831,9 +831,9 @@ function sqimap_get_delimiter ($imap_stream = false) {
      */
     function sqimap_encode_mailbox_name($what)
     {
    -	if (ereg("[\"\\\r\n]", $what))
    -		return '{' . strlen($what) . "}\r\n" . $what;	/* 4.3 literal form */
    -	return '"' . $what . '"';	/* 4.3 quoted string form */
    +    if (ereg("[\"\\\r\n]", $what))
    +        return '{' . strlen($what) . "}\r\n" . $what;        /* 4.3 literal form */
    +    return '"' . $what . '"';        /* 4.3 quoted string form */
     }
     
     /**
    @@ -989,4 +989,4 @@ function map_yp_alias($username) {
        return chop(substr($yp, strlen($username)+1));
     }
     
    -?>
    +?>
    \ No newline at end of file
    diff --git a/functions/imap_mailbox.php b/functions/imap_mailbox.php
    index 117cbe41..01482bec 100755
    --- a/functions/imap_mailbox.php
    +++ b/functions/imap_mailbox.php
    @@ -376,7 +376,7 @@ function sqimap_mailbox_rename( $imap_stream, $old_name, $new_name ) {
     
             $boxesall = sqimap_mailbox_list($imap_stream);
             $cmd = 'RENAME ' . sqimap_encode_mailbox_name($old_name) .
    -	             ' ' . sqimap_encode_mailbox_name($new_name);
    +                     ' ' . sqimap_encode_mailbox_name($new_name);
             $data = sqimap_run_command($imap_stream, $cmd, true, $response, $message);
             sqimap_unsubscribe($imap_stream, $old_name.$postfix);
             $oldpref = getPref($data_dir, $username, 'thread_'.$old_name.$postfix);
    @@ -1050,4 +1050,4 @@ function sqimap_get_status_mbx_tree($imap_stream,&$mbx_tree) {
         }
     }
     
    -?>
    +?>
    \ No newline at end of file
    diff --git a/functions/imap_search.php b/functions/imap_search.php
    index ea9cfda9..d6ea4cb0 100644
    --- a/functions/imap_search.php
    +++ b/functions/imap_search.php
    @@ -25,7 +25,7 @@ function sqimap_search($imapConnection, $search_where, $search_what, $mailbox,
                            $color, $search_position = '', $search_all, $count_all) {
     
         global $squirrelmail_language, $languages, $pos, $allow_charset_search,
    -	       $imap_server_type;
    +           $imap_server_type;
     
         $pos = $search_position;
     
    diff --git a/functions/imap_utf7_local.php b/functions/imap_utf7_local.php
    index 86acabb7..943f2620 100644
    --- a/functions/imap_utf7_local.php
    +++ b/functions/imap_utf7_local.php
    @@ -22,205 +22,205 @@
      */
     function sqimap_mb_convert_encoding($str, $to_encoding, $from_encoding, $default_charset)
     {
    -  // Allows mbstring functions only with iso-8859-*, utf-8 and
    -  // iso-2022-jp (Japanese)
    -  // koi8-r and gb2312 can be added only in php 4.3+
    -  if ( stristr($default_charset, 'iso-8859-') ||
    -       stristr($default_charset, 'utf-8') ||
    -       stristr($default_charset, 'iso-2022-jp') ) {
    -    if (function_exists('mb_convert_encoding')) {
    -      return mb_convert_encoding($str, $to_encoding, $from_encoding);
    +    // Allows mbstring functions only with iso-8859-*, utf-8 and
    +    // iso-2022-jp (Japanese)
    +    // koi8-r and gb2312 can be added only in php 4.3+
    +    if ( stristr($default_charset, 'iso-8859-') ||
    +            stristr($default_charset, 'utf-8') ||
    +            stristr($default_charset, 'iso-2022-jp') ) {
    +        if (function_exists('mb_convert_encoding')) {
    +            return mb_convert_encoding($str, $to_encoding, $from_encoding);
    +        }
         }
    -  }
    -  return '';
    +    return '';
     }
     
     function imap_utf7_encode_local($s) {
         global $languages, $squirrelmail_language;
     
         if (isset($languages[$squirrelmail_language]['XTRA_CODE']) &&
    -        function_exists($languages[$squirrelmail_language]['XTRA_CODE'].'_utf7_imap_encode')) {
    +            function_exists($languages[$squirrelmail_language]['XTRA_CODE'].'_utf7_imap_encode')) {
             return call_user_func($languages[$squirrelmail_language]['XTRA_CODE'] . '_utf7_imap_encode', $s);
         }
     
    -    if ($s == '')  //If empty, don't bother
    -      return '';
    +    if ($s == '')    //If empty, don't bother
    +        return '';
     
         global $default_charset;
    -    set_my_charset();	//must be called before using $default_charset
    +    set_my_charset();    //must be called before using $default_charset
         if ((strtolower($default_charset) != 'iso-8859-1') && ($default_charset != '')) {
    -      $utf7_s = sqimap_mb_convert_encoding($s, 'UTF7-IMAP', $default_charset, $default_charset);
    -      if ($utf7_s != '')
    -        return $utf7_s;
    +        $utf7_s = sqimap_mb_convert_encoding($s, 'UTF7-IMAP', $default_charset, $default_charset);
    +        if ($utf7_s != '')
    +            return $utf7_s;
         }
     
         // Later code works only for ISO-8859-1
     
    -	$b64_s = '';	// buffer for substring to be base64-encoded
    -	$utf7_s = '';	// imap-utf7-encoded string
    -	for ($i = 0; $i < strlen($s); $i++) {
    -		$c = $s[$i];
    -		$ord_c = ord($c);
    -		if ((($ord_c >= 0x20) and ($ord_c <= 0x25)) or
    -		    (($ord_c >= 0x27) and ($ord_c <= 0x7e))) {
    -			if ($b64_s) {
    -				$utf7_s = $utf7_s . '&' . encodeBASE64($b64_s) .'-';
    -				$b64_s = '';
    -			}
    -			$utf7_s = $utf7_s . $c;
    -		} elseif ($ord_c == 0x26) {
    -			if ($b64_s) {
    -				$utf7_s = $utf7_s . '&' . encodeBASE64($b64_s) . '-';
    -				$b64_s = '';
    -			}
    -			$utf7_s = $utf7_s . '&-';
    -		} else {
    -			$b64_s = $b64_s . chr(0) . $c;
    -		}
    -	}
    -	//
    -	// flush buffer
    -	//
    -	if ($b64_s) {
    -		$utf7_s = $utf7_s . '&' . encodeBASE64($b64_s) . '-';
    -		$b64_s = '';
    -	}
    -	return $utf7_s;
    +    $b64_s = '';     // buffer for substring to be base64-encoded
    +    $utf7_s = '';    // imap-utf7-encoded string
    +    for ($i = 0; $i < strlen($s); $i++) {
    +        $c = $s[$i];
    +        $ord_c = ord($c);
    +        if ((($ord_c >= 0x20) and ($ord_c <= 0x25)) or
    +                (($ord_c >= 0x27) and ($ord_c <= 0x7e))) {
    +            if ($b64_s) {
    +                $utf7_s = $utf7_s . '&' . encodeBASE64($b64_s) .'-';
    +                $b64_s = '';
    +            }
    +            $utf7_s = $utf7_s . $c;
    +        } elseif ($ord_c == 0x26) {
    +            if ($b64_s) {
    +                $utf7_s = $utf7_s . '&' . encodeBASE64($b64_s) . '-';
    +                $b64_s = '';
    +            }
    +            $utf7_s = $utf7_s . '&-';
    +        } else {
    +            $b64_s = $b64_s . chr(0) . $c;
    +        }
    +    }
    +    //
    +    // flush buffer
    +    //
    +    if ($b64_s) {
    +        $utf7_s = $utf7_s . '&' . encodeBASE64($b64_s) . '-';
    +        $b64_s = '';
    +    }
    +    return $utf7_s;
     }
     
     function imap_utf7_decode_local($s) {
         global $languages, $squirrelmail_language;
     
         if (isset($languages[$squirrelmail_language]['XTRA_CODE']) &&
    -        function_exists($languages[$squirrelmail_language]['XTRA_CODE'] . '_utf7_imap_decode')) {
    +            function_exists($languages[$squirrelmail_language]['XTRA_CODE'] . '_utf7_imap_decode')) {
             return call_user_func($languages[$squirrelmail_language]['XTRA_CODE'] . '_utf7_imap_decode', $s);
         }
     
    -    if ($s == '')  //If empty, don't bother
    -      return '';
    +    if ($s == '')    //If empty, don't bother
    +        return '';
     
         global $default_charset;
    -    set_my_charset();	//must be called before using $default_charset
    +    set_my_charset();    //must be called before using $default_charset
         if ((strtolower($default_charset) != 'iso-8859-1') && ($default_charset != '')) {
    -      $utf7_s = sqimap_mb_convert_encoding($s, $default_charset, 'UTF7-IMAP', $default_charset);
    -      if ($utf7_s != '')
    -        return $utf7_s;
    +        $utf7_s = sqimap_mb_convert_encoding($s, $default_charset, 'UTF7-IMAP', $default_charset);
    +        if ($utf7_s != '')
    +            return $utf7_s;
         }
     
         // Later code works only for ISO-8859-1
     
    -	$b64_s = '';
    -	$iso_8859_1_s = '';
    -	for ($i = 0, $len = strlen($s); $i < $len; $i++) {
    -		$c = $s[$i];
    -		if (strlen($b64_s) > 0) {
    -			if ($c == '-') {
    -				if ($b64_s == '&') {
    -					$iso_8859_1_s = $iso_8859_1_s . '&';
    -				} else {
    -					$iso_8859_1_s = $iso_8859_1_s .
    -					  decodeBASE64(substr($b64_s, 1));
    -				}
    -				$b64_s = '';
    -			} else {
    -				$b64_s = $b64_s . $c;
    -			}
    -		} else {
    -			if ($c == '&') {
    -				$b64_s = '&';
    -			} else {
    -				$iso_8859_1_s = $iso_8859_1_s . $c;
    -			}
    -		}
    -	}
    -	return $iso_8859_1_s;
    +    $b64_s = '';
    +    $iso_8859_1_s = '';
    +    for ($i = 0, $len = strlen($s); $i < $len; $i++) {
    +        $c = $s[$i];
    +        if (strlen($b64_s) > 0) {
    +            if ($c == '-') {
    +                if ($b64_s == '&') {
    +                    $iso_8859_1_s = $iso_8859_1_s . '&';
    +                } else {
    +                    $iso_8859_1_s = $iso_8859_1_s .
    +                        decodeBASE64(substr($b64_s, 1));
    +                }
    +                $b64_s = '';
    +            } else {
    +                $b64_s = $b64_s . $c;
    +            }
    +        } else {
    +            if ($c == '&') {
    +                $b64_s = '&';
    +            } else {
    +                $iso_8859_1_s = $iso_8859_1_s . $c;
    +            }
    +        }
    +    }
    +    return $iso_8859_1_s;
     }
     
     function encodeBASE64($s) {
    -	$B64Chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+,';
    -	$p = 0;		// phase: 1 / 2 / 3 / 1 / 2 / 3...
    -	$e = '';	// base64-encoded string
    -	//foreach($s as $c) {
    -	for ($i = 0; $i < strlen($s); $i++) {
    -		$c = $s[$i];
    -		if ($p == 0) {
    -			$e = $e . substr($B64Chars, ((ord($c) & 252) >> 2), 1);
    -			$t = (ord($c) & 3);
    -			$p = 1;
    -		} elseif ($p == 1) {
    -			$e = $e . $B64Chars[($t << 4) + ((ord($c) & 240) >> 4)];
    -			$t = (ord($c) & 15);
    -			$p = 2;
    -		} elseif ($p == 2) {
    -			$e = $e . $B64Chars[($t << 2) + ((ord($c) & 192) >> 6)];
    -			$e = $e . $B64Chars[ord($c) & 63];
    -			$p = 0;
    -		}
    -	}
    -	//
    -	// flush buffer
    -	//
    -	if ($p == 1) {
    -		$e = $e . $B64Chars[$t << 4];
    -	} elseif ($p == 2) {
    -		$e = $e . $B64Chars[$t << 2];
    -	}
    -	return $e;
    +    $B64Chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+,';
    +    $p = 0;     // phase: 1 / 2 / 3 / 1 / 2 / 3...
    +    $e = '';    // base64-encoded string
    +    //foreach($s as $c) {
    +    for ($i = 0; $i < strlen($s); $i++) {
    +        $c = $s[$i];
    +        if ($p == 0) {
    +            $e = $e . substr($B64Chars, ((ord($c) & 252) >> 2), 1);
    +            $t = (ord($c) & 3);
    +            $p = 1;
    +        } elseif ($p == 1) {
    +            $e = $e . $B64Chars[($t << 4) + ((ord($c) & 240) >> 4)];
    +            $t = (ord($c) & 15);
    +            $p = 2;
    +        } elseif ($p == 2) {
    +            $e = $e . $B64Chars[($t << 2) + ((ord($c) & 192) >> 6)];
    +            $e = $e . $B64Chars[ord($c) & 63];
    +            $p = 0;
    +        }
    +    }
    +    //
    +    // flush buffer
    +    //
    +    if ($p == 1) {
    +        $e = $e . $B64Chars[$t << 4];
    +    } elseif ($p == 2) {
    +        $e = $e . $B64Chars[$t << 2];
    +    }
    +    return $e;
     }
     
     function decodeBASE64($s) {
    -	$B64Values = array(
    -		'A' =>  0, 'B' =>  1, 'C' =>  2, 'D' =>  3, 'E' =>  4, 'F' =>  5,
    -		'G' =>  6, 'H' =>  7, 'I' =>  8, 'J' =>  9, 'K' => 10, 'L' => 11,
    -		'M' => 12, 'N' => 13, 'O' => 14, 'P' => 15, 'Q' => 16, 'R' => 17,
    -		'S' => 18, 'T' => 19, 'U' => 20, 'V' => 21, 'W' => 22, 'X' => 23,
    -		'Y' => 24, 'Z' => 25,
    -		'a' => 26, 'b' => 27, 'c' => 28, 'd' => 29, 'e' => 30, 'f' => 31,
    -		'g' => 32, 'h' => 33, 'i' => 34, 'j' => 35, 'k' => 36, 'l' => 37,
    -		'm' => 38, 'n' => 39, 'o' => 40, 'p' => 41, 'q' => 42, 'r' => 43,
    -		's' => 44, 't' => 45, 'u' => 46, 'v' => 47, 'w' => 48, 'x' => 49,
    -		'y' => 50, 'z' => 51,
    -		'0' => 52, '1' => 53, '2' => 54, '3' => 55, '4' => 56, '5' => 57,
    -		'6' => 58, '7' => 59, '8' => 60, '9' => 61, '+' => 62, ',' => 63
    -	);
    -	$p = 0;
    -	$d = '';
    -	$unicodeNullByteToggle = 0;
    -	for ($i = 0, $len = strlen($s); $i < $len; $i++) {
    -		$c = $s[$i];
    -		if ($p == 0) {
    -			$t = $B64Values[$c];
    -			$p = 1;
    -		} elseif ($p == 1) {
    -			if ($unicodeNullByteToggle) {
    -				$d = $d . chr(($t << 2) + (($B64Values[$c] & 48) >> 4));
    -				$unicodeNullByteToggle = 0;
    -			} else {
    -				$unicodeNullByteToggle = 1;
    -			}
    -			$t = ($B64Values[$c] & 15);
    -			$p = 2;
    -		} elseif ($p == 2) {
    -			if ($unicodeNullByteToggle) {
    -				$d = $d . chr(($t << 4) + (($B64Values[$c] & 60) >> 2));
    -				$unicodeNullByteToggle = 0;
    -			} else {
    -				$unicodeNullByteToggle = 1;
    -			}
    -			$t = ($B64Values[$c] & 3);
    -			$p = 3;
    -		} elseif ($p == 3) {
    -			if ($unicodeNullByteToggle) {
    -				$d = $d . chr(($t << 6) + $B64Values[$c]);
    -				$unicodeNullByteToggle = 0;
    -			} else {
    -				$unicodeNullByteToggle = 1;
    -			}
    -			$t = ($B64Values[$c] & 3);
    -			$p = 0;
    -		}
    -	}
    -	return $d;
    +    $B64Values = array(
    +            'A' =>  0, 'B' =>  1, 'C' =>  2, 'D' =>  3, 'E' =>  4, 'F' =>  5,
    +            'G' =>  6, 'H' =>  7, 'I' =>  8, 'J' =>  9, 'K' => 10, 'L' => 11,
    +            'M' => 12, 'N' => 13, 'O' => 14, 'P' => 15, 'Q' => 16, 'R' => 17,
    +            'S' => 18, 'T' => 19, 'U' => 20, 'V' => 21, 'W' => 22, 'X' => 23,
    +            'Y' => 24, 'Z' => 25,
    +            'a' => 26, 'b' => 27, 'c' => 28, 'd' => 29, 'e' => 30, 'f' => 31,
    +            'g' => 32, 'h' => 33, 'i' => 34, 'j' => 35, 'k' => 36, 'l' => 37,
    +            'm' => 38, 'n' => 39, 'o' => 40, 'p' => 41, 'q' => 42, 'r' => 43,
    +            's' => 44, 't' => 45, 'u' => 46, 'v' => 47, 'w' => 48, 'x' => 49,
    +            'y' => 50, 'z' => 51,
    +            '0' => 52, '1' => 53, '2' => 54, '3' => 55, '4' => 56, '5' => 57,
    +            '6' => 58, '7' => 59, '8' => 60, '9' => 61, '+' => 62, ',' => 63
    +            );
    +    $p = 0;
    +    $d = '';
    +    $unicodeNullByteToggle = 0;
    +    for ($i = 0, $len = strlen($s); $i < $len; $i++) {
    +        $c = $s[$i];
    +        if ($p == 0) {
    +            $t = $B64Values[$c];
    +            $p = 1;
    +        } elseif ($p == 1) {
    +            if ($unicodeNullByteToggle) {
    +                $d = $d . chr(($t << 2) + (($B64Values[$c] & 48) >> 4));
    +                $unicodeNullByteToggle = 0;
    +            } else {
    +                $unicodeNullByteToggle = 1;
    +            }
    +            $t = ($B64Values[$c] & 15);
    +            $p = 2;
    +        } elseif ($p == 2) {
    +            if ($unicodeNullByteToggle) {
    +                $d = $d . chr(($t << 4) + (($B64Values[$c] & 60) >> 2));
    +                $unicodeNullByteToggle = 0;
    +            } else {
    +                $unicodeNullByteToggle = 1;
    +            }
    +            $t = ($B64Values[$c] & 3);
    +            $p = 3;
    +        } elseif ($p == 3) {
    +            if ($unicodeNullByteToggle) {
    +                $d = $d . chr(($t << 6) + $B64Values[$c]);
    +                $unicodeNullByteToggle = 0;
    +            } else {
    +                $unicodeNullByteToggle = 1;
    +            }
    +            $t = ($B64Values[$c] & 3);
    +            $p = 0;
    +        }
    +    }
    +    return $d;
     }
     
     ?>
    \ No newline at end of file
    diff --git a/functions/mailbox_display.php b/functions/mailbox_display.php
    index e9291462..eef07eff 100644
    --- a/functions/mailbox_display.php
    +++ b/functions/mailbox_display.php
    @@ -1498,7 +1498,7 @@ function get_selectall_link($aMailbox) {
                 $result = preg_replace("/checkall=(\d)/","checkall=$checkall_val",$result);
             }
     
    -        // FIXME: I suspect that search pages use different variables in 1.5.1cvs 
    +        // FIXME: I suspect that search pages use different variables in 1.5.1cvs
             // and these variables are present in $PHP_SELF.
             if (isset($aMailbox['SEARCH']) && isset($aMailbox['SEARCH'][0]) && ! sqgetGlobalVar('where',$tmp,SQ_GET)) {
                 $result .= '&where=' . urlencode($aMailbox['SEARCH'][0]);
    @@ -2067,7 +2067,7 @@ function handleMessageListForm($imapConnection,&$aMailbox,$sButton='',$aUid = ar
                     if (($aMailbox['PAGEOFFSET']-1) >= $aMailbox['EXISTS']) {
                         $aMailbox['PAGEOFFSET'] = ($aMailbox['PAGEOFFSET'] > $aMailbox['LIMIT']) ?
                             $aMailbox['PAGEOFFSET'] - $aMailbox['LIMIT'] : 1;
    -                    $aMailbox['OFFSET'] = $aMailbox['PAGEOFFSET'] - 1 ; 
    +                    $aMailbox['OFFSET'] = $aMailbox['PAGEOFFSET'] - 1 ;
                     }
                 }
             }
    diff --git a/functions/page_header.php b/functions/page_header.php
    index b193b73f..9561f0f4 100644
    --- a/functions/page_header.php
    +++ b/functions/page_header.php
    @@ -38,7 +38,7 @@ function displayHtmlHeader( $title = 'SquirrelMail', $xtra = '', $do_hook = true
     
         if ($frames) {
             echo '';
    -    } else {          
    +    } else {
             echo '';
         }
         echo "\n\n" . html_tag( 'html' ,'' , '', '', 'lang="'.$squirrelmail_language.'"' ) . "\n\n";
    @@ -302,7 +302,7 @@ function displayPageHeader($color, $mailbox, $xtra='', $session=false) {
         echo "\n\n";
         /** Here is the header and wrapping table **/
         $shortBoxName = htmlspecialchars(imap_utf7_decode_local(
    -		      readShortMailboxName($mailbox, $delimiter)));
    +                readShortMailboxName($mailbox, $delimiter)));
         if ( $shortBoxName == 'INBOX' ) {
             $shortBoxName = _("INBOX");
         }
    diff --git a/functions/plugin.php b/functions/plugin.php
    index 04d7e89d..bcf034f4 100644
    --- a/functions/plugin.php
    +++ b/functions/plugin.php
    @@ -199,4 +199,4 @@ if (isset($plugins) && is_array($plugins)) {
         }
     }
     
    -?>
    +?>
    \ No newline at end of file
    diff --git a/functions/strings.php b/functions/strings.php
    index 44ad59d2..0997f6fd 100644
    --- a/functions/strings.php
    +++ b/functions/strings.php
    @@ -977,7 +977,7 @@ function sq_htmlentities($string,$quote_style=ENT_COMPAT,$charset='us-ascii') {
      * Tests if string contains 8bit symbols.
      *
      * If charset is not set, function defaults to default_charset.
    - * $default_charset global must be set correctly if $charset is 
    + * $default_charset global must be set correctly if $charset is
      * not used.
      * @param string $string tested string
      * @param string $charset charset used in a string
    @@ -991,7 +991,7 @@ function sq_is8bit($string,$charset='') {
     
         /**
          * Don't use \240 in ranges. Sometimes RH 7.2 doesn't like it.
    -     * Don't use \200-\237 for iso-8859-x charsets. This ranges 
    +     * Don't use \200-\237 for iso-8859-x charsets. This ranges
          * stores control symbols in those charsets.
          * Use preg_match instead of ereg in order to avoid problems
          * with mbstring overloading
    @@ -1011,10 +1011,10 @@ function sq_is8bit($string,$charset='') {
      * in php 5.x. Function does not test all mbstring encodings. Only the ones
      * that might be used in SM translations.
      *
    - * Supported arrays are stored in session in order to reduce number of 
    + * Supported arrays are stored in session in order to reduce number of
      * mb_internal_encoding function calls.
      *
    - * If you want to test all mbstring encodings - fill $list_of_encodings 
    + * If you want to test all mbstring encodings - fill $list_of_encodings
      * array.
      * @return array list of encodings supported by mbstring
      * @since 1.5.1
    diff --git a/functions/url_parser.php b/functions/url_parser.php
    index 8525cc24..23eb8c9a 100644
    --- a/functions/url_parser.php
    +++ b/functions/url_parser.php
    @@ -135,8 +135,8 @@ function parseUrl (&$body) {
             }
     
             /* If there was a token to replace, replace it */
    -        if ($target_token == 'mailto:') {	// rfc 2368 (mailto URL)
    -            $target_pos += 7;	//skip mailto:
    +        if ($target_token == 'mailto:') {    // rfc 2368 (mailto URL)
    +            $target_pos += 7;    //skip mailto:
                 $end = $blength;
     
                 $mailto = substr($body, $target_pos, $end-$target_pos);
    @@ -146,12 +146,12 @@ function parseUrl (&$body) {
                     //sm_print_r($regs);
                     $mailto_before = $target_token . $regs[0];
                     $mailto_params = $regs[10];
    -                if ($regs[1]) {	//if there is an email addr before '?', we need to merge it with the params
    +                if ($regs[1]) {    //if there is an email addr before '?', we need to merge it with the params
                         $to = 'to=' . $regs[1];
    -                    if (strpos($mailto_params, 'to=') > -1)	//already a 'to='
    +                    if (strpos($mailto_params, 'to=') > -1)    //already a 'to='
                             $mailto_params = str_replace('to=', $to . '%2C%20', $mailto_params);
                         else {
    -                        if ($mailto_params)	//already some params, append to them
    +                        if ($mailto_params)    //already some params, append to them
                                 $mailto_params .= '&' . $to;
                             else
                                 $mailto_params .= '?' . $to;
    @@ -214,8 +214,8 @@ function getEmail($string) {
         /* Find all the email addresses in the body */
         while (eregi($Email_RegExp_Match, $string, $regs)) {
             $addresses[$regs[0]] = strtr($regs[0], array('&' => '&'));
    -       	$start = strpos($string, $regs[0]) + strlen($regs[0]);
    -       	$string = substr($string, $start);
    +        $start = strpos($string, $regs[0]) + strlen($regs[0]);
    +        $string = substr($string, $start);
         }
     
         /* Return the first address, or an empty string if no address was found */
    diff --git a/help/index.php b/help/index.php
    index 80f6931b..586f2153 100644
    --- a/help/index.php
    +++ b/help/index.php
    @@ -17,4 +17,4 @@ header("Location:../index.php");
     
     /* pretty impressive huh? */
     
    -?>
    +?>
    \ No newline at end of file
    diff --git a/images/index.php b/images/index.php
    index 9d9ed2ca..2cb4d2bb 100644
    --- a/images/index.php
    +++ b/images/index.php
    @@ -11,4 +11,4 @@
     header("Location:../index.php");
     
     /** pretty impressive huh? **/
    -?>
    +?>
    \ No newline at end of file
    diff --git a/images/themes/default/index.php b/images/themes/default/index.php
    index f86109e8..ff495ba8 100644
    --- a/images/themes/default/index.php
    +++ b/images/themes/default/index.php
    @@ -1,3 +1,3 @@
     
    +?>
    \ No newline at end of file
    diff --git a/images/themes/default/theme.php b/images/themes/default/theme.php
    index 46aef759..9fbf6c77 100644
    --- a/images/themes/default/theme.php
    +++ b/images/themes/default/theme.php
    @@ -6,4 +6,4 @@
      * @subpackage themes
      */
         $icon_themes[] = array('NAME'=>_("Default"),'PATH'=> 'default');
    -?>
    +?>
    \ No newline at end of file
    diff --git a/images/themes/index.php b/images/themes/index.php
    index 9d9ed2ca..2cb4d2bb 100644
    --- a/images/themes/index.php
    +++ b/images/themes/index.php
    @@ -11,4 +11,4 @@
     header("Location:../index.php");
     
     /** pretty impressive huh? **/
    -?>
    +?>
    \ No newline at end of file
    diff --git a/images/themes/none/index.php b/images/themes/none/index.php
    index 96b72340..18ddb52f 100644
    --- a/images/themes/none/index.php
    +++ b/images/themes/none/index.php
    @@ -14,4 +14,4 @@
     header("Location: src/login.php\n\n");
     
     ?>
    -
    +
    \ No newline at end of file
    diff --git a/images/themes/none/theme.php b/images/themes/none/theme.php
    index 3df297ce..541c4aa2 100644
    --- a/images/themes/none/theme.php
    +++ b/images/themes/none/theme.php
    @@ -6,4 +6,4 @@
      * @subpackage themes
      */
         $icon_themes[] = array('NAME'=>_("None"),'PATH'=> 'none');
    -?>
    +?>
    \ No newline at end of file
    diff --git a/images/themes/xp/index.php b/images/themes/xp/index.php
    index 9d9ed2ca..2cb4d2bb 100644
    --- a/images/themes/xp/index.php
    +++ b/images/themes/xp/index.php
    @@ -11,4 +11,4 @@
     header("Location:../index.php");
     
     /** pretty impressive huh? **/
    -?>
    +?>
    \ No newline at end of file
    diff --git a/images/themes/xp/theme.php b/images/themes/xp/theme.php
    index dc42eaac..e308dd10 100644
    --- a/images/themes/xp/theme.php
    +++ b/images/themes/xp/theme.php
    @@ -6,4 +6,4 @@
      * @subpackage themes
      */
         $icon_themes[] = array('NAME'=>_("XP"),'PATH'=> 'xp');
    -?>
    +?>
    \ No newline at end of file
    diff --git a/include/index.php b/include/index.php
    index 7e4fc5ca..c5e70db3 100644
    --- a/include/index.php
    +++ b/include/index.php
    @@ -1,3 +1,3 @@
     
    +?>
    \ No newline at end of file
    diff --git a/include/options/display.php b/include/options/display.php
    index 44101a7e..08e0c283 100644
    --- a/include/options/display.php
    +++ b/include/options/display.php
    @@ -47,7 +47,7 @@ if ($use_icons) {
      * @return array all option information
      */
     function load_optpage_data_display() {
    -    global $theme, $language, $languages, 
    +    global $theme, $language, $languages,
         $default_use_mdn, $squirrelmail_language, $allow_thread_sort,
         $show_alternative_names, $available_languages, $use_icons;
     
    diff --git a/include/options/index.php b/include/options/index.php
    index 7e4fc5ca..c5e70db3 100644
    --- a/include/options/index.php
    +++ b/include/options/index.php
    @@ -1,3 +1,3 @@
     
    +?>
    \ No newline at end of file
    diff --git a/include/options/personal.php b/include/options/personal.php
    index 7d149852..7aa084ac 100644
    --- a/include/options/personal.php
    +++ b/include/options/personal.php
    @@ -130,7 +130,7 @@ function load_optpage_data_personal() {
                 'comment' =>  $identities_link_value
             );
         }
    -    
    +
         if ( $tzChangeAllowed ) {
             $TZ_ARRAY[SMPREF_NONE] = _("Same as server");
             $tzfile = SM_PATH . 'locale/timezones.cfg';
    @@ -161,7 +161,7 @@ function load_optpage_data_personal() {
                 'posvals' => $TZ_ARRAY
             );
         }
    -    
    +
         /*** Load the Reply Citation Options into the array ***/
         $optgrps[SMOPT_GRP_REPLY] = _("Reply Citation Options");
         $optvals[SMOPT_GRP_REPLY] = array();
    diff --git a/include/validate.php b/include/validate.php
    index aeed3e12..c6804495 100644
    --- a/include/validate.php
    +++ b/include/validate.php
    @@ -15,14 +15,14 @@
      *
      * From http://www.php.net/manual/en/language.oop.serialization.php:
      *   In case this isn't clear:
    - *   In 4.2 and below: 
    + *   In 4.2 and below:
      *      session.auto_start and session objects are mutually exclusive.
      *
    - * We need to load the classes before the session is started, 
    - * except that the session could be started automatically 
    - * via session.auto_start. So, we'll close the session, 
    - * then load the classes, and reopen the session which should 
    - * make everything happy.  
    + * We need to load the classes before the session is started,
    + * except that the session could be started automatically
    + * via session.auto_start. So, we'll close the session,
    + * then load the classes, and reopen the session which should
    + * make everything happy.
      *
      * ** Note this means that for the 1.3.2 release, we should probably
      * recommend that people set session.auto_start=0 to avoid this altogether.
    @@ -91,16 +91,16 @@ set_up_language(getPref($data_dir, $username, 'language'));
     $timeZone = getPref($data_dir, $username, 'timezone');
     
     /* Check to see if we are allowed to set the TZ environment variable.
    - * We are able to do this if ... 
    + * We are able to do this if ...
      *   safe_mode is disabled OR
      *   safe_mode_allowed_env_vars is empty (you are allowed to set any) OR
    - *   safe_mode_allowed_env_vars contains TZ 
    + *   safe_mode_allowed_env_vars contains TZ
      */
     $tzChangeAllowed = (!ini_get('safe_mode')) ||
    -                    !strcmp(ini_get('safe_mode_allowed_env_vars'),'') || 
    -                    preg_match('/^([\w_]+,)*TZ/', ini_get('safe_mode_allowed_env_vars')); 
    +                    !strcmp(ini_get('safe_mode_allowed_env_vars'),'') ||
    +                    preg_match('/^([\w_]+,)*TZ/', ini_get('safe_mode_allowed_env_vars'));
     
    -if ( $timeZone != SMPREF_NONE && ($timeZone != "") 
    +if ( $timeZone != SMPREF_NONE && ($timeZone != "")
         && $tzChangeAllowed ) {
         putenv("TZ=".$timeZone);
     }
    diff --git a/index.php b/index.php
    index 96b72340..18ddb52f 100644
    --- a/index.php
    +++ b/index.php
    @@ -14,4 +14,4 @@
     header("Location: src/login.php\n\n");
     
     ?>
    -
    +
    \ No newline at end of file
    diff --git a/locale/index.php b/locale/index.php
    index b86832a0..5f28c145 100644
    --- a/locale/index.php
    +++ b/locale/index.php
    @@ -17,4 +17,4 @@ header("Location:../index.php");
     
     /* pretty impressive huh? */
     
    -?>
    +?>
    \ No newline at end of file
    diff --git a/plugins/abook_take/functions.php b/plugins/abook_take/functions.php
    index 59c64a4c..536bf18d 100644
    --- a/plugins/abook_take/functions.php
    +++ b/plugins/abook_take/functions.php
    @@ -99,4 +99,4 @@ function abook_take_save()
             setPref($data_dir, $username, 'abook_take_verify', '');
     }
     
    -?>
    +?>
    \ No newline at end of file
    diff --git a/plugins/abook_take/setup.php b/plugins/abook_take/setup.php
    index 59783198..414e5950 100755
    --- a/plugins/abook_take/setup.php
    +++ b/plugins/abook_take/setup.php
    @@ -60,4 +60,4 @@ function abook_take_options_display_save() {
         abook_take_save();
     }
     
    -?>
    +?>
    \ No newline at end of file
    diff --git a/plugins/abook_take/take.php b/plugins/abook_take/take.php
    index 4fee84b1..c3f9dc33 100644
    --- a/plugins/abook_take/take.php
    +++ b/plugins/abook_take/take.php
    @@ -45,4 +45,4 @@ $formdata=array('email'=>$addrs);
     abook_create_form(SM_PATH . 'src/addressbook.php','addaddr',_("Add to address book"),_("Add address"),$formdata);
     echo '';
     ?>
    -
    +
    \ No newline at end of file
    diff --git a/plugins/administrator/auth.php b/plugins/administrator/auth.php
    index 120a3f52..b2c2617c 100644
    --- a/plugins/administrator/auth.php
    +++ b/plugins/administrator/auth.php
    @@ -22,7 +22,7 @@
     function adm_check_user() {
         global $PHP_SELF;
         require_once(SM_PATH . 'functions/global.php');
    -    
    +
         if ( !sqgetGlobalVar('username',$username,SQ_SESSION) ) {
             $username = '';
         }
    diff --git a/plugins/administrator/index.php b/plugins/administrator/index.php
    index 1df65c34..bf1e3338 100644
    --- a/plugins/administrator/index.php
    +++ b/plugins/administrator/index.php
    @@ -14,4 +14,4 @@
        header("Location:../../src/login.php\n\n");
        exit();
     
    -?>
    +?>
    \ No newline at end of file
    diff --git a/plugins/administrator/options.php b/plugins/administrator/options.php
    index f83688d5..3b7e1a82 100644
    --- a/plugins/administrator/options.php
    +++ b/plugins/administrator/options.php
    @@ -146,31 +146,31 @@ function parseConfig( $cfg_file ) {
      *    '/absolute/path/logo.gif'   --> /absolute/path/logo.gif
      *    'http://whatever/'          --> http://whatever
      *  Note removal of quotes in returned value
    - *  
    + *
      * @param string $old_path path that has to be converted
      * @return string new path
      * @access private
      */
     function change_to_rel_path($old_path) {
    -    $new_path = str_replace("SM_PATH . '", "../", $old_path); 
    +    $new_path = str_replace("SM_PATH . '", "../", $old_path);
         $new_path = str_replace("../config/","", $new_path);
         $new_path = str_replace("'","", $new_path);
         return $new_path;
     }
     
     /**
    - * Change relative path (relative to config dir) to 
    + * Change relative path (relative to config dir) to
      *  internal SM_PATH, i.e.:
      *     empty_string            --> ''
      *     ../images/logo.gif      --> SM_PATH . 'images/logo.gif'
      *     images/logo.gif         --> SM_PATH . 'config/images/logo.gif'
      *     /absolute/path/logo.gif --> '/absolute/path/logo.gif'
      *     http://whatever/        --> 'http://whatever'
    - *  
    + *
      * @param string $old_path path that has to be converted
      * @return string new path
      * @access private
    -*/     
    +*/
     function change_to_sm_path($old_path) {
         if ( $old_path === '' || $old_path == "''" ) {
             return "''";
    @@ -179,15 +179,15 @@ function change_to_sm_path($old_path) {
         } elseif ( preg_match("/^(\$|SM_PATH)/", $old_path) ) {
             return $old_path;
         }
    -   
    +
         $new_path = '';
         $rel_path = explode("../", $old_path);
         if ( count($rel_path) > 2 ) {
    -        // Since we're relative to the config dir, 
    +        // Since we're relative to the config dir,
             // more than 1 ../ puts us OUTSIDE the SM tree.
             // get full path to config.php, then pop the filename
             $abs_path = explode('/', realpath (SM_PATH . 'config/config.php'));
    -        array_pop ($abs_path); 
    +        array_pop ($abs_path);
             foreach ( $rel_path as $subdir ) {
                 if ( $subdir === '' ) {
                     array_pop ($abs_path);
    @@ -203,9 +203,9 @@ function change_to_sm_path($old_path) {
             // we're within the SM tree, prepend SM_PATH
             $new_path = str_replace('../',"SM_PATH . '", $old_path . "'");
         } else {
    -        // Last, if it's a relative path without a .. prefix, 
    +        // Last, if it's a relative path without a .. prefix,
             // we're somewhere within the config dir, so prepend
    -        //  SM_PATH . 'config/  
    +        //  SM_PATH . 'config/
             $new_path = "SM_PATH . 'config/" . $old_path . "'";
         }
         return $new_path;
    diff --git a/plugins/administrator/setup.php b/plugins/administrator/setup.php
    index 128cea5a..bbf5726d 100644
    --- a/plugins/administrator/setup.php
    +++ b/plugins/administrator/setup.php
    @@ -22,7 +22,7 @@ require_once(SM_PATH . 'plugins/administrator/auth.php');
     function squirrelmail_plugin_init_administrator() {
         global $squirrelmail_plugin_hooks;
     
    -    if ( adm_check_user() ) {        
    +    if ( adm_check_user() ) {
             $squirrelmail_plugin_hooks['optpage_register_block']['administrator'] =
                                       'squirrelmail_administrator_optpage_register_block';
         }
    diff --git a/plugins/bug_report/bug_report.php b/plugins/bug_report/bug_report.php
    index 58917c43..7c37de61 100644
    --- a/plugins/bug_report/bug_report.php
    +++ b/plugins/bug_report/bug_report.php
    @@ -58,7 +58,7 @@ $body = htmlspecialchars($body_top) . $body;
         
     
     ';
     echo _("Before you send your bug report, please make sure to check this checklist for any common problems.");
    @@ -72,7 +72,7 @@ echo "\n";
     echo '
  • '; printf(_("Check to see if your bug is already listed in the %sBug List%s on SourceForge. If it is, we already know about it and are trying to fix it."), '', ''); echo "
  • \n"; - + echo '
  • '; echo _("Try to make sure that you can repeat it. If the bug happens sporatically, try to document what you did when it happened. If it always occurs when you view a specific message, keep that message around so maybe we can see it."); echo "
  • \n"; @@ -136,4 +136,4 @@ echo html_tag('table', ), 'center', '', 'width="95%"'); ?> - + \ No newline at end of file diff --git a/plugins/bug_report/functions.php b/plugins/bug_report/functions.php index 733bebe6..3aaa0b96 100644 --- a/plugins/bug_report/functions.php +++ b/plugins/bug_report/functions.php @@ -28,7 +28,7 @@ function add_gmane_form() { html_tag('td',addInput('query','',50),'left') ) . html_tag('tr', - html_tag('td',_("Written by:") . '
    ' . + html_tag('td',_("Written by:") . '
    ' . '' . _("Email addresses only") . '','right') . html_tag('td',addInput('email','',40),'left') ) . diff --git a/plugins/bug_report/index.php b/plugins/bug_report/index.php index 518cf662..64cc67d2 100644 --- a/plugins/bug_report/index.php +++ b/plugins/bug_report/index.php @@ -16,4 +16,4 @@ header("Location:../../src/login.php\n\n"); exit(); -?> +?> \ No newline at end of file diff --git a/plugins/bug_report/setup.php b/plugins/bug_report/setup.php index 5c8bb459..0c2bd4e1 100644 --- a/plugins/bug_report/setup.php +++ b/plugins/bug_report/setup.php @@ -90,4 +90,4 @@ function bug_report_options() { '' . _("Show system specs") . ''; } -?> +?> \ No newline at end of file diff --git a/plugins/bug_report/show_system_specs.php b/plugins/bug_report/show_system_specs.php index 2f9f5b7a..c3399d24 100644 --- a/plugins/bug_report/show_system_specs.php +++ b/plugins/bug_report/show_system_specs.php @@ -34,4 +34,4 @@ echo $body; ?>
    - + \ No newline at end of file diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php index 440c8d19..5e58f3ab 100644 --- a/plugins/calendar/calendar.php +++ b/plugins/calendar/calendar.php @@ -177,4 +177,4 @@ drawmonthview(); endcalendar(); ?> - + \ No newline at end of file diff --git a/plugins/calendar/calendar_data.php b/plugins/calendar/calendar_data.php index 73dc8608..1441f513 100644 --- a/plugins/calendar/calendar_data.php +++ b/plugins/calendar/calendar_data.php @@ -46,11 +46,11 @@ function readcalendardata() { fclose ($fp); // this is to sort the events within a day on starttime $new_calendardata = array(); - foreach($calendardata as $day => $data) { + foreach($calendardata as $day => $data) { ksort($data, SORT_NUMERIC); $new_calendardata[$day] = $data; } - $calendardata = $new_calendardata; + $calendardata = $new_calendardata; } } } @@ -68,8 +68,8 @@ function writecalendardata() { $calfoobar = $calendardata[$calfoo['key']][$calbar['key']]; $calstr = "$calfoo[key]|$calbar[key]|$calfoobar[length]|$calfoobar[priority]|$calfoobar[title]|$calfoobar[message]|$calfoobar[reminder]\n"; if(sq_fwrite($fp, $calstr, 4096) === FALSE) { - error_box(_("Could not write calendar file %s", "$username.$year.cal.tmp"), $color); - } + error_box(_("Could not write calendar file %s", "$username.$year.cal.tmp"), $color); + } } } @@ -127,4 +127,4 @@ function update_event($date, $time) { } -?> +?> \ No newline at end of file diff --git a/plugins/calendar/day.php b/plugins/calendar/day.php index 8e2dedab..2a6a7682 100644 --- a/plugins/calendar/day.php +++ b/plugins/calendar/day.php @@ -61,7 +61,7 @@ function day_header() { echo html_tag( 'tr', '', '', $color[0] ) . "\n". html_tag( 'td', '', 'left' ) . html_tag( 'table', '', '', $color[0], 'width="100%" border="0" cellpadding="2" cellspacing="1"' ) ."\n" . - html_tag( 'tr', + html_tag( 'tr', html_tag( 'th', "< ". date_intl('D',$prev_date)."", @@ -179,4 +179,4 @@ initialize_events(); display_events(); ?> - + \ No newline at end of file diff --git a/plugins/calendar/event_create.php b/plugins/calendar/event_create.php index da1e49e9..d39d6147 100644 --- a/plugins/calendar/event_create.php +++ b/plugins/calendar/event_create.php @@ -208,4 +208,4 @@ if(!isset($event_text)){ ?> - + \ No newline at end of file diff --git a/plugins/calendar/event_delete.php b/plugins/calendar/event_delete.php index fa94d380..d70060d4 100644 --- a/plugins/calendar/event_delete.php +++ b/plugins/calendar/event_delete.php @@ -8,7 +8,7 @@ * * Originally contrubuted by Michal Szczotka * - * Functions to delete a event. + * Functions to delete a event. * * $Id$ * @package plugins @@ -177,4 +177,4 @@ if (isset($dyear) && isset($dmonth) && isset($dday) && isset($dhour) && isset($d ?> - + \ No newline at end of file diff --git a/plugins/calendar/event_edit.php b/plugins/calendar/event_edit.php index 28e3e0a9..4cf27185 100644 --- a/plugins/calendar/event_edit.php +++ b/plugins/calendar/event_edit.php @@ -304,7 +304,7 @@ if (!isset($updated)){ ) . "\n"; echo html_tag( 'tr', html_tag( 'td', - "" . + "" . _("Day View") ."", 'left' ) ) . "\n"; @@ -327,4 +327,4 @@ if (!isset($updated)){ ?> - + \ No newline at end of file diff --git a/plugins/calendar/index.php b/plugins/calendar/index.php index c872d8ad..4580ad30 100644 --- a/plugins/calendar/index.php +++ b/plugins/calendar/index.php @@ -16,4 +16,4 @@ header("Location:../../src/login.php\n\n"); exit(); -?> +?> \ No newline at end of file diff --git a/plugins/calendar/setup.php b/plugins/calendar/setup.php index f1121f7b..fa5f1751 100644 --- a/plugins/calendar/setup.php +++ b/plugins/calendar/setup.php @@ -10,7 +10,7 @@ * * init plugin into squirrelmail * - * $Id$ + * $Id$ * @package plugins * @subpackage calendar */ @@ -30,4 +30,4 @@ function calendar() { echo "  \n"; } -?> +?> \ No newline at end of file diff --git a/plugins/change_password/backend/index.php b/plugins/change_password/backend/index.php index 149c9612..fd5edb50 100644 --- a/plugins/change_password/backend/index.php +++ b/plugins/change_password/backend/index.php @@ -18,4 +18,4 @@ header("Location:../index.php"); /* pretty impressive huh? */ -?> +?> \ No newline at end of file diff --git a/plugins/change_password/backend/merak.php b/plugins/change_password/backend/merak.php index 5bcd69eb..3670a36e 100644 --- a/plugins/change_password/backend/merak.php +++ b/plugins/change_password/backend/merak.php @@ -23,7 +23,7 @@ $merak_action = "self_edit"; // NO NEED TO CHANGE ANYTHING BELOW THIS LINE global $squirrelmail_plugin_hooks; -$squirrelmail_plugin_hooks['change_password_dochange']['merak'] = +$squirrelmail_plugin_hooks['change_password_dochange']['merak'] = 'cpw_merak_dochange'; /** @@ -36,7 +36,7 @@ $squirrelmail_plugin_hooks['change_password_dochange']['merak'] = * CPW_CURRENT_NOMATCH -> "Your current password is not correct." * CPW_INVALID_PW -> "Your new password contains invalid characters." * - * @param array data The username/currentpw/newpw data. + * @param array data The username/currentpw/newpw data. * @return array Array of error messages. */ function cpw_merak_dochange($data) @@ -186,4 +186,4 @@ function IsChecked($tag) { } return false; -} +} \ No newline at end of file diff --git a/plugins/change_password/backend/mysql.php b/plugins/change_password/backend/mysql.php index a9ff7a86..63b0020e 100644 --- a/plugins/change_password/backend/mysql.php +++ b/plugins/change_password/backend/mysql.php @@ -39,14 +39,14 @@ if ( isset($mysql) && is_array($mysql) && !empty($mysql) ) { if ( isset(${'mysql_'.$key}) ) ${'mysql_'.$key} = $value; - } + } } // NO NEED TO CHANGE ANYTHING BELOW THIS LINE global $squirrelmail_plugin_hooks; -$squirrelmail_plugin_hooks['change_password_dochange']['mysql'] = - 'cpw_mysql_dochange'; +$squirrelmail_plugin_hooks['change_password_dochange']['mysql'] = + 'cpw_mysql_dochange'; /** * This is the function that is specific to your backend. It takes @@ -58,7 +58,7 @@ $squirrelmail_plugin_hooks['change_password_dochange']['mysql'] = * CPW_CURRENT_NOMATCH -> "Your current password is not correct." * CPW_INVALID_PW -> "Your new password contains invalid characters." * - * @param array data The username/currentpw/newpw data. + * @param array data The username/currentpw/newpw data. * @return array Array of error messages. */ function cpw_mysql_dochange($data) @@ -101,7 +101,7 @@ function cpw_mysql_dochange($data) $select_result = mysql_query($query_string, $ds); if (!$select_result) { array_push($msgs, _("SQL call failed, try again later.")); - return $msgs; + return $msgs; } if (mysql_num_rows($select_result) == 0) { @@ -130,4 +130,4 @@ function cpw_mysql_dochange($data) } return $msgs; -} +} \ No newline at end of file diff --git a/plugins/change_password/backend/poppassd.php b/plugins/change_password/backend/poppassd.php index 753750c8..7e3b6842 100644 --- a/plugins/change_password/backend/poppassd.php +++ b/plugins/change_password/backend/poppassd.php @@ -47,7 +47,7 @@ function cpw_poppassd_init() { * CPW_CURRENT_NOMATCH -> "Your current password is not correct." * CPW_INVALID_PW -> "Your new password contains invalid characters." * - * @param array data The username/currentpw/newpw data. + * @param array data The username/currentpw/newpw data. * @return array Array of error messages. */ function cpw_poppassd_dochange($data) { @@ -136,4 +136,4 @@ function cpw_poppassd_go($username, $old_pw, $new_pw, $debug = 0) { return $messages; } -?> +?> \ No newline at end of file diff --git a/plugins/change_password/backend/template.php b/plugins/change_password/backend/template.php index 7d818be6..04176833 100644 --- a/plugins/change_password/backend/template.php +++ b/plugins/change_password/backend/template.php @@ -23,10 +23,10 @@ * Define here the name of your password changing function. */ global $squirrelmail_plugin_hooks; -$squirrelmail_plugin_hooks['change_password_dochange']['template'] = - 'cpw_template_dochange'; -$squirrelmail_plugin_hooks['change_password_init']['template'] = - 'cpw_template_init'; +$squirrelmail_plugin_hooks['change_password_dochange']['template'] = + 'cpw_template_dochange'; +$squirrelmail_plugin_hooks['change_password_init']['template'] = + 'cpw_template_init'; /** @@ -50,7 +50,7 @@ function cpw_template_init() * CPW_CURRENT_NOMATCH -> "Your current password is not correct." * CPW_INVALID_PW -> "Your new password contains invalid characters." * - * @param array data The username/currentpw/newpw data. + * @param array data The username/currentpw/newpw data. * @return array Array of error messages. */ function cpw_template_dochange($data) @@ -68,4 +68,4 @@ function cpw_template_dochange($data) user_error('No valid backend defined: this is just a template', E_USER_ERROR); return $msgs; -} +} \ No newline at end of file diff --git a/plugins/change_password/config.php b/plugins/change_password/config.php index 61cde108..6f1f7cdc 100644 --- a/plugins/change_password/config.php +++ b/plugins/change_password/config.php @@ -17,4 +17,4 @@ $cpw_backend = 'template'; $cpw_pass_min_length = 4; $cpw_pass_max_length = 25; -$cpw_require_ssl = FALSE; +$cpw_require_ssl = FALSE; \ No newline at end of file diff --git a/plugins/change_password/functions.php b/plugins/change_password/functions.php index 5272d6f7..81bb939d 100644 --- a/plugins/change_password/functions.php +++ b/plugins/change_password/functions.php @@ -108,4 +108,4 @@ function cpw_do_change() session_write_close(); header('Location: '.SM_PATH. 'src/options.php?optmode=submit&plugin_change_password=1'); exit; -} +} \ No newline at end of file diff --git a/plugins/change_password/index.php b/plugins/change_password/index.php index d6b9bbad..d84e2ac4 100644 --- a/plugins/change_password/index.php +++ b/plugins/change_password/index.php @@ -19,4 +19,4 @@ header("Location:../index.php"); /* pretty impressive huh? */ -?> +?> \ No newline at end of file diff --git a/plugins/change_password/options.php b/plugins/change_password/options.php index b7aac3a2..4f254b0e 100644 --- a/plugins/change_password/options.php +++ b/plugins/change_password/options.php @@ -25,7 +25,7 @@ if(sqgetGlobalVar('cpw_go', $cpw_go, SQ_POST)) { /* perform basic checks */ $Messages = cpw_check_input(); - + /* if no errors, go ahead with the actual change */ if(count($Messages) == 0) { $Messages = cpw_do_change(); @@ -68,10 +68,10 @@ if (isset($Messages) && count($Messages) > 0) { - + - + \ No newline at end of file diff --git a/plugins/filters/filters.php b/plugins/filters/filters.php index 135cfda3..fdc7fd80 100644 --- a/plugins/filters/filters.php +++ b/plugins/filters/filters.php @@ -232,9 +232,9 @@ function filter_search_and_delete($imap_stream, $where, $what, $where_to, $user_ } if ($imap_server_type == 'macosx') { - $search_str .= ' ' . $where . ' ' . $what; + $search_str .= ' ' . $where . ' ' . $what; } else { - $search_str .= ' ' . $where . ' {' . strlen($what) . "}\r\n" + $search_str .= ' ' . $where . ' {' . strlen($what) . "}\r\n" . $what . "\r\n"; } diff --git a/plugins/filters/index.php b/plugins/filters/index.php index e4b52db3..f5f8a9a0 100644 --- a/plugins/filters/index.php +++ b/plugins/filters/index.php @@ -14,4 +14,4 @@ header("Location:../../src/login.php\n\n"); exit(); -?> +?> \ No newline at end of file diff --git a/plugins/filters/options.php b/plugins/filters/options.php index ecfc6139..6a6b44b6 100644 --- a/plugins/filters/options.php +++ b/plugins/filters/options.php @@ -262,4 +262,4 @@ if (sqgetGlobalVar('filter_submit',$filter_submit,SQ_POST)) { ) , 'center', '', 'width="80%" border="0" cellpadding="2" cellspacing="0"' ); echo ''; -?> +?> \ No newline at end of file diff --git a/plugins/filters/setup.php b/plugins/filters/setup.php index 230622b2..880a3bbe 100644 --- a/plugins/filters/setup.php +++ b/plugins/filters/setup.php @@ -133,7 +133,7 @@ function squirrelmail_plugin_init_filters() { global $squirrelmail_plugin_hooks; if (sqgetGlobalVar('mailbox',$mailbox,SQ_FORM)) { - sqgetGlobalVar('mailbox',$mailbox,SQ_FORM); + sqgetGlobalVar('mailbox',$mailbox,SQ_FORM); } else { $mailbox = 'INBOX'; } @@ -152,7 +152,7 @@ function squirrelmail_plugin_init_filters() { * Report spam folder as special mailbox * @param string $mb variable used by hook * @return string spam folder name - * @access private + * @access private */ function filters_special_mailbox( $mb ) { global $data_dir, $username; @@ -185,4 +185,4 @@ function filters_optpage_register_block() { ); } } -?> +?> \ No newline at end of file diff --git a/plugins/filters/spamoptions.php b/plugins/filters/spamoptions.php index 532405af..583c7211 100644 --- a/plugins/filters/spamoptions.php +++ b/plugins/filters/spamoptions.php @@ -54,20 +54,20 @@ displayPageHeader($color, 'None'); if (sqgetGlobalVar('spam_submit',$spam_submit,SQ_POST)) { $spam_filters = load_spam_filters(); - // setting spam folder + // setting spam folder sqgetGlobalVar('filters_spam_folder_set',$filters_spam_folder_set,SQ_POST); if (isset($filters_spam_folder_set)) { setPref($data_dir, $username, 'filters_spam_folder', $filters_spam_folder_set); } else { - echo _("You must select a spam folder."); + echo _("You must select a spam folder."); } // setting scan type sqgetGlobalVar('filters_spam_scan_set',$filters_spam_scan_set,SQ_POST); if (isset($filters_spam_scan_set)) { - setPref($data_dir, $username, 'filters_spam_scan', $filters_spam_scan_set); + setPref($data_dir, $username, 'filters_spam_scan', $filters_spam_scan_set); } else { - echo _("You must select a scan type."); + echo _("You must select a scan type."); } foreach ($spam_filters as $Key => $Value) { @@ -217,7 +217,7 @@ if (isset($action) && $action == 'spam') { echo _("OFF"); } - echo '' . + echo '' . html_tag( 'td', ' - ', 'left' ) . html_tag( 'td', '', 'left' ); @@ -236,4 +236,4 @@ if (isset($action) && $action == 'spam') { echo ''; } ?> - + \ No newline at end of file diff --git a/plugins/fortune/config_default.php b/plugins/fortune/config_default.php index 7c701907..6062fd3a 100644 --- a/plugins/fortune/config_default.php +++ b/plugins/fortune/config_default.php @@ -1,7 +1,7 @@ +?> \ No newline at end of file diff --git a/plugins/info/functions.php b/plugins/info/functions.php index 8290f2ec..1e85337e 100644 --- a/plugins/info/functions.php +++ b/plugins/info/functions.php @@ -4,7 +4,7 @@ * * Here are two functions for the info plugin * The first gets the CAPABILITY response from your IMAP server. - * The second runs the passed IMAP test and returns the results + * The second runs the passed IMAP test and returns the results * The third prints the results of the IMAP command * to options.php. * diff --git a/plugins/info/index.php b/plugins/info/index.php index 71c851b5..38748740 100644 --- a/plugins/info/index.php +++ b/plugins/info/index.php @@ -14,4 +14,4 @@ header("Location:../../src/login.php\n\n"); exit(); -?> +?> \ No newline at end of file diff --git a/plugins/info/options.php b/plugins/info/options.php index fa4e8e03..57528633 100644 --- a/plugins/info/options.php +++ b/plugins/info/options.php @@ -1,9 +1,9 @@ - + \ No newline at end of file diff --git a/plugins/info/setup.php b/plugins/info/setup.php index 2ede4054..4d8ae71a 100644 --- a/plugins/info/setup.php +++ b/plugins/info/setup.php @@ -1,7 +1,7 @@ +?> \ No newline at end of file diff --git a/plugins/listcommands/index.php b/plugins/listcommands/index.php index 68c89dd1..7ade7d81 100644 --- a/plugins/listcommands/index.php +++ b/plugins/listcommands/index.php @@ -16,4 +16,4 @@ header("Location:../../src/login.php\n\n"); exit(); -?> +?> \ No newline at end of file diff --git a/plugins/listcommands/mailout.php b/plugins/listcommands/mailout.php index db305b5c..99f402fa 100644 --- a/plugins/listcommands/mailout.php +++ b/plugins/listcommands/mailout.php @@ -79,4 +79,4 @@ echo '
    ' . addSubmit(_("Send Mail"), 'send') . '

    ' . '

    '; -?> +?> \ No newline at end of file diff --git a/plugins/listcommands/setup.php b/plugins/listcommands/setup.php index 68643796..2a79ad45 100644 --- a/plugins/listcommands/setup.php +++ b/plugins/listcommands/setup.php @@ -43,14 +43,14 @@ function plugin_listcommands_menu() { foreach ($message->rfc822_header->mlist as $cmd => $actions) { - /* I don't know this action... skip it */ - if ( !array_key_exists($cmd, $fieldsdescr) ) { + /* I don't know this action... skip it */ + if ( !array_key_exists($cmd, $fieldsdescr) ) { continue; } /* proto = {mailto,href} */ - $proto = array_shift(array_keys($actions)); - $act = array_shift($actions); + $proto = array_shift(array_keys($actions)); + $act = array_shift($actions); if ($proto == 'mailto') { @@ -66,9 +66,9 @@ function plugin_listcommands_menu() { if ($cmd == 'post') { if (!isset($mailbox)) $mailbox = 'INBOX'; - $url .= '&passed_id='.$passed_id. - '&mailbox='.urlencode($mailbox). - (isset($passed_ent_id)?'&passed_ent_id='.$passed_ent_id:''); + $url .= '&passed_id='.$passed_id. + '&mailbox='.urlencode($mailbox). + (isset($passed_ent_id)?'&passed_ent_id='.$passed_ent_id:''); $url .= '&smaction=reply'; $output[] = makeComposeLink($url, $fieldsdescr['reply']); @@ -89,4 +89,4 @@ function plugin_listcommands_menu() { } } -?> +?> \ No newline at end of file diff --git a/plugins/mail_fetch/class.POP3.php b/plugins/mail_fetch/class.POP3.php index 046bb77c..0521d15b 100644 --- a/plugins/mail_fetch/class.POP3.php +++ b/plugins/mail_fetch/class.POP3.php @@ -1,4 +1,4 @@ -MAILSERVER)) $server = $this->MAILSERVER; @@ -653,4 +653,4 @@ class POP3 { } // End class -?> +?> \ No newline at end of file diff --git a/plugins/mail_fetch/fetch.php b/plugins/mail_fetch/fetch.php index b008b51f..0cbbfc2e 100644 --- a/plugins/mail_fetch/fetch.php +++ b/plugins/mail_fetch/fetch.php @@ -24,7 +24,7 @@ require_once(SM_PATH . 'plugins/mail_fetch/class.POP3.php'); require_once(SM_PATH . 'plugins/mail_fetch/functions.php' ); require_once(SM_PATH . 'functions/html.php' ); -/* globals */ +/* globals */ sqgetGlobalVar('username', $username, SQ_SESSION); sqgetGlobalVar('key', $key, SQ_COOKIE); sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION); @@ -86,7 +86,7 @@ sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); echo "' . "\n"; - } + } echo '' . '' . ''; @@ -163,8 +163,8 @@ sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); echo '
    ' . html_tag( 'table', html_tag( 'tr', - html_tag( 'td', '' . _("Fetching from ") . - htmlspecialchars($mailfetch[$i_loop]['alias']) . + html_tag( 'td', '' . _("Fetching from ") . + htmlspecialchars($mailfetch[$i_loop]['alias']) . '', 'center' ) , '', $color[9] ) , @@ -211,7 +211,7 @@ sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); } else { $newmsgcount = $Count - $i + 1; Mail_Fetch_Status(sprintf(ngettext("Login OK: Inbox contains %s message", - "Login OK: Inbox contains %s messages",$newmsgcount), $newmsgcount)); + "Login OK: Inbox contains %s messages",$newmsgcount), $newmsgcount)); } Mail_Fetch_Status(_("Fetching UIDL...")); @@ -271,8 +271,8 @@ sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); fputs($imap_stream, $Message); fputs($imap_stream, "\r\n"); sqimap_read_data($imap_stream, "A3$i", false, $response, $message); - $response=(implode('',$response)); - $message=(implode('',$message)); + $response=(implode('',$response)); + $message=(implode('',$message)); if ($response != 'OK') { Mail_Fetch_Status(_("Error Appending Message!")." ".htmlspecialchars($message) ); Mail_Fetch_Status(_("Closing POP")); @@ -325,4 +325,4 @@ sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); ?> - + \ No newline at end of file diff --git a/plugins/mail_fetch/functions.php b/plugins/mail_fetch/functions.php index 54456068..ffec192f 100644 --- a/plugins/mail_fetch/functions.php +++ b/plugins/mail_fetch/functions.php @@ -79,4 +79,4 @@ return $tmp; } -?> +?> \ No newline at end of file diff --git a/plugins/mail_fetch/index.php b/plugins/mail_fetch/index.php index c6652fee..909e74e5 100644 --- a/plugins/mail_fetch/index.php +++ b/plugins/mail_fetch/index.php @@ -16,4 +16,4 @@ header("Location:../../src/login.php\n\n"); exit(); -?> +?> \ No newline at end of file diff --git a/plugins/mail_fetch/options.php b/plugins/mail_fetch/options.php index 82835ac1..6ee77446 100644 --- a/plugins/mail_fetch/options.php +++ b/plugins/mail_fetch/options.php @@ -25,7 +25,7 @@ sqgetGlobalVar('username', $username, SQ_SESSION); sqgetGlobalVar('key', $key, SQ_COOKIE); sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION); sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); - + if(!sqgetGlobalVar('mf_cypher', $mf_cypher, SQ_POST)) { $mf_cypher = ''; } @@ -122,7 +122,7 @@ sqgetGlobalVar('submit_mailfetch', $submit_mailfetch, SQ_POST); getPref($data_dir,$username, 'mailfetch_fref_'.$tmp)); setPref($data_dir,$username,'mailfetch_subfolder_'.$i, getPref($data_dir,$username, 'mailfetch_subfolder_'.$tmp)); - setPref($data_dir,$username,'mailfetch_uidl_'.$i, + setPref($data_dir,$username,'mailfetch_uidl_'.$i, getPref($data_dir,$username, 'mailfetch_uidl_'.$tmp)); } setPref($data_dir,$username,"mailfetch_server_number", $mailfetch_server_number); @@ -323,7 +323,7 @@ sqgetGlobalVar('submit_mailfetch', $submit_mailfetch, SQ_POST); ) . html_tag( 'tr', html_tag( 'th', _("Username:"), 'right' ) . - html_tag( 'td', '', 'left' ) ) . html_tag( 'tr', @@ -341,7 +341,7 @@ sqgetGlobalVar('submit_mailfetch', $submit_mailfetch, SQ_POST); $selected = 0; if ( isset($mailfetch_subfolder_[$mf_sn]) ) { $selected = array(strtolower($mailfetch_subfolder_[$mf_sn])); - } + } echo sqimap_mailbox_option_list($imapConnection, $selected) . '' . @@ -391,4 +391,4 @@ sqgetGlobalVar('submit_mailfetch', $submit_mailfetch, SQ_POST); } ?> - + \ No newline at end of file diff --git a/plugins/mail_fetch/setup.php b/plugins/mail_fetch/setup.php index 4d4aad79..88ee5c1e 100644 --- a/plugins/mail_fetch/setup.php +++ b/plugins/mail_fetch/setup.php @@ -12,7 +12,7 @@ * @package plugins * @subpackage mail_fetch **/ - + /** */ require_once(SM_PATH . 'plugins/mail_fetch/functions.php' ); @@ -75,7 +75,7 @@ require_once (SM_PATH . 'plugins/mail_fetch/functions.php'); global $data_dir, $imapServerAddress, $imapPort; - + sqgetGlobalVar('username', $username, SQ_SESSION); sqgetGlobalVar('key', $key, SQ_COOKIE); @@ -235,4 +235,4 @@ ); } -?> +?> \ No newline at end of file diff --git a/plugins/message_details/message_details_bottom.php b/plugins/message_details/message_details_bottom.php index 3d9e2182..87f2c820 100644 --- a/plugins/message_details/message_details_bottom.php +++ b/plugins/message_details/message_details_bottom.php @@ -5,7 +5,7 @@ * Plugin to view the RFC822 raw message output and the bodystructure of a message * * Licensed under the GNU GPL. For full terms see the file COPYING. - * + * * @author Marc Groot Koerkamp * @copyright Copyright © 2002 Marc Groot Koerkamp, The Netherlands * @copyright Copyright © 2004 The SquirrelMail Project Team @@ -52,7 +52,7 @@ function CalcEntity($entString, $direction) { if ($pos === false) { $entString++; $result= $entString; - } + } else { $level = substr($entString,0,$pos); $sublevel = substr($entString,$pos+1); @@ -116,7 +116,7 @@ for ($i=1; $i < $count; $i++) { } else if ($messageheader) { if ($header) { $header=false; - $end = "\n \n".''."\n \n".'
    '."\n \n"; + $end = "\n \n".'
    '."\n \n".'
    '."\n \n"; } $mimepart = -$header; $bnd_end = false; @@ -128,11 +128,11 @@ for ($i=1; $i < $count; $i++) { } else { if ($header) { $pre = ''; - $end = "\n \n".'
    '."\n \n".'
    '."\n \n"; + $end = "\n \n".'
    '."\n \n".'
    '."\n \n"; } $header = false; $mimepart=true; - } + } $contentset = false; $nameset = false; } else { @@ -142,7 +142,7 @@ for ($i=1; $i < $count; $i++) { $pre = ''; $end = ''; } - } + } if (!$messageheader && !$header ) { $mimepart=true; } else { @@ -153,7 +153,7 @@ for ($i=1; $i < $count; $i++) { } if ( ( $header || $messageheader) && (preg_match("/^.*boundary=\"?(.+(?=\")|.+).*/i",$line,$reg)) ) { $bnd = $reg[1]; - $bndreg = $bnd; + $bndreg = $bnd; $bndreg = str_replace("\\","\\\\",$bndreg); $bndreg = str_replace("?","\\?",$bndreg); $bndreg = str_replace("+","\\+",$bndreg); @@ -173,18 +173,18 @@ for ($i=1; $i < $count; $i++) { $entStr = CalcEntity("$entStr",1); } } - + if (($line != '' && $line{0} == '-' || $header) && isset($boundaries[0])) { $cnt=count($boundaries)-1; $bnd = $boundaries[$cnt]['bnd']; $bndreg = $boundaries[$cnt]['bndreg']; - + $regstr = '/^--'."($bndreg)".".*".'/'; if (preg_match($regstr,$line,$reg) ) { $bndlen = strlen($reg[1]); - $bndend = false; + $bndend = false; if (strlen($line) > ($bndlen + 3)) { - if ($line{$bndlen+2} == '-' && $line{$bndlen+3} == '-') + if ($line{$bndlen+2} == '-' && $line{$bndlen+3} == '-') $bndend = true; } if ($bndend) { @@ -222,7 +222,7 @@ for ($i=1; $i < $count; $i++) { $entities["$entStr"] = array(); $entities["$entStr"]['entity'] = $entStr; $entities["$entStr"]['contenttype']=$reg[2].'/'.$reg[3]; - } + } } else if (!$nameset && preg_match("/^.*(name=\s*)\"(.*)\".*/i",$line,$reg)) { $name = htmlspecialchars($reg[2]); $content[$content_indx]['name'] = decodeHeader($name); @@ -334,4 +334,4 @@ echo '

    '._("RFC822 Message body")."

    \n\n"; echo '
    '."\n\n"; echo $message_body; echo '
    '; -?> +?> \ No newline at end of file diff --git a/plugins/message_details/message_details_main.php b/plugins/message_details/message_details_main.php index 5f1ae7e4..df9e612a 100644 --- a/plugins/message_details/message_details_main.php +++ b/plugins/message_details/message_details_main.php @@ -1,5 +1,5 @@ '. ''. "\n"; -?> +?> \ No newline at end of file diff --git a/plugins/message_details/setup.php b/plugins/message_details/setup.php index a090bf9c..30ad3e3c 100644 --- a/plugins/message_details/setup.php +++ b/plugins/message_details/setup.php @@ -1,6 +1,6 @@ \n" . "\n" . " | $print_text\n"; - } + } echo $result; } - + ?> \ No newline at end of file diff --git a/plugins/newmail/newmail.php b/plugins/newmail/newmail.php index 0e887129..3bc00904 100644 --- a/plugins/newmail/newmail.php +++ b/plugins/newmail/newmail.php @@ -3,7 +3,7 @@ * newmail.php - popup page * * Copyright (c) 1999-2004 The SquirrelMail Project Team - * Licensed under the GNU GPL. For full terms see the file COPYING. + * Licensed under the GNU GPL. For full terms see the file COPYING. * * Displays all options relating to new mail sounds * diff --git a/plugins/newmail/newmail_opt.php b/plugins/newmail/newmail_opt.php index a118c091..26f2739c 100644 --- a/plugins/newmail/newmail_opt.php +++ b/plugins/newmail/newmail_opt.php @@ -166,4 +166,4 @@ echo html_tag( 'tr', "\n" . 'left' ) ) . "\n"; ?> - + \ No newline at end of file diff --git a/plugins/newmail/setup.php b/plugins/newmail/setup.php index 0505765b..0deb4dac 100644 --- a/plugins/newmail/setup.php +++ b/plugins/newmail/setup.php @@ -35,7 +35,7 @@ include_once(SM_PATH . 'functions/display_messages.php'); * * @param object $imapConnection * @param mixed $mailbox FIXME: option is not used - * @param string $real_box unformated mailbox name + * @param string $real_box unformated mailbox name * @param mixed $delimeter FIXME: option is not used * @param string $unseen FIXME: option is not used * @param integer $total_new number of new messages @@ -43,7 +43,7 @@ include_once(SM_PATH . 'functions/display_messages.php'); */ function CheckNewMailboxSound($imapConnection, $mailbox, $real_box, $delimeter, $unseen, &$total_new) { global $trash_folder, $sent_folder, - $unseen_notify, $newmail_allbox, + $unseen_notify, $newmail_allbox, $newmail_recent; $mailboxURL = urlencode($real_box); @@ -70,7 +70,7 @@ function CheckNewMailboxSound($imapConnection, $mailbox, $real_box, $delimeter, return 0; } -/** +/** * Init newmail plugin */ function squirrelmail_plugin_init_newmail() { @@ -198,19 +198,19 @@ function newmail_plugin() { } } if (! $noselect) { - $status += CheckNewMailboxSound($imapConnection, + $status += CheckNewMailboxSound($imapConnection, $mailbox, - $boxes[$i]['unformatted'], - $delimeter, + $boxes[$i]['unformatted'], + $delimeter, $boxes[$i]['unseen'], $totalNew); } } else { - $status += CheckNewMailboxSound($imapConnection, - $mailbox, + $status += CheckNewMailboxSound($imapConnection, + $mailbox, $boxes[$i]['unformatted'], - $delimeter, - $boxes[$i]['unseen'], + $delimeter, + $boxes[$i]['unseen'], $totalNew); } } @@ -224,7 +224,7 @@ function newmail_plugin() { echo " "); */ function spamcop_options() { - global $optpage_blocks; - - $optpage_blocks[] = array( - 'name' => _("SpamCop - Spam Reporting"), - 'url' => '../plugins/spamcop/options.php', - 'desc' => _("Help fight the battle against unsolicited email. SpamCop reads the spam email and determines the correct addresses to send complaints to. Quite fast, really smart, and easy to use."), - 'js' => false - ); + global $optpage_blocks; + + $optpage_blocks[] = array( + 'name' => _("SpamCop - Spam Reporting"), + 'url' => '../plugins/spamcop/options.php', + 'desc' => _("Help fight the battle against unsolicited email. SpamCop reads the spam email and determines the correct addresses to send complaints to. Quite fast, really smart, and easy to use."), + 'js' => false + ); } @@ -140,18 +140,18 @@ function spamcop_options() */ function spamcop_while_sending() { - global $mailbox, $spamcop_delete, $spamcop_is_composing, $auto_expunge, - $username, $key, $imapServerAddress, $imapPort; - - if ($spamcop_delete) { - $imapConnection = sqimap_login($username, $key, $imapServerAddress, - $imapPort, 0); - sqimap_mailbox_select($imapConnection, $mailbox); - sqimap_messages_delete($imapConnection, $spamcop_is_composing, - $spamcop_is_composing, $mailbox); - if ($auto_expunge) - sqimap_mailbox_expunge($imapConnection, $mailbox, true); - } + global $mailbox, $spamcop_delete, $spamcop_is_composing, $auto_expunge, + $username, $key, $imapServerAddress, $imapPort; + + if ($spamcop_delete) { + $imapConnection = sqimap_login($username, $key, $imapServerAddress, + $imapPort, 0); + sqimap_mailbox_select($imapConnection, $mailbox); + sqimap_messages_delete($imapConnection, $spamcop_is_composing, + $spamcop_is_composing, $mailbox); + if ($auto_expunge) + sqimap_mailbox_expunge($imapConnection, $mailbox, true); + } } ?> \ No newline at end of file diff --git a/plugins/spamcop/spamcop.php b/plugins/spamcop/spamcop.php index 83f57230..27ac0806 100644 --- a/plugins/spamcop/spamcop.php +++ b/plugins/spamcop/spamcop.php @@ -1,5 +1,5 @@ parent; @@ -39,22 +39,22 @@ function getMessage_RFC822_Attachment($message, $composeMessage, $passed_id, if ($response == 'OK') { array_shift($body_a); $body = implode('', $body_a) . "\r\n"; - + $localfilename = GenerateRandomString(32, 'FILE', 7); $full_localfilename = "$hashed_attachment_dir/$localfilename"; $fp = fopen( $full_localfilename, 'w'); fwrite ($fp, $body); fclose($fp); - + /* dirty relative dir fix */ if (substr($attachment_dir,0,3) == '../') { - $attachment_dir = substr($attachment_dir,3); - $hashed_attachment_dir = getHashedDir($username, $attachment_dir); + $attachment_dir = substr($attachment_dir,3); + $hashed_attachment_dir = getHashedDir($username, $attachment_dir); } - $full_localfilename = "$hashed_attachment_dir/$localfilename"; + $full_localfilename = "$hashed_attachment_dir/$localfilename"; - $composeMessage->initAttachment('message/rfc822','email.txt', - $full_localfilename); + $composeMessage->initAttachment('message/rfc822','email.txt', + $full_localfilename); } return $composeMessage; } @@ -97,11 +97,11 @@ if ($js_web) { displayPageHeader($color,$mailbox); } - $imap_stream = sqimap_login($username, $key, $imapServerAddress, + $imap_stream = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); sqimap_mailbox_select($imap_stream, $mailbox); - if ($spamcop_method == 'quick_email' || + if ($spamcop_method == 'quick_email' || $spamcop_method == 'thorough_email') { // Use email-based reporting -- save as an attachment $session = "$composesession"+1; @@ -116,18 +116,18 @@ if ($js_web) { $composeMessage->rfc822_header = $rfc822_header; $composeMessage->reply_rfc822_header = ''; $compose_messages[$session] = $composeMessage; - sqsession_register($compose_messages,'compose_messages'); + sqsession_register($compose_messages,'compose_messages'); } else { $composeMessage=$compose_messages[$session]; } $message = sqimap_get_message($imap_stream, $passed_id, $mailbox); - $composeMessage = getMessage_RFC822_Attachment($message, $composeMessage, $passed_id, + $composeMessage = getMessage_RFC822_Attachment($message, $composeMessage, $passed_id, $passed_ent_id, $imap_stream); - $compose_messages[$session] = $composeMessage; - sqsession_register($compose_messages, 'compose_messages'); + $compose_messages[$session] = $composeMessage; + sqsession_register($compose_messages, 'compose_messages'); $fn = getPref($data_dir, $username, 'full_name'); $em = getPref($data_dir, $username, 'email_address'); @@ -200,11 +200,11 @@ echo "

    "; \n"; + echo '\n"; } ?> - + \ No newline at end of file diff --git a/plugins/squirrelspell/doc/index.php b/plugins/squirrelspell/doc/index.php index 2e6f3704..9eaecb02 100644 --- a/plugins/squirrelspell/doc/index.php +++ b/plugins/squirrelspell/doc/index.php @@ -16,4 +16,4 @@ header("Location:../../../src/login.php\n\n"); exit(); -?> +?> \ No newline at end of file diff --git a/plugins/squirrelspell/index.php b/plugins/squirrelspell/index.php index 043dfe7c..6cee7d76 100644 --- a/plugins/squirrelspell/index.php +++ b/plugins/squirrelspell/index.php @@ -19,4 +19,4 @@ header("Location: ../../index.php"); /* pretty impressive huh? */ -?> +?> \ No newline at end of file diff --git a/plugins/squirrelspell/js/index.php b/plugins/squirrelspell/js/index.php index 2e6f3704..9eaecb02 100644 --- a/plugins/squirrelspell/js/index.php +++ b/plugins/squirrelspell/js/index.php @@ -16,4 +16,4 @@ header("Location:../../../src/login.php\n\n"); exit(); -?> +?> \ No newline at end of file diff --git a/plugins/squirrelspell/modules/WHATISTHIS b/plugins/squirrelspell/modules/WHATISTHIS index e764b117..aea7bb8e 100644 --- a/plugins/squirrelspell/modules/WHATISTHIS +++ b/plugins/squirrelspell/modules/WHATISTHIS @@ -1,3 +1,3 @@ squirrelspell/modules -This is where the loadable modules for SquirrelSpell are. +This is where the loadable modules for SquirrelSpell are. \ No newline at end of file diff --git a/plugins/squirrelspell/modules/check_me.mod b/plugins/squirrelspell/modules/check_me.mod index 40baaba3..b0797e51 100644 --- a/plugins/squirrelspell/modules/check_me.mod +++ b/plugins/squirrelspell/modules/check_me.mod @@ -82,7 +82,7 @@ $sqspell_command=$SQSPELL_APP[$sqspell_use_app]; /** * If you have php >= 4.3.0, we can use proc_open and safe mode * and not mess w/ temp files. Otherwise we will do it the old - * way, (minus the uneeded call to cat that messes up Wintel + * way, (minus the uneeded call to cat that messes up Wintel * boxen.) * Thanks Ray Ferguson for providing this patch. */ @@ -98,7 +98,7 @@ if( check_php_version ( 4, 3 ) ) { $sqspell_output = array(); for($i=1; $i<=2; $i++){ while(!feof($pipes[$i])) - array_push($sqspell_output, rtrim(fgetss($pipes[$i],999),"\n")); + array_push($sqspell_output, rtrim(fgetss($pipes[$i],999),"\n")); fclose($pipes[$i]); } $sqspell_exitcode=proc_close($spell_proc); @@ -176,7 +176,7 @@ for ($i=0; $i\n" . "\n" . "\n" . "\n"; - + displayHtmlHeader(_("SquirrelSpell Results"),$extrajs); @@ -306,7 +306,7 @@ if ($errors){
    - @@ -316,7 +316,7 @@ if ($errors){ echo $sptag . _("Line with an error:") . ''; ?>
    - @@ -327,7 +327,7 @@ if ($errors){ ?>
    - @@ -336,7 +336,7 @@ if ($errors){ ?> -

    '; sqspell_makeWindow(null, _("Dictionary re-encrypted"), null, $msg); @@ -93,5 +93,5 @@ if ($old_key){ * mode: php * End: * vim: syntax=php - */ -?> + */ +?> \ No newline at end of file diff --git a/plugins/squirrelspell/modules/edit_dic.mod b/plugins/squirrelspell/modules/edit_dic.mod index ead670d2..0c8e18bb 100644 --- a/plugins/squirrelspell/modules/edit_dic.mod +++ b/plugins/squirrelspell/modules/edit_dic.mod @@ -25,15 +25,15 @@ if (!$words){ * Agt. Smith: "You're empty." * Neo: "So are you." */ - sqspell_makePage(_("Personal Dictionary"), null, - '

    ' . _("No words in your personal dictionary.") + sqspell_makePage(_("Personal Dictionary"), null, + '

    ' . _("No words in your personal dictionary.") . '

    '); } else { /** * We're loaded with booty. */ - $pre_msg = '

    ' - . _("Please check any words you wish to delete from your dictionary.") + $pre_msg = '

    ' + . _("Please check any words you wish to delete from your dictionary.") . "

    \n"; $pre_msg .= "\n"; /** @@ -59,7 +59,7 @@ if (!$words){ . '' . "\n"; diff --git a/plugins/squirrelspell/modules/enc_setup.mod b/plugins/squirrelspell/modules/enc_setup.mod index 451dfd41..8534858f 100644 --- a/plugins/squirrelspell/modules/enc_setup.mod +++ b/plugins/squirrelspell/modules/enc_setup.mod @@ -7,8 +7,8 @@ * Copyright (c) 1999-2004 The SquirrelMail development team * Licensed under the GNU GPL. For full terms see the file COPYING. * - * This module shows the user a nice invitation to encrypt or decypt - * his/her personal dictionary and explains the caveats of such a decision. + * This module shows the user a nice invitation to encrypt or decypt + * his/her personal dictionary and explains the caveats of such a decision. * * @author Konstantin Riabitsev * @version $Id$ @@ -16,15 +16,15 @@ * @subpackage squirrelspell */ -global $SQSPELL_CRYPTO; +global $SQSPELL_CRYPTO; /** * Set up some i18n'able wrappers for javascript. */ $msg = '\n"; + . "var ui_choice = \"" . _("You must make a choice") ."\";\n" + . "var ui_candel = \"" . _("You can either delete your dictionary or type in the old password. Not both.") . "\";\n" + . "var ui_willdel = \"" . _("This will delete your personal dictionary file. Proceed?") . "\";\n" + . "//-->\n"; /** * See if this happened in the pop-up window or when accessing - * the SpellChecker options page. + * the SpellChecker options page. * This is a dirty solution, I agree. TODO: make this prettier. */ global $SCRIPT_NAME; if (strstr($SCRIPT_NAME, "sqspell_options")){ - sqspell_makePage(_("Error Decrypting Dictionary"), - "decrypt_error.js", $msg); + sqspell_makePage(_("Error Decrypting Dictionary"), + "decrypt_error.js", $msg); } else { - sqspell_makeWindow(null, _("Error Decrypting Dictionary"), - "decrypt_error.js", $msg); + sqspell_makeWindow(null, _("Error Decrypting Dictionary"), + "decrypt_error.js", $msg); } exit; } else { /** - * OK! Phew. Set the encryption flag to true so we can later on + * OK! Phew. Set the encryption flag to true so we can later on * encrypt it again before saving to HDD. */ $SQSPELL_CRYPTO=true; } } else { /** - * No encryption is/was used. Set $SQSPELL_CRYPTO to false, + * No encryption is/was used. Set $SQSPELL_CRYPTO to false, * in case we have to save the dictionary later. */ $SQSPELL_CRYPTO=false; @@ -428,7 +428,7 @@ function sqspell_getWords(){ } return $words; } - + /** * Writes user dictionary into the $username.words file, then changes mask * to 0600. If encryption is needed -- does that, too. @@ -479,7 +479,7 @@ function sqspell_writeWords($words){ fclose($fp); chmod($SQSPELL_WORDS_FILE, 0600); } - + function sqspell_deleteWords(){ /** * So I open the door to my enemies, @@ -497,12 +497,12 @@ function sqspell_deleteWords(){ * whatever. * * @return The template to use when storing the user dictionary. - */ + */ function sqspell_makeDummy(){ global $SQSPELL_VERSION, $SQSPELL_APP_DEFAULT; $words = "# SquirrelSpell User Dictionary $SQSPELL_VERSION\n" - . "# Last Revision: " . date('Y-m-d') - . "\n# LANG: $SQSPELL_APP_DEFAULT\n# End\n"; + . "# Last Revision: " . date('Y-m-d') + . "\n# LANG: $SQSPELL_APP_DEFAULT\n# End\n"; return $words; } @@ -517,10 +517,10 @@ function sqspell_makeDummy(){ * @return void, since it bails out with an access error if needed. */ function sqspell_ckMOD($rMOD){ - if (strstr($rMOD, '.') - || strstr($rMOD, '/') + if (strstr($rMOD, '.') + || strstr($rMOD, '/') || strstr($rMOD, '%') - || strstr($rMOD, "\\")){ + || strstr($rMOD, "\\")){ echo _("Cute."); exit; } @@ -528,7 +528,7 @@ function sqspell_ckMOD($rMOD){ /** * SquirrelSpell version. Don't modify, since it identifies the format - * of the user dictionary files and messing with this can do ugly + * of the user dictionary files and messing with this can do ugly * stuff. :) */ $SQSPELL_VERSION="v0.3.8"; diff --git a/plugins/squirrelspell/sqspell_interface.php b/plugins/squirrelspell/sqspell_interface.php index f53f8b4b..b0afdf65 100644 --- a/plugins/squirrelspell/sqspell_interface.php +++ b/plugins/squirrelspell/sqspell_interface.php @@ -9,7 +9,7 @@ * Licensed under the GNU GPL. For full terms see the file COPYING. * * This is a main wrapper for the pop-up window interface of - * SquirrelSpell. + * SquirrelSpell. * * $Id$ * @@ -19,14 +19,14 @@ * @subpackage squirrelspell */ -/** +/** * Set up a couple of non-negotiable constants and * defaults. Don't change these, * the setuppable stuff is in * sqspell_config.php */ $SQSPELL_DIR='plugins/squirrelspell/'; $SQSPELL_CRYPTO=FALSE; - + /** * Load the stuff needed from squirrelmail * @ignore @@ -38,7 +38,7 @@ require_once(SM_PATH . 'include/validate.php'); require_once(SM_PATH . 'include/load_prefs.php'); require_once(SM_PATH . $SQSPELL_DIR . 'sqspell_config.php'); require_once(SM_PATH . $SQSPELL_DIR . 'sqspell_functions.php'); - + /** * $MOD is the name of the module to invoke. * If $MOD is undefined, use "init", else check for security @@ -48,7 +48,7 @@ if(isset($_POST['MOD'])) { $MOD = $_POST['MOD']; } elseif (isset($_GET['MOD'])) { $MOD = $_GET['MOD']; -} +} if (!isset($MOD) || !$MOD){ $MOD='init'; @@ -59,4 +59,4 @@ if (!isset($MOD) || !$MOD){ /* Include the module. */ require_once(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod"); -?> +?> \ No newline at end of file diff --git a/plugins/squirrelspell/sqspell_options.php b/plugins/squirrelspell/sqspell_options.php index 39de1293..636a50a9 100644 --- a/plugins/squirrelspell/sqspell_options.php +++ b/plugins/squirrelspell/sqspell_options.php @@ -1,6 +1,6 @@ +?> \ No newline at end of file diff --git a/src/addrbook_popup.php b/src/addrbook_popup.php index cd8d5359..54617ef1 100644 --- a/src/addrbook_popup.php +++ b/src/addrbook_popup.php @@ -22,7 +22,7 @@ define('SM_PATH','../'); /** SquirrelMail required files. */ require_once(SM_PATH . 'include/validate.php'); require_once(SM_PATH . 'functions/addressbook.php'); - + ?> @@ -41,4 +41,4 @@ require_once(SM_PATH . 'functions/addressbook.php'); border="0" src="addrbook_search.php?show=blank" /> - + \ No newline at end of file diff --git a/src/addrbook_search.php b/src/addrbook_search.php index 5f3a3e07..262bc5e4 100644 --- a/src/addrbook_search.php +++ b/src/addrbook_search.php @@ -12,7 +12,7 @@ * addrbook_search_html.html -- If you change one, * change the other one too! * - * @version $Id$ + * @version $Id$ * @package squirrelmail * @subpackage addressbook */ @@ -118,11 +118,11 @@ function insert_javascript() { */ function display_result($res, $includesource = true) { global $color; - + if(sizeof($res) <= 0) return; - + insert_javascript(); - + $line = 0; echo html_tag( 'table', '', 'center', '', 'border="0" width="98%"' ) . html_tag( 'tr', '', '', $color[9] ) . @@ -133,23 +133,23 @@ function display_result($res, $includesource = true) { if ($includesource) { echo html_tag( 'th', ' ' . _("Source"), 'left', 'width="10%"' ); - } + } echo "\n"; - + while (list($undef, $row) = each($res)) { $email = htmlspecialchars(addcslashes(AddressBook::full_address($row), "'"), ENT_QUOTES); - if ($line % 2) { + if ($line % 2) { $tr_bgcolor = $color[12]; } else { $tr_bgcolor = $color[4]; } echo html_tag( 'tr', '', '', $tr_bgcolor, 'nowrap' ) . html_tag( 'td', - '"._("To")." | " . - '"._("Cc")." | " . - '"._("Bcc")."", 'center', '', 'valign="top" width="5%" nowrap' ) . html_tag( 'td', ' ' . htmlspecialchars($row['name']), 'left', '', 'valign="top" nowrap' ) . @@ -169,12 +169,12 @@ function display_result($res, $includesource = true) { } /* ================= End of functions ================= */ - + require_once('../functions/strings.php'); require_once('../functions/addressbook.php'); - + displayHtmlHeader(); - + /* Initialize vars */ if (!isset($query)) { $query = ''; } if (!isset($show)) { $show = ''; } @@ -206,7 +206,7 @@ $abook = addressbook_init(); /* Create search form */ if ($show == 'form' && empty($listall)) { - echo '
    ' . "\n" . html_tag( 'table', '', '', '', 'border="0" width="100%" height="100%"' ) . html_tag( 'tr' ) . @@ -227,7 +227,7 @@ if ($show == 'form' && empty($listall)) { } else { echo addHidden('backend', '-1'); } - + echo '' . html_tag( 'tr', html_tag( 'td', '', 'left' ) . @@ -273,13 +273,13 @@ if ($show == 'form' && empty($listall)) { /* Do the search */ if (!empty($query)) { - + if($backend == -1) { $res = $abook->s_search($query); } else { $res = $abook->s_search($query, $backend); } - + if (!is_array($res)) { echo html_tag( 'p', '
    ' . _("Your search failed with the following error(s)") . @@ -288,7 +288,7 @@ if ($show == 'form' && empty($listall)) { "\n\n"; exit; } - + if (sizeof($res) == 0) { echo html_tag( 'p', '
    ' . _("No persons matching your search were found") . "\n" , @@ -296,11 +296,11 @@ if ($show == 'form' && empty($listall)) { "\n\n"; exit; } - + display_result($res); } } - + } ?> - + \ No newline at end of file diff --git a/src/addrbook_search_html.php b/src/addrbook_search_html.php index 1f145a5e..0bb8c875 100644 --- a/src/addrbook_search_html.php +++ b/src/addrbook_search_html.php @@ -15,7 +15,7 @@ * @subpackage addressbook */ -/** +/** * Path for SquirrelMail required files. * @ignore */ @@ -113,7 +113,7 @@ if ($javascript_on) { foreach ($res as $row) { $email = AddressBook::full_address($row); - if ($line % 2) { + if ($line % 2) { $tr_bgcolor = $color[12]; } else { $tr_bgcolor = $color[4]; @@ -202,10 +202,10 @@ echo addInput('addrquery', $addrquery, 26); if (!isset($backend)) { $backend = ''; } if ($abook->numbackends > 1) { echo '' . _("in") . ' '; - - $selopts['-1'] = _("All address books"); + + $selopts['-1'] = _("All address books"); $ret = $abook->get_backend_list(); - + while (list($undef,$v) = each($ret)) { $selopts[$v->bnum] = $v->sname; } @@ -248,7 +248,7 @@ if ($addrquery == '' && empty($listall)) { addr_display_result($res, false); } else { echo html_tag( 'p', '
    ' . - sprintf(_("Unable to list addresses from %s"), + sprintf(_("Unable to list addresses from %s"), $abook->backends[$backend]->sname) . "
    \n" , 'center' ); } @@ -300,4 +300,4 @@ if ($addrquery == '' || sizeof($res) == 0) { } ?> - + \ No newline at end of file diff --git a/src/addressbook.php b/src/addressbook.php index afa64ad8..09a5a41b 100644 --- a/src/addressbook.php +++ b/src/addressbook.php @@ -268,10 +268,10 @@ if ($showaddrlist) { html_tag( 'th', _("Nickname") . show_abook_sort_button($abook_sort_order, _("sort by nickname"), 0, 1), 'left', '', 'width="1%"' ) . "\n" . - html_tag( 'th', _("Name") . + html_tag( 'th', _("Name") . show_abook_sort_button($abook_sort_order, _("sort by name"), 2, 3), 'left', '', 'width="1%"' ) . "\n" . - html_tag( 'th', _("E-mail") . + html_tag( 'th', _("E-mail") . show_abook_sort_button($abook_sort_order, _("sort by email"), 4, 5), 'left', '', 'width="1%"' ) . "\n" . html_tag( 'th', _("Info") . @@ -320,7 +320,7 @@ if ($showaddrlist) { ' ' , 'center', '', 'valign="top" width="1%"' ); } - echo html_tag( 'td', ' ' . $row['nickname'] . ' ', 'left', '', 'valign="top" width="1%" nowrap' ) . + echo html_tag( 'td', ' ' . $row['nickname'] . ' ', 'left', '', 'valign="top" width="1%" nowrap' ) . html_tag( 'td', ' ' . $row['lastname'] . ' ' . $row['firstname'] . ' ', 'left', '', 'valign="top" width="1%" nowrap' ) . html_tag( 'td', '', 'left', '', 'valign="top" width="1%" nowrap' ) . ' '; } else { @@ -377,4 +377,4 @@ echo "\n"; do_hook('addressbook_bottom'); echo "\n\n"; ?> - + \ No newline at end of file diff --git a/src/configtest.php b/src/configtest.php index b3f0307d..adc1ae00 100644 --- a/src/configtest.php +++ b/src/configtest.php @@ -35,9 +35,9 @@ ob_implicit_flush(); define('SM_PATH', '../'); /* - * Load config before output begins. functions/strings.php depends on + * Load config before output begins. functions/strings.php depends on * functions/globals.php. functions/global.php needs to be run before - * any html output starts. If config.php is missing, error will be displayed + * any html output starts. If config.php is missing, error will be displayed * later. */ if (file_exists(SM_PATH . 'config/config.php')) { @@ -76,7 +76,7 @@ if(!in_array('strings.php', $included)) { echo "

    ' . '
    ' . '' - . '' . '' . '' @@ -73,11 +73,11 @@ if (!$words){ array_pop($words_ary); array_shift($words_ary); /** - * Do some fancy stuff to separate the words into three + * Do some fancy stuff to separate the words into three * columns. */ for ($j=0; $j\n"; } @@ -87,7 +87,7 @@ if (!$words){ } $msg .= '
    " - . '' . '

    ' . "
    \n\n" . '\n" . - '\n
    SquirrelMail version:" . $version . "
    Config file version:' . $config_version . "
    Config file last modified:' . + '
    Config file last modified:' . date ('d F Y H:i:s', filemtime(SM_PATH . 'config/config.php')) . "
    \n

    \n\n"; @@ -103,13 +103,13 @@ echo "Checking paths...
    \n"; if(!file_exists($data_dir)) { do_err("Data dir ($data_dir) does not exist!"); -} +} if(!is_dir($data_dir)) { do_err("Data dir ($data_dir) is not a directory!"); -} +} if(!is_readable($data_dir)) { do_err("I cannot read from data dir ($data_dir)!"); -} +} if(!is_writable($data_dir)) { do_err("I cannot write to data dir ($data_dir)!"); } @@ -123,10 +123,10 @@ if($data_dir == $attachment_dir) { } else { if(!file_exists($attachment_dir)) { do_err("Attachment dir ($attachment_dir) does not exist!"); - } + } if (!is_dir($attachment_dir)) { do_err("Attachment dir ($attachment_dir) is not a directory!"); - } + } if (!is_writable($attachment_dir)) { do_err("I cannot write to attachment dir ($attachment_dir)!"); } @@ -175,7 +175,7 @@ if($useSendmail) { // is_executable also checks for existance, but we want to be as precise as possible with the errors if(!file_exists($sendmail_path)) { do_err("Location of sendmail program incorrect ($sendmail_path)!"); - } + } if(!is_executable($sendmail_path)) { do_err("I cannot execute the sendmail program ($sendmail_path)!"); } @@ -313,9 +313,9 @@ if($addrbook_dsn || $prefs_dsn || $addrbook_global_dsn) { if (class_exists('DB')) { echo "$IND PHP Pear DB support is present.
    \n"; $db_functions=array( - 'dbase' => 'dbase_open', - 'fbsql' => 'fbsql_connect', - 'interbase' => 'ibase_connect', + 'dbase' => 'dbase_open', + 'fbsql' => 'fbsql_connect', + 'interbase' => 'ibase_connect', 'informix' => 'ifx_connect', 'msql' => 'msql_connect', 'mssql' => 'mssql_connect', @@ -382,14 +382,14 @@ if( empty($ldap_server) ) { if ( $linkid ) { echo "$IND LDAP connect to ".$param['host']." successful: ".$linkid."
    \n"; - + if ( !empty($param['protocol']) && !ldap_set_option($linkid, LDAP_OPT_PROTOCOL_VERSION, $param['protocol']) ) { do_err('Unable to set LDAP protocol'); - } + } if ( empty($param['binddn']) ) { - $bind = ldap_bind($linkid); + $bind = ldap_bind($linkid); } else { $bind = ldap_bind($param['binddn'], $param['bindpw']); } @@ -399,7 +399,7 @@ if( empty($ldap_server) ) { } else { do_err('Unable to Bind to LDAP Server'); } - + ldap_close($linkid); } else { do_err('Connection to LDAP failed'); @@ -417,4 +417,4 @@ if( empty($ldap_server) ) { +?> \ No newline at end of file diff --git a/src/folders.php b/src/folders.php index 962d6981..f64c5bbe 100644 --- a/src/folders.php +++ b/src/folders.php @@ -122,7 +122,7 @@ if ( $default_sub_of_inbox == false ) { } // Call sqimap_mailbox_option_list, using existing connection to IMAP server, -// the arrays of folders to include or skip (assembled above), +// the arrays of folders to include or skip (assembled above), // use 'noinferiors' as a mailbox filter to leave out folders that can not contain other folders. // use the long format to show subfolders in an intelligible way if parent is missing (special folder) echo sqimap_mailbox_option_list($imapConnection, $show_selected, $skip_folders, $boxes, 'noinferiors', true); @@ -199,7 +199,7 @@ if ($count_special_folders < count($boxes)) { . "'; - for ($q = 0; $q < count($box); $q++) { + for ($q = 0; $q < count($box); $q++) { echo ' \n"; - } + } echo '

    ' . '\n" . "

    \n"; @@ -336,4 +336,4 @@ do_hook('folders_bottom'); - + \ No newline at end of file diff --git a/src/folders_delete.php b/src/folders_delete.php index 1a96fc26..c5f58125 100644 --- a/src/folders_delete.php +++ b/src/folders_delete.php @@ -6,7 +6,7 @@ * Copyright (c) 1999-2004 The SquirrelMail Project Team * Licensed under the GNU GPL. For full terms see the file COPYING. * - * Deletes folders from the IMAP server. + * Deletes folders from the IMAP server. * Called from the folders.php * * @version $Id$ @@ -93,7 +93,7 @@ else /* Courier IMAP doesn't like subfolders of Trash * If global options say we can't move it into Trash * If it's already a subfolder of trash, we'll have to delete it */ -if (strtolower($imap_server_type) == 'courier' || +if (strtolower($imap_server_type) == 'courier' || (isset($delete_folder) && $delete_folder) || eregi('^'.$trash_folder.'.+', $mailbox) ) { diff --git a/src/folders_rename_do.php b/src/folders_rename_do.php index 5970fde9..f3afc591 100644 --- a/src/folders_rename_do.php +++ b/src/folders_rename_do.php @@ -75,7 +75,7 @@ if ($old_name <> $new_name) { } sqimap_mailbox_rename( $imapConnection, $orig, $newone ); - // Log out this session + // Log out this session sqimap_logout($imapConnection); } diff --git a/src/folders_subscribe.php b/src/folders_subscribe.php index 73ffb61b..a29c94ff 100644 --- a/src/folders_subscribe.php +++ b/src/folders_subscribe.php @@ -6,7 +6,7 @@ * Copyright (c) 1999-2004 The SquirrelMail Project Team * Licensed under the GNU GPL. For full terms see the file COPYING. * - * Subscribe and unsubcribe from folders. + * Subscribe and unsubcribe from folders. * Called from folders.php * * @version $Id$ diff --git a/src/help.php b/src/help.php index 29df95cc..e1f8c85f 100644 --- a/src/help.php +++ b/src/help.php @@ -51,8 +51,8 @@ function get_info($doc, $pos) { for ($n=$pos; $n < $cntdoc; $n++) { if (trim(strtolower($doc[$n])) == '' || trim(strtolower($doc[$n])) == '
    ') { - for ($n++; $n < $cntdoc - && (trim(strtolower($doc[$n])) != '
    ') + for ($n++; $n < $cntdoc + && (trim(strtolower($doc[$n])) != '') && (trim(strtolower($doc[$n])) != '
    '); $n++) { if (trim(strtolower($doc[$n])) == '') { $n++; @@ -60,7 +60,7 @@ function get_info($doc, $pos) { } if (trim(strtolower($doc[$n])) == '<description>') { $ary[1] = ''; - for ($n++;$n < $cntdoc + for ($n++;$n < $cntdoc && (trim(strtolower($doc[$n])) != '</description>'); $n++) { $ary[1] .= $doc[$n]; @@ -68,8 +68,8 @@ function get_info($doc, $pos) { } if (trim(strtolower($doc[$n])) == '<summary>') { $ary[2] = ''; - for ($n++; $n < $cntdoc - && (trim(strtolower($doc[$n])) != '</summary>'); + for ($n++; $n < $cntdoc + && (trim(strtolower($doc[$n])) != '</summary>'); $n++) { $ary[2] .= $doc[$n]; } @@ -193,7 +193,7 @@ if ( $chapter == 0 || !isset( $helpdir[$chapter-1] ) ) { } else { echo html_tag( 'p', $help_info[2], 'left' ); } - + $section = 0; for ($n = $help_info[3], $cnt = count($doc); $n < $cnt; $n++) { $section++; diff --git a/src/image.php b/src/image.php index 09fa55be..d48f80ab 100644 --- a/src/image.php +++ b/src/image.php @@ -37,7 +37,7 @@ sqgetGlobalVar('ent_id', $ent_id, SQ_GET); sqgetGlobalVar('QUERY_STRING', $QUERY_STRING, SQ_SERVER); /* end globals */ -echo '<br />' . +echo '<br />' . '<table width="100%" border="0" cellspacing="0" cellpadding="2" align="center">' . "\n" . '<tr><td bgcolor="' . $color[0] . '">' . @@ -50,7 +50,7 @@ echo '<a href="'.$msg_url.'">'. _("View message") . '</a>'; $DownloadLink = '../src/download.php?passed_id=' . $passed_id . - '&mailbox=' . urlencode($mailbox) . + '&mailbox=' . urlencode($mailbox) . '&ent_id=' . urlencode($ent_id) . '&absolute_dl=true'; ?> </b></td></tr> @@ -63,4 +63,4 @@ $DownloadLink = '../src/download.php?passed_id=' . $passed_id . <img src="<?php echo $DownloadLink; ?>" /> </td></tr></table> -</body></html> +</body></html> \ No newline at end of file diff --git a/src/index.php b/src/index.php index 3d2bdc51..ac57affb 100644 --- a/src/index.php +++ b/src/index.php @@ -18,4 +18,4 @@ header("Location:../index.php"); /* pretty impressive huh? */ -?> +?> \ No newline at end of file diff --git a/src/left_main.php b/src/left_main.php index c561b8f5..031cc486 100644 --- a/src/left_main.php +++ b/src/left_main.php @@ -1121,4 +1121,4 @@ sqimap_logout($imapConnection); ?> </td></tr></table> -</div></body></html> +</div></body></html> \ No newline at end of file diff --git a/src/login.php b/src/login.php index 28c0f241..f5085fc8 100644 --- a/src/login.php +++ b/src/login.php @@ -51,11 +51,11 @@ $base_uri = sqm_baseuri(); */ sqsession_destroy(); - + header('Pragma: no-cache'); /** - * This detects if the IMAP server has logins disabled, and if so, + * This detects if the IMAP server has logins disabled, and if so, * squelches the display of the login form and puts up a message * explaining the situation. */ @@ -171,7 +171,7 @@ echo html_tag( 'table', ) , 'center', $color[4], 'border="0" width="100%"' ) , 'left', $color[4] ) - ) . + ) . html_tag( 'tr', html_tag( 'td', '<center>'. addSubmit(_("Login")) .'</center>', @@ -186,4 +186,4 @@ echo '</form>' . "\n"; do_hook('login_bottom'); ?> -</body></html> +</body></html> \ No newline at end of file diff --git a/src/options.php b/src/options.php index 24b45cfe..a25c7c98 100644 --- a/src/options.php +++ b/src/options.php @@ -142,7 +142,7 @@ if (!isset($optmode)) { } /* - * First, set the load information for each option page. + * First, set the load information for each option page. */ /* Initialize load information variables. */ @@ -152,7 +152,7 @@ $optpage_loader = ''; /* Set the load information for each page. */ switch ($optpage) { - case SMOPT_PAGE_MAIN: + case SMOPT_PAGE_MAIN: break; case SMOPT_PAGE_PERSONAL: $optpage_name = _("Personal Information"); @@ -195,7 +195,7 @@ if ( !@is_file( $optpage_file ) ) { $optpage = SMOPT_PAGE_MAIN; } else if ($optpage != SMOPT_PAGE_MAIN ) { /* Include the file for this optionpage. */ - + require_once($optpage_file); /* Assemble the data for this option page. */ @@ -245,7 +245,7 @@ if ($optmode == SMOPT_MODE_SUBMIT) { case SMOPT_PAGE_FOLDER: $save_hook_name = 'options_folder_save'; break; - default: + default: $save_hook_name = 'options_save'; break; } @@ -452,7 +452,7 @@ if ($optpage == SMOPT_PAGE_MAIN) { /* If it is not empty, trigger the inside hook. */ if ($inside_hook_name != '') { - do_hook($inside_hook_name); + do_hook($inside_hook_name); } /* Spit out a submit button. */ @@ -461,7 +461,7 @@ if ($optpage == SMOPT_PAGE_MAIN) { /* If it is not empty, trigger the bottom hook. */ if ($bottom_hook_name != '') { - do_hook($bottom_hook_name); + do_hook($bottom_hook_name); } } ?> @@ -469,4 +469,4 @@ if ($optpage == SMOPT_PAGE_MAIN) { </table> </td></tr> </table> -</body></html> +</body></html> \ No newline at end of file diff --git a/src/options_highlight.php b/src/options_highlight.php index 33de157d..5822f889 100644 --- a/src/options_highlight.php +++ b/src/options_highlight.php @@ -38,7 +38,7 @@ sqGetGlobalVar('match_type', $match_type); sqGetGlobalVar('value', $value); /* end of get globals */ - + function oh_opt( $val, $sel, $tit ) { echo "<option value=\"$val\""; if ( $sel ) @@ -100,11 +100,11 @@ if (isset($theid) && ($action == 'delete') || $value = str_replace(',', ' ', $value); if(isset($theid)) { - $message_highlight_list[$theid] = + $message_highlight_list[$theid] = array( 'name' => $identname, 'color' => $newcolor, 'value' => $value, 'match_type' => $match_type ); } else { - $message_highlight_list[] = + $message_highlight_list[] = array( 'name' => $identname, 'color' => $newcolor, 'value' => $value, 'match_type' => $match_type ); } @@ -119,7 +119,7 @@ html_tag( 'table', "\n" . html_tag( 'td', '<center><b>' . _("Options") . ' - ' . _("Message Highlighting") . '</b></center>', 'left') ), 'center', $color[9], 'width="95%" border="0" cellpadding="1" cellspacing="0"' ) . "<br />\n" . -html_tag( 'table', '', '', '', 'width="100%" border="0" cellpadding="1" cellspacing="0"' ) . +html_tag( 'table', '', '', '', 'width="100%" border="0" cellpadding="1" cellspacing="0"' ) . html_tag( 'tr' ) . "\n" . html_tag( 'td', '', 'left' ); @@ -465,4 +465,4 @@ if ($action == 'edit' || $action == 'add') { } do_hook('options_highlight_bottom'); ?> -</table></body></html> +</table></body></html> \ No newline at end of file diff --git a/src/options_identities.php b/src/options_identities.php index 12cf4de7..a8cbbb67 100644 --- a/src/options_identities.php +++ b/src/options_identities.php @@ -24,7 +24,7 @@ require_once(SM_PATH . 'functions/global.php'); require_once(SM_PATH . 'functions/display_messages.php'); require_once(SM_PATH . 'functions/html.php'); -/* POST data var names are dynamic because +/* POST data var names are dynamic because of the possible multiple idents so lets get them all FIXME! This circumvents the benefits of rg=0 @@ -39,27 +39,27 @@ if (!empty($_POST)) { header('Location: '.get_location().'/options_personal.php'); exit(); } - + displayPageHeader($color, 'None'); - + $Info = do_hook('options_identities_process', 0); if ($Info[1]) { SaveUpdateFunction(); } - + if (CheckAndDoDefault() || CheckAndDoPromote()) { SaveUpdateFunction(); } if (isset($update) || CheckForDelete()) { SaveUpdateFunction(); } - + do_hook('options_identities_top'); LoadInfo($full_name, $email_address, $reply_to, $signature, ''); $td_str = ''; $td_str .= '<form name="f" action="options_identities.php" method="post"><br />'; $td_str .= ShowTableInfo($full_name, $email_address, $reply_to, $signature, ''); - + $num = 1; while (LoadInfo($full_name, $email_address, $reply_to, $signature, $num)) { $td_str .= html_tag( 'tr', @@ -69,7 +69,7 @@ if (!empty($_POST)) { $num ++; } - echo '<br />' . + echo '<br />' . html_tag( 'table', "\n" . html_tag( 'tr', "\n" . html_tag( 'td', "\n" . @@ -161,7 +161,7 @@ if (!empty($_POST)) { setPref($data_dir, $username, 'email_address', $email_address); setPref($data_dir, $username, 'reply_to', $reply_to); setSig($data_dir, $username, "g", $signature); - + } function CheckAndDoDefault() { @@ -252,14 +252,14 @@ if (!empty($_POST)) { $temp = $$nameA; $$nameA = $$nameB; $$nameB = $temp; - + $nameA = 'email_address' . $i; $nameB = 'email_address' . ($i - 1); global $$nameA, $$nameB; $temp = $$nameA; $$nameA = $$nameB; $$nameB = $temp; - + $nameA = 'reply_to' . $i; $nameB = 'reply_to' . ($i - 1); global $$nameA, $$nameB; diff --git a/src/options_order.php b/src/options_order.php index d08454c6..caf72036 100644 --- a/src/options_order.php +++ b/src/options_order.php @@ -28,7 +28,7 @@ require_once(SM_PATH . 'functions/html.php'); require_once(SM_PATH . 'functions/forms.php'); /* get globals */ -sqgetGlobalVar('num', $num, SQ_GET); +sqgetGlobalVar('num', $num, SQ_GET); sqgetGlobalVar('add', $add, SQ_POST); sqgetGlobalVar('submit', $submit); @@ -38,23 +38,23 @@ sqgetGlobalVar('method', $method); displayPageHeader($color, 'None'); echo - html_tag( 'table', '', 'center', '', 'width="95%" border="0" cellpadding="1" cellspacing="0"' ) . - html_tag( 'tr' ) . + html_tag( 'table', '', 'center', '', 'width="95%" border="0" cellpadding="1" cellspacing="0"' ) . + html_tag( 'tr' ) . html_tag( 'td', '', 'center', $color[0] ) . '<b>' . _("Options") . ' - ' . _("Index Order") . '</b>' . - html_tag( 'table', '', '', '', 'width="100%" border="0" cellpadding="8" cellspacing="0"' ) . - html_tag( 'tr' ) . + html_tag( 'table', '', '', '', 'width="100%" border="0" cellpadding="8" cellspacing="0"' ) . + html_tag( 'tr' ) . html_tag( 'td', '', 'center', $color[4] ); - + $available[1] = _("Checkbox"); $available[2] = _("From"); $available[3] = _("Date"); $available[4] = _("Subject"); $available[5] = _("Flags"); $available[6] = _("Size"); - + if (! isset($method)) { $method = ''; } - + if ($method == 'up' && $num > 1) { $prev = $num-1; $tmp = $index_order[$prev]; @@ -67,7 +67,7 @@ displayPageHeader($color, 'None'); $index_order[$num] = $tmp; } else if ($method == 'remove' && $num) { for ($i=1; $i < 8; $i++) { - removePref($data_dir, $username, "order$i"); + removePref($data_dir, $username, "order$i"); } for ($j=1,$i=1; $i <= count($index_order); $i++) { if ($i != $num) { @@ -87,7 +87,7 @@ displayPageHeader($color, 'None'); $add = str_replace ('<%', '..', $add); $index_order[count($index_order)+1] = $add; } - + if ($method) { for ($i=1; $i <= count($index_order); $i++) { setPref($data_dir, $username, "order$i", $index_order[$i]); @@ -100,7 +100,7 @@ displayPageHeader($color, 'None'); ) ) , '', '', '', 'width="65%" border="0" cellpadding="0" cellspacing="0"' ) . "<br />\n"; - + if (count($index_order)) { echo html_tag( 'table', '', '', '', ' cellspacing="0" cellpadding="0" border="0"' ) . "\n"; @@ -116,7 +116,7 @@ displayPageHeader($color, 'None'); if ($tmp != 4) echo '<small><a href="options_order.php?method=remove&num=' . $i . '">' . _("remove") . '</a></small>'; else - echo ' '; + echo ' '; echo '</td>'; echo html_tag( 'td', '<small> - </small>' ); echo html_tag( 'td', $available[$tmp] ); @@ -124,7 +124,7 @@ displayPageHeader($color, 'None'); } echo '</table>' . "\n"; } - + if (count($index_order) != count($available)) { $opts = array(); @@ -146,7 +146,7 @@ displayPageHeader($color, 'None'); echo addSubmit(_("Add"), 'submit'); echo '</form>'; } - + echo html_tag( 'p', '<a href="../src/options.php">' . _("Return to options page") . '</a></p><br />' ); ?> @@ -155,4 +155,4 @@ displayPageHeader($color, 'None'); </td></tr> </table> -</body></html> +</body></html> \ No newline at end of file diff --git a/src/printer_friendly_bottom.php b/src/printer_friendly_bottom.php index 460dbb51..0c4f94f5 100644 --- a/src/printer_friendly_bottom.php +++ b/src/printer_friendly_bottom.php @@ -35,7 +35,7 @@ sqgetGlobalVar('mailbox', $mailbox, SQ_GET); if (! sqgetGlobalVar('passed_ent_id', $passed_ent_id, SQ_GET) ) { $passed_ent_id = ''; -} +} /* end globals */ $pf_cleandisplay = getPref($data_dir, $username, 'pf_cleandisplay', false); @@ -52,7 +52,7 @@ if ($passed_ent_id) { /* --start display setup-- */ -$rfc822_header = $message->rfc822_header; +$rfc822_header = $message->rfc822_header; /* From and Date are usually fine as they are... */ $from = $rfc822_header->getAddr_s('from'); $date = getLongDateString($rfc822_header->date); @@ -80,7 +80,7 @@ if ($ent_ar[0] != '') { } /* now, if they choose to, we clean up the display a bit... */ - + if ($pf_cleandisplay) { $num_leading_spaces = 9; // nine leading spaces for indentation @@ -158,7 +158,7 @@ echo '<body text="#000000" bgcolor="#FFFFFF" link="#000000" vlink="#000000" alin * @param string unclean_string * @param integer num_leading_spaces * @return string - * @access private + * @access private */ function pf_clean_string ( $unclean_string, $num_leading_spaces ) { global $data_dir, $username; diff --git a/src/printer_friendly_main.php b/src/printer_friendly_main.php index 81c65a9b..6dc1bca5 100644 --- a/src/printer_friendly_main.php +++ b/src/printer_friendly_main.php @@ -33,10 +33,10 @@ if ( ! sqgetGlobalVar('mailbox',$mailbox,SQ_GET) || echo '<frame src="printer_friendly_top.php" name="top_frame" ' . 'scrolling="no" noresize="noresize" frameborder="0" />' . "\n"; echo '<frame src="printer_friendly_bottom.php?passed_ent_id=' - . urlencode($passed_ent_id) . '&mailbox=' . urlencode($mailbox) + . urlencode($passed_ent_id) . '&mailbox=' . urlencode($mailbox) . '&passed_id=' . $passed_id . '" name="bottom_frame" frameborder="0" />' . "\n"; echo "</frameset>\n"; } ?> -</html> +</html> \ No newline at end of file diff --git a/src/printer_friendly_top.php b/src/printer_friendly_top.php index 53bb1896..e00f37c2 100644 --- a/src/printer_friendly_top.php +++ b/src/printer_friendly_top.php @@ -42,4 +42,4 @@ echo '<body text="'.$color[8].'" bgcolor="'.$color[3].'" link="'.$color[7].'" vl '</b>', 'right' ); ?> -</body></html> +</body></html> \ No newline at end of file diff --git a/src/redirect.php b/src/redirect.php index a071a71c..a5ac323c 100644 --- a/src/redirect.php +++ b/src/redirect.php @@ -60,12 +60,12 @@ if (!sqgetGlobalVar('mailto', $mailto)) { set_up_language($squirrelmail_language, true); /* Refresh the language cookie. */ -setcookie('squirrelmail_language', $squirrelmail_language, time()+2592000, +setcookie('squirrelmail_language', $squirrelmail_language, time()+2592000, $base_uri); if (!isset($login_username)) { include_once(SM_PATH . 'functions/display_messages.php' ); - logout_error( _("You must be logged in to access this page.") ); + logout_error( _("You must be logged in to access this page.") ); exit; } @@ -154,13 +154,13 @@ function attachment_common_parse($str, $debug) { global $attachment_common_types, $attachment_common_types_parsed; $attachment_common_types_parsed[$str] = true; - - /* - * Replace ", " with "," and explode on that as Mozilla 1.x seems to + + /* + * Replace ", " with "," and explode on that as Mozilla 1.x seems to * use "," to seperate whilst IE, and earlier versions of Mozilla use * ", " to seperate */ - + $str = str_replace( ', ' , ',' , $str ); $types = explode(',', $str); diff --git a/src/signout.php b/src/signout.php index 3dece37c..ed52ffe1 100644 --- a/src/signout.php +++ b/src/signout.php @@ -26,7 +26,7 @@ require_once(SM_PATH . 'functions/strings.php'); require_once(SM_PATH . 'functions/html.php'); /* Erase any lingering attachments */ -if (isset($attachments) && is_array($attachments) +if (isset($attachments) && is_array($attachments) && sizeof($attachments)){ $hashed_attachment_dir = getHashedDir($username, $attachment_dir); foreach ($attachments as $info) { @@ -70,7 +70,7 @@ if ($signout_page) { ?> <title><?php echo $org_title . ' - ' . _("Signout"); ?> -

    @@ -94,4 +94,4 @@ html_tag( 'table', 'center', $color[4], 'width="50%" cols="1" cellpadding="2" cellspacing="0" border="0"' ) ?> - + \ No newline at end of file diff --git a/src/view_header.php b/src/view_header.php index 19198b1b..958695a2 100644 --- a/src/view_header.php +++ b/src/view_header.php @@ -28,13 +28,13 @@ require_once(SM_PATH . 'functions/url_parser.php'); function parse_viewheader($imapConnection,$id, $passed_ent_id) { if (!$passed_ent_id) { - $read=sqimap_run_command ($imapConnection, "FETCH $id BODY[HEADER]", + $read=sqimap_run_command ($imapConnection, "FETCH $id BODY[HEADER]", true, $a, $b, TRUE); } else { $query = "FETCH $id BODY[".$passed_ent_id.'.HEADER]'; - $read=sqimap_run_command ($imapConnection, $query, + $read=sqimap_run_command ($imapConnection, $query, true, $a, $b, TRUE); - } + } $cnum = 0; for ($i=1; $i < count($read); $i++) { $line = htmlspecialchars($read[$i]); @@ -61,7 +61,7 @@ function parse_viewheader($imapConnection,$id, $passed_ent_id) { } for ($i=0; $i < count($second); $i = $j) { $f = (isset($first[$i]) ? $first[$i] : ''); - $s = (isset($second[$i]) ? nl2br($second[$i]) : ''); + $s = (isset($second[$i]) ? nl2br($second[$i]) : ''); $j = $i + 1; while (($first[$j] == '') && ($j < count($first))) { $s .= '    ' . nl2br($second[$j]); @@ -91,18 +91,18 @@ function view_header($header, $mailbox, $color) { 'align="center">' . "\n" . ''. _("Viewing Full Header") . ' - '. - '' ._("View message") . "
    \n"; - echo_template_var($header, + echo_template_var($header, array( '\n".'
    ', '', '', '', - '
    '."\n" + ''."\n" ) ); echo ''; @@ -117,17 +117,17 @@ if ( sqgetGlobalVar('mailbox', $temp, SQ_GET) ) { } if ( !sqgetGlobalVar('passed_ent_id', $passed_ent_id, SQ_GET) ) { $passed_ent_id = ''; -} +} sqgetGlobalVar('key', $key, SQ_COOKIE); sqgetGlobalVar('username', $username, SQ_SESSION); sqgetGlobalVar('onetimepad', $onetimepad, SQ_SESSION); sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION); -$imapConnection = sqimap_login($username, $key, $imapServerAddress, +$imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 0); $mbx_response = sqimap_mailbox_select($imapConnection, $mailbox, false, false, true); -$header = parse_viewheader($imapConnection,$passed_id, $passed_ent_id); +$header = parse_viewheader($imapConnection,$passed_id, $passed_ent_id); view_header($header, $mailbox, $color); ?> \ No newline at end of file diff --git a/src/view_text.php b/src/view_text.php index 409995aa..98a03bb1 100644 --- a/src/view_text.php +++ b/src/view_text.php @@ -95,4 +95,4 @@ echo '' . _("Download this as a file") . ''; - + \ No newline at end of file diff --git a/src/webmail.php b/src/webmail.php index 8836f1ba..0c6ef8e1 100644 --- a/src/webmail.php +++ b/src/webmail.php @@ -131,7 +131,7 @@ else { */ if (!isset($right_frame)) { $right_frame = ''; -} +} if ($right_frame == 'right_main.php') { $urlMailbox = urlencode($mailbox); $right_frame_url = @@ -166,4 +166,4 @@ if($ret != '') { echo $output; ?> - + \ No newline at end of file -- 2.25.1