Matthias Andreas Benkard | b382b10 | 2021-01-02 15:32:21 +0100 | [diff] [blame^] | 1 | <?php |
| 2 | require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/prerequisites.inc.php'; |
| 3 | |
| 4 | if (isset($_SESSION['mailcow_cc_role']) && ($_SESSION['mailcow_cc_role'] == "admin" || $_SESSION['mailcow_cc_role'] == "domainadmin")) { |
| 5 | require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php'; |
| 6 | $_SESSION['return_to'] = $_SERVER['REQUEST_URI']; |
| 7 | ?> |
| 8 | <div class="container"> |
| 9 | |
| 10 | <ul class="nav nav-tabs" role="tablist"> |
| 11 | <li role="presentation" class="active"><a href="#tab-domains" aria-controls="tab-domains" role="tab" data-toggle="tab"><?=$lang['mailbox']['domains'];?></a></li> |
| 12 | <li role="presentation"><a href="#tab-mailboxes" aria-controls="tab-mailboxes" role="tab" data-toggle="tab"><?=$lang['mailbox']['mailboxes'];?></a></li> |
| 13 | <?php /* <li class="dropdown"> |
| 14 | <a class="dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['mailboxes'];?> |
| 15 | <span class="caret"></span></a> |
| 16 | <ul class="dropdown-menu"> |
| 17 | <li role="presentation"><a href="#tab-mailboxes" aria-controls="tab-mailboxes" role="tab" data-toggle="tab"><?=$lang['mailbox']['mailboxes'];?></a></li> |
| 18 | <li role="presentation"><a href="#tab-mailbox-defaults" aria-controls="tab-mailbox-defaults" role="tab" data-toggle="tab"><?=$lang['mailbox']['mailbox_defaults'];?></a></li> |
| 19 | </ul> |
| 20 | </li> */ ?> |
| 21 | <li role="presentation"><a href="#tab-resources" aria-controls="tab-resources" role="tab" data-toggle="tab"><?=$lang['mailbox']['resources'];?></a></li> |
| 22 | <li class="dropdown"> |
| 23 | <a class="dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['aliases'];?> |
| 24 | <span class="caret"></span></a> |
| 25 | <ul class="dropdown-menu"> |
| 26 | <li role="presentation"><a href="#tab-mbox-aliases" aria-controls="tab-mbox-aliases" role="tab" data-toggle="tab"><?=$lang['mailbox']['aliases'];?></a></li> |
| 27 | <li role="presentation"><a href="#tab-domain-aliases" aria-controls="tab-domain-aliases" role="tab" data-toggle="tab"><?=$lang['mailbox']['domain_aliases'];?></a></li> |
| 28 | </ul> |
| 29 | </li> |
| 30 | <li role="presentation"><a href="#tab-syncjobs" aria-controls="tab-syncjobs" role="tab" data-toggle="tab"><?=$lang['mailbox']['sync_jobs'];?></a></li> |
| 31 | <li role="presentation"><a href="#tab-filters" aria-controls="tab-filters" role="tab" data-toggle="tab"><?=$lang['mailbox']['filters'];?></a></li> |
| 32 | <li role="presentation"><a href="#tab-bcc" aria-controls="tab-filters" role="tab" data-toggle="tab"><?=$lang['mailbox']['address_rewriting'];?></a></li> |
| 33 | <li role="presentation"<?=($_SESSION['mailcow_cc_role'] == "admin") ?: ' class="hidden"';?>><a href="#tab-tls-policy" aria-controls="tab-tls-policy" role="tab" data-toggle="tab"><?=$lang['mailbox']['tls_policy_maps'];?></a></li> |
| 34 | </ul> |
| 35 | |
| 36 | <div class="row"> |
| 37 | <div class="col-md-12"> |
| 38 | <div class="tab-content" style="padding-top:20px"> |
| 39 | <div role="tabpanel" class="tab-pane active" id="tab-domains"> |
| 40 | <div class="panel panel-default"> |
| 41 | <div class="panel-heading"> |
| 42 | <?=$lang['mailbox']['domains'];?> <span class="badge badge-info table-lines"></span> |
| 43 | <div class="btn-group pull-right hidden-xs"> |
| 44 | <? if($_SESSION['mailcow_cc_role'] == "admin"): ?><button class="btn btn-xs btn-success" href="#" data-toggle="modal" data-target="#addDomainModal"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_domain'];?></button><? endif; ?> |
| 45 | <button class="btn btn-xs btn-default refresh_table" data-draw="draw_domain_table" data-table="domain_table"><?=$lang['admin']['refresh'];?></button> |
| 46 | <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><?=$lang['mailbox']['table_size'];?> |
| 47 | <span class="caret"></span> |
| 48 | </button> |
| 49 | <ul class="dropdown-menu" data-table-id="domain_table" role="menu"> |
| 50 | <li><a href="#" data-page-size="3"><?=sprintf($lang['mailbox']['table_size_show_n'], 3);?></a></li> |
| 51 | <li><a href="#" data-page-size="10"><?=sprintf($lang['mailbox']['table_size_show_n'], 10);?></a></li> |
| 52 | <li><a href="#" data-page-size="20"><?=sprintf($lang['mailbox']['table_size_show_n'], 20);?></a></li> |
| 53 | <li><a href="#" data-page-size="50"><?=sprintf($lang['mailbox']['table_size_show_n'], 50);?></a></li> |
| 54 | <li><a href="#" data-page-size="100"><?=sprintf($lang['mailbox']['table_size_show_n'], 100);?></a></li> |
| 55 | <li><a href="#" data-page-size="200"><?=sprintf($lang['mailbox']['table_size_show_n'], 200);?></a></li> |
| 56 | </ul> |
| 57 | </div> |
| 58 | </div> |
| 59 | <!-- <div class="mass-actions-mailbox" data-actions-header="true"></div> --> |
| 60 | <div class="table-responsive"> |
| 61 | <table id="domain_table" class="table table-striped"></table> |
| 62 | </div> |
| 63 | <div class="mass-actions-mailbox"> |
| 64 | <div class="btn-group"> |
| 65 | <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> |
| 66 | <a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a> |
| 67 | <ul class="dropdown-menu"> |
| 68 | <? if($_SESSION['mailcow_cc_role'] == "admin"): ?> |
| 69 | <li><a data-action="edit_selected" data-id="domain" data-api-url='edit/domain' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li> |
| 70 | <li><a data-action="edit_selected" data-id="domain" data-api-url='edit/domain' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> |
| 71 | <li role="separator" class="divider"></li> |
| 72 | <li><a data-action="delete_selected" data-id="domain" data-api-url='delete/domain' href="#"><?=$lang['mailbox']['remove'];?></a></li> |
| 73 | <? endif; ?> |
| 74 | </ul> |
| 75 | <? if($_SESSION['mailcow_cc_role'] == "admin"): ?> |
| 76 | <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> |
| 77 | <? endif; ?> |
| 78 | </div> |
| 79 | </div> |
| 80 | </div> |
| 81 | </div> |
| 82 | |
| 83 | <div role="tabpanel" class="tab-pane" id="tab-mailbox-defaults"> |
| 84 | <div class="panel panel-default"> |
| 85 | <div class="panel-heading"> |
| 86 | <?=$lang['mailbox']['mailbox_defaults'];?> |
| 87 | </div> |
| 88 | <div class="panel-body help-block"> |
| 89 | <?=$lang['mailbox']['mailbox_defaults_info'];?> |
| 90 | </div> |
| 91 | </div> |
| 92 | </div> |
| 93 | |
| 94 | <div role="tabpanel" class="tab-pane" id="tab-mailboxes"> |
| 95 | <div class="panel panel-default"> |
| 96 | <div class="panel-heading"> |
| 97 | <?=$lang['mailbox']['mailboxes'];?> <span class="badge badge-info table-lines"></span> |
| 98 | <div class="btn-group pull-right hidden-xs"> |
| 99 | <button class="btn btn-xs btn-success" href="#" data-toggle="modal" data-target="#addMailboxModal"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_mailbox'];?></button> |
| 100 | <button class="btn btn-xs btn-default refresh_table" data-draw="draw_mailbox_table" data-table="mailbox_table"><?=$lang['admin']['refresh'];?></button> |
| 101 | <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><?=$lang['mailbox']['table_size'];?> |
| 102 | <span class="caret"></span> |
| 103 | </button> |
| 104 | <ul class="dropdown-menu" data-table-id="mailbox_table" role="menu"> |
| 105 | <li><a href="#" data-page-size="3"><?=sprintf($lang['mailbox']['table_size_show_n'], 3);?></a></li> |
| 106 | <li><a href="#" data-page-size="10"><?=sprintf($lang['mailbox']['table_size_show_n'], 10);?></a></li> |
| 107 | <li><a href="#" data-page-size="20"><?=sprintf($lang['mailbox']['table_size_show_n'], 20);?></a></li> |
| 108 | <li><a href="#" data-page-size="50"><?=sprintf($lang['mailbox']['table_size_show_n'], 50);?></a></li> |
| 109 | <li><a href="#" data-page-size="100"><?=sprintf($lang['mailbox']['table_size_show_n'], 100);?></a></li> |
| 110 | <li><a href="#" data-page-size="200"><?=sprintf($lang['mailbox']['table_size_show_n'], 200);?></a></li> |
| 111 | </ul> |
| 112 | </div> |
| 113 | </div> |
| 114 | <?php if (getenv('ALLOW_ADMIN_EMAIL_LOGIN') == "y" && getenv('SKIP_SOGO') != "y") { ?> |
| 115 | <div class="panel-body help-block"> |
| 116 | <?=$lang['mailbox']['sogo_allow_admin_hint'];?> |
| 117 | </div> |
| 118 | <?php } ?> |
| 119 | <div class="mass-actions-mailbox" data-actions-header="true"></div> |
| 120 | <div class="table-responsive"> |
| 121 | <table id="mailbox_table" class="table table-striped"></table> |
| 122 | </div> |
| 123 | <div class="mass-actions-mailbox"> |
| 124 | <div class="btn-group hidden-md hidden-lg hidden-xl"> |
| 125 | <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> |
| 126 | <a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a> |
| 127 | <ul class="dropdown-menu"> |
| 128 | <li class="dropdown-header"><?=$lang['mailbox']['mailbox'];?></li> |
| 129 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li> |
| 130 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> |
| 131 | <li><a data-action="delete_selected" data-id="mailbox" data-api-url='delete/mailbox' href="#"><?=$lang['mailbox']['remove'];?></a></li> |
| 132 | <li role="separator" class="divider"></li> |
| 133 | <li class="dropdown-header"><?=$lang['mailbox']['tls_enforce_in'];?></li> |
| 134 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/tls_policy' data-api-attr='{"tls_enforce_in":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li> |
| 135 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/tls_policy' data-api-attr='{"tls_enforce_in":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> |
| 136 | <li role="separator" class="divider"></li> |
| 137 | <li class="dropdown-header"><?=$lang['mailbox']['tls_enforce_out'];?></li> |
| 138 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/tls_policy' data-api-attr='{"tls_enforce_out":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li> |
| 139 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/tls_policy' data-api-attr='{"tls_enforce_out":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> |
| 140 | <li role="separator" class="divider"></li> |
| 141 | <li class="dropdown-header"><?=$lang['mailbox']['quarantine_notification'];?></li> |
| 142 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_notification' data-api-attr='{"quarantine_notification":"hourly"}' href="#"><?=$lang['user']['hourly'];?></a></li> |
| 143 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_notification' data-api-attr='{"quarantine_notification":"daily"}' href="#"><?=$lang['user']['daily'];?></a></li> |
| 144 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_notification' data-api-attr='{"quarantine_notification":"weekly"}' href="#"><?=$lang['user']['weekly'];?></a></li> |
| 145 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_notification' data-api-attr='{"quarantine_notification":"never"}' href="#"><?=$lang['user']['never'];?></a></li> |
| 146 | <li role="separator" class="divider"></li> |
| 147 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_category' data-api-attr='{"quarantine_category":"reject"}' href="#"><?=$lang['user']['q_reject'];?></a></li> |
| 148 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_category' data-api-attr='{"quarantine_category":"add_header"}' href="#"><?=$lang['user']['q_add_header'];?></a></li> |
| 149 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_category' data-api-attr='{"quarantine_category":"all"}' href="#"><?=$lang['user']['q_all'];?></a></li> |
| 150 | <li role="separator" class="divider"></li> |
| 151 | <li class="dropdown-header"><?=$lang['mailbox']['allowed_protocols'];?></li> |
| 152 | <li class="dropdown-header">IMAP</li> |
| 153 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"imap_access":1}' href="#"><?=$lang['mailbox']['activate'];?></a></li> |
| 154 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"imap_access":0}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> |
| 155 | <li role="separator" class="divider"></li> |
| 156 | <li class="dropdown-header">POP3</li> |
| 157 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"pop3_access":1}' href="#"><?=$lang['mailbox']['activate'];?></a></li> |
| 158 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"pop3_access":0}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> |
| 159 | <li role="separator" class="divider"></li> |
| 160 | <li class="dropdown-header">SMTP</li> |
| 161 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"smtp_access":1}' href="#"><?=$lang['mailbox']['activate'];?></a></li> |
| 162 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"smtp_access":0}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> |
| 163 | </ul> |
| 164 | <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> |
| 165 | </div> |
| 166 | <div class="btn-group hidden-xs hidden-sm"> |
| 167 | <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> |
| 168 | <div class="btn-group"> |
| 169 | <a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['mailbox'];?> <span class="caret"></span></a> |
| 170 | <ul class="dropdown-menu"> |
| 171 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li> |
| 172 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"active":"2"}' href="#"><?=$lang['mailbox']['disable_login'];?></a></li> |
| 173 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> |
| 174 | <li role="separator" class="divider"></li> |
| 175 | <li><a data-action="delete_selected" data-id="mailbox" data-api-url='delete/mailbox' href="#"><?=$lang['mailbox']['remove'];?></a></li> |
| 176 | </ul> |
| 177 | </div> |
| 178 | <div class="btn-group"> |
| 179 | <a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#">TLS <span class="caret"></span></a> |
| 180 | <ul class="dropdown-menu"> |
| 181 | <li class="dropdown-header"><?=$lang['mailbox']['tls_enforce_in'];?></li> |
| 182 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/tls_policy' data-api-attr='{"tls_enforce_in":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li> |
| 183 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/tls_policy' data-api-attr='{"tls_enforce_in":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> |
| 184 | <li role="separator" class="divider"></li> |
| 185 | <li class="dropdown-header"><?=$lang['mailbox']['tls_enforce_out'];?></li> |
| 186 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/tls_policy' data-api-attr='{"tls_enforce_out":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li> |
| 187 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/tls_policy' data-api-attr='{"tls_enforce_out":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> |
| 188 | </ul> |
| 189 | </div> |
| 190 | <div class="btn-group"> |
| 191 | <a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['allowed_protocols'];?> <span class="caret"></span></a> |
| 192 | <ul class="dropdown-menu"> |
| 193 | <li class="dropdown-header">IMAP</li> |
| 194 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"imap_access":1}' href="#"><?=$lang['mailbox']['activate'];?></a></li> |
| 195 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"imap_access":0}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> |
| 196 | <li role="separator" class="divider"></li> |
| 197 | <li class="dropdown-header">POP3</li> |
| 198 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"pop3_access":1}' href="#"><?=$lang['mailbox']['activate'];?></a></li> |
| 199 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"pop3_access":0}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> |
| 200 | <li role="separator" class="divider"></li> |
| 201 | <li class="dropdown-header">SMTP</li> |
| 202 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"smtp_access":1}' href="#"><?=$lang['mailbox']['activate'];?></a></li> |
| 203 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/mailbox' data-api-attr='{"smtp_access":0}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> |
| 204 | </ul> |
| 205 | </div> |
| 206 | <div class="btn-group"> |
| 207 | <a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quarantine_notification'];?> <span class="caret"></span></a> |
| 208 | <ul class="dropdown-menu"> |
| 209 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_notification' data-api-attr='{"quarantine_notification":"hourly"}' href="#"><?=$lang['user']['hourly'];?></a></li> |
| 210 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_notification' data-api-attr='{"quarantine_notification":"daily"}' href="#"><?=$lang['user']['daily'];?></a></li> |
| 211 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_notification' data-api-attr='{"quarantine_notification":"weekly"}' href="#"><?=$lang['user']['weekly'];?></a></li> |
| 212 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_notification' data-api-attr='{"quarantine_notification":"never"}' href="#"><?=$lang['user']['never'];?></a></li> |
| 213 | <li role="separator" class="divider"></li> |
| 214 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_category' data-api-attr='{"quarantine_category":"reject"}' href="#"><?=$lang['user']['q_reject'];?></a></li> |
| 215 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_category' data-api-attr='{"quarantine_category":"add_header"}' href="#"><?=$lang['user']['q_add_header'];?></a></li> |
| 216 | <li><a data-action="edit_selected" data-id="mailbox" data-api-url='edit/quarantine_category' data-api-attr='{"quarantine_category":"all"}' href="#"><?=$lang['user']['q_all'];?></a></li> |
| 217 | </ul> |
| 218 | </div> |
| 219 | <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> |
| 220 | </div> |
| 221 | </div> |
| 222 | </div> |
| 223 | </div> |
| 224 | |
| 225 | <div role="tabpanel" class="tab-pane" id="tab-resources"> |
| 226 | <div class="panel panel-default"> |
| 227 | <div class="panel-heading"> |
| 228 | <?=$lang['mailbox']['resources'];?> <span class="badge badge-info table-lines"></span> |
| 229 | <div class="btn-group pull-right hidden-xs"> |
| 230 | <button class="btn btn-xs btn-success" href="#" data-toggle="modal" data-target="#addResourceModal"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_resource'];?></button> |
| 231 | <button class="btn btn-xs btn-default refresh_table" data-draw="draw_resource_table" data-table="resource_table"><?=$lang['admin']['refresh'];?></button> |
| 232 | <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><?=$lang['mailbox']['table_size'];?> |
| 233 | <span class="caret"></span> |
| 234 | </button> |
| 235 | <ul class="dropdown-menu" data-table-id="resource_table" role="menu"> |
| 236 | <li><a href="#" data-page-size="3"><?=sprintf($lang['mailbox']['table_size_show_n'], 3);?></a></li> |
| 237 | <li><a href="#" data-page-size="10"><?=sprintf($lang['mailbox']['table_size_show_n'], 10);?></a></li> |
| 238 | <li><a href="#" data-page-size="20"><?=sprintf($lang['mailbox']['table_size_show_n'], 20);?></a></li> |
| 239 | <li><a href="#" data-page-size="50"><?=sprintf($lang['mailbox']['table_size_show_n'], 50);?></a></li> |
| 240 | <li><a href="#" data-page-size="100"><?=sprintf($lang['mailbox']['table_size_show_n'], 100);?></a></li> |
| 241 | <li><a href="#" data-page-size="200"><?=sprintf($lang['mailbox']['table_size_show_n'], 200);?></a></li> |
| 242 | </ul> |
| 243 | </div> |
| 244 | </div> |
| 245 | <div class="panel-body help-block"> |
| 246 | <p><span class="label label-success"><?=$lang['mailbox']['booking_0_short'];?></span> - <?=$lang['mailbox']['booking_0'];?></p> |
| 247 | <p><span class="label label-warning"><?=$lang['mailbox']['booking_lt0_short'];?></span> - <?=$lang['mailbox']['booking_lt0'];?></p> |
| 248 | <p><span class="label label-danger"><?=$lang['mailbox']['booking_custom_short'];?></span> - <?=$lang['mailbox']['booking_custom'];?></p> |
| 249 | </div> |
| 250 | <!-- <div class="mass-actions-mailbox" data-actions-header="true"></div> --> |
| 251 | <div class="table-responsive"> |
| 252 | <table id="resource_table" class="table table-striped"></table> |
| 253 | </div> |
| 254 | <div class="mass-actions-mailbox"> |
| 255 | <div class="btn-group"> |
| 256 | <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> |
| 257 | <a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a> |
| 258 | <ul class="dropdown-menu"> |
| 259 | <li><a data-action="edit_selected" data-id="resource" data-api-url='edit/resource' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li> |
| 260 | <li><a data-action="edit_selected" data-id="resource" data-api-url='edit/resource' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> |
| 261 | <li role="separator" class="divider"></li> |
| 262 | <li><a data-action="delete_selected" data-id="resource" data-api-url='delete/resource' href="#"><?=$lang['mailbox']['remove'];?></a></li> |
| 263 | </ul> |
| 264 | <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> |
| 265 | </div> |
| 266 | </div> |
| 267 | </div> |
| 268 | </div> |
| 269 | |
| 270 | <div role="tabpanel" class="tab-pane" id="tab-domain-aliases"> |
| 271 | <div class="panel panel-default"> |
| 272 | <div class="panel-heading"> |
| 273 | <?=$lang['mailbox']['domain_aliases'];?> <span class="badge badge-info table-lines"></span> |
| 274 | <div class="btn-group pull-right hidden-xs"> |
| 275 | <button class="btn btn-xs btn-success" href="#" data-acl="<?=$_SESSION['acl']['alias_domains'];?>" data-toggle="modal" data-target="#addAliasDomainModal"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_domain_alias'];?></button> |
| 276 | <button class="btn btn-xs btn-default refresh_table" data-draw="draw_aliasdomain_table" data-table="aliasdomain_table"><?=$lang['admin']['refresh'];?></button> |
| 277 | <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><?=$lang['mailbox']['table_size'];?> |
| 278 | <span class="caret"></span> |
| 279 | </button> |
| 280 | <ul class="dropdown-menu" data-table-id="aliasdomain_table" role="menu"> |
| 281 | <li><a href="#" data-page-size="3"><?=sprintf($lang['mailbox']['table_size_show_n'], 3);?></a></li> |
| 282 | <li><a href="#" data-page-size="10"><?=sprintf($lang['mailbox']['table_size_show_n'], 10);?></a></li> |
| 283 | <li><a href="#" data-page-size="20"><?=sprintf($lang['mailbox']['table_size_show_n'], 20);?></a></li> |
| 284 | <li><a href="#" data-page-size="50"><?=sprintf($lang['mailbox']['table_size_show_n'], 50);?></a></li> |
| 285 | <li><a href="#" data-page-size="100"><?=sprintf($lang['mailbox']['table_size_show_n'], 100);?></a></li> |
| 286 | <li><a href="#" data-page-size="200"><?=sprintf($lang['mailbox']['table_size_show_n'], 200);?></a></li> |
| 287 | </ul> |
| 288 | </div> |
| 289 | </div> |
| 290 | <!-- <div class="mass-actions-mailbox" data-actions-header="true"></div> --> |
| 291 | <div class="table-responsive"> |
| 292 | <table id="aliasdomain_table" class="table table-striped"></table> |
| 293 | </div> |
| 294 | <div class="mass-actions-mailbox"> |
| 295 | <div class="btn-group"> |
| 296 | <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> |
| 297 | <a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a> |
| 298 | <ul class="dropdown-menu"> |
| 299 | <li><a data-action="edit_selected" data-id="alias-domain" data-api-url='edit/alias-domain' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li> |
| 300 | <li><a data-action="edit_selected" data-id="alias-domain" data-api-url='edit/alias-domain' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> |
| 301 | <li role="separator" class="divider"></li> |
| 302 | <li><a data-action="delete_selected" data-id="alias-domain" data-api-url='delete/alias-domain' href="#"><?=$lang['mailbox']['remove'];?></a></li> |
| 303 | </ul> |
| 304 | <a class="btn btn-sm btn-success" href="#" data-acl="<?=$_SESSION['acl']['alias_domains'];?>" data-toggle="modal" data-target="#addAliasDomainModal"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_domain_alias'];?></a> |
| 305 | </div> |
| 306 | </div> |
| 307 | </div> |
| 308 | </div> |
| 309 | |
| 310 | <div role="tabpanel" class="tab-pane" id="tab-mbox-aliases"> |
| 311 | <div class="panel panel-default"> |
| 312 | <div class="panel-heading"> |
| 313 | <?=$lang['mailbox']['aliases'];?> <span class="badge badge-info table-lines"></span> |
| 314 | <div class="btn-group pull-right hidden-xs"> |
| 315 | <button class="btn btn-xs btn-success" href="#" data-toggle="modal" data-target="#addAliasModal"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_alias'];?></button> |
| 316 | <button class="btn btn-xs btn-default refresh_table" data-draw="draw_alias_table" data-table="alias_table"><?=$lang['admin']['refresh'];?></button> |
| 317 | <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><?=$lang['mailbox']['table_size'];?> |
| 318 | <span class="caret"></span> |
| 319 | </button> |
| 320 | <ul class="dropdown-menu" data-table-id="alias_table" role="menu"> |
| 321 | <li><a href="#" data-page-size="3"><?=sprintf($lang['mailbox']['table_size_show_n'], 3);?></a></li> |
| 322 | <li><a href="#" data-page-size="10"><?=sprintf($lang['mailbox']['table_size_show_n'], 10);?></a></li> |
| 323 | <li><a href="#" data-page-size="20"><?=sprintf($lang['mailbox']['table_size_show_n'], 20);?></a></li> |
| 324 | <li><a href="#" data-page-size="50"><?=sprintf($lang['mailbox']['table_size_show_n'], 50);?></a></li> |
| 325 | <li><a href="#" data-page-size="100"><?=sprintf($lang['mailbox']['table_size_show_n'], 100);?></a></li> |
| 326 | <li><a href="#" data-page-size="200"><?=sprintf($lang['mailbox']['table_size_show_n'], 200);?></a></li> |
| 327 | </ul> |
| 328 | </div> |
| 329 | </div> |
| 330 | <div class="panel-body help-block"> |
| 331 | <?=$lang['mailbox']['alias_domain_alias_hint'];?> |
| 332 | </div> |
| 333 | <!-- <div class="mass-actions-mailbox" data-actions-header="true"></div> --> |
| 334 | <div class="table-responsive"> |
| 335 | <table id="alias_table" class="table table-striped"></table> |
| 336 | </div> |
| 337 | <div class="mass-actions-mailbox"> |
| 338 | <div class="btn-group"> |
| 339 | <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> |
| 340 | <a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a> |
| 341 | <ul class="dropdown-menu"> |
| 342 | <li><a data-action="edit_selected" data-id="alias" data-api-url='edit/alias' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li> |
| 343 | <li><a data-action="edit_selected" data-id="alias" data-api-url='edit/alias' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> |
| 344 | <li role="separator" class="divider"></li> |
| 345 | <li><a data-action="delete_selected" data-id="alias" data-api-url='delete/alias' href="#"><?=$lang['mailbox']['remove'];?></a></li> |
| 346 | <?php if (getenv('SKIP_SOGO') != "y") { ?> |
| 347 | <li role="separator" class="divider"></li> |
| 348 | <li><a data-action="edit_selected" data-id="alias" data-api-url='edit/alias' data-api-attr='{"sogo_visible":"1"}' href="#"><?=$lang['mailbox']['sogo_visible_y'];?></a></li> |
| 349 | <li><a data-action="edit_selected" data-id="alias" data-api-url='edit/alias' data-api-attr='{"sogo_visible":"0"}' href="#"><?=$lang['mailbox']['sogo_visible_n'];?></a></li> |
| 350 | <?php } ?> |
| 351 | </ul> |
| 352 | <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> |
| 353 | </div> |
| 354 | </div> |
| 355 | </div> |
| 356 | </div> |
| 357 | |
| 358 | <div role="tabpanel" class="tab-pane" id="tab-syncjobs"> |
| 359 | <div class="panel panel-default"> |
| 360 | <div class="panel-heading"> |
| 361 | <?=$lang['mailbox']['sync_jobs'];?> <span class="badge badge-info table-lines"></span> |
| 362 | <div class="btn-group pull-right hidden-xs"> |
| 363 | <button data-acl="<?=$_SESSION['acl']['syncjobs'];?>" class="btn btn-xs btn-success" href="#" data-toggle="modal" data-target="#addSyncJobModalAdmin"><span class="glyphicon glyphicon-plus"></span> <?=$lang['user']['create_syncjob'];?></button> |
| 364 | <button class="btn btn-xs btn-default refresh_table" data-draw="draw_sync_job_table" data-table="sync_job_table"><?=$lang['admin']['refresh'];?></button> |
| 365 | <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><?=$lang['mailbox']['table_size'];?> |
| 366 | <span class="caret"></span> |
| 367 | </button> |
| 368 | <ul class="dropdown-menu" data-table-id="sync_job_table" role="menu"> |
| 369 | <li><a href="#" data-page-size="3"><?=sprintf($lang['mailbox']['table_size_show_n'], 3);?></a></li> |
| 370 | <li><a href="#" data-page-size="10"><?=sprintf($lang['mailbox']['table_size_show_n'], 10);?></a></li> |
| 371 | <li><a href="#" data-page-size="20"><?=sprintf($lang['mailbox']['table_size_show_n'], 20);?></a></li> |
| 372 | <li><a href="#" data-page-size="50"><?=sprintf($lang['mailbox']['table_size_show_n'], 50);?></a></li> |
| 373 | <li><a href="#" data-page-size="100"><?=sprintf($lang['mailbox']['table_size_show_n'], 100);?></a></li> |
| 374 | <li><a href="#" data-page-size="200"><?=sprintf($lang['mailbox']['table_size_show_n'], 200);?></a></li> |
| 375 | </ul> |
| 376 | </div> |
| 377 | </div> |
| 378 | <!-- <div class="mass-actions-mailbox" data-actions-header="true"></div> --> |
| 379 | <div class="table-responsive"> |
| 380 | <table class="table table-striped" id="sync_job_table"></table> |
| 381 | </div> |
| 382 | <div class="mass-actions-mailbox"> |
| 383 | <div class="btn-group" data-acl="<?=$_SESSION['acl']['syncjobs'];?>"> |
| 384 | <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> |
| 385 | <a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a> |
| 386 | <ul class="dropdown-menu"> |
| 387 | <li><a data-action="edit_selected" data-id="syncjob" data-api-url='edit/syncjob' data-api-attr='{"last_run":""}' href="#"><?=$lang['mailbox']['last_run_reset'];?></a></li> |
| 388 | <li role="separator" class="divider"></li> |
| 389 | <li><a data-action="edit_selected" data-id="syncjob" data-api-url='edit/syncjob' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li> |
| 390 | <li><a data-action="edit_selected" data-id="syncjob" data-api-url='edit/syncjob' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> |
| 391 | <li role="separator" class="divider"></li> |
| 392 | <li><a data-action="delete_selected" data-id="syncjob" data-api-url='delete/syncjob' href="#"><?=$lang['mailbox']['remove'];?></a></li> |
| 393 | </ul> |
| 394 | <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> |
| 395 | </div> |
| 396 | </div> |
| 397 | </div> |
| 398 | </div> |
| 399 | |
| 400 | <div role="tabpanel" class="tab-pane" id="tab-filters"> |
| 401 | <div class="panel panel-default"> |
| 402 | <div class="panel-heading"> |
| 403 | <?=$lang['mailbox']['filters'];?> <span class="badge badge-info table-lines"></span> |
| 404 | <div class="btn-group pull-right hidden-xs"> |
| 405 | <button class="btn btn-xs btn-success" href="#" data-acl="<?=$_SESSION['acl']['filters'];?>" data-toggle="modal" data-target="#addFilterModalAdmin"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_filter'];?></button> |
| 406 | <button class="btn btn-xs btn-default refresh_table" data-draw="draw_filter_table" data-table="filter_table"><?=$lang['admin']['refresh'];?></button> |
| 407 | <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><?=$lang['mailbox']['table_size'];?> |
| 408 | <span class="caret"></span> |
| 409 | </button> |
| 410 | <ul class="dropdown-menu" data-table-id="filter_table" role="menu"> |
| 411 | <li><a href="#" data-page-size="3"><?=sprintf($lang['mailbox']['table_size_show_n'], 3);?></a></li> |
| 412 | <li><a href="#" data-page-size="10"><?=sprintf($lang['mailbox']['table_size_show_n'], 10);?></a></li> |
| 413 | <li><a href="#" data-page-size="20"><?=sprintf($lang['mailbox']['table_size_show_n'], 20);?></a></li> |
| 414 | <li><a href="#" data-page-size="50"><?=sprintf($lang['mailbox']['table_size_show_n'], 50);?></a></li> |
| 415 | <li><a href="#" data-page-size="100"><?=sprintf($lang['mailbox']['table_size_show_n'], 100);?></a></li> |
| 416 | <li><a href="#" data-page-size="200"><?=sprintf($lang['mailbox']['table_size_show_n'], 200);?></a></li> |
| 417 | </ul> |
| 418 | </div> |
| 419 | </div> |
| 420 | <div class="panel-body"> |
| 421 | <p class="help-block"><?=$lang['mailbox']['sieve_info'];?></p><br> |
| 422 | </div> |
| 423 | <!-- <div class="mass-actions-mailbox" data-actions-header="true"></div> --> |
| 424 | <div class="table-responsive"> |
| 425 | <table class="table table-striped" id="filter_table"></table> |
| 426 | </div> |
| 427 | <div class="mass-actions-mailbox"> |
| 428 | <div class="btn-group" data-acl="<?=$_SESSION['acl']['filters'];?>"> |
| 429 | <a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="filter_item" href="#"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> <?=$lang['mailbox']['toggle_all'];?></a> |
| 430 | <a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a> |
| 431 | <ul class="dropdown-menu"> |
| 432 | <li><a data-action="edit_selected" data-id="filter_item" data-api-url='edit/filter' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li> |
| 433 | <li><a data-action="edit_selected" data-id="filter_item" data-api-url='edit/filter' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> |
| 434 | <li role="separator" class="divider"></li> |
| 435 | <li><a data-action="edit_selected" data-id="filter_item" data-api-url='edit/filter' data-api-attr='{"filter_type":"prefilter"}' href="#"><?=$lang['mailbox']['set_prefilter'];?></a></li> |
| 436 | <li><a data-action="edit_selected" data-id="filter_item" data-api-url='edit/filter' data-api-attr='{"filter_type":"postfilter"}' href="#"><?=$lang['mailbox']['set_postfilter'];?></a></li> |
| 437 | <li role="separator" class="divider"></li> |
| 438 | <li><a data-action="delete_selected" data-text="<?=$lang['user']['eas_reset'];?>?" data-id="filter_item" data-api-url='delete/filter' href="#"><?=$lang['mailbox']['remove'];?></a></li> |
| 439 | </ul> |
| 440 | <a class="btn btn-sm btn-success" href="#" data-toggle="modal" data-target="#addFilterModalAdmin"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_filter'];?></a> |
| 441 | </div> |
| 442 | </div> |
| 443 | <div class="panel-body <?=($_SESSION['mailcow_cc_role'] == "admin") ?: 'hidden';?>"> |
| 444 | <?php |
| 445 | $global_filters = mailbox('get', 'global_filter_details'); |
| 446 | ?> |
| 447 | <div class="row"> |
| 448 | <div class="col-lg-6"> |
| 449 | <h5>Global Prefilter</h5> |
| 450 | <form class="form-horizontal" data-cached-form="false" role="form" data-id="add_prefilter"> |
| 451 | <div class="form-group"> |
| 452 | <div class="col-sm-12"> |
| 453 | <textarea autocorrect="off" spellcheck="false" autocapitalize="none" class="form-control textarea-code script_data" rows="10" name="script_data" required><?=$global_filters['prefilter'];?></textarea> |
| 454 | </div> |
| 455 | </div> |
| 456 | <div class="form-group"> |
| 457 | <div class="col-sm-10 add_filter_btns"> |
| 458 | <div class="btn-group"> |
| 459 | <button class="btn btn-sm btn-default validate_sieve" href="#"><?=$lang['add']['validate'];?></button> |
| 460 | <button class="btn btn-sm btn-success add_sieve_script" data-action="add_item" data-id="add_prefilter" data-api-url='add/global-filter' data-api-attr='{"filter_type":"prefilter"}' href="#" disabled><span class="glyphicon glyphicon-check"></span> <?=$lang['admin']['save'];?></button> |
| 461 | </div> |
| 462 | </div> |
| 463 | </div> |
| 464 | </form> |
| 465 | </div> |
| 466 | <div class="col-lg-6"> |
| 467 | <h5>Global Postfilter</h5> |
| 468 | <form class="form-horizontal" data-cached-form="false" role="form" data-id="add_postfilter"> |
| 469 | <div class="form-group"> |
| 470 | <div class="col-sm-12"> |
| 471 | <textarea autocorrect="off" spellcheck="false" autocapitalize="none" class="form-control textarea-code script_data" rows="10" name="script_data" required><?=$global_filters['postfilter'];?></textarea> |
| 472 | </div> |
| 473 | </div> |
| 474 | <div class="form-group"> |
| 475 | <div class="col-sm-10 add_filter_btns"> |
| 476 | <div class="btn-group"> |
| 477 | <button class="btn btn-sm btn-default validate_sieve" href="#"><?=$lang['add']['validate'];?></button> |
| 478 | <button class="btn btn-sm btn-success add_sieve_script" data-action="add_item" data-id="add_postfilter" data-api-url='add/global-filter' data-api-attr='{"filter_type":"postfilter"}' href="#" disabled><span class="glyphicon glyphicon-check"></span> <?=$lang['admin']['save'];?></button> |
| 479 | </div> |
| 480 | </div> |
| 481 | </div> |
| 482 | </form> |
| 483 | </div> |
| 484 | </div> |
| 485 | </div> |
| 486 | </div> |
| 487 | </div> |
| 488 | |
| 489 | <div role="tabpanel" class="tab-pane" id="tab-bcc"> |
| 490 | <div class="panel panel-default"> |
| 491 | <div class="panel-heading"> |
| 492 | <?=$lang['mailbox']['bcc_maps'];?> <span class="badge badge-info table-lines"></span> |
| 493 | <div class="btn-group pull-right hidden-xs"> |
| 494 | <button class="btn btn-xs btn-success" href="#" data-acl="<?=$_SESSION['acl']['bcc_maps'];?>" data-toggle="modal" data-target="#addBCCModalAdmin"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_bcc_entry'];?></button> |
| 495 | <button class="btn btn-xs btn-default refresh_table" data-draw="draw_bcc_table" data-table="bcc_table"><?=$lang['admin']['refresh'];?></button> |
| 496 | <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><?=$lang['mailbox']['table_size'];?> |
| 497 | <span class="caret"></span> |
| 498 | </button> |
| 499 | <ul class="dropdown-menu" data-table-id="bcc_table" role="menu"> |
| 500 | <li><a href="#" data-page-size="3"><?=sprintf($lang['mailbox']['table_size_show_n'], 3);?></a></li> |
| 501 | <li><a href="#" data-page-size="10"><?=sprintf($lang['mailbox']['table_size_show_n'], 10);?></a></li> |
| 502 | <li><a href="#" data-page-size="20"><?=sprintf($lang['mailbox']['table_size_show_n'], 20);?></a></li> |
| 503 | <li><a href="#" data-page-size="50"><?=sprintf($lang['mailbox']['table_size_show_n'], 50);?></a></li> |
| 504 | <li><a href="#" data-page-size="100"><?=sprintf($lang['mailbox']['table_size_show_n'], 100);?></a></li> |
| 505 | <li><a href="#" data-page-size="200"><?=sprintf($lang['mailbox']['table_size_show_n'], 200);?></a></li> |
| 506 | </ul> |
| 507 | </div> |
| 508 | </div> |
| 509 | <p style="margin:10px" class="help-block"><?=$lang['mailbox']['bcc_info'];?></p> |
| 510 | <!-- <div class="mass-actions-mailbox" data-actions-header="true"></div> --> |
| 511 | <div class="table-responsive"> |
| 512 | <table class="table table-striped" id="bcc_table"></table> |
| 513 | </div> |
| 514 | <div class="mass-actions-mailbox"> |
| 515 | <div class="btn-group" data-acl="<?=$_SESSION['acl']['bcc_maps'];?>"> |
| 516 | <a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="bcc" href="#"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> <?=$lang['mailbox']['toggle_all'];?></a> |
| 517 | <a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a> |
| 518 | <ul class="dropdown-menu"> |
| 519 | <li><a data-action="edit_selected" data-id="bcc" data-api-url='edit/bcc' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li> |
| 520 | <li><a data-action="edit_selected" data-id="bcc" data-api-url='edit/bcc' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> |
| 521 | <li role="separator" class="divider"></li> |
| 522 | <li><a data-action="edit_selected" data-id="bcc" data-api-url='edit/bcc' data-api-attr='{"type":"sender"}' href="#"><?=$lang['mailbox']['bcc_to_sender'];?></a></li> |
| 523 | <li><a data-action="edit_selected" data-id="bcc" data-api-url='edit/bcc' data-api-attr='{"type":"rcpt"}' href="#"><?=$lang['mailbox']['bcc_to_rcpt'];?></a></li> |
| 524 | <li role="separator" class="divider"></li> |
| 525 | <li><a data-action="delete_selected" data-id="bcc" data-api-url='delete/bcc' href="#"><?=$lang['mailbox']['remove'];?></a></li> |
| 526 | </ul> |
| 527 | <a class="btn btn-sm btn-success" href="#" data-toggle="modal" data-target="#addBCCModalAdmin"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_bcc_entry'];?></a> |
| 528 | </div> |
| 529 | </div> |
| 530 | </div> |
| 531 | <div class="panel panel-default <?=($_SESSION['mailcow_cc_role'] == "admin") ?: 'hidden';?>"> |
| 532 | <div class="panel-heading"> |
| 533 | <?=$lang['mailbox']['recipient_maps'];?> <span class="badge badge-info table-lines"></span> |
| 534 | <div class="btn-group pull-right hidden-xs"> |
| 535 | <button class="btn btn-xs btn-success" href="#" data-toggle="modal" data-target="#addRecipientMapModalAdmin"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_recipient_map_entry'];?></button> |
| 536 | <button class="btn btn-xs btn-default refresh_table" data-draw="draw_recipient_map_table" data-table="recipient_map_table"><?=$lang['admin']['refresh'];?></button> |
| 537 | <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><?=$lang['mailbox']['table_size'];?> |
| 538 | <span class="caret"></span> |
| 539 | </button> |
| 540 | <ul class="dropdown-menu" data-table-id="recipient_map_table" role="menu"> |
| 541 | <li><a href="#" data-page-size="3"><?=sprintf($lang['mailbox']['table_size_show_n'], 3);?></a></li> |
| 542 | <li><a href="#" data-page-size="10"><?=sprintf($lang['mailbox']['table_size_show_n'], 10);?></a></li> |
| 543 | <li><a href="#" data-page-size="20"><?=sprintf($lang['mailbox']['table_size_show_n'], 20);?></a></li> |
| 544 | <li><a href="#" data-page-size="50"><?=sprintf($lang['mailbox']['table_size_show_n'], 50);?></a></li> |
| 545 | <li><a href="#" data-page-size="100"><?=sprintf($lang['mailbox']['table_size_show_n'], 100);?></a></li> |
| 546 | <li><a href="#" data-page-size="200"><?=sprintf($lang['mailbox']['table_size_show_n'], 200);?></a></li> |
| 547 | </ul> |
| 548 | </div> |
| 549 | </div> |
| 550 | <p style="margin:10px" class="help-block"><?=$lang['mailbox']['recipient_map_info'];?></p> |
| 551 | <!-- <div class="mass-actions-mailbox" data-actions-header="true"></div> --> |
| 552 | <div class="table-responsive"> |
| 553 | <table class="table table-striped" id="recipient_map_table"></table> |
| 554 | </div> |
| 555 | <div class="mass-actions-mailbox"> |
| 556 | <div class="btn-group"> |
| 557 | <a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="recipient_map" href="#"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> <?=$lang['mailbox']['toggle_all'];?></a> |
| 558 | <a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a> |
| 559 | <ul class="dropdown-menu"> |
| 560 | <li><a data-action="edit_selected" data-id="recipient_map" data-api-url='edit/recipient_map' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li> |
| 561 | <li><a data-action="edit_selected" data-id="recipient_map" data-api-url='edit/recipient_map' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> |
| 562 | <li role="separator" class="divider"></li> |
| 563 | <li><a data-action="delete_selected" data-id="recipient_map" data-api-url='delete/recipient_map' href="#"><?=$lang['mailbox']['remove'];?></a></li> |
| 564 | </ul> |
| 565 | <a class="btn btn-sm btn-success" href="#" data-toggle="modal" data-target="#addRecipientMapModalAdmin"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_recipient_map_entry'];?></a> |
| 566 | </div> |
| 567 | </div> |
| 568 | </div> |
| 569 | </div> |
| 570 | |
| 571 | <div role="tabpanel" class="tab-pane <?=($_SESSION['mailcow_cc_role'] == "admin") ?: 'hidden';?>" id="tab-tls-policy"> |
| 572 | <div class="panel panel-default"> |
| 573 | <div class="panel-heading"> |
| 574 | <?=$lang['mailbox']['tls_policy_maps_long'];?> <span class="badge badge-info table-lines"></span> |
| 575 | <div class="btn-group pull-right hidden-xs"> |
| 576 | <button class="btn btn-xs btn-success" href="#" data-toggle="modal" data-target="#addTLSPolicyMapAdmin"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_tls_policy_map'];?></button> |
| 577 | <button class="btn btn-xs btn-default refresh_table" data-draw="draw_tls_policy_table" data-table="tls_policy_table"><?=$lang['admin']['refresh'];?></button> |
| 578 | <button type="button" class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><?=$lang['mailbox']['table_size'];?> |
| 579 | <span class="caret"></span> |
| 580 | </button> |
| 581 | <ul class="dropdown-menu" data-table-id="tls_policy_table" role="menu"> |
| 582 | <li><a href="#" data-page-size="3"><?=sprintf($lang['mailbox']['table_size_show_n'], 3);?></a></li> |
| 583 | <li><a href="#" data-page-size="10"><?=sprintf($lang['mailbox']['table_size_show_n'], 10);?></a></li> |
| 584 | <li><a href="#" data-page-size="20"><?=sprintf($lang['mailbox']['table_size_show_n'], 20);?></a></li> |
| 585 | <li><a href="#" data-page-size="50"><?=sprintf($lang['mailbox']['table_size_show_n'], 50);?></a></li> |
| 586 | <li><a href="#" data-page-size="100"><?=sprintf($lang['mailbox']['table_size_show_n'], 100);?></a></li> |
| 587 | <li><a href="#" data-page-size="200"><?=sprintf($lang['mailbox']['table_size_show_n'], 200);?></a></li> |
| 588 | </ul> |
| 589 | </div> |
| 590 | </div> |
| 591 | <p style="margin:10px" class="help-block"><?=$lang['mailbox']['tls_policy_maps_info'];?></p> |
| 592 | <!-- <div class="mass-actions-mailbox" data-actions-header="true"></div> --> |
| 593 | <div class="table-responsive"> |
| 594 | <table class="table table-striped" id="tls_policy_table"></table> |
| 595 | </div> |
| 596 | <div class="mass-actions-mailbox"> |
| 597 | <div class="btn-group"> |
| 598 | <a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="tls-policy-map" href="#"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> <?=$lang['mailbox']['toggle_all'];?></a> |
| 599 | <a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a> |
| 600 | <ul class="dropdown-menu"> |
| 601 | <li><a data-action="edit_selected" data-id="tls-policy-map" data-api-url='edit/tls-policy-map' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li> |
| 602 | <li><a data-action="edit_selected" data-id="tls-policy-map" data-api-url='edit/tls-policy-map' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li> |
| 603 | <li role="separator" class="divider"></li> |
| 604 | <li><a data-action="delete_selected" data-id="tls-policy-map" data-api-url='delete/tls-policy-map' href="#"><?=$lang['mailbox']['remove'];?></a></li> |
| 605 | </ul> |
| 606 | <a class="btn btn-sm btn-success" href="#" data-toggle="modal" data-target="#addTLSPolicyMapAdmin"><span class="glyphicon glyphicon-plus"></span> <?=$lang['mailbox']['add_tls_policy_map'];?></a> |
| 607 | </div> |
| 608 | </div> |
| 609 | </div> |
| 610 | </div> |
| 611 | </div> <!-- /tab-content --> |
| 612 | </div> <!-- /col-md-12 --> |
| 613 | </div> <!-- /row --> |
| 614 | </div> <!-- /container --> |
| 615 | <?php |
| 616 | require_once $_SERVER['DOCUMENT_ROOT'] . '/modals/mailbox.php'; |
| 617 | ?> |
| 618 | <script type='text/javascript'> |
| 619 | <?php |
| 620 | $lang_mailbox = json_encode($lang['mailbox']); |
| 621 | echo "var lang = ". $lang_mailbox . ";\n"; |
| 622 | echo "var acl = '". json_encode($_SESSION['acl']) . "';\n"; |
| 623 | echo "var csrf_token = '". $_SESSION['CSRF']['TOKEN'] . "';\n"; |
| 624 | $role = ($_SESSION['mailcow_cc_role'] == "admin") ? 'admin' : 'domainadmin'; |
| 625 | $is_dual = (!empty($_SESSION["dual-login"]["username"])) ? 'true' : 'false'; |
| 626 | echo "var role = '". $role . "';\n"; |
| 627 | echo "var is_dual = " . $is_dual . ";\n"; |
| 628 | echo "var pagination_size = '". $PAGINATION_SIZE . "';\n"; |
| 629 | $ALLOW_ADMIN_EMAIL_LOGIN = (preg_match( |
| 630 | "/^([yY][eE][sS]|[yY])+$/", |
| 631 | $_ENV["ALLOW_ADMIN_EMAIL_LOGIN"] |
| 632 | )) ? "true" : "false"; |
| 633 | echo "var ALLOW_ADMIN_EMAIL_LOGIN = " . $ALLOW_ADMIN_EMAIL_LOGIN . ";\n"; |
| 634 | ?> |
| 635 | </script> |
| 636 | <?php |
| 637 | $js_minifier->add('/web/js/site/mailbox.js'); |
| 638 | $js_minifier->add('/web/js/presets/sieveMailbox.js'); |
| 639 | $js_minifier->add('/web/js/site/pwgen.js'); |
| 640 | require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.inc.php'; |
| 641 | } |
| 642 | else { |
| 643 | header('Location: /'); |
| 644 | exit(); |
| 645 | } |
| 646 | ?> |