commit
5bf2cd0202
@ -9,7 +9,7 @@ if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
|||||||
die("404 Page not found");
|
die("404 Page not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$smarty->isCached('master.tpl', md5(serialize($_REQUEST)))) {
|
if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||||
$debug->append('No cached version available, fetching from backend', 3);
|
$debug->append('No cached version available, fetching from backend', 3);
|
||||||
$aTransactions = $transaction->getAllTransactions(@$_REQUEST['start']);
|
$aTransactions = $transaction->getAllTransactions(@$_REQUEST['start']);
|
||||||
if (!$aTransactions) $_SESSION['POPUP'][] = array('CONTENT' => 'Could not find any transaction', 'TYPE' => 'errormsg');
|
if (!$aTransactions) $_SESSION['POPUP'][] = array('CONTENT' => 'Could not find any transaction', 'TYPE' => 'errormsg');
|
||||||
|
|||||||
@ -9,7 +9,7 @@ if (!$user->isAuthenticated() || !$user->isAdmin($_SESSION['USERDATA']['id'])) {
|
|||||||
die("404 Page not found");
|
die("404 Page not found");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$smarty->isCached('master.tpl', md5(serialize($_REQUEST)))) {
|
if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||||
$debug->append('No cached version available, fetching from backend', 3);
|
$debug->append('No cached version available, fetching from backend', 3);
|
||||||
if ($bitcoin->can_connect() === true){
|
if ($bitcoin->can_connect() === true){
|
||||||
$dBalance = $bitcoin->query('getbalance');
|
$dBalance = $bitcoin->query('getbalance');
|
||||||
|
|||||||
@ -6,7 +6,7 @@ if (!defined('SECURITY')) die('Hacking attempt');
|
|||||||
// Include markdown library
|
// Include markdown library
|
||||||
use \Michelf\Markdown;
|
use \Michelf\Markdown;
|
||||||
|
|
||||||
if (!$smarty->isCached('master.tpl', md5(serialize($_REQUEST)))) {
|
if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||||
$debug->append('No cached version available, fetching from backend', 3);
|
$debug->append('No cached version available, fetching from backend', 3);
|
||||||
// Fetch active news to display
|
// Fetch active news to display
|
||||||
$aNews = $news->getAllActive();
|
$aNews = $news->getAllActive();
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
if (!defined('SECURITY'))
|
if (!defined('SECURITY'))
|
||||||
die('Hacking attempt');
|
die('Hacking attempt');
|
||||||
|
|
||||||
if (!$smarty->isCached('master.tpl', md5(serialize($_REQUEST)))) {
|
if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||||
$debug->append('No cached version available, fetching from backend', 3);
|
$debug->append('No cached version available, fetching from backend', 3);
|
||||||
if ($bitcoin->can_connect() === true){
|
if ($bitcoin->can_connect() === true){
|
||||||
$dDifficulty = $bitcoin->query('getdifficulty');
|
$dDifficulty = $bitcoin->query('getdifficulty');
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
if (!defined('SECURITY')) die('Hacking attempt');
|
||||||
|
|
||||||
// Grab the last blocks found
|
// Grab the last blocks found
|
||||||
if (!$smarty->isCached('master.tpl', md5(serialize($_REQUEST)))) {
|
if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||||
$debug->append('No cached version available, fetching from backend', 3);
|
$debug->append('No cached version available, fetching from backend', 3);
|
||||||
// Grab the last blocks found
|
// Grab the last blocks found
|
||||||
$iLimit = 20;
|
$iLimit = 20;
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
// Make sure we are called from index.php
|
// Make sure we are called from index.php
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
if (!defined('SECURITY')) die('Hacking attempt');
|
||||||
|
|
||||||
if (!$smarty->isCached('master.tpl', md5(serialize($_REQUEST)))) {
|
if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||||
$debug->append('No cached version available, fetching from backend', 3);
|
$debug->append('No cached version available, fetching from backend', 3);
|
||||||
if ($user->isAuthenticated()) {
|
if ($user->isAuthenticated()) {
|
||||||
$aHourlyHashRates = $statistics->getHourlyHashrateByAccount($_SESSION['USERDATA']['id']);
|
$aHourlyHashRates = $statistics->getHourlyHashrateByAccount($_SESSION['USERDATA']['id']);
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
// Make sure we are called from index.php
|
// Make sure we are called from index.php
|
||||||
if (!defined('SECURITY')) die('Hacking attempt');
|
if (!defined('SECURITY')) die('Hacking attempt');
|
||||||
|
|
||||||
if (!$smarty->isCached('master.tpl', md5(serialize($_REQUEST)))) {
|
if (!$smarty->isCached('master.tpl', $smarty_cache_key)) {
|
||||||
$debug->append('No cached version available, fetching from backend', 3);
|
$debug->append('No cached version available, fetching from backend', 3);
|
||||||
// Fetch data from wallet
|
// Fetch data from wallet
|
||||||
if ($bitcoin->can_connect() === true){
|
if ($bitcoin->can_connect() === true){
|
||||||
|
|||||||
@ -25,5 +25,7 @@ if ($config['smarty']['cache']) {
|
|||||||
$smarty->setCaching(Smarty::CACHING_LIFETIME_SAVED);
|
$smarty->setCaching(Smarty::CACHING_LIFETIME_SAVED);
|
||||||
$smarty->cache_lifetime = $config['smarty']['cache_lifetime'];
|
$smarty->cache_lifetime = $config['smarty']['cache_lifetime'];
|
||||||
$smarty->cache_dir = BASEPATH . "templates/cache";
|
$smarty->cache_dir = BASEPATH . "templates/cache";
|
||||||
|
$smarty->use_sub_dirs = true;
|
||||||
|
$smarty_cache_key = md5(serialize($_REQUEST) . serialize(@$_SESSION['USERDATA']['id']));
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -82,7 +82,7 @@ $smarty->assign('DebuggerInfo', $debug->getDebugInfo());
|
|||||||
|
|
||||||
// Display our page
|
// Display our page
|
||||||
if (!@$supress_master)
|
if (!@$supress_master)
|
||||||
$smarty->display("master.tpl", md5(serialize($_REQUEST)));
|
$smarty->display("master.tpl", $smarty_cache_key);
|
||||||
|
|
||||||
// Unset any temporary values here
|
// Unset any temporary values here
|
||||||
unset($_SESSION['POPUP']);
|
unset($_SESSION['POPUP']);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user