add_mail_acc.php 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <!-- Begin toolbar -->
  2. <div class="toolbar">
  3. <div class="toolbar-inner">
  4. <div class="toolbar-buttons">
  5. <a class="button button-secondary" id="btn-back" href="/list/mail/?domain=<?=htmlentities(trim($v_domain, "'"))?>&token=<?=$_SESSION['token']?>"><i class="fas fa-arrow-left status-icon blue"></i><?=_('Back');?></a>
  6. </div>
  7. <div class="toolbar-buttons">
  8. <a href="#" class="button" data-action="submit" data-id="vstobjects"><i class="fas fa-floppy-disk status-icon purple"></i><?=_('Save');?></a>
  9. </div>
  10. </div>
  11. </div>
  12. <!-- End toolbar -->
  13. <div class="l-center animate__animated animate__fadeIn">
  14. <form id="vstobjects" name="v_add_mail_acc" method="post">
  15. <input type="hidden" name="token" value="<?=$_SESSION['token']?>">
  16. <input type="hidden" name="ok_acc" value="add">
  17. <div class="form-container form-container-wide">
  18. <h1 class="form-title"><?=_('Adding Mail Account');?></h1>
  19. <?php show_alert_message($_SESSION);?>
  20. <div class="sidebar-container">
  21. <div>
  22. <div class="u-mb10">
  23. <label for="v_domain" class="form-label"><?=_('Domain');?></label>
  24. <input type="text" class="form-control" name="v_domain" id="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>" disabled>
  25. <input type="hidden" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
  26. </div>
  27. <div class="u-mb10">
  28. <label for="v_account" class="form-label"><?=_('Account');?></label>
  29. <input type="text" class="form-control" name="v_account" id="v_account" value="<?=htmlentities(trim($v_account, "'"))?>">
  30. </div>
  31. <div class="u-mb10">
  32. <label for="v_password" class="form-label">
  33. <?=_('Password');?>
  34. <a href="javascript:applyRandomString();" title="<?=_('generate');?>" class="u-ml5"><i class="fas fa-arrows-rotate status-icon green icon-large"></i></a>
  35. </label>
  36. <div class="u-pos-relative u-mb10">
  37. <input type="text" class="form-control js-password-input" name="v_password" id="v_password">
  38. <meter max="4" class="password-meter"></meter>
  39. </div>
  40. </div>
  41. <p class="u-mb10"><?=_('Your password must have at least');?>:</p>
  42. <ul class="u-list-bulleted">
  43. <li><?=_('8 characters long');?></li>
  44. <li><?=_('1 uppercase & 1 lowercase character');?></li>
  45. <li><?=_('1 number');?></li>
  46. </ul>
  47. <div class="u-pt18 u-mb20">
  48. <a href="javascript:elementHideShow('advtable');" class="button button-secondary"><?=_('Advanced options');?></a>
  49. </div>
  50. <div id="advtable" style="display:<?php if (empty($v_adv)) echo 'none';?> ;">
  51. <div class="u-mb10">
  52. <label for="v_quota" class="form-label">
  53. <?=_('Quota');?> <span class="optional">(<?=_('in megabytes');?>)</span>
  54. </label>
  55. <div class="u-pos-relative">
  56. <input type="text" class="form-control" name="v_quota" id="v_quota" value="<?=htmlentities(trim($v_quota, "'"))?>">
  57. <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited');?>"></i>
  58. </div>
  59. </div>
  60. <div class="u-mb10">
  61. <label for="v_aliases" class="form-label">
  62. <?=_('Aliases');?> <span class="optional">(<?=_('use local-part');?>)</span>
  63. </label>
  64. <textarea class="form-control" name="v_aliases" id="v_aliases"><?=htmlentities(trim($v_aliases, "'"))?></textarea>
  65. </div>
  66. <div class="u-mb10">
  67. <label for="v_fwd" class="form-label">
  68. <?=_('Forward to');?> <span class="optional">(<?=_('one or more email addresses');?>)</span>
  69. </label>
  70. <textarea class="form-control" name="v_fwd" id="v_fwd" <?php if($v_blackhole == 'yes') echo "disabled";?>><?=htmlentities(trim($v_fwd, "'"))?></textarea>
  71. </div>
  72. <div class="form-check">
  73. <input class="form-check-input" type="checkbox" name="v_blackhole" id="v_blackhole" <?php if ($v_blackhole == 'yes') echo 'checked' ?>>
  74. <label for="v_blackhole">
  75. <?=_('Discard all mail');?>
  76. </label>
  77. </div>
  78. <div id="id_fwd_for" style="display:<?php if ($v_blackhole == 'yes') {echo 'none';} else {echo 'block';}?> ;">
  79. <div class="form-check">
  80. <input class="form-check-input" type="checkbox" name="v_fwd_only" id="v_fwd_for" <?php if ($v_fwd_only == 'yes') echo 'checked' ?>>
  81. <label for="v_fwd_for">
  82. <?=_('Do not store forwarded mail');?>
  83. </label>
  84. </div>
  85. </div>
  86. <div class="u-mt10 u-mb10">
  87. <label for="v_rate" class="form-label">
  88. <?=_('Rate limit');?> <span class="optional">(<?=_('Email / hour');?>)</span>
  89. </label>
  90. <input type="text" class="form-control" name="v_rate" id="v_rate" value="<?=htmlentities(trim($v_rate, "'"))?>" <?php if($_SESSION['userContext'] != "admin"){ echo "disabled";}?>>
  91. </div>
  92. </div>
  93. <div class="u-mt15 u-mb20">
  94. <label for="v_send_email" class="form-label">
  95. <?=_('Send login credentials to email address') ?>
  96. </label>
  97. <input type="email" class="form-control" name="v_send_email" id="v_send_email" value="<?=htmlentities(trim($v_send_email, "'"))?>">
  98. <input type="hidden" name="v_credentials" class="js-hidden-credentials">
  99. </div>
  100. </div>
  101. <div>
  102. <div class="mail-infoblock">
  103. <table>
  104. <tr><td colspan="2"><strong><?=strtoupper(_('Common account settings'));?></strong></td><tr>
  105. <tr><td><?=_('Username');?>: </td><td><span class="js-account-output">example</span>@<?=htmlentities(trim($v_domain, "'"))?></td></tr>
  106. <tr><td><?=_('Password');?>: </td><td><span class="js-password-output"></span></td></tr>
  107. <?php if ($_SESSION['WEBMAIL_SYSTEM']) {?><tr><td><?=_('Webmail');?>: </td><td><a href="http://<?=htmlentities($v_webmail_alias)?>" target="_blank">http://<?=htmlentities($v_webmail_alias)?></a></td></tr>
  108. <?php } ?>
  109. <tr><td><?=_('Hostname');?>: </td><td>mail.<?=htmlentities($v_domain)?></td></tr>
  110. <tr><td colspan="2"><strong><?=strtoupper(_('IMAP settings'));?></strong></td></tr>
  111. <tr><td><?=_('Authentication');?>: </td><td> <?=_('Normal password');?></td></tr>
  112. <tr><td><?=_('SSL/TLS');?>: </td><td><?=_('Port');?> 993
  113. <tr><td><?=_('STARTTLS');?>: </td><td><?=_('Port');?> 143
  114. <tr><td><?=_('No encryption');?>: </td><td><?=_('Port');?> 143
  115. <tr><td colspan="2"><strong><?=strtoupper(_('POP3 settings'));?></strong></td></tr>
  116. <tr><td><?=_('Authentication');?>: </td><td> <?=_('Normal password');?></td></tr>
  117. <tr><td><?=_('SSL/TLS');?>: </td><td><?=_('Port');?> 995
  118. <tr><td><?=_('STARTTLS');?>: </td><td><?=_('Port');?> 110
  119. <tr><td><?=_('No encryption');?>: </td><td><?=_('Port');?> 110
  120. <tr><td colspan="2"><strong><?=strtoupper(_('SMTP settings'));?></strong></td></tr>
  121. <tr><td><?=_('Authentication');?>: </td><td> <?=_('Normal password');?></td></tr>
  122. <tr><td><?=_('SSL/TLS');?>: </td><td><?=_('Port');?> 465
  123. <tr><td><?=_('STARTTLS');?>: </td><td><?=_('Port');?> 587
  124. <tr><td><?=_('No encryption');?>: </td><td><?=_('Port');?> 25
  125. </table>
  126. </div>
  127. </div>
  128. </div>
  129. </div>
  130. </form>
  131. </div>