Exemplo n.º 1
0
 function __construct($app)
 {
     global $Itemid, $mosConfig_sef, $mosConfig_lang;
     cmsFramework::init($this);
     if (isset($this->xajax) && $this->xajax == true) {
         $this->loadXajax();
     }
     /****************** THIS BLOCK CAN PROBABLY BE DELETED ******************/
     $this->language = $mosConfig_lang;
     $this->itemid = $Itemid;
     $this->sef = $mosConfig_sef;
     /****************** THIS BLOCK CAN PROBABLY BE DELETED ******************/
     # Get ip address
     $this->ipaddress = s2GetIpAddress();
     $this->app = $app;
     # Load models
     $this->__initModels();
     parent::__construct();
 }
Exemplo n.º 2
0
}
if ((string) @$_GET['option'] != 'com_content' && (string) @$_GET['option'] != 'com_frontpage' && (string) @$_GET['option'] != '') {
    return;
}
# MVC initalization script
if (!defined('DS')) {
    define('DS', DIRECTORY_SEPARATOR);
}
if (defined('JPATH_SITE')) {
    $root = JPATH_SITE . DS;
} else {
    global $mainframe;
    $root = $mainframe->getCfg('absolute_path') . DS;
}
require $root . 'components' . DS . 'com_jreviews' . DS . 'jreviews' . DS . 'framework.php';
cmsFramework::init($CMS);
$option = Sanitize::getString($_REQUEST, 'option', '');
$task = Sanitize::getString($_REQUEST, 'task', '');
$view = Sanitize::getString($_REQUEST, 'view', '');
$layout = Sanitize::getString($_REQUEST, 'layout', '');
$id = explode(':', Sanitize::getInt($_REQUEST, 'id'));
$id = $id[0];
# Plugins table
if (!defined('_PLUGIN_DIR_NAME')) {
    if (getCmsVersion() == CMS_JOOMLA15) {
        define('_PLUGIN_DIR_NAME', 'plugins');
    } else {
        define('_PLUGIN_DIR_NAME', 'mambots');
    }
}
$query = "SELECT published,params FROM #__" . _PLUGIN_DIR_NAME . " WHERE element = 'jreviews' AND folder = 'content' LIMIT 1";
Exemplo n.º 3
0
    $act = Sanitize::getString($_REQUEST, 'act');
    if ($act == 'license') {
        $_GET['url'] = 'license';
    } else {
        $_GET['url'] = Sanitize::getString($_GET, 'url', 'about');
    }
    /*******************************************************************
     *                         FRONT-END ROUTING
     ******************************************************************/
} elseif ($menu_id && !$xajax && !isset($_POST['data']['controller']) && (!$url || !isset($route['data']['controller']) || preg_match('/^menu\\//', $route['url']['url']))) {
    // If no task is passed in the url, then this is a menu item and we read the menu parameters
    $segments = array();
    $url_param = $url;
    $url = str_replace('menu', '', $url);
    $cms = new stdClass();
    cmsFramework::init($cms);
    $query = "SELECT * FROM #__menu WHERE id = " . $menu_id;
    $cms->_db->setQuery($query);
    $menu = end($cms->_db->loadObjectList());
    $mparams = getCmsVersion() == CMS_JOOMLA16 ? json_decode($menu->params, true) : stringToArray($menu->params);
    if (isset($mparams['action'])) {
        $action = paramsRoute((int) $mparams['action']);
        $_REQUEST['Itemid'] = $_GET['Itemid'] = $menu->id;
        // For default - home page menu
        unset($mparams['action']);
        $menu_params['data'] = $mparams;
        $menu_params['dir'] = $mparams['dirid'];
        $menu_params['section'] = $mparams['sectionid'];
        $menu_params['cat'] = $mparams['catid'];
        $menu_params['criteria'] = $mparams['criteriaid'];
        //        $menu_params['url'] = 'menu';
Exemplo n.º 4
0
 function __construct()
 {
     # Adds CMS DB and Mainframe methods
     cmsFramework::init($this);
     parent::__construct();
 }