<?php
/**
 * @version    1.0
 * @package    Edocman
 * @author     Ossolution https://www.joomdonation.com
 * @copyright  Copyright (c) 2012 - 2022 Ossolution Ltd. All rights reserved.
 * @license    GNU/GPL license: http://www.gnu.org/copyleft/gpl.html
 */

// no direct access
defined('_JEXEC') or die ;
use Joomla\CMS\Factory;
$user = Factory::getUser();

require_once (dirname(__FILE__).'/helper.php');




if ($params->get('statistics', 1))
{
	$statistics = modEdocmanStatsHelper::getStatistics();
	$activeTab = "statsTab";
}

if ($params->get('mostDownloadItems', 1))
{
	$mostDownloadedItems = modEdocmanStatsHelper::getMostDownloadItems();
	$activeTab = "mostDownloadedItemsTab";
}

if ($params->get('popularItems', 1))
{
	$popularItems = modEdocmanStatsHelper::getPopularItems();
	$activeTab = "popularItemsTab";
}

if ($params->get('latestItems', 1))
{
	$latestItems = modEdocmanStatsHelper::getLatestItems();
	$activeTab = "latestItemsTab";
}


require (JModuleHelper::getLayoutPath('mod_edocman_stats'));
