1. Basically almost anything in the user table in the database can be made in a if statement. I belive, but do not quote me.
3. For templates, $header and $footer will work.
To call the header in a php file, just put this enar the top of the file somewhere.
PHP Code:
eval('$header = "' . fetch_template('header') . '";');
Should work. Hopefully someone with better knowledge can answer these better.