2016-12-09 20:39:02 +01:00
|
|
|
<?php
|
|
|
|
require_once "inc/prerequisites.inc.php";
|
|
|
|
|
2017-01-18 21:28:31 +01:00
|
|
|
if (isset($_SESSION['mailcow_cc_role']) && ($_SESSION['mailcow_cc_role'] == "admin" || $_SESSION['mailcow_cc_role'] == "domainadmin")) {
|
2016-12-09 20:39:02 +01:00
|
|
|
require_once "inc/header.inc.php";
|
|
|
|
$_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|
|
|
?>
|
|
|
|
<div class="container">
|
2017-04-27 08:44:21 +02:00
|
|
|
|
|
|
|
<ul class="nav nav-tabs" role="tablist">
|
|
|
|
<li role="presentation" class="active"><a href="#tab-domains" aria-controls="tab-domains" role="tab" data-toggle="tab"><?=$lang['mailbox']['domains'];?></a></li>
|
|
|
|
<li role="presentation"><a href="#tab-mailboxes" aria-controls="tab-mailboxes" role="tab" data-toggle="tab"><?=$lang['mailbox']['mailboxes'];?></a></li>
|
|
|
|
<li role="presentation"><a href="#tab-resources" aria-controls="tab-resources" role="tab" data-toggle="tab"><?=$lang['mailbox']['resources'];?></a></li>
|
|
|
|
<li class="dropdown">
|
|
|
|
<a class="dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['aliases'];?>
|
|
|
|
<span class="caret"></span></a>
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
<li role="presentation"><a href="#tab-mbox-aliases" aria-controls="tab-mbox-aliases" role="tab" data-toggle="tab"><?=$lang['mailbox']['aliases'];?></a></li>
|
|
|
|
<li role="presentation"><a href="#tab-domain-aliases" aria-controls="tab-domain-aliases" role="tab" data-toggle="tab"><?=$lang['mailbox']['domain_aliases'];?></a></li>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
|
2016-12-09 20:39:02 +01:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
2017-04-27 08:44:21 +02:00
|
|
|
<div class="tab-content" style="padding-top:20px">
|
|
|
|
<div role="tabpanel" class="tab-pane active" id="tab-domains">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<div class="pull-right">
|
|
|
|
<?php
|
|
|
|
if ($_SESSION['mailcow_cc_role'] == "admin"):
|
|
|
|
?>
|
|
|
|
<a href="/add.php?domain"><span class="glyphicon glyphicon-plus"></span></a>
|
|
|
|
<?php
|
|
|
|
endif;
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
<h3 class="panel-title"><?=$lang['mailbox']['domains'];?></h3>
|
|
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table id="domain_table" class="table table-striped"></table>
|
|
|
|
</div>
|
|
|
|
<span class="footer-add-item"><a href="/add.php?domain"><?=$lang['mailbox']['add_domain'];?></a></span>
|
|
|
|
</div>
|
2017-03-22 10:46:24 +01:00
|
|
|
</div>
|
2017-03-28 11:51:17 +02:00
|
|
|
|
2017-04-27 08:44:21 +02:00
|
|
|
<div role="tabpanel" class="tab-pane" id="tab-mailboxes">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<div class="pull-right">
|
|
|
|
<a href="/add.php?mailbox"><span class="glyphicon glyphicon-plus"></span></a>
|
|
|
|
</div>
|
|
|
|
<h3 class="panel-title"><?=$lang['mailbox']['mailboxes'];?></h3>
|
|
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table id="mailbox_table" class="table table-striped"></table>
|
|
|
|
</div>
|
|
|
|
<span class="footer-add-item"><a href="/add.php?mailbox"><?=$lang['mailbox']['add_mailbox'];?></a></span>
|
|
|
|
</div>
|
2017-03-21 10:02:23 +01:00
|
|
|
</div>
|
2017-03-28 11:51:17 +02:00
|
|
|
|
2017-04-27 08:44:21 +02:00
|
|
|
<div role="tabpanel" class="tab-pane" id="tab-resources">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<div class="pull-right">
|
|
|
|
<a href="/add.php?resource"><span class="glyphicon glyphicon-plus"></span></a>
|
|
|
|
</div>
|
|
|
|
<h3 class="panel-title"><?=$lang['mailbox']['resources'];?></h3>
|
|
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table id="resources_table" class="table table-striped"></table>
|
|
|
|
</div>
|
|
|
|
<span class="footer-add-item"><a href="/add.php?resource"><?=$lang['mailbox']['add_resource'];?></a></span>
|
|
|
|
</div>
|
2017-03-21 10:02:23 +01:00
|
|
|
</div>
|
2017-03-28 11:51:17 +02:00
|
|
|
|
2017-04-27 08:44:21 +02:00
|
|
|
<div role="tabpanel" class="tab-pane" id="tab-domain-aliases">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<div class="pull-right">
|
|
|
|
<a href="/add.php?aliasdomain"><span class="glyphicon glyphicon-plus"></span></a>
|
|
|
|
</div>
|
|
|
|
<h3 class="panel-title"><?=$lang['mailbox']['domain_aliases'];?></h3>
|
|
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table id="aliasdomain_table" class="table table-striped"></table>
|
|
|
|
</div>
|
|
|
|
<span class="footer-add-item"><a href="/add.php?aliasdomain"><?=$lang['mailbox']['add_domain_alias'];?></a></span>
|
|
|
|
</div>
|
2017-03-21 10:02:23 +01:00
|
|
|
</div>
|
2017-01-28 09:53:39 +01:00
|
|
|
|
2017-04-27 08:44:21 +02:00
|
|
|
<div role="tabpanel" class="tab-pane" id="tab-mbox-aliases">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<div class="pull-right">
|
|
|
|
<a href="/add.php?alias"><span class="glyphicon glyphicon-plus"></span></a>
|
|
|
|
</div>
|
|
|
|
<h3 class="panel-title"><?=$lang['mailbox']['aliases'];?></h3>
|
|
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table id="alias_table" class="table table-striped"></table>
|
|
|
|
</div>
|
2017-04-27 11:58:20 +02:00
|
|
|
<div class="mass-actions">
|
|
|
|
<span id="select_all_aliases" class="mass-select-all"><?=$lang['mailbox']['toggle_all'];?></span>
|
|
|
|
<span>– <?=$lang['mailbox']['quick_actions'];?>:
|
|
|
|
<a id="delete_selected_alias" href="#" class="mass-each-action"><?=$lang['mailbox']['remove'];?></a> |
|
|
|
|
<a id="activate_selected_alias" href="#" class="mass-each-action"><?=$lang['mailbox']['activate'];?></a> |
|
|
|
|
<a id="deactivate_selected_alias" href="#" class="mass-each-action"><?=$lang['mailbox']['deactivate'];?></a>
|
|
|
|
</span>
|
|
|
|
</div>
|
2017-04-27 08:44:21 +02:00
|
|
|
<span class="footer-add-item"><a href="/add.php?alias"><?=$lang['mailbox']['add_alias'];?></a></span>
|
|
|
|
</div>
|
2017-03-21 10:02:23 +01:00
|
|
|
</div>
|
2017-04-27 08:44:21 +02:00
|
|
|
|
|
|
|
</div> <!-- /tab-content -->
|
|
|
|
</div> <!-- /col-md-12 -->
|
|
|
|
</div> <!-- /row -->
|
2016-12-09 20:39:02 +01:00
|
|
|
</div> <!-- /container -->
|
2017-04-27 08:44:21 +02:00
|
|
|
|
2017-03-21 10:02:23 +01:00
|
|
|
<script type='text/javascript'>
|
|
|
|
<?php
|
|
|
|
$lang_mailbox = json_encode($lang['mailbox']);
|
|
|
|
echo "var lang = ". $lang_mailbox . ";\n";
|
2017-03-21 14:45:49 +01:00
|
|
|
$role = ($_SESSION['mailcow_cc_role'] == "admin") ? 'admin' : 'domainadmin';
|
|
|
|
echo "var role = '". $role . "';\n";
|
2017-03-22 10:46:24 +01:00
|
|
|
echo "var pagination_size = '". $PAGINATION_SIZE . "';\n";
|
2017-03-21 10:02:23 +01:00
|
|
|
?>
|
2017-03-21 08:11:06 +01:00
|
|
|
</script>
|
|
|
|
<script src="js/footable.min.js"></script>
|
2016-12-09 20:39:02 +01:00
|
|
|
<script src="js/mailbox.js"></script>
|
|
|
|
<?php
|
|
|
|
require_once("inc/footer.inc.php");
|
|
|
|
} else {
|
|
|
|
header('Location: /');
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
?>
|