1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-12-02 09:02:42 +02:00
mailcow-dockerized/data/web/quarantine.php
Kristian Feldsam 0b64967ec5
[web] implemented twig templating system (#4264)
Signed-off-by: Kristian Feldsam <feldsam@gmail.com>
2021-09-22 20:47:10 +02:00

27 lines
769 B
PHP

<?php
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
if (!isset($_SESSION['mailcow_cc_role'])) {
header('Location: /');
exit();
}
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php';
$_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
$quarantine_settings = quarantine('settings');
$js_minifier->add('/web/js/site/quarantine.js');
$role = ($_SESSION['mailcow_cc_role'] == "admin") ? 'admin' : 'domainadmin';
$template = 'quarantine.twig';
$template_data = [
'acl' => $_SESSION['acl'],
'acl_json' => json_encode($_SESSION['acl']),
'role' => $role,
'quarantine_settings' => $quarantine_settings,
'lang_quarantine' => json_encode($lang['quarantine']),
];
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.inc.php';