/[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.1.1.1 by wakaba, Sat Dec 1 11:17:31 2001 UTC revision 1.10 by wakaba, Sat Dec 1 12:34:50 2001 UTC
# Line 447  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=eregi_replace('(.*)"(.*)"(.*)','\1',$value);
453          $result2=eregi_replace('(.*)"(.*)"(.*)','\2',$value);
454          $result3=eregi_replace('(.*)"(.*)"(.*)','\3',$value);
455          $result2=eregi_replace('\\(.)','\1',$result2);
456          $newvalue=$result1.'"'.$result2.'"'.$result3;
457          return(mb_convert_encoding($newvalue, "EUC-JP", "auto"));
458        } else {   // there wasn't anything encoded, return the original string
459          return(mb_convert_encoding($value, "EUC-JP", "auto"));
460        }
461    }    }
462  }  }
463    
# Line 754  function read_message($id,$bodynum=0,$gr Line 763  function read_message($id,$bodynum=0,$gr
763        return false;        return false;
764      $rawmessage=array();      $rawmessage=array();
765      $line=lieszeile($ns);      $line=lieszeile($ns);
766   $line=mb_convert_encoding($line, "EUC-JP", "ISO-2022-JP");   #$line=mb_convert_encoding($line, "EUC-JP", "ISO-2022-JP");
767      while(strcmp($line,".") != 0) {      while(strcmp($line,".") != 0) {
768        $rawmessage[]=$line;        $rawmessage[]=$line;
769        $line=lieszeile($ns);        $line=lieszeile($ns);
770   $line=mb_convert_encoding($line, "EUC-JP", "ISO-2022-JP");   #$line=mb_convert_encoding($line, "EUC-JP", "ISO-2022-JP");
771      }      }
772      $message=parse_message($rawmessage);      $message=parse_message($rawmessage);
773      if (ereg('^[0-9]+$',$id)) $message->header->number=$id;      if (ereg('^[0-9]+$',$id)) $message->header->number=$id;
# Line 1177  function formatTreeGraphic($newtree) { Line 1186  function formatTreeGraphic($newtree) {
1186          break;          break;
1187        }        }
1188      $return .= '" alt="'.$alt.'"';      $return .= '" alt="'.$alt.'"';
1189      if (strcmp($k,".") == 0) $return .=(' width="12" height="9"');      if (strcmp($k,".") == 0) $return .=(' style="width: 12px; height: 9px"');
1190      $return .= ' />';      $return .= '>';
1191    }    }
1192    return($return);    return($return);
1193  }  }
# Line 1256  function showThread(&$headers,&$liste,$d Line 1265  function showThread(&$headers,&$liste,$d
1265            echo "<br>\n";            echo "<br>\n";
1266            break;            break;
1267          case 1: // html-auflistung, kein baum          case 1: // html-auflistung, kein baum
1268            echo "<li><nobr>".$thread_fontPre;            echo "<li>".$thread_fontPre;
1269            if ($thread_showDate)            if ($thread_showDate)
1270              echo formatDate($c)." ";              echo formatDate($c)." ";
1271            if ($thread_showSubject)            if ($thread_showSubject)
1272              echo formatSubject($c,$group)." ";              echo formatSubject($c,$group)." ";
1273            if ($thread_showAuthor)            if ($thread_showAuthor)
1274              echo "<i>(".formatAuthor($c).")</i>";              echo "<em>(".formatAuthor($c).")</em>";
1275            echo $thread_fontPost."</nobr></li>";            echo $thread_fontPost."</li>";
1276            break;            break;
1277          case 2:   // table          case 2:   // table
1278            echo "<tr>";            echo "<tr>";
# Line 1275  function showThread(&$headers,&$liste,$d Line 1284  function showThread(&$headers,&$liste,$d
1284            }            }
1285            if ($thread_showAuthor) {            if ($thread_showAuthor) {
1286              echo "<td></td>";              echo "<td></td>";
1287              echo '<td nowrap="nowrap">'.$thread_fontPre.formatAuthor($c);              echo '<td>'.$thread_fontPre.formatAuthor($c);
1288              echo $thread_fontPost."</td>";              echo $thread_fontPost."</td>";
1289            }            }
1290            echo "</tr>\n";            echo "</tr>\n";
1291            break;            break;
1292          case 3: // html-tree          case 3: // html-tree
1293            echo "<li><nobr>".$thread_fontPre;            echo "<li>".$thread_fontPre;
1294            if ($thread_showDate)            if ($thread_showDate)
1295              echo formatDate($c)." ";              echo formatDate($c)." ";
1296            if ($thread_showSubject)            if ($thread_showSubject)
1297              echo formatSubject($c,$group)." ";              echo formatSubject($c,$group)." ";
1298            if ($thread_showAuthor)            if ($thread_showAuthor)
1299              echo "<i>(".formatAuthor($c).")</i>";              echo "<em>(".formatAuthor($c).")</em>";
1300            echo $thread_fontPost."</nobr>\n";            echo $thread_fontPost."\n";
1301            break;            break;
1302          case 4:  // thread          case 4:  // thread
1303            echo "<nobr><tt>".$thread_fontPre;            echo "".$thread_fontPre;
1304            if ($thread_showDate)            if ($thread_showDate)
1305              echo formatDate($c)." ";              echo formatDate($c)." ";
1306            echo formatTreeText($newtree)." ";            echo formatTreeText($newtree)." ";
1307            if ($thread_showSubject)            if ($thread_showSubject)
1308              echo formatSubject($c,$group)." ";              echo formatSubject($c,$group)." ";
1309            if ($thread_showAuthor)            if ($thread_showAuthor)
1310              echo "<i>(".formatAuthor($c).")</i>";              echo "<em>(".formatAuthor($c).")</em>";
1311            echo $thread_fontPost."</tt></nobr><br>";            echo $thread_fontPost."<br>";
1312            break;            break;
1313          case 5:  // thread, graphic          case 5:  // thread, graphic
1314            echo "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr>\n";            echo "<table><tr>\n";
1315            if ($thread_showDate)            if ($thread_showDate)
1316              echo '<td nowrap="nowrap">'.$thread_fontPre.formatDate($c)." ".$thread_fontPost."</td>";              echo '<td>'.$thread_fontPre.formatDate($c)." ".$thread_fontPost."</td>";
1317            echo "<td>".$thread_fontPre.formatTreeGraphic($newtree).$thread_fontPost."</td>";            echo "<td>".$thread_fontPre.formatTreeGraphic($newtree).$thread_fontPost."</td>";
1318            if ($thread_showSubject)            if ($thread_showSubject)
1319              echo '<td nowrap="nowrap">'.$thread_fontPre."&nbsp;".formatSubject($c,$group)." ";              echo '<td>'.$thread_fontPre."&nbsp;".formatSubject($c,$group)." ";
1320            if ($thread_showAuthor)            if ($thread_showAuthor)
1321              echo "(".formatAuthor($c).")".$thread_fontPost."</td>";              echo "(".formatAuthor($c).")".$thread_fontPost."</td>";
1322            echo "</tr></table>";            echo "</tr></table>";
# Line 1315  function showThread(&$headers,&$liste,$d Line 1324  function showThread(&$headers,&$liste,$d
1324          case 6:  // thread, table          case 6:  // thread, table
1325            echo "<tr>";            echo "<tr>";
1326            if ($thread_showDate)            if ($thread_showDate)
1327              echo '<td nowrap="nowrap"><tt>'.$thread_fontPre.formatDate($c)." ".$thread_fontPost."</tt></td>";              echo '<td>'.$thread_fontPre.formatDate($c)." ".$thread_fontPost."</td>";
1328            echo '<td nowrap="nowrap"><tt>'.$thread_fontPre.formatTreeText($newtree)." ";            echo '<td>'.$thread_fontPre.formatTreeText($newtree)." ";
1329            if ($thread_showSubject) {            if ($thread_showSubject) {
1330              echo formatSubject($c,$group).$thread_fontPost."</tt></td>";              echo formatSubject($c,$group).$thread_fontPost."</td>";
1331              echo "<td></td>";              echo "<td></td>";
1332            }            }
1333            if ($thread_showAuthor)            if ($thread_showAuthor)
1334              echo '<td nowrap="nowrap"><tt>'.$thread_fontPre.formatAuthor($c).$thread_fontPost."</tt></td>";              echo '<td>'.$thread_fontPre.formatAuthor($c).$thread_fontPost."</td>";
1335            echo "</tr>";            echo "</tr>";
1336            break;            break;
1337          case 7:  // thread, table, graphic          case 7:  // thread, table, graphic
1338            echo "<tr>";            echo "<tr>";
1339            if ($thread_showDate)            if ($thread_showDate)
1340              echo '<td nowrap="nowrap">'.$thread_fontPre.formatDate($c)." ".$thread_fontPost."</td>";              echo '<td>'.$thread_fontPre.formatDate($c)." ".$thread_fontPost."</td>";
1341            echo "<td><table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n";            echo "<td><table>\n";
1342            echo "<td>".formatTreeGraphic($newtree)."</td>";            echo "<td>".formatTreeGraphic($newtree)."</td>";
1343            if ($thread_showSubject)            if ($thread_showSubject)
1344              echo '<td nowrap="nowrap">'.$thread_fontPre."&nbsp;".formatSubject($c,$group).$thread_fontPost."</td>";              echo '<td>'.$thread_fontPre."&nbsp;".formatSubject($c,$group).$thread_fontPost."</td>";
1345            echo "</table></td>";            echo "</table></td>";
1346            if ($thread_showSubject) echo "<td></td>";            if ($thread_showSubject) echo "<td></td>";
1347            if ($thread_showAuthor)            if ($thread_showAuthor)
1348              echo '<td nowrap="nowrap">'.$thread_fontPre.formatAuthor($c).$thread_fontPost."</td>";              echo '<td>'.$thread_fontPre.formatAuthor($c).$thread_fontPost."</td>";
1349            echo "</tr>";            echo "</tr>";
1350            break;            break;
1351        }        }
# Line 1675  function verschicken($subject,$from,$new Line 1684  function verschicken($subject,$from,$new
1684      fputs($ns,"post\r\n");      fputs($ns,"post\r\n");
1685      $weg=lieszeile($ns);      $weg=lieszeile($ns);
1686  //    fputs($ns,'Subject: '.quoted_printable_encode($subject)."\r\n");  //    fputs($ns,'Subject: '.quoted_printable_encode($subject)."\r\n");
1687  //    fputs($ns,'Subject: '.mb_convert_encoding($subject, "ISO-2022-JP", "EUC-JP")."\r\n");      fputs($ns,'Subject: '.mb_convert_encoding($subject, "ISO-2022-JP", "EUC-JP")."\r\n");
1688      fputs($ns,'Subject: '.mb_encode_mimeheader($subject)."\r\n");  //    fputs($ns,'Subject: '.mb_encode_mimeheader($subject)."\r\n");
1689      fputs($ns,'From: '.$from."\r\n");      fputs($ns,'From: '.$from."\r\n");
1690      fputs($ns,'Newsgroups: '.$newsgroups."\r\n");      fputs($ns,'Newsgroups: '.$newsgroups."\r\n");
1691  //    fputs($ns,"Mime-Version: 1.0\r\n");  //    fputs($ns,"Mime-Version: 1.0\r\n");
1692  //    fputs($ns,"Content-Type: text/plain; charset=ISO-8859-1\r\n");  //    fputs($ns,"Content-Type: text/plain; charset=ISO-8859-1\r\n");
1693  //    fputs($ns,"Content-Transfer-Encoding: 8bit\r\n");  //    fputs($ns,"Content-Transfer-Encoding: 8bit\r\n");
1694      fputs($ns,"User-Agent: NewsPortal 0.24pre3\r\n");      fputs($ns,"User-Agent: ".$text_ua["user_agent"]."\r\n");
1695      if ($send_poster_host)      if ($send_poster_host)
1696        fputs($ns,'X-HTTP-Posting-Host: '.gethostbyaddr(getenv("REMOTE_ADDR"))."\r\n");        fputs($ns,'X-HTTP-Posting-Host: '.gethostbyaddr(getenv("REMOTE_ADDR"))."\r\n");
1697      if ($ref!=false) fputs($ns,'References: '.$ref."\r\n");      if ($ref!=false) fputs($ns,'References: '.$ref."\r\n");

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.10

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24