public function index() { $this->view->page_title = t('Affiliate Platform with %site_name%! Dating Social Affiliate'); $this->view->h1_title = t('Affiliate Platform - %site_name%'); if (Affiliate::auth()) { $this->view->h3_title = t('Hello <em>%0%</em>, welcome to your site!', $this->session->get('affiliate_first_name')); } if (!Affiliate::auth()) { $this->design->addCss(PH7_LAYOUT . PH7_SYS . PH7_MOD . $this->registry->module . PH7_SH . PH7_TPL . PH7_TPL_MOD_NAME . PH7_SH . PH7_CSS, 'style.css'); } $this->output(); }
public function __construct() { parent::__construct(); $oAffModel = new AffiliateModel(); $iProfileId = AdminCore::auth() && !Affiliate::auth() && $this->httpRequest->getExists('profile_id') ? $this->httpRequest->get('profile_id', 'int') : $this->session->get('affiliate_id'); $oAff = $oAffModel->readProfile($iProfileId, 'Affiliates'); if (!$this->str->equals($this->httpRequest->post('bank_account'), $oAff->bankAccount)) { $oAffModel->updateProfile('bankAccount', $this->httpRequest->post('bank_account'), $iProfileId, 'Affiliates'); } unset($oAffModel, $oAff); /* Clean Affiliate UserCoreModel / readProfile Cache */ (new Framework\Cache\Cache())->start(UserCoreModel::CACHE_GROUP, 'readProfile' . $iProfileId . 'Affiliates', null)->clear(); \PFBC\Form::setSuccess('form_bank_account', t('Your bank information has been saved successfully!')); }