Well you could use a mysql database. Here is what I think you will need.
A place to upload the images.
During the upload process you would use a server side script to make thumbnails on the fly of the larger images.
When you upload the image, you will add the location of the larger image and the thumbnail into the database.
After doing this it will be a matter of retrieving the images and creating the html for them on the fly.
You won't need to make a new page for every image because you could do something like this
Of course this is all just the basics of what you will need. If you don't know php or mysql then good luck. Looks like you will be on a steep learning curve for a while.
<a href="display.php?img=images/imagename.jpg" onclick="window.open(this.href,'photo','width=400,height=400');return false"><img src="images/tn_imagename.jpg" width="100" height="100" alt=""></a>