2016-12-10 03:39:02 +08:00
|
|
|
<?php
|
|
|
|
require_once "inc/prerequisites.inc.php";
|
|
|
|
|
2017-01-19 04:28:31 +08:00
|
|
|
if (isset($_SESSION['mailcow_cc_role']) && ($_SESSION['mailcow_cc_role'] == "admin" || $_SESSION['mailcow_cc_role'] == "domainadmin")) {
|
2016-12-10 03:39:02 +08:00
|
|
|
require_once "inc/header.inc.php";
|
|
|
|
$_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
|
|
|
?>
|
|
|
|
<div class="container">
|
2017-04-27 14:44:21 +08: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>
|
2017-07-29 16:32:17 +08:00
|
|
|
<li role="presentation"><a href="#tab-syncjobs" aria-controls="tab-resources" role="tab" data-toggle="tab">Sync jobs</a></li>
|
2017-04-27 14:44:21 +08:00
|
|
|
</ul>
|
|
|
|
|
2016-12-10 03:39:02 +08:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-md-12">
|
2017-04-27 14:44:21 +08: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">
|
2017-05-30 03:51:06 +08:00
|
|
|
<h3 class="panel-title"><?=$lang['mailbox']['domains'];?></h3>
|
2017-04-27 14:44:21 +08:00
|
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table id="domain_table" class="table table-striped"></table>
|
|
|
|
</div>
|
2017-05-12 05:10:32 +08:00
|
|
|
<div class="mass-actions-mailbox">
|
|
|
|
<div class="btn-group">
|
|
|
|
<a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="domain" href="#"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> <?=$lang['mailbox']['toggle_all'];?></a>
|
|
|
|
<a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
<li><a id="edit_selected" data-id="domain" data-api-url='edit/domain' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
|
|
|
|
<li><a id="edit_selected" data-id="domain" data-api-url='edit/domain' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
|
|
|
|
<li role="separator" class="divider"></li>
|
|
|
|
<li><a id="delete_selected" data-id="domain" data-api-url='delete/domain' href="#"><?=$lang['mailbox']['remove'];?></a></li>
|
|
|
|
</ul>
|
2017-05-30 03:51:06 +08:00
|
|
|
<a class="btn btn-sm btn-success" href="#" data-toggle="modal" data-target="#addDomainModal"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_domain'];?></a>
|
2017-05-12 05:10:32 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-04-27 14:44:21 +08:00
|
|
|
</div>
|
2017-03-22 17:46:24 +08:00
|
|
|
</div>
|
2017-03-28 17:51:17 +08:00
|
|
|
|
2017-04-27 14:44:21 +08:00
|
|
|
<div role="tabpanel" class="tab-pane" id="tab-mailboxes">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title"><?=$lang['mailbox']['mailboxes'];?></h3>
|
|
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table id="mailbox_table" class="table table-striped"></table>
|
|
|
|
</div>
|
2017-05-12 05:10:32 +08:00
|
|
|
<div class="mass-actions-mailbox">
|
|
|
|
<div class="btn-group">
|
|
|
|
<a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="mailbox" href="#"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> <?=$lang['mailbox']['toggle_all'];?></a>
|
|
|
|
<a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
<li><a id="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
|
|
|
|
<li><a id="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
|
|
|
|
<li role="separator" class="divider"></li>
|
|
|
|
<li><a id="delete_selected" data-id="mailbox" data-api-url='delete/mailbox' href="#"><?=$lang['mailbox']['remove'];?></a></li>
|
|
|
|
</ul>
|
2017-05-30 03:51:06 +08:00
|
|
|
<a class="btn btn-sm btn-success" href="#" data-toggle="modal" data-target="#addMailboxModal"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_mailbox'];?></a>
|
2017-05-12 05:10:32 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-04-27 14:44:21 +08:00
|
|
|
</div>
|
2017-03-21 17:02:23 +08:00
|
|
|
</div>
|
2017-03-28 17:51:17 +08:00
|
|
|
|
2017-04-27 14:44:21 +08:00
|
|
|
<div role="tabpanel" class="tab-pane" id="tab-resources">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title"><?=$lang['mailbox']['resources'];?></h3>
|
|
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
2017-05-13 14:55:34 +08:00
|
|
|
<table id="resource_table" class="table table-striped"></table>
|
2017-04-27 14:44:21 +08:00
|
|
|
</div>
|
2017-05-12 05:10:32 +08:00
|
|
|
<div class="mass-actions-mailbox">
|
|
|
|
<div class="btn-group">
|
|
|
|
<a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="resource" href="#"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> <?=$lang['mailbox']['toggle_all'];?></a>
|
|
|
|
<a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
<li><a id="edit_selected" data-id="resource" data-api-url='edit/resource' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
|
|
|
|
<li><a id="edit_selected" data-id="resource" data-api-url='edit/resource' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
|
|
|
|
<li role="separator" class="divider"></li>
|
|
|
|
<li><a id="delete_selected" data-id="resource" data-api-url='delete/resource' href="#"><?=$lang['mailbox']['remove'];?></a></li>
|
|
|
|
</ul>
|
2017-05-30 03:51:06 +08:00
|
|
|
<a class="btn btn-sm btn-success" href="#" data-toggle="modal" data-target="#addResourceModal"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_resource'];?></a>
|
2017-05-12 05:10:32 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-04-27 14:44:21 +08:00
|
|
|
</div>
|
2017-03-21 17:02:23 +08:00
|
|
|
</div>
|
2017-03-28 17:51:17 +08:00
|
|
|
|
2017-04-27 14:44:21 +08:00
|
|
|
<div role="tabpanel" class="tab-pane" id="tab-domain-aliases">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<div class="pull-right">
|
2017-05-27 05:02:04 +08:00
|
|
|
<a href="#" data-toggle="modal" data-target="#addAliasDomainModal" ><span class="glyphicon glyphicon-plus"></span></a>
|
2017-04-27 14:44:21 +08:00
|
|
|
</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>
|
2017-05-12 05:10:32 +08:00
|
|
|
<div class="mass-actions-mailbox">
|
|
|
|
<div class="btn-group">
|
|
|
|
<a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="alias-domain" href="#"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> <?=$lang['mailbox']['toggle_all'];?></a>
|
|
|
|
<a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
<li><a id="edit_selected" data-id="alias-domain" data-api-url='edit/alias-domain' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
|
|
|
|
<li><a id="edit_selected" data-id="alias-domain" data-api-url='edit/alias-domain' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
|
|
|
|
<li role="separator" class="divider"></li>
|
|
|
|
<li><a id="delete_selected" data-id="alias-domain" data-api-url='delete/alias-domain' href="#"><?=$lang['mailbox']['remove'];?></a></li>
|
|
|
|
</ul>
|
2017-05-30 03:51:06 +08:00
|
|
|
<a class="btn btn-sm btn-success" href="#" data-toggle="modal" data-target="#addAliasDomainModal"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_domain_alias'];?></a>
|
2017-05-12 05:10:32 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-04-27 14:44:21 +08:00
|
|
|
</div>
|
2017-03-21 17:02:23 +08:00
|
|
|
</div>
|
2017-01-28 16:53:39 +08:00
|
|
|
|
2017-04-27 14:44:21 +08:00
|
|
|
<div role="tabpanel" class="tab-pane" id="tab-mbox-aliases">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title"><?=$lang['mailbox']['aliases'];?></h3>
|
|
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table id="alias_table" class="table table-striped"></table>
|
|
|
|
</div>
|
2017-05-12 05:10:32 +08:00
|
|
|
<div class="mass-actions-mailbox">
|
|
|
|
<div class="btn-group">
|
|
|
|
<a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="alias" href="#"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> <?=$lang['mailbox']['toggle_all'];?></a>
|
|
|
|
<a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
|
|
|
|
<ul class="dropdown-menu">
|
2017-05-18 03:17:00 +08:00
|
|
|
<li><a id="edit_selected" data-id="alias" data-api-url='edit/alias' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
|
2017-05-12 05:10:32 +08:00
|
|
|
<li><a id="edit_selected" data-id="alias" data-api-url='edit/alias' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
|
|
|
|
<li role="separator" class="divider"></li>
|
|
|
|
<li><a id="delete_selected" data-id="alias" data-api-url='delete/alias' href="#"><?=$lang['mailbox']['remove'];?></a></li>
|
|
|
|
</ul>
|
2017-05-30 03:51:06 +08:00
|
|
|
<a class="btn btn-sm btn-success" href="#" data-toggle="modal" data-target="#addAliasModal"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_alias'];?></a>
|
2017-05-12 05:10:32 +08:00
|
|
|
</div>
|
2017-04-27 17:58:20 +08:00
|
|
|
</div>
|
2017-04-27 14:44:21 +08:00
|
|
|
</div>
|
2017-03-21 17:02:23 +08:00
|
|
|
</div>
|
2017-04-27 14:44:21 +08:00
|
|
|
|
2017-07-29 16:32:17 +08:00
|
|
|
<div role="tabpanel" class="tab-pane" id="tab-syncjobs">
|
|
|
|
<div class="panel panel-default">
|
|
|
|
<div class="panel-heading">
|
|
|
|
<h3 class="panel-title">Sync jobs</h3>
|
|
|
|
</div>
|
|
|
|
<div class="table-responsive">
|
|
|
|
<table class="table table-striped" id="sync_job_table"></table>
|
|
|
|
</div>
|
|
|
|
<div class="mass-actions-mailbox">
|
|
|
|
<div class="btn-group">
|
|
|
|
<a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="syncjob" href="#"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> <?=$lang['mailbox']['toggle_all'];?></a>
|
|
|
|
<a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
|
|
|
|
<ul class="dropdown-menu">
|
|
|
|
<li><a id="edit_selected" data-id="syncjob" data-api-url='edit/syncjob' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
|
|
|
|
<li><a id="edit_selected" data-id="syncjob" data-api-url='edit/syncjob' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
|
|
|
|
<li role="separator" class="divider"></li>
|
|
|
|
<li><a id="delete_selected" data-text="<?=$lang['user']['eas_reset'];?>?" data-id="syncjob" data-api-url='delete/syncjob' href="#"><?=$lang['mailbox']['remove'];?></a></li>
|
|
|
|
</ul>
|
|
|
|
<a class="btn btn-sm btn-success" href="#" data-toggle="modal" data-target="#addSyncJobModalAdmin"><span class="glyphicon glyphicon-plus"></span> <?=$lang['user']['create_syncjob'];?></a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2017-04-27 14:44:21 +08:00
|
|
|
</div> <!-- /tab-content -->
|
|
|
|
</div> <!-- /col-md-12 -->
|
|
|
|
</div> <!-- /row -->
|
2016-12-10 03:39:02 +08:00
|
|
|
</div> <!-- /container -->
|
2017-05-27 05:02:04 +08:00
|
|
|
<?php
|
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/modals/mailbox.php';
|
|
|
|
?>
|
2017-03-21 17:02:23 +08:00
|
|
|
<script type='text/javascript'>
|
|
|
|
<?php
|
|
|
|
$lang_mailbox = json_encode($lang['mailbox']);
|
|
|
|
echo "var lang = ". $lang_mailbox . ";\n";
|
2017-05-15 17:37:12 +08:00
|
|
|
echo "var csrf_token = '". $_SESSION['CSRF']['TOKEN'] . "';\n";
|
2017-03-21 21:45:49 +08:00
|
|
|
$role = ($_SESSION['mailcow_cc_role'] == "admin") ? 'admin' : 'domainadmin';
|
|
|
|
echo "var role = '". $role . "';\n";
|
2017-03-22 17:46:24 +08:00
|
|
|
echo "var pagination_size = '". $PAGINATION_SIZE . "';\n";
|
2017-03-21 17:02:23 +08:00
|
|
|
?>
|
2017-03-21 15:11:06 +08:00
|
|
|
</script>
|
|
|
|
<script src="js/footable.min.js"></script>
|
2016-12-10 03:39:02 +08:00
|
|
|
<script src="js/mailbox.js"></script>
|
|
|
|
<?php
|
2017-05-30 03:51:06 +08:00
|
|
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.inc.php';
|
2016-12-10 03:39:02 +08:00
|
|
|
} else {
|
|
|
|
header('Location: /');
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
?>
|