Esempio n. 1
0
 public function _getOriginalHTML()
 {
     if (defined('JPATH_ROOT')) {
         $path = JPATH_ROOT;
     } else {
         global $mosConfig_absolute_path;
         $path = $mosConfig_absolute_path;
     }
     $status = (include $path . DIRECTORY_SEPARATOR . 'acctexp' . DIRECTORY_SEPARATOR . 'acctexp.php');
     if (!$status && !defined('INSTALLER_FOLDER')) {
         echo "We were unable to load the AEC library. If you removed the AEC folder, please also remove this plugins from the Joomla plugins manager.";
     }
     $user =& CFactory::getActiveProfile();
     // get the memberID
     $membersSessionC =& WGet::classes('members.session');
     $myMember = $membersSessionC->getMember($user->_userid, true);
     $memberId = $myMember->uid;
     // if we dont have member we dont show the view
     if (empty($memberId)) {
         return;
     }
     // set the value for the view filter
     WGlobals::setVar('integrationmemberid', $memberId);
     WGlobals::setVar('extensionKEY', 'subscription.node', 'acctexp');
     // Show the view
     $integrationV = WView::get('subscription_widget_integration');
     if (empty($integrationV)) {
         return '';
     }
     $HTMLoutput .= $integrationV->make();
     return $HTMLoutput;
 }
Esempio n. 2
0
 /**
  * @param string $action
  * @param string $task
  * to display the redirect  on the view
  */
 public static function leads($action, $task)
 {
     if (empty($GLOBALS[JNEWS . 'show_jlinks'])) {
         return true;
     }
     $acajLinkey = 'jnewslink5wroot';
     $acajNewsKey = 'jnewsKa2f6gpw';
     $acajAutoKey = 'jnewsK9dfn7lws';
     $acajSmartKey = 'jnewsK8kd92hf';
     $acajMailKey = 'jnewsKo02j6d4u5aco';
     static $ezlinks = false;
     static $loaded = false;
     //TODO put priority if easylinks and jlinks exist or add checking if easylinks is installed instead of jlinks
     if (!$loaded) {
         if (!defined('JOOBI_SECURE')) {
             define('JOOBI_SECURE', true);
         }
         $joobiEntryPoint = __FILE__;
         if (defined('JPATH_ROOT')) {
             $path = JPATH_ROOT;
         } elseif (isset($mosConfig_absolute_path)) {
             $path = $mosConfig_absolute_path;
         }
         $status = false;
         //if EasyLinks or jLinks is not installed on the website there is no need to proceed
         if (file_exists($path . DS . 'administrator' . DS . 'components' . DS . 'com_jlink' . DS . 'y.php')) {
             //Prioritize Easy Links	loading
             $status = @(include $path . DS . 'administrator' . DS . 'components' . DS . 'com_jlink' . DS . 'y.php');
             if (!$status && !defined('INSTALLER_FOLDER')) {
                 echo "We were unable to load Easy Links library.";
             } else {
                 $ezlinks = true;
             }
         }
         //if Easylinks is not installed or is installed but file include was not successful
         if (!$ezlinks) {
             //if jLinks is not installed on the website there is no need to proceed
             if (!file_exists($path . DS . 'joobi' . DS . 'entry.php')) {
                 return true;
             }
             $status = @(include $path . DS . 'joobi' . DS . 'entry.php');
             if (!$status && !defined('INSTALLER_FOLDER')) {
                 echo "We were unable to load Joobi library.";
             }
         }
         //file include trials failed
         if (!$status) {
             return true;
         }
         $loaded = true;
     }
     switch ($task) {
         case 'show':
             $linkForm = 'option=' . JNEWS_OPTION . '&act=leads&mid=7&type=50';
             $linkForm = jNews_Tools::completeLink($linkForm, false);
             $menuBack = new stdClass();
             $menuBack->popup = new stdClass();
             $menuBack->popup->isPop = false;
             $menuBack->link = $linkForm;
             $menuBack->action = 'back';
             $menuBack->onclick = new stdClass();
             $menuBack->onclick->custom = true;
             $menuBack->onclick->js = 'javascript:history.go(-1)';
             $menuBack->title = _JNEWS_MENU_BACK;
             frontHTML::formStart(_JNEWS_LEADS_REP, 0, '', $menuA);
             $gid = !empty($GLOBALS[JNEWS . 'list_creatorfe']) ? $GLOBALS[JNEWS . 'list_creatorfe'] : 0;
             frontHTML::FEmenu();
             frontHTML::formEndFN(null, '');
             $params = new stdClass();
             $params->controller = 'redirect-history';
             $params->task = 'show';
             $params->option = JNEWS_OPTION;
             $params->level = 50;
             $params->wid = WGet::extension('redirect.node', 'wid');
             $this->layout = WView::get('redirect_historylist', 'html', null, '', $params);
             $view = $this->layout->make();
             break;
         default:
             //default task = listing
             $linkForm = 'option=' . JNEWS_OPTION;
             $linkForm = jNews_Tools::completeLink($linkForm, false);
             $menuCpanel = new stdClass();
             $menuCpanel->popup = new stdClass();
             $menuCpanel->popup->isPop = false;
             $menuCpanel->link = $linkForm;
             $menuCpanel->action = 'cpanel';
             $menuCpanel->onclick = new stdClass();
             $menuCpanel->onclick->custom = true;
             $menuCpanel->onclick->js = 'javascript:history.go(-1)';
             $menuCpanel->title = _JNEWS_MENU_CPANEL;
             $menuA['cpanel'] = $menuCpanel;
             frontHTML::formStart(_JNEWS_LEADS_REP, 0, '', $menuA);
             frontHTML::FEmenu();
             frontHTML::formEndFN(null, '');
             $params = new stdClass();
             $params->controller = 'redirect';
             $params->task = 'listing';
             $params->option = JNEWS_OPTION;
             $params->wid = WGet::extension('redirect.node', 'wid');
             $this->layout = WView::get('redirects_listing', 'html', null, '', $params);
             $view = $this->layout->make();
             $view = str_replace('option=com_jcenter&controller=redirect-history', 'option=' . JNEWS_OPTION . '&act=leads&task=show&mid=7', $view);
             $view = str_replace('option=com_jcenter&controller=redirect&task=edit', 'option=' . JNEWS_OPTION . '&act=leads&mid=7&type=50', $view);
     }
     WPage::addScript(JOOBI_JS . 'rootscript.js');
     echo $view;
     return true;
 }