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

Contents of /messaging/newsportal/thread.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Mon Feb 11 13:36:11 2002 UTC (22 years, 8 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +7 -8 lines
*** empty log message ***

1 wakaba 1.1 <? header("Expires: ".gmdate("D, d M Y H:i:s",time()+7200)." GMT");
2    
3 wakaba 1.3 // $PATH_INFO = /suika:misc/10:20
4     $url = explode ("/", $PATH_INFO);
5     $group = str_replace (':', '.', $url[1]);
6 wakaba 1.1 if (!isset($url[2])) {
7 wakaba 1.3 header('Location: '.$group.'/index');
8 wakaba 1.1 echo "nix";
9     exit;
10     } else {
11     $pagestring=$url[2];
12 wakaba 1.3 preg_match("/^([0-9]+)[_-]([0-9]+)/", $pagestring, $matches);
13     $first = $matches[1];
14     $last = $matches[2];
15 wakaba 1.1 }
16     include "config.inc";
17     $title.= ' - '.$group;
18     include "body.inc"; ?>
19    
20 wakaba 1.2 <h1 id="top"><?php echo $group; ?></h1>
21 wakaba 1.1
22 wakaba 1.2 <p class="navi">
23 wakaba 1.1 <? if (!$readonly)
24     echo '[<a href="../../'.$file_post.'?newsgroups='.urlencode($group).'&amp;type=new">'.$text_thread["button_write"]."</a>] ";
25     echo '[<a href="../../'.$file_groups.'">'.$text_thread["button_grouplist"].'</a>]';
26     ?>
27     </p>
28    
29     <?
30     include("$file_newsportal");
31     $ns=OpenNNTPconnection($server,$port);
32     flush();
33     if ($ns != false) {
34     $headers = readOverview($ns,$group,1);
35     $article_count=count($headers);
36     if ($articles_per_page != 0) {
37     if ((!isset($first)) || (!isset($last))) {
38     if ($startpage=="first") {
39     $first=1;
40     $last=$articles_per_page;
41     } else {
42     $first=$article_count - (($article_count -1) % $articles_per_page);
43     $last=$article_count;
44     }
45     }
46 wakaba 1.2 echo '<p class="page">';
47 wakaba 1.1 showPageSelectMenu(count($headers),$first);
48     echo '</p>';
49     } else {
50     $first=0;
51     $last=$article_count;
52     }
53     showHeaders($headers,$group,$first,$last);
54     closeNNTPconnection($ns);
55     }
56     ?>
57    
58 wakaba 1.2 <p class="backnavi"><a href="#top"><? echo $text_thread["button_top"];?></a></p>
59 wakaba 1.1
60     <? include "footer.inc"; ?>

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24