Example #1
0
        $row = $doTrackers->toArray();
    }
} else {
    // New tracker
    $doClients = OA_Dal::factoryDO('clients');
    if ($doClients->get($clientid)) {
        $client = $doClients->toArray();
    }
    if ($client) {
        $row['trackername'] = $client['clientname'] . ' - ';
    } else {
        $row["trackername"] = '';
    }
    $row["trackername"] .= $strDefault;
}
$trackerDetails = phpAds_getTrackerDetails($trackerid);
$trackerVariables = Admin_DA::getVariables(array('tracker_id' => $trackerid), true);
// Default to JS invocation if either appended HTML is found, or the tracker has variables
if (empty($invtype) && (!empty($trackerDetails['appendcode']) || !empty($trackerVariables))) {
    $invtype = 'js';
}
$maxInvocation = new MAX_Admin_Invocation();
if (isset($invtype) && $invtype == 'js') {
    $tracker_code = $maxInvocation->generateJavascriptTrackerCode($trackerid);
} else {
    $tracker_code = $maxInvocation->generateTrackerCode($trackerid);
}
/*-------------------------------------------------------*/
/* Main code                                             */
/*-------------------------------------------------------*/
$tabindex = 1;
function phpAds_getTrackerParentClientID($trackerid)
{
    $tracker_details = phpAds_getTrackerDetails($trackerid);
    return $tracker_details['clientid'];
}
Example #3
0
function MAX_displayTrackerBreadcrumbs($clientid, $trackerid = null)
{
    if ($trackerid) {
        $parentClientId = phpAds_getTrackerParentClientID($trackerid);
        $tracker = phpAds_getTrackerDetails($trackerid);
        $trackerName = $tracker['trackername'];
        $pageType = 'edit';
    } else {
        $parentClientId = $clientid;
        $trackerName = "";
        $pageType = 'edit-new';
    }
    $advertiserEditUrl = "advertiser-edit.php?clientid={$parentClientId}";
    $advertiser = phpAds_getClientDetails($parentClientId);
    $advertiserName = $advertiser['clientname'];
    $builder = new OA_Admin_UI_Model_InventoryPageHeaderModelBuilder();
    $oHeaderModel = $builder->buildEntityHeader(array(array("name" => $advertiserName, "url" => $advertiserEditUrl), array("name" => $trackerName)), 'tracker', $pageType);
    return $oHeaderModel;
}