define( '_JEXEC', 1 ); define('JPATH_BASE', dirname(__FILE__) ); define( 'DS', DIRECTORY_SEPARATOR ); require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' ); require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' ); $host = $_SERVER['HTTP_HOST']; $uri = rtrim(dirname($_SERVER['PHP_SELF']), '/\\'); $page = 'index3.php'; $session =& JFactory::getSession(); ( $c =& JRequest::getVar( 'affiliate', '', 'COOKIE') || JRequest::getVar('testuser', '', 'get') )? $session->set('usertype', 'testuser') : ''; if ( $session->get('usertype') != 'testuser' ) { /*----------------------------------------------*/ /*-*/ } /*----------------------------------------------*/ /*-*/ JDEBUG ? $_PROFILER->mark( 'afterLoad' ) : null; $mainframe =& JFactory::getApplication('site'); /** * * INITIALISE THE APPLICATION * * * * NOTE : * */ // set the language // $mainframe->initialise(); // // // set error level to exclude notices // // // JPluginHelper::importPlugin('system'); // // // trigger the onAfterInitialise events // JDEBUG ? $_PROFILER->mark('afterInitialise') : null; // $mainframe->triggerEvent('onAfterInitialise'); // // /** // * ROUTE THE APPLICATION // * // * NOTE : // */ // $mainframe->route(); // // // authorization // $Itemid = JRequest::getInt( 'Itemid'); // $mainframe->authorize($Itemid); // // // trigger the onAfterRoute events // JDEBUG ? $_PROFILER->mark('afterRoute') : null; // $mainframe->triggerEvent('onAfterRoute'); // // /** // * DISPATCH THE APPLICATION // * // * NOTE : // */ // $option = JRequest::getCmd('option'); // $mainframe->dispatch($option); // // // trigger the onAfterDispatch events // JDEBUG ? $_PROFILER->mark('afterDispatch') : null; // $mainframe->triggerEvent('onAfterDispatch'); // // /** // * RENDER THE APPLICATION // * // * NOTE : // */ // $mainframe->render(); // // // trigger the onAfterRender events // JDEBUG ? $_PROFILER->mark('afterRender') : null; // $mainframe->triggerEvent('onAfterRender'); // // /** // * RETURN THE RESPONSE // */ // echo JResponse::toString($mainframe->getCfg('gzip')); // // //Keep Alive // JHTML::_('behavior.keepalive'); // exit;