add_mail.html 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <!-- Begin toolbar -->
  2. <div class="l-sort">
  3. <div class="l-sort__inner">
  4. <div class="l-unit-toolbar__buttonstrip">
  5. <a class="button button-secondary" id="btn-back" href="/list/mail/"><i class="fas fa-arrow-left status-icon blue"></i><?=_('Back');?></a>
  6. </div>
  7. <div class="l-unit-toolbar__buttonstrip">
  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" method="post">
  15. <input type="hidden" name="token" value="<?=$_SESSION['token']?>">
  16. <input type="hidden" name="ok" value="Add">
  17. <div class="form-container">
  18. <h1 class="form-title"><?=_('Adding Mail Domain');?></h1>
  19. <?php show_alert_message($_SESSION);?>
  20. <?php if (($user_plain == 'admin') && (($_GET['accept'] !== "true"))) {?>
  21. <div class="alert alert-danger alert-with-icon" role="alert">
  22. <i class="fas fa-exclamation"></i>
  23. <p><?=_('Avoid adding web domains on admin account');?></p>
  24. </div>
  25. <?php } ?>
  26. <?php if (($user_plain == 'admin') && (empty($_GET['accept']))) {?>
  27. <div class="u-side-by-side u-pt18">
  28. <a href="/add/user/" class="button u-width-full u-mr10"><?=_('Add User');?></a>
  29. <a href="/add/mail/?accept=true" class="button button-danger u-width-full u-ml10"><?=_('Continue');?></a>
  30. </div>
  31. <?php } ?>
  32. <?php if (($user_plain == 'admin') && (($_GET['accept'] === "true")) || ($user_plain !== "admin")) {?>
  33. <div class="u-mb20">
  34. <label for="v_domain" class="form-label"><?=_('Domain');?></label>
  35. <input type="text" class="form-control" name="v_domain" id="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
  36. </div>
  37. <?php if($_SESSION['WEBMAIL_SYSTEM']){?>
  38. <div class="u-mb20">
  39. <label for="v_webmail" class="form-label"><?=_('Webmail Client');?></label>
  40. <select class="form-select" name="v_webmail" id="v_webmail" tabindex="6">
  41. <?php foreach ($webmail_clients as $client){
  42. echo "\t\t\t\t<option value=\"".htmlentities($client)."\"";
  43. if (( $v_webmail == $client )) {
  44. echo ' selected' ;
  45. }
  46. echo ">".htmlentities(ucfirst($client))."</option>\n";
  47. }
  48. ?>
  49. <option value="" <?php if (empty($v_webmail) || $v_webmail == 'disabled' ){ echo "selected";}?>><?=_('Disabled');?></option>
  50. </select>
  51. </div>
  52. <?php } ?>
  53. <?php if (!empty($_SESSION['ANTISPAM_SYSTEM'])) {?>
  54. <div class="form-check u-mb10">
  55. <input class="form-check-input" type="checkbox" name="v_antispam" id="v_antispam" <?php if ((empty($v_antispam)) || ($v_antispam == 'yes')) echo 'checked'; ?>>
  56. <label for="v_antispam">
  57. <?=_('AntiSpam Support');?>
  58. </label>
  59. </div>
  60. <div class="form-check u-mb10">
  61. <input class="form-check-input" type="checkbox" name="v_reject" id="v_reject" <?php if ((empty($v_reject)) || ($v_reject == 'yes')) echo 'checked'; ?>>
  62. <label for="v_reject">
  63. <?=_('Reject spam');?>
  64. </label>
  65. </div>
  66. <?php } ?>
  67. <?php if (!empty($_SESSION['ANTIVIRUS_SYSTEM'])) {?>
  68. <div class="form-check u-mb10">
  69. <input class="form-check-input" type="checkbox" name="v_antivirus" id="v_antivirus" <?php if ((empty($v_antivirus)) || ($v_antivirus == 'yes')) echo 'checked'; ?>>
  70. <label for="v_antivirus">
  71. <?=_('AntiVirus Support');?>
  72. </label>
  73. </div>
  74. <?php } ?>
  75. <div class="form-check u-mb10">
  76. <input class="form-check-input" type="checkbox" name="v_dkim" id="v_dkim" <?php if (isset($v_dkim)&&$v_dkim == 'yes') echo 'checked'; ?>>
  77. <label for="v_dkim">
  78. <?=_('DKIM Support');?>
  79. </label>
  80. </div>
  81. <div class="form-check u-mb10">
  82. <input class="form-check-input" type="checkbox" name="v_smtp_relay" id="v_smtp_relay" <?php if ($v_smtp_relay == 'true') echo 'checked'; ?> onclick="javascript:elementHideShow('smtp_relay_table');">
  83. <label for="v_smtp_relay">
  84. <?=_('SMTP Relay');?>
  85. </label>
  86. </div>
  87. <div id="smtp_relay_table" class="u-pl30" style="display:<?php if ($v_smtp_relay == 'true'){echo 'block';} else {echo 'none';}?> ;">
  88. <div class="u-mb10">
  89. <label for="v_smtp_relay_host" class="form-label"><?=_('Host');?></label>
  90. <input type="text" class="form-control" name="v_smtp_relay_host" id="v_smtp_relay_host" value="<?=htmlentities(trim($v_smtp_relay_host, "'"))?>">
  91. </div>
  92. <div class="u-mb10">
  93. <label for="v_smtp_relay_port" class="form-label"><?=_('Port');?></label>
  94. <input type="text" class="form-control" name="v_smtp_relay_port" id="v_smtp_relay_port" value="<?=htmlentities(trim($v_smtp_relay_port, "'"))?>">
  95. </div>
  96. <div class="u-mb10">
  97. <label for="v_smtp_relay_user" class="form-label"><?=_('Username');?></label>
  98. <input type="text" class="form-control" name="v_smtp_relay_user" id="v_smtp_relay_user" value="<?=htmlentities(trim($v_smtp_relay_user, "'"))?>">
  99. </div>
  100. <div class="u-mb10">
  101. <label for="v_smtp_relay_pass" class="form-label"><?=_('Password');?></label>
  102. <input type="text" class="form-control" name="v_smtp_relay_pass" id="v_smtp_relay_pass">
  103. </div>
  104. </div>
  105. <?php } ?>
  106. </div>
  107. </form>
  108. </div>