/[suikacvs]/messaging/newsportal/newsportal.php
Suika

Diff of /messaging/newsportal/newsportal.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by wakaba, Sat Dec 1 12:07:26 2001 UTC revision 1.12 by wakaba, Sat Dec 1 12:42:14 2001 UTC
# Line 326  function address_decode($adrstring,$defa Line 326  function address_decode($adrstring,$defa
326    $result["mailbox"]=trim($mailbox);    $result["mailbox"]=trim($mailbox);
327    $result["host"]=trim($host);    $result["host"]=trim($host);
328  //  $personal = mb_convert_encoding($personal, "EUC-JP", "auto");  //  $personal = mb_convert_encoding($personal, "EUC-JP", "auto");
   $personal = ereg_replace("\\(.)", "----", $personal);  
329    if ($personal!="") $result["personal"]=$personal;    if ($personal!="") $result["personal"]=$personal;
330    $complete[]=$result;    $complete[]=$result;
331    return ($complete);    return ($complete);
# Line 448  function headerDecode($value) { Line 447  function headerDecode($value) {
447      else      else
448        $newvalue=headerDecode($newvalue);  // maybe there are more encoded        $newvalue=headerDecode($newvalue);  // maybe there are more encoded
449      return(mb_convert_encoding($newvalue, "EUC-JP", "auto"));      // parts      return(mb_convert_encoding($newvalue, "EUC-JP", "auto"));      // parts
450    } else {   // there wasn't anything encoded, return the original string    } else {
451      return(mb_convert_encoding($value, "EUC-JP", "auto"));      if (eregi('".*"',$value)) {  // quoted-printable decoding
452          $result1=ereg_replace('(.*)"(.*)"(.*)','\1',$value);
453          $result2=ereg_replace('(.*)"(.*)"(.*)','\2',$value);
454          $result3=ereg_replace('(.*)"(.*)"(.*)','\3',$value);
455          $result2=ereg_replace('\\\\(.)','AI\1',$result2);
456          $result2=ereg_replace('(.)','OI\1',$result2);
457          $newvalue=$result1.'"'.$result2.'"'.$result3;
458          return(mb_convert_encoding($newvalue, "EUC-JP", "auto"));
459        } else {   // there wasn't anything encoded, return the original string
460          return(mb_convert_encoding($value, "EUC-JP", "auto"));
461        }
462    }    }
463  }  }
464    
# Line 755  function read_message($id,$bodynum=0,$gr Line 764  function read_message($id,$bodynum=0,$gr
764        return false;        return false;
765      $rawmessage=array();      $rawmessage=array();
766      $line=lieszeile($ns);      $line=lieszeile($ns);
767   $line=mb_convert_encoding($line, "EUC-JP", "ISO-2022-JP");   #$line=mb_convert_encoding($line, "EUC-JP", "ISO-2022-JP");
768      while(strcmp($line,".") != 0) {      while(strcmp($line,".") != 0) {
769        $rawmessage[]=$line;        $rawmessage[]=$line;
770        $line=lieszeile($ns);        $line=lieszeile($ns);
771   $line=mb_convert_encoding($line, "EUC-JP", "ISO-2022-JP");   #$line=mb_convert_encoding($line, "EUC-JP", "ISO-2022-JP");
772      }      }
773      $message=parse_message($rawmessage);      $message=parse_message($rawmessage);
774      if (ereg('^[0-9]+$',$id)) $message->header->number=$id;      if (ereg('^[0-9]+$',$id)) $message->header->number=$id;
# Line 1683  function verschicken($subject,$from,$new Line 1692  function verschicken($subject,$from,$new
1692  //    fputs($ns,"Mime-Version: 1.0\r\n");  //    fputs($ns,"Mime-Version: 1.0\r\n");
1693  //    fputs($ns,"Content-Type: text/plain; charset=ISO-8859-1\r\n");  //    fputs($ns,"Content-Type: text/plain; charset=ISO-8859-1\r\n");
1694  //    fputs($ns,"Content-Transfer-Encoding: 8bit\r\n");  //    fputs($ns,"Content-Transfer-Encoding: 8bit\r\n");
1695      fputs($ns,"User-Agent: $text_ua["user_agent"]\r\n");      fputs($ns,"User-Agent: ".$text_ua["user_agent"]."\r\n");
1696      if ($send_poster_host)      if ($send_poster_host)
1697        fputs($ns,'X-HTTP-Posting-Host: '.gethostbyaddr(getenv("REMOTE_ADDR"))."\r\n");        fputs($ns,'X-HTTP-Posting-Host: '.gethostbyaddr(getenv("REMOTE_ADDR"))."\r\n");
1698      if ($ref!=false) fputs($ns,'References: '.$ref."\r\n");      if ($ref!=false) fputs($ns,'References: '.$ref."\r\n");

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.12

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24