edit_mail_acc.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <div class="l-center edit">
  2. <div class="l-sort clearfix">
  3. <div class="l-sort-toolbar clearfix float-left">
  4. <span class="title edit"><b><?=__('Editing Mail Account')?></b></span>
  5. <?php
  6. if (!empty($_SESSION['error_msg'])) {
  7. echo "<span class=\"vst-error\"> → ".htmlentities($_SESSION['error_msg'])."</span>";
  8. } else {
  9. if (!empty($_SESSION['ok_msg'])) {
  10. echo "<span class=\"vst-ok\"> → ".$_SESSION['ok_msg']."</span>";
  11. }
  12. }
  13. ?>
  14. </div>
  15. </div>
  16. </div>
  17. <div class="l-separator"></div>
  18. <!-- /.l-separator -->
  19. <div class="l-center">
  20. <?php
  21. $back = $_SESSION['back'];
  22. if (empty($back)) {
  23. $back = "location.href='/list/mail/?domain=".$_GET['domain']."'";
  24. } else {
  25. $back = "location.href='".$back."'";
  26. }
  27. ?>
  28. <form id="vstobjects" name="v_edit_mail_acc" method="post" class="<?=$v_status?>">
  29. <input type="hidden" name="token" value="<?=$_SESSION['token']?>" />
  30. <input type="hidden" name="save" value="save" />
  31. <table class='data'>
  32. <tr class="data-add">
  33. <td class="data-dotted">
  34. <table class="data-col1">
  35. <tr>
  36. <td>
  37. <a class="data-date"><?=translate_date($v_date)?></a><br>
  38. <a class="data-date"><?=$v_time?></a>
  39. </td>
  40. </tr>
  41. <tr><td class="data-<?=$v_status?>"><b><?=__($v_status)?></b></td></tr>
  42. </table>
  43. </td>
  44. <td class="data-dotted">
  45. <table class="data-col2" width="600px">
  46. <tr>
  47. <td class="vst-text step-top input-label">
  48. <?php print __('Account');?>
  49. </td>
  50. </tr>
  51. <tr>
  52. <td>
  53. <input type="text" size="20" class="vst-input" name="v_email" <?php if (!empty($v_account)) echo "value=".htmlentities($_GET['account'])."@".htmlentities($_GET['domain']); ?> disabled >
  54. <input type="hidden" name="v_domain" <?php echo "value=".htmlentities($v_domain); ?>>
  55. <input type="hidden" name="v_account" <?php if (!empty($v_account)) echo "value=".htmlentities($v_account); ?> >
  56. </td>
  57. </tr>
  58. <tr>
  59. <td class="vst-text input-type input-label">
  60. <?php print __('Password');?> / <a href="javascript:randomString();" class="generate"><?php print __('generate');?></a>
  61. </td>
  62. </tr>
  63. <tr>
  64. <td>
  65. <input type="text" size="20" class="vst-input password" name="v_password" <?php if (!empty($v_password)) echo "value=".htmlentities($v_password); ?>
  66. </td>
  67. </tr>
  68. <tr>
  69. <td class="vst-text input-type input-label">
  70. <?php print __('Quota');?> <span class="optional">(<?=__('in megabytes')?>)</span>
  71. </td>
  72. </tr>
  73. <tr>
  74. <td>
  75. <input type="text" size="20" class="vst-input" name="v_quota" <?php if (!empty($v_quota)) {echo "value=".htmlentities($v_quota);} else { echo "value=0";}; ?>>
  76. <img class="unlim-trigger" id="unlim-quota" src="/images/unlim.png" />
  77. </td>
  78. </tr>
  79. <tr>
  80. <td class="vst-text input-type input-label">
  81. <?php print __('Aliases');?> <span class="optional">(<?=__('use local-part')?>)</span>
  82. </td>
  83. </tr>
  84. <tr>
  85. <td>
  86. <textarea size="20" class="vst-textinput short" name="v_aliases"><?php if (!empty($v_aliases)) echo htmlentities($v_aliases); ?></textarea>
  87. </td>
  88. </tr>
  89. <tr>
  90. <td class="vst-text input-type input-label">
  91. <?php print __('Forward to');?> <span class="optional">(<?=__('one or more email addresses')?>)</span>
  92. </td>
  93. </tr>
  94. <tr>
  95. <td>
  96. <textarea size="20" class="vst-textinput" name="v_fwd"><?php if (!empty($v_fwd)) echo htmlentities($v_fwd); ?></textarea>
  97. </td>
  98. </tr>
  99. <tr>
  100. <td class="vst-text input-type input-label">
  101. <label><input type="checkbox" size="20" class="vst-checkbox" name="v_fwd_only" <?php if ($v_fwd_only == 'yes') echo "checked=yes" ?>> <?php print __('Do not store forwarded mail');?></label>
  102. </td>
  103. </tr>
  104. <tr>
  105. <td class="vst-text input-type input-label">
  106. <label><input type="checkbox" size="20" class="vst-checkbox" name="v_autoreply" <?php if ($v_autoreply == 'yes') echo "checked=yes" ?> onclick="javascript:elementHideShow('autoreplytable');"> <?php print __('Autoreply');?></label>
  107. </td>
  108. </tr>
  109. <tr>
  110. <td class="step-left">
  111. <table style="display:<?php if ($v_autoreply == 'no') { echo 'none';} else {echo 'block';}?> ;" id="autoreplytable">
  112. <tr>
  113. <td class="vst-text" style="padding: 12px 0 0 0;">
  114. <?php print __('Message');?>
  115. </td>
  116. </tr>
  117. <tr>
  118. <td>
  119. <textarea size="20" class="vst-textinput" name="v_autoreply_message"><?php if (!empty($v_autoreply_message)) echo htmlentities($v_autoreply_message); ?></textarea>
  120. </td>
  121. </tr>
  122. </table>
  123. </td>
  124. </tr>
  125. </table>
  126. <table class="data-col2">
  127. <tr>
  128. <td class="step-top" width="116px">
  129. <input type="submit" name="save" value="<?php print __('Save');?>" class="button">
  130. </td>
  131. <td class="step-top">
  132. <input type="button" class="button cancel" value="<?php print __('Back');?>" onclick="<?php echo $back ?>">
  133. </td>
  134. </tr>
  135. </table>
  136. </td>
  137. <td class="mail-infoblock-td">
  138. <div class="mail-infoblock">
  139. <table>
  140. <?php $uname_arr=posix_uname(); $hostname=$uname_arr['nodename']; ?>
  141. <tr>
  142. <td colspan="2">
  143. <select id="mail_configuration" class="vst-list flat">
  144. <option v_type="hostname" domain="<?=$hostname?>"><?=__('Use server hostname')?></option>
  145. <option v_type="hostname" domain="<?=$v_domain?>"><?=__('Use domain hostname')?></option>
  146. <option v_type="starttls"><?=__('Use STARTTLS')?></option>
  147. <option v_type="ssl"><?=__('Use SSL')?></option>
  148. <option v_type="no_encryption" domain="<?=$v_domain?>" encryption="<?=__('No encryption')?>"><?=__('No encryption')?></option>
  149. </select>
  150. </td>
  151. </tr>
  152. <tr>
  153. <td><?=__('Username')?>:</td>
  154. <td><div><span id="v_account">william.cage</span>@<?=htmlentities($v_domain)?></div></td>
  155. </tr>
  156. <tr>
  157. <td><?=__('Password')?>:</td>
  158. <td><div id="v_password">******</div></td>
  159. </tr>
  160. <tr>
  161. <td><?=__('IMAP hostname')?>:</td>
  162. <td><div id="td_imap_hostname"><?=$hostname?></div></td>
  163. </tr>
  164. <tr>
  165. <td><?=__('IMAP port')?>:</td>
  166. <td><div id="td_imap_port">143</div></td>
  167. </tr>
  168. <tr>
  169. <td><?=__('IMAP security')?>:</td>
  170. <td><div id="td_imap_encryption"><?=__('STARTTLS')?></div></td>
  171. </tr>
  172. <tr>
  173. <td><?=__('IMAP auth method')?>:</td>
  174. <td><div><?=__('Normal password')?></div></td>
  175. </tr>
  176. <tr>
  177. <td><?=__('SMTP hostname')?></td>
  178. <td><div id="td_smtp_hostname"><?=$hostname?></div></td>
  179. </tr>
  180. <tr>
  181. <td><?=__('SMTP port')?>:</td>
  182. <td><div id="td_smtp_port">587</div></td>
  183. </tr>
  184. <tr>
  185. <td><?=__('SMTP security')?>:</td>
  186. <td><div id="td_smtp_encryption"><?=__('STARTTLS')?></div></td>
  187. </tr>
  188. <tr>
  189. <td><?=__('SMTP auth method')?>:</td>
  190. <td><div><?=__('Normal password')?></div></td>
  191. </tr>
  192. <?
  193. list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"].":");
  194. $webmail = "http://".$http_host."/webmail/";
  195. if (!empty($_SESSION['MAIL_URL'])) $webmail = $_SESSION['MAIL_URL'];
  196. ?>
  197. <tr>
  198. <td><?=__('Webmail URL')?>:</td>
  199. <td><div><a class="vst" href="<?=$webmail?>" target="_blank"><?=$webmail?> <i></i></a></div></td>
  200. </tr>
  201. </table>
  202. </div>
  203. </td>
  204. </tr>
  205. </table>
  206. </form>
  207. </div>