process() public method

public process ( $aAddonFields = [] )
 function getBlockCode_JoinForm()
 {
     if (getParam('disable_join_form') == 'on') {
         return '';
     }
     $oJoinProc = new BxDolJoinProcessor();
     return array($oJoinProc->process(), array(), array(), false);
 }
$_page['header_text'] = _t("_JOIN_H");
if ($logged['member']) {
    $_page['name_index'] = 0;
    $_page_cont[0]['page_main_code'] = _t('_Sorry, you\'re already joined');
    PageCode();
    exit;
}
if (getParam('reg_by_inv_only') == 'on' && getID($_COOKIE['idFriend']) == 0) {
    $_page['name_index'] = 0;
    $_page_cont[0]['page_main_code'] = MsgBox(_t('registration by invitation only'));
    PageCode();
    exit;
}
$oJoinProc = new BxDolJoinProcessor();
$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = $oJoinProc->process();
PageCode();
class BxDolJoinProcessor
{
    var $oPF;
    //profile fields
    var $iPage;
    //currently shown page
    var $aPages;
    //available pages
    var $aValues;
    //inputted values
    var $aErrors;
    //errors generated on page
    var $bAjaxMode;
    // defines if the script were requested by ajax
 /**
  * Get join page
  *
  * @param $aProfileFields array
  * @param $iRemoteProfileId remote profile id
  * @return void
  */
 function _getJoinPage($aProfileFields, $iRemoteProfileId)
 {
     bx_import('BxDolSession');
     $oSession = BxDolSession::getInstance();
     $oSession->setValue($this->_oConfig->sSessionUid, $iRemoteProfileId);
     bx_import("BxDolJoinProcessor");
     $GLOBALS['oSysTemplate']->addJs(array('join.js', 'jquery.form.min.js'));
     $oJoin = new BxDolJoinProcessor();
     // process received fields
     foreach ($aProfileFields as $sFieldName => $sValue) {
         $oJoin->aValues[0][$sFieldName] = $sValue;
     }
     $this->_oTemplate->getPage(_t('_JOIN_H'), $this->_oTemplate->parseHtmlByName('default_padding.html', array('content' => $oJoin->process())));
     exit;
 }
 /**
  * get join page
  *
  * @param $aProfileFields array
  * @param $iFacebookUserId integer
  * @return void
  */
 function _getJoinPage($aProfileFields, $iFacebookUserId)
 {
     bx_import('BxDolSession');
     $oSession = BxDolSession::getInstance();
     $oSession->setValue($this->_oConfig->sFacebookSessionUid, $iFacebookUserId);
     bx_import("BxDolJoinProcessor");
     $GLOBALS['oSysTemplate']->addJsTranslation('_Errors in join form');
     $GLOBALS['oSysTemplate']->addJs(array('join.js', 'jquery.form.js'));
     $oJoin = new BxDolJoinProcessor();
     //process recived fields
     foreach ($aProfileFields as $sFieldName => $sValue) {
         $oJoin->aValues[0][$sFieldName] = $sValue;
     }
     $this->_oTemplate->getPage(_t('_JOIN_H'), $oJoin->process());
     exit;
 }
Beispiel #5
0
 function actionJoin()
 {
     $oSession = BxDolSession::getInstance();
     $iPendingId = (int) $oSession->getValue($this->_sSessionKeyPending);
     if (empty($iPendingId) && bx_get($this->_sRequestKeyPending) !== false) {
         $iPendingId = (int) bx_get($this->_sRequestKeyPending);
         $oSession->setValue($this->_sSessionKeyPending, $iPendingId);
     }
     if (empty($iPendingId)) {
         $this->_oTemplate->getPageCodeError($this->_sLangsPrefix . 'err_not_allowed');
         return;
     }
     $aPending = $this->_oDb->getPending(array('type' => 'id', 'id' => $iPendingId));
     if (empty($aPending['order']) || (int) $aPending['error_code'] != 1) {
         $this->_oTemplate->getPageCodeError($this->_sLangsPrefix . 'err_not_processed');
         return;
     }
     if ((int) $aPending['processed'] == 1) {
         $this->_oTemplate->getPageCodeError($this->_sLangsPrefix . 'err_already_processed');
         return;
     }
     //--- 'System' -> 'Join after Payment' for Alerts Engine ---//
     $bOverride = false;
     $sOverrideError = '';
     bx_import('BxDolAlerts');
     $oAlert = new BxDolAlerts('system', 'join_after_payment', 0, 0, array('override' => &$bOverride, 'override_error' => &$sOverrideError));
     $oAlert->alert();
     if ($bOverride) {
         return;
     }
     //--- 'System' -> 'Join after Payment' for Alerts Engine ---//
     bx_import('ProfileFields', $this->_aModule);
     $oProfileFields = new BxPmtProfileFields(1, $this);
     bx_import('BxDolJoinProcessor');
     $oJoin = new BxDolJoinProcessor(array('profile_fields' => $oProfileFields));
     $sBlockCaption = _t($this->_sLangsPrefix . 'bcpt_join');
     $sBlockContent = (!empty($sOverrideError) ? MsgBox(_t($sOverrideError)) : '') . $oJoin->process();
     $aParams = array('index' => 1, 'css' => array('join.css'), 'js' => array('join.js', 'jquery.form.min.js'), 'title' => array('page' => _t($this->_sLangsPrefix . 'pcpt_join')), 'content' => array('page_main_code' => DesignBoxContent($sBlockCaption, $sBlockContent, 11)));
     $this->_oTemplate->getPageCode($aParams);
 }
Beispiel #6
0
function getMemberJoinFormCode($sParams = '')
{
    if (getParam('disable_join_form') == 'on') {
        return '';
    }
    if (getParam('reg_by_inv_only') == 'on' && getID($_COOKIE['idFriend']) == 0) {
        return MsgBox(_t('_registration by invitation only'));
    }
    bx_import("BxDolJoinProcessor");
    $oJoin = new BxDolJoinProcessor();
    bx_import('BxDolAlerts');
    $sCustomHtmlBefore = '';
    $sCustomHtmlAfter = '';
    $oAlert = new BxDolAlerts('profile', 'show_join_form', 0, 0, array('oJoin' => $oJoin, 'sParams' => &$sParams, 'sCustomHtmlBefore' => &$sCustomHtmlBefore, 'sCustomHtmlAfter' => &$sCustomHtmlAfter));
    $oAlert->alert();
    $sAuthCode = getMemberAuthCode('_sys_auth_join_with');
    $sAction = 'join';
    return $GLOBALS['oSysTemplate']->parseHtmlByName('login_join_form.html', array('action' => $sAction, 'bx_if:show_auth' => array('condition' => !empty($sAuthCode), 'content' => array('auth' => $sAuthCode)), 'custom_code_before' => $sCustomHtmlBefore, 'form' => $oJoin->process(), 'custom_code_after' => $sCustomHtmlAfter, 'bx_if:show_text' => array('condition' => false, 'content' => array('action' => $sAction, 'text' => _t('_join_form_note', BX_DOL_URL_ROOT)))));
}
 function getBlockCode_JoinForm()
 {
     $oJoinProc = new BxDolJoinProcessor();
     return array($oJoinProc->process(), array(), array(), false);
 }
Beispiel #8
0
 function actionJoinForm()
 {
     if (!$this->_oConfig->isStandardOnPaidJoin()) {
         $this->_oTemplate->getPageCodeError('_membership_err_access_denied');
         return;
     }
     bx_import('ProfileFields', $this->_aModule);
     $oProfileFields = new BxMbpProfileFields(1, $this);
     bx_import('BxDolJoinProcessor');
     $oJoin = new BxDolJoinProcessor(array('profile_fields' => $oProfileFields));
     $aParams = array('index' => 1, 'title' => array('page' => _t('_membership_pcaption_join')), 'content' => array('page_main_code' => DesignBoxContent(_t('_membership_bcaption_join'), $oJoin->process(), 11)));
     $this->_oTemplate->getPageCode($aParams);
 }
 function getBlockCode_JoinForm()
 {
     $oJoinProc = new BxDolJoinProcessor();
     return $oJoinProc->process();
 }