I'm working at a personal cloud where my gf can store her photos because her iCloud is full.
Basically, this is what is making everything works:
<?php
$dirname = "uploads/";
$images = glob($dirname."*.{jpg,,jpeg,png,gif,JPG,JPEG,PNG,GIF}", GLOB_BRACE);
usort($images, create_function('$b,$a', 'return filemtime($a) - filemtime($b);'));
foreach($images as $image) {
echo '
<a href="'.$image.'">
<img class="img-grid" src="'.$image.'" />
</a>';
}
?>
It's working perfectly but she needs a tool for deleting already uploaded images. Assuming she is only using this site at her smartphone, i've planned 3 ways of doing this although I dont know how to do it.
1st: A "X" at every image for deleting
PROS: Easy for her // CONS: Touchscreen miss click
2nd: A table with all images retrieved from dir and 'delete' button
PROS: Probably the easiest for programming? // CONS: Ugly
3rd: An "image preview" with delete button when clicking
PROS: Beauty and useful // CONS: Probably weird for mobile
So, which one of the 3 can be a good solution for her and how to do it?
Thanks in advance!
Edit2: inserting "how to do it" Edit3: sorry bad english, 'm from BR land