Example #1
0
 function display($tpl = null)
 {
     $this->setToolBar();
     $requiredSetup = array();
     //get all files required for setup
     $setupRules = XiptSetupHelper::getOrderedRules();
     //for each file check that setup is required or not & get message a/c to this.
     foreach ($setupRules as $setup) {
         //get object of class
         $setupObject = XiptFactory::getSetupRule($setup['name']);
         if (!$setupObject->isApplicable()) {
             continue;
         }
         $helpMsg[$setup['name']] = $setupObject->getHelpMsg($setup['name']);
         $data = $setupObject->getMessage();
         $requiredSetup[$setup['name']]['done'] = $data['done'];
         $requiredSetup[$setup['name']]['message'] = $data['message'];
         $requiredSetup[$setup['name']]['type'] = $setup['type'];
     }
     // to check that setup screen is clean or not
     $mysess = JFactory::getSession();
     $mysess->set('requireSetupCleanUp', false);
     foreach ($requiredSetup as $req) {
         if ($req["done"] == false) {
             $mysess->set('requireSetupCleanUp', true);
             break;
         }
     }
     $pane =& JPane::getInstance('sliders');
     $this->assignRef('pane', $pane);
     $this->assign('requiredSetup', $requiredSetup);
     $this->assign('helpMsg', $helpMsg);
     $this->assign('setupRules', $setupRules);
     parent::display($tpl);
 }
Example #2
0
    function getMenusToHide($userid)
    {
        $jsmodel = XiptFactory::getInstance('jstoolbar', 'model');
        $pID = XiptLibProfiletypes::getUserData($userid, 'PROFILETYPE');
        $query = new XiptQuery();
        $menuids = $query->select('menuid')->from('#__xipt_jstoolbar')->where(" `profiletype` = {$pID} ")->dbLoadQuery("", "")->loadResultArray();
        if (empty($menuids)) {
            return false;
        }
        foreach ($menuids as $menuid) {
            $result = $jsmodel->getMenu($menuid);
            $hideMenu = XiptRoute::_("{$result->link}");
            ob_start();
            ?>
	        joms.jQuery(document).ready(function(){	
				var menuUrl = "<?php 
            echo $hideMenu;
            ?>
".replace(/\&amp\;/gi, "&");
				joms.jQuery("a[href='" + menuUrl + "']").hide();	
			});	
	        <?php 
            $content = ob_get_contents();
            ob_clean();
            JFactory::getDocument()->addScriptDeclaration($content);
        }
    }
Example #3
0
 function display($save = '', $pt = 0)
 {
     //trigger event
     $dispatcher = JDispatcher::getInstance();
     $dispatcher->trigger('onBeforeProfileTypeSelection');
     // 	check for session
     //  if does not exist redirect user to community page
     XiptHelperProfiletypes::checkSessionForProfileType();
     //If not allowed to select PT for user then return
     if (XiptFactory::getSettings('show_ptype_during_reg') == 0) {
         $selectedProfiletypeID = XiptLibProfiletypes::getDefaultProfiletype();
         XiptHelperProfiletypes::setProfileTypeInSession($selectedProfiletypeID);
     }
     // do some validation for visibility and publish of ptype
     if (JRequest::getVar('save', $save, 'POST') != '') {
         $selectedProfiletypeID = JRequest::getVar('profiletypes', $pt, 'POST');
         if (XiptLibProfiletypes::validateProfiletype($selectedProfiletypeID, array('published' => 1, 'visible' => 1)) == false) {
             $msg = XiptText::_('INVALID_PROFILE_TYPE_SELECTED');
             $link = XiptRoute::_('index.php?option=com_xipt&view=registration', false);
             $this->setRedirect($link, $msg);
         }
         $dispatcher->trigger('onAfterProfileTypeSelection', array(&$selectedProfiletypeID));
         return true;
     }
     // Get the view
     $this->getView()->display();
 }
Example #4
0
    function getFieldHTML($field, $required)
    {
        $html = '';
        $pID = $field->value;
        $class = $required == 1 ? ' required' : '';
        $disabled = '';
        if ($this->_view === 'register') {
            // get pType from registration session OR defaultPType
            $pID = XiptFactory::getPluginHandler()->getRegistrationPType();
            $html = '<input type="hidden"
							id="field' . $field->id . '"
							name="field' . $field->id . '"
							value="' . $pID . '" />';
            $pName = XiptLibProfiletypes::getProfiletypeName($pID);
            $html .= $pName;
            return $html;
        }
        // it might be some other user (in case of admin is editing profile)
        $user = JFactory::getUser();
        $userid = $user->id;
        if (!(int) $pID) {
            $pID = XiptLibProfiletypes::getUserData($userid, 'PROFILETYPE');
            XiptError::assert($pID, XiptText::_("USERID {$pID} DOES_NOT_EXIST"), XiptError::ERROR);
        }
        $visiblePT = XiptLibProfiletypes::getProfiletypeArray(array('visible' => 1));
        $allowToChangePType = $this->_params->get('allow_user_to_change_ptype_after_reg', 0);
        $allowToChangePType = $allowToChangePType && array_key_exists($pID, $visiblePT) || XiptHelperUtils::isAdmin($user->id);
        //if not allowed then show disabled view of ptype
        if ($allowToChangePType == false) {
            $pName = XiptLibProfiletypes::getProfileTypeName($pID);
            $pName = $pName;
            $html = '<input type="hidden"
							id="field' . $field->id . '"
							name="field' . $field->id . '"
							value="' . $pID . '" />';
            return $html . $pName;
        }
        $mainframe = JFactory::getApplication();
        if ($mainframe->isAdmin() == true || XiptHelperUtils::isAdmin($user->id)) {
            $filter = array('published' => 1);
        } else {
            $filter = array('published' => 1, 'visible' => 1);
        }
        // user can change profiletype, add information
        $pTypes = XiptLibProfiletypes::getProfiletypeArray($filter);
        $html = '<select id="field' . $field->id . '" name="field' . $field->id . '" ' . $disabled . ' class="hasTip select' . $class . ' inputbox" title="' . $field->name . '::' . htmlentities($field->tips) . '">';
        $selectedElement = 0;
        if (!empty($pTypes)) {
            foreach ($pTypes as $pType) {
                $selected = $pType->id == $pID ? ' selected="selected"' : '';
                if (!empty($selected)) {
                    $selectedElement++;
                }
                $html .= '<option value="' . $pType->id . '"' . $selected . '>' . $pType->name . '</option>';
            }
        }
        $html .= '</select>';
        $html .= '<span id="errfield' . $field->id . 'msg" style="display:none;">&nbsp;</span>';
        return $html;
    }
Example #5
0
 function getPtypeDisplayPageForFacebook(&$response, $addhtml)
 {
     //XITODO : trigger an API Event to add something to templates, or modify $profiletypes array
     // e.g. : I want to patch description. with some extra information
     $filter = array('published' => 1, 'visible' => 1);
     $allProfileTypes = XiptLibProfiletypes::getProfiletypeArray($filter);
     $defaultPType = XiptLibProfiletypes::getDefaultProfiletype();
     $selectedPT = $defaultPType;
     $params = XiptFactory::getSettings('', 0);
     $showAsRadio = $params->get('jspt_fb_show_radio', false);
     ob_start();
     include JPATH_ROOT . DS . 'components' . DS . 'com_xipt' . DS . 'views' . DS . 'registration' . DS . 'tmpl' . DS . 'facebook.php';
     $contents = ob_get_contents();
     ob_end_clean();
     $html = '';
     $html .= $addhtml;
     $html .= $contents;
     $buttons = '';
     if ($showAsRadio) {
         $response->addScriptCall('cWindowResize', PTYPE_POPUP_WINDOW_HEIGHT_RADIO, PTYPE_POPUP_WINDOW_WIDTH_RADIO);
         $buttons = '<input type="button" value="' . XiptText::_('NEXT') . '" class="button" onclick="cWindowShow(jax.call(\'community\',\'connect,ajaxShowNewUserForm\', + jQuery(\'[name=profiletypes]:checked\').val()), \'\', 450, 200); return false;" />';
     } else {
         $response->addScriptCall('cWindowResize', PTYPE_POPUP_WINDOW_HEIGHT_SELECT, PTYPE_POPUP_WINDOW_WIDTH_SELECT);
         $buttons = '<input type="button" value="' . XiptText::_('NEXT') . '" class="button" onclick="cWindowShow(jax.call(\'community\',\'connect,ajaxShowNewUserForm\', + jQuery(\'#profiletypes\').val()), \'\', 450, 200); return false;" />';
     }
     $response->addScriptCall('joms.jQuery("#cwin_logo").html("' . XiptText::_('CHOOSE_PROFILE_TYPE') . '");');
     $response->addAssign('cWindowContent', 'innerHTML', $html);
     $response->addScriptCall('cWindowActions', $buttons);
     $response->sendResponse();
 }
Example #6
0
 function getSettings($paramName = '', $defaultValue = 0)
 {
     $sModel = XiptFactory::getInstance('settings', 'model');
     $params = $sModel->getParams();
     if (!$params) {
         XiptError::raiseWarning('XIPT-SYSTEM-ERROR', 'JSPT PARAMS ARE NULL');
     }
     if (empty($paramName)) {
         return $params;
     }
     if ($paramName == 'aec_integrate') {
         $aec_integrate = $params->get('aec_integrate', 'aec');
         if ($aec_integrate == 'aec') {
             return $params->get('subscription_integrate', $defaultValue);
         } else {
             return $aec_integrate;
         }
     }
     if ($paramName == 'aec_message') {
         $aec_message = $params->get('aec_message', 'aec');
         if ($aec_message == 'aec') {
             return $params->get('subscription_message', $defaultValue);
         } else {
             return $aec_message;
         }
     }
     return $params->get($paramName, $defaultValue);
 }
 function isRequired()
 {
     $defaultProfiletypeID = XiptFactory::getSettings('defaultProfiletypeID', 0);
     if ($defaultProfiletypeID && XiptLibProfiletypes::validateProfiletype($defaultProfiletypeID)) {
         return false;
     }
     return true;
 }
Example #8
0
 /**
  * Get an object of controller-corresponding Model.
  * @return XiptModel
  */
 public function getModel($modelName = null)
 {
     // support for parameter
     if ($modelName === null) {
         $modelName = $this->getName();
     }
     return XiptFactory::getInstance($modelName, 'Model');
 }
Example #9
0
 function getReturnURL()
 {
     $regType = XiptFactory::getSettings('user_reg');
     if ($regType === 'jomsocial') {
         return XiPTRoute::_('index.php?option=com_community&view=register', false);
     }
     if (!XIPT_JOOMLA_15) {
         return XiPTRoute::_('index.php?option=com_users&view=registration', false);
     }
     return XiPTRoute::_('index.php?option=com_user&view=register', false);
 }
Example #10
0
 function getNotAllowedCommunityAppsArray($profiletype)
 {
     $tempResult = XiptFactory::getInstance('applications', 'model')->loadRecords(0);
     foreach ($tempResult as $temp) {
         $result[$temp->profiletype][] = $temp->applicationid;
     }
     if (isset($result[$profiletype])) {
         return $result[$profiletype];
     } else {
         return array();
     }
 }
Example #11
0
 function getProfileTypeArray($aid)
 {
     XiptError::assert($aid, XiptText::_("APPLICATION_ID_CANNOT_BE_NULL"), XiptError::ERROR);
     $results = XiptFactory::getInstance('applications', 'model')->getProfileTypes($aid);
     if (empty($results)) {
         return array(XIPT_PROFILETYPE_ALL);
     }
     $allTypes = XiptHelperProfiletypes::getProfileTypeArray();
     // array_values is user to arrange the array from index 0,
     //array_diff uses index starting from 1
     return array_values(array_diff($allTypes, $results));
 }
Example #12
0
 function getProfileTypeArray($fid, $for)
 {
     XiptError::assert($fid, XiptText::_("PROFILEFIELD_ID_CAN_NOT_BE_NULL"), XiptError::ERROR);
     //Load all profiletypes for the field
     $results = XiptFactory::getInstance('profilefields', 'model')->getProfileTypes($fid, $for);
     if (empty($results)) {
         return array(XIPT_PROFILETYPE_ALL);
     }
     $allTypes = XiptHelperProfiletypes::getProfileTypeArray();
     // array_values is user to arrange the array from index 0,
     //array_diff uses index starting from 1
     return array_values(array_diff($allTypes, $results));
 }
Example #13
0
 function unhook()
 {
     //get all files required for setup
     $setupNames = XiptSetupHelper::getOrderedRules();
     foreach ($setupNames as $setup) {
         //get object of class
         $setupObject = XiptFactory::getSetupRule($setup['name']);
         $setupObject->doRevert();
     }
     $msg = XiptText::_('UNHOOKED_SUCCESSFULLY');
     $this->setRedirect(XiptRoute::_("index.php?option=com_xipt&view=setup&task=display", false), $msg);
     return true;
 }
Example #14
0
 function isRequired()
 {
     $params = XiptFactory::getSettings();
     $integrate_with = $params->get('integrate_with', 0);
     $subscription_integrate = $params->get('subscription_integrate', 0);
     if ($integrate_with == 'aec' || $subscription_integrate == false) {
         return false;
     }
     $app = $this->getXiptApps();
     if ($app) {
         return false;
     }
     return true;
 }
Example #15
0
 function isRequired()
 {
     $ptypeArray = XiptHelperProfiletypes::getProfileTypeArray();
     $globalWM = XiptFactory::getSettings('show_watermark', 0);
     if ($globalWM) {
         return false;
     }
     foreach ($ptypeArray as $ptype) {
         $watermarkParams = XiptLibProfiletypes::getParams($ptype, 'watermarkparams');
         if ($watermarkParams->get('enableWaterMark', 0) == true) {
             return true;
         }
     }
     return false;
 }
Example #16
0
 public function getAclRulesInfo($filter = '', $join = 'AND')
 {
     $records = XiptFactory::getInstance('aclrules', 'model')->loadRecords(0);
     if (empty($filter)) {
         return $records;
     }
     foreach ($records as $record) {
         foreach ($filter as $name => $info) {
             if ($record->{$name} != $info) {
                 unset($records[$record->id]);
                 break;
             }
         }
     }
     return $records;
 }
Example #17
0
 function getTemplateValue($value, $userid)
 {
     // during registration
     if ($this->_view == 'register') {
         $pID = XiptFactory::getPluginHandler()->getRegistrationPType();
         $tName = XiptLibProfiletypes::getProfileTypeData($pID, 'template');
         return $tName;
     }
     if ($value) {
         $tName = $value;
     } else {
         //a valid or default value
         $tName = XiptLibProfiletypes::getUserData($userid, 'TEMPLATE');
     }
     return $tName;
 }
Example #18
0
 public static function getPayplansMessage()
 {
     $data = self::getProfiletypeInfoFromPayplans();
     $msgOption = XiptFactory::getSettings('subscription_message', 'b');
     $pTypeName = XiptLibProfiletypes::getProfiletypeName($data['profiletype']);
     if ($msgOption === 'pl') {
         return XiptText::sprintf('COM_XIPT_ALREADY_SELECTED_PLAN_AS_ONLYPLAN', $data['plan']);
     }
     if ($msgOption === 'pt') {
         return XiptText::sprintf('COM_XIPT_ALREADY_SELECTED_PLAN_AS_ONLY_PTYPE', $pTypeName);
     }
     if ($msgOption === 'no') {
         return false;
     }
     return XiptText::sprintf('COM_XIPT_ALREADY_SELECTED_PLAN_AS_BOTH', $data['plan'], $pTypeName);
 }
Example #19
0
 /**
  * @param  $instance
  * @return CConfig
  */
 function updateCommunityConfig(&$instance, $userId = null)
 {
     // skip these calls from backend
     if (JFactory::getApplication()->isAdmin()) {
         return true;
     }
     $loggedInUser = JFactory::getUser($userId);
     $pID = XiptLibProfiletypes::getUserData($loggedInUser->id, 'PROFILETYPE');
     if (JRequest::getVar('view') === 'register') {
         $pluginHandler = XiptFactory::getPluginHandler();
         $pID = $pluginHandler->getRegistrationPType();
     }
     XiptError::assert($pID, sprintf(XiptText::_("PID_IS_NOT_VALID"), $pID), XiptError::ERROR);
     $params = XiptLibProfiletypes::getParams($pID);
     if ($params) {
         $allParams = $params->toArray();
         if (!empty($allParams)) {
             foreach ($allParams as $key => $value) {
                 $instance->set($key, $value);
             }
         }
     }
     //means guest is looking user profile ,
     // so we will show them default template
     $visitingUser = JRequest::getInt('userid', $loggedInUser->id);
     //$visitingUser = 0 means loggen-in-user is looking their own profile
     //so we set $visitingUser as logged-in-user
     //if in case user is already logged in
     //then honour his template else return and honour global settings
     if ($visitingUser <= 0) {
         return true;
     }
     //$visitingUser > 0 means a valid-user to visit profile
     //so we will show them profile in user template
     //so update the template in configuration
     $template = XiptLibProfiletypes::getUserData($visitingUser, 'TEMPLATE');
     //now update template @template
     if ($template) {
         $instance->set('template', $template);
     }
     return true;
 }
Example #20
0
 function isRequired()
 {
     $params = XiptFactory::getSettings('', 0);
     $defaultProfiletypeID = $params->get('defaultProfiletypeID', 0);
     if (!$defaultProfiletypeID) {
         JFactory::getApplication()->enqueueMessage(XiptText::_("FIRST_SELECT_THE_DEFAULT_PROFILE_TYPE"));
         return false;
     }
     $PTFieldId = XiptHelperJomsocial::getFieldId(PROFILETYPE_CUSTOM_FIELD_CODE);
     $TMFieldId = XiptHelperJomsocial::getFieldId(TEMPLATE_CUSTOM_FIELD_CODE);
     // we need first these fields to be exist
     if (!($PTFieldId && $TMFieldId)) {
         return true;
     }
     $result = $this->getUsertoSyncUp();
     if (empty($result)) {
         return false;
     }
     return true;
 }
Example #21
0
 function display($tpl = null)
 {
     // if user is already register then return to different URL
     $userId = JFactory::getUser()->id;
     if ($userId) {
         $redirectUrl = XiptRoute::_('index.php?option=com_community&view=profile', false);
         $msg = XiptText::_('YOU_ARE_ALREADY_REGISTERED_NEED_NOT_TO_REGISTER_AGAIN');
         JFactory::getApplication()->redirect($redirectUrl, $msg);
     }
     //   refine it, if empty will add default pType
     $allProfileTypes = array();
     $seletedPTypeID = JRequest::getVar('ptypeid', '');
     //TODO : trigger an API Event to add something to templates, or modify $profiletypes array
     // e.g. : I want to patch description. with some extra information
     $filter = array('published' => 1, 'visible' => 1);
     $allProfileTypes = XiptLibProfiletypes::getProfiletypeArray($filter);
     $this->assign('allProfileTypes', $allProfileTypes);
     $this->assign('selectedPT', $seletedPTypeID);
     $params = XiptFactory::getSettings('', 0);
     $this->assign('showAsRadio', $params->get('jspt_show_radio', true));
     parent::display($tpl);
 }
Example #22
0
 function checkAclApplicable(&$data)
 {
     $aecExists = XiptLibAec::isAecExists();
     $subs_integrate = XiptFactory::getSettings('subscription_integrate', 0);
     $integrate_with = XiptFactory::getSettings('integrate_with', 0);
     // pType already selected
     if (!$subs_integrate || $integrate_with != 'aec' || !$aecExists) {
         return false;
     }
     $user = JFactory::getUser();
     if (!$user->id) {
         return false;
     }
     if ('com_acctexp' == $data['option']) {
         return false;
     }
     if ($data['option'] == 'com_user') {
         return false;
     }
     if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && !empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest') {
         return false;
     }
     return true;
 }
Example #23
0
$css = JURI::root() . 'components/com_xipt/assets/style.css';
$document = JFactory::getDocument();
$document->addStyleSheet($css);
?>
<form action="<?php 
echo XiptRoute::_('index.php?option=com_xipt&view=registration&reset=true', false);
?>
" method="post" name="ptypeForm">
 
	<div class="registerProfileType">
	<h3 id="Title"><?php 
echo XiptText::_('CHOOSE_PROFILE_TYPE');
?>
</h3>
<?php 
if (XiptFactory::getSettings('jspt_show_radio')) {
    echo $this->loadTemplate('click');
} else {
    echo $this->loadTemplate('select');
}
?>
</div>
<div class="clr" title="Next"></div>
<input type="hidden" name="view" value="registration" /> 
<input type="hidden" name="task" value="" /> 
<input type="hidden" name="option" value="com_xipt" /> 
<input type="hidden" name="boxchecked" value="0" />
<?php 
echo JHTML::_('form.token');
?>
</form>
Example #24
0
 /**
  * The user data have been saved.
  * We will save user's data (profiletype and template) into Xipt tables
  * @param $userId
  * @param $saveSuccess
  * @return unknown_type
  */
 function onAfterProfileUpdate($userId, $saveSuccess)
 {
     // data was not saved, do nothing
     if (false == $saveSuccess) {
         return true;
     }
     // the JomSocial already store values in field tables
     // now we need to apply that information to our tables
     //	    $cuser        = CFactory::getUser($userId);
     //	    $profiletype  = $cuser->getInfo(PROFILETYPE_CUSTOM_FIELD_CODE);
     //	    $template     = $cuser->getInfo(TEMPLATE_CUSTOM_FIELD_CODE);
     $profiletype = XiptHelperUtils::getInfo($userId, PROFILETYPE_CUSTOM_FIELD_CODE);
     $template = XiptHelperUtils::getInfo($userId, TEMPLATE_CUSTOM_FIELD_CODE);
     // Changing Profile From Front End If The Template allow is None then Set Profiletype template.
     // If Template is Allowed on Profile Type Then Take User Define Template From Front End.
     $oldPtype = XiptLibProfiletypes::getUserData($userId, 'PROFILETYPE');
     $OldallowToChangeTemplate = XiptHelperProfiletypes::getProfileTypeData($oldPtype, 'allowt');
     $NewallowToChangeTemplate = XiptHelperProfiletypes::getProfileTypeData($profiletype, 'allowt');
     //update profiletype only
     XiptLibProfiletypes::updateUserProfiletypeData($userId, $profiletype, $template, 'ALL');
     //update template seperately
     $filter[] = 'template';
     $allowToChangeTemplate = XiptFactory::getSettings('allow_templatechange', 0);
     if (($NewallowToChangeTemplate == 0 || $OldallowToChangeTemplate == 0) && $allowToChangeTemplate == 0) {
         $newData['template'] = XiptLibProfiletypes::getProfiletypeData($profiletype, 'template');
     } else {
         $newData['template'] = $template;
     }
     XiptLibProfiletypes::updateUserProfiletypeFilteredData($userId, $filter, null, $newData);
     $this->showActivity($userId, $profiletype, $oldPtype);
     return true;
 }
Example #25
0
 function getParams($id, $what = 'params')
 {
     $model = XiptFactory::getInstance('Profiletypes', 'model');
     $params = $model->loadParams($id, $what);
     return $params;
 }
Example #26
0
 /**
  * Get an object of model-corresponding table.
  * @return XiptTable
  */
 public function getTable($tableName = null)
 {
     // support for parameter
     if ($tableName === null) {
         $tableName = $this->getName();
     }
     return XiptFactory::getInstance($tableName, 'Table');
 }
Example #27
0
<?php

/**
* @Copyright Ready Bytes Software Labs Pvt. Ltd. (C) 2010- author-Team Joomlaxi
* @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
**/
if (!defined('_JEXEC')) {
    die('Restricted access');
}
$aModel = XiptFactory::getInstance('applications', 'model');
?>
<script type="text/javascript" src="<?php 
echo JURI::root() . 'components/com_xipt/assets/js/jquery1.4.2.js';
?>
" ></script>
<script type="text/javascript">
jQuery(document).ready(function($){
	// for select all profile type
	$("a#ptypeSelectAll").click(function(){
			$('div#xiptPtype').find(':checkbox').attr('checked', true);	
			return false;
	});

	// for select none
	$("a#ptypeSelectNone").click(function(){	
		$('div#xiptPtype').find(':checkbox').attr('checked', false);	
		return false;
	});

	// for copying the same setting to another app, block
	$("div#xiptOtherApps").css('display','none');
Example #28
0
 function event_com_xipt_registration_blank()
 {
     $app = JFactory::getApplication();
     $subs_integrate = XiptFactory::getSettings('subscription_integrate', 0);
     $integrate_with = XiptFactory::getSettings('integrate_with', 0);
     if (!$subs_integrate) {
         return false;
     }
     //when integrated with AEC, set PT in session as per plan.
     if ($integrate_with == 'aec') {
         if (!XiptLibAec::isAecExists()) {
             return false;
         }
         // find selected profiletype from AEC
         $aecData = XiptLibAec::getProfiletypeInfoFromAEC();
         // as user want to integrate the AEC so a plan must be selected
         // send user to profiletype selection page
         if ($aecData['planSelected'] == false) {
             $app->redirect(XiptRoute::_('index.php?option=com_acctexp&task=subscribe', false), XiptText::_('PLEASE_SELECT_AEC_PLAN_IT_IS_RQUIRED'));
         }
         // set selected profiletype in session
         $this->_pluginHandler->mySess->set('SELECTED_PROFILETYPE_ID', $aecData['profiletype'], 'XIPT');
     }
     //when integrated with Payplans, no need to set PT in session
     //payplans itself set PT in session
     if ($integrate_with == 'payplans') {
         if (!XiptLibPayplans::isPayplansExists()) {
             return false;
         }
         // find selected profiletype from Payplans
         $payplansData = XiptLibPayplans::getProfiletypeInfoFromPayplans();
         // as user want to integrate the Payplans so a plan must be selected
         // send user to profiletype selection page
         if ($payplansData['planSelected'] == false) {
             $app->redirect(XiptRoute::_('index.php?option=com_payplans&view=plan', false), XiptText::_('PLEASE_SELECT_AEC_PLAN_IT_IS_RQUIRED'));
         }
     }
     $app->redirect(XiptHelperJomsocial::getReturnURL());
     return true;
 }
Example #29
0
<?php

/**
* @Copyright Ready Bytes Software Labs Pvt. Ltd. (C) 2010- author-Team Joomlaxi
* @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
**/
?>
	<link rel="stylesheet" type="text/css" href="<?php 
echo JURI::root() . '/components/com_xipt/assets/style.css';
?>
" />    
	<div class="registerProfileType" style="height:300px;overflow:scroll;">
	<?php 
echo XiptText::_('PROFILE_TYPE_DESCRIPTION_FOR_SELECTBOX') . "<br />";
if (XiptFactory::getSettings('jspt_fb_show_radio', 0)) {
    include JPATH_ROOT . DS . 'components' . DS . 'com_xipt' . DS . 'views' . DS . 'registration' . DS . 'tmpl' . DS . 'facebook_radio.php';
} else {
    include JPATH_ROOT . DS . 'components' . DS . 'com_xipt' . DS . 'views' . DS . 'registration' . DS . 'tmpl' . DS . 'facebook_select.php';
}
?>
	</div>
Example #30
0
<?php

/**
* @Copyright Ready Bytes Software Labs Pvt. Ltd. (C) 2010- author-Team Joomlaxi
* @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
**/
if (!defined('_JEXEC')) {
    die('Restricted access');
}
$jsModel = XiptFactory::getInstance('jstoolbar', 'model');
?>
<script type="text/javascript" src="<?php 
echo JURI::root() . 'components/com_xipt/assets/js/jquery1.4.2.js';
?>
" ></script>
<script type="text/javascript">
jQuery(document).ready(function($){
	// for select all profile type
	$("a#ptypeSelectAll").click(function(){
			$('div#xiptPtype').find(':checkbox').attr('checked', true);	
			return false;
	});

	// for select none
	$("a#ptypeSelectNone").click(function(){	
		$('div#xiptPtype').find(':checkbox').attr('checked', false);	
		return false;
	});

	// for copying the same setting to another app, block
	$("div#xiptOtherMenu").css('display','none');