| 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).'&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"; ?> |