function view($what, $clientid = 0, $target = '', $source = '', $withtext = 0, $context = 0, $richmedia = true) { $output = view_raw($what, $clientid, "{$target}", "{$source}", $withtext, $context, $richmedia); if (is_array($output)) { echo $output['html']; return $output['bannerid']; } return false; }
function replace_tags($tags = array()) { global $config, $lang; require_once $config['basepath'] . '/include/login.inc.php'; $login = new login(); require_once $config['basepath'] . '/include/misc.inc.php'; $misc = new misc(); // Remove tags not found in teh template $new_tags = $tags; $tags = array(); foreach ($new_tags as $tag) { if (strpos($this->page, '{' . $tag . '}') !== false) { $tags[] = $tag; } } unset($new_tags); if (sizeof($tags) > 0) { foreach ($tags as $tag) { $data = ''; switch ($tag) { case 'content': $data = $this->replace_user_action(); break; case 'templated_search_form': require_once $config['basepath'] . '/include/search.inc.php'; $search = new search_page(); $data = $search->create_searchpage('no', true); break; case 'baseurl': $data = $config['baseurl']; break; case 'template_url': $data = $config['template_url']; break; case 'addthis_button': global $jscript_last; $jscript_last .= "\r\n" . '<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js"></script>'; $data = '<a href="http://www.addthis.com/bookmark.php?v=250" class="addthis_button"><img src="http://s7.addthis.com/static/btn/v2/lg-share-en.gif" width="125" height="16" border="0" alt="Share" /></a>'; break; case 'load_js': $data = $this->load_js(); break; case 'load_js_last': global $jscript_last; $data = $jscript_last; break; case 'tabbed_js': global $jscript; $jscript .= '<script type="text/javascript" src="' . $config['baseurl'] . '/tabpane.js"></script>' . "\r\n"; $data = ''; break; case 'license_tag': $data = "<!--Open-Realty is distributed by Transparent Technologies and is Licensed under the Open-Realty License. See http://www.open-realty.org/license_info.html for more information.-->"; break; case 'main_listing_data': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->getMainListingData($_GET['listingID']); break; case 'featured_listings_vertical': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->renderFeaturedListingsVertical(); break; case 'featured_listings_horizontal': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->renderFeaturedListingsHorizontal(); break; case 'featured_listings_horizontal_latest': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->renderLatestFeaturedListingsHorizontal(); break; case 'random_listings_vertical': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->renderFeaturedListingsVertical(0, true); break; case 'random_listings_horizontal': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); //$data = $listing->renderFeaturedListingsHorizontal(0, true); $data = $listing->renderRandomListingsHorizontal(); break; case 'latest_listings_vertical': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->renderFeaturedListingsVertical(0, false, '', true); break; case 'latest_listings_horizontal': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->renderFeaturedListingsHorizontal(0, false, '', true); break; case preg_match("/^featured_listings_horizontal_class_([0-9]*)/", $tag, $feat_class) ? $tag : !$tag: require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->renderFeaturedListingsHorizontal(0, FALSE, $feat_class[1]); break; case preg_match("/^featured_listings_vertical_class_([0-9]*)/", $tag, $feat_class) ? $tag : !$tag: require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->renderFeaturedListingsVertical(0, FALSE, $feat_class[1]); break; case preg_match("/^random_listings_horizontal_class_([0-9]*)/", $tag, $feat_class) ? $tag : !$tag: require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->renderFeaturedListingsHorizontal(0, TRUE, $feat_class[1]); break; case preg_match("/^random_listings_vertical_class_([0-9]*)/", $tag, $feat_class) ? $tag : !$tag: require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->renderFeaturedListingsVertical(0, TRUE, $feat_class[1]); break; case preg_match("/^latest_listings_horizontal_class_([0-9]*)/", $tag, $feat_class) ? $tag : !$tag: require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->renderFeaturedListingsHorizontal(0, false, $feat_class[1], true); break; case preg_match("/^latest_listings_vertical_class_([0-9]*)/", $tag, $feat_class) ? $tag : !$tag: require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->renderFeaturedListingsVertical(0, false, $feat_class[1], true); break; case 'headline': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->renderTemplateAreaNoCaption('headline', $_GET['listingID']); break; case 'full_description': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->renderTemplateAreaNoCaption('center', $_GET['listingID']); break; case 'listing_images': require_once $config['basepath'] . '/include/images.inc.php'; $images = new image_handler(); $data = $images->renderListingsImages($_GET['listingID'], 'yes'); break; case 'listing_images_nocaption': require_once $config['basepath'] . '/include/images.inc.php'; $images = new image_handler(); $data = $images->renderListingsImages($_GET['listingID'], 'no'); break; case 'listing_files_select': require_once $config['basepath'] . '/include/files.inc.php'; $files = new file_handler(); $data = $files->render_files_select($_GET['listingID'], 'listing'); break; case 'files_listing_vertical': require_once $config['basepath'] . '/include/files.inc.php'; $files = new file_handler(); $data = $files->render_templated_files($_GET['listingID'], 'listing', 'vertical'); break; case 'files_listing_horizontal': require_once $config['basepath'] . '/include/files.inc.php'; $files = new file_handler(); $data = $files->render_templated_files($_GET['listingID'], 'listing', 'horizontal'); break; case 'slideshow_images': require_once $config['basepath'] . '/include/images.inc.php'; $images = new image_handler(); $data = $images->renderListingsMainImageSlideShow($_GET['listingID']); break; case 'link_calc': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->create_calc_link(); break; case 'link_calc_url': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->create_calc_link($url_only = 'yes'); break; case 'link_add_favorites': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->create_add_favorite_link(); break; case 'link_add_favorites_url': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->create_add_favorite_link($url_only = 'yes'); break; case 'link_printer_friendly': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->create_printer_friendly_link(); break; case 'link_email_friend': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->create_email_friend_link(); break; case 'link_map': require_once $config['basepath'] . '/include/maps.inc.php'; $maps = new maps(); $data = $maps->create_map_link(); break; case 'link_yahoo_school': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->create_yahoo_school_link(); break; case 'link_yahoo_neighborhood': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->create_yahoo_neighborhood_link(); break; case 'link_printer_friendly_url': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->create_printer_friendly_link($url_only = 'yes'); break; case 'link_email_friend_url': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->create_email_friend_link($url_only = 'yes'); break; case 'link_map_url': require_once $config['basepath'] . '/include/maps.inc.php'; $maps = new maps(); $data = $maps->create_map_link($url_only = 'yes'); break; case 'link_yahoo_school_url': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->create_yahoo_school_link($url_only = 'yes'); break; case 'link_yahoo_neighborhood_url': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->create_yahoo_neighborhood_link($url_only = 'yes'); break; case 'contact_agent_link_url': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->contact_agent_link($url_only = 'yes'); break; case 'agent_info': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->renderUserInfoOnListingsPage($_GET['listingID']); break; case 'listing_email': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->getListingEmail($_GET['listingID']); break; case 'hitcount': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->hitcount($_GET['listingID']); break; case 'main_image': require_once $config['basepath'] . '/include/images.inc.php'; $images = new image_handler(); $data = $images->renderListingsMainImage($_GET['listingID'], 'yes', 'no'); break; case 'main_image_nodesc': require_once $config['basepath'] . '/include/images.inc.php'; $images = new image_handler(); $data = $images->renderListingsMainImage($_GET['listingID'], 'no', 'no'); break; case 'main_image_java': require_once $config['basepath'] . '/include/images.inc.php'; $images = new image_handler(); $data = $images->renderListingsMainImage($_GET['listingID'], 'yes', 'yes'); break; case 'main_image_java_nodesc': require_once $config['basepath'] . '/include/images.inc.php'; $images = new image_handler(); $data = $images->renderListingsMainImage($_GET['listingID'], 'no', 'yes'); break; case 'listing_images_java': require_once $config['basepath'] . '/include/images.inc.php'; $images = new image_handler(); $data = $images->renderListingsImagesJava($_GET['listingID'], 'no'); break; case 'listing_images_java_caption': require_once $config['basepath'] . '/include/images.inc.php'; $images = new image_handler(); $data = $images->renderListingsImagesJava($_GET['listingID'], 'yes'); break; case 'listing_images_java_rows': require_once $config['basepath'] . '/include/images.inc.php'; $images = new image_handler(); $data = $images->renderListingsImagesJavaRows($_GET['listingID']); break; case 'listing_images_mouseover_java': require_once $config['basepath'] . '/include/images.inc.php'; $images = new image_handler(); $data = $images->renderListingsImagesJava($_GET['listingID'], 'no', 'yes'); break; case 'listing_images_mouseover_java_caption': require_once $config['basepath'] . '/include/images.inc.php'; $images = new image_handler(); $data = $images->renderListingsImagesJava($_GET['listingID'], 'yes', 'yes'); break; case 'listing_images_mouseover_java_rows': require_once $config['basepath'] . '/include/images.inc.php'; $images = new image_handler(); $data = $images->renderListingsImagesJavaRows($_GET['listingID'], 'yes'); break; case 'vtour_button': require_once $config['basepath'] . '/include/vtour.inc.php'; $vtour = new vtours(); $data = $vtour->rendervtourlink($_GET['listingID']); break; case 'listingid': $data = $_GET['listingID']; break; case 'get_creation_date': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->get_creation_date($_GET['listingID']); break; case 'get_featured_raw': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->get_featured($_GET['listingID'], 'yes'); break; case 'get_featured': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->get_featured($_GET['listingID'], 'no'); break; case 'get_modified_date': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->get_modified_date($_GET['listingID']); break; case 'contact_agent_link': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->contact_agent_link(); break; case 'select_language': // require_once($config['basepath'] . '/include/multilingual.inc.php'); // $multilingual = new multilingual(); // $data = $multilingual->multilingual_select(); break; case 'company_name': $data = $config['company_name']; break; case 'company_location': $data = $config['company_location']; break; case 'company_logo': $data = $config['company_logo']; break; case 'show_vtour': if (isset($_GET['listingID'])) { require_once $config['basepath'] . '/include/vtour.inc.php'; $vtour = new vtours(); $data = $vtour->show_vtour($_GET['listingID'], false); } else { $data = 'No Listing ID'; } break; case 'charset': $data = $config['charset']; break; case 'link_edit_listing': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->edit_listing_link(); break; case 'link_edit_listing_url': require_once $config['basepath'] . '/include/listing.inc.php'; $listing = new listing_pages(); $data = $listing->edit_listing_link('yes'); break; case 'template_select': $data = $this->template_selector(); break; case 'money_sign': $data = $config['money_sign']; break; case 'horizontal_header_banner': if (@(include getenv('DOCUMENT_ROOT') . '/advertising/phpadsnew.inc.php')) { if (!isset($phpAds_context)) { $phpAds_context = array(); } $phpAds_raw = view_raw('zone:1', 0, '_self', '', '0', $phpAds_context); $data = $phpAds_raw['html']; } else { $data = '<img src="/images/bannerd.png">'; } break; default: if (preg_match("/^addon_(.*?)_.*/", $tag, $addon_name)) { $file = $config['basepath'] . '/addons/' . $addon_name[1] . '/addon.inc.php'; if (file_exists($file)) { include_once $file; $function_name = $addon_name[1] . '_run_template_user_fields'; $data = $function_name($tag); } else { $data = ''; } } else { $data = ''; } break; } $this->page = str_replace('{' . $tag . '}', $data, $this->page); } } unset($tags); unset($tag); }
function getAdHtml($adId) { if (!$adId) { return ''; } require_once $this->installPath . '/phpadsnew.inc.php'; if (!isset($phpAds_context)) { $phpAds_context = array(); } $result = view_raw("zone:{$adId}", 0, '', '', '0', $phpAds_context); return $result['html']; }
} if (!isset($rewrite)) { $rewrite = 1; } if (!isset($n)) { $n = 'default'; } // Remove referer, to be sure it doesn't cause problems with limitations if (isset($_SERVER['HTTP_REFERER'])) { unset($_SERVER['HTTP_REFERER']); } if (isset($HTTP_REFERER)) { unset($HTTP_REFERER); } // Get the banner $banner = view_raw($what, $clientid, $target, $source, $withtext, $context); if (!is_array($banner)) { // No banner returned, set some default values and prevent resizing $banner = array('html' => '', 'alt' => ''); unset($resize); } // Rewrite targets in HTML code to make sure they are // local to the parent and not local to the iframe if (isset($rewrite) && $rewrite == 1) { $banner['html'] = preg_replace('#target\\s*=\\s*([\'"])_parent\\1#i', "target='_top'", $banner['html']); $banner['html'] = preg_replace('#target\\s*=\\s*([\'"])_self\\1#i', "target='_parent'", $banner['html']); } // Cookie tracking if (strlen($n)) { if (preg_match('/<script.*?src=".*?googlesyndication\\.com/is', $banner['html'])) { // Track Google Adsense using a cookie
$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"; }
$tpl->loadTemplateFile($_tplset . '/' . $cfg['template']['base']); $tpl->setCallbackFunction('tr', 'tpl_translate'); $tpl->performCallback(); /* * Opens database connection */ $db_con = DB::connect($cfg['database']['dsn']); //$db_con->setErrorHandling(PEAR_ERROR_CALLBACK, "DBcatchError"); if (DB::isError($db_con)) { die($db_con->getMessage()); } $db_con->setFetchMode(DB_FETCHMODE_OBJECT); $menu = new mms_template_menu(); //$th=new treehelper; if (BANNER_ADS) { $banner_array = view_raw("468x60"); $content["BANNER"] = $banner_array["html"]; } //$content["MENU_ROWS"] = $menu->get("rows"); class HTML_menu_browser_topnav extends HTML_menu_browser { function HTML_menu_browser_topnav($DSN = '', $table = '', $query = "") { $this->HTML_Menu_browser($DSN, $table, $query); } function makeURL($eintrag) { $url = $eintrag['url']; return $url; } }
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); }
/** Initializes the adserver Module */ function initAdvertising() { include_once "phpAdsNew/phpadsnew.inc.php"; $banner_array = view_raw("468x60"); $content["BANNER"] = $banner_array["html"]; }
function Header_BeforeShow() { //Header_BeforeShow @1-86E61FAE //Set Tag @2-4EE7CEED global $ItechclVersion; global $DBNetConnect; global $Tpl; global $now; global $accounting; global $charges; global $regcharges; global $images; global $design; global $PP; global $EP; global $size; $admingroup = 0; $admingroup = test_admin_group(); if ($size == "") { $size = "95"; } $Tpl->SetVar("ItechclVersion", $ItechclVersion); $Tpl->SetVar("size", $size); $Tpl->SetVar("sitename", $now["sitename"]); $Tpl->SetVar("siteemail", $now["siteemail"]); $Tpl->SetVar("homeurl", $now["homeurl"]); $Tpl->SetVar("secureurl", $now["secureurl"]); $Tpl->SetVar("notifyemail", $now["notifyemail"]); $Tpl->SetVar("paypal", $accounting["paypal"]); $Tpl->SetVar("listing_fee", $regcharges["listing_fee"]); $Tpl->SetVar("homepage_fee", $regcharges["home_fee"]); $Tpl->SetVar("category_fee", $regcharges["cat_fee"]); $Tpl->SetVar("gallery_fee", $regcharges["gallery_fee"]); $Tpl->SetVar("image_preview_fee", $regcharges["image_pre_fee"]); $Tpl->SetVar("slide_fee", $regcharges["slide_fee"]); $Tpl->SetVar("counter_fee", $regcharges["counter_fee"]); $Tpl->SetVar("bold_fee", $regcharges["bold_fee"]); $Tpl->SetVar("highlight_fee", $regcharges["high_fee"]); $Tpl->SetVar("upload_fee", $regcharges["upload_fee"]); $Tpl->SetVar("make_offer_image", $images["make_offer_image"]); $Tpl->SetVar("currency", $regcharges["currency"]); $Tpl->SetVar("currencycode", $regcharges["currencycode"]); $sql = "SELECT sum(charge) FROM charges WHERE user_id ='" . CCGetUserID() . "'"; $db = new clsDBNetConnect(); $db->query($sql); $usertotal = 0.0; if ($db->next_record()) { $usertotal = $db->f("sum(charge)"); } unset($db); unset($SQL); $Tpl->SetVar("BalanceTotal", CCFormatNumber($usertotal, array(False, 2, ".", "", False, "", "", 1, True, ""))); if (CCGetSession("UserLogin")) { $UserName = CCGetSession("UserLogin"); } else { $UserName = "******"; } $Tpl->SetVar("UserName", $UserName); if (CCGetSession("UserLogin")) { $UserNameMenu = "<a href=\"myaccount.php\" class=\"nl\">" . CCGetSession("UserLogin") . "</a>, <a href=\"login.php?Logout=True\"><font color=#0000FF>Logout</font></a>"; } else { $UserNameMenu = "Guest"; } $db = new clsDBNetConnect(); @$db->query("show tables like \"phpads_zones\""); if ($db->next_record()) { $db->query("select zoneid from phpads_zones"); if (file_exists("phpads/phpadsnew.inc.php")) { while ($db->next_record()) { include 'phpads/phpadsnew.inc.php'; if (!isset($phpAds_context)) { $phpAds_context = array(); } $phpAds_raw = view_raw('zone:' . $db->f("zoneid"), 0, '', '', '0', $phpAds_context); $Tpl->SetVar("bannerzone" . $db->f("zoneid"), $phpAds_raw['html']); } } } if ($admingroup) { $Tpl->SetVar("adminmode", "<tr><td align=\"center\"><font color=\"red\"><b>Warning: You are currently logged in as a 'FrontEnd Admin', many elements on the pages my not line up or display properly.<br> Also, any changes made to the site in this mode are non-reversable.</b></font></td></tr>"); } $Tpl->SetVar("UserNameMenu", $UserNameMenu); $Tpl->SetVar("pagebody", $design["pagebody"]); $Tpl->SetVar("formtable", $design["formtable"]); $Tpl->SetVar("formheaderfont", $design["formheaderfont"]); $Tpl->SetVar("fieldcationfont", $design["fieldcaptiontd"]); $Tpl->SetVar("datatd", $design["datatd"]); $Tpl->SetVar("recordseparatortd", $design["recordseparatortd"]); $Tpl->SetVar("datafont", $design["datafont"]); $Tpl->SetVar("columnfont", $design["columnfont"]); $Tpl->SetVar("columntd", $design["columntd"]); $Tpl->SetVar("try2", "8"); //End Set Tag }
function view($what, $clientid = 0, $campaignid = 0, $target = '', $source = '', $withtext = 0, $context = 0, $richmedia = true) { $output = view_raw($what, $clientid, $campaignid, "{$target}", "{$source}", $withtext, $context, $richmedia); print $output['html']; return $output['bannerid']; }