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


PHP Admin_DA::getAgency方法代码示例

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


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

示例1: testGetAgency

 function testGetAgency()
 {
     TestEnv::startTransaction();
     $id = Admin_DA::addAgency(array('name' => 'foo', 'contact' => 'bar', 'username' => 'user', 'email' => 'agent@example.com'));
     $ret = Admin_DA::getAgency($id);
     // should look like this
     /*
     Array
     (
         [agency_id] => 1
         [name] => my agency
         [contact] => foo bar
         [email] => foo@example.com
         [username] => Ronald
         [password] => Reagan
         [permissions] => 33
         [language] => chinese
     )
     */
     $this->assertTrue(is_array($ret));
     $this->assertTrue(count($ret));
     $this->assertTrue(array_key_exists('agency_id', $ret));
     $this->assertTrue(array_key_exists('name', $ret));
     $this->assertTrue(array_key_exists('contact', $ret));
     $this->assertTrue(array_key_exists('email', $ret));
     TestEnv::rollbackTransaction();
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:27,代码来源:AdminDA.dal.test.php

示例2: MAX_displayChannels

function MAX_displayChannels($channels, $aParams)
{
    $entityString = _getEntityString($aParams);
    echo "<table border='0' width='100%' cellpadding='0' cellspacing='0'>";
    echo "<tr height='25'><td height='25'><b>&nbsp;&nbsp;{$GLOBALS['strName']}</a></b></td>";
    echo "<td height='25'><b>{$GLOBALS['strID']}</a></td>";
    echo "<td height='25'>&nbsp;</td>";
    echo "</tr>";
    echo "<tr height='1'><td colspan='3' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break.gif' height='1' width='100%'></td></tr>";
    if (empty($channels)) {
        echo "<tr height='25' bgcolor='#F6F6F6'><td height='25' colspan='3'>";
        echo "&nbsp;&nbsp;{$GLOBALS['strNoChannels']}</td></tr>";
        echo "<td colspan='3' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break.gif' height='1' width='100%'></td></tr>";
    } else {
        $i = 0;
        foreach ($channels as $channelId => $channel) {
            if ($i > 0) {
                echo "<td colspan='3' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break.gif' height='1' width='100%'></td>";
            }
            echo "<tr height='25' " . ($i % 2 == 0 ? "bgcolor='#F6F6F6'" : "") . ">";
            echo "<td height='25'>&nbsp;&nbsp;";
            echo "<img src='" . OX::assetPath() . "/images/icon-channel.gif' align='absmiddle'>&nbsp;";
            // set channel ownership info for display
            if ($GLOBALS['pageName'] != 'affiliate-channels.php') {
                if (!empty($channel['publisher_id'])) {
                    $ownerTypeStr = 'Publisher: ';
                    $publisher = Admin_DA::getPublisher($channel['publisher_id']);
                    $ownerNameStr = '[id' . $channel['publisher_id'] . '] ' . $publisher['name'];
                } else {
                    if (!empty($channel['agency_id']) && empty($channel['publisher_id']) && !OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) {
                        $ownerTypeStr = 'Agency: ';
                        $agency = Admin_DA::getAgency($channel['agency_id']);
                        $ownerNameStr = '[id' . $channel['agency_id'] . '] ' . $agency['name'];
                    } else {
                        $ownerTypeStr = '';
                        $ownerNameStr = '';
                    }
                }
            }
            $ownerStr = !empty($ownerTypeStr) ? '&nbsp&nbsp<i>' . $ownerTypeStr . '</i>' . htmlspecialchars($ownerNameStr) : '';
            echo "<a href='channel-edit.php?{$entityString}channelid={$channel['channel_id']}'>" . htmlspecialchars($channel['name'] . $ownerStr) . "</a>";
            echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
            echo "</td>";
            echo "<td height='25'>{$channel['channel_id']}</td>";
            echo "<td>&nbsp;</td></tr>";
            // Description
            echo "<tr height='25' " . ($i % 2 == 0 ? "bgcolor='#F6F6F6'" : "") . ">";
            echo "<td>&nbsp;</td>";
            echo "<td height='25' colspan='3'>" . htmlspecialchars(stripslashes($channel['description'])) . "</td>";
            echo "</tr>";
            echo "<tr height='1'>";
            echo "<td " . ($i % 2 == 0 ? "bgcolor='#F6F6F6'" : "") . "><img src='" . OX::assetPath() . "/images/spacer.gif' width='1' height='1'></td>";
            echo "<td colspan='3' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break-l.gif' height='1' width='100%'></td>";
            echo "</tr>";
            echo "<tr height='25' " . ($i % 2 == 0 ? "bgcolor='#F6F6F6'" : "") . ">";
            // Empty
            echo "<td>&nbsp;</td>";
            // Buttons
            echo "<td height='25' colspan='3'>";
            echo "<img src='" . OX::assetPath() . "/images/icon-acl.gif' border='0' align='absmiddle' alt='{$GLOBALS['strIncludedBanners']}'>&nbsp;<a href='channel-acl.php?{$entityString}channelid={$channel['channel_id']}'>{$GLOBALS['strEditChannelLimitations']}</a>&nbsp;&nbsp;&nbsp;&nbsp;";
            echo "<img src='" . OX::assetPath() . "/images/icon-recycle.gif' border='0' align='absmiddle' alt='{$GLOBALS['strDelete']}'>&nbsp;<a href='channel-delete.php?token=" . urlencode(phpAds_SessionGetToken()) . "&{$entityString}channelid={$channel['channel_id']}&returnurl=" . (empty($aParams['affiliateid']) ? 'channel-index.php' : 'affiliate-channels.php') . "'" . phpAds_DelConfirm($GLOBALS['strConfirmDeleteChannel']) . ">{$GLOBALS['strDelete']}</a>&nbsp;&nbsp;&nbsp;&nbsp;";
            echo "</td></tr>";
            $i++;
        }
        if (!empty($channels)) {
            echo "<tr height='1'><td colspan='4' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break.gif' height='1' width='100%'></td></tr>";
        }
    }
    echo "</table>";
}
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:70,代码来源:html.php


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