Replace gallery with php

Instead of having multiple files, keep a php file that connects to the
database and creates the page on the fly.