Matthias Andreas Benkard | 1ba5381 | 2022-12-27 17:32:58 +0100 | [diff] [blame^] | 1 | <?php |
| 2 | require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php'; |
| 3 | |
| 4 | if (!isset($_SESSION['mailcow_cc_role']) || $_SESSION['mailcow_cc_role'] != "admin") { |
| 5 | header('Location: /'); |
| 6 | exit(); |
| 7 | } |
| 8 | |
| 9 | |
| 10 | require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php'; |
| 11 | $js_minifier->add('/web/js/site/queue.js'); |
| 12 | $_SESSION['return_to'] = $_SERVER['REQUEST_URI']; |
| 13 | |
| 14 | $role = ($_SESSION['mailcow_cc_role'] == "admin") ? 'admin' : 'domainadmin'; |
| 15 | |
| 16 | $template = 'queue.twig'; |
| 17 | $template_data = [ |
| 18 | 'acl' => $_SESSION['acl'], |
| 19 | 'acl_json' => json_encode($_SESSION['acl']), |
| 20 | 'role' => $role, |
| 21 | 'lang_admin' => json_encode($lang['admin']), |
| 22 | 'lang_queue' => json_encode($lang['queue']), |
| 23 | 'lang_datatables' => json_encode($lang['datatables']) |
| 24 | ]; |
| 25 | |
| 26 | require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.inc.php'; |