public function startMVC() { $oRequest = new OX_Admin_UI_Controller_Request(); //setup controller $oController = $this->createController(); ob_start(); $oController->process($oRequest); $actionContent = ob_get_contents(); ob_end_clean(); //create view if ($oController->hasViewScript()) { $view = $this->createView($oController->getAction()); //pass model variables to view $oController->assignModelToView($view); } //LAYOUT // setup dummy installer section display $oMenu = OA_Admin_Menu::singleton(); $oMenu->add(new OA_Admin_Menu_Section('install', '', '')); if ($oController->hasLayout()) { //layout $oPageHeader = $oController->getModelProperty('pageHeader'); phpAds_PageHeader('install', $oPageHeader, $imgPath, false, true, false); } if ($view) { $view->display(); } echo $actionContent; if ($oController->hasLayout()) { phpAds_PageFooter($imgPath); // Do not remove. This is a marker that AJAX response parsers look for to // determine whether the response did not redirect to the installer. echo "<!-- install -->"; } }
function displayPage($form, $aMessages = '') { phpAds_PageHeader('devtools-plugins', '', '../../'); $oTpl = new OA_Plugin_Template('oxPlugin.html', 'oxPlugin'); //$oTpl->debugging = true; $oTpl->assign('aMessages', $aMessages); $oTpl->assign('form', $form->serialize()); $oTpl->display(); phpAds_PageFooter(); }
function OA_HeaderNavigation() { global $agencyid; if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) { phpAds_PageHeader("agency-access"); $doAgency = OA_Dal::staticGetDO('agency', $agencyid); MAX_displayInventoryBreadcrumbs(array(array("name" => $doAgency->name)), "agency"); } else { phpAds_PageHeader("agency-user"); } }
/** * A method to launch and display the widget * */ function display() { $aConf = $GLOBALS['_MAX']['CONF']; phpAds_PageHeader(null, new OA_Admin_UI_Model_PageHeaderModel(), '', false, false); $oTpl = new OA_Admin_Template('dashboard/main.html'); if (!$aConf['ui']['dashboardEnabled'] || !$aConf['sync']['checkForUpdates']) { $dashboardUrl = MAX::constructURL(MAX_URL_ADMIN, 'dashboard.php?widget=Disabled'); } else { $dashboardUrl = MAX::constructURL(MAX_URL_ADMIN, 'dashboard.php?widget=Grid'); } $oTpl->assign('dashboardURL', $dashboardUrl); $oTpl->display(); phpAds_PageFooter('', true); }
/** * A method to parse the day paramer, check it's validity, and store it * in the provided $aDates array. * * @param array $aDates A references to an array that will be set to * contain the valid day as the "day_begin" and * "day_end" values. */ function parseDay(&$aDates) { $day = MAX_getValue('day', ''); if (!preg_match('/^(\\d\\d\\d\\d)(\\d\\d)(\\d\\d)$/D', $day, $matches)) { phpAds_PageHeader('2'); phpAds_Die($GLOBALS['strAccessDenied'], $GLOBALS['strNotAdmin']); } if (!checkdate($matches[2], $matches[3], $matches[1])) { phpAds_PageHeader('2'); phpAds_Die($GLOBALS['strAccessDenied'], $GLOBALS['strNotAdmin']); } $aDates = array(); $aDates['day_begin'] = "{$matches[1]}-{$matches[2]}-{$matches[3]}"; $aDates['day_end'] = "{$matches[1]}-{$matches[2]}-{$matches[3]}"; }
function OA_headerNavigation() { $oHeaderModel = buildAdvertiserHeaderModel($GLOBALS['clientid']); if (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) { phpAds_PageHeader("advertiser-access", $oHeaderModel); phpAds_ShowSections(array("4.1.2", "4.1.3", "4.1.5", "4.1.5.2")); } else { $sections = array(); if (OA_Permission::hasPermission(OA_PERM_BANNER_ACTIVATE) || OA_Permission::hasPermission(OA_PERM_BANNER_EDIT)) { $sections[] = '2.2'; } $sections[] = '2.3'; $sections[] = '2.3.2'; phpAds_PageHeader('advertiser-access', $oHeaderModel); phpAds_ShowSections($sections); } }
/** * A method to launch and display the widget * */ function display() { $aConf = $GLOBALS['_MAX']['CONF']; phpAds_PageHeader(null, new OA_Admin_UI_Model_PageHeaderModel(), '', false, false); $oTpl = new OA_Admin_Template('dashboard/main.html'); if (!$aConf['ui']['dashboardEnabled'] || !$aConf['sync']['checkForUpdates']) { $dashboardUrl = MAX::constructURL(MAX_URL_ADMIN, 'dashboard.php?widget=Disabled'); } else { $m2mTicket = OA_Dal_Central_M2M::getM2MTicket(OA_Permission::getAccountId()); if (empty($m2mTicket)) { $dashboardUrl = MAX::constructURL(MAX_URL_ADMIN, 'dashboard.php?widget=Reload'); } else { $dashboardUrl = $this->buildDashboardUrl($m2mTicket, null, '&'); } } $oTpl->assign('dashboardURL', $dashboardUrl); $oTpl->display(); phpAds_PageFooter('', true); }
phpAds_PageHeader("4.1.3.2", $extra); echo "<img src='images/icon-client.gif' align='absmiddle'> " . phpAds_getParentName($campaignid); echo " <img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'> "; echo "<img src='images/icon-campaign.gif' align='absmiddle'> <b>" . phpAds_getClientName($campaignid) . "</b><br><br><br>"; phpAds_ShowSections(array("4.1.3.2", "4.1.3.3", "4.1.3.4")); } else { if (isset($move) && $move == 't') { // Convert client to campaign phpAds_PageHeader("4.1.3.2"); echo "<img src='images/icon-client.gif' align='absmiddle'> " . phpAds_getClientName($clientid); echo " <img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'> "; echo "<img src='images/icon-campaign.gif' align='absmiddle'> <b>" . $strUntitled . "</b><br><br><br>"; phpAds_ShowSections(array("4.1.3.2")); } else { // New campaign phpAds_PageHeader("4.1.3.1"); echo "<img src='images/icon-client.gif' align='absmiddle'> " . phpAds_getClientName($clientid); echo " <img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'> "; echo "<img src='images/icon-campaign.gif' align='absmiddle'> <b>" . $strUntitled . "</b><br><br><br>"; phpAds_ShowSections(array("4.1.3.1")); } } if ($campaignid != "" || isset($move) && $move == 't') { // Edit or Convert // Fetch exisiting settings // Parent setting for converting, campaign settings for editing if ($campaignid != "") { $ID = $campaignid; } if (isset($move) && $move == 't') { if (isset($clientid) && $clientid != "") {
} } phpAds_SettingsWriteAdd('type_html_auto', isset($type_html_auto)); phpAds_SettingsWriteAdd('type_html_php', isset($type_html_php)); if (!count($errormessage)) { if (phpAds_SettingsWriteFlush()) { header("Location: settings-admin.php"); exit; } } } /*********************************************************/ /* HTML framework */ /*********************************************************/ phpAds_PrepareHelp(); phpAds_PageHeader("5.1"); phpAds_ShowSections(array("5.1", "5.3", "5.4", "5.2")); phpAds_SettingsSelection("banner"); /*********************************************************/ /* Cache settings fields and get help HTML Code */ /*********************************************************/ // Split FTP settings if (!empty($phpAds_config['type_web_ftp'])) { if ($ftpserver = @parse_url($phpAds_config['type_web_ftp'])) { // Decode URL parts $ftpserver['user'] = urldecode($ftpserver['user']); $ftpserver['pass'] = urldecode($ftpserver['pass']); $ftpserver['path'] = urldecode($ftpserver['path']); $ftpserver['path'] = preg_replace('#^/#', '', $ftpserver['path']); $ftpserver['path'] = preg_replace('#/$#', '', $ftpserver['path']); $phpAds_config['type_web_ftp_host'] = $ftpserver['host'] . (isset($ftpserver['port']) && $ftpserver['port'] != '' ? ':' . $ftpserver['port'] : '');
//was empty, is still empty - just pick one, no need for redirect $ids = array_keys($aAdvertisers); $clientid = !empty($ids) ? $ids[0] : -1; //if no advertisers set to non-existent id } } else { if (!isset($aAdvertisers[$clientid])) { $page = basename($_SERVER['SCRIPT_NAME']); OX_Admin_Redirect::redirect($page); } } /*-------------------------------------------------------*/ /* HTML framework */ /*-------------------------------------------------------*/ $oHeaderModel = buildHeaderModel($clientid, $aAdvertisers); phpAds_PageHeader(null, $oHeaderModel); /*-------------------------------------------------------*/ /* Get preferences */ /*-------------------------------------------------------*/ if (!isset($hideinactive)) { if (isset($session['prefs']['advertiser-campaigns.php'][$clientid]['hideinactive'])) { $hideinactive = $session['prefs']['advertiser-campaigns.php'][$clientid]['hideinactive']; } else { $pref =& $GLOBALS['_MAX']['PREF']; $hideinactive = $pref['ui_hide_inactive'] == true; } } if (!isset($listorder)) { if (isset($session['prefs']['advertiser-campaigns.php'][$clientid]['listorder'])) { $listorder = $session['prefs']['advertiser-campaigns.php'][$clientid]['listorder']; } else {
/* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License. */ /************************************************************************/ // Include required files require "config.php"; require "lib-statistics.inc.php"; require "../libraries/lib-reports.inc.php"; // Register input variables phpAds_registerGlobal('startday', 'startmonth', 'startyear', 'endday', 'endmonth', 'endyear'); // Security check phpAds_checkAccess(phpAds_Admin + phpAds_Agency); if (phpAds_isUser(phpAds_Agency)) { $query = "SELECT clientid FROM " . $phpAds_config['tbl_clients'] . " WHERE clientid=" . $clientid . " AND agencyid=" . phpAds_getUserID(); $res = phpAds_dbQuery($query) or phpAds_sqlDie(); if (phpAds_dbNumRows($res) == 0) { phpAds_PageHeader("2"); phpAds_Die($strAccessDenied, $strNotAdmin); } } /*********************************************************/ /* Main code */ /*********************************************************/ if (isset($clientid) && $clientid != '') { if (isset($startyear) && isset($startmonth) && isset($startday) && $startyear != '' && $startmonth != '' && $startday != '') { $first_unixtimestamp = mktime(0, 0, 0, $startmonth, $startday, $startyear); } else { $first_unixtimestamp = 0; } if (isset($endyear) && isset($endmonth) && isset($endday)) { $last_unixtimestamp = mktime(23, 59, 59, $endmonth, $endday, $endyear); } else {
/** * Display page header * */ function pageHeader() { phpAds_PageHeader(phpAds_PasswordRecovery); echo "<br><br>"; }
*/ // Require the initialisation file require_once '../../init.php'; // Required files require_once MAX_PATH . '/lib/OA/Dal.php'; require_once MAX_PATH . '/lib/max/language/Loader.php'; require_once MAX_PATH . '/www/admin/config.php'; require_once MAX_PATH . '/lib/max/other/lib-userlog.inc.php'; // Register input variables phpAds_registerGlobal('start'); // Security check OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN); /*-------------------------------------------------------*/ /* HTML framework */ /*-------------------------------------------------------*/ phpAds_PageHeader("userlog-index"); phpAds_UserlogSelection("maintenance"); // Load the required language files Language_Loader::load('userlog'); /*-------------------------------------------------------*/ /* Main code */ /*-------------------------------------------------------*/ $doUserLog = OA_Dal::factoryDO('userlog'); if (!($count = $doUserLog->count())) { $count = 0; } $limit = 10; $start = isset($start) ? (int) $start : 0; $doUserLog = OA_Dal::factoryDO('userlog'); $doUserLog->orderBy('timestamp DESC'); $doUserLog->limit($start * $limit, $limit);
} } } } } } } } } } } } /*-------------------------------------------------------*/ /* HTML framework */ /*-------------------------------------------------------*/ phpAds_PageHeader("plugin-index", new OA_Admin_UI_Model_PageHeaderModel($GLOBALS['strPlugins']), '', false, true); /*-------------------------------------------------------*/ /* Main code */ /*-------------------------------------------------------*/ if (is_null($oTpl)) { if (array_key_exists('selection', $_REQUEST) && $_REQUEST['selection'] == 'groups') { $oTpl = new OA_Admin_Template('plugin-group-index-list.html'); $oTpl->assign('aWarnings', $oComponentGroupManager->aWarnings); $oTpl->assign('selected', 'groups'); $oTpl->assign('aPlugins', $oComponentGroupManager->getComponentGroupsList()); } else { $oTpl = new OA_Admin_Template('plugin-index.html'); $oTpl->assign('selected', 'plugins'); $oTpl->assign('aPackages', $oPluginManager->getPackagesList()); $oTpl->assign('aWarnings', $oPluginManager->aWarnings); $oTpl->assign('aErrors', $oPluginManager->aErrors);
if (!empty($advertiserId)) { OA_Permission::enforceAccessToObject('clients', $advertiserId); } if (!empty($campaignId)) { OA_Permission::enforceAccessToObject('campaigns', $campaignId); } if (!empty($publisherId)) { OA_Permission::enforceAccessToObject('affiliates', $publisherId); } if (!empty($zoneId)) { OA_Permission::enforceAccessToObject('zones', $zoneId); } /*-------------------------------------------------------*/ /* HTML framework */ /*-------------------------------------------------------*/ phpAds_PageHeader("5.4"); if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) { // Show all "My Account" sections phpAds_ShowSections(array("5.1", "5.2", "5.3", "5.5", "5.6", "5.4")); phpAds_UserlogSelection("index"); } else { if (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) { // Show the "Preferences", "User Log" and "Channel Management" sections of the "My Account" sections phpAds_ShowSections(array("5.1", "5.2", "5.4", "5.7")); } else { if (OA_Permission::isAccount(OA_ACCOUNT_TRAFFICKER) || OA_Permission::isAccount(OA_ACCOUNT_ADVERTISER)) { phpAds_ShowSections(array("5.1", "5.2", "5.4")); } } } // Paging related input variables
} while ($row = phpAds_dbFetchArray($res)) { phpAds_PageContext(phpAds_getBannerName($row['bannerid']), "stats-linkedbanner-history.php?affiliateid=" . $affiliateid . "&zoneid=" . $zoneid . "&bannerid=" . $row['bannerid'], $bannerid == $row['bannerid']); } phpAds_PageShortcut($strAffiliateProperties, 'affiliate-edit.php?affiliateid=' . $affiliateid, 'images/icon-affiliate.gif'); phpAds_PageShortcut($strZoneProperties, 'zone-edit.php?affiliateid=' . $affiliateid . '&zoneid=' . $zoneid, 'images/icon-zone.gif'); phpAds_PageShortcut($strIncludedBanners, 'zone-include.php?affiliateid=' . $affiliateid . '&zoneid=' . $zoneid, 'images/icon-zone-linked.gif'); phpAds_PageHeader("2.4.2.2.1"); echo "<img src='images/icon-affiliate.gif' align='absmiddle'> " . phpAds_getAffiliateName($affiliateid); echo " <img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'> "; echo "<img src='images/icon-zone.gif' align='absmiddle'> " . phpAds_getZoneName($zoneid); echo " <img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'> "; echo "<img src='images/icon-zone-linked.gif' align='absmiddle'> <b>" . phpAds_getBannerName($bannerid) . "</b><br><br><br>"; phpAds_ShowSections(array("2.4.2.2.1")); } else { phpAds_PageHeader("1.1.2.1"); echo "<img src='images/icon-zone.gif' align='absmiddle'> " . phpAds_getZoneName($zoneid); echo " <img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'> "; echo "<img src='images/icon-zone-linked.gif' align='absmiddle'> <b>" . phpAds_getBannerName($bannerid) . "</b><br><br><br>"; phpAds_ShowSections(array("1.1.2.1")); } /*********************************************************/ /* Main code */ /*********************************************************/ $lib_history_where = "zoneid = " . $zoneid . " AND bannerid = " . $bannerid; $lib_history_params = array('affiliateid' => $affiliateid, 'zoneid' => $zoneid, 'bannerid' => $bannerid); include "lib-history.inc.php"; /*********************************************************/ /* HTML framework */ /*********************************************************/ phpAds_PageFooter();
$oHeaderModel = MAX_displayWebsiteBreadcrumbs($affiliateid); if (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) { // Get other affiliates $doAffiliates = OA_Dal::factoryDO('affiliates'); $doAffiliates->addSessionListOrderBy('affiliate-zones.php'); $doAffiliates->agencyid = $agencyid; $doAffiliates->find(); while ($doAffiliates->fetch() && ($row = $doAffiliates->toArray())) { phpAds_PageContext(MAX_buildName($row['affiliateid'], $row['name']), "affiliate-invocation.php?affiliateid=" . $row['affiliateid'], $affiliateid == $row['affiliateid']); } addWebsitePageTools($affiliateid); phpAds_PageHeader("4.2.5", $oHeaderModel); } else { $sections = array(); $sections[] = "2.1"; if (OA_Permission::hasPermission(OA_PERM_ZONE_INVOCATION)) { $sections[] = "2.2"; } phpAds_PageHeader('2.2', $oHeaderModel); phpAds_ShowSections($sections); } /*-------------------------------------------------------*/ /* Main code */ /*-------------------------------------------------------*/ require_once MAX_PATH . '/lib/max/Admin/Invocation/Publisher.php'; $maxInvocation = new MAX_Admin_Invocation_Publisher(); $maxInvocation->placeInvocationForm(); /*-------------------------------------------------------*/ /* HTML framework */ /*-------------------------------------------------------*/ phpAds_PageFooter();
$translation = new OX_Translation(); $translated_message = $translation->translate($GLOBALS['strXSettingsHaveBeenUpdated'], array(htmlspecialchars($title))); OA_Admin_UI::queueMessage($translated_message, 'local', 'confirm', 0); // The settings configuration file was written correctly, OX_Admin_Redirect::redirect(basename($_SERVER['SCRIPT_NAME'])); } // Could not write the settings configuration file, store this // error message and continue $aErrormessage[0][] = $strUnableToWriteConfig; } // Set the correct section of the settings pages and display the drop-down menu $setPref = $oOptions->getSettingsPreferences($prefSection); $title = $setPref[$prefSection]['name']; // Display the settings page's header and sections $oHeaderModel = new OA_Admin_UI_Model_PageHeaderModel($title); phpAds_PageHeader('account-settings-index', $oHeaderModel); // Prepare an array of HTML elements to display for the form, and // output using the $oOption object $aSettings = array(array('text' => $strGeneralSettings, 'items' => array(array('type' => 'checkbox', 'name' => 'ui_enabled', 'text' => $uiEnabled), array('type' => 'break'), array('type' => 'text', 'name' => 'ui_applicationName', 'text' => $strAppName, 'size' => 35), array('type' => 'break'), array('type' => 'text', 'name' => 'ui_headerFilePath', 'text' => $strMyHeader, 'size' => 35), array('type' => 'break'), array('type' => 'text', 'name' => 'ui_footerFilePath', 'text' => $strMyFooter, 'size' => 35), array('type' => 'break'), array('type' => 'text', 'name' => 'ui_logoFilePath', 'text' => $strMyLogo, 'size' => 35), array('type' => 'break'), array('type' => 'text', 'name' => 'ui_headerForegroundColor', 'text' => $strGuiHeaderForegroundColor, 'size' => 35), array('type' => 'break'), array('type' => 'text', 'name' => 'ui_headerBackgroundColor', 'text' => $strGuiHeaderBackgroundColor, 'size' => 35), array('type' => 'break'), array('type' => 'text', 'name' => 'ui_headerActiveTabColor', 'text' => $strGuiActiveTabColor, 'size' => 35), array('type' => 'break'), array('type' => 'text', 'name' => 'ui_headerTextColor', 'text' => $strGuiHeaderTextColor, 'size' => 35), array('type' => 'break'), array('type' => 'checkbox', 'name' => 'ui_gzipCompression', 'text' => $strGzipContentCompression))), array('text' => $strSSLSettings, 'items' => array(array('type' => 'checkbox', 'name' => 'openads_requireSSL', 'text' => $requireSSL), array('type' => 'break'), array('type' => 'text', 'name' => 'openads_sslPort', 'text' => $sslPort, 'check' => 'wholeNumber'))), array('text' => $strDashboardSettings, 'items' => array(array('type' => 'checkbox', 'name' => 'ui_dashboardEnabled', 'text' => $GLOBALS['_MAX']['CONF']['sync']['checkForUpdates'] ? $strEnableDashboard : $strEnableDashboardSyncNotice, 'disabled' => !$GLOBALS['_MAX']['CONF']['sync']['checkForUpdates'])))); $aAuthPlugins = OX_Component::getComponents('authentication'); if (!empty($aAuthPlugins) && is_array($aAuthPlugins)) { // Add the 'none' (internal) authentication scheme to the list $aItems = array('none' => 'None (internal)'); foreach ($aAuthPlugins as $oAuthPlugin) { $aItems[$oAuthPlugin->getComponentIdentifier()] = $oAuthPlugin->getName(); } $aSettings[] = array('text' => 'Authentication mechanism', 'items' => array(array('type' => 'select', 'name' => 'authentication_type', 'text' => 'Select the plugin-component to be used for authentication', 'items' => $aItems))); } $oOptions->show($aSettings, $aErrormessage); // Display the page footer phpAds_PageFooter();
$res = phpAds_dbQuery("\n\tSELECT\n\t\tDATE_FORMAT(day, '%Y%m%d') as date,\n\t\tDATE_FORMAT(day, '{$date_format}') as date_formatted\n\tFROM\n\t\t" . $phpAds_config['tbl_adstats'] . "\n\tWHERE\n\t\t(" . implode(' OR ', $bannerids) . ")\n\tGROUP BY\n\t\tday\n\tORDER BY\n\t\tday DESC\n\tLIMIT 7\n") or phpAds_sqlDie(); while ($row = phpAds_dbFetchArray($res)) { phpAds_PageContext($row['date_formatted'], "stats-campaign-daily-hosts.php?day=" . $row['date'] . "&clientid=" . $clientid . "&campaignid=" . $campaignid, $day == $row['date']); } if (phpAds_isUser(phpAds_Admin) || phpAds_isUser(phpAds_Agency)) { 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.1.2"); echo "<img src='images/icon-advertiser.gif' align='absmiddle'> " . phpAds_getClientName($clientid); echo " <img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'> "; echo "<img src='images/icon-campaign.gif' align='absmiddle'> " . phpAds_getCampaignName($campaignid); echo " <img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'> "; echo "<img src='images/icon-date.gif' align='absmiddle'> <b>" . date(str_replace('%', '', $date_format), mktime(0, 0, 0, substr($day, 4, 2), substr($day, 6, 2), substr($day, 0, 4))) . "</b><br><br><br>"; phpAds_ShowSections(array("2.1.2.1.1", "2.1.2.1.2")); } if (phpAds_isUser(phpAds_Client)) { phpAds_PageHeader("1.1.2"); echo "<img src='images/icon-campaign.gif' align='absmiddle'> " . phpAds_getCampaignName($campaignid); echo " <img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'> "; echo "<img src='images/icon-date.gif' align='absmiddle'> <b>" . date(str_replace('%', '', $date_format), mktime(0, 0, 0, substr($day, 4, 2), substr($day, 6, 2), substr($day, 0, 4))) . "</b><br><br>"; phpAds_ShowSections(array("1.2.1.1", "1.2.1.2")); } /*********************************************************/ /* Main code */ /*********************************************************/ $lib_hourly_where = "(" . implode(' OR ', $bannerids) . ")"; include "lib-hourly-hosts.inc.php"; /*********************************************************/ /* HTML framework */ /*********************************************************/ phpAds_PageFooter();
phpAds_SessionDataStore(); /*-------------------------------------------------------*/ /* HTML framework */ /*-------------------------------------------------------*/ $oHeaderModel = buildAdvertiserHeaderModel($clientid); if (OA_Permission::isAccount(OA_ACCOUNT_MANAGER)) { phpAds_PageHeader('advertiser-access', $oHeaderModel); phpAds_ShowSections(array("4.1.2", "4.1.3", "4.1.5", "4.1.5.1")); } else { $sections = array(); if (OA_Permission::hasPermission(OA_PERM_BANNER_ACTIVATE) || OA_Permission::hasPermission(OA_PERM_BANNER_EDIT)) { $sections[] = '2.2'; } $sections[] = '2.3'; $sections[] = '2.3.1'; phpAds_PageHeader('advertiser-access', $oHeaderModel); phpAds_ShowSections($sections); } /*-------------------------------------------------------*/ /* Main code */ /*-------------------------------------------------------*/ require_once MAX_PATH . '/lib/OA/Admin/Template.php'; $oTpl = new OA_Admin_Template('advertiser-user-start.html'); OA_Admin_UI_UserAccess::assignUserStartTemplateVariables($oTpl); $oTpl->assign('action', 'advertiser-user.php'); $oTpl->assign('entityIdName', 'clientid'); $oTpl->assign('entityIdValue', $clientid); $oTpl->display(); /*-------------------------------------------------------*/ /* HTML framework */ /*-------------------------------------------------------*/
/** * Function check if advertiser or placement exists * if not: display proper error message * Error message contains link to: * - advertiser summary statistics if campaign does not exists * - stats.php if advertiser does not exists * * @param int $advertiserId Advertiser Id * @param int $placementId Placement Id (Campaign Id) */ function _checkObjectsExist($advertiserId, $placementId) { // Check if placement (campaign) exist if (0 == count(Admin_DA::getPlacements($this->coreParams + array('advertiser_id' => $advertiserId, 'placement_id' => $placementId)))) { phpAds_PageHeader('2'); // Check if advertiser (clientid) exist if (0 == count(Admin_DA::getPlacements($this->coreParams + array('advertiser_id' => $advertiserId)))) { phpAds_Die($GLOBALS['strDeadLink'], str_replace('{link}', 'stats.php', $GLOBALS['strNoAdvertiser'])); } else { $link = "stats.php?" . htmlspecialchars(preg_replace('#campaignid=[0-9]*&?#', '', $_SERVER['QUERY_STRING']), ENT_QUOTES); phpAds_Die($GLOBALS['strDeadLink'], str_replace('{link}', $link, $GLOBALS['strNoPlacement'])); } } }
| Copyright: See the COPYRIGHT.txt file. | | License: GPLv2 or later, see the LICENSE.txt file. | +---------------------------------------------------------------------------+ */ // 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 . '/lib/OA/Sync.php'; // Security check OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN); /*-------------------------------------------------------*/ /* HTML framework */ /*-------------------------------------------------------*/ phpAds_PageHeader("updates-index"); phpAds_MaintenanceSelection("product", "updates"); /*-------------------------------------------------------*/ /* Main code */ /*-------------------------------------------------------*/ // Determine environment $doApplicationVariable = OA_Dal::factoryDO('application_variable'); $doApplicationVariable->name = 'oa_version'; $doApplicationVariable->find(); $doApplicationVariable->fetch(); $current = $strCurrentlyUsing . ' ' . MAX_PRODUCT_NAME . ' v' . OA_VERSION . ' ' . ($doApplicationVariable->value != OA_VERSION ? '(warning: database is stamped as v' . $doApplicationVariable->value . ') ' : ''); $current .= $strRunningOn . ' ' . str_replace('/', ' ', ereg_replace(" .*\$", '', $_SERVER["SERVER_SOFTWARE"])) . ', '; $current .= 'PHP ' . phpversion() . ' ' . $strAndPlain . ' ' . phpAds_dbmsname; // Get the database version number. $connection = DBC::getCurrentConnection(); $connectionId = $connection->getConnectionId();
/* */ /* This program is free software. You can redistribute it and/or modify */ /* it under the terms of the GNU General Public License as published by */ /* the Free Software Foundation; either version 2 of the License. */ /************************************************************************/ // Include required files require "config.php"; require "lib-maintenance.inc.php"; require "lib-statistics.inc.php"; require "lib-zones.inc.php"; // Security check phpAds_checkAccess(phpAds_Admin); /*********************************************************/ /* HTML framework */ /*********************************************************/ phpAds_PageHeader("5.3"); phpAds_ShowSections(array("5.1", "5.3", "5.4", "5.2")); phpAds_MaintenanceSelection("storage"); /*********************************************************/ /* Main code */ /*********************************************************/ echo "<br>"; echo $strStorageExplaination; echo "<br><br>"; phpAds_ShowBreak(); echo "<img src='images/" . $phpAds_TextDirection . "/icon-undo.gif' border='0' align='absmiddle'> <a href='maintenance-storage-move.php'>{$strMoveToDirectory}</a> "; phpAds_ShowBreak(); /*********************************************************/ /* HTML framework */ /*********************************************************/ phpAds_PageFooter();
$Id: affiliate-edit.php 12839 2007-11-27 16:32:39Z bernard.lange@openads.org $ */ // Require the initialisation file 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'> <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(); /*-------------------------------------------------------*/
function displayPage($affiliateid, $form, $oPublisherDll = null) { //header and breadcrumbs $oHeaderModel = MAX_displayWebsiteBreadcrumbs($affiliateid); if ($affiliateid != "") { OA_Admin_Menu::setPublisherPageContext($affiliateid, 'affiliate-edit.php'); addWebsitePageTools($affiliateid); phpAds_PageHeader(null, $oHeaderModel); } else { phpAds_PageHeader("affiliate-edit_new", $oHeaderModel); } //get template and display form $oTpl = new OA_Admin_Template('affiliate-edit.html'); $oTpl->assign('affiliateid', $affiliateid); $oTpl->assign('form', $form->serialize()); if (isset($oPublisherDll)) { $oTpl->assign('error', $oPublisherDll->_errorMessage); $oTpl->assign('notice', $oPublisherDll->_noticeMessage); } $oTpl->assign('showAdDirect', defined('OA_AD_DIRECT_ENABLED') && OA_AD_DIRECT_ENABLED === true ? true : false); $oTpl->assign('keyAddNew', $keyAddNew); $oTpl->display(); //footer phpAds_PageFooter(); }
$navorder = ''; } if (isset($Session['prefs']['stats-campaign-banners.php']['orderdirection'])) { $navdirection = $Session['prefs']['stats-campaign-banners.php']['orderdirection']; } else { $navdirection = ''; } $res = phpAds_dbQuery("\n\tSELECT\n\t\t*\n\tFROM\n\t\t" . $phpAds_config['tbl_banners'] . "\n\tWHERE\n\t\tclientid = '{$campaignid}'\n\t" . phpAds_getBannerListOrder($navorder, $navdirection) . "\n") or phpAds_sqlDie(); while ($row = phpAds_dbFetchArray($res)) { phpAds_PageContext(phpAds_buildBannerName($row['bannerid'], $row['description'], $row['alt']), "stats-banner-affiliates.php?clientid=" . $clientid . "&campaignid=" . $campaignid . "&bannerid=" . $row['bannerid'], $bannerid == $row['bannerid']); } phpAds_PageShortcut($strClientProperties, 'client-edit.php?clientid=' . $clientid, 'images/icon-client.gif'); phpAds_PageShortcut($strCampaignProperties, 'campaign-edit.php?clientid=' . $clientid . '&campaignid=' . $campaignid, 'images/icon-campaign.gif'); phpAds_PageShortcut($strBannerProperties, 'banner-edit.php?clientid=' . $clientid . '&campaignid=' . $campaignid . '&bannerid=' . $bannerid, 'images/icon-banner-stored.gif'); phpAds_PageShortcut($strModifyBannerAcl, 'banner-acl.php?clientid=' . $clientid . '&campaignid=' . $campaignid . '&bannerid=' . $bannerid, 'images/icon-acl.gif'); phpAds_PageHeader("2.1.2.2.2"); echo "<img src='images/icon-client.gif' align='absmiddle'> " . phpAds_getParentName($campaignid); echo " <img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'> "; echo "<img src='images/icon-campaign.gif' align='absmiddle'> " . phpAds_getClientName($campaignid); echo " <img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'> "; echo "<img src='images/icon-banner-stored.gif' align='absmiddle'> <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 */ /*********************************************************/ $manual['clicks'] = 0; $manual['views'] = 0; // Get affiliates and build the tree $res_affiliates = phpAds_dbQuery("\n\tSELECT \n\t\taffiliateid, name\n\tFROM \n\t\t" . $phpAds_config['tbl_affiliates'] . "\n\t" . phpAds_getAffiliateListOrder($listorder, $orderdirection) . "\n\t") or phpAds_sqlDie(); while ($row_affiliates = phpAds_dbFetchArray($res_affiliates)) {
if (phpAds_isUser(phpAds_Admin)) { $query = "SELECT clientid,clientname" . " FROM " . $phpAds_config['tbl_clients'] . " WHERE clientid!=" . $clientid; } elseif (phpAds_isUser(phpAds_Agency)) { $query = "SELECT clientid,clientname" . " FROM " . $phpAds_config['tbl_clients'] . " WHERE clientid!=" . $clientid . " AND agencyid=" . phpAds_getUserID(); } $res = phpAds_dbQuery($query) or phpAds_sqlDie(); while ($row = phpAds_dbFetchArray($res)) { $extra .= "\t\t\t\t\t<option value='" . $row['clientid'] . "'>" . phpAds_buildName($row['clientid'], $row['clientname']) . "</option>\n"; } $extra .= "\t\t\t\t</select> \n"; $extra .= "\t\t\t\t<input type='image' src='images/" . $phpAds_TextDirection . "/go_blue.gif'><br>\n"; $extra .= "\t\t\t\t<img src='images/break.gif' height='1' width='160' vspace='4'><br>\n"; $extra .= "\t\t\t\t<img src='images/icon-recycle.gif' align='absmiddle'>\n"; $extra .= "\t\t\t\t<a href='campaign-delete.php?clientid={$clientid}&campaignid={$campaignid}&returnurl=advertiser-campaigns.php'" . phpAds_DelConfirm($strConfirmDeleteTracker) . ">{$strDelete}</a><br>\n"; $extra .= "\t\t\t\t</form>\n"; phpAds_PageHeader("4.1.3.5", $extra); echo "<img src='images/icon-advertiser.gif' align='absmiddle'> " . phpAds_getParentClientName($campaignid); echo " <img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'> "; echo "<img src='images/icon-campaign.gif' align='absmiddle'> <b>" . phpAds_getCampaignName($campaignid) . "</b><br><br><br>"; phpAds_ShowSections(array("4.1.3.2", "4.1.3.3", "4.1.3.4", "4.1.3.5")); } if (isset($campaignid) && $campaignid != '') { $res = phpAds_dbQuery("SELECT *" . " FROM " . $phpAds_config['tbl_campaigns'] . " WHERE campaignid=" . $campaignid) or phpAds_sqlDie(); if (phpAds_dbNumRows($res)) { $campaign = phpAds_dbFetchArray($res); } } $tabindex = 1; // Header echo "\t\t\t\t<table width='100%' border='0' align='center' cellspacing='0' cellpadding='0'>\n"; echo "\t\t\t\t<tr height='25'>\n";
*/ // 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/OA/Admin/UI/UserAccess.php'; require_once MAX_PATH . '/lib/max/other/html.php'; // Security check OA_Permission::enforceAccount(OA_ACCOUNT_ADMIN, OA_ACCOUNT_MANAGER); OA_Permission::enforceAccountPermission(OA_ACCOUNT_MANAGER, OA_PERM_SUPER_ACCOUNT); OA_Permission::enforceAccessToObject('agency', $agencyid); /*-------------------------------------------------------*/ /* HTML framework */ /*-------------------------------------------------------*/ phpAds_PageHeader('agency-access'); if (OA_Permission::isAccount(OA_ACCOUNT_ADMIN)) { $doAgency = OA_Dal::staticGetDO('agency', $agencyid); MAX_displayInventoryBreadcrumbs(array(array("name" => $doAgency->name)), "agency"); } /*-------------------------------------------------------*/ /* Main code */ /*-------------------------------------------------------*/ require_once MAX_PATH . '/lib/OA/Admin/Template.php'; $oTpl = new OA_Admin_Template('agency-user-start.html'); OA_Admin_UI_UserAccess::assignUserStartTemplateVariables($oTpl); $oTpl->assign('action', 'agency-user.php'); $oTpl->assign('entityIdName', 'agencyid'); $oTpl->assign('entityIdValue', $agencyid); $oTpl->display(); /*-------------------------------------------------------*/
} if (!count($aErrormessage)) { if ($doUsers->update() === false) { // Unable to update the preferences $aErrormessage[0][] = $strUnableToWritePrefs; } else { $translation = new OX_Translation(); $translated_message = $translation->translate($GLOBALS['strPasswordChanged']); OA_Admin_UI::queueMessage($translated_message, 'local', 'confirm', 0); // The "preferences" were written correctly saved to the database, // go to the "next" preferences page from here OX_Admin_Redirect::redirect(basename($_SERVER['SCRIPT_NAME'])); } } } // Set the correct section of the preference pages and display the drop-down menu $prefSection = "password"; $setPref = $oOptions->getSettingsPreferences($prefSection); $title = $setPref[$prefSection]['name']; // Display the settings page's header and sections $oHeaderModel = new OA_Admin_UI_Model_PageHeaderModel($title); phpAds_PageHeader('account-user-index', $oHeaderModel); // Get the current logged in user details $oUser = OA_Permission::getCurrentUser(); $aUser = $oUser->aUser; // Prepare an array of HTML elements to display for the form, and // output using the $oOption object $aSettings = array(array('text' => $strChangePassword, 'items' => array(array('type' => 'plaintext', 'name' => 'username', 'value' => $aUser['username'], 'text' => $strUsername, 'size' => 35), array('type' => 'break'), array('type' => 'plaintext', 'name' => 'contact_name', 'value' => $aUser['contact_name'], 'text' => $strFullName, 'size' => 35), array('type' => 'break'), array('type' => 'plaintext', 'name' => 'email_address', 'value' => $aUser['email_address'], 'text' => $strEmailAddress, 'size' => 35), array('type' => 'break'), array('type' => 'password', 'name' => 'pwold', 'text' => $strCurrentPassword, 'disabled' => ''), array('type' => 'break'), array('type' => 'password', 'name' => 'pw', 'text' => $strChooseNewPassword), array('type' => 'break'), array('type' => 'password', 'name' => 'pw2', 'text' => $strReenterNewPassword, 'check' => 'compare:pw')))); $oOptions->show($aSettings, $aErrormessage); // Display the page footer phpAds_PageFooter();
if (phpAds_isUser(phpAds_Admin)) { $query = "SELECT clientid,clientname" . " FROM " . $phpAds_config['tbl_clients'] . " WHERE clientid != " . $clientid; } elseif (phpAds_isUser(phpAds_Agency)) { $query = "SELECT clientid,clientname" . " FROM " . $phpAds_config['tbl_clients'] . " WHERE clientid != " . $clientid . " AND agencyid=" . phpAds_getUserID(); } $res = phpAds_dbQuery($query) or phpAds_sqlDie(); while ($row = phpAds_dbFetchArray($res)) { $extra .= "\t\t\t\t\t<option value='" . $row['clientid'] . "'>" . phpAds_buildName($row['clientid'], $row['clientname']) . "</option>\n"; } $extra .= "\t\t\t\t</select> \n"; $extra .= "\t\t\t\t<input type='image' src='images/" . $phpAds_TextDirection . "/go_blue.gif'><br>\n"; $extra .= "\t\t\t\t<img src='images/break.gif' height='1' width='160' vspace='4'><br>\n"; $extra .= "\t\t\t\t<img src='images/icon-recycle.gif' align='absmiddle'>\n"; $extra .= "\t\t\t\t<a href='tracker-delete.php?clientid={$clientid}&trackerid={$trackerid}&returnurl=advertiser-trackers.php'" . phpAds_DelConfirm($strConfirmDeleteTracker) . ">{$strDelete}</a><br>\n"; $extra .= "\t\t\t\t</form>\n"; phpAds_PageHeader("4.1.4.3", $extra); echo "\t\t\t\t<img src='images/icon-advertiser.gif' align='absmiddle'> " . phpAds_getClientName($clientid) . "\n"; echo "\t\t\t\t<img src='images/" . $phpAds_TextDirection . "/caret-rs.gif'>\n"; echo "\t\t\t\t<img src='images/icon-tracker.gif' align='absmiddle'>\n"; echo "\t\t\t\t<b>" . phpAds_getTrackerName($trackerid) . "</b><br><br><br>\n"; phpAds_ShowSections(array("4.1.4.2", "4.1.4.3", "4.1.4.5", "4.1.4.4")); } if (isset($trackerid) && $trackerid != '') { $res = phpAds_dbQuery("SELECT *" . " FROM " . $phpAds_config['tbl_trackers'] . " WHERE trackerid=" . $trackerid) or phpAds_sqlDie(); if (phpAds_dbNumRows($res)) { $tracker = phpAds_dbFetchArray($res); } } $tabindex = 1; // Header echo "\t\t\t\t<table width='100%' border='0' align='center' cellspacing='0' cellpadding='0'>\n";