<?php

$path = getcwd()."/old";
echo '<a href=old/>ARCHIVE<BR><br>';

$folder1 = opendir($path) or die("Unable to open folder");
while (false !== ($file = readdir($folder1)))
{
 if($file == "index.php")
 continue;
 if($file == ".")
 continue;
 if($file == "..")
 continue;

 $bfile[]=$file;
 rsort($bfile);
}
closedir($folder1);
echo '<html> <body>';

  $day=$bfile[0];
echo $day."<BR>";

$path=$path."/".$day."/";

$folder1 = opendir($path) or die("Unable to open folder");

while (false !== ($file = readdir($folder1)))
{
 if($file == "index.php")
 continue;
 if($file == ".")
 continue;
 if($file == "..")
 continue;

 $afile[]=$file;
 rsort($afile);
 $anz=count($afile);
}
closedir($folder1);

for($i=0;$i<$anz;$i++)
  {
  $file=$afile[$i];
  echo "<FONT SIZE=+3><A HREF=old/$day/$file>$file</A> ";
  }

echo '  </body></html>';

