1 #include <infodrom.style>
4 <page title="Infodrom Oldenburg - Mail-Archive">
8 if (strlen ($_GET["list"])> 0 && is_dir ($_GET["list"])) {
9 echo " – " . $_GET["list"];
17 ACHTUNG: - Kein Support für ausgeschriebenen Namen der Liste
18 - Kein Support für Liste ohne Unterverzeichnisse 1999, 2000 etc.
21 function get_months ($dirname)
23 $dir = dir ($dirname);
26 while ($dentry = $dir->read()) {
27 if ($dentry != "." && $dentry != ".." && is_dir ("$dirname/$dentry") && ereg ("^[01][0-9]$", $dentry)) {
36 if (strlen ($_GET["list"]) > 0 && is_dir ($_GET["list"])) {
37 $dirs = array ($_GET["list"]);
41 while ($dentry = $dir->read()) {
42 if ($dentry != "." && $dentry != ".." && is_dir ($dentry)
43 && $dentry != "gifs" && $dentry != "stats") {
52 for ($i=0; $i < $max; $i++) {
54 $file = $dirs[$i] . "/" . "index.inc";
55 if (is_file ($file)) {
56 $f = fopen ($file, "r");
59 $line = fgets ($f, 255);
68 printf ("<li> <strong>%s</strong><br>", $dirs[$i]);
70 $dir = dir ($dirs[$i]);
72 while ($dentry = $dir->read()) {
73 if ($dentry != "." && $dentry != ".." && is_dir ("$dirs[$i]/$dentry")) {
80 $ymax = count ($years);
81 for ($y=0; $y < $ymax; $y++) {
82 $months = get_months ("$dirs[$i]/$years[$y]");
83 if (count ($months) > 0) {
84 printf ("%s%s (", $y>0?", ":"", $years[$y]);
85 for ($m=0; $m < count ($months); $m++) {
86 printf ("%s<a href=\"%s/%s/%s/\">%s</a>",
87 $m>0?", ":"", $dirs[$i], $years[$y], $months[$m], $months[$m]);
91 printf ("%s<a href=\"%s/%s/\">%s</a>",
92 $y>0?", ":"", $dirs[$i], $years[$y], $years[$y]);
98 if (strlen ($_GET["list"]) > 0 && is_dir ($_GET["list"])) {
99 printf ("<li> <strong><a href=\"<root_prefix>stats/details.php?list=%s\">Statistics</a></strong><br>",
102 echo ("<li> <strong><a href=\"<root_prefix>stats/index.php\">Statistics</a></strong><br>");
106 <li> <strong><a href="<root_prefix>search.html">Search</a></strong><br>
109 <div class="fortune">
110 <div class="fortune-body">
111 <h3 class="fortune-title">Quote of the Day</h3>
112 <div class="fortune-content" id="fortune">
114 function format_cookie ($cookie, $bg)
116 $fsource = "<div class=\"fortune-attribution\"><span style=\"display: none;\">-- </span>%s</div>";
118 $result = '<div class="fortune_'.$bg.'">';
119 $firstchar = substr ($cookie[0], 0, 1);
120 if ( ($firstchar == "<")
121 || ($firstchar == ">")
122 || ($firstchar == "*")
123 || ($firstchar == " ")
124 || ($firstchar == "[") ) {
126 $result .= "<pre class=\"smallfont\">\n";
131 for ($i=0; $i < count ($cookie); $i++) {
133 $line = ereg_replace ("<", "<", $line);
134 $line = ereg_replace (">", ">", $line);
136 if (ereg ("^ ?-- ", $line)) {
137 $line = ereg_replace ("^ ?-- ", "", rtrim($line));
140 $result .= "</pre>\n";
144 $result .= sprintf ($fsource, $line);
147 if (!$pre && substr($line, 0, 1) == ' ')
155 $result .= "</pre>\n";
160 $result .= "</div>\n";
164 if (is_file ("../www.infodrom.org/fortune-general-en.html")) {
165 $fortune = fopen ("../www.infodrom.org/fortune-general-en.html", "r");
169 while (!feof ($fortune)) {
170 $line = fgets ($fortune, 255);
174 echo format_cookie ($cookie, 0);
176 echo "<p>No fortune today.</p>";
186 # mode: indented-text