protected function setVariableValues() { $this->setVariable('account_name', $this->mailAccount->getAccountName()); $this->setVariable('from_name', $this->mailAccount->getFromName()); $this->setVariable('account_email', $this->mailAccount->getAccountEmail()); if ($this->mailAccount->useSmtp()) { $this->setVariable('use_smtp', Gpf_Lang::_('Yes', null, $this->getRecipientLanguage())); } else { $this->setVariable('use_smtp', Gpf_Lang::_('No', null, $this->getRecipientLanguage())); } $this->setVariable('smtp_server', $this->mailAccount->getSmtpServer()); $this->setVariable('smtp_port', $this->mailAccount->getSmtpPort()); if ($this->mailAccount->useSmtpAuth()) { $this->setVariable('smtp_auth', Gpf_Lang::_('Yes', null, $this->getRecipientLanguage())); } else { $this->setVariable('smtp_auth', Gpf_Lang::_('No', null, $this->getRecipientLanguage())); } if ($this->mailAccount->useSmtpSsl()) { $this->setVariable('smtp_ssl', Gpf_Lang::_('Yes', null, $this->getRecipientLanguage())); } else { $this->setVariable('smtp_ssl', Gpf_Lang::_('No', null, $this->getRecipientLanguage())); } $this->setVariable('smtp_username', $this->mailAccount->getSmtpUser()); if ($this->mailAccount->isDefault()) { $this->setVariable('is_default', Gpf_Lang::_('Yes', null, $this->getRecipientLanguage())); } else { $this->setVariable('is_default', Gpf_Lang::_('No', null, $this->getRecipientLanguage())); } }
private function createResponse($action){ $responseManager = new Pap_Mobile_ResponseManager(); if($action=='login'){ $response = $responseManager->login($_REQUEST[self::USERNAME_PARAM], $_REQUEST[self::PASSWORD_PARAM]); } else if($action=='widget'){ $response = $responseManager->widget($_REQUEST[self::USERNAME_PARAM], $_REQUEST[self::PASSWORD_PARAM]); } else if($action=='sell_notification'){ if(isset($_REQUEST['fromtime'])) $response = $responseManager->sellNotification($this->getSession(), $_REQUEST['fromtime']); else $response = $responseManager->sellNotification($this->getSession()); } else if($action=='waiting_tasks'){ $response = $responseManager->waitingTasks($this->getSession()); } else if($action=='load_transactions'){ $from = $_REQUEST['from']; $to = $_REQUEST['to']; if(isset($_REQUEST['fromtime'])) { $response = $responseManager->loadTransactionsFromTime($this->getSession(), $_REQUEST['fromtime'], $from, $to); } else $response = $responseManager->loadTransactions($this->getSession(), $from, $to); } else if($action=='trafic_overview'){ $isToday = $_REQUEST['period'] == 'today'; $response = $responseManager->traficOverview($this->getSession(),$isToday); } else if($action=='notification_registration'){ $id = $_REQUEST['id']; $isregister = $_REQUEST['register'] != 'false'; $client_type = $_REQUEST['client_type']; if($isregister) $response = $responseManager->registerNotifications($this->getSession(),$id,$client_type); else $response = $responseManager->unregisterNotifications($this->getSession(),$id); } else { $response = new Pap_Mobile_Response(false); $response->exception = Gpf_Lang::_('Unsupported action'); } return $response; }
private function getTypeAsText($type) { switch ($type) { case Pap_Db_Campaign::CAMPAIGN_TYPE_ON_INVITATION: return Gpf_Lang::_('Private - Visible only for invited affiliates'); case Pap_Db_Campaign::CAMPAIGN_TYPE_PUBLIC: return Gpf_Lang::_('Public - visible to all'); case Pap_Db_Campaign::CAMPAIGN_TYPE_PUBLIC_MANUAL: return Gpf_Lang::_('Public - with manual approval'); } return Gpf_Lang::_('unknown'); }
protected function setVariableValues() { $this->setVariable('username', $this->user->getUsername()); $this->setVariable('firstname', $this->user->getFirstName()); $this->setVariable('lastname', $this->user->getLastName()); $this->setVariable('newPasswordUrl', $this->url); $this->setVariable('newPasswordLink', '<a href="' . $this->fullUrl . '">' . Gpf_Lang::_('To reset your password click here', null, $this->getRecipientLanguage()) . '</a>'); $this->addRecipient($this->user->getEmail()); }
static function getAll(){ $fields = Pap_Common_UserFields::getInstance()->getUserFields(array('M', 'O', 'R'), Gpf::YES); $fields[self::VAR_AFF_SIGN] = Gpf_Lang::_('Affiliate Signup'); $fields[self::VAR_DEST_URL] = Gpf_Lang::_('Destination URL'); $fields[self::VAR_AFF_ID] = Gpf_Lang::_('Affiliate ID'); $fields[self::BANNER_ID] = Gpf_Lang::_('Banner ID'); $valueContext = new Gpf_Plugins_ValueContext($fields); Gpf_Plugins_Engine::extensionPoint('PostAffiliate.RebrandPdfBanner_Variables.getAll', $valueContext); return $valueContext->get(); }
protected function setVariableValues() { parent::setVariableValues(); $transactionFields = Pap_Common_TransactionFields::getInstance(); $this->updateTransactionFields($transactionFields); $transactionValues = $transactionFields->getTransactionFieldsValues(); foreach($transactionValues as $code => $value) { if ($code == Pap_Common_TransactionFields::CAMPAIGNNAME) { $value = Gpf_Lang::_localizeRuntime($value, $this->getRecipientLanguage()); } if ($code == Pap_Common_TransactionFields::STATUS) { $value = Gpf_Lang::_($value, null, $this->getRecipientLanguage()); } $this->setVariable($code, $value); } }
public static function toString() { return Gpf_Lang::_("number of sales"); }
public function getString() { return Gpf_Lang::_('add bonus commission %s to original referer for every sale', $this->getFormattedBonusValue()); }
public static function toString() { return Gpf_Lang::_("value of total cost and value of total cost in recurring sales"); }
public static function toString() { return Gpf_Lang::_("count of sales and recurring sales"); }
public static function getCampaignParamName() { $parameterName = trim(Gpf_Settings::get(Pap_Settings::PARAM_NAME_CAMPAIGN_ID)); if ($parameterName == '') { $mesage = Gpf_Lang::_('Campaign ID parameter name is empty. Review URL parameter name settings'); Gpf_Log::critical($mesage); throw new Gpf_Exception($mesage); } return $parameterName; }
/** * Translate input message into selected language. * If translation will not be found, return same message. * * @param string $message * @return string */ public function _($message) { $args = func_get_args(); return Gpf_Lang::_($message, $args); }
protected function setVariableValues() { $this->setUserVariables(); //Affiliate URL variables $affiliateLoginUrl = Gpf_Paths::getInstance()->getFullBaseServerUrl() . 'affiliates/login.php'; $this->setVariable('affiliateLoginUrl', $affiliateLoginUrl); $this->setVariable('affiliateLoginLink', '<a href="' . $affiliateLoginUrl .'">' . Gpf_Lang::_('Affiliate login', null, $this->getRecipientLanguage()) . '</a>'); $this->setStatsVariables(); //Merchant URL variables $merchantLoginUrl = Gpf_Paths::getInstance()->getFullBaseServerUrl() . 'merchants/login.php'; $this->setVariable('merchantLoginUrl', $merchantLoginUrl); $this->setVariable('merchantLoginLink', '<a href="' . $merchantLoginUrl . '">' . Gpf_Lang::_('Merchant login', null, $this->getRecipientLanguage()) . '</a>'); $this->setVariable('defaultCurrency', $this->getDefaultCurrencySymbol()); Gpf_Plugins_Engine::extensionPoint('PostAffiliate.UserMail.setVariableValues', $this); }
public static function toString() { return Gpf_Lang::_("put affiliate into commission group (retroactively)"); }
public static function toString() { return Gpf_Lang::_("value of total cost"); }
/** * returns text name for campaign type */ public static function getCampaignTypeAsText($type) { switch($type) { case Pap_Db_Campaign::CAMPAIGN_TYPE_ON_INVITATION: return Gpf_Lang::_("private"); case Pap_Db_Campaign::CAMPAIGN_TYPE_PUBLIC_MANUAL: return Gpf_Lang::_("public with approval"); case Pap_Db_Campaign::CAMPAIGN_TYPE_PUBLIC: return Gpf_Lang::_("public"); } return $obj->_("unknown"); }
public static function toString() { return Gpf_Lang::_("value of direct subaffiliates total cost"); }
public static function toString() { return Gpf_Lang::_("value of commissions"); }
public static function toString() { return Gpf_Lang::_("value of commissions from 1st tier only"); }
public static function toString() { return Gpf_Lang::_("add bonus commission"); }