chdir('/home/users/path/to/your/site'); require('./global.php');
if ($bbuserinfo['userid'] == 0) { show_nopermission(); }