if (@$_GET['PDebug'] != 'Y') { @header('Content-Type: application/x-javascript'); } try { $REQUEST = array_merge($_GET, $_POST); $settings = new Lib_SettingFile(); $settings->load(); if($settings->get('bannedips_clicks_from_iframe') == 'Y' && @$_GET['isInIframe'] == 'true') { return; } $params = new Lib_VisitParams(); $params->setUrl(@$_GET['url']); $params->setReferrerUrl(@$_GET['referrer']); $params->setTrackMethod(@$_GET['tracking']); $params->setGet(@$_GET['getParams']); $params->setAnchor(@$_GET['anchor']); $sale = @$REQUEST['sale']; if (get_magic_quotes_gpc()) { $sale = stripslashes($sale); } $params->setSale($sale); $params->setCookies(Lib_VisitorCookie::readOldCookies(@$_GET['cookies'])); $params->setIp(@$_GET['ip'] != '' ? $_GET['ip'] : Lib_Server::getRemoteIp()); $params->setUserAgent(@$_GET['useragent'] != '' ? $_GET['useragent'] : @$_SERVER['HTTP_USER_AGENT']); $params->setVisitorId(@$_GET['visitorId']); $params->setAccountId(@$_GET['accountId']); Lib_VisitorCookie::readVisitorIdAndAccountId($params, $settings);
protected function setVisitorParams($visitorId, $accountId = '', $isTrackingMethodSet = false) { $this->visitParams->setVisitorId($visitorId); $this->visitParams->setAccountid($accountId); if (!$isTrackingMethodSet) { $this->visitParams->setTrackMethod($this->getTrackingMethod()); } }
$clickFieldsValues = array(); $clickFieldsValues['chan'] = @$_GET['chan']; $clickFieldsValues['extra_data1'] = @$_GET[$settings->get('param_name_extra_data1')]; $clickFieldsValues['extra_data2'] = @$_GET[$settings->get('param_name_extra_data2')]; $destUrl = $banner->replaceClickConstants($destUrl, $clickFieldsValues); @header('Location: ' . $destUrl, true, 301); $getParams = '?'; foreach ($_GET as $name => $value) { $getParams .= $name.'='.urlencode($value).'&'; } $params = new Lib_VisitParams(); $params->setReferrerUrl(Lib_Server::getReferer()); $params->setTrackMethod('N'); $params->setGet(rtrim($getParams, '&?')); $params->setCookies(Lib_VisitorCookie::readOldCookies()); $params->setIp(Lib_Server::getRemoteIp()); $params->setUserAgent(Lib_Server::getUserAgent()); $params->setAccountid(@$_GET['accountId']); $params->setVisitorId(@$_GET['visitorId']); Lib_VisitorCookie::readVisitorIdAndAccountId($params, $settings, false); if ($settings->isOfflineVisitProcessing()) { $settings->saveVisit($params, $settings->get('visitsTableInput')); return; }