The way the footer has to be included into the templates currently, the php code won't get parsed in here. It has to get read in like a standard file for inclusion in the ubbt_footer.tmpl file.
What you need to do is edit your ubbt_footer.tmpl file. You'll see in here where it has a $footerfile variable. Basically it looks like this:
$footerfile
</body>
</html>
UBBTPRINT;
/* UBBTREMARK */ ?>
You would need to change that section, to look like this:
$footerfile
UBBTPRINT;
>> insert all of your php banner code here <<
echo <<<UBBTPRINT
</body>
</html>
UBBTPRINT;
/* UBBTREMARK */ ?>