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