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


PHP phpAds_buildName函数代码示例

本文整理汇总了PHP中phpAds_buildName函数的典型用法代码示例。如果您正苦于以下问题:PHP phpAds_buildName函数的具体用法?PHP phpAds_buildName怎么用?PHP phpAds_buildName使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: getZones

 function getZones()
 {
     global $list_filters;
     if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
         $aParams = array();
         $aPublishers = Admin_DA::getPublishers($aParams);
         // set publisher id if list is to be filtered by publisher
         if (isset($list_filters['publisher'])) {
             $aParams = array('publisher_id' => $list_filters['publisher']);
         } else {
             // else use all publishers
             $aParams = array('publisher_id' => implode(',', array_keys($aPublishers)));
         }
         if (isset($this->_filter)) {
             $aParams['zone_inventory_forecast_type'] = $this->getForecastType();
         }
         $aZones = Admin_DA::getZones($aParams);
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
         $aParams = array('agency_id' => OA_Permission::getEntityId());
         $aPublishers = Admin_DA::getPublishers($aParams);
         // set publisher id if list is to be filtered by publisher
         if (isset($list_filters['publisher'])) {
             $aParams = array('publisher_id' => $list_filters['publisher']);
         } else {
             // else use all of this agency's publishers
             $aParams = array('publisher_id' => implode(',', array_keys($aPublishers)));
         }
         if (isset($this->_filter)) {
             $aParams['zone_inventory_forecast_type'] = $this->getForecastType();
         }
         $aZones = Admin_DA::getZones($aParams);
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
         $aParams = array('publisher_id' => OA_Permission::getEntityId());
         $aPublishers = Admin_DA::getPublishers($aParams);
         $aParams = array('publisher_id' => implode(',', array_keys($aPublishers)));
         if (isset($this->_filter)) {
             $aParams['zone_inventory_forecast_type'] = $this->getForecastType();
         }
         $aZones = Admin_DA::getZones($aParams);
     } else {
         $aPublishers = array();
         $aZones = array();
     }
     $aZoneArray = array();
     foreach ($aPublishers as $publisherId => $aPublisher) {
         foreach ($aZones as $zoneId => $aZone) {
             if ($aZone['publisher_id'] == $publisherId) {
                 $aZoneArray[$zoneId] = phpads_buildName($publisherId, MAX_getPublisherName($aPublisher['name'])) . " - " . phpAds_buildName($zoneId, MAX_getZoneName($aZone['name']));
             }
         }
     }
     return $aZoneArray;
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:53,代码来源:ZoneIdField.php

示例2: _getAdvertiserArray

 function _getAdvertiserArray($orderBy = null)
 {
     $conf = $GLOBALS['_MAX']['CONF'];
     if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
         $query = "SELECT clientid,clientname" . " FROM " . $conf['table']['prefix'] . $conf['table']['clients'];
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
         $query = "SELECT clientid,clientname" . " FROM " . $conf['table']['prefix'] . $conf['table']['clients'] . " WHERE agencyid=" . OA_Permission::getEntityId();
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) {
         $query = "SELECT clientid,clientname" . " FROM " . $conf['table']['prefix'] . $conf['table']['clients'] . " WHERE clientid=" . OA_Permission::getEntityId();
     }
     $orderBy ? $query .= " ORDER BY {$orderBy} ASC" : 0;
     $res = phpAds_dbQuery($query);
     while ($row = phpAds_dbFetchArray($res)) {
         $clientArray[$row['clientid']] = phpAds_buildName($row['clientid'], $row['clientname']);
     }
     return $clientArray;
 }
开发者ID:villos,项目名称:tree_admin,代码行数:17,代码来源:AdvertiserIdField.php

示例3: phpAds_Die

            phpAds_Die($strAccessDenied, $strNotAdmin);
        }
    }
}
/*********************************************************/
/* HTML framework                                        */
/*********************************************************/
if (phpAds_isUser(phpAds_Admin) || phpAds_isUser(phpAds_Agency)) {
    if (phpAds_isUser(phpAds_Admin)) {
        $query = "SELECT clientid,clientname" . " FROM " . $phpAds_config['tbl_clients'] . phpAds_getClientListOrder($navorder, $navdirection);
    } elseif (phpAds_isUser(phpAds_Agency)) {
        $query = "SELECT clientid,clientname" . " FROM " . $phpAds_config['tbl_clients'] . " WHERE agencyid=" . phpAds_getUserID() . phpAds_getClientListOrder($navorder, $navdirection);
    }
    $res = phpAds_dbQuery($query) or phpAds_sqlDie();
    while ($row = phpAds_dbFetchArray($res)) {
        phpAds_PageContext(phpAds_buildName($row['clientid'], $row['clientname']), "stats-advertiser-history.php?clientid=" . $row['clientid'], $clientid == $row['clientid']);
    }
    phpAds_PageShortcut($strClientProperties, 'advertiser-edit.php?clientid=' . $clientid, 'images/icon-advertiser.gif');
    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?clientid={$clientid}'" . phpAds_DelConfirm($strConfirmResetClientStats) . ">";
        $extra .= "<img src='images/" . $phpAds_TextDirection . "/icon-undo.gif' align='absmiddle' border='0'>&nbsp;{$strResetStats}</a>";
        $extra .= "<br><br>";
    }
    phpAds_PageHeader("2.1.1", $extra);
    echo "<img src='images/icon-advertiser.gif' align='absmiddle'>&nbsp;<b>" . phpAds_getClientName($clientid) . "</b><br><br><br>";
    phpAds_ShowSections(array("2.1.1", "2.1.2"));
}
if (phpAds_isUser(phpAds_Client)) {
开发者ID:miller-tamil,项目名称:openads-plus,代码行数:31,代码来源:stats-advertiser-history.php

示例4: setAgencyPageContext

 function setAgencyPageContext($agencyid, $pageName)
 {
     $doAgency = OA_Dal::factoryDO('agency');
     $doAgency->find();
     while ($doAgency->fetch()) {
         phpAds_PageContext(phpAds_buildName($doAgency->agencyid, $doAgency->name), "{$pageName}?agencyid=" . $doAgency->agencyid, $agencyid == $doAgency->agencyid);
     }
 }
开发者ID:villos,项目名称:tree_admin,代码行数:8,代码来源:Menu.php

示例5: phpAds_getCampaignName

        echo "<img src='images/icon-campaign.gif' align='absmiddle'>&nbsp;<b>" . phpAds_getCampaignName($campaignid) . "</b><br><br><br>";
        phpAds_ShowSections(array("1.2.1", "1.2.2", "1.2.3", "1.2.4"));
    } else {
        phpAds_PageHeader("1");
        phpAds_Die($strAccessDenied, $strNotAdmin);
    }
}
if (phpAds_isUser(phpAds_Admin) || phpAds_isUser(phpAds_Agency)) {
    if (phpAds_isUser(phpAds_Admin)) {
        $query = "SELECT campaignid,campaignname" . " FROM " . $phpAds_config['tbl_campaigns'] . " WHERE clientid=" . $clientid . phpAds_getCampaignListOrder($navorder, $navdirection);
    } elseif (phpAds_isUser(phpAds_Agency)) {
        $query = "SELECT m.campaignid,m.campaignname" . " FROM " . $phpAds_config['tbl_campaigns'] . " AS m" . "," . $phpAds_config['tbl_clients'] . " AS c" . " WHERE m.clientid=c.clientid" . " AND m.clientid=" . $clientid . " AND c.agencyid=" . phpAds_getUserID() . phpAds_getCampaignListOrder($navorder, $navdirection);
    }
    $res = phpAds_dbQuery($query) or phpAds_sqlDie();
    while ($row = phpAds_dbFetchArray($res)) {
        phpAds_PageContext(phpAds_buildName($row['campaignid'], $row['campaignname']), "stats-campaign-target.php?clientid=" . $clientid . "&campaignid=" . $row['campaignid'], $campaignid == $row['campaignid']);
    }
    phpAds_PageShortcut($strClientProperties, 'advertiser-edit.php?clientid=' . $clientid, 'images/icon-advertiser.gif');
    phpAds_PageShortcut($strCampaignProperties, 'campaign-edit.php?clientid=' . $clientid . '&campaignid=' . $campaignid, 'images/icon-campaign.gif');
    phpAds_PageHeader("2.1.2.4");
    echo "<img src='images/icon-advertiser.gif' align='absmiddle'>&nbsp;" . phpAds_getParentClientName($campaignid);
    echo "&nbsp;<img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'>&nbsp;";
    echo "<img src='images/icon-campaign.gif' align='absmiddle'>&nbsp;<b>" . phpAds_getCampaignName($campaignid) . "</b><br><br><br>";
    phpAds_ShowSections(array("2.1.2.1", "2.1.2.2", "2.1.2.3", "2.1.2.4", "2.1.2.5"));
}
/*********************************************************/
/* Main code                                             */
/*********************************************************/
$lib_targetstats_params = array('clientid' => $clientid, 'campaignid' => $campaignid);
$lib_targetstats_where = "campaignid = '" . $campaignid . "'";
include "lib-targetstats.inc.php";
开发者ID:miller-tamil,项目名称:openads-plus,代码行数:31,代码来源:stats-campaign-target.php

示例6: phpAds_buildBannerCode

        echo phpAds_buildBannerCode($bannerid) . "<br><br><br><br>";
        phpAds_ShowSections($sections);
    } else {
        phpAds_PageHeader("1");
        phpAds_Die($strAccessDenied, $strNotAdmin);
    }
}
if (phpAds_isUser(phpAds_Admin) || phpAds_isUser(phpAds_Agency)) {
    if (phpAds_isUser(phpAds_Admin)) {
        $query = "SELECT campaignid,campaignname" . " FROM " . $phpAds_config['tbl_campaigns'] . " WHERE clientid = " . $clientid . phpAds_getCampaignListOrder($navorder, $navdirection);
    } elseif (phpAds_isUser(phpAds_Agency)) {
        $query = "SELECT campaignid,campaignname" . " FROM " . $phpAds_config['tbl_campaigns'] . " WHERE clientid=" . $clientid . " AND agencyid=" . phpAds_getUserID() . phpAds_getCampaignListOrder($navorder, $navdirection);
    }
    $res = phpAds_dbQuery($query) or phpAds_sqlDie();
    while ($row = phpAds_dbFetchArray($res)) {
        phpAds_PageContext(phpAds_buildName($row['campaignid'], $row['campaignname']), "stats-banner-sources.php?clientid=" . $clientid . "&campaignid=" . $row['campaignid'], $campaignid == $row['campaignid']);
    }
    phpAds_PageShortcut($strClientProperties, 'advertiser-edit.php?clientid=' . $clientid, 'images/icon-advertiser.gif');
    phpAds_PageShortcut($strCampaignProperties, 'campaign-edit.php?clientid=' . $clientid . '&campaignid=' . $campaignid, 'images/icon-campaign.gif');
    phpAds_PageHeader("2.1.2.2.2");
    echo "<img src='images/icon-advertiser.gif' align='absmiddle'>&nbsp;" . phpAds_getParentClientName($campaignid);
    echo "&nbsp;<img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'>&nbsp;";
    echo "<img src='images/icon-campaign.gif' align='absmiddle'>&nbsp;" . phpAds_getCampaignName($campaignid);
    echo "&nbsp;<img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'>&nbsp;";
    echo "<img src='images/icon-banner-stored.gif' align='absmiddle'>&nbsp;<b>" . phpAds_getBannerName($bannerid) . "</b><br><br>";
    echo phpAds_buildBannerCode($bannerid) . "<br><br><br><br>";
    phpAds_ShowSections(array("2.1.2.2.1", "2.1.2.2.2"));
}
/*********************************************************/
/* Main code                                             */
/*********************************************************/
开发者ID:miller-tamil,项目名称:openads-plus,代码行数:31,代码来源:stats-banner-sources.php

示例7: campaignid

 /**
  * Generate the HTML option
  *
  * @return string    A string containing html for option
  */
 function campaignid()
 {
     $conf = $GLOBALS['_MAX']['CONF'];
     $mi =& $this->maxInvocation;
     if ($mi->zone_invocation || OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
         return null;
     }
     $option = '';
     // Display available campaigns...
     $option .= "<tr bgcolor='#F6F6F6'><td width='30'>&nbsp;</td>\n";
     $option .= "<td width='200'>" . $GLOBALS['strInvocationCampaignID'] . "</td><td width='370'>\n";
     $option .= "<select name='campaignid' style='width:350px;' tabindex='" . $mi->tabindex++ . "'>\n";
     $option .= "<option value='0'>-</option>\n";
     if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
         $query = "SELECT campaignid,campaignname" . " FROM " . $conf['table']['prefix'] . $conf['table']['campaigns'];
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
         $query = "SELECT m.campaignid AS campaignid" . ",m.campaignname AS campaignname" . " FROM " . $conf['table']['prefix'] . $conf['table']['campaigns'] . " AS m" . "," . $conf['table']['prefix'] . $conf['table']['clients'] . " AS c" . " WHERE m.clientid=c.clientid" . " AND c.agencyid=" . OA_Permission::getAgencyId();
     }
     $oDbh = OA_DB::singleton();
     $aResult = $oDbh->queryAll($query);
     if (PEAR::isError($aResult)) {
         $option .= "<option value='0'>'.{$aResult->getUserInfo}().'</option>\n";
     } else {
         foreach ($aResult as $k => $row) {
             $option .= "<option value='" . $row['campaignid'] . "'" . ($mi->campaignid == $row['campaignid'] ? ' selected' : '') . ">";
             $option .= phpAds_buildName($row['campaignid'], $row['campaignname']);
             $option .= "</option>\n";
         }
     }
     $option .= "</select>\n";
     $option .= "</td></tr>";
     $option .= "<tr bgcolor='#F6F6F6'><td height='10' colspan='3'>&nbsp;</td></tr>";
     $option .= "<tr height='1'><td colspan='3' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break.gif' height='1' width='100%'></td></tr>";
     $option .= "<tr><td height='10' colspan='3'>&nbsp;</td></tr>";
     return $option;
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:41,代码来源:InvocationTagsOptions.php

示例8: phpAds_SendMaintenanceReport

function phpAds_SendMaintenanceReport($clientid, $first_unixtimestamp, $last_unixtimestamp, $update = true)
{
    global $phpAds_config, $phpAds_CharSet, $date_format, $strBanner, $strCampaign, $strViews, $strClicks, $strConversions, $strLinkedTo, $strMailSubject, $strMailHeader, $strMailBannerStats, $strMailFooter, $strMailReportPeriod, $strMailReportPeriodAll, $strLogErrorBanners, $strLogErrorClients, $strLogErrorViews, $strLogErrorClicks, $strLogErrorConversions, $strNoStatsForCampaign, $strNoViewLoggedInInterval, $strNoClickLoggedInInterval, $strNoCampaignLoggedInInterval, $strTotal, $strTotalThisPeriod;
    // Convert timestamps to SQL format
    $last_sqltimestamp = date("YmdHis", $last_unixtimestamp);
    $first_sqltimestamp = date("YmdHis", $first_unixtimestamp);
    // Get Client information
    $res_client = phpAds_dbQuery("SELECT" . " clientid" . ",clientname" . ",contact" . ",email" . ",language" . ",report" . ",reportinterval" . ",reportlastdate" . ",UNIX_TIMESTAMP(reportlastdate) AS reportlastdate_t" . " FROM " . $phpAds_config['tbl_clients'] . " WHERE clientid=" . $clientid);
    if (phpAds_dbNumRows($res_client) > 0) {
        $client = phpAds_dbFetchArray($res_client);
        // Load client language strings
        @(include phpAds_path . '/language/english/default.lang.php');
        if ($client['language'] != '') {
            $phpAds_config['language'] = $client['language'];
        }
        if ($phpAds_config['language'] != 'english' && file_exists(phpAds_path . '/language/' . $phpAds_config['language'] . '/default.lang.php')) {
            @(include phpAds_path . '/language/' . $phpAds_config['language'] . '/default.lang.php');
        }
        $active_campaigns = false;
        $log = "";
        // Fetch all campaigns belonging to client
        $res_campaigns = phpAds_dbQuery("SELECT" . " campaignid" . ",campaignname" . ",views" . ",clicks" . ",conversions" . ",expire" . ",UNIX_TIMESTAMP(expire) as expire_st" . ",activate" . ",UNIX_TIMESTAMP(activate) as activate_st" . ",active" . " FROM " . $phpAds_config['tbl_campaigns'] . " WHERE clientid=" . $client['clientid']) or die($strLogErrorClients);
        while ($campaign = phpAds_dbFetchArray($res_campaigns)) {
            // Fetch all banners belonging to campaign
            $res_banners = phpAds_dbQuery("SELECT" . " bannerid" . ",campaignid" . ",URL" . ",active" . ",description" . ",alt" . " FROM " . $phpAds_config['tbl_banners'] . " WHERE campaignid=" . $campaign['campaignid']) or die($strLogErrorBanners);
            $active_banners = false;
            $log .= "\n" . $strCampaign . "  " . strip_tags(phpAds_buildName($campaign['campaignid'], $campaign['campaignname'])) . "\n";
            $log .= "=======================================================\n\n";
            while ($row_banners = phpAds_dbFetchArray($res_banners)) {
                $adviews = phpAds_totalViews($row_banners["bannerid"]);
                $client["views_used"] = $adviews;
                $adclicks = phpAds_totalClicks($row_banners["bannerid"]);
                $campaign["clicks_used"] = $adclicks;
                $adconversions = phpAds_totalConversions($row_banners["bannerid"]);
                $campaign["conversions_used"] = $adconversions;
                if ($adviews > 0 || $adclicks > 0 || $adconversions > 0) {
                    $log .= $strBanner . "  " . strip_tags(phpAds_buildBannerName($row_banners['bannerid'], $row_banners['description'], $row_banners['alt'])) . "\n";
                    $log .= $strLinkedTo . ": " . $row_banners['URL'] . "\n";
                    $log .= "-------------------------------------------------------\n";
                    $active_banner_stats = false;
                    if ($adviews > 0) {
                        $log .= $strViews . " (" . $strTotal . "):    " . $adviews . "\n";
                        // Fetch all adviews belonging to banner belonging to client, grouped by day
                        $res_adviews = phpAds_dbQuery("SELECT" . " SUM(views) as qnt" . ",DATE_FORMAT(day, '{$date_format}') as t_stamp_f" . ",TO_DAYS(day) AS the_day" . " FROM " . $phpAds_config['tbl_adstats'] . " WHERE bannerid=" . $row_banners['bannerid'] . " AND views>0" . " AND UNIX_TIMESTAMP(day)>=" . $first_unixtimestamp . " AND UNIX_TIMESTAMP(day)<" . $last_unixtimestamp . " GROUP BY day" . " ORDER BY day DESC") or die($strLogErrorViews . " " . phpAds_dbError());
                        if (phpAds_dbNumRows($res_adviews)) {
                            $total = 0;
                            while ($row_adviews = phpAds_dbFetchArray($res_adviews)) {
                                $log .= "      " . $row_adviews['t_stamp_f'] . ":   " . $row_adviews['qnt'] . "\n";
                                $total += $row_adviews['qnt'];
                            }
                            $log .= $strTotalThisPeriod . ": " . $total . "\n";
                            $active_banner_stats = true;
                        } else {
                            $log .= "      " . $strNoViewLoggedInInterval . "\n";
                        }
                    }
                    if ($adclicks > 0) {
                        // Total adclicks
                        $log .= "\n" . $strClicks . " (" . $strTotal . "):   " . $adclicks . "\n";
                        // Fetch all adclicks belonging to banner belonging to client, grouped by day
                        $res_adclicks = phpAds_dbQuery("SELECT" . " SUM(clicks) as qnt" . ",DATE_FORMAT(day, '{$date_format}') as t_stamp_f" . ",TO_DAYS(day) AS the_day" . " FROM " . $phpAds_config['tbl_adstats'] . " WHERE bannerid = " . $row_banners['bannerid'] . " AND clicks>0" . " AND UNIX_TIMESTAMP(day)>=" . $first_unixtimestamp . " AND UNIX_TIMESTAMP(day)<" . $last_unixtimestamp . " GROUP BY day" . " ORDER BY day DESC") or die($strLogErrorClicks . " " . phpAds_dbError());
                        if (phpAds_dbNumRows($res_adclicks)) {
                            $total = 0;
                            while ($row_adclicks = phpAds_dbFetchArray($res_adclicks)) {
                                $log .= "      " . $row_adclicks['t_stamp_f'] . ":   " . $row_adclicks['qnt'] . "\n";
                                $total += $row_adclicks['qnt'];
                            }
                            $log .= $strTotalThisPeriod . ": " . $total . "\n";
                            $active_banner_stats = true;
                        } else {
                            $log .= "      " . $strNoClickLoggedInInterval . "\n";
                        }
                    }
                    if ($adconversions > 0) {
                        // Total adconversions
                        $log .= "\n" . $strConversions . " (" . $strTotal . "):   " . $adconversions . "\n";
                        // Fetch all adclicks belonging to banner belonging to client, grouped by day
                        $res_adconversions = phpAds_dbQuery("SELECT" . " SUM(conversions) as qnt" . ",DATE_FORMAT(day, '{$date_format}') as t_stamp_f" . ",TO_DAYS(day) AS the_day" . " FROM " . $phpAds_config['tbl_adstats'] . " WHERE bannerid = " . $row_banners['bannerid'] . " AND conversions>0" . " AND UNIX_TIMESTAMP(day)>=" . $first_unixtimestamp . " AND UNIX_TIMESTAMP(day)<" . $last_unixtimestamp . " GROUP BY day" . " ORDER BY day DESC") or die($strLogErrorConversions . " " . phpAds_dbError());
                        if (phpAds_dbNumRows($res_adconversions)) {
                            $total = 0;
                            while ($row_adconversions = phpAds_dbFetchArray($res_adconversions)) {
                                $log .= "      " . $row_adcconversions['t_stamp_f'] . ":   " . $row_adconversions['qnt'] . "\n";
                                $total += $row_adconversions['qnt'];
                            }
                            $log .= $strTotalThisPeriod . ": " . $total . "\n";
                            $active_banner_stats = true;
                        } else {
                            $log .= "      " . $strNoConversionLoggedInInterval . "\n";
                        }
                    }
                    $log .= "\n\n";
                    if ($active_banner_stats == true || $active_banner_stats == false && $campaign['active'] == 't') {
                        $active_banners = true;
                    }
                }
            }
            if ($active_banners == true) {
                $active_campaigns = true;
            } else {
                $log .= $strNoStatsForCampaign . "\n\n\n";
//.........这里部分代码省略.........
开发者ID:miller-tamil,项目名称:openads-plus,代码行数:101,代码来源:lib-reports.inc.php

示例9: getChannels

 function getChannels()
 {
     global $list_filters;
     if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
         // set publisher id if list is to be filtered by publisher
         if (isset($list_filters['publisher'])) {
             $aParams = array('publisher_id' => $list_filters['publisher']);
             // get channels owned by this publisher's agency
             $aPublisher = Admin_DA::getPublisher($list_filters['publisher']);
             $agencyId = $aPublisher['agency_id'];
             if ($agencyId != 0) {
                 // check that this publisher actually has an agency
                 $aParams2 = array('agency_id' => $agencyId, 'publisher_id' => 0);
                 $aAgencyChannels = Admin_DA::getChannels($aParams2);
             }
         }
         $aChannels = Admin_DA::getChannels($aParams);
         // add any agency-owned channels
         if (isset($aAgencyChannels)) {
             foreach ($aAgencyChannels as $channelId => $aAgencyChannel) {
                 $aChannels[$channelId] = $aAgencyChannel;
             }
         }
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
         $aParams = array('agency_id' => OA_Permission::getEntityId());
         // set publisher id if list is to be filtered by publisher
         if (isset($list_filters['publisher'])) {
             $aParams = array('agency_id' => OA_Permission::getEntityId(), 'publisher_id' => $list_filters['publisher']);
         }
         $aChannels = Admin_DA::getChannels($aParams);
         // add agency-owned channels
         $aParams = array('agency_id' => OA_Permission::getEntityId(), 'publisher_id' => 0);
         $aAgencyChannels = Admin_DA::getChannels($aParams);
         foreach ($aAgencyChannels as $channelId => $aAgencyChannel) {
             $aChannels[$channelId] = $aAgencyChannel;
         }
     } elseif (OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
         $aParams = array('publisher_id' => OA_Permission::getEntityId());
         $aPublishers = Admin_DA::getPublishers($aParams);
         $aParams = array('publisher_id' => implode(',', array_keys($aPublishers)));
         $aChannels = Admin_DA::getChannels($aParams);
         // get channels owned by this publisher's agency
         $aPublisher = Admin_DA::getPublisher(OA_Permission::getEntityId());
         $agencyId = $aPublisher['agency_id'];
         if ($agencyId != 0) {
             // check that this publisher actually has an agency
             $aParams2 = array('agency_id' => $agencyId, 'publisher_id' => 0);
             $aAgencyChannels = Admin_DA::getChannels($aParams2);
         }
         // add agency-owned channels
         if (isset($aAgencyChannels)) {
             foreach ($aAgencyChannels as $channelId => $aAgencyChannel) {
                 $aChannels[$channelId] = $aAgencyChannel;
             }
         }
     } else {
         $aPublishers = array();
         $aChannels = array();
     }
     // add admin-owned channels
     if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN) || OA_Permission::isAccount(OA_ACCOUNT_MANAGER) || OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER)) {
         // add admin-owned channels
         $aParams = array('agency_id' => 0, 'publisher_id' => 0);
         $aAdminChannels = Admin_DA::getChannels($aParams);
         foreach ($aAdminChannels as $channelId => $aAdminChannel) {
             $aChannels[$channelId] = $aAdminChannel;
         }
     }
     $aChannelArray = array();
     foreach ($aChannels as $channelId => $aChannel) {
         $aChannelArray[$channelId] = phpAds_buildName($channelId, $aChannel['name']);
     }
     return $aChannelArray;
 }
开发者ID:villos,项目名称:tree_admin,代码行数:74,代码来源:ChannelIdField.php

示例10: phpAds_getClientListOrder

        $navorder = '';
    }
    if (isset($Session['prefs']['advertiser-index.php']['orderdirection'])) {
        $navdirection = $Session['prefs']['advertiser-index.php']['orderdirection'];
    } else {
        $navdirection = '';
    }
    // Get other advertisers
    if (phpAds_isUser(phpAds_Admin)) {
        $query = "SELECT * FROM " . $phpAds_config['tbl_clients'] . phpAds_getClientListOrder($navorder, $navdirection);
    } elseif (phpAds_isUser(phpAds_Agency)) {
        $query = "SELECT * FROM " . $phpAds_config['tbl_clients'] . " WHERE agencyid=" . $Session['userid'] . phpAds_getClientListOrder($navorder, $navdirection);
    }
    $res = phpAds_dbQuery($query) or phpAds_sqlDie();
    while ($row = phpAds_dbFetchArray($res)) {
        phpAds_PageContext(phpAds_buildName($row['clientid'], $row['clientname']), "advertiser-trackers.php?clientid=" . $row['clientid'], $clientid == $row['clientid']);
    }
    phpAds_PageShortcut($strClientHistory, 'stats-advertiser-history.php?clientid=' . $clientid, 'images/icon-statistics.gif');
    phpAds_PageHeader("4.1.4");
    echo "\t\t\t\t<img src='images/icon-advertiser.gif' align='absmiddle'>&nbsp;\n";
    echo "\t\t\t\t<b>" . phpAds_getClientName($clientid) . "</b>\n";
    echo "\t\t\t\t<br><br><br>\n";
    phpAds_ShowSections(array("4.1.2", "4.1.3", "4.1.4"));
}
/*********************************************************/
/* Main code                                             */
/*********************************************************/
// Get clients & campaign and build the tree
$res_trackers = phpAds_dbQuery("SELECT *" . " FROM " . $phpAds_config['tbl_trackers'] . " WHERE clientid=" . $clientid . phpAds_getTrackerListOrder($listorder, $orderdirection)) or phpAds_sqlDie();
if (phpAds_isUser(phpAds_Admin) || phpAds_isUser(phpAds_Agency) || phpAds_isAllowed(phpAds_AddTracker)) {
    echo "\t\t\t\t<img src='images/icon-tracker-new.gif' border='0' align='absmiddle'>\n";
开发者ID:miller-tamil,项目名称:openads-plus,代码行数:31,代码来源:advertiser-trackers.php

示例11: phpAds_registerGlobal

// Include required files
require "config.php";
require "lib-statistics.inc.php";
require "lib-size.inc.php";
require "lib-zones.inc.php";
require_once 'lib-data-statistics.inc.php';
require_once 'lib-data-campaigns.inc.php';
require_once 'lib-prefs.inc.php';
// Register input variables
phpAds_registerGlobal('campaignid', 'clientid', 'collapse', 'expand', 'keep', 'listorder', 'omit', 'orderdirection');
$page = 'stats-campaign-optimise.php';
// BUILD PAGE HEADER
if (phpAds_isUser(phpAds_Admin)) {
    $res = phpAds_dbQuery("SELECT *" . " FROM " . $phpAds_config['tbl_campaigns'] . " WHERE clientid = " . $clientid) or phpAds_sqlDie();
    while ($row = phpAds_dbFetchArray($res)) {
        phpAds_PageContext(phpAds_buildName($row['campaignid'], $row['campaignname']), $page . "?clientid=" . $clientid . "&campaignid=" . $row['campaignid'], $campaignid == $row['campaignid']);
    }
    phpAds_PageShortcut($strClientProperties, 'advertiser-edit.php?clientid=' . $clientid, 'images/icon-advertiser.gif');
    phpAds_PageShortcut($strCampaignProperties, 'campaign-edit.php?clientid=' . $clientid . '&campaignid=' . $campaignid, 'images/icon-campaign.gif');
    phpAds_PageHeader("2.1.2.5");
    echo "<img src='images/icon-advertiser.gif' align='absmiddle'>&nbsp;" . phpAds_getParentClientName($campaignid);
    echo "&nbsp;<img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'>&nbsp;";
    echo "<img src='images/icon-campaign.gif' align='absmiddle'>&nbsp;<b>" . phpAds_getCampaignName($campaignid) . "</b><br><br><br>";
    phpAds_ShowSections(array("2.1.2.1", "2.1.2.2", "2.1.2.3", "2.1.2.4", "2.1.2.5"));
}
// GET PREFERENCES
if (!isset($listorder)) {
    $listorder = phpAds_getPref($page, 'listorder');
}
if (!isset($orderdirection)) {
    $orderdirection = phpAds_getPref($page, 'orderdirection');
开发者ID:miller-tamil,项目名称:openads-plus,代码行数:31,代码来源:stats-campaign-optimise.php

示例12: phpAds_dbQuery

if ($agencyid != '') {
    if (isset($Session['prefs']['agency-index.php']['listorder'])) {
        $navorder = $Session['prefs']['agency-index.php']['listorder'];
    } else {
        $navorder = '';
    }
    if (isset($Session['prefs']['agency-index.php']['orderdirection'])) {
        $navdirection = $Session['prefs']['agency-index.php']['orderdirection'];
    } else {
        $navdirection = '';
    }
    $query = "\tSELECT \n\t\t\t\t\t\t*\n\t\t\t\t\tFROM \n\t\t\t\t\t\t" . $phpAds_config['tbl_agency'];
    // Get other agencies
    $res = phpAds_dbQuery($query) or phpAds_sqlDie();
    while ($row = phpAds_dbFetchArray($res)) {
        phpAds_PageContext(phpAds_buildName($row['agencyid'], $row['name']), "agency-edit.php?agencyid=" . $row['agencyid'], $agencyid == $row['agencyid']);
    }
    phpAds_PageHeader("5.5.2");
    echo "<img src='images/icon-advertiser.gif' align='absmiddle'>&nbsp;<b>" . phpAds_getAgencyName($agencyid) . "</b><br><br><br>";
    phpAds_ShowSections(array("5.5.2"));
    // Do not get this information if the page
    // is the result of an error message
    if (!isset($agency)) {
        $res = phpAds_dbQuery("SELECT * FROM " . $phpAds_config['tbl_agency'] . " WHERE agencyid=" . $agencyid) or phpAds_sqlDie();
        if (phpAds_dbNumRows($res)) {
            $agency = phpAds_dbFetchArray($res);
        }
        // Set password to default value
        if ($agency['password'] != '') {
            $agency['password'] = '********';
        }
开发者ID:miller-tamil,项目名称:openads-plus,代码行数:31,代码来源:agency-edit.php

示例13: phpAds_placeInvocationForm


//.........这里部分代码省略.........
        }
        if ($codetype == 'xmlrpc') {
            $show = array('what' => true, 'clientid' => true, 'campaignid' => true, 'target' => true, 'source' => true, 'withtext' => true, 'template' => true, 'hostlanguage' => true);
        }
        if ($codetype == 'local') {
            $show = array('what' => true, 'clientid' => true, 'campaignid' => true, 'target' => true, 'source' => true, 'withtext' => true, 'block' => true, 'blockcampaign' => true, 'raw' => true);
        }
        // What
        if (!$zone_invocation && isset($show['what']) && $show['what'] == true && $codetype != 'adviewnocookies') {
            echo "<tr bgcolor='#F6F6F6'><td width='30'>&nbsp;</td>";
            echo "<td width='200' valign='top'>" . $GLOBALS['strInvocationWhat'] . "</td><td width='370'>";
            echo "<textarea class='flat' name='what' rows='3' cols='50' style='width:350px;' tabindex='" . $tabindex++ . "'>" . (isset($what) ? stripslashes($what) : '') . "</textarea></td></tr>";
            echo "<tr bgcolor='#F6F6F6'><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
            echo "<td bgcolor='#F6F6F6' colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
        }
        /* Remove advetiser from direct invocation - not needed
        		// ClientID
        		if (!$zone_invocation && isset($show['clientid']) && $show['clientid'] == true)
        		{
        			// Display available advertisers...
        			echo "<tr bgcolor='#F6F6F6'><td width='30'>&nbsp;</td>\n";
        			echo "<td width='200'>".$GLOBALS['strInvocationClientID']."</td><td width='370'>\n";
        			echo "<select name='clientid' style='width:350px;' tabindex='".($tabindex++)."'>\n";
        				echo "<option value='0'>-</option>\n";
        			
        			$res = phpAds_dbQuery(
        				"SELECT clientid, clientname".
        				" FROM ".$phpAds_config['tbl_clients']
        			) or phpAds_sqlDie();
        				
        			while ($row = phpAds_dbFetchArray($res))
        			{
        				echo "<option value='".$row['clientid']."'".($clientid == $row['clientid'] ? ' selected' : '').">";
        				echo phpAds_buildName ($row['clientid'], $row['clientname']);
        				echo "</option>\n";
        			}
        			
        			echo "</select>\n";
        			echo "</td></tr>";
        //			echo "<tr bgcolor='#F6F6F6'><td height='10' colspan='3'>&nbsp;</td></tr>";
        //			echo "<tr height='1'><td colspan='3' bgcolor='#888888'><img src='images/break.gif' height='1' width='100%'></td></tr>";
        //			echo "<tr><td height='10' colspan='3'>&nbsp;</td></tr>";
        			echo "<tr bgcolor='#F6F6F6'><td width='30'><img src='images/spacer.gif' height='1' width='100%'></td>";
        			echo "<td bgcolor='#F6F6F6' colspan='2'><img src='images/break-l.gif' height='1' width='200' vspace='6'></td></tr>";
        		}
        		*/
        // CampaignID
        if (!$zone_invocation && isset($show['campaignid']) && $show['campaignid'] == true && $codetype != 'adviewnocookies') {
            // Display available campaigns...
            echo "<tr bgcolor='#F6F6F6'><td width='30'>&nbsp;</td>\n";
            echo "<td width='200'>" . $GLOBALS['strInvocationCampaignID'] . "</td><td width='370'>\n";
            echo "<select name='campaignid' style='width:350px;' tabindex='" . $tabindex++ . "'>\n";
            echo "<option value='0'>-</option>\n";
            if (phpAds_isUser(phpAds_Admin)) {
                $query = "SELECT campaignid,campaignname" . " FROM " . $phpAds_config['tbl_campaigns'];
            } elseif (phpAds_isUser(phpAds_Agency)) {
                $query = "SELECT m.campaignid AS campaignid" . ",m.campaignname AS campaignname" . " FROM " . $phpAds_config['tbl_campaigns'] . " AS m" . "," . $phpAds_config['tbl_clients'] . " AS c" . " WHERE m.clientid=c.clientid" . " AND c.agencyid=" . phpAds_getAgencyID();
            }
            $res = phpAds_dbQuery($query) or phpAds_sqlDie();
            while ($row = phpAds_dbFetchArray($res)) {
                echo "<option value='" . $row['campaignid'] . "'" . ($campaignid == $row['campaignid'] ? ' selected' : '') . ">";
                echo phpAds_buildName($row['campaignid'], $row['campaignname']);
                echo "</option>\n";
            }
            echo "</select>\n";
            echo "</td></tr>";
开发者ID:miller-tamil,项目名称:openads-plus,代码行数:67,代码来源:lib-invocation.inc.php

示例14: elseif

$extra .= "<b>{$strModifyBanner}</b><br>";
$extra .= "<img src='images/break.gif' height='1' width='160' vspace='4'><br>";
$extra .= "<img src='images/icon-duplicate-banner.gif' align='absmiddle'>&nbsp;<a href='banner-modify.php?clientid=" . $clientid . "&campaignid=" . $campaignid . "&bannerid=" . $bannerid . "&duplicate=true&returnurl=banner-acl.php'>{$strDuplicate}</a><br>";
$extra .= "<img src='images/break.gif' height='1' width='160' vspace='4'><br>";
$extra .= "<img src='images/icon-move-banner.gif' align='absmiddle'>&nbsp;{$strMoveTo}<br>";
$extra .= "<img src='images/spacer.gif' height='1' width='160' vspace='2'><br>";
$extra .= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
$extra .= "<select name='moveto' style='width: 110;'>";
if (phpAds_isUser(phpAds_Admin)) {
    $query = "SELECT campaignid,campaignname" . " FROM " . $phpAds_config['tbl_campaigns'] . " WHERE campaignid!=" . $campaignid;
} elseif (phpAds_isUser(phpAds_Agency)) {
    $query = "SELECT m.campaignid AS campaignid" . ",m.campaignname AS campaignname" . " FROM " . $phpAds_config['tbl_campaigns'] . " AS m" . "," . $phpAds_config['tbl_clients'] . " AS c" . " WHERE m.clientid=c.clientid" . " AND m.campaignid!=" . $campaignid . " AND c.agencyid=" . phpAds_getAgencyID();
}
$res = phpAds_dbQuery($query) or phpAds_sqlDie();
while ($row = phpAds_dbFetchArray($res)) {
    $extra .= "<option value='" . $row['campaignid'] . "'>" . phpAds_buildName($row['campaignid'], $row['campaignname']) . "</option>";
}
$extra .= "</select>&nbsp;<input type='image' name='moveto' src='images/" . $phpAds_TextDirection . "/go_blue.gif'><br>";
$extra .= "<img src='images/break.gif' height='1' width='160' vspace='4'><br>";
$extra .= "<img src='images/icon-duplicate-acl.gif' align='absmiddle'>&nbsp;{$strApplyLimitationsTo}<br>";
$extra .= "<img src='images/spacer.gif' height='1' width='160' vspace='2'><br>";
$extra .= "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
$extra .= "<select name='applyto' style='width: 110;'>";
$res = phpAds_dbQuery("SELECT * FROM " . $phpAds_config['tbl_banners'] . " WHERE bannerid != '" . $bannerid . "' AND campaignid = '" . $campaignid . "'") or phpAds_sqlDie();
while ($row = phpAds_dbFetchArray($res)) {
    $extra .= "<option value='" . $row['bannerid'] . "'>" . phpAds_buildBannerName($row['bannerid'], $row['description'], $row['alt']) . "</option>";
}
$extra .= "</select>&nbsp;<input type='image' name='applyto' src='images/" . $phpAds_TextDirection . "/go_blue.gif'><br>";
$extra .= "<img src='images/break.gif' height='1' width='160' vspace='4'><br>";
$extra .= "<img src='images/icon-recycle.gif' align='absmiddle'>&nbsp;<a href='banner-delete.php?clientid=" . $clientid . "&campaignid=" . $campaignid . "&bannerid=" . $bannerid . "&returnurl=campaign-banners.php'" . phpAds_DelConfirm($strConfirmDeleteBanner) . ">{$strDelete}</a><br>";
$extra .= "</form>";
开发者ID:miller-tamil,项目名称:openads-plus,代码行数:31,代码来源:banner-acl.php

示例15: _prepareCampaignActivatedDeactivatedEmailBody

 /**
  * A private method to prepare the body of an advertiser's "campaign activated"
  * or "campaign deactivated" report email.
  *
  * @access private
  * @param integer $advertiserId The advertiser's ID.
  * @param array   $acampaign    The campaign details.
  */
 function _prepareCampaignActivatedDeactivatedEmailBody($aCampaign)
 {
     // Load the "Campaign" and "Banner" strings, and prepare formatting strings
     global $strCampaign, $strBanner;
     $strCampaignLength = strlen($strCampaign);
     $strBannerLength = strlen($strBanner);
     $maxLength = max($strCampaignLength, $strBannerLength);
     $strCampaignPrint = '%-' . $maxLength . 's';
     $strBannerPrint = ' %-' . ($maxLength - 1) . 's';
     // Load remaining strings
     global $strLinkedTo;
     // Prepare the result
     $emailBody = '';
     // Add the name of the campaign to the report
     $emailBody .= "\n" . sprintf($strCampaignPrint, $strCampaign) . ' ';
     $emailBody .= strip_tags(phpAds_buildName($aCampaign['campaignid'], $aCampaign['campaignname'])) . "\n";
     // Add a URL link to the stats page of the campaign
     $page = 'stats.php?clientid=' . $aCampaign['clientid'] . '&campaignid=' . $aCampaign['campaignid'] . '&statsBreakdown=day&entity=campaign&breakdown=history&period_preset=all_stats&period_start=&period_end=';
     $emailBody .= MAX::constructURL(MAX_URL_ADMIN, $page) . "\n";
     // Add a nice divider
     $emailBody .= "=======================================================\n\n";
     // Fetch all ads in the campaign
     $doBanners = OA_Dal::factoryDO('banners');
     $doBanners->campaignid = $aCampaign['campaignid'];
     $doBanners->orderBy('bannerid');
     $doBanners->find();
     if ($doBanners->getRowCount() > 0) {
         while ($doBanners->fetch()) {
             $aAd = $doBanners->toArray();
             // Add the name of the ad to the report
             $emailBody .= sprintf($strBannerPrint, $strBanner) . ' ';
             $emailBody .= strip_tags(phpAds_buildBannerName($aAd['bannerid'], $aAd['description'], $aAd['alt'])) . "\n";
             // If the ad has a URL, add the URL the add is linked to to the report
             if (!empty($aAd['url'])) {
                 $emailBody .= '  ' . $strLinkedTo . ': ' . $aAd['url'] . "\n";
             }
             $emailBody .= "\n";
         }
     }
     return $emailBody;
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:49,代码来源:Email.php


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