コード例 #1
0
 /**
  * Outputs the HTML to display the data for this limitation
  *
  * @return void
  */
 function displayData()
 {
     $this->data = $this->_expandData($this->data);
     $tabindex =& $GLOBALS['tabindex'];
     // The region plugin is slightly different since we need to allow for multiple regions in different countries
     echo "\n            <table border='0' cellpadding='2'>\n                <tr>\n                    <th>" . $this->translate('Country') . "</th>\n                    <td>\n                        <select name='acl[{$this->executionorder}][data][]' {$disabled}>";
     foreach ($this->res as $countryCode => $countryName) {
         if (count($countryName) === 1) {
             continue;
         }
         $selected = $this->data[0] == $countryCode ? 'selected="selected"' : '';
         echo "<option value='{$countryCode}' {$selected}>{$countryName[0]}</option>";
     }
     echo "\n                        </select>\n                    &nbsp;<input type='image' name='action[none]' src='" . OX::assetPath() . "/images/{$GLOBALS['phpAds_TextDirection']}/go_blue.gif' border='0' align='absmiddle' alt='{$GLOBALS['strSave']}'></td>\n                </tr>";
     if (!empty($this->data[0])) {
         // A country has been selected, show city list for this country...
         // Note: Since a disabled field does not pass it's value through, we need to pass the selected country in...
         echo "<tr><th>" . $this->translate('Region(s)') . "</th><td><div class='box'>";
         $aRegions = $this->res[$this->data[0]];
         unset($aRegions[0]);
         $aSelectedRegions = $this->data;
         unset($aSelectedRegions[0]);
         foreach ($aRegions as $sCode => $sName) {
             echo "<div class='boxrow'>";
             echo "<input tabindex='" . $tabindex++ . "' ";
             echo "type='checkbox' id='c_{$this->executionorder}_{$sCode}' name='acl[{$this->executionorder}][data][]' value='{$sCode}'" . (in_array($sCode, $aSelectedRegions) ? ' CHECKED' : '') . ">{$sName}</div>";
         }
         echo "</div></td></tr>";
     }
     echo "\n            </table>\n        ";
     $this->data = $this->_flattenData($this->data);
 }
コード例 #2
0
 /**
  * A method that echos the HTML for this field.
  */
 function display()
 {
     $oStartDate = $this->getStartDate();
     $startDateStr = is_null($oStartDate) ? '' : $oStartDate->format('%Y-%m-%d');
     $oEndDate = $this->getEndDate();
     $endDateStr = is_null($oEndDate) ? '' : $oEndDate->format('%Y-%m-%d');
     echo "\n        <select name='{$this->_name}_preset' id='{$this->_name}_preset' onchange='{$this->_name}FormChange(" . ($this->_autoSubmit ? 1 : 0) . ")' tabindex='" . $this->_tabIndex++ . "'>";
     foreach ($this->_fieldSelectionNames as $v => $n) {
         $selected = $v == $this->_fieldSelectionValue ? " selected='selected'" : '';
         echo "\n            <option value='{$v}'{$selected}>{$n}</option>";
     }
     echo "\n        </select>\n        <label for='{$this->_name}_start' style='margin-left: 1em'> " . $this->oTrans->translate('From') . "</label>\n        <input class='date' name='{$this->_name}_start' id='{$this->_name}_start' type='text' value='{$startDateStr}' tabindex='" . $this->_tabIndex++ . "' />\n        <input type='image' src='" . OX::assetPath() . "/images/icon-calendar.gif' id='{$this->_name}_start_button' align='absmiddle' border='0' tabindex='" . $this->_tabIndex++ . "' />\n        <label for='{$this->_name}_end' style='margin-left: 1em'> " . $this->oTrans->translate('To') . "</label>\n        <input class='date' name='{$this->_name}_end' id='{$this->_name}_end' type='text' value='{$endDateStr}' tabindex='" . $this->_tabIndex++ . "' />\n        <input type='image' src='" . OX::assetPath() . "/images/icon-calendar.gif' id='{$this->_name}_end_button' align='absmiddle' border='0' tabindex='" . $this->_tabIndex++ . "' />\n        <script type='text/javascript'>\n        <!--\n        Calendar.setup({\n            inputField : '{$this->_name}_start',\n            ifFormat   : '%Y-%m-%d',\n            button     : '{$this->_name}_start_button',\n            align      : 'Bl',\n            weekNumbers: false,\n            firstDay   : " . ($GLOBALS['pref']['ui_week_start_day'] ? 1 : 0) . ",\n            electric   : false\n        })\n        Calendar.setup({\n            inputField : '{$this->_name}_end',\n            ifFormat   : '%Y-%m-%d',\n            button     : '{$this->_name}_end_button',\n            align      : 'Bl',\n            weekNumbers: false,\n            firstDay   : " . ($GLOBALS['pref']['ui_week_start_day'] ? 1 : 0) . ",\n            electric   : false\n        })\n        // Tabindex handling\n        {$this->_name}TabIndex = " . ($this->_tabIndex - 4) . ";\n        // Functions\n        function {$this->_name}Reset()\n        {\n            document.getElementById('{$this->_name}_start').value = '{$startDateStr}';\n            document.getElementById('{$this->_name}_start').value = '{$endDateStr}';\n            document.getElementById('{$this->_name}_preset').value = '{$this->_fieldSelectionValue}';\n        }\n        function {$this->_name}FormSubmit() {\n            submitForm();\n            return false;\n        }\n        function {$this->_name}FormChange(bAutoSubmit)\n        {\n            var o = document.getElementById('{$this->_name}_preset');\n            var {$this->_name}SelectName = o.options[o.selectedIndex].value;\n            var specific = {$this->_name}SelectName == 'specific';";
     $oTmpDaySpan = new OA_Admin_DaySpan();
     foreach ($this->_fieldSelectionNames as $v => $n) {
         if ($v != 'specific') {
             if ($v != 'all_events') {
                 $oTmpDaySpan->setSpanPresetValue($v);
                 $oTmpStartDate = $oTmpDaySpan->getStartDate();
                 $sTmpStartDate = $oTmpStartDate->format('%Y-%m-%d');
                 $oTmpEndDate = $oTmpDaySpan->getEndDate();
                 $sTmpEndDate = $oTmpEndDate->format('%Y-%m-%d');
             } else {
                 $sTmpStartDate = '';
                 $sTmpEndDate = '';
             }
             echo "\n            if ({$this->_name}SelectName == '{$v}') {\n                document.getElementById('{$this->_name}_start').value = '{$sTmpStartDate}';\n                document.getElementById('{$this->_name}_end').value = '{$sTmpEndDate}';\n            }\n                ";
         }
     }
     echo "\n\n            document.getElementById('{$this->_name}_start').readOnly = !specific;\n            document.getElementById('{$this->_name}_end').readOnly = !specific;\n\n            if (!specific) {\n                document.getElementById('{$this->_name}_start').style.backgroundColor = '#CCCCCC';\n                document.getElementById('{$this->_name}_end').style.backgroundColor = '#CCCCCC';\n                document.getElementById('{$this->_name}_start').tabIndex = null;\n                document.getElementById('{$this->_name}_start_button').tabIndex = null;\n                document.getElementById('{$this->_name}_end').tabIndex = null;\n                document.getElementById('{$this->_name}_end_button').tabIndex = null;\n            } else {\n                document.getElementById('{$this->_name}_start').style.backgroundColor = '#FFFFFF';\n                document.getElementById('{$this->_name}_end').style.backgroundColor = '#FFFFFF';\n                document.getElementById('{$this->_name}_start').tabIndex = {$this->_name}TabIndex;\n                document.getElementById('{$this->_name}_start_button').tabIndex = {$this->_name}TabIndex + 1;\n                document.getElementById('{$this->_name}_end').tabIndex = {$this->_name}TabIndex + 2;\n                document.getElementById('{$this->_name}_end_button').tabIndex = {$this->_name}TabIndex + 3;\n            }\n\n            document.getElementById('{$this->_name}_start_button').readOnly = !specific;\n            document.getElementById('{$this->_name}_end_button').readOnly = !specific;\n            document.getElementById('{$this->_name}_start_button').src = specific ? '" . OX::assetPath() . "/images/icon-calendar.gif' : '" . OX::assetPath() . "/images/icon-calendar-d.gif';\n            document.getElementById('{$this->_name}_end_button').src = specific ? '" . OX::assetPath() . "/images/icon-calendar.gif' : '" . OX::assetPath() . "/images/icon-calendar-d.gif';\n            document.getElementById('{$this->_name}_start_button').style.cursor = specific ? 'auto' : 'default';\n            document.getElementById('{$this->_name}_end_button').style.cursor = specific ? 'auto' : 'default';\n\n            if (!specific && bAutoSubmit) {\n                submitForm();\n            }\n        }\n        {$this->_name}FormChange(0);\n        //-->\n        </script>";
 }
コード例 #3
0
ファイル: Flexy.php プロジェクト: villos/tree_admin
 function showAveragedColumnLegend()
 {
     if (!self::$averagedColumnDisplayed) {
         return '';
     }
     return '<img src="' . OX::assetPath() . '/images/warning.gif" width="16 height="16" alt="" title="" />: ' . $GLOBALS['strAveragedColumnLegend'];
 }
コード例 #4
0
 /**
  * PHP5-style constructor
  */
 function __construct()
 {
     $this->_useDefaultDal();
     $this->advertiser_id = MAX_getValue('clientid', 0);
     $this->tracker_id = MAX_getValue('trackerid', 0);
     $this->assetPath = OX::assetPath();
     $this->showReminder = false;
 }
コード例 #5
0
ファイル: Grid.php プロジェクト: hostinger/revive-adserver
 /**
  * A method to launch and display the widget
  *
  */
 function display()
 {
     $oTpl = new OA_Admin_Template('dashboard/grid.html');
     $oTpl->assign('dashboardURL', MAX::constructURL(MAX_URL_ADMIN, 'dashboard.php'));
     $oTpl->assign('cssURL', OX::assetPath() . "/css");
     $oTpl->assign('imageURL', OX::assetPath() . "/images");
     $oTpl->assign('jsURL', OX::assetPath() . "/js");
     $oTpl->display();
 }
コード例 #6
0
function phpAds_MaintenanceSelection($subSection, $mainSection = 'maintenance')
{
    global $phpAds_TextDirection, $strBanners, $strCache, $strChooseSection, $strPriority, $strSourceEdit, $strStats, $strStorage, $strMaintenance, $strCheckForUpdates, $strViewPastUpdates, $strEncoding, $strDeliveryLimitations, $strAppendCodes, $strMenus, $strPlugins;
    ?>
<script language="JavaScript">
<!--
function maintenance_goto_section()
{
    s = document.maintenance_selection.section.selectedIndex;

    s = document.maintenance_selection.section.options[s].value;
    document.location = '<?php 
    echo $mainSection;
    ?>
-' + s + '.php';
}
// -->
</script>
<?php 
    $conf =& $GLOBALS['_MAX']['CONF'];
    $pref =& $GLOBALS['_MAX']['PREF'];
    echo "<table border='0' width='100%' cellpadding='0' cellspacing='0'>";
    echo "<tr><form name='maintenance_selection'><td height='35'>";
    echo "<b>" . $strChooseSection . ":&nbsp;</b>";
    echo "<select name='section' onChange='maintenance_goto_section();'>";
    if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) {
        if ($mainSection == 'updates') {
            echo "<option value='product'" . ($subSection == 'product' ? ' selected' : '') . ">" . $strCheckForUpdates . "</option>";
            echo "<option value='history'" . ($subSection == 'history' ? ' selected' : '') . ">" . $strViewPastUpdates . "</option>";
        } else {
            echo "<option value='maintenance'" . ($subSection == 'maintenance' ? ' selected' : '') . ">" . $strMaintenance . "</option>";
            echo "<option value='banners'" . ($subSection == 'banners' ? ' selected' : '') . ">" . $strBanners . "</option>";
            echo "<option value='priority'" . ($subSection == 'priority' ? ' selected' : '') . ">" . $strPriority . "</option>";
            $login = '******' . $conf['store']['ftpUsername'] . ':' . $conf['store']['ftpPassword'] . '@' . $conf['store']['ftpHost'] . '/' . $conf['store']['ftpPath'];
            if ($conf['allowedBanners']['web'] == true && ($conf['store']['mode'] == 0 && $conf['store']['webDir'] != '' || $conf['store']['mode'] == 1 && $login != '') && $conf['webpath']['images'] != '') {
                echo "<option value='storage'" . ($subSection == 'storage' ? ' selected' : '') . ">" . $strStorage . "</option>";
            }
            //            if (!isset($conf['delivery']['cache']) || $conf['delivery']['cache'] != 'none')
            //                echo "<option value='cache'".($subSection == 'zones' ? ' selected' : '').">".$strCache."</option>";
            if ($conf['delivery']['acls']) {
                echo "<option value='acls'" . ($subSection == 'acls' ? ' selected' : '') . ">" . $strDeliveryLimitations . "</option>";
            }
            echo "<option value='appendcodes'" . ($subSection == 'appendcodes' ? ' selected' : '') . ">" . $strAppendCodes . "</option>";
            echo "<option value='encoding'" . ($subSection == 'encoding' ? ' selected' : '') . ">{$strEncoding}</option>";
            echo "<option value='menus'" . ($subSection == 'menus' ? ' selected' : '') . ">" . $strMenus . "</option>";
            echo "<option value='plugins'" . ($subSection == 'plugins' ? ' selected' : '') . ">" . $strPlugins . "</option>";
        }
    }
    // Switched off
    // echo "<option value='finance'".($subSection == 'finance' ? ' selected' : '').">Finance</option>";
    echo "</select>&nbsp;<a href='javascript:void(0)' onClick='maintenance_goto_section();'>";
    echo "<img src='" . OX::assetPath() . "/images/" . $phpAds_TextDirection . "/go_blue.gif' border='0'></a>";
    echo "</td></form></tr>";
    echo "</table>";
    phpAds_ShowBreak();
}
コード例 #7
0
 /**
  * Outputs the HTML to display the data for this limitation
  *
  * @return void
  */
 function displayData()
 {
     $this->data = $this->_expandData($this->data);
     $tabindex =& $GLOBALS['tabindex'];
     if ($this->data['day'] == 0 && $this->data['month'] == 0 && $this->data['year'] == 0) {
         $set = false;
     } else {
         $set = true;
     }
     echo "<table><tr><td>";
     if ($set) {
         $oDate = new Date($this->data['year'] . '-' . $this->data['month'] . '-' . $this->data['day']);
     }
     $dateStr = is_null($oDate) ? '' : $oDate->format('%d %B %Y ');
     echo "\n        <input class='date' name='acl[{$this->executionorder}][data][date]' id='acl[{$this->executionorder}][data][day]' type='text' value='{$dateStr}' tabindex='" . $tabindex++ . "' />\n        <input type='image' src='" . OX::assetPath() . "/images/icon-calendar.gif' id='{$this->executionorder}_button' align='absmiddle' border='0' tabindex='" . $tabindex++ . "' />\n        <script type='text/javascript'>\n        <!--\n        Calendar.setup({\n            inputField : 'acl[{$this->executionorder}][data][day]',\n            ifFormat   : '%d %B %Y',\n            button     : '{$this->executionorder}_button',\n            align      : 'Bl',\n            weekNumbers: false,\n            firstDay   : " . ($GLOBALS['pref']['begin_of_week'] ? 1 : 0) . ",\n            electric   : false\n        })\n        //-->\n        </script>";
     echo "</td></tr></table>";
     $this->data = $this->_flattenData($this->data);
 }
コード例 #8
0
 function placeLayerSettings()
 {
     global $align, $collapsetime, $padding, $closetext;
     global $tabindex;
     if (!isset($align)) {
         $align = 'right';
     }
     if (!isset($collapsetime)) {
         $collapsetime = '-';
     }
     if (!isset($padding)) {
         $padding = '2';
     }
     if (!isset($closetext)) {
         $closetext = $this->translate("[Close]");
     }
     $buffer = '';
     $buffer .= "<tr><td height='10' colspan='3'>&nbsp;</td></tr>";
     $buffer .= "<tr height='1'><td colspan='3' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break-el.gif' height='1' width='100%'></td></tr>";
     $buffer .= "<tr><td height='10' colspan='3'>&nbsp;</td></tr>";
     $buffer .= "<tr><td width='30'>&nbsp;</td>";
     $buffer .= "<td width='200'>" . $this->translate("Alignment") . "</td><td width='370'>";
     $buffer .= "<select name='align' style='width:175px;' tabindex='" . $tabindex++ . "'>";
     $buffer .= "<option value='left'" . ($align == 'left' ? ' selected' : '') . ">" . $this->translate("Left") . "</option>";
     $buffer .= "<option value='center'" . ($align == 'center' ? ' selected' : '') . ">" . $this->translate("Center") . "</option>";
     $buffer .= "<option value='right'" . ($align == 'right' ? ' selected' : '') . ">" . $this->translate("Right") . "</option>";
     $buffer .= "</select>";
     $buffer .= "</td></tr>";
     $buffer .= "<tr><td width='30'><img src='" . OX::assetPath() . "/images/spacer.gif' height='5' width='100%'></td></tr>";
     $buffer .= "<tr><td width='30'>&nbsp;</td>";
     $buffer .= "<td width='200'>" . $this->translate("Close text") . "</td><td width='370'>";
     $buffer .= "<input class='flat' type='text' name='closetext' size='' value='" . $closetext . "' style='width:175px;' tabindex='" . $tabindex++ . "'></td></tr>";
     $buffer .= "<tr><td width='30'><img src='" . OX::assetPath() . "/images/spacer.gif' height='5' width='100%'></td></tr>";
     $buffer .= "<tr><td width='30'>&nbsp;</td>";
     $buffer .= "<td width='200'>" . $this->translate("Automatically collapse after") . "</td><td width='370'>";
     $buffer .= "<input class='flat' type='text' name='collapsetime' size='' value='" . (isset($collapsetime) ? $collapsetime : '-') . "' style='width:60px;' tabindex='" . $tabindex++ . "'> " . $GLOBALS['strAbbrSeconds'] . "</td></tr>";
     $buffer .= "<tr><td width='30'><img src='" . OX::assetPath() . "/images/spacer.gif' height='5' width='100%'></td></tr>";
     $buffer .= "<tr><td width='30'>&nbsp;</td>";
     $buffer .= "<td width='200'>" . $this->translate("Banner padding") . "</td><td width='370'>";
     $buffer .= "<input class='flat' type='text' name='padding' size='' value='" . (isset($padding) ? $padding : '0') . "' style='width:60px;' tabindex='" . $tabindex++ . "'> " . $GLOBALS['strAbbrPixels'] . "</td></tr>";
     $buffer .= "<tr><td width='30'><img src='" . OX::assetPath() . "/images/spacer.gif' height='5' width='100%'></td></tr>";
     return $buffer;
 }
コード例 #9
0
function phpAds_showCache()
{
    $conf = $GLOBALS['_MAX']['CONF'];
    global $strSize, $strKiloByte;
    global $phpAds_TextDirection;
    $rows = phpAds_cacheInfo();
    if (is_array($rows)) {
        $i = 0;
        // Header
        echo "<table width='100%' border='0' align='center' cellspacing='0' cellpadding='0'>";
        echo "<tr height='25'>";
        echo "<td height='25'><b>" . $strSize . "</b></td>";
        echo "</tr>";
        echo "<tr height='1'><td colspan='5' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break.gif' height='1' width='100%'></td></tr>";
        foreach (array_keys($rows) as $key) {
            strtok($key, "=");
            $what = strtok("&");
            if ($i > 0) {
                echo "<tr height='1'><td colspan='5' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break-l.gif' height='1' width='100%'></td></tr>";
            }
            echo "<tr height='25' " . ($i % 2 == 0 ? "bgcolor='#F6F6F6'" : "") . ">";
            echo "<td height='25'>";
            echo "&nbsp;&nbsp;";
            // Icon
            if (substr($what, 0, 5) == 'zone:') {
                echo "<img src='" . OX::assetPath() . "/images/icon-zone.gif' align='absmiddle'>&nbsp;";
            } else {
                echo "<img src='" . OX::assetPath() . "/images/icon-generatecode.gif' align='absmiddle'>&nbsp;";
            }
            // Name
            echo $what;
            echo "</td>";
            echo "<td height='25'>" . round($rows[$key] / 1024) . " " . $strKiloByte . "</td>";
            echo "</tr>";
            $i++;
        }
        // Footer
        echo "<tr height='1'><td colspan='5' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break.gif' height='1' width='100%'></td></tr>";
        echo "</table>";
    }
}
コード例 #10
0
 /**
  * Outputs the HTML to display the data for this limitation
  *
  * @return void
  */
 function displayData()
 {
     $this->data = $this->_expandData($this->data);
     $tabindex =& $GLOBALS['tabindex'];
     // The city plugin is slightly different since we need to allow for multiple city names in different countries
     echo "\n            <table border='0' cellpadding='2'>\n                <tr>\n                    <th>" . $this->translate('Country') . "</th>\n                    <td>\n                        <select name='acl[{$this->executionorder}][data][]' {$disabled}>";
     foreach ($this->res as $countryCode => $countryName) {
         $selected = $this->data[0] == $countryCode ? 'selected="selected"' : '';
         echo "<option value='{$countryCode}' {$selected}>{$countryName}</option>";
     }
     echo "\n                        </select>\n                    &nbsp;<input type='image' name='action[none]' src='" . OX::assetPath() . "/images/{$GLOBALS['phpAds_TextDirection']}/go_blue.gif' border='0' align='absmiddle' alt='{$GLOBALS['strSave']}'></td>\n                </tr>";
     if (isset($this->data[0])) {
         // A country has been selected, show city list for this country...
         // Note: Since a disabled field does not pass it's value through, we need to pass the selected country in...
         echo "<tr><th>" . $this->translate('City(s)') . "</th><td>";
         echo "<input type='text' name='acl[{$this->executionorder}][data][]' value='" . htmlspecialchars($this->data[1], ENT_QUOTES) . "' tabindex='" . $tabindex++ . "' />";
         echo "</td></tr>";
     }
     echo "\n            </table>\n        ";
     $this->data = $this->_flattenData($this->data);
 }
コード例 #11
0
        echo "<td><br />" . $maint_update[1]['description'] . "<br /><br />";
        echo "</td>";
        echo "<td width='32'>&nbsp;</td>";
        echo "</tr>";
        if ($maint_update[1]['url_zip'] != '' || $maint_update[1]['url_tgz'] != '') {
            echo "<tr height='1'><td colspan='2' bgcolor='#F6F6F6'><img src='" . OX::assetPath() . "/images/spacer.gif' height='1' width='100%'>";
            echo "<td colspan='2' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break-el.gif' height='1' width='100%'></td></tr>";
            echo "<tr height='25' bgcolor='#F6F6F6'><td height='25' colspan='2'>&nbsp;&nbsp;</td><td>";
            if ($maint_update[1]['url_zip'] != '') {
                echo "<img src='" . OX::assetPath() . "/images/icon-filetype-zip.gif' align='absmiddle'>&nbsp;";
                echo "<a href='" . $maint_update[1]['url_zip'] . "'>" . $strDownloadZip . "</a>";
                if ($maint_update[1]['url_tgz'] != '') {
                    echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
                }
            }
            if ($maint_update[1]['url_tgz'] != '') {
                echo "<img src='" . OX::assetPath() . "/images/icon-filetype-zip.gif' align='absmiddle'>&nbsp;";
                echo "<a href='" . $maint_update[1]['url_tgz'] . "'>" . $strDownloadGZip . "</a>";
            }
            echo "</td><td>&nbsp;</td></tr>";
        }
        echo "<tr height='1'><td colspan='4' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break.gif' height='1' width='100%'></td></tr>";
        echo "</table>";
    } else {
        phpAds_Die($strErrorOccurred, $strUpdateServerDown);
    }
}
/*-------------------------------------------------------*/
/* HTML framework                                        */
/*-------------------------------------------------------*/
phpAds_PageFooter();
コード例 #12
0
 function _function_oa_title_sort($aParams, &$smarty)
 {
     if (!empty($aParams['str'])) {
         if (!empty($aParams['item'])) {
             $str = $this->_function_t($aParams, $smarty);
             $item = $aParams['item'];
             $order = !empty($aParams['order']) ? $aParams['order'] : 'down';
             $url = !empty($aParams['url']) ? $aParams['url'] : '#';
             $url .= strpos($url, '?') !== false ? '&' : '?';
             $buffer = '<a href="' . htmlspecialchars($url . 'listorder=' . $item) . '">' . $str . '</a>';
             $listorder = $smarty->get_template_vars('listorder');
             $orderdirection = $smarty->get_template_vars('orderdirection');
             if (empty($listorder) && !empty($aParams['default']) && $aParams['default']) {
                 $listorder = $item;
             }
             if (empty($orderdirection)) {
                 $orderdirection = $order;
             }
             if ($listorder == $item) {
                 $order = $orderdirection == 'down' ? 'up' : 'down';
                 $caret = $orderdirection == 'down' ? 'ds' : 'u';
                 $buffer .= ' <a href="' . htmlspecialchars($url . 'orderdirection=' . $order) . '">';
                 $buffer .= '<img src="' . OX::assetPath() . '/images/caret-' . $caret . '.gif" border="0" alt="" title="">';
                 $buffer .= '</a>';
             }
             return $buffer;
         } else {
             $smarty->trigger_error("t: missing 'item' parameter");
         }
     } else {
         $smarty->trigger_error("t: missing 'str'parameter");
     }
 }
コード例 #13
0
function _getChainZonesImage($aZone)
{
    switch ($aZone['delivery']) {
        case phpAds_ZoneBanner:
            $imageName = '/images/icon-zone.gif';
            break;
        case phpAds_ZoneInterstitial:
            $imageName = '/images/icon-interstitial.gif';
            break;
        case phpAds_ZonePopup:
            $imageName = '/images/icon-popup.gif';
            break;
        case phpAds_ZoneText:
            $imageName = '/images/icon-textzone.gif';
            break;
        default:
            $imageName = '';
    }
    if ($imageName) {
        $image = "<img src='" . OX::assetPath() . "{$imageName}' align='absmiddle'>";
    }
    return $image;
}
コード例 #14
0
// total number of agencies
$agencyCount = count($aManagers);
echo "\t\t\t\t<br /><br /><br /><br />\n";
echo "\t\t\t\t<table width='100%' border='0' align='center' cellspacing='0' cellpadding='0'>\n";
echo "\t\t\t\t<tr>\n";
echo "\t\t\t\t\t<td height='25' colspan='3'>&nbsp;&nbsp;<b>" . $strOverall . "</b></td>\n";
echo "\t\t\t\t</tr>\n";
echo "\t\t\t\t<tr height='1'>\n";
echo "\t\t\t\t\t<td colspan='4' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break.gif' height='1' width='100%'></td>\n";
echo "\t\t\t\t</tr>\n";
echo "\t\t\t\t<tr>\n";
echo "\t\t\t\t\t<td height='25'>&nbsp;&nbsp;" . $strTotalAgencies . ": <b>" . $agencyCount . "</b></td>\n";
echo "\t\t\t\t\t<td height='25' colspan='2'></td>\n";
echo "\t\t\t\t</tr>\n";
echo "\t\t\t\t<tr height='1'>\n";
echo "\t\t\t\t\t<td colspan='3' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break.gif' height='1' width='100%'></td>\n";
echo "\t\t\t\t</tr>\n";
echo "\t\t\t\t</table>\n";
echo "\t\t\t\t<br /><br />\n";
/*-------------------------------------------------------*/
/* Store preferences                                     */
/*-------------------------------------------------------*/
$session['prefs']['agency-index.php']['hideinactive'] = $hideinactive;
$session['prefs']['agency-index.php']['listorder'] = $listorder;
$session['prefs']['agency-index.php']['orderdirection'] = $orderdirection;
$session['prefs']['agency-index.php']['nodes'] = implode(",", $node_array);
phpAds_SessionDataStore();
/*-------------------------------------------------------*/
/* HTML framework                                        */
/*-------------------------------------------------------*/
phpAds_PageFooter();
コード例 #15
0
 /**
  * Outputs the HTML to display the data for this limitation
  *
  * @return void
  */
 function displayArrayData()
 {
     $conf = $GLOBALS['_MAX']['CONF'];
     $this->bannerid = isset($GLOBALS['bannerid']) ? $GLOBALS['bannerid'] : 0;
     $tabindex =& $GLOBALS['tabindex'];
     $aChannels = array();
     // Get all of the agency channels that could be used for this banner
     //  select the agency ID that owns this banner (it may be the admin ID, 0)
     $doChannel = OA_Dal::factoryDO('channel');
     $doAgency = OA_Dal::factoryDO('agency');
     $doClients = OA_Dal::factoryDO('clients');
     $doCampaigns = OA_Dal::factoryDO('campaigns');
     $doBanners = OA_Dal::factoryDO('banners');
     $doBanners->bannerid = $this->bannerid;
     $doCampaigns->joinAdd($doBanners);
     $doClients->joinAdd($doCampaigns);
     $doAgency->joinAdd($doClients);
     $doChannel->joinAdd($doAgency);
     $doChannel->affiliateid = 0;
     $doChannel->selectAdd("{$doChannel->tableName()}.name as channelname");
     $doChannel->find();
     while ($doChannel->fetch()) {
         $aChannel = $doChannel->toArray();
         $channelId = $aChannel['channelid'];
         $aChannels[$channelId] = $aChannel;
     }
     // Get all of the publisher channels that could be used for this banner
     //  only publishers (affiliates) which are linked to the banner
     $doChannel = OA_Dal::factoryDO('channel');
     $doAffiliates = OA_Dal::factoryDO('affiliates');
     $doZones = OA_Dal::factoryDO('zones');
     $doAdZoneAssoc = OA_Dal::factoryDO('ad_zone_assoc');
     $doAdZoneAssoc->ad_id = $this->bannerid;
     $doZones->joinAdd($doAdZoneAssoc);
     $doAffiliates->joinAdd($doZones);
     $doChannel->joinAdd($doAffiliates);
     $doChannel->selectAdd("{$doChannel->tableName()}.name as channelname");
     $doChannel->find();
     while ($doChannel->fetch()) {
         $aChannel = $doChannel->toArray();
         $channelId = $aChannel['channelid'];
         $aChannels[$channelId] = $aChannel;
     }
     $aSelectedChannels = array();
     // Sort the list, and move selected items to the top of the list
     usort($aChannels, '_sortByChannelName');
     foreach ($aChannels as $index => $aChannel) {
         if (in_array($aChannel['channelid'], $this->data)) {
             $aSelectedChannels[$index] = $aChannel;
             unset($aChannels[$index]);
         }
     }
     $aChannels = $aSelectedChannels + $aChannels;
     echo "<div class='box'>";
     foreach ($aChannels as $aChannel) {
         if (empty($aChannel['affiliateid'])) {
             $editUrl = "channel-acl.php?agencyid={$this->agencyid}&channelid={$aChannel['channelid']}";
         } else {
             $editUrl = "channel-acl.php?affiliateid={$aChannel['affiliateid']}&channelid={$aChannel['channelid']}";
         }
         echo "\n                <div class='boxrow'>\n                    <input\n                        tabindex='" . $tabindex++ . "'\n                        type='checkbox'\n                        id='c_{$this->executionorder}_{$aChannel['channelid']}'\n                        name='acl[{$this->executionorder}][data][]'\n                        value='{$aChannel['channelid']}'" . (in_array($aChannel['channelid'], $this->data) ? ' checked="checked"' : '') . "\n                    />\n                    " . htmlspecialchars($aChannel['channelname']) . "\n                    <a href='{$editUrl}' target='_blank'><img src='" . OX::assetPath() . "/images/{$GLOBALS['phpAds_TextDirection']}/go_blue.gif' border='0' align='absmiddle' alt='{$GLOBALS['strView']}'></a>\n                </div>";
     }
     echo "</div>";
 }
コード例 #16
0
ファイル: axmlrpc.php プロジェクト: villos/tree_admin
 function constructURL($type, $file = null)
 {
     $aConf = $GLOBALS['_MAX']['CONF'];
     // Prepare the base URL
     if ($type == MAX_URL_ADMIN) {
         $path = $aConf['webpath']['admin'];
     } elseif ($type == MAX_URL_IMAGE) {
         return OX::assetPath("/images/" . $file);
     } else {
         return null;
     }
     // Add a trailing slash to the path, so that there will
     // be at least one slash in the path (after the hostname,
     // in the event that virtual hosts are used, and delivery
     // happens from the root of virtual hosts)
     $path .= '/';
     // Modify the admin URL for different SSL port if required
     if ($aConf['openads']['sslPort'] != 443) {
         if ($GLOBALS['_MAX']['HTTP'] == 'https://') {
             $path = preg_replace('#/#', ':' . $aConf['openads']['sslPort'] . '/', $path, 1);
         }
     }
     // Return the URL
     return $GLOBALS['_MAX']['HTTP'] . $path . $file;
 }
コード例 #17
0
| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA |
+---------------------------------------------------------------------------+
$Id: maintenance-banners.php 37157 2009-05-28 12:31:10Z andrew.hill $
*/
// Require the initialisation file
require_once '../../init.php';
// Required files
require_once MAX_PATH . '/www/admin/config.php';
require_once MAX_PATH . '/www/admin/lib-maintenance.inc.php';
require_once MAX_PATH . '/www/admin/lib-statistics.inc.php';
require_once MAX_PATH . '/www/admin/lib-zones.inc.php';
// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN);
/*-------------------------------------------------------*/
/* HTML framework                                        */
/*-------------------------------------------------------*/
phpAds_PageHeader("maintenance-index");
phpAds_MaintenanceSelection("banners");
/*-------------------------------------------------------*/
/* Main code                                             */
/*-------------------------------------------------------*/
echo "<br />";
echo $strBannerCacheExplaination;
echo "<br /><br />";
phpAds_ShowBreak();
echo "<img src='" . OX::assetPath() . "/images/" . $phpAds_TextDirection . "/icon-undo.gif' border='0' align='absmiddle'>&nbsp;<a href='maintenance-banners-check.php'>{$strCheckBannerCache}</a>&nbsp;&nbsp;";
phpAds_ShowBreak();
/*-------------------------------------------------------*/
/* HTML framework                                        */
/*-------------------------------------------------------*/
phpAds_PageFooter();
コード例 #18
0
 /**
  * Display new password form
  *
  * @param string error message text
  */
 function displayRecoveryResetForm($id, $errormessage = '')
 {
     if (!empty($errormessage)) {
         echo "<div class='errormessage' style='width: 400px;'><img class='errormessage' src='" . OX::assetPath() . "/images/errormessage.gif' align='absmiddle'>";
         echo "<span class='tab-r'>{$errormessage}</span></div>";
     }
     echo "<form method='post' action='password-recovery.php'>\n";
     echo "<input type='hidden' name='id' value=\"" . htmlspecialchars($id) . "\" />";
     echo "<div class='install'>" . $GLOBALS['strPwdRecEnterPassword'] . "</div>";
     echo "<table cellpadding='0' cellspacing='0' border='0'>";
     echo "<tr><td colspan='2'><img src='" . OX::assetPath() . "/images/break-el.gif' width='400' height='1' vspace='8'></td></tr>";
     echo "<tr height='24'><td>" . $GLOBALS['strPassword'] . ":&nbsp;</td><td><input type='password' name='newpassword' /></td></tr>";
     echo "<tr height='24'><td>" . $GLOBALS['strRepeatPassword'] . ":&nbsp;</td><td><input type='password' name='newpassword2' /></td></tr>";
     echo "<tr height='24'><td>&nbsp;</td><td><input type='submit' value='" . $GLOBALS['strProceed'] . "' /></td></tr>";
     echo "<tr><td colspan='2'><img src='" . OX::assetPath() . "/images/break-el.gif' width='400' height='1' vspace='8'></td></tr>";
     echo "</table>";
     echo "</form>\n";
 }
コード例 #19
0
| but WITHOUT ANY WARRANTY; without even the implied warranty of            |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             |
| GNU General Public License for more details.                              |
|                                                                           |
| 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: banner-htmlpreview.php 37157 2009-05-28 12:31:10Z andrew.hill $
*/
// Require the initialisation file
require_once '../../init.php';
// Required files
require_once MAX_PATH . '/www/admin/config.php';
require_once MAX_PATH . '/www/admin/lib-statistics.inc.php';
require_once MAX_PATH . '/lib/max/Delivery/adRender.php';
require_once MAX_PATH . '/lib/max/Admin_DA.php';
/*-------------------------------------------------------*/
/* Main code                                             */
/*-------------------------------------------------------*/
$aBanner = Admin_DA::getAd($bannerid);
$aBanner['bannerid'] = $aBanner['ad_id'];
if (!empty($aBanner)) {
    $conf = $GLOBALS['_MAX']['CONF'];
    $bannerName = strip_tags(phpAds_buildBannerName($bannerid, $aBanner['name'], $aBanner['alt']));
    $sizeDescription = $aBanner['type'] == 'txt' ? '&nbsp;' : "&nbsp;&nbsp;&nbsp;width: {$aBanner['width']}&nbsp;&nbsp;height: {$aBanner['height']}";
    $bannerCode = MAX_adRender($aBanner, 0, '', '', '', true, '', false, false);
    $protocol = $_SERVER['SERVER_PORT'] == $conf['openads']['sslPort'] ? "https" : "http";
    $deliveryUrl = $protocol . ':' . MAX_commonConstructPartialDeliveryUrl($conf['file']['flash']);
    echo "\n<html>\n<head>\n<title>{$bannerName}</title>\n<link rel='stylesheet' href='" . OX::assetPath() . "/css/interface-{$phpAds_TextDirection}.css'>\n<script type='text/javascript' src='{$deliveryUrl}'></script>\n</head>\n<body marginheight='0' marginwidth='0' leftmargin='0' topmargin='0' bgcolor='#EFEFEF'>\n<table cellpadding='0' cellspacing='0' border='0'>\n<tr height='32'>\n    <td width='32'><img src='" . OX::assetPath() . "/images/cropmark-tl.gif' width='32' height='32'></td>\n    <td background='" . OX::assetPath() . "/images/ruler-top.gif'>&nbsp;</td>\n    <td width='32'><img src='" . OX::assetPath() . "/images/cropmark-tr.gif' width='32' height='32'></td>\n</tr>\n<tr height='{$aBanner['height']}'>\n    <td width='32' background='" . OX::assetPath() . "/images/ruler-left.gif'>&nbsp;</td>\n    <td bgcolor='#FFFFFF' width='{$aBanner['width']}'>\n        {$bannerCode}\n    </td>\n    <td width='32'>&nbsp;</td>\n</tr>\n<tr height='32'>\n    <td width='32'><img src='" . OX::assetPath() . "/images/cropmark-bl.gif' width='32' height='32'></td>\n    <td>{$sizeDescription}</td>\n    <td width='32'><img src='" . OX::assetPath() . "/images/cropmark-br.gif' width='32' height='32'></td>\n</tr>\n</table>\n</body>\n</html>";
}
コード例 #20
0
ファイル: adsense-create.php プロジェクト: villos/tree_admin
require_once '../../init.php';
// Required files
require_once MAX_PATH . '/www/admin/config.php';
// Register input variables
// TODO: This variable has been added to demonstrate that clicking on
// links from error messages could bring the already entered e-mail address
// to the new form. Feel free to keep it or remove, depending on the
// implementation strategy.
phpAds_registerGlobalUnslashed('email');
/*-------------------------------------------------------*/
/* HTML framework                                        */
/*-------------------------------------------------------*/
phpAds_PageHeader("4.1.3.4.7.2");
// TODO: The path here should probably start with the advertiser's data
// Not sure if we need to include the campaign and banner in the path though.
// We'll need to clarify this with the Product team.
echo "<img src='" . OX::assetPath() . "/images/icon-affiliate.gif' align='absmiddle'>&nbsp;<b>Create AdSense Account</b><br /><br /><br />";
phpAds_ShowSections(array("4.1.3.4.7.2"));
/*-------------------------------------------------------*/
/* Main code                                             */
/*-------------------------------------------------------*/
require_once MAX_PATH . '/lib/OA/Admin/Template.php';
$oTpl = new OA_Admin_Template('adsense-create.html');
$oTpl->assign('fields', array(array('title' => 'Email address for AdSense Account', 'fields' => array(array('name' => 'email', 'label' => 'Email', 'value' => '', 'id' => 'adsenseemail', 'title' => 'Provide valid email', 'clientValid' => 'required:true,email:true'))), array('title' => 'Name for the AdSense Account in Openads', 'fields' => array(array('name' => 'name', 'label' => 'Name for the AdSense Account in Openads', 'value' => '', 'id' => 'accountname', 'title' => 'Provide name in Openads', 'clientValid' => 'required:true')))));
//var_dump($oTpl);
//die();
$oTpl->display();
/*-------------------------------------------------------*/
/* HTML framework                                        */
/*-------------------------------------------------------*/
phpAds_PageFooter();
コード例 #21
0
          require_once LIB_PATH . '/Plugin/PluginManager.php';
          $oPluginManager = & new OX_PluginManager();
          $oPluginManager->_cacheDependencies();
          if (empty($oPluginManager->aErrors))
          {
              $oPluginManager->aMessages[] = 'No dependency problems detected';
          }
          break;*/
        default:
    }
}
phpAds_ShowBreak();
echo "<img src='" . OX::assetPath() . "/images/" . $phpAds_TextDirection . "/icon-undo.gif' border='0' align='absmiddle'>&nbsp;<a href='maintenance-plugins.php?action=hook'>Rebuild Component Hooks Cache</a>&nbsp;&nbsp;";
phpAds_ShowBreak();
echo "<img src='" . OX::assetPath() . "/images/" . $phpAds_TextDirection . "/icon-undo.gif' border='0' align='absmiddle'>&nbsp;<a href='maintenance-plugins.php?action=pref'>Rebuild Preferences List</a>&nbsp;&nbsp;";
phpAds_ShowBreak();
echo "<img src='" . OX::assetPath() . "/images/" . $phpAds_TextDirection . "/icon-undo.gif' border='0' align='absmiddle'>&nbsp;<a href='maintenance-plugins.php?action=reg'>Rebuild Delivery Hooks Cache</a>&nbsp;&nbsp;";
phpAds_ShowBreak();
echo "<img src='" . OX::assetPath() . "/images/" . $phpAds_TextDirection . "/icon-undo.gif' border='0' align='absmiddle'>&nbsp;<a href='maintenance-plugins.php?action=rep'>Plugin Report</a>&nbsp;&nbsp;";
phpAds_ShowBreak();
echo "<img src='" . OX::assetPath() . "/images/" . $phpAds_TextDirection . "/icon-undo.gif' border='0' align='absmiddle'>&nbsp;<a href='maintenance-plugins.php?action=exp'>Export All Plugins</a>&nbsp;&nbsp;";
phpAds_ShowBreak();
/*echo "<img src='" . OX::assetPath() . "/images/".$phpAds_TextDirection."/icon-undo.gif' border='0' align='absmiddle'>&nbsp;<a href='maintenance-plugins.php?action=dep'>Check Dependencies</a>&nbsp;&nbsp;";
phpAds_ShowBreak();*/
if ($oTpl) {
    $oTpl->display();
}
/*-------------------------------------------------------*/
/* HTML framework                                        */
/*-------------------------------------------------------*/
phpAds_PageFooter();
コード例 #22
0
ファイル: channel-index.php プロジェクト: villos/tree_admin
| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA |
+---------------------------------------------------------------------------+
$Id: channel-index.php 37157 2009-05-28 12:31:10Z andrew.hill $
*/
// Require the initialisation file
require_once '../../init.php';
// Required files
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('acl', 'action', 'submit');
// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_MANAGER);
// Initialise some parameters
$pageName = basename($_SERVER['PHP_SELF']);
$agencyId = OA_Permission::getEntityId();
$tabindex = 1;
/*-------------------------------------------------------*/
/* HTML framework                                        */
/*-------------------------------------------------------*/
phpAds_PageHeader("5.7");
/*-------------------------------------------------------*/
/* Main code                                             */
/*-------------------------------------------------------*/
echo "<img src='" . OX::assetPath() . "/images/icon-channel-add.gif' border='0' align='absmiddle'>&nbsp;";
echo "<a href='channel-edit.php?agencyid={$agencyId}' accesskey='" . $keyAddNew . "'>{$GLOBALS['strAddNewChannel_Key']}</a>&nbsp;&nbsp;";
phpAds_ShowBreak();
$channels = Admin_DA::getChannels(array('agency_id' => $agencyId), true);
MAX_displayChannels($channels, array('agencyid' => $agencyId));
phpAds_PageFooter();
コード例 #23
0
 /**
  * Generate the HTML option
  *
  * @return string    A string containing html for option
  */
 function layerstyle()
 {
     $option = '';
     $layerstyles = array();
     $layerStylesFolder = dirname(__FILE__) . '/layerstyles';
     $stylesdir = opendir($layerStylesFolder);
     while ($stylefile = readdir($stylesdir)) {
         if (is_dir($layerStylesFolder . '/' . $stylefile) && file_exists($layerStylesFolder . '/' . $stylefile . '/invocation.inc.php')) {
             if (ereg('^[^.]', $stylefile)) {
                 $layerstyles[$stylefile] = isset($GLOBALS['strAdLayerStyleName'][$stylefile]) ? $GLOBALS['strAdLayerStyleName'][$stylefile] : str_replace("- ", "-", ucwords(str_replace("-", "- ", $stylefile)));
             }
         }
     }
     closedir($stylesdir);
     asort($layerstyles, SORT_STRING);
     $option .= "<tr><td width='30'>&nbsp;</td>";
     $option .= "<td width='200'>" . $this->translate("Style") . "</td><td width='370'>";
     $option .= "<select name='layerstyle' onChange='this.form.submit()' style='width:175px;' tabindex='" . $this->maxInvocation->tabindex++ . "'>";
     reset($layerstyles);
     while (list($k, $v) = each($layerstyles)) {
         $option .= "<option value='{$k}'" . ($this->maxInvocation->layerstyle == $k ? ' selected' : '') . ">{$v}</option>";
     }
     $option .= "</select>";
     $option .= "</td></tr>";
     $option .= "<tr><td width='30'><img src='" . OX::assetPath() . "/images/spacer.gif' height='1' width='100%'></td></tr>";
     return $option;
 }
コード例 #24
0
 /**
  * A Flexy helper method to return the appropriate image to display
  * the current sorting order, if appropriate.
  *
  * @param string $fieldname The name of the field.
  * @return string|false The image URI if the field is sorted, false otherwise.
  */
 function listOrderImage($fieldname)
 {
     if ($this->listOrderField == $fieldname) {
         return OX::assetPath("images/caret-" . ($this->listOrderDirection == 'up' ? 'u' : 'ds') . ".gif");
     } else {
         return false;
     }
 }
コード例 #25
0
    // Action
    $action = $strUserlog[$row['action']];
    $action = str_replace('{id}', $row['object'], $action);
    echo "<td height='20' colspan='2'><img src='" . OX::assetPath() . "/images/spacer.gif' height='16' width='16' align='absmiddle'>&nbsp;" . $action . "</td>";
    echo "</tr>";
    $i++;
}
if ($doUserLog->getRowCount() > 0) {
    echo "<tr height='1'><td colspan='4' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break.gif' height='1' width='100%'></td></tr>";
    echo "<tr><td height='25' colspan='2'>";
    echo "<img src='" . OX::assetPath() . "/images/icon-recycle.gif' border='0' align='absmiddle'>&nbsp;<a href='userlog-delete.php?token=" . urlencode(phpAds_SessionGetToken()) . "'>" . $strDeleteLog . "</a>";
    echo "</td><td height='25' colspan='2' align='" . $phpAds_TextAlignRight . "'>";
    if ($start > 0) {
        echo "<a href='userlog-maintenance.php?start=" . ($start - 1) . "'>";
        echo "<img src='" . OX::assetPath() . "/images/arrow-l.gif' border='0' align='absmiddle'>" . $strPrevious . "</a>";
    }
    if ($count > ($start + 1) * $limit) {
        if ($start > 0) {
            echo "&nbsp;|&nbsp;";
        }
        echo "<a href='userlog-maintenance.php?start=" . ($start + 1) . "'>";
        echo $strNext . "<img src='" . OX::assetPath() . "/images/arrow-r.gif' border='0' align='absmiddle'></a>";
    }
    echo "</td></tr>";
}
echo "</table>";
echo "<br /><br />";
/*-------------------------------------------------------*/
/* HTML framework                                        */
/*-------------------------------------------------------*/
phpAds_PageFooter();
コード例 #26
0
 /**
  * Add "blanks" stats to an entity array
  *
  * @param array Query parameters
  * @param array Entities array
  */
 function addBlanks($aParams, &$aEntitiesData)
 {
     $aParams['exclude'] = array('zone_id');
     $aParams['ad_id'] = 0;
     // Get plugin aParams
     $pluginParams = array();
     foreach ($this->aPlugins as $oPlugin) {
         $oPlugin->addQueryParams($pluginParams);
     }
     $aBlanks = Admin_DA::fromCache('getEntitiesStats', $aParams + $this->aDates, 1);
     // Merge plugin additional data
     foreach ($this->aPlugins as $oPlugin) {
         $oPlugin->mergeData($aBlanks, 'getEntitiesStats', $aParams + $this->aDates, $this->aEmptyRow);
     }
     if (count($aBlanks)) {
         $zone = current($aBlanks) + $this->aEmptyRow;
         $zone['active'] = $this->_hasActiveStats($zone);
         if ($zone['active']) {
             $this->_summarizeStats($zone);
             $zone['name'] = 'Blank impressions';
             $zone['prefix'] = 'x';
             $zone['id'] = '-';
             $zone['icon'] = OX::assetPath() . '/images/icon-banner-disabled.png';
             $zone['htmlclass'] = 'last';
             if ($this->listOrderField != 'name' && $this->listOrderField != 'id') {
                 $aEntitiesData[] = $zone;
                 MAX_sortArray($aEntitiesData, $this->listOrderField, $this->listOrderDirection == 'up');
             } elseif ($this->listOrderDirection == 'up') {
                 array_push($aEntitiesData, $zone);
             } else {
                 array_unshift($aEntitiesData, $zone);
             }
         }
     }
 }
コード例 #27
0
        echo "</form>";
        echo "</table>";
    } else {
        echo "<tr><td height='25' colspan='4' bgcolor='#F6F6F6'>&nbsp;&nbsp;" . $strNoVarsToTrack . "</td></tr>\n";
        echo "<tr><td colspan='4'><img src='" . OX::assetPath() . "/images/break-el.gif' width='100%' height='1'></td></tr>\n";
        echo "<tr>";
        echo "<td colspan='4'><img src='" . OX::assetPath() . "/images/spacer.gif' width='1' height='10' /></td>";
        echo "</tr>";
        echo "<tr>";
        echo "<td colspan='4' align='right'>";
        echo "<img src='" . OX::assetPath() . "/images/icon-acl-add.gif' align='absmiddle'>&nbsp;&nbsp;" . $strAddVariable . "&nbsp;&nbsp;";
        echo "<input type='image' name='action[new]' src='" . OX::assetPath() . "/images/" . $phpAds_TextDirection . "/go_blue.gif' border='0' align='absmiddle' alt='{$strSave}'>";
        echo "</td>";
        echo "</tr>";
        echo "<tr>";
        echo "<td colspan='4'><img src='" . OX::assetPath() . "/images/spacer.gif' width='1' height='10' /></td>\n";
        echo "</tr>";
        echo "<tr>";
        echo "<td colspan='4'>";
        echo "<input type='submit' name='action[save]' value='Save Changes' tabindex='15'>\n";
        echo "</td>";
        echo "</tr>";
        echo "</form>";
        echo "</table>";
    }
}
/*-------------------------------------------------------*/
/* Store preferences                                     */
/*-------------------------------------------------------*/
$session['prefs']['tracker-variables.php']['variables'] = $variables;
$session['prefs']['tracker-variables.php']['trackerid'] = $trackerid;
コード例 #28
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: maintenance-appendcodes.php 37157 2009-05-28 12:31:10Z andrew.hill $
*/
// Require the initialisation file
require_once '../../init.php';
// Required files
require_once MAX_PATH . '/www/admin/config.php';
require_once MAX_PATH . '/www/admin/lib-maintenance.inc.php';
// Security check
OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN);
/*-------------------------------------------------------*/
/* HTML framework                                        */
/*-------------------------------------------------------*/
phpAds_PageHeader("maintenance-index");
phpAds_MaintenanceSelection("appendcodes");
/*-------------------------------------------------------*/
/* Main code                                             */
/*-------------------------------------------------------*/
echo "<br />";
echo "<img src='" . OX::assetPath() . "/images/" . $phpAds_TextDirection . "/icon-undo.gif' border='0' align='absmiddle'>" . $strAppendCodesDesc . "<br /><br />";
echo "&nbsp;<a href='maintenance-appendcode-check.php'>" . $strCheckAppendCodes . "</a>&nbsp;&nbsp;";
echo "<br /><br />";
phpAds_ShowBreak();
/*-------------------------------------------------------*/
/* HTML framework                                        */
/*-------------------------------------------------------*/
phpAds_PageFooter();
コード例 #29
0
ファイル: common.php プロジェクト: ballistiq/revive-adserver
 static function getWarningMessage($message)
 {
     return "<div class='errormessage' style='width:750px;'><img class='errormessage' src='" . OX::assetPath() . "/images/info.gif' align='absmiddle'>\n              <span class='tab-r' style='font-weight:normal;'>&nbsp;" . $message . "</span>\n              </div>";
 }
コード例 #30
0
function phpAds_showBanners()
{
    $conf = $GLOBALS['_MAX']['CONF'];
    global $strUntitled, $strName, $strID, $strWeight;
    global $strProbability, $strPriority, $strRecalculatePriority;
    global $phpAds_TextDirection;
    $doAdZoneAssoc = OA_Dal::factoryDO('ad_zone_assoc');
    $doAdZoneAssoc->selectAdd();
    $doAdZoneAssoc->selectAs(array('ad_id'), 'bannerid');
    $doAdZoneAssoc->selectAdd('priority');
    $doAdZoneAssoc->zoneid = 0;
    $doAdZoneAssoc->OrderBy('priority DESC');
    $doAdZoneAssoc->find();
    $rows = array();
    $prioritysum = 0;
    while ($doAdZoneAssoc->fetch() && ($tmprow = $doAdZoneAssoc->toArray())) {
        if ($tmprow['priority']) {
            $prioritysum += $tmprow['priority'];
            $rows[$tmprow['bannerid']] = $tmprow;
        }
    }
    if (is_array($rows)) {
        $i = 0;
        // Header
        echo "<table width='100%' border='0' align='center' cellspacing='0' cellpadding='0'>";
        echo "<tr height='25'>";
        echo "<td height='25'><b>&nbsp;&nbsp;" . $strName . "</b></td>";
        echo "<td height='25'><b>" . $strID . "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</b></td>";
        echo "<td height='25'><b>" . $strPriority . "</b></td>";
        echo "<td height='25'><b>" . $strProbability . "</b></td>";
        echo "</tr>";
        echo "<tr height='1'><td colspan='5' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break.gif' height='1' width='100%'></td></tr>";
        // Banners
        foreach (array_keys($rows) as $key) {
            $name = phpAds_getBannerName($rows[$key]['bannerid'], 60, false);
            if ($i > 0) {
                echo "<tr height='1'><td colspan='5' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break-l.gif' height='1' width='100%'></td></tr>";
            }
            echo "<tr height='25' " . ($i % 2 == 0 ? "bgcolor='#F6F6F6'" : "") . ">";
            echo "<td height='25'>";
            echo "&nbsp;&nbsp;";
            // Banner icon
            if ($rows[$key]['storagetype'] == 'html') {
                echo "<img src='" . OX::assetPath() . "/images/icon-banner-html.gif' align='absmiddle'>&nbsp;";
            } elseif ($rows[$key]['storagetype'] == 'url') {
                echo "<img src='" . OX::assetPath() . "/images/icon-banner-url.gif' align='absmiddle'>&nbsp;";
            } else {
                echo "<img src='" . OX::assetPath() . "/images/icon-banner-stored.gif' align='absmiddle'>&nbsp;";
            }
            // Name
            echo $name;
            echo "</td>";
            echo "<td height='25'>" . $rows[$key]['bannerid'] . "</td>";
            echo "<td height='25'>" . $rows[$key]['priority'] . "</td>";
            echo "<td height='25'>" . number_format($rows[$key]['priority'] / $prioritysum * 100, $pref['ui_percentage_decimals']) . "%</td>";
            echo "</tr>";
            $i++;
        }
        // Footer
        echo "<tr height='1'><td colspan='5' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break.gif' height='1' width='100%'></td></tr>";
        echo "</table>";
    }
}