aboutsummaryrefslogtreecommitdiff
path: root/mlmmj-webarchiver/index.php.newlist
blob: 9acd78d119565f8cf91c9ceb373d5d31678e8bda (plain)
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
<?php
$path = getcwd();
$mlist = substr(strrchr($path, "/"), 1);
$handle = @opendir($path) or die("Unable to open $path");
while($file = readdir($handle)) {
  if(is_dir($path . "/" . $file) && $file != "." && $file != "..") {
    $files[] = $file;
  }
}
closedir($handle);
rsort($files);
reset($files);
foreach($files as $k => $file) {
  if (! isset($year) || $year != substr($file, 0, 4)) {
    $year = substr($file, 0, 4);
    $archived_months .= "<h1>$year</h1>";
  }
  $archived_months .= "<a href=\"$file\">$file</a><br />\n";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<title><?php echo $mlist;?> archives by month and year</title>
 <link rel="stylesheet" type="text/css" media="screen" href="../style/screen.css">
</head>
<body>
 <div id="banner">
  <div id="header">
   <div class="banner-left"><img src="../images/banner_left.gif" width="17" height="56" border="0" alt="" /></div>
   <div class="banner-text">Mailing List Archives</a></div>
   <div class="banner-right"><img src="../images/banner_right.gif" width="10" height="56" alt="" /></div>
  </div>
  <div id="topnav">
   <a href="/">home</a>
   |
   <a href="../search.php">search</a>
   |
   <a href="..">other lists</a>
  </div>
 </div>
 <div id="mailinglists">
  <div id="main">
  <h1><?php echo $mlist;?> archives by month and year</h1>
  <?php echo $archived_months; ?>
  </div>
 </div>
</body>
</html>