protected function initFields() {
     $this->addField('data1', Gpf_Lang::_runtime('ICQ'), 'T', 'O', 0);
     $this->addField('data2', Gpf_Lang::_runtime('MSN Messenger'), 'T', 'O', 0);
     $this->addField('data3', Gpf_Lang::_runtime('Skype'), 'T', 'O', 0);
     $this->addField('data4', Gpf_Lang::_runtime('Yahoo Messenger'), 'T', 'O', 0);
     $this->addField('data5', Gpf_Lang::_runtime('Google talk'), 'T', 'O', 0);
     $this->addField('data6', Gpf_Lang::_runtime('Contact email'), 'T', 'O', 0);
     $this->addField('data7', Gpf_Lang::_runtime('Phone'), 'T', 'O', 0);
     $this->addField('data8', Gpf_Lang::_runtime('Fax'), 'T', 'O', 0);
     $this->addField('data9', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data10', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data11', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data12', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data13', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data14', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data15', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data16', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data17', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data18', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data19', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data20', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data21', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data22', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data23', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data24', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data25', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
 }
示例#2
0
	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;
	}
 public function __construct() {
     parent::__construct();
     $this->mailTemplateFile = 'on_vat_payout.stpl';
     $this->isHtmlMail = true;
     $this->templateName = Gpf_Lang::_runtime('Affiliate - On VAT payout');
     $this->subject = Gpf_Lang::_runtime('Your commissions');
 }
 protected function initFields() {
     $this->addField('parentuserid', Gpf_Lang::_runtime('Parent affiliate'), 'T', 'O', 0);
     $this->addField('refid', Gpf_Lang::_runtime('Referral ID'), 'T', 'M', 0);
     $this->addField('notificationemail', Gpf_Lang::_runtime('Notification email'), 'E', 'D', 0);
     
     $this->addField('data1', Gpf_Lang::_runtime('Web Url'), 'T', 'M', 0);
     $this->addField('data2', Gpf_Lang::_runtime('Company name'), 'T', 'M', 0);
     $this->addField('data3', Gpf_Lang::_runtime('Street'), 'T', 'M', 0);
     $this->addField('data4', Gpf_Lang::_runtime('City'), 'T', 'M', 0);
     $this->addField('data5', Gpf_Lang::_runtime('State'), 'T', 'M', 0);
     $this->addField('data6', Gpf_Lang::_runtime('Country'), 'C', 'M', 0);
     $this->addField('data7', Gpf_Lang::_runtime('Zipcode'), 'T', 'O', 0);
     $this->addField('data8', Gpf_Lang::_runtime('Phone'), 'T', 'O', 0);
     $this->addField('data9', Gpf_Lang::_runtime('Fax'), 'T', 'O', 0);
     $this->addField('data10', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data11', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data12', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data13', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data14', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data15', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data16', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data17', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data18', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data19', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data20', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data21', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data22', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data23', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data24', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
     $this->addField('data25', Gpf_Lang::_runtime('Unused'), 'T', 'D', 0);
 }
 public function __construct() {
     parent::__construct();
     $this->mailTemplateFile = 'merchant_on_commission_approved.stpl';
     $this->isHtmlMail = true;
     $this->templateName = Gpf_Lang::_runtime('Merchant - Commission approved');
     $this->subject = Gpf_Lang::_runtime('Commission approved');
 }
 public function __construct() {
     parent::__construct();
     $this->mailTemplateFile = 'new_user_signup_approved.stpl';
     $this->isHtmlMail = true;
     $this->templateName = Gpf_Lang::_runtime('Affiliate - New User Signup Approved');
     $this->subject = '{$firstname}' . Gpf_Lang::_runtime(', welcome to our affiliate program');
 }
 public function __construct() {
 	parent::__construct();
 	$this->initColumns();
     $this->setName(Gpf_Lang::_runtime("Affiliates"));
     $this->setDescription(Gpf_Lang::_runtime("AffiliatesImportExportDescription"));
     $this->paramsArray['papUserIds'] = array();
 }
 public function __construct() {
     parent::__construct();
     $this->mailTemplateFile = 'on_subaffiliate_signup.stpl';
     $this->isHtmlMail = true;
     $this->templateName = Gpf_Lang::_runtime('Affiliate - New Subaffiliate signup');
     $this->subject = Gpf_Lang::_runtime('New subaffiliate signed up');
 }
 public function __construct() {
     parent::__construct();
     $this->mailTemplateFile = 'merchant_on_sale.stpl';
     $this->isHtmlMail = true;
     $this->templateName = Gpf_Lang::_runtime('Merchant - New Sale / Lead');
     $this->subject = Gpf_Lang::_runtime('New sale / lead');
 }
 public function __construct() {
     parent::__construct();
     $this->mailTemplateFile = 'affiliate_on_change_commission_status.stpl';
     $this->isHtmlMail = true;
     $this->templateName = Gpf_Lang::_runtime('Affiliate - On change  Sale / Lead status');
     $this->subject = Gpf_Lang::_runtime('Change sale / lead status');
 }
 public function __construct() {
     parent::__construct();
     $this->mailTemplateFile = 'merchant_contact_us.stpl';
     $this->isHtmlMail = true;
     $this->templateName = Gpf_Lang::_runtime('Merchant - Affiliate filled Contact us form');
     $this->subject = Gpf_Lang::_runtime('Affiliate filled Contact us form');
 }
 public function __construct() {
     parent::__construct();
     $this->mailTemplateFile = 'autoregisteringaffiliates_affiliate_on_first_sale.stpl';
     $this->isHtmlMail = true;
     $this->templateName = Gpf_Lang::_runtime('Auto Registering Affiliates - Affiliate - First Sale / Lead');
     $this->subject = Gpf_Lang::_runtime('Welcome to our affiliate program - First Sale / Lead');
 }
 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()));
     }
 }
 public function __construct() {
     parent::__construct();
     $this->mailTemplateFile = 'new_user_signup_declined.stpl';
     $this->isHtmlMail = true;
     $this->templateName = Gpf_Lang::_runtime('Affiliate - New User Signup Declined');
     $this->subject = Gpf_Lang::_runtime('You have been declined in affiliate program');
 }
 public function __construct() {
     parent::__construct();
     $this->mailTemplateFile = 'merchant_new_user_signup.stpl';
     $this->isHtmlMail = true;
     $this->templateName = Gpf_Lang::_runtime('Merchant - New User Signup');
     $this->subject = Gpf_Lang::_runtime('New user signed up');
 }
 public function __construct() {
     parent::__construct();
     $this->mailTemplateFile = 'affiliate_direct_link_notification.stpl';
     $this->isHtmlMail = true;
     $this->templateName = Gpf_Lang::_runtime('Affiliate - DirectLink Notification');
     $this->subject = Gpf_Lang::_runtime('DirectLink notification');
 }
 public function __construct() {
     parent::__construct();
     $this->mailTemplateFile = 'pay_day_reminder.stpl';
     $this->templateName = Gpf_Lang::_runtime('Merchant - Pay day reminder');
     $this->subject = Gpf_Lang::_runtime('Pay day reminder');
     $this->payAffiliatesList = new Pap_Mail_PayDayReminder_PayAffiliatesList();
 }
 public function __construct($saleId = null) {
     parent::__construct();
     $this->mailTemplateFile = 'splitcommissions_merchant_on_sale.stpl';
     $this->isHtmlMail = true;
     $this->templateName = Gpf_Lang::_runtime('Split Commission Merchant - New Sale / Lead');
     $this->subject = Gpf_Lang::_runtime('New sale summary mail');
     $this->saleId = $saleId;
 }
 /**
  * @param $directLink can be null only in update step and create account task
  */
 public function __construct(Pap_Db_DirectLinkUrl $directLink = null) {
     parent::__construct();
     $this->mailTemplateFile = 'merchant_new_direct_link_notification.stpl';
     $this->isHtmlMail = true;
     $this->templateName = Gpf_Lang::_runtime('Merchant - New DirectLink Notification');
     $this->subject = Gpf_Lang::_runtime('New DirectLink notification');
     $this->directLink = $directLink;
 }
 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());
 }
示例#22
0
 protected function setVariableValues() {
 	parent::setVariableValues();
 	
 	$this->setVariable('payment', $this->payout->getAmountAsText());
 	$this->setVariable('payoutcurrency', $this->payout->getCurrency()->getSymbol());
 	$this->setVariable('invoicenumber', $this->payout->getInvoiceNumber());
 	if ($this->payout->getPayoutOption() != null) {
         $this->setVariable('payoutmethod', Gpf_Lang::_localizeRuntime($this->payout->getPayoutOption()->getName(), $this->getRecipientLanguage()));
 	}
 }
示例#23
0
    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();
    }
示例#24
0
 function __construct() {
     parent::__construct("signup_fields.tpl", "affiliateForm", "signup");
     $this->addStaticField("username", $this->_("Username (Email)"), "T", "M");
     $this->addStaticField("firstname", $this->_("First name"), "T", "M");
     $this->addStaticField("lastname", $this->_("Last name"), "T", "M");
     
     $this->addStaticField("agreeWithTerms", $this->_("I agree with terms & conditions"), "B", "O");
     
     $terms = Gpf_Lang::_localizeRuntime(Gpf_Settings::get(Pap_Settings::SIGNUP_TERMS_SETTING_NAME));
     $this->add("<label>" . $this->_('Terms & conditions') . "</label><textarea>" . $terms . "</textarea>",  'termsAndConditions');
     
 }
 protected function loadSetting() {
     parent::loadSetting();
     $this->addSetting(Pap_Settings::POST_SIGNUP_TYPE_SETTING_NAME);
     $this->addSetting(Pap_Settings::POST_SIGNUP_URL_SETTING_NAME);
     $this->addValue(Pap_Settings::SIGNUP_TERMS_SETTING_NAME, Gpf_Lang::_localizeRuntime(Gpf_Settings::get(Pap_Settings::SIGNUP_TERMS_SETTING_NAME)));
     $this->addSetting(Pap_Settings::INCLUDE_PAYOUT_OPTIONS);
     $this->addSetting(Pap_Settings::PAYOUT_OPTIONS);
     $this->addSetting(Pap_Settings::FORCE_PAYOUT_OPTION);
     $this->addSetting(Pap_Settings::FORCE_TERMS_ACCEPTANCE_SETTING_NAME);
     $this->addSetting(Pap_Settings::DEFAULT_PAYOUT_METHOD);
     $this->loadParentFromRequest();
     $this->addDefaultCountry();
 }
 /**
  * Validate Db_Row
  *
  * @param Gpf_DbEngine_Row $row
  * @throws Gpf_DbEngine_Row_ConstraintException
  */
 public function validate(Gpf_DbEngine_Row $row)
 {
     $value = $row->get($this->columnName);
     if ($value == null || $value == "") {
         return;
     }
     if (preg_match($this->regExp, $value) != 1) {
         if ($this->message == "") {
             throw new Gpf_DbEngine_Row_ConstraintException($this->columnName, $this->_("Column %s contains unallowed characters", $this->columnName));
         }
         throw new Gpf_DbEngine_Row_ConstraintException($this->columnName, Gpf_Lang::_replaceArgs($this->message, $value));
     }
 }
示例#27
0
    private function addDefaultGadgets() {
        $this->addGadget('C', Gpf_Lang::_runtime('Quick start actions'), 'content://QuickStartActionsGadget',
            Gpf_Db_Table_Gadgets::POSITION_TYPE_SIDEBAR, 63, 1000, 333, 59);

        $this->addGadget('C', Gpf_Lang::_runtime('Pending tasks'), 'content://PendingTasksGadget',
            Gpf_Db_Table_Gadgets::POSITION_TYPE_SIDEBAR, 122, 1000, 333, 170);
            
        $this->addGadget('C', Gpf_Lang::_runtime('Traffic stats'), 'content://trafficStatsGadget',
            Gpf_Db_Table_Gadgets::POSITION_TYPE_SIDEBAR, 292, 1000, 333, 160);

        $this->addGadget('C', Gpf_Lang::_runtime('Search'), 'content://SearchGadget',
            Gpf_Db_Table_Gadgets::POSITION_TYPE_SIDEBAR, 452, 1000, 100, 88);
                
        $this->addGadget('C', Gpf_Lang::_runtime('Online users'), 'content://OnlineUsersGadget',
            Gpf_Db_Table_Gadgets::POSITION_TYPE_SIDEBAR, 540, 1000, 333, 124);
    }
示例#28
0
    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);
        }
    }
 /**
  * Validate Db_Row
  *
  * @param Gpf_DbEngine_Row $row
  * @throws Gpf_DbEngine_Row_ConstraintException
  */
 public function validate(Gpf_DbEngine_Row $row)
 {
     if ($this->minLength == 0 && $this->maxLength == 0) {
         return;
     }
     if ($this->minLength > 0 && strlen($row->get($this->columnName)) < $this->minLength) {
         if ($this->minMessage == '') {
             throw new Gpf_DbEngine_Row_ConstraintException($this->columnName, $this->_('Minimum length of %s in %s is %s', $this->columnName, get_class($row), $this->minLength - 1));
         } else {
             throw new Gpf_DbEngine_Row_ConstraintException($this->columnName, Gpf_Lang::_replaceArgs($this->minMessage, $this->minLength - 1));
         }
     }
     if ($this->maxLength > 0 && strlen($row->get($this->columnName)) > $this->maxLength) {
         if ($this->maxMessage == '') {
             throw new Gpf_DbEngine_Row_ConstraintException($this->columnName, $this->_('Maximum length of %s in %s is %s', $this->columnName, get_class($row), $this->maxLength));
         } else {
             throw new Gpf_DbEngine_Row_ConstraintException($this->columnName, Gpf_Lang::_replaceArgs($this->maxMessage, $this->maxLength));
         }
     }
 }
	protected function initTemplate() {
		$this->mailTemplateFile = 'monthly_report.stpl';
		$this->templateName = Gpf_Lang::_runtime('Merchant - Monthly report');
	}