require_once("./global.php");
if($bbuserinfo['userid'] == !0) { // stuff for registered peeps here } else { // everything else here }