/** * The getPublisherListByAgencyId method returns a list of publishers for * a specified agency. * * @access public * * @param string $sessionId * @param integer $agencyId * @param array &$aPublisherList Array of OA_Dll_PublisherInfo classes * * @return boolean */ function getPublisherListByAgencyId($sessionId, $agencyId, &$aPublisherList) { if ($this->verifySession($sessionId)) { return $this->_validateResult($this->_dllPublisher->getPublisherListByAgencyId($agencyId, $aPublisherList)); } else { return false; } }
function processForm($affiliateid, $form, $oComponent) { $aFields = $form->exportValues(); $newWebsite = empty($aFields['affiliateid']); // Setup a new publisher object and set the fields passed in from the form: $oPublisher = new OA_Dll_PublisherInfo(); $oPublisher->agencyId = $aFields['agencyid']; $oPublisher->contactName = $aFields['contact']; $oPublisher->emailAddress = $aFields['email']; $oPublisher->publisherId = $aFields['affiliateid']; $oPublisher->publisherName = $aFields['name']; $oPublisher->website = $aFields['website']; // process form data for oxThorium if this is edit existing website if (!$newWebsite && $oComponent) { $aFields['affiliateid'] = $oPublisher->publisherId; $oComponent->processAffiliateForm($aFields); } $oPublisherDll = new OA_Dll_Publisher(); if ($oPublisherDll->modify($oPublisher) && !$oPublisherDll->_noticeMessage) { // Queue confirmation message $translation = new OX_Translation(); if ($newWebsite) { //process form data for oxThorium for new website if ($oComponent) { $aFields['affiliateid'] = $oPublisher->publisherId; $oComponent->processAffiliateForm($aFields); } $translated_message = $translation->translate($GLOBALS['strWebsiteHasBeenAdded'], array(MAX::constructURL(MAX_URL_ADMIN, 'affiliate-edit.php?affiliateid=' . $oPublisher->publisherId), htmlspecialchars($oPublisher->publisherName), MAX::constructURL(MAX_URL_ADMIN, 'zone-edit.php?affiliateid=' . $oPublisher->publisherId))); OA_Admin_UI::queueMessage($translated_message, 'local', 'confirm', 0); $redirectURL = "website-index.php"; } else { $translated_message = $translation->translate($GLOBALS['strWebsiteHasBeenUpdated'], array(MAX::constructURL(MAX_URL_ADMIN, 'affiliate-edit.php?affiliateid=' . $oPublisher->publisherId), htmlspecialchars($oPublisher->publisherName))); $redirectURL = "affiliate-edit.php?affiliateid={$oPublisher->publisherId}"; } OA_Admin_UI::queueMessage($translated_message, 'local', 'confirm', 0); OX_Admin_Redirect::redirect($redirectURL); } return $oPublisherDll; }