<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Public_html</title>
<link rel="stylesheet" type="text/css" href="http://www.skorzak.priv.at/common/formate.css">
<meta name="keywords" content="">
<meta name="author" content="Chrisu">
<meta name="generator" content="emacs">
</head>
<body text="#FFFFFF" bgcolor="#004000" link="#00B900" alink="#FF0000"
 vlink="#FF8040">
<h1 style="text-align:center">P.U.B.L.I.C. html</h1>
<hr size=1 width="80%" align=center color="#ffff80">

<!-- Jetzt gehts los -->
<!-- Einlesen des Verzeichnisses -->

<?php
$dir    
getcwd();
$files1 scandir($dir);

$musics = array();
$pictures = array();
$pdfs = array();
$others = array();

   echo 
"<ul>\n";
     foreach (
$files1 as $file)
       {
         
$extension substr($file, -4);
         switch (
$extension)
           {
           case 
".mp3":
             
$musics[] = $file;
             break;
           case 
".jpg":
             
$pictures[] = $file;
             break;
           case 
".pdf":
             
$pdfs[] = $file;
             break;
           default:
             
$others[] = $file;
           }
       }
   echo 
"</ul>\n";

   echo 
"<h1>Musik:</h1>";
   echo 
"<ul>\n";
   foreach (
$musics as $file)
    {
      echo 
"\t<li><a href=http://www.skorzak.priv.at/~chrisu/" htmlspecialchars($file) . ">$file</a></li>\n";
    }
   echo 
"</ul>\n";

   echo 
"<h1>Bilder:</h1>";
   echo 
"<ul>\n";
   foreach (
$pictures as $file)
    {
      echo 
"\t<li><a href=http://www.skorzak.priv.at/~chrisu/" htmlspecialchars($file) . ">$file</a></li>\n";
    }
   echo 
"</ul>\n";

   echo 
"<h1>PDFs:</h1>";
   echo 
"<ul>\n";
   foreach (
$pdfs as $file)
    {
      echo 
"\t<li><a href=http://www.skorzak.priv.at/~chrisu/" htmlspecialchars($file) . ">$file</a></li>\n";
    }
   echo 
"</ul>\n";

   echo 
"<h1>Rest:</h1>";
   echo 
"<ul>\n";
   foreach (
$others as $file)
    {
      echo 
"\t<li><a href=http://www.skorzak.priv.at/~chrisu/" htmlspecialchars($file) . ">$file</a></li>\n";
    }
   echo 
"</ul>\n";
?>

<br>
<!-- Samstag, 21.7.2007 -->
</body>
</html>