Code:
<?php
require("file");
?>
Whatever you were printing out before the code block
<?php
if ($bbuserid == 0){
eval( "echo dovars(\"" . gettemplate( "guestloggedin" ) . "\");" );
} else {
if ($bbusername == "" || (isset($bbusername))==0){
$getusername=$DB_site->query_first("SELECT username FROM user WHERE userid=$bbuserid");
$username=$getusername[username];
$bbusername = $username;
eval( "echo dovars(\"" . gettemplate( "userloggedin" ) . "\");" );
} else {
$username = $bbusername;
eval( "echo dovars(\"" . gettemplate( "userloggedin" ) . "\");" );
}
}
?>