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;
}
}
return $refer;
}
}
-?>
+?>
\ No newline at end of file
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
$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;
$content_type = $rfc822_header->content_type;
// MAIL FROM: <from address> 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;
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
} 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);
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') {
} 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 <challenge string>"
$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);
}
// The LOGIN method
fputs($stream, "AUTH LOGIN\r\n");
$tmp = fgets($stream, 1024);
-
+
if ($this->errorCheck($tmp, $stream)) {
return(0);
}
if ($this->errorCheck($tmp, $stream)) {
return(0);
}
-
+
fputs($stream, base64_encode($pass) . "\r\n");
$tmp = fgets($stream, 1024);
if ($this->errorCheck($tmp, $stream)) {
} 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];
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;
}
}
}
-
- 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");
}
}
}
-
+
for ($i = 0, $cnt = count($bcc); $i < $cnt; $i++) {
if (!$bcc[$i]->host) $bcc[$i]->host = $domain;
if ($bcc[$i]->mailbox) {
}
return $stream;
}
-
+
function finalizeStream($stream) {
fputs($stream, "\r\n.\r\n"); /* end the DATA part */
$tmp = fgets($stream, 1024);
fclose($stream);
return true;
}
-
+
/* check if an SMTP reply is an error and set an error message) */
function errorCheck($line, $smtpConnection) {
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");
return true;
}
-
+
function authPop($pop_server='', $pop_port='', $user, $pass) {
if (!$pop_port) {
$pop_port = 110;
/** This of course depends upon Deliver */
require_once(SM_PATH . 'class/deliver/Deliver.class.php');
-
+
/**
* Delivers messages using the sendmail binary
* @package squirrelmail
*
* 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);
}
}
* 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);
$s2 = str_replace("\n", "\r\n", $s);
return strlen($s2);
}
-
+
}
-?>
+?>
\ No newline at end of file
<?php
header('Location: ../index.php');
-?>
+?>
\ No newline at end of file
* @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='',
$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";
+ $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 = '';
$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.'"';
}
}
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;
}
foreach ($style as $k => $v) {
/* if value of key value = true close the tag */
- if ($v) {
+ if ($v) {
$closestyles .= '</'.$k.'>';
- }
+ }
}
}
echo $openstyles;
echo "\n";
for($i = 0;$i<$cnt;$i++) {
$el = $this->html_el[$i];
- $el->echoHtml($usecss,$indentmore);
+ $el->echoHtml($usecss,$indentmore);
}
echo $indent;
}
}
}
}
-
+
?>
\ No newline at end of file
/* pretty impressive huh? */
-?>
+?>
\ No newline at end of file
* 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.
*
* @package squirrelmail
* @subpackage i18n
*/
-
+
/**
* Class that uses parsed translation input objects
* @package squirrelmail
$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));
}
$data = $this->STREAM->read($length);
return (string)$data;
}
-
+
/**
* binary search for string
* @param string $string
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);
* @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);
}
// 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);
$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);
}
}
$addr = ($email ? $personal . ' <' .$email.'>'
- : $this->personal);
+ : $this->personal);
$best_dpl = $this->personal;
} else {
$addr = $email;
}
return $result;
}
-
+
function getEncodedAddress() {
return $this->getAddress(true, true);
}
}
}
-?>
+?>
\ No newline at end of file
$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;
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';
$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);
} else {
$message = new Message();
}
-
+
for ($cnt = strlen($read); $i < $cnt; ++$i) {
$char = strtoupper($read{$i});
switch ($char) {
$arg_a[] = $msg->parseLiteral($read, $i);
++$arg_no;
break;
- case '0':
+ case '0':
case is_numeric($read{$i}):
/* process integers */
if ($read{$i} == ' ') { break; }
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 */
// $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')) {
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];
}
return $result;
}
-
+
function initAttachment($type, $name, $location) {
$attachment = new Message();
$mime_header = new MessageHeader();
}
}
-?>
+?>
\ No newline at end of file
*/
/**
- * Contains all variables available in a bodystructure
+ * Contains all variables available in a bodystructure
* @package squirrelmail
*/
class MessageHeader {
<?php
header('Location: ../index.php');
-?>
+?>
\ No newline at end of file
*
* 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
*/
*
* 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
*/
*
* 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
*/
* 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
*/
* 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
*
* 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;
* 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
* 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
* 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
/**
* 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
*/
/**
* 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
*/
* 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
*/
* 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
*/
*
* 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
* 'host' => 'memberdir.netscape.com',
* 'name' => 'Netcenter Member Directory',
* 'base' => 'ou=member_directory,o=netcenter.com'
- * );
+ * );
*/
// Add your ldap server options here
/**
* 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 = "";
/*** Database ***/
/**
- * Read doc/database.txt in order to get more information
+ * Read doc/database.txt in order to get more information
* about these settings.
*/
/**
*
* 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
*/
/**
* 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
/**
* 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
/**
* 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
/*** Tweaks ***/
/**
- * Advanced DHTML tree control
+ * Advanced DHTML tree control
*
* Use experimental DHTML folder listing
* @global bool $advanced_tree
* 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
* 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
* 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
*/
* 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;
* 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
*
* 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
/* pretty impressive huh? */
-?>
+?>
\ No newline at end of file
* 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
/* pretty impressive huh? */
-?>
+?>
\ No newline at end of file
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'",
* ? 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.
class abook_local_file extends addressbook_backend {
/**
* Backend type
- * @var string
+ * @var string
*/
var $btype = 'local';
/**
/* 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
}
/**
- * 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
/**
* 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
*/
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');
/* 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;
// 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;
$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 );
}
return ($mtime);
}
*/
-?>
+?>
\ No newline at end of file
*
* 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
*
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);
return $string;
}
-?>
+?>
\ No newline at end of file
*
* 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
*
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);
return $string;
}
-?>
+?>
\ No newline at end of file
*
* 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
*
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);
return $string;
}
-?>
+?>
\ No newline at end of file
*
* 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
*
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);
return $string;
}
-?>
+?>
\ No newline at end of file
*
* 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
*
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);
return $string;
}
-?>
+?>
\ No newline at end of file
*
* 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
*
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);
return $string;
}
-?>
+?>
\ No newline at end of file
*
* 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
*
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);
return $string;
}
-?>
+?>
\ No newline at end of file
*
* 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
*
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);
return $string;
}
-?>
+?>
\ No newline at end of file
*
* 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
*
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);
return $string;
}
-?>
+?>
\ No newline at end of file
*
* 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
* Date: 04/24/96
* Authors: Lori Brownell <loribr@microsoft.com>
* K.D. Chang <a-kchang@microsoft.com>
- *
+ *
* @version $Id$
* @package squirrelmail
* @subpackage decode
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);
return $string;
}
-?>
+?>
\ No newline at end of file
*
* 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/
Authors: Lori Brownell <loribr@microsoft.com>
K.D. Chang <a-kchang@microsoft.com>
The entries are in cp866_DOSCyrillicRussian order
- *
+ *
* @version $Id$
* @package squirrelmail
* @subpackage decode
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
*
* 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
*
*
* 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 <kenw@sybase.com>
+ * 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 <kenw@sybase.com>
*
* 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
/**
* 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;
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);
return $string;
}
-?>
+?>
\ No newline at end of file
*
* 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
*
*
* 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
*
/**
* 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;
*
* 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
*
*
* 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
*
*
* 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
*
*
* 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
*
*
* 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
*
*
* 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
*
*
* 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
*
*
* 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
*
*
* 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
*
*
* 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
*
*
* 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 <mleisher@crl.nmsu.edu>
* 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
*
* 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
*
*
* 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:
* 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
* ns_4551_1 decoding function
*
* @param string $string
- * @return string
+ * @return string
*/
function charset_decode_ns_4551_1 ($string) {
/*
*
* 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
* \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
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));
}
$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
$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
$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
$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
$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
$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
$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
$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
$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
$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
$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
$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
$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
$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;
'/.+(\\?'.$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];
if ($k) {
if ($val) {
$rpl = "$k=$val";
- if ($link) {
- $rpl = preg_replace('/&/','&',$rpl);
- }
+ if ($link) {
+ $rpl = preg_replace('/&/','&',$rpl);
+ }
} else {
$rpl = '';
}
*/
header("Location:../../src/login.php\n\n");
exit();
-?>
+?>
\ No newline at end of file
* @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
*
* 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
* 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.
*
* <ul>
* @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
* @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);
}
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.
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);
*/
global $imap_asearch_opcodes;
$imap_asearch_opcodes = array(
-/* <sequence-set> => 'asequence', */ // Special handling, @see sqimap_asearch_build_criteria()
+/* <sequence-set> => 'asequence', */ // Special handling, @see sqimap_asearch_build_criteria()
/*'ALL' is binary operator */
'ANSWERED' => '',
'BCC' => 'astring',
'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' => '',
$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 = "<font color=\"$color[2]\"><b>\n" . $title . "</b><br />\n";
*/
function asearch_unhtmlentities($string) {
$trans_tbl = array_flip(get_html_translation_table(HTML_ENTITIES));
- for ($i=127; $i<255; $i++) /* Add &#<dec>; entities */
+ for ($i=127; $i<255; $i++) /* Add &#<dec>; entities */
$trans_tbl['&#' . $i . ';'] = chr($i);
return strtr($string, $trans_tbl);
/* I think the one above is quicker, though it should be benchmarked
{
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 '<pre>';
echo htmlentities($var_name);
/** 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
}
/**
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)
break;
}
}
-/* }*/
+/* }*/
}
}
else
$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 . ' ' .
}
$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);
$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)))
$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;
} 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);
}
*/
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 */
}
/**
return chop(substr($yp, strlen($username)+1));
}
-?>
+?>
\ No newline at end of file
$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);
}
}
-?>
+?>
\ No newline at end of file
$color, $search_position = '', $search_all, $count_all) {
global $squirrelmail_language, $languages, $pos, $allow_charset_search,
- $imap_server_type;
+ $imap_server_type;
$pos = $search_position;
*/
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
$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]);
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 ;
}
}
}
if ($frames) {
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">';
- } else {
+ } else {
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">';
}
echo "\n\n" . html_tag( 'html' ,'' , '', '', 'lang="'.$squirrelmail_language.'"' ) . "\n<head>\n";
echo "<body text=\"$color[8]\" bgcolor=\"$color[4]\" link=\"$color[7]\" vlink=\"$color[7]\" alink=\"$color[7]\" $onload>\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");
}
}
}
-?>
+?>
\ No newline at end of file
* 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
/**
* 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
* 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
}
/* 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);
//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;
/* 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 */
/* pretty impressive huh? */
-?>
+?>
\ No newline at end of file
header("Location:../index.php");
/** pretty impressive huh? **/
-?>
+?>
\ No newline at end of file
<?php
header("Location:../../../index.php");
-?>
+?>
\ No newline at end of file
* @subpackage themes
*/
$icon_themes[] = array('NAME'=>_("Default"),'PATH'=> 'default');
-?>
+?>
\ No newline at end of file
header("Location:../index.php");
/** pretty impressive huh? **/
-?>
+?>
\ No newline at end of file
header("Location: src/login.php\n\n");
?>
-<html></html>
+<html></html>
\ No newline at end of file
* @subpackage themes
*/
$icon_themes[] = array('NAME'=>_("None"),'PATH'=> 'none');
-?>
+?>
\ No newline at end of file
header("Location:../index.php");
/** pretty impressive huh? **/
-?>
+?>
\ No newline at end of file
* @subpackage themes
*/
$icon_themes[] = array('NAME'=>_("XP"),'PATH'=> 'xp');
-?>
+?>
\ No newline at end of file
<?php
header('Location: ../index.php');
-?>
+?>
\ No newline at end of file
* @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;
<?php
header('Location: ../index.php');
-?>
+?>
\ No newline at end of file
'comment' => $identities_link_value
);
}
-
+
if ( $tzChangeAllowed ) {
$TZ_ARRAY[SMPREF_NONE] = _("Same as server");
$tzfile = SM_PATH . 'locale/timezones.cfg';
'posvals' => $TZ_ARRAY
);
}
-
+
/*** Load the Reply Citation Options into the array ***/
$optgrps[SMOPT_GRP_REPLY] = _("Reply Citation Options");
$optvals[SMOPT_GRP_REPLY] = array();
*
* 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.
$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);
}
header("Location: src/login.php\n\n");
?>
-<html></html>
+<html></html>
\ No newline at end of file
/* pretty impressive huh? */
-?>
+?>
\ No newline at end of file
setPref($data_dir, $username, 'abook_take_verify', '');
}
-?>
+?>
\ No newline at end of file
abook_take_save();
}
-?>
+?>
\ No newline at end of file
abook_create_form(SM_PATH . 'src/addressbook.php','addaddr',_("Add to address book"),_("Add address"),$formdata);
echo '</form>';
?>
-</body></html>
+</body></html>
\ No newline at end of file
function adm_check_user() {
global $PHP_SELF;
require_once(SM_PATH . 'functions/global.php');
-
+
if ( !sqgetGlobalVar('username',$username,SQ_SESSION) ) {
$username = '';
}
header("Location:../../src/login.php\n\n");
exit();
-?>
+?>
\ No newline at end of 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 "''";
} 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);
// 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;
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';
}
</tr></table>
<?php
-echo $warning_html;
+echo $warning_html;
echo '<p><big>';
echo _("Before you send your bug report, please make sure to check this checklist for any common problems.");
echo '<li>';
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."), '<a href="http://sourceforge.net/bugs/?group_id=311" target="_blank">', '</a>');
echo "</li>\n";
-
+
echo '<li>';
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 "</li>\n";
), 'center', '', 'width="95%"');
?>
</body>
-</html>
+</html>
\ No newline at end of file
html_tag('td',addInput('query','',50),'left')
) .
html_tag('tr',
- html_tag('td',_("Written by:") . '<br />' .
+ html_tag('td',_("Written by:") . '<br />' .
'<small>' . _("Email addresses only") . '</small>','right') .
html_tag('td',addInput('email','',40),'left')
) .
header("Location:../../src/login.php\n\n");
exit();
-?>
+?>
\ No newline at end of file
'<td><a href="' . SM_PATH . 'plugins/bug_report/show_system_specs.php" target="_blank"><small>' . _("Show system specs") . '</small></a></td></tr>';
}
-?>
+?>
\ No newline at end of file
?>
</pre>
</body>
-</html>
+</html>
\ No newline at end of file
endcalendar();
?>
-</body></html>
+</body></html>
\ No newline at end of file
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;
}
}
}
$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);
+ }
}
}
}
-?>
+?>
\ No newline at end of file
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',
"<a href=\"day.php?year=$prev_year&month=$prev_month&day=$prev_day\">< ".
date_intl('D',$prev_date)."</a>",
display_events();
?>
</table></td></tr></table>
-</body></html>
+</body></html>
\ No newline at end of file
?>
</table></td></tr></table>
-</body></html>
+</body></html>
\ No newline at end of file
*
* Originally contrubuted by Michal Szczotka <michal@tuxy.org>
*
- * Functions to delete a event.
+ * Functions to delete a event.
*
* $Id$
* @package plugins
?>
</table></td></tr></table>
-</body></html>
+</body></html>
\ No newline at end of file
) . "\n";
echo html_tag( 'tr',
html_tag( 'td',
- "<a href=\"day.php?year=$year&month=$month&day=$day\">" .
+ "<a href=\"day.php?year=$year&month=$month&day=$day\">" .
_("Day View") ."</a>",
'left' )
) . "\n";
?>
</table></td></tr></table>
-</body></html>
+</body></html>
\ No newline at end of file
header("Location:../../src/login.php\n\n");
exit();
-?>
+?>
\ No newline at end of file
*
* init plugin into squirrelmail
*
- * $Id$
+ * $Id$
* @package plugins
* @subpackage calendar
*/
echo " \n";
}
-?>
+?>
\ No newline at end of file
/* pretty impressive huh? */
-?>
+?>
\ No newline at end of file
// 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';
/**
* 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)
}
return false;
-}
+}
\ No newline at end of file
{
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
* 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)
$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) {
}
return $msgs;
-}
+}
\ No newline at end of file
* 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) {
return $messages;
}
-?>
+?>
\ No newline at end of file
* 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';
/**
* 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)
user_error('No valid backend defined: this is just a template', E_USER_ERROR);
return $msgs;
-}
+}
\ No newline at end of file
$cpw_pass_min_length = 4;
$cpw_pass_max_length = 25;
-$cpw_require_ssl = FALSE;
+$cpw_require_ssl = FALSE;
\ No newline at end of file
session_write_close();
header('Location: '.SM_PATH. 'src/options.php?optmode=submit&plugin_change_password=1');
exit;
-}
+}
\ No newline at end of file
/* pretty impressive huh? */
-?>
+?>
\ No newline at end of file
/* perform basic checks */
$Messages = cpw_check_input();
-
+
/* if no errors, go ahead with the actual change */
if(count($Messages) == 0) {
$Messages = cpw_do_change();
</tr>
<tr>
<td align="center" colspan="2">
- <?php echo addSubmit(_("Change Password"), 'cpw_go'); ?></td>
+ <?php echo addSubmit(_("Change Password"), 'cpw_go'); ?></td>
</tr>
</table>
</form>
</td></tr>
</tr></table>
-</body></html>
+</body></html>
\ No newline at end of file
}
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";
}
header("Location:../../src/login.php\n\n");
exit();
-?>
+?>
\ No newline at end of file
) ,
'center', '', 'width="80%" border="0" cellpadding="2" cellspacing="0"' );
echo '</body></html>';
-?>
+?>
\ No newline at end of file
global $squirrelmail_plugin_hooks;
if (sqgetGlobalVar('mailbox',$mailbox,SQ_FORM)) {
- sqgetGlobalVar('mailbox',$mailbox,SQ_FORM);
+ sqgetGlobalVar('mailbox',$mailbox,SQ_FORM);
} else {
$mailbox = 'INBOX';
}
* 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;
);
}
}
-?>
+?>
\ No newline at end of file
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) {
echo _("OFF");
}
- echo '</th>' .
+ echo '</th>' .
html_tag( 'td', ' - ', 'left' ) .
html_tag( 'td', '', 'left' );
echo '</table>';
}
?>
-</body></html>
+</body></html>
\ No newline at end of file
<?php
/**
* Default Fortune plugin configuration
- *
+ *
* Configuration defaults to /usr/games/fortune with short quotes
*
* @copyright (c) 2004 The SquirrelMail Project Team
/* pretty impressive huh? */
-?>
+?>
\ No newline at end of file
*
* 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.
*
header("Location:../../src/login.php\n\n");
exit();
-?>
+?>
\ No newline at end of file
<?php
/**
- * options page for IMAP info plugin
- *
+ * options page for IMAP info plugin
+ *
* This is where it all happens :)
- *
+ *
* @copyright (c) 1999-2004 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
$check = "CHECK_".$index;
if (isset($$check)) {
$type[$index] = $$index;
- array_push($tests, $index);
+ array_push($tests, $index);
}
}
for ($i=0;$i<count($tests);$i++) {
*/
do_hook('info_bottom');
?>
-</body></html>
+</body></html>
\ No newline at end of file
<?php
/**
* setup file for the IMAP server info plugin
- *
+ *
* @copyright (c) 1999-2004 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version $Id$
);
}
-?>
+?>
\ No newline at end of file
header("Location:../../src/login.php\n\n");
exit();
-?>
+?>
\ No newline at end of file
. addSubmit(_("Send Mail"), 'send')
. '<br /><br /></center>'
. '</form></td></tr></table></p></body></html>';
-?>
+?>
\ No newline at end of file
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') {
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']);
}
}
-?>
+?>
\ No newline at end of file
-<?php
+<?php
/**
* mail_fetch/setup.php
// port defaults to 110. Returns true on success, false on fail
// If MAILSERVER is set, override $server with it's value
-
- if (!isset($port) || !$port) {$port = 110;}
+
+ if (!isset($port) || !$port) {$port = 110;}
if(!empty($this->MAILSERVER))
$server = $this->MAILSERVER;
} // End class
-?>
+?>
\ No newline at end of file
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);
echo "<option value=\"$i\">" .
htmlspecialchars($mailfetch[$i]['alias']) .
'</option>' . "\n";
- }
+ }
echo '</select>' .
'</td>' .
'</tr>';
echo '<br />' .
html_tag( 'table',
html_tag( 'tr',
- html_tag( 'td', '<b>' . _("Fetching from ") .
- htmlspecialchars($mailfetch[$i_loop]['alias']) .
+ html_tag( 'td', '<b>' . _("Fetching from ") .
+ htmlspecialchars($mailfetch[$i_loop]['alias']) .
'</b>',
'center' ) ,
'', $color[9] ) ,
} 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..."));
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"));
?>
</center>
</body>
-</html>
+</html>
\ No newline at end of file
return $tmp;
}
-?>
+?>
\ No newline at end of file
header("Location:../../src/login.php\n\n");
exit();
-?>
+?>
\ No newline at end of file
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 = '';
}
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);
) .
html_tag( 'tr',
html_tag( 'th', _("Username:"), 'right' ) .
- html_tag( 'td', '<input type="text" name="mf_user" value="' .
+ html_tag( 'td', '<input type="text" name="mf_user" value="' .
htmlspecialchars($mailfetch_user_[$mf_sn]) . '" size="20" />', 'left' )
) .
html_tag( 'tr',
$selected = 0;
if ( isset($mailfetch_subfolder_[$mf_sn]) ) {
$selected = array(strtolower($mailfetch_subfolder_[$mf_sn]));
- }
+ }
echo sqimap_mailbox_option_list($imapConnection, $selected) .
'</select></td></tr>' .
}
?>
-</body></html>
+</body></html>
\ No newline at end of file
* @package plugins
* @subpackage mail_fetch
**/
-
+
/** */
require_once(SM_PATH . 'plugins/mail_fetch/functions.php' );
require_once (SM_PATH . 'plugins/mail_fetch/functions.php');
global $data_dir, $imapServerAddress, $imapPort;
-
+
sqgetGlobalVar('username', $username, SQ_SESSION);
sqgetGlobalVar('key', $key, SQ_COOKIE);
);
}
-?>
+?>
\ No newline at end of file
* 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
if ($pos === false) {
$entString++;
$result= $entString;
- }
+ }
else {
$level = substr($entString,0,$pos);
$sublevel = substr($entString,$pos+1);
} else if ($messageheader) {
if ($header) {
$header=false;
- $end = "\n \n".'</div>'."\n \n".'<div class="ent_body" id="'.$entStr.'B">'."\n \n";
+ $end = "\n \n".'</div>'."\n \n".'<div class="ent_body" id="'.$entStr.'B">'."\n \n";
}
$mimepart = -$header;
$bnd_end = false;
} else {
if ($header) {
$pre = '';
- $end = "\n \n".'</div>'."\n \n".'<div class="ent_body" id="'.$entStr.'B">'."\n \n";
+ $end = "\n \n".'</div>'."\n \n".'<div class="ent_body" id="'.$entStr.'B">'."\n \n";
}
$header = false;
$mimepart=true;
- }
+ }
$contentset = false;
$nameset = false;
} else {
$pre = '<i><font color ="'.$color[1].'">';
$end = '</i></font>';
}
- }
+ }
if (!$messageheader && !$header ) {
$mimepart=true;
} else {
}
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);
$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) {
$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);
echo '<div><div class="header">'."\n\n";
echo $message_body;
echo '</div></div></font></code></body></html>';
-?>
+?>
\ No newline at end of file
<?php
-/**
+/**
* Message Details plugin - main frame
*
* Plugin to view the RFC822 raw message output and the bodystructure of a message
<?php
/**
- * Message Details plugin - top frame with buttons
+ * Message Details plugin - top frame with buttons
*
* Plugin to view the RFC822 raw message output and the bodystructure of a message
*
'</b>'.
'</body>'.
"</html>\n";
-?>
+?>
\ No newline at end of file
<?php
/**
- * Message Details plugin - main setup script
+ * Message Details plugin - main setup script
*
* Plugin to view the RFC822 raw message output and the bodystructure of a message
*
"// -->\n" .
"</script>\n" .
" | <a href=\"javascript:MessageSource();\">$print_text</a>\n";
- }
+ }
echo $result;
}
-
+
?>
\ No newline at end of file
* 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
*
'left' )
) . "\n";
?>
-</table></form></td></tr></table></td></tr></table></body></html>
+</table></form></td></tr></table></td></tr></table></body></html>
\ No newline at end of file
*
* @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
*/
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);
return 0;
}
-/**
+/**
* Init newmail plugin
*/
function squirrelmail_plugin_init_newmail() {
}
}
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);
}
}
echo "<script language=\"javascript\">\n" .
"function ChangeTitleLoad() {\n";
echo 'window.parent.document.title = "' .
- sprintf(ngettext("%s New Message","%s New Messages",$totalNew), $totalNew) .
+ sprintf(ngettext("%s New Message","%s New Messages",$totalNew), $totalNew) .
"\";\n";
echo "if (BeforeChangeTitle != null)\n".
"BeforeChangeTitle();\n".
* testsound.php
*
* 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.
*
* $Id$
* @package plugins
) ,
'center' ) .
'</body></html>';
-?>
+?>
\ No newline at end of file
header("Location:../../src/login.php\n\n");
exit();
-?>
+?>
\ No newline at end of file
* @subpackage sent_subfolders
*/
-/**
- *
+/**
+ *
*/
define('SMPREF_SENT_SUBFOLDERS_DISABLED', 0);
define('SMPREF_SENT_SUBFOLDERS_YEARLY', 1);
/* mark base sent folder as special mailbox */
$squirrelmail_plugin_hooks
- ['special_mailbox']['sent_subfolders'] =
- 'sent_subfolders_special_mailbox';
+ ['special_mailbox']['sent_subfolders'] =
+ 'sent_subfolders_special_mailbox';
}
function sent_subfolders_check_handleAsSent() {
* Callback function that should exclude some folders from folder listing.
* @param array $fldr list of folders. See sqimap_mailbox_list
* @return boolean returns true, if folder has to included in folder listing
- * @access private
+ * @access private
*/
function filter_folders($fldr) {
return strtolower($fldr['unformatted'])!='inbox';
/**
* Update sent_subfolders settings
*
- * function updates default sent folder value and
+ * function updates default sent folder value and
* creates required imap folders
*/
function sent_subfolders_update_sentfolder() {
sqgetGlobalVar('username', $username, SQ_SESSION);
sqgetGlobalVar('key', $key, SQ_COOKIE);
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
-
+
if ($use_sent_subfolders || $move_to_sent) {
$year = date('Y');
$month = date('m');
} else {
$cnd_delimiter = $delimiter;
}
-*/
+*/
$cnd_delimiter = $delimiter;
-
+
switch ($sent_subfolders_setting) {
case SMPREF_SENT_SUBFOLDERS_YEARLY:
$level = 1;
break;
case SMPREF_SENT_SUBFOLDERS_QUARTERLY:
$level = 2;
- $sent_subfolder = $sent_subfolders_base . $cnd_delimiter
+ $sent_subfolder = $sent_subfolders_base . $cnd_delimiter
. $year
. $delimiter . $quarter;
$year_folder = $sent_subfolders_base
($data_dir, $username, 'use_sent_subfolders', SMPREF_OFF);
$sent_subfolders_base = getPref($data_dir, $username, 'sent_subfolders_base', 'na');
- if ($use_sent_subfolders == SMPREF_ON &&
+ if ($use_sent_subfolders == SMPREF_ON &&
($mb == $sent_subfolders_base || stristr($mb,$sent_subfolders_base) ) ) {
- return 1;
+ return 1;
}
return 0;
}
-?>
+?>
\ No newline at end of file
header("Location:../../src/login.php\n\n");
exit();
-?>
+?>
\ No newline at end of file
* @access private
*/
function spamcop_enable_disable($option,$disable_action,$enable_action) {
- if ($option) {
- $ret= _("Enabled") . "(<a href=\"options.php?action=$disable_action\">" . _("Disable it") . "</a>)\n";
+ if ($option) {
+ $ret= _("Enabled") . "(<a href=\"options.php?action=$disable_action\">" . _("Disable it") . "</a>)\n";
} else {
- $ret = _("Disabled") . "(<a href=\"options.php?action=$enable_action\">" . _("Enable it") . "</a>)\n";
+ $ret = _("Disabled") . "(<a href=\"options.php?action=$enable_action\">" . _("Enable it") . "</a>)\n";
}
return $ret;
}
displayPageHeader($color, 'None');
-
+
/* globals */
sqgetGlobalVar('action', $action);
sqgetGlobalVar('meth', $meth);
if (isset($type)) {
setPref($data_dir, $username, 'spamcop_type', $type);
}
- break;
+ break;
case 'save_id':
if (isset($ID)) {
$ID = trim($ID);
<br />
<table width="95%" align="center" border="0" cellpadding="2" cellspacing="0">
<tr><td bgcolor="<?php echo $color[0]; ?>">
- <center><b>
- <?php echo _("Options") . " - " . _("Spam reporting"); ?>
- </b></center>
+ <center><b>
+ <?php echo _("Options") . " - " . _("Spam reporting"); ?>
+ </b></center>
</td></tr></table>
<br />
-
+
<table align="center">
<tr>
- <?php
- echo html_tag('td',_("SpamCop link is:"),'right');
- echo html_tag('td', spamcop_enable_disable($spamcop_enabled,'disable','enable') );
- ?>
- </tr>
+ <?php
+ echo html_tag('td',_("SpamCop link is:"),'right');
+ echo html_tag('td', spamcop_enable_disable($spamcop_enabled,'disable','enable') );
+ ?>
+ </tr>
+ <tr>
+ <?php
+ echo html_tag('td',_("Delete spam when reported:") . "<br />\n" .
+ '<small>(' . _("Only works with email-based reporting") . ')</small>',
+ 'right','','valign="top"');
+ echo html_tag('td', spamcop_enable_disable($spamcop_delete,'save','delete'),'','','valign="top"');
+ ?>
+ </tr>
+ <tr>
+ <?php
+ echo html_tag('td',_("Spam Reporting Method:"),'right');
+ ?>
+ <td>
+ <form method="post" action="options.php">
+ <select name="meth">
+ <?php
+ if ($spamcop_quick_report) {
+ echo '<option value="quick_email"';
+ if ($spamcop_method == 'quick_email') echo ' selected="selected"';
+ echo ">"._("Quick email-based reporting");
+ echo '</option>';
+ }
+ ?>
+ <option value="thorough_email"
+ <?php
+ if ($spamcop_method == 'thorough_email') echo ' selected="selected"';
+ echo ">"._("Thorough email-based reporting");
+ ?>
+ </option>
+ <option value="web_form"
+ <?php
+ if ($spamcop_method == 'web_form') echo ' selected="selected"';
+ echo ">"._("Web-based form");
+ ?>
+ </option>
+ </select>
+ <input type="hidden" name="action" value="meth" />
+ <?php
+ echo '<input type="submit" value="' . _("Save Method") . "\" />\n";
+ ?>
+ </form></td>
+ </tr>
+ <tr>
+ <?php
+ echo html_tag('td',_("Spam Service Type:"),'right');
+ ?>
+ <td>
+ <form method="post" action="options.php">
+ <select name="type">
+ <option value="free"
+ <?php
+ if ($spamcop_type == 'free') echo ' selected="selected"';
+ echo ">"._("Free reporting");
+ ?>
+ </option>
+ <option value="member"
+ <?php
+ if ($spamcop_type == 'member') echo ' selected="selected"';
+ echo ">"._("Member services");
+ ?>
+ </option>
+ </select>
+ <?php
+ echo '<input type="hidden" name="action" value="type" />' .
+ '<input type="submit" value="' . _("Save Service Type") . "\" />\n";
+ ?>
+ </form></td>
+ </tr>
<tr>
- <?php
- echo html_tag('td',_("Delete spam when reported:") . "<br />\n" .
- '<small>(' . _("Only works with email-based reporting") . ')</small>',
- 'right','','valign="top"');
- echo html_tag('td', spamcop_enable_disable($spamcop_delete,'save','delete'),'','','valign="top"');
- ?>
- </tr>
- <tr>
- <?php
- echo html_tag('td',_("Spam Reporting Method:"),'right');
- ?>
- <td>
- <form method="post" action="options.php">
- <select name="meth">
- <?php
- if ($spamcop_quick_report) {
- echo '<option value="quick_email"';
- if ($spamcop_method == 'quick_email') echo ' selected="selected"';
- echo ">"._("Quick email-based reporting");
- echo '</option>';
- }
- ?>
- <option value="thorough_email"
- <?php
- if ($spamcop_method == 'thorough_email') echo ' selected="selected"';
- echo ">"._("Thorough email-based reporting");
- ?>
- </option>
- <option value="web_form"
- <?php
- if ($spamcop_method == 'web_form') echo ' selected="selected"';
- echo ">"._("Web-based form");
- ?>
- </option>
- </select>
- <input type="hidden" name="action" value="meth" />
- <?php
- echo '<input type="submit" value="' . _("Save Method") . "\" />\n";
- ?>
- </form></td>
- </tr>
- <tr>
- <?php
- echo html_tag('td',_("Spam Service Type:"),'right');
- ?>
- <td>
- <form method="post" action="options.php">
- <select name="type">
- <option value="free"
- <?php
- if ($spamcop_type == 'free') echo ' selected="selected"';
- echo ">"._("Free reporting");
- ?>
- </option>
- <option value="member"
- <?php
- if ($spamcop_type == 'member') echo ' selected="selected"';
- echo ">"._("Member services");
- ?>
- </option>
- </select>
- <?php
- echo '<input type="hidden" name="action" value="type" />' .
- '<input type="submit" value="' . _("Save Service Type") . "\" />\n";
- ?>
- </form></td>
- </tr>
- <tr>
- <?php
- echo html_tag('td',_("Your SpamCop authorization code:") . "<br />" .
- '<small>(' . _("see below") . ')</small>','right','','valign="top"');
- ?>
- <td valign="top"><form method="post" action="options.php">
- <input type="text" size="30" name="ID" value="<?php echo htmlspecialchars($spamcop_id) ?>" />
- <input type="hidden" name="action" value="save_id" />
- <?php
- echo '<input type="submit" value="' . _("Save ID") . "\" />\n";
- ?>
- </form></td>
- </tr>
+ <?php
+ echo html_tag('td',_("Your SpamCop authorization code:") . "<br />" .
+ '<small>(' . _("see below") . ')</small>','right','','valign="top"');
+ ?>
+ <td valign="top"><form method="post" action="options.php">
+ <input type="text" size="30" name="ID" value="<?php echo htmlspecialchars($spamcop_id) ?>" />
+ <input type="hidden" name="action" value="save_id" />
+ <?php
+ echo '<input type="submit" value="' . _("Save ID") . "\" />\n";
+ ?>
+ </form></td>
+ </tr>
</table>
<?php
echo '<p><b>' . _("About SpamCop") . '</b><br />';
printf(_("For more information about SpamCop, it's services, spam in general, and many related topics, try reading through SpamCop's %sHelp and Feedback%s section."), '<a href="http://spamcop.net/help.shtml">', '</a>');
echo "</p>\n";
?>
-</body></html>
+</body></html>
\ No newline at end of file
<?php
-/**
+/**
* setup.php -- SpamCop plugin - setup script
*
* @copyright (c) 1999-2004 The SquirrelMail development team
$spamcop_quick_report = false;
/**
- * Initialize the plugin
+ * Initialize the plugin
* @access private
*/
function squirrelmail_plugin_init_spamcop() {
- global $squirrelmail_plugin_hooks, $spamcop_is_composing;
+ global $squirrelmail_plugin_hooks, $spamcop_is_composing;
- $squirrelmail_plugin_hooks['optpage_register_block']['spamcop'] =
- 'spamcop_options';
- $squirrelmail_plugin_hooks['loading_prefs']['spamcop'] =
- 'spamcop_load';
- $squirrelmail_plugin_hooks['read_body_header_right']['spamcop'] =
- 'spamcop_show_link';
+ $squirrelmail_plugin_hooks['optpage_register_block']['spamcop'] =
+ 'spamcop_options';
+ $squirrelmail_plugin_hooks['loading_prefs']['spamcop'] =
+ 'spamcop_load';
+ $squirrelmail_plugin_hooks['read_body_header_right']['spamcop'] =
+ 'spamcop_show_link';
sqgetGlobalVar('spamcop_is_composing' , $spamcop_is_composing);
-
- if (isset($spamcop_is_composing)) {
- $squirrelmail_plugin_hooks['compose_send']['spamcop'] =
- 'spamcop_while_sending';
- }
+
+ if (isset($spamcop_is_composing)) {
+ $squirrelmail_plugin_hooks['compose_send']['spamcop'] =
+ 'spamcop_while_sending';
+ }
}
* @access private
*/
function spamcop_load() {
- global $username, $data_dir, $spamcop_enabled, $spamcop_delete,
- $spamcop_method, $spamcop_id, $spamcop_quick_report, $spamcop_type;
-
- $spamcop_enabled = getPref($data_dir, $username, 'spamcop_enabled');
- $spamcop_delete = getPref($data_dir, $username, 'spamcop_delete');
- $spamcop_method = getPref($data_dir, $username, 'spamcop_method');
- $spamcop_type = getPref($data_dir, $username, 'spamcop_type');
- $spamcop_id = getPref($data_dir, $username, 'spamcop_id');
+ global $username, $data_dir, $spamcop_enabled, $spamcop_delete,
+ $spamcop_method, $spamcop_id, $spamcop_quick_report, $spamcop_type;
+
+ $spamcop_enabled = getPref($data_dir, $username, 'spamcop_enabled');
+ $spamcop_delete = getPref($data_dir, $username, 'spamcop_delete');
+ $spamcop_method = getPref($data_dir, $username, 'spamcop_method');
+ $spamcop_type = getPref($data_dir, $username, 'spamcop_type');
+ $spamcop_id = getPref($data_dir, $username, 'spamcop_id');
if ($spamcop_method == '') {
- // Default to web_form. It is faster.
- $spamcop_method = 'web_form';
- setPref($data_dir, $username, 'spamcop_method', $spamcop_method);
+ // Default to web_form. It is faster.
+ $spamcop_method = 'web_form';
+ setPref($data_dir, $username, 'spamcop_method', $spamcop_method);
+ }
+ if (! $spamcop_quick_report && $spamcop_method=='quick_email') {
+ $spamcop_method = 'web_form';
+ setPref($data_dir, $username, 'spamcop_method', $spamcop_method);
}
- if (! $spamcop_quick_report && $spamcop_method=='quick_email') {
- $spamcop_method = 'web_form';
- setPref($data_dir, $username, 'spamcop_method', $spamcop_method);
- }
- if ($spamcop_type == '') {
- $spamcop_type = 'free';
- setPref($data_dir, $username, 'spamcop_type', $spamcop_type);
- }
- if ($spamcop_id == '')
- $spamcop_enabled = 0;
+ if ($spamcop_type == '') {
+ $spamcop_type = 'free';
+ setPref($data_dir, $username, 'spamcop_type', $spamcop_type);
+ }
+ if ($spamcop_id == '')
+ $spamcop_enabled = 0;
}
* @access private
*/
function spamcop_show_link() {
- global $spamcop_enabled, $spamcop_method, $spamcop_quick_report,$javascript_on;
+ global $spamcop_enabled, $spamcop_method, $spamcop_quick_report,$javascript_on;
- if (! $spamcop_enabled)
- return;
+ if (! $spamcop_enabled)
+ return;
- /* GLOBALS */
- sqgetGlobalVar('passed_id', $passed_id, SQ_FORM);
- sqgetGlobalVar('passed_ent_id',$passed_ent_id,SQ_FORM);
- sqgetGlobalVar('mailbox', $mailbox, SQ_FORM);
- sqgetGlobalVar('startMessage', $startMessage, SQ_FORM);
- /* END GLOBALS */
+ /* GLOBALS */
+ sqgetGlobalVar('passed_id', $passed_id, SQ_FORM);
+ sqgetGlobalVar('passed_ent_id',$passed_ent_id,SQ_FORM);
+ sqgetGlobalVar('mailbox', $mailbox, SQ_FORM);
+ sqgetGlobalVar('startMessage', $startMessage, SQ_FORM);
+ /* END GLOBALS */
- // catch unset passed_ent_id
- if (! sqgetGlobalVar('passed_ent_id', $passed_ent_id, SQ_FORM) ) {
- $passed_ent_id = 0;
- }
+ // catch unset passed_ent_id
+ if (! sqgetGlobalVar('passed_ent_id', $passed_ent_id, SQ_FORM) ) {
+ $passed_ent_id = 0;
+ }
- echo "<br />\n";
+ echo "<br />\n";
- /*
- Catch situation when user use quick_email and does not update
- preferences. User gets web_form link. If prefs are set to
+ /*
+ Catch situation when user use quick_email and does not update
+ preferences. User gets web_form link. If prefs are set to
quick_email format - they will be updated after clicking the link
*/
if (! $spamcop_quick_report && $spamcop_method=='quick_email') {
- $spamcop_method = 'web_form';
+ $spamcop_method = 'web_form';
}
-
+
// Javascript is used only in web based reporting
// don't insert javascript if javascript is disabled
- if ($spamcop_method == 'web_form' && $javascript_on) {
+ if ($spamcop_method == 'web_form' && $javascript_on) {
?><script language="javascript" type="text/javascript">
document.write('<a href="../plugins/spamcop/spamcop.php?passed_id=<?php echo urlencode($passed_id); ?>&js_web=1&mailbox=<?php echo urlencode($mailbox); ?>&passed_ent_id=<?php echo urlencode($passed_ent_id); ?>" target="_blank">');
document.write("<?php echo _("Report as Spam"); ?>");
document.write("</a>");
</script><?php
- } else {
+ } else {
?><a href="../plugins/spamcop/spamcop.php?passed_id=<?php echo urlencode($passed_id); ?>&mailbox=<?php echo urlencode($mailbox); ?>&startMessage=<?php echo urlencode($startMessage); ?>&passed_ent_id=<?php echo urlencode($passed_ent_id); ?>">
<?php echo _("Report as Spam"); ?></a>
<?php
- }
+ }
}
/**
*/
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
+ );
}
*/
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
<?php
-/**
+/**
* spamcop.php -- SpamCop plugin -- main page
*
* @copyright (c) 1999-2004 The SquirrelMail development team
* Stores message in attachment directory, when email based reports are used
* @access private
*/
-function getMessage_RFC822_Attachment($message, $composeMessage, $passed_id,
+function getMessage_RFC822_Attachment($message, $composeMessage, $passed_id,
$passed_ent_id='', $imapConnection) {
global $attachment_dir, $username;
$hashed_attachment_dir = getHashedDir($username, $attachment_dir);
if (!$passed_ent_id) {
- $body_a = sqimap_run_command($imapConnection,
+ $body_a = sqimap_run_command($imapConnection,
'FETCH '.$passed_id.' RFC822',
- TRUE, $response, $readmessage,
+ TRUE, $response, $readmessage,
TRUE);
} else {
- $body_a = sqimap_run_command($imapConnection,
+ $body_a = sqimap_run_command($imapConnection,
'FETCH '.$passed_id.' BODY['.$passed_ent_id.']',
TRUE, $response, $readmessage,TRUE);
$message = $message->parent;
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;
}
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;
$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');
<input type="hidden" name="code" value="<?php echo htmlspecialchars($spamcop_id) ?>" />
<input type="hidden" name="spam" value="<?php echo htmlspecialchars($spam_message); ?>" />
<?php
- echo '<input type="submit" name="x1" value="' . _("Send Spam Report") . "\" />\n";
+ echo '<input type="submit" name="x1" value="' . _("Send Spam Report") . "\" />\n";
}
?> </form>
</td>
</tr>
</table>
</body>
-</html>
+</html>
\ No newline at end of file
header("Location:../../../src/login.php\n\n");
exit();
-?>
+?>
\ No newline at end of file
/* pretty impressive huh? */
-?>
+?>
\ No newline at end of file
header("Location:../../../src/login.php\n\n");
exit();
-?>
+?>
\ No newline at end of file
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
/**
* 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.
*/
$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);
}
if (isset($locations[$sqspell_word])){
$locations[$sqspell_word] .= ', ';
- } else {
+ } else {
$locations[$sqspell_word] = '';
}
$locations[$sqspell_word] .= "$current_line:$sqspell_symb";
$tmparray = explode(" ", $sqspell_output[$i]);
$sqspell_word=$tmparray[1];
/**
- *
+ *
* Check if the word is in user dictionary.
*/
if (!$SQSPELL_EREG("\n$sqspell_word\n", $words)){
*/
$extrajs="<script type=\"text/javascript\">\n"
. "<!--\n";
-
+
$sqspell_lines = explode("\n", $sqspell_text);
/**
* The javascript array sqspell_lines[] contains all lines of
*/
$extrajs.= "var sqspell_lines=new Array();\n";
for ($i=0; $i<sizeof($sqspell_lines); $i++){
- $extrajs.= "sqspell_lines[$i] = \""
+ $extrajs.= "sqspell_lines[$i] = \""
. chop(addslashes($sqspell_lines[$i])) . "\";\n";
- }
+ }
$extrajs.= "\n\n";
/**
$extrajs.= "misses[$i] = \"" . $missed_words[$i] . "\";\n";
}
$extrajs.= "\n\n";
-
+
/**
* Suggestions are (guess what!) suggestions for misspellings
*/
$i++;
}
- /**
+ /**
* Add some strings so they can be i18n'd.
*/
$extrajs.= "var ui_completed = \"" . _("Spellcheck completed. Commit changes?")
. "\";\n";
$extrajs.= "var ui_nochange = \"" . _("No changes were made.") . "\";\n";
- $extrajs.= "var ui_wait = \""
+ $extrajs.= "var ui_wait = \""
. _("Now saving your personal dictionary... Please wait.")
. "\";\n";
-
+
/**
* Did I mention that I hate dots on the end of contcatenated lines?
$extrajs.= "//-->\n"
. "</script>\n"
. "<script src=\"js/check_me.js\" type=\"text/javascript\"></script>\n";
-
+
displayHtmlHeader(_("SquirrelSpell Results"),$extrajs);
<form method="post">
<input type="hidden" name="MOD" value="forget_me_not" />
<input type="hidden" name="words" value="" />
- <input type="hidden" name="sqspell_use_app"
+ <input type="hidden" name="sqspell_use_app"
value="<?php echo $sqspell_use_app ?>" />
<table border="0" width="100%">
<tr align="center">
echo $sptag . _("Line with an error:") . '</span>';
?>
<br />
- <textarea name="sqspell_line_area" cols="50" rows="3"
+ <textarea name="sqspell_line_area" cols="50" rows="3"
wrap="hard" onfocus="this.blur()"></textarea>
</td>
</tr>
?>
</td>
<td align="left" width="25%">
- <input name="sqspell_error" size="10" value=""
+ <input name="sqspell_error" size="10" value=""
onfocus="this.blur()" />
</td>
<td align="right" width="25%">
?>
</td>
<td align="left" width="25%">
- <select name="sqspell_suggestion"
+ <select name="sqspell_suggestion"
onchange="if (this.options[this.selectedIndex].value != '_NONE') document.forms[0].sqspell_oruse.value=this.options[this.selectedIndex].value">
<?php
echo '<option>' . _("Suggestions") . '</option>';
<?php
/**
* crypto.mod
- * ---------------
+ * ---------------
* Squirrelspell module
*
* Copyright (c) 1999-2004 The SquirrelMail development team
* Let's encrypt the file and save it in an encrypted format.
*/
$words=sqspell_getWords();
- /**
+ /**
* Flip the flag so the sqspell_writeWords function knows to encrypt
* the message before writing it to the disk.
*/
*/
sqspell_writeWords($words);
$msg='<p>'
- . _("Your personal dictionary has been encrypted and is now stored in an encrypted format.")
+ . _("Your personal dictionary has been encrypted and is now stored in an encrypted format.")
. '</p>';
break;
case 'decrypt':
* Let's decrypt the file and save it as plain text.
*/
$words=sqspell_getWords();
- /**
+ /**
* Flip the flag and tell the sqspell_writeWords() function that we
* want to save it plaintext.
*/
* vim: syntax=php
*/
-?>
+?>
\ No newline at end of file
* the user asked to delete the file. Erase the bastard and hope
* this never happens again.
*/
- sqspell_deleteWords();
+ sqspell_deleteWords();
/**
* See where we were called from -- pop-up window or options page
* and call whichever wrapper is appropriate.
* The _("Your....") has to be on one line. Otherwise xgettext borks
* on getting the strings.
*/
- $msg = '<p>'
+ $msg = '<p>'
. _("Your personal dictionary was erased. Please close this window and click \"Check Spelling\" button again to start your spellcheck over.")
. '</p> '
. '<p align="center"><form>'
}
exit;
}
-
+
if ($old_key){
/**
* User provided another key to try and decrypt the dictionary.
*/
if (strstr($SCRIPT_NAME, 'sqspell_options')){
$msg = '<p>'
- . _("Your personal dictionary was re-encrypted successfully. Now return to the "SpellChecker options" menu and make your selection again." )
+ . _("Your personal dictionary was re-encrypted successfully. Now return to the "SpellChecker options" menu and make your selection again." )
. '</p>';
sqspell_makePage(_("Successful re-encryption"), null, $msg);
} else {
$msg = '<p>'
- . _("Your personal dictionary was re-encrypted successfully. Please close this window and click \"Check Spelling\" button again to start your spellcheck over.")
- . '</p><form><p align="center"><input type="button" value=" '
+ . _("Your personal dictionary was re-encrypted successfully. Please close this window and click \"Check Spelling\" button again to start your spellcheck over.")
+ . '</p><form><p align="center"><input type="button" value=" '
. _("Close this Window") . ' "'
. 'onclick="self.close()" /></p></form>';
sqspell_makeWindow(null, _("Dictionary re-encrypted"), null, $msg);
* mode: php
* End:
* vim: syntax=php
- */
-?>
+ */
+?>
\ No newline at end of file
* Agt. Smith: "You're empty."
* Neo: "So are you."
*/
- sqspell_makePage(_("Personal Dictionary"), null,
- '<p>' . _("No words in your personal dictionary.")
+ sqspell_makePage(_("Personal Dictionary"), null,
+ '<p>' . _("No words in your personal dictionary.")
. '</p>');
} else {
/**
* We're loaded with booty.
*/
- $pre_msg = '<p>'
- . _("Please check any words you wish to delete from your dictionary.")
+ $pre_msg = '<p>'
+ . _("Please check any words you wish to delete from your dictionary.")
. "</p>\n";
$pre_msg .= "<table border=\"0\" width=\"95%\" align=\"center\">\n";
/**
. '<tr><td align="center">'
. '<form method="post">'
. '<input type="hidden" name="MOD" value="forget_me" />'
- . '<input type="hidden" name="sqspell_use_app" value="'
+ . '<input type="hidden" name="sqspell_use_app" value="'
. $langs[$i] . '" />'
. '<table border="0" width="95%" align="center">'
. '<tr>'
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<sizeof($words_ary); $j++){
- if ($j==intval(sizeof($words_ary)/3)
+ if ($j==intval(sizeof($words_ary)/3)
|| $j==intval(sizeof($words_ary)/3*2)){
$msg .= "</td><td valign=\"top\">\n";
}
}
$msg .= '</td></tr></table></td></tr>'
. "<tr bgcolor=\"$color[0]\" align=\"center\"><td>"
- . '<input type="submit" value="' . _("Delete checked words")
+ . '<input type="submit" value="' . _("Delete checked words")
. '" /></form>'
. '</td></tr><tr><td><hr />'
. "</td></tr>\n";
* 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 <icon@duke.edu>
* @version $Id$
* @subpackage squirrelspell
*/
-global $SQSPELL_CRYPTO;
+global $SQSPELL_CRYPTO;
/**
* Set up some i18n'able wrappers for javascript.
*/
$msg = '<script type="text/javascript"><!--'."\n"
. 'var ui_makesel = "' . _("Please make your selection first.") . "\";\n"
- . 'var ui_encrypt = "'
- . _("This will encrypt your personal dictionary and store it in an encrypted format. Proceed?")
+ . 'var ui_encrypt = "'
+ . _("This will encrypt your personal dictionary and store it in an encrypted format. Proceed?")
. "\";\n"
. 'var ui_decrypt = "'
. _("This will decrypt your personal dictionary and store it in a plain text format. Proceed?")
. _("Change crypto settings") . ' " /></p>'
. '</form>';
}
-sqspell_makePage(_("Personal Dictionary Crypto Settings"),
+sqspell_makePage(_("Personal Dictionary Crypto Settings"),
"crypto_settings.js", $msg);
/**
* mode: php
* End:
* vim: syntax=php
- */
+ */
?>
\ No newline at end of file
<?php
/**
- * forget_me.mod
+ * forget_me.mod
* --------------
* Squirrelspell module
*
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* This module deletes the words from the user dictionary. Called
- * after EDIT_DIC module.
+ * after EDIT_DIC module.
+ *
*
- *
*
* @author Konstantin Riabitsev <icon@duke.edu>
* @version $Id$
*/
$langs=sqspell_getSettings($words);
$words_dic = "# SquirrelSpell User Dictionary $SQSPELL_VERSION\n# "
- . "Last Revision: " . date("Y-m-d") . "\n# LANG: "
+ . "Last Revision: " . date("Y-m-d") . "\n# LANG: "
. join(", ", $langs) . "\n";
for ($i=0; $i<sizeof($langs); $i++){
/**
/**
* Click on some words first, Einstein!
*/
- sqspell_makePage(_("Personal Dictionary"), null,
+ sqspell_makePage(_("Personal Dictionary"), null,
'<p>' . _("No changes requested.") . '</p>');
}
* mode: php
* End:
* vim: syntax=php
- */
-?>
+ */
+?>
\ No newline at end of file
-<?php
+<?php
/**
- * forget_me_not.mod
+ * forget_me_not.mod
* ------------------
* Squirrelspell module
*
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* This module saves the added words into the user dictionary. Called
- * after CHECK_ME module.
+ * after CHECK_ME module.
*
* @author Konstantin Riabitsev <icon@duke.edu>
* @version $Id$
* First time.
*/
$words_dic="# SquirrelSpell User Dictionary $SQSPELL_VERSION\n# Last "
- . "Revision: " . date("Y-m-d")
+ . "Revision: " . date("Y-m-d")
. "\n# LANG: $SQSPELL_APP_DEFAULT\n# $SQSPELL_APP_DEFAULT\n";
$words_dic .= $new_words . "# End\n";
} else {
*/
$langs=sqspell_getSettings($words);
$words_dic = "# SquirrelSpell User Dictionary $SQSPELL_VERSION\n# "
- . "Last Revision: " . date("Y-m-d") . "\n# LANG: " . join(", ", $langs)
+ . "Last Revision: " . date("Y-m-d") . "\n# LANG: " . join(", ", $langs)
. "\n";
for ($i=0; $i<sizeof($langs); $i++){
$lang_words=sqspell_getLang($words, $langs[$i]);
}
$words_dic .= "# End\n";
}
-
+
/**
* Write out the file
*/
<?php
/**
- * init.mod
+ * init.mod
* ---------
* Squirrelspell module
*
*/
/**
- * See if we need to give user the option of choosing which dictionary
+ * See if we need to give user the option of choosing which dictionary
* s/he wants to use to spellcheck his message.
*/
$langs=sqspell_getSettings(null);
. '<input type="hidden" name="MOD" value="check_me" />'
. '<input type="hidden" name="sqspell_text" />'
. '<p align="center">';
-if (sizeof($langs)==1){
+if (sizeof($langs)==1){
/**
* Only one dictionary defined by the user. Submit the form
* automatically.
$msg .= ' selected="selected"';
}
$msg .= " value=\"$langs[$i]\"> " . _($langs[$i]) . "</option>\n";
- }
+ }
$msg .= ' </select>'
. '<input type="submit" value="' . _("Go") . '" />'
. '</p>';
* End:
* vim: syntax=php
*/
-
+
?>
\ No newline at end of file
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
* This module changes the international dictionaries selection
- * for the user. Called after LANG_SETUP module.
+ * for the user. Called after LANG_SETUP module.
*
* @author Konstantin Riabitsev <icon@duke.edu>
* @version $Id$
$lang_string = str_replace("$lang_default", "$hold", $lang_string);
$lang_string = $lang_default . ", " . $lang_string;
} else {
- /**
+ /**
* Yes, he is dumb.
*/
$lang_string = join(', ', $use_langs);
$lang_string = $SQSPELL_APP_DEFAULT;
}
$old_lang_string = join(", ", $langs);
-$words = str_replace("# LANG: $old_lang_string", "# LANG: $lang_string",
+$words = str_replace("# LANG: $old_lang_string", "# LANG: $lang_string",
$words);
/**
* Write it down where the sun don't shine.
*/
sqspell_writeWords($words);
-sqspell_makePage(_("International Dictionaries Preferences Updated"),
+sqspell_makePage(_("International Dictionaries Preferences Updated"),
null, $msg);
/**
* Copyright (c) 1999-2004 The SquirrelMail development team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
- * This module displays available dictionaries to the user and lets
- * him/her choose which ones s/he wants to check messages with.
+ * This module displays available dictionaries to the user and lets
+ * him/her choose which ones s/he wants to check messages with.
*
* @author Konstantin Riabitsev <icon@duke.edu>
* @version $Id$
* @package plugins
* @subpackage squirrelspell
*/
-
+
global $SQSPELL_APP;
-
+
$msg = '<p>'
. _("Please check any available international dictionaries which you would like to use when spellchecking:")
. '</p>'
$add .= " value=\"$avail_lang\" >" . _($avail_lang) . "</option>\n";
}
$msg .= "</p>\n" . $add . "</select>\n";
-$msg .= "</p></blockquote><p><input type=\"submit\" value=\" "
+$msg .= "</p></blockquote><p><input type=\"submit\" value=\" "
. _("Make these changes") . " \" /></p>";
-sqspell_makePage(_("Add International Dictionaries"), null, $msg);
+sqspell_makePage(_("Add International Dictionaries"), null, $msg);
/**
* For Emacs weenies:
* End:
* vim: syntax=php
*/
-
+
?>
\ No newline at end of file
* @package plugins
* @subpackage squirrelspell
*/
-
+
global $SQSPELL_APP;
$msg = '<p>'
. _("Please choose which options you wish to set up:")
. "</a></li>\n";
} else {
$msg .= '<li>'
- . _("Encrypt or decrypt your personal dictionary") . ' <em>('
+ . _("Encrypt or decrypt your personal dictionary") . ' <em>('
. _("not available") . ')</em></li>';
}
$msg .= "</ul>\n";
* End:
* vim: syntax=php
*/
-?>
+?>
\ No newline at end of file
* setup.php
* -----------
* Squirrelspell setup file, as defined by the SquirrelMail-1.2 API.
- *
+ *
* Copyright (c) 1999-2004 The SquirrelMail development team
* Licensed under the GNU GPL. For full terms see the file COPYING.
*
*/
function squirrelmail_plugin_init_squirrelspell() {
global $squirrelmail_plugin_hooks;
- $squirrelmail_plugin_hooks['compose_button_row']['squirrelspell'] =
+ $squirrelmail_plugin_hooks['compose_button_row']['squirrelspell'] =
'squirrelspell_setup';
- $squirrelmail_plugin_hooks['optpage_register_block']['squirrelspell'] =
+ $squirrelmail_plugin_hooks['optpage_register_block']['squirrelspell'] =
'squirrelspell_optpage_register_block';
$squirrelmail_plugin_hooks['options_link_and_description']['squirrelspell'] =
'squirrelspell_options';
if (checkForJavascript()) {
/**
* The browser checks out.
- * Register Squirrelspell with the $optionpages array.
+ * Register Squirrelspell with the $optionpages array.
*/
$optpage_blocks[] =
array(
* 'Spanish' => 'ispell -d spanish -a' );
*/
$SQSPELL_APP = array('English' => 'ispell -a',
- 'Spanish' => 'ispell -d spanish -a');
+ 'Spanish' => 'ispell -d spanish -a');
$SQSPELL_APP_DEFAULT = 'English';
-$SQSPELL_WORDS_FILE =
+$SQSPELL_WORDS_FILE =
getHashedFile($username, $data_dir, "$username.words");
$SQSPELL_EREG = 'ereg';
-?>
+?>
\ No newline at end of file
<?php
/**
- * sqspell_functions.php
+ * sqspell_functions.php
* ----------------------
* All SquirrelSpell-wide functions are in this file.
*
* uses it for creating all Options pages.
*
* @param $title The title of the page to display
- * @param $scriptsrc This is used to link a file.js into the
+ * @param $scriptsrc This is used to link a file.js into the
* <script src="file.js"></script> format. This
* allows to separate javascript from the rest of the
* plugin and place it into the js/ directory.
$MOD = 'options_main';
}
- displayPageHeader($color, 'None');
+ displayPageHeader($color, 'None');
echo " <br />\n";
/**
* Check if we need to link in a script.
*/
- if($scriptsrc) {
+ if($scriptsrc) {
echo "<script type=\"text/javascript\" src=\"js/$scriptsrc\"></script>\n";
}
echo html_tag( 'table', '', 'center', '', 'width="95%" border="0" cellpadding="2" cellspacing="0"' ) . "\n"
* Generate a nice "Return to Options" link, unless this is the
* starting page.
*/
- if ($MOD != "options_main"){
+ if ($MOD != "options_main"){
echo html_tag( 'tr', "\n" .
html_tag( 'td', '<hr />', 'left' )
) . "\n"
/**
* This function does the encryption and decryption of the user
- * dictionary. It is only available when PHP is compiled with
+ * dictionary. It is only available when PHP is compiled with
* mcrypt support (--with-mcrypt). See doc/CRYPTO for more
* information.
*
break;
case 'decrypt':
$crypto = mdecrypt_generic($td, $input);
- /**
+ /**
* See if it decrypted successfully. If so, it should contain
* the string "# SquirrelSpell". If not, then bail out.
*/
*
* @param $words_string Contents of the 0.2-style user dictionary.
* @return Contents of the 0.3-style user dictionary.
- */
+ */
function sqspell_upgradeWordsFile($words_string){
global $SQSPELL_APP_DEFAULT, $SQSPELL_VERSION;
/**
* If the user wants more, s/he can set them up in personal
* preferences. See doc/UPGRADING for more info.
*/
- $new_words_string =
- substr_replace($words_string,
- "# SquirrelSpell User Dictionary $SQSPELL_VERSION\n# "
- . "Last Revision: " . date("Y-m-d")
- . "\n# LANG: $SQSPELL_APP_DEFAULT\n# $SQSPELL_APP_DEFAULT",
- 0, strpos($words_string, "\n")) . "# End\n";
+ $new_words_string =
+ substr_replace($words_string,
+ "# SquirrelSpell User Dictionary $SQSPELL_VERSION\n# "
+ . "Last Revision: " . date("Y-m-d")
+ . "\n# LANG: $SQSPELL_APP_DEFAULT\n# $SQSPELL_APP_DEFAULT",
+ 0, strpos($words_string, "\n")) . "# End\n";
sqspell_writeWords($new_words_string);
return $new_words_string;
}
/**
- * Right now it just returns an array with the dictionaries
+ * Right now it just returns an array with the dictionaries
* available to the user for spell-checking. It will probably
* do more in the future, as features are added.
*
* to the requested language.
*
* @param $words The contents of the user's ".words" file.
- * @param $lang Which language words to return, e.g. requesting
+ * @param $lang Which language words to return, e.g. requesting
* "English" will return ONLY the words from user's
* English dictionary, disregarding any others.
* @return The list of words corresponding to the language
* requested.
- */
+ */
function sqspell_getLang($words, $lang){
$start=strpos($words, "# $lang\n");
/**
* the file is encrypted (well, "garbled"), then it tries to decrypt
* it, checks whether the decryption was successful, troubleshoots if
* not, then returns the clear-text dictionary to the app.
- *
- * @return the contents of the user's ".words" file, decrypted if
+ *
+ * @return the contents of the user's ".words" file, decrypted if
* necessary.
*/
function sqspell_getWords(){
'<strong>' . _("ATTENTION:") . '</strong><br />'
. _("SquirrelSpell was unable to decrypt your personal dictionary. This is most likely due to the fact that you have changed your mailbox password. In order to proceed, you will have to supply your old password so that SquirrelSpell can decrypt your personal dictionary. It will be re-encrypted with your new password after this. If you haven't encrypted your dictionary, then it got mangled and is no longer valid. You will have to delete it and start anew. This is also true if you don't remember your old password -- without it, the encrypted data is no longer accessible.") ,
'left' ) . "\n"
- . '<blockquote>' . "\n"
- . '<form method="post" onsubmit="return AYS()">' . "\n"
- . '<input type="hidden" name="MOD" value="crypto_badkey" />' . "\n"
- . html_tag( 'p', "\n" .
- '<input type="checkbox" name="delete_words" value="ON" />'
- . _("Delete my dictionary and start a new one") . '<br />'
- . _("Decrypt my dictionary with my old password:")
- . '<input name="old_key" size="10" />' ,
- 'left' ) . "\n"
- . '</blockquote>' . "\n"
- . html_tag( 'p', "\n" .
- '<input type="submit" value="'
- . _("Proceed") . ' >>" />' ,
- 'center' ) . "\n"
- . '</form>' . "\n";
+ . '<blockquote>' . "\n"
+ . '<form method="post" onsubmit="return AYS()">' . "\n"
+ . '<input type="hidden" name="MOD" value="crypto_badkey" />' . "\n"
+ . html_tag( 'p', "\n" .
+ '<input type="checkbox" name="delete_words" value="ON" />'
+ . _("Delete my dictionary and start a new one") . '<br />'
+ . _("Decrypt my dictionary with my old password:")
+ . '<input name="old_key" size="10" />' ,
+ 'left' ) . "\n"
+ . '</blockquote>' . "\n"
+ . html_tag( 'p', "\n" .
+ '<input type="submit" value="'
+ . _("Proceed") . ' >>" />' ,
+ 'center' ) . "\n"
+ . '</form>' . "\n";
/**
* Add some string vars so they can be i18n'd.
*/
$msg .= "<script type='text/javascript'><!--\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"
- . "//--></script>\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"
+ . "//--></script>\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;
}
return $words;
}
-
+
/**
* Writes user dictionary into the $username.words file, then changes mask
* to 0600. If encryption is needed -- does that, too.
fclose($fp);
chmod($SQSPELL_WORDS_FILE, 0600);
}
-
+
function sqspell_deleteWords(){
/**
* So I open the door to my enemies,
* 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;
}
* @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;
}
/**
* 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";
* 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$
*
* @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
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
$MOD = $_POST['MOD'];
} elseif (isset($_GET['MOD'])) {
$MOD = $_GET['MOD'];
-}
+}
if (!isset($MOD) || !$MOD){
$MOD='init';
/* Include the module. */
require_once(SM_PATH . $SQSPELL_DIR . "modules/$MOD.mod");
-?>
+?>
\ No newline at end of file
<?php
/**
- * sqspell_options.php
+ * sqspell_options.php
*
* Main wrapper for the options interface.
*
*/
/**
- * Set a couple of constants and defaults. Don't change these,
+ * Set a couple of constants and defaults. Don't change these,
* the configurable stuff is in sqspell_config.php
*/
$SQSPELL_DIR='plugins/squirrelspell/';
$SQSPELL_CRYPTO=FALSE;
/**
- * Load some necessary stuff from squirrelmail.
+ * Load some necessary stuff from squirrelmail.
* @ignore
*/
define('SM_PATH','../../');
/**
* SquirrelMail translate plugin sample configuration
*
- * WARNING: This is only an example config. Don't use it for your
+ * WARNING: This is only an example config. Don't use it for your
* configuration. Almisbar translation engine is not public.
*
* Copyright (c) 2004 The SquirrelMail Project Team
header("Location:../index.php");
/** pretty impressive huh? **/
-?>
+?>
\ No newline at end of file
/** SquirrelMail required files. */
require_once(SM_PATH . 'include/validate.php');
require_once(SM_PATH . 'functions/addressbook.php');
-
+
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
border="0"
src="addrbook_search.php?show=blank" />
</frameset>
-</html>
+</html>
\ No newline at end of file
* addrbook_search_html.html -- If you change one,
* change the other one too!
*
- * @version $Id$
+ * @version $Id$
* @package squirrelmail
* @subpackage addressbook
*/
*/
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] ) .
if ($includesource) {
echo html_tag( 'th', ' ' . _("Source"), 'left', 'width="10%"' );
- }
+ }
echo "</tr>\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',
- '<small><a href="javascript:to_address(' .
+ '<small><a href="javascript:to_address(' .
"'" . $email . "');\">"._("To")."</a> | " .
- '<a href="javascript:cc_address(' .
+ '<a href="javascript:cc_address(' .
"'" . $email . "');\">"._("Cc")."</a> | " .
- '<a href="javascript:bcc_address(' .
+ '<a href="javascript:bcc_address(' .
"'" . $email . "');\">"._("Bcc")."</a></small>",
'center', '', 'valign="top" width="5%" nowrap' ) .
html_tag( 'td', ' ' . htmlspecialchars($row['name']), 'left', '', 'valign="top" nowrap' ) .
}
/* ================= End of functions ================= */
-
+
require_once('../functions/strings.php');
require_once('../functions/addressbook.php');
-
+
displayHtmlHeader();
-
+
/* Initialize vars */
if (!isset($query)) { $query = ''; }
if (!isset($show)) { $show = ''; }
/* Create search form */
if ($show == 'form' && empty($listall)) {
- echo '<form name="sform" target="abookres" action="addrbook_search.php'.
+ echo '<form name="sform" target="abookres" action="addrbook_search.php'.
'" method="post">' . "\n" .
html_tag( 'table', '', '', '', 'border="0" width="100%" height="100%"' ) .
html_tag( 'tr' ) .
} else {
echo addHidden('backend', '-1');
}
-
+
echo '</td></tr>' .
html_tag( 'tr',
html_tag( 'td', '', 'left' ) .
/* 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', '<b><br />' .
_("Your search failed with the following error(s)") .
"\n</body></html>\n";
exit;
}
-
+
if (sizeof($res) == 0) {
echo html_tag( 'p', '<br /><b>' .
_("No persons matching your search were found") . "</b>\n" ,
"\n</body></html>\n";
exit;
}
-
+
display_result($res);
}
}
-
+
}
?>
-</body></html>
+</body></html>
\ No newline at end of file
* @subpackage addressbook
*/
-/**
+/**
* Path for SquirrelMail required files.
* @ignore
*/
foreach ($res as $row) {
$email = AddressBook::full_address($row);
- if ($line % 2) {
+ if ($line % 2) {
$tr_bgcolor = $color[12];
} else {
$tr_bgcolor = $color[4];
if (!isset($backend)) { $backend = ''; }
if ($abook->numbackends > 1) {
echo '<strong>' . _("in") . '</strong> ';
-
- $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;
}
addr_display_result($res, false);
} else {
echo html_tag( 'p', '<strong><br />' .
- sprintf(_("Unable to list addresses from %s"),
+ sprintf(_("Unable to list addresses from %s"),
$abook->backends[$backend]->sname) . "</strong>\n" ,
'center' );
}
}
?>
-</body></html>
+</body></html>
\ No newline at end of file
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") .
' ' ,
'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 {
do_hook('addressbook_bottom');
echo "\n<!-- end of addressbook_bottom hook-->\n";
?>
-</body></html>
+</body></html>
\ No newline at end of file
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')) {
echo "<p><table>\n<tr><td>SquirrelMail version:</td><td><b>" . $version . "</b></td></tr>\n" .
'<tr><td>Config file version:</td><td><b>' . $config_version . "</b></td></tr>\n" .
- '<tr><td>Config file last modified:</td><td><b>' .
+ '<tr><td>Config file last modified:</td><td><b>' .
date ('d F Y H:i:s', filemtime(SM_PATH . 'config/config.php')) .
"</b></td></tr>\n</table>\n</p>\n\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)!");
}
} 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)!");
}
// 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)!");
}
if (class_exists('DB')) {
echo "$IND PHP Pear DB support is present.<br />\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',
if ( $linkid ) {
echo "$IND LDAP connect to ".$param['host']." successful: ".$linkid."<br />\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']);
}
} else {
do_err('Unable to Bind to LDAP Server');
}
-
+
ldap_close($linkid);
} else {
do_err('Connection to LDAP failed');
</html>
<?php
// vim: et ts=4
-?>
+?>
\ No newline at end of file
}
// 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);
. "<tt><select name=\"old\">\n"
. ' <option value="">[ ' . _("Select a folder") . " ]</option>\n";
- // use existing IMAP connection, we have no special values to show,
+ // use existing IMAP connection, we have no special values to show,
// but we do include values to skip. Use the pre-created $boxes to save an IMAP query.
// send NULL for the flag - ALL folders are eligible for rename!
// use long format to make sure folder names make sense when parents may be missing.
echo addForm('folders_subscribe.php?method=sub')
. '<tt><select name="mailbox[]" multiple="multiple" size="8">';
- for ($q = 0; $q < count($box); $q++) {
+ for ($q = 0; $q < count($box); $q++) {
echo ' <option value="' . $box[$q] . '">'.$box2[$q]."</option>\n";
- }
+ }
echo '</select></tt><br /><br />'
. '<input type="submit" value="'. _("Subscribe") . "\" />\n"
. "</form></td></tr></table><br />\n";
<?php
sqimap_logout($imapConnection);
?>
-</body></html>
+</body></html>
\ No newline at end of file
* 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$
/* 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) )
{
}
sqimap_mailbox_rename( $imapConnection, $orig, $newone );
- // Log out this session
+ // Log out this session
sqimap_logout($imapConnection);
}
* 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$
for ($n=$pos; $n < $cntdoc; $n++) {
if (trim(strtolower($doc[$n])) == '<chapter>'
|| trim(strtolower($doc[$n])) == '<section>') {
- for ($n++; $n < $cntdoc
- && (trim(strtolower($doc[$n])) != '</section>')
+ for ($n++; $n < $cntdoc
+ && (trim(strtolower($doc[$n])) != '</section>')
&& (trim(strtolower($doc[$n])) != '</chapter>'); $n++) {
if (trim(strtolower($doc[$n])) == '<title>') {
$n++;
}
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];
}
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];
}
} else {
echo html_tag( 'p', $help_info[2], 'left' );
}
-
+
$section = 0;
for ($n = $help_info[3], $cnt = count($doc); $n < $cnt; $n++) {
$section++;
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] . '">' .
$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>
<img src="<?php echo $DownloadLink; ?>" />
</td></tr></table>
-</body></html>
+</body></html>
\ No newline at end of file
/* pretty impressive huh? */
-?>
+?>
\ No newline at end of file
?>
</td></tr></table>
-</div></body></html>
+</div></body></html>
\ No newline at end of file
*/
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.
*/
) ,
'center', $color[4], 'border="0" width="100%"' ) ,
'left', $color[4] )
- ) .
+ ) .
html_tag( 'tr',
html_tag( 'td',
'<center>'. addSubmit(_("Login")) .'</center>',
do_hook('login_bottom');
?>
-</body></html>
+</body></html>
\ No newline at end of file
}
/*
- * First, set the load information for each option page.
+ * First, set the load information for each option page.
*/
/* Initialize load information variables. */
/* 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");
$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. */
case SMOPT_PAGE_FOLDER:
$save_hook_name = 'options_folder_save';
break;
- default:
+ default:
$save_hook_name = 'options_save';
break;
}
/* 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. */
/* If it is not empty, trigger the bottom hook. */
if ($bottom_hook_name != '') {
- do_hook($bottom_hook_name);
+ do_hook($bottom_hook_name);
}
}
?>
</table>
</td></tr>
</table>
-</body></html>
+</body></html>
\ No newline at end of file
sqGetGlobalVar('value', $value);
/* end of get globals */
-
+
function oh_opt( $val, $sel, $tit ) {
echo "<option value=\"$val\"";
if ( $sel )
$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 );
}
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' );
}
do_hook('options_highlight_bottom');
?>
-</table></body></html>
+</table></body></html>
\ No newline at end of file
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
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',
$num ++;
}
- echo '<br />' .
+ echo '<br />' .
html_tag( 'table', "\n" .
html_tag( 'tr', "\n" .
html_tag( 'td', "\n" .
setPref($data_dir, $username, 'email_address', $email_address);
setPref($data_dir, $username, 'reply_to', $reply_to);
setSig($data_dir, $username, "g", $signature);
-
+
}
function CheckAndDoDefault() {
$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;
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);
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];
$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) {
$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]);
)
) ,
'', '', '', '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";
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] );
}
echo '</table>' . "\n";
}
-
+
if (count($index_order) != count($available)) {
$opts = array();
echo addSubmit(_("Add"), 'submit');
echo '</form>';
}
-
+
echo html_tag( 'p', '<a href="../src/options.php">' . _("Return to options page") . '</a></p><br />' );
?>
</td></tr>
</table>
-</body></html>
+</body></html>
\ No newline at end of file
if (! sqgetGlobalVar('passed_ent_id', $passed_ent_id, SQ_GET) ) {
$passed_ent_id = '';
-}
+}
/* end globals */
$pf_cleandisplay = getPref($data_dir, $username, 'pf_cleandisplay', false);
/* --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);
}
/* now, if they choose to, we clean up the display a bit... */
-
+
if ($pf_cleandisplay) {
$num_leading_spaces = 9; // nine leading spaces for indentation
* @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;
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
'</b>',
'right' );
?>
-</body></html>
+</body></html>
\ No newline at end of file
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;
}
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);
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) {
?>
<title><?php echo $org_title . ' - ' . _("Signout"); ?></title>
</head>
-<body text="<?php echo $color[8]; ?>" bgcolor="<?php echo $color[4]; ?>"
+<body text="<?php echo $color[8]; ?>" bgcolor="<?php echo $color[4]; ?>"
link="<?php echo $color[7]; ?>" vlink="<?php echo $color[7]; ?>"
alink="<?php echo $color[7]; ?>">
<br /><br />
'center', $color[4], 'width="50%" cols="1" cellpadding="2" cellspacing="0" border="0"' )
?>
</body>
-</html>
+</html>
\ No newline at end of file
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]);
}
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]);
'align="center">' . "\n" .
'<tr><td bgcolor="'.$color[9].'" width="100%" align="center"><b>'.
_("Viewing Full Header") . '</b> - '.
- '<a href="';
+ '<a href="';
echo_template_var($ret_addr);
echo '">' ._("View message") . "</a></b></td></tr></table>\n";
- echo_template_var($header,
+ echo_template_var($header,
array(
'<table width="99%" cellpadding="2" cellspacing="0" border="0" '.
"align=center>\n".'<tr><td>',
'<nobr><tt><b>',
'</b>',
'</tt></nobr>',
- '</td></tr></table>'."\n"
+ '</td></tr></table>'."\n"
)
);
echo '</body></html>';
}
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
<tr><td bgcolor="<?php echo $color[4]; ?>"><tt>
<?php echo $body; ?>
</tt></td></tr></table>
-</body></html>
+</body></html>
\ No newline at end of file
*/
if (!isset($right_frame)) {
$right_frame = '';
-}
+}
if ($right_frame == 'right_main.php') {
$urlMailbox = urlencode($mailbox);
$right_frame_url =
echo $output;
?>
</frameset>
-</html>
+</html>
\ No newline at end of file