/[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.34 by wakaba, Mon Feb 11 13:27:21 2002 UTC revision 1.37 by wakaba, Mon Apr 1 01:40:44 2002 UTC
# Line 200  function get_mimetype_by_filename($name) Line 200  function get_mimetype_by_filename($name)
200  }  }
201    
202  function showPageSelectMenu($article_count,$first) {  function showPageSelectMenu($article_count,$first) {
203    global $articles_per_page,$file_thread,$file_framethread,$name;    global $articles_per_page,$name;
 /*  if (isset($file_framethread)) {  
     $thread=$file_framethread;  
   } else {  
     $thread=$file_thread;  
   }  
 */  
204    $pages=ceil($article_count / $articles_per_page);    $pages=ceil($article_count / $articles_per_page);
205    if ($article_count > $articles_per_page)    if ($article_count > $articles_per_page)
206      for ($i = 0; $i < $pages; $i++) {      for ($i = 0; $i < $pages; $i++) {
207        echo '[';        echo '[';
208        if ($first != $i*$articles_per_page+1)        if ($first != $i*$articles_per_page+1)
209          echo '<a href="'.($i*$articles_per_page+1).'_'.          echo '<a href="'.($i*$articles_per_page+1).'-'.
210               ($i+1)*$articles_per_page.'.html">';               ($i+1)*$articles_per_page.'">';
211        echo ($i*$articles_per_page+1).'-';        echo ($i*$articles_per_page+1).'-';
212        if ($i == $pages-1) {        if ($i == $pages-1) {
213          echo $article_count;          echo $article_count;
# Line 384  function readGroups($server,$port) { Line 378  function readGroups($server,$port) {
378   */   */
379  function showgroups($gruppen) {  function showgroups($gruppen) {
380    if ($gruppen == false) return;    if ($gruppen == false) return;
381    global $file_thread,$text_groups;    global $uri_thread,$text_groups;
382    $c = count($gruppen);    $c = count($gruppen);
383    echo "<table>\n";    echo "<table>\n";
384    echo "<tr><td>#</td><td>".$text_groups["newsgroup"].    echo "<tr><td>#</td><td>".$text_groups["newsgroup"].
# Line 396  function showgroups($gruppen) { Line 390  function showgroups($gruppen) {
390      echo '<a ';      echo '<a ';
391      if ((isset($frame_threadframeset)) && ($frame_threadframeset != ""))      if ((isset($frame_threadframeset)) && ($frame_threadframeset != ""))
392        echo 'target="'.$frame_threadframeset.'" ';        echo 'target="'.$frame_threadframeset.'" ';
393      echo 'href="'.$file_thread.'/'.encode_newsgroup ($g->name).'/index">'.$g->name."</a></td>\n";      echo 'href="'.$uri_thread.'/'.encode_newsgroup ($g->name).'/">'.$g->name."</a></td>\n";
394      echo "<td>$g->description</td></tr>\n";      echo "<td>$g->description</td></tr>\n";
395      flush();      flush();
396    }    }
# Line 404  function showgroups($gruppen) { Line 398  function showgroups($gruppen) {
398  }  }
399    
400  function encode_newsgroup ($groupname) {  function encode_newsgroup ($groupname) {
401    return urlencode (str_replace ('.', ':', $groupname));    return str_replace ('.', ':', urlencode ($groupname));
402  }  }
403    
404  /*  /*
# Line 560  function decode_unstructured_body ($body Line 554  function decode_unstructured_body ($body
554  function decode_structured_body ($body) {  function decode_structured_body ($body) {
555    $patterns = array (    $patterns = array (
556        "/\"((?:[^\"\\\\]+|\\\\.)*)\"/e",        "/\"((?:[^\"\\\\]+|\\\\.)*)\"/e",
557        "/\(((?:[^()\\\\]+|\\\\.|(?:\((?:[^()\\\\]+|\\\\.|(?:\((?:[^)\\\\]+|\\\\.\        "/\(((?:[^()\\\\]+|\\\\.|(?:\((?:[^()\\\\]+|\\\\.|(?:\((?:[^)\\\\]+|\\\\.\)*\))*\)))*)))\)/e",
 )*\)))*\)))*)\)/e",  
558    );    );
559    $replace = array (    $replace = array (
560      "mb_convert_encoding(fake_jisx0213(decode_quoted_pair('\\1')),'EUC-JP','auto')",      "mb_convert_encoding(fake_jisx0213(decode_quoted_pair('\\1')),'EUC-JP','auto')",

Legend:
Removed from v.1.34  
changed lines
  Added in v.1.37

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24