When sorting out files when I was moving host I came across something I wrote 8 years ago! Some PHP code for creating a simple PHP gallery that’s styleable with CSS.
You can see an example of what it does here.
And the manual for it is here.
If it’s still relevant for any one feel free to grab the files here