Lightweight image/file gallery in PHP+MySQL