php-mpos/public/include/pages/statistics/blocks.inc.php
Sebastian Grewe 5acebc37d3 Allow guest access to pages with config options
This will allow pool owners to make certain pages public accessible
without user registration or login. Please check the config dist file
for details.

Fixes #408
2013-07-09 16:13:43 +02:00

20 lines
532 B
PHP

<?php
// Make sure we are called from index.php
if (!defined('SECURITY')) die('Hacking attempt');
// Grab the last blocks found
$iLimit = 20;
$aBlocksFoundData = $statistics->getBlocksFound($iLimit);
// Propagate content our template
$smarty->assign("BLOCKSFOUND", $aBlocksFoundData);
$smarty->assign("BLOCKLIMIT", $iLimit);
if ($config['website']['acl']['statistics']['blocks'] == 'public') {
$smarty->assign("CONTENT", "default.tpl");
} else if ($user->isAuthenticated()) {
$smarty->assign("CONTENT", "default.tpl");
}
?>