Ho trovato questo script che mi mostra tutti i file della directory (non solo le immagini e, sopratutto, non le anteprime) e mi permette di checkarle....

Dopo il "submit" come si fa a far in modo che le checkate siano spostate e quelle no siano eliminate????


<?php

$file_ary = isset($_POST['rfile']) ? $_POST['rfile'] : array();

/**
* At first visit, show the file list
*/
if (empty($file_ary))
{
$image_path = dirname(__FILE__) . '/images';
$dir_handle = null;

if (!($dir_handle = opendir($image_path)))
{
//trigger_error('error, path not found');
return;
}
$html = '<html><form method="post">';
$file = readdir($dir_handle);

while ($file)
{
$html .= "{$file}<input type=\"checkbox\" name=\"rfile[]\" value=\"{$file}\" />
\r\n";
$file = readdir($dir_handle);
}
closedir($dir_handle);

$html .= '<input type="submit" name="submit" value="Submit" />';
$html .= "</form></html>";
echo $html;
}

/**
* Now, we have list, display it or do anything you need to ..
*/
if (!empty($file_ary))
{
echo '<pre>';
print_r($file_ary);
echo '</pre>';
}

?>