$affiliateName = !empty($row['affiliatename']) ? $row['affiliatename'] : $strUntitled; echo "<a href='channel-acl.php?affiliateid={$row['affiliateid']}&channelid={$row['channelid']}'>{$row['name']}</a><br />"; } } if ($allChannelsValid) { echo $strChannelCompiledLimitationsValid; } phpAds_showBreak(); echo "<strong>{$strBanners}:</strong>"; phpAds_ShowBreak(); $dalBanners = OA_Dal::factoryDAL('banners'); $rsBanners = $dalBanners->getBannersCampaignsClients(); $rsBanners->find(); $allBannersValid = true; while ($rsBanners->fetch() && ($row = $rsBanners->toArray())) { if (!MAX_AclValidate('banner-acl.php', array('bannerid' => $row['bannerid']))) { $allBannersValid = false; $bannerName = !empty($row['description']) ? $row['description'] : $strUntitled; $campaignName = !empty($row['campaignname']) ? $row['campaignname'] : $strUntitled; $clientName = !empty($row['clientname']) ? $row['clientname'] : $strUntitled; echo "{$clientName} -> {$campaignName} -> <a href='banner-acl.php?clientid={$row['clientid']}&campaignid={$row['campaignid']}&bannerid={$row['bannerid']}'>{$bannerName}</a><br />"; } } if ($allBannersValid) { echo $strBannerCompiledLimitationsValid; } if (!$allBannersValid || !$allChannelsValid) { phpAds_ShowBreak(); echo "<br /><strong>" . $strErrorsFound . "</strong><br /><br />"; echo $strRepairCompiledLimitations; echo "<form action='' METHOD='GET'>";
function MAX_displayAcls($acls, $aParams) { $tabindex =& $GLOBALS['tabindex']; $page = basename($_SERVER['SCRIPT_NAME']); $conf = $GLOBALS['_MAX']['CONF']; echo "<form action='{$page}' method='post'>"; echo "<label><img src='" . OX::assetPath() . "/images/icon-acl-add.gif' align='absmiddle'> " . $GLOBALS['strACLAdd'] . ": "; echo "<select name='type' accesskey='{$GLOBALS['keyAddNew']}' tabindex='" . $tabindex++ . "'>"; $deliveryLimitations = OX_Component::getComponents('deliveryLimitations', null, false); foreach ($deliveryLimitations as $pluginName => $plugin) { if ($plugin->isAllowed($page)) { echo "<option value='{$pluginName}'>" . $plugin->getName() . "</option>"; } } echo "</select></label>"; echo " "; echo "<input type='submit' class='flat' name='action[new]' value='" . $GLOBALS['strAdd'] . "'"; phpAds_ShowBreak(); echo "<br />"; $aErrors = OX_AclCheckInputsFields($acls, $page); if (!empty($GLOBALS['action'])) { // We are part way through making changes, show a message //echo "<br>"; echo "<div class='errormessage'><img class='errormessage' src='" . OX::assetPath() . "/images/warning.gif' align='absmiddle'>"; echo "<span class='tab-s'>{$GLOBALS['strUnsavedChanges']}</span><br>"; echo "</div>"; } elseif (!MAX_AclValidate($page, $aParams)) { echo "<div class='errormessage'><img class='errormessage' src='" . OX::assetPath() . "/images/warning.gif' align='absmiddle'>"; echo "<span class='tab-r'>{$GLOBALS['strDeliveryLimitationsDisagree']}</span><br>"; echo "</div>"; } if ($aErrors !== true) { echo "<div class='errormessage'><img class='errormessage' src='" . OX::assetPath() . "/images/warning.gif' align='absmiddle'>"; echo "<span class='tab-s'>{$GLOBALS['strDeliveryLimitationsInputErrors']}</span><br><ul>"; foreach ($aErrors as $error) { echo "<li><span class='tab-s'>{$error}</span><br></li>"; } echo "</ul></div>"; } foreach ($aParams as $name => $value) { echo "<input type='hidden' name='{$name}' value='{$value}' />"; } echo "<table border='0' width='100%' cellpadding='0' cellspacing='0'>"; echo "<tr><td height='25' colspan='4' bgcolor='#FFFFFF'><b>{$GLOBALS['strDeliveryLimitations']}</b></td></tr>"; echo "<tr><td height='1' colspan='4' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break.gif' height='1' width='100%'></td></tr>"; if (empty($acls)) { echo "<tr><td height='24' colspan='4' bgcolor='#F6F6F6'> {$GLOBALS['strNoLimitations']}</td></tr>"; echo "<tr><td height='1' colspan='4' bgcolor='#888888'><img src='" . OX::assetPath() . "/images/break.gif' height='1' width='100%'></td></tr>"; } else { echo "<tr><td height='25' colspan='4' bgcolor='#F6F6F6'> {$GLOBALS['strOnlyDisplayWhen']}</td></tr>"; echo "<tr><td colspan='4'><img src='" . OX::assetPath() . "/images/break-el.gif' width='100%' height='1'></td></tr>"; foreach ($acls as $aclId => $acl) { if ($deliveryLimitationPlugin = OA_aclGetComponentFromRow($acl)) { $deliveryLimitationPlugin->init($acl); $deliveryLimitationPlugin->count = count($acls); if ($deliveryLimitationPlugin->isAllowed($page)) { $deliveryLimitationPlugin->display(); } } } } echo "<tr><td height='30' colspan='2'>"; if (!empty($acls)) { $url = $page . '?'; foreach ($aParams as $name => $value) { $url .= "{$name}={$value}&"; } $url .= "action[clear]=true"; echo "<img src='" . OX::assetPath() . "/images/icon-recycle.gif' border='0' align='absmiddle'> \n <a href='{$url}'>{$GLOBALS['strRemoveAllLimitations']}</a> \n "; } echo "</td><td height='30' colspan='2' align='{$GLOBALS['phpAds_TextAlignRight']}'>"; echo "</td></tr>"; echo "</table>"; }