|
2 | 2 | $defflip = (!cfip()) ? exit(header('HTTP/1.1 401 Unauthorized')) : 1; |
3 | 3 |
|
4 | 4 | // Check user authentication status |
5 | | -if ($user->isAuthenticated()) { |
| 5 | +if ($user->isAuthenticated() AND !$setting->getValue('disable_transactionsummary')) { |
6 | 6 | if (!$smarty->isCached('master.tpl', $smarty_cache_key)) { |
7 | 7 | $iLimit = 30; |
8 | 8 | $debug->append('No cached version available, fetching from backend', 3); |
9 | | - if (!$setting->getValue('disable_transactionsummary')) { |
10 | | - $aTransactionSummary = $transaction->getTransactionSummary($_SESSION['USERDATA']['id']); |
11 | | - $aTransactionSummaryByTime = $transaction->getTransactionTypebyTime($_SESSION['USERDATA']['id']); |
12 | | - $smarty->assign('SUMMARY', $aTransactionSummary); |
13 | | - $smarty->assign('BYTIME', $aTransactionSummaryByTime); |
14 | | - } |
| 9 | + $aTransactionSummary = $transaction->getTransactionSummary($_SESSION['USERDATA']['id']); |
| 10 | + $aTransactionSummaryByTime = $transaction->getTransactionTypebyTime($_SESSION['USERDATA']['id']); |
| 11 | + $smarty->assign('SUMMARY', $aTransactionSummary); |
| 12 | + $smarty->assign('BYTIME', $aTransactionSummaryByTime); |
15 | 13 | } else { |
16 | 14 | $debug->append('Using cached page', 3); |
17 | 15 | } |
| 16 | + $smarty->assign('CONTENT', 'default.tpl'); |
| 17 | +} else if (!$setting->getValue('disable_transactionsummary')) { |
| 18 | + $smarty->assign('CONTENT', 'disabled.tpl'); |
| 19 | +} else { |
| 20 | + $smarty->assign('CONTENT', 'disabled.tpl'); |
18 | 21 | } |
19 | 22 |
|
20 | | -$smarty->assign('CONTENT', 'default.tpl'); |
21 | 23 | ?> |
0 commit comments