* [REMOVED] Pool/Combined hashrate graph until we have a proper SQL to generate this data. Volunteers? * [ADDED] Worker and share rate statistics over time * [ADDED] Admin setting to change graphing days (default: 1 day) * [ADDED] Purge entries older than admin setting * [REMOVED] Template files that aren't used anymore
29 lines
933 B
PHP
29 lines
933 B
PHP
<?php
|
|
$defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1;
|
|
|
|
if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
|
$debug->append('No cached version available, fetching from backend', 3);
|
|
if ($user->isAuthenticated()) {
|
|
$aHourlyMiningStats = $statistics->getHourlyMiningStatsByAccount($_SESSION['USERDATA']['id'], 'json', $setting->getValue('statistics_graphing_days', 1));
|
|
}
|
|
$smarty->assign('YOURMININGSTATS', @$aHourlyMiningStats);
|
|
} else {
|
|
$debug->append('Using cached page', 3);
|
|
}
|
|
|
|
switch($setting->getValue('acl_graphs_statistics', 1)) {
|
|
case '0':
|
|
if ($user->isAuthenticated()) {
|
|
$smarty->assign("CONTENT", "default.tpl");
|
|
}
|
|
break;
|
|
case '1':
|
|
$smarty->assign("CONTENT", "default.tpl");
|
|
break;
|
|
case '2':
|
|
$_SESSION['POPUP'][] = array('CONTENT' => 'Page currently disabled. Please try again later.', 'TYPE' => 'alert alert-danger');
|
|
$smarty->assign("CONTENT", "");
|
|
break;
|
|
}
|
|
?>
|