Sorry about that little rant.
Anyway, I wanted to address the usage of 'page templates' and code redundancy. One 'trick' I've used for my sites/code is to have one central page that can be accessed, then use includes (I like to call them modules) to perform specific functions.
This way I only have to do main configuration on one page, instead of having to make sure all accessible pages have it the same.
The in_array() method helps make this secure. For example, let's say I want to access topic number 4 this way: http://www.example.org/?a=topic&id=4
Instead of doing a direct include we have something like this:
$allowed_modules = array('topic', 'forum', 'etc');
// Get the module name, if allowed, use $_GET['a']
// otherwise, use 'main'
$module = in_array($_GET['a'], $allowed_modules) ? $_GET['a'] : 'main';
include('./includes/' . $module . '.php');Since I do this for a living and our server is our server, I keep all my includes safely stowed away from the outside world. Since we'd need to allow these modules to be in public HTML webspace the code below is perfect. That's really the only redundancy I can be okay with.
if ( !defined('INCLUDED') )
exit();I hope I made sense. Mornings are never good for me.

Anyway, thoughts?
_______________
I love PHP!

