';
}
public static function displayCalendarStatic($translations)
{
$context = Context::getContext();
includeDatepicker(array('datepickerFrom', 'datepickerTo'));
return '
';
}
public function displaySearch()
{
return;
echo '
';
}
private function getModules()
{
$sql = 'SELECT h.`name` AS hook, m.`name`
FROM `'._DB_PREFIX_.'module` m
LEFT JOIN `'._DB_PREFIX_.'hook_module` hm ON hm.`id_module` = m.`id_module`
LEFT JOIN `'._DB_PREFIX_.'hook` h ON hm.`id_hook` = h.`id_hook`
WHERE h.`name` LIKE \'AdminStatsModules\'
AND m.`active` = 1
GROUP BY hm.id_module
ORDER BY hm.`position`';
return Db::getInstance()->ExecuteS($sql);
}
public function displayMenu()
{
$modules = $this->getModules();
echo '
';
if (!($moduleName = Tools::getValue('module')) AND $moduleInstance = Module::getInstanceByName('statsforecast') AND $moduleInstance->active)
$moduleName = 'statsforecast';
if ($moduleName)
{
// Needed for the graphics display when this is the default module
$_GET['module'] = $moduleName;
if (!isset($moduleInstance))
$moduleInstance = Module::getInstanceByName($moduleName);
if ($moduleInstance AND $moduleInstance->active)
echo Module::hookExec('AdminStatsModules', NULL, $moduleInstance->id);
else
echo $this->l('Module not found', 'AdminStatsTab');
}
else
echo '
'.$this->l('Please select a module in the left column.').'