瀏覽代碼

new improved template scheme

Serghey Rodin 12 年之前
父節點
當前提交
fd4e68bb8c
共有 96 個文件被更改,包括 1386 次插入1416 次删除
  1. 15 21
      bin/v-add-dns-domain
  2. 1 1
      bin/v-add-dns-on-web-alias
  3. 5 3
      bin/v-add-domain
  4. 57 21
      bin/v-add-sys-ip
  5. 26 31
      bin/v-add-web-domain
  6. 12 11
      bin/v-add-web-domain-alias
  7. 12 2
      bin/v-add-web-domain-ftp
  8. 26 33
      bin/v-add-web-domain-proxy
  9. 19 23
      bin/v-add-web-domain-ssl
  10. 23 26
      bin/v-backup-user
  11. 3 1
      bin/v-change-user-package
  12. 15 8
      bin/v-change-user-template
  13. 16 16
      bin/v-change-web-domain-ip
  14. 19 27
      bin/v-change-web-domain-proxy-tpl
  15. 2 1
      bin/v-change-web-domain-sslcert
  16. 8 7
      bin/v-change-web-domain-sslhome
  17. 16 16
      bin/v-change-web-domain-tpl
  18. 26 18
      bin/v-delete-sys-ip
  19. 35 34
      bin/v-delete-web-domain
  20. 12 11
      bin/v-delete-web-domain-alias
  21. 26 24
      bin/v-delete-web-domain-proxy
  22. 21 19
      bin/v-delete-web-domain-ssl
  23. 2 1
      bin/v-delete-web-domains
  24. 10 9
      bin/v-list-user
  25. 4 3
      bin/v-list-user-package
  26. 4 3
      bin/v-list-user-packages
  27. 5 5
      bin/v-list-users
  28. 1 1
      bin/v-list-web-domain
  29. 1 1
      bin/v-list-web-domains
  30. 3 3
      bin/v-list-web-domains-proxy
  31. 4 3
      bin/v-list-web-templates
  32. 9 4
      bin/v-list-web-templates-proxy
  33. 33 36
      bin/v-rebuild-web-domains
  34. 9 5
      bin/v-restart-cron
  35. 9 4
      bin/v-restart-dns
  36. 6 13
      bin/v-restart-ftp
  37. 9 4
      bin/v-restart-mail
  38. 41 0
      bin/v-restart-proxy
  39. 5 21
      bin/v-restart-web
  40. 44 64
      bin/v-restore-user
  41. 19 16
      bin/v-suspend-web-domain
  42. 18 16
      bin/v-unsuspend-web-domain
  43. 4 42
      bin/v-update-sys-ip
  44. 4 4
      bin/v-update-sys-rrd
  45. 1 1
      bin/v-update-web-domain-traff
  46. 1 1
      bin/v-update-web-domains-traff
  47. 19 101
      func/domain.sh
  48. 1 27
      func/ip.sh
  49. 2 2
      func/main.sh
  50. 29 30
      func/rebuild.sh
  51. 79 20
      upd/convert-templates.sh
  52. 1 14
      web/add/dns/index.php
  53. 23 5
      web/add/package/index.php
  54. 28 30
      web/add/web/index.php
  55. 23 5
      web/edit/package/index.php
  56. 0 17
      web/edit/user/index.php
  57. 26 21
      web/edit/web/index.php
  58. 5 4
      web/inc/i18n/en.php
  59. 5 4
      web/inc/i18n/es.php
  60. 5 4
      web/inc/i18n/ro.php
  61. 5 4
      web/inc/i18n/ru.php
  62. 5 4
      web/inc/i18n/ua.php
  63. 4 4
      web/inc/main.php
  64. 3 3
      web/templates/admin/add_db.html
  65. 0 23
      web/templates/admin/add_dns.html
  66. 51 5
      web/templates/admin/add_package.html
  67. 6 29
      web/templates/admin/add_web.html
  68. 2 2
      web/templates/admin/edit_cron.html
  69. 5 5
      web/templates/admin/edit_db.html
  70. 2 2
      web/templates/admin/edit_dns.html
  71. 2 2
      web/templates/admin/edit_dns_rec.html
  72. 2 2
      web/templates/admin/edit_ip.html
  73. 2 2
      web/templates/admin/edit_mail.html
  74. 2 2
      web/templates/admin/edit_mail_acc.html
  75. 58 11
      web/templates/admin/edit_package.html
  76. 2 23
      web/templates/admin/edit_user.html
  77. 34 10
      web/templates/admin/edit_web.html
  78. 23 66
      web/templates/admin/list_backup.html
  79. 12 9
      web/templates/admin/list_db.html
  80. 9 13
      web/templates/admin/list_dns.html
  81. 6 11
      web/templates/admin/list_mail.html
  82. 3 3
      web/templates/admin/list_mail_acc.html
  83. 36 77
      web/templates/admin/list_packages.html
  84. 25 28
      web/templates/admin/list_stats.html
  85. 21 18
      web/templates/admin/list_user.html
  86. 39 32
      web/templates/admin/list_web.html
  87. 14 3
      web/templates/header.html
  88. 6 6
      web/templates/user/add_web.html
  89. 6 6
      web/templates/user/edit_web.html
  90. 12 9
      web/templates/user/list_db.html
  91. 9 13
      web/templates/user/list_dns.html
  92. 6 11
      web/templates/user/list_mail.html
  93. 3 3
      web/templates/user/list_mail_acc.html
  94. 18 22
      web/templates/user/list_stats.html
  95. 21 18
      web/templates/user/list_user.html
  96. 45 37
      web/templates/user/list_web.html

+ 15 - 21
bin/v-add-dns-domain

@@ -1,6 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 # info: add dns domain
 # info: add dns domain
-# options: USER DOMAIN IP [TEMPLATE] [NS1] [NS2] [NS3] [NS4] [RESTART]
+# options: USER DOMAIN IP [NS1] [NS2] [NS3] [NS4] [RESTART]
 #
 #
 # The function adds DNS zone with records defined in the template. If the exp
 # The function adds DNS zone with records defined in the template. If the exp
 # argument isn't stated, the expiration date value will be set to next year.
 # argument isn't stated, the expiration date value will be set to next year.
@@ -20,12 +20,11 @@ domain=$(echo $domain | sed -e 's/\.*$//g' -e 's/^\.*//g')
 domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
 domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
 domain_idn=$(idn -t --quiet -a "$domain")
 domain_idn=$(idn -t --quiet -a "$domain")
 ip=$3
 ip=$3
-template=$4
-ns1=$5
-ns2=$6
-ns3=$7
-ns4=$8
-restart=$9
+ns1=$4
+ns2=$5
+ns3=$6
+ns4=$7
+restart=$8
 
 
 # Includes
 # Includes
 source $VESTA/conf/vesta.conf
 source $VESTA/conf/vesta.conf
@@ -37,36 +36,32 @@ source $VESTA/func/domain.sh
 #                    Verifications                         #
 #                    Verifications                         #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-check_args '3' "$#" 'USER DOMAIN IP [TEMPLATE] [NS1] [NS2] [NS3] [NS4]'
+check_args '3' "$#" 'USER DOMAIN IP [NS1] [NS2] [NS3] [NS4]'
 validate_format 'user' 'domain' 'ip'
 validate_format 'user' 'domain' 'ip'
 is_system_enabled "$DNS_SYSTEM"
 is_system_enabled "$DNS_SYSTEM"
 is_object_valid 'user' 'USER' "$user"
 is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 is_domain_new 'dns'
 is_domain_new 'dns'
 is_package_full 'DNS_DOMAINS'
 is_package_full 'DNS_DOMAINS'
-if [ ! -z "$template" ]; then
-    validate_format 'template'
-    is_dns_template_valid
-else
-    template=$(get_user_value '$TEMPLATE')
-    is_dns_template_valid
-fi
+
+template=$(get_user_value '$DNS_TEMPLATE')
+is_dns_template_valid
 
 
 if [ ! -z "$ns1" ]; then
 if [ ! -z "$ns1" ]; then
-    ns1=$(echo $5 | sed -e 's/\.*$//g' -e 's/^\.*//g')
+    ns1=$(echo $4 | sed -e 's/\.*$//g' -e 's/^\.*//g')
     validate_format 'ns1'
     validate_format 'ns1'
 fi
 fi
 if [ ! -z "$ns2" ]; then
 if [ ! -z "$ns2" ]; then
-    ns2=$(echo $6 | sed -e 's/\.*$//g' -e 's/^\.*//g')
+    ns2=$(echo $5 | sed -e 's/\.*$//g' -e 's/^\.*//g')
     validate_format 'ns2'
     validate_format 'ns2'
 fi
 fi
 
 
 if [ ! -z "$ns3" ]; then
 if [ ! -z "$ns3" ]; then
-    ns3=$(echo $7 | sed -e 's/\.*$//g' -e 's/^\.*//g')
+    ns3=$(echo $6 | sed -e 's/\.*$//g' -e 's/^\.*//g')
     validate_format 'ns3'
     validate_format 'ns3'
 fi
 fi
 if [ ! -z "$ns4" ]; then
 if [ ! -z "$ns4" ]; then
-    ns4=$(echo $8 | sed -e 's/\.*$//g' -e 's/^\.*//g')
+    ns4=$(echo $7 | sed -e 's/\.*$//g' -e 's/^\.*//g')
     validate_format 'ns4'
     validate_format 'ns4'
 fi
 fi
 
 
@@ -75,7 +70,7 @@ fi
 #                       Action                             #
 #                       Action                             #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-# Defining variables
+# Defining NS variables
 if [ -z $ns2 ]; then
 if [ -z $ns2 ]; then
     i=1
     i=1
     ns=$(get_user_value '$NS')
     ns=$(get_user_value '$NS')
@@ -88,7 +83,6 @@ soa="$ns1"
 exp=$(date +%F -d "+ 1 year")
 exp=$(date +%F -d "+ 1 year")
 ttl=14400
 ttl=14400
 
 
-
 # Adding zone to dns dir
 # Adding zone to dns dir
 cat $DNSTPL/$template.tpl |\
 cat $DNSTPL/$template.tpl |\
     sed -e "s/%ip%/$ip/g" \
     sed -e "s/%ip%/$ip/g" \

+ 1 - 1
bin/v-add-dns-on-web-alias

@@ -58,7 +58,7 @@ else
     dom=$(echo "$dom_alias" | sed -e "s/^$sub.//" )
     dom=$(echo "$dom_alias" | sed -e "s/^$sub.//" )
     if [ ! -e "$USER_DATA/dns/$dom.conf" ]; then
     if [ ! -e "$USER_DATA/dns/$dom.conf" ]; then
         $BIN/v-add-dns-domain \
         $BIN/v-add-dns-domain \
-            $user $dom $IP '' '' '' '' '' $restart > /dev/null
+            $user $dom $IP '' '' '' '' $restart > /dev/null
 
 
         if [ $? -eq 0 ]; then
         if [ $? -eq 0 ]; then
             $BIN/v-add-dns-domain-record \
             $BIN/v-add-dns-domain-record \

+ 5 - 3
bin/v-add-domain

@@ -51,9 +51,11 @@ fi
 if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB_SYSTEM" != 'no' ]; then
 if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB_SYSTEM" != 'no' ]; then
     $BIN/v-add-web-domain $user $domain $ip
     $BIN/v-add-web-domain $user $domain $ip
     retun_code=$?
     retun_code=$?
-    if [ "$PROXY_SYSTEM" = 'nginx' ] && [ "$retun_code" -eq 0 ]; then
-        $BIN/v-add-web-domain-nginx $user $domain
-    fi
+fi
+
+# Proxy support
+if [ ! -z "$PROXY_SYSTEM" ] && [ "$retun_code" -eq 0 ]; then
+    $BIN/v-add-web-domain-proxy $user $domain
 fi
 fi
 
 
 # DNS domain
 # DNS domain

+ 57 - 21
bin/v-add-sys-ip

@@ -19,7 +19,7 @@ ip=${1// /}
 mask=$2
 mask=$2
 interface="${3-eth0}"
 interface="${3-eth0}"
 user="${4-admin}"
 user="${4-admin}"
-ip_status="${5-shared}"     # can be dedicated as well   
+ip_status="${5-shared}" # status can be dedicated
 ip_name=$6
 ip_name=$6
 nat_ip=$7
 nat_ip=$7
 
 
@@ -50,27 +50,64 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                       Action                             #
 #                       Action                             #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
-
-# Get full interface name
 get_ip_iface
 get_ip_iface
-
-# Defining config paths
-conf='/etc/httpd/conf.d/vesta.conf'
-nconf='/etc/nginx/conf.d/vesta_ip.conf'
-iconf='/etc/sysconfig/network-scripts/ifcfg'
-rconf='/etc/httpd/conf.d/mod_extract_forwarded.conf'
-
-# Adding ip
-/sbin/ifconfig "$iface" "$ip" netmask "$mask"
-
-# Adding startup script
-create_ip_startup
+sys_ip_check=$(/sbin/ifconfig | grep "addr:$ip ")
+if [ -z "$sys_ip_check" ]; then
+    /sbin/ifconfig "$iface" "$ip" netmask "$mask"
+
+    # Adding startup script
+    sys_ip="# Added by vesta"
+    sys_ip="$sys_ip\nDEVICE=$iface"
+    sys_ip="$sys_ip\nBOOTPROTO=static"
+    sys_ip="$sys_ip\nONBOOT=yes"
+    sys_ip="$sys_ip\nIPADDR=$ip"
+    sys_ip="$sys_ip\nNETMASK=$mask"
+    echo -e $sys_ip > /etc/sysconfig/network-scripts/ifcfg-$iface
+fi
 
 
 # Adding vesta ip
 # Adding vesta ip
-create_vesta_ip
+echo "OWNER='$user'
+STATUS='$ip_status'
+NAME='$ip_name'
+U_SYS_USERS=''
+U_WEB_DOMAINS='0'
+INTERFACE='$interface'
+NETMASK='$mask'
+NAT='$nat_ip'
+TIME='$TIME'
+DATE='$DATE'" > $VESTA/data/ips/$ip
+chmod 660 $VESTA/data/ips/$ip
+
+# WEB support
+web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf"
+if [ "$WEB_SYSTEM" = 'httpd' ]; then
+    conf_ins='1'
+    conf_line=$(grep -n NameVirtual $web_conf | tail -n1 | cut -f1 -d:)
+    if [ ! -z "$conf_line" ]; then
+        conf_ins=$((conf_line + 1))
+    fi
+    if [ "$WEB_SSL" = 'mod_ssl' ]; then
+        sed -i "$conf_ins i NameVirtualHost $ip:$WEB_SSL_PORT" $web_conf
+        sed -i "$conf_ins i Listen $ip:$WEB_SSL_PORT" $web_conf
+    fi
+    sed -i "$conf_ins i NameVirtualHost $ip:$WEB_PORT" $web_conf
+    sed -i "$conf_ins i Listen $ip:$WEB_PORT" $web_conf
+fi
 
 
-# Namehosting support
-namehost_ip_support
+# Proxy support
+if [ ! -z "$PROXY_SYSTEM" ]; then
+    cat $WEBTPL/$PROXY_SYSTEM/proxy_ip.tpl |\
+        sed -e "s/%ip%/$ip/g" \
+            -e "s/%web_port%/$WEB_PORT/g" \
+            -e "s/%proxy_port%/$PROXY_PORT/g" \
+        > /etc/$PROXY_SYSTEM/conf.d/$ip.conf
+
+    fw_conf="/etc/$WEB_SYSTEM/conf.d/mod_extract_forwarded.conf"
+    if [ -e "$fw_conf" ]; then
+        ips=$(grep 'MEFaccept ' $fw_conf | grep -v '#' | head -n1)
+        sed -i "s/$ips/$ips $ip/g" $fw_conf
+    fi
+fi
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -93,9 +130,8 @@ else
 fi
 fi
 
 
 # Restart web server
 # Restart web server
-if [ "$web_restart" = 'yes' ]; then
-    $BIN/v-restart-web "$EVENT"
-fi
+$BIN/v-restart-web
+$BIN/v-restart-proxy
 
 
 # Logging
 # Logging
 log_history "added system ip address $ip" '' 'admin'
 log_history "added system ip address $ip" '' 'admin'

+ 26 - 31
bin/v-add-web-domain

@@ -1,6 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 # info: add web domain
 # info: add web domain
-# options: USER DOMAIN IP [TEMPLATE] [RESTART]
+# options: USER DOMAIN IP [RESTART]
 #
 #
 # The function adds virtual host to a server. In cases when a template is
 # The function adds virtual host to a server. In cases when a template is
 # undefined in the script, the template "default" will be used. The alias of
 # undefined in the script, the template "default" will be used. The alias of
@@ -21,8 +21,7 @@ domain=$(echo $domain | sed -e 's/\.*$//g' -e 's/^\.*//g')
 domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
 domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
 domain_idn=$(idn -t --quiet -a "$domain")
 domain_idn=$(idn -t --quiet -a "$domain")
 ip=$3
 ip=$3
-template=$4
-restart=$5
+restart=$4
 
 
 # Includes
 # Includes
 source $VESTA/conf/vesta.conf
 source $VESTA/conf/vesta.conf
@@ -35,7 +34,7 @@ source $VESTA/func/ip.sh
 #                    Verifications                         #
 #                    Verifications                         #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-check_args '3' "$#" 'USER DOMAIN IP [TEMPLATE] [RESTART]'
+check_args '3' "$#" 'USER DOMAIN IP [RESTART]'
 validate_format 'user' 'domain' 'ip'
 validate_format 'user' 'domain' 'ip'
 is_system_enabled "$WEB_SYSTEM"
 is_system_enabled "$WEB_SYSTEM"
 is_object_valid 'user' 'USER' "$user"
 is_object_valid 'user' 'USER' "$user"
@@ -44,13 +43,9 @@ is_domain_new 'web'
 is_ip_valid
 is_ip_valid
 is_ip_avalable
 is_ip_avalable
 is_package_full 'WEB_DOMAINS'
 is_package_full 'WEB_DOMAINS'
-if [ ! -z "$template" ]; then
-    validate_format 'template'
-    is_apache_template_valid
-else
-    template=$(get_user_value '$TEMPLATE')
-    is_apache_template_valid
-fi
+
+template=$(get_user_value '$WEB_TEMPLATE')
+is_web_template_valid
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -82,10 +77,10 @@ fi
 group="$user"
 group="$user"
 email="$user@$domain"
 email="$user@$domain"
 docroot="$HOMEDIR/$user/web/$domain/public_html"
 docroot="$HOMEDIR/$user/web/$domain/public_html"
-conf="$HOMEDIR/$user/conf/web/httpd.conf"
-tpl_file="$WEBTPL/apache/$template.tpl"
+tpl_file="$WEBTPL/$WEB_SYSTEM/$template.tpl"
+conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
 
 
-# Adding domain to the httpd.conf
+# Adding web config
 add_web_config
 add_web_config
 
 
 # Building directory tree
 # Building directory tree
@@ -99,12 +94,13 @@ mkdir -p $HOMEDIR/$user/web/$domain \
       $HOMEDIR/$user/web/$domain/logs
       $HOMEDIR/$user/web/$domain/logs
 
 
 # Adding domain logs
 # Adding domain logs
-touch /var/log/httpd/domains/$domain.bytes \
-      /var/log/httpd/domains/$domain.log \
-      /var/log/httpd/domains/$domain.error.log
+touch /var/log/$WEB_SYSTEM/domains/$domain.bytes \
+      /var/log/$WEB_SYSTEM/domains/$domain.log \
+      /var/log/$WEB_SYSTEM/domains/$domain.error.log
 
 
 # Adding symlink for logs
 # Adding symlink for logs
-ln -f -s /var/log/httpd/domains/$domain.*log $HOMEDIR/$user/web/$domain/logs/
+ln -f -s /var/log/$WEB_SYSTEM/domains/$domain.*log \
+    $HOMEDIR/$user/web/$domain/logs/
 
 
 # Adding domain skeleton
 # Adding domain skeleton
 if [ -e "$WEBTPL/skel/public_html/" ]; then
 if [ -e "$WEBTPL/skel/public_html/" ]; then
@@ -127,11 +123,11 @@ done
 
 
 # Changing file owner
 # Changing file owner
 chown -R $user:$user $HOMEDIR/$user/web/$domain
 chown -R $user:$user $HOMEDIR/$user/web/$domain
-chown root:$user /var/log/httpd/domains/$domain.*
-chown root:apache $conf
+chown root:$user /var/log/$WEB_SYSTEM/domains/$domain.*
+chown root:$user $conf
 
 
 # Changing file permissions
 # Changing file permissions
-chmod 660 $conf
+chmod 640 $conf
 chmod 551 $HOMEDIR/$user/web/$domain
 chmod 551 $HOMEDIR/$user/web/$domain
 chmod 751 $HOMEDIR/$user/web/$domain/private
 chmod 751 $HOMEDIR/$user/web/$domain/private
 chmod 751 $HOMEDIR/$user/web/$domain/cgi-bin
 chmod 751 $HOMEDIR/$user/web/$domain/cgi-bin
@@ -143,18 +139,17 @@ chmod -f -R 665 $HOMEDIR/$user/web/$domain/public_html/*
 chmod -f -R 665 $HOMEDIR/$user/web/$domain/document_errors/*
 chmod -f -R 665 $HOMEDIR/$user/web/$domain/document_errors/*
 chmod 551 $HOMEDIR/$user/web/$domain/stats
 chmod 551 $HOMEDIR/$user/web/$domain/stats
 chmod 551 $HOMEDIR/$user/web/$domain/logs
 chmod 551 $HOMEDIR/$user/web/$domain/logs
-chmod 640 /var/log/httpd/domains/$domain.*
+chmod 640 /var/log/$WEB_SYSTEM/domains/$domain.*
 
 
 # Running template trigger
 # Running template trigger
-if [ -x $WEBTPL/apache/$template.sh ]; then
-    $WEBTPL/apache/$template.sh $user $domain $ip $HOMEDIR $docroot
+if [ -x $WEBTPL/$WEB_SYSTEM/$template.sh ]; then
+    $WEBTPL/$WEB_SYSTEM/$template.sh $user $domain $ip $HOMEDIR $docroot
 fi
 fi
 
 
-# Checking main vesta httpd config
-main_conf='/etc/httpd/conf.d/vesta.conf'
-main_conf_check=$(grep "$conf" $main_conf )
-if [ -z "$main_conf_check" ]; then
-    echo "Include $conf" >>$main_conf
+# Checking web config
+web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf"
+if [ -z "$(grep $conf $web_conf)" ]; then
+    echo "Include $conf" >> $web_conf
 fi
 fi
 
 
 
 
@@ -170,7 +165,7 @@ increase_user_value "$user" '$U_WEB_ALIASES'
 # Defining domain variables
 # Defining domain variables
 str="DOMAIN='$domain' IP='$IP' IP6='' ALIAS='$aliases' TPL='$template'"
 str="DOMAIN='$domain' IP='$IP' IP6='' ALIAS='$aliases' TPL='$template'"
 str="$str SSL='no' SSL_HOME='same' FTP_USER='' FTP_MD5=''"
 str="$str SSL='no' SSL_HOME='same' FTP_USER='' FTP_MD5=''"
-str="$str NGINX='' NGINX_EXT='' STATS='' STATS_USER=''"
+str="$str PROXY='' PROXY_EXT='' STATS='' STATS_USER=''"
 str="$str STATS_CRYPT='' U_DISK='0' U_BANDWIDTH='0' SUSPENDED='no'"
 str="$str STATS_CRYPT='' U_DISK='0' U_BANDWIDTH='0' SUSPENDED='no'"
 str="$str TIME='$TIME' DATE='$DATE'"
 str="$str TIME='$TIME' DATE='$DATE'"
 
 
@@ -180,7 +175,7 @@ chmod 660 $USER_DATA/web.conf
 
 
 # Restart web server
 # Restart web server
 if [ "$restart" != 'no' ]; then
 if [ "$restart" != 'no' ]; then
-    $BIN/v-restart-web "$EVENT"
+    $BIN/v-restart-web
 fi
 fi
 
 
 # Logging
 # Logging

+ 12 - 11
bin/v-add-web-domain-alias

@@ -49,8 +49,8 @@ is_package_full 'WEB_ALIASES'
 
 
 # Parsing domain values
 # Parsing domain values
 get_domain_values 'web'
 get_domain_values 'web'
-tpl_file="$WEBTPL/apache/$TPL.tpl"
-conf="$HOMEDIR/$user/conf/web/httpd.conf"
+tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.tpl"
+conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
 ip=$(get_real_ip $IP)
 ip=$(get_real_ip $IP)
 
 
 # Parsing domain aliases
 # Parsing domain aliases
@@ -68,22 +68,22 @@ del_web_config
 add_web_config
 add_web_config
 
 
 if [ "$SSL" = 'yes' ]; then
 if [ "$SSL" = 'yes' ]; then
-    tpl_file="$WEBTPL/apache/$TPL.stpl"
-    conf="$HOMEDIR/$user/conf/web/shttpd.conf"
+    tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
+    conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
     del_web_config
     del_web_config
     add_web_config
     add_web_config
 fi
 fi
 
 
-# Checking nginx
-if [ ! -z "$NGINX" ]; then
-    tpl_file="$WEBTPL/nginx/$NGINX.tpl"
-    conf="$HOMEDIR/$user/conf/web/nginx.conf"
+# Checking proxy
+if [ ! -z "$PROXY" ]; then
+    tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
+    conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
     del_web_config
     del_web_config
     add_web_config
     add_web_config
 
 
     if [ "$SSL" = 'yes' ]; then
     if [ "$SSL" = 'yes' ]; then
-        tpl_file="$WEBTPL/nginx/$NGINX.stpl"
-        conf="$HOMEDIR/$user/conf/web/snginx.conf"
+        tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
+        conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
         del_web_config
         del_web_config
         add_web_config
         add_web_config
     fi
     fi
@@ -102,7 +102,8 @@ increase_user_value "$user" '$U_WEB_ALIASES'
 
 
 # Adding task to the vesta pipe
 # Adding task to the vesta pipe
 if [ "$restart" != 'no' ]; then
 if [ "$restart" != 'no' ]; then
-    $BIN/v-restart-web "$EVENT"
+    $BIN/v-restart-web
+    $BIN/v-restart-proxy
 fi
 fi
 
 
 log_history "added $dom_alias as alias for $domain"
 log_history "added $dom_alias as alias for $domain"

+ 12 - 2
bin/v-add-web-domain-ftp

@@ -55,9 +55,19 @@ if [ ! -z "$FTP_USER" ]; then
     /usr/sbin/userdel -f $FTP_USER
     /usr/sbin/userdel -f $FTP_USER
 fi
 fi
 
 
+# Define shell
+shell='/sbin/nologin'
+if [ -e "/usr/bin/rssh" ]; then
+    shell='/usr/bin/rssh'
+fi
+
 # Adding user
 # Adding user
-/usr/sbin/adduser -o -u $(id -u $user) -g $user -s /sbin/nologin -M \
-    -d "$HOMEDIR/$user/web/$domain" $ftp_user > /dev/null 2>&1
+/usr/sbin/adduser -o -u $(id -u $user) \
+    -g $user \
+    -s $shell \
+    -M -d "$HOMEDIR/$user/web/$domain" \
+    $ftp_user > /dev/null 2>&1
+
 echo "$ftp_password" | /usr/bin/passwd "$ftp_user" --stdin &>/dev/null
 echo "$ftp_password" | /usr/bin/passwd "$ftp_user" --stdin &>/dev/null
 ftp_md5="$(awk -v user=$ftp_user -F : 'user == $1 {print $2}' /etc/shadow)"
 ftp_md5="$(awk -v user=$ftp_user -F : 'user == $1 {print $2}' /etc/shadow)"
 
 

+ 26 - 33
bin/v-add-web-domain-nginx → bin/v-add-web-domain-proxy

@@ -1,9 +1,9 @@
 #!/bin/bash
 #!/bin/bash
-# info: add webdomain nginx support
+# info: add webdomain proxy support
 # options: USER DOMAIN [TEMPLATE] [EXTENTIONS] [RESTART]
 # options: USER DOMAIN [TEMPLATE] [EXTENTIONS] [RESTART]
 #
 #
-# The function enables nginx support for a domain. It can significantly improve
-# website speed.
+# The function enables proxy support for a domain. This can significantly
+# improve website speed.
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -38,14 +38,11 @@ is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 is_object_valid 'web' 'DOMAIN' "$domain"
 is_object_valid 'web' 'DOMAIN' "$domain"
 is_object_unsuspended 'web' 'DOMAIN' "$domain"
 is_object_unsuspended 'web' 'DOMAIN' "$domain"
-is_object_value_empty 'web' 'DOMAIN' "$domain" '$NGINX'
-if [ ! -z "$template" ]; then
-    validate_format 'template'
-    is_nginx_template_valid
-else
-    template=$(get_user_value '$TEMPLATE')
-    is_nginx_template_valid
+is_object_value_empty 'web' 'DOMAIN' "$domain" '$PROXY'
+if [ -z $template ]; then
+    template=$(get_user_value '$PROXY_TEMPLATE')
 fi
 fi
+is_proxy_template_valid
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -54,10 +51,10 @@ fi
 
 
 # Defining domain parameters
 # Defining domain parameters
 get_domain_values 'web'
 get_domain_values 'web'
-NGINX="$template"
-NGINX_EXT="$extentions"
-tpl_file="$WEBTPL/nginx/$NGINX.tpl"
-conf="$HOMEDIR/$user/conf/web/nginx.conf"
+PROXY="$template"
+PROXY_EXT="$extentions"
+tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
+conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
 ip=$(get_real_ip $IP)
 ip=$(get_real_ip $IP)
 
 
 # Preparing domain values for the template substitution
 # Preparing domain values for the template substitution
@@ -65,49 +62,45 @@ upd_web_domain_values
 add_web_config
 add_web_config
 
 
 # Set permission and ownership
 # Set permission and ownership
-chown root:nginx $conf
+chown root:$user $conf
 chmod 640 $conf
 chmod 640 $conf
 
 
-# Checking main vesta httpd config
-main_conf='/etc/nginx/conf.d/vesta_users.conf'
-main_conf_check=$(grep "$conf" $main_conf )
-if [ -z "$main_conf_check" ]; then
-    echo "include $conf;" >>$main_conf
+# Checking proxy config
+proxy_conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf"
+if [ -z "$(grep "$conf" $proxy_conf)" ]; then
+    echo "include $conf;" >> $proxy_conf
 fi
 fi
 
 
 # Checking ssl
 # Checking ssl
 if [ "$SSL" = 'yes' ]; then
 if [ "$SSL" = 'yes' ]; then
-    tpl_file="$WEBTPL/nginx/$NGINX.stpl"
-    conf="$HOMEDIR/$user/conf/web/snginx.conf"
+    tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
+    conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
     add_web_config
     add_web_config
 
 
-    chown root:nginx $conf
+    chown root:$user $conf
     chmod 640 $conf
     chmod 640 $conf
 
 
-    main_conf='/etc/nginx/conf.d/vesta_users.conf'
-    main_conf_check=$(grep "$conf" $main_conf )
-    if [ -z "$main_conf_check" ]; then
-        echo "include $conf;" >>$main_conf
+    proxy_conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf"
+    if [ -z "$(grep "$conf" $proxy_conf)" ]; then
+        echo "include $conf;" >> $proxy_conf
     fi
     fi
 fi
 fi
 
 
 
 
-
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                       Vesta                              #
 #                       Vesta                              #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Update config
 # Update config
-update_object_value 'web' 'DOMAIN' "$domain" '$NGINX' "$NGINX"
-update_object_value 'web' 'DOMAIN' "$domain" '$NGINX_EXT' "$extentions"
+update_object_value 'web' 'DOMAIN' "$domain" '$PROXY' "$PROXY"
+update_object_value 'web' 'DOMAIN' "$domain" '$PROXY_EXT' "$extentions"
 
 
 # Restart web server
 # Restart web server
 if [ "$restart" != 'no' ]; then
 if [ "$restart" != 'no' ]; then
-    $BIN/v-restart-web "$EVENT"
+    $BIN/v-restart-proxy "$EVENT"
 fi
 fi
 
 
-log_history "enabled nginx support for $domain"
+log_history "enabled proxy support for $domain"
 log_event "$OK" "$EVENT"
 log_event "$OK" "$EVENT"
 
 
 exit
 exit
-

+ 19 - 23
bin/v-add-web-domain-ssl

@@ -41,7 +41,6 @@ is_object_unsuspended 'user' 'USER' "$user"
 is_object_valid 'web' 'DOMAIN' "$domain"
 is_object_valid 'web' 'DOMAIN' "$domain"
 is_object_unsuspended 'web' 'DOMAIN' "$domain"
 is_object_unsuspended 'web' 'DOMAIN' "$domain"
 is_object_value_empty 'web' 'DOMAIN' "$domain" '$SSL'
 is_object_value_empty 'web' 'DOMAIN' "$domain" '$SSL'
-#is_ip_owner
 is_web_domain_cert_valid
 is_web_domain_cert_valid
 
 
 
 
@@ -62,18 +61,18 @@ chmod 660 $USER_DATA/ssl/$domain.*
 
 
 # Parsing domain values
 # Parsing domain values
 get_domain_values 'web'
 get_domain_values 'web'
-conf="$HOMEDIR/$user/conf/web/shttpd.conf"
-tpl_file="$WEBTPL/apache/$TPL.stpl"
+conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
+tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
 SSL_HOME="$ssl_home"
 SSL_HOME="$ssl_home"
 ip=$(get_real_ip $IP)
 ip=$(get_real_ip $IP)
 
 
 # Preparing domain values for the template substitution
 # Preparing domain values for the template substitution
 upd_web_domain_values
 upd_web_domain_values
 
 
-# Adding domain to the shttpd.conf
+# Adding domain to the web config
 add_web_config
 add_web_config
 
 
-chown root:apache $conf
+chown root:$user $conf
 chmod 640 $conf
 chmod 640 $conf
 
 
 # Adding certificate to user dir
 # Adding certificate to user dir
@@ -85,32 +84,29 @@ if [ -e "$USER_DATA/ssl/$domain.ca" ]; then
 fi
 fi
 
 
 # Running template trigger
 # Running template trigger
-if [ -x $WEBTPL/apache/$template.sh ]; then
-    $WEBTPL/apache/$template.sh $user $domain $ip $HOMEDIR $sdocroot
+if [ -x $WEBTPL/$WEB_SYSTEM/$template.sh ]; then
+    $WEBTPL/$WEB_SYSTEM/$template.sh $user $domain $ip $HOMEDIR $sdocroot
 fi
 fi
 
 
-# Checking main vesta httpd config
-main_conf='/etc/httpd/conf.d/vesta.conf'
-main_conf_check=$(grep "$conf" $main_conf )
-if [ -z "$main_conf_check" ]; then
-    echo "Include $conf" >> $main_conf
+# Checking web config
+web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf"
+if [ -z "$(grep "$conf" $web_conf)" ]; then
+    echo "Include $conf" >> $web_conf
 fi
 fi
 
 
-# Checking  nginx
-if [ ! -z "$NGINX" ]; then
-    # Adding domain to the snginx.conf
-    conf="$HOMEDIR/$user/conf/web/snginx.conf"
-    tpl_file="$WEBTPL/nginx/$NGINX.stpl"
+# Checking proxy
+if [ ! -z "$PROXY" ]; then
+    conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
+    tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
     add_web_config
     add_web_config
 
 
-    chown root:nginx $conf
+    chown root:$user $conf
     chmod 640 $conf
     chmod 640 $conf
 
 
-    # Checking vesta nginx config
-    main_conf='/etc/nginx/conf.d/vesta_users.conf'
-    main_conf_check=$(grep "$conf" $main_conf )
-    if [ -z "$main_conf_check" ]; then
-        echo "include $conf;" >>$main_conf
+    # Checking proxy config
+    proxy_conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf"
+    if [ -z "$(grep "$conf" $proxy_conf )" ]; then
+        echo "include $conf;" >> $proxy_conf
     fi
     fi
 fi
 fi
 
 

+ 23 - 26
bin/v-backup-user

@@ -166,36 +166,33 @@ then
         conf="$USER_DATA/web.conf"
         conf="$USER_DATA/web.conf"
         grep "DOMAIN='$domain'" $conf > vesta/web.conf
         grep "DOMAIN='$domain'" $conf > vesta/web.conf
 
 
-        # Apache config
-        if [ "$WEB_SYSTEM" = 'apache' ]; then
-            # Parsing httpd.conf
-            tpl_file="$WEBTPL/apache/$TPL.tpl"
-            conf="$HOMEDIR/$user/conf/web/httpd.conf"
+        # WEB config
+        tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.tpl"
+        conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
+        get_web_config_brds
+        sed -n "$top_line,$bottom_line p" $conf > conf/$WEB_SYSTEM.conf
+
+        # SSL check
+        if [ "$SSL" = 'yes' ]; then
+            tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
+            conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
             get_web_config_brds
             get_web_config_brds
-            sed -n "$top_line,$bottom_line p" $conf > conf/httpd.conf
-
-            # SSL check
-            if [ "$SSL" = 'yes' ]; then
-                tpl_file="$WEBTPL/apache/$TPL.stpl"
-                conf="$HOMEDIR/$user/conf/web/shttpd.conf"
-                get_web_config_brds
-                sed -n "$top_line,$bottom_line p" $conf > conf/shttpd.conf
-            fi
+            sed -n "$top_line,$bottom_line p" $conf > conf/s$WEB_SYSTEM.conf
         fi
         fi
 
 
-        # Nginx config
-        if [ ! -z "$NGINX" ] ; then
-            tpl_file="$WEBTPL/nginx/$NGINX.tpl"
-            conf="$HOMEDIR/$user/conf/web/nginx.conf"
+        # Proxy config
+        if [ ! -z "$PROXY" ]; then
+            tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
+            conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
+            get_web_config_brds
+            sed -n "$top_line,$bottom_line p" $conf > conf/$PROXY_SYSTEM.conf
+
+        # SSL proxy config
+        if [ ! -z "$PROXY" ] && [ "$SSL" = 'yes' ] ; then
+            tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
+            conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
             get_web_config_brds
             get_web_config_brds
-            sed -n "$top_line,$bottom_line p" $conf > conf/nginx.conf
-
-            # SSL check
-            if [ "$SSL" = 'yes' ] ; then
-                tpl_file="$WEBTPL/nginx/$NGINX.stpl"
-                conf="$HOMEDIR/$user/conf/web/snginx.conf"
-                get_web_config_brds
-                sed -n "$top_line,$bottom_line p" $conf > conf/snginx.conf
+            sed -n "$top_line,$bottom_line p" $conf > conf/s$PROXY_SYSTEM.conf
             fi
             fi
         fi
         fi
 
 

+ 3 - 1
bin/v-change-user-package

@@ -62,7 +62,9 @@ change_user_package() {
     echo "FNAME='$FNAME'
     echo "FNAME='$FNAME'
 LNAME='$LNAME'
 LNAME='$LNAME'
 PACKAGE='$package'
 PACKAGE='$package'
-TEMPLATE='$TEMPLATE'
+WEB_TEMPLATE='$WEB_TEMPLATE'
+PROXY_TEMPLATE='$PROXY_TEMPLATE'
+DNS_TEMPLATE='$DNS_TEMPLATE'
 WEB_DOMAINS='$WEB_DOMAINS'
 WEB_DOMAINS='$WEB_DOMAINS'
 WEB_ALIASES='$WEB_ALIASES'
 WEB_ALIASES='$WEB_ALIASES'
 DNS_DOMAINS='$DNS_DOMAINS'
 DNS_DOMAINS='$DNS_DOMAINS'

+ 15 - 8
bin/v-change-user-template

@@ -1,6 +1,6 @@
 #!/bin/bash
 #!/bin/bash
 # info: change user default template
 # info: change user default template
-# options: USER TEMPLATE
+# options: USER TYPE TEMPLATE
 #
 #
 # The function changes default user web template.
 # The function changes default user web template.
 
 
@@ -11,7 +11,8 @@
 
 
 # Argument defenition
 # Argument defenition
 user=$1
 user=$1
-template=$2
+type=$(echo "$2" | tr '[:lower:]' '[:upper:]')
+template=$3
 
 
 # Includes
 # Includes
 source $VESTA/conf/vesta.conf
 source $VESTA/conf/vesta.conf
@@ -23,27 +24,33 @@ source $VESTA/func/domain.sh
 #                    Verifications                         #
 #                    Verifications                         #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-check_args '2' "$#" 'USER TEMPLATE'
+check_args '3' "$#" 'USER TYPE TEMPLATE'
 validate_format 'user' 'template'
 validate_format 'user' 'template'
 is_object_valid 'user' 'USER' "$user"
 is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
-is_apache_template_valid
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                       Action                             #
 #                       Action                             #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
+case $type in 
+    WEB) is_web_template_valid;
+        update_user_value "$user" '$WEB_TEMPLATE' "$template";;
+    PROXY) is_proxy_template_valid;
+        update_user_value "$user" '$PROXY_TEMPLATE' "$template";;
+    DNS) is_dns_template_valid;
+        update_user_value "$user" '$DNS_TEMPLATE' "$template";;
+    *) check_args '1' '0' 'USER TYPE TEMPLATE'
+esac
+
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                       Vesta                              #
 #                       Vesta                              #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-# Changing user shell
-update_user_value "$user" '$TEMPLATE' "$template"
-
 # Logging
 # Logging
-log_history "changed $user template to $template" '' 'admin'
+log_history "changed $type template to $template"
 log_event "$OK" "$EVENT"
 log_event "$OK" "$EVENT"
 
 
 exit
 exit

+ 16 - 16
bin/v-change-web-domain-ip

@@ -2,8 +2,7 @@
 # info: change web domain ip address
 # info: change web domain ip address
 # options: USER DOMAIN IP [RESTART]
 # options: USER DOMAIN IP [RESTART]
 #
 #
-# The call is used for changing the site ip address. The ip change will be
-# performed for a virtual apache host and for a configuration nginx file both.
+# The call is used for changing the site ip address.
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -46,30 +45,30 @@ is_ip_avalable
 # Define variable for replace
 # Define variable for replace
 get_domain_values 'web'
 get_domain_values 'web'
 ip=$(get_real_ip $ip)
 ip=$(get_real_ip $ip)
-tpl_file="$WEBTPL/apache/$TPL.tpl"
-conf="$HOMEDIR/$user/conf/web/httpd.conf"
+tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.tpl"
+conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
 old=$(get_real_ip $IP)
 old=$(get_real_ip $IP)
 new=$ip
 new=$ip
 replace_web_config
 replace_web_config
 
 
-# Checking ssl
+# Checking SSL
 if [ "$SSL" = 'yes' ]; then
 if [ "$SSL" = 'yes' ]; then
-    tpl_file="$WEBTPL/apache/$TPL.stpl"
-    conf="$HOMEDIR/$user/conf/web/shttpd.conf"
+    tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
+    conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
     replace_web_config
     replace_web_config
 fi
 fi
 
 
-# Checking nginx
-if [ ! -z "$NGINX" ]; then
-    tpl_file="$WEBTPL/nginx/$NGINX.tpl"
-    conf="$HOMEDIR/$user/conf/web/nginx.conf"
+# Checking proxy
+if [ ! -z "$PROXY" ]; then
+    tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
+    conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
     replace_web_config
     replace_web_config
 fi
 fi
 
 
-# Checking nginx
-if [ "$SSL" = 'yes' ] && [ ! -z "$NGINX" ]; then 
-    tpl_file="$WEBTPL/nginx/$NGINX.stpl"
-    conf="$HOMEDIR/$user/conf/web/snginx.conf"
+# Checking SSL proxy
+if [ "$SSL" = 'yes' ] && [ ! -z "$PROXY" ]; then 
+    tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
+    conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
     replace_web_config
     replace_web_config
 fi
 fi
 
 
@@ -87,7 +86,8 @@ update_object_value 'web' 'DOMAIN' "$domain" '$IP' "$3"
 
 
 # Restart web server
 # Restart web server
 if [ "$restart" != 'no' ]; then
 if [ "$restart" != 'no' ]; then
-    $BIN/v-restart-web "$EVENT"
+    $BIN/v-restart-web
+    $BIN/v-restart-proxy
 fi
 fi
 
 
 # Logging
 # Logging

+ 19 - 27
bin/v-change-web-domain-nginx-tpl → bin/v-change-web-domain-proxy-tpl

@@ -1,9 +1,8 @@
 #!/bin/bash
 #!/bin/bash
-# info: change web domain nginx template
+# info: change web domain proxy template
 # options: USER DOMAIN TEMPLATE [EXTENTIONS] [RESTART]
 # options: USER DOMAIN TEMPLATE [EXTENTIONS] [RESTART]
 #
 #
-# The function changes template of nginx.conf configuration file. The content
-# of webdomain directories remains untouched.
+# The function changes proxy template
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -39,8 +38,8 @@ is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 is_object_valid 'web' 'DOMAIN' "$domain"
 is_object_valid 'web' 'DOMAIN' "$domain"
 is_object_unsuspended 'web' 'DOMAIN' "$domain"
 is_object_unsuspended 'web' 'DOMAIN' "$domain"
-is_object_value_exist 'web' 'DOMAIN' "$domain" '$NGINX'
-is_nginx_template_valid
+is_object_value_exist 'web' 'DOMAIN' "$domain" '$PROXY'
+is_proxy_template_valid
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -49,36 +48,29 @@ is_nginx_template_valid
 
 
 # Parsing domain values
 # Parsing domain values
 get_domain_values 'web'
 get_domain_values 'web'
-tpl_file="$WEBTPL/nginx/$NGINX.tpl"
-conf="$HOMEDIR/$user/conf/web/nginx.conf"
+tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
+conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
 ip=$(get_real_ip $IP)
 ip=$(get_real_ip $IP)
 
 
 # Delete old vhost
 # Delete old vhost
 del_web_config
 del_web_config
 
 
-# Checking ssl
-if [ "$SSL" = 'yes' ]; then
-    tpl_file="$WEBTPL/nginx/$NGINX.stpl"
-    conf="$HOMEDIR/$user/conf/web/snginx.conf"
-    del_web_config
-fi
-
 # Add new vhost
 # Add new vhost
-NGINX="$template"
-NGINX_EXT="$extentions"
-tpl_file="$WEBTPL/nginx/$NGINX.tpl"
-conf="$HOMEDIR/$user/conf/web/nginx.conf"
+PROXY="$template"
+PROXY_EXT="$extentions"
 upd_web_domain_values
 upd_web_domain_values
 add_web_config
 add_web_config
-chown root:nginx $conf
+chown root:$user $conf
 chmod 640 $conf
 chmod 640 $conf
 
 
-# Checking ssl
+# Checking SSL
 if [ "$SSL" = 'yes' ]; then
 if [ "$SSL" = 'yes' ]; then
-    tpl_file="$WEBTPL/nginx/$NGINX.stpl"
-    conf="$HOMEDIR/$user/conf/web/snginx.conf"
+    tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
+    conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
+    del_web_config
+
     add_web_config
     add_web_config
-    chown root:nginx $conf
+    chown root:$user $conf
     chmod 640 $conf
     chmod 640 $conf
 fi
 fi
 
 
@@ -88,16 +80,16 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Update config
 # Update config
-update_object_value 'web' 'DOMAIN' "$domain" '$NGINX' "$NGINX"
-update_object_value 'web' 'DOMAIN' "$domain" '$NGINX_EXT' "$extentions"
+update_object_value 'web' 'DOMAIN' "$domain" '$PROXY' "$PROXY"
+update_object_value 'web' 'DOMAIN' "$domain" '$PROXY_EXT' "$extentions"
 
 
 # Restart web
 # Restart web
 if [ "$restart" != 'no' ]; then
 if [ "$restart" != 'no' ]; then
-    $BIN/v-restart-web "$EVENT"
+    $BIN/v-restart-proxy
 fi
 fi
 
 
 # Logging
 # Logging
-log_history "changed nginx template for $domain to $template"
+log_history "changed proxy template for $domain to $template"
 log_event "$OK" "$EVENT"
 log_event "$OK" "$EVENT"
 
 
 exit
 exit

+ 2 - 1
bin/v-change-web-domain-sslcert

@@ -70,7 +70,8 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Restart web server
 # Restart web server
-$BIN/v-restart-web "$EVENT"
+$BIN/v-restart-web
+$BIN/v-restart-proxy
 
 
 # Logging
 # Logging
 log_history "changed ssl certificate for $domain"
 log_history "changed ssl certificate for $domain"

+ 8 - 7
bin/v-change-web-domain-sslhome

@@ -39,8 +39,8 @@ is_object_value_exist 'web' 'DOMAIN' "$domain" '$SSL'
 get_domain_values 'web'
 get_domain_values 'web'
 old_ssl_home=$SSL_HOME
 old_ssl_home=$SSL_HOME
 SSL_HOME=$ssl_home
 SSL_HOME=$ssl_home
-tpl_file="$WEBTPL/apache/$TPL.stpl"
-conf="$HOMEDIR/$user/conf/web/shttpd.conf"
+tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
+conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
 
 
 # Parsing tpl_option
 # Parsing tpl_option
 case $SSL_HOME in
 case $SSL_HOME in
@@ -54,10 +54,10 @@ esac
 # Changing sslhome directory
 # Changing sslhome directory
 replace_web_config
 replace_web_config
 
 
-# Checking nginx config
-if [ ! -z "$NGINX" ]; then
-    tpl_file="$WEBTPL/nginx/$NGINX.stpl"
-    conf="$HOMEDIR/$user/conf/web/snginx.conf"
+# Checking proxy config
+if [ ! -z "$PROXY" ]; then
+    tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
+    conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
     replace_web_config
     replace_web_config
 fi
 fi
 
 
@@ -70,7 +70,8 @@ fi
 update_object_value 'web' 'DOMAIN' "$domain" '$SSL_HOME' "$SSL_HOME"
 update_object_value 'web' 'DOMAIN' "$domain" '$SSL_HOME' "$SSL_HOME"
 
 
 # Restart web server
 # Restart web server
-$BIN/v-restart-web "$EVENT"
+$BIN/v-restart-web
+$BIN/v-restart-proxy
 
 
 # Logging
 # Logging
 log_history "changed ssl home for $domain to $ssl_home"
 log_history "changed ssl home for $domain to $ssl_home"

+ 16 - 16
bin/v-change-web-domain-tpl

@@ -2,7 +2,7 @@
 # info: change web domain template
 # info: change web domain template
 # options: USER DOMAIN TEMPLATE [RESTART]
 # options: USER DOMAIN TEMPLATE [RESTART]
 #
 #
-# The function changes template of httpd.conf configuration file. The content
+# The function changes template of the web configuration file. The content
 # of webdomain directories remains untouched.
 # of webdomain directories remains untouched.
 
 
 
 
@@ -35,7 +35,7 @@ is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 is_object_valid 'web' 'DOMAIN' "$domain"
 is_object_valid 'web' 'DOMAIN' "$domain"
 is_object_unsuspended 'web' 'DOMAIN' "$domain"
 is_object_unsuspended 'web' 'DOMAIN' "$domain"
-is_apache_template_valid
+is_web_template_valid
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -47,40 +47,40 @@ get_domain_values 'web'
 ip=$(get_real_ip $IP)
 ip=$(get_real_ip $IP)
 
 
 # Deleting domain
 # Deleting domain
-tpl_file="$WEBTPL/apache/$TPL.tpl"
+tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.tpl"
 old_tpl=$TPL
 old_tpl=$TPL
-conf="$HOMEDIR/$user/conf/web/httpd.conf"
+conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
 del_web_config
 del_web_config
 
 
 # Deleting ssl vhost
 # Deleting ssl vhost
 if [ "$SSL" = 'yes' ]; then
 if [ "$SSL" = 'yes' ]; then
-    tpl_file="$WEBTPL/apache/$TPL.stpl"
-    conf="$HOMEDIR/$user/conf/web/shttpd.conf"
+    tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
+    conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
     del_web_config
     del_web_config
 fi
 fi
 
 
 # Defining variables for new vhost config
 # Defining variables for new vhost config
 upd_web_domain_values
 upd_web_domain_values
-tpl_file="$WEBTPL/apache/$template.tpl"
+tpl_file="$WEBTPL/$WEB_SYSTEM/$template.tpl"
 
 
-# Adding domain to the httpd.conf
+# Adding domain to the web conf
 add_web_config
 add_web_config
 
 
 # Running template trigger
 # Running template trigger
-if [ -x $WEBTPL/apache/$template.sh ]; then
-    $WEBTPL/apache/$template.sh $user $domain $ip $HOMEDIR $docroot
+if [ -x $WEBTPL/$WEB_SYSTEM/$template.sh ]; then
+    $WEBTPL/$WEB_SYSTEM/$template.sh $user $domain $ip $HOMEDIR $docroot
 fi
 fi
 
 
-# Checking ssl
+# Checking SSL
 if [ "$SSL" = 'yes' ]; then
 if [ "$SSL" = 'yes' ]; then
-    conf="$HOMEDIR/$user/conf/web/shttpd.conf"
-    tpl_file="$WEBTPL/apache/$template.stpl"
+    conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
+    tpl_file="$WEBTPL/$WEB_SYSTEM/$template.stpl"
 
 
     add_web_config
     add_web_config
 
 
     # Running template trigger
     # Running template trigger
-    if [ -x $WEBTPL/apache/$template.sh ]; then
-        $WEBTPL/apache/$template.sh \
+    if [ -x $WEBTPL/$WEB_SYSTEM/$template.sh ]; then
+        $WEBTPL/$WEB_SYSTEM/$template.sh \
             "$user" "$domain" "$ip" "$HOMEDIR" "$sdocroot"
             "$user" "$domain" "$ip" "$HOMEDIR" "$sdocroot"
     fi
     fi
 fi
 fi
@@ -95,7 +95,7 @@ update_object_value 'web' 'DOMAIN' "$domain" '$TPL' "$template"
 
 
 # Restart web
 # Restart web
 if [ "$restart" != 'no' ]; then
 if [ "$restart" != 'no' ]; then
-    $BIN/v-restart-web "$EVENT"
+    $BIN/v-restart-web
 fi
 fi
 
 
 # Logging
 # Logging

+ 26 - 18
bin/v-delete-sys-ip

@@ -35,34 +35,43 @@ is_ip_key_empty '$U_SYS_USERS'
 #                       Action                             #
 #                       Action                             #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-# Defining config paths
-conf='/etc/httpd/conf.d/vesta.conf'
-nconf='/etc/nginx/conf.d/vesta_ip.conf'
-iconf='/etc/sysconfig/network-scripts/ifcfg'
-rconf='/etc/httpd/conf.d/mod_extract_forwarded.conf'
-
 # Get ip owner
 # Get ip owner
 user="$(get_ip_value '$OWNER')"
 user="$(get_ip_value '$OWNER')"
 ip_status="$(get_ip_value '$STATUS')"
 ip_status="$(get_ip_value '$STATUS')"
 
 
 # Deleting interface
 # Deleting interface
-interface=$(/sbin/ifconfig |grep -B1 "addr:$ip "|head -n 1 |cut -f 1 -d ' ')
-if [ ! -z "$interface" ] && [ -z "$(echo $interface|cut -s -f2 -d :)" ]; then
-    echo "Error: Main IP on interface"
+interface=$(/sbin/ifconfig | grep -B1 "dr:$ip " | head -n1 | cut -f1 -d \ )
+if [ ! -z "$interface" ] && [ -z "$(echo $interface |cut -s -f2 -d :)" ]; then
+    echo "Error: can't delete main IP address"
     log_event "$E_FORBIDEN" "$EVENT"
     log_event "$E_FORBIDEN" "$EVENT"
     exit $E_FORBIDEN
     exit $E_FORBIDEN
 fi
 fi
 if [ ! -z "$interface" ]; then
 if [ ! -z "$interface" ]; then
-    /sbin/ifconfig "$interface" down
-    iconf='/etc/sysconfig/network-scripts/ifcfg'
-    rm -f $iconf-$interface
+    /sbin/ifconfig $interface down
+    rm -f /etc/sysconfig/network-scripts/ifcfg-$interface
 fi
 fi
 
 
 # Deleting vesta ip
 # Deleting vesta ip
 rm -f $VESTA/data/ips/$ip
 rm -f $VESTA/data/ips/$ip
 
 
-# Deleting namehosting support
-namehost_ip_disable
+# Disable virtual ip hosting support
+web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf"
+if [ ! -z "$WEB_SYSTEM" ]; then
+    sed -i "/NameVirtualHost $ip:/d" $web_conf
+    sed -i "/Listen $ip:/d" $web_conf
+fi
+
+# Deleting proxy config
+if [ ! -z "$PROXY_SYSTEM" ]; then
+    rm -f /etc/$PROXY_SYSTEM/conf.d/$ip.conf
+
+    fw_conf="/etc/$WEB_SYSTEM/conf.d/mod_extract_forwarded.conf"
+    if [ -e "$fw_conf" ]; then
+        ips=$(grep 'MEFaccept 127.0.0.1' $fw_conf)
+        new_ips=$(echo "$ips" | sed -e "s/$ip//" )
+        sed -i "s/$ips/$new_ips/g" $fw_conf
+    fi
+fi
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -89,12 +98,11 @@ fi
 
 
 
 
 # Adding task to the vesta pipe
 # Adding task to the vesta pipe
-if [ "$web_restart" = 'yes' ]; then
-    $BIN/v-restart-web "$EVENT"
-fi
+$BIN/v-restart-web
+$BIN/v-restart-proxy
 
 
 # Logging
 # Logging
-log_history "delted system ip address $ip" '' 'admin'
+log_history "deleted system ip address $ip"
 log_event "$OK" "$EVENT"
 log_event "$OK" "$EVENT"
 
 
 exit
 exit

+ 35 - 34
bin/v-delete-web-domain

@@ -44,8 +44,8 @@ is_object_unsuspended 'web' 'DOMAIN' "$domain"
 
 
 # Get template name
 # Get template name
 get_domain_values 'web'
 get_domain_values 'web'
-tpl_file="$WEBTPL/apache/$TPL.tpl"
-conf="$HOMEDIR/$user/conf/web/httpd.conf"
+tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.tpl"
+conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
 ip=$(get_real_ip $IP)
 ip=$(get_real_ip $IP)
 
 
 # Deleting domain
 # Deleting domain
@@ -58,26 +58,26 @@ else
     aliases=0
     aliases=0
 fi
 fi
 
 
-# Checking ssl
+# Checking SSL
 if [ "$SSL" = 'yes' ]; then
 if [ "$SSL" = 'yes' ]; then
-    tpl_file="$WEBTPL/apache/$TPL.stpl"
-    conf="$HOMEDIR/$user/conf/web/shttpd.conf"
+    tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
+    conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
     del_web_config
     del_web_config
 
 
-    # Deleting certificates
+    # Deleting SSL certificates
     rm -f $HOMEDIR/$user/conf/web/ssl.$domain.*
     rm -f $HOMEDIR/$user/conf/web/ssl.$domain.*
     rm -f $USER_DATA/ssl/$domain.*
     rm -f $USER_DATA/ssl/$domain.*
 fi
 fi
 
 
-# Checking nginx
-if [ ! -z "$NGINX" ]; then
-    tpl_file="$WEBTPL/nginx/$NGINX.tpl"
-    conf="$HOMEDIR/$user/conf/web/nginx.conf"
+# Checking proxy
+if [ ! -z "$PROXY" ]; then
+    tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
+    conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
     del_web_config
     del_web_config
 
 
     if [ "$SSL" = 'yes' ]; then
     if [ "$SSL" = 'yes' ]; then
-        tpl_file="$WEBTPL/nginx/$NGINX.stpl"
-        conf="$HOMEDIR/$user/conf/web/snginx.conf"
+        tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
+        conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
         del_web_config
         del_web_config
     fi
     fi
 fi
 fi
@@ -98,9 +98,9 @@ fi
 rm -rf $HOMEDIR/$user/web/$domain
 rm -rf $HOMEDIR/$user/web/$domain
 
 
 # Deleting logs
 # Deleting logs
-rm -f /var/log/httpd/domains/$domain.log*
-rm -f /var/log/httpd/domains/$domain.bytes
-rm -f /var/log/httpd/domains/$domain.error*
+rm -f /var/log/$WEB_SYSTEM/domains/$domain.log*
+rm -f /var/log/$WEB_SYSTEM/domains/$domain.bytes
+rm -f /var/log/$WEB_SYSTEM/domains/$domain.error*
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -110,34 +110,34 @@ rm -f /var/log/httpd/domains/$domain.error*
 # Deleting domain
 # Deleting domain
 sed -i "/DOMAIN='$domain'/ d" $USER_DATA/web.conf
 sed -i "/DOMAIN='$domain'/ d" $USER_DATA/web.conf
 
 
-# Checking last ssl domain
-conf='/etc/httpd/conf.d/vesta.conf'
+# Checking last SSL domain
+conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf"
 ssl_dom=$(grep "SSL='yes'" $USER_DATA/web.conf | wc -l)
 ssl_dom=$(grep "SSL='yes'" $USER_DATA/web.conf | wc -l)
 if [ "$ssl_dom" -eq '0' ]; then
 if [ "$ssl_dom" -eq '0' ]; then
-    sed -i "/.*\/$user\/.*shttpd.conf/d" $conf
-    rm -f $HOMEDIR/$user/conf/web/shttpd.conf
+    sed -i "/.*\/$user\/.*s$WEB_SYSTEM.conf/d" $conf
+    rm -f $HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf
 fi
 fi
 
 
 # Checking last domain
 # Checking last domain
-domains=$(wc -l $USER_DATA/web.conf|cut -f 1 -d ' ')
+domains=$(wc -l $USER_DATA/web.conf | cut -f1 -d ' ')
 if [ "$domains" -eq '0' ]; then
 if [ "$domains" -eq '0' ]; then
-    sed -i "/.*\/$user\/.*httpd.conf/d" $conf
-    rm -f $HOMEDIR/$user/conf/web/httpd.conf
+    sed -i "/.*\/$user\/.*$WEB_SYSTEM.conf/d" $conf
+    rm -f $HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf
 fi
 fi
 
 
-# Checking last ssl nginx domain
-conf='/etc/nginx/conf.d/vesta_users.conf'
-last_snginx=$(echo "$last_nginx" | grep "SSL='yes'")
-if [ -z "$last_snginx" ]; then
-    sed -i "/.*\/$user\/.*snginx.conf/d" $conf
-    rm -f $HOMEDIR/$user/conf/web/snginx.conf
+# Checking last SSL proxy
+conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf"
+last_sproxy=$(grep "SSL='yes'" $USER_DATA/web.conf)
+if [ -z "$last_sproxy" ]; then
+    sed -i "/.*\/$user\/.*s$PROXY_SYSTEM.conf/d" $conf
+    rm -f $HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf
 fi
 fi
 
 
-# Checking last nginx domain
-last_nginx=$(grep -v "NGINX=''" $USER_DATA/web.conf)
-if [ -z "$last_nginx" ]; then
-    sed -i "/.*\/$user\/.*nginx.conf/d" $conf
-    rm -f $HOMEDIR/$user/conf/web/nginx.conf
+# Checking last proxy
+last_proxy=$(grep -v "PROXY=''" $USER_DATA/web.conf)
+if [ -z "$last_proxy" ]; then
+    sed -i "/.*\/$user\/.*$PROXY_SYSTEM.conf/d" $conf
+    rm -f $HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf
 fi
 fi
 
 
 # Decrease counters
 # Decrease counters
@@ -150,7 +150,8 @@ fi
 
 
 # Restart web server
 # Restart web server
 if [ "$restart" != 'no' ]; then
 if [ "$restart" != 'no' ]; then
-    $BIN/v-restart-web "$EVENT"
+    $BIN/v-restart-web
+    $BIN/v-restart-proxy
 fi
 fi
 
 
 # Logging
 # Logging

+ 12 - 11
bin/v-delete-web-domain-alias

@@ -55,8 +55,8 @@ ALIAS=$(echo "$ALIAS" |\
     sed -e "s/^$dom_alias$//g"|\
     sed -e "s/^$dom_alias$//g"|\
     sed -e "/^$/d"|\
     sed -e "/^$/d"|\
     sed -e ':a;N;$!ba;s/\n/,/g')
     sed -e ':a;N;$!ba;s/\n/,/g')
-tpl_file="$WEBTPL/apache/$TPL.tpl"
-conf="$HOMEDIR/$user/conf/web/httpd.conf"
+tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.tpl"
+conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
 
 
 # Preparing domain values for the template substitution
 # Preparing domain values for the template substitution
 upd_web_domain_values
 upd_web_domain_values
@@ -66,22 +66,22 @@ del_web_config
 add_web_config
 add_web_config
 
 
 if [ "$SSL" = 'yes' ]; then
 if [ "$SSL" = 'yes' ]; then
-    tpl_file="$WEBTPL/apache/$TPL.stpl"
-    conf="$HOMEDIR/$user/conf/web/shttpd.conf"
+    tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
+    conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
     del_web_config
     del_web_config
     add_web_config
     add_web_config
 fi
 fi
 
 
-# Checking nginx
-if [ ! -z "$NGINX" ]; then
-    tpl_file="$WEBTPL/nginx/$NGINX.tpl"
-    conf="$HOMEDIR/$user/conf/web/nginx.conf"
+# Checking proxy
+if [ ! -z "$PROXY" ]; then
+    tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
+    conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
     del_web_config
     del_web_config
     add_web_config
     add_web_config
 
 
     if [ "$SSL" = 'yes' ]; then
     if [ "$SSL" = 'yes' ]; then
-        tpl_file="$WEBTPL/nginx/$NGINX.stpl"
-        conf="$HOMEDIR/$user/conf/web/snginx.conf"
+        tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
+        conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
         del_web_config
         del_web_config
         add_web_config
         add_web_config
     fi
     fi
@@ -100,7 +100,8 @@ decrease_user_value "$user" '$U_WEB_ALIASES'
 
 
 # Restart web server
 # Restart web server
 if [ "$restart" != 'no' ]; then
 if [ "$restart" != 'no' ]; then
-    $BIN/v-restart-web "$EVENT"
+    $BIN/v-restart-web
+    $BIN/v-restart-proxy
 fi
 fi
 
 
 # Logging
 # Logging

+ 26 - 24
bin/v-delete-web-domain-nginx → bin/v-delete-web-domain-proxy

@@ -1,8 +1,8 @@
 #!/bin/bash
 #!/bin/bash
-# info: deleting web domain nginx configuration
+# info: deleting web domain proxy configuration
 # options: USER DOMAIN
 # options: USER DOMAIN
 #
 #
-# The function of deleting the virtualhost nginx configuration.
+# The function of deleting the virtualhost proxy configuration.
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -32,7 +32,7 @@ is_object_valid 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 is_object_unsuspended 'user' 'USER' "$user"
 is_object_valid 'web' 'DOMAIN' "$domain"
 is_object_valid 'web' 'DOMAIN' "$domain"
 is_object_unsuspended 'web' 'DOMAIN' "$domain"
 is_object_unsuspended 'web' 'DOMAIN' "$domain"
-is_object_value_exist 'web' 'DOMAIN' "$domain" '$NGINX'
+is_object_value_exist 'web' 'DOMAIN' "$domain" '$PROXY'
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -41,14 +41,14 @@ is_object_value_exist 'web' 'DOMAIN' "$domain" '$NGINX'
 
 
 # Defining domain parameters
 # Defining domain parameters
 get_domain_values 'web'
 get_domain_values 'web'
-tpl_file="$WEBTPL/nginx/$NGINX.tpl"
-conf="$HOMEDIR/$user/conf/web/nginx.conf"
+tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
+conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
 del_web_config
 del_web_config
 
 
-# Checking ssl
+# Checking SSL
 if [ "$SSL" = 'yes' ]; then
 if [ "$SSL" = 'yes' ]; then
-    tpl_file="$WEBTPL/nginx/$NGINX.stpl"
-    conf="$HOMEDIR/$user/conf/web/snginx.conf"
+    tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
+    conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
     del_web_config
     del_web_config
 fi
 fi
 
 
@@ -58,30 +58,32 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Update config
 # Update config
-update_object_value 'web' 'DOMAIN' "$domain" '$NGINX' ''
-update_object_value 'web' 'DOMAIN' "$domain" '$NGINX_EXT' ''
-
-# Checking last nginx domain
-conf='/etc/nginx/conf.d/vesta_users.conf'
-last_nginx=$(grep -v "NGINX=''" $USER_DATA/web.conf)
-last_snginx=$(echo "$last_nginx" | grep "SSL='yes'")
-if [ -z "$last_snginx" ]; then
-    sed -i "/$user\/conf\/web\/snginx.conf/d" $conf
-    rm -f $HOMEDIR/$user/conf/web/snginx.conf
+update_object_value 'web' 'DOMAIN' "$domain" '$PROXY' ''
+update_object_value 'web' 'DOMAIN' "$domain" '$PROXY_EXT' ''
+
+
+# Checking last SSL proxy
+conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf"
+last_sproxy=$(grep "SSL='yes'" $USER_DATA/web.conf)
+if [ -z "$last_sproxy" ]; then
+    sed -i "/.*\/$user\/.*s$PROXY_SYSTEM.conf/d" $conf
+    rm -f $HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf
 fi
 fi
 
 
-if [ -z "$last_nginx" ]; then
-    sed -i "/$user\/conf\/web\/nginx.conf/d" $conf
-    rm -f $HOMEDIR/$user/conf/web/nginx.conf
+# Checking last proxy
+last_proxy=$(grep -v "PROXY=''" $USER_DATA/web.conf)
+if [ -z "$last_proxy" ]; then
+    sed -i "/.*\/$user\/.*$PROXY_SYSTEM.conf/d" $conf
+    rm -f $HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf
 fi
 fi
 
 
-# Restart web server
+# Restart proxy server
 if [ "$restart" != 'no' ]; then
 if [ "$restart" != 'no' ]; then
-    $BIN/v-restart-web "$EVENT"
+    $BIN/v-restart-proxy
 fi
 fi
 
 
 # Logging
 # Logging
-log_history "disabled nginx support for $domain"
+log_history "disabled proxy support for $domain"
 log_event "$OK" "$EVENT"
 log_event "$OK" "$EVENT"
 
 
 exit
 exit

+ 21 - 19
bin/v-delete-web-domain-ssl

@@ -1,5 +1,5 @@
 #!/bin/bash
 #!/bin/bash
-# info: delete web domain ssl support
+# info: delete web domain SSL support
 # options: USER DOMAIN
 # options: USER DOMAIN
 #
 #
 # The function disable https support and deletes SSL certificates.
 # The function disable https support and deletes SSL certificates.
@@ -41,16 +41,16 @@ is_object_value_exist 'web' 'DOMAIN' "$domain" '$SSL'
 
 
 # Parsing domain values
 # Parsing domain values
 get_domain_values 'web'
 get_domain_values 'web'
-conf="$HOMEDIR/$user/conf/web/shttpd.conf"
-tpl_file="$WEBTPL/apache/$TPL.stpl"
+conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
+tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
 
 
 # Deleting domain
 # Deleting domain
 del_web_config
 del_web_config
 
 
-# Checking nginx
-if [ ! -z "$NGINX" ]; then
-    tpl_file="$WEBTPL/nginx/$NGINX.stpl"
-    conf="$HOMEDIR/$user/conf/web/snginx.conf"
+# Checking proxy
+if [ ! -z "$PROXY" ]; then
+    conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
+    tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
     del_web_config
     del_web_config
 fi
 fi
 
 
@@ -68,21 +68,22 @@ chown -R $user:$user $tmpdir
 # Update config
 # Update config
 update_object_value 'web' 'DOMAIN' "$domain" '$SSL' 'no'
 update_object_value 'web' 'DOMAIN' "$domain" '$SSL' 'no'
 
 
-# Checking last ssl domain
+# Checking last SSL domain
 ssl_dom=$(grep "SSL='yes'" $USER_DATA/web.conf)
 ssl_dom=$(grep "SSL='yes'" $USER_DATA/web.conf)
-conf='/etc/httpd/conf.d/vesta.conf'
+conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf"
 if [ -z "$ssl_dom" ]; then
 if [ -z "$ssl_dom" ]; then
-    sed -i "/.*\/$user\/.*shttpd.conf/d" $conf
-    rm -f $HOMEDIR/$user/conf/web/shttpd.conf
+    sed -i "/.*\/$user\/.*s$WEB_SYSTEM.conf/d" $conf
+    rm -f $HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf
+
 fi
 fi
 
 
-# Checking last nginx domain
-conf='/etc/nginx/conf.d/vesta_users.conf'
-last_nginx=$(grep -v "NGINX=''" $USER_DATA/web.conf)
-last_snginx=$(echo "$last_nginx" | grep "SSL='yes'")
-if [ -z "$last_snginx" ]; then
-    sed -i "/.*\/$user\/.*snginx.conf/d" $conf
-    rm -f $HOMEDIR/$user/conf/web/snginx.conf
+# Checking proxy
+if [ ! -z "$PROXY_SYSTEM" ]; then
+    conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf"
+    if [ -z "$ssl_dom" ]; then
+        sed -i "/.*\/$user\/.*s$PROXY_SYSTEM.conf/d" $conf
+        rm -f $HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf
+    fi
 fi
 fi
 
 
 # Decreasing domain value
 # Decreasing domain value
@@ -90,7 +91,8 @@ decrease_user_value "$user" '$U_WEB_SSL'
 
 
 # Restart web server
 # Restart web server
 if [ "$restart" != 'no' ]; then
 if [ "$restart" != 'no' ]; then
-    $BIN/v-restart-web "$EVENT"
+    $BIN/v-restart-web
+    $BIN/v-restart-proxy
 fi
 fi
 
 
 # Logging
 # Logging

+ 2 - 1
bin/v-delete-web-domains

@@ -44,7 +44,8 @@ done
 
 
 # Restart web server
 # Restart web server
 if [ "$restart" != 'no' ]; then
 if [ "$restart" != 'no' ]; then
-    $BIN/v-restart-web "$EVENT"
+    $BIN/v-restart-web
+    $BIN/v-restart-proxy
 fi
 fi
 
 
 # Logging
 # Logging

+ 10 - 9
bin/v-list-user

@@ -72,15 +72,16 @@ is_object_valid 'user' 'USER' "$user"
 conf=$USER_DATA/user.conf
 conf=$USER_DATA/user.conf
 
 
 # Defining fileds to select
 # Defining fileds to select
-fields='$USER $FNAME $LNAME $PACKAGE $TEMPLATE $WEB_DOMAINS $WEB_ALIASES
-    $DNS_DOMAINS $DNS_RECORDS $MAIL_DOMAINS $MAIL_ACCOUNTS $DATABASES
-    $CRON_JOBS $DISK_QUOTA $BANDWIDTH $NS $SHELL $BACKUPS $CONTACT
-    $CRON_REPORTS $RKEY $SUSPENDED $SUSPENDED_USERS $SUSPENDED_WEB
-    $SUSPENDED_DNS $SUSPENDED_MAIL $SUSPENDED_DB $SUSPENDED_CRON $IP_AVAIL
-    $IP_OWNED $U_USERS $U_DISK $U_DISK_DIRS $U_DISK_WEB $U_DISK_MAIL $U_DISK_DB
-    $U_BANDWIDTH $U_WEB_DOMAINS $U_WEB_SSL $U_WEB_ALIASES $U_DNS_DOMAINS
-    $U_DNS_RECORDS $U_MAIL_DOMAINS $U_MAIL_DKIM $U_MAIL_ACCOUNTS $U_DATABASES
-    $U_CRON_JOBS $U_BACKUPS $LANGUAGE $TIME $DATE'
+fields='$USER $FNAME $LNAME $PACKAGE $WEB_TEMPLATE $PROXY_TEMPLATE
+    $DNS_TEMPLATE $WEB_DOMAINS $WEB_ALIASES $DNS_DOMAINS $DNS_RECORDS
+    $MAIL_DOMAINS $MAIL_ACCOUNTS $DATABASES $CRON_JOBS $DISK_QUOTA $BANDWIDTH
+    $NS $SHELL $BACKUPS $CONTACT $CRON_REPORTS $RKEY $SUSPENDED
+    $SUSPENDED_USERS $SUSPENDED_WEB $SUSPENDED_DNS $SUSPENDED_MAIL
+    $SUSPENDED_DB $SUSPENDED_CRON $IP_AVAIL $IP_OWNED $U_USERS $U_DISK
+    $U_DISK_DIRS $U_DISK_WEB $U_DISK_MAIL $U_DISK_DB $U_BANDWIDTH
+    $U_WEB_DOMAINS $U_WEB_SSL $U_WEB_ALIASES $U_DNS_DOMAINS $U_DNS_RECORDS
+    $U_MAIL_DOMAINS $U_MAIL_DKIM $U_MAIL_ACCOUNTS $U_DATABASES $U_CRON_JOBS
+    $U_BACKUPS $LANGUAGE $TIME $DATE'
 
 
 # Listing user
 # Listing user
 case $format in 
 case $format in 

+ 4 - 3
bin/v-list-user-package

@@ -72,9 +72,10 @@ is_package_valid
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Defining fileds to select
 # Defining fileds to select
-fields='$PACKAGE $TEMPLATE $WEB_DOMAINS $WEB_ALIASES $DNS_DOMAINS $DNS_RECORDS
-    $MAIL_DOMAINS $MAIL_ACCOUNTS $DATABASES $CRON_JOBS $DISK_QUOTA $BANDWIDTH
-    $NS $SHELL $BACKUPS $TIME $DATE'
+fields='$PACKAGE $WEB_TEMPLATE $PROXY_TEMPLATE $DNS_TEMPLATE $WEB_DOMAINS
+    $WEB_ALIASES $DNS_DOMAINS $DNS_RECORDS $MAIL_DOMAINS $MAIL_ACCOUNTS
+    $DATABASES $CRON_JOBS $DISK_QUOTA $BANDWIDTH $NS $SHELL $BACKUPS $TIME
+    $DATE'
 
 
 # Listing ip
 # Listing ip
 case $format in 
 case $format in 

+ 4 - 3
bin/v-list-user-packages

@@ -71,9 +71,10 @@ shell_list_pkgs() {
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Defining fields
 # Defining fields
-fields='$PACKAGE $TEMPLATE $WEB_DOMAINS $WEB_ALIASES $DNS_DOMAINS $DNS_RECORDS
-    $MAIL_DOMAINS $MAIL_ACCOUNTS $DATABASES $CRON_JOBS $DISK_QUOTA $BANDWIDTH
-    $NS $SHELL $BACKUPS $TIME $DATE'
+fields='$PACKAGE $WEB_TEMPLATE $PROXY_TEMPLATE $DNS_TEMPLATE $WEB_DOMAINS
+    $WEB_ALIASES $DNS_DOMAINS $DNS_RECORDS $MAIL_DOMAINS $MAIL_ACCOUNTS
+    $DATABASES $CRON_JOBS $DISK_QUOTA $BANDWIDTH $NS $SHELL $BACKUPS $TIME
+    $DATE'
 
 
 # Listing domains
 # Listing domains
 case $format in
 case $format in

+ 5 - 5
bin/v-list-users

@@ -73,11 +73,11 @@ shell_list_users() {
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Defining fileds to select
 # Defining fileds to select
-fields="\$USER \$FNAME \$LNAME \$PACKAGE \$TEMPLATE \$WEB_DOMAINS"
-fields="$fields \$WEB_ALIASES \$DNS_DOMAINS \$DNS_RECORDS \$MAIL_DOMAINS"
-fields="$fields \$MAIL_ACCOUNTS \$DATABASES \$CRON_JOBS \$DISK_QUOTA"
-fields="$fields \$BANDWIDTH \$NS \$SHELL \$BACKUPS \$CONTACT"
-fields="$fields \$CRON_REPORTS \$RKEY \$SUSPENDED \$SUSPENDED_USERS"
+fields="\$USER \$FNAME \$LNAME \$PACKAGE \$WEB_TEMPLATE \$PROXY_TEMPLATE"
+fields="$fields \$DNS_TEMPLATE \$WEB_DOMAINS \$WEB_ALIASES \$DNS_DOMAINS"
+fields="$fields \$DNS_RECORDS \$MAIL_DOMAINS \$MAIL_ACCOUNTS \$DATABASES"
+fields="$fields \$CRON_JOBS \$DISK_QUOTA \$BANDWIDTH \$NS \$SHELL \$BACKUPS"
+fields="$fields \$CONTACT \$CRON_REPORTS \$RKEY \$SUSPENDED \$SUSPENDED_USERS"
 fields="$fields \$SUSPENDED_WEB \$SUSPENDED_DNS \$SUSPENDED_MAIL"
 fields="$fields \$SUSPENDED_WEB \$SUSPENDED_DNS \$SUSPENDED_MAIL"
 fields="$fields \$SUSPENDED_DB \$SUSPENDED_CRON \$IP_AVAIL \$IP_OWNED"
 fields="$fields \$SUSPENDED_DB \$SUSPENDED_CRON \$IP_AVAIL \$IP_OWNED"
 fields="$fields \$U_USERS \$U_DISK \$U_DISK_DIRS \$U_DISK_WEB \$U_DISK_MAIL"
 fields="$fields \$U_USERS \$U_DISK \$U_DISK_DIRS \$U_DISK_WEB \$U_DISK_MAIL"

+ 1 - 1
bin/v-list-web-domain

@@ -76,7 +76,7 @@ conf=$USER_DATA/web.conf
 
 
 # Defining fileds to select
 # Defining fileds to select
 fields='$DOMAIN $IP $IP6 $U_DISK $U_BANDWIDTH $TPL $ALIAS $STATS $STATS_USER
 fields='$DOMAIN $IP $IP6 $U_DISK $U_BANDWIDTH $TPL $ALIAS $STATS $STATS_USER
-    $SSL $SSL_HOME $FTP_USER $NGINX $NGINX_EXT $SUSPENDED $TIME $DATE'
+    $SSL $SSL_HOME $FTP_USER $PROXY $PROXY_EXT $SUSPENDED $TIME $DATE'
 
 
 # Listing domains
 # Listing domains
 case $format in 
 case $format in 

+ 1 - 1
bin/v-list-web-domains

@@ -36,7 +36,7 @@ conf=$USER_DATA/web.conf
 # Defining fileds to select
 # Defining fileds to select
 fields="\$DOMAIN \$IP \$IP6 \$U_DISK \$U_BANDWIDTH \$TPL \$ALIAS"
 fields="\$DOMAIN \$IP \$IP6 \$U_DISK \$U_BANDWIDTH \$TPL \$ALIAS"
 fields="$fields \$STATS \$STATS_USER \$SSL \$SSL_HOME \$FTP_USER"
 fields="$fields \$STATS \$STATS_USER \$SSL \$SSL_HOME \$FTP_USER"
-fields="$fields \$NGINX \$NGINX_EXT \$SUSPENDED \$TIME \$DATE"
+fields="$fields \$PROXY \$PROXY_EXT \$SUSPENDED \$TIME \$DATE"
 
 
 # Listing domains
 # Listing domains
 case $format in 
 case $format in 

+ 3 - 3
bin/v-list-web-domains-nginx → bin/v-list-web-domains-proxy

@@ -1,8 +1,8 @@
 #!/bin/bash
 #!/bin/bash
-# info: list web domains and nginx key
+# info: list web domains and proxy key
 # options: USER [FORMAT]
 # options: USER [FORMAT]
 #
 #
-# The function for obtaining the list of domains with nginx parameter
+# The function for obtaining the list of domains with proxy parameter
 # displayed. This call was arranged for filling in the lack of information by
 # displayed. This call was arranged for filling in the lack of information by
 # applying v-list-web-domains call in the shell format.
 # applying v-list-web-domains call in the shell format.
 
 
@@ -36,7 +36,7 @@ is_object_valid 'user' 'USER' "$user"
 conf=$USER_DATA/web.conf
 conf=$USER_DATA/web.conf
 
 
 # Defining fileds to select
 # Defining fileds to select
-fields="\$DOMAIN \$NGINX \$NGINX_EXT"
+fields="\$DOMAIN \$PROXY \$PROXY_EXT"
 
 
 # Listing domains
 # Listing domains
 case $format in 
 case $format in 

+ 4 - 3
bin/v-list-web-templates

@@ -2,7 +2,7 @@
 # info: list web templates
 # info: list web templates
 # options: USER [FORMAT]
 # options: USER [FORMAT]
 #
 #
-# The function for obtaining the list of apache templates available to a user.
+# The function for obtaining the list of web templates available to a user.
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -13,11 +13,12 @@
 format=${1-shell}
 format=${1-shell}
 
 
 # Includes
 # Includes
+source $VESTA/conf/vesta.conf
 source $VESTA/func/main.sh
 source $VESTA/func/main.sh
 
 
 # Json function
 # Json function
 json_list_wtpl() {
 json_list_wtpl() {
-    templates=$(ls -t $WEBTPL/apache | cut -f 1 -d  '.' |sort -u )
+    templates=$(ls -t $WEBTPL/$WEB_SYSTEM | cut -f 1 -d  '.' |sort -u )
     t_counter=$(echo "$templates" | wc -w)
     t_counter=$(echo "$templates" | wc -w)
     i=1
     i=1
     echo '['
     echo '['
@@ -34,7 +35,7 @@ json_list_wtpl() {
 
 
 # Shell function
 # Shell function
 shell_list_wtpl() {
 shell_list_wtpl() {
-    templates=$(ls -t $WEBTPL/apache | cut -f 1 -d  '.' |sort -u )
+    templates=$(ls -t $WEBTPL/$WEB_SYSTEM | cut -f 1 -d  '.' |sort -u )
     if [ -z "$nohead" ]; then
     if [ -z "$nohead" ]; then
         echo "Templates"
         echo "Templates"
         echo "----------"
         echo "----------"

+ 9 - 4
bin/v-list-web-templates-nginx → bin/v-list-web-templates-proxy

@@ -1,8 +1,8 @@
 #!/bin/bash
 #!/bin/bash
-# info: listing nginx templates
+# info: listing proxy templates
 # options: [FORMAT]
 # options: [FORMAT]
 #
 #
-# The function for obtaining the list of nginx templates available to a user.
+# The function for obtaining the list of proxy templates available to a user.
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -13,11 +13,11 @@
 format=${1-shell}
 format=${1-shell}
 
 
 # Includes
 # Includes
+source $VESTA/conf/vesta.conf
 source $VESTA/func/main.sh
 source $VESTA/func/main.sh
 
 
 # Json function
 # Json function
 json_list_wtpl() {
 json_list_wtpl() {
-    templates=$(ls -t $WEBTPL/nginx | cut -f 1 -d  '.' |sort -u )
     t_counter=$(echo "$templates" | wc -w)
     t_counter=$(echo "$templates" | wc -w)
     i=1
     i=1
     echo '['
     echo '['
@@ -34,7 +34,6 @@ json_list_wtpl() {
 
 
 # Shell function
 # Shell function
 shell_list_wtpl() {
 shell_list_wtpl() {
-    templates=$(ls -t $WEBTPL/nginx | cut -f 1 -d  '.' |sort -u )
     if [ -z "$nohead" ]; then
     if [ -z "$nohead" ]; then
         echo "Templates"
         echo "Templates"
         echo "----------"
         echo "----------"
@@ -49,6 +48,12 @@ shell_list_wtpl() {
 #                       Action                             #
 #                       Action                             #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
+# Proxy templates
+templates=$(ls -t $WEBTPL/$PROXY_SYSTEM |\
+    cut -f1 -d . |\
+    grep -v proxy_ip |\
+    sort -u )
+
 # Listing domains
 # Listing domains
 case $format in
 case $format in
     json)   json_list_wtpl ;;
     json)   json_list_wtpl ;;

+ 33 - 36
bin/v-rebuild-web-domains

@@ -55,64 +55,60 @@ for domain in $(shell_list); do
 done
 done
 
 
 # Config path
 # Config path
-httpd_conf='/etc/httpd/conf.d/vesta.conf'
-nginx_conf='/etc/nginx/conf.d/vesta_users.conf'
+web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf"
+proxy_conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf"
 
 
 # Checking if there is at least 1 domain
 # Checking if there is at least 1 domain
 if [ "$domain_counter" -lt 1 ]; then
 if [ "$domain_counter" -lt 1 ]; then
-
     # Deleting web configs
     # Deleting web configs
     rm -f $HOMEDIR/$user/conf/web/*
     rm -f $HOMEDIR/$user/conf/web/*
-    sed -i "/.*\/$user\/.*httpd.conf/d" $httpd_conf
-    if [ -e "$nginx_conf" ]; then
-        sed -i "/.*\/$user\/.*nginx.conf/d" $nginx_conf
+    sed -i "/.*\/$user\/.*$WEB_SYSTEM.conf/d" $web_conf
+    if [ -e "$proxy_conf" ]; then
+        sed -i "/.*\/$user\/.*$WEB_SYSTEM.conf/d" $proxy_conf
     fi
     fi
 
 
 else
 else
-
     # Renaming tmp config
     # Renaming tmp config
-    tmp_conf="$HOMEDIR/$user/conf/web/tmp_httpd.conf"
-    conf="$HOMEDIR/$user/conf/web/httpd.conf"
+    tmp_conf="$HOMEDIR/$user/conf/web/tmp_$WEB_SYSTEM.conf"
+    conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
     mv $tmp_conf $conf
     mv $tmp_conf $conf
 
 
-    # Checking httpd.conf include
-    httpd_include=$(grep "$conf" $httpd_conf )
-    if [ -z "$httpd_include" ]; then
-        echo "Include $conf" >> $httpd_conf
+    # Checking include
+    web_include=$(grep "$conf" $web_conf )
+    if [ -z "$web_include" ]; then
+        echo "Include $conf" >> $web_conf
     fi
     fi
 
 
-    # Checking ssl
+    # Checking SSL
     if [ "$ssl_change" = 'yes' ]; then
     if [ "$ssl_change" = 'yes' ]; then
-        tmp_conf="$HOMEDIR/$user/conf/web/tmp_shttpd.conf"
-        conf="$HOMEDIR/$user/conf/web/shttpd.conf"
+        tmp_conf="$HOMEDIR/$user/conf/web/tmp_s$WEB_SYSTEM.conf"
+        conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
         mv $tmp_conf $conf
         mv $tmp_conf $conf
     fi
     fi
-
-    # Checking ssl include
-    httpd_include=$(grep "$conf" $httpd_conf )
-    if [ -z "$httpd_include" ]; then
-        echo "Include $conf" >> $httpd_conf
+    ssl_include=$(grep "$conf" $web_conf )
+    if [ -z "$ssl_include" ]; then
+        echo "Include $conf" >> $web_conf
     fi
     fi
 
 
-    # Checking nginx
-    if [ "$ngix_change" = 'yes' ]; then
-        tmp_conf="$HOMEDIR/$user/conf/web/tmp_nginx.conf"
-        conf="$HOMEDIR/$user/conf/web/nginx.conf"
+    # Checking proxy
+    if [ "$proxy_change" = 'yes' ]; then
+        tmp_conf="$HOMEDIR/$user/conf/web/tmp_$PROXY_SYSTEM.conf"
+        conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
         mv $tmp_conf $conf
         mv $tmp_conf $conf
     fi
     fi
-    nginx_include=$(grep "$conf" $nginx_conf )
-    if [ -z "$nginx_include" ]; then
-        echo "include $conf;" >> $nginx_conf
+    proxy_include=$(grep "$conf" $proxy_conf )
+    if [ -z "$proxy_include" ]; then
+        echo "include $conf;" >> $proxy_conf
     fi
     fi
 
 
-    # Checking ssl for nginx
-    if [ "$ngix_change" = 'yes' ] && [ "$ssl_change" = 'yes' ]; then
-        tmp_conf="$HOMEDIR/$user/conf/web/tmp_snginx.conf"
-        conf="$HOMEDIR/$user/conf/web/snginx.conf"
+    # Checking SSL proxy
+    if [ "$proxy_change" = 'yes' ] && [ "$ssl_change" = 'yes' ]; then
+        tmp_conf="$HOMEDIR/$user/conf/web/tmp_s$PROXY_SYSTEM.conf"
+        conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
         mv $tmp_conf $conf
         mv $tmp_conf $conf
-        nginx_include=$(grep "$conf" $nginx_conf )
-        if [ -z "$nginx_include" ]; then
-            echo "include $conf;" >> $nginx_conf
+        proxy_include=$(grep "$conf" $proxy_conf )
+        if [ -z "$proxy_include" ]; then
+            echo "include $conf;" >> $proxy_conf
         fi
         fi
     fi
     fi
 fi
 fi
@@ -130,7 +126,8 @@ update_user_value "$user" '$U_WEB_ALIASES' "$user_aliases"
 
 
 # Restart web server
 # Restart web server
 if [ "$restart" != 'no' ]; then
 if [ "$restart" != 'no' ]; then
-    $BIN/v-restart-web "$EVENT"
+    $BIN/v-restart-web
+    $BIN/v-restart-proxy
 fi
 fi
 
 
 # Logging
 # Logging

+ 9 - 5
bin/v-restart-cron

@@ -18,11 +18,15 @@ source $VESTA/func/main.sh
 #                       Action                             #
 #                       Action                             #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-# Parsing config / or just source config
-if [ "$CRON_SYSTEM" = 'crond' ]; then
-    /etc/init.d/crond 'reload' >/dev/null 2>&1
-    if [ $? -ne 0 ]; then
-        /etc/init.d/crond 'restart' >/dev/null 2>&1
+if [ ! -z "$CRON_SYSTEM" ]; then
+    /etc/init.d/$CRON_SYSTEM status >/dev/null 2>&1
+    if [ $? -eq 0 ]; then
+        /etc/init.d/$CRON_SYSTEM reload >/dev/null 2>&1
+        if [ $? -ne 0 ]; then
+            exit $E_RESTART
+        fi
+    else
+        /etc/init.d/$CRON_SYSTEM start >/dev/null 2>&1
         if [ $? -ne 0 ]; then
         if [ $? -ne 0 ]; then
             exit $E_RESTART
             exit $E_RESTART
         fi
         fi

+ 9 - 4
bin/v-restart-dns

@@ -18,10 +18,15 @@ source $VESTA/func/main.sh
 #                       Action                             #
 #                       Action                             #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-if [ "$DNS_SYSTEM" = 'bind' ]; then
-    /etc/init.d/named reload >/dev/null 2>&1
-    if [ $? -ne 0 ]; then
-        /etc/init.d/named restart >/dev/null 2>&1
+if [ ! -z "$DNS_SYSTEM" ]; then
+    /etc/init.d/$DNS_SYSTEM status >/dev/null 2>&1
+    if [ $? -eq 0 ]; then
+        /etc/init.d/$DNS_SYSTEM reload >/dev/null 2>&1
+        if [ $? -ne 0 ]; then
+            exit $E_RESTART
+        fi
+    else
+        /etc/init.d/$DNS_SYSTEM start >/dev/null 2>&1
         if [ $? -ne 0 ]; then
         if [ $? -ne 0 ]; then
             exit $E_RESTART
             exit $E_RESTART
         fi
         fi

+ 6 - 13
bin/v-restart-ftp

@@ -18,22 +18,15 @@ source $VESTA/func/main.sh
 #                       Action                             #
 #                       Action                             #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-# Vsftpd
-if [ "$FTP_SYSTEM" = 'vsftpd' ]; then
-    /etc/init.d/vsftpd reload >/dev/null 2>&1
-    if [ $? -ne 0 ]; then
-        /etc/init.d/vsftpd restart >/dev/null 2>&1
+if [ ! -z "$FTP_SYSTEM" ]; then
+    /etc/init.d/$FTP_SYSTEM status >/dev/null 2>&1
+    if [ $? -eq 0 ]; then
+        /etc/init.d/$FTP_SYSTEM reload >/dev/null 2>&1
         if [ $? -ne 0 ]; then
         if [ $? -ne 0 ]; then
             exit $E_RESTART
             exit $E_RESTART
         fi
         fi
-    fi
-fi
-
-# ProFTPD
-if [ "$FTP_SYSTEM" = 'proftpd' ]; then
-    /etc/init.d/proftpd reload >/dev/null 2>&1
-    if [ $? -ne 0 ]; then
-        /etc/init.d/proftpd restart >/dev/null 2>&1
+    else
+        /etc/init.d/$FTP_SYSTEM start >/dev/null 2>&1
         if [ $? -ne 0 ]; then
         if [ $? -ne 0 ]; then
             exit $E_RESTART
             exit $E_RESTART
         fi
         fi

+ 9 - 4
bin/v-restart-mail

@@ -18,10 +18,15 @@ source $VESTA/func/main.sh
 #                       Action                             #
 #                       Action                             #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-if [ "$MAIL_SYSTEM" = 'exim' ]; then
-    /etc/init.d/exim reload  >/dev/null 2>&1
-    if [ $? -ne 0 ]; then
-        /etc/init.d/exim restart >/dev/null 2>&1
+if [ ! -z "$MAIL_SYSTEM" ]; then
+    /etc/init.d/$MAIL_SYSTEM status >/dev/null 2>&1
+    if [ $? -eq 0 ]; then
+        /etc/init.d/$MAIL_SYSTEM reload >/dev/null 2>&1
+        if [ $? -ne 0 ]; then
+            exit $E_RESTART
+        fi
+    else
+        /etc/init.d/$MAIL_SYSTEM start >/dev/null 2>&1
         if [ $? -ne 0 ]; then
         if [ $? -ne 0 ]; then
             exit $E_RESTART
             exit $E_RESTART
         fi
         fi

+ 41 - 0
bin/v-restart-proxy

@@ -0,0 +1,41 @@
+#!/bin/bash
+# info: restart proxy server
+# options: NONE
+#
+# The function reloads proxy server configuration.
+
+
+#----------------------------------------------------------#
+#                    Variable&Function                     #
+#----------------------------------------------------------#
+
+# Includes
+source $VESTA/conf/vesta.conf
+source $VESTA/func/main.sh
+
+
+#----------------------------------------------------------#
+#                       Action                             #
+#----------------------------------------------------------#
+
+if [ ! -z "$PROXY_SYSTEM" ]; then
+    /etc/init.d/$PROXY_SYSTEM status >/dev/null 2>&1
+    if [ $? -eq 0 ]; then
+        /etc/init.d/$PROXY_SYSTEM reload >/dev/null 2>&1
+        if [ $? -ne 0 ]; then
+            exit $E_RESTART
+        fi
+    else
+        /etc/init.d/$PROXY_SYSTEM start >/dev/null 2>&1
+        if [ $? -ne 0 ]; then
+            exit $E_RESTART
+        fi
+    fi
+fi
+
+
+#----------------------------------------------------------#
+#                       Vesta                              #
+#----------------------------------------------------------#
+
+exit

+ 5 - 21
bin/v-restart-web

@@ -1,5 +1,5 @@
 #!/bin/bash
 #!/bin/bash
-# info: restart web services
+# info: restart web server
 # options: NONE
 # options: NONE
 #
 #
 # The function reloads web server configuration.
 # The function reloads web server configuration.
@@ -18,37 +18,21 @@ source $VESTA/func/main.sh
 #                       Action                             #
 #                       Action                             #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-if [ "$WEB_SYSTEM" = 'apache' ]; then
-    /etc/init.d/httpd status >/dev/null 2>&1
+if [ ! -z "$WEB_SYSTEM" ]; then
+    /etc/init.d/$WEB_SYSTEM status >/dev/null 2>&1
     if [ $? -eq 0 ]; then
     if [ $? -eq 0 ]; then
-        /etc/init.d/httpd graceful >/dev/null 2>&1
+        /etc/init.d/$WEB_SYSTEM reload >/dev/null 2>&1
         if [ $? -ne 0 ]; then
         if [ $? -ne 0 ]; then
             exit $E_RESTART
             exit $E_RESTART
         fi
         fi
     else
     else
-        /etc/init.d/httpd start >/dev/null 2>&1
+        /etc/init.d/$WEB_SYSTEM start >/dev/null 2>&1
         if [ $? -ne 0 ]; then
         if [ $? -ne 0 ]; then
             exit $E_RESTART
             exit $E_RESTART
         fi
         fi
     fi
     fi
 fi
 fi
 
 
-if [ "$PROXY_SYSTEM" = 'nginx' ]; then
-    /etc/init.d/nginx status >/dev/null 2>&1
-    if [ $? -eq 0 ]; then
-        /etc/init.d/nginx reload >/dev/null 2>&1
-        if [ $? -ne 0 ]; then
-            exit $E_RESTART
-        fi
-    else
-        /etc/init.d/nginx start >/dev/null 2>&1
-        if [ $? -ne 0 ]; then
-            exit $E_RESTART
-        fi
-    fi
-
-fi
-
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                       Vesta                              #
 #                       Vesta                              #

+ 44 - 64
bin/v-restore-user

@@ -244,21 +244,11 @@ if [ "$web" != 'no' ]; then
                 echo "$IP" > $tmpdir/ip_mapping.$domain
                 echo "$IP" > $tmpdir/ip_mapping.$domain
             fi
             fi
 
 
-            # Check apache template
-            check_tpl=$(is_apache_template_valid)
-            if [ ! -z "$check_tpl" ]; then
-                templates=$(ls -t $VESTA/data/templates/web/ |\
-                    grep 'apache' |\
-                    grep '\.tpl' |\
-                    cut -f 2 -d '_' |\
-                    cut -f 1 -d  '.')
-                if [ ! -z "$(echo $templates |grep default)" ]; then
-                    TPL=$(echo "$templates" |grep default |head -n1)
-                else
-                    TPL=$("$templates" |head -n1)
-                fi
-
-                if [ -z "$TPL" ]; then
+            # Check web template
+            check_tpl=$(is_web_template_valid)
+            if [ ! -e "$WEBTPL/$WEB_SYSTEM/$TPL.tpl" ]; then
+                TPL="default"
+                if [ ! -e "$WEBTPL/$WEB_SYSTEM/$TPL.tpl" ]; then
                     echo "Error: no avaiable web template"
                     echo "Error: no avaiable web template"
                     echo "No available web template" |\
                     echo "No available web template" |\
                         $send_mail -s "$subj" $email
                         $send_mail -s "$subj" $email
@@ -267,24 +257,13 @@ if [ "$web" != 'no' ]; then
                 fi
                 fi
             fi
             fi
 
 
-            # Check nginx template
-            if [ ! -z "$NGINX" ]; then
-                check_tpl=$(is_nginx_template_valid)
-                if [ ! -z "$check_tpl" ]; then
-                    templates=$(ls -t $VESTA/data/templates/web/ |\
-                        grep 'nginx' |\
-                        grep '\.tpl' |\
-                        cut -f 2 -d '_' |\
-                        cut -f 1 -d  '.')
-                    if [ ! -z "$(echo $templates |grep default)" ]; then
-                        NGINX=$(echo "$templates" |grep default |head -n1)
-                    else
-                        NGINX=$("$templates" |head -n1)
-                    fi
-
-                    if [ -z "$NGINX" ]; then
-                        echo "Error: no avaiable nginx template"
-                        echo "No available nginx tpl" |\
+            # Check proxy template
+            if [ ! -z "$PROXY" ]; then
+                if [ ! -e "$WEBTPL/$PROXY_SYSTEM/$TPL.tpl" ]; then
+                    PROXY="default"
+                    if [ ! -e "$WEBTPL/$PROXY_SYSTEM/$TPL.tpl" ]; then
+                        echo "Error: no avaiable proxy template"
+                        echo "No available proxy tpl" |\
                             $send_mail -s "$subj" $email
                             $send_mail -s "$subj" $email
                         log_event "$E_NOTEXIST" "$EVENT"
                         log_event "$E_NOTEXIST" "$EVENT"
                         exit $E_NOTEXIST
                         exit $E_NOTEXIST
@@ -302,8 +281,8 @@ if [ "$web" != 'no' ]; then
 
 
             str="DOMAIN='$domain' IP='$IP' IP6='$IP6' ALIAS='$ALIAS'"
             str="DOMAIN='$domain' IP='$IP' IP6='$IP6' ALIAS='$ALIAS'"
             str="$str TPL='$TPL' SSL='$SSL' SSL_HOME='$SSL_HOME'"
             str="$str TPL='$TPL' SSL='$SSL' SSL_HOME='$SSL_HOME'"
-            str="$str FTP_USER='$FTP_USER' FTP_MD5='$FTP_MD5' NGINX='$NGINX'"
-            str="$str NGINX_EXT='$NGINX_EXT' STATS='$STATS'"
+            str="$str FTP_USER='$FTP_USER' FTP_MD5='$FTP_MD5' PROXY='$PROXY'"
+            str="$str PROXY_EXT='$PROXY_EXT' STATS='$STATS'"
             str="$str STATS_USER='$STATS_USER' STATS_CRYPT='$STATS_CRYPT'"
             str="$str STATS_USER='$STATS_USER' STATS_CRYPT='$STATS_CRYPT'"
             str="$str U_DISK='$U_DISK' U_BANDWIDTH='0' SUSPENDED='no'"
             str="$str U_DISK='$U_DISK' U_BANDWIDTH='0' SUSPENDED='no'"
             str="$str TIME='$(date +%T)' DATE='$(date +%F)'"
             str="$str TIME='$(date +%T)' DATE='$(date +%F)'"
@@ -312,51 +291,51 @@ if [ "$web" != 'no' ]; then
             # Rebuild web config
             # Rebuild web config
             rebuild_web_domain_conf
             rebuild_web_domain_conf
 
 
-            # Adding apache virtualhost
-            httpd_conf='/etc/httpd/conf.d/vesta.conf'
-            tmp_conf="$HOMEDIR/$user/conf/web/tmp_httpd.conf"
-            conf="$HOMEDIR/$user/conf/web/httpd.conf"
+            # Adding vhost
+            web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf"
+            tmp_conf="$HOMEDIR/$user/conf/web/tmp_$WEB_SYSTEM.conf"
+            conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
             cat $tmp_conf >> $conf
             cat $tmp_conf >> $conf
             rm -f $tmp_conf
             rm -f $tmp_conf
-            httpd_include=$(grep "$conf" $httpd_conf )
-            if [ -z "$httpd_include" ]; then
-                echo "Include $conf" >> $httpd_conf
+            web_include=$(grep "$conf" $web_conf)
+            if [ -z "$web_include" ]; then
+                echo "Include $conf" >> $web_conf
             fi
             fi
 
 
-            # Adding ssl apache virtuualhost
+            # Adding SSL vhost
             if [ "$ssl_change" = 'yes' ]; then
             if [ "$ssl_change" = 'yes' ]; then
-                tmp_conf="$HOMEDIR/$user/conf/web/tmp_shttpd.conf"
-                conf="$HOMEDIR/$user/conf/web/shttpd.conf"
+                tmp_conf="$HOMEDIR/$user/conf/web/tmp_s$WEB_SYSTEM.conf"
+                conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
                 cat $tmp_conf >> $conf
                 cat $tmp_conf >> $conf
                 rm -f $tmp_conf
                 rm -f $tmp_conf
             fi
             fi
-            httpd_include=$(grep "$conf" $httpd_conf )
-            if [ -z "$httpd_include" ]; then
-                echo "Include $conf" >> $httpd_conf
+            ssl_include=$(grep "$conf" $web_conf)
+            if [ -z "$ssl_include" ]; then
+                echo "Include $conf" >> $web_conf
             fi
             fi
 
 
-            # Adding nginx virtualhost
-            nginx_conf='/etc/nginx/conf.d/vesta_users.conf'
-            if [ "$ngix_change" = 'yes' ]; then
-                tmp_conf="$HOMEDIR/$user/conf/web/tmp_nginx.conf"
-                conf="$HOMEDIR/$user/conf/web/nginx.conf"
+            # Adding proxy vhost
+            proxy_conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf"
+            if [ "$proxy_change" = 'yes' ]; then
+                tmp_conf="$HOMEDIR/$user/conf/web/tmp_$PROXY_SYSTEM.conf"
+                conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
                 cat $tmp_conf >> $conf
                 cat $tmp_conf >> $conf
                 rm -f $tmp_conf
                 rm -f $tmp_conf
             fi
             fi
-            nginx_include=$(grep "$conf" $nginx_conf )
-            if [ -z "$nginx_include" ]; then
-                echo "include $conf;" >> $nginx_conf
+            proxy_include=$(grep "$conf" $proxy_conf)
+            if [ -z "$proxy_include" ]; then
+                echo "include $conf;" >> $proxy_conf
             fi
             fi
 
 
-            # Adding ssl nginx virtualhost
-            if [ "$ngix_change" = 'yes' ] && [ "$ssl_change" = 'yes' ]; then
-                tmp_conf="$HOMEDIR/$user/conf/web/tmp_snginx.conf"
-                conf="$HOMEDIR/$user/conf/web/snginx.conf"
+            # Adding SSL proxy vhost
+            if [ "$proxy_change" = 'yes' ] && [ "$ssl_change" = 'yes' ]; then
+                tmp_conf="$HOMEDIR/$user/conf/web/tmp_s$PROXY_SYSTEM.conf"
+                conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
                 cat $tmp_conf >> $conf
                 cat $tmp_conf >> $conf
                 rm -f $tmp_conf
                 rm -f $tmp_conf
-                nginx_include=$(grep "$conf" $nginx_conf )
-                if [ -z "$nginx_include" ]; then
-                    echo "include $conf;" >> $nginx_conf
+                proxy_include=$(grep "$conf" $proxy_conf)
+                if [ -z "$proxy_include" ]; then
+                    echo "include $conf;" >> $proxy_conf
                 fi
                 fi
             fi
             fi
         fi
         fi
@@ -380,7 +359,8 @@ if [ "$web" != 'no' ]; then
     done
     done
 
 
     # Restart WEB
     # Restart WEB
-    $BIN/v-restart-web "$EVENT"
+    $BIN/v-restart-web
+    $BIN/v-restart-proxy
     echo
     echo
     msg="$msg\n"
     msg="$msg\n"
 fi
 fi

+ 19 - 16
bin/v-suspend-web-domain

@@ -42,8 +42,8 @@ is_object_unsuspended 'web' 'DOMAIN' "$domain"
 
 
 # Parsing domain values
 # Parsing domain values
 get_domain_values 'web'
 get_domain_values 'web'
-tpl_file="$WEBTPL/apache/$TPL.tpl"
-conf="$HOMEDIR/$user/conf/web/httpd.conf"
+tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.tpl"
+conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
 SUSPENDED='yes'
 SUSPENDED='yes'
 ip=$(get_real_ip $IP)
 ip=$(get_real_ip $IP)
 
 
@@ -54,27 +54,29 @@ upd_web_domain_values
 del_web_config
 del_web_config
 add_web_config
 add_web_config
 
 
-# Check ssl
+# Check SSL
 if [ "$SSL" = 'yes' ]; then
 if [ "$SSL" = 'yes' ]; then
-    tpl_file="$WEBTPL/apache/$TPL.stpl"
-    conf="$HOMEDIR/$user/conf/web/shttpd.conf"
+    tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
+    conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
     del_web_config
     del_web_config
     add_web_config
     add_web_config
 fi
 fi
 
 
-# Checking nginx
-if [ ! -z "$NGINX" ]; then
-    tpl_file="$WEBTPL/nginx/$NGINX.tpl"
-    conf="$HOMEDIR/$user/conf/web/nginx.conf"
+# Checking proxy
+if [ ! -z "$PROXY" ]; then
+    tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
+    conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
     del_web_config
     del_web_config
     add_web_config
     add_web_config
 
 
-    if [ "$SSL" = 'yes' ]; then
-        tpl_file="$WEBTPL/nginx/$NGINX.stpl"
-        conf="$HOMEDIR/$user/conf/web/snginx.conf"
-        del_web_config
-        add_web_config
-    fi
+fi
+
+# Checking proxy SSL
+if [ ! -z "$PROXY" ] && [ "$SSL" = 'yes' ]; then
+    tpl_file="$WEBTPL/$PROXY_SSL/$PROXY.stpl"
+    conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
+    del_web_config
+    add_web_config
 fi
 fi
 
 
 
 
@@ -88,7 +90,8 @@ increase_user_value "$user" '$SUSPENDED_WEB'
 
 
 # Restart web server
 # Restart web server
 if [ "$restart" != 'no' ]; then
 if [ "$restart" != 'no' ]; then
-    $BIN/v-restart-web "$EVENT"
+    $BIN/v-restart-web
+    $BIN/v-restart-proxy
 fi
 fi
 
 
 # Logging
 # Logging

+ 18 - 16
bin/v-unsuspend-web-domain

@@ -40,8 +40,8 @@ is_object_suspended 'web' 'DOMAIN' "$domain"
 
 
 # Parsing domain values
 # Parsing domain values
 get_domain_values 'web'
 get_domain_values 'web'
-tpl_file="$WEBTPL/apache/$TPL.tpl"
-conf="$HOMEDIR/$user/conf/web/httpd.conf"
+tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.tpl"
+conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
 SUSPENDED='no'
 SUSPENDED='no'
 ip=$(get_real_ip $IP)
 ip=$(get_real_ip $IP)
 
 
@@ -52,27 +52,28 @@ upd_web_domain_values
 del_web_config
 del_web_config
 add_web_config
 add_web_config
 
 
-# Check ssl
+# Check SSL
 if [ "$SSL" = 'yes' ]; then
 if [ "$SSL" = 'yes' ]; then
-    tpl_file="$WEBTPL/apache/$TPL.stpl"
-    conf="$HOMEDIR/$user/conf/web/shttpd.conf"
+    tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
+    conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
     del_web_config
     del_web_config
     add_web_config
     add_web_config
 fi
 fi
 
 
-# Checking nginx
-if [ ! -z "$NGINX" ]; then
-    tpl_file="$WEBTPL/nginx/$NGINX.tpl"
-    conf="$HOMEDIR/$user/conf/web/nginx.conf"
+# Checking proxy
+if [ ! -z "$PROXY" ]; then
+    tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
+    conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
     del_web_config
     del_web_config
     add_web_config
     add_web_config
+fi
 
 
-    if [ "$SSL" = 'yes' ]; then
-        tpl_file="$WEBTPL/nginx/$NGINX.stpl"
-        conf="$HOMEDIR/$user/conf/web/snginx.conf"
-        del_web_config
-        add_web_config
-    fi
+# Checking SSL proxy
+if [ ! -z "$PROXY" ] && [ "$SSL" = 'yes' ]; then
+    tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
+    conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
+    del_web_config
+    add_web_config
 fi
 fi
 
 
 
 
@@ -86,7 +87,8 @@ decrease_user_value "$user" '$SUSPENDED_WEB'
 
 
 # Restart web erver
 # Restart web erver
 if [ "$restart" != 'no' ]; then
 if [ "$restart" != 'no' ]; then
-    $BIN/v-restart-web "$EVENT"
+    $BIN/v-restart-web
+    $BIN/v-restart-proxy
 fi
 fi
 
 
 # Logging
 # Logging

+ 4 - 42
bin/v-update-sys-ip

@@ -16,10 +16,8 @@ user=${1-admin}
 ip_status=${2-shared}
 ip_status=${2-shared}
 
 
 # Includes
 # Includes
-source $VESTA/conf/vesta.conf    # include for internal func
+source $VESTA/conf/vesta.conf
 source $VESTA/func/main.sh
 source $VESTA/func/main.sh
-source $VESTA/func/ip.sh
-source $VESTA/func/domain.sh
 
 
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
@@ -35,40 +33,15 @@ is_object_valid 'user' 'USER' "$user" "$user"
 #                       Action                             #
 #                       Action                             #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-# Get ip list
 ip_list=$(/sbin/ifconfig | grep 'inet addr:' | cut -f 2 -d : | \
 ip_list=$(/sbin/ifconfig | grep 'inet addr:' | cut -f 2 -d : | \
     cut -f 1 -d ' '| grep -v 127.0.0.1)
     cut -f 1 -d ' '| grep -v 127.0.0.1)
 
 
-# Get vesta registered ip list
-vesta_ip_list=$(ls $VESTA/data/ips/)
-
-# Defining config paths
-conf='/etc/httpd/conf.d/vesta.conf'
-nconf='/etc/nginx/conf.d/vesta_ip.conf'
-iconf='/etc/sysconfig/network-scripts/ifcfg'
-rconf='/etc/httpd/conf.d/mod_extract_forwarded.conf'
-
-# Comparing each ip
 for ip in $ip_list; do
 for ip in $ip_list; do
-    check_ip=$(echo $vesta_ip_list | grep -w "$ip")
-
-    # Checking ip registered
-    if [ -z "$check_ip" ]; then
-        # Parsing additional params
-        iface=$(/sbin/ifconfig |grep -B1 -w $ip |head -n 1 |cut -f 1 -d ' ')
+    if [ ! -e "$VESTA/data/ips/$ip" ]; then
+        iface=$(/sbin/ifconfig |grep -B1 -w $ip |head -n1 |cut -f1 -d ' ')
         interface=$(echo "$iface" | cut -f 1 -d :)
         interface=$(echo "$iface" | cut -f 1 -d :)
         mask=$(/sbin/ifconfig |grep -w $ip |awk -F "Mask:" '{print $2}')
         mask=$(/sbin/ifconfig |grep -w $ip |awk -F "Mask:" '{print $2}')
-
-        # Adding vesta ip
-        create_vesta_ip
-
-        # Adding namehosting support
-        namehost_ip_support
-
-        # Creating startup script
-        if [ ! -e "$iconf-$iface" ]; then
-            create_vesta_ip
-        fi
+        $BIN/v-add-sys-ip $ip $mask $interface
     fi
     fi
 
 
     # TBD: revers comparation
     # TBD: revers comparation
@@ -79,15 +52,4 @@ done
 #                       Vesta                              #
 #                       Vesta                              #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-# Updating user conf
-increase_user_value "$user" '$IP_OWNED'
-
-# Restart web server
-if [ "$web_restart" = 'yes' ]; then
-    $BIN/v-restart-web "$EVENT"
-fi
-
-# Logging
-log_event "$OK" "$EVENT"
-
 exit
 exit

+ 4 - 4
bin/v-update-sys-rrd

@@ -102,12 +102,12 @@ for period in $periods; do
     $BIN/v-update-sys-rrd-ssh $period
     $BIN/v-update-sys-rrd-ssh $period
 
 
     # Updating web stats
     # Updating web stats
-    if [ "$WEB_SYSTEM" = 'apache' ]; then
-        $BIN/v-update-sys-rrd-httpd $period
+    if [ ! -z "$WEB_SYSTEM" ]; then
+        $BIN/v-update-sys-rrd-$WEB_SYSTEM $period
     fi
     fi
 
 
-    if [ "$PROXY_SYSTEM" = 'nginx' ]; then
-        $BIN/v-update-sys-rrd-nginx $period
+    if [ ! -z "$PROXY_SYSTEM" ]; then
+        $BIN/v-update-sys-rrd-$PROXY_SYSTEM $period
     fi
     fi
 
 
     # Updating ftp stats
     # Updating ftp stats

+ 1 - 1
bin/v-update-web-domain-traff

@@ -38,7 +38,7 @@ is_object_unsuspended 'web' 'DOMAIN' "$domain"
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Defining log file
 # Defining log file
-log_file="/var/log/httpd/domains/$domain.bytes"
+log_file="/var/log/$WEB_SYSTEM/domains/$domain.bytes"
 
 
 # Defining bytes
 # Defining bytes
 bytes=0
 bytes=0

+ 1 - 1
bin/v-update-web-domains-traff

@@ -38,7 +38,7 @@ for domain in $(search_objects 'web' 'SUSPENDED' "no" 'DOMAIN'); do
         update_object_value 'web' 'DOMAIN' "$domain" '$U_BANDWIDTH' '0'
         update_object_value 'web' 'DOMAIN' "$domain" '$U_BANDWIDTH' '0'
     fi
     fi
 
 
-    log_file="/var/log/httpd/domains/$domain.bytes"
+    log_file="/var/log/$WEB_SYSTEM/domains/$domain.bytes"
     bytes=0
     bytes=0
 
 
     # Parsing log
     # Parsing log

+ 19 - 101
func/domain.sh

@@ -1,46 +1,32 @@
 # Web template check
 # Web template check
-is_apache_template_valid() {
-    t="$WEBTPL/apache/$template.tpl"
-    s="$WEBTPL/apache/$template.stpl"
+is_web_template_valid() {
+    t="$WEBTPL/$WEB_SYSTEM/$template.tpl"
+    s="$WEBTPL/$WEB_SYSTEM/$template.stpl"
     if [ ! -e $t ] || [ ! -e $s ]; then
     if [ ! -e $t ] || [ ! -e $s ]; then
-        template='default'
-        t="$WEBTPL/apache/$template.tpl"
-        s="$WEBTPL/apache/$template.stpl"
-        if [ ! -e $t ] || [ ! -e $s ]; then
-            echo "Error: template $template not found"
-            log_event "$E_NOTEXIST" "$EVENT"
-            exit $E_NOTEXIST
-        fi
+        echo "Error: web template $template not found"
+        log_event "$E_NOTEXIST" "$EVENT"
+        exit $E_NOTEXIST
     fi
     fi
 }
 }
 
 
-# Nginx template check
-is_nginx_template_valid() {
-    t="$WEBTPL/nginx/$template.tpl"
-    s="$WEBTPL/nginx/$template.stpl"
+# Proxy template check
+is_proxy_template_valid() {
+    t="$WEBTPL/$PROXY_SYSTEM/$template.tpl"
+    s="$WEBTPL/$PROXY_SYSTEM/$template.stpl"
     if [ ! -e $t ] || [ ! -e $s ]; then
     if [ ! -e $t ] || [ ! -e $s ]; then
-        template='default'
-        t="$WEBTPL/nginx/$template.tpl"
-        s="$WEBTPL/nginx/$template.stpl"
-        if [ ! -e $t ] || [ ! -e $s ]; then
-            echo "Error: nginx $template not found"
-            log_event "$E_NOTEXIST" "$EVENT"
-            exit $E_NOTEXIST
-        fi
+        echo "Error: proxy template $template not found"
+        log_event "$E_NOTEXIST" "$EVENT"
+        exit $E_NOTEXIST
     fi
     fi
 }
 }
 
 
 # DNS template check
 # DNS template check
 is_dns_template_valid() {
 is_dns_template_valid() {
-    tpl="$DNSTPL/$template.tpl"
-    if [ ! -e $tpl ]; then
-        template='default'
-        tpl="$DNSTPL/$template.tpl"
-        if [ ! -e $tpl ]; then
-            echo "Error: template not found"
-            log_event "$E_NOTEXIST" "$EVENT"
-            exit $E_NOTEXIST
-        fi
+    t="$DNSTPL/$template.tpl"
+    if [ ! -e $t ]; then
+        echo "Error: dns template $template not found"
+        log_event "$E_NOTEXIST" "$EVENT"
+        exit $E_NOTEXIST
     fi
     fi
 }
 }
 
 
@@ -239,6 +225,7 @@ add_web_config() {
             -e "s/%web_ssl_port%/$WEB_SSL_PORT/g" \
             -e "s/%web_ssl_port%/$WEB_SSL_PORT/g" \
             -e "s/%proxy_port%/$PROXY_PORT/g" \
             -e "s/%proxy_port%/$PROXY_PORT/g" \
             -e "s/%proxy_ssl_port%/$PROXY_SSL_PORT/g" \
             -e "s/%proxy_ssl_port%/$PROXY_SSL_PORT/g" \
+            -e "s/%proxy_extentions%/${PROXY_EXT//,/|}/g" \
             -e "s/%domain_idn%/$domain_idn/g" \
             -e "s/%domain_idn%/$domain_idn/g" \
             -e "s/%domain%/$domain/g" \
             -e "s/%domain%/$domain/g" \
             -e "s/%user%/$user/g" \
             -e "s/%user%/$user/g" \
@@ -255,10 +242,6 @@ add_web_config() {
             -e "s/%ssl_pem%/${ssl_pem////\/}/g" \
             -e "s/%ssl_pem%/${ssl_pem////\/}/g" \
             -e "s/%ssl_ca_str%/${ssl_ca_str////\/}/g" \
             -e "s/%ssl_ca_str%/${ssl_ca_str////\/}/g" \
             -e "s/%ssl_ca%/${ssl_ca////\/}/g" \
             -e "s/%ssl_ca%/${ssl_ca////\/}/g" \
-            -e "s/%nginx_extentions%/${NGINX_EXT//,/|}/g" \
-            -e "s/%elog%//g" \
-            -e "s/%cgi%//g" \
-            -e "s/%cgi_option%/+ExecCGI/g" \
     >> $conf
     >> $conf
 }
 }
 
 
@@ -397,71 +380,6 @@ del_web_config() {
     sed -i "$top_line,$bottom_line d" $conf
     sed -i "$top_line,$bottom_line d" $conf
 }
 }
 
 
-# Add ip virtual hosting support
-namehost_ip_support() {
-    if [ "$WEB_SYSTEM" = 'apache' ]; then
-        conf_line=$(grep -n "NameVirtual" $conf|tail -n 1|cut -f 1 -d ':')
-        if [ ! -z "$conf_line" ]; then
-            conf_ins=$((conf_line + 1))
-        else
-            conf_ins='1'
-        fi
-
-        if [ "$WEB_SSL" = 'mod_ssl' ]; then
-            sed -i "$conf_ins i NameVirtualHost $ip:$WEB_SSL_PORT" $conf
-            sed -i "$conf_ins i Listen $ip:$WEB_SSL_PORT" $conf
-        fi
-
-        sed -i "$conf_ins i NameVirtualHost $ip:$WEB_PORT" $conf
-        sed -i "$conf_ins i Listen $ip:$WEB_PORT" $conf
-
-        if [ "$PROXY_SYSTEM" = 'nginx' ]; then
-            cat $WEBTPL/nginx/ip.tpl | sed -e "s/%ip%/$ip/g" \
-             -e "s/%web_port%/$WEB_PORT/g" \
-            -e "s/%proxy_port%/$PROXY_PORT/g" >>$nconf
-
-            ips=$(grep 'MEFaccept ' $rconf |grep -v '#'| head -n1)
-            sed -i "s/$ips/$ips $ip/g" $rconf
-        fi
-        web_restart='yes'
-    fi
-}
-
-# Disable virtual ip hosting support
-namehost_ip_disable() {
-    if [ "$WEB_SYSTEM" = 'apache' ]; then
-        sed -i "/NameVirtualHost $ip:/d" $conf
-        sed -i "/Listen $ip:/d" $conf
-
-        if [ "$PROXY_SYSTEM" = 'nginx' ]; then
-            tpl_ln=$(wc -l $WEBTPL/nginx/ip.tpl | cut -f 1 -d ' ')
-            ip_line=$(grep -n "%ip%" $WEBTPL/nginx/ip.tpl |head -n1 |\
-                cut -f 1 -d :)
-            conf_line=$(grep -n -w $ip $nconf|head -n1|cut -f 1 -d :)
-            if [ -z "$tpl_ln" ] || [ -z "$ip_line" ] || [ -z "$conf_line" ]
-            then
-                echo "Error: nginx config paring error"
-                log_event "$E_PARSING" "$EVENT"
-                exit $E_PARSING
-            fi
-            up_line=$((ip_line - 1))
-            first_line=$((conf_line - up_line))
-            last_line=$((conf_line - ip_line + tpl_ln))
-
-            if [ -z "$first_line" ] || [ -z "$last_line" ]; then
-                echo "Error: nginx config paring error"
-                log_event "$E_PARSING" "$EVENT"
-                exit $E_PARSING
-            fi
-            sed -i "$first_line,$last_line d" $nconf
-            ips=$(grep 'RPAFproxy_ips' $rconf)
-            new_ips=$(echo "$ips"|sed -e "s/$ip//")
-            sed -i "s/$ips/$new_ips/g" $rconf
-        fi
-        web_restart='yes'
-    fi
-}
-
 # Update web domain values
 # Update web domain values
 upd_web_domain_values() {
 upd_web_domain_values() {
     group="$user"
     group="$user"

+ 1 - 27
func/ip.sh

@@ -45,9 +45,7 @@ is_ip_owner() {
 
 
 # Check if ip address is free
 # Check if ip address is free
 is_ip_free() {
 is_ip_free() {
-    list=$(/sbin/ifconfig |grep 'inet addr:' |cut -f 2 -d : |cut -f 1 -d ' ')
-    ip_check=$(echo "$list" |grep -w "$ip")
-    if [ -n "$ip_check" ] || [ -e "$VESTA/data/ips/$ip" ]; then
+    if [ -e "$VESTA/data/ips/$ip" ]; then
         echo "Error: IP exist"
         echo "Error: IP exist"
         log_event "$E_EXISTS" "$EVENT"
         log_event "$E_EXISTS" "$EVENT"
         exit  $E_EXISTS
         exit  $E_EXISTS
@@ -174,30 +172,6 @@ get_ip_value() {
     echo "$value"
     echo "$value"
 }
 }
 
 
-# Create ip vesta configuration
-create_vesta_ip() {
-    ip_data="OWNER='$user'"
-    ip_data="$ip_data\nSTATUS='$ip_status'"
-    ip_data="$ip_data\nNAME='$ip_name'"
-    ip_data="$ip_data\nU_SYS_USERS=''"
-    ip_data="$ip_data\nU_WEB_DOMAINS='0'"
-    ip_data="$ip_data\nINTERFACE='$interface'"
-    ip_data="$ip_data\nNETMASK='$mask'"
-    ip_data="$ip_data\nNAT='$nat_ip'"
-    ip_data="$ip_data\nTIME='$TIME'"
-    ip_data="$ip_data\nDATE='$DATE'"
-    echo -e "$ip_data" >$VESTA/data/ips/$ip
-    chmod 660 $VESTA/data/ips/$ip
-}
-
-# Create ip address startup configuration
-create_ip_startup() {
-    ip_data="# Added by vesta $SCRIPT\nDEVICE=$iface"
-    ip_data="$ip_data\nBOOTPROTO=static\nONBOOT=yes\nIPADDR=$ip"
-    ip_data="$ip_data\nNETMASK=$mask"
-    echo -e "$ip_data" > $iconf-$iface
-}
-
 # Get real ip address
 # Get real ip address
 get_real_ip() {
 get_real_ip() {
     if [ -e "$VESTA/data/ips/$1" ]; then
     if [ -e "$VESTA/data/ips/$1" ]; then

+ 2 - 2
func/main.sh

@@ -209,7 +209,7 @@ is_object_valid() {
         fi
         fi
     fi
     fi
     if [ -z "$sobject" ]; then
     if [ -z "$sobject" ]; then
-        echo "Error: $3 not exist"
+        echo "Error: $2 $3 not exist"
         log_event "$E_NOTEXIST" "$EVENT"
         log_event "$E_NOTEXIST" "$EVENT"
         exit $E_NOTEXIST
         exit $E_NOTEXIST
     fi
     fi
@@ -684,7 +684,7 @@ validate_format_mhdmw() {
     fi
     fi
 }
 }
 
 
-# Nginx static extention or DNS record
+# proxy extention or DNS record
 validate_format_common() {
 validate_format_common() {
     exclude="[!|#|$|^|&|(|)|+|=|{|}|:|<|>|?|/|\|\"|'|;|%|\`| ]"
     exclude="[!|#|$|^|&|(|)|+|=|{|}|:|<|>|?|/|\|\"|'|;|%|\`| ]"
     if [[ "$1" =~ $exclude ]] || [ 200 -le ${#1} ]; then
     if [[ "$1" =~ $exclude ]] || [ 200 -le ${#1} ]; then

+ 29 - 30
func/rebuild.sh

@@ -156,14 +156,14 @@ rebuild_web_domain_conf() {
         $HOMEDIR/$user/web/$domain/logs
         $HOMEDIR/$user/web/$domain/logs
 
 
     # Create domain logs
     # Create domain logs
-    touch /var/log/httpd/domains/$domain.bytes \
-          /var/log/httpd/domains/$domain.log \
-          /var/log/httpd/domains/$domain.error.log
+    touch /var/log/$WEB_SYSTEM/domains/$domain.bytes \
+          /var/log/$WEB_SYSTEM/domains/$domain.log \
+          /var/log/$WEB_SYSTEM/domains/$domain.error.log
 
 
     # Create symlinks
     # Create symlinks
     cd $HOMEDIR/$user/web/$domain/logs/
     cd $HOMEDIR/$user/web/$domain/logs/
-    ln -f -s /var/log/httpd/domains/$domain.log .
-    ln -f -s /var/log/httpd/domains/$domain.error.log .
+    ln -f -s /var/log/$WEB_SYSTEM/domains/$domain.log .
+    ln -f -s /var/log/$WEB_SYSTEM/domains/$domain.error.log .
     cd - > /dev/null
     cd - > /dev/null
 
 
     # Propagate html skeleton
     # Propagate html skeleton
@@ -180,7 +180,7 @@ rebuild_web_domain_conf() {
     chmod 751 $HOMEDIR/$user/web/$domain/document_errors
     chmod 751 $HOMEDIR/$user/web/$domain/document_errors
     chmod 551 $HOMEDIR/$user/web/$domain/stats
     chmod 551 $HOMEDIR/$user/web/$domain/stats
     chmod 551 $HOMEDIR/$user/web/$domain/logs
     chmod 551 $HOMEDIR/$user/web/$domain/logs
-    chmod 640 /var/log/httpd/domains/$domain.*
+    chmod 640 /var/log/$WEB_SYSTEM/domains/$domain.*
 
 
     # Set ownership
     # Set ownership
     chown $user:$user $HOMEDIR/$user/web/$domain
     chown $user:$user $HOMEDIR/$user/web/$domain
@@ -189,19 +189,18 @@ rebuild_web_domain_conf() {
     chown $user:$user $HOMEDIR/$user/web/$domain/public_html
     chown $user:$user $HOMEDIR/$user/web/$domain/public_html
     chown $user:$user $HOMEDIR/$user/web/$domain/public_shtml
     chown $user:$user $HOMEDIR/$user/web/$domain/public_shtml
     chown -R $user:$user $HOMEDIR/$user/web/$domain/document_errors
     chown -R $user:$user $HOMEDIR/$user/web/$domain/document_errors
-    chown root:$user /var/log/httpd/domains/$domain.*
+    chown root:$user /var/log/$WEB_SYSTEM/domains/$domain.*
 
 
-
-    # Adding tmp_httpd.conf
-    tpl_file="$WEBTPL/apache/$TPL.tpl"
-    conf="$HOMEDIR/$user/conf/web/tmp_httpd.conf"
+    # Adding tmp conf
+    tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.tpl"
+    conf="$HOMEDIR/$user/conf/web/tmp_$WEB_SYSTEM.conf"
     add_web_config
     add_web_config
-    chown root:apache $conf
+    chown root:$user $conf
     chmod 640 $conf
     chmod 640 $conf
 
 
     # Running template trigger
     # Running template trigger
-    if [ -x $WEBTPL/apache/$TPL.sh ]; then
-        $WEBTPL/apache/$TPL.sh $user $domain $ip $HOMEDIR $docroot
+    if [ -x $WEBTPL/$WEB_SYSTEM/$TPL.sh ]; then
+        $WEBTPL/$WEB_SYSTEM/$TPL.sh $user $domain $ip $HOMEDIR $docroot
     fi
     fi
 
 
     # Checking aliases
     # Checking aliases
@@ -253,13 +252,13 @@ rebuild_web_domain_conf() {
         fi
         fi
     fi
     fi
 
 
-    # Checking ssl
+    # Checking SSL
     if [ "$SSL" = 'yes' ]; then
     if [ "$SSL" = 'yes' ]; then
-        # Adding domain to the shttpd.conf
-        conf="$HOMEDIR/$user/conf/web/tmp_shttpd.conf"
-        tpl_file="$WEBTPL/apache/$TPL.stpl"
+        # Adding domain to the web conf
+        conf="$HOMEDIR/$user/conf/web/tmp_s$WEB_SYSTEM.conf"
+        tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
         add_web_config
         add_web_config
-        chown root:apache $conf
+        chown root:$user $conf
         chmod 640 $conf
         chmod 640 $conf
 
 
         cp -f $USER_DATA/ssl/$domain.crt \
         cp -f $USER_DATA/ssl/$domain.crt \
@@ -274,30 +273,30 @@ rebuild_web_domain_conf() {
         fi
         fi
 
 
         # Running template trigger
         # Running template trigger
-        if [ -x $WEBTPL/apache/$TPL.sh ]; then
-            $WEBTPL/apache/$TPL.sh $user $domain $ip $HOMEDIR $sdocroot
+        if [ -x $WEBTPL/$WEB_SYSTEM/$TPL.sh ]; then
+            $WEBTPL/$WEB_SYSTEM/$TPL.sh $user $domain $ip $HOMEDIR $sdocroot
         fi
         fi
 
 
         user_ssl=$((user_ssl + 1))
         user_ssl=$((user_ssl + 1))
         ssl_change='yes'
         ssl_change='yes'
     fi
     fi
 
 
-    # Checking nginx
-    if [ ! -z "$NGINX" ]; then
-        tpl_file="$WEBTPL/nginx/$NGINX.tpl"
-        conf="$HOMEDIR/$user/conf/web/tmp_nginx.conf"
+    # Checking proxy
+    if [ ! -z "$PROXY" ]; then
+        tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
+        conf="$HOMEDIR/$user/conf/web/tmp_$PROXY_SYSTEM.conf"
         add_web_config
         add_web_config
-        chown root:nginx $conf
+        chown root:$user $conf
         chmod 640 $conf
         chmod 640 $conf
 
 
         if [ "$SSL" = 'yes' ]; then
         if [ "$SSL" = 'yes' ]; then
-            tpl_file="$WEBTPL/nginx/$NGINX.stpl"
-            conf="$HOMEDIR/$user/conf/web/tmp_snginx.conf"
+            tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
+            conf="$HOMEDIR/$user/conf/web/tmp_s$PROXY_SYSTEM.conf"
             add_web_config
             add_web_config
-            chown root:nginx $conf
+            chown root:$user $conf
             chmod 640 $conf
             chmod 640 $conf
         fi
         fi
-        ngix_change='yes'
+        proxy_change='yes'
     fi
     fi
     if [ "$SUSPENDED" = 'yes' ]; then
     if [ "$SUSPENDED" = 'yes' ]; then
         suspended_web=$((suspended_web + 1))
         suspended_web=$((suspended_web + 1))

+ 79 - 20
upd/convert-templates.sh

@@ -1,29 +1,71 @@
 #!/bin/bash
 #!/bin/bash
 
 
-# Define data path
-TPL='/usr/local/vesta/data/templates/web'
+# Rename web system service
+sed -i "s/apache/httpd/g" /usr/local/vesta/conf/vesta.conf
+
+# Rename dns system service
+sed -i "s/bind/named/g" /usr/local/vesta/conf/vesta.conf
+
+# Rename nginx config
+mv /etc/nginx/conf.d/vesta_users.conf /etc/nginx/conf.d/vesta.conf 2>/dev/null
+rm -f /etc/nginx/conf.d/vesta_ip.conf 2>/dev/null
+
+# Update user packages
+PKG=/usr/local/vesta/data/packages
+for package in $(ls $PKG); do
+    default=$(grep "^TEMPLATE='" $PKG/$package | cut -f2 -d \')
+    if [ ! -z "$default" ]; then
+        tpl="WEB_TEMPLATE='$default'"
+        tpl="$tpl\nPROXY_TEMPLATE='default'"
+        tpl="$tpl\nDNS_TEMPLATE='default'"
+        sed -i "s/^TEMPLATE=.*/$tpl/g" $PKG/$package
+    fi
+done
 
 
-# Check for new template structure
+# Update users
+USR=/usr/local/vesta/data/users
+for user in $(ls $USR); do
+    default=$(grep "^TEMPLATE='" $USR/$user/user.conf | cut -f2 -d \')
+    if [ ! -z "$default" ]; then
+        tpl="WEB_TEMPLATE='$default'"
+        tpl="$tpl\nPROXY_TEMPLATE='default'"
+        tpl="$tpl\nDNS_TEMPLATE='default'"
+        sed -i "s/^TEMPLATE=.*/$tpl/g" $USR/$user/user.conf
+    fi
+done
+
+# Rename NGINX to PROXY key
+sed -i "s/NGINX/PROXY/g" /usr/local/vesta/data/users/*/web.conf
+
+# Check template structure
+TPL='/usr/local/vesta/data/templates/web'
 if [ -e "$TPL/apache" ]; then
 if [ -e "$TPL/apache" ]; then
-    exit
+    mv $TPL/apache $TPL/httpd
 fi
 fi
 
 
 # Remove unused email template
 # Remove unused email template
-rm -f $TPL/email_reset_password.tpl
-
-# Apache
-mkdir -p $TPL/apache
-if [ ! -z "$(ls $TPL/| grep apache_)" ];then
-    mv $TPL/apache_* $TPL/apache/
-    for template in $(ls $TPL/apache/); do
-        new_name=$(echo $template |sed -e "s/apache_//")
-        mv -f $TPL/apache/$template $TPL/apache/$new_name
+if [ -e $TPL/email_reset_password.tpl ]; then
+    rm -f $TPL/email_reset_password.tpl
+fi
+
+# Update httpd templates
+if [ ! -z "$(ls $TPL | grep apache_)" ]; then
+    mkdir -p $TPL/httpd
+    mv $TPL/apache_* $TPL/httpd/
+    for template in $(ls $TPL/httpd); do
+        new_name=$(echo $template | sed -e "s/apache_//")
+        mv -f $TPL/httpd/$template $TPL/httpd/$new_name
     done
     done
 fi
 fi
+if [ -e "$TPL/httpd" ]; then
+    sed -i -e "s/%elog%//g" \
+        -e "s/%cgi%//g" \
+        -e "s/%cgi_option%/+ExecCGI/g" $TPL/httpd/*
+fi
 
 
-# Nginx
-mkdir -p $TPL/nginx
+# Update nginx templates
 if [ ! -z "$(ls $TPL/| grep nginx_)" ];then
 if [ ! -z "$(ls $TPL/| grep nginx_)" ];then
+    mkdir -p $TPL/nginx
     mv $TPL/nginx_* $TPL/nginx/
     mv $TPL/nginx_* $TPL/nginx/
     for template in $(ls $TPL/nginx/); do
     for template in $(ls $TPL/nginx/); do
         new_name=$(echo $template |sed -e "s/nginx_//")
         new_name=$(echo $template |sed -e "s/nginx_//")
@@ -31,21 +73,38 @@ if [ ! -z "$(ls $TPL/| grep nginx_)" ];then
     done
     done
 fi
 fi
 if [ -e "$TPL/ngingx.ip.tpl" ]; then
 if [ -e "$TPL/ngingx.ip.tpl" ]; then
-    mv $TPL/ngingx.ip.tpl $TPL/nginx/ip.tpl
+    mv $TPL/ngingx.ip.tpl $TPL/nginx/proxy_ip.tpl
+fi
+if [ -e "$TPL/nginx/ip.tpl" ]; then
+    mv $TPL/nginx/ip.tpl $TPL/nginx/proxy_ip.tpl
+fi
+if [ -e "$TPL/nginx" ]; then
+    sed -i -e "s/%elog%//g" \
+        -e "s/nginx_extentions/proxy_extentions/g" $TPL/nginx/*
 fi
 fi
 
 
-# Awstats
-mkdir -p $TPL/awstats
+# Move Awstats templates
 if [ -e "$TPL/awstats.tpl" ]; then
 if [ -e "$TPL/awstats.tpl" ]; then
+    mkdir -p $TPL/awstats
     mv $TPL/awstats.tpl $TPL/awstats
     mv $TPL/awstats.tpl $TPL/awstats
     mv $TPL/awstats_index.tpl $TPL/awstats/index.tpl
     mv $TPL/awstats_index.tpl $TPL/awstats/index.tpl
     mv $TPL/awstats_nav.tpl $TPL/awstats/nav.tpl
     mv $TPL/awstats_nav.tpl $TPL/awstats/nav.tpl
 fi
 fi
 
 
-# Webalizer
-mkdir -p $TPL/webalizer
+# Move Webalizer templates
 if [ -e "$TPL/webalizer.tpl" ]; then
 if [ -e "$TPL/webalizer.tpl" ]; then
+    mkdir -p $TPL/webalizer
     mv $TPL/webalizer.tpl $TPL/webalizer
     mv $TPL/webalizer.tpl $TPL/webalizer
 fi
 fi
 
 
+# Update proxy ip configuration
+for ip in $(ls /usr/local/vesta/data/ips); do
+    cat $TPL/nginx/proxy_ip.tpl |\
+        sed -e "s/%ip%/$ip/g" \
+            -e "s/%web_port%/8080/g" \
+            -e "s/%proxy_port%/80/g" \
+        > /etc/nginx/conf.d/$ip.conf
+done
+
+
 exit
 exit

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

@@ -21,11 +21,6 @@ if (!empty($_POST['ok'])) {
     $v_domain = preg_replace("/^www./i", "", $_POST['v_domain']);
     $v_domain = preg_replace("/^www./i", "", $_POST['v_domain']);
     $v_domain = escapeshellarg($v_domain);
     $v_domain = escapeshellarg($v_domain);
     $v_ip = escapeshellarg($_POST['v_ip']);
     $v_ip = escapeshellarg($_POST['v_ip']);
-    if ($_SESSION['user'] == 'admin') {
-        $v_template = escapeshellarg($_POST['v_template']);
-    } else {
-        $v_template = "''";
-    }
 
 
     if (!empty($_POST['v_ns1'])) $v_ns1 = escapeshellarg($_POST['v_ns1']);
     if (!empty($_POST['v_ns1'])) $v_ns1 = escapeshellarg($_POST['v_ns1']);
     if (!empty($_POST['v_ns2'])) $v_ns2 = escapeshellarg($_POST['v_ns2']);
     if (!empty($_POST['v_ns2'])) $v_ns2 = escapeshellarg($_POST['v_ns2']);
@@ -44,7 +39,7 @@ if (!empty($_POST['ok'])) {
         $_SESSION['error_msg'] = __('Field "%s" can not be blank.',$error_msg);
         $_SESSION['error_msg'] = __('Field "%s" can not be blank.',$error_msg);
     } else {
     } else {
         // Add DNS
         // Add DNS
-        exec (VESTA_CMD."v-add-dns-domain ".$user." ".$v_domain." ".$v_ip." ".$v_template." ".$v_ns1." ".$v_ns2." ".$v_ns3." ".$ns4, $output, $return_var);
+        exec (VESTA_CMD."v-add-dns-domain ".$user." ".$v_domain." ".$v_ip." ".$v_ns1." ".$v_ns2." ".$v_ns3." ".$ns4, $output, $return_var);
         if ($return_var != 0) {
         if ($return_var != 0) {
             $error = implode('<br>', $output);
             $error = implode('<br>', $output);
             if (empty($error)) $error = __('Error code:',$return_var);
             if (empty($error)) $error = __('Error code:',$return_var);
@@ -128,15 +123,7 @@ if (!empty($_POST['ok_rec'])) {
     }
     }
 }
 }
 
 
-
 if ((empty($_GET['domain'])) && (empty($_POST['domain'])))  {
 if ((empty($_GET['domain'])) && (empty($_POST['domain'])))  {
-    exec (VESTA_CMD."v-get-user-value ".$user." 'TEMPLATE'", $output, $return_var);
-    $template = $output[0] ;
-    unset($output);
-    exec (VESTA_CMD."v-list-dns-templates json", $output, $return_var);
-    $templates = json_decode(implode('', $output), true);
-    unset($output);
-
     if ((empty($v_ns1)) && (empty($v_ns2))) {
     if ((empty($v_ns1)) && (empty($v_ns2))) {
         exec (VESTA_CMD."v-list-user-ns ".$user." json", $output, $return_var);
         exec (VESTA_CMD."v-list-user-ns ".$user." json", $output, $return_var);
         $nameservers = json_decode(implode('', $output), true);
         $nameservers = json_decode(implode('', $output), true);

+ 23 - 5
web/add/package/index.php

@@ -21,7 +21,9 @@ if ($_SESSION['user'] == 'admin') {
     if (!empty($_POST['ok'])) {
     if (!empty($_POST['ok'])) {
         // Check input
         // Check input
         if (empty($_POST['v_package'])) $errors[] = __('package');
         if (empty($_POST['v_package'])) $errors[] = __('package');
-        if (empty($_POST['v_template'])) $errors[] = __('template');
+        if (empty($_POST['v_web_template'])) $errors[] = __('web template');
+        if (empty($_POST['v_proxy_template'])) $errors[] = __('proxy template');
+        if (empty($_POST['v_dns_template'])) $errors[] = __('dns template');
         if (empty($_POST['v_shell'])) $errrors[] = __('shell');
         if (empty($_POST['v_shell'])) $errrors[] = __('shell');
         if (!isset($_POST['v_web_domains'])) $errors[] = __('web domains');
         if (!isset($_POST['v_web_domains'])) $errors[] = __('web domains');
         if (!isset($_POST['v_web_aliases'])) $errors[] = __('web aliases');
         if (!isset($_POST['v_web_aliases'])) $errors[] = __('web aliases');
@@ -40,7 +42,9 @@ if ($_SESSION['user'] == 'admin') {
 
 
         // Protect input
         // Protect input
         $v_package = escapeshellarg($_POST['v_package']);
         $v_package = escapeshellarg($_POST['v_package']);
-        $v_template = escapeshellarg($_POST['v_template']);
+        $v_web_template = escapeshellarg($_POST['v_web_template']);
+        $v_proxy_template = escapeshellarg($_POST['v_proxy_template']);
+        $v_dns_template = escapeshellarg($_POST['v_dns_template']);
         $v_shell = escapeshellarg($_POST['v_shell']);
         $v_shell = escapeshellarg($_POST['v_shell']);
         $v_web_domains = escapeshellarg($_POST['v_web_domains']);
         $v_web_domains = escapeshellarg($_POST['v_web_domains']);
         $v_web_aliases = escapeshellarg($_POST['v_web_aliases']);
         $v_web_aliases = escapeshellarg($_POST['v_web_aliases']);
@@ -80,7 +84,9 @@ if ($_SESSION['user'] == 'admin') {
             unset($output);
             unset($output);
 
 
             // Create package
             // Create package
-            $pkg = "TEMPLATE=".$v_template."\n";
+            $pkg = "WEB_TEMPLATE=".$v_web_template."\n";
+            $pkg .= "PROXY_TEMPLATE=".$v_proxy_template."\n";
+            $pkg .= "DNS_TEMPLATE=".$v_dns_template."\n";
             $pkg .= "WEB_DOMAINS=".$v_web_domains."\n";
             $pkg .= "WEB_DOMAINS=".$v_web_domains."\n";
             $pkg .= "WEB_ALIASES=".$v_web_aliases."\n";
             $pkg .= "WEB_ALIASES=".$v_web_aliases."\n";
             $pkg .= "DNS_DOMAINS=".$v_dns_domains."\n";
             $pkg .= "DNS_DOMAINS=".$v_dns_domains."\n";
@@ -129,7 +135,17 @@ if ($_SESSION['user'] == 'admin') {
 
 
     exec (VESTA_CMD."v-list-web-templates json", $output, $return_var);
     exec (VESTA_CMD."v-list-web-templates json", $output, $return_var);
     check_error($return_var);
     check_error($return_var);
-    $templates = json_decode(implode('', $output), true);
+    $web_templates = json_decode(implode('', $output), true);
+    unset($output);
+
+    exec (VESTA_CMD."v-list-web-templates-proxy json", $output, $return_var);
+    check_error($return_var);
+    $proxy_templates = json_decode(implode('', $output), true);
+    unset($output);
+
+    exec (VESTA_CMD."v-list-dns-templates json", $output, $return_var);
+    check_error($return_var);
+    $dns_templates = json_decode(implode('', $output), true);
     unset($output);
     unset($output);
 
 
     exec (VESTA_CMD."v-list-sys-shells json", $output, $return_var);
     exec (VESTA_CMD."v-list-sys-shells json", $output, $return_var);
@@ -138,7 +154,9 @@ if ($_SESSION['user'] == 'admin') {
     unset($output);
     unset($output);
 
 
     // Set default values
     // Set default values
-    if (empty($v_template)) $v_template = 'default';
+    if (empty($v_web_template)) $v_web_template = 'default';
+    if (empty($v_proxy_template)) $v_proxy_template = 'default';
+    if (empty($v_dns_template)) $v_dns_template = 'default';
     if (empty($v_shell)) $v_shell = 'nologin';
     if (empty($v_shell)) $v_shell = 'nologin';
     if (empty($v_web_domains)) $v_web_domains = "'0'";
     if (empty($v_web_domains)) $v_web_domains = "'0'";
     if (empty($v_web_aliases)) $v_web_aliases = "'0'";
     if (empty($v_web_aliases)) $v_web_aliases = "'0'";

+ 28 - 30
web/add/web/index.php

@@ -25,26 +25,21 @@ $v_ftp_email = $panel[$user]['CONTACT'];
         if ((!empty($_POST['v_ssl'])) || (!empty($_POST['v_elog']))) $v_adv = 'yes';
         if ((!empty($_POST['v_ssl'])) || (!empty($_POST['v_elog']))) $v_adv = 'yes';
         if ((!empty($_POST['v_ssl_crt'])) || (!empty($_POST['v_ssl_key']))) $v_adv = 'yes';
         if ((!empty($_POST['v_ssl_crt'])) || (!empty($_POST['v_ssl_key']))) $v_adv = 'yes';
         if ((!empty($_POST['v_ssl_ca'])) || ($_POST['v_stats'] != 'none')) $v_adv = 'yes';
         if ((!empty($_POST['v_ssl_ca'])) || ($_POST['v_stats'] != 'none')) $v_adv = 'yes';
-        if (empty($_POST['v_nginx'])) $v_adv = 'yes';
+        if (empty($_POST['v_proxy'])) $v_adv = 'yes';
         if (!empty($_POST['v_ftp'])) $v_adv = 'yes';
         if (!empty($_POST['v_ftp'])) $v_adv = 'yes';
 
 
-        $v_nginx_ext = 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, ';
-        $v_nginx_ext .= 'doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, ';
-        $v_nginx_ext .= 'mpeg, flv, html, htm';
-        if ($_POST['v_nginx_ext'] != $v_nginx_ext) $v_adv = 'yes';
+        $v_proxy_ext = 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, ';
+        $v_proxy_ext .= 'doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, ';
+        $v_proxy_ext .= 'mpeg, flv, html, htm';
+        if ($_POST['v_proxy_ext'] != $v_proxy_ext) $v_adv = 'yes';
 
 
         // Protect input
         // Protect input
         $v_domain = preg_replace("/^www./i", "", $_POST['v_domain']);
         $v_domain = preg_replace("/^www./i", "", $_POST['v_domain']);
         $v_domain = escapeshellarg($v_domain);
         $v_domain = escapeshellarg($v_domain);
         $v_ip = escapeshellarg($_POST['v_ip']);
         $v_ip = escapeshellarg($_POST['v_ip']);
-        if ($_SESSION['user'] == 'admin') {
-            $v_template = escapeshellarg($_POST['v_template']);
-        } else {
-            $v_template = "''";
-        }
         if (empty($_POST['v_dns'])) $v_dns = 'off';
         if (empty($_POST['v_dns'])) $v_dns = 'off';
         if (empty($_POST['v_mail'])) $v_mail = 'off';
         if (empty($_POST['v_mail'])) $v_mail = 'off';
-        if (empty($_POST['v_nginx'])) $v_nginx = 'off';
+        if (empty($_POST['v_proxy'])) $v_proxy = 'off';
         $v_aliases = $_POST['v_aliases'];
         $v_aliases = $_POST['v_aliases'];
         $v_elog = $_POST['v_elog'];
         $v_elog = $_POST['v_elog'];
         $v_ssl = $_POST['v_ssl'];
         $v_ssl = $_POST['v_ssl'];
@@ -55,11 +50,11 @@ $v_ftp_email = $panel[$user]['CONTACT'];
         $v_stats = escapeshellarg($_POST['v_stats']);
         $v_stats = escapeshellarg($_POST['v_stats']);
         $v_stats_user = $data[$v_domain]['STATS_USER'];
         $v_stats_user = $data[$v_domain]['STATS_USER'];
         $v_stats_password = $data[$v_domain]['STATS_PASSWORD'];
         $v_stats_password = $data[$v_domain]['STATS_PASSWORD'];
-        $v_nginx_ext = preg_replace("/\n/", " ", $_POST['v_nginx_ext']);
-        $v_nginx_ext = preg_replace("/,/", " ", $v_nginx_ext);
-        $v_nginx_ext = preg_replace('/\s+/', ' ',$v_nginx_ext);
-        $v_nginx_ext = trim($v_nginx_ext);
-        $v_nginx_ext = str_replace(' ', ", ", $v_nginx_ext);
+        $v_proxy_ext = preg_replace("/\n/", " ", $_POST['v_proxy_ext']);
+        $v_proxy_ext = preg_replace("/,/", " ", $v_proxy_ext);
+        $v_proxy_ext = preg_replace('/\s+/', ' ',$v_proxy_ext);
+        $v_proxy_ext = trim($v_proxy_ext);
+        $v_proxy_ext = str_replace(' ', ", ", $v_proxy_ext);
         $v_ftp = $_POST['v_ftp'];
         $v_ftp = $_POST['v_ftp'];
         $v_ftp_user = $_POST['v_ftp_user'];
         $v_ftp_user = $_POST['v_ftp_user'];
         $v_ftp_password = $_POST['v_ftp_password'];
         $v_ftp_password = $_POST['v_ftp_password'];
@@ -100,7 +95,7 @@ $v_ftp_email = $panel[$user]['CONTACT'];
 
 
         if (empty($_SESSION['error_msg'])) {
         if (empty($_SESSION['error_msg'])) {
             // Add WEB
             // Add WEB
-            exec (VESTA_CMD."v-add-web-domain ".$user." ".$v_domain." ".$v_ip." ".$v_template." 'no'", $output, $return_var);
+            exec (VESTA_CMD."v-add-web-domain ".$user." ".$v_domain." ".$v_ip." 'no'", $output, $return_var);
             if ($return_var != 0) {
             if ($return_var != 0) {
                 $error = implode('<br>', $output);
                 $error = implode('<br>', $output);
                 if (empty($error)) $error = __('Error code:',$return_var);
                 if (empty($error)) $error = __('Error code:',$return_var);
@@ -176,11 +171,11 @@ $v_ftp_email = $panel[$user]['CONTACT'];
             }
             }
 
 
 
 
-            // Add Nginx
-            if (($_POST['v_nginx'] == 'on') && (empty($_SESSION['error_msg']))) {
-                $ext = str_replace(' ', '', $v_nginx_ext);
+            // Add proxy
+            if (($_POST['v_proxy'] == 'on') && (empty($_SESSION['error_msg']))) {
+                $ext = str_replace(' ', '', $v_proxy_ext);
                 $ext = escapeshellarg($ext);
                 $ext = escapeshellarg($ext);
-                exec (VESTA_CMD."v-add-web-domain-nginx ".$user." ".$v_domain." 'default' ".$ext." 'no'", $output, $return_var);
+                exec (VESTA_CMD."v-add-web-domain-proxy ".$user." ".$v_domain." ".$ext." 'no'", $output, $return_var);
                 if ($return_var != 0) {
                 if ($return_var != 0) {
                     $error = implode('<br>', $output);
                     $error = implode('<br>', $output);
                     if (empty($error)) $error = __('Error code:',$return_var);
                     if (empty($error)) $error = __('Error code:',$return_var);
@@ -272,7 +267,6 @@ $v_ftp_email = $panel[$user]['CONTACT'];
                         $from = __('MAIL_FROM',$hostname);
                         $from = __('MAIL_FROM',$hostname);
                         $mailtext .= __('FTP_ACCOUNT_READY',$_POST['v_domain'],$user,$_POST['v_ftp_user'],$_POST['v_ftp_password']);
                         $mailtext .= __('FTP_ACCOUNT_READY',$_POST['v_domain'],$user,$_POST['v_ftp_user'],$_POST['v_ftp_password']);
                         send_email($to, $subject, $mailtext, $from);
                         send_email($to, $subject, $mailtext, $from);
-                        //unset($v_ftp_email);
                     }
                     }
                 }
                 }
                 unset($v_ftp);
                 unset($v_ftp);
@@ -298,6 +292,18 @@ $v_ftp_email = $panel[$user]['CONTACT'];
                     if (empty($error)) $error = __('Error code:',$return_var);
                     if (empty($error)) $error = __('Error code:',$return_var);
                     $_SESSION['error_msg'] = $error;
                     $_SESSION['error_msg'] = $error;
                 }
                 }
+            }
+
+            if (empty($_SESSION['error_msg'])) {
+                exec (VESTA_CMD."v-restart-proxy", $output, $return_var);
+                if ($return_var != 0) {
+                    $error = implode('<br>', $output);
+                    if (empty($error)) $error = __('Error code:',$return_var);
+                    $_SESSION['error_msg'] = $error;
+                }
+            }
+
+            if (empty($_SESSION['error_msg'])) {
                 unset($output);
                 unset($output);
                 $_SESSION['ok_msg'] = __('WEB_DOMAIN_CREATED_OK',$_POST[v_domain],$_POST[v_domain]);
                 $_SESSION['ok_msg'] = __('WEB_DOMAIN_CREATED_OK',$_POST[v_domain],$_POST[v_domain]);
                 unset($v_domain);
                 unset($v_domain);
@@ -314,14 +320,6 @@ $v_ftp_email = $panel[$user]['CONTACT'];
     $ips = json_decode(implode('', $output), true);
     $ips = json_decode(implode('', $output), true);
     unset($output);
     unset($output);
 
 
-    exec (VESTA_CMD."v-get-user-value ".$user." 'TEMPLATE'", $output, $return_var);
-    $template = $output[0] ;
-    unset($output);
-
-    exec (VESTA_CMD."v-list-web-templates json", $output, $return_var);
-    $templates = json_decode(implode('', $output), true);
-    unset($output);
-
     exec (VESTA_CMD."v-list-web-stats json", $output, $return_var);
     exec (VESTA_CMD."v-list-web-stats json", $output, $return_var);
     $stats = json_decode(implode('', $output), true);
     $stats = json_decode(implode('', $output), true);
     unset($output);
     unset($output);

+ 23 - 5
web/edit/package/index.php

@@ -33,7 +33,9 @@ if ($_SESSION['user'] == 'admin') {
         unset($output);
         unset($output);
 
 
         $v_package = $_GET['package'];
         $v_package = $_GET['package'];
-        $v_template = $data[$v_package]['TEMPLATE'];
+        $v_web_template = $data[$v_package]['WEB_TEMPLATE'];
+        $v_proxy_template = $data[$v_package]['PROXY_TEMPLATE'];
+        $v_dns_template = $data[$v_package]['DNS_TEMPLATE'];
         $v_web_domains = $data[$v_package]['WEB_DOMAINS'];
         $v_web_domains = $data[$v_package]['WEB_DOMAINS'];
         $v_web_aliases = $data[$v_package]['WEB_ALIASES'];
         $v_web_aliases = $data[$v_package]['WEB_ALIASES'];
         $v_dns_domains = $data[$v_package]['DNS_DOMAINS'];
         $v_dns_domains = $data[$v_package]['DNS_DOMAINS'];
@@ -59,7 +61,17 @@ if ($_SESSION['user'] == 'admin') {
 
 
         exec (VESTA_CMD."v-list-web-templates json", $output, $return_var);
         exec (VESTA_CMD."v-list-web-templates json", $output, $return_var);
         check_error($return_var);
         check_error($return_var);
-        $templates = json_decode(implode('', $output), true);
+        $web_templates = json_decode(implode('', $output), true);
+        unset($output);
+
+        exec (VESTA_CMD."v-list-web-templates-proxy json", $output, $return_var);
+        check_error($return_var);
+        $proxy_templates = json_decode(implode('', $output), true);
+        unset($output);
+
+        exec (VESTA_CMD."v-list-dns-templates json", $output, $return_var);
+        check_error($return_var);
+        $dns_templates = json_decode(implode('', $output), true);
         unset($output);
         unset($output);
 
 
         exec (VESTA_CMD."v-list-sys-shells json", $output, $return_var);
         exec (VESTA_CMD."v-list-sys-shells json", $output, $return_var);
@@ -71,7 +83,9 @@ if ($_SESSION['user'] == 'admin') {
         if (!empty($_POST['save'])) {
         if (!empty($_POST['save'])) {
             // Check input
             // Check input
             if (empty($_POST['v_package'])) $errors[] = __('package');
             if (empty($_POST['v_package'])) $errors[] = __('package');
-            if (empty($_POST['v_template'])) $errors[] = __('template');
+            if (empty($_POST['v_web_template'])) $errors[] = __('web template');
+            if (empty($_POST['v_proxy_template'])) $errors[] = __('proxy template');
+            if (empty($_POST['v_dns_template'])) $errors[] = __('dns template');
             if (empty($_POST['v_shell'])) $errrors[] = __('shell');
             if (empty($_POST['v_shell'])) $errrors[] = __('shell');
             if (!isset($_POST['v_web_domains'])) $errors[] = __('web domains');
             if (!isset($_POST['v_web_domains'])) $errors[] = __('web domains');
             if (!isset($_POST['v_web_aliases'])) $errors[] = __('web aliases');
             if (!isset($_POST['v_web_aliases'])) $errors[] = __('web aliases');
@@ -89,7 +103,9 @@ if ($_SESSION['user'] == 'admin') {
 
 
             // Protect input
             // Protect input
             $v_package = escapeshellarg($_POST['v_package']);
             $v_package = escapeshellarg($_POST['v_package']);
-            $v_template = escapeshellarg($_POST['v_template']);
+            $v_web_template = escapeshellarg($_POST['v_web_template']);
+            $v_proxy_template = escapeshellarg($_POST['v_proxy_template']);
+            $v_dns_template = escapeshellarg($_POST['v_dns_template']);
             $v_shell = escapeshellarg($_POST['v_shell']);
             $v_shell = escapeshellarg($_POST['v_shell']);
             $v_web_domains = escapeshellarg($_POST['v_web_domains']);
             $v_web_domains = escapeshellarg($_POST['v_web_domains']);
             $v_web_aliases = escapeshellarg($_POST['v_web_aliases']);
             $v_web_aliases = escapeshellarg($_POST['v_web_aliases']);
@@ -129,7 +145,9 @@ if ($_SESSION['user'] == 'admin') {
                 unset($output);
                 unset($output);
 
 
                 // Create package
                 // Create package
-                $pkg = "TEMPLATE=".$v_template."\n";
+                $pkg = "WEB_TEMPLATE=".$v_web_template."\n";
+                $pkg .= "PROXY_TEMPLATE=".$v_proxy_template."\n";
+                $pkg .= "DNS_TEMPLATE=".$v_dns_template."\n";
                 $pkg .= "WEB_DOMAINS=".$v_web_domains."\n";
                 $pkg .= "WEB_DOMAINS=".$v_web_domains."\n";
                 $pkg .= "WEB_ALIASES=".$v_web_aliases."\n";
                 $pkg .= "WEB_ALIASES=".$v_web_aliases."\n";
                 $pkg .= "DNS_DOMAINS=".$v_dns_domains."\n";
                 $pkg .= "DNS_DOMAINS=".$v_dns_domains."\n";

+ 0 - 17
web/edit/user/index.php

@@ -32,7 +32,6 @@ if ($_SESSION['user'] == 'admin') {
         $v_username = $_GET['user'];
         $v_username = $_GET['user'];
         $v_password = "••••••••";
         $v_password = "••••••••";
         $v_email = $data[$v_username]['CONTACT'];
         $v_email = $data[$v_username]['CONTACT'];
-        $v_template = $data[$v_username]['TEMPLATE'];
         $v_package = $data[$v_username]['PACKAGE'];
         $v_package = $data[$v_username]['PACKAGE'];
         $v_language = $data[$v_username]['LANGUAGE'];
         $v_language = $data[$v_username]['LANGUAGE'];
         $v_fname = $data[$v_username]['FNAME'];
         $v_fname = $data[$v_username]['FNAME'];
@@ -61,10 +60,6 @@ if ($_SESSION['user'] == 'admin') {
         $languages = json_decode(implode('', $output), true);
         $languages = json_decode(implode('', $output), true);
         unset($output);
         unset($output);
 
 
-        exec (VESTA_CMD."v-list-web-templates json", $output, $return_var);
-        $templates = json_decode(implode('', $output), true);
-        unset($output);
-
         exec (VESTA_CMD."v-list-sys-shells json", $output, $return_var);
         exec (VESTA_CMD."v-list-sys-shells json", $output, $return_var);
         $shells = json_decode(implode('', $output), true);
         $shells = json_decode(implode('', $output), true);
         unset($output);
         unset($output);
@@ -113,18 +108,6 @@ if ($_SESSION['user'] == 'admin') {
             unset($output);
             unset($output);
         }
         }
 
 
-        // Change template
-        if (($v_template != $_POST['v_template']) && (empty($_SESSION['error_msg']))) {
-            $v_template = escapeshellarg($_POST['v_template']);
-            exec (VESTA_CMD."v-change-user-template ".$v_username." ".$v_template, $output, $return_var);
-            if ($return_var != 0) {
-                $error = implode('<br>', $output);
-                if (empty($error)) $error = __('Error code:',$return_var);
-                $_SESSION['error_msg'] = $error;
-            }
-            unset($output);
-        }
-
         // Change shell
         // Change shell
         if (($v_shell != $_POST['v_shell']) && (empty($_SESSION['error_msg']))) {
         if (($v_shell != $_POST['v_shell']) && (empty($_SESSION['error_msg']))) {
             $v_shell = escapeshellarg($_POST['v_shell']);
             $v_shell = escapeshellarg($_POST['v_shell']);

+ 26 - 21
web/edit/web/index.php

@@ -54,8 +54,9 @@ if ($return_var != 0) {
         $v_ssl_ca = $ssl_str[$v_domain]['CA'];
         $v_ssl_ca = $ssl_str[$v_domain]['CA'];
     }
     }
     $v_ssl_home = $data[$v_domain]['SSL_HOME'];
     $v_ssl_home = $data[$v_domain]['SSL_HOME'];
-    $v_nginx = $data[$v_domain]['NGINX'];
-    $v_nginx_ext = str_replace(',', ', ', $data[$v_domain]['NGINX_EXT']);
+    $v_proxy = $data[$v_domain]['PROXY'];
+    $v_proxy_template = $data[$v_domain]['PROXY'];
+    $v_proxy_ext = str_replace(',', ', ', $data[$v_domain]['PROXY_EXT']);
     $v_stats = $data[$v_domain]['STATS'];
     $v_stats = $data[$v_domain]['STATS'];
     $v_stats_user = $data[$v_domain]['STATS_USER'];
     $v_stats_user = $data[$v_domain]['STATS_USER'];
     if (!empty($v_stats_user)) $v_stats_password = "••••••••";
     if (!empty($v_stats_user)) $v_stats_password = "••••••••";
@@ -78,6 +79,10 @@ if ($return_var != 0) {
     $templates = json_decode(implode('', $output), true);
     $templates = json_decode(implode('', $output), true);
     unset($output);
     unset($output);
 
 
+    exec (VESTA_CMD."v-list-web-templates-proxy json", $output, $return_var);
+    $proxy_templates = json_decode(implode('', $output), true);
+    unset($output);
+
     exec (VESTA_CMD."v-list-web-stats json", $output, $return_var);
     exec (VESTA_CMD."v-list-web-stats json", $output, $return_var);
     $stats = json_decode(implode('', $output), true);
     $stats = json_decode(implode('', $output), true);
     unset($output);
     unset($output);
@@ -200,56 +205,56 @@ if (!empty($_POST['save'])) {
         }
         }
     }
     }
 
 
-    // Nginx
-    if ((!empty($v_nginx)) && (empty($_POST['v_nginx'])) && (empty($_SESSION['error_msg']))) {
-        exec (VESTA_CMD."v-delete-web-domain-nginx ".$v_username." ".$v_domain." 'no'", $output, $return_var);
+    // Proxy
+    if ((!empty($v_proxy)) && (empty($_POST['v_proxy'])) && (empty($_SESSION['error_msg']))) {
+        exec (VESTA_CMD."v-delete-web-domain-proxy ".$v_username." ".$v_domain." 'no'", $output, $return_var);
         if ($return_var != 0) {
         if ($return_var != 0) {
             $error = implode('<br>', $output);
             $error = implode('<br>', $output);
             if (empty($error)) $error = __('Error code:',$return_var);
             if (empty($error)) $error = __('Error code:',$return_var);
             $_SESSION['error_msg'] = $error;
             $_SESSION['error_msg'] = $error;
         }
         }
         unset($output);
         unset($output);
-        unset($v_nginx);
-        $restart_web = 'yes';
+        unset($v_proxy);
+        $restart_proxy = 'yes';
     }
     }
-    if ((!empty($v_nginx)) && (!empty($_POST['v_nginx'])) && (empty($_SESSION['error_msg']))) {
-        $ext = preg_replace("/\n/", " ", $_POST['v_nginx_ext']);
+    if ((!empty($v_proxy)) && (!empty($_POST['v_proxy'])) && (empty($_SESSION['error_msg']))) {
+        $ext = preg_replace("/\n/", " ", $_POST['v_proxy_ext']);
         $ext = preg_replace("/,/", " ", $ext);
         $ext = preg_replace("/,/", " ", $ext);
         $ext = preg_replace('/\s+/', ' ',$ext);
         $ext = preg_replace('/\s+/', ' ',$ext);
         $ext = trim($ext);
         $ext = trim($ext);
         $ext = str_replace(' ', ", ", $ext);
         $ext = str_replace(' ', ", ", $ext);
-        if ( $v_nginx_ext != $ext ) {
+        if (( $v_proxy_template != $_POST['v_proxy_template']) ||  ($v_proxy_ext != $ext)) {
             $ext = str_replace(', ', ",", $ext);
             $ext = str_replace(', ', ",", $ext);
-            exec (VESTA_CMD."v-change-web-domain-nginx-tpl ".$v_username." ".$v_domain." 'default' ".escapeshellarg($ext)." 'no'", $output, $return_var);
+            exec (VESTA_CMD."v-change-web-domain-proxy-tpl ".$v_username." ".$v_domain." ".escapeshellarg($_POST['v_proxy_template'])." ".escapeshellarg($ext)." 'no'", $output, $return_var);
             if ($return_var != 0) {
             if ($return_var != 0) {
                 $error = implode('<br>', $output);
                 $error = implode('<br>', $output);
                 if (empty($error)) $error = __('Error code:',$return_var);
                 if (empty($error)) $error = __('Error code:',$return_var);
                 $_SESSION['error_msg'] = $error;
                 $_SESSION['error_msg'] = $error;
             }
             }
-            $v_nginx_ext = str_replace(',', ', ', $ext);
+            $v_proxy_template = $_POST['v_proxy_template'];
+            $v_proxy_ext = str_replace(',', ', ', $ext);
             unset($output);
             unset($output);
-            $restart_web = 'yes';
+            $restart_proxy = 'yes';
         }
         }
     }
     }
-    if ((empty($v_nginx)) && (!empty($_POST['v_nginx'])) && (empty($_SESSION['error_msg']))) {
-        $nginx_ext = "'jpg,jpeg,gif,png,ico,css,zip,tgz,gz,rar,bz2,doc,xls,exe,pdf,ppt,txt,tar,wav,bmp,rtf,js,mp3,avi,mpeg,html,htm'";
-        if (!empty($_POST['v_nginx_ext'])) {
-            $ext = preg_replace("/\n/", " ", $_POST['v_nginx_ext']);
+    if ((empty($v_proxy)) && (!empty($_POST['v_proxy'])) && (empty($_SESSION['error_msg']))) {
+        $v_proxy_template = $_POST['v_proxy_template'];
+        if (!empty($_POST['v_proxy_ext'])) {
+            $ext = preg_replace("/\n/", " ", $_POST['v_proxy_ext']);
             $ext = preg_replace("/,/", " ", $ext);
             $ext = preg_replace("/,/", " ", $ext);
             $ext = preg_replace('/\s+/', ' ',$ext);
             $ext = preg_replace('/\s+/', ' ',$ext);
             $ext = trim($ext);
             $ext = trim($ext);
             $ext = str_replace(' ', ",", $ext);
             $ext = str_replace(' ', ",", $ext);
-            $v_nginx_ext = str_replace(',', ', ', $ext);
+            $v_proxy_ext = str_replace(',', ', ', $ext);
         }
         }
-        exec (VESTA_CMD."v-add-web-domain-nginx ".$v_username." ".$v_domain." 'default' ".escapeshellarg($ext)." 'no'", $output, $return_var);
+        exec (VESTA_CMD."v-add-web-domain-proxy ".$v_username." ".$v_domain." ".escapeshellarg($v_proxy_template)." ".escapeshellarg($ext)." 'no'", $output, $return_var);
         if ($return_var != 0) {
         if ($return_var != 0) {
             $error = implode('<br>', $output);
             $error = implode('<br>', $output);
             if (empty($error)) $error = __('Error code:',$return_var);
             if (empty($error)) $error = __('Error code:',$return_var);
             $_SESSION['error_msg'] = $error;
             $_SESSION['error_msg'] = $error;
         }
         }
         unset($output);
         unset($output);
-        $v_nginx = 'default';
-        $restart_web = 'yes';
+        $restart_proxy = 'yes';
     }
     }
 
 
     // SSL
     // SSL

+ 5 - 4
web/inc/i18n/en.php

@@ -134,6 +134,9 @@ $LANG['en'] = array(
     'Databases'  => 'Databases',
     'Databases'  => 'Databases',
     'User Directories'  => 'User Directories',
     'User Directories'  => 'User Directories',
     'Template'  => 'Template',
     'Template'  => 'Template',
+    'Web Template'  => 'Apache Template',
+    'Proxy Template'  => 'Nginx Template',
+    'DNS Template'  => 'DNS Template',
     'Web Domains'  => 'Web Domains',
     'Web Domains'  => 'Web Domains',
     'SSL Domains'  => 'SSL Domains',
     'SSL Domains'  => 'SSL Domains',
     'Web Aliases'  => 'Web Aliases',
     'Web Aliases'  => 'Web Aliases',
@@ -151,8 +154,8 @@ $LANG['en'] = array(
     'template'  => 'template',
     'template'  => 'template',
     'SSL Support'  => 'SSL Support',
     'SSL Support'  => 'SSL Support',
     'SSL Home Directory'  => 'SSL Home',
     'SSL Home Directory'  => 'SSL Home',
-    'Nginx Support'  => 'Nginx Support',
-    'Nginx Extentions'  => 'Nginx Extentions',
+    'Proxy Support'  => 'Nginx Support',
+    'Proxy Extentions'  => 'Nginx Extentions',
     'Web Statistics'  => 'Web Statistics',
     'Web Statistics'  => 'Web Statistics',
     'Additional FTP Account'  => 'Additional FTP',
     'Additional FTP Account'  => 'Additional FTP',
     'SOA'  => 'SOA',
     'SOA'  => 'SOA',
@@ -231,8 +234,6 @@ $LANG['en'] = array(
     'Mail Support'  => 'Mail Support',
     'Mail Support'  => 'Mail Support',
     'Advanced options'  => 'Advanced options',
     'Advanced options'  => 'Advanced options',
     'Aliases'  => 'Aliases',
     'Aliases'  => 'Aliases',
-    'Apache template'  => 'Apache template',
-    'Nginx template'  => 'Nginx template',
     'SSL Certificate'  => 'SSL Certificate',
     'SSL Certificate'  => 'SSL Certificate',
     'SSL Key'  => 'SSL Key',
     'SSL Key'  => 'SSL Key',
     'SSL Certificate Authority / Intermediate'  => 'SSL Certificate Authority / Intermediate',
     'SSL Certificate Authority / Intermediate'  => 'SSL Certificate Authority / Intermediate',

+ 5 - 4
web/inc/i18n/es.php

@@ -133,6 +133,9 @@ $LANG['es'] = array(
     'Databases'  => 'Base de Datos',
     'Databases'  => 'Base de Datos',
     'User Directories'  => 'Directorios de Usuario',
     'User Directories'  => 'Directorios de Usuario',
     'Template'  => 'Plantilla',
     'Template'  => 'Plantilla',
+    'Web Template'  => 'Plantilla Apache',
+    'Proxy Template'  => 'Plantilla Nginx',
+    'DNS Template'  => 'Plantilla DNS',
     'Web Domains'  => 'Dominios Web',
     'Web Domains'  => 'Dominios Web',
     'SSL Domains'  => 'Dominios SSL',
     'SSL Domains'  => 'Dominios SSL',
     'Web Aliases'  => 'Alias Web',
     'Web Aliases'  => 'Alias Web',
@@ -150,8 +153,8 @@ $LANG['es'] = array(
     'template'  => 'plantilla',
     'template'  => 'plantilla',
     'SSL Support'  => 'Soporte SSL',
     'SSL Support'  => 'Soporte SSL',
     'SSL Home Directory'  => 'SSL Home',
     'SSL Home Directory'  => 'SSL Home',
-    'Nginx Support'  => 'Soporte Nginx',
-    'Nginx Extentions'  => 'Extensiones Nginx',
+    'Proxy Support'  => 'Soporte Nginx',
+    'Proxy Extentions'  => 'Extensiones Nginx',
     'Web Statistics'  => 'Estadísticas Web',
     'Web Statistics'  => 'Estadísticas Web',
     'Additional FTP Account'  => 'Cuenta Adicional FTP',
     'Additional FTP Account'  => 'Cuenta Adicional FTP',
     'SOA'  => 'SOA',
     'SOA'  => 'SOA',
@@ -230,8 +233,6 @@ $LANG['es'] = array(
     'Mail Support'  => 'Soporte para Correo',
     'Mail Support'  => 'Soporte para Correo',
     'Advanced options'  => 'Opciones Avanzadas',
     'Advanced options'  => 'Opciones Avanzadas',
     'Aliases'  => 'Aliases',
     'Aliases'  => 'Aliases',
-    'Apache template'  => 'Plantilla Apache',
-    'Nginx template'  => 'Plantilla Nginx',
     'SSL Certificate'  => 'Certificado SSL',
     'SSL Certificate'  => 'Certificado SSL',
     'SSL Key'  => 'Llave SSL',
     'SSL Key'  => 'Llave SSL',
     'SSL Certificate Authority / Intermediate'  => 'Certificado SSL Autoridad / Intermedio',
     'SSL Certificate Authority / Intermediate'  => 'Certificado SSL Autoridad / Intermedio',

+ 5 - 4
web/inc/i18n/ro.php

@@ -135,6 +135,9 @@ $LANG['ro'] = array(
     'Databases' => 'Baze de date',
     'Databases' => 'Baze de date',
     'User Directories' => 'Directoare utilizator',
     'User Directories' => 'Directoare utilizator',
     'Template' => 'Șablon',
     'Template' => 'Șablon',
+    'Web Template' => 'Șablonul Apache',
+    'Proxy Template' => 'Șablonul Nginx',
+    'DNS Template' => 'Șablonul DNS',
     'Web Domains' => 'Web domenii',
     'Web Domains' => 'Web domenii',
     'SSL Domains' => 'SSL domenii',
     'SSL Domains' => 'SSL domenii',
     'Web Aliases' => 'Web aliasuri',
     'Web Aliases' => 'Web aliasuri',
@@ -152,8 +155,8 @@ $LANG['ro'] = array(
     'template' => 'șablon',
     'template' => 'șablon',
     'SSL Support' => 'Support SSL',
     'SSL Support' => 'Support SSL',
     'SSL Home Directory' => 'Mapa SSL',
     'SSL Home Directory' => 'Mapa SSL',
-    'Nginx Support' => 'Support Nginx',
-    'Nginx Extentions' => 'Extensii Nginx',
+    'Proxy Support' => 'Support Nginx',
+    'Proxy Extentions' => 'Extensii Nginx',
     'Web Statistics' => 'Statistici web',
     'Web Statistics' => 'Statistici web',
     'Additional FTP Account' => 'Cont suplimentar FTP',
     'Additional FTP Account' => 'Cont suplimentar FTP',
     'SOA' => 'SOA',
     'SOA' => 'SOA',
@@ -232,8 +235,6 @@ $LANG['ro'] = array(
     'Mail Support' => 'Support E-mail',
     'Mail Support' => 'Support E-mail',
     'Advanced options' => 'Opțiuni avansate',
     'Advanced options' => 'Opțiuni avansate',
     'Aliases' => 'Aliasuri',
     'Aliases' => 'Aliasuri',
-    'Apache template' => 'Șablonul Apache',
-    'Nginx template' => 'Șablonul Nginx',
     'SSL Certificate' => 'Certificat SSL',
     'SSL Certificate' => 'Certificat SSL',
     'SSL Key' => 'Cheia SSL',
     'SSL Key' => 'Cheia SSL',
     'SSL Certificate Authority / Intermediate' => 'SSL Intermediar / Certificate Authority',
     'SSL Certificate Authority / Intermediate' => 'SSL Intermediar / Certificate Authority',

+ 5 - 4
web/inc/i18n/ru.php

@@ -135,6 +135,9 @@ $LANG['ru'] = array(
     'Databases' => 'Базы данных',
     'Databases' => 'Базы данных',
     'User Directories' => 'Папки пользователя',
     'User Directories' => 'Папки пользователя',
     'Template' => 'Шаблон',
     'Template' => 'Шаблон',
+    'Web Template' => 'Шаблон Apache',
+    'Proxy Template' => 'Шаблон Nginx',
+    'DNS Template'  => 'DNS Template',
     'Web Domains' => 'Веб домены',
     'Web Domains' => 'Веб домены',
     'SSL Domains' => 'SSL домены',
     'SSL Domains' => 'SSL домены',
     'Web Aliases' => 'Веб алиасы',
     'Web Aliases' => 'Веб алиасы',
@@ -152,8 +155,8 @@ $LANG['ru'] = array(
     'template' => 'шаблон',
     'template' => 'шаблон',
     'SSL Support' => 'Поддержка SSL',
     'SSL Support' => 'Поддержка SSL',
     'SSL Home Directory' => 'Директория SSL',
     'SSL Home Directory' => 'Директория SSL',
-    'Nginx Support' => 'Поддержка Nginx',
-    'Nginx Extentions' => 'Обработка Nginx',
+    'Proxy Support' => 'Поддержка Nginx',
+    'Proxy Extentions' => 'Обработка Nginx',
     'Web Statistics' => 'Статистика сайта',
     'Web Statistics' => 'Статистика сайта',
     'Additional FTP Account' => 'Дополнительный ftp',
     'Additional FTP Account' => 'Дополнительный ftp',
     'SOA' => 'SOA',
     'SOA' => 'SOA',
@@ -232,8 +235,6 @@ $LANG['ru'] = array(
     'Mail Support' => 'Поддержка почты',
     'Mail Support' => 'Поддержка почты',
     'Advanced options' => 'Дополнительные опции',
     'Advanced options' => 'Дополнительные опции',
     'Aliases' => 'Алиасы',
     'Aliases' => 'Алиасы',
-    'Apache template' => 'Шаблон Apache',
-    'Nginx template' => 'Шаблон для Nginx',
     'SSL Certificate' => 'SSL сертификат',
     'SSL Certificate' => 'SSL сертификат',
     'SSL Key' => 'Ключ SSL сертификата',
     'SSL Key' => 'Ключ SSL сертификата',
     'SSL Certificate Authority / Intermediate' => 'Центр сертификации SSL / Intermediate',
     'SSL Certificate Authority / Intermediate' => 'Центр сертификации SSL / Intermediate',

+ 5 - 4
web/inc/i18n/ua.php

@@ -135,6 +135,9 @@ $LANG['ua'] = array(
     'Databases' => 'Бази даних',
     'Databases' => 'Бази даних',
     'User Directories' => 'Теки Користувача',
     'User Directories' => 'Теки Користувача',
     'Template' => 'Шаблон',
     'Template' => 'Шаблон',
+    'Web Template' => 'Шаблон Apache',
+    'Proxy Template' => 'Шаблон Nginx',
+    'DNS Template' => 'Шаблон DNS',
     'Web Domains' => 'Веб домени',
     'Web Domains' => 'Веб домени',
     'SSL Domains' => 'SSL домени',
     'SSL Domains' => 'SSL домени',
     'Web Aliases' => 'Веб аліаси',
     'Web Aliases' => 'Веб аліаси',
@@ -152,8 +155,8 @@ $LANG['ua'] = array(
     'template' => 'шаблон',
     'template' => 'шаблон',
     'SSL Support' => 'Підтримка SSL',
     'SSL Support' => 'Підтримка SSL',
     'SSL Home Directory' => 'Тека SSL',
     'SSL Home Directory' => 'Тека SSL',
-    'Nginx Support' => 'Підтримка Nginx',
-    'Nginx Extentions' => 'Опрацювання Nginx',
+    'Proxy Support' => 'Підтримка Nginx',
+    'Proxy Extentions' => 'Опрацювання Nginx',
     'Web Statistics' => 'Статистика сайту',
     'Web Statistics' => 'Статистика сайту',
     'Additional FTP Account' => 'Додатковий ftp',
     'Additional FTP Account' => 'Додатковий ftp',
     'SOA' => 'SOA',
     'SOA' => 'SOA',
@@ -232,8 +235,6 @@ $LANG['ua'] = array(
     'Mail Support' => 'Підтримка пошти',
     'Mail Support' => 'Підтримка пошти',
     'Advanced options' => 'Додаткові опції',
     'Advanced options' => 'Додаткові опції',
     'Aliases' => 'Аліаси',
     'Aliases' => 'Аліаси',
-    'Apache template' => 'Шаблон Apache',
-    'Nginx template' => 'Шаблон Nginx',
     'SSL Certificate' => 'SSL сертификат',
     'SSL Certificate' => 'SSL сертификат',
     'SSL Key' => 'Ключ SSL сертифікату',
     'SSL Key' => 'Ключ SSL сертифікату',
     'SSL Certificate Authority / Intermediate' => 'Центр сертифікації SSL / Intermediate',
     'SSL Certificate Authority / Intermediate' => 'Центр сертифікації SSL / Intermediate',

+ 4 - 4
web/inc/main.php

@@ -150,17 +150,17 @@ function humanize_usage($usage) {
                 if ( $usage > 1000 ) {
                 if ( $usage > 1000 ) {
                     $usage = $usage / 1000 ;
                     $usage = $usage / 1000 ;
                     $usage = number_format($usage, 2);
                     $usage = number_format($usage, 2);
-                    $usage = $usage." ".__('pb');
+                    $usage = $usage."".__('pb');
                 } else {
                 } else {
                     $usage = number_format($usage, 2);
                     $usage = number_format($usage, 2);
-                    $usage = $usage." ".__('tb');
+                    $usage = $usage."".__('tb');
                 }
                 }
         } else {
         } else {
             $usage = number_format($usage, 2);
             $usage = number_format($usage, 2);
-            $usage = $usage." ".__('gb');
+            $usage = $usage."".__('gb');
         }
         }
     } else {
     } else {
-        $usage = $usage." ".__('mb');
+        $usage = $usage."".__('mb');
     }
     }
     return $usage;
     return $usage;
 }
 }

+ 3 - 3
web/templates/admin/add_db.html

@@ -67,7 +67,7 @@
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
-                                            <td class="vst-text" style="padding: 10 0 0 2px;">
+                                            <td class="vst-text" style="padding: 10px 0 0 2px;">
                                                 <?php print __('Database');?> 
                                                 <?php print __('Database');?> 
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
@@ -97,7 +97,7 @@
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
-                                            <td class="vst-text" style="padding: 10 0 0 2px;">
+                                            <td class="vst-text" style="padding: 10px 0 0 2px;">
                                                 <?php print __('Type');?> 
                                                 <?php print __('Type');?> 
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
@@ -115,7 +115,7 @@
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
-                                            <td class="vst-text" style="padding: 10 0 0 2px;">
+                                            <td class="vst-text" style="padding: 10px 0 0 2px;">
                                                 <?php print __('Charset');?> 
                                                 <?php print __('Charset');?> 
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>

+ 0 - 23
web/templates/admin/add_dns.html

@@ -81,29 +81,6 @@
                                         <tr>
                                         <tr>
                                             <td class="vst-text" style="padding: 10px 0 0 0px;">
                                             <td class="vst-text" style="padding: 10px 0 0 0px;">
                                                 <table style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
                                                 <table style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
-                                                    <tr>
-                                                        <td class="vst-text" style="padding: 10px 0 0 2px;">
-                                                            <?php print __('Template');?>
-                                                        </td>
-                                                    </tr>
-                                                    <tr>
-                                                        <td>
-                                                            <select class="vst-list" name="v_template">
-                                                                <?php
-                                                                    foreach ($templates as $key => $value) {
-                                                                        echo "\n\t\t\t\t\t\\t\t\t\t<option value=\"".$value."\"";
-                                                                        if ((!empty($v_template)) && ( $value == $_POST['v_template'])){
-                                                                            echo ' selected' ;
-                                                                        }
-                                                                        if ((empty($v_template)) && ( $value == $template)){
-                                                                            echo ' selected' ;
-                                                                        }
-                                                                        echo ">".$value."</option>\n";
-                                                                    }
-                                                                ?> 
-                                                            </select>
-                                                        </td>
-                                                    </tr>
                                                     <tr>
                                                     <tr>
                                                         <td class="vst-text" style="padding: 10px 0 0 2px;">
                                                         <td class="vst-text" style="padding: 10px 0 0 2px;">
                                                             <?php print __('Expiration Date');?> <span style="padding:0 0 0 6px; font-size: 10pt; color:#555;">(<?php print __('YYYY-MM-DD');?>)</span>
                                                             <?php print __('Expiration Date');?> <span style="padding:0 0 0 6px; font-size: 10pt; color:#555;">(<?php print __('YYYY-MM-DD');?>)</span>

+ 51 - 5
web/templates/admin/add_package.html

@@ -54,19 +54,65 @@
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
                                             <td class="vst-text" style="padding: 10px 0 0 2px;">
                                             <td class="vst-text" style="padding: 10px 0 0 2px;">
-                                                <?php print __('Default Template');?>
+                                                <?php print __('Web Template');?>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
                                             <td>
                                             <td>
-                                                <select class="vst-list" name="v_template">
+                                                <select class="vst-list" name="v_web_template">
                                                     <?php
                                                     <?php
-                                                        foreach ($templates as $key => $value) {
+                                                        foreach ($web_templates as $key => $value) {
                                                             echo "\t\t\t\t<option value=\"".$value."\"";
                                                             echo "\t\t\t\t<option value=\"".$value."\"";
-                                                            if ((!empty($v_template)) && ( $value == $v_template)){
+                                                            if ((!empty($v_web_template)) && ( $value == $v_web_template)){
                                                                 echo 'selected' ;
                                                                 echo 'selected' ;
                                                             }
                                                             }
-                                                            if ((!empty($v_template)) && ( $value == $_POST['v_template'])){
+                                                            if ((!empty($v_web_template)) && ( $value == $_POST['v_web_template'])){
+                                                                echo 'selected' ;
+                                                            }
+                                                            echo ">".$value."</option>\n";
+                                                        }
+                                                    ?> 
+                                                </select>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td class="vst-text" style="padding: 10px 0 0 2px;">
+                                                <?php print __('Proxy Template');?>
+                                            </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=\"".$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 ">".$value."</option>\n";
+                                                        }
+                                                    ?> 
+                                                </select>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td class="vst-text" style="padding: 10px 0 0 2px;">
+                                                <?php print __('DNS Template');?>
+                                            </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=\"".$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 'selected' ;
                                                             }
                                                             }
                                                             echo ">".$value."</option>\n";
                                                             echo ">".$value."</option>\n";

+ 6 - 29
web/templates/admin/add_web.html

@@ -143,7 +143,7 @@
                                 </table>
                                 </table>
                                 <table class="data-col2" width="600px" style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
                                 <table class="data-col2" width="600px" style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
                                     <tr>
                                     <tr>
-                                        <td class="vst-text" style="padding: 10 0 0 2px;">
+                                        <td class="vst-text" style="padding: 10px 0 0 2px;">
                                             <?php print __('Aliases');?>
                                             <?php print __('Aliases');?>
                                         </td>
                                         </td>
                                     </tr>
                                     </tr>
@@ -154,48 +154,25 @@
                                     </tr>
                                     </tr>
                                     <tr>
                                     <tr>
                                         <td class="vst-text" style="padding: 10px 0 0 2px;">
                                         <td class="vst-text" style="padding: 10px 0 0 2px;">
-                                            <?php print __('Apache template');?>
-                                        </td>
-                                    </tr>
-                                    <tr>
-                                        <td>
-                                            <select class="vst-list" name="v_template">
-                                                <?php
-                                                    foreach ($templates as $key => $value) {
-                                                        echo "\t\t\t\t<option value=\"".$value."\"";
-                                                        if ((!empty($v_template)) && ( $value == $_POST['v_template'])){
-                                                            echo ' selected' ;
-                                                        }
-                                                        if ((empty($v_template)) && ( $value == $template)){
-                                                            echo ' selected' ;
-                                                        }
-                                                        echo "> ".$value." </option>\n";
-                                                    }
-                                                ?>
-                                            </select>
-                                        </td>
-                                    </tr>
-                                    <tr>
-                                        <td class="vst-text" style="padding: 10px 0 0 2px;">
-                                            <?php print __('Nginx Support');?>
+                                            <?php print __('Proxy Support');?>
                                         </td>
                                         </td>
                                     </tr>
                                     </tr>
                                     <tr>
                                     <tr>
                                         <td>
                                         <td>
-                                            <input type="checkbox" size="20" class="vst-checkbox" name="v_nginx" <?php if ($v_nginx !== 'off') echo "checked=yes" ?> onclick="javascript:elementHideShow('nginxtable');">
+                                            <input type="checkbox" size="20" class="vst-checkbox" name="v_proxy" <?php if ($v_proxy !== 'off') echo "checked=yes" ?> onclick="javascript:elementHideShow('proxytable');">
                                         </td>
                                         </td>
                                     </tr>
                                     </tr>
                                     <tr>
                                     <tr>
                                         <td>
                                         <td>
-                                            <table style="display:<?php if ($v_nginx == 'off') { echo 'none';} else {echo 'block';}?>;" id="nginxtable" >
+                                            <table style="display:<?php if ($v_proxy == 'off') { echo 'none';} else {echo 'block';}?>;" id="proxytable" >
                                                 <tr>
                                                 <tr>
                                                     <td class="vst-text" style="padding: 9px 0 0 0;">
                                                     <td class="vst-text" style="padding: 9px 0 0 0;">
-                                                        <?php print __('Nginx Extentions');?>
+                                                        <?php print __('Proxy Extentions');?>
                                                     </td>
                                                     </td>
                                                 </tr>
                                                 </tr>
                                                 <tr>
                                                 <tr>
                                                     <td>
                                                     <td>
-                                                        <textarea size="20" class="vst-textinput" name="v_nginx_ext"><?php if (!empty($v_nginx_ext)) { echo $v_nginx_ext;} else { echo 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, mpeg, flv, html, htm'; }  ?></textarea>
+                                                        <textarea size="20" class="vst-textinput" name="v_proxy_ext"><?php if (!empty($v_proxy_ext)) { echo $v_proxy_ext;} else { echo 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, mpeg, flv, html, htm'; }  ?></textarea>
                                                     </td>
                                                     </td>
                                                 </tr>
                                                 </tr>
                                             </table>
                                             </table>

+ 2 - 2
web/templates/admin/edit_cron.html

@@ -34,8 +34,8 @@
                                     <table class="data-col1">
                                     <table class="data-col1">
                                         <tr>
                                         <tr>
                                             <td style="padding: 24px 0 2px 18px;">
                                             <td style="padding: 24px 0 2px 18px;">
-                                                <a class="data-date" ?><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
-                                                <a class="data-date" ?><?php echo $v_time?></a>
+                                                <a class="data-date"><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
+                                                <a class="data-date"><?php echo $v_time?></a>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>
                                         <tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>

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

@@ -54,8 +54,8 @@
                                     <table class="data-col1">
                                     <table class="data-col1">
                                         <tr>
                                         <tr>
                                             <td style="padding: 24px 0 2px 18px;">
                                             <td style="padding: 24px 0 2px 18px;">
-                                                <a class="data-date" ?><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
-                                                <a class="data-date" ?><?php echo $v_time?></a>
+                                                <a class="data-date"><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
+                                                <a class="data-date"><?php echo $v_time?></a>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>
                                         <tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>
@@ -99,7 +99,7 @@
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
-                                            <td class="vst-text" style="padding: 10 0 0 2px;">
+                                            <td class="vst-text" style="padding: 10px 0 0 2px;">
                                                 <?php print __('Type');?>
                                                 <?php print __('Type');?>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
@@ -109,7 +109,7 @@
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
-                                            <td class="vst-text" style="padding: 10 0 0 2px;">
+                                            <td class="vst-text" style="padding: 10px 0 0 2px;">
                                                 <?php print __('Host');?>
                                                 <?php print __('Host');?>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
@@ -119,7 +119,7 @@
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
-                                            <td class="vst-text" style="padding: 10 0 0 2px;">
+                                            <td class="vst-text" style="padding: 10px 0 0 2px;">
                                                 <?php print __('Charset');?>
                                                 <?php print __('Charset');?>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>

+ 2 - 2
web/templates/admin/edit_dns.html

@@ -33,8 +33,8 @@
                                     <table class="data-col1">
                                     <table class="data-col1">
                                         <tr>
                                         <tr>
                                             <td style="padding: 24px 0 2px 18px;">
                                             <td style="padding: 24px 0 2px 18px;">
-                                                <a class="data-date" ?><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
-                                                <a class="data-date" ?><?php echo $v_time?></a>
+                                                <a class="data-date"><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
+                                                <a class="data-date"><?php echo $v_time?></a>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>
                                         <tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>

+ 2 - 2
web/templates/admin/edit_dns_rec.html

@@ -33,8 +33,8 @@
                                     <table class="data-col1">
                                     <table class="data-col1">
                                         <tr>
                                         <tr>
                                             <td style="padding: 24px 0 2px 18px;">
                                             <td style="padding: 24px 0 2px 18px;">
-                                                <a class="data-date" ?><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
-                                                <a class="data-date" ?><?php echo $v_time?></a>
+                                                <a class="data-date"><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
+                                                <a class="data-date"><?php echo $v_time?></a>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>
                                         <tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>

+ 2 - 2
web/templates/admin/edit_ip.html

@@ -45,8 +45,8 @@
                                     <table class="data-col1">
                                     <table class="data-col1">
                                         <tr>
                                         <tr>
                                             <td style="padding: 24px 0 2px 18px;">
                                             <td style="padding: 24px 0 2px 18px;">
-                                                <a class="data-date" ?><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
-                                                <a class="data-date" ?><?php echo $v_time?></a>
+                                                <a class="data-date"><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
+                                                <a class="data-date"><?php echo $v_time?></a>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>
                                         <tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>

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

@@ -33,8 +33,8 @@
                                     <table class="data-col1">
                                     <table class="data-col1">
                                         <tr>
                                         <tr>
                                             <td style="padding: 24px 0 2px 18px;">
                                             <td style="padding: 24px 0 2px 18px;">
-                                                <a class="data-date" ?><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
-                                                <a class="data-date" ?><?php echo $v_time?></a>
+                                                <a class="data-date"><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
+                                                <a class="data-date"><?php echo $v_time?></a>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status); ?></b></td></tr>
                                         <tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status); ?></b></td></tr>

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

@@ -54,8 +54,8 @@
                                     <table class="data-col1">
                                     <table class="data-col1">
                                         <tr>
                                         <tr>
                                             <td style="padding: 24px 0 2px 18px;">
                                             <td style="padding: 24px 0 2px 18px;">
-                                                <a class="data-date" ?><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
-                                                <a class="data-date" ?><?php echo $v_time?></a>
+                                                <a class="data-date"><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
+                                                <a class="data-date"><?php echo $v_time?></a>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo $v_status ?></b></td></tr>
                                         <tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo $v_status ?></b></td></tr>

+ 58 - 11
web/templates/admin/edit_package.html

@@ -33,8 +33,8 @@
                                     <table class="data-col1">
                                     <table class="data-col1">
                                         <tr>
                                         <tr>
                                             <td style="padding: 24px 0 2px 18px;">
                                             <td style="padding: 24px 0 2px 18px;">
-                                                <a class="data-date" ?><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
-                                                <a class="data-date" ?><?php echo $v_time?></a>
+                                                <a class="data-date"><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
+                                                <a class="data-date"><?php echo $v_time?></a>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo $v_status ?></b></td></tr>
                                         <tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo $v_status ?></b></td></tr>
@@ -55,24 +55,71 @@
                                         <tr>
                                         <tr>
                                             <td>
                                             <td>
                                                 <input type="text" size="20" class="vst-input" name="v_package" <?php if (!empty($v_package)) echo "value=".$v_package; ?> disabled >
                                                 <input type="text" size="20" class="vst-input" name="v_package" <?php if (!empty($v_package)) echo "value=".$v_package; ?> disabled >
+                                                <input type="hidden" name="v_package" <?php if (!empty($v_package)) echo "value=".$v_package; ?>>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
                                             <td class="vst-text" style="padding: 10px 0 0 2px;">
                                             <td class="vst-text" style="padding: 10px 0 0 2px;">
-                                                <?php print __('Default Template');?>
+                                                <?php print __('Web Template');?>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
                                             <td>
                                             <td>
-                                                <select class="vst-list" name="v_template">
+                                                <select class="vst-list" name="v_web_template">
                                                     <?php
                                                     <?php
-                                                        foreach ($templates as $key => $value) {
+                                                        foreach ($web_templates as $key => $value) {
                                                             echo "\t\t\t\t<option value=\"".$value."\"";
                                                             echo "\t\t\t\t<option value=\"".$value."\"";
-                                                            if ((!empty($v_template)) && ( $value == $v_template)){
-                                                                echo 'selected' ;
+                                                            if ((!empty($v_web_template)) && ( $value == $v_web_template)){
+                                                                echo ' selected' ;
                                                             }
                                                             }
-                                                            if ((!empty($v_template)) && ( $value == $_POST['v_template'])){
-                                                                echo 'selected' ;
+                                                            if ((!empty($v_web_template)) && ( $value == $_POST['v_web_template'])){
+                                                                echo ' selected' ;
+                                                            }
+                                                            echo ">".$value."</option>\n";
+                                                        }
+                                                    ?> 
+                                                </select>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td class="vst-text" style="padding: 10px 0 0 2px;">
+                                                <?php print __('Proxy Template');?>
+                                            </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=\"".$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 ">".$value."</option>\n";
+                                                        }
+                                                    ?> 
+                                                </select>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td class="vst-text" style="padding: 10px 0 0 2px;">
+                                                <?php print __('DNS Template');?>
+                                            </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=\"".$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 ">".$value."</option>\n";
                                                             echo ">".$value."</option>\n";
                                                         }
                                                         }
@@ -92,10 +139,10 @@
                                                         foreach ($shells as $key => $value) {
                                                         foreach ($shells as $key => $value) {
                                                             echo "\t\t\t\t<option value=\"".$value."\"";
                                                             echo "\t\t\t\t<option value=\"".$value."\"";
                                                             if ((!empty($v_shell)) && ( $value == $v_shell)){
                                                             if ((!empty($v_shell)) && ( $value == $v_shell)){
-                                                                echo 'selected' ;
+                                                                echo ' selected' ;
                                                             }
                                                             }
                                                             if ((!empty($v_shell)) && ( $value == $_POST['v_shell'])){
                                                             if ((!empty($v_shell)) && ( $value == $_POST['v_shell'])){
-                                                                echo 'selected' ;
+                                                                echo ' selected' ;
                                                             }
                                                             }
                                                             echo ">".$value."</option>\n";
                                                             echo ">".$value."</option>\n";
                                                         }
                                                         }

+ 2 - 23
web/templates/admin/edit_user.html

@@ -45,8 +45,8 @@
                                     <table class="data-col1">
                                     <table class="data-col1">
                                         <tr>
                                         <tr>
                                             <td style="padding: 24px 0 2px 18px;">
                                             <td style="padding: 24px 0 2px 18px;">
-                                                <a class="data-date" ?><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
-                                                <a class="data-date" ?><?php echo $v_time?></a>
+                                                <a class="data-date"><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
+                                                <a class="data-date"><?php echo $v_time?></a>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status); ?></b></td></tr>
                                         <tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status); ?></b></td></tr>
@@ -155,27 +155,6 @@
                                                 <input type="text" size="20" class="vst-input" name="v_lname" <?php if (!empty($v_lname)) echo "value=".$v_lname; ?>>
                                                 <input type="text" size="20" class="vst-input" name="v_lname" <?php if (!empty($v_lname)) echo "value=".$v_lname; ?>>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
-                                        <tr>
-                                            <td class="vst-text" style="padding: 10px 0 0 2px;" >
-                                                <?php print __('Default Template');?>
-                                            </td>
-                                        </tr>
-                                        <tr>
-                                            <td>
-                                                <select class="vst-list" name="v_template">
-                                                    <?php
-                                                        foreach ($templates as $key => $value) {
-                                                            echo "\n\t\t\t\t\t\t\t\t\t\t<option value=\"".$value."\"";
-                                                            $svalue = "'".$value."'";
-                                                            if (( $value == $v_template ) || ($svalue == $v_template )){
-                                                                echo 'selected' ;
-                                                            }
-                                                            echo ">".$value."</option>\n";
-                                                        }
-                                                    ?> 
-                                                </select>
-                                            </td>
-                                        </tr>
                                         <tr>
                                         <tr>
                                             <td class="vst-text" style="padding: 10px 0 0 2px;" >
                                             <td class="vst-text" style="padding: 10px 0 0 2px;" >
                                                 <?php print __('SSH Access');?>
                                                 <?php print __('SSH Access');?>

+ 34 - 10
web/templates/admin/edit_web.html

@@ -65,8 +65,8 @@
                                     <table class="data-col1">
                                     <table class="data-col1">
                                         <tr>
                                         <tr>
                                             <td style="padding: 24px 0 2px 18px;">
                                             <td style="padding: 24px 0 2px 18px;">
-                                                <a class="data-date" ?><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
-                                                <a class="data-date" ?><?php echo $v_time?></a>
+                                                <a class="data-date"><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
+                                                <a class="data-date"><?php echo $v_time?></a>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>
                                         <tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>
@@ -113,7 +113,7 @@
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
-                                            <td class="vst-text" style="padding: 10 0 0 2px;">
+                                            <td class="vst-text" style="padding: 10px 0 0 2px;">
                                                 <?php print __('Aliases');?>
                                                 <?php print __('Aliases');?>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
@@ -124,7 +124,7 @@
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
                                             <td class="vst-text" style="padding: 10px 0 0 2px;">
                                             <td class="vst-text" style="padding: 10px 0 0 2px;">
-                                                <?php print __('Template');?>
+                                                <?php print __('Web Template');?>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
@@ -145,25 +145,49 @@
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
                                             <td class="vst-text" style="padding: 10px 0 0 2px;">
                                             <td class="vst-text" style="padding: 10px 0 0 2px;">
-                                                <?php print __('Nginx Support');?>
+                                                <?php print __('Proxy Support');?>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
                                             <td>
                                             <td>
-                                                <input type="checkbox" size="20" class="vst-checkbox" name="v_nginx" <?php if (!empty($v_nginx)) echo "checked=yes" ?> onclick="javascript:elementHideShow('nginxtable');">
+                                                <input type="checkbox" size="20" class="vst-checkbox" name="v_proxy" <?php if (!empty($v_proxy)) echo "checked=yes" ?> onclick="javascript:elementHideShow('proxytable');">
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
                                             <td>
                                             <td>
-                                                <table style="display:<?php if (empty($v_nginx)) { echo 'none';} else {echo 'block';}?> ;" id="nginxtable">
+                                                <table style="display:<?php if (empty($v_proxy)) { echo 'none';} else {echo 'block';}?> ;" id="proxytable">
                                                     <tr>
                                                     <tr>
-                                                        <td class="vst-text" style="padding: 9px 0 0 0;">
-                                                            <?php print __('Nginx Extensions');?>
+                                                        <td class="vst-text" style="padding: 9px 0 0 2px;">
+                                                            <?php print __('Proxy Template');?>
+                                                        </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=\"".$value."\"";
+                                                                        $svalue = "'".$value."'";
+                                                                        if ((!empty($v_proxy_template)) && ( $value == $v_proxy_template ) || ($svalue == $v_proxy_template)){
+                                                                            echo ' selected' ;
+                                                                        }
+                                                                        if ((empty($v_proxy_template)) && ($value == 'default')){
+                                                                            echo ' selected' ;
+                                                                        }
+                                                                        echo ">".$value."</option>\n";
+                                                                    }
+                                                                ?> 
+                                                            </select>
+                                                        </td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td class="vst-text" style="padding: 10px 0 0 0;">
+                                                            <?php print __('Proxy Extensions');?>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
                                                         <td>
                                                         <td>
-                                                            <textarea size="20" class="vst-textinput" name="v_nginx_ext"><?php if (!empty($v_nginx_ext)) { echo $v_nginx_ext;} else { echo 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, mpeg, flv, html, htm'; }  ?></textarea>
+                                                            <textarea size="20" class="vst-textinput" name="v_proxy_ext"><?php if (!empty($v_proxy_ext)) { echo $v_proxy_ext;} else { echo 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, mpeg, flv, html, htm'; }  ?></textarea>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                 </table>
                                                 </table>

+ 23 - 66
web/templates/admin/list_backup.html

@@ -64,12 +64,12 @@
                                     $cron = __('no');
                                     $cron = __('no');
                                     $udir = __('no');
                                     $udir = __('no');
 
 
-                                    if (!empty($data[$key]['WEB'])) $web = __('yes').' ¨';
-                                    if (!empty($data[$key]['DNS'])) $dns = __('yes').' ¨';
-                                    if (!empty($data[$key]['MAIL'])) $mail = __('yes').' ¨';
-                                    if (!empty($data[$key]['DB'])) $db = __('yes').' ¨';
-                                    if (!empty($data[$key]['CRON'])) $cron = __('yes').' ¨';
-                                    if (!empty($data[$key]['UDIR'])) $udir = __('yes').' ¨';
+                                    if (!empty($data[$key]['WEB'])) $web = __('yes');
+                                    if (!empty($data[$key]['DNS'])) $dns = __('yes');
+                                    if (!empty($data[$key]['MAIL'])) $mail = __('yes');
+                                    if (!empty($data[$key]['DB'])) $db = __('yes');
+                                    if (!empty($data[$key]['CRON'])) $cron = __('yes');
+                                    if (!empty($data[$key]['UDIR'])) $udir = __('yes');
 
 
                             ?> 
                             ?> 
 
 
@@ -114,18 +114,10 @@
                                             <td style="vertical-align:top;" >
                                             <td style="vertical-align:top;" >
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name" style="padding: 2px 0 0 0">
-                                                            <?php echo __($data[$key]['TYPE']) ?> 
-                                                        </td>
-                                                    </tr>
-                                                    <tr>
-                                                        <td class="chart1">
-                                                            <?php print __('Run Time');?>: <?php echo humanize_time($data[$key]['RUNTIME']) ?>
-                                                        </td>
-                                                    </tr>
-                                                    <tr>
-                                                        <td class="chart1">
-                                                            <?php print __('Backup Size');?>: <?php echo humanize_usage($data[$key]['SIZE']) ?>
+                                                        <td class="chart1" style="padding: 10px 0 0px 2px"><?php print __('Backup Size');?>: <?php echo humanize_usage($data[$key]['SIZE']) ?>
+                                                            <div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
+                                                                <div style="width:<?php echo get_percentage($data[$key]['SIZE'],$panel[$user]['DISK_QUOTA']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
+                                                            </div>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                 </table>
                                                 </table>
@@ -133,32 +125,20 @@
                                             <td style="vertical-align:top;" width="250">
                                             <td style="vertical-align:top;" width="250">
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name" width="48">
-                                                            <?php print __('WEB');?>:
+                                                        <td class="counter-name">
+                                                            <?php print __('Type');?>:
                                                         </td>
                                                         </td>
-                                                        <td>
-                                                            <a class="counter-value" title="<?php echo str_replace(',', ', ', $data[$key]['WEB']) ?>">
-                                                                <?php echo $web ?> 
-                                                            </a>
-                                                        </td>
-                                                    </tr>
-                                                    <tr>
-                                                        <td class="counter-name" width="48">
-                                                            <?php print __('DNS');?>:
-                                                        </td>
-                                                        <td>
-                                                            <a class="counter-value" title="<?php echo str_replace(',', ', ', $data[$key]['DNS']) ?>"> 
-                                                                <?php echo $dns ?> 
-                                                            </a>
+                                                        <td class="counter-value">
+                                                            <?php echo $data[$key]['TYPE'] ?> 
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name" width="48">
-                                                            <?php print __('MAIL');?>:
+                                                        <td class="counter-name">
+                                                            <?php print __('Consistent');?>:
                                                         </td>
                                                         </td>
-                                                        <td>
-                                                            <a class="counter-value" title="<?php echo str_replace(',', ', ', $data[$key]['MAIL']) ?>"> 
-                                                                <?php echo $mail ?> 
+                                                        <td class="counter-value">
+                                                            <a class="counter-value" title="<?php echo str_replace(',', ', ', $data[$key]['WEB']) ?>">
+                                                                <?php print __($web) ?> 
                                                             </a>
                                                             </a>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
@@ -167,36 +147,13 @@
                                             <td rowspan=4 style="vertical-align:top;" width="300">
                                             <td rowspan=4 style="vertical-align:top;" width="300">
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name" width="90">
-                                                            <?php print __('DB');?>:
-                                                        </td>
-                                                        <td>
-                                                            <a class="counter-value" title="<?php echo str_replace(',', ', ', $data[$key]['DB']) ?>">
-                                                                <?php echo $db ?> 
-                                                            </a>
+                                                        <td class="counter-name">
+                                                            <?php print __('Run Time');?>:
                                                         </td>
                                                         </td>
-                                                    </tr>
-                                                    <tr>
-                                                        <td class="counter-name" width="90">
-                                                            <?php print __('CRON');?>:
-                                                        </td>
-                                                        <td>
-                                                            <a class="counter-value" title="<?php echo $data[$key]['CRON'] ?>">
-                                                                <?php echo $cron ?> 
-                                                            </a>
+                                                        <td class="counter-value">
+                                                            <?php echo humanize_time($data[$key]['RUNTIME']) ?> 
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
-                                                    <tr>
-                                                        <td class="counter-name" width="90">
-                                                            <?php print __('USER DIRS');?>:
-                                                        </td>
-                                                        <td>
-                                                            <a class="counter-value" title="<?php echo str_replace(',', ', ', $data[$key]['UDIR']) ?>">
-                                                                <?php echo $udir ?> 
-                                                            </a>
-                                                        </td>
-                                                    </tr>
-
                                                 </table>
                                                 </table>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>

+ 12 - 9
web/templates/admin/list_db.html

@@ -100,20 +100,15 @@
                                             <td style="vertical-align:top;" >
                                             <td style="vertical-align:top;" >
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name" style="padding: 2px 0 4px 2px">
-                                                            [<?php echo $data[$key]['TYPE'] ?>] <?php print __('database');?>
-                                                        </td>
-                                                    </tr>
-                                                    <tr>
-                                                        <td class="chart1" style="padding: 0px 0 0px 2px"><?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?> 
-                                                            <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
-                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
+                                                        <td class="chart1" style="padding: 10px 0 0px 2px"><?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?> 
+                                                            <div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
+                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
                                                             </div>
                                                             </div>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                 </table>
                                                 </table>
                                             </td>
                                             </td>
-                                            <td style="vertical-align:top;" width="250">
+                                            <td style="vertical-align:top;" width="260">
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
                                                         <td class="counter-name">
                                                         <td class="counter-name">
@@ -143,6 +138,14 @@
                                                             <?php echo $data[$key]['CHARSET'] ?> 
                                                             <?php echo $data[$key]['CHARSET'] ?> 
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
+                                                    <tr>
+                                                        <td class="counter-name">
+                                                            <?php print __('Type');?>:
+                                                        </td>
+                                                        <td class="counter-value">
+                                                            <?php echo $data[$key]['TYPE'] ?> 
+                                                        </td>
+                                                    </tr>
                                                 </table>
                                                 </table>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>

+ 9 - 13
web/templates/admin/list_dns.html

@@ -103,34 +103,30 @@
                                                         <td class="counter-name" style="padding: 2px 0 0 2px;">
                                                         <td class="counter-name" style="padding: 2px 0 0 2px;">
                                                             <?php echo $data[$key]['IP'] ?> 
                                                             <?php echo $data[$key]['IP'] ?> 
                                                         </td>
                                                         </td>
-                                                    <tr>
-                                                        <td class="counter-name" style="padding: 0 0 20px 2px">
-                                                            [<?php echo $data[$key]['TPL'] ?>] <?php print __('template');?> 
-                                                        </td>
                                                     </tr>
                                                     </tr>
                                                 </table>
                                                 </table>
                                             </td>
                                             </td>
-                                            <td style="vertical-align:top;" width="250">
+                                            <td style="vertical-align:top;" width="270">
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name"><?php print __('SOA') ?>:</td>
-                                                        <td class="counter-value"><?php echo $data[$key]['SOA'] ?></td>
+                                                        <td class="counter-name"><?php print __('Template') ?>:</td>
+                                                        <td class="counter-value"><?php echo $data[$key]['TPL'] ?></td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name"><?php print __('TTL') ?>:</td>
-                                                        <td class="counter-value"><?php echo $data[$key]['TTL'] ?></td>
+                                                        <td class="counter-name"><?php print __('SOA') ?>:</td>
+                                                        <td class="counter-value"><?php echo $data[$key]['SOA'] ?></td>
                                                     </tr>
                                                     </tr>
                                                 </table>
                                                 </table>
                                             </td>
                                             </td>
                                             <td rowspan=4 style="vertical-align:top;" width="300">
                                             <td rowspan=4 style="vertical-align:top;" width="300">
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name"><?php print __('Expire');?>:</td>
-                                                        <td class="counter-value"><?php echo strftime("%d %b %Y", strtotime($data[$key]['EXP'])) ?></td>
+                                                        <td class="counter-name"><?php print __('TTL') ?>:</td>
+                                                        <td class="counter-value"><?php echo $data[$key]['TTL'] ?></td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name"><?php print __('Records');?>:</td>
-                                                        <td class="counter-value"><?php echo $data[$key]['RECORDS'] ?></td>
+                                                        <td class="counter-name"><?php print __('Expire');?>:</td>
+                                                        <td class="counter-value"><?php echo strftime("%d %b %Y", strtotime($data[$key]['EXP'])) ?></td>
                                                     </tr>
                                                     </tr>
                                                 </table>
                                                 </table>
                                             </td>
                                             </td>

+ 6 - 11
web/templates/admin/list_mail.html

@@ -109,21 +109,16 @@
                                             <td style="vertical-align:top;" >
                                             <td style="vertical-align:top;" >
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name" style="padding: 2px 0 2px 0">
-                                                            <?php print __('Catchall email');?> > <?php echo $data[$key]['CATCHALL'] ?> 
-                                                        </td>
-                                                    </tr>
-                                                    <tr>
-                                                        <td class="chart1">
+                                                        <td class="chart1" style="padding: 10px 0 2px 0">
                                                             <?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?> 
                                                             <?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?> 
-                                                            <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
-                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
+                                                            <div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
+                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
                                                             </div>
                                                             </div>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                 </table>
                                                 </table>
                                             </td>
                                             </td>
-                                            <td style="vertical-align:top;" width="250">
+                                            <td style="vertical-align:top;" width="260">
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
                                                         <td class="counter-name">
                                                         <td class="counter-name">
@@ -155,10 +150,10 @@
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
                                                         <td class="counter-name">
                                                         <td class="counter-name">
-                                                            <?php print __('Accounts');?>:
+                                                            <?php print __('Catchall email');?>:
                                                         </td>
                                                         </td>
                                                         <td class="counter-value">
                                                         <td class="counter-value">
-                                                            <?php echo $data[$key]['ACCOUNTS'] ?> 
+                                                            <?php echo $data[$key]['CATCHALL'] ?> 
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                 </table>
                                                 </table>

+ 3 - 3
web/templates/admin/list_mail_acc.html

@@ -97,10 +97,10 @@
                                                         <td class="counter-name" style="padding: 4px 0 0 0;">
                                                         <td class="counter-name" style="padding: 4px 0 0 0;">
                                                         </td>
                                                         </td>
                                                     <tr>
                                                     <tr>
-                                                        <td class="chart1" style="padding: 0 0 2px 0">
+                                                        <td class="chart1" style="padding: 2px 0 2px 0">
                                                             <?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?> 
                                                             <?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?> 
-                                                            <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
-                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
+                                                            <div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
+                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['QUOTA']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
                                                             </div>
                                                             </div>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>

+ 36 - 77
web/templates/admin/list_packages.html

@@ -69,34 +69,30 @@
                                             <td style="vertical-align:top;" >
                                             <td style="vertical-align:top;" >
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name" style="padding: 4px 0px 0px 0;" >
-                                                            <?php print __('Template');?>:
-                                                        </td>
-                                                        <td class="counter-value" style="padding: 4px 0 0 6px;">
-                                                            <?php echo $data[$key]['TEMPLATE'] ?> 
-                                                        </td>
+                                                        <td class="counter-name"><?php print __('Web Template');?>:</td>
+                                                        <td class="counter-value"><?php echo $data[$key]['WEB_TEMPLATE'] ?> </td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name" style="padding: 0px 0px 6px 0;">
-                                                            <?php print __('SSH Access');?>:
-                                                        </td>
-                                                        <td class="counter-value" width="58px">
-                                                            <?php echo $data[$key]['SHELL'] ?> 
-                                                        </td>
+                                                        <td class="counter-name"><?php print __('Proxy Template');?>:</td>
+                                                        <td class="counter-value"><?php echo $data[$key]['PROXY_TEMPLATE'] ?> </td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="chart1" colspan=2 style="padding: 0 0 0 2px;">
+                                                        <td class="counter-name"><?php print __('DNS Template');?>:</td>
+                                                        <td class="counter-value"><?php echo $data[$key]['DNS_TEMPLATE'] ?> </td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td class="chart1" colspan=2 style="padding: 8px 0 0 2px;">
                                                             <?php print __('Bandwidth');?>: <?php echo humanize_usage($data[$key]['BANDWIDTH']) ?> 
                                                             <?php print __('Bandwidth');?>: <?php echo humanize_usage($data[$key]['BANDWIDTH']) ?> 
-                                                            <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
-                                                                <div style="width:0%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
+                                                            <div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
+                                                                <div style="width:0%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
                                                             </div>
                                                             </div>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
                                                         <td class="chart1" colspan=2 style="padding: 0 0 0 2px;">
                                                         <td class="chart1" colspan=2 style="padding: 0 0 0 2px;">
                                                             <?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['DISK_QUOTA']) ?> 
                                                             <?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['DISK_QUOTA']) ?> 
-                                                            <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
-                                                                <div style="width:0%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
+                                                            <div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
+                                                                <div style="width:0%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
                                                             </div>
                                                             </div>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
@@ -105,88 +101,51 @@
                                             <td style="vertical-align:top;" width="300">
                                             <td style="vertical-align:top;" width="300">
                                                 <table width="300">
                                                 <table width="300">
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name" width="37%">
-                                                            <?php print __('Web Domains');?>:
-                                                        </td>
-                                                        <td class="counter-value">
-                                                            <?php echo $data[$key]['WEB_DOMAINS'] ?> 
-                                                        </td>
+                                                        <td class="counter-name" width="37%"><?php print __('Web Domains');?>:</td>
+                                                        <td class="counter-value"><?php echo $data[$key]['WEB_DOMAINS'] ?> </td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name">
-                                                            <?php print __('Web Aliases');?>:
-                                                        </td>
-                                                        <td class="counter-value">
-                                                            <?php echo $data[$key]['WEB_ALIASES'] ?> <?php print __('per domain');?> 
-                                                        </td>
+                                                        <td class="counter-name"><?php print __('Web Aliases');?>:</td>
+                                                        <td class="counter-value"><?php echo $data[$key]['WEB_ALIASES'] ?> <?php print __('per domain');?> </td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name">
-                                                            <?php print __('DNS domains');?>:
-                                                        </td>
-                                                        <td class="counter-value">
-                                                            <?php echo $data[$key]['DNS_DOMAINS'] ?> 
-                                                        </td>
+                                                        <td class="counter-name"><?php print __('DNS domains');?>:</td>
+                                                        <td class="counter-value"><?php echo $data[$key]['DNS_DOMAINS'] ?> </td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name">
-                                                            <?php print __('DNS records');?>:
-                                                        </td>
-                                                        <td class="counter-value">
-                                                            <?php echo $data[$key]['DNS_RECORDS'] ?> <?php print __('per domain');?> 
-                                                        </td>
+                                                        <td class="counter-name"><?php print __('DNS records');?>:</td>
+                                                        <td class="counter-value"><?php echo $data[$key]['DNS_RECORDS'] ?> <?php print __('per domain');?> </td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name">
-                                                            <?php print __('Name Servers');?>:
-                                                        </td>
-                                                        <td class="counter-value">
-                                                            <?php echo str_replace(',', ', ',$data[$key]['NS']) ?> 
-                                                        </td>
+                                                        <td class="counter-name"><?php print __('Name Servers');?>:</td>
+                                                        <td class="counter-value"><?php echo str_replace(',', ', ',$data[$key]['NS']) ?> </td>
                                                     </tr>
                                                     </tr>
                                                 </table>
                                                 </table>
                                             </td>
                                             </td>
                                             <td style="vertical-align:top;" width="280">
                                             <td style="vertical-align:top;" width="280">
                                                 <table class="data-col4" width="280">
                                                 <table class="data-col4" width="280">
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name" width="48%">
-                                                            <?php print __('Mail Domains');?>:
-                                                        </td>
-                                                        <td class="counter-value">
-                                                            <?php echo $data[$key]['MAIL_DOMAINS'] ?> 
-                                                        </td>
+                                                        <td class="counter-name" width="48%"><?php print __('Mail Domains');?>:</td>
+                                                        <td class="counter-value"><?php echo $data[$key]['MAIL_DOMAINS'] ?> </td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name">
-                                                            <?php print __('Mail Accounts');?>:
-                                                        </td>
-                                                        <td class="counter-value">
-                                                            <?php echo $data[$key]['MAIL_ACCOUNTS'] ?> <?php print __('per domain');?> 
-                                                        </td>
+                                                        <td class="counter-name"><?php print __('Mail Accounts');?>:</td>
+                                                        <td class="counter-value"><?php echo $data[$key]['MAIL_ACCOUNTS'] ?> <?php print __('per domain');?> </td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name">
-                                                            <?php print __('Databases');?>:
-                                                        </td>
-                                                        <td class="counter-value">
-                                                            <?php echo $data[$key]['DATABASES'] ?> 
-                                                        </td>
+                                                        <td class="counter-name"><?php print __('Databases');?>:</td>
+                                                        <td class="counter-value"><?php echo $data[$key]['DATABASES'] ?> </td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name">
-                                                            <?php print __('Cron Jobs');?>:
-                                                        </td>
-                                                        <td class="counter-value">
-                                                            <?php echo $data[$key]['CRON_JOBS'] ?> 
-                                                        </td>
+                                                        <td class="counter-name"><?php print __('Cron Jobs');?>:</td>
+                                                        <td class="counter-value"><?php echo $data[$key]['CRON_JOBS'] ?> </td>
+                                                    </tr>
+                                                        <td class="counter-name"><?php print __('SSH Access');?>:</td>
+                                                        <td class="counter-value"><?php echo $data[$key]['SHELL'] ?></td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name">
-                                                            <?php print __('Backups');?>:
-                                                        </td>
-                                                        <td class="counter-value">
-                                                            <?php echo $data[$key]['BACKUPS'] ?> 
-                                                        </td>
+                                                        <td class="counter-name"><?php print __('Backups');?>:</td>
+                                                        <td class="counter-value"><?php echo $data[$key]['BACKUPS'] ?></td>
                                                     </tr>
                                                     </tr>
                                                 </table>
                                                 </table>
                                             </td>
                                             </td>

+ 25 - 28
web/templates/admin/list_stats.html

@@ -1,10 +1,15 @@
                                 <table class="submenu">
                                 <table class="submenu">
                                     <tr>
                                     <tr>
                                         <td style="padding: 2px 0 0 6px">
                                         <td style="padding: 2px 0 0 6px">
-                                            <div class="submenu-button-block">
+                                            <div class="submenu-search-block">
+                                                <form action="/search/" method="get">
+                                                    <input type="text" name="q" class="submenu-search-field">
+                                                    <input type="submit" value="<?php print __('Search');?>" class="submenu-button" style="width: 96px;">
+                                                </form>
+                                            </div>
+                                            <div class="submenu-select-block" style="padding-left:8px;">
                                                 <form action="/list/stats/" method="get" id="objects">
                                                 <form action="/list/stats/" method="get" id="objects">
-                                                <a class="vst<?php if (empty($_GET['user'])) echo "-selected"; ?>" href='/list/stats/'><?php print __('Overall Statistics');?></a>
-                                                <div class="submenu-select-block">
+                                                <a class="vst<?php if (empty($_GET['user'])) echo "-selected"; ?>" style="padding: 0 12px 0 0;" href='/list/stats/'><?php print __('Overall Statistics');?></a> 
                                                 <select class="submenu-select-dropdown" name="user">
                                                 <select class="submenu-select-dropdown" name="user">
                                                     <option value=""><?php print __('show per user');?></option>
                                                     <option value=""><?php print __('show per user');?></option>
                                                 <?php
                                                 <?php
@@ -17,18 +22,9 @@
                                                     }
                                                     }
                                                 ?> 
                                                 ?> 
                                                 </select>
                                                 </select>
+                                                <input type="submit" name="ok" value="›" class="submenu-button" style="width: 36px;">
                                             </div>
                                             </div>
 
 
-                                                <input type="submit" name="list" value="›" class="button" style="width: 37px;font-size: 12px; height: 24px;">
-                                            </form>
-
-                                            </div>
-                                            <div class="submenu-search-block">
-                                                <form action="/search/" method="get">
-                                                    <input type="text" name="q" class="submenu-search-field">
-                                                    <input type="submit" value="<?php print __('Search');?>" class="submenu-button" style="width: 96px;">
-                                                </form>
-                                            </div>
                                         </td>
                                         </td>
                                     </tr>
                                     </tr>
                                 </table>
                                 </table>
@@ -62,23 +58,18 @@
                                             <td style="vertical-align:top;" >
                                             <td style="vertical-align:top;" >
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
-                                                        <td colspan=2 class="counter-name"  style="padding: 2px 0px 6px 2px;">
-                                                            [<?php echo $data[$key]['PACKAGE']?>] <?php print __('package');?>
-                                                        </td>
-                                                    </tr>
-                                                    <tr>
-                                                        <td class="chart1" colspan=2 style="padding: 0 0 0 2px;">
+                                                        <td class="chart1" colspan=2 style="padding: 4px 0 0 2px;">
                                                             <?php print __('Bandwidth');?>: <?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>% (<?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>)
                                                             <?php print __('Bandwidth');?>: <?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>% (<?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>)
-                                                            <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
-                                                                <div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
+                                                            <div style="width:160px; height:7px; font-size:0;background-color:#c7d5b3;">
+                                                                <div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>%; height:7px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
                                                             </div>
                                                             </div>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
                                                         <td class="chart1" colspan=2 style="padding: 0 0 0 2px;">
                                                         <td class="chart1" colspan=2 style="padding: 0 0 0 2px;">
                                                             <?php print __('Disk');?>: <?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>% (<?php echo humanize_usage($data[$key]['U_DISK']) ?>)
                                                             <?php print __('Disk');?>: <?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>% (<?php echo humanize_usage($data[$key]['U_DISK']) ?>)
-                                                            <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
-                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
+                                                            <div style="width:160px; height:7px; font-size:0;background-color:#c7d5b3;">
+                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>%; height:7px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
                                                             </div>
                                                             </div>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
@@ -87,12 +78,18 @@
                                                             <table class="chart2">
                                                             <table class="chart2">
                                                                 <tr>
                                                                 <tr>
                                                                     <td>
                                                                     <td>
-                                                                        <?php print __('Web');?>: <?php echo humanize_usage($data[$key]['U_DISK_WEB'])?><br>
-                                                                        <?php print __('Mail');?>: <?php echo humanize_usage($data[$key]['U_DISK_MAIL'])?><br>
+                                                                        <?php print __('Web');?>: <?php echo humanize_usage($data[$key]['U_DISK_WEB'])?>
+                                                                    </td>
+                                                                    <td style="padding: 0px 0px 0px 4px">
+                                                                        <?php print __('Databases');?>: <?php echo humanize_usage($data[$key]['U_DISK_DB'])?>
+                                                                    </td>
+                                                                </tr>
+                                                                <tr>
+                                                                    <td>
+                                                                        <?php print __('Mail');?>: <?php echo humanize_usage($data[$key]['U_DISK_MAIL'])?>
                                                                     </td>
                                                                     </td>
-                                                                    <td style="padding: 0px 10px 0px 8px">
-                                                                        <?php print __('Databases');?>: <?php echo humanize_usage($data[$key]['U_DISK_DB'])?><br>
-                                                                        <?php print __('User Directories');?>: <?php echo humanize_usage($data[$key]['U_DISK_DIRS'])?><br>
+                                                                    <td style="padding: 0px 0px 0px 4px">
+                                                                        <?php print __('User Directories');?>: <?php echo humanize_usage($data[$key]['U_DISK_DIRS'])?>
                                                                     </td>
                                                                     </td>
                                                                 </tr>
                                                                 </tr>
                                                             </table>
                                                             </table>

+ 21 - 18
web/templates/admin/list_user.html

@@ -138,35 +138,42 @@
                                             <td colspan=3 class="username" style="padding: 0 0 0 4px;"><b><?php echo $key ?></b><a class="fullname"><?php echo $data[$key]['FNAME']?> <?php echo $data[$key]['LNAME']?></a></td>
                                             <td colspan=3 class="username" style="padding: 0 0 0 4px;"><b><?php echo $key ?></b><a class="fullname"><?php echo $data[$key]['FNAME']?> <?php echo $data[$key]['LNAME']?></a></td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
-                                            <td style="vertical-align:top;"  width="240">
+                                            <td style="vertical-align:top;"  width="260">
                                                 <table>
                                                 <table>
                                                     <tr><td colspan=2 class="counter-name"  style="padding: 2px 0 0 2px;"><?php echo $data[$key]['CONTACT']?></td></tr>
                                                     <tr><td colspan=2 class="counter-name"  style="padding: 2px 0 0 2px;"><?php echo $data[$key]['CONTACT']?></td></tr>
-                                                    <tr><td colspan=2 class="counter-name"  style="padding: 0 0 18px 2px;">[<?php echo $data[$key]['PACKAGE']?>] <?php print __('package');?></td></tr>
+                                                    <tr><td colspan=2 class="counter-name"  style="padding: 0 0 8px 2px;">[<?php echo $data[$key]['PACKAGE']?>] <?php print __('package');?></td></tr>
                                                     <tr>
                                                     <tr>
                                                         <td class="chart1" colspan=2 style="padding: 0 0 0 3px;"><?php print __('Bandwidth');?>: <?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>% (<?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>)
                                                         <td class="chart1" colspan=2 style="padding: 0 0 0 3px;"><?php print __('Bandwidth');?>: <?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>% (<?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>)
-                                                            <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
-                                                                <div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
+                                                            <div style="width:160px; height:7px; font-size:0;background-color:#c7d5b3;">
+                                                                <div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>%; height:7px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
                                                             </div>
                                                             </div>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
                                                         <td class="chart1" colspan=2 style="padding: 0 0 0 3px;"><?php print __('Disk');?>: <?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>% (<?php echo humanize_usage($data[$key]['U_DISK']) ?>)
                                                         <td class="chart1" colspan=2 style="padding: 0 0 0 3px;"><?php print __('Disk');?>: <?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>% (<?php echo humanize_usage($data[$key]['U_DISK']) ?>)
-                                                            <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
-                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
+                                                            <div style="width:160px; height:7px; font-size:0;background-color:#c7d5b3;">
+                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>%; height:7px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
                                                             </div>
                                                             </div>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td colspan=2>
+                                                        <td colspan=2 style="padding: 2px 0 0 0;">
                                                             <table class="chart2">
                                                             <table class="chart2">
                                                                 <tr>
                                                                 <tr>
                                                                     <td>
                                                                     <td>
-                                                                        <?php print __('Web');?>: <?php echo humanize_usage($data[$key]['U_DISK_WEB'])?><br>
-                                                                        <?php print __('Mail');?>: <?php echo humanize_usage($data[$key]['U_DISK_MAIL'])?><br>
+                                                                        <?php print __('Web');?>: <?php echo humanize_usage($data[$key]['U_DISK_WEB'])?>
                                                                     </td>
                                                                     </td>
-                                                                    <td style="padding: 0px 10px 0px 8px">
-                                                                        <?php print __('Databases');?>: <?php echo humanize_usage($data[$key]['U_DISK_DB'])?><br>
-                                                                        <?php print __('User Directories');?>: <?php echo humanize_usage($data[$key]['U_DISK_DIRS'])?><br>
+                                                                    <td style="padding: 0px 0px 0px 4px">
+                                                                        <?php print __('Databases');?>: <?php echo humanize_usage($data[$key]['U_DISK_DB'])?>
+                                                                    </td>
+                                                                </tr>
+                                                                <tr>
+                                                                    <td>
+                                                                        <?php print __('Mail');?>: <?php echo humanize_usage($data[$key]['U_DISK_MAIL'])?>
+
+                                                                    </td>
+                                                                    <td style="padding: 0px 0px 0px 4px">
+                                                                        <?php print __('User Directories');?>: <?php echo humanize_usage($data[$key]['U_DISK_DIRS'])?>
                                                                     </td>
                                                                     </td>
                                                                 </tr>
                                                                 </tr>
                                                             </table>
                                                             </table>
@@ -174,12 +181,8 @@
                                                     </tr>
                                                     </tr>
                                                 </table>
                                                 </table>
                                             </td>
                                             </td>
-                                            <td style="vertical-align:top;" width="320">
-                                                <table width="300">
-                                                    <tr>
-                                                        <td class="counter-name" width="36%"><?php print __('Template');?>:</td>
-                                                        <td class="counter-value"><?php echo $data[$key]['TEMPLATE'] ?></td>
-                                                    </tr>
+                                            <td style="vertical-align:top;" width="300">
+                                                <table width="290">
                                                     <tr>
                                                     <tr>
                                                         <td class="counter-name"><?php print __('Web Domains');?>:</td>
                                                         <td class="counter-name"><?php print __('Web Domains');?>:</td>
                                                         <td class="counter-value"><?php echo $data[$key]['U_WEB_DOMAINS'] ?> / <?php echo $data[$key]['WEB_DOMAINS'] ?></td>
                                                         <td class="counter-value"><?php echo $data[$key]['U_WEB_DOMAINS'] ?> / <?php echo $data[$key]['WEB_DOMAINS'] ?></td>

+ 39 - 32
web/templates/admin/list_web.html

@@ -59,19 +59,19 @@
                                     if (!empty($data[$key]['FTP_USER'])) {
                                     if (!empty($data[$key]['FTP_USER'])) {
                                         $ftp_user=$data[$key]['FTP_USER'];
                                         $ftp_user=$data[$key]['FTP_USER'];
                                     }
                                     }
-                                    $nginx_support='no';
-                                    if (!empty($data[$key]['NGINX'])) {
-                                        $nginx_support='yes';
+                                    $proxy_support='no';
+                                    if (!empty($data[$key]['PROXY'])) {
+                                        $proxy_support='yes';
                                     }
                                     }
-                                    if (strlen($data[$key]['NGINX_EXT']) > 16 ) {
-                                        $nginx_ext_title = str_replace(',', ', ', $data[$key]['NGINX_EXT']);
-                                        $nginx_ext = substr($data[$key]['NGINX_EXT'], 0, 16);
-                                        $nginx_ext = trim($nginx_ext, ",");
-                                        $nginx_ext = str_replace(',', ', ', $nginx_ext);
-                                        $nginx_ext = $nginx_ext.", ...";
+                                    if (strlen($data[$key]['PROXY_EXT']) > 16 ) {
+                                        $proxy_ext_title = str_replace(',', ', ', $data[$key]['PROXY_EXT']);
+                                        $proxy_ext = substr($data[$key]['PROXY_EXT'], 0, 16);
+                                        $proxy_ext = trim($proxy_ext, ",");
+                                        $proxy_ext = str_replace(',', ', ', $proxy_ext);
+                                        $proxy_ext = $proxy_ext.", ...";
                                     } else {
                                     } else {
-                                        $nginx_ext_title = '';
-                                        $nginx_ext = str_replace(',', ', ', $data[$key]['NGINX_EXT']);
+                                        $proxy_ext_title = '';
+                                        $proxy_ext = str_replace(',', ', ', $data[$key]['PROXY_EXT']);
                                     }
                                     }
                                 ?> 
                                 ?> 
                             <tr class="data-row">
                             <tr class="data-row">
@@ -135,53 +135,60 @@
                                                             <?php echo $data[$key]['IP'] ?> 
                                                             <?php echo $data[$key]['IP'] ?> 
                                                         </td>
                                                         </td>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name" style="padding: 0 0 8px 2px">
-                                                            [<?php echo $data[$key]['TPL'] ?>] <?php print __('template');?> 
-                                                        </td>
-                                                    </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="chart1" style="padding: 0 0 0 2px">
+                                                        <td class="chart1" style="padding: 2px 0 0 2px">
                                                             <?php print __('Bandwidth');?>: <?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?> 
                                                             <?php print __('Bandwidth');?>: <?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?> 
-                                                            <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
-                                                                <div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$panel[$user]['BANDWIDTH']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
+                                                            <div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
+                                                                <div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$panel[$user]['BANDWIDTH']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
                                                             </div>
                                                             </div>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
                                                         <td class="chart1" style="padding: 0 0 0 2px"><?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?> 
                                                         <td class="chart1" style="padding: 0 0 0 2px"><?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?> 
-                                                            <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
-                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
+                                                            <div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
+                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
                                                         </div>
                                                         </div>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                 </table>
                                                 </table>
                                             </td>
                                             </td>
-                                            <td style="vertical-align:top;" width="300">
+                                            <td style="vertical-align:top;" width="260">
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name" width="110"><?php print __('SSL Support');?>:</td>
-                                                        <td class="counter-value"><?php print __($data[$key]['SSL']) ?></td>
+                                                        <td class="counter-name"><?php print __('Web Template');?>:</td>
+                                                        <td class="counter-value"><?php print __($data[$key]['TPL']) ?></td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name"><?php print __('SSL Home Directory');?>:</td>
-                                                        <td class="counter-value"><?php echo $ssl_home ?></td>
+                                                        <td class="counter-name"><?php print __('SSL Support');?>:</td>
+                                                        <td class="counter-value"><?php print $data[$key]['SSL'] ?></td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name"><?php print __('Nginx Support');?>:</td>
-                                                        <td class="counter-value"><?php print __($nginx_support) ?></td>
+                                                        <td class="counter-name"><?php print __('SSL Home Directory');?>:</td>
+                                                        <td class="counter-value"><?php print $ssl_home ?></td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name"><?php print __('Nginx Extentions');?>:</td>
-                                                        <td class="counter-value" <?php if (!empty($nginx_ext_title)) echo "title='".$nginx_ext_title."'" ?>><?php echo $nginx_ext ?></td>
+                                                        <td class="counter-name"><?php print __('Web Statistics');?>: </td>
+                                                        <td class="counter-value"> <?php print __($web_stats) ?></td>
                                                     </tr>
                                                     </tr>
+
                                                 </table>
                                                 </table>
                                             </td>
                                             </td>
-                                            <td rowspan=4 style="vertical-align:top;" width="240">
+                                            <td rowspan=4 style="vertical-align:top;" width="300">
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name"><?php print __('Web Statistics');?>: </td>
-                                                        <td class="counter-value"> <?php print __($web_stats) ?></td>
+                                                        <td class="counter-name"><?php print __('Proxy Support');?>:</td>
+                                                        <td class="counter-value"><?php print __($proxy_support);?></td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td class="counter-name"><?php print __('Proxy Template');?>:</td>
+                                                        <td class="counter-value"><?php echo $data[$key]['PROXY'];?></td>
                                                     </tr>
                                                     </tr>
+
+                                                    <tr>
+                                                        <td class="counter-name"><?php print __('Proxy Extentions');?>:</td>
+                                                        <td class="counter-value" <?php if (!empty($proxy_ext_title)) echo "title='".$proxy_ext_title."'" ?>><?php echo $proxy_ext ?></td>
+                                                    </tr>
+
                                                     <tr>
                                                     <tr>
                                                         <td class="counter-name"> <?php print __('Additional FTP Account');?>:</td>
                                                         <td class="counter-name"> <?php print __('Additional FTP Account');?>:</td>
                                                         <td class="counter-value"> <?php print __($ftp_user) ?></td>
                                                         <td class="counter-value"> <?php print __($ftp_user) ?></td>

+ 14 - 3
web/templates/header.html

@@ -86,6 +86,11 @@
                 color: #174f82;
                 color: #174f82;
             }
             }
 
 
+            .top-selected-link:active {
+                color: #fff;
+                background-color: #f79b44;
+            }
+
             .top-user {
             .top-user {
                 padding: 0 2px 0 0;
                 padding: 0 2px 0 0;
                 text-decoration: none;
                 text-decoration: none;
@@ -131,7 +136,7 @@
             }
             }
 
 
             .nav-lnk:active {
             .nav-lnk:active {
-                color: #ccc;
+                color: #f79b44;
             }
             }
 
 
             .nav-block {
             .nav-block {
@@ -165,6 +170,10 @@
                 border-bottom: 4px solid #f79b44;
                 border-bottom: 4px solid #f79b44;
             }
             }
 
 
+            .nav-selected-block:active {
+                color: #f79b44;
+            }
+
             .nav-header {
             .nav-header {
                 padding: 14px 0 0 6px;
                 padding: 14px 0 0 6px;
                 margin: 0;
                 margin: 0;
@@ -556,10 +565,12 @@
             }
             }
 
 
             .counter-name {
             .counter-name {
+                white-space: nowrap;
                 vertical-align:top;
                 vertical-align:top;
-                line-height: 1.2em;
+                line-height: 1.3em;
                 font-size: 10pt;
                 font-size: 10pt;
                 color: #505050;
                 color: #505050;
+                padding: 0 4px 0 0;
             }
             }
 
 
             .cron-counter-name {
             .cron-counter-name {
@@ -902,8 +913,8 @@
                     top: 2px;
                     top: 2px;
                 }
                 }
             </style>
             </style>
+            <link rel="stylesheet" type="text/css" href="/css/ie.css" />
         <![endif]-->
         <![endif]-->
-
         <link type="text/css" href="/css/jquery-custom-dialogs.css" rel="stylesheet" />
         <link type="text/css" href="/css/jquery-custom-dialogs.css" rel="stylesheet" />
         <script type="text/javascript" src="/js/events.js"></script>
         <script type="text/javascript" src="/js/events.js"></script>
         <script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
         <script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>

+ 6 - 6
web/templates/user/add_web.html

@@ -143,7 +143,7 @@
                                 </table>
                                 </table>
                                 <table class="data-col2" width="600px" style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
                                 <table class="data-col2" width="600px" style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
                                     <tr>
                                     <tr>
-                                        <td class="vst-text" style="padding: 10 0 0 2px;">
+                                        <td class="vst-text" style="padding: 10px 0 0 2px;">
                                             <?php print __('Aliases');?>
                                             <?php print __('Aliases');?>
                                         </td>
                                         </td>
                                     </tr>
                                     </tr>
@@ -154,25 +154,25 @@
                                     </tr>
                                     </tr>
                                     <tr>
                                     <tr>
                                         <td class="vst-text" style="padding: 10px 0 0 2px;">
                                         <td class="vst-text" style="padding: 10px 0 0 2px;">
-                                            <?php print __('Nginx Support');?>
+                                            <?php print __('Proxy Support');?>
                                         </td>
                                         </td>
                                     </tr>
                                     </tr>
                                     <tr>
                                     <tr>
                                         <td>
                                         <td>
-                                            <input type="checkbox" size="20" class="vst-checkbox" name="v_nginx" <?php if ($v_nginx !== 'off') echo "checked=yes" ?> onclick="javascript:elementHideShow('nginxtable');">
+                                            <input type="checkbox" size="20" class="vst-checkbox" name="v_proxy" <?php if ($v_proxy !== 'off') echo "checked=yes" ?> onclick="javascript:elementHideShow('proxytable');">
                                         </td>
                                         </td>
                                     </tr>
                                     </tr>
                                     <tr>
                                     <tr>
                                         <td>
                                         <td>
-                                            <table style="display:<?php if ($v_nginx == 'off') { echo 'none';} else {echo 'block';}?>;" id="nginxtable" >
+                                            <table style="display:<?php if ($v_proxy == 'off') { echo 'none';} else {echo 'block';}?>;" id="proxytable" >
                                                 <tr>
                                                 <tr>
                                                     <td class="vst-text" style="padding: 9px 0 0 0;">
                                                     <td class="vst-text" style="padding: 9px 0 0 0;">
-                                                        <?php print __('Nginx Extentions');?>
+                                                        <?php print __('Proxy Extentions');?>
                                                     </td>
                                                     </td>
                                                 </tr>
                                                 </tr>
                                                 <tr>
                                                 <tr>
                                                     <td>
                                                     <td>
-                                                        <textarea size="20" class="vst-textinput" name="v_nginx_ext"><?php if (!empty($v_nginx_ext)) { echo $v_nginx_ext;} else { echo 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, mpeg, flv, html, htm'; }  ?></textarea>
+                                                        <textarea size="20" class="vst-textinput" name="v_proxy_ext"><?php if (!empty($v_proxy_ext)) { echo $v_proxy_ext;} else { echo 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, mpeg, flv, html, htm'; }  ?></textarea>
                                                     </td>
                                                     </td>
                                                 </tr>
                                                 </tr>
                                             </table>
                                             </table>

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

@@ -113,7 +113,7 @@
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
-                                            <td class="vst-text" style="padding: 10 0 0 2px;">
+                                            <td class="vst-text" style="padding: 10px 0 0 2px;">
                                                 <?php print __('Aliases');?>
                                                 <?php print __('Aliases');?>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
@@ -124,25 +124,25 @@
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
                                             <td class="vst-text" style="padding: 10px 0 0 2px;">
                                             <td class="vst-text" style="padding: 10px 0 0 2px;">
-                                                <?php print __('Nginx Support');?>
+                                                <?php print __('Proxy Support');?>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
                                             <td>
                                             <td>
-                                                <input type="checkbox" size="20" class="vst-checkbox" name="v_nginx" <?php if (!empty($v_nginx)) echo "checked=yes" ?> onclick="javascript:elementHideShow('nginxtable');">
+                                                <input type="checkbox" size="20" class="vst-checkbox" name="v_proxy" <?php if (!empty($v_proxy)) echo "checked=yes" ?> onclick="javascript:elementHideShow('proxytable');">
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
                                             <td>
                                             <td>
-                                                <table style="display:<?php if (empty($v_nginx)) { echo 'none';} else {echo 'block';}?> ;" id="nginxtable">
+                                                <table style="display:<?php if (empty($v_proxy)) { echo 'none';} else {echo 'block';}?> ;" id="proxytable">
                                                     <tr>
                                                     <tr>
                                                         <td class="vst-text" style="padding: 9px 0 0 0;">
                                                         <td class="vst-text" style="padding: 9px 0 0 0;">
-                                                            <?php print __('Nginx Extensions');?>
+                                                            <?php print __('Proxy Extensions');?>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
                                                         <td>
                                                         <td>
-                                                            <textarea size="20" class="vst-textinput" name="v_nginx_ext"><?php if (!empty($v_nginx_ext)) { echo $v_nginx_ext;} else { echo 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, mpeg, flv, html, htm'; }  ?></textarea>
+                                                            <textarea size="20" class="vst-textinput" name="v_proxy_ext"><?php if (!empty($v_proxy_ext)) { echo $v_proxy_ext;} else { echo 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, mpeg, flv, html, htm'; }  ?></textarea>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                 </table>
                                                 </table>

+ 12 - 9
web/templates/user/list_db.html

@@ -86,20 +86,15 @@
                                             <td style="vertical-align:top;" >
                                             <td style="vertical-align:top;" >
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name" style="padding: 2px 0 4px 2px">
-                                                            [<?php echo $data[$key]['TYPE'] ?>] <?php print __('database');?>
-                                                        </td>
-                                                    </tr>
-                                                    <tr>
-                                                        <td class="chart1" style="padding: 0px 0 0px 2px"><?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?> 
-                                                            <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
-                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
+                                                        <td class="chart1" style="padding: 10px 0 0px 2px"><?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?> 
+                                                            <div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
+                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
                                                             </div>
                                                             </div>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                 </table>
                                                 </table>
                                             </td>
                                             </td>
-                                            <td style="vertical-align:top;" width="250">
+                                            <td style="vertical-align:top;" width="260">
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
                                                         <td class="counter-name">
                                                         <td class="counter-name">
@@ -129,6 +124,14 @@
                                                             <?php echo $data[$key]['CHARSET'] ?> 
                                                             <?php echo $data[$key]['CHARSET'] ?> 
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
+                                                    <tr>
+                                                        <td class="counter-name">
+                                                            <?php print __('Type');?>:
+                                                        </td>
+                                                        <td class="counter-value">
+                                                            <?php echo $data[$key]['TYPE'] ?> 
+                                                        </td>
+                                                    </tr>
                                                 </table>
                                                 </table>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>

+ 9 - 13
web/templates/user/list_dns.html

@@ -89,34 +89,30 @@
                                                         <td class="counter-name" style="padding: 2px 0 0 2px;">
                                                         <td class="counter-name" style="padding: 2px 0 0 2px;">
                                                             <?php echo $data[$key]['IP'] ?> 
                                                             <?php echo $data[$key]['IP'] ?> 
                                                         </td>
                                                         </td>
-                                                    <tr>
-                                                        <td class="counter-name" style="padding: 0 0 20px 2px">
-                                                            [<?php echo $data[$key]['TPL'] ?>] <?php print __('template');?> 
-                                                        </td>
                                                     </tr>
                                                     </tr>
                                                 </table>
                                                 </table>
                                             </td>
                                             </td>
-                                            <td style="vertical-align:top;" width="250">
+                                            <td style="vertical-align:top;" width="270">
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name"><?php print __('SOA') ?>:</td>
-                                                        <td class="counter-value"><?php echo $data[$key]['SOA'] ?></td>
+                                                        <td class="counter-name"><?php print __('Template');?>:</td>
+                                                        <td class="counter-value"><?php echo $data[$key]['TPL'] ?></td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name"><?php print __('TTL') ?>:</td>
-                                                        <td class="counter-value"><?php echo $data[$key]['TTL'] ?></td>
+                                                        <td class="counter-name"><?php print __('SOA') ?>:</td>
+                                                        <td class="counter-value"><?php echo $data[$key]['SOA'] ?></td>
                                                     </tr>
                                                     </tr>
                                                 </table>
                                                 </table>
                                             </td>
                                             </td>
                                             <td rowspan=4 style="vertical-align:top;" width="300">
                                             <td rowspan=4 style="vertical-align:top;" width="300">
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name"><?php print __('Expire');?>:</td>
-                                                        <td class="counter-value"><?php echo strftime("%d %b %Y", strtotime($data[$key]['EXP'])) ?></td>
+                                                        <td class="counter-name"><?php print __('TTL') ?>:</td>
+                                                        <td class="counter-value"><?php echo $data[$key]['TTL'] ?></td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name"><?php print __('Records');?>:</td>
-                                                        <td class="counter-value"><?php echo $data[$key]['RECORDS'] ?></td>
+                                                        <td class="counter-name"><?php print __('Expire');?>:</td>
+                                                        <td class="counter-value"><?php echo strftime("%d %b %Y", strtotime($data[$key]['EXP'])) ?></td>
                                                     </tr>
                                                     </tr>
                                                 </table>
                                                 </table>
                                             </td>
                                             </td>

+ 6 - 11
web/templates/user/list_mail.html

@@ -96,21 +96,16 @@
                                             <td style="vertical-align:top;" >
                                             <td style="vertical-align:top;" >
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name" style="padding: 2px 0 2px 0">
-                                                            <?php print __('Catchall email');?> > <?php echo $data[$key]['CATCHALL'] ?> 
-                                                        </td>
-                                                    </tr>
-                                                    <tr>
-                                                        <td class="chart1">
+                                                        <td class="chart1" style="padding: 10px 0 2px 0">
                                                             <?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?> 
                                                             <?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?> 
-                                                            <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
-                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
+                                                            <div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
+                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
                                                             </div>
                                                             </div>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                 </table>
                                                 </table>
                                             </td>
                                             </td>
-                                            <td style="vertical-align:top;" width="250">
+                                            <td style="vertical-align:top;" width="260">
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
                                                         <td class="counter-name">
                                                         <td class="counter-name">
@@ -142,10 +137,10 @@
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
                                                         <td class="counter-name">
                                                         <td class="counter-name">
-                                                            <?php print __('Accounts');?>:
+                                                            <?php print __('Catchall email');?>:
                                                         </td>
                                                         </td>
                                                         <td class="counter-value">
                                                         <td class="counter-value">
-                                                            <?php echo $data[$key]['ACCOUNTS'] ?> 
+                                                            <?php echo $data[$key]['CATCHALL'] ?> 
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                 </table>
                                                 </table>

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

@@ -85,10 +85,10 @@
                                                             <?php echo $data[$key]['IP'] ?> 
                                                             <?php echo $data[$key]['IP'] ?> 
                                                         </td>
                                                         </td>
                                                     <tr>
                                                     <tr>
-                                                        <td class="chart1" style="padding: 0 0 2px 0">
+                                                        <td class="chart1" style="padding: 2px 0 2px 0">
                                                             <?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?> 
                                                             <?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?> 
-                                                            <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
-                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
+                                                            <div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
+                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['QUOTA']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
                                                             </div>
                                                             </div>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>

+ 18 - 22
web/templates/user/list_stats.html

@@ -25,16 +25,11 @@
                             <tr class="data-row">
                             <tr class="data-row">
                                 <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150px">
                                 <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150px">
                                     <table class="data-col1" width="150">
                                     <table class="data-col1" width="150">
-                                        <tr><td style="padding: 24 0 4 0;"><a class="data-date"><?php echo strftime("%d %b %Y", strtotime($key))?></a></td></tr>
+                                        <tr><td style="padding: 24 0 4 0;"><a class="data-date" ><?php echo strftime("%d %b %Y", strtotime($key))?></a></td></tr>
                                     </table>
                                     </table>
                                 </td>
                                 </td>
                                 <td class="data-dotted" width="830px" style="vertical-align:top;">
                                 <td class="data-dotted" width="830px" style="vertical-align:top;">
-                                    <table width="830px">
-                                        <tr>
-                                            <td></td>
-                                        </tr>
-                                    </table>
-
+                                    <div style="height:20px; width:20px;"></div>
                                     <table class="data-col2" width="830px">
                                     <table class="data-col2" width="830px">
                                         <tr>
                                         <tr>
                                             <td colspan=3 class="username" style="padding: 10 0 0 4px;">
                                             <td colspan=3 class="username" style="padding: 10 0 0 4px;">
@@ -45,23 +40,18 @@
                                             <td style="vertical-align:top;" >
                                             <td style="vertical-align:top;" >
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
-                                                        <td colspan=2 class="counter-name"  style="padding: 2px 0px 6px 2px;">
-                                                            [<?php echo $data[$key]['PACKAGE']?>] <?php print __('package');?>
-                                                        </td>
-                                                    </tr>
-                                                    <tr>
-                                                        <td class="chart1" colspan=2 style="padding: 0 0 0 2px;">
+                                                        <td class="chart1" colspan=2 style="padding: 4px 0 0 2px;">
                                                             <?php print __('Bandwidth');?>: <?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>% (<?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>)
                                                             <?php print __('Bandwidth');?>: <?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>% (<?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>)
-                                                            <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
-                                                                <div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
+                                                            <div style="width:160px; height:7px; font-size:0;background-color:#c7d5b3;">
+                                                                <div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>%; height:7px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
                                                             </div>
                                                             </div>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
                                                         <td class="chart1" colspan=2 style="padding: 0 0 0 2px;">
                                                         <td class="chart1" colspan=2 style="padding: 0 0 0 2px;">
                                                             <?php print __('Disk');?>: <?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>% (<?php echo humanize_usage($data[$key]['U_DISK']) ?>)
                                                             <?php print __('Disk');?>: <?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>% (<?php echo humanize_usage($data[$key]['U_DISK']) ?>)
-                                                            <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
-                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
+                                                            <div style="width:160px; height:7px; font-size:0;background-color:#c7d5b3;">
+                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>%; height:7px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
                                                             </div>
                                                             </div>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
@@ -70,12 +60,18 @@
                                                             <table class="chart2">
                                                             <table class="chart2">
                                                                 <tr>
                                                                 <tr>
                                                                     <td>
                                                                     <td>
-                                                                        <?php print __('Web');?>: <?php echo humanize_usage($data[$key]['U_DISK_WEB'])?><br>
-                                                                        <?php print __('Mail');?>: <?php echo humanize_usage($data[$key]['U_DISK_MAIL'])?><br>
+                                                                        <?php print __('Web');?>: <?php echo humanize_usage($data[$key]['U_DISK_WEB'])?>
+                                                                    </td>
+                                                                    <td style="padding: 0px 0px 0px 4px">
+                                                                        <?php print __('Databases');?>: <?php echo humanize_usage($data[$key]['U_DISK_DB'])?>
+                                                                    </td>
+                                                                </tr>
+                                                                <tr>
+                                                                    <td>
+                                                                        <?php print __('Mail');?>: <?php echo humanize_usage($data[$key]['U_DISK_MAIL'])?>
                                                                     </td>
                                                                     </td>
-                                                                    <td style="padding: 0px 10px 0px 8px">
-                                                                        <?php print __('Databases');?>: <?php echo humanize_usage($data[$key]['U_DISK_DB'])?><br>
-                                                                        <?php print __('User Directories');?>: <?php echo humanize_usage($data[$key]['U_DISK_DIRS'])?><br>
+                                                                    <td style="padding: 0px 0px 0px 4px">
+                                                                        <?php print __('User Directories');?>: <?php echo humanize_usage($data[$key]['U_DISK_DIRS'])?>
                                                                     </td>
                                                                     </td>
                                                                 </tr>
                                                                 </tr>
                                                             </table>
                                                             </table>

+ 21 - 18
web/templates/user/list_user.html

@@ -60,35 +60,42 @@
                                             <td colspan=3 class="username" style="padding: 0 0 0 4px;"><b><?php echo $key ?></b><a class="fullname"><?php echo $data[$key]['FNAME']?> <?php echo $data[$key]['LNAME']?></a></td>
                                             <td colspan=3 class="username" style="padding: 0 0 0 4px;"><b><?php echo $key ?></b><a class="fullname"><?php echo $data[$key]['FNAME']?> <?php echo $data[$key]['LNAME']?></a></td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
-                                            <td style="vertical-align:top;"  width="240">
+                                            <td style="vertical-align:top;"  width="260">
                                                 <table>
                                                 <table>
                                                     <tr><td colspan=2 class="counter-name"  style="padding: 2px 0 0 2px;"><?php echo $data[$key]['CONTACT']?></td></tr>
                                                     <tr><td colspan=2 class="counter-name"  style="padding: 2px 0 0 2px;"><?php echo $data[$key]['CONTACT']?></td></tr>
-                                                    <tr><td colspan=2 class="counter-name"  style="padding: 0 0 18px 2px;">[<?php echo $data[$key]['PACKAGE']?>] <?php print __('package');?></td></tr>
+                                                    <tr><td colspan=2 class="counter-name"  style="padding: 0 0 8px 2px;">[<?php echo $data[$key]['PACKAGE']?>] <?php print __('package');?></td></tr>
                                                     <tr>
                                                     <tr>
                                                         <td class="chart1" colspan=2 style="padding: 0 0 0 3px;"><?php print __('Bandwidth');?>: <?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>% (<?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>)
                                                         <td class="chart1" colspan=2 style="padding: 0 0 0 3px;"><?php print __('Bandwidth');?>: <?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>% (<?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>)
-                                                            <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
-                                                                <div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
+                                                            <div style="width:160px; height:7px; font-size:0;background-color:#c7d5b3;">
+                                                                <div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>%; height:7px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
                                                             </div>
                                                             </div>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
                                                         <td class="chart1" colspan=2 style="padding: 0 0 0 3px;"><?php print __('Disk');?>: <?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>% (<?php echo humanize_usage($data[$key]['U_DISK']) ?>)
                                                         <td class="chart1" colspan=2 style="padding: 0 0 0 3px;"><?php print __('Disk');?>: <?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>% (<?php echo humanize_usage($data[$key]['U_DISK']) ?>)
-                                                            <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
-                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
+                                                            <div style="width:160px; height:7px; font-size:0;background-color:#c7d5b3;">
+                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>%; height:7px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
                                                             </div>
                                                             </div>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td colspan=2>
+                                                        <td colspan=2 style="padding: 2px 0 0 0;">
                                                             <table class="chart2">
                                                             <table class="chart2">
                                                                 <tr>
                                                                 <tr>
                                                                     <td>
                                                                     <td>
-                                                                        <?php print __('Web');?>: <?php echo humanize_usage($data[$key]['U_DISK_WEB'])?><br>
-                                                                        <?php print __('Mail');?>: <?php echo humanize_usage($data[$key]['U_DISK_MAIL'])?><br>
+                                                                        <?php print __('Web');?>: <?php echo humanize_usage($data[$key]['U_DISK_WEB'])?>
                                                                     </td>
                                                                     </td>
-                                                                    <td style="padding: 0px 10px 0px 8px">
-                                                                        <?php print __('Databases');?>: <?php echo humanize_usage($data[$key]['U_DISK_DB'])?><br>
-                                                                        <?php print __('User Directories');?>: <?php echo humanize_usage($data[$key]['U_DISK_DIRS'])?><br>
+                                                                    <td style="padding: 0px 0px 0px 4px">
+                                                                        <?php print __('Databases');?>: <?php echo humanize_usage($data[$key]['U_DISK_DB'])?>
+                                                                    </td>
+                                                                </tr>
+                                                                <tr>
+                                                                    <td>
+                                                                        <?php print __('Mail');?>: <?php echo humanize_usage($data[$key]['U_DISK_MAIL'])?>
+
+                                                                    </td>
+                                                                    <td style="padding: 0px 0px 0px 4px">
+                                                                        <?php print __('User Directories');?>: <?php echo humanize_usage($data[$key]['U_DISK_DIRS'])?>
                                                                     </td>
                                                                     </td>
                                                                 </tr>
                                                                 </tr>
                                                             </table>
                                                             </table>
@@ -96,12 +103,8 @@
                                                     </tr>
                                                     </tr>
                                                 </table>
                                                 </table>
                                             </td>
                                             </td>
-                                            <td style="vertical-align:top;" width="320">
-                                                <table width="300">
-                                                    <tr>
-                                                        <td class="counter-name" width="36%"><?php print __('Template');?>:</td>
-                                                        <td class="counter-value"><?php echo $data[$key]['TEMPLATE'] ?></td>
-                                                    </tr>
+                                            <td style="vertical-align:top;" width="300">
+                                                <table width="290">
                                                     <tr>
                                                     <tr>
                                                         <td class="counter-name"><?php print __('Web Domains');?>:</td>
                                                         <td class="counter-name"><?php print __('Web Domains');?>:</td>
                                                         <td class="counter-value"><?php echo $data[$key]['U_WEB_DOMAINS'] ?> / <?php echo $data[$key]['WEB_DOMAINS'] ?></td>
                                                         <td class="counter-value"><?php echo $data[$key]['U_WEB_DOMAINS'] ?> / <?php echo $data[$key]['WEB_DOMAINS'] ?></td>

+ 45 - 37
web/templates/user/list_web.html

@@ -34,9 +34,11 @@
                                     if ($data[$key]['SUSPENDED'] == 'yes') {
                                     if ($data[$key]['SUSPENDED'] == 'yes') {
                                         $status = 'suspended';
                                         $status = 'suspended';
                                         $spnd_action = 'unsuspend' ;
                                         $spnd_action = 'unsuspend' ;
+                                        $spnd_confirmation = 'UNSUSPEND_DOMAIN_CONFIRMATION' ;
                                     } else {
                                     } else {
                                         $status = 'active';
                                         $status = 'active';
                                         $spnd_action = 'suspend' ;
                                         $spnd_action = 'suspend' ;
+                                        $spnd_confirmation = 'SUSPEND_DOMAIN_CONFIRMATION' ;
                                     }
                                     }
                                     if (!empty($data[$key]['SSL_HOME'])) {
                                     if (!empty($data[$key]['SSL_HOME'])) {
                                         if ($data[$key]['SSL_HOME'] == 'same') {
                                         if ($data[$key]['SSL_HOME'] == 'same') {
@@ -55,22 +57,21 @@
                                     if (!empty($data[$key]['FTP_USER'])) {
                                     if (!empty($data[$key]['FTP_USER'])) {
                                         $ftp_user=$data[$key]['FTP_USER'];
                                         $ftp_user=$data[$key]['FTP_USER'];
                                     }
                                     }
-                                    $nginx_support='no';
-                                    if (!empty($data[$key]['NGINX'])) {
-                                        $nginx_support='yes';
+                                    $proxy_support='no';
+                                    if (!empty($data[$key]['PROXY'])) {
+                                        $proxy_support='yes';
                                     }
                                     }
-                                    if (strlen($data[$key]['NGINX_EXT']) > 16 ) {
-                                        $nginx_ext_title = str_replace(',', ', ', $data[$key]['NGINX_EXT']);
-                                        $nginx_ext = substr($data[$key]['NGINX_EXT'], 0, 16);
-                                        $nginx_ext = trim($nginx_ext, ",");
-                                        $nginx_ext = str_replace(',', ', ', $nginx_ext);
-                                        $nginx_ext = $nginx_ext.", ...";
+                                    if (strlen($data[$key]['PROXY_EXT']) > 16 ) {
+                                        $proxy_ext_title = str_replace(',', ', ', $data[$key]['PROXY_EXT']);
+                                        $proxy_ext = substr($data[$key]['PROXY_EXT'], 0, 16);
+                                        $proxy_ext = trim($proxy_ext, ",");
+                                        $proxy_ext = str_replace(',', ', ', $proxy_ext);
+                                        $proxy_ext = $proxy_ext.", ...";
                                     } else {
                                     } else {
-                                        $nginx_ext_title = '';
-                                        $nginx_ext = str_replace(',', ', ', $data[$key]['NGINX_EXT']);
+                                        $proxy_ext_title = '';
+                                        $proxy_ext = str_replace(',', ', ', $data[$key]['PROXY_EXT']);
                                     }
                                     }
-                                ?>
-
+                                ?> 
                             <tr class="data-row">
                             <tr class="data-row">
                                 <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
                                 <td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
                                     <table class="data-col1">
                                     <table class="data-col1">
@@ -83,7 +84,7 @@
                                     <a id="delete_link_<?php echo $i ?>" class="data-controls do_delete">
                                     <a id="delete_link_<?php echo $i ?>" class="data-controls do_delete">
                                         <span class="do_delete">
                                         <span class="do_delete">
                                             <img src="/images/delete.png" width="7px" height="7px">
                                             <img src="/images/delete.png" width="7px" height="7px">
-                                             <?php print __('delete');?>
+                                             <?php print __('delete');?> 
                                             <input type="hidden" name="delete_url" value="/delete/web/?domain=<?php echo $key ?>" />
                                             <input type="hidden" name="delete_url" value="/delete/web/?domain=<?php echo $key ?>" />
                                             <div id="delete_dialog_<?php echo $i ?>" class="confirmation-text-delete hidden" title="<?php print __('Confirmation');?>">
                                             <div id="delete_dialog_<?php echo $i ?>" class="confirmation-text-delete hidden" title="<?php print __('Confirmation');?>">
                                                 <p class="counter-value"><?php print __('DELETE_DOMAIN_CONFIRMATION',$key);?></p>
                                                 <p class="counter-value"><?php print __('DELETE_DOMAIN_CONFIRMATION',$key);?></p>
@@ -93,7 +94,7 @@
                                     <a href="/edit/web/?domain=<?php echo $key ?>" class="data-controls">
                                     <a href="/edit/web/?domain=<?php echo $key ?>" class="data-controls">
                                         <span>
                                         <span>
                                             <img src="/images/edit.png" width="8px" height="8px">
                                             <img src="/images/edit.png" width="8px" height="8px">
-                                            <?php print __('edit');?>
+                                            <?php print __('edit');?> 
                                         </span>
                                         </span>
                                     </a>
                                     </a>
                                     <?php
                                     <?php
@@ -102,7 +103,7 @@
                                     <a href="http://<?php echo $key ?>/vstats/"  target="_blank" class="data-controls">
                                     <a href="http://<?php echo $key ?>/vstats/"  target="_blank" class="data-controls">
                                         <span>
                                         <span>
                                             <img src="/images/new_window.png" width="8px" height="8px">
                                             <img src="/images/new_window.png" width="8px" height="8px">
-                                            <?php print __('open webstats');?>
+                                            <?php print __('open webstats');?> 
                                         </span>
                                         </span>
                                     </a>
                                     </a>
                                     <?php
                                     <?php
@@ -122,53 +123,60 @@
                                                             <?php echo $data[$key]['IP'] ?> 
                                                             <?php echo $data[$key]['IP'] ?> 
                                                         </td>
                                                         </td>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name" style="padding: 0 0 8px 2px">
-                                                            [<?php echo $data[$key]['TPL'] ?>] <?php print __('template');?> 
-                                                        </td>
-                                                </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="chart1" style="padding: 0 0 0 2px">
+                                                        <td class="chart1" style="padding: 2px 0 0 2px">
                                                             <?php print __('Bandwidth');?>: <?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?> 
                                                             <?php print __('Bandwidth');?>: <?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?> 
-                                                            <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
-                                                                <div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$panel[$user]['BANDWIDTH']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
+                                                            <div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
+                                                                <div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$panel[$user]['BANDWIDTH']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
                                                             </div>
                                                             </div>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
                                                         <td class="chart1" style="padding: 0 0 0 2px"><?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?> 
                                                         <td class="chart1" style="padding: 0 0 0 2px"><?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?> 
-                                                            <div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
-                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
+                                                            <div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
+                                                                <div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
                                                         </div>
                                                         </div>
                                                         </td>
                                                         </td>
                                                     </tr>
                                                     </tr>
                                                 </table>
                                                 </table>
                                             </td>
                                             </td>
-                                            <td style="vertical-align:top;" width="300">
+                                            <td style="vertical-align:top;" width="260">
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name" width="110"><?php print __('SSL Support');?>:</td>
-                                                        <td class="counter-value"><?php print __($data[$key]['SSL']) ?></td>
+                                                        <td class="counter-name"><?php print __('Web Template');?>:</td>
+                                                        <td class="counter-value"><?php print __($data[$key]['TPL']) ?></td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name"><?php print __('SSL Home Directory');?>:</td>
-                                                        <td class="counter-value"><?php echo $ssl_home ?></td>
+                                                        <td class="counter-name"><?php print __('SSL Support');?>:</td>
+                                                        <td class="counter-value"><?php print $data[$key]['SSL'] ?></td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name"><?php print __('Nginx Support');?>:</td>
-                                                        <td class="counter-value"><?php print __($nginx_support) ?></td>
+                                                        <td class="counter-name"><?php print __('SSL Home Directory');?>:</td>
+                                                        <td class="counter-value"><?php print $ssl_home ?></td>
                                                     </tr>
                                                     </tr>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name"><?php print __('Nginx Extentions');?>:</td>
-                                                        <td class="counter-value" <?php if (!empty($nginx_ext_title)) echo "title='".$nginx_ext_title."'" ?>><?php echo $nginx_ext ?></td>
+                                                        <td class="counter-name"><?php print __('Web Statistics');?>: </td>
+                                                        <td class="counter-value"> <?php print __($web_stats) ?></td>
                                                     </tr>
                                                     </tr>
+
                                                 </table>
                                                 </table>
                                             </td>
                                             </td>
-                                            <td rowspan=4 style="vertical-align:top;" width="240">
+                                            <td rowspan=4 style="vertical-align:top;" width="300">
                                                 <table>
                                                 <table>
                                                     <tr>
                                                     <tr>
-                                                        <td class="counter-name"><?php print __('Web Statistics');?>: </td>
-                                                        <td class="counter-value"> <?php print __($web_stats) ?></td>
+                                                        <td class="counter-name"><?php print __('Proxy Support');?>:</td>
+                                                        <td class="counter-value"><?php print __($proxy_support);?></td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td class="counter-name"><?php print __('Proxy Template');?>:</td>
+                                                        <td class="counter-value"><?php echo $data[$key]['PROXY'];?></td>
                                                     </tr>
                                                     </tr>
+
+                                                    <tr>
+                                                        <td class="counter-name"><?php print __('Proxy Extentions');?>:</td>
+                                                        <td class="counter-value" <?php if (!empty($proxy_ext_title)) echo "title='".$proxy_ext_title."'" ?>><?php echo $proxy_ext ?></td>
+                                                    </tr>
+
                                                     <tr>
                                                     <tr>
                                                         <td class="counter-name"> <?php print __('Additional FTP Account');?>:</td>
                                                         <td class="counter-name"> <?php print __('Additional FTP Account');?>:</td>
                                                         <td class="counter-value"> <?php print __($ftp_user) ?></td>
                                                         <td class="counter-value"> <?php print __($ftp_user) ?></td>