vypis z slozky

Zdar... potreboval bych kod, jak udelat to, aby se mi vypsaly vsechny soubory v nejaky slozce, napriklad "online" a ve slozce budou soubory honza.txt, petr.txt, jakub.txt.... a aby mi je to prostě pod sebe vypsalo... ale bez přípony txt...
index.php


<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250">
<title><? echo (StrToUpper($SERVER_NAME)) ?> - Index Page</title><link rel="stylesheet" type="text/css" href="vychozi.css"></head>
<body>
<center><H1>WEB <? echo (StrToUpper($SERVER_NAME)) ?></H1></center>
<hr size=1 width="65%"><br>
<BR>
<table border=0 cellpadding=0 cellspacing=0>
<tr>
<td valign="top"><IMG style="margin=4px" src="images/web.bmp" ></td>
<td valign="middle" style="font:18px"><b>Web <? echo (StrToUpper($SERVER_NAME)) ?></b></td>
</tr>
<tr>
<td valign="top"><img src="images/blank.bmp"><br>
<?
if ($handle=opendir('.')) {
while ($file = readdir($handle))
{
$polozky[count($polozky)] = $file;
}
closedir($handle);
sort($polozky);
}
$seznam = count($polozky) - 3;
for($i=0; $i<$seznam; $i++):
echo "<img src=\"images/treedir.bmp\" style=\"margin:0px\"><br>\n";
endfor;
?><img src="images/lasttreedir.bmp" style="margin:0px">
<td valign="top"><?php
reset($polozky);
while (list($key, $val) = each($polozky))
{
if ($val != "." && $val != "..")
{
if (is_dir($val))
{
echo "<IMG src=\"images/dir.bmp\" style=\"margin=3px\">";
echo "<a href=\"$val\" style=\"font:17\">".strtoupper($val)."</a><br>\n";
}
}
}
reset($polozky);
while (list($key, $val) = each($polozky))
{
if ($val != "." && $val != "..")
{
if (!is_dir($val))
{
echo "<IMG src=\"images/file.bmp\" style=\"margin=3px\">";
echo "<a style=\"font:18\" href=\"$val\">$val</a><br>\n";
}
}
}
?></td>
</tr>
</table>
</body>



vychozi.css


a:active { font-family: Arial; font-size: 10pt; color: #CC3300 }

.normalni { font-family: Arial; font-size: 10pt }

a:link { font-family: Arial; font-size: 10pt; color: #0099CC }

a:visited { font-family: Arial; font-size: 10pt; color: #336699 }

a { font-family: Arial; font-size: 10pt; color: #0099CC }

address { font-family: Arial; font-size: 10pt; color: #0099CC }

body { font-family: Arial; font-size: 10pt; color: #000000; background-image:url('images/bckgrnd.gif') }

button { font-family: Arial; font-size: 12pt; color: #808080; border: 1px solid #000000;

background-color: #D4D0C8 }

h1 { font-family: Arial Black; font-size: 36pt; font-weight: bold; color: #808080 }

h2 { font-family: Arial Black; font-size: 24pt }

h3 { font-family: Arial Black; font-size: 18pt }

h4 { font-family: Arial; font-size: 14pt; font-weight: bold }

h5 { font-family: Arial; font-size: 10pt; font-weight: bold }

h6 { font-family: Arial; font-size: 8pt }

html { font-family: Arial; font-size: 10pt }

input { font-family: Arial; font-size: 10pt }

input { border: 1px solid #000000 }

option { font-family: Arial; font-size: 10pt; border: 1px solid #000000 }

textarea { font-family: Arial; font-size: 10pt; border: 1px solid #000000 }

table { font-family: Arial; font-size: 10pt }td { font-family: Arial; font-size: 10pt }

tr { font-family: Arial; font-size: 10pt }
obrazky potrebne k hezkemu zobrazeni Ti muzu poslat mejlem, pokud budes chtit.
$dir = opendir('online');
while ($file = readdir($dir)) {
echo substr($sfile, 0, -4);
}
hele hoppiku neni to až zbytečně moc složitý? Ale i tak dík, Lacope, Hoppiku...
a ty obrázky by se mi šikly... alespoň uvidim, jak to vypadá... děkuju - afin@seznam.cz