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 | if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'domainadmin') {
|
| 4 |
|
| 5 | /*
|
| 6 | / DOMAIN ADMIN
|
| 7 | */
|
| 8 |
|
| 9 | require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php';
|
| 10 | $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
| 11 | $tfa_data = get_tfa();
|
| 12 | $fido2_data = fido2(array("action" => "get_friendly_names"));
|
| 13 | $username = $_SESSION['mailcow_cc_username'];
|
| 14 |
|
| 15 | ?>
|
| 16 | <div class="container">
|
| 17 |
|
| 18 | <h3><?=$lang['user']['user_settings'];?></h3>
|
| 19 | <div class="panel panel-default">
|
| 20 | <div class="panel-heading"><?=$lang['user']['user_settings'];?></div>
|
| 21 | <div class="panel-body">
|
| 22 | <div class="row">
|
| 23 | <div class="col-sm-offset-3 col-sm-9">
|
| 24 | <p><a href="#pwChangeModal" data-toggle="modal">[<?=$lang['user']['change_password'];?>]</a></p>
|
| 25 | <p><small>
|
| 26 | <?php
|
| 27 | if ($_SESSION['mailcow_cc_last_login']['remote']):
|
| 28 | ?>
|
| 29 | <span style="margin-right:10px" class="glyphicon glyphicon-log-in"></span> <span data-time="<?=$_SESSION['mailcow_cc_last_login']['time'];?>" class="last_login_date"></span> (<?=$_SESSION['mailcow_cc_last_login']['remote'];?>)
|
| 30 | <?php
|
| 31 | else: echo $lang['user']['no_last_login']; endif;
|
| 32 | ?>
|
| 33 | </small></p>
|
| 34 | <p>
|
| 35 | </div>
|
| 36 | </div>
|
| 37 | <hr>
|
| 38 |
|
| 39 | <? // TFA ?>
|
| 40 | <div class="row">
|
| 41 | <div class="col-sm-3 col-xs-5 text-right"><?=$lang['tfa']['tfa'];?></div>
|
| 42 | <div class="col-sm-9 col-xs-7">
|
| 43 | <p id="tfa_pretty"><?=$tfa_data['pretty'];?></p>
|
| 44 | <table id="tfa_keys">
|
| 45 | <?php if (!empty($tfa_data['additional'])):
|
| 46 | foreach ($tfa_data['additional'] as $key_info): ?>
|
| 47 | <form style="display:inline;" method="post">
|
| 48 | <input type="hidden" name="unset_tfa_key" value="<?=$key_info['id'];?>" />
|
| 49 | <div class="label label-default">🔑 <?=$key_info['key_id'];?> <a href="#" style="font-weight:bold;color:white" onClick="$(this).closest('form').submit()">[<?=strtolower($lang['admin']['remove']);?>]</a></div>
|
| 50 | </form>
|
| 51 | <?php endforeach;
|
| 52 | endif;?>
|
| 53 | </table>
|
| 54 | <br />
|
| 55 | </div>
|
| 56 | </div>
|
| 57 | <div class="row">
|
| 58 | <div class="col-sm-3 col-xs-5 text-right"><?=$lang['tfa']['set_tfa'];?></div>
|
| 59 | <div class="col-sm-9 col-xs-7">
|
| 60 | <select id="selectTFA" class="selectpicker" title="<?=$lang['tfa']['select'];?>">
|
| 61 | <option value="yubi_otp"><?=$lang['tfa']['yubi_otp'];?></option>
|
| 62 | <option value="u2f"><?=$lang['tfa']['u2f'];?></option>
|
| 63 | <option value="totp"><?=$lang['tfa']['totp'];?></option>
|
| 64 | <option value="none"><?=$lang['tfa']['none'];?></option>
|
| 65 | </select>
|
| 66 | </div>
|
| 67 | </div>
|
| 68 |
|
| 69 | <? // FIDO2 ?>
|
| 70 | <legend style="margin-top:20px">
|
| 71 | <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" style="margin-bottom: -5px;">
|
| 72 | <path d="M17.81 4.47c-.08 0-.16-.02-.23-.06C15.66 3.42 14 3 12.01 3c-1.98 0-3.86.47-5.57 1.41-.24.13-.54.04-.68-.2-.13-.24-.04-.55.2-.68C7.82 2.52 9.86 2 12.01 2c2.13 0 3.99.47 6.03 1.52.25.13.34.43.21.67-.09.18-.26.28-.44.28zM3.5 9.72c-.1 0-.2-.03-.29-.09-.23-.16-.28-.47-.12-.7.99-1.4 2.25-2.5 3.75-3.27C9.98 4.04 14 4.03 17.15 5.65c1.5.77 2.76 1.86 3.75 3.25.16.22.11.54-.12.7-.23.16-.54.11-.7-.12-.9-1.26-2.04-2.25-3.39-2.94-2.87-1.47-6.54-1.47-9.4.01-1.36.7-2.5 1.7-3.4 2.96-.08.14-.23.21-.39.21zm6.25 12.07c-.13 0-.26-.05-.35-.15-.87-.87-1.34-1.43-2.01-2.64-.69-1.23-1.05-2.73-1.05-4.34 0-2.97 2.54-5.39 5.66-5.39s5.66 2.42 5.66 5.39c0 .28-.22.5-.5.5s-.5-.22-.5-.5c0-2.42-2.09-4.39-4.66-4.39-2.57 0-4.66 1.97-4.66 4.39 0 1.44.32 2.77.93 3.85.64 1.15 1.08 1.64 1.85 2.42.19.2.19.51 0 .71-.11.1-.24.15-.37.15zm7.17-1.85c-1.19 0-2.24-.3-3.1-.89-1.49-1.01-2.38-2.65-2.38-4.39 0-.28.22-.5.5-.5s.5.22.5.5c0 1.41.72 2.74 1.94 3.56.71.48 1.54.71 2.54.71.24 0 .64-.03 1.04-.1.27-.05.53.13.58.41.05.27-.13.53-.41.58-.57.11-1.07.12-1.21.12zM14.91 22c-.04 0-.09-.01-.13-.02-1.59-.44-2.63-1.03-3.72-2.1-1.4-1.39-2.17-3.24-2.17-5.22 0-1.62 1.38-2.94 3.08-2.94 1.7 0 3.08 1.32 3.08 2.94 0 1.07.93 1.94 2.08 1.94s2.08-.87 2.08-1.94c0-3.77-3.25-6.83-7.25-6.83-2.84 0-5.44 1.58-6.61 4.03-.39.81-.59 1.76-.59 2.8 0 .78.07 2.01.67 3.61.1.26-.03.55-.29.64-.26.1-.55-.04-.64-.29-.49-1.31-.73-2.61-.73-3.96 0-1.2.23-2.29.68-3.24 1.33-2.79 4.28-4.6 7.51-4.6 4.55 0 8.25 3.51 8.25 7.83 0 1.62-1.38 2.94-3.08 2.94s-3.08-1.32-3.08-2.94c0-1.07-.93-1.94-2.08-1.94s-2.08.87-2.08 1.94c0 1.71.66 3.31 1.87 4.51.95.94 1.86 1.46 3.27 1.85.27.07.42.35.35.61-.05.23-.26.38-.47.38z"/>
|
| 73 | </svg>
|
| 74 | <?=$lang['fido2']['fido2_auth'];?></legend>
|
| 75 | <div class="row">
|
| 76 | <div class="col-sm-3 col-xs-5 text-right"><?=$lang['fido2']['known_ids'];?>:</div>
|
| 77 | <div class="col-sm-9 col-xs-7">
|
| 78 | <div class="table-responsive">
|
| 79 | <table class="table table-striped table-hover table-condensed" id="fido2_keys">
|
| 80 | <tr>
|
| 81 | <th>ID</th>
|
| 82 | <th style="min-width:240px;text-align: right"><?=$lang['admin']['action'];?></th>
|
| 83 | </tr>
|
| 84 | <?php
|
| 85 | if (!empty($fido2_data)) {
|
| 86 | foreach ($fido2_data as $key_info) {
|
| 87 | ?>
|
| 88 | <tr>
|
| 89 | <td>
|
| 90 | <?=($_SESSION['fido2_cid'] == $key_info['cid']) ? '→ ' : NULL; ?><?=(!empty($key_info['fn']))?$key_info['fn']:$key_info['subject'];?>
|
| 91 | </td>
|
| 92 | <td style="min-width:240px;text-align: right">
|
| 93 | <form style="display:inline;" method="post">
|
| 94 | <input type="hidden" name="unset_fido2_key" value="<?=$key_info['cid'];?>" />
|
| 95 | <div class="btn-group">
|
| 96 | <a href="#" class="btn btn-xs btn-default" data-cid="<?=$key_info['cid'];?>" data-subject="<?=base64_encode($key_info['subject']);?>" data-toggle="modal" data-target="#fido2ChangeFn"><span class="glyphicon glyphicon-pencil"></span> <?=strtolower($lang['fido2']['rename']);?></a>
|
| 97 | <a href="#" onClick='return confirm("<?=$lang['admin']['ays'];?>")?$(this).closest("form").submit():"";' class="btn btn-xs btn-danger"><span class="glyphicon glyphicon-trash"></span> <?=strtolower($lang['admin']['remove']);?></a>
|
| 98 | </form>
|
| 99 | </div>
|
| 100 | </td>
|
| 101 | </tr>
|
| 102 | <?php
|
| 103 | }
|
| 104 | }
|
| 105 | ?>
|
| 106 | </table>
|
| 107 | </div>
|
| 108 | <br>
|
| 109 | </div>
|
| 110 | </div>
|
| 111 | <div class="row">
|
| 112 | <div class="col-sm-offset-3 col-sm-9">
|
| 113 | <button class="btn btn-sm btn-primary" id="register-fido2"><?=$lang['fido2']['set_fido2'];?></button>
|
| 114 | </div>
|
| 115 | </div>
|
| 116 | <br>
|
| 117 | <div class="row" id="status-fido2">
|
| 118 | <div class="col-sm-3 col-xs-5 text-right"><?=$lang['fido2']['register_status'];?>:</div>
|
| 119 | <div class="col-sm-9 col-xs-7">
|
| 120 | <div id="fido2-alerts">-</div>
|
| 121 | </div>
|
| 122 | <br>
|
| 123 | </div>
|
| 124 |
|
| 125 | </div>
|
| 126 | </div>
|
| 127 | </div>
|
| 128 | <?php
|
| 129 | }
|
| 130 | elseif (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == 'user') {
|
| 131 |
|
| 132 | /*
|
| 133 | / USER
|
| 134 | */
|
| 135 |
|
| 136 | require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php';
|
| 137 | $_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
|
| 138 | $username = $_SESSION['mailcow_cc_username'];
|
| 139 | $mailboxdata = mailbox('get', 'mailbox_details', $username);
|
| 140 | $pushover_data = pushover('get', $username);
|
| 141 |
|
| 142 | $clientconfigstr = "host=" . urlencode($mailcow_hostname) . "&email=" . urlencode($username) . "&name=" . urlencode($mailboxdata['name']) . "&ui=" . urlencode(strtok($_SERVER['HTTP_HOST'], ':')) . "&port=" . urlencode($autodiscover_config['caldav']['port']);
|
| 143 | if ($autodiscover_config['useEASforOutlook'] == 'yes')
|
| 144 | $clientconfigstr .= "&outlookEAS=1";
|
| 145 | if (file_exists('thunderbird-plugins/version.csv')) {
|
| 146 | $fh = fopen('thunderbird-plugins/version.csv', 'r');
|
| 147 | if ($fh) {
|
| 148 | while (($row = fgetcsv($fh, 1000, ';')) !== FALSE) {
|
| 149 | if ($row[0] == 'sogo-connector@inverse.ca') {
|
| 150 | $clientconfigstr .= "&connector=" . urlencode($row[1]);
|
| 151 | }
|
| 152 | }
|
| 153 | fclose($fh);
|
| 154 | }
|
| 155 | }
|
| 156 | ?>
|
| 157 | <div class="container">
|
| 158 |
|
| 159 | <!-- Nav tabs -->
|
| 160 | <ul class="nav nav-tabs" role="tablist">
|
| 161 | <li role="presentation" class="active"><a href="#userSettings" aria-controls="userSettings" role="tab" data-toggle="tab"><?=$lang['user']['mailbox_details'];?></a></li>
|
| 162 | <li role="presentation"><a href="#SpamAliases" aria-controls="SpamAliases" role="tab" data-toggle="tab"><?=$lang['user']['spam_aliases'];?></a></li>
|
| 163 | <li role="presentation"><a href="#Spamfilter" aria-controls="Spamfilter" role="tab" data-toggle="tab"><?=$lang['user']['spamfilter'];?></a></li>
|
| 164 | <li role="presentation"><a href="#Syncjobs" aria-controls="Syncjobs" role="tab" data-toggle="tab"><?=$lang['user']['sync_jobs'];?></a></li>
|
| 165 | <li role="presentation"><a href="#AppPasswds" aria-controls="AppPasswds" role="tab" data-toggle="tab"><?=$lang['user']['app_passwds'];?></a></li>
|
| 166 | <li role="presentation"><a href="#Pushover" aria-controls="Pushover" role="tab" data-toggle="tab">Pushover API</a></li>
|
| 167 | </ul>
|
| 168 | <hr>
|
| 169 |
|
| 170 | <div class="tab-content">
|
| 171 |
|
| 172 | <div role="tabpanel" class="tab-pane active" id="userSettings">
|
| 173 | <div class="panel panel-default">
|
| 174 | <div class="panel-heading"><?=$lang['user']['mailbox_details'];?></div>
|
| 175 | <div class="panel-body">
|
| 176 | <div class="row">
|
| 177 | <div class="col-sm-offset-3 col-sm-9">
|
| 178 | <?php if ($mailboxdata['attributes']['force_pw_update'] == "1"): ?>
|
| 179 | <div class="alert alert-danger"><?=$lang['user']['force_pw_update'];?></div>
|
| 180 | <?php endif; ?>
|
| 181 | <p><a href="#pwChangeModal" data-toggle="modal">[<?=$lang['user']['change_password'];?>]</a></p>
|
| 182 | <p><a target="_blank" href="https://mailcow.github.io/mailcow-dockerized-docs/client/#<?=$clientconfigstr;?>">[<?=$lang['user']['client_configuration'];?>]</a></p>
|
| 183 | <p><a href="#userFilterModal" data-toggle="modal">[<?=$lang['user']['show_sieve_filters'];?>]</a></p>
|
| 184 | <p><small>
|
| 185 | <?php
|
| 186 | if ($_SESSION['mailcow_cc_last_login']['remote']):
|
| 187 | ?>
|
| 188 | <span style="margin-right:10px" class="glyphicon glyphicon-log-in"></span> <span data-time="<?=$_SESSION['mailcow_cc_last_login']['time'];?>" class="last_login_date"></span> (<?=$_SESSION['mailcow_cc_last_login']['remote'];?>)
|
| 189 | <?php
|
| 190 | else: echo $lang['user']['no_last_login']; endif;
|
| 191 | ?>
|
| 192 | </small></p>
|
| 193 | </div>
|
| 194 | </div>
|
| 195 | <hr>
|
| 196 | <div class="row">
|
| 197 | <div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['apple_connection_profile'];?>:</div>
|
| 198 | <div class="col-md-9 col-xs-7">
|
| 199 | <p><span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span> <a href="/mobileconfig.php?only_email"><?=$lang['user']['email'];?></a> <small>IMAP, SMTP</small></p>
|
| 200 | <p class="help-block"><?=$lang['user']['apple_connection_profile_mailonly'];?></p>
|
| 201 | <?php if (getenv('SKIP_SOGO') != "y") { ?>
|
| 202 | <p><span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span> <a href="/mobileconfig.php"><?=$lang['user']['email_and_dav'];?></a> <small>IMAP, SMTP, Cal/CardDAV</small></p>
|
| 203 | <p class="help-block"><?=$lang['user']['apple_connection_profile_complete'];?></p>
|
| 204 | <?php } ?>
|
| 205 | </div>
|
| 206 | </div>
|
| 207 | <hr>
|
| 208 | <?php // Get user information about aliases
|
| 209 | $user_get_alias_details = user_get_alias_details($username);
|
| 210 | ?>
|
| 211 | <div class="row">
|
| 212 | <div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['direct_aliases'];?>:
|
| 213 | <p class="small"><?=$lang['user']['direct_aliases_desc'];?></p>
|
| 214 | </div>
|
| 215 | <div class="col-md-9 col-xs-7">
|
| 216 | <?php
|
| 217 | if ($user_get_alias_details['direct_aliases'] === false) {
|
| 218 | echo '✘';
|
| 219 | }
|
| 220 | else {
|
| 221 | foreach (array_filter($user_get_alias_details['direct_aliases']) as $direct_alias => $direct_alias_meta) {
|
| 222 | (!empty($direct_alias_meta['public_comment'])) ?
|
| 223 | printf('%s — <span class="bg-info">%s</span><br>', $direct_alias, $direct_alias_meta['public_comment']) :
|
| 224 | printf('%s<br>', $direct_alias);
|
| 225 | }
|
| 226 | }
|
| 227 | ?>
|
| 228 | </div>
|
| 229 | </div>
|
| 230 | <div class="row">
|
| 231 | <div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['shared_aliases'];?>:
|
| 232 | <p class="small"><?=$lang['user']['shared_aliases_desc'];?></p>
|
| 233 | </div>
|
| 234 | <div class="col-md-9 col-xs-7">
|
| 235 | <?php
|
| 236 | if ($user_get_alias_details['shared_aliases'] === false) {
|
| 237 | echo '✘';
|
| 238 | }
|
| 239 | else {
|
| 240 | foreach (array_filter($user_get_alias_details['shared_aliases']) as $shared_alias => $shared_alias_meta) {
|
| 241 | (!empty($shared_alias_meta['public_comment'])) ?
|
| 242 | printf('%s — <span class="bg-info">%s</span><br>', $shared_alias, $shared_alias_meta['public_comment']) :
|
| 243 |
|
| 244 | printf('%s<br>', $shared_alias);
|
| 245 | }
|
| 246 | }
|
| 247 | ?>
|
| 248 | </div>
|
| 249 | </div>
|
| 250 | <hr>
|
| 251 | <div class="row">
|
| 252 | <div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['aliases_also_send_as'];?>:</div>
|
| 253 | <div class="col-md-9 col-xs-7">
|
| 254 | <p><?=($user_get_alias_details['aliases_also_send_as'] == '*') ? $lang['user']['sender_acl_disabled'] : $user_get_alias_details['aliases_also_send_as'];?></p>
|
| 255 | </div>
|
| 256 | </div>
|
| 257 | <div class="row">
|
| 258 | <div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['aliases_send_as_all'];?>:</div>
|
| 259 | <div class="col-md-9 col-xs-7">
|
| 260 | <p><?=$user_get_alias_details['aliases_send_as_all'];?></p>
|
| 261 | </div>
|
| 262 | </div>
|
| 263 | <div class="row">
|
| 264 | <div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['is_catch_all'];?>:</div>
|
| 265 | <div class="col-md-9 col-xs-7">
|
| 266 | <p><?=$user_get_alias_details['is_catch_all'];?></p>
|
| 267 | </div>
|
| 268 | </div>
|
| 269 | <hr>
|
| 270 | <div class="row">
|
| 271 | <div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['in_use'];?>:</div>
|
| 272 | <div class="col-md-5 col-xs-7">
|
| 273 | <div class="progress">
|
| 274 | <div class="progress-bar progress-bar-<?=$mailboxdata['percent_class'];?>" role="progressbar" aria-valuenow="<?=$mailboxdata['percent_in_use'];?>" aria-valuemin="0" aria-valuemax="100" style="min-width:2em;width: <?=$mailboxdata['percent_in_use'];?>%;">
|
| 275 | <?=$mailboxdata['percent_in_use'];?>%
|
| 276 | </div>
|
| 277 | </div>
|
| 278 | <p><?=formatBytes($mailboxdata['quota_used'], 2);?> / <?=($mailboxdata['quota'] == 0) ? '∞' : formatBytes($mailboxdata['quota'], 2);?><br><?=$mailboxdata['messages'];?> <?=$lang['user']['messages'];?></p>
|
| 279 | </div>
|
| 280 | </div>
|
| 281 | <hr>
|
| 282 | <?php
|
| 283 | // Show tagging options
|
| 284 | $get_tagging_options = mailbox('get', 'delimiter_action', $username);
|
| 285 | ?>
|
| 286 | <div class="row">
|
| 287 | <div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['tag_handling'];?>:</div>
|
| 288 | <div class="col-md-9 col-xs-7">
|
| 289 | <div class="btn-group" data-acl="<?=$_SESSION['acl']['delimiter_action'];?>">
|
| 290 | <button type="button" class="btn btn-sm btn-default <?=($get_tagging_options == "subfolder") ? 'active' : null; ?>"
|
| 291 | data-action="edit_selected"
|
| 292 | data-item="<?= htmlentities($username); ?>"
|
| 293 | data-id="delimiter_action"
|
| 294 | data-api-url='edit/delimiter_action'
|
| 295 | data-api-attr='{"tagged_mail_handler":"subfolder"}'><?=$lang['user']['tag_in_subfolder'];?></button>
|
| 296 | <button type="button" class="btn btn-sm btn-default <?=($get_tagging_options == "subject") ? 'active' : null; ?>"
|
| 297 | data-action="edit_selected"
|
| 298 | data-item="<?= htmlentities($username); ?>"
|
| 299 | data-id="delimiter_action"
|
| 300 | data-api-url='edit/delimiter_action'
|
| 301 | data-api-attr='{"tagged_mail_handler":"subject"}'><?=$lang['user']['tag_in_subject'];?></button>
|
| 302 | <button type="button" class="btn btn-sm btn-default <?=($get_tagging_options == "none") ? 'active' : null; ?>"
|
| 303 | data-action="edit_selected"
|
| 304 | data-item="<?= htmlentities($username); ?>"
|
| 305 | data-id="delimiter_action"
|
| 306 | data-api-url='edit/delimiter_action'
|
| 307 | data-api-attr='{"tagged_mail_handler":"none"}'><?=$lang['user']['tag_in_none'];?></button>
|
| 308 | </div>
|
| 309 | <p class="help-block"><?=$lang['user']['tag_help_explain'];?></p>
|
| 310 | <p class="help-block"><?=$lang['user']['tag_help_example'];?></p>
|
| 311 | </div>
|
| 312 | </div>
|
| 313 | <?php
|
| 314 | // Show TLS policy options
|
| 315 | $get_tls_policy = mailbox('get', 'tls_policy', $username);
|
| 316 | ?>
|
| 317 | <div class="row">
|
| 318 | <div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['tls_policy'];?>:</div>
|
| 319 | <div class="col-md-9 col-xs-7">
|
| 320 | <div class="btn-group" data-acl="<?=$_SESSION['acl']['tls_policy'];?>">
|
| 321 | <button type="button" class="btn btn-sm btn-default <?=($get_tls_policy['tls_enforce_in'] == "1") ? "active" : null;?>"
|
| 322 | data-action="edit_selected"
|
| 323 | data-item="<?= htmlentities($username); ?>"
|
| 324 | data-id="tls_policy"
|
| 325 | data-api-url='edit/tls_policy'
|
| 326 | data-api-attr='{"tls_enforce_in":<?=($get_tls_policy['tls_enforce_in'] == "1") ? "0" : "1";?>}'><?=$lang['user']['tls_enforce_in'];?></button>
|
| 327 | <button type="button" class="btn btn-sm btn-default <?=($get_tls_policy['tls_enforce_out'] == "1") ? "active" : null;?>"
|
| 328 | data-action="edit_selected"
|
| 329 | data-item="<?= htmlentities($username); ?>"
|
| 330 | data-id="tls_policy"
|
| 331 | data-api-url='edit/tls_policy'
|
| 332 | data-api-attr='{"tls_enforce_out":<?=($get_tls_policy['tls_enforce_out'] == "1") ? "0" : "1";?>}'><?=$lang['user']['tls_enforce_out'];?></button>
|
| 333 | </div>
|
| 334 | <p class="help-block"><?=$lang['user']['tls_policy_warning'];?></p>
|
| 335 | </div>
|
| 336 | </div>
|
| 337 | <?php
|
| 338 | // Show quarantine_notification options
|
| 339 | $quarantine_notification = mailbox('get', 'quarantine_notification', $username);
|
| 340 | $quarantine_category = mailbox('get', 'quarantine_category', $username);
|
| 341 | ?>
|
| 342 | <div class="row">
|
| 343 | <div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['quarantine_notification'];?>:</div>
|
| 344 | <div class="col-md-9 col-xs-7">
|
| 345 | <div class="btn-group" data-acl="<?=$_SESSION['acl']['quarantine_notification'];?>">
|
| 346 | <button type="button" class="btn btn-sm btn-default <?=($quarantine_notification == "never") ? "active" : null;?>"
|
| 347 | data-action="edit_selected"
|
| 348 | data-item="<?= htmlentities($username); ?>"
|
| 349 | data-id="quarantine_notification"
|
| 350 | data-api-url='edit/quarantine_notification'
|
| 351 | data-api-attr='{"quarantine_notification":"never"}'><?=$lang['user']['never'];?></button>
|
| 352 | <button type="button" class="btn btn-sm btn-default <?=($quarantine_notification == "hourly") ? "active" : null;?>"
|
| 353 | data-action="edit_selected"
|
| 354 | data-item="<?= htmlentities($username); ?>"
|
| 355 | data-id="quarantine_notification"
|
| 356 | data-api-url='edit/quarantine_notification'
|
| 357 | data-api-attr='{"quarantine_notification":"hourly"}'><?=$lang['user']['hourly'];?></button>
|
| 358 | <button type="button" class="btn btn-sm btn-default <?=($quarantine_notification == "daily") ? "active" : null;?>"
|
| 359 | data-action="edit_selected"
|
| 360 | data-item="<?= htmlentities($username); ?>"
|
| 361 | data-id="quarantine_notification"
|
| 362 | data-api-url='edit/quarantine_notification'
|
| 363 | data-api-attr='{"quarantine_notification":"daily"}'><?=$lang['user']['daily'];?></button>
|
| 364 | <button type="button" class="btn btn-sm btn-default <?=($quarantine_notification == "weekly") ? "active" : null;?>"
|
| 365 | data-action="edit_selected"
|
| 366 | data-item="<?= htmlentities($username); ?>"
|
| 367 | data-id="quarantine_notification"
|
| 368 | data-api-url='edit/quarantine_notification'
|
| 369 | data-api-attr='{"quarantine_notification":"weekly"}'><?=$lang['user']['weekly'];?></button>
|
| 370 | </div>
|
| 371 | <p class="help-block"><?=$lang['user']['quarantine_notification_info'];?></p>
|
| 372 | </div>
|
| 373 | </div>
|
| 374 | <div class="row">
|
| 375 | <div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['quarantine_category'];?>:</div>
|
| 376 | <div class="col-md-9 col-xs-7">
|
| 377 | <div class="btn-group" data-acl="<?=$_SESSION['acl']['quarantine_category'];?>">
|
| 378 | <button type="button" class="btn btn-sm btn-default <?=($quarantine_category == "reject") ? "active" : null;?>"
|
| 379 | data-action="edit_selected"
|
| 380 | data-item="<?= htmlentities($username); ?>"
|
| 381 | data-id="quarantine_category"
|
| 382 | data-api-url='edit/quarantine_category'
|
| 383 | data-api-attr='{"quarantine_category":"reject"}'><?=$lang['user']['q_reject'];?></button>
|
| 384 | <button type="button" class="btn btn-sm btn-default <?=($quarantine_category == "add_header") ? "active" : null;?>"
|
| 385 | data-action="edit_selected"
|
| 386 | data-item="<?= htmlentities($username); ?>"
|
| 387 | data-id="quarantine_category"
|
| 388 | data-api-url='edit/quarantine_category'
|
| 389 | data-api-attr='{"quarantine_category":"add_header"}'><?=$lang['user']['q_add_header'];?></button>
|
| 390 | <button type="button" class="btn btn-sm btn-default <?=($quarantine_category == "all") ? "active" : null;?>"
|
| 391 | data-action="edit_selected"
|
| 392 | data-item="<?= htmlentities($username); ?>"
|
| 393 | data-id="quarantine_category"
|
| 394 | data-api-url='edit/quarantine_category'
|
| 395 | data-api-attr='{"quarantine_category":"all"}'><?=$lang['user']['q_all'];?></button>
|
| 396 | </div>
|
| 397 | <p class="help-block"><?=$lang['user']['quarantine_category_info'];?></p>
|
| 398 | </div>
|
| 399 | </div>
|
| 400 | <?php if (getenv('SKIP_SOGO') != "y") { ?>
|
| 401 | <hr>
|
| 402 | <div class="row">
|
| 403 | <div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['eas_reset'];?>:</div>
|
| 404 | <div class="col-md-9 col-xs-7">
|
| 405 | <button class="btn btn-xs btn-default" data-acl="<?=$_SESSION['acl']['eas_reset'];?>" data-action="delete_selected" data-text="<?=$lang['user']['eas_reset'];?>?" data-item="<?= htmlentities($username); ?>" data-id="eas_cache" data-api-url='delete/eas_cache' href="#"><?=$lang['user']['eas_reset_now'];?></button>
|
| 406 | <p class="help-block"><?=$lang['user']['eas_reset_help'];?></p>
|
| 407 | </div>
|
| 408 | </div>
|
| 409 | <div class="row">
|
| 410 | <div class="col-md-3 col-xs-5 text-right"><?=$lang['user']['sogo_profile_reset'];?>:</div>
|
| 411 | <div class="col-md-9 col-xs-7">
|
| 412 | <button class="btn btn-xs btn-default" data-acl="<?=$_SESSION['acl']['sogo_profile_reset'];?>" data-action="delete_selected" data-text="<?=$lang['user']['sogo_profile_reset'];?>?" data-item="<?= htmlentities($username); ?>" data-id="sogo_profile" data-api-url='delete/sogo_profile' href="#"><?=$lang['user']['sogo_profile_reset_now'];?></button>
|
| 413 | <p class="help-block"><?=$lang['user']['sogo_profile_reset_help'];?></p>
|
| 414 | </div>
|
| 415 | </div>
|
| 416 | <?php } ?>
|
| 417 | </div>
|
| 418 | </div>
|
| 419 | </div>
|
| 420 |
|
| 421 | <div role="tabpanel" class="tab-pane" id="SpamAliases">
|
| 422 | <div class="row">
|
| 423 | <div class="col-md-12 col-sm-12 col-xs-12">
|
| 424 | <div class="table-responsive">
|
| 425 | <table class="table table-striped" id="tla_table"></table>
|
| 426 | </div>
|
| 427 | </div>
|
| 428 | </div>
|
| 429 | <div class="mass-actions-user">
|
| 430 | <div class="btn-group" data-acl="<?=$_SESSION['acl']['spam_alias'];?>">
|
| 431 | <div class="btn-group">
|
| 432 | <a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="tla" href="#"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> <?=$lang['mailbox']['toggle_all'];?></a>
|
| 433 | <a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
|
| 434 | <ul class="dropdown-menu">
|
| 435 | <li><a data-action="edit_selected" data-id="tla" data-api-url='edit/time_limited_alias' data-api-attr='{"validity":"1"}' href="#"><?=$lang['user']['expire_in'];?> 1 <?=$lang['user']['hour'];?></a></li>
|
| 436 | <li><a data-action="edit_selected" data-id="tla" data-api-url='edit/time_limited_alias' data-api-attr='{"validity":"6"}' href="#"><?=$lang['user']['expire_in'];?> 6 <?=$lang['user']['hours'];?></a></li>
|
| 437 | <li><a data-action="edit_selected" data-id="tla" data-api-url='edit/time_limited_alias' data-api-attr='{"validity":"24"}' href="#"><?=$lang['user']['expire_in'];?> 1 <?=$lang['user']['day'];?></a></li>
|
| 438 | <li><a data-action="edit_selected" data-id="tla" data-api-url='edit/time_limited_alias' data-api-attr='{"validity":"168"}' href="#"><?=$lang['user']['expire_in'];?> 1 <?=$lang['user']['week'];?></a></li>
|
| 439 | <li><a data-action="edit_selected" data-id="tla" data-api-url='edit/time_limited_alias' data-api-attr='{"validity":"672"}' href="#"><?=$lang['user']['expire_in'];?> 4 <?=$lang['user']['weeks'];?></a></li>
|
| 440 | <li role="separator" class="divider"></li>
|
| 441 | <li><a data-action="delete_selected" data-id="tla" data-api-url='delete/time_limited_alias' href="#"><?=$lang['mailbox']['remove'];?></a></li>
|
| 442 | </ul>
|
| 443 | </div>
|
| 444 | <div class="btn-group">
|
| 445 | <a class="btn btn-sm btn-success dropdown-toggle" data-toggle="dropdown" href="#"><span class="glyphicon glyphicon-plus"></span> <?=$lang['user']['alias_create_random'];?> <span class="caret"></span></a>
|
| 446 | <ul class="dropdown-menu">
|
| 447 | <li><a data-action="add_item" data-api-url='add/time_limited_alias' data-api-attr='{"validity":"1"}' href="#">1 <?=$lang['user']['hour'];?></a></li>
|
| 448 | <li><a data-action="add_item" data-api-url='add/time_limited_alias' data-api-attr='{"validity":"6"}' href="#">6 <?=$lang['user']['hours'];?></a></li>
|
| 449 | <li><a data-action="add_item" data-api-url='add/time_limited_alias' data-api-attr='{"validity":"24"}' href="#">1 <?=$lang['user']['day'];?></a></li>
|
| 450 | <li><a data-action="add_item" data-api-url='add/time_limited_alias' data-api-attr='{"validity":"168"}' href="#">1 <?=$lang['user']['week'];?></a></li>
|
| 451 | <li><a data-action="add_item" data-api-url='add/time_limited_alias' data-api-attr='{"validity":"672"}' href="#">4 <?=$lang['user']['weeks'];?></a></li>
|
| 452 | </ul>
|
| 453 | </div>
|
| 454 | </div>
|
| 455 | </div>
|
| 456 | </div>
|
| 457 |
|
| 458 | <div role="tabpanel" class="tab-pane" id="Spamfilter">
|
| 459 | <h4><?=$lang['user']['spamfilter_behavior'];?></h4>
|
| 460 | <form class="form-horizontal" role="form" data-id="spam_score" method="post">
|
| 461 | <div class="form-group">
|
| 462 | <div class="col-lg-6 col-sm-12">
|
| 463 | <input data-acl="<?=$_SESSION['acl']['spam_score'];?>" name="spam_score" id="spam_score" type="text" style="width: 100%;"
|
| 464 | data-provide="slider"
|
| 465 | data-slider-min="1"
|
| 466 | data-slider-max="2000"
|
| 467 | data-slider-scale='logarithmic'
|
| 468 | data-slider-step="0.5"
|
| 469 | data-slider-range="true"
|
| 470 | data-slider-tooltip='always'
|
| 471 | data-slider-id="slider1"
|
| 472 | data-slider-value="[<?=mailbox('get', 'spam_score', $username);?>]"
|
| 473 | data-slider-step="1" />
|
| 474 | <br /><br />
|
| 475 | <ul>
|
| 476 | <li><?=$lang['user']['spamfilter_green'];?></li>
|
| 477 | <li><?=$lang['user']['spamfilter_yellow'];?></li>
|
| 478 | <li><?=$lang['user']['spamfilter_red'];?></li>
|
| 479 | </ul>
|
| 480 | <p><?=$lang['user']['spamfilter_hint'];?></p>
|
| 481 | </div>
|
| 482 | </div>
|
| 483 | <div class="form-group">
|
| 484 | <div class="col-sm-10">
|
| 485 | </div>
|
| 486 | <div class="btn-group" data-acl="<?=$_SESSION['acl']['spam_policy'];?>">
|
| 487 | <a type="button" class="btn btn-sm btn-success" data-action="edit_selected"
|
| 488 | data-item="<?= htmlentities($username); ?>"
|
| 489 | data-id="spam_score"
|
| 490 | data-api-url='edit/spam-score'
|
| 491 | data-api-attr='{}'><?=$lang['user']['save_changes'];?></a>
|
| 492 | <a type="button" class="btn btn-sm btn-default" data-action="edit_selected"
|
| 493 | data-item="<?= htmlentities($username); ?>"
|
| 494 | data-id="spam_score_reset"
|
| 495 | data-api-url='edit/spam-score'
|
| 496 | data-api-attr='{"spam_score":"default"}'><?=$lang['user']['spam_score_reset'];?></a>
|
| 497 | </div>
|
| 498 | </div>
|
| 499 | </form>
|
| 500 | <hr>
|
| 501 | <div class="row">
|
| 502 | <div class="col-sm-6">
|
| 503 | <h4><?=$lang['user']['spamfilter_wl'];?></h4>
|
| 504 | <p><?=$lang['user']['spamfilter_wl_desc'];?></p>
|
| 505 | <div class="table-responsive">
|
| 506 | <table class="table table-striped table-condensed" id="wl_policy_mailbox_table"></table>
|
| 507 | </div>
|
| 508 |
|
| 509 | <div class="mass-actions-user">
|
| 510 | <div class="btn-group" data-acl="<?=$_SESSION['acl']['spam_policy'];?>">
|
| 511 | <a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="policy_wl_mailbox" href="#"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> <?=$lang['mailbox']['toggle_all'];?></a>
|
| 512 | <a class="btn btn-sm btn-danger" data-action="delete_selected" data-id="policy_wl_mailbox" data-api-url='delete/mailbox-policy' href="#"><?=$lang['mailbox']['remove'];?></a></li>
|
| 513 | </div>
|
| 514 | </div>
|
| 515 | <form class="form-inline" data-id="add_wl_policy_mailbox">
|
| 516 | <div class="input-group" data-acl="<?=$_SESSION['acl']['spam_policy'];?>">
|
| 517 | <input type="text" class="form-control" name="object_from" placeholder="*@example.org" required>
|
| 518 | <span class="input-group-btn">
|
| 519 | <button class="btn btn-default" data-action="add_item" data-id="add_wl_policy_mailbox" data-api-url='add/mailbox-policy' data-api-attr='{"username":<?= json_encode($username); ?>,"object_list":"wl"}' href="#"><span class="glyphicon glyphicon-plus"></span> <?=$lang['user']['spamfilter_table_add'];?></button>
|
| 520 | </span>
|
| 521 | </div>
|
| 522 | </form>
|
| 523 | </div>
|
| 524 | <div class="col-sm-6">
|
| 525 | <h4><?=$lang['user']['spamfilter_bl'];?></h4>
|
| 526 | <p><?=$lang['user']['spamfilter_bl_desc'];?></p>
|
| 527 | <div class="table-responsive">
|
| 528 | <table class="table table-striped table-condensed" id="bl_policy_mailbox_table"></table>
|
| 529 | </div>
|
| 530 |
|
| 531 | <div class="mass-actions-user">
|
| 532 | <div class="btn-group" data-acl="<?=$_SESSION['acl']['spam_policy'];?>">
|
| 533 | <a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="policy_bl_mailbox" href="#"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> <?=$lang['mailbox']['toggle_all'];?></a>
|
| 534 | <a class="btn btn-sm btn-danger" data-action="delete_selected" data-id="policy_bl_mailbox" data-api-url='delete/mailbox-policy' href="#"><?=$lang['mailbox']['remove'];?></a></li>
|
| 535 | </div>
|
| 536 | </div>
|
| 537 | <form class="form-inline" data-id="add_bl_policy_mailbox">
|
| 538 | <div class="input-group" data-acl="<?=$_SESSION['acl']['spam_policy'];?>">
|
| 539 | <input type="text" class="form-control" name="object_from" placeholder="*@example.org" required>
|
| 540 | <span class="input-group-btn">
|
| 541 | <button class="btn btn-default" data-action="add_item" data-id="add_bl_policy_mailbox" data-api-url='add/mailbox-policy' data-api-attr='{"username":<?= json_encode($username); ?>,"object_list":"bl"}' href="#"><span class="glyphicon glyphicon-plus"></span> <?=$lang['user']['spamfilter_table_add'];?></button>
|
| 542 | </span>
|
| 543 | </div>
|
| 544 | </form>
|
| 545 |
|
| 546 | </div>
|
| 547 | </div>
|
| 548 | </div>
|
| 549 |
|
| 550 | <div role="tabpanel" class="tab-pane" id="Syncjobs">
|
| 551 | <div class="table-responsive">
|
| 552 | <table class="table table-striped" id="sync_job_table"></table>
|
| 553 | </div>
|
| 554 | <div class="mass-actions-user">
|
| 555 | <div class="btn-group" data-acl="<?=$_SESSION['acl']['syncjobs'];?>">
|
| 556 | <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>
|
| 557 | <a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
|
| 558 | <ul class="dropdown-menu">
|
| 559 | <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>
|
| 560 | <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>
|
| 561 | <li role="separator" class="divider"></li>
|
| 562 | <li><a data-action="delete_selected" data-id="syncjob" data-api-url='delete/syncjob' href="#"><?=$lang['mailbox']['remove'];?></a></li>
|
| 563 | </ul>
|
| 564 | <a class="btn btn-sm btn-success" href="#" data-toggle="modal" data-target="#addSyncJobModal"><span class="glyphicon glyphicon-plus"></span> <?=$lang['user']['create_syncjob'];?></a>
|
| 565 | </div>
|
| 566 | </div>
|
| 567 | </div>
|
| 568 |
|
| 569 | <div role="tabpanel" class="tab-pane" id="Pushover">
|
| 570 | <form data-id="pushover" class="form well" method="post">
|
| 571 | <input type="hidden" value="0" name="evaluate_x_prio">
|
| 572 | <input type="hidden" value="0" name="only_x_prio">
|
| 573 | <input type="hidden" value="0" name="active">
|
| 574 | <div class="row">
|
| 575 | <div class="col-sm-1">
|
| 576 | <p class="help-block"><a href="https://pushover.net" target="_blank"><img src="data:image/png;base64,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" class="img img-fluid"></a></p>
|
| 577 | </div>
|
| 578 | <div class="col-sm-10">
|
| 579 | <p class="help-block"><?=sprintf($lang['user']['pushover_info'], $username);?></p>
|
| 580 | <p class="help-block"><?=$lang['user']['pushover_vars'];?>: <code>{SUBJECT}</code>, <code>{SENDER}</code></p>
|
| 581 | <div class="form-group">
|
| 582 | <div class="row">
|
| 583 | <div class="col-sm-6">
|
| 584 | <div class="form-group">
|
| 585 | <label for="token">API Token/Key (Application)</label>
|
| 586 | <input type="text" class="form-control" name="token" maxlength="30" value="<?=$pushover_data['token'];?>" required>
|
| 587 | </div>
|
| 588 | </div>
|
| 589 | <div class="col-sm-6">
|
| 590 | <div class="form-group">
|
| 591 | <label for="key">User/Group Key</label>
|
| 592 | <input type="text" class="form-control" name="key" maxlength="30" value="<?=$pushover_data['key'];?>" required>
|
| 593 | </div>
|
| 594 | </div>
|
| 595 | <div class="col-sm-6">
|
| 596 | <div class="form-group">
|
| 597 | <label for="title"><?=$lang['user']['pushover_title'];?></label>
|
| 598 | <input type="text" class="form-control" name="title" value="<?=$pushover_data['title'];?>" placeholder="Mail">
|
| 599 | </div>
|
| 600 | </div>
|
| 601 | <div class="col-sm-6">
|
| 602 | <div class="form-group">
|
| 603 | <label for="text"><?=$lang['user']['pushover_text'];?></label>
|
| 604 | <input type="text" class="form-control" name="text" value="<?=$pushover_data['text'];?>" placeholder="You've got mail 📧">
|
| 605 | </div>
|
| 606 | </div>
|
| 607 | <div class="col-sm-12">
|
| 608 | <div class="form-group">
|
| 609 | <label for="text"><?=$lang['user']['pushover_sender_array'];?></label>
|
| 610 | <input type="text" class="form-control" name="senders" value="<?=$pushover_data['senders'];?>" placeholder="sender1@example.com, sender2@example.com">
|
| 611 | </div>
|
| 612 | </div>
|
| 613 | <div class="col-sm-12">
|
| 614 | <div class="checkbox">
|
| 615 | <label><input type="checkbox" value="1" name="active" <?=($pushover_data['active']=="1") ? "checked" : null;?>> <?=$lang['user']['active'];?></label>
|
| 616 | </div>
|
| 617 | </div>
|
| 618 | <div class="col-sm-12">
|
| 619 | <legend style="cursor:pointer;margin-top:10px" data-target="#po_advanced" class="arrow-toggle" unselectable="on" data-toggle="collapse">
|
| 620 | <span style="font-size:12px" class="arrow rotate glyphicon glyphicon-menu-down"></span> <?=$lang['user']['advanced_settings'];?>
|
| 621 | </legend>
|
| 622 | </div>
|
| 623 | <div class="col-sm-12">
|
| 624 | <div id="po_advanced" class="collapse">
|
| 625 | <div class="form-group">
|
| 626 | <label for="text"><?=$lang['user']['pushover_sender_regex'];?></label>
|
| 627 | <input type="text" class="form-control" name="senders_regex" value="<?=$pushover_data['senders_regex'];?>" placeholder="/(.*@example\.org$|^foo@example\.com$)/i" regex="true">
|
| 628 | <div class="checkbox">
|
| 629 | <label><input type="checkbox" value="1" name="evaluate_x_prio" <?=($pushover_data['attributes']['evaluate_x_prio']=="1") ? "checked" : null;?>> <?=$lang['user']['pushover_evaluate_x_prio'];?></label>
|
| 630 | </div>
|
| 631 | <div class="checkbox">
|
| 632 | <label><input type="checkbox" value="1" name="only_x_prio" <?=($pushover_data['attributes']['only_x_prio']=="1") ? "checked" : null;?>> <?=$lang['user']['pushover_only_x_prio'];?></label>
|
| 633 | </div>
|
| 634 | </div>
|
| 635 | </div>
|
| 636 | </div>
|
| 637 | </div>
|
| 638 | </div>
|
| 639 | <div class="btn-group" data-acl="<?=$_SESSION['acl']['pushover'];?>">
|
| 640 | <a class="btn btn-sm btn-default" data-action="edit_selected" data-id="pushover" data-item="<?=htmlspecialchars($username);?>" data-api-url='edit/pushover' data-api-attr='{}' href="#"><?=$lang['user']['save'];?></a>
|
| 641 | <a class="btn btn-sm btn-default" data-action="edit_selected" data-id="pushover-test" data-item="<?=htmlspecialchars($username);?>" data-api-url='edit/pushover-test' data-api-attr='{}' href="#"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> <?=$lang['user']['pushover_verify'];?></a>
|
| 642 | <a id="pushover_delete" class="btn btn-sm btn-danger" data-action="edit_selected" data-id="pushover-delete" data-item="<?=htmlspecialchars($username);?>" data-api-url='edit/pushover' data-api-attr='{"delete":"true"}' href="#"><span class="glyphicon glyphicon-trash" aria-hidden="true"></span> <?=$lang['user']['remove'];?></a>
|
| 643 | </div>
|
| 644 | </div>
|
| 645 | </div>
|
| 646 | </form>
|
| 647 | </div>
|
| 648 |
|
| 649 | <div role="tabpanel" class="tab-pane" id="AppPasswds">
|
| 650 | <p><?=$lang['user']['app_hint'];?></p>
|
| 651 | <div class="table-responsive">
|
| 652 | <table class="table table-striped" id="app_passwd_table"></table>
|
| 653 | </div>
|
| 654 | <div class="mass-actions-user">
|
| 655 | <div class="btn-group" data-acl="<?=$_SESSION['acl']['app_passwds'];?>">
|
| 656 | <a class="btn btn-sm btn-default" id="toggle_multi_select_all" data-id="apppasswd" href="#"><span class="glyphicon glyphicon-check" aria-hidden="true"></span> <?=$lang['mailbox']['toggle_all'];?></a>
|
| 657 | <a class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown" href="#"><?=$lang['mailbox']['quick_actions'];?> <span class="caret"></span></a>
|
| 658 | <ul class="dropdown-menu">
|
| 659 | <li><a data-action="edit_selected" data-id="apppasswd" data-api-url='edit/app-passwd' data-api-attr='{"active":"1"}' href="#"><?=$lang['mailbox']['activate'];?></a></li>
|
| 660 | <li><a data-action="edit_selected" data-id="apppasswd" data-api-url='edit/app-passwd' data-api-attr='{"active":"0"}' href="#"><?=$lang['mailbox']['deactivate'];?></a></li>
|
| 661 | <li role="separator" class="divider"></li>
|
| 662 | <li><a data-action="delete_selected" data-id="apppasswd" data-api-url='delete/app-passwd' href="#"><?=$lang['mailbox']['remove'];?></a></li>
|
| 663 | </ul>
|
| 664 | <a class="btn btn-sm btn-success" href="#" data-toggle="modal" data-target="#addAppPasswdModal"><span class="glyphicon glyphicon-plus"></span> <?=$lang['user']['create_app_passwd'];?></a>
|
| 665 | </div>
|
| 666 | </div>
|
| 667 | </div>
|
| 668 |
|
| 669 | </div>
|
| 670 |
|
| 671 | </div><!-- /container -->
|
| 672 | <div style="margin-bottom:200px;"></div>
|
| 673 | <?php
|
| 674 | }
|
| 675 | if (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] != 'admin') {
|
| 676 | require_once $_SERVER['DOCUMENT_ROOT'] . '/modals/user.php';
|
| 677 | ?>
|
| 678 | <script type='text/javascript'>
|
| 679 | <?php
|
| 680 | $lang_user = json_encode($lang['user']);
|
| 681 | echo "var lang = ". $lang_user . ";\n";
|
| 682 | echo "var acl = '". json_encode($_SESSION['acl']) . "';\n";
|
| 683 | echo "var csrf_token = '". $_SESSION['CSRF']['TOKEN'] . "';\n";
|
| 684 | echo "var mailcow_cc_username = '". $_SESSION['mailcow_cc_username'] . "';\n";
|
| 685 | echo "var pagination_size = '". $PAGINATION_SIZE . "';\n";
|
| 686 | ?>
|
| 687 | </script>
|
| 688 | <?php
|
| 689 | $js_minifier->add('/web/js/site/user.js');
|
| 690 | $js_minifier->add('/web/js/site/pwgen.js');
|
| 691 | require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/footer.inc.php';
|
| 692 | }
|
| 693 | else {
|
| 694 | header('Location: /');
|
| 695 | exit();
|
| 696 | }
|
| 697 | ?>
|