| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/inetpub/wwwroot/icd/components/com_jevents/controllers/ |
Upload File : |
<?php
/**
* JEvents Component for Joomla 1.5.x
*
* @version $Id: modlatest.php 1631 2009-11-26 05:38:33Z geraint $
* @package JEvents
* @copyright Copyright (C) 2008-2009 GWE Systems Ltd
* @license GNU/GPLv2, see http://www.gnu.org/licenses/gpl-2.0.html
* @link http://www.jevents.net
*/
defined( 'JPATH_BASE' ) or die( 'Direct Access to this location is not allowed.' );
jimport('joomla.application.component.controller');
class ModLatestController extends JController {
function __construct($config = array())
{
if (!isset($config['base_path'])){
$config['base_path']=JEV_PATH;
}
parent::__construct($config);
// TODO get this from config
$this->registerDefaultTask( 'calendar' );
$cfg = & JEVConfig::getInstance();
$theme = ucfirst(JEV_CommonFunctions::getJEventsViewName());
JLoader::register('JEvents'.ucfirst($theme).'View',JEV_VIEWS."/".$theme."/abstract/abstract.php");
include_once(JEV_LIBS."/modfunctions.php");
}
function rss() {
JRequest::setVar("tmpl","component");
// get the view
$this->view = & $this->getView("modlatest","feed");
// Set the layout
$this->view->setLayout('rss');
// View caching logic -- simple... are we logged in?
$cfg = & JEVConfig::getInstance();
$useCache = intval($cfg->get('com_cache', 0));
$user = &JFactory::getUser();
if ($user->get('id') || !$useCache) {
$this->view->rss();
} else {
$cache =& JFactory::getCache(JEV_COM_COMPONENT, 'view');
$cache->get($this->view, 'rss');
}
}
}