Ejemplo n.º 1
0
}

require_once 'bootstrap.php';
@include_once('../include/Compiled/Core.php');

Gpf_Session::create(new Pap_Tracking_ModuleBase(), null, false);

$banner = new Pap_Common_Banner();
$user = new Pap_Affiliates_User();
$userId = @$_GET[$settings->get('param_name_user_id')];

try {
    $user = $user->loadFromId($userId);
    $destUrl = $banner->replaceUserConstants($destUrl, $user, 'Y');
} catch (Gpf_Exception $e) {
    $destUrl = $banner->removeUserConstants($destUrl, 'Y');
}
$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();