forked from php/web-news
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
64 lines (59 loc) · 1.61 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
require 'common.php';
try {
$nntpClient = new \Web\News\Nntp(NNTP_HOST);
$groups = $nntpClient->listGroups();
} catch (Exception $e) {
error($e->getMessage());
}
head();
?>
<table border="0" cellpadding="6" cellspacing="0">
<tr>
<td>
<table class="stripped">
<tr>
<th>name</th>
<th>messages</th>
<th>rss</th>
<th>rdf</th>
</tr>
<?php
foreach ($groups as $group => $details) {
echo " <tr>\n";
echo " <td><a class=\"active{$details['status']}\" href=\"/$group\">$group</a></td>\n";
echo " <td align=\"right\">", $details['high']-$details['low']+1, "</td>\n";
echo " <td>";
if ($details['status'] != 'n') {
echo "<a href=\"group.php?group=$group&format=rss\">rss</a>";
}
echo "</td>\n";
echo " <td>";
if ($details['status'] != 'n') {
echo "<a href=\"group.php?group=$group&format=rdf\">rdf</a>";
}
echo "</td>\n";
echo " </tr>\n";
}
?>
</table>
</td>
<td valign="top">
<h1>Welcome!</h1>
<p>
This is a completely experimental interface to the PHP mailing lists as
reflected on the <a href="news://<?php echo htmlspecialchars($_SERVER['HTTP_HOST'],ENT_QUOTES,"UTF-8"); ?>/">
<?php echo htmlspecialchars($_SERVER['HTTP_HOST'], ENT_QUOTES, "UTF-8"); ?> NNTP server</a>.
</p>
<p>
There may be a little more info in the <a href="README.md">README</a> file.
</p>
<p>
The news server software that is used is <a
href="http://trainedmonkey.com/colobus/">colobus</a>.
</p>
</td>
</tr>
</table>
<?php
foot();