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

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.9

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24