当前位置: 首页>>代码示例>>PHP>>正文


PHP Admin_DA::getTrackers方法代码示例

本文整理汇总了PHP中Admin_DA::getTrackers方法的典型用法代码示例。如果您正苦于以下问题:PHP Admin_DA::getTrackers方法的具体用法?PHP Admin_DA::getTrackers怎么用?PHP Admin_DA::getTrackers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Admin_DA的用法示例。


在下文中一共展示了Admin_DA::getTrackers方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: MAX_checkTracker

function MAX_checkTracker($advertiserId, $trackerId)
{
    $allowed = false;
    if (MAX_checkGenericId($advertiserId) && MAX_checkGenericId($trackerId)) {
        if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
            $allowed = count(Admin_DA::getTrackers(array('advertiser_id' => $advertiserId, 'tracker_id' => $trackerId)));
        } elseif (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
            $allowed = count(Admin_DA::getTrackers(array('agency_id' => OA_Permission::getAgencyId(), 'advertiser_id' => $advertiserId, 'tracker_id' => $trackerId)));
        } elseif (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
            $allowed = $advertiserId == OA_Permission::getEntityId() && count(Admin_DA::getTrackers(array('advertiser_id' => $advertiserId, 'tracker_id' => $trackerId)));
        }
    }
    return $allowed;
}
开发者ID:villos,项目名称:tree_admin,代码行数:14,代码来源:common.php

示例2: generateJavascriptTrackerCode

 function generateJavascriptTrackerCode($trackerId)
 {
     $conf = $GLOBALS['_MAX']['CONF'];
     $variablemethod = 'default';
     $trackers = Admin_DA::getTrackers(array('tracker_id' => $trackerId), true);
     if (count($trackers)) {
         $variablemethod = $trackers[$trackerId]['variablemethod'];
     }
     $variables = Admin_DA::getVariables(array('trackerid' => $trackerId), true);
     $variablesQuerystring = '';
     $buffer = "<!--/*\n  *\n  *  OpenX JavaScript tracker code\n  *  - Generated with OpenX v" . OA_VERSION . "\n  *\n  *  To help prevent caching of the <noscript> beacon, if possible,\n  *  Replace %%RANDOM_NUMBER%% with a randomly generated number (or timestamp)\n  *\n  */-->\n";
     $varbuffer = '';
     if (!empty($variables)) {
         foreach ($variables as $id => $variable) {
             if (($variablemethod == 'default' || $variablemethod == 'js') && $variable['variablecode']) {
                 $varcode = stripslashes($variable['variablecode']);
                 $varbuffer .= "    {$varcode};\n";
             }
             $variablesQuerystring .= "&amp;{$variable['name']}=%%" . strtoupper($variable['name']) . "_VALUE%%";
         }
     }
     if (!empty($varbuffer)) {
         $varprefix = $conf['var']['prefix'];
         $buffer .= "\n<!--/*\n  *\n  *  In order for the adserver to track variables for this conversion,\n  *  they must be provided by the client.\n  *\n  *  Additional variables may be added, however they must be added\n  *  in the adserver as well before they will be logged.\n  *\n  *  The '%%VARIABLE_VALUE%%' should be replaced with the\n  *  actual values for this sale.\n  *\n  *  NOTE: In order to track variables from the <noscript> section,\n  *  the above replacement must be performed within the img tag as well.\n  *\n  *  The following values have been pre-configured in the adserver\n  *\n  */-->\n\n<script type='text/javascript'><!--//<![CDATA[\n";
         $buffer .= $varbuffer;
         $buffer .= "//]]>--></script>\n";
     }
     $buffer .= "\n<!--/*\n  *\n  *  Place this code at the top of your thank-you page, just after the <body> tag,\n  *  below any definitions of Javascript variables that need to be tracked.\n  *\n  */-->\n\n<script type='text/javascript'><!--//<![CDATA[\n    var {$varprefix}p=location.protocol=='https:'?'https:':'http:';\n    var {$varprefix}r=Math.floor(Math.random()*999999);\n    document.write (\"<\" + \"script language='JavaScript' \");\n    document.write (\"type='text/javascript' src='\"+{$varprefix}p);\n    document.write (\"" . MAX_commonConstructPartialDeliveryUrl($conf['file']['conversionjs']) . "\");\n    document.write (\"?trackerid={$trackerId}&amp;r=\"+{$varprefix}r+\"'><\" + \"\\/script>\");\n//]]>--></script><noscript>" . $this->_generateTrackerImageBeacon($trackerId) . "</noscript>";
     $buffer .= "\n";
     return $buffer;
 }
开发者ID:villos,项目名称:tree_admin,代码行数:31,代码来源:Invocation.php

示例3: _hasTrackers

 /**
  * A private method to test to see if the current user has any trackers.
  *
  * @access private
  * @return boolean True if the current user has trackers, false otherwise.
  */
 function _hasTrackers()
 {
     if (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
         $aParams = array('advertiser_id' => OA_Permission::getEntityId());
         $aTrackers = Admin_DA::getTrackers($aParams);
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
         $aParams = array('agency_id' => OA_Permission::getEntityId());
         $aTrackers = Admin_DA::getTrackers($aParams);
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
         $aTrackers = Admin_DA::getTrackers(array());
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
         $aTrackers = array();
         $aParams = array('publisher_id' => OA_Permission::getEntityId());
         $aPlacementZones = Admin_DA::getPlacementZones($aParams, false, 'placement_id');
         if (!empty($aPlacementZones)) {
             $aParams = array('placement_id' => implode(',', array_keys($aPlacementZones)));
             $aTrackers = array_merge($aTrackers, Admin_DA::getTrackers($aParams));
         }
         $aAdZones = Admin_DA::getAdZones($aParams, false, 'ad_id');
         if (!empty($aAdZones)) {
             $aParams = array('ad_id' => implode(',', array_keys($aAdZones)));
             $aTrackers = array_merge($aTrackers, Admin_DA::getTrackers($aParams));
         }
     }
     return !empty($aTrackers);
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:32,代码来源:conversionTrackingReport.class.php

示例4: _duplicateTracker

 function _duplicateTracker($aTracker, $checkUniqueNames = false)
 {
     $trackerId = $aTracker['tracker_id'];
     unset($aTracker['tracker_id']);
     if ($checkUniqueNames) {
         $aTrackers = Admin_DA::getTrackers(array('advertiser_id' => $aTracker['advertiser_id']));
         Admin_DA::_getUniqueName($aTracker, $aTrackers, @$GLOBALS['strCopy']);
     }
     // Massage to real field names
     Admin_DA::_switch($aTracker, 'advertiser_id', 'clientid');
     Admin_DA::_switch($aTracker, 'name', 'trackername');
     $newTrackerId = Admin_DA::addTracker($aTracker);
     if (PEAR::isError($newTrackerId)) {
         return PEAR::raiseError('failed to add tracker in ' . __FILE__ . ',' . __LINE__);
     }
     $aPlacementTrackers = Admin_DA::getPlacementTrackers(array('tracker_id' => $trackerId));
     foreach ($aPlacementTrackers as $aPlacementTracker) {
         $aPlacementTracker['tracker_id'] = $newTrackerId;
         Admin_DA::duplicatePlacementTracker($aPlacementTracker);
     }
     $aVariables = Admin_DA::getVariables(array('tracker_id' => $trackerId));
     foreach ($aVariables as $aVariable) {
         $aVariable['tracker_id'] = $newTrackerId;
         Admin_DA::duplicateVariable($aVariable);
     }
     return $newTrackerId;
 }
开发者ID:Apeplazas,项目名称:plazadelatecnologia,代码行数:27,代码来源:Admin_DA.php

示例5: _getPublishers

 function _getPublishers()
 {
     if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
         if ($this->_filter == FILTER_TRACKER_PRESENT) {
             $aParams = array();
             $aTrackers = Admin_DA::getTrackers($aParams, false, 'advertiser_id');
             $aParams = array('advertiser_id' => implode(',', array_keys($aTrackers)));
             $aPlacementZones = Admin_DA::getPlacementZones($aParams, false, 'zone_id');
             $aAdZones = Admin_DA::getAdZones($aParams, false, 'zone_id');
             $aParams = array('zone_id' => implode(',', array_keys($aPlacementZones + $aAdZones)));
             $aPublishers = Admin_DA::getPublishers($aParams);
         } else {
             $aParams = array();
             $aPublishers = Admin_DA::getPublishers($aParams);
         }
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
         if ($this->_filter == FILTER_TRACKER_PRESENT) {
             $aParams = array('agency_id' => OA_Permission::getEntityId());
             $aTrackers = Admin_DA::getTrackers($aParams, false, 'advertiser_id');
             $aParams = array('advertiser_id' => implode(',', array_keys($aTrackers)));
             $aPlacementZones = Admin_DA::getPlacementZones($aParams, false, 'zone_id');
             $aAdZones = Admin_DA::getAdZones($aParams, false, 'zone_id');
             $aParams = array('zone_id' => implode(',', array_keys($aPlacementZones + $aAdZones)));
             $aPublishers = Admin_DA::getPublishers($aParams);
         } else {
             $aParams = array('agency_id' => OA_Permission::getEntityId());
             $aPublishers = Admin_DA::getPublishers($aParams);
         }
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
         if ($this->_filter == FILTER_TRACKER_PRESENT) {
             $aParams = array('agency_id' => OA_Permission::getAgencyId());
             $aTrackers = Admin_DA::getTrackers($aParams, false, 'advertiser_id');
             $aParams = array('advertiser_id' => implode(',', array_keys($aTrackers)));
             $aPlacementZones = Admin_DA::getAdZones($aParams, false, 'zone_id');
             $aAdZones = Admin_DA::getAdZones($aParams, false, 'zone_id');
             $aParams = array('publisher_id' => OA_Permission::getEntityId(), 'zone_id' => implode(',', array_keys($aPlacementZones + $aAdZones)));
             $aPublishers = Admin_DA::getPublishers($aParams);
         } else {
             $aParams = array('publisher_id' => OA_Permission::getEntityId());
             $aPublishers = Admin_DA::getPublishers($aParams);
         }
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
         $aPublishers = array();
         if ($this->_filter == FILTER_TRACKER_PRESENT) {
             $aParams = array('advertiser_id' => OA_Permission::getEntityId());
             $aTrackers = Admin_DA::getTrackers($aTrackers, 'advertiser_id');
             if (!empty($aTrackers)) {
                 $aParams = array('advertiser_id' => OA_Permission::getEntityId(), 'placement_anonymous' => 'f');
                 $aPlacementZones = Admin_DA::getPlacementZones($aParams, false, 'zone_id');
                 $aAdZones = Admin_DA::getAdZones($aParams, false, 'zone_id');
                 $aZones = $aPlacementZones + $aAdZones;
                 if (!empty($aZones)) {
                     $aParams = array('zone_id' => implode(',', array_keys($aZones)));
                     $aPublishers = Admin_DA::getPublishers($aParams);
                 }
             }
         } else {
             $aParams = array('advertiser_id' => OA_Permission::getEntityId(), 'placement_anonymous' => 'f');
             $aPlacementZones = Admin_DA::getPlacementZones($aParams, false, 'zone_id');
             $aAdZones = Admin_DA::getAdZones($aParams, false, 'zone_id');
             $aZones = $aPlacementZones + $aAdZones;
             if (!empty($aZones)) {
                 $aParams = array('zone_id' => implode(',', array_keys($aZones)));
                 $aPublishers = Admin_DA::getPublishers($aParams);
             }
         }
     }
     // order the array by publisher name
     foreach ($aPublishers as $key => $row) {
         $name[$key] = strtolower($row['name']);
     }
     array_multisort($name, SORT_ASC, $aPublishers);
     // rewrite the array to preserve key
     foreach ($aPublishers as $row) {
         $aPublishersTmp[$row['publisher_id']] = $row;
     }
     $aPublishers = $aPublishersTmp;
     return $aPublishers;
 }
开发者ID:villos,项目名称:tree_admin,代码行数:79,代码来源:OrganisationSelectionField.php


注:本文中的Admin_DA::getTrackers方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。