Salve a tutti, sono nuovo di questo forum e del linguaggio php... premesse a parte vorrei chiedervi il vostro aiuto

vorrei incrementare questo script php che vi riporto:

<?php
# Configuration
$show_path = 1; # Show local path.
$show_dotdirs = 1; # Show '.' and '..'.

$path = substr($_SERVER['SCRIPT_FILENAME'], 0,
strrpos($_SERVER['SCRIPT_FILENAME'], '/') + 1);
?>
<html><head>
<title></title>
</head>
<body>
<table cellspacing="1" align="center">
<tr>
<th><?php if ($show_path == 1) { echo $path; } else { echo ''; } ?></th>
</tr>
<tr>
<td>
<?php
$dirs = array();
$files = array();
$dir = dir($path);
while ($entry = $dir->read()) {
if (($entry != '.') and (substr($entry, -4) != '.php')) {
if (is_dir($entry)) {
if (($entry != '..') or $show_dotdirs){
$dirs[] = $entry;
}
} else {
$files[] = $entry;
}
}
}
$dir->close();

sort($dirs);
foreach ($dirs as $dir) {
printf('&lt; %s &gt;
' . "\n", $dir, $dir);
}

sort($files);
foreach ($files as $file) {
printf('%s
' . "\n", $file, $file);
}
?>
</td>
</tr>
</table>

<div align="center">
<input type="button" value="Aggiorna Pagina" onClick="javascript:document.location.reload()"></div>
</body></html>


con dei pulsanti affianco ad ogni cartella e file... che mi diano la possibilità di eliminare la singola cartella o file....

POTETA AIUTRARMI???

GRAZIE IN ANTICIPO ^_^