I'm not sure if this is related to my just recently upgrading from phpadsnew to openads, but I'm using the ads on my vBulletin forum and—although I don't recall how I initially installed the ad software a while ago—the following was a plugin executed on the pages:
CODE
ob_start();
    if (@include(getenv('DOCUMENT_ROOT').'/ads/phpadsnew.inc.php')) {
        if (!isset($phpAds_context)) $phpAds_context = array();
        $phpAds_raw = view_raw ('', 0, '', '', '0', $phpAds_context);
    }
ob_end_clean();
I've had to disable this plugin because when I run it, I get a database error that seems to be that the script is referencing the ad database but not switching back to the forum database. Why did this happen, how do I fix it, and what is this code for in the first place? Ads are still showing.

Thanks in advance.