processUploads();
$manager->deleteFiles();
$refreshDir = false;
//process any directory functions
if($manager->deleteDirs() || $manager->processNewDir())
$refreshDir = true;
//check for any sub-directory request
//check that the requested sub-directory exists
//and valid
if(isset($_REQUEST['dir']))
{
$path = rawurldecode($_REQUEST['dir']);
if($manager->validRelativePath($path))
$relative = $path;
}
$manager = new ImageManager($IMConfig);
//get the list of files and directories
$list = $manager->getFiles($relative);
/* ================= OUTPUT/DRAW FUNCTIONS ======================= */
/**
* Draw the files in an table.
*/
function drawFiles($list, &$manager)
{
global $relative;
global $IMConfig;
foreach($list as $entry => $file)
{ ?>