Exemplo n.º 1
0
 public function plgVmOnMainController($_controller)
 {
     $arr = array('user', 'registration');
     if (in_array($_controller, $arr)) {
         $isopc = JRequest::getVar('opcregistration', false);
         if (!empty($isopc)) {
             if (!defined('DS')) {
                 define('DS', DIRECTORY_SEPARATOR);
             }
             JRequest::setVar('task', 'opcregister');
             require_once JPATH_SITE . DS . 'components' . DS . 'com_onepage' . DS . 'controllers' . DS . 'opc.php';
             $opc = new VirtueMartControllerOpc();
             $msg = $opc->opcregister();
             $opc->setRedirect(JRoute::_('index.php?option=com_virtuemart&view=user', false), $msg);
             $app = JFactory::getApplication();
             $app->close();
         }
     }
 }
Exemplo n.º 2
0
*/
if (!defined('_VALID_MOS') && !defined('_JEXEC')) {
    die('Direct Access to ' . basename(__FILE__) . ' is not allowed.');
}
require_once JPATH_SITE . DIRECTORY_SEPARATOR . 'administrator' . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . 'com_onepage' . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'compatibility.php';
// disable cache for all one page pages
if (class_exists('JCache')) {
    $options = array('defaultgroup' => 'page', 'browsercache' => false, 'caching' => false);
    $caching = JCache::getInstance('page', $options);
    $caching->setCaching(false);
}
$task = JRequest::getVar('task', '');
if ($task === 'opcregister') {
    require_once JPATH_SITE . DS . 'components' . DS . 'com_onepage' . DS . 'controllers' . DS . 'opc.php';
    $opc = new VirtueMartControllerOpc();
    $opc->opcregister();
    $app = JFactory::getApplication();
    $app->close();
} else {
    if ($task === 'loadjs') {
        require_once JPATH_ROOT . DS . 'components' . DS . 'com_onepage' . DS . 'helpers' . DS . 'mini.php';
        $file = JRequest::getVar('file', '');
        if (!empty($file)) {
            OPCmini::loadJSfile($file);
            $app = JFactory::getApplication();
            $app->close();
            die;
        }
    } else {
        if ($task === 'ping') {
            require_once JPATH_ROOT . DS . 'components' . DS . 'com_onepage' . DS . 'helpers' . DS . 'opctracking.php';