$withtext = ''; } // Derive the source parameter $source = phpAds_deriveSource($source); if (isset($exclude) && $exclude != '') { $exclude = explode(',', $exclude); $context = array(); for ($i = 0; $i < count($exclude); $i++) { if ($exclude[$i] != '') { $context[] = array("!=" => $exclude[$i]); } } } // Set real referer if (isset($referer) && $referer) { $HTTP_REFERER = $HTTP_SERVER_VARS['HTTP_REFERER'] = stripslashes($referer); } // Get the banner $output = view_raw($what, $clientid, $campaignid, $target, $source, $withtext, $context); phpAds_flushCookie(); // Show the banner header("Content-type: application/x-javascript"); enjavanate($output['html']); // Block this banner for next invocation if (isset($block) && $block != '' && $block != '0' && $output['bannerid']) { print "\nif (document.phpAds_used) document.phpAds_used += 'bannerid:" . $output['bannerid'] . ",';\n"; } // Block this campaign for next invocation if (isset($blockcampaign) && $blockcampaign != '' && $blockcampaign != '0' && $output['campaignid']) { print "\nif (document.phpAds_used) document.phpAds_used += 'campaignid:" . $output['campaignid'] . ",';\n"; }
if (isset($withText) && !isset($withtext)) { $withtext = $withText; } if (!isset($withtext)) { $withtext = ''; } $source = phpAds_deriveSource($source); // Remove referer, to be sure it doesn't cause problems with limitations if (isset($HTTP_SERVER_VARS['HTTP_REFERER'])) { unset($HTTP_SERVER_VARS['HTTP_REFERER']); } if (isset($HTTP_REFERER)) { unset($HTTP_REFERER); } if (!isset($layerstyle) || empty($layerstyle)) { $layerstyle = 'geocities'; } // Include layerstyle require phpAds_path . '/libraries/layerstyles/' . $layerstyle . '/layerstyle.inc.php'; $limitations = phpAds_getLayerLimitations(); if ($limitations['compatible']) { $output = view_raw($what, $clientid, $campaignid, $target, $source, $withtext, $context, $limitations['richmedia']); phpAds_flushCookie(); // Exit if no matching banner was found if (!$output) { exit; } $uniqid = substr(md5(uniqid('', 1)), 0, 8); enjavanate(phpAds_getLayerHTML($output, $uniqid)); phpAds_putLayerJS($output, $uniqid); }