forked from arnolem/web-news
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
68 lines (60 loc) · 1.63 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
65
66
67
68
<?php
require 'common.php';
try {
$nntpClient = new \Web\News\Nntp(NNTP_HOST);
$groups = $nntpClient->listGroups();
} catch (Exception $e) {
error($e->getMessage());
}
head();
?>
<nav class="secondary-nav">
<ul class="breadcrumbs">
<li><a class="breadcrumbs-item-link" href="/">PHP Mailing Lists</a></li>
</ul>
</nav>
<section class="content">
<div class="welcome">
<h1>PHP Mailing Lists</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>
</div>
<table class="standard">
<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 class=\"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>
</section>
<?php
foot();