コード例 #1
0
ファイル: imp.php プロジェクト: AmineCherrai/rostanvo
 *   with the License. You may obtain a copy of the License at
 *   http://www.qualityunit.com/licenses/license
 *
 */

require_once('lib/fast_init.php');

function output($bannerId) {
	@setcookie('PAPCookie_Imp_'.$bannerId, 'pap', time() + 315569260);
	if (@$_GET['PDebug'] != 'Y') {
	   @header('Content-Type: image/gif', true, null);
	   readfile('pix.gif');
	}
}

$settings = new Lib_SettingFile();
$settings->load();

$bannerId = @$_GET[$settings->get(Lib_SettingFile::PARAM_NAME_BANNER_ID)];

$params = new Lib_ImpParams();
$params->setDate(date('Y-m-d H:i:s'));
$params->setRtype(@$_COOKIE['PAPCookie_Imp_'.$bannerId] == '' ? 'U' : 'R');
$params->setUserid(@$_GET[$settings->get(Lib_SettingFile::PARAM_NAME_USER_ID)]);
$params->setBannerid($bannerId);
$params->setParentbannerid(@$_GET[$settings->get(Lib_SettingFile::PARAM_NAME_ROTATOR_ID)]);
$params->setChannel(@$_GET['chan']);
$params->setIp(Lib_Server::getRemoteIp());
$params->setData1(@$_GET[$settings->get('param_name_extra_data1')]);
$params->setData2(@$_GET[$settings->get('param_name_extra_data2')]);
コード例 #2
0
 /**
  * @return Lib_CachedBanners
  */
 protected function getBannersFromCache() {
     return new Lib_CachedBanners($this->settings->getDb(), $this->bannerParams);
 }
コード例 #3
0
ファイル: tracking.php プロジェクト: AmineCherrai/rostanvo
    public function sendHeaders(Lib_SettingFile $settings) {
        $p3pPolicy = $settings->get(self::URL_TO_P3P);
        $compactPolicy = $settings->get(self::P3P_POLICY_COMPACT);

        if ($p3pPolicy == '' && $compactPolicy == '') {
            return;
        }

        $p3pHeader = ($p3pPolicy == '' ? '' : 'policyref="'.$p3pPolicy.'"').
        ($compactPolicy != '' && $p3pPolicy != '' ? ', ' : '').($compactPolicy == '' ? '' : 'CP="'.$compactPolicy.'"');

        $this->sendP3PHeader($p3pHeader);
    }
コード例 #4
0
ファイル: fast_init.php プロジェクト: AmineCherrai/rostanvo
 protected function initDatabase() {
     if (function_exists('mysql_pconnect') && strstr(ini_get("disable_functions"), 'mysql_pconnect') === false) {
         $name = 'mysql_pconnect';
     } else {
         $name = 'mysql_connect';
     }
     $this->db = @call_user_func($name, $this->settings->get('DB_HOSTNAME'), $this->settings->get('DB_USERNAME'), $this->settings->get('DB_PASSWORD'));
      
     @mysql_select_db($this->settings->get('DB_DATABASE'), $this->db);
 }
コード例 #5
0
ファイル: track.php プロジェクト: AmineCherrai/rostanvo
<?php
require_once 'lib/fast_init.php';
require_once 'lib/tracking.php';
@include_once('custom.php');

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']);
コード例 #6
0
ファイル: banner.php プロジェクト: AmineCherrai/rostanvo
<?php
require_once 'lib/fast_init.php';
require_once 'lib/banner_viewer.php';

$settings = new Lib_SettingFile();
$settings->load();

$bannerViewer = new Lib_BannerViewer($settings);

if ($bannerViewer->displayBanner()) {
    exit;
}

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

Gpf_Session::create(new Pap_Tracking_ModuleBase(), null, false);
$bannerViewerNormal = new Pap_Tracking_BannerViewer();

$cachedBanner = new Pap_Db_CachedBanner();
foreach ($bannerViewer->getBannerParams() as $key => $value) {
    $cachedBanner->set($key, $value);
}
$bannerViewerNormal->show($cachedBanner);

?>
コード例 #7
0
ファイル: click.php プロジェクト: AmineCherrai/rostanvo
<?php
require_once 'lib/fast_init.php';
require_once 'lib/tracking.php';

$settings = new Lib_SettingFile();
$settings->load();

$destUrl = @$_GET[$settings->get('param_name_dest_url')];

if ($destUrl == '') {
    $bannerId = @$_GET[$settings->get('param_name_banner_id')];
    $db = $settings->getDb();
    if($bannerId != '') {
        $result = $db->query("SELECT destinationurl FROM qu_pap_banners WHERE bannerid='".$db->escape($bannerId)."'");
        if ($result) {
            if ($row = mysql_fetch_assoc($result)) {
                $destUrl = $row['destinationurl'];
            }
        }
    }
}
if ($destUrl == '') {
    $result = $db->query('SELECT value FROM qu_g_settings WHERE name="mainSiteUrl"');
    if ($result) {
        if ($row = mysql_fetch_assoc($result)) {
            $destUrl = $row['value'];
        }
    }
}

require_once 'bootstrap.php';
コード例 #8
0
ファイル: sb.php プロジェクト: AmineCherrai/rostanvo
/**
 *   @copyright Copyright (c) 2007 Quality Unit s.r.o.
 *   @author Michal Bebjak, Maros Galik
 *   @package PostAffiliatePro
 *   @since Version 1.0.0
 *
 *   Licensed under the Quality Unit, s.r.o. Standard End User License Agreement,
 *   Version 1.0 (the "License"); you may not use this file except in compliance
 *   with the License. You may obtain a copy of the License at
 *   http://www.qualityunit.com/licenses/license
 *
 */

include('lib/fast_init.php');

$settings = new Lib_SettingFile();
$settings->load();

$bannerId = @$_GET[$settings->get('param_name_banner_id')];

$impParams = array(
'date' => date('Y-m-d H:i:s'),
'rtype' => (@$_COOKIE['PAPCookie_Imp_'.$bannerId] == '' ? 'U' : 'R'),
'userid' => @$_GET[$settings->get('param_name_user_id')],
'bannerid' => $bannerId,
'channel' => @$_GET['chan'],
'data1' => @$_GET[$settings->get('param_name_extra_data1')],
'data2' => @$_GET[$settings->get('param_name_extra_data2')],
);

require_once 'bootstrap.php';