Init
This commit is contained in:
27
backend/resources/content/statistic.php
Normal file
27
backend/resources/content/statistic.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
if (!defined('PICONTROL')) exit();
|
||||
|
||||
(include_once LIBRARY_PATH.'statistic/statistic.class.php') or die('Error: 0x0010');
|
||||
$tpl->setHeaderTitle(_t('Statistik'));
|
||||
|
||||
$statistics = array();
|
||||
$hiddenStatistics = unserialize(htmlspecialchars_decode(getConfig('main:statistic.hidden', 'a:0:{}')));
|
||||
|
||||
$controller = new StatisticController($tpl);
|
||||
$controller->loadStatistics('statistic/');
|
||||
|
||||
foreach ($controller->getStatistics() as $statistic)
|
||||
{
|
||||
$builder = new StatisticBuilder();
|
||||
$builder->loadFromFile($statistic);
|
||||
|
||||
$array = $builder->getArray();
|
||||
if (!in_array($builder->getId(), $hiddenStatistics))
|
||||
$statistics[] = array('array' => $array, 'json' => $builder->getJSON());
|
||||
}
|
||||
|
||||
$tpl->assign('statistics', $statistics);
|
||||
$tpl->assign('msgInfo', (count($hiddenStatistics) == count($controller->getStatistics())) ? 'invisible' : ((count($controller->getStatistics()) == 0) ? 'empty' : ''));
|
||||
|
||||
$tpl->draw('statistic');
|
||||
?>
|
||||
Reference in New Issue
Block a user