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

Merge branch 'main' into fix/v-restore-user

Jaap Marcus 5 лет назад
Родитель
Сommit
662a6e0ee2
39 измененных файлов с 1553 добавлено и 1236 удалено
  1. 1 3
      bin/v-add-sys-rainloop
  2. 27 4
      bin/v-change-sys-api
  3. 6 0
      bin/v-change-sys-config-value
  4. 1 1
      bin/v-rebuild-users
  5. 138 0
      func/syshealth.sh
  6. 5 131
      func/upgrade.sh
  7. 76 52
      install/hst-install-debian.sh
  8. 78 52
      install/hst-install-ubuntu.sh
  9. 6 16
      install/upgrade/versions/1.4.0.sh
  10. 0 2
      src/deb/hestia/postinst
  11. 24 0
      web/css/src/themes/dark.css
  12. 39 4
      web/css/src/themes/default.css
  13. 0 0
      web/css/themes/dark.min.css
  14. 0 0
      web/css/themes/default.min.css
  15. 1 1
      web/edit/user/log/index.php
  16. 180 160
      web/templates/admin/add_db.html
  17. 161 141
      web/templates/admin/add_dns.html
  18. 93 73
      web/templates/admin/add_mail.html
  19. 2 0
      web/templates/admin/add_mail_acc.html
  20. 323 266
      web/templates/admin/add_package.html
  21. 1 1
      web/templates/admin/add_user.html
  22. 5 5
      web/templates/admin/add_web.html
  23. 8 8
      web/templates/admin/edit_mail.html
  24. 2 0
      web/templates/admin/edit_mail_acc.html
  25. 323 265
      web/templates/admin/edit_package.html
  26. 13 11
      web/templates/admin/edit_server.html
  27. 6 6
      web/templates/admin/edit_web.html
  28. 0 7
      web/templates/admin/list_backup_detail.html
  29. 1 1
      web/templates/admin/list_key.html
  30. 2 0
      web/templates/admin/list_mail.html
  31. 2 1
      web/templates/admin/list_mail_acc.html
  32. 14 12
      web/templates/admin/list_mail_dns.html
  33. 1 1
      web/templates/admin/list_stats.html
  34. 3 4
      web/templates/admin/panel.html
  35. 3 3
      web/templates/user/edit_web.html
  36. 2 0
      web/templates/user/list_mail.html
  37. 2 0
      web/templates/user/list_mail_acc.html
  38. 2 2
      web/templates/user/list_stats.html
  39. 2 3
      web/templates/user/panel.html

+ 1 - 3
bin/v-add-sys-rainloop

@@ -103,8 +103,6 @@ if [ "$UPDATE" == "no" ]; then
     echo "Forbidden" >  ./data/index.html
 
     # Create database
-    mysql -e "DROP DATABASE rainloop"
-    mysql -e "DROP USER rainloop@localhost"
     mysql -e "CREATE DATABASE rainloop"
     # Mysql available on system
     r=$(generate_password)
@@ -174,4 +172,4 @@ fi
 
 
 log_history "Rouncube successfuly installed" '' 'admin'
-log_event "$OK" "$ARGUMENTS"
+log_event "$OK" "$ARGUMENTS"

+ 27 - 4
bin/v-change-sys-api

@@ -25,7 +25,7 @@ source $HESTIA/conf/hestia.conf
 #----------------------------------------------------------#
 
 check_args '1' "$#" "STATUS"
-is_type_valid "enable,disable" "$status"
+is_type_valid "enable,disable,remove" "$status"
 
 # Perform verification if read-only mode is enabled
 check_hestia_demo_mode
@@ -36,7 +36,15 @@ check_hestia_demo_mode
 
 if [ "$status" = "enable" ]; then
     if [ ! -f "$HESTIA/web/api/index.php" ]; then
-        wget -q https://raw.githubusercontent.com/hestiacp/hestiacp/release/web/api/index.php -O $HESTIA/web/api/index.php
+        wget -q https://raw.githubusercontent.com/hestiacp/hestiacp/$RELEASE_BRANCH/web/api/index.php -O $HESTIA/web/api/index.php
+        check_api_download=$(cat $HESTIA/web/api/index.php)
+        if [ -z "$HESTIA/web/api/index.php" ]; then
+            # Throw error message to user
+            echo "ERROR: API installation failed."
+            # Remove empty file created by wget output
+            rm -f "$HESTIA/web/api/index.php"
+            exit 1
+        fi
     else
         sed -i 's|die("Error: Disabled");|//die("Error: Disabled");|g' $HESTIA/web/api/index.php
         sed -i 's|////|//|g' $HESTIA/web/api/index.php
@@ -45,12 +53,27 @@ if [ "$status" = "enable" ]; then
 else
     $HESTIA/bin/v-change-sys-config-value "API" "no"
     $HESTIA/bin/v-change-sys-config-value "API_ALLOWED_IP" ""
-    sed -i 's|//die("Error: Disabled");|die("Error: Disabled");|g' $HESTIA/web/api/index.php
+    if [ "$status" != "remove" ]; then
+        sed -i 's|//die("Error: Disabled");|die("Error: Disabled");|g' $HESTIA/web/api/index.php
+    fi
+fi
+
+if [ "$status" = "remove" ]; then
+    if [ ! -f "$HESTIA/web/api/index.php" ]; then
+        echo "ERROR: API is not installed."
+        exit 1
+    else
+        rm -f "$HESTIA/web/api/index.php"
+    fi
 fi
 
 #----------------------------------------------------------#
 #                       Logging                            #
 #----------------------------------------------------------#
 
-log_history "API status has been changed to $status" '' 'admin'
+if [ "$status" = "enable" ] || [ "$status" = "disable" ]; then
+    log_history "API status has been changed to $status" '' 'admin'
+else
+    log_history "API has been disabled and removed" '' 'admin'
+fi
 log_event "$OK" "$ARGUMENTS"

+ 6 - 0
bin/v-change-sys-config-value

@@ -48,6 +48,12 @@ else
     sed -i "s|$key=.*|$key='$value'|g" $HESTIA/conf/hestia.conf
 fi
 
+# Sort configuration file in alphabetical order on change
+sort $HESTIA/conf/hestia.conf -o /tmp/updconf
+mv $HESTIA/conf/hestia.conf $HESTIA/conf/hestia.conf.bak
+mv /tmp/updconf $HESTIA/conf/hestia.conf
+rm -f $HESTIA/conf/hestia.conf.bak
+
 #----------------------------------------------------------#
 #                       Hestia                             #
 #----------------------------------------------------------#

+ 1 - 1
bin/v-rebuild-users

@@ -5,7 +5,7 @@
 #
 # example: v-rebuild-users
 #
-# The function all users on the system.
+# The function rebuilds user configuration for all users.
 
 #----------------------------------------------------------#
 #                    Variable&Function                     #

+ 138 - 0
func/syshealth.sh

@@ -0,0 +1,138 @@
+#!/bin/bash
+
+# Hestia Control Panel - System Health Check Function Library
+
+# Repair System Configuration
+# Adds missing variables to $HESTIA/conf/hestia.conf with safe default values
+function syshealth_repair_system_config () {
+    # Release branch
+    if [ -z "$RELEASE_BRANCH" ]; then
+        echo "[ ! ] Adding missing variable to hestia.conf: RELEASE_BRANCH ('release')"
+        $BIN/v-change-sys-config-value 'RELEASE_BRANCH' 'release'
+    fi
+
+    # Webmail alias
+    if [ ! -z "$IMAP_SYSTEM" ]; then
+        if [ -z "$WEBMAIL_ALIAS" ]; then
+            echo "[ ! ] Adding missing variable to hestia.conf: WEBMAIL_ALIAS ('webmail')"
+            $BIN/v-change-sys-config-value 'WEBMAIL_ALIAS' 'webmail'
+        fi
+    fi
+
+    # phpMyAdmin/phpPgAdmin alias
+    if [ ! -z "$DB_SYSTEM" ]; then
+        if [ "$DB_SYSTEM" = "mysql" ]; then
+            if [ -z "$DB_PMA_ALIAS" ]; then 
+                echo "[ ! ] Adding missing variable to hestia.conf: DB_PMA_ALIAS ('phpMyAdmin')"
+                $BIN/v-change-sys-config-value 'DB_PMA_ALIAS' 'phpMyAdmin'
+            fi
+        fi
+        if [ "$DB_SYSTEM" = "pgsql" ]; then
+            if [ -z "$DB_PGA_ALIAS" ]; then 
+                echo "[ ! ] Adding missing variable to hestia.conf: DB_PGA_ALIAS ('phpPgAdmin')"
+                $BIN/v-change-sys-config-value 'DB_PGA_ALIAS' 'phpPgAdmin'
+            fi
+        fi
+    fi
+
+    # Backup compression level
+    if [ -z "$BACKUP_GZIP" ]; then 
+        echo "[ ! ] Adding missing variable to hestia.conf: BACKUP_GZIP ('9')"
+        $BIN/v-change-sys-config-value 'BACKUP_GZIP' '9'
+    fi
+
+    # Theme
+    if [ -z "$THEME" ]; then 
+        echo "[ ! ] Adding missing variable to hestia.conf: THEME ('default')"
+        $BIN/v-change-sys-config-value 'THEME' 'default'
+    fi
+
+    # Default language
+    if [ -z "$LANGUAGE" ]; then 
+        echo "[ ! ] Adding missing variable to hestia.conf: LANGUAGE ('en')"
+        $BIN/v-change-sys-language 'en'
+    fi
+
+    # Disk Quota
+    if [ -z "$DISK_QUOTA" ]; then 
+        echo "[ ! ] Adding missing variable to hestia.conf: DISK_QUOTA ('no')"
+        $BIN/v-change-sys-config-value 'DISK_QUOTA' 'no'
+    fi
+
+    # CRON daemon
+    if [ -z "$CRON_SYSTEM" ]; then 
+        echo "[ ! ] Adding missing variable to hestia.conf: CRON_SYSTEM ('cron')"
+        $BIN/v-change-sys-config-value 'CRON_SYSTEM' 'cron'
+    fi
+
+    # Backend port
+    if [ -z "$BACKEND_PORT" ]; then 
+        echo "[ ! ] Adding missing variable to hestia.conf: BACKEND_PORT ('8083')"
+        $BIN/v-change-sys-port '8083' >/dev/null 2>&1
+    fi
+
+    # Upgrade: Send email notification
+    if [ -z "$UPGRADE_SEND_EMAIL" ]; then 
+        echo "[ ! ] Adding missing variable to hestia.conf: UPGRADE_SEND_EMAIL ('true')"
+        $BIN/v-change-sys-config-value 'UPGRADE_SEND_EMAIL' 'true'
+    fi
+
+    # Upgrade: Send email notification
+    if [ -z "$UPGRADE_SEND_EMAIL_LOG" ]; then 
+        echo "[ ! ] Adding missing variable to hestia.conf: UPGRADE_SEND_EMAIL_LOG ('false')"
+        $BIN/v-change-sys-config-value 'UPGRADE_SEND_EMAIL_LOG' 'false'
+    fi
+
+    # File Manager
+    if [ -z "$FILE_MANAGER" ]; then
+        echo "[ ! ] Adding missing variable to hestia.conf: FILE_MANAGER ('true')"
+        echo "[ ! ] File Manager is enabled but not installed, repairing components..."
+        $BIN/v-add-sys-filemanager quiet
+    fi
+    
+    # Support for ZSTD / GZIP Change
+    if [ -z "$BACKUP_MODE" ]; then
+        echo "[ ! ] Setting zstd backup compression type as default..."
+        $BIN/v-change-sys-config-value "BACKUP_MODE" "zstd"
+    fi
+    
+    # Login style switcher
+    if [ -z "$LOGIN_STYLE" ]; then
+        echo "[ ! ] Adding missing variable to hestia.conf: LOGIN_STYLE ('default')"
+        $BIN/v-change-sys-config-value "LOGIN_STYLE" "default"
+    fi
+    
+    # Webmail clients
+    if [ -z "$WEBMAIL_SYSTEM" ]; then
+        if [ -d "/var/lib/roundcube" ]; then 
+            echo "[ ! ] Adding missing variable to hestia.conf: WEBMAIL_SYSTEM ('roundcube')"
+            $BIN/v-change-sys-config-value "WEBMAIL_SYSTEM" "roundcube"
+        else
+            echo "[ ! ] Adding missing variable to hestia.conf: WEBMAIL_SYSTEM ('')"
+            $BIN/v-change-sys-config-value "WEBMAIL_SYSTEM" ""
+        fi
+    fi
+
+    # Inactive session timeout
+    if [ -z "$INACTIVE_SESSION_TIMEOUT" ]; then
+        echo "[ ! ] Adding missing variable to hestia.conf: INACTIVE_SESSION_TIMEOUT ('60')"
+        $BIN/v-change-sys-config-value "INACTIVE_SESSION_TIMEOUT" "60"
+    fi
+
+    # Enforce subdomain ownership
+    if [ -z "$ENFORCE_SUBDOMAIN_OWNERSHIP" ]; then
+        echo "[ ! ] Adding missing variable to hestia.conf: ENFORCE_SUBDOMAIN_OWNERSHIP ('yes')"
+        $BIN/v-change-sys-config-value "ENFORCE_SUBDOMAIN_OWNERSHIP" "yes"
+    fi
+
+    # API access allowed IP's
+    if [ "$API" = "yes" ]; then
+        check_api_key=$(grep "API_ALLOWED_IP" $HESTIA/conf/hestia.conf)
+        if [ -z "$check_api_key" ]; then
+            if [ -z "$API_ALLOWED_IP" ]; then
+                echo "[ ! ] Adding missing variable to hestia.conf: API_ALLOWED_IP ('allow-all')"        
+                $BIN/v-change-sys-config-value "API_ALLOWED_IP" "allow-all"
+            fi
+        fi
+    fi
+}

+ 5 - 131
func/upgrade.sh

@@ -2,6 +2,9 @@
 
 # Hestia Control Panel - Upgrade Control Script
 
+# Import system health check and repair library
+source $HESTIA/func/syshealth.sh
+
 #####################################################################
 #######                Functions & Initialization             #######
 #####################################################################
@@ -16,6 +19,7 @@ is_debug_build() {
 }
 
 upgrade_health_check() {
+    
     echo "============================================================================="
     echo "[ ! ] Performing system health check before proceeding with installation...  "
     # Perform basic health check against hestia.conf to ensure that
@@ -30,131 +34,8 @@ upgrade_health_check() {
         echo
     fi
 
-    # Release branch
-    if [ -z "$RELEASE_BRANCH" ]; then
-        echo "[ ! ] Adding missing variable to hestia.conf: RELEASE_BRANCH ('release')"
-        $BIN/v-change-sys-config-value 'RELEASE_BRANCH' 'release'
-    fi
-
-    # Webmail alias
-    if [ ! -z "$IMAP_SYSTEM" ]; then
-        if [ -z "$WEBMAIL_ALIAS" ]; then
-            echo "[ ! ] Adding missing variable to hestia.conf: WEBMAIL_ALIAS ('webmail')"
-            $BIN/v-change-sys-config-value 'WEBMAIL_ALIAS' 'webmail'
-        fi
-    fi
-
-    # phpMyAdmin/phpPgAdmin alias
-    if [ ! -z "$DB_SYSTEM" ]; then
-        if [ "$DB_SYSTEM" = "mysql" ]; then
-            if [ -z "$DB_PMA_ALIAS" ]; then 
-                echo "[ ! ] Adding missing variable to hestia.conf: DB_PMA_ALIAS ('phpMyAdmin')"
-                $BIN/v-change-sys-config-value 'DB_PMA_ALIAS' 'phpMyAdmin'
-            fi
-        fi
-        if [ "$DB_SYSTEM" = "pgsql" ]; then
-            if [ -z "$DB_PGA_ALIAS" ]; then 
-                echo "[ ! ] Adding missing variable to hestia.conf: DB_PGA_ALIAS ('phpPgAdmin')"
-                $BIN/v-change-sys-config-value 'DB_PGA_ALIAS' 'phpPgAdmin'
-            fi
-        fi
-    fi
-
-    # Backup compression level
-    if [ -z "$BACKUP_GZIP" ]; then 
-        echo "[ ! ] Adding missing variable to hestia.conf: BACKUP_GZIP ('9')"
-        $BIN/v-change-sys-config-value 'BACKUP_GZIP' '9'
-    fi
-
-    # Theme
-    if [ -z "$THEME" ]; then 
-        echo "[ ! ] Adding missing variable to hestia.conf: THEME ('default')"
-        $BIN/v-change-sys-config-value 'THEME' 'default'
-    fi
-
-    # Default language
-    if [ -z "$LANGUAGE" ]; then 
-        echo "[ ! ] Adding missing variable to hestia.conf: LANGUAGE ('en')"
-        $BIN/v-change-sys-language 'en'
-    fi
-
-    # Disk Quota
-    if [ -z "$DISK_QUOTA" ]; then 
-        echo "[ ! ] Adding missing variable to hestia.conf: DISK_QUOTA ('no')"
-        $BIN/v-change-sys-config-value 'DISK_QUOTA' 'no'
-    fi
-
-    # CRON daemon
-    if [ -z "$CRON_SYSTEM" ]; then 
-        echo "[ ! ] Adding missing variable to hestia.conf: CRON_SYSTEM ('cron')"
-        $BIN/v-change-sys-config-value 'CRON_SYSTEM' 'cron'
-    fi
-
-    # Backend port
-    if [ -z "$BACKEND_PORT" ]; then 
-        echo "[ ! ] Adding missing variable to hestia.conf: BACKEND_PORT ('8083')"
-        $BIN/v-change-sys-port '8083' >/dev/null 2>&1
-    fi
-
-    # Upgrade: Send email notification
-    if [ -z "$UPGRADE_SEND_EMAIL" ]; then 
-        echo "[ ! ] Adding missing variable to hestia.conf: UPGRADE_SEND_EMAIL ('true')"
-        $BIN/v-change-sys-config-value 'UPGRADE_SEND_EMAIL' 'true'
-    fi
-
-    # Upgrade: Send email notification
-    if [ -z "$UPGRADE_SEND_EMAIL_LOG" ]; then 
-        echo "[ ! ] Adding missing variable to hestia.conf: UPGRADE_SEND_EMAIL_LOG ('false')"
-        $BIN/v-change-sys-config-value 'UPGRADE_SEND_EMAIL_LOG' 'false'
-    fi
+    syshealth_repair_system_config
 
-    # File Manager
-    if [ -z "$FILE_MANAGER" ]; then
-        echo "[ ! ] Adding missing variable to hestia.conf: FILE_MANAGER ('true')"
-        echo "[ ! ] File Manager is enabled but not installed, repairing components..."
-        $BIN/v-add-sys-filemanager quiet
-    fi
-    
-    # Support for ZSTD / GZIP Change
-    if [ -z "$BACKUP_MODE" ]; then
-        echo "[ ! ] Setting zstd backup compression type as default..."
-        $BIN/v-change-sys-config-value "BACKUP_MODE" "zstd"
-    fi
-    
-    # Login style switcher
-    if [ -z "$LOGIN_STYLE" ]; then
-        echo "[ ! ] Adding missing variable to hestia.conf: LOGIN_STYLE ('default')"
-        $BIN/v-change-sys-config-value "LOGIN_STYLE" "default"
-    fi
-    
-    # Webmail clients
-    if [ -z "$WEBMAIL_SYSTEM" ]; then
-        if [ -d "/var/lib/roundcube" ]; then 
-            echo "[ ! ] Adding missing variable to hestia.conf: WEBMAIL_SYSTEM ('roundcube')"
-            $BIN/v-change-sys-config-value "WEBMAIL_SYSTEM" "roundcube"
-        else
-            echo "[ ! ] Adding missing variable to hestia.conf: WEBMAIL_SYSTEM ('')"
-            $BIN/v-change-sys-config-value "WEBMAIL_SYSTEM" ""
-        fi
-    fi
-
-    # Inactive session timeout
-    if [ -z "$INACTIVE_SESSION_TIMEOUT" ]; then
-        echo "[ ! ] Adding missing variable to hestia.conf: INACTIVE_SESSION_TIMEOUT ('60')"
-        $BIN/v-change-sys-config-value "INACTIVE_SESSION_TIMEOUT" "60"
-    fi
-
-    # Enforce Subdomain ownership
-    if [ -z "$ENFORCE_SUBDOMAIN_OWNERSHIP" ]; then
-        echo "[ ! ] Adding missing variable to hestia.conf: ENFORCE_SUBDOMAIN_OWNERSHIP ('yes')"
-        $BIN/v-change-sys-config-value "ENFORCE_SUBDOMAIN_OWNERSHIP" "yes"
-    fi    
-    # API Allowed IP
-    if [ -z "$API_ALLOWED_IP" ]; then
-        echo "[ ! ] Adding missing variable to hestia.conf: API_ALLOWED_IP ('allow-all')"        
-        $BIN/v-change-sys-config-value "API_ALLOWED_IP" "allow-all"
-    fi  
-    
     echo "[ * ] Health check complete. Starting upgrade from $VERSION to $new_version..."
     echo "============================================================================="
 }
@@ -674,13 +555,6 @@ upgrade_rainloop(){
     fi
 }
 
-disable_api(){
-    if [ "$API" = "no" ]; then
-        echo "[ ! ] Disable Api..."
-        sed -i 's|//die("Error: Disabled");|die("Error: Disabled");|g' $HESTIA/web/api/index.php
-        $HESTIA/bin/v-change-sys-config-value "API_ALLOWED_IP" ""
-    fi
-}
 upgrade_rebuild_web_templates() {
     if [ "$UPGRADE_UPDATE_WEB_TEMPLATES" = "true" ]; then
         echo "[ ! ] Updating default web domain templates..."

+ 76 - 52
install/hst-install-debian.sh

@@ -149,6 +149,26 @@ set_default_port() {
     fi
 }
 
+# Write configuration KEY/VALUE pair to $HESTIA/conf/hestia.conf
+write_config_value() {
+    local key="$1"
+    local value="$2"
+    echo "$key='$value'" >> $HESTIA/conf/hestia.conf
+}
+
+# Sort configuration file values
+# Write final copy to $HESTIA/conf/hestia.conf for active usage
+# Duplicate file to $HESTIA/conf/defaults/hestia.conf to restore known good installation values
+sort_config_file(){
+    sort $HESTIA/conf/hestia.conf -o /tmp/updconf
+    mv $HESTIA/conf/hestia.conf $HESTIA/conf/hestia.conf.bak
+    mv /tmp/updconf $HESTIA/conf/hestia.conf
+    rm -f $HESTIA/conf/hestia.conf.bak
+    if [ ! -d "$HESTIA/conf/defaults/" ]; then
+        mkdir -p "$HESTIA/conf/defaults/"
+    fi
+    cp $HESTIA/conf/hestia.conf $HESTIA/conf/defaults/hestia.conf
+}
 
 #----------------------------------------------------------#
 #                    Verifications                         #
@@ -981,39 +1001,39 @@ chmod 660 $HESTIA/conf/hestia.conf
 
 # Web stack
 if [ "$apache" = 'yes' ] && [ "$nginx" = 'no' ] ; then
-    echo "WEB_SYSTEM='apache2'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_RGROUPS='www-data'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_PORT='80'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_SSL_PORT='443'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_SSL='mod_ssl'"  >> $HESTIA/conf/hestia.conf
-    echo "STATS_SYSTEM='awstats'" >> $HESTIA/conf/hestia.conf
+    write_config_value "WEB_SYSTEM" "apache2"
+    write_config_value "WEB_RGROUPS" "www-data"
+    write_config_value "WEB_PORT" "80"
+    write_config_value "WEB_SSL_PORT" "443"
+    write_config_value "WEB_SSL" "mod_ssl"
+    write_config_value "STATS_SYSTEM" "awstats"
 fi
 if [ "$apache" = 'yes' ] && [ "$nginx"  = 'yes' ] ; then
-    echo "WEB_SYSTEM='apache2'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_RGROUPS='www-data'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_PORT='8080'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_SSL_PORT='8443'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_SSL='mod_ssl'"  >> $HESTIA/conf/hestia.conf
-    echo "PROXY_SYSTEM='nginx'" >> $HESTIA/conf/hestia.conf
-    echo "PROXY_PORT='80'" >> $HESTIA/conf/hestia.conf
-    echo "PROXY_SSL_PORT='443'" >> $HESTIA/conf/hestia.conf
-    echo "STATS_SYSTEM='awstats'" >> $HESTIA/conf/hestia.conf
+    write_config_value "WEB_SYSTEM" "apache2"
+    write_config_value "WEB_RGROUPS" "www-data"
+    write_config_value "WEB_PORT" "8080"
+    write_config_value "WEB_SSL_PORT" "8443"
+    write_config_value "WEB_SSL" "mod_ssl"
+    write_config_value "PROXY_SYSTEM" "nginx"
+    write_config_value "PROXY_PORT" "80"
+    write_config_value "PROXY_SSL_PORT" "443"
+    write_config_value "STATS_SYSTEM" "awstats"
 fi
 if [ "$apache" = 'no' ] && [ "$nginx"  = 'yes' ]; then
-    echo "WEB_SYSTEM='nginx'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_PORT='80'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_SSL_PORT='443'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_SSL='openssl'"  >> $HESTIA/conf/hestia.conf
-    echo "STATS_SYSTEM='awstats'" >> $HESTIA/conf/hestia.conf
+    write_config_value "WEB_SYSTEM" "nginx"
+    write_config_value "WEB_PORT" "80"
+    write_config_value "WEB_SSL_PORT" "443"
+    write_config_value "WEB_SSL" "openssl"
+    write_config_value "STATS_SYSTEM" "awstats"
 fi
 
 if [ "$release" -ge 9 ] || [ "$multiphp" = 'yes' ]; then
     if [ "$phpfpm" = 'yes' ]; then
-        echo "WEB_BACKEND='php-fpm'" >> $HESTIA/conf/hestia.conf
+        write_config_value "WEB_BACKEND" "php-fpm"
     fi
 else
     if [ "$phpfpm" = 'yes' ]; then
-        echo "WEB_BACKEND='php5-fpm'" >> $HESTIA/conf/hestia.conf
+        write_config_value "WEB_BACKEND" "php5-fpm"
     fi
 fi
 
@@ -1032,81 +1052,81 @@ if [ ! -z "$installed_db_types" ]; then
         sort -r -u |\
         sed "/^$/d"|\
         sed ':a;N;$!ba;s/\n/,/g')
-    echo "DB_SYSTEM='$db'" >> $HESTIA/conf/hestia.conf
+    write_config_value "DB_SYSTEM" "$db"
 fi
 
 # FTP stack
 if [ "$vsftpd" = 'yes' ]; then
-    echo "FTP_SYSTEM='vsftpd'" >> $HESTIA/conf/hestia.conf
+    write_config_value "FTP_SYSTEM" "vsftpd"
 fi
 if [ "$proftpd" = 'yes' ]; then
-    echo "FTP_SYSTEM='proftpd'" >> $HESTIA/conf/hestia.conf
+    write_config_value "FTP_SYSTEM" "proftpd"
 fi
 
 # DNS stack
 if [ "$named" = 'yes' ]; then
-    echo "DNS_SYSTEM='bind9'" >> $HESTIA/conf/hestia.conf
+    write_config_value "DNS_SYSTEM" "bind9"
 fi
 
 # Mail stack
 if [ "$exim" = 'yes' ]; then
-    echo "MAIL_SYSTEM='exim4'" >> $HESTIA/conf/hestia.conf
+    write_config_value "MAIL_SYSTEM" "exim4"
     if [ "$clamd" = 'yes'  ]; then
-        echo "ANTIVIRUS_SYSTEM='clamav-daemon'" >> $HESTIA/conf/hestia.conf
+        write_config_value "ANTIVIRUS_SYSTEM" "clamav-daemon"
     fi
     if [ "$spamd" = 'yes' ]; then
-        echo "ANTISPAM_SYSTEM='spamassassin'" >> $HESTIA/conf/hestia.conf
+        write_config_value "ANTISPAM_SYSTEM" "spamassassin"
     fi
     if [ "$dovecot" = 'yes' ]; then
-        echo "IMAP_SYSTEM='dovecot'" >> $HESTIA/conf/hestia.conf
+        write_config_value "IMAP_SYSTEM" "dovecot"
     fi
 fi
 
 # Cron daemon
-echo "CRON_SYSTEM='cron'" >> $HESTIA/conf/hestia.conf
+write_config_value "CRON_SYSTEM" "cron"
 
 # Firewall stack
 if [ "$iptables" = 'yes' ]; then
-    echo "FIREWALL_SYSTEM='iptables'" >> $HESTIA/conf/hestia.conf
+    write_config_value "FIREWALL_SYSTEM" "iptables"
 fi
 if [ "$iptables" = 'yes' ] && [ "$fail2ban" = 'yes' ]; then
-    echo "FIREWALL_EXTENSION='fail2ban'" >> $HESTIA/conf/hestia.conf
+    write_config_value "FIREWALL_EXTENSION" "fail2ban"
 fi
 
 # Disk quota
 if [ "$quota" = 'yes' ]; then
-    echo "DISK_QUOTA='yes'" >> $HESTIA/conf/hestia.conf
+    write_config_value "DISK_QUOTA" "yes"
 else
-    echo "DISK_QUOTA='no'" >> $HESTIA/conf/hestia.conf
+    write_config_value "DISK_QUOTA" "no"
 fi
 
 # Backups
-echo "BACKUP_SYSTEM='local'" >> $HESTIA/conf/hestia.conf
-echo "BACKUP_GZIP='4'" >> $HESTIA/conf/hestia.conf
-echo "BACKUP_MODE='zstd'" >> $HESTIA/conf/hestia.conf
+write_config_value "BACKUP_SYSTEM" "local"
+write_config_value "BACKUP_GZIP" "4"
+write_config_value "BACKUP_MODE" "zstd"
 
 # Language
-echo "LANGUAGE='$lang'" >> $HESTIA/conf/hestia.conf
+write_config_value "LANGUAGE" "$lang"
 
 # Login in screen
-echo "LOGIN_STYLE='default'" >> $HESTIA/conf/hestia.conf
+write_config_value "LOGIN_STYLE" "default"
 
 # Theme
-echo "THEME='dark'" >> $HESTIA/conf/hestia.conf
+write_config_value "THEME" "dark"
 
 # Inactive session timeout
-echo "INACTIVE_SESSION_TIMEOUT='60'" >> $HESTIA/conf/hestia.conf
+write_config_value "INACTIVE_SESSION_TIMEOUT" "60"
 
 # Do not allow users to create subdomains when they don't own the domain
-echo "ENFORCE_SUBDOMAIN_OWNERSHIP='yes'" >> $HESTIA/conf/hestia.conf
+write_config_value "ENFORCE_SUBDOMAIN_OWNERSHIP" "yes"
 
 # Version & Release Branch
-echo "VERSION='${HESTIA_INSTALL_VER}'" >> $HESTIA/conf/hestia.conf
-echo "RELEASE_BRANCH='release'" >> $HESTIA/conf/hestia.conf
+write_config_value "VERSION" "${HESTIA_INSTALL_VER}"
+write_config_value "RELEASE_BRANCH" "release"
 
 # Email notifications after upgrade
-echo "UPGRADE_SEND_EMAIL='false'" >> $HESTIA/conf/hestia.conf
-echo "UPGRADE_SEND_EMAIL_LOG='true'" >> $HESTIA/conf/hestia.conf
+write_config_value "UPGRADE_SEND_EMAIL" "true"
+write_config_value "UPGRADE_SEND_EMAIL_LOG" "false"
 
 # Installing hosting packages
 cp -rf $HESTIA_INSTALL_DIR/packages $HESTIA/data/
@@ -1419,7 +1439,7 @@ if [ "$mysql" = 'yes' ]; then
     rm -fr phpMyAdmin-$pma_v-all-languages
     rm -f phpMyAdmin-$pma_v-all-languages.tar.gz
 
-    echo "DB_PMA_ALIAS='phpmyadmin'" >> $HESTIA/conf/hestia.conf
+    write_config_value "DB_PMA_ALIAS" "phpmyadmin"
     $HESTIA/bin/v-change-sys-db-alias 'pma' "phpmyadmin"
 
     # Special thanks to Pavel Galkin (https://skurudo.ru)
@@ -1445,7 +1465,7 @@ if [ "$postgresql" = 'yes' ]; then
     fi
     cp -f $HESTIA_INSTALL_DIR/pga/config.inc.php /etc/phppgadmin/
 
-    echo "DB_PGA_ALIAS='phppgadmin'" >> $HESTIA/conf/hestia.conf
+    write_config_value "DB_PGA_ALIAS" "phppgadmin"
     $HESTIA/bin/v-change-sys-db-alias 'pga' "phppgadmin"
 fi
 
@@ -1637,7 +1657,7 @@ echo "[ * ] Install Roundcube..."
 
 if [ "$mysql" == 'yes' ] && [ "$dovecot" == "yes" ]; then
     $HESTIA/bin/v-add-sys-roundcube 
-    echo "WEBMAIL_ALIAS='webmail'" >> $HESTIA/conf/hestia.conf
+    write_config_value "WEBMAIL_ALIAS" "webmail"
 fi
 
 #----------------------------------------------------------#
@@ -1645,8 +1665,8 @@ fi
 #----------------------------------------------------------#
 
 if [ "$api" = "yes" ]; then
-    echo "API='yes'" >> $HESTIA/conf/hestia.conf
-    echo "API_ALLOWED_IP='127.0.0.1'" >> $HESTIA/conf/hestia.conf
+    write_config_value "API" "yes"
+    write_config_value "API_ALLOWED_IP" ""
 else
     $HESTIA/bin/v-change-sys-api disable
 fi
@@ -1869,4 +1889,8 @@ if [ "$interactive" = 'yes' ]; then
     fi
 fi
 
+# Clean-up
+# Sort final configuration file
+sort_config_file
+
 # EOF

+ 78 - 52
install/hst-install-ubuntu.sh

@@ -130,6 +130,26 @@ set_default_port() {
     fi
 }
 
+# Write configuration KEY/VALUE pair to $HESTIA/conf/hestia.conf
+write_config_value() {
+    local key="$1"
+    local value="$2"
+    echo "$key='$value'" >> $HESTIA/conf/hestia.conf
+}
+
+# Sort configuration file values
+# Write final copy to $HESTIA/conf/hestia.conf for active usage
+# Duplicate file to $HESTIA/conf/defaults/hestia.conf to restore known good installation values
+sort_config_file(){
+    sort $HESTIA/conf/hestia.conf -o /tmp/updconf
+    mv $HESTIA/conf/hestia.conf $HESTIA/conf/hestia.conf.bak
+    mv /tmp/updconf $HESTIA/conf/hestia.conf
+    rm -f $HESTIA/conf/hestia.conf.bak
+    if [ ! -d "$HESTIA/conf/defaults/" ]; then
+        mkdir -p "$HESTIA/conf/defaults/"
+    fi
+    cp $HESTIA/conf/hestia.conf $HESTIA/conf/defaults/hestia.conf
+}
 
 #----------------------------------------------------------#
 #                    Verifications                         #
@@ -1020,34 +1040,36 @@ chmod 660 $HESTIA/conf/hestia.conf
 
 # Web stack
 if [ "$apache" = 'yes' ] && [ "$nginx" = 'no' ] ; then
-    echo "WEB_SYSTEM='apache2'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_RGROUPS='www-data'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_PORT='80'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_SSL_PORT='443'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_SSL='mod_ssl'"  >> $HESTIA/conf/hestia.conf
-    echo "STATS_SYSTEM='awstats'" >> $HESTIA/conf/hestia.conf
+    write_config_value "WEB_SYSTEM" "apache2"
+    write_config_value "WEB_RGROUPS" "www-data"
+    write_config_value "WEB_PORT" "80"
+    write_config_value "WEB_SSL_PORT" "443"
+    write_config_value "WEB_SSL" "mod_ssl"
+    write_config_value "STATS_SYSTEM" "awstats"
 fi
+
 if [ "$apache" = 'yes' ] && [ "$nginx"  = 'yes' ] ; then
-    echo "WEB_SYSTEM='apache2'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_RGROUPS='www-data'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_PORT='8080'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_SSL_PORT='8443'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_SSL='mod_ssl'"  >> $HESTIA/conf/hestia.conf
-    echo "PROXY_SYSTEM='nginx'" >> $HESTIA/conf/hestia.conf
-    echo "PROXY_PORT='80'" >> $HESTIA/conf/hestia.conf
-    echo "PROXY_SSL_PORT='443'" >> $HESTIA/conf/hestia.conf
-    echo "STATS_SYSTEM='awstats'" >> $HESTIA/conf/hestia.conf
+    write_config_value "WEB_SYSTEM" "apache2"
+    write_config_value "WEB_RGROUPS" "www-data"
+    write_config_value "WEB_PORT" "8080"
+    write_config_value "WEB_SSL_PORT" "8443"
+    write_config_value "WEB_SSL" "mod_ssl"
+    write_config_value "PROXY_SYSTEM" "nginx"
+    write_config_value "PROXY_PORT" "80"
+    write_config_value "PROXY_SSL_PORT" "443"
+    write_config_value "STATS_SYSTEM" "awstats"
 fi
+
 if [ "$apache" = 'no' ] && [ "$nginx"  = 'yes' ]; then
-    echo "WEB_SYSTEM='nginx'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_PORT='80'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_SSL_PORT='443'" >> $HESTIA/conf/hestia.conf
-    echo "WEB_SSL='openssl'"  >> $HESTIA/conf/hestia.conf
-    echo "STATS_SYSTEM='awstats'" >> $HESTIA/conf/hestia.conf
+    write_config_value "WEB_SYSTEM" "nginx"
+    write_config_value "WEB_PORT" "80"
+    write_config_value "WEB_SSL_PORT" "443"
+    write_config_value "WEB_SSL" "openssl"
+    write_config_value "STATS_SYSTEM" "awstats"
 fi
 
 if [ "$phpfpm" = 'yes' ] || [ "$multiphp" = 'yes' ]; then
-    echo "WEB_BACKEND='php-fpm'" >> $HESTIA/conf/hestia.conf
+    write_config_value "WEB_BACKEND" "php-fpm"
 fi
 
 # Database stack
@@ -1065,81 +1087,81 @@ if [ ! -z "$installed_db_types" ]; then
         sort -r -u |\
         sed "/^$/d"|\
         sed ':a;N;$!ba;s/\n/,/g')
-    echo "DB_SYSTEM='$db'" >> $HESTIA/conf/hestia.conf
+    write_config_value "DB_SYSTEM" "$db"
 fi
 
 # FTP stack
 if [ "$vsftpd" = 'yes' ]; then
-    echo "FTP_SYSTEM='vsftpd'" >> $HESTIA/conf/hestia.conf
+    write_config_value "FTP_SYSTEM" "vsftpd"
 fi
 if [ "$proftpd" = 'yes' ]; then
-    echo "FTP_SYSTEM='proftpd'" >> $HESTIA/conf/hestia.conf
+    write_config_value "FTP_SYSTEM" "proftpd"
 fi
 
 # DNS stack
 if [ "$named" = 'yes' ]; then
-    echo "DNS_SYSTEM='bind9'" >> $HESTIA/conf/hestia.conf
+    write_config_value "DNS_SYSTEM" "bind9"
 fi
 
 # Mail stack
 if [ "$exim" = 'yes' ]; then
-    echo "MAIL_SYSTEM='exim4'" >> $HESTIA/conf/hestia.conf
+    write_config_value "MAIL_SYSTEM" "exim4"
     if [ "$clamd" = 'yes'  ]; then
-        echo "ANTIVIRUS_SYSTEM='clamav-daemon'" >> $HESTIA/conf/hestia.conf
+        write_config_value "ANTIVIRUS_SYSTEM" "clamav-daemon"
     fi
     if [ "$spamd" = 'yes' ]; then
-        echo "ANTISPAM_SYSTEM='spamassassin'" >> $HESTIA/conf/hestia.conf
+        write_config_value "ANTISPAM_SYSTEM" "spamassassin"
     fi
     if [ "$dovecot" = 'yes' ]; then
-        echo "IMAP_SYSTEM='dovecot'" >> $HESTIA/conf/hestia.conf
+        write_config_value "IMAP_SYSTEM" "dovecot"
     fi
 fi
 
 # Cron daemon
-echo "CRON_SYSTEM='cron'" >> $HESTIA/conf/hestia.conf
+write_config_value "CRON_SYSTEM" "cron"
 
 # Firewall stack
 if [ "$iptables" = 'yes' ]; then
-    echo "FIREWALL_SYSTEM='iptables'" >> $HESTIA/conf/hestia.conf
+    write_config_value "FIREWALL_SYSTEM" "iptables"
 fi
 if [ "$iptables" = 'yes' ] && [ "$fail2ban" = 'yes' ]; then
-    echo "FIREWALL_EXTENSION='fail2ban'" >> $HESTIA/conf/hestia.conf
+    write_config_value "FIREWALL_EXTENSION" "fail2ban"
 fi
 
 # Disk quota
 if [ "$quota" = 'yes' ]; then
-    echo "DISK_QUOTA='yes'" >> $HESTIA/conf/hestia.conf
+    write_config_value "DISK_QUOTA" "yes"
 else
-    echo "DISK_QUOTA='no'" >> $HESTIA/conf/hestia.conf
+    write_config_value "DISK_QUOTA" "no"
 fi
 
 # Backups
-echo "BACKUP_SYSTEM='local'" >> $HESTIA/conf/hestia.conf
-echo "BACKUP_GZIP='4'" >> $HESTIA/conf/hestia.conf
-echo "BACKUP_MODE='zstd'" >> $HESTIA/conf/hestia.conf
+write_config_value "BACKUP_SYSTEM" "local"
+write_config_value "BACKUP_GZIP" "4"
+write_config_value "BACKUP_MODE" "zstd"
 
 # Language
-echo "LANGUAGE='$lang'" >> $HESTIA/conf/hestia.conf
+write_config_value "LANGUAGE" "$lang"
 
 # Login in screen
-echo "LOGIN_STYLE='default'" >> $HESTIA/conf/hestia.conf
+write_config_value "LOGIN_STYLE" "default"
 
 # Theme
-echo "THEME='dark'" >> $HESTIA/conf/hestia.conf
+write_config_value "THEME" "dark"
 
 # Inactive session timeout
-echo "INACTIVE_SESSION_TIMEOUT='60'" >> $HESTIA/conf/hestia.conf
+write_config_value "INACTIVE_SESSION_TIMEOUT" "60"
 
 # Do not allow users to create subdomains when they don't own the domain
-echo "ENFORCE_SUBDOMAIN_OWNERSHIP='yes'" >> $HESTIA/conf/hestia.conf
+write_config_value "ENFORCE_SUBDOMAIN_OWNERSHIP" "yes"
 
 # Version & Release Branch
-echo "VERSION='${HESTIA_INSTALL_VER}'" >> $HESTIA/conf/hestia.conf
-echo "RELEASE_BRANCH='release'" >> $HESTIA/conf/hestia.conf
+write_config_value "VERSION" "${HESTIA_INSTALL_VER}"
+write_config_value "RELEASE_BRANCH" "release"
 
 # Email notifications after upgrade
-echo "UPGRADE_SEND_EMAIL='false'" >> $HESTIA/conf/hestia.conf
-echo "UPGRADE_SEND_EMAIL_LOG='true'" >> $HESTIA/conf/hestia.conf
+write_config_value "UPGRADE_SEND_EMAIL" "true"
+write_config_value "UPGRADE_SEND_EMAIL_LOG" "false"
 
 # Installing hosting packages
 cp -rf $HESTIA_INSTALL_DIR/packages $HESTIA/data/
@@ -1453,7 +1475,7 @@ if [ "$mysql" = 'yes' ]; then
     rm -fr phpMyAdmin-$pma_v-all-languages
     rm -f phpMyAdmin-$pma_v-all-languages.tar.gz
 
-    echo "DB_PMA_ALIAS='phpmyadmin'" >> $HESTIA/conf/hestia.conf
+    write_config_value "DB_PMA_ALIAS" "phpmyadmin"
     $HESTIA/bin/v-change-sys-db-alias 'pma' "phpmyadmin"
 
     # Special thanks to Pavel Galkin (https://skurudo.ru)
@@ -1479,7 +1501,7 @@ if [ "$postgresql" = 'yes' ]; then
     fi
     cp -f $HESTIA_INSTALL_DIR/pga/config.inc.php /etc/phppgadmin/
 
-    echo "DB_PGA_ALIAS='phppgadmin'" >> $HESTIA/conf/hestia.conf
+    write_config_value "DB_PGA_ALIAS" "phppgadmin"
     $HESTIA/bin/v-change-sys-db-alias 'pga' "phppgadmin"
 fi
 
@@ -1660,8 +1682,8 @@ echo "[ * ] Install Roundcube..."
 # Min requirements Dovecote + Exim + Mysql
 
 if [ "$mysql" == 'yes' ] && [ "$dovecot" == "yes" ]; then
-    $HESTIA/bin/v-add-sys-roundcube 
-    echo "WEBMAIL_ALIAS='webmail'" >> $HESTIA/conf/hestia.conf
+    $HESTIA/bin/v-add-sys-roundcube
+    write_config_value "WEBMAIL_ALIAS" "webmail"
 fi
 
 
@@ -1670,8 +1692,8 @@ fi
 #----------------------------------------------------------#
 
 if [ "$api" = "yes" ]; then
-    echo "API='yes'" >> $HESTIA/conf/hestia.conf
-    echo "API_ALLOWED_IP='127.0.0.1'" >> $HESTIA/conf/hestia.conf
+    write_config_value "API" "yes"
+    write_config_value "API_ALLOWED_IP" ""
 else
     $HESTIA/bin/v-change-sys-api disable
 fi
@@ -1901,4 +1923,8 @@ if [ "$interactive" = 'yes' ]; then
     fi
 fi
 
+# Clean-up
+# Sort final configuration file
+sort_config_file
+
 # EOF

+ 6 - 16
install/upgrade/versions/1.4.0.sh

@@ -106,20 +106,10 @@ if [ -f /etc/apt/sources.list.d/postgresql.list ]; then
     sed -i 's|deb https://apt.postgresql.org/pub/repos/apt/|deb [arch=amd64] https://apt.postgresql.org/pub/repos/apt/|g' /etc/apt/sources.list.d/postgresql.list
 fi
 
-# New configuration value for enforcing subdomain ownership
-check=$(cat $HESTIA/conf/hestia.conf | grep 'ENFORCE_SUBDOMAIN_OWNERSHIP');
-if [ -z "$check" ]; then 
-    echo "[ * ] Setting ENFORCE_SUBDOMAIN_OWNERSHIP to no..."
-    echo "ENFORCE_SUBDOMAIN_OWNERSHIP='no'" >> $HESTIA/conf/hestia.conf
-fi
-
-# New API feature to set allowed IPs
-if [ "$api" = "yes" ]; then
-    check=$(cat $HESTIA/conf/hestia.conf | grep 'API_ALLOWED_IP');
-    if [ -z "$check" ]; then 
-        echo "[ * ] Setting API_ALLOWED_IP to allow-all..."
-        echo "API_ALLOWED_IP='allow-all'" >> $HESTIA/conf/hestia.conf
+# Remove API file if API is set to "no"
+if [ "$API" = "no" ]; then
+    if [ -f "$HESTIA/web/api/index.php" ]; then
+        echo "[ * ] Disabling API access..."
+        $HESTIA/bin/v-change-sys-api remove
     fi
-else
-    $HESTIA/bin/v-change-sys-api disable
-fi
+fi

+ 0 - 2
src/deb/hestia/postinst

@@ -72,8 +72,6 @@ upgrade_roundcube | tee -a $LOG
 # Upgrade Rainloop if applicable
 upgrade_rainloop | tee -a $LOG
 
-# Check disabled API
-disable_api | tee -a $LOG
 # Set new version number in hestia.conf
 upgrade_set_version $new_version
 

+ 24 - 0
web/css/src/themes/dark.css

@@ -703,6 +703,21 @@ label:hover {
   box-shadow: 0px 1px 4px rgba(0,0,0,0.35);
 }
 
+textarea::-webkit-input-placeholder {
+  color: #bbb !important;
+}
+
+textarea:focus::-webkit-input-placeholder {
+  color: #909090 !important;
+}
+
+textarea::-moz-placeholder {
+  color: #bbb !important;
+}
+textarea:focus::-moz-placeholder {
+  color: #909090 !important;
+}
+
 select.vst-list:-moz-focusring {
 
 }
@@ -1104,6 +1119,10 @@ a.button.cancel {
   color: #e8e8e8 !important;
 }
 
+.section-title {
+  border-bottom-color: #484848 !important;
+}
+
 .qr-code {
   border: 1px solid #3b3b3b;
   box-shadow: 0px 1px 4px rgba(0,0,0,0.35);
@@ -1513,6 +1532,11 @@ form#vstobjects.suspended {
   color: #fff !important;
 }
 
+.admin-warning-button {
+    padding-left: 65px!important;
+    padding-right: 65px!important;
+}
+
 @media screen and (max-width: 950px) {
   .helper-container {
     display: none;

+ 39 - 4
web/css/src/themes/default.css

@@ -1506,6 +1506,14 @@ div.l-content > div.l-separator:nth-of-type(4) {
   padding-right: 6px;
 }
 
+.body-user .l-unit.animated.fadeIn {
+  line-height: 2rem;
+}
+
+.body-user .actions-panel {
+  line-height: 2rem;
+}
+
 .subtitle {
   color: #cc3366;
   font-size: 0.8rem;
@@ -2814,6 +2822,11 @@ a.vst-text:active b{
   width: 360px;
 }
 
+.vst-textinput.short.console {
+  height: 80px;
+  overflow: scroll;
+}
+
 #advanced-options .console{
   width: 833px;
   height: 600px;
@@ -2912,7 +2925,6 @@ a.vst-text:active b{
 }
 
 .additional-control {
-  margin-left: 17px;
   color: #326b9b;
   border-bottom: 0px solid #326b9b;
   font-size: 0.8rem;
@@ -3279,13 +3291,30 @@ a.button.cancel {
 }
 
 .page-title {
-  font-size: 1.4rem!important;
-  font-weight: 500!important;
-  padding-bottom: 30px!important;
+  font-size: 1.4rem !important;
+  font-weight: 500 !important;
+  padding-bottom: 30px !important;
   letter-spacing: -0.01em;
   cursor: default;
 }
 
+.section-title {
+  cursor: default;
+  font-size: 1.2rem!important;
+  font-weight: 600!important;
+  padding-bottom: 12px!important;
+  padding-top: 28px!important;
+  letter-spacing: -0.01em;
+  border-bottom: 1px solid #ccc;
+  cursor: pointer;
+}
+
+.section-hide-button {
+  margin-top: 30px;
+  display: inline-block;
+  margin-left: -14px;
+}
+
 .qr-code {
   border: 1px solid #cfcfcf;
   border-radius: 4px;
@@ -3672,6 +3701,11 @@ form#vstobjects.suspended {
   max-width: 140px;
 }
 
+.admin-warning-button {
+  padding-left: 59px !important;
+  padding-right: 59px !important;
+}
+
 .float-left {
   float: left;
 }
@@ -4063,6 +4097,7 @@ form#vstobjects.suspended {
   width: 270px;
 }
 
+
 @media screen and (max-width: 950px) {
   .helper-container {
     display: none;

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
web/css/themes/dark.min.css


Разница между файлами не показана из-за своего большого размера
+ 0 - 0
web/css/themes/default.min.css


+ 1 - 1
web/edit/user/log/index.php

@@ -1,7 +1,7 @@
 <?php
 error_reporting(NULL);
 ob_start();
-$TAB = 'USER';
+$TAB = 'LOG';
 
 // Main include
 include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");

+ 180 - 160
web/templates/admin/add_db.html

@@ -50,168 +50,188 @@
                                     ?>
                                 </td>
                             </tr>
-                            <tr>
-                                <td class="hint">
-                                    <?php print sprintf(_('Prefix %s will be automatically added to database name and database user'),'<b>'.$user.'_</b>'); ?>
-                                </td>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text step-top input-label">
-                                    <?php print _('Database');?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <input type="text" size="20" class="vst-input" name="v_database" value="<?=htmlentities(trim($v_database, "'"))?>">
-                                    <small class="hint"></small>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Type');?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <select class="vst-list" name="v_type">
+                            <? if (($user == 'admin') && (($_GET['accept'] !== "true")))  {?>
+                                <tr>
+                                    <td class="step-top">
+                                        <span class="alert alert-danger alert-with-icon">
+                                            <i class="fas fa-exclamation"></i>
+                                            <?=_('Avoid adding web domains on admin account')?>
+                                        </span>
+                                    </td>
+                                </tr>
+                            <?php } ?>
+                            <? if (($user == 'admin') && (empty($_GET['accept']))) {?>
+                                <tr>
+                                    <td class="step-top">
+                                        <span><a href="/add/user/" class="vst-advanced admin-warning-button"><?=_('Add User')?></a></span>
+                                        <span><a href="/add/db/?accept=true" class="vst-advanced button danger admin-warning-button"><?=_('Continue')?></a> </span>
+                                    </td>
+                                </tr>
+                            <? } ?>
+                            <? if (($user == 'admin') && (($_GET['accept'] === "true")) || ($user !== "admin"))  {?>
+                                <tr>
+                                    <td class="hint">
+                                        <?php print sprintf(_('Prefix %s will be automatically added to database name and database user'),'<b>'.$user.'_</b>'); ?>
+                                    </td>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td class="vst-text step-top input-label">
+                                        <?php print _('Database');?>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>
+                                        <input type="text" size="20" class="vst-input" name="v_database" value="<?=htmlentities(trim($v_database, "'"))?>">
+                                        <small class="hint"></small>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td class="vst-text input-label">
+                                        <?php print _('Type');?>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>
+                                        <select class="vst-list" name="v_type">
+                                            <?php
+                                                foreach ($db_types as $key => $value) {
+                                                    echo "\n\t\t\t\t\t\t\t\t\t\t<option value=\"".htmlentities($value)."\"";
+                                                    if ((!empty($v_type)) && ( $value == $v_type )) echo ' selected';
+                                                    echo ">".htmlentities($value)."</option>";
+                                                }
+                                            ?>
+                                        </select>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td class="vst-text input-label">
                                         <?php
-                                            foreach ($db_types as $key => $value) {
-                                                echo "\n\t\t\t\t\t\t\t\t\t\t<option value=\"".htmlentities($value)."\"";
-                                                if ((!empty($v_type)) && ( $value == $v_type )) echo ' selected';
-                                                echo ">".htmlentities($value)."</option>";
-                                            }
+                                            print _('Username');
+                                            echo "&nbsp;&nbsp;&nbsp;&nbsp;<em><small>(".sprintf(_('maximum characters length, including prefix'), 32).")</small></em>";
                                         ?>
-                                    </select>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php
-                                        print _('Username');
-                                        echo "&nbsp;&nbsp;&nbsp;&nbsp;<em><small>(".sprintf(_('maximum characters length, including prefix'), 32).")</small></em>";
-                                    ?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <input type="text" size="20" class="vst-input" name="v_dbuser" value="<?=htmlentities(trim($v_dbuser, "'"))?>">
-                                    <small class="hint"></small>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Password');?> <a href="javascript:randomString();" title="<?php print _('generate');?>"><i class="fas fa-sync status-icon green icon-large"></i></a>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <input type="text" size="20" class="vst-input password" name="v_password"><br />
-                                    <meter max="4" id="meter"></meter>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text">
-                                    <?php print _('Your password must have at least');?>:
-                                    <ul>
-                                        <li><?php print _('8 characters long');?></li>
-                                        <li><?php print _('1 uppercase & 1 lowercase character');?></li>
-                                        <li><?php print _('1 number');?></li>
-                                    </ul>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Send login credentials to email address') ?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <input type="text"  class="vst-input" name="v_db_email" value="<?=htmlentities(trim($v_db_email, "'"))?>">
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="step-top vst-text" style="/*padding: 32px 0 20px 0;*/">
-                                    <a href="javascript:elementHideShow('advanced-opts');" class="vst-advanced"><?php print _('Advanced options');?></a>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="step-top">
-                                    <table id="advanced-opts" style="display: none;">
-                                        <tr>
-                                            <td class="vst-text input-label">
-                                                <?php print _('Host');?>
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <td>
-                                                <select class="vst-list" name="v_host">
-                                                    <?php
-                                                        foreach ($db_hosts as $value) {
-                                                            echo "\n\t\t\t\t\t\t\t\t\t\t<option value=\"".htmlentities($value)."\"";
-                                                            if ((!empty($v_host)) && ( $value == $v_host )) echo ' selected';
-                                                            echo ">".htmlentities($value)."</option>";
-                                                        }
-                                                    ?>
-                                                </select>
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <td class="vst-text input-label">
-                                                <?php print _('Charset');?>
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <td>
-                                                <select class="vst-list" name="v_charset">
-                                                    <option value=big5 <?php if ((!empty($v_charset)) && ( $v_charset == 'big5')) echo 'selected';?> >big5</option>
-                                                    <option value=dec8 <?php if ((!empty($v_charset)) && ( $v_charset == 'dec8')) echo 'selected';?> >dec8</option>
-                                                    <option value=cp850 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp850')) echo 'selected';?> >cp850</option>
-                                                    <option value=hp8 <?php if ((!empty($v_charset)) && ( $v_charset == 'hp8')) echo 'selected';?> >hp8</option>
-                                                    <option value=koi8r <?php if ((!empty($v_charset)) && ( $v_charset == 'koi8r')) echo 'selected';?> >koi8r</option>
-                                                    <option value=latin1 <?php if ((!empty($v_charset)) && ( $v_charset == 'latin1')) echo 'selected';?> >latin1</option>
-                                                    <option value=latin2 <?php if ((!empty($v_charset)) && ( $v_charset == 'latin2')) echo 'selected';?> >latin2</option>
-                                                    <option value=swe7 <?php if ((!empty($v_charset)) && ( $v_charset == 'swe7')) echo 'selected';?> >swe7</option>
-                                                    <option value=ascii <?php if ((!empty($v_charset)) && ( $v_charset == 'ascii')) echo 'selected';?> >ascii</option>
-                                                    <option value=ujis <?php if ((!empty($v_charset)) && ( $v_charset == 'ujis')) echo 'selected';?> >ujis</option>
-                                                    <option value=sjis <?php if ((!empty($v_charset)) && ( $v_charset == 'sjis')) echo 'selected';?> >sjis</option>
-                                                    <option value=hebrew <?php if ((!empty($v_charset)) && ( $v_charset == 'hebrew')) echo 'selected';?> >hebrew</option>
-                                                    <option value=tis620 <?php if ((!empty($v_charset)) && ( $v_charset == 'tis620')) echo 'selected';?> >tis620</option>
-                                                    <option value=euckr <?php if ((!empty($v_charset)) && ( $v_charset == 'euckr')) echo 'selected';?> >euckr</option>
-                                                    <option value=koi8u <?php if ((!empty($v_charset)) && ( $v_charset == 'koi8u')) echo 'selected';?> >koi8u</option>
-                                                    <option value=gb2312 <?php if ((!empty($v_charset)) && ( $v_charset == 'gb2312')) echo 'selected';?> >gb2312</option>
-                                                    <option value=greek <?php if ((!empty($v_charset)) && ( $v_charset == 'greek')) echo 'selected';?> >greek</option>
-                                                    <option value=cp1250 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp1250')) echo 'selected';?> >cp1250</option>
-                                                    <option value=gbk <?php if ((!empty($v_charset)) && ( $v_charset == 'gbk')) echo 'selected';?> >gbk</option>
-                                                    <option value=latin5 <?php if ((!empty($v_charset)) && ( $v_charset == 'latin5')) echo 'selected';?> >latin5</option>
-                                                    <option value=armscii8 <?php if ((!empty($v_charset)) && ( $v_charset == 'armscii8')) echo 'selected';?> >armscii8</option>
-                                                    <option value=utf8 <?php if ((!empty($v_charset)) && ( $v_charset == 'utf8')) echo 'selected';?> <?php if (empty($v_charset)) echo 'selected';?> >utf8</option>
-                                                    <option value=utf8mb4 <?php if ((!empty($v_charset)) && ( $v_charset == 'utf8mb4')) echo 'selected';?> >utf8mb4</option>
-                                                    <option value=ucs2 <?php if ((!empty($v_charset)) && ( $v_charset == 'ucs2')) echo 'selected';?> >ucs2</option>
-                                                    <option value=cp866 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp866')) echo 'selected';?> >cp866</option>
-                                                    <option value=keybcs2 <?php if ((!empty($v_charset)) && ( $v_charset == 'keybcs2')) echo 'selected';?> >keybcs2</option>
-                                                    <option value=macce <?php if ((!empty($v_charset)) && ( $v_charset == 'macce')) echo 'selected';?> >macce</option>
-                                                    <option value=macroman <?php if ((!empty($v_charset)) && ( $v_charset == 'macroman')) echo 'selected';?> >macroman</option>
-                                                    <option value=cp852 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp852')) echo 'selected';?> >cp852</option>
-                                                    <option value=latin7 <?php if ((!empty($v_charset)) && ( $v_charset == 'latin7')) echo 'selected';?> >latin7</option>
-                                                    <option value=cp1251 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp1251')) echo 'selected';?> >cp1251</option>
-                                                    <option value=cp1256 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp1256')) echo 'selected';?> >cp1256</option>
-                                                    <option value=cp1257 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp1257')) echo 'selected';?> >cp1257</option>
-                                                    <option value=binary <?php if ((!empty($v_charset)) && ( $v_charset == 'binary')) echo 'selected';?> >binary</option>
-                                                    <option value=geostd8 <?php if ((!empty($v_charset)) && ( $v_charset == 'geostd8')) echo 'selected';?> >geostd8</option>
-                                                    <option value=cp932 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp932')) echo 'selected';?> >cp932</option>
-                                                    <option value=eucjpms <?php if ((!empty($v_charset)) && ( $v_charset == 'eucjpms')) echo 'selected';?> >eucjpms</option>
-                                                </select>
-                                            </td>
-                                        </tr>
-                                    </table>
-                                </td>
-                            </tr>
-                        </table>
-                        <table class="data-col2">
-                        </table>
-                    </td>
-                </tr>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>
+                                        <input type="text" size="20" class="vst-input" name="v_dbuser" value="<?=htmlentities(trim($v_dbuser, "'"))?>">
+                                        <small class="hint"></small>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td class="vst-text input-label">
+                                        <?php print _('Password');?> <a href="javascript:randomString();" title="<?php print _('generate');?>"><i class="fas fa-sync status-icon green icon-large"></i></a>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>
+                                        <input type="text" size="20" class="vst-input password" name="v_password"><br />
+                                        <meter max="4" id="meter"></meter>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td class="vst-text">
+                                        <?php print _('Your password must have at least');?>:
+                                        <ul>
+                                            <li><?php print _('8 characters long');?></li>
+                                            <li><?php print _('1 uppercase & 1 lowercase character');?></li>
+                                            <li><?php print _('1 number');?></li>
+                                        </ul>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td class="vst-text input-label">
+                                        <?php print _('Send login credentials to email address') ?>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>
+                                        <input type="text"  class="vst-input" name="v_db_email" value="<?=htmlentities(trim($v_db_email, "'"))?>">
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td class="step-top vst-text" style="/*padding: 32px 0 20px 0;*/">
+                                        <a href="javascript:elementHideShow('advanced-opts');" class="vst-advanced"><?php print _('Advanced options');?></a>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td class="step-top">
+                                        <table id="advanced-opts" style="display: none;">
+                                            <tr>
+                                                <td class="vst-text input-label">
+                                                    <?php print _('Host');?>
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <td>
+                                                    <select class="vst-list" name="v_host">
+                                                        <?php
+                                                            foreach ($db_hosts as $value) {
+                                                                echo "\n\t\t\t\t\t\t\t\t\t\t<option value=\"".htmlentities($value)."\"";
+                                                                if ((!empty($v_host)) && ( $value == $v_host )) echo ' selected';
+                                                                echo ">".htmlentities($value)."</option>";
+                                                            }
+                                                        ?>
+                                                    </select>
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <td class="vst-text input-label">
+                                                    <?php print _('Charset');?>
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <td>
+                                                    <select class="vst-list" name="v_charset">
+                                                        <option value=big5 <?php if ((!empty($v_charset)) && ( $v_charset == 'big5')) echo 'selected';?> >big5</option>
+                                                        <option value=dec8 <?php if ((!empty($v_charset)) && ( $v_charset == 'dec8')) echo 'selected';?> >dec8</option>
+                                                        <option value=cp850 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp850')) echo 'selected';?> >cp850</option>
+                                                        <option value=hp8 <?php if ((!empty($v_charset)) && ( $v_charset == 'hp8')) echo 'selected';?> >hp8</option>
+                                                        <option value=koi8r <?php if ((!empty($v_charset)) && ( $v_charset == 'koi8r')) echo 'selected';?> >koi8r</option>
+                                                        <option value=latin1 <?php if ((!empty($v_charset)) && ( $v_charset == 'latin1')) echo 'selected';?> >latin1</option>
+                                                        <option value=latin2 <?php if ((!empty($v_charset)) && ( $v_charset == 'latin2')) echo 'selected';?> >latin2</option>
+                                                        <option value=swe7 <?php if ((!empty($v_charset)) && ( $v_charset == 'swe7')) echo 'selected';?> >swe7</option>
+                                                        <option value=ascii <?php if ((!empty($v_charset)) && ( $v_charset == 'ascii')) echo 'selected';?> >ascii</option>
+                                                        <option value=ujis <?php if ((!empty($v_charset)) && ( $v_charset == 'ujis')) echo 'selected';?> >ujis</option>
+                                                        <option value=sjis <?php if ((!empty($v_charset)) && ( $v_charset == 'sjis')) echo 'selected';?> >sjis</option>
+                                                        <option value=hebrew <?php if ((!empty($v_charset)) && ( $v_charset == 'hebrew')) echo 'selected';?> >hebrew</option>
+                                                        <option value=tis620 <?php if ((!empty($v_charset)) && ( $v_charset == 'tis620')) echo 'selected';?> >tis620</option>
+                                                        <option value=euckr <?php if ((!empty($v_charset)) && ( $v_charset == 'euckr')) echo 'selected';?> >euckr</option>
+                                                        <option value=koi8u <?php if ((!empty($v_charset)) && ( $v_charset == 'koi8u')) echo 'selected';?> >koi8u</option>
+                                                        <option value=gb2312 <?php if ((!empty($v_charset)) && ( $v_charset == 'gb2312')) echo 'selected';?> >gb2312</option>
+                                                        <option value=greek <?php if ((!empty($v_charset)) && ( $v_charset == 'greek')) echo 'selected';?> >greek</option>
+                                                        <option value=cp1250 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp1250')) echo 'selected';?> >cp1250</option>
+                                                        <option value=gbk <?php if ((!empty($v_charset)) && ( $v_charset == 'gbk')) echo 'selected';?> >gbk</option>
+                                                        <option value=latin5 <?php if ((!empty($v_charset)) && ( $v_charset == 'latin5')) echo 'selected';?> >latin5</option>
+                                                        <option value=armscii8 <?php if ((!empty($v_charset)) && ( $v_charset == 'armscii8')) echo 'selected';?> >armscii8</option>
+                                                        <option value=utf8 <?php if ((!empty($v_charset)) && ( $v_charset == 'utf8')) echo 'selected';?> <?php if (empty($v_charset)) echo 'selected';?> >utf8</option>
+                                                        <option value=utf8mb4 <?php if ((!empty($v_charset)) && ( $v_charset == 'utf8mb4')) echo 'selected';?> >utf8mb4</option>
+                                                        <option value=ucs2 <?php if ((!empty($v_charset)) && ( $v_charset == 'ucs2')) echo 'selected';?> >ucs2</option>
+                                                        <option value=cp866 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp866')) echo 'selected';?> >cp866</option>
+                                                        <option value=keybcs2 <?php if ((!empty($v_charset)) && ( $v_charset == 'keybcs2')) echo 'selected';?> >keybcs2</option>
+                                                        <option value=macce <?php if ((!empty($v_charset)) && ( $v_charset == 'macce')) echo 'selected';?> >macce</option>
+                                                        <option value=macroman <?php if ((!empty($v_charset)) && ( $v_charset == 'macroman')) echo 'selected';?> >macroman</option>
+                                                        <option value=cp852 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp852')) echo 'selected';?> >cp852</option>
+                                                        <option value=latin7 <?php if ((!empty($v_charset)) && ( $v_charset == 'latin7')) echo 'selected';?> >latin7</option>
+                                                        <option value=cp1251 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp1251')) echo 'selected';?> >cp1251</option>
+                                                        <option value=cp1256 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp1256')) echo 'selected';?> >cp1256</option>
+                                                        <option value=cp1257 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp1257')) echo 'selected';?> >cp1257</option>
+                                                        <option value=binary <?php if ((!empty($v_charset)) && ( $v_charset == 'binary')) echo 'selected';?> >binary</option>
+                                                        <option value=geostd8 <?php if ((!empty($v_charset)) && ( $v_charset == 'geostd8')) echo 'selected';?> >geostd8</option>
+                                                        <option value=cp932 <?php if ((!empty($v_charset)) && ( $v_charset == 'cp932')) echo 'selected';?> >cp932</option>
+                                                        <option value=eucjpms <?php if ((!empty($v_charset)) && ( $v_charset == 'eucjpms')) echo 'selected';?> >eucjpms</option>
+                                                    </select>
+                                                </td>
+                                            </tr>
+                                        </table>
+                                    </td>
+                                </tr>
+                            </table>
+                            <table class="data-col2">
+                            </table>
+                        </td>
+                    </tr>
+                    <? } ?>
             </table>
         </form>
     </div>

+ 161 - 141
web/templates/admin/add_dns.html

@@ -51,161 +51,181 @@
                                     ?>
                                 </td>
                             </tr>
-                            <tr>
-                                <td class="vst-text step-top">
-                                    <?php print _('Domain');?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <input type="text" size="20" class="vst-input" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('IP address');?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <select class="vst-list" tabindex="-1" onchange="this.nextElementSibling.value=this.value">
-                                        <option value="">clear</option>
-                                        <?php
-                                            foreach ($v_ips as $ip => $value) {
-                                                $display_ip = empty($value['NAT']) ? $ip : "{$value['NAT']}";
-                                                echo "<option value='{$display_ip}'>" . htmlentities($display_ip) . "</option>\n";
-                                            }
-                                        ?>
-                                    </select>
-                                    <input type="text" size="20" class="vst-input vst-list-editor" name="v_ip" value="<?=htmlentities(trim($v_ip, "'"))?>">
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Template') . "<span class='optional'>" . strtoupper($_SESSION['DNS_SYSTEM']) . "</span>";?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <select class="vst-list" name="v_template">
-                                        <?php
-                                            foreach ($templates as $key => $value) {
-                                                echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
-                                                $svalue = "'".$value."'";
-                                                if ((!empty($v_template)) && ( $value == $v_template ) || ($svalue == $v_template)){
-                                                    echo ' selected' ;
+                            <? if (($user == 'admin') && (($_GET['accept'] !== "true")))  {?>
+                                <tr>
+                                    <td class="step-top">
+                                        <span class="alert alert-danger alert-with-icon">
+                                            <i class="fas fa-exclamation"></i>
+                                            <?=_('Avoid adding web domains on admin account')?>
+                                        </span>
+                                    </td>
+                                </tr>
+                            <?php } ?>
+                            <? if (($user == 'admin') && (empty($_GET['accept']))) {?>
+                                <tr>
+                                    <td class="step-top">
+                                        <span><a href="/add/user/" class="vst-advanced admin-warning-button"><?=_('Add User')?></a></span>
+                                        <span><a href="/add/dns/?accept=true" class="vst-advanced button danger admin-warning-button"><?=_('Continue')?></a> </span>
+                                    </td>
+                                </tr>
+                            <? } ?>
+                            <? if (($user == 'admin') && (($_GET['accept'] === "true")) || ($user !== "admin"))  {?>
+                                <tr>
+                                    <td class="vst-text step-top">
+                                        <?php print _('Domain');?>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>
+                                        <input type="text" size="20" class="vst-input" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td class="vst-text input-label">
+                                        <?php print _('IP address');?>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>
+                                        <select class="vst-list" tabindex="-1" onchange="this.nextElementSibling.value=this.value">
+                                            <option value="">clear</option>
+                                            <?php
+                                                foreach ($v_ips as $ip => $value) {
+                                                    $display_ip = empty($value['NAT']) ? $ip : "{$value['NAT']}";
+                                                    echo "<option value='{$display_ip}'>" . htmlentities($display_ip) . "</option>\n";
                                                 }
-                                                echo ">".htmlentities($value)."</option>\n";
-                                            }
-                                        ?>
-                                    </select>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label step-top">
-                                    <a href="javascript:elementHideShow('advtable');" class="vst-advanced"><?php print _('Advanced options');?></a>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text step-top">
-                                  <table style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
-                                        <tr>
-                                            <td class="vst-text input-label">
-                                                <?php print _('Expiration Date');?> <span class="optional">(<?=_('YYYY-MM-DD');?>)</span>
-                                            </td>
-                                        </tr>
-                                        <tr>
+                                            ?>
+                                        </select>
+                                        <input type="text" size="20" class="vst-input vst-list-editor" name="v_ip" value="<?=htmlentities(trim($v_ip, "'"))?>">
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td class="vst-text input-label">
+                                        <?php print _('Template') . "<span class='optional'>" . strtoupper($_SESSION['DNS_SYSTEM']) . "</span>";?>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td>
+                                        <select class="vst-list" name="v_template">
+                                            <?php
+                                                foreach ($templates as $key => $value) {
+                                                    echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
+                                                    $svalue = "'".$value."'";
+                                                    if ((!empty($v_template)) && ( $value == $v_template ) || ($svalue == $v_template)){
+                                                        echo ' selected' ;
+                                                    }
+                                                    echo ">".htmlentities($value)."</option>\n";
+                                                }
+                                            ?>
+                                        </select>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td class="vst-text input-label step-top">
+                                        <a href="javascript:elementHideShow('advtable');" class="vst-advanced"><?php print _('Advanced options');?></a>
+                                    </td>
+                                </tr>
+                                <tr>
+                                    <td class="vst-text step-top">
+                                    <table style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
+                                            <tr>
+                                                <td class="vst-text input-label">
+                                                    <?php print _('Expiration Date');?> <span class="optional">(<?=_('YYYY-MM-DD');?>)</span>
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <td>
+                                                    <input type="text" size="20" class="vst-input" name="v_exp" value="<?=htmlentities(trim($v_exp, "'"))?>">
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <td class="vst-text input-label">
+                                                    TTL
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <td>
+                                                    <input type="text" size="20" class="vst-input" name="v_ttl" value="<?=htmlentities(trim($v_ttl, "'"))?>">
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <td class="vst-text input-label">
+                                                    <?php print _('Name servers');?>
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <td>
+                                                    <input type="text" size="20" class="vst-input" name="v_ns1" value="<?=htmlentities(trim($v_ns1, "'"))?>">
+                                                    <span class="remove-ns additional-control delete"><?=_('delete')?></span>
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <td>
+                                                    <input type="text" size="20" class="vst-input" name="v_ns2" value="<?=htmlentities(trim($v_ns2, "'"))?>">
+                                                    <span class="remove-ns additional-control delete"><?=_('delete')?></span>
+                                                </td>
+                                            </tr>
+                                    <?  if($v_ns3)
+                                    echo '<tr>
                                             <td>
-                                                <input type="text" size="20" class="vst-input" name="v_exp" value="<?=htmlentities(trim($v_exp, "'"))?>">
+                                                <input type="text" size="20" class="vst-input" name="v_ns3" value="'.htmlentities(trim($v_ns3, "'")).'">
+                                                <span class="remove-ns additional-control delete">'._('delete').'</span>
                                             </td>
-                                        </tr>
-                                        <tr>
-                                            <td class="vst-text input-label">
-                                                TTL
-                                            </td>
-                                        </tr>
-                                        <tr>
+                                        </tr>';
+
+                                        if($v_ns4)
+                                        echo '<tr>
                                             <td>
-                                                <input type="text" size="20" class="vst-input" name="v_ttl" value="<?=htmlentities(trim($v_ttl, "'"))?>">
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <td class="vst-text input-label">
-                                                <?php print _('Name servers');?>
+                                                <input type="text" size="20" class="vst-input" name="v_ns4" value="'.htmlentities(trim($v_ns4, "'")).'">
+                                                <span class="remove-ns additional-control delete">'._('delete').'</span>
                                             </td>
-                                        </tr>
-                                        <tr>
+                                        </tr>';
+
+                                        if($v_ns5)
+                                        echo '<tr>
                                             <td>
-                                                <input type="text" size="20" class="vst-input" name="v_ns1" value="<?=htmlentities(trim($v_ns1, "'"))?>">
-                                                <span class="remove-ns additional-control delete"><?=_('delete')?></span>
+                                                <input type="text" size="20" class="vst-input" name="v_ns5" value="'.htmlentities(trim($v_ns5, "'")).'">
+                                                <span class="remove-ns additional-control delete">'._('delete').'</span>
                                             </td>
-                                        </tr>
-                                        <tr>
+                                        </tr>';
+
+                                        if($v_ns6)
+                                        echo '<tr>
                                             <td>
-                                                <input type="text" size="20" class="vst-input" name="v_ns2" value="<?=htmlentities(trim($v_ns2, "'"))?>">
-                                                <span class="remove-ns additional-control delete"><?=_('delete')?></span>
+                                                <input type="text" size="20" class="vst-input" name="v_ns6" value="'.htmlentities(trim($v_ns6, "'")).'">
+                                                <span class="remove-ns additional-control delete">'._('delete').'</span>
                                             </td>
-                                        </tr>
-                                <?  if($v_ns3)
-                                  echo '<tr>
-                                        <td>
-                                            <input type="text" size="20" class="vst-input" name="v_ns3" value="'.htmlentities(trim($v_ns3, "'")).'">
-                                            <span class="remove-ns additional-control delete">'._('delete').'</span>
-                                        </td>
-                                    </tr>';
-
-                                    if($v_ns4)
-                                    echo '<tr>
-                                        <td>
-                                            <input type="text" size="20" class="vst-input" name="v_ns4" value="'.htmlentities(trim($v_ns4, "'")).'">
-                                            <span class="remove-ns additional-control delete">'._('delete').'</span>
-                                        </td>
-                                    </tr>';
+                                        </tr>';
 
-                                    if($v_ns5)
-                                    echo '<tr>
-                                        <td>
-                                            <input type="text" size="20" class="vst-input" name="v_ns5" value="'.htmlentities(trim($v_ns5, "'")).'">
-                                            <span class="remove-ns additional-control delete">'._('delete').'</span>
-                                        </td>
-                                    </tr>';
-
-                                    if($v_ns6)
-                                    echo '<tr>
-                                        <td>
-                                            <input type="text" size="20" class="vst-input" name="v_ns6" value="'.htmlentities(trim($v_ns6, "'")).'">
-                                            <span class="remove-ns additional-control delete">'._('delete').'</span>
-                                        </td>
-                                    </tr>';
-
-                                    if($v_ns7)
-                                    echo '<tr>
-                                        <td>
-                                            <input type="text" size="20" class="vst-input" name="v_ns7" value="'.htmlentities(trim($v_ns7, "'")).'">
-                                            <span class="remove-ns additional-control delete">'._('delete').'</span>
-                                        </td>
-                                    </tr>';
+                                        if($v_ns7)
+                                        echo '<tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_ns7" value="'.htmlentities(trim($v_ns7, "'")).'">
+                                                <span class="remove-ns additional-control delete">'._('delete').'</span>
+                                            </td>
+                                        </tr>';
 
-                                    if($v_ns8)
-                                    echo '<tr>
-                                        <td>
-                                            <input type="text" size="20" class="vst-input" name="v_ns8" value="'.htmlentities(trim($v_ns8, "'")).'">
-                                            <span class="remove-ns additional-control delete">'._('delete').'</span>
+                                        if($v_ns8)
+                                        echo '<tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_ns8" value="'.htmlentities(trim($v_ns8, "'")).'">
+                                                <span class="remove-ns additional-control delete">'._('delete').'</span>
+                                            </td>
+                                        </tr>';
+                                    ?>
+                                    <tr class="add-ns" <? if($v_ns8) echo 'style="display:none;"'; ?> >
+                                        <td class="step-top-small">
+                                        <span class="add-ns-button additional-control add"><?=_('Add one more Name Server')?></span>
                                         </td>
-                                    </tr>';
-                                ?>
-                                <tr class="add-ns" <? if($v_ns8) echo 'style="display:none;"'; ?> >
-                                    <td class="step-top-small">
-                                      <span class="add-ns-button additional-control add"><?=_('Add one more Name Server')?></span>
+                                    </tr>
+                                        </table>
                                     </td>
                                 </tr>
-                                    </table>
-                                </td>
-                            </tr>
-                        </table>
-                        <table class="data-col2"></table>
-                    </td>
-                </tr>
+                            </table>
+                            <table class="data-col2"></table>
+                        </td>
+                    </tr>
+                <? } ?>
             </table>
         </form>
     </div>

+ 93 - 73
web/templates/admin/add_mail.html

@@ -51,104 +51,124 @@
                                     ?>
                                 </td>
                             </tr>
-                            <tr>
-                                <td class="vst-text step-top">
-                                    <?php print _('Domain');?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <input type="text" size="20" class="vst-input" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
-                                </td>
-                            </tr>
-                            <?php if($_SESSION['IMAP_SYSTEM']){?>                            
+                            <? if (($user == 'admin') && (($_GET['accept'] !== "true")))  {?>
                                 <tr>
-                                    <td class="vst-text step-top">
-                                        <?php print _('Webmail Client');?>
+                                    <td class="step-top">
+                                        <span class="alert alert-danger alert-with-icon">
+                                            <i class="fas fa-exclamation"></i>
+                                            <?=_('Avoid adding web domains on admin account')?>
+                                        </span>
                                     </td>
                                 </tr>
-                                <tr>
-                                    <td>
-                                        <select class="vst-list" name="v_webmail" tabindex="6" >
-                                            <?php foreach ($webmail_clients as $client){
-                                            echo "\t\t\t\t<option value=\"".htmlentities($client)."\"";
-                                            if ((!empty($v_webmail)) && ( $v_webmail == $client )) {
-                                                echo ' selected' ;
-                                            }
-                                            echo ">".htmlentities(ucfirst($client))."</option>\n";
-                                            }
-                                            ?>
-                                            <option value="" <?php if(empty($v_webmail)){ echo "selected";}?>><?php print _('Disabled');?></option>
-                                        </select>
-                                    </td>
-                                </tr>
-                            <?php } ?>
-                            <tr>
-                                <td class="vst-text input-label step-top">
-                                    <label><input type="checkbox" size="20" class="vst-checkbox" name="v_antispam" <?php if ((empty($v_antispam)) || ($v_antispam == 'yes')) echo "checked=yes"; ?>><?php print _('AntiSpam Support');?></label>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <label><input type="checkbox" size="20" class="vst-checkbox" name="v_antivirus" <?php if ((empty($v_antivirus)) || ($v_antivirus == 'yes')) echo "checked=yes"; ?>><?php print _('AntiVirus Support');?></label>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <label><input type="checkbox" size="20" class="vst-checkbox" name="v_dkim" <?php if (isset($v_dkim)&&$v_dkim == 'yes') echo "checked=yes"; ?>><?php print _('DKIM Support');?></label>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <label><input type="checkbox" size="20" class="vst-checkbox" name="v_smtp_relay" <?php if ($v_smtp_relay == 'true') echo "checked=yes"; ?> onclick="javascript:elementHideShow('smtp_relay_table');"><?php print _('SMTP Relay');?></label>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="step-left">
-                                    <table style="display:<?php if ($v_smtp_relay == 'true'){echo 'block';} else {echo 'none';} ?>;" id="smtp_relay_table">
+                                <?php } ?>
+                                <? if (($user == 'admin') && (empty($_GET['accept']))) {?>
+                                    <tr>
+                                        <td class="step-top">
+                                            <span><a href="/add/user/" class="vst-advanced admin-warning-button"><?=_('Add User')?></a></span>
+                                            <span><a href="/add/mail/?accept=true" class="vst-advanced button danger admin-warning-button"><?=_('Continue')?></a> </span>
+                                        </td>
+                                    </tr>
+                                <? } ?>
+                                <? if (($user == 'admin') && (($_GET['accept'] === "true")) || ($user !== "admin"))  {?>
                                         <tr>
-                                            <td class="input-label vst-text">
-                                                <?php print _('Host');?>
+                                            <td class="vst-text step-top">
+                                                <?php print _('Domain');?>
                                             </td>
                                         </tr>
                                         <tr>
                                             <td>
-                                                <input type="text" size="20" class="vst-input" name="v_smtp_relay_host" value="<?=htmlentities(trim($v_smtp_relay_host, "'"))?>">
+                                                <input type="text" size="20" class="vst-input" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
                                             </td>
                                         </tr>
+                                        <?php if($_SESSION['WEBMAIL_SYSTEM']){?>                            
+                                            <tr>
+                                                <td class="vst-text step-top">
+                                                    <?php print _('Webmail Client');?>
+                                                </td>
+                                            </tr>
+                                            <tr>
+                                                <td>
+                                                    <select class="vst-list" name="v_webmail" tabindex="6" >
+                                                        <?php foreach ($webmail_clients as $client){
+                                                        echo "\t\t\t\t<option value=\"".htmlentities($client)."\"";
+                                                        if ((!empty($v_webmail)) && ( $v_webmail == $client )) {
+                                                            echo ' selected' ;
+                                                        }
+                                                        echo ">".htmlentities(ucfirst($client))."</option>\n";
+                                                        }
+                                                        ?>
+                                                        <option value="" <?php if(empty($v_webmail)){ echo "selected";}?>><?php print _('Disabled');?></option>
+                                                    </select>
+                                                </td>
+                                            </tr>
+                                        <?php } ?>
                                         <tr>
-                                            <td class="input-label vst-text">
-                                                <?php print _('Port');?>
+                                            <td class="vst-text input-label step-top">
+                                                <label><input type="checkbox" size="20" class="vst-checkbox" name="v_antispam" <?php if ((empty($v_antispam)) || ($v_antispam == 'yes')) echo "checked=yes"; ?>><?php print _('AntiSpam Support');?></label>
                                             </td>
                                         </tr>
                                         <tr>
-                                            <td>
-                                                <input type="text" size="20" class="vst-input" name="v_smtp_relay_port" value="<?=htmlentities(trim($v_smtp_relay_port, "'"))?>">
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <td class="input-label vst-text">
-                                                <?php print _('Username');?>
+                                            <td class="vst-text input-label">
+                                                <label><input type="checkbox" size="20" class="vst-checkbox" name="v_antivirus" <?php if ((empty($v_antivirus)) || ($v_antivirus == 'yes')) echo "checked=yes"; ?>><?php print _('AntiVirus Support');?></label>
                                             </td>
                                         </tr>
                                         <tr>
-                                            <td>
-                                                <input type="text" size="20" class="vst-input" name="v_smtp_relay_user" value="<?=htmlentities(trim($v_smtp_relay_user, "'"))?>">
+                                            <td class="vst-text input-label">
+                                                <label><input type="checkbox" size="20" class="vst-checkbox" name="v_dkim" <?php if (isset($v_dkim)&&$v_dkim == 'yes') echo "checked=yes"; ?>><?php print _('DKIM Support');?></label>
                                             </td>
                                         </tr>
                                         <tr>
-                                            <td class="input-label vst-text">
-                                                <?php print _('Password');?>
+                                            <td class="vst-text input-label">
+                                                <label><input type="checkbox" size="20" class="vst-checkbox" name="v_smtp_relay" <?php if ($v_smtp_relay == 'true') echo "checked=yes"; ?> onclick="javascript:elementHideShow('smtp_relay_table');"><?php print _('SMTP Relay');?></label>
                                             </td>
                                         </tr>
                                         <tr>
-                                            <td>
-                                                <input type="text" size="20" class="vst-input" name="v_smtp_relay_pass">
+                                            <td class="step-left">
+                                                <table style="display:<?php if ($v_smtp_relay == 'true'){echo 'block';} else {echo 'none';} ?>;" id="smtp_relay_table">
+                                                    <tr>
+                                                        <td class="input-label vst-text">
+                                                            <?php print _('Host');?>
+                                                        </td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td>
+                                                            <input type="text" size="20" class="vst-input" name="v_smtp_relay_host" value="<?=htmlentities(trim($v_smtp_relay_host, "'"))?>">
+                                                        </td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td class="input-label vst-text">
+                                                            <?php print _('Port');?>
+                                                        </td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td>
+                                                            <input type="text" size="20" class="vst-input" name="v_smtp_relay_port" value="<?=htmlentities(trim($v_smtp_relay_port, "'"))?>">
+                                                        </td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td class="input-label vst-text">
+                                                            <?php print _('Username');?>
+                                                        </td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td>
+                                                            <input type="text" size="20" class="vst-input" name="v_smtp_relay_user" value="<?=htmlentities(trim($v_smtp_relay_user, "'"))?>">
+                                                        </td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td class="input-label vst-text">
+                                                            <?php print _('Password');?>
+                                                        </td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td>
+                                                            <input type="text" size="20" class="vst-input" name="v_smtp_relay_pass">
+                                                        </td>
+                                                    </tr>
+                                                </table>
                                             </td>
                                         </tr>
-                                    </table>
-                                </td>
-                            </tr>
+                                <? } ?>
                             <tr>
                                 <td>
                                     <br>

+ 2 - 0
web/templates/admin/add_mail_acc.html

@@ -207,10 +207,12 @@
                             <td><?=_('SMTP auth method')?>:</td>
                             <td><div><?=_('Normal password')?></div></td>
                         </tr>
+                        <?php if($_SESSION['WEBMAIL_SYSTEM']){?>
                         <tr>
                             <td><?=_('Webmail URL')?>:</td>
                             <td><div><a class="vst" href="http://<?=$v_webmail_alias?>" target="_blank">http://<?=$v_webmail_alias?> <i></i></a></div></td>
                         </tr>
+                        <?php } ?>
                     </table>
                 </div>
             </td>

+ 323 - 266
web/templates/admin/add_package.html

@@ -50,6 +50,7 @@
                                     ?>
                                 </td>
                             </tr>
+                            
                             <tr>
                                 <td class="vst-text step-top">
                                     <?php print _('Package Name');?>
@@ -62,211 +63,24 @@
                             </tr>
                             <tr>
                                 <td class="vst-text input-label">
-                                    <?php print _('Web Template') . "<span class='optional'>" . strtoupper($_SESSION['WEB_SYSTEM']) . "</span>" ;?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <select class="vst-list" name="v_web_template">
-                                        <?php
-                                            foreach ($web_templates as $key => $value) {
-                                                echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
-                                                if ((!empty($v_web_template)) && ( $value == $v_web_template)){
-                                                    echo 'selected' ;
-                                                }
-                                                if ((!empty($v_web_template)) && ( $value == $_POST['v_web_template'])){
-                                                    echo 'selected' ;
-                                                }
-                                                echo ">".htmlentities($value)."</option>\n";
-                                            }
-                                        ?>
-                                    </select>
-                                </td>
-                            </tr>
-                            <?php if (!empty($_SESSION['WEB_BACKEND'])) { echo ""; ?>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Backend Template') . "<span class='optional'>" . strtoupper($_SESSION['WEB_BACKEND']). "</span>" ;?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <select class="vst-list" name="v_backend_template">
-                                        <?php
-                                            foreach ($backend_templates as $key => $value) {
-                                                echo "\t\t\t\t<option value=\"".$value."\"";
-                                                if ((!empty($v_backend_template)) && ( $value == $v_backend_template)){
-                                                    echo 'selected' ;
-                                                }
-                                                if ((!empty($v_backend_template)) && ( $value == $_POST['v_backend_template'])){
-                                                    echo 'selected' ;
-                                                }
-                                                echo ">".htmlentities($value)."</option>\n";
-                                            }
-                                        ?>
-                                    </select>
-                                </td>
-                            </tr>
-                            <?php echo ""; }?>
-
-                            <?php if (!empty($_SESSION['PROXY_SYSTEM'])) { echo ""; ?>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Proxy Template')  . "<span class='optional'>" .strtoupper($_SESSION['PROXY_SYSTEM']) . "</span>" ;?>
-
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <select class="vst-list" name="v_proxy_template">
-                                        <?php
-                                            foreach ($proxy_templates as $key => $value) {
-                                                echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
-                                                if ((!empty($v_proxy_template)) && ( $value == $v_proxy_template)){
-                                                    echo 'selected' ;
-                                                }
-                                                if ((!empty($v_proxy_template)) && ( $value == $_POST['v_proxy_template'])){
-                                                    echo 'selected' ;
-                                                }
-                                                echo ">".htmlentities($value)."</option>\n";
-                                            }
-                                        ?>
-                                    </select>
-                                </td>
-                            </tr>
-                            <?php echo ""; }?>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('DNS Template') . "<span class='optional'>" .strtoupper($_SESSION['DNS_SYSTEM']) . "</span>" ;?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <select class="vst-list" name="v_dns_template">
-                                        <?php
-                                            foreach ($dns_templates as $key => $value) {
-                                                echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
-                                                if ((!empty($v_dns_template)) && ( $value == $v_dns_template)){
-                                                    echo 'selected' ;
-                                                }
-                                                if ((!empty($v_dns_template)) && ( $value == $_POST['v_dns_template'])){
-                                                    echo 'selected' ;
-                                                }
-                                                echo ">".htmlentities($value)."</option>\n";
-                                            }
-                                        ?>
-                                    </select>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('SSH Access');?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <select class="vst-list" name="v_shell">
-                                        <?php
-                                            foreach ($shells as $key => $value) {
-                                                echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
-                                                if ((!empty($v_shell)) && ( $value == $v_shell)){
-                                                echo 'selected' ;
-                                            }
-                                            if ((!empty($v_shell)) && ( $value == $_POST['v_shell'])){
-                                                echo 'selected' ;
-                                            }
-                                            echo ">".htmlentities($value)."</option>\n";
-                                            }
-                                        ?>
-                                    </select>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Web Domains');?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <input type="text" size="20" class="vst-input" name="v_web_domains" value="<?=htmlentities(trim($v_web_domains, "'"))?>">
-                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-web-domains"></i>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Web Aliases');?> <span class="optional">(<?=_('per domain')?>)</span>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <input type="text" size="20" class="vst-input" name="v_web_aliases" value="<?=htmlentities(trim($v_web_aliases, "'"))?>">
-                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-web-aliases"></i>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('DNS domains');?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <input type="text" size="20" class="vst-input" name="v_dns_domains" value="<?=htmlentities(trim($v_dns_domains, "'"))?>">
-                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-dns-domain"></i>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('DNS records');?> <span class="optional">(<?=_('per domain')?>)</span>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <input type="text" size="20" class="vst-input" name="v_dns_records" value="<?=htmlentities(trim($v_dns_records, "'"))?>">
-                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-dns-records"></i>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Mail Domains');?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <input type="text" size="20" class="vst-input" name="v_mail_domains" value="<?=htmlentities(trim($v_mail_domains, "'"))?>">
-                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-mail-domains"></i>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Mail Accounts');?> <span class="optional">(<?=_('per domain')?>)</span>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <input type="text" size="20" class="vst-input" name="v_mail_accounts" value="<?=htmlentities(trim($v_mail_accounts, "'"))?>">
-                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-mail-accounts"></i>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Databases');?>
+                                    <?php print _('Quota');?> <span class="optional">(<?=_('in megabytes')?>)</span>
                                 </td>
                             </tr>
                             <tr>
                                 <td>
-                                    <input type="text" size="20" class="vst-input" name="v_databases" value="<?=htmlentities(trim($v_databases, "'"))?>">
-                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-databases"></i>
+                                    <input type="text" size="20" class="vst-input" name="v_disk_quota" value="<?=htmlentities(trim($v_disk_quota, "'"))?>">
+                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-disk-quota"></i>
                                 </td>
                             </tr>
                             <tr>
                                 <td class="vst-text input-label">
-                                    <?php print _('Cron Jobs');?>
+                                    <?php print _('Bandwidth');?> <span class="optional">(<?=_('in megabytes')?>)</span>
                                 </td>
                             </tr>
                             <tr>
                                 <td>
-                                    <input type="text" size="20" class="vst-input" name="v_cron_jobs" value="<?=htmlentities(trim($v_cron_jobs, "'"))?>">
-                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-cron-jobs"></i>
+                                    <input type="text" size="20" class="vst-input" name="v_bandwidth" value="<?=htmlentities(trim($v_bandwidth, "'"))?>">
+                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-bandwidth"></i>
                                 </td>
                             </tr>
                             <tr>
@@ -280,100 +94,343 @@
                                 </td>
                             </tr>
                             <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Quota');?> <span class="optional">(<?=_('in megabytes')?>)</span>
+                                <td class="section-title" onclick="javascript:elementHideShow('web-options')">
+                                    <?=_('Web');?>
+                                </td>
+                                <td class="section-hide-button">
+                                    <a href="javascript:elementHideShow('web-options');"><i class="fas fa-minus-square status-icon dim maroon"></i></a>
                                 </td>
                             </tr>
                             <tr>
                                 <td>
-                                    <input type="text" size="20" class="vst-input" name="v_disk_quota" value="<?=htmlentities(trim($v_disk_quota, "'"))?>">
-                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-disk-quota"></i>
+                                    <table id="web-options" style="display: none;">
+                                        <tr>
+                                            <td class="vst-text input-label step-top">
+                                                <?php print _('Web Domains');?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_web_domains" value="<?=htmlentities(trim($v_web_domains, "'"))?>">
+                                                <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-web-domains"></i>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('Web Aliases');?> <span class="optional">(<?=_('per domain')?>)</span>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_web_aliases" value="<?=htmlentities(trim($v_web_aliases, "'"))?>">
+                                                <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-web-aliases"></i>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('Web Template')  . " <span class='optional'> " .strtoupper($_SESSION['WEB_SYSTEM']) . "</span>";?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <select class="vst-list" name="v_web_template">
+                                                    <?php
+                                                        foreach ($web_templates as $key => $value) {
+                                                            echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
+                                                            if ((!empty($v_web_template)) && ( $value == $v_web_template)){
+                                                                echo ' selected' ;
+                                                            }
+                                                            if ((!empty($v_web_template)) && ( $value == $_POST['v_web_template'])){
+                                                                echo ' selected' ;
+                                                            }
+                                                            echo ">".htmlentities($value)."</option>\n";
+                                                        }
+                                                    ?>
+                                                </select>
+                                            </td>
+                                        </tr>
+                                        <?php if (!empty($_SESSION['WEB_BACKEND'])) { echo ""; ?>
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('Backend Template')  . "<span class='optional'>" .strtoupper($_SESSION['WEB_BACKEND']) . "</span>";?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <select class="vst-list" name="v_backend_template">
+                                                    <?php
+                                                        foreach ($backend_templates as $key => $value) {
+                                                            echo "\t\t\t\t<option value=\"".$value."\"";
+                                                            if ((!empty($v_backend_template)) && ( $value == $v_backend_template)){
+                                                                echo ' selected' ;
+                                                            }
+                                                            if ((!empty($v_backend_template)) && ( $value == $_POST['v_backend_template'])){
+                                                                echo ' selected' ;
+                                                            }
+                                                            echo ">".htmlentities($value)."</option>\n";
+                                                        }
+                                                    ?>
+                                                </select>
+                                            </td>
+                                        </tr>
+                                        <?php echo ""; }?>
+                                        <?php if (!empty($_SESSION['PROXY_SYSTEM'])) { echo ""; ?>
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('Proxy Template')  . "<span class='optional'>" .strtoupper($_SESSION['PROXY_SYSTEM']) . "</span>";?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <select class="vst-list" name="v_proxy_template">
+                                                    <?php
+                                                        foreach ($proxy_templates as $key => $value) {
+                                                            echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
+                                                            if ((!empty($v_proxy_template)) && ( $value == $v_proxy_template)){
+                                                                echo ' selected' ;
+                                                            }
+                                                            if ((!empty($v_proxy_template)) && ( $value == $_POST['v_proxy_template'])){
+                                                                echo ' selected' ;
+                                                            }
+                                                            echo ">".htmlentities($value)."</option>\n";
+                                                        }
+                                                    ?>
+                                                </select>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('Databases');?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_databases" value="<?=htmlentities(trim($v_databases, "'"))?>">
+                                                <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-databases"></i>
+                                            </td>
+                                        </tr>
+                                    </table>
                                 </td>
                             </tr>
+                            <?php echo ""; }?>
                             <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Bandwidth');?> <span class="optional">(<?=_('in megabytes')?>)</span>
+                                <td class="section-title" onclick="javascript:elementHideShow('dns-options')">
+                                    <?=_('DNS');?>
                                 </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <input type="text" size="20" class="vst-input" name="v_bandwidth" value="<?=htmlentities(trim($v_bandwidth, "'"))?>">
-                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-bandwidth"></i>
+                                <td class="section-hide-button">
+                                    <a href="javascript:elementHideShow('dns-options');"><i class="fas fa-minus-square status-icon dim maroon"></i></a>
                                 </td>
                             </tr>
-                            <?php if ((isset($_SESSION['DNS_SYSTEM'])) && (!empty($_SESSION['DNS_SYSTEM']))) {?>
                             <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Name servers');?>
+                                <td>
+                                    <table id="dns-options" style="display: none;">
+                                        <tr>
+                                            <td class="vst-text input-label step-top">
+                                                <?php print _('DNS Template')  . "<span class='optional'>" .strtoupper($_SESSION['DNS_SYSTEM']) . "</span>";?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <select class="vst-list" name="v_dns_template">
+                                                    <?php
+                                                        foreach ($dns_templates as $key => $value) {
+                                                            echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
+                                                            if ((!empty($v_dns_template)) && ( $value == $v_dns_template)){
+                                                                echo ' selected' ;
+                                                            }
+                                                            if ((!empty($v_dns_template)) && ( $value == $_POST['v_dns_template'])){
+                                                                echo ' selected' ;
+                                                            }
+                                                            echo ">".htmlentities($value)."</option>\n";
+                                                        }
+                                                    ?>
+                                                </select>
+                                            </td>
+                                        </tr>
+            
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('DNS domains');?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_dns_domains" value="<?=htmlentities(trim($v_dns_domains, "'"))?>">
+                                                <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-dns-domain"></i>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('DNS records');?> <span class="optional">(<?=_('per domain')?>)</span>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_dns_records" value="<?=htmlentities(trim($v_dns_records, "'"))?>">
+                                                <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-dns-records"></i>
+                                            </td>
+                                        </tr>
+                                        
+                                    <?php if ((isset($_SESSION['DNS_SYSTEM'])) && (!empty($_SESSION['DNS_SYSTEM']))) {?>
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('Name Servers');?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_ns1" value="<?=htmlentities(trim($v_ns1, "'"))?>">
+                                                <span class="remove-ns"><i class="fas fa-trash status-icon dim red"></i></span>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_ns2" value="<?=htmlentities(trim($v_ns2, "'"))?>">
+                                                <span class="remove-ns"><i class="fas fa-trash status-icon dim red"></i></span>
+                                            </td>
+                                        </tr>
+                                        <?  if($v_ns3)
+                                              echo '<tr>
+                                                <td>
+                                                    <input type="text" size="20" class="vst-input" name="v_ns3" value="'.htmlentities(trim($v_ns3, "'")).'">
+                                                    <span class="remove-ns"><i class="fas fa-trash status-icon dim red"></i></span>
+                                                </td>
+                                            </tr>';
+            
+                                            if($v_ns4)
+                                              echo '<tr>
+                                                <td>
+                                                    <input type="text" size="20" class="vst-input" name="v_ns4" value="'.htmlentities(trim($v_ns4, "'")).'">
+                                                    <span class="remove-ns"><i class="fas fa-trash status-icon dim red"></i></span>
+                                                </td>
+                                            </tr>';
+            
+                                            if($v_ns5)
+                                              echo '<tr>
+                                                <td>
+                                                    <input type="text" size="20" class="vst-input" name="v_ns5" value="'.htmlentities(trim($v_ns5, "'")).'">
+                                                    <span class="remove-ns"><i class="fas fa-trash status-icon dim red"></i></span>
+                                                </td>
+                                            </tr>';
+            
+                                            if($v_ns6)
+                                              echo '<tr>
+                                                <td>
+                                                    <input type="text" size="20" class="vst-input" name="v_ns6" value="'.htmlentities(trim($v_ns6, "'")).'">
+                                                    <span class="remove-ns"><i class="fas fa-trash status-icon dim red"></i></span>
+                                                </td>
+                                            </tr>';
+            
+                                            if($v_ns7)
+                                              echo '<tr>
+                                                <td>
+                                                    <input type="text" size="20" class="vst-input" name="v_ns7" value="'.htmlentities(trim($v_ns7, "'")).'">
+                                                    <span class="remove-ns"><i class="fas fa-trash status-icon dim red"></i></span>
+                                                </td>
+                                            </tr>';
+            
+                                            if($v_ns8)
+                                              echo '<tr>
+                                                <td>
+                                                    <input type="text" size="20" class="vst-input" name="v_ns8" value="'.htmlentities(trim($v_ns8, "'")).'">
+                                                    <span class="remove-ns"><i class="fas fa-trash status-icon dim red"></i></span>
+                                                </td>
+                                            </tr>';
+                                            ?>
+            
+                                            <tr class="add-ns" <? if($v_ns8) echo 'style="display:none;"'; ?> >
+                                                <td class="step-top-small">
+                                                  <span class="add-ns-button additional-control add"><?=_('Add one more Name Server')?></span>
+                                                </td>
+                                            </tr>
+                                        <?php } ?>
+                                    </table>
+                                </td>
+                            </tr>
+                            <tr>
+                                <td class="section-title" onclick="javascript:elementHideShow('mail-options')">
+                                    <?=_('Mail');?>
+                                </td>
+                                <td class="section-hide-button">
+                                    <a href="javascript:elementHideShow('mail-options');"><i class="fas fa-minus-square status-icon dim maroon"></i></a>
                                 </td>
                             </tr>
                             <tr>
                                 <td>
-                                    <input type="text" size="20" class="vst-input" name="v_ns1" value="<?=htmlentities(trim($v_ns1, "'"))?>">
-                                    <span class="remove-ns additional-control delete"><?=_('delete')?></span>
+                                    <table id="mail-options" style="display: none;">
+                                        <tr>
+                                            <td class="vst-text input-label step-top">
+                                                <?php print _('Mail Domains');?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_mail_domains" value="<?=htmlentities(trim($v_mail_domains, "'"))?>">
+                                                <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-mail-domains"></i>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('Mail Accounts');?> <span class="optional">(<?=_('per domain')?>)</span>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_mail_accounts" value="<?=htmlentities(trim($v_mail_accounts, "'"))?>">
+                                                <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-mail-accounts"></i>
+                                            <td>
+                                        </tr>
+                                    </table>
+                                </td>
+                            </tr>
+                            <tr>
+                                <td class="section-title" onclick="javascript:elementHideShow('system-options')">
+                                    <?=_('System');?>
+                                </td>
+                                <td class="section-hide-button">
+                                    <a href="javascript:elementHideShow('system-options');"><i class="fas fa-minus-square status-icon dim maroon"></i></a>
                                 </td>
                             </tr>
                             <tr>
                                 <td>
-                                    <input type="text" size="20" class="vst-input" name="v_ns2" value="<?=htmlentities(trim($v_ns2, "'"))?>">
-                                    <span class="remove-ns additional-control delete"><?=_('delete')?></span>
+                                    <table id="system-options" style="display: none;">
+                                        <tr>
+                                            <td class="vst-text input-label step-top">
+                                                <?php print _('Cron Jobs');?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_cron_jobs" value="<?=htmlentities(trim($v_cron_jobs, "'"))?>">
+                                                <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-cron-jobs"></i>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('SSH Access');?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <select class="vst-list" name="v_shell">
+                                                    <?php
+                                                        foreach ($shells as $key => $value) {
+                                                            echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
+                                                            if ((!empty($v_shell)) && ( $value == $v_shell)){
+                                                                echo ' selected' ;
+                                                            }
+                                                            if ((!empty($v_shell)) && ( $value == $_POST['v_shell'])){
+                                                                echo ' selected' ;
+                                                            }
+                                                            echo ">".htmlentities($value)."</option>\n";
+                                                        }
+                                                    ?>
+                                                </select>
+                                            </td>
+                                        </tr>
+                                    </table>
                                 </td>
                             </tr>
-                            <?  if($v_ns3)
-                                  echo '<tr>
-                                    <td>
-                                        <input type="text" size="20" class="vst-input" name="v_ns3" value="'.htmlentities(trim($v_ns3, "'")).'">
-                                        <span class="remove-ns additional-control delete">'._('delete').'</span>
-                                    </td>
-                                </tr>';
-
-                                if($v_ns4)
-                                  echo '<tr>
-                                    <td>
-                                        <input type="text" size="20" class="vst-input" name="v_ns4" value="'.htmlentities(trim($v_ns4, "'")).'">
-                                        <span class="remove-ns additional-control delete">'._('delete').'</span>
-                                    </td>
-                                </tr>';
-
-                                if($v_ns5)
-                                  echo '<tr>
-                                    <td>
-                                        <input type="text" size="20" class="vst-input" name="v_ns5" value="'.htmlentities(trim($v_ns5, "'")).'">
-                                        <span class="remove-ns additional-control delete">'._('delete').'</span>
-                                    </td>
-                                </tr>';
-
-                                if($v_ns6)
-                                  echo '<tr>
-                                    <td>
-                                        <input type="text" size="20" class="vst-input" name="v_ns6" value="'.htmlentities(trim($v_ns6, "'")).'">
-                                        <span class="remove-ns additional-control delete">'._('delete').'</span>
-                                    </td>
-                                </tr>';
-
-                                if($v_ns7)
-                                  echo '<tr>
-                                    <td>
-                                        <input type="text" size="20" class="vst-input" name="v_ns7" value="'.htmlentities(trim($v_ns7, "'")).'">
-                                        <span class="remove-ns additional-control delete">'._('delete').'</span>
-                                    </td>
-                                </tr>';
-
-                                if($v_ns8)
-                                  echo '<tr>
-                                    <td>
-                                        <input type="text" size="20" class="vst-input" name="v_ns8" value="'.htmlentities(trim($v_ns8, "'")).'">
-                                        <span class="remove-ns additional-control delete">'._('delete').'</span>
-                                    </td>
-                                </tr>';
-                            ?>
-                                <tr class="add-ns" <? if($v_ns8) echo 'style="display:none;"'; ?> >
-                                    <td class="step-top-small">
-                                      <span class="add-ns-button additional-control add"><?=_('Add one more Name Server')?></span>
-                                    </td>
-                                </tr>
-                            <?php } ?>
-                        </table>
                         <table class="data-col2"></table>
                     </td>
                 </tr>

+ 1 - 1
web/templates/admin/add_user.html

@@ -83,7 +83,7 @@
                             </tr>
                             <tr>
                                 <td class="vst-text input-label">
-                                    <?php print _('Password');?> / <a href="javascript:randomString();" class="generate" ><?php print _('generate');?></a>
+                                    <?php print _('Password');?> <a href="javascript:randomString();" title="<?php print _('generate');?>"><i class="fas fa-sync status-icon green icon-large"></i></a>
                                 </td>
                             </tr>
                             <tr>

+ 5 - 5
web/templates/admin/add_web.html

@@ -68,8 +68,8 @@
                         <? if (($user == 'admin') && (empty($_GET['accept']))) {?>
                             <tr>
                                 <td class="step-top">
-                                    <span><a href="/add/user/" class="vst-advanced" style="padding-left: 67px !important;padding-right: 67px !important;"><?=_('Add User')?></a></span>
-                                    <span><a href="/add/web/?accept=true" class="vst-advanced" style="padding-left: 67px !important;padding-right: 67px !important;"><?=_('Continue')?></a> </span>
+                                    <span><a href="/add/user/" class="vst-advanced admin-warning-button"><?=_('Add User')?></a></span>
+                                    <span><a href="/add/web/?accept=true" class="vst-advanced button danger admin-warning-button"><?=_('Continue')?></a> </span>
                                 </td>
                             </tr>
                         <? } ?>
@@ -373,7 +373,7 @@
                                     </tr>
                                     <tr>
                                         <td class="step-left">
-                                            <textarea size="20" class="vst-textinput short" name="v_ssl_crt"><?=htmlentities(trim($v_ssl_crt, "'"))?></textarea>
+                                            <textarea size="20" class="vst-textinput short console" name="v_ssl_crt"><?=htmlentities(trim($v_ssl_crt, "'"))?></textarea>
                                         </td>
                                     </tr>
                                     <tr>
@@ -383,7 +383,7 @@
                                     </tr>
                                     <tr>
                                         <td class="step-left">
-                                            <textarea size="20" class="vst-textinput short" name="v_ssl_key"><?=htmlentities(trim($v_ssl_key, "'"))?></textarea>
+                                            <textarea size="20" class="vst-textinput short console" name="v_ssl_key"><?=htmlentities(trim($v_ssl_key, "'"))?></textarea>
                                         </td>
                                     </tr>
                                     <tr>
@@ -393,7 +393,7 @@
                                     </tr>
                                     <tr>
                                         <td class="step-left">
-                                            <textarea size="20" class="vst-textinput short" name="v_ssl_ca"><?=htmlentities(trim($v_ssl_ca, "'"))?></textarea>
+                                            <textarea size="20" class="vst-textinput short console" name="v_ssl_ca"><?=htmlentities(trim($v_ssl_ca, "'"))?></textarea>
                                         </td>
                                     </tr>
                                 </table>

+ 8 - 8
web/templates/admin/edit_mail.html

@@ -64,7 +64,7 @@
                                   <input type="hidden" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
                                 </td>
                             </tr>
-                            <?php if($_SESSION['IMAP_SYSTEM']){?>                            
+                            <?php if($_SESSION['WEBMAIL_SYSTEM']){?>                            
                                 <tr>
                                     <td class="vst-text step-top">
                                         <?php print _('Webmail Client');?>
@@ -116,9 +116,9 @@
                                     <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 id="ssltable" style="display:<?php if ($v_ssl == 'no' ) { echo 'none';} else {echo 'block';}?> ;" class="step-left">
+                                <td>
+                                    <table>
                                         <tr>
                                             <td class="input-label vst-text">
                                                 <label><input type="checkbox" size="20" class="vst-checkbox" name="v_letsencrypt" <?php if($v_letsencrypt == 'yes' || $v_letencrypt == 'on') echo "checked=yes" ?> onclick="App.Actions.MAIL.toggle_letsencrypt(this)"><?php print _('Lets Encrypt Support');?></label>
@@ -140,7 +140,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput short" <?php if ($v_letsencrypt == 'yes') echo 'disabled' ?> name="v_ssl_crt"><?=htmlentities(trim($v_ssl_crt, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" <?php if ($v_letsencrypt == 'yes') echo 'disabled' ?> name="v_ssl_crt"><?=htmlentities(trim($v_ssl_crt, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <tr>
@@ -150,7 +150,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput short" <?php if ($v_letsencrypt == 'yes') echo 'disabled' ?> name="v_ssl_key"><?=htmlentities(trim($v_ssl_key, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" <?php if ($v_letsencrypt == 'yes') echo 'disabled' ?> name="v_ssl_key"><?=htmlentities(trim($v_ssl_key, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <tr>
@@ -160,7 +160,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput short" <?php if ($v_letsencrypt == 'yes') echo 'disabled' ?> name="v_ssl_ca"><?=htmlentities(trim($v_ssl_ca, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" <?php if ($v_letsencrypt == 'yes') echo 'disabled' ?> name="v_ssl_ca"><?=htmlentities(trim($v_ssl_ca, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <?
@@ -234,7 +234,7 @@
                                 </td>
                             </tr>
                             <tr>
-                                <td class="vst-text">
+                                <td class="vst-text input-label">
                                     <label>
                                         <input type="checkbox" size="20" class="vst-checkbox" name="v_smtp_relay" <?php if ($v_smtp_relay == 'true') echo "checked=yes"; ?> onclick="javascript:elementHideShow('smtp_relay_table');"><?php print _('SMTP Relay');?>
                                     </label>

+ 2 - 0
web/templates/admin/edit_mail_acc.html

@@ -224,10 +224,12 @@
                                 <td><?=_('SMTP auth method')?>:</td>
                                 <td><div><?=_('Normal password')?></div></td>
                             </tr>
+                            <?php if($_SESSION['WEBMAIL_SYSTEM']){?>
                             <tr>
                                 <td><?=_('Webmail URL')?>:</td>
                                 <td><div><a class="vst" href="http://<?=$v_webmail_alias?>" target="_blank">http://<?=$v_webmail_alias?> <i></i></a></div></td>
                             </tr>
+                            <?php } ?>
                         </table>
                     </div>
                 </td>

+ 323 - 265
web/templates/admin/edit_package.html

@@ -55,215 +55,30 @@
                             </tr>
                             <tr>
                                 <td>
-                                    <input type="text" size="20" class="vst-input" name="v_package" value="<?=htmlentities(trim($v_package, "'"))?>" disabled >
+                                    <input type="text" size="20" class="vst-input" name="v_package" value="<?=htmlentities(trim($v_package, "'"))?>" disabled>
                                     <input type="hidden" name="v_package" value="<?=htmlentities(trim($v_package, "'"))?>">
                                 </td>
                             </tr>
                             <tr>
                                 <td class="vst-text input-label">
-                                    <?php print _('Web Template')  . " <span class='optional'> " .strtoupper($_SESSION['WEB_SYSTEM']) . "</span>";?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <select class="vst-list" name="v_web_template">
-                                        <?php
-                                            foreach ($web_templates as $key => $value) {
-                                                echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
-                                                if ((!empty($v_web_template)) && ( $value == $v_web_template)){
-                                                    echo ' selected' ;
-                                                }
-                                                if ((!empty($v_web_template)) && ( $value == $_POST['v_web_template'])){
-                                                    echo ' selected' ;
-                                                }
-                                                echo ">".htmlentities($value)."</option>\n";
-                                            }
-                                        ?>
-                                    </select>
-                                </td>
-                            </tr>
-                            <?php if (!empty($_SESSION['WEB_BACKEND'])) { echo ""; ?>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Backend Template')  . "<span class='optional'>" .strtoupper($_SESSION['WEB_BACKEND']) . "</span>";?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <select class="vst-list" name="v_backend_template">
-                                        <?php
-                                            foreach ($backend_templates as $key => $value) {
-                                                echo "\t\t\t\t<option value=\"".$value."\"";
-                                                if ((!empty($v_backend_template)) && ( $value == $v_backend_template)){
-                                                    echo ' selected' ;
-                                                }
-                                                if ((!empty($v_backend_template)) && ( $value == $_POST['v_backend_template'])){
-                                                    echo ' selected' ;
-                                                }
-                                                echo ">".htmlentities($value)."</option>\n";
-                                            }
-                                        ?>
-                                    </select>
-                                </td>
-                            </tr>
-                            <?php echo ""; }?>
-                            <?php if (!empty($_SESSION['PROXY_SYSTEM'])) { echo ""; ?>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Proxy Template')  . "<span class='optional'>" .strtoupper($_SESSION['PROXY_SYSTEM']) . "</span>";?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <select class="vst-list" name="v_proxy_template">
-                                        <?php
-                                            foreach ($proxy_templates as $key => $value) {
-                                                echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
-                                                if ((!empty($v_proxy_template)) && ( $value == $v_proxy_template)){
-                                                    echo ' selected' ;
-                                                }
-                                                if ((!empty($v_proxy_template)) && ( $value == $_POST['v_proxy_template'])){
-                                                    echo ' selected' ;
-                                                }
-                                                echo ">".htmlentities($value)."</option>\n";
-                                            }
-                                        ?>
-                                    </select>
-                                </td>
-                            </tr>
-                            <?php echo ""; }?>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('DNS Template')  . "<span class='optional'>" .strtoupper($_SESSION['DNS_SYSTEM']) . "</span>";?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <select class="vst-list" name="v_dns_template">
-                                        <?php
-                                            foreach ($dns_templates as $key => $value) {
-                                                echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
-                                                if ((!empty($v_dns_template)) && ( $value == $v_dns_template)){
-                                                    echo ' selected' ;
-                                                }
-                                                if ((!empty($v_dns_template)) && ( $value == $_POST['v_dns_template'])){
-                                                    echo ' selected' ;
-                                                }
-                                                echo ">".htmlentities($value)."</option>\n";
-                                            }
-                                        ?>
-                                    </select>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('SSH Access');?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <select class="vst-list" name="v_shell">
-                                        <?php
-                                            foreach ($shells as $key => $value) {
-                                                echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
-                                                if ((!empty($v_shell)) && ( $value == $v_shell)){
-                                                    echo ' selected' ;
-                                                }
-                                                if ((!empty($v_shell)) && ( $value == $_POST['v_shell'])){
-                                                    echo ' selected' ;
-                                                }
-                                                echo ">".htmlentities($value)."</option>\n";
-                                            }
-                                        ?>
-                                    </select>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Web Domains');?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <input type="text" size="20" class="vst-input" name="v_web_domains" value="<?=htmlentities(trim($v_web_domains, "'"))?>">
-                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-web-domains"></i>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Web Aliases');?> <span class="optional">(<?=_('per domain')?>)</span>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <input type="text" size="20" class="vst-input" name="v_web_aliases" value="<?=htmlentities(trim($v_web_aliases, "'"))?>">
-                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-web-aliases"></i>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('DNS domains');?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <input type="text" size="20" class="vst-input" name="v_dns_domains" value="<?=htmlentities(trim($v_dns_domains, "'"))?>">
-                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-dns-domain"></i>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('DNS records');?> <span class="optional">(<?=_('per domain')?>)</span>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <input type="text" size="20" class="vst-input" name="v_dns_records" value="<?=htmlentities(trim($v_dns_records, "'"))?>">
-                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-dns-records"></i>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Mail Domains');?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <input type="text" size="20" class="vst-input" name="v_mail_domains" value="<?=htmlentities(trim($v_mail_domains, "'"))?>">
-                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-mail-domains"></i>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Mail Accounts');?> <span class="optional">(<?=_('per domain')?>)</span>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <input type="text" size="20" class="vst-input" name="v_mail_accounts" value="<?=htmlentities(trim($v_mail_accounts, "'"))?>">
-                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-mail-accounts"></i>
-                                <td>
-                            </tr>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Databases');?>
+                                    <?php print _('Quota');?> <span class="optional">(<?=_('in megabytes')?>)</span>
                                 </td>
                             </tr>
                             <tr>
                                 <td>
-                                    <input type="text" size="20" class="vst-input" name="v_databases" value="<?=htmlentities(trim($v_databases, "'"))?>">
-                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-databases"></i>
+                                    <input type="text" size="20" class="vst-input" name="v_disk_quota" value="<?=htmlentities(trim($v_disk_quota, "'"))?>">
+                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-disk-quota"></i>
                                 </td>
                             </tr>
                             <tr>
                                 <td class="vst-text input-label">
-                                    <?php print _('Cron Jobs');?>
+                                    <?php print _('Bandwidth');?> <span class="optional">(<?=_('in megabytes')?>)</span>
                                 </td>
                             </tr>
                             <tr>
                                 <td>
-                                    <input type="text" size="20" class="vst-input" name="v_cron_jobs" value="<?=htmlentities(trim($v_cron_jobs, "'"))?>">
-                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-cron-jobs"></i>
+                                    <input type="text" size="20" class="vst-input" name="v_bandwidth" value="<?=htmlentities(trim($v_bandwidth, "'"))?>">
+                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-bandwidth"></i>
                                 </td>
                             </tr>
                             <tr>
@@ -277,100 +92,343 @@
                                 </td>
                             </tr>
                             <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Quota');?> <span class="optional">(<?=_('in megabytes')?>)</span>
+                                <td class="section-title" onclick="javascript:elementHideShow('web-options')">
+                                    <?=_('Web');?>
+                                </td>
+                                <td class="section-hide-button">
+                                    <a href="javascript:elementHideShow('web-options');"><i class="fas fa-minus-square status-icon dim maroon"></i></a>
                                 </td>
                             </tr>
                             <tr>
                                 <td>
-                                    <input type="text" size="20" class="vst-input" name="v_disk_quota" value="<?=htmlentities(trim($v_disk_quota, "'"))?>">
-                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-disk-quota"></i>
+                                    <table id="web-options" style="display: none;">
+                                        <tr>
+                                            <td class="vst-text input-label step-top">
+                                                <?php print _('Web Domains');?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_web_domains" value="<?=htmlentities(trim($v_web_domains, "'"))?>">
+                                                <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-web-domains"></i>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('Web Aliases');?> <span class="optional">(<?=_('per domain')?>)</span>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_web_aliases" value="<?=htmlentities(trim($v_web_aliases, "'"))?>">
+                                                <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-web-aliases"></i>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('Web Template')  . " <span class='optional'> " .strtoupper($_SESSION['WEB_SYSTEM']) . "</span>";?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <select class="vst-list" name="v_web_template">
+                                                    <?php
+                                                        foreach ($web_templates as $key => $value) {
+                                                            echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
+                                                            if ((!empty($v_web_template)) && ( $value == $v_web_template)){
+                                                                echo ' selected' ;
+                                                            }
+                                                            if ((!empty($v_web_template)) && ( $value == $_POST['v_web_template'])){
+                                                                echo ' selected' ;
+                                                            }
+                                                            echo ">".htmlentities($value)."</option>\n";
+                                                        }
+                                                    ?>
+                                                </select>
+                                            </td>
+                                        </tr>
+                                        <?php if (!empty($_SESSION['WEB_BACKEND'])) { echo ""; ?>
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('Backend Template')  . "<span class='optional'>" .strtoupper($_SESSION['WEB_BACKEND']) . "</span>";?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <select class="vst-list" name="v_backend_template">
+                                                    <?php
+                                                        foreach ($backend_templates as $key => $value) {
+                                                            echo "\t\t\t\t<option value=\"".$value."\"";
+                                                            if ((!empty($v_backend_template)) && ( $value == $v_backend_template)){
+                                                                echo ' selected' ;
+                                                            }
+                                                            if ((!empty($v_backend_template)) && ( $value == $_POST['v_backend_template'])){
+                                                                echo ' selected' ;
+                                                            }
+                                                            echo ">".htmlentities($value)."</option>\n";
+                                                        }
+                                                    ?>
+                                                </select>
+                                            </td>
+                                        </tr>
+                                        <?php echo ""; }?>
+                                        <?php if (!empty($_SESSION['PROXY_SYSTEM'])) { echo ""; ?>
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('Proxy Template')  . "<span class='optional'>" .strtoupper($_SESSION['PROXY_SYSTEM']) . "</span>";?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <select class="vst-list" name="v_proxy_template">
+                                                    <?php
+                                                        foreach ($proxy_templates as $key => $value) {
+                                                            echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
+                                                            if ((!empty($v_proxy_template)) && ( $value == $v_proxy_template)){
+                                                                echo ' selected' ;
+                                                            }
+                                                            if ((!empty($v_proxy_template)) && ( $value == $_POST['v_proxy_template'])){
+                                                                echo ' selected' ;
+                                                            }
+                                                            echo ">".htmlentities($value)."</option>\n";
+                                                        }
+                                                    ?>
+                                                </select>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('Databases');?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_databases" value="<?=htmlentities(trim($v_databases, "'"))?>">
+                                                <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-databases"></i>
+                                            </td>
+                                        </tr>
+                                    </table>
                                 </td>
                             </tr>
+                            <?php echo ""; }?>
                             <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Bandwidth');?> <span class="optional">(<?=_('in megabytes')?>)</span>
+                                <td class="section-title" onclick="javascript:elementHideShow('dns-options')">
+                                    <?=_('DNS');?>
                                 </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <input type="text" size="20" class="vst-input" name="v_bandwidth" value="<?=htmlentities(trim($v_bandwidth, "'"))?>">
-                                    <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-bandwidth"></i>
+                                <td class="section-hide-button">
+                                    <a href="javascript:elementHideShow('dns-options');"><i class="fas fa-minus-square status-icon dim maroon"></i></a>
                                 </td>
                             </tr>
-                        <?php if ((isset($_SESSION['DNS_SYSTEM'])) && (!empty($_SESSION['DNS_SYSTEM']))) {?>
                             <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Name Servers');?>
+                                <td>
+                                    <table id="dns-options" style="display: none;">
+                                        <tr>
+                                            <td class="vst-text input-label step-top">
+                                                <?php print _('DNS Template')  . "<span class='optional'>" .strtoupper($_SESSION['DNS_SYSTEM']) . "</span>";?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <select class="vst-list" name="v_dns_template">
+                                                    <?php
+                                                        foreach ($dns_templates as $key => $value) {
+                                                            echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
+                                                            if ((!empty($v_dns_template)) && ( $value == $v_dns_template)){
+                                                                echo ' selected' ;
+                                                            }
+                                                            if ((!empty($v_dns_template)) && ( $value == $_POST['v_dns_template'])){
+                                                                echo ' selected' ;
+                                                            }
+                                                            echo ">".htmlentities($value)."</option>\n";
+                                                        }
+                                                    ?>
+                                                </select>
+                                            </td>
+                                        </tr>
+            
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('DNS domains');?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_dns_domains" value="<?=htmlentities(trim($v_dns_domains, "'"))?>">
+                                                <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-dns-domain"></i>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('DNS records');?> <span class="optional">(<?=_('per domain')?>)</span>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_dns_records" value="<?=htmlentities(trim($v_dns_records, "'"))?>">
+                                                <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-dns-records"></i>
+                                            </td>
+                                        </tr>
+                                        
+                                    <?php if ((isset($_SESSION['DNS_SYSTEM'])) && (!empty($_SESSION['DNS_SYSTEM']))) {?>
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('Name Servers');?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_ns1" value="<?=htmlentities(trim($v_ns1, "'"))?>">
+                                                <span class="remove-ns"><i class="fas fa-trash status-icon dim red"></i></span>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_ns2" value="<?=htmlentities(trim($v_ns2, "'"))?>">
+                                                <span class="remove-ns"><i class="fas fa-trash status-icon dim red"></i></span>
+                                            </td>
+                                        </tr>
+                                        <?  if($v_ns3)
+                                              echo '<tr>
+                                                <td>
+                                                    <input type="text" size="20" class="vst-input" name="v_ns3" value="'.htmlentities(trim($v_ns3, "'")).'">
+                                                    <span class="remove-ns"><i class="fas fa-trash status-icon dim red"></i></span>
+                                                </td>
+                                            </tr>';
+            
+                                            if($v_ns4)
+                                              echo '<tr>
+                                                <td>
+                                                    <input type="text" size="20" class="vst-input" name="v_ns4" value="'.htmlentities(trim($v_ns4, "'")).'">
+                                                    <span class="remove-ns"><i class="fas fa-trash status-icon dim red"></i></span>
+                                                </td>
+                                            </tr>';
+            
+                                            if($v_ns5)
+                                              echo '<tr>
+                                                <td>
+                                                    <input type="text" size="20" class="vst-input" name="v_ns5" value="'.htmlentities(trim($v_ns5, "'")).'">
+                                                    <span class="remove-ns"><i class="fas fa-trash status-icon dim red"></i></span>
+                                                </td>
+                                            </tr>';
+            
+                                            if($v_ns6)
+                                              echo '<tr>
+                                                <td>
+                                                    <input type="text" size="20" class="vst-input" name="v_ns6" value="'.htmlentities(trim($v_ns6, "'")).'">
+                                                    <span class="remove-ns"><i class="fas fa-trash status-icon dim red"></i></span>
+                                                </td>
+                                            </tr>';
+            
+                                            if($v_ns7)
+                                              echo '<tr>
+                                                <td>
+                                                    <input type="text" size="20" class="vst-input" name="v_ns7" value="'.htmlentities(trim($v_ns7, "'")).'">
+                                                    <span class="remove-ns"><i class="fas fa-trash status-icon dim red"></i></span>
+                                                </td>
+                                            </tr>';
+            
+                                            if($v_ns8)
+                                              echo '<tr>
+                                                <td>
+                                                    <input type="text" size="20" class="vst-input" name="v_ns8" value="'.htmlentities(trim($v_ns8, "'")).'">
+                                                    <span class="remove-ns"><i class="fas fa-trash status-icon dim red"></i></span>
+                                                </td>
+                                            </tr>';
+                                            ?>
+            
+                                            <tr class="add-ns" <? if($v_ns8) echo 'style="display:none;"'; ?> >
+                                                <td class="step-top-small">
+                                                  <span class="add-ns-button additional-control add"><?=_('Add one more Name Server')?></span>
+                                                </td>
+                                            </tr>
+                                        <?php } ?>
+                                    </table>
+                                </td>
+                            </tr>
+                            <tr>
+                                <td class="section-title" onclick="javascript:elementHideShow('mail-options')">
+                                    <?=_('Mail');?>
+                                </td>
+                                <td class="section-hide-button">
+                                    <a href="javascript:elementHideShow('mail-options');"><i class="fas fa-minus-square status-icon dim maroon"></i></a>
                                 </td>
                             </tr>
                             <tr>
                                 <td>
-                                    <input type="text" size="20" class="vst-input" name="v_ns1" value="<?=htmlentities(trim($v_ns1, "'"))?>">
-                                    <span class="remove-ns additional-control delete"><?=_('delete')?></span>
+                                    <table id="mail-options" style="display: none;">
+                                        <tr>
+                                            <td class="vst-text input-label step-top">
+                                                <?php print _('Mail Domains');?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_mail_domains" value="<?=htmlentities(trim($v_mail_domains, "'"))?>">
+                                                <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-mail-domains"></i>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('Mail Accounts');?> <span class="optional">(<?=_('per domain')?>)</span>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_mail_accounts" value="<?=htmlentities(trim($v_mail_accounts, "'"))?>">
+                                                <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-mail-accounts"></i>
+                                            <td>
+                                        </tr>
+                                    </table>
+                                </td>
+                            </tr>
+                            <tr>
+                                <td class="section-title" onclick="javascript:elementHideShow('system-options')">
+                                    <?=_('System');?>
+                                </td>
+                                <td class="section-hide-button">
+                                    <a href="javascript:elementHideShow('system-options');"><i class="fas fa-minus-square status-icon dim maroon"></i></a>
                                 </td>
                             </tr>
                             <tr>
                                 <td>
-                                    <input type="text" size="20" class="vst-input" name="v_ns2" value="<?=htmlentities(trim($v_ns2, "'"))?>">
-                                    <span class="remove-ns additional-control delete"><?=_('delete')?></span>
+                                    <table id="system-options" style="display: none;">
+                                        <tr>
+                                            <td class="vst-text input-label step-top">
+                                                <?php print _('Cron Jobs');?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <input type="text" size="20" class="vst-input" name="v_cron_jobs" value="<?=htmlentities(trim($v_cron_jobs, "'"))?>">
+                                                <i class="unlim-trigger fas fa-infinity" title="<?=_('Unlimited')?>" id="unlim-cron-jobs"></i>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('SSH Access');?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <select class="vst-list" name="v_shell">
+                                                    <?php
+                                                        foreach ($shells as $key => $value) {
+                                                            echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
+                                                            if ((!empty($v_shell)) && ( $value == $v_shell)){
+                                                                echo ' selected' ;
+                                                            }
+                                                            if ((!empty($v_shell)) && ( $value == $_POST['v_shell'])){
+                                                                echo ' selected' ;
+                                                            }
+                                                            echo ">".htmlentities($value)."</option>\n";
+                                                        }
+                                                    ?>
+                                                </select>
+                                            </td>
+                                        </tr>
+                                    </table>
                                 </td>
                             </tr>
-                            <?  if($v_ns3)
-                                  echo '<tr>
-                                    <td>
-                                        <input type="text" size="20" class="vst-input" name="v_ns3" value="'.htmlentities(trim($v_ns3, "'")).'">
-                                        <span class="remove-ns additional-control delete">'._('delete').'</span>
-                                    </td>
-                                </tr>';
-
-                                if($v_ns4)
-                                  echo '<tr>
-                                    <td>
-                                        <input type="text" size="20" class="vst-input" name="v_ns4" value="'.htmlentities(trim($v_ns4, "'")).'">
-                                        <span class="remove-ns additional-control delete">'._('delete').'</span>
-                                    </td>
-                                </tr>';
-
-                                if($v_ns5)
-                                  echo '<tr>
-                                    <td>
-                                        <input type="text" size="20" class="vst-input" name="v_ns5" value="'.htmlentities(trim($v_ns5, "'")).'">
-                                        <span class="remove-ns additional-control delete">'._('delete').'</span>
-                                    </td>
-                                </tr>';
-
-                                if($v_ns6)
-                                  echo '<tr>
-                                    <td>
-                                        <input type="text" size="20" class="vst-input" name="v_ns6" value="'.htmlentities(trim($v_ns6, "'")).'">
-                                        <span class="remove-ns additional-control delete">'._('delete').'</span>
-                                    </td>
-                                </tr>';
-
-                                if($v_ns7)
-                                  echo '<tr>
-                                    <td>
-                                        <input type="text" size="20" class="vst-input" name="v_ns7" value="'.htmlentities(trim($v_ns7, "'")).'">
-                                        <span class="remove-ns additional-control delete">'._('delete').'</span>
-                                    </td>
-                                </tr>';
-
-                                if($v_ns8)
-                                  echo '<tr>
-                                    <td>
-                                        <input type="text" size="20" class="vst-input" name="v_ns8" value="'.htmlentities(trim($v_ns8, "'")).'">
-                                        <span class="remove-ns additional-control delete">'._('delete').'</span>
-                                    </td>
-                                </tr>';
-                                ?>
-
-                                <tr class="add-ns" <? if($v_ns8) echo 'style="display:none;"'; ?> >
-                                    <td class="step-top-small">
-                                      <span class="add-ns-button additional-control add"><?=_('Add one more Name Server')?></span>
-                                    </td>
-                                </tr>
-                            <?php } ?>
                         </table>
                         <table class="data-col2"></table>
                     </td>

+ 13 - 11
web/templates/admin/edit_server.html

@@ -220,7 +220,7 @@
                                         <?php if (!empty($_SESSION['PROXY_SYSTEM'])) { ?>
                                         <tr>
                                             <td class="vst-text">
-                                                <?php print _('Proxy Server') ?> / <a class="generate" href="/edit/server/<? echo $_SESSION['PROXY_SYSTEM'] ?>/"><?=_('configure')?></a>
+                                                <?php print _('Proxy Server') ?> <a href="/edit/server/<? echo $_SESSION['PROXY_SYSTEM'] ?>/"><i class="fas fa-pencil-alt status-icon orange icon-pad-right"></i></a>
                                             </td>
                                         </tr>
                                         <tr>
@@ -232,7 +232,7 @@
                                         <?php } ?>
                                         <tr>
                                             <td class="vst-text">
-                                                <?php print _('Web Server') ?> / <a class="generate" href="/edit/server/<? echo $_SESSION['WEB_SYSTEM'] ?>/"><?=_('configure')?></a>
+                                                <?php print _('Web Server') ?> <a href="/edit/server/<? echo $_SESSION['WEB_SYSTEM'] ?>/"><i class="fas fa-pencil-alt status-icon orange icon-pad-right"></i></a>
                                             </td>
                                         </tr>
                                         <tr>
@@ -244,7 +244,7 @@
                                         <?php if (!empty($_SESSION['WEB_BACKEND'])) { ?>
                                         <tr>
                                             <td class="vst-text">
-                                                <?php print _('Backend Server') ?> / <a class="generate" href="/edit/server/<? echo $_SESSION['WEB_BACKEND'] ?>/"><?=_('configure')?></a>
+                                                <?php print _('Backend Server') ?> <a href="/edit/server/<? echo $_SESSION['WEB_BACKEND'] ?>/"><i class="fas fa-pencil-alt status-icon orange icon-pad-right"></i></a>
                                             </td>
                                         </tr>
                                         <tr>
@@ -319,7 +319,7 @@
                                     <table style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="dns">
                                         <tr>
                                             <td class="vst-text step-top">
-                                                <?php print _('DNS Server') ?> / <a class="generate" href="/edit/server/<? echo $_SESSION['DNS_SYSTEM'] ?>/"><?=_('configure')?></a>
+                                                <?php print _('DNS Server') ?> <a href="/edit/server/<? echo $_SESSION['DNS_SYSTEM'] ?>/"><i class="fas fa-pencil-alt status-icon orange icon-pad-right"></i></a>
                                             </td>
                                         </tr>
                                         <tr>
@@ -377,7 +377,7 @@
                                     <table style="display:<?php if (empty($v_mail_adv)) echo 'none';?> ;" id="mail">
                                         <tr>
                                             <td class="vst-text step-top">
-                                                <?php print _('Mail Server') ?> / <a class="generate" href="/edit/server/<? echo $_SESSION['MAIL_SYSTEM'] ?>/"><?=_('configure')?></a>
+                                                <?php print _('Mail Server') ?> <a href="/edit/server/<? echo $_SESSION['MAIL_SYSTEM'] ?>/"><i class="fas fa-pencil-alt status-icon orange icon-pad-right"></i></a>
                                             </td>
                                         </tr>
                                         <tr>
@@ -389,7 +389,7 @@
                                         <?php if (!empty($_SESSION['ANTIVIRUS_SYSTEM'])) { ?>
                                         <tr>
                                             <td class="vst-text">
-                                                <?php print _('Antivirus') ?> / <a class="generate" href="/edit/server/<? echo $_SESSION['ANTIVIRUS_SYSTEM'] ?>/"><?=_('configure')?></a>
+                                                <?php print _('Antivirus') ?> <a href="/edit/server/<? echo $_SESSION['ANTIVIRUS_SYSTEM'] ?>/"><i class="fas fa-pencil-alt status-icon orange icon-pad-right"></i></a>
                                             </td>
                                         </tr>
                                         <tr>
@@ -402,7 +402,7 @@
                                         <?php if (!empty($_SESSION['ANTISPAM_SYSTEM'])) { ?>
                                         <tr>
                                             <td class="vst-text">
-                                                <?php print _('AntiSpam') ?> / <a class="generate" href="/edit/server/<? echo $_SESSION['ANTISPAM_SYSTEM'] ?>/"><?=_('configure')?></a>
+                                                <?php print _('AntiSpam') ?> <a href="/edit/server/<? echo $_SESSION['ANTISPAM_SYSTEM'] ?>/"><i class="fas fa-pencil-alt status-icon orange icon-pad-right"></i></a>
                                             </td>
                                         </tr>
                                         <tr>
@@ -412,6 +412,7 @@
                                             </td>
                                         </tr>
                                         <?php } ?>
+                                        <?php if($_SESSION['WEBMAIL_SYSTEM']){?>   
                                         <tr>
                                             <td class="vst-text">
                                                 <?php print _('Webmail URL') ?>
@@ -423,6 +424,7 @@
                                                 <br><br>
                                             </td>
                                         </tr>
+                                        <?php } ?>
 					                    <tr>
                                                 <td class="vst-text">
                                                 <label>
@@ -499,7 +501,7 @@
                                     <table style="display:<?php if (empty($v_db_adv)) echo 'none';?> ;" id="db">
                                         <tr>
                                             <td class="vst-text step-top">
-                                                <?php print _('MySQL Support');?> / <a class="generate" href="/edit/server/mysql/"><?=_('configure')?></a>
+                                                <?php print _('MySQL Support');?> <a href="/edit/server/mysql/"><i class="fas fa-pencil-alt status-icon orange icon-pad-right"></i></a>
                                             </td>
                                         </tr>
                                         <tr>
@@ -592,7 +594,7 @@
                                         <?php }} ?>
                                         <tr>
                                             <td class="vst-text input-label">
-                                                <?php print _('PostgreSQL Support');?> / <a class="generate" href="/edit/server/postgresql/"><?=_('configure')?></a>
+                                                <?php print _('PostgreSQL Support');?> <a href="/edit/server/postgresql/"><i class="fas fa-pencil-alt status-icon orange icon-pad-right"></i></a>
                                             </td>
                                         </tr>
                                         <tr>
@@ -873,7 +875,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput" name="v_ssl_crt"><?=htmlentities(trim($v_ssl_crt, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" name="v_ssl_crt"><?=htmlentities(trim($v_ssl_crt, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <tr>
@@ -883,7 +885,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput" name="v_ssl_key"><?=htmlentities(trim($v_ssl_key, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" name="v_ssl_key"><?=htmlentities(trim($v_ssl_key, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <tr>

+ 6 - 6
web/templates/admin/edit_web.html

@@ -170,9 +170,9 @@
                                     <table style="display:<?php if (empty($v_redirect)) { echo 'none';} else {echo 'block';}?> ;" id="v_redirect">
                                         <tr>
                                             <td>
-                                                <input type="radio" name="v-redirect" value="<?php echo 'www.'.$v_domain;?>" <?php if ($v_redirect == "www.".$v_domain) echo "checked"; ?> class="v-redirect-custom-value"><?=sprintf(_('Redirect visitors to %s'),"www.".$v_domain);?></label></input><br />
-                                                <input type="radio" name="v-redirect" value="<?php echo $v_domain;?>" <?php if( $v_redirect == $v_domain) echo "checked";?> class="v-redirect-custom-value"><?=sprintf(_('Redirect visitors to %s'),$v_domain);?></label></input><br />
-                                                <input type="radio" name="v-redirect" value="custom" <?php if( !empty($v_redirect_custom)) echo "checked";?> class="v-redirect-custom-value"><?=_("Redirect visitors to a custom domain or web address");?></label></input>
+                                                <label><input type="radio" name="v-redirect" value="<?php echo 'www.'.$v_domain;?>" <?php if ($v_redirect == "www.".$v_domain) echo "checked"; ?> class="v-redirect-custom-value"><?=sprintf(_('Redirect visitors to %s'),"www.".$v_domain);?></label></input><br />
+                                                <label><input type="radio" name="v-redirect" value="<?php echo $v_domain;?>" <?php if( $v_redirect == $v_domain) echo "checked";?> class="v-redirect-custom-value"><?=sprintf(_('Redirect visitors to %s'),$v_domain);?></label></input><br />
+                                                <label><input type="radio" name="v-redirect" value="custom" <?php if( !empty($v_redirect_custom)) echo "checked";?> class="v-redirect-custom-value"><?=_("Redirect visitors to a custom domain or web address");?></label></input>
                                             </td>
                                         </tr>
                                         <tr>
@@ -256,7 +256,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput short" name="v_ssl_crt" id="ssl_crt"><?=htmlentities(trim($v_ssl_crt, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" name="v_ssl_crt" id="ssl_crt"><?=htmlentities(trim($v_ssl_crt, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <tr>
@@ -266,7 +266,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput short" name="v_ssl_key"><?=htmlentities(trim($v_ssl_key, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" name="v_ssl_key"><?=htmlentities(trim($v_ssl_key, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <tr>
@@ -276,7 +276,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput short" name="v_ssl_ca"><?=htmlentities(trim($v_ssl_ca, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" name="v_ssl_ca"><?=htmlentities(trim($v_ssl_ca, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <?

+ 0 - 7
web/templates/admin/list_backup_detail.html

@@ -60,7 +60,6 @@
         <div class="l-unit__col l-unit__col--right">
             <div class="clearfix l-unit__stat-col--left super-compact">
               <input id="check<?=$i?>" class="ch-toggle" type="checkbox" name="web[]" value="<?=$key?>">
-              <label for="check<?=$i++?>" class="check-label"></label>
             </div>
 
             <div class="clearfix l-unit__stat-col--left compact-4">
@@ -98,7 +97,6 @@
           <div class="l-unit__col l-unit__col--right">
               <div class="clearfix l-unit__stat-col--left super-compact">
                   <input id="check2<?=$i?>" class="ch-toggle" type="checkbox" name="mail[]" value="<?=$key?>">
-                  <label for="check2<?=$i++?>" class="check-label"></label>
               </div>
   
               <div class="clearfix l-unit__stat-col--left compact-4">
@@ -136,7 +134,6 @@
           <div class="l-unit__col l-unit__col--right">
               <div class="clearfix l-unit__stat-col--left super-compact">
                 <input id="check3<?=$i?>" class="ch-toggle" type="checkbox" name="dns[]" value="<?=$key?>">
-                <label for="check3<?=$i++?>" class="check-label"></label>
               </div>
   
               <div class="clearfix l-unit__stat-col--left compact-4">
@@ -174,7 +171,6 @@
           <div class="l-unit__col l-unit__col--right">
               <div class="clearfix l-unit__stat-col--left super-compact">
                 <input id="check4<?=$i?>" class="ch-toggle" type="checkbox" name="db[]" value="<?=$key?>">
-                <label for="check4<?=$i++?>" class="check-label"></label>
               </div>
   
               <div class="clearfix l-unit__stat-col--left compact-4">
@@ -212,7 +208,6 @@
           <div class="l-unit__col l-unit__col--right">
               <div class="clearfix l-unit__stat-col--left super-compact">
                 <input id="check5<?=$i?>" class="ch-toggle" type="checkbox" name="check" value="<?=$key?>">
-                <label for="check5<?=$i++?>" class="check-label"></label>
               </div>
   
               <div class="clearfix l-unit__stat-col--left compact-4">
@@ -249,7 +244,6 @@
           <div class="l-unit__col l-unit__col--right">
               <div class="clearfix l-unit__stat-col--left super-compact">
                 <input id="check6<?=$i?>" class="ch-toggle" type="checkbox" name="udir[]" value="<?=$key?>">
-                <label for="check6<?=$i++?>" class="check-label"></label>
               </div>
   
               <div class="clearfix l-unit__stat-col--left compact-4">
@@ -281,7 +275,6 @@
           <div class="l-unit__col l-unit__col--right">
               <div class="clearfix l-unit__stat-col--left super-compact">
                 <input id="check7<?=$i?>" class="ch-toggle" type="checkbox" name="cron" value="<?=$i?>">
-                <label for="check7<?=$i++?>" class="check-label"></label>
               </div>
   
               <div class="clearfix l-unit__stat-col--left compact-4">

+ 1 - 1
web/templates/admin/list_key.html

@@ -29,7 +29,7 @@
   ?>
   <div class="l-unit header animated fadeIn">
     <div class="l-unit__col l-unit__col--right">
-      <div class="clearfix l-unit__stat-col--left wide-3"><b><?=$data[$key]['ID'];?></b></div>
+      <div class="clearfix l-unit__stat-col--left wide-3"><b><?=htmlspecialchars($data[$key]['ID']);?></b></div>
           <div class="clearfix l-unit__stat-col--left text-left compact-2">
             <div class="l-unit-toolbar__col l-unit-toolbar__col--right noselect">
               <div class="actions-panel clearfix">

+ 2 - 0
web/templates/admin/list_mail.html

@@ -102,7 +102,9 @@ sort-accounts="<?=$data[$key]['ACCOUNTS']?>" sort-star="<? if($_SESSION['favouri
                             <div class="actions-panel__col actions-panel__logs shortcut-n" key-action="href"><a href="/add/mail/?domain=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Add Mail Account')?>"><i class="fas fa-plus-circle status-icon green status-icon dim"></i></a></div>
                             <div class="actions-panel__col actions-panel__edit shortcut-l" key-action="href"><a href="?domain=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('mail accounts')?>"><i class="fas fa-users status-icon blue status-icon dim"></i></a></div>
                             <div class="actions-panel__col actions-panel__edit shortcut-l" key-action="href"><a href="?domain=<?=$key?>&dns=1&token=<?=$_SESSION['token']?>" title="<?=_('DNS records mail')?>"><i class="fas fa-atlas status-icon blue status-icon dim"></i></a></div>
+                            <?php if($_SESSION['WEBMAIL_SYSTEM']){?>
                             <div class="actions-panel__col actions-panel__edit" key-action="href"><a href="http://<?=$webmail;?>.<?=$key?>/" target="_blank" title="<?=_('open webmail')?>"><i class="fas fa-paper-plane status-icon lightblue status-icon dim"></i></a></div>
+                            <?php } ?>
                             <div class="actions-panel__col actions-panel__logs shortcut-enter" key-action="href"><a href="/edit/mail/?domain=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Editing Mail Domain')?>"><i class="fas fa-pencil-alt status-icon orange status-icon dim"></i></a></div>
 
                             <div class="actions-panel__col actions-panel__suspend shortcut-s" key-action="js">

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

@@ -98,8 +98,9 @@ sort-star="<? if($_SESSION['favourites']['MAIL_ACC'][$key."@".$_GET['domain']] =
                 <div class="l-unit-toolbar__col l-unit-toolbar__col--right noselect">
                   <div class="actions-panel clearfix">
                     <div class="actions-panel__col actions-panel__edit" key-action="href"><a href="http://<?=$v_webmail_alias;?>.<?=htmlspecialchars($_GET['domain'])?>/?_user=<?=$key?>@<?=htmlspecialchars($_GET['domain'])?>" target="_blank" title="<?=_('open webmail')?>"><i class="fas fa-envelope-open-text status-icon maroon status-icon dim"></i></a></div>
+                    <?php if($_SESSION['WEBMAIL_SYSTEM']){?>
                     <div class="actions-panel__col actions-panel__logs shortcut-enter" key-action="href"><a href="/edit/mail/?domain=<?=htmlspecialchars($_GET['domain'])?>&account=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Editing Mail Account')?>"><i class="fas fa-pencil-alt status-icon orange status-icon dim"></i></a></div>
-
+                    <?php } ?>
                     <div class="actions-panel__col actions-panel__suspend shortcut-s" key-action="js">
                       <a id="<?=$spnd_action ?>_link_<?=$i?>" class="data-controls do_<?=$spnd_action?>" title="<?=_($spnd_action)?>">
                         <i class="fas <?=$spnd_icon?> status-icon highlight status-icon dim do_<?=$spnd_action?>"></i>

+ 14 - 12
web/templates/admin/list_mail_dns.html

@@ -42,27 +42,29 @@ if (!empty($_SESSION['WEBMAIL_ALIAS'])) $v_webmail_alias = $_SESSION['WEBMAIL_AL
     <div class="l-unit animated fadeIn">
                     <div class="l-unit__col l-unit__col--right">
                       <div class="clearfix l-unit__stat-col--left wide-3"><b><input type="text" class="vst-input" style="width:200px !important;" value="mail.<?=htmlspecialchars($_GET['domain']);?>"/></b> </div>
-                    <div class="clearfix l-unit__stat-col--left text-center"><b>A</b></div>
-                    <div class="clearfix l-unit__stat-col--left text-center"><b>10</b></div>
-                    <div class="clearfix l-unit__stat-col--left text-center"><b>14400</b></div>
+                    <div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>A</b></div>
+                    <div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>10</b></div>
+                    <div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>14400</b></div>
                     <div class="clearfix l-unit__stat-col--left wide-3"><b><input type="text" class="vst-input" value="<?php echo array_key_first($ips);?>"/></b></div>
               </div>
     </div>
+    <?php if($_SESSION['WEBMAIL_SYSTEM']){?>
     <div class="l-unit animated fadeIn">
                   <div class="l-unit__col l-unit__col--right">
                     <div class="clearfix l-unit__stat-col--left wide-3"><b><input type="text" class="vst-input" style="width:200px !important;" value="<?=$v_webmail_alias;?>.<?=htmlspecialchars($_GET['domain']);?>"/></b> </div>
-                  <div class="clearfix l-unit__stat-col--left text-center"><b>A</b></div>
-                  <div class="clearfix l-unit__stat-col--left text-center"><b>&nbsp;</b></div>
-                  <div class="clearfix l-unit__stat-col--left text-center"><b>14400</b></div>
+                  <div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>A</b></div>
+                  <div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>&nbsp;</b></div>
+                  <div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>14400</b></div>
                   <div class="clearfix l-unit__stat-col--left wide-3"><b><input type="text" class="vst-input" value="<?php echo array_key_first($ips);?>"/></b></div>
             </div>
     </div>
+    <?php } ?>
     <div class="l-unit animated fadeIn">
           <div class="l-unit__col l-unit__col--right">
             <div class="clearfix l-unit__stat-col--left wide-3"><b><input type="text" class="vst-input" style="width:200px !important;" value="@"/></b> </div>
-          <div class="clearfix l-unit__stat-col--left text-center"><b>TXT</b></div>
-          <div class="clearfix l-unit__stat-col--left text-center"><b>&nbsp;</b></div>
-          <div class="clearfix l-unit__stat-col--left text-center"><b>14400</b></div>
+          <div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>TXT</b></div>
+          <div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>&nbsp;</b></div>
+          <div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>14400</b></div>
           <div class="clearfix l-unit__stat-col--left  wide-3 "><b><input type="text" class="vst-input" value="<?php echo htmlspecialchars('"v=spf1 a mx ip4:'.array_key_first($ips).'; -all"');?>"/></b></div>
           </div>
     </div>
@@ -70,9 +72,9 @@ if (!empty($_SESSION['WEBMAIL_ALIAS'])) $v_webmail_alias = $_SESSION['WEBMAIL_AL
 <div class="l-unit animated fadeIn">
       <div class="l-unit__col l-unit__col--right">
         <div class="clearfix l-unit__stat-col--left wide-3"><b><input type="text" class="vst-input" style="width:200px !important;" value="<?=htmlspecialchars($key);?>"/></b></div>
-      <div class="clearfix l-unit__stat-col--left text-center"><b>TXT</b></div>
-      <div class="clearfix l-unit__stat-col--left text-center"><b>&nbsp;</b></div>
-      <div class="clearfix l-unit__stat-col--left text-center"><b>3600</b></div>
+      <div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>TXT</b></div>
+      <div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>&nbsp;</b></div>
+      <div class="clearfix l-unit__stat-col--left text-center step-top-small"><b>3600</b></div>
       <div class="clearfix l-unit__stat-col--left  wide-3 "><b><input type="text" class="vst-input" value="<?=htmlspecialchars(str_replace("'",'"',$dkim[$key]['TXT']));?>"</b></div>
       </div>
 </div>

+ 1 - 1
web/templates/admin/list_stats.html

@@ -223,6 +223,7 @@
 
             </table>
           </div>
+        </div>
           <!-- /.l-unit__stats -->
         </div>
         <!-- /.l-unit__col -->
@@ -240,7 +241,6 @@
         <div class="l-unit-ft">
           <table class='data'></table>
           <!-- /form -->
-          <div class="l-unit__col l-unit__col--left clearfix"></div>
           <div class="data-count l-unit__col l-unit__col--right clearfix">
             <?php
               printf(ngettext('%d month', '%d months', $i),$i);

+ 3 - 4
web/templates/admin/panel.html

@@ -10,7 +10,7 @@
 	<div class="l-center">
 		<a href="/list/user/" class="l-logo" title="<?=_('Hestia Control Panel');?>"></a>
 		<div class="l-menu clearfix noselect">
-			<div class="l-menu__item <?php if($TAB == 'WEB' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'DNS' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'MAIL' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'DB' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'BACKUP' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'CRON' ) echo 'l-menu__item--active' ?><?php if($TAB == 'PACKAGE' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'USER' ) echo 'l-menu__item--active' ?>"><a href="/list/user/"><i class="fas fa-tasks panel-icon"></i><?=_('Records')?></a></div>
+			<div class="l-menu__item <?php if($TAB == 'WEB' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'DNS' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'MAIL' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'DB' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'BACKUP' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'CRON' ) echo 'l-menu__item--active' ?><?php if($TAB == 'PACKAGE' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'USER' ) echo 'l-menu__item--active' ?><?php if($TAB == 'LOG' ) echo 'l-menu__item--active' ?>"><a href="/list/user/"><i class="fas fa-tasks panel-icon"></i><?=_('Records')?></a></div>
 			<?php if ((isset($_SESSION['FILE_MANAGER'])) && (!empty($_SESSION['FILE_MANAGER'])) && ($_SESSION['FILE_MANAGER'] == "true")) {?>
 				<div class="l-menu__item <?php if($TAB == 'FM' ) echo 'l-menu__item--active' ?>"><a href="/fm/"><i class="fas fa-folder-open panel-icon"></i><?=_('Files')?></a></div>
 			<?php } ?>
@@ -30,8 +30,7 @@
 				</a>
 			</div>
 			<div class="l-menu__item <?php if($TAB == 'SERVER' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'UPDATES' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'IP' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'RRD' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'FIREWALL' ) echo 'l-menu__item--active' ?>"><a href="/list/server/" class="l-profile__serversettings" title="<?=_('Server')?>"><i class="fas fa-cog"></i></a></div>
-			<div class="l-menu__item"><a href="/edit/user/?user=<?php echo $user; ?>" title="<?=htmlspecialchars($user)?> (<?=htmlspecialchars($panel[$user]['NAME'])?>)" class="l-profile__username"><i class="fas fa-user-edit"></i></a></div>
-			<div class="l-menu__item"><a href="https://github.com/hestiacp/hestiacp/issues/" target="_new" rel="noopener" title="<?=_('Submit an issue report')?>" class="l-profile__help"><i class="fas fa-exclamation-triangle"></i></a></div>
+			<div class="l-menu__item"><a href="/edit/user/?user=<?php echo $user; ?>" title="<?=htmlspecialchars($user)?> (<?=htmlspecialchars($panel[$user]['NAME'])?>)" class="l-profile__username"><i class="fas fa-user-circle"></i></a></div>
 			<div class="l-menu__item"><a href="https://docs.hestiacp.com/" title="<?=_('Help')?>" class="l-profile__help" rel="noopener" target="_blank"><i class="fas fa-question-circle"></i></a></div>
 			<div class="l-menu__item"><a href="/logout/" title="<?=_('Log out')?>" class="l-profile__logout"><i class="fas fa-sign-out-alt"></i></a></div>
 		</div>
@@ -42,7 +41,7 @@
 <div class="l-content">
 	<div class="l-center">
 		<div class="l-stat">
-			<div class="l-stat__col <?php if($TAB == 'USER' ) echo 'l-stat__col--active' ?>">
+			<div class="l-stat__col <?php if($TAB == 'USER' ) echo 'l-stat__col--active' ?><?php if($TAB == 'LOG' ) echo 'l-stat__col--active' ?>">
 				<a href="/list/user/">
 					<div class="l-stat__col-title"><?=_('USER')?>&nbsp;&nbsp;<i class="fas fa-users"></i></div>
 					<ul>

+ 3 - 3
web/templates/user/edit_web.html

@@ -261,7 +261,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput short" name="v_ssl_crt" id="ssl_crt"><?=htmlentities(trim($v_ssl_crt, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" name="v_ssl_crt" id="ssl_crt"><?=htmlentities(trim($v_ssl_crt, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <tr>
@@ -271,7 +271,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput short" name="v_ssl_key"><?=htmlentities(trim($v_ssl_key, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" name="v_ssl_key"><?=htmlentities(trim($v_ssl_key, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <tr>
@@ -281,7 +281,7 @@
                                         </tr>
                                         <tr>
                                             <td>
-                                                <textarea size="20" class="vst-textinput short" name="v_ssl_ca"><?=htmlentities(trim($v_ssl_ca, "'"))?></textarea>
+                                                <textarea size="20" class="vst-textinput short console" name="v_ssl_ca"><?=htmlentities(trim($v_ssl_ca, "'"))?></textarea>
                                             </td>
                                         </tr>
                                         <?

+ 2 - 0
web/templates/user/list_mail.html

@@ -101,7 +101,9 @@ sort-accounts="<?=$data[$key]['ACCOUNTS']?>" sort-star="<? if($_SESSION['favouri
                         <div class="actions-panel__col actions-panel__logs shortcut-n" key-action="href"><a href="/add/mail/?domain=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Add Mail Account')?>"><i class="fas fa-plus-circle status-icon green status-icon dim"></i></a></div>
                         <div class="actions-panel__col actions-panel__edit shortcut-l" key-action="href"><a href="?domain=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('mail accounts')?>"><i class="fas fa-users status-icon blue status-icon dim"></i></a></div>
                         <div class="actions-panel__col actions-panel__edit shortcut-l" key-action="href"><a href="?domain=<?=$key?>&dns=1&token=<?=$_SESSION['token']?>" title="<?=_('DNS records mail')?>"><i class="fas fa-atlas status-icon blue status-icon dim"></i></a></div>
+                        <?php if($_SESSION['WEBMAIL_SYSTEM']){?>
                         <div class="actions-panel__col actions-panel__edit" key-action="href"><a href="http://<?=$webmail;?>.<?=$key?>/" target="_blank" title="<?=_('open webmail')?>"><i class="fas fa-paper-plane status-icon lightblue status-icon dim"></i></a></div>
+                        <?php } ?>
                         <div class="actions-panel__col actions-panel__logs shortcut-enter" key-action="href"><a href="/edit/mail/?domain=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Editing Mail Domain')?>"><i class="fas fa-pencil-alt status-icon orange status-icon dim"></i></a></div>
 
                         <div class="actions-panel__col actions-panel__suspend shortcut-s" key-action="js">

+ 2 - 0
web/templates/user/list_mail_acc.html

@@ -97,7 +97,9 @@ sort-star="<? if($_SESSION['favourites']['MAIL_ACC'][$key."@".$_GET['domain']] =
               <div class="clearfix l-unit__stat-col--left text-right compact-4">
                 <div class="l-unit-toolbar__col l-unit-toolbar__col--right noselect">
                   <div class="actions-panel clearfix">
+                    <?php if($_SESSION['WEBMAIL_SYSTEM']){?>
                     <div class="actions-panel__col actions-panel__edit" key-action="href"><a href="http://<?=$v_webmail_alias;?>.<?=htmlspecialchars($_GET['domain'])?>/?_user=<?=$key?>@<?=htmlspecialchars($_GET['domain'])?>" target="_blank" title="<?=_('open webmail')?>"><i class="fas fa-envelope-open-text status-icon maroon status-icon dim"></i></a></div>
+                    <?php } ?>
                     <div class="actions-panel__col actions-panel__logs shortcut-enter" key-action="href"><a href="/edit/mail/?domain=<?=htmlspecialchars($_GET['domain'])?>&account=<?=$key?>&token=<?=$_SESSION['token']?>" title="<?=_('Editing Mail Account')?>"><i class="fas fa-pencil-alt status-icon orange status-icon dim"></i></a></div>
 
                     <div class="actions-panel__col actions-panel__suspend shortcut-s" key-action="js">

+ 2 - 2
web/templates/user/list_stats.html

@@ -87,7 +87,7 @@
               </tr>
               <tr>
                 <td>
-                  <div class="l-unit__stat-cols clearfix tiny">
+                <div class="l-unit__stat-cols clearfix tiny" style="<?if ($data[$key]['IP_OWNED'] === '0') { echo 'display: none'; }?>">
                       <div class="text-right">
                         <span style="float: left;font-weight:500;"><?=_('IP Addresses')?>:</span><b><?=$data[$key]['IP_OWNED']?></b> <?=_('IPs')?></span>
                       </div>
@@ -199,6 +199,7 @@
 
             </table>
           </div>
+          </div>
           <!-- /.l-unit__stats -->
         </div>
         <!-- /.l-unit__col -->
@@ -216,7 +217,6 @@
         <div class="l-unit-ft">
           <table class='data'></table>
           <!-- /form -->
-          <div class="l-unit__col l-unit__col--left clearfix"></div>
           <div class="data-count l-unit__col l-unit__col--right clearfix">
             <?php
               printf(ngettext('%d month', '%d months', $i),$i);

+ 2 - 3
web/templates/user/panel.html

@@ -10,7 +10,7 @@
 	<div class="l-center">
 		<a href="/list/web/" class="l-logo" title="<?=_('Hestia Control Panel');?>"></a>
 		<div class="l-menu clearfix noselect">
-			<div class="l-menu__item <?php if($TAB == 'WEB' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'DNS' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'MAIL' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'DB' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'BACKUP' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'CRON' ) echo 'l-menu__item--active' ?>"><a href="/list/web/"><i class="fas fa-tasks panel-icon"></i><?=_('Records')?></a></div>
+			<div class="l-menu__item <?php if($TAB == 'WEB' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'DNS' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'MAIL' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'DB' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'BACKUP' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'CRON' ) echo 'l-menu__item--active' ?> <?php if($TAB == 'LOG' ) echo 'l-menu__item--active' ?>"><a href="/list/web/"><i class="fas fa-tasks panel-icon"></i><?=_('Records')?></a></div>
 			<?php if ((isset($_SESSION['FILE_MANAGER'])) && (!empty($_SESSION['FILE_MANAGER'])) && ($_SESSION['FILE_MANAGER'] == "true")) {?>
 				<div class="l-menu__item <?php if($TAB == 'FM' ) echo 'l-menu__item--active' ?>"><a href="/fm/"><i class="fas fa-folder-open panel-icon"></i><?=_('Files')?></a></div>
 			<?php } ?>
@@ -25,8 +25,7 @@
 				</span>
 			</div>
 			<div class="l-menu__item"><a title="<?=_('Notifications')?>" class="l-profile__notifications <? if($panel[$user]['NOTIFICATIONS'] == 'yes') echo " updates"; ?>"><i class="fas fa-bell <?if($panel[$user]['NOTIFICATIONS'] == 'yes') echo " status-icon orange"; ?>"></i></a></div>
-			<div class="l-menu__item"><a href="/edit/user/?user=<?php echo $user; ?>" title="<?=htmlspecialchars($user)?> (<?=htmlspecialchars($panel[$user]['NAME'])?>)" class="l-profile__username"><i class="fas fa-user-edit"></i></a></div>
-			<div class="l-menu__item"><a href="https://github.com/hestiacp/hestiacp/issues/" target="_new" rel="noopener" title="Submit a bug report" class="l-profile__help"><i class="fas fa-exclamation-triangle"></i></a></div>
+			<div class="l-menu__item"><a href="/edit/user/?user=<?php echo $user; ?>" title="<?=htmlspecialchars($user)?> (<?=htmlspecialchars($panel[$user]['NAME'])?>)" class="l-profile__username"><i class="fas fa-user-circle"></i></a></div>
 			<div class="l-menu__item"><a href="https://docs.hestiacp.com/" title="<?=_('Help')?>" rel="noopener" class="l-profile__help" target="_blank"><i class="fas fa-question-circle"></i></a></div>
 			<div class="l-menu__item"><a href="/logout/" title="<?=_('Log out')?>" class="l-profile__logout"><i class="fas fa-sign-out-alt"></i></a></div>
 		</div>

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