2018-02-10 22:42:46 +01:00
|
|
|
<!DOCTYPE html>
|
2017-05-16 19:20:58 +02:00
|
|
|
<html lang="<?= $_SESSION['mailcow_locale'] ?>">
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2018-02-07 17:03:03 +01:00
|
|
|
<meta name="theme-color" content="#F5D76E"/>
|
2018-01-24 09:25:28 +01:00
|
|
|
<meta http-equiv="Referrer-Policy" content="same-origin">
|
2018-01-18 18:23:53 +01:00
|
|
|
<title><?=$UI_TEXTS['title_name'];?></title>
|
2017-05-16 19:20:58 +02:00
|
|
|
<!--[if lt IE 9]>
|
2017-09-10 16:28:33 +02:00
|
|
|
<script src="/js/html5shiv.min.js"></script>
|
|
|
|
<script src="/js/respond.min.js"></script>
|
2017-05-16 19:20:58 +02:00
|
|
|
<![endif]-->
|
2017-05-29 21:51:06 +02:00
|
|
|
<script src="/js/jquery-1.12.4.min.js"></script>
|
|
|
|
<?php if (strtolower(trim($DEFAULT_THEME)) != "lumen"): ?>
|
2017-05-16 19:20:58 +02:00
|
|
|
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bootswatch/3.3.7/<?= strtolower(trim($DEFAULT_THEME)); ?>/bootstrap.min.css">
|
2017-05-29 21:51:06 +02:00
|
|
|
<?php else: ?>
|
|
|
|
<link rel="stylesheet" href="/css/bootstrap.min.css">
|
|
|
|
<?php endif; ?>
|
2017-12-09 13:17:15 +01:00
|
|
|
<link rel="stylesheet" href="/css/breakpoint.min.css">
|
2017-05-16 19:20:58 +02:00
|
|
|
<link rel="stylesheet" href="/css/bootstrap-select.min.css">
|
|
|
|
<link rel="stylesheet" href="/css/bootstrap-slider.min.css">
|
|
|
|
<link rel="stylesheet" href="/css/bootstrap-switch.min.css">
|
|
|
|
<link rel="stylesheet" href="/css/footable.bootstrap.min.css">
|
|
|
|
<link rel="stylesheet" href="/inc/languages.min.css">
|
|
|
|
<link rel="stylesheet" href="/css/mailcow.css">
|
|
|
|
<link rel="stylesheet" href="/css/animate.min.css">
|
2017-11-03 20:37:24 +01:00
|
|
|
<link rel="stylesheet" href="/css/numberedtextarea.min.css">
|
2018-05-20 23:29:40 +02:00
|
|
|
<link rel="stylesheet" href="/css/jquery.jqplot.min.css">
|
2017-05-16 19:20:58 +02:00
|
|
|
<?= (preg_match("/mailbox.php/i", $_SERVER['REQUEST_URI'])) ? '<link rel="stylesheet" href="/css/mailbox.css">' : null; ?>
|
|
|
|
<?= (preg_match("/admin.php/i", $_SERVER['REQUEST_URI'])) ? '<link rel="stylesheet" href="/css/admin.css">' : null; ?>
|
2017-05-17 21:17:00 +02:00
|
|
|
<?= (preg_match("/user.php/i", $_SERVER['REQUEST_URI'])) ? '<link rel="stylesheet" href="/css/user.css">' : null; ?>
|
2017-05-23 09:36:59 +02:00
|
|
|
<?= (preg_match("/edit.php/i", $_SERVER['REQUEST_URI'])) ? '<link rel="stylesheet" href="/css/edit.css">' : null; ?>
|
2018-02-08 20:13:36 +01:00
|
|
|
<?= (preg_match("/quarantine.php/i", $_SERVER['REQUEST_URI'])) ? '<link rel="stylesheet" href="/css/quarantine.css">' : null; ?>
|
2017-12-09 13:17:15 +01:00
|
|
|
<?= (preg_match("/debug.php/i", $_SERVER['REQUEST_URI'])) ? '<link rel="stylesheet" href="/css/debug.css">' : null; ?>
|
2017-05-16 19:20:58 +02:00
|
|
|
<link rel="shortcut icon" href="/favicon.png" type="image/png">
|
|
|
|
<link rel="icon" href="/favicon.png" type="image/png">
|
|
|
|
</head>
|
2018-01-25 13:22:17 +01:00
|
|
|
<body id="top">
|
|
|
|
<div class="overlay"></div>
|
2017-05-16 19:20:58 +02:00
|
|
|
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
|
|
|
|
<div class="container-fluid">
|
|
|
|
<div class="navbar-header">
|
|
|
|
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
|
|
|
|
<span class="icon-bar"></span>
|
|
|
|
<span class="icon-bar"></span>
|
|
|
|
<span class="icon-bar"></span>
|
|
|
|
</button>
|
2017-10-21 10:07:06 +02:00
|
|
|
<a class="navbar-brand" href="/"><img alt="mailcow-logo" src="<?=($main_logo = customize('get', 'main_logo')) ? $main_logo : '/img/cow_mailcow.svg';?>"></a>
|
2017-05-16 19:20:58 +02:00
|
|
|
</div>
|
|
|
|
<div id="navbar" class="navbar-collapse collapse">
|
|
|
|
<ul class="nav navbar-nav navbar-right">
|
|
|
|
<?php
|
|
|
|
if (isset($_SESSION['mailcow_locale'])) {
|
|
|
|
?>
|
2018-01-15 15:44:48 +01:00
|
|
|
<li class="dropdown<?=(isset($_SESSION['mailcow_locale']) && count($AVAILABLE_LANGUAGES) === 1) ? ' lang-link-disabled"' : '' ?>">
|
2017-05-16 19:20:58 +02:00
|
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><span class="lang-sm lang-lbl" lang="<?= $_SESSION['mailcow_locale']; ?>"></span><span class="caret"></span></a>
|
|
|
|
<ul class="dropdown-menu" role="menu">
|
|
|
|
<?php
|
|
|
|
foreach ($AVAILABLE_LANGUAGES as $language) {
|
|
|
|
?>
|
|
|
|
<li<?= ($_SESSION['mailcow_locale'] == $language) ? ' class="active"' : ''; ?>><a href="?<?= http_build_query(array_merge($_GET, array('lang' => $language))); ?>"><span class="lang-xs lang-lbl-full" lang="<?= $language; ?>"></span></a></li>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
if (isset($_SESSION['mailcow_cc_role'])) {
|
|
|
|
?>
|
|
|
|
<li class="dropdown">
|
|
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><?= $lang['header']['mailcow_settings']; ?> <span class="caret"></span></a>
|
|
|
|
<ul class="dropdown-menu" role="menu">
|
|
|
|
<?php
|
|
|
|
if (isset($_SESSION['mailcow_cc_role'])) {
|
|
|
|
if ($_SESSION['mailcow_cc_role'] == 'admin') {
|
|
|
|
?>
|
|
|
|
<li<?= (preg_match("/admin/i", $_SERVER['REQUEST_URI'])) ? ' class="active"' : ''; ?>><a href="/admin.php"><?= $lang['header']['administration']; ?></a></li>
|
2018-02-27 10:29:13 +01:00
|
|
|
<li<?= (preg_match("/debug/i", $_SERVER['REQUEST_URI'])) ? ' class="active"' : ''; ?>><a href="/debug.php"><?= $lang['header']['debug']; ?></a></li>
|
2017-05-16 19:20:58 +02:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
if ($_SESSION['mailcow_cc_role'] == 'admin' || $_SESSION['mailcow_cc_role'] == 'domainadmin') {
|
|
|
|
?>
|
|
|
|
<li<?= (preg_match("/mailbox/i", $_SERVER['REQUEST_URI'])) ? ' class="active"' : ''; ?>><a href="/mailbox.php"><?= $lang['header']['mailboxes']; ?></a></li>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
if ($_SESSION['mailcow_cc_role'] != 'admin') {
|
|
|
|
?>
|
|
|
|
<li<?= (preg_match("/user/i", $_SERVER['REQUEST_URI'])) ? ' class="active"' : ''; ?>><a href="/user.php"><?= $lang['header']['user_settings']; ?></a></li>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<?php
|
2017-12-09 13:17:15 +01:00
|
|
|
if (isset($_SESSION['mailcow_cc_role'])) {
|
|
|
|
?>
|
2018-02-08 20:13:36 +01:00
|
|
|
<li<?= (preg_match("/quarantine/i", $_SERVER['REQUEST_URI'])) ? ' class="active"' : ''; ?>><a href="/quarantine.php"><span class="glyphicon glyphicon-briefcase"></span> <?= $lang['header']['quarantine']; ?></a></li>
|
2017-12-09 13:17:15 +01:00
|
|
|
<?php
|
|
|
|
}
|
2017-05-16 19:20:58 +02:00
|
|
|
if ($_SESSION['mailcow_cc_role'] == 'admin') {
|
|
|
|
?>
|
2018-01-25 13:22:17 +01:00
|
|
|
<li><a href data-toggle="modal" data-container="sogo-mailcow" data-target="#RestartContainer"><span class="glyphicon glyphicon-refresh"></span> <?= $lang['header']['restart_sogo']; ?></a></li>
|
2017-05-16 19:20:58 +02:00
|
|
|
<?php
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
<li class="dropdown">
|
2017-12-09 13:17:15 +01:00
|
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><span class="glyphicon glyphicon-link"></span> Apps <span class="caret"></span></a>
|
2017-05-16 19:20:58 +02:00
|
|
|
<ul class="dropdown-menu" role="menu">
|
|
|
|
<?php
|
|
|
|
foreach ($MAILCOW_APPS as $app):
|
|
|
|
?>
|
2017-06-11 07:43:59 +02:00
|
|
|
<li title="<?= htmlspecialchars($app['description']); ?>"><a href="<?= htmlspecialchars($app['link']); ?>"><?= htmlspecialchars($app['name']); ?></a></li>
|
2017-05-16 19:20:58 +02:00
|
|
|
<?php
|
|
|
|
endforeach;
|
2017-10-21 10:07:06 +02:00
|
|
|
$app_links = customize('get', 'app_links');
|
|
|
|
foreach ($app_links as $row) {
|
|
|
|
foreach ($row as $key => $val):
|
|
|
|
?>
|
|
|
|
<li><a href="<?= htmlspecialchars($val); ?>"><?= htmlspecialchars($key); ?></a></li>
|
2018-02-27 10:29:13 +01:00
|
|
|
<?php
|
2017-10-21 10:07:06 +02:00
|
|
|
endforeach;
|
|
|
|
}
|
2017-05-16 19:20:58 +02:00
|
|
|
?>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<?php
|
|
|
|
}
|
|
|
|
if (!isset($_SESSION['dual-login']) && isset($_SESSION['mailcow_cc_username'])):
|
|
|
|
?>
|
2018-02-10 22:42:46 +01:00
|
|
|
<li class="logged-in-as"><a href="#" onclick="logout.submit()"><b><?= htmlspecialchars($_SESSION['mailcow_cc_username']); ?></b> <span class="glyphicon glyphicon-log-out"></span></a></li>
|
2017-05-16 19:20:58 +02:00
|
|
|
<?php
|
|
|
|
elseif (isset($_SESSION['dual-login'])):
|
|
|
|
?>
|
2018-02-10 22:42:46 +01:00
|
|
|
<li class="logged-in-as"><a href="#" onclick="logout.submit()"><b><?= htmlspecialchars($_SESSION['mailcow_cc_username']); ?> <span class="text-info">(<?= htmlspecialchars($_SESSION['dual-login']['username']); ?>)</span> </b><span class="glyphicon glyphicon-log-out"></span></a></li>
|
2017-05-16 19:20:58 +02:00
|
|
|
<?php
|
|
|
|
endif;
|
|
|
|
?>
|
|
|
|
</ul>
|
|
|
|
</div><!--/.nav-collapse -->
|
|
|
|
</div><!--/.container-fluid -->
|
|
|
|
</nav>
|
|
|
|
<form action="/" method="post" id="logout"><input type="hidden" name="logout"></form>
|