Treat _SERVER as an array, not as an hash table.
Fixed links to thumbnail views.
Forgot to set the limit of images to fetch from the database.