Rewrite again

I’ve been working on this for the last two or three days. It’s a complete rewrite of my php scripts. This time everything is done with the smarty template engine. The site is a lot faster than the current one, and is also more maintainable. As soon as all functions are working, i’ll switch over.