mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2025-10-04 00:02:07 -04:00
31 lines
1005 B
PHP
31 lines
1005 B
PHP
<?php
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php';
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/triggers.admin.inc.php';
|
|
|
|
if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'admin') {
|
|
header('Location: /admin/dashboard');
|
|
exit();
|
|
}
|
|
elseif (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'domainadmin') {
|
|
header('Location: /domainadmin/mailbox');
|
|
exit();
|
|
}
|
|
elseif (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'user') {
|
|
header('Location: /user');
|
|
exit();
|
|
}
|
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php';
|
|
$_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|
$_SESSION['index_query_string'] = $_SERVER['QUERY_STRING'];
|
|
|
|
|
|
$template = 'admin_index.twig';
|
|
$template_data = [
|
|
'login_delay' => @$_SESSION['ldelay'],
|
|
'custom_login' => customize('get', 'custom_login'),
|
|
];
|
|
|
|
$js_minifier->add('/web/js/site/index.js');
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.inc.php';
|