Просмотр исходного кода

Merge branch 'master' into feature/800

Conflicts:
	web/js/pages/edit_web.js
Derrick Hammer 9 лет назад
Родитель
Сommit
1b287ff73e
49 измененных файлов с 822 добавлено и 613 удалено
  1. 1 1
      bin/v-deactivate-vesta-license
  2. 1 1
      bin/v-delete-sys-sftp-jail
  3. 1 1
      bin/v-delete-user-sftp-jail
  4. BIN
      install/debian/8/roundcube/roundcube-tinymce.tar.gz
  5. 22 0
      install/vst-install-debian.sh
  6. 1 1
      web/add/web/index.php
  7. 3 0
      web/css/file_manager.css
  8. 48 5
      web/css/styles.min.css
  9. 1 1
      web/inc/i18n/ar.php
  10. 2 1
      web/inc/i18n/bs.php
  11. 2 1
      web/inc/i18n/cn.php
  12. 2 1
      web/inc/i18n/cz.php
  13. 2 1
      web/inc/i18n/da.php
  14. 2 1
      web/inc/i18n/de.php
  15. 2 1
      web/inc/i18n/el.php
  16. 1 1
      web/inc/i18n/en.php
  17. 15 14
      web/inc/i18n/es.php
  18. 1 1
      web/inc/i18n/fa.php
  19. 1 1
      web/inc/i18n/fi.php
  20. 1 1
      web/inc/i18n/fr.php
  21. 1 1
      web/inc/i18n/hu.php
  22. 2 1
      web/inc/i18n/id.php
  23. 2 1
      web/inc/i18n/it.php
  24. 2 1
      web/inc/i18n/ja.php
  25. 2 1
      web/inc/i18n/ka.php
  26. 2 1
      web/inc/i18n/nl.php
  27. 2 1
      web/inc/i18n/no.php
  28. 2 1
      web/inc/i18n/pl.php
  29. 2 1
      web/inc/i18n/pt-BR.php
  30. 2 1
      web/inc/i18n/pt.php
  31. 360 359
      web/inc/i18n/ro.php
  32. 2 1
      web/inc/i18n/ru.php
  33. 2 1
      web/inc/i18n/se.php
  34. 2 1
      web/inc/i18n/tr.php
  35. 2 1
      web/inc/i18n/tw.php
  36. 2 1
      web/inc/i18n/ua.php
  37. 2 1
      web/inc/i18n/vi.php
  38. 21 7
      web/inc/main.php
  39. 53 39
      web/js/file_manager.js
  40. 33 29
      web/js/pages/add_mail_acc.js
  41. 14 4
      web/js/pages/add_web.js
  42. 34 2
      web/js/pages/edit_mail_acc.js
  43. 9 0
      web/js/pages/edit_web.js
  44. 2 0
      web/js/templates.js
  45. 2 1
      web/templates/admin/add_db.html
  46. 63 52
      web/templates/admin/add_mail_acc.html
  47. 13 12
      web/templates/admin/add_web.html
  48. 64 45
      web/templates/admin/edit_mail_acc.html
  49. 14 13
      web/templates/admin/edit_web.html

+ 1 - 1
bin/v-deactivate-vesta-license

@@ -2,7 +2,7 @@
 # info: deactivate vesta license
 # options: MODULE LICENSE
 #
-# The function activates and register vesta license
+# The function deactivates vesta license
 
 
 #----------------------------------------------------------#

+ 1 - 1
bin/v-delete-sys-sftp-jail

@@ -2,7 +2,7 @@
 # info: delete system sftp jail
 # options: NONE
 #
-# The script enables sftp jailed environment
+# The script disables sftp jailed environment
 
 
 #----------------------------------------------------------#

+ 1 - 1
bin/v-delete-user-sftp-jail

@@ -2,7 +2,7 @@
 # info: delete user sftp jail
 # options: USER
 #
-# The script enables sftp jailed environment
+# The script disables sftp jailed environment for USER
 
 
 #----------------------------------------------------------#

BIN
install/debian/8/roundcube/roundcube-tinymce.tar.gz


+ 22 - 0
install/vst-install-debian.sh

@@ -1089,6 +1089,28 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
     if [ "$release" -eq 8 ]; then
         mv -f /etc/roundcube/main.inc.php /etc/roundcube/config.inc.php
         mv -f /etc/roundcube/db.inc.php /etc/roundcube/debian-db-roundcube.php
+
+        # RoundCube tinyMCE fix
+        tinymceFixArchiveURL=$vestacp/roundcube/roundcube-tinymce.tar.gz
+        tinymceParentFolder=/usr/share/roundcube/program/js
+        tinymceFolder=$tinymceParentFolder/tinymce
+        tinymceBadJS=$tinymceFolder/tiny_mce.js
+        tinymceFixArchive=$tinymceParentFolder/roundcube-tinymce.tar.gz
+        if [[ -L "$tinymceFolder" && -d "$tinymceFolder" ]]; then
+            if [ -f "$tinymceBadJS" ]; then
+                wget $tinymceFixArchiveURL -O $tinymceFixArchive
+                if [[ -f "$tinymceFixArchive" && -s "$tinymceFixArchive" ]]; then
+                    rm $tinymceFolder
+                    tar -xzf $tinymceFixArchive -C $tinymceParentFolder
+                    rm $tinymceFixArchive
+                    chown -R root:root $tinymceFolder
+                else
+                    echo "File roundcube-tinymce.tar.gz is not downloaded, RoundCube tinyMCE fix is not applied"
+                    rm $tinymceFixArchive
+                fi
+            fi
+        fi
+
     fi
 fi
 

+ 1 - 1
web/add/web/index.php

@@ -90,7 +90,7 @@ if (!empty($_POST['ok'])) {
     if (!empty($v_domain)) $v_ftp_user_prepath .= $v_domain;
 
     // Set advanced option checkmark
-    if (empty($_POST['v_proxy'])) $v_adv = 'yes';
+    if (!empty($_POST['v_proxy'])) $v_adv = 'yes';
     if (!empty($_POST['v_ftp'])) $v_adv = 'yes';
     if ($_POST['v_proxy_ext'] != $v_proxy_ext) $v_adv = 'yes';
     if ((!empty($_POST['v_aliases'])) && ($_POST['v_aliases'] != 'www.'.$_POST['v_domain'])) $v_adv = 'yes';

+ 3 - 0
web/css/file_manager.css

@@ -270,8 +270,11 @@ ul.listing { list-style-type: none; padding: 18px 0 0; margin: -4px 0 0 -1px;  b
 .confirm-box .controls .keep-original:hover { color: #FFCC00; }
 .confirm-box .controls .keep-original:active { color: #6DB8D3; }
 
+.confirm-box .chmod-mask,
 .confirm-box .new-title { background-color: #292929; border: 1px solid #111; color: #eee; font-family: Arial; font-size: 16px; margin-bottom: 73px; margin-left: 27px; padding: 10px 14px; width: 396px; }
+.confirm-box .chmod-mask:focus,
 .confirm-box .new-title:focus { border: 1px solid #FFCC00; box-shadow: 0 0 5px 0 rgba(255, 204, 0 , 0.3); }
+.confirm-box .chmod-mask { width: 28px; margin: -12px 0 42px 57px; }
 
 .confirm-box.rename .message { margin-bottom: 36px; }
 .confirm-box.rename .controls.replace { display: none; }

+ 48 - 5
web/css/styles.min.css

@@ -1285,6 +1285,10 @@ div.l-content > div.l-separator:nth-of-type(4) {
   height: 28px;
   min-width: 208px;
   padding-left: 4px;
+  appearance:none;
+  -moz-appearance:none;
+  -webkit-appearance:none;
+  padding-left: 10px;
 }
 .l-select select:focus {
   border: 0;
@@ -1324,7 +1328,7 @@ div.l-content > div.l-separator:nth-of-type(4) {
   border-bottom: none;
 }
 
-.l-unit-ftl {
+.l-unit-ft {
   color: #929292;
   padding: 0 0 0 15px;
 }
@@ -2465,6 +2469,7 @@ label {
   font-size: 19px;
   font-weight: normal;
   height: 43px;
+  cursor: pointer;
   margin: 2px 6px 0 0;
   min-width: 138px;
   padding: 8px 1px 6px 10px;
@@ -2475,7 +2480,6 @@ label {
   -moz-appearance:none;
   -webkit-appearance:none;
   text-shadow: 0 0 0 #555;
-  /*color: transparent !important;*/
 }
 
 .vst-list.long-2 {
@@ -2493,6 +2497,23 @@ label {
   color: #333;
 }
 
+.vst-list.flat {
+  border: 1px solid #fff; 
+  color: #2c9491;
+  text-transform: uppercase;
+  font-weight: bold;
+  font-size: 11px;
+  margin-left: -14px;
+  background-position: -210px -604px;
+  text-shadow: none !important;
+}
+.vst-list.flat:hover {
+  color: #ff6701;
+}
+.vst-list.flat option {
+  color: #555;
+}
+
 a.vst-text,
 a.vst-text b{
   color: #2c9491;
@@ -2537,6 +2558,9 @@ a.vst-text:active b{
   font-family:"Lucida Console", Monaco, monospace;
   white-space: pre;
 }
+.vst-textinput.short {
+  width: 360px;
+}
 #advanced-options .console{
   width: 833px;
   height: 600px;
@@ -2808,18 +2832,37 @@ a.button.cancel {
   vertical-align: top;
 }
 .mail-infoblock {
-  padding-top: 80px;
-  margin-left: -100px;
+  margin-left: -110px;
   font-size: 12px;
   color: #777;
+  border: 1px solid #d9d9d9;
+  padding: 0px 5px 12px 20px;
+  margin-top: 64px;
+  width: 334px;
+  overflow: hidden;
+}
+.mail-infoblock:hover {
+  overflow: visible;
 }
 .mail-infoblock td {
   color: #777;
   font-size: 14px;
   height: 18px;
-  padding-right: 25px;
   font-weight: normal;
 }
+.mail-infoblock td:first-child{
+  padding-right: 15px;
+}
+.mail-infoblock div {
+  width: 190px;
+  white-space: nowrap;
+}
+.mail-infoblock a {
+  color: #2c9491;
+}
+.mail-infoblock a:hover {
+  color: #ff6701;
+}
 
 .additional-info {
     margin-left: 30px;

+ 1 - 1
web/inc/i18n/ar.php

@@ -746,7 +746,7 @@ $LANG['ar'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
 
 // Texts below doesn't exist in en.php
     '%s rule' => 'قواعد %s',

+ 2 - 1
web/inc/i18n/bs.php

@@ -745,5 +745,6 @@ $LANG['bs'] = array(
     'No encryption' => 'Bez enkripcije',
     'Do not use encryption' => 'Nemoj koristiti enkripciju',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maksimalna dužina sme biti %s karaktera, uključujući i prefix',
+
 );

+ 2 - 1
web/inc/i18n/cn.php

@@ -746,5 +746,6 @@ $LANG['cn'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
+
 );

+ 2 - 1
web/inc/i18n/cz.php

@@ -747,5 +747,6 @@ $LANG['cz'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
+
 );

+ 2 - 1
web/inc/i18n/da.php

@@ -748,5 +748,6 @@ $LANG['da'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
+
 );

+ 2 - 1
web/inc/i18n/de.php

@@ -746,5 +746,6 @@ $LANG['de'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
+
 );

+ 2 - 1
web/inc/i18n/el.php

@@ -747,5 +747,6 @@ $LANG['el'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
+
 );

+ 1 - 1
web/inc/i18n/en.php

@@ -747,6 +747,6 @@ $LANG['en'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
 
 );

+ 15 - 14
web/inc/i18n/es.php

@@ -27,14 +27,14 @@ $LANG['es'] = array(
     'BACKUP'  => 'RESPALDO',
 
     'LOGIN'  => 'LOGIN',
-    'RESET PASSWORD'  => 'RESET PASSWORD',
+    'RESET PASSWORD'  => 'RESETEAR CONTRASEÑA',
     'SEARCH'  => 'BUSCAR',
     'PACKAGE'  => 'PAQUETE',
     'RRD'  => 'RRD',
     'STATS'  => 'ESTADÍSTICAS',
     'LOG'  => 'LOG',
-    'UPDATES'  => 'UPDATES',
-    'FIREWALL'  => 'FIREWALL',
+    'UPDATES'  => 'ACTUALIZACIONES',
+    'FIREWALL'  => 'CORTAFUEGO',
     'SERVER'  => 'SERVIDOR',
     'MEMORY'  => 'MEMORIA',
     'DISK'  => 'DISCO',
@@ -59,7 +59,7 @@ $LANG['es'] = array(
     'Ban IP Address' => 'Bloquear IP',
     'Search'  => 'Buscar',
     'Add one more FTP Account' => 'Añadir una Cuenta FTP adicional',
-    'Overall Statistics'  => 'EstadísticaS Generales',
+    'Overall Statistics'  => 'Estadísticas Generales',
     'Daily'  => 'Diariamente',
     'Weekly'  => 'Semanalmente',
     'Monthly'  => 'Mensualmente',
@@ -417,8 +417,8 @@ $LANG['es'] = array(
     '%s cron jobs'  => '%s tareas programadas',
     '1 archive'  => '1 archivo',
     '%s archives'  => '%s archivos',
-    '1 item'  => '1 item',
-    '%s items'  => '%s items',
+    '1 item'  => '1 elemento',
+    '%s items'  => '%s elementos',
     '1 package'  => '1 plan',
     '%s packages'  => '%s planes',
     '1 IP address'  => '1 dirección IP',
@@ -729,7 +729,7 @@ $LANG['es'] = array(
     'awstats' => 'awstats',
 
     'Vesta SSL' => 'Vesta SSL',
-    'SUBJECT' => 'SUBJECT',
+    'SUBJECT' => 'ASUNTO',
     'ALIASES' => 'ALIASES',
     'NOT_BEFORE' => 'NOT_BEFORE',
     'NOT_AFTER' => 'NOT_AFTER',
@@ -737,12 +737,13 @@ $LANG['es'] = array(
     'PUB_KEY' => 'PUB_KEY',
     'ISSUER' => 'ISSUER',
 
-    'Use server hostname' => 'Use server hostname',
-    'Use domain hostname' => 'Use domain hostname',
-    'Use STARTTLS' => 'Use STARTTLS',
-    'Use SSL' => 'Use SSL',
-    'No encryption' => 'No encryption',
-    'Do not use encryption' => 'Do not use encryption',
+    'Use server hostname' => 'Usar server hostname',
+    'Use domain hostname' => 'Usar domain hostname',
+    'Use STARTTLS' => 'Usar STARTTLS',
+    'Use SSL' => 'Usar SSL',
+    'No encryption' => 'Sin encriptación',
+    'Do not use encryption' => 'No usar encriptación',
+
+    'maximum characters length, including prefix' => 'usar un máximo de %s, incluyendo prefijo',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
 );

+ 1 - 1
web/inc/i18n/fa.php

@@ -749,7 +749,7 @@ $LANG['fa'] = [
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
 
 // Texts below doesn't exist in en.php
     '70 خط اخر  %s.%s.log' => 'هفتاد خط انتهايي از %s.%s.log',

+ 1 - 1
web/inc/i18n/fi.php

@@ -748,7 +748,7 @@ $LANG['fi'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
 
 // Texts below doesn't exist in en.php
     'traffic' => 'tiedonsiirto',

+ 1 - 1
web/inc/i18n/fr.php

@@ -746,7 +746,7 @@ $LANG['fr'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
 
 // Texts below doesn't exist in en.php
     'disk' => 'disque',

+ 1 - 1
web/inc/i18n/hu.php

@@ -750,7 +750,7 @@ $LANG['hu'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
 
 // Texts below doesn't exist in en.php
     'Bandwidth Usage eth1' => 'eth1 sávszélesség használat',

+ 2 - 1
web/inc/i18n/id.php

@@ -749,5 +749,6 @@ $LANG['id'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
+
 );

+ 2 - 1
web/inc/i18n/it.php

@@ -747,5 +747,6 @@ $LANG['it'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
+
 );

+ 2 - 1
web/inc/i18n/ja.php

@@ -746,5 +746,6 @@ $LANG['ja'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
+
 );

+ 2 - 1
web/inc/i18n/ka.php

@@ -746,5 +746,6 @@ $LANG['ka'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
+
 );

+ 2 - 1
web/inc/i18n/nl.php

@@ -747,5 +747,6 @@ $LANG['nl'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
+
 );

+ 2 - 1
web/inc/i18n/no.php

@@ -747,5 +747,6 @@ $LANG['no'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
+
 );

+ 2 - 1
web/inc/i18n/pl.php

@@ -746,5 +746,6 @@ $LANG['pl'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
+
 );

+ 2 - 1
web/inc/i18n/pt-BR.php

@@ -746,5 +746,6 @@ $LANG['pt-BR'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
+
 );

+ 2 - 1
web/inc/i18n/pt.php

@@ -746,5 +746,6 @@ $LANG['pt'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
+
 );

Разница между файлами не показана из-за своего большого размера
+ 360 - 359
web/inc/i18n/ro.php


+ 2 - 1
web/inc/i18n/ru.php

@@ -747,5 +747,6 @@ $LANG['ru'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
+
 );

+ 2 - 1
web/inc/i18n/se.php

@@ -746,5 +746,6 @@ $LANG['se'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
+
 );

+ 2 - 1
web/inc/i18n/tr.php

@@ -747,5 +747,6 @@ $LANG['tr'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
+
 );

+ 2 - 1
web/inc/i18n/tw.php

@@ -769,5 +769,6 @@ $LANG['tw'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
+
 );

+ 2 - 1
web/inc/i18n/ua.php

@@ -747,5 +747,6 @@ $LANG['ua'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
+
 );

+ 2 - 1
web/inc/i18n/vi.php

@@ -745,5 +745,6 @@ $LANG['vi'] = array(
     'No encryption' => 'No encryption',
     'Do not use encryption' => 'Do not use encryption',
 
-	'maximum 16 characters length, including prefix' => 'maximum 16 characters length, including prefix',
+    'maximum characters length, including prefix' => 'maximum %s characters length, including prefix',
+
 );

+ 21 - 7
web/inc/main.php

@@ -3,7 +3,7 @@
 session_start();
 
 define('VESTA_CMD', '/usr/bin/sudo /usr/local/vesta/bin/');
-define('JS_LATEST_UPDATE', '1467758417');
+define('JS_LATEST_UPDATE', '1476144160');
 
 $i = 0;
 
@@ -346,11 +346,25 @@ function list_timezones() {
     return $timezone_list;
 }
 
+/**
+ * A function that tells is it MySQL installed on the system, or it is MariaDB.
+ *
+ * Explaination:
+ * $_SESSION['DB_SYSTEM'] has 'mysql' value even if MariaDB is installed, so you can't figure out is it really MySQL or it's MariaDB.
+ * So, this function will make it clear.
+ * 
+ * If MySQL is installed, function will return 'mysql' as a string.
+ * If MariaDB is installed, function will return 'mariadb' as a string.
+ * 
+ * Hint: if you want to check if PostgreSQL is installed - check value of $_SESSION['DB_SYSTEM']
+ *
+ * @return string
+ */
 function is_it_mysql_or_mariadb() {
-	exec (VESTA_CMD."v-list-sys-services json", $output, $return_var);
-	$data = json_decode(implode('', $output), true);
-	unset($output);
-	$mysqltype='mysql';
-	if (isset($data['mariadb'])) $mysqltype='mariadb';
-	return $mysqltype;
+    exec (VESTA_CMD."v-list-sys-services json", $output, $return_var);
+    $data = json_decode(implode('', $output), true);
+    unset($output);
+    $mysqltype='mysql';
+    if (isset($data['mariadb'])) $mysqltype='mariadb';
+    return $mysqltype;
 }

+ 53 - 39
web/js/file_manager.js

@@ -1525,25 +1525,8 @@ FM.confirmChmod = function() {
     var src = selected.find('.source').val();
     src = $.parseJSON(src);
 
-    var ro = $('input[name="read-by-owner"]').is(':checked') ? 4 : 0;
-    var wo = $('input[name="write-by-owner"]').is(':checked') ? 2 : 0;
-    var eo = $('input[name="execute-by-owner"]').is(':checked') ? 1 : 0;
-
-    var rg = $('input[name="read-by-group"]').is(':checked') ? 4 : 0;
-    var wg = $('input[name="write-by-group"]').is(':checked') ? 2 : 0;
-    var eg = $('input[name="execute-by-group"]').is(':checked') ? 1 : 0;
-
-    var re = $('input[name="read-by-others"]').is(':checked') ? 4 : 0;
-    var we = $('input[name="write-by-others"]').is(':checked') ? 2 : 0;
-    var ee = $('input[name="execute-by-others"]').is(':checked') ? 1 : 0;
-
-    var o = ro+wo+eo;
-    var g = rg+wg+eg;
-    var e = re+we+ee;
-
-    var permissions = o + "" + g + "" + e + "";
-
-    var action = FM.isItemFile(src) ? 'chmod_item' : 'chmod_item';
+    var permissions = $('.chmod input.chmod-mask').val();
+    var action = 'chmod_item';
 
     var params = {
         dir:  FM['TAB_' + tab + '_CURRENT_PATH'] + '/',
@@ -1583,24 +1566,7 @@ FM.confirmBulkChmod = function() {
             }
         });
 
-
-        var ro = $('input[name="read-by-owner"]').is(':checked') ? 4 : 0;
-        var wo = $('input[name="write-by-owner"]').is(':checked') ? 2 : 0;
-        var eo = $('input[name="execute-by-owner"]').is(':checked') ? 1 : 0;
-
-        var rg = $('input[name="read-by-group"]').is(':checked') ? 4 : 0;
-        var wg = $('input[name="write-by-group"]').is(':checked') ? 2 : 0;
-        var eg = $('input[name="execute-by-group"]').is(':checked') ? 1 : 0;
-
-        var re = $('input[name="read-by-others"]').is(':checked') ? 4 : 0;
-        var we = $('input[name="write-by-others"]').is(':checked') ? 2 : 0;
-        var ee = $('input[name="execute-by-others"]').is(':checked') ? 1 : 0;
-
-        var o = ro+wo+eo;
-        var g = rg+wg+eg;
-        var e = re+we+ee;
-
-        var permissions = o + "" + g + "" + e + "";
+        var permissions = $('.chmod input.chmod-mask').val();
 
         var action = 'chmod_item';
         var tab = FM.getTabLetter(FM.CURRENT_TAB);
@@ -1693,6 +1659,29 @@ FM.chmodItems = function() {
     tpl.set(':EXECUTE_BY_OTHERS', mode[2] & 1 ? "checked" : "");
 
     FM.popupOpen(tpl.finalize());
+    $('.chmod input.chmod-mask').val(mode);
+
+    $('.chmod input[type=checkbox]').click(function(){
+        var ro = $('input[name="read-by-owner"]').is(':checked') ? 4 : 0;
+        var wo = $('input[name="write-by-owner"]').is(':checked') ? 2 : 0;
+        var eo = $('input[name="execute-by-owner"]').is(':checked') ? 1 : 0;
+
+        var rg = $('input[name="read-by-group"]').is(':checked') ? 4 : 0;
+        var wg = $('input[name="write-by-group"]').is(':checked') ? 2 : 0;
+        var eg = $('input[name="execute-by-group"]').is(':checked') ? 1 : 0;
+
+        var re = $('input[name="read-by-others"]').is(':checked') ? 4 : 0;
+        var we = $('input[name="write-by-others"]').is(':checked') ? 2 : 0;
+        var ee = $('input[name="execute-by-others"]').is(':checked') ? 1 : 0;
+
+        var o = ro+wo+eo;
+        var g = rg+wg+eg;
+        var e = re+we+ee;
+
+        var permissions = o + "" + g + "" + e + "";
+
+        $('.chmod input.chmod-mask').val(permissions);
+    });
 }
 
 FM.bulkChmod = function() {
@@ -1728,6 +1717,28 @@ FM.bulkChmod = function() {
         //popup_bulk_copy
 
         FM.popupOpen(tpl.finalize());
+
+        $('.chmod input[type=checkbox]').click(function(){
+            var ro = $('input[name="read-by-owner"]').is(':checked') ? 4 : 0;
+            var wo = $('input[name="write-by-owner"]').is(':checked') ? 2 : 0;
+            var eo = $('input[name="execute-by-owner"]').is(':checked') ? 1 : 0;
+
+            var rg = $('input[name="read-by-group"]').is(':checked') ? 4 : 0;
+            var wg = $('input[name="write-by-group"]').is(':checked') ? 2 : 0;
+            var eg = $('input[name="execute-by-group"]').is(':checked') ? 1 : 0;
+
+            var re = $('input[name="read-by-others"]').is(':checked') ? 4 : 0;
+            var we = $('input[name="write-by-others"]').is(':checked') ? 2 : 0;
+            var ee = $('input[name="execute-by-others"]').is(':checked') ? 1 : 0;
+
+            var o = ro+wo+eo;
+            var g = rg+wg+eg;
+            var e = re+we+ee;
+
+            var permissions = o + "" + g + "" + e + "";
+
+            $('.chmod input.chmod-mask').val(permissions);
+        });
     }
 }
 
@@ -2448,10 +2459,10 @@ $(document).ready(function() {
         }
         var tab = FM.getTabLetter(FM.CURRENT_TAB);
         var elm = $(FM.CURRENT_TAB).find('.dir:eq('+FM['CURRENT_'+tab+'_LINE']+')');
-        
+
         if (elm.length == 1) {
             var src = $.parseJSON($(elm).find('.source').val());
-            
+
             if (src.type == 'd') {
                 FM.open(src.full_path, FM.CURRENT_TAB);
             }
@@ -2647,6 +2658,9 @@ $(document).ready(function() {
         $('.shortcuts').hide();
     });
 
+
+
+
 });
 
 /*$(document).bind('keydown.tab', function() {

+ 33 - 29
web/js/pages/add_mail_acc.js

@@ -24,7 +24,6 @@ App.Actions.MAIL_ACC.disable_unlimited = function(elm, source_elm) {
     $(source_elm).css('opacity', '0.5');
 }
 
-// 
 App.Actions.MAIL_ACC.toggle_unlimited_feature = function(evt) {
     var elm = $(evt.target);
     var ref = elm.prev('.vst-input');
@@ -93,33 +92,6 @@ randomString = function() {
         $('#v_password').text(Array(randomstring.length+1).join('*'));
 }
 
-use_hostname = function(domain) {
-	$('#td_imap_hostname').html(domain);
-	$('#td_smtp_hostname').html(domain);
-}
-
-use_starttls = function() {
-	$('#td_imap_port').html('143');
-	$('#td_imap_encryption').html('STARTTLS');
-	$('#td_smtp_port').html('587');
-	$('#td_smtp_encryption').html('STARTTLS');
-}
-
-use_ssl = function() {
-	$('#td_imap_port').html('993');
-	$('#td_imap_encryption').html('SSL');
-	$('#td_smtp_port').html('465');
-	$('#td_smtp_encryption').html('SSL');
-}
-
-use_no_encryption = function(domain, no_encryption) {
-	use_hostname(domain);
-	$('#td_imap_port').html('143');
-	$('#td_imap_encryption').html(no_encryption);
-	$('#td_smtp_port').html('25');
-	$('#td_smtp_encryption').html(no_encryption);
-}
-
 $(document).ready(function() {
     $('#v_account').text($('input[name=v_account]').val());
     $('#v_password').text($('input[name=v_password]').val());
@@ -140,5 +112,37 @@ $(document).ready(function() {
             $('#v_password').text($('input[name=v_password]').val());
         else
             $('#v_password').text(Array($('input[name=v_password]').val().length+1).join('*'));
-     });
+    });
+
+    $('#mail_configuration').change(function(evt){
+        var opt = $(evt.target).find('option:selected');
+
+        switch(opt.attr('v_type')){
+            case 'hostname':
+                $('#td_imap_hostname').html(opt.attr('domain'));
+                $('#td_smtp_hostname').html(opt.attr('domain'));
+                break;
+            case 'starttls':
+                $('#td_imap_port').html('143');
+                $('#td_imap_encryption').html('STARTTLS');
+                $('#td_smtp_port').html('587');
+                $('#td_smtp_encryption').html('STARTTLS');
+                break;
+            case 'ssl':
+                $('#td_imap_port').html('993');
+                $('#td_imap_encryption').html('SSL');
+                $('#td_smtp_port').html('465');
+                $('#td_smtp_encryption').html('SSL');
+                break;
+            case 'no_encription':
+                $('#td_imap_hostname').html(opt.attr('domain'));
+                $('#td_smtp_hostname').html(opt.attr('domain'));
+
+                $('#td_imap_port').html('143');
+                $('#td_imap_encryption').html(opt.attr('no_encription'));
+                $('#td_smtp_port').html('25');
+                $('#td_smtp_encryption').html(opt.attr('no_encription'));
+                break;
+        }
+    });
 });

+ 14 - 4
web/js/pages/add_web.js

@@ -154,14 +154,14 @@ App.Actions.WEB.toggle_additional_ftp_accounts = function(elm) {
 App.Actions.WEB.toggle_letsencrypt = function(elm) {
     if ($(elm).attr('checked')) {
         $('#ssltable textarea[name=v_ssl_crt],#ssltable textarea[name=v_ssl_key], #ssltable textarea[name=v_ssl_ca]').attr('disabled', 'disabled');
-        $('input[name=v_ssl]').prop('checked', true);
-        $('#ssltable').show();
+//        $('input[name=v_ssl]').prop('checked', true);
+//        $('#ssltable').show();
         $('#generate-csr').hide();
     }
     else {
         $('#ssltable textarea[name=v_ssl_crt],#ssltable textarea[name=v_ssl_key], #ssltable textarea[name=v_ssl_ca]').removeAttr('disabled');
-        $('input[name=v_ssl]').prop('checked', false);
-        $('#ssltable').hide();
+//        $('input[name=v_ssl]').prop('checked', false);
+//        $('#ssltable').hide();
         $('#generate-csr').show();
     }
 }
@@ -179,6 +179,16 @@ $(function() {
         document.getElementById('v_aliases').value = prefix + document.getElementById('v_domain').value;
     });
     App.Actions.WEB.toggle_letsencrypt($('input[name=v_letsencrypt]'))
+
+    $('select[name="v_stats"]').change(function(evt){
+        var select = $(evt.target);
+
+        if(select.val() == 'none'){
+            $('.stats-auth').hide();
+        } else {
+            $('.stats-auth').show();
+        }
+    });
 });
 
 function WEBrandom() {

+ 34 - 2
web/js/pages/edit_mail_acc.js

@@ -107,11 +107,43 @@ $(document).ready(function() {
         else
             $('#v_password').text(Array($(this).val().length+1).join('*'));
     });
-                                       
+
     $('.toggle-psw-visibility-icon').click(function(){
         if($('input[name=v_password]').attr('type') == 'text')
             $('#v_password').text($('input[name=v_password]').val());
         else
             $('#v_password').text(Array($('input[name=v_password]').val().length+1).join('*'));
-     });
+    });
+
+    $('#mail_configuration').change(function(evt){
+        var opt = $(evt.target).find('option:selected');
+
+        switch(opt.attr('v_type')){
+            case 'hostname':
+                $('#td_imap_hostname').html(opt.attr('domain'));
+                $('#td_smtp_hostname').html(opt.attr('domain'));
+                break;
+            case 'starttls':
+                $('#td_imap_port').html('143');
+                $('#td_imap_encryption').html('STARTTLS');
+                $('#td_smtp_port').html('587');
+                $('#td_smtp_encryption').html('STARTTLS');
+                break;
+            case 'ssl':
+                $('#td_imap_port').html('993');
+                $('#td_imap_encryption').html('SSL');
+                $('#td_smtp_port').html('465');
+                $('#td_smtp_encryption').html('SSL');
+                break;
+            case 'no_encription':
+                $('#td_imap_hostname').html(opt.attr('domain'));
+                $('#td_smtp_hostname').html(opt.attr('domain'));
+
+                $('#td_imap_port').html('143');
+                $('#td_imap_encryption').html(opt.attr('no_encription'));
+                $('#td_smtp_port').html('25');
+                $('#td_smtp_encryption').html(opt.attr('no_encription'));
+                break;
+        }
+    });
 });

+ 9 - 0
web/js/pages/edit_web.js

@@ -183,6 +183,15 @@ $(function() {
     if ($('input[name=v_letsencrypt]').attr('checked')) {
         App.Actions.WEB.toggle_letsencrypt($('input[name=v_letsencrypt]'))
     }
+    $('select[name="v_stats"]').change(function(evt){
+        var select = $(evt.target);
+
+        if(select.val() == 'none'){
+            $('.stats-auth').hide();
+        } else {
+            $('.stats-auth').show();
+        }
+    });
 });
 
 function WEBrandom() {

+ 2 - 0
web/js/templates.js

@@ -143,6 +143,7 @@ App.Templates.html = {
                                     <li><label><input type="checkbox" name="write-by-others" value="1" ~!:WRITE_BY_OTHERS~! /> '+App.Constants.FM_WRITE_BY_OTHERS+'</label></li>\
                                     <li><label><input type="checkbox" name="execute-by-others" value="1" ~!:EXECUTE_BY_OTHERS~! /> '+App.Constants.FM_EXECUTE_BY_OTHERS+'</label></li>\
                                 </ul>\
+                                <input type="text" name="mask" class="chmod-mask" maxlength="3" />\
                             </div>\
                             <div class="controls">\
                                 <p class="cancel" onClick="FM.popupClose();">'+App.Constants.FM_CANCEL+'</p>\
@@ -166,6 +167,7 @@ App.Templates.html = {
                                     <li><label><input type="checkbox" name="write-by-others" value="1" checked /> '+App.Constants.FM_WRITE_BY_OTHERS+'</label></li>\
                                     <li><label><input type="checkbox" name="execute-by-others" value="1" checked /> '+App.Constants.FM_EXECUTE_BY_OTHERS+'</label></li>\
                                 </ul>\
+                                <input type="text" name="mask" class="chmod-mask" maxlength="3" value="777" />\
                             </div>\
                             <div class="controls">\
                                 <p class="cancel" onClick="FM.popupClose();">'+App.Constants.FM_CANCEL+'</p>\

+ 2 - 1
web/templates/admin/add_db.html

@@ -60,7 +60,8 @@
                                 <td class="vst-text input-label">
                                     <?php
                                         print __('User');
-                                        if (is_it_mysql_or_mariadb()=='mysql') echo "&nbsp;&nbsp;&nbsp;&nbsp;<em><small>(".__('maximum 16 characters length, including prefix').")</small></em>";
+                                        // if (is_it_mysql_or_mariadb()=='mysql')
+                                        echo "&nbsp;&nbsp;&nbsp;&nbsp;<em><small>(".__('maximum characters length, including prefix', 16).")</small></em>";
                                     ?>
                                 </td>
                             </tr>

+ 63 - 52
web/templates/admin/add_mail_acc.html

@@ -131,60 +131,71 @@
             </td>
             <td class="mail-infoblock-td">
                 <div class="mail-infoblock">
-                <table>
-                    <?php $uname_arr=posix_uname(); $hostname=$uname_arr['nodename']; ?>
-                    <tr>
-                        <td><?=__('Username')?>:</td>
-                        <td><span id="v_account">william.cage</span>@<?=htmlentities($v_domain)?></td>
-                    </tr>
-                    <tr>
-                        <td><?=__('Password')?>:</td>
-                        <td id="v_password">******</td>
-                    </tr>
-                    <tr>
-                        <td><?=__('IMAP hostname')?>:</td>
-                        <td id="td_imap_hostname"><?=$hostname?></td>
-                    </tr>
-                    <tr>
-                        <td><?=__('IMAP port')?>:</td>
-                        <td id="td_imap_port">143</td>
-                    </tr>
-                    <tr>
-                        <td><?=__('IMAP security')?>:</td>
-                        <td id="td_imap_encryption"><?=__('STARTTLS')?></td>
-                    </tr>
-                    <tr>
-                        <td><?=__('IMAP auth method')?>:</td>
-                        <td><?=__('Normal password')?></td>
-                    </tr>
-                    <tr>
-                        <td><?=__('SMTP hostname')?></td>
-                        <td id="td_smtp_hostname"><?=$hostname?></td>
-                    </tr>
-                    <tr>
-                        <td><?=__('SMTP port')?>:</td>
-                        <td id="td_smtp_port">587</td>
-                    </tr>
-                    <tr>
-                        <td><?=__('SMTP security')?>:</td>
-                        <td id="td_smtp_encryption"><?=__('STARTTLS')?></td>
-                    </tr>
-                    <tr>
-                        <td><?=__('SMTP auth method')?>:</td>
-                        <td><?=__('Normal password')?></td>
-                    </tr>
-                </table>
-		<br />
-                <table>
-					<tr><td>&#8226; <a href="javascript:use_hostname('<?=$hostname?>');" class="generate"><?php print __('Use server hostname');?></a></td></tr>
-					<tr><td>&#8226; <a href="javascript:use_hostname('<?=$v_domain?>');" class="generate"><?php print __('Use domain hostname');?></a></td></tr>
-					<tr><td>&#8226; <a href="javascript:use_starttls();" class="generate"><?php print __('Use STARTTLS');?></a></td></tr>
-					<tr><td>&#8226; <a href="javascript:use_ssl();" class="generate"><?php print __('Use SSL');?></a></td></tr>
-					<tr><td>&#8226; <a href="javascript:use_no_encryption('<?=$v_domain?>', '<?php print __('No encryption');?>');" class="generate"><?php print __('Do not use encryption');?></a></td></tr>
-                </table>
+                    <table>
+                        <?php $uname_arr=posix_uname(); $hostname=$uname_arr['nodename']; ?>
+                        <tr>
+                            <td colspan="2">
+                                <select id="mail_configuration" class="vst-list flat">
+                                    <option v_type="hostname" domain="<?=$hostname?>"><?=__('Use server hostname')?></option>
+                                    <option v_type="hostname" domain="<?=$v_domain?>"><?=__('Use domain hostname')?></option>
+                                    <option v_type="starttls"><?=__('Use STARTTLS')?></option>
+                                    <option v_type="ssl"><?=__('Use SSL')?></option>
+                                    <option v_type="no_encription" domain="<?=$v_domain?>" encription="<?=__('No encryption')?>"><?=__('No encryption')?></option>
+                                </select>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td><?=__('Username')?>:</td>
+                            <td><div><span id="v_account">william.cage</span>@<?=htmlentities($v_domain)?></div></td>
+                        </tr>
+                        <tr>
+                            <td><?=__('Password')?>:</td>
+                            <td><div id="v_password">******</div></td>
+                        </tr>
+                        <tr>
+                            <td><?=__('IMAP hostname')?>:</td>
+                            <td><div id="td_imap_hostname"><?=$hostname?></div></td>
+                        </tr>
+                        <tr>
+                            <td><?=__('IMAP port')?>:</td>
+                            <td><div id="td_imap_port">143</div></td>
+                        </tr>
+                        <tr>
+                            <td><?=__('IMAP security')?>:</td>
+                            <td><div id="td_imap_encryption"><?=__('STARTTLS')?></div></td>
+                        </tr>
+                        <tr>
+                            <td><?=__('IMAP auth method')?>:</td>
+                            <td><div><?=__('Normal password')?></div></td>
+                        </tr>
+                        <tr>
+                            <td><?=__('SMTP hostname')?></td>
+                            <td><div id="td_smtp_hostname"><?=$hostname?></div></td>
+                        </tr>
+                        <tr>
+                            <td><?=__('SMTP port')?>:</td>
+                            <td><div id="td_smtp_port">587</div></td>
+                        </tr>
+                        <tr>
+                            <td><?=__('SMTP security')?>:</td>
+                            <td><div id="td_smtp_encryption"><?=__('STARTTLS')?></div></td>
+                        </tr>
+                        <tr>
+                            <td><?=__('SMTP auth method')?>:</td>
+                            <td><div><?=__('Normal password')?></div></td>
+                        </tr>
+			<?
+			  list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"].":");
+			  $webmail = "http://".$http_host."/webmail/";
+			  if (!empty($_SESSION['MAIL_URL'])) $webmail = $_SESSION['MAIL_URL'];
+			  ?>
+                        <tr>
+                            <td><?=__('Webmail URL')?>:</td>
+                            <td><div><a class="vst" href="<?=$webmail?>" target="_blank"><?=$webmail?> <i></i></a></div></td>
+			</tr>
+                    </table>
                 </div>
             </td>
-
         </tr>
     </table>
     </form>

+ 13 - 12
web/templates/admin/add_web.html

@@ -123,14 +123,18 @@
                         <?php echo ""; }?>
                         <tr>
                             <td class="step-top vst-text">
-                                <label><input type="checkbox" size="20" class="vst-checkbox" name="v_ssl" <?php if($v_ssl == 'yes' || $v_ssl == 'on') echo "checked=yes" ?> onclick="javascript:elementHideShow('ssltable');"> <?php print __('SSL Support');?></label> /
-                                <a class="generate" id="generate-csr" target="_blank" href="/generate/ssl/"><?php print __('Generate CSR') ?></a>
+                                <label><input type="checkbox" size="20" class="vst-checkbox" name="v_ssl" <?php if($v_ssl == 'yes' || $v_ssl == 'on') echo "checked=yes" ?> onclick="javascript:elementHideShow('ssltable');"> <?php print __('SSL Support');?></label>
                             </td>
                         </tr>
                         <tr>
                             <td>
                                 <table style="display:<?php if (empty($v_ssl)) { echo 'none';} else {echo 'block';}?>;" id="ssltable">
-                                    <tr>
+				  <tr>
+				      <td class="step-left input-label vst-text">
+					  <label><input type="checkbox" size="20" class="vst-checkbox" name="v_letsencrypt" <?php if($v_letsencrypt == 'yes' || $v_letsencrypt == 'on') echo "checked=yes" ?> onclick="App.Actions.WEB.toggle_letsencrypt(this)"> <?php print __('Lets Encrypt Support');?></label>
+				      </td>
+				  </tr>
+                                  <tr>
                                         <td class="vst-text input-label step-left">
                                             <?php print __('SSL Home Directory');?>
                                         </td>
@@ -149,7 +153,9 @@
                                     </tr>
                                     <tr>
                                         <td class="vst-text input-label step-left">
-                                            <?php print __('SSL Certificate');?>
+                                          <?php print __('SSL Certificate');?>
+					  <span id="generate-csr"> / <a class="generate" target="_blank" href="/generate/ssl/?domain=<?php echo $v_domain ?>"><?php print __('Generate CSR') ?></a></span>
+
                                         </td>
                                     </tr>
                                     <tr>
@@ -180,11 +186,6 @@
                                 </table>
                             </td>
                         </tr>
-                        <tr>
-                            <td class="step-top vst-text">
-                                <label><input type="checkbox" size="20" class="vst-checkbox" name="v_letsencrypt" <?php if($v_letsencrypt == 'yes' || $v_letsencrypt == 'on') echo "checked=yes" ?> onclick="App.Actions.WEB.toggle_letsencrypt(this)"> <?php print __('Lets Encrypt Support');?></label>
-                            </td>
-                        </tr>
                         <tr>
                             <td class="vst-text step-top">
                                 <?php print __('Web Statistics');?>
@@ -207,8 +208,8 @@
                                 </select>
                             </td>
                         </tr>
-                        <tr>
-                            <td class="vst-text input-label">
+                        <tr  class="stats-auth" style="<? if ($v_stats == 'none') { ?>display:none"<? } ?>>
+                            <td class="step-left vst-text input-label">
                                 <label><input type="checkbox" size="20" class="vst-checkbox" name="v_stats_auth" <?php if (!empty($v_stats_user)) echo "checked=yes" ?> onclick="javascript:elementHideShow('statstable');"> <?php print __('Statistics Authorization');?></label>
                             </td>
                         </tr>
@@ -391,6 +392,6 @@
       </div>
 
     <script>
-      GLOBAL.FTP_USER_PREFIX  = <?=json_encode($user)?>;
+      GLOBAL.FTP_USER_PREFIX  = <?=json_encode($user.'_')?>;
       GLOBAL.FTP_USER_PREPATH = <?=json_encode($v_ftp_user_prepath)?>;
     </script>

+ 64 - 45
web/templates/admin/edit_mail_acc.html

@@ -86,7 +86,7 @@
                         </tr>
                         <tr>
                             <td>
-                                <textarea size="20" class="vst-textinput" name="v_aliases"><?php if (!empty($v_aliases)) echo htmlentities($v_aliases);  ?></textarea>
+                                <textarea size="20" class="vst-textinput short" name="v_aliases"><?php if (!empty($v_aliases)) echo htmlentities($v_aliases);  ?></textarea>
                             </td>
                         </tr>
                         <tr>
@@ -140,53 +140,72 @@
 
             <td class="mail-infoblock-td">
                 <div class="mail-infoblock">
-                <table>
+                    <table>
                     <?php $uname_arr=posix_uname(); $hostname=$uname_arr['nodename']; ?>
-                    <tr>
-                        <td><?=__('Username')?>:</td>
-                        <td><span id="v_account">william.cage</span>@<?=htmlentities($v_domain)?></td>
-                    </tr>
-                    <tr>
-                        <td><?=__('Password')?>:</td>
-                        <td id="v_password">******</td>
-                    </tr>
-                    <tr>
-                        <td><?=__('IMAP hostname')?>:</td>
-                        <td><?=$hostname?></td>
-                    </tr>
-                    <tr>
-                        <td><?=__('IMAP port')?>:</td>
-                        <td>143</td>
-                    </tr>
-                    <tr>
-                        <td><?=__('IMAP security')?>:</td>
-                        <td><?=__('STARTTLS')?></td>
-                    </tr>
-                    <tr>
-                        <td><?=__('IMAP auth method')?>:</td>
-                        <td><?=__('Normal password')?></td>
-                    </tr>
-                    <tr>
-                        <td><?=__('SMTP hostname')?></td>
-                        <td><?=$hostname?></td>
-                    </tr>
-                    <tr>
-                        <td><?=__('SMTP port')?>:</td>
-                        <td>587</td>
-                    </tr>
-                    <tr>
-                        <td><?=__('SMTP security')?>:</td>
-                        <td><?=__('STARTTLS')?></td>
-                    </tr>
-                    <tr>
-                        <td><?=__('SMTP auth method')?>:</td>
-                        <td><?=__('Normal password')?></td>
-                    </tr>
-                </table>
+                        <tr>
+                            <td colspan="2">
+                                <select id="mail_configuration" class="vst-list flat">
+                                    <option v_type="hostname" domain="<?=$hostname?>"><?=__('Use server hostname')?></option>
+                                    <option v_type="hostname" domain="<?=$v_domain?>"><?=__('Use domain hostname')?></option>
+                                    <option v_type="starttls"><?=__('Use STARTTLS')?></option>
+                                    <option v_type="ssl"><?=__('Use SSL')?></option>
+                                    <option v_type="no_encription" domain="<?=$v_domain?>" encription="<?=__('No encryption')?>"><?=__('No encryption')?></option>
+                                </select>
+                            </td>
+                        </tr>
+                        <tr>
+                            <td><?=__('Username')?>:</td>
+                            <td><div><span id="v_account">william.cage</span>@<?=htmlentities($v_domain)?></div></td>
+                        </tr>
+                        <tr>
+                            <td><?=__('Password')?>:</td>
+                            <td><div id="v_password">******</div></td>
+                        </tr>
+                        <tr>
+                            <td><?=__('IMAP hostname')?>:</td>
+                            <td><div id="td_imap_hostname"><?=$hostname?></div></td>
+                        </tr>
+                        <tr>
+                            <td><?=__('IMAP port')?>:</td>
+                            <td><div id="td_imap_port">143</div></td>
+                        </tr>
+                        <tr>
+                            <td><?=__('IMAP security')?>:</td>
+                            <td><div id="td_imap_encryption"><?=__('STARTTLS')?></div></td>
+                        </tr>
+                        <tr>
+                            <td><?=__('IMAP auth method')?>:</td>
+                            <td><div><?=__('Normal password')?></div></td>
+                        </tr>
+                        <tr>
+                            <td><?=__('SMTP hostname')?></td>
+                            <td><div id="td_smtp_hostname"><?=$hostname?></div></td>
+                        </tr>
+                        <tr>
+                            <td><?=__('SMTP port')?>:</td>
+                            <td><div id="td_smtp_port">587</div></td>
+                        </tr>
+                        <tr>
+                            <td><?=__('SMTP security')?>:</td>
+                            <td><div id="td_smtp_encription"><?=__('STARTTLS')?></div></td>
+                        </tr>
+                        <tr>
+                            <td><?=__('SMTP auth method')?>:</td>
+                            <td><div><?=__('Normal password')?></div></td>
+                        </tr>
+			<?
+			  list($http_host, $port) = explode(':', $_SERVER["HTTP_HOST"].":");
+			  $webmail = "http://".$http_host."/webmail/";
+			  if (!empty($_SESSION['MAIL_URL'])) $webmail = $_SESSION['MAIL_URL'];
+			  ?>
+                        <tr>
+                            <td><?=__('Webmail URL')?>:</td>
+                            <td><div><a class="vst" href="<?=$webmail?>" target="_blank"><?=$webmail?> <i></i></a></div></td>
+			</tr>
+                    </table>
                 </div>
             </td>
-
             </tr>
         </table>
     </form>
-</div>
+</div>

+ 14 - 13
web/templates/admin/edit_web.html

@@ -180,14 +180,18 @@
                             <?php echo ""; }?>
                             <tr>
                                 <td class="vst-text step-top">
-                                    <label><input type="checkbox" size="20" class="vst-checkbox" name="v_ssl" <?php if ($v_ssl == 'yes') echo "checked=yes" ?> onclick="javascript:elementHideShow('ssltable');"> <?php print __('SSL Support');?></label> /
-                                    <a class="generate" id="generate-csr" target="_blank" href="/generate/ssl/?domain=<?php echo $v_domain ?>"><?php print __('Generate CSR') ?></a>
+                                    <label><input type="checkbox" size="20" class="vst-checkbox" name="v_ssl" <?php if ($v_ssl == 'yes') echo "checked=yes" ?> onclick="javascript:elementHideShow('ssltable');"> <?php print __('SSL Support');?></label>
                                 </td>
                             </tr>
                             <tr>
                                 <td class="step-left">
                                     <table style="display:<?php if ($v_ssl == 'no' ) { echo 'none';} else {echo 'block';}?> ;" id="ssltable">
-                                        <tr>
+  				      <tr>
+					  <td class="input-label vst-text">
+					      <label><input type="checkbox" size="20" class="vst-checkbox" name="v_letsencrypt" <?php if($v_letencrypt == 'yes' || $v_letencrypt == 'on') echo "checked=yes" ?> onclick="App.Actions.WEB.toggle_letsencrypt(this)"> <?php print __('Lets Encrypt Support');?></label>
+					  </td>
+				      </tr>
+                                      <tr>
                                             <td class="vst-text input-label">
                                                 <?php print __('SSL Home Directory');?>
                                             </td>
@@ -208,6 +212,7 @@
                                         <tr>
                                             <td class="vst-text input-label">
                                                 <?php print __('SSL Certificate');?>
+						<span id="generate-csr"> / <a class="generate" target="_blank" href="/generate/ssl/?domain=<?php echo $v_domain ?>"><?php print __('Generate CSR') ?></a></span>
                                             </td>
                                         </tr>
                                         <tr>
@@ -235,11 +240,11 @@
                                                 <textarea size="20" class="vst-textinput" name="v_ssl_ca"><?php if (!empty($v_ssl_ca)) echo htmlentities($v_ssl_ca); ?></textarea>
                                             </td>
                                         </tr>
-
+                                        <?php $uname_arr=posix_uname(); $hostname=$uname_arr['nodename'];
+					if ($v_ssl != 'no' ) { ?>
                                         <tr>
                                             <td>
                                                 <table class="additional-info">
-                                                <?php $uname_arr=posix_uname(); $hostname=$uname_arr['nodename']; ?>
                                                     <tr>
                                                         <td>
                                                             <?=__('SUBJECT')?>:
@@ -301,14 +306,10 @@
                                                 </table>
                                             </td>
                                         </tr>
+					<? } // if ssl is enabled ?>
                                     </table>
                                 </td>
                             </tr>
-                            <tr>
-                                <td class="step-top vst-text">
-                                    <label><input type="checkbox" size="20" class="vst-checkbox" name="v_letsencrypt" <?php if($v_letencrypt == 'yes' || $v_letencrypt == 'on') echo "checked=yes" ?> onclick="App.Actions.WEB.toggle_letsencrypt(this)"> <?php print __('Lets Encrypt Support');?></label>
-                                </td>
-                            </tr>
                             <tr>
                                 <td class="vst-text step-top">
                                     <?php print __('Web Statistics');?>
@@ -331,12 +332,12 @@
                                     </select>
                                 </td>
                             </tr>
-                            <tr>
-                                <td class="vst-text input-label">
+                            <tr  class="stats-auth" style="<? if ($v_stats == 'none') { ?>display:none"<? } ?>>
+                                <td class="vst-text input-label step-left">
                                     <label><input type="checkbox" size="20" class="vst-checkbox" name="v_stats_auth" <?php if (!empty($v_stats_user)) echo "checked=yes" ?> onclick="javascript:elementHideShow('statstable');"><?php print __('Statistics Authorization');?></label>
                                 </td>
                             </tr>
-                            <tr>
+                            <tr class="stats-auth">
                                 <td class="step-left">
                                     <table style="display:<?php if (empty($v_stats_user)) { echo 'none';} else {echo 'block';}?> ;" id="statstable" name="v-add-web-domain-stats-user">
                                         <tr>

Некоторые файлы не были показаны из-за большого количества измененных файлов