/**
  * @param OA_Admin_Menu_Section $oSection
  */
 public function check($oSection)
 {
     // this checker is called 6 times, not sure why, but we cache the lookup in a static variable
     static $cache = array();
     if (isset($cache[$oSection->getId()])) {
         return $cache[$oSection->getId()];
     }
     $enabled = false;
     require_once MAX_PATH . '/www/admin/plugins/videoReport/stats-api.php';
     $vast = new OX_Video_Report();
     phpAds_registerGlobal('clientid', 'campaignid', 'bannerid', 'zoneid');
     global $clientid, $campaignid, $bannerid, $zoneid, $affiliateid;
     //        echo "<pre>";debug_print_backtrace();
     switch ($oSection->getId()) {
         case 'stats-vast-advertiser':
             $enabled = $vast->doesAdvertiserHaveVast((int) $clientid);
             break;
         case 'stats-vast-campaign':
             $enabled = $vast->doesCampaignHaveVast((int) $campaignid);
             break;
         case 'stats-vast-banner':
             $enabled = $vast->doesBannerHaveVast((int) $bannerid);
             break;
         case 'stats-vast-zone':
             $enabled = $vast->isZoneVast((int) $zoneid);
             break;
         case 'stats-vast-website':
             $enabled = $vast->doesWebsiteHaveVast((int) $affiliateid);
             break;
         case 'players-vast':
             return true;
             break;
         case 'zone-invocation':
             if (!empty($zoneid) && $vast->isZoneVast((int) $zoneid)) {
                 $oSection->setNameKey('Video Invocation Code');
                 $oSection->setLink('plugins/videoReport/zone-invocation-code.php?zoneid=' . (int) $zoneid . '&affiliateid=' . (int) $affiliateid);
             }
             $enabled = true;
             break;
     }
     $cache[$oSection->getId()] = $enabled;
     return $enabled;
 }
 public function check($oSection)
 {
     phpAds_registerGlobal('clientid', 'campaignid');
     global $clientid, $campaignid;
     $sectionId = $oSection->getId();
     static $cache = array();
     $oMarkedTextAdvertiserComponent = OX_Component::factory('admin', 'oxMarkedTextAdvertiser');
     $oEntityHelper = $oMarkedTextAdvertiserComponent->getEntityHelper();
     $enabled = true;
     switch ($sectionId) {
         case 'advertiser-edit':
         case 'advertiser-trackers':
         case 'advertiser-access':
         case 'campaign-edit_new':
         case 'campaign-edit':
         case 'campaign-trackers':
         case 'campaign-banners':
             if (isset($cache[$clientid])) {
                 return $cache[$clientid];
             }
             break;
         case 'banner-edit':
             if (isset($cache[$clientid])) {
                 return $cache[$clientid];
             }
             break;
         case 'banner-acl':
         case 'banner-zone':
         case 'banner-advanced':
         case 'campaign-zone':
     }
     $sessionClientId = $this->getSessionClientId();
     if (isset($sessionClientId)) {
         $this->clearMarketEntitiesInSession();
     }
     return $enabled;
 }
/*                                                                      */
/* Copyright (c) 2000-2007 by the Openads developers                    */
/* For more information visit: http://www.openads.org                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
// Prevent full path disclosure
if (!defined('phpAds_path')) {
    die;
}
// Define constant used to place code generator
define('phpAds_adLayerLoaded', true);
// Register input variables
phpAds_registerGlobal('ltr', 'loop', 'speed', 'pause', 'shiftv', 'transparent', 'backcolor', 'limited', 'lmargin', 'rmargin');
/*********************************************************/
/* Place ad-generator settings                           */
/*********************************************************/
function phpAds_placeLayerSettings()
{
    global $ltr, $loop, $speed, $pause, $shiftv, $transparent, $backcolor;
    global $limited, $lmargin, $rmargin;
    global $tabindex;
    if (!isset($ltr)) {
        $ltr = 't';
    }
    if (!isset($loop)) {
        $loop = 'n';
    }
    if (!isset($speed)) {
/************************************************************************/
/* Openads 2.0                                                          */
/* ===========                                                          */
/*                                                                      */
/* Copyright (c) 2000-2007 by the Openads developers                    */
/* For more information visit: http://www.openads.org                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
// Include required files
require "config.php";
require "lib-statistics.inc.php";
// Register input variables
phpAds_registerGlobal('all');
// Security check
phpAds_checkAccess(phpAds_Admin);
/*********************************************************/
/* Main code                                             */
/*********************************************************/
// Banner
if (isset($bannerid) && $bannerid != '') {
    // Delete stats for this banner
    phpAds_deleteStats($bannerid);
    // Return to campaign statistics
    Header("Location: stats-campaign-banners.php?clientid=" . $clientid . "&campaignid=" . $campaignid);
} elseif (isset($campaignid) && $campaignid != '') {
    // Get all banners for this client
    $idresult = phpAds_dbQuery(" SELECT\n\t\t\t\t\t\t\t\tbannerid\n\t\t\t\t\t\t\t  FROM\n\t\t\t\t\t\t\t  \t" . $phpAds_config['tbl_banners'] . "\n\t\t\t\t\t\t\t  WHERE\n\t\t\t\t\t\t\t\tclientid = '{$campaignid}'\n\t\t  \t\t\t\t ");
    // Loop to all banners for this client
| Revive Adserver                                                           |
| http://www.revive-adserver.com                                            |
|                                                                           |
| Copyright: See the COPYRIGHT.txt file.                                    |
| License: GPLv2 or later, see the LICENSE.txt file.                        |
+---------------------------------------------------------------------------+
*/
// Require the initialisation file
require_once '../../init.php';
// Required files
require_once MAX_PATH . '/lib/OA/Dal.php';
require_once MAX_PATH . '/www/admin/config.php';
require_once MAX_PATH . '/www/admin/lib-statistics.inc.php';
require_once MAX_PATH . '/lib/max/other/html.php';
// Register input variables
phpAds_registerGlobal('action', 'variablemethod');
// Since there may be an unknown number of variables posted (which are accessed by $_POST directly in the code below),
// clean the whole $_POST array
MAX_commonRemoveSpecialChars($_POST);
/*-------------------------------------------------------*/
/* Affiliate interface security                          */
/*-------------------------------------------------------*/
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER);
OA_Permission::enforceAccessToObject('clients', $clientid);
OA_Permission::enforceAccessToObject('trackers', $trackerid);
/*-------------------------------------------------------*/
/* Store preferences									 */
/*-------------------------------------------------------*/
$session['prefs']['inventory_entities'][OA_Permission::getEntityId()]['clientid'] = $clientid;
phpAds_SessionDataStore();
/*-------------------------------------------------------*/
| License: GPLv2 or later, see the LICENSE.txt file.                        |
+---------------------------------------------------------------------------+
*/
// Require the initialisation file
require_once '../../init.php';
// Required files
require_once MAX_PATH . '/lib/OA/Dal.php';
//require_once MAX_PATH . '/lib/max/deliverycache/cache-'.$conf['delivery']['cache'].'.inc.php';
require_once MAX_PATH . '/www/admin/config.php';
require_once MAX_PATH . '/www/admin/lib-storage.inc.php';
require_once MAX_PATH . '/www/admin/lib-zones.inc.php';
require_once MAX_PATH . '/www/admin/lib-statistics.inc.php';
require_once MAX_PATH . '/lib/OA/Maintenance/Priority.php';
require_once OX_PATH . '/lib/pear/DB/DataObject.php';
// Register input variables
phpAds_registerGlobal('returnurl', 'agencyid');
// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN);
// CVE-2013-5954 - see OA_Permission::checkSessionToken() method for details
OA_Permission::checkSessionToken();
/*-------------------------------------------------------*/
/* Main code                                             */
/*-------------------------------------------------------*/
if (!empty($agencyid)) {
    $doAgency = OA_Dal::factoryDO('agency');
    $doAgency->agencyid = $agencyid;
    $doAgency->get($agencyid);
    $doAgency->delete();
}
// Run the Maintenance Priority Engine process
OA_Maintenance_Priority::scheduleRun();
/* Openads 2.0                                                          */
/* ===========                                                          */
/*                                                                      */
/* Copyright (c) 2000-2007 by the Openads developers                    */
/* For more information visit: http://www.openads.org                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
// Include required files
require "config.php";
require "lib-storage.inc.php";
require "lib-statistics.inc.php";
// Register input variables
phpAds_registerGlobal('returnurl', 'moveto', 'duplicate');
// Security check
phpAds_checkAccess(phpAds_Admin);
/*********************************************************/
/* Main code                                             */
/*********************************************************/
if (isset($zoneid) && $zoneid != '') {
    if (isset($moveto) && $moveto != '') {
        // Move the zone
        $res = phpAds_dbQuery("UPDATE " . $phpAds_config['tbl_zones'] . " SET affiliateid = '" . $moveto . "' WHERE zoneid = '" . $zoneid . "'") or phpAds_sqlDie();
        // Prevent HTTP response splitting
        if (!preg_match('/[\\r\\n]/', $returnurl)) {
            $url = stripslashes($returnurl);
            header("Location: " . $returnurl . "?affiliateid=" . $moveto . "&zoneid=" . $zoneid);
            exit;
        }
/* Openads 2.0                                                          */
/* ===========                                                          */
/*                                                                      */
/* Copyright (c) 2000-2007 by the Openads developers                    */
/* For more information visit: http://www.openads.org                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
// Include required files
require "config.php";
require "lib-statistics.inc.php";
require "lib-expiration.inc.php";
// Register input variables
phpAds_registerGlobal('period', 'start', 'limit', 'source');
// Security check
phpAds_checkAccess(phpAds_Admin + phpAds_Affiliate);
/*********************************************************/
/* Affiliate interface security                          */
/*********************************************************/
if (phpAds_isUser(phpAds_Affiliate)) {
    if (isset($zoneid) && $zoneid > 0) {
        $result = phpAds_dbQuery("\n\t\t\tSELECT\n\t\t\t\taffiliateid\n\t\t\tFROM\n\t\t\t\t" . $phpAds_config['tbl_zones'] . "\n\t\t\tWHERE\n\t\t\t\tzoneid = '{$zoneid}'\n\t\t\t") or phpAds_sqlDie();
        $row = phpAds_dbFetchArray($result);
        if ($row["affiliateid"] == '' || phpAds_getUserID() != $row["affiliateid"]) {
            phpAds_PageHeader("1");
            phpAds_Die($strAccessDenied, $strNotAdmin);
        } else {
            $affiliateid = phpAds_getUserID();
        }
| Copyright: See the COPYRIGHT.txt file.                                    |
| License: GPLv2 or later, see the LICENSE.txt file.                        |
+---------------------------------------------------------------------------+
*/
// Require the initialisation file
require_once '../../init.php';
// Required files
require_once MAX_PATH . '/www/admin/lib-maintenance-priority.inc.php';
require_once MAX_PATH . '/lib/OA/Dal.php';
require_once MAX_PATH . '/lib/OA/Dll.php';
require_once MAX_PATH . '/www/admin/config.php';
require_once MAX_PATH . '/www/admin/lib-statistics.inc.php';
require_once MAX_PATH . '/lib/max/other/html.php';
require_once MAX_PATH . '/lib/OX/Translation.php';
// Register input variables
phpAds_registerGlobal('hideinactive', 'listorder', 'orderdirection');
// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_ADVERTISER);
if (!empty($clientid) && !OA_Permission::hasAccessToObject('clients', $clientid)) {
    //check if can see given advertiser
    $page = basename($_SERVER['SCRIPT_NAME']);
    OX_Admin_Redirect::redirect($page);
}
if (!empty($campaignid) && !OA_Permission::hasAccessToObject('campaigns', $campaignid)) {
    $page = basename($_SERVER['SCRIPT_NAME']);
    OX_Admin_Redirect::redirect("{$page}?clientid={$clientid}");
}
/*-------------------------------------------------------*/
/* Init data                                             */
/*-------------------------------------------------------*/
//get advertisers and set the current one
/* phpAdsNew 2                                                          */
/* ===========                                                          */
/*                                                                      */
/* Copyright (c) 2000-2002 by the phpAdsNew developers                  */
/* For more information visit: http://www.phpadsnew.com                 */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
// Include required files
require "config.php";
require "lib-statistics.inc.php";
require "lib-data-statistics.inc.php";
// Register input variables
phpAds_registerGlobal('limit', 'period', 'start', 'hideinactive', 'listorder', 'orderdirection');
// Security check
phpAds_checkAccess(phpAds_Admin + phpAds_Agency + phpAds_Client);
if (isset($Session['prefs']['stats-advertiser-history.php']['listorder']) && !isset($listorder)) {
    $listorder = $Session['prefs']['stats-advertiser-history.php']['listorder'];
}
if (isset($Session['prefs']['stats-advertiser-history.php']['orderdirection']) && !isset($orderdirection)) {
    $orderdirection = $Session['prefs']['stats-advertiser-history.php']['orderdirection'];
}
if (isset($Session['prefs']['stats-advertiser-history.php']['hide']) && !isset($hideinactive)) {
    $hideinactive = $Session['prefs']['stats-advertiser-history.php']['hide'];
}
if (isset($Session['prefs']['stats-advertiser-history.php']['limit']) && !isset($limit)) {
    $limit = $Session['prefs']['stats-advertiser-history.php']['limit'];
}
if (isset($Session['prefs']['stats-advertiser-history.php']['period']) && !isset($period)) {
示例#11
0
| You should have received a copy of the GNU General Public License         |
| along with this program; if not, write to the Free Software               |
| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA |
+---------------------------------------------------------------------------+
$Id: tracker-invocation.php 37157 2009-05-28 12:31:10Z andrew.hill $
*/
// Require the initialisation file
require_once '../../init.php';
// Required files
require_once MAX_PATH . '/lib/OA/Dal.php';
require_once MAX_PATH . '/www/admin/config.php';
require_once MAX_PATH . '/www/admin/lib-statistics.inc.php';
require_once MAX_PATH . '/lib/max/Admin/Invocation.php';
require_once MAX_PATH . '/lib/max/other/html.php';
// Register input variables
phpAds_registerGlobal('trackername', 'description', 'move', 'submit', 'invtype', 'trackerid', 'clientid');
// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER);
OA_Permission::enforceAccessToObject('clients', $clientid);
OA_Permission::enforceAccessToObject('trackers', $trackerid);
/*-------------------------------------------------------*/
/* Store preferences									 */
/*-------------------------------------------------------*/
$session['prefs']['inventory_entities'][OA_Permission::getEntityId()]['clientid'] = $clientid;
phpAds_SessionDataStore();
/*-------------------------------------------------------*/
/* Process submitted form                                */
/*-------------------------------------------------------*/
if (isset($submit)) {
    // If ID is not set, it should be a null-value for the auto_increment
    $doTrackers = OA_Dal::factoryDO('trackers');
/* ===========                                                          */
/*                                                                      */
/* Copyright (c) 2000-2007 by the Openads developers                    */
/* For more information visit: http://www.openads.org                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
// Include required files
require "config.php";
require "lib-statistics.inc.php";
require "lib-zones.inc.php";
require "../libraries/lib-priority.inc.php";
// Register input variables
phpAds_registerGlobal('value');
// Security check
phpAds_checkAccess(phpAds_Admin + phpAds_Client);
/*********************************************************/
/* Main code                                             */
/*********************************************************/
if ($value == "t") {
    $value = "f";
} else {
    $value = "t";
}
if (phpAds_isUser(phpAds_Client)) {
    if ($value == 'f' && phpAds_isAllowed(phpAds_DisableBanner) || $value == 't' && phpAds_isAllowed(phpAds_ActivateBanner)) {
        $result = phpAds_dbQuery("\n\t\t\tSELECT\n\t\t\t\tclientid\n\t\t\tFROM\n\t\t\t\t" . $phpAds_config['tbl_banners'] . "\n\t\t\tWHERE\n\t\t\t\tbannerid = '{$bannerid}'\n\t\t\t") or phpAds_sqlDie();
        $row = phpAds_dbFetchArray($result);
        if ($row["clientid"] == '' || phpAds_getUserID() != phpAds_getParentID($row["clientid"])) {
/* ===========                                                          */
/*                                                                      */
/* Copyright (c) 2000-2007 by the Openads developers                    */
/* For more information visit: http://www.openads.org                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
// Include required files
require "config.php";
require "lib-statistics.inc.php";
require "lib-size.inc.php";
require "lib-zones.inc.php";
// Register input variables
phpAds_registerGlobal('listorder', 'orderdirection');
// Security check
phpAds_checkAccess(phpAds_Admin + phpAds_Affiliate);
/*********************************************************/
/* Affiliate interface security                          */
/*********************************************************/
if (phpAds_isUser(phpAds_Affiliate)) {
    $affiliateid = phpAds_getUserID();
}
/*********************************************************/
/* Get preferences                                       */
/*********************************************************/
if (!isset($listorder)) {
    if (isset($Session['prefs']['affiliate-zones.php']['listorder'])) {
        $listorder = $Session['prefs']['affiliate-zones.php']['listorder'];
    } else {
// Figure out our location
define('phpAds_path', '.');
/*********************************************************/
/* Include required files                                */
/*********************************************************/
require phpAds_path . "/config.inc.php";
require_once phpAds_path . "/libraries/lib-io.inc.php";
require phpAds_path . "/libraries/lib-db.inc.php";
require phpAds_path . "/libraries/lib-remotehost.inc.php";
require phpAds_path . "/libraries/lib-log.inc.php";
require phpAds_path . "/libraries/lib-cache.inc.php";
require phpAds_path . "/libraries/lib-view-tracker.inc.php";
/*********************************************************/
/* Register input variables                              */
/*********************************************************/
phpAds_registerGlobal('block', 'capping', 'session_capping', 'trackerid');
/*********************************************************/
/* Main code                                             */
/*********************************************************/
// Determine the user ID
$userid = phpAds_getUniqueUserID(false);
$conversionsid = NULL;
// Send the user ID
// phpAds_setCookie("phpAds_id", $userid, time()+365*24*60*60);
if (!phpAds_isConversionBlocked($trackerid)) {
    if ($phpAds_config['log_adconversions']) {
        phpAds_dbConnect();
        $conversionid = phpAds_logConversion($userid, $trackerid);
    }
    // Handles variable retrieval from the page
    echo phpAds_buildJavascriptVariablesScript($trackerid, $conversionid);
/************************************************************************/
/* phpAdsNew 2                                                          */
/* ===========                                                          */
/*                                                                      */
/* Copyright (c) 2000-2002 by the phpAdsNew developers                  */
/* For more information visit: http://www.phpadsnew.com                 */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
// Include required files
require "config.php";
require "lib-statistics.inc.php";
// Register input variables
phpAds_registerGlobal('collapse', 'expand', 'hideinactive', 'listorder', 'orderdirection', 'period');
// Security check
phpAds_checkAccess(phpAds_Admin + phpAds_Agency);
// Set default values
if (!isset($period)) {
    $period = '';
}
$tabindex = 1;
/*********************************************************/
/* HTML framework                                        */
/*********************************************************/
if (phpAds_isUser(phpAds_Admin)) {
    $extra = "<br><br><br>";
    $extra .= "<b>{$strMaintenance}</b><br>";
    $extra .= "<img src='images/break.gif' height='1' width='160' vspace='4'><br>";
    $extra .= "<a href='stats-reset.php?all=true'" . phpAds_DelConfirm($strConfirmResetStats) . ">";
| http://www.revive-adserver.com                                            |
|                                                                           |
| Copyright: See the COPYRIGHT.txt file.                                    |
| License: GPLv2 or later, see the LICENSE.txt file.                        |
+---------------------------------------------------------------------------+
*/
// Require the initialisation file
require_once '../../init.php';
// Required files
require_once MAX_PATH . '/lib/OA/Dal.php';
require_once MAX_PATH . '/www/admin/config.php';
require_once MAX_PATH . '/www/admin/lib-storage.inc.php';
require_once MAX_PATH . '/www/admin/lib-zones.inc.php';
require_once MAX_PATH . '/www/admin/lib-statistics.inc.php';
// Register input variables
phpAds_registerGlobal('returnurl');
// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER);
OA_Permission::enforceAccessToObject('clients', $clientid);
/*-------------------------------------------------------*/
/* Main code                                             */
/*-------------------------------------------------------*/
if (!empty($trackerid)) {
    $ids = explode(',', $trackerid);
    while (list(, $trackerid) = each($ids)) {
        $doTrackers = OA_Dal::factoryDO('trackers');
        $doTrackers->trackerid = $trackerid;
        if ($doTrackers->find()) {
            // Clone the found DB_DataObject, as cannot delete() once
            // it has been fetch()ed
            $doTrackersClone = clone $doTrackers;
// $Revision: 2.4 $
/************************************************************************/
/* phpAdsNew 2                                                          */
/* ===========                                                          */
/*                                                                      */
/* Copyright (c) 2000-2002 by the phpAdsNew developers                  */
/* For more information visit: http://www.phpadsnew.com                 */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
// Include required files
include "lib-settings.inc.php";
// Register input variables
phpAds_registerGlobal('acl', 'allow_invocation_frame', 'allow_invocation_interstitial', 'allow_invocation_js', 'allow_invocation_local', 'allow_invocation_plain', 'allow_invocation_plain_nocookies', 'allow_invocation_popup', 'allow_invocation_xmlrpc', 'con_key', 'delivery_caching', 'mult_key', 'p3p_compact_policy', 'p3p_policies', 'p3p_policy_location', 'use_keywords');
// Security check
phpAds_checkAccess(phpAds_Admin + phpAds_Agency);
$errormessage = array();
$sql = array();
if (isset($HTTP_POST_VARS['submit']) && $HTTP_POST_VARS['submit'] == 'true') {
    phpAds_SettingsWriteAdd('allow_invocation_plain', isset($allow_invocation_plain));
    phpAds_SettingsWriteAdd('allow_invocation_plain_nocookies', isset($allow_invocation_plain_nocookies));
    phpAds_SettingsWriteAdd('allow_invocation_js', isset($allow_invocation_js));
    phpAds_SettingsWriteAdd('allow_invocation_frame', isset($allow_invocation_frame));
    phpAds_SettingsWriteAdd('allow_invocation_xmlrpc', isset($allow_invocation_xmlrpc));
    phpAds_SettingsWriteAdd('allow_invocation_local', isset($allow_invocation_local));
    phpAds_SettingsWriteAdd('allow_invocation_interstitial', isset($allow_invocation_interstitial));
    phpAds_SettingsWriteAdd('allow_invocation_popup', isset($allow_invocation_popup));
    if (isset($delivery_caching)) {
        phpAds_SettingsWriteAdd('delivery_caching', $delivery_caching);
/* <html>                                                               */
/*  ...                                                                 */
/*  <img src="graph-daily.php?title=foo&width=500&data=a^15^^b^20^^">   */
/*  ...                                                                 */
/* </html>                                                              */
/************************************************************************/
/* you can use as many data items as you want                           */
/* you need the GD library in your php module                           */
/* don't forget to encode you parameters (unicode)                      */
/************************************************************************/
// Include required files
require "../libraries/lib-io.inc.php";
require "../libraries/lib-cache.inc.php";
require "lib-gd.inc.php";
// Register input variables
phpAds_registerGlobal('width', 'data');
/*********************************************************/
/* Prepare data for graph                                */
/*********************************************************/
// Prevent errors
if (!isset($width) || $width <= 0) {
    exit;
}
// Decode data
$data = isset($data) ? urldecode($data) : '';
// Start positions of graph
$x = 27;
$y = 12;
// Right margin
$right_margin = 5;
$bar_width = 5;
| Revive Adserver                                                           |
| http://www.revive-adserver.com                                            |
|                                                                           |
| Copyright: See the COPYRIGHT.txt file.                                    |
| License: GPLv2 or later, see the LICENSE.txt file.                        |
+---------------------------------------------------------------------------+
*/
// Require the initialisation file
require_once '../../init.php';
// Required files
require_once MAX_PATH . '/lib/OA/Dal.php';
require_once MAX_PATH . '/lib/max/language/Loader.php';
require_once MAX_PATH . '/www/admin/config.php';
require_once MAX_PATH . '/lib/max/other/lib-userlog.inc.php';
// Register input variables
phpAds_registerGlobal('start');
// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN);
/*-------------------------------------------------------*/
/* HTML framework                                        */
/*-------------------------------------------------------*/
phpAds_PageHeader("userlog-index");
phpAds_UserlogSelection("maintenance");
// Load the required language files
Language_Loader::load('userlog');
/*-------------------------------------------------------*/
/* Main code                                             */
/*-------------------------------------------------------*/
$doUserLog = OA_Dal::factoryDO('userlog');
if (!($count = $doUserLog->count())) {
    $count = 0;
/* Openads 2.0                                                          */
/* ===========                                                          */
/*                                                                      */
/* Copyright (c) 2000-2007 by the Openads developers                    */
/* For more information visit: http://www.openads.org                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
// Include required files
require "config.php";
require "lib-statistics.inc.php";
require "lib-size.inc.php";
// Register input variables
phpAds_registerGlobal('expand', 'collapse', 'listorder', 'orderdirection', 'period', 'period_range');
// Security check
phpAds_checkAccess(phpAds_Admin + phpAds_Affiliate);
// Set default values
$tabindex = 1;
/*********************************************************/
/* Affiliate interface security                          */
/*********************************************************/
if (phpAds_isUser(phpAds_Affiliate)) {
    if (isset($zoneid) && $zoneid > 0) {
        $result = phpAds_dbQuery("\n\t\t\tSELECT\n\t\t\t\taffiliateid\n\t\t\tFROM\n\t\t\t\t" . $phpAds_config['tbl_zones'] . "\n\t\t\tWHERE\n\t\t\t\tzoneid = '{$zoneid}'\n\t\t\t") or phpAds_sqlDie();
        $row = phpAds_dbFetchArray($result);
        if ($row["affiliateid"] == '' || phpAds_getUserID() != $row["affiliateid"]) {
            phpAds_PageHeader("1");
            phpAds_Die($strAccessDenied, $strNotAdmin);
        } else {
/* phpAdsNew 2                                                          */
/* ===========                                                          */
/*                                                                      */
/* Copyright (c) 2000-2002 by the phpAdsNew developers                  */
/* For more information visit: http://www.phpadsnew.com                 */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
// Include required files
require "config.php";
require "lib-statistics.inc.php";
require "../libraries/lib-reports.inc.php";
// Register input variables
phpAds_registerGlobal('startday', 'startmonth', 'startyear', 'endday', 'endmonth', 'endyear');
// Security check
phpAds_checkAccess(phpAds_Admin + phpAds_Agency);
if (phpAds_isUser(phpAds_Agency)) {
    $query = "SELECT clientid FROM " . $phpAds_config['tbl_clients'] . " WHERE clientid=" . $clientid . " AND agencyid=" . phpAds_getUserID();
    $res = phpAds_dbQuery($query) or phpAds_sqlDie();
    if (phpAds_dbNumRows($res) == 0) {
        phpAds_PageHeader("2");
        phpAds_Die($strAccessDenied, $strNotAdmin);
    }
}
/*********************************************************/
/* Main code                                             */
/*********************************************************/
if (isset($clientid) && $clientid != '') {
    if (isset($startyear) && isset($startmonth) && isset($startday) && $startyear != '' && $startmonth != '' && $startday != '') {
| Copyright: See the COPYRIGHT.txt file.                                    |
| License: GPLv2 or later, see the LICENSE.txt file.                        |
+---------------------------------------------------------------------------+
*/
// Require the initialisation file
require_once '../../init.php';
// Required files
require_once MAX_PATH . '/lib/OA/Dal.php';
require_once MAX_PATH . '/www/admin/config.php';
require_once MAX_PATH . '/www/admin/lib-storage.inc.php';
require_once MAX_PATH . '/www/admin/lib-zones.inc.php';
include_once MAX_PATH . '/www/admin/lib-statistics.inc.php';
require_once MAX_PATH . '/lib/OA/Maintenance/Priority.php';
require_once MAX_PATH . '/lib/max/other/common.php';
// Register input variables
phpAds_registerGlobal('campaignid', 'clientid', 'newclientid', 'returnurl', 'duplicate');
// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER);
if (!empty($duplicate)) {
    OA_Permission::enforceAccessToObject('clients', $clientid, false, OA_Permission::OPERATION_VIEW);
    OA_Permission::enforceAccessToObject('campaigns', $campaignid, false, OA_Permission::OPERATION_DUPLICATE);
} else {
    if (!empty($newclientid)) {
        OA_Permission::enforceAccessToObject('clients', $clientid, false, OA_Permission::OPERATION_VIEW);
        OA_Permission::enforceAccessToObject('campaigns', $campaignid, false, OA_Permission::OPERATION_MOVE);
        OA_Permission::enforceAccessToObject('clients', $newclientid, false, OA_Permission::OPERATION_EDIT);
    }
}
/*-------------------------------------------------------*/
/* Main code                                             */
/*-------------------------------------------------------*/
// $Revision: 3830 $
/************************************************************************/
/* Openads 2.0                                                          */
/* ===========                                                          */
/*                                                                      */
/* Copyright (c) 2000-2007 by the Openads developers                    */
/* For more information visit: http://www.openads.org                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
// Include required files
include "lib-settings.inc.php";
// Register input variables
phpAds_registerGlobal('save_settings', 'default_banner_url', 'default_banner_target', 'type_sql_allow', 'type_web_allow', 'type_url_allow', 'type_html_allow', 'type_txt_allow', 'type_web_mode', 'type_web_url', 'type_web_dir', 'type_web_ftp_user', 'type_web_ftp_password', 'type_web_ftp_host', 'type_web_ftp_path', 'type_html_auto', 'type_html_php');
// Security check
phpAds_checkAccess(phpAds_Admin);
$errormessage = array();
$sql = array();
if (isset($save_settings) && $save_settings != '') {
    if (isset($default_banner_url)) {
        phpAds_SettingsWriteAdd('default_banner_url', $default_banner_url);
    }
    if (isset($default_banner_target)) {
        phpAds_SettingsWriteAdd('default_banner_target', $default_banner_target);
    }
    phpAds_SettingsWriteAdd('type_sql_allow', isset($type_sql_allow));
    phpAds_SettingsWriteAdd('type_web_allow', isset($type_web_allow));
    phpAds_SettingsWriteAdd('type_url_allow', isset($type_url_allow));
    phpAds_SettingsWriteAdd('type_html_allow', isset($type_html_allow));
示例#24
0
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
// Include required files
require "config.php";
require "lib-statistics.inc.php";
require "lib-zones.inc.php";
require "lib-banner.inc.php";
// Include needed resources
require phpAds_path . "/libraries/resources/res-iso639.inc.php";
require phpAds_path . "/libraries/resources/res-iso3166.inc.php";
require phpAds_path . "/libraries/resources/res-usstates.inc.php";
require phpAds_path . "/libraries/resources/res-useragent.inc.php";
require phpAds_path . "/libraries/resources/res-continent.inc.php";
// Register input variables
phpAds_registerGlobal('submit', 'action', 'acl', 'type', 'time', 'cap', 'session_capping');
// Security check
phpAds_checkAccess(phpAds_Admin + phpAds_Agency);
if (phpAds_isUser(phpAds_Agency)) {
    $query = "SELECT " . $phpAds_config['tbl_banners'] . ".bannerid as bannerid" . " FROM " . $phpAds_config['tbl_clients'] . "," . $phpAds_config['tbl_campaigns'] . "," . $phpAds_config['tbl_banners'] . " WHERE " . $phpAds_config['tbl_campaigns'] . ".clientid=" . $clientid . " AND " . $phpAds_config['tbl_banners'] . ".campaignid=" . $campaignid . " AND " . $phpAds_config['tbl_banners'] . ".bannerid=" . $bannerid . " AND " . $phpAds_config['tbl_banners'] . ".campaignid=" . $phpAds_config['tbl_campaigns'] . ".campaignid" . " AND " . $phpAds_config['tbl_campaigns'] . ".clientid=" . $phpAds_config['tbl_clients'] . ".clientid" . " AND " . $phpAds_config['tbl_clients'] . ".agencyid=" . phpAds_getUserID();
    $res = phpAds_dbQuery($query) or phpAds_sqlDie();
    if (phpAds_dbNumRows($res) == 0) {
        phpAds_PageHeader("2");
        phpAds_Die($strAccessDenied, $strNotAdmin);
    }
}
// Define variable types
$type_list['weekday'] = $strWeekDay;
$type_list['time'] = $strTime;
$type_list['date'] = $strDate;
$type_list['clientip'] = $strClientIP;
/************************************************************************/
/* phpAdsNew 2                                                          */
/* ===========                                                          */
/*                                                                      */
/* Copyright (c) 2000-2002 by the phpAdsNew developers                  */
/* For more information visit: http://www.phpadsnew.com                 */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
// Include required files
require "config.php";
require "lib-statistics.inc.php";
// Register input variables
phpAds_registerGlobal('action', 'trackerids', 'clickwindowday', 'clickwindowhour', 'clickwindowminute', 'clickwindows', 'clickwindowsecond', 'hideinactive', 'logids', 'submit', 'viewwindowday', 'viewwindowhour', 'viewwindowminute', 'viewwindows', 'viewwindowsecond');
// Security check
phpAds_checkAccess(phpAds_Admin + phpAds_Agency);
if (phpAds_isUser(phpAds_Agency)) {
    if (isset($campaignid) && $campaignid != '') {
        $query = "SELECT c.clientid" . " FROM " . $phpAds_config['tbl_clients'] . " AS c" . "," . $phpAds_config['tbl_campaigns'] . " AS m" . " WHERE c.clientid=m.clientid" . " AND c.clientid=" . $clientid . " AND m.campaignid=" . $campaignid . " AND agencyid=" . phpAds_getUserID();
    } else {
        $query = "SELECT c.clientid" . " FROM " . $phpAds_config['tbl_clients'] . " AS c" . " WHERE c.clientid=" . $clientid . " AND agencyid=" . phpAds_getUserID();
    }
    $res = phpAds_dbQuery($query) or phpAds_sqlDie();
    if (phpAds_dbNumRows($res) == 0) {
        phpAds_PageHeader("2");
        phpAds_Die($strAccessDenied, $strNotAdmin);
    }
}
/*********************************************************/
示例#26
0
// Require the initialisation file
require_once '../../init.php';
// Required files
require_once MAX_PATH . '/lib/OA/Dal.php';
require_once MAX_PATH . '/lib/max/Admin/Invocation.php';
require_once MAX_PATH . '/lib/max/other/html.php';
require_once MAX_PATH . '/lib/max/other/capping/lib-capping.inc.php';
require_once MAX_PATH . '/www/admin/config.php';
require_once MAX_PATH . '/www/admin/lib-append.inc.php';
require_once MAX_PATH . '/www/admin/lib-statistics.inc.php';
require_once MAX_PATH . '/www/admin/lib-size.inc.php';
require_once MAX_PATH . '/www/admin/lib-zones.inc.php';
require_once MAX_PATH . '/lib/OA/Admin/UI/component/Form.php';
require_once MAX_PATH . '/lib/OA/Admin/Template.php';
// Register input variables
phpAds_registerGlobal('append', 'forceappend', 'appendid', 'appendsave', 'appendtype', 'chaintype', 'chainzone', 'prepend');
/*-------------------------------------------------------*/
/* Security check                                        */
/*-------------------------------------------------------*/
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER, OA_ACCOUNT_TRAFFICKER);
OA_Permission::enforceAccessToObject('affiliates', $affiliateid);
OA_Permission::enforceAccessToObject('zones', $zoneid);
if (OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
    OA_Permission::enforceAllowed(OA_PERM_ZONE_EDIT);
}
/*-------------------------------------------------------*/
/* Store preferences									 */
/*-------------------------------------------------------*/
$session['prefs']['inventory_entities'][OA_Permission::getEntityId()]['affiliateid'] = $affiliateid;
phpAds_SessionDataStore();
/*-------------------------------------------------------*/
/************************************************************************/
/* Openads 2.0                                                          */
/* ===========                                                          */
/*                                                                      */
/* Copyright (c) 2000-2007 by the Openads developers                    */
/* For more information visit: http://www.openads.org                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
// Include required files
require "config.php";
require "lib-statistics.inc.php";
// Register input variables
phpAds_registerGlobal('move', 'submit', 'clientname', 'views', 'clicks', 'unlimitedviews', 'unlimitedclicks', 'priority', 'targetviews', 'weight', 'expire', 'expireSet', 'expireDay', 'expireMonth', 'expireYear', 'activateSet', 'activateDay', 'activateMonth', 'activateYear', 'target_old', 'weight_old', 'active_old');
// Security check
phpAds_checkAccess(phpAds_Admin);
/*********************************************************/
/* Process submitted form                                */
/*********************************************************/
if (isset($submit)) {
    // If ID is not set, it should be a null-value for the auto_increment
    if (empty($campaignid)) {
        $campaignid = "null";
    }
    // set expired
    if ($views == '-') {
        $views = 0;
    }
    if ($clicks == '-') {
function phpAds_getLayerHTML($output, $uniqid)
{
    global $phpAds_config, $target;
    global $align, $collapsetime, $padding, $closetext;
    // Register input variables
    phpAds_registerGlobal('align', 'collapsetime', 'padding', 'closetext');
    if (!isset($padding)) {
        $padding = '2';
    }
    // Calculate layer size (inc. borders)
    $layer_width = $output['width'] + 4 + $padding * 2;
    $layer_height = $output['height'] + 30 + $padding * 2;
    // Create imagepath
    $imagepath = $phpAds_config['url_prefix'] . '/libraries/layerstyles/geocities/images/';
    // return HTML code
    return '
<div id="phpads_c' . $uniqid . '" style="position:absolute; width:' . $layer_width . 'px; height:' . $layer_height . 'px; z-index:98; left: 0px; top: 0px; visibility: hidden"> 
	<table width="100%" border="1" cellspacing="0" cellpadding="0" style="border-style: ridge; border-color: #ffffff">
		<tr>
			<td bordercolor="#DDDDDD" bgcolor="#000099" align="right" style="padding: 3px 3px 2px"><img src="' . $imagepath . 'expand.gif" width="12" height="12" hspace="3" onClick="phpAds_geopop(\'expand\', \'' . $uniqid . '\')"><img src="' . $imagepath . 'close.gif" width="12" height="12" onClick="phpAds_geopop(\'close\', \'' . $uniqid . '\')"></td>
		</tr>
' . (strlen($output['url']) && strlen($output['alt']) ? '		<tr>
			<td bgcolor="#FFFFCC" align="center" style="font-family: Arial, helvetica, sans-serif; font-size: 11px; padding: 2px"><a href="' . $output['url'] . '" ' . (isset($target) ? 'target="' . $target . '"' : '') . 'style="color: #0000ff">' . $output['alt'] . '</a></td>
		</tr>
' : '') . '	</table>
</div>
<div id="phpads_o' . $uniqid . '" style="position:absolute; width:' . $layer_width . 'px; height:' . $layer_height . 'px; z-index:99; left: 0px; top: 0px; visibility: hidden"> 
	<table width="100%" border="1" cellspacing="0" cellpadding="0" style="border-style: outset; border-color: #ffffff">
		<tr> 
			<td bordercolor="#DDDDDD" bgcolor="#000099" align="right" style="padding: 3px 3px 2px"><img src="' . $imagepath . 'expand-d.gif" width="12" height="12" hspace="3"><img src="' . $imagepath . 'collapse.gif" width="12" height="12" onClick="phpAds_geopop(\'collapse\', \'' . $uniqid . '\')"></td>
		</tr>
		<tr> 
			<td>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr> 
						<td align="center">
							<table border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
								<tr>
									<td width="' . $output['width'] . '" height="' . $output['height'] . '" align="center" valign="middle" style="padding: ' . $padding . 'px">' . $output['html'] . '</td>
								</tr>
							</table>
						</td>
					</tr>' . (strlen($closetext) ? '
					<tr> 
						<td align="center" bgcolor="#FFFFFF" style="font-family: Arial, helvetica, sans-serif; font-size: 9px; padding: 1px"><a href="javascript:;" onClick="phpAds_geopop(\'collapse\', \'' . $uniqid . '\')" style="color:#0000ff">' . $closetext . '</a></td>
					</tr>' : '') . '
				</table>
			</td>
		</tr>
	</table>
</div>
';
}
require_once MAX_PATH . '/www/admin/config.php';
require_once MAX_PATH . '/lib/OA/Admin/Reports/Generate.php';
global $session;
if (isset($_REQUEST['submit_type']) && $_REQUEST['submit_type'] == 'change') {
    // Store any values we need to pass to the next page
    switch ($_REQUEST['changed_field']) {
        case 'publisher':
            if (isset($_REQUEST['publisherId'])) {
                $session['prefs']['GLOBALS']['report_publisher'] = $_REQUEST['publisherId'];
                phpAds_SessionDataStore();
            }
        default:
            break;
    }
    echo "<script type='text/javascript'>window.location='" . $_REQUEST['refresh_page'] . "'</script>";
}
// If the report is for a "specific" period, store the period for later user
if (!is_null($_GET['period_preset']) && $_GET['period_preset'] == 'specific') {
    if (!is_null($_GET['period_start'])) {
        $session['prefs']['GLOBALS']['startDate'] = $_GET['period_start'] = date('Y-m-d', strtotime($_GET['period_start']));
    }
    if (!is_null($_GET['period_end'])) {
        $session['prefs']['GLOBALS']['endDate'] = $_GET['period_end'] = date('Y-m-d', strtotime($_GET['period_end']));
    }
}
// Load the required language files
Language_Loader::load('report');
// Register input variables
phpAds_registerGlobal('plugin');
$oModule = new OA_Admin_Reports_Generate();
$oModule->generate($plugin);
/* ===========                                                          */
/*                                                                      */
/* Copyright (c) 2000-2007 by the Openads developers                    */
/* For more information visit: http://www.openads.org                   */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
// Include required files
require "config.php";
require "lib-statistics.inc.php";
require "lib-size.inc.php";
require "lib-zones.inc.php";
// Register input variables
phpAds_registerGlobal('expand', 'collapse', 'listorder', 'orderdirection');
// Security check
phpAds_checkAccess(phpAds_Admin);
/*********************************************************/
/* Get preferences                                       */
/*********************************************************/
if (!isset($listorder)) {
    if (isset($Session['prefs']['stats-banner-affiliates.php']['listorder'])) {
        $listorder = $Session['prefs']['stats-banner-affiliates.php']['listorder'];
    } else {
        $listorder = '';
    }
}
if (!isset($orderdirection)) {
    if (isset($Session['prefs']['stats-banner-affiliates.php']['orderdirection'])) {
        $orderdirection = $Session['prefs']['stats-banner-affiliates.php']['orderdirection'];