Marius Cramer
2014-01-24 b50d36a340f2cb3a54f7fa29699ec5d0f064f31c
 Merge branch 'master' into 'master'

Merge of domains, vhost subdomains and vhost aliasdomains to vhost domains
12 files copied
133 files deleted
68 files renamed
1 files modified
3 files added
12701 ■■■■■ changed files
interface/lib/plugins/sites_web_domain_plugin.inc.php 94 ●●●●● patch | view | raw | blame | history
interface/lib/plugins/sites_web_vhost_aliasdomain_plugin.inc.php 68 ●●●●● patch | view | raw | blame | history
interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php 243 ●●●●● patch | view | raw | blame | history
interface/lib/plugins/sites_web_vhost_subdomain_plugin.inc.php 68 ●●●●● patch | view | raw | blame | history
interface/web/sites/form/web_vhost_aliasdomain.tform.php 735 ●●●●● patch | view | raw | blame | history
interface/web/sites/form/web_vhost_domain.tform.php 120 ●●●● patch | view | raw | blame | history
interface/web/sites/form/web_vhost_subdomain.tform.php 735 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ar_web_domain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ar_web_vhost_aliasdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ar_web_vhost_domain.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ar_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/ar_web_vhost_domain_list.lng 3 ●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ar_web_vhost_subdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ar_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/bg_web_vhost_aliasdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/bg_web_vhost_aliasdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/bg_web_vhost_domain.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/bg_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/bg_web_vhost_domain_list.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/bg_web_vhost_subdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/bg_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/br_web_vhost_aliasdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/br_web_vhost_aliasdomain_list.lng 9 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/br_web_vhost_domain.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/br_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/br_web_vhost_domain_list.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/br_web_vhost_subdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/br_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/cz_web_vhost_aliasdomain.lng 119 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/cz_web_vhost_aliasdomain_list.lng 9 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/cz_web_vhost_domain.lng 7 ●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/cz_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/cz_web_vhost_domain_list.lng 3 ●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/cz_web_vhost_subdomain.lng 119 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/cz_web_vhost_subdomain_list.lng 9 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/de_web_vhost_aliasdomain.lng 125 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/de_web_vhost_aliasdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/de_web_vhost_domain.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/de_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/de_web_vhost_domain_list.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/de_web_vhost_subdomain.lng 126 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/de_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/el_web_vhost_aliasdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/el_web_vhost_aliasdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/el_web_vhost_domain.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/el_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/el_web_vhost_domain_list.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/el_web_vhost_subdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/el_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/en_web_domain.lng 130 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/en_web_domain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/en_web_vhost_aliasdomain.lng 127 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/en_web_vhost_aliasdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/en_web_vhost_domain.lng 40 ●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/en_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/en_web_vhost_domain_list.lng 3 ●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/en_web_vhost_subdomain.lng 127 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/en_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/es_web_vhost_aliasdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/es_web_vhost_aliasdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/es_web_vhost_domain.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/es_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/es_web_vhost_domain_list.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/es_web_vhost_subdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/es_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/fi_web_domain_admin_list.lng 9 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/fi_web_vhost_aliasdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/fi_web_vhost_aliasdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/fi_web_vhost_domain.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/fi_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/fi_web_vhost_domain_list.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/fi_web_vhost_subdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/fi_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/fr_web_vhost_aliasdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/fr_web_vhost_aliasdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/fr_web_vhost_domain.lng 8 ●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/fr_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/fr_web_vhost_domain_list.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/fr_web_vhost_subdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/fr_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/hr_web_vhost_aliasdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/hr_web_vhost_aliasdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/hr_web_vhost_domain.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/hr_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/hr_web_vhost_domain_list.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/hr_web_vhost_subdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/hr_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/hu_web_vhost_aliasdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/hu_web_vhost_aliasdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/hu_web_vhost_domain.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/hu_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/hu_web_vhost_domain_list.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/hu_web_vhost_subdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/hu_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/id_web_vhost_aliasdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/id_web_vhost_aliasdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/id_web_vhost_domain.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/id_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/id_web_vhost_domain_list.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/id_web_vhost_subdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/id_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/it_web_domain_admin_list.lng 9 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/it_web_vhost_aliasdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/it_web_vhost_aliasdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/it_web_vhost_domain.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/it_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/it_web_vhost_domain_list.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/it_web_vhost_subdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/it_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ja_web_domain_admin_list.lng 9 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ja_web_vhost_aliasdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ja_web_vhost_aliasdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ja_web_vhost_domain.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ja_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/ja_web_vhost_domain_list.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ja_web_vhost_subdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ja_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/nl_web_vhost_aliasdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/nl_web_vhost_aliasdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/nl_web_vhost_domain.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/nl_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/nl_web_vhost_domain_list.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/nl_web_vhost_subdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/nl_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/pl_web_vhost_aliasdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/pl_web_vhost_aliasdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/pl_web_vhost_domain.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/pl_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/pl_web_vhost_domain_list.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/pl_web_vhost_subdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/pl_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/pt_web_domain_admin_list.lng 9 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/pt_web_vhost_aliasdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/pt_web_vhost_aliasdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/pt_web_vhost_domain.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/pt_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/pt_web_vhost_domain_list.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/pt_web_vhost_subdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/pt_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ro_web_domain_admin_list.lng 9 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ro_web_vhost_aliasdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ro_web_vhost_aliasdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ro_web_vhost_domain.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ro_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/ro_web_vhost_domain_list.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ro_web_vhost_subdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ro_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ru_web_domain_admin_list.lng 9 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ru_web_vhost_aliasdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ru_web_vhost_aliasdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ru_web_vhost_domain.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ru_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/ru_web_vhost_domain_list.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ru_web_vhost_subdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/ru_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/se_web_domain_admin_list.lng 9 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/se_web_domain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/se_web_vhost_aliasdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/se_web_vhost_aliasdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/se_web_vhost_domain.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/se_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/se_web_vhost_domain_list.lng 3 ●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/se_web_vhost_subdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/se_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/sk_web_domain_admin_list.lng 9 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/sk_web_vhost_aliasdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/sk_web_vhost_aliasdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/sk_web_vhost_domain.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/sk_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/sk_web_vhost_domain_list.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/sk_web_vhost_subdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/sk_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/tr_web_domain_admin_list.lng 9 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/tr_web_vhost_aliasdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/tr_web_vhost_aliasdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/tr_web_vhost_domain.lng 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/tr_web_vhost_domain_admin_list.lng patch | view | raw | blame | history
interface/web/sites/lib/lang/tr_web_vhost_domain_list.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/tr_web_vhost_subdomain.lng 118 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/tr_web_vhost_subdomain_list.lng 8 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/module.conf.php 6 ●●●● patch | view | raw | blame | history
interface/web/sites/list/web_vhost_aliasdomain.list.php 105 ●●●●● patch | view | raw | blame | history
interface/web/sites/list/web_vhost_domain.list.php 60 ●●●● patch | view | raw | blame | history
interface/web/sites/list/web_vhost_subdomain.list.php 105 ●●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_domain_admin_list.htm 66 ●●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_aliasdomain_advanced.htm 157 ●●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_aliasdomain_backup.htm 36 ●●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_aliasdomain_edit.htm 227 ●●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_aliasdomain_list.htm 79 ●●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_aliasdomain_redirect.htm 84 ●●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_aliasdomain_ssl.htm 68 ●●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_aliasdomain_stats.htm 37 ●●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_domain_admin_list.htm 69 ●●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_domain_advanced.htm 4 ●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_domain_backup.htm 4 ●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_domain_edit.htm 75 ●●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_domain_list.htm 23 ●●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_domain_redirect.htm 4 ●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_domain_ssl.htm 4 ●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_domain_stats.htm 4 ●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_subdomain_advanced.htm 157 ●●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_subdomain_backup.htm 36 ●●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_subdomain_edit.htm 234 ●●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_subdomain_list.htm 79 ●●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_subdomain_redirect.htm 84 ●●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_subdomain_ssl.htm 68 ●●●●● patch | view | raw | blame | history
interface/web/sites/templates/web_vhost_subdomain_stats.htm 37 ●●●●● patch | view | raw | blame | history
interface/web/sites/web_domain_del.php 125 ●●●●● patch | view | raw | blame | history
interface/web/sites/web_vhost_aliasdomain_del.php 73 ●●●●● patch | view | raw | blame | history
interface/web/sites/web_vhost_aliasdomain_edit.php 658 ●●●●● patch | view | raw | blame | history
interface/web/sites/web_vhost_aliasdomain_list.php 55 ●●●●● patch | view | raw | blame | history
interface/web/sites/web_vhost_domain_del.php 142 ●●●●● patch | view | raw | blame | history
interface/web/sites/web_vhost_domain_edit.php 665 ●●●● patch | view | raw | blame | history
interface/web/sites/web_vhost_domain_list.php 28 ●●●●● patch | view | raw | blame | history
interface/web/sites/web_vhost_subdomain_del.php 73 ●●●●● patch | view | raw | blame | history
interface/web/sites/web_vhost_subdomain_edit.php 676 ●●●●● patch | view | raw | blame | history
interface/web/sites/web_vhost_subdomain_list.php 55 ●●●●● patch | view | raw | blame | history
interface/lib/plugins/sites_web_domain_plugin.inc.php
File was deleted
interface/lib/plugins/sites_web_vhost_aliasdomain_plugin.inc.php
File was deleted
interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php
New file
@@ -0,0 +1,243 @@
<?php
/**
 * sites_web_vhost_domain_plugin plugin
 *
 * @author Julio Montoya <gugli100@gmail.com> BeezNest 2010
 */
class sites_web_vhost_domain_plugin {
    var $plugin_name        = 'sites_web_vhost_domain_plugin';
    var $class_name         = 'sites_web_vhost_domain_plugin';
    // TODO: This function is a duplicate from the one in interface/web/sites/web_domain_edit.php
    //       There should be a single "token replacement" function to be called from modules and
    //  from the main code.
    // Returna a "3/2/1" path hash from a numeric id '123'
    function id_hash($id, $levels) {
        $hash = "" . $id % 10 ;
        $id /= 10 ;
        $levels -- ;
        while ( $levels > 0 ) {
            $hash .= "/" . $id % 10 ;
            $id /= 10 ;
            $levels-- ;
        }
        return $hash;
    }
    /*
            This function is called when the plugin is loaded
    */
    function onLoad() {
        global $app;
        //Register for the events
        $app->plugin->registerEvent('sites:web_vhost_domain:on_after_insert', 'sites_web_vhost_domain_plugin', 'sites_web_vhost_domain_edit');
        $app->plugin->registerEvent('sites:web_vhost_domain:on_after_update', 'sites_web_vhost_domain_plugin', 'sites_web_vhost_domain_edit');
    }
    /*
        Function to create the sites_web_domain rule and insert it into the custom rules
    */
    function sites_web_vhost_domain_edit($event_name, $page_form) {
        global $app, $conf;
        $vhostdomain_type = 'domain';
        if($page_form->dataRecord['type'] == 'vhostalias') $vhostdomain_type = 'aliasdomain';
        elseif($page_form->dataRecord['type'] == 'vhostsubdomain') $vhostdomain_type = 'subdomain';
        // make sure that the record belongs to the clinet group and not the admin group when a dmin inserts it
        // also make sure that the user can not delete domain created by a admin
        if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($page_form->dataRecord["client_group_id"])) {
            $client_group_id = $app->functions->intval($page_form->dataRecord["client_group_id"]);
            $app->db->query("UPDATE web_domain SET sys_groupid = $client_group_id, sys_perm_group = 'ru' WHERE domain_id = ".$page_form->id);
        }
        if($app->auth->has_clients($_SESSION['s']['user']['userid']) && isset($page_form->dataRecord["client_group_id"])) {
            $client_group_id = $app->functions->intval($page_form->dataRecord["client_group_id"]);
            $app->db->query("UPDATE web_domain SET sys_groupid = $client_group_id, sys_perm_group = 'riud' WHERE domain_id = ".$page_form->id);
        }
        // Get configuration for the web system
        $app->uses("getconf");
        $web_config = $app->getconf->get_server_config($app->functions->intval($page_form->dataRecord['server_id']), 'web');
        if(isset($app->tform) && is_object($app->tform)) $web_rec = $app->tform->getDataRecord($page_form->id);
        else $web_rec = $app->remoting_lib->getDataRecord($page_form->id);
        if($vhostdomain_type == 'domain') {
            $document_root = str_replace("[website_id]", $page_form->id, $web_config["website_path"]);
            $document_root = str_replace("[website_idhash_1]", $this->id_hash($page_form->id, 1), $document_root);
            $document_root = str_replace("[website_idhash_2]", $this->id_hash($page_form->id, 1), $document_root);
            $document_root = str_replace("[website_idhash_3]", $this->id_hash($page_form->id, 1), $document_root);
            $document_root = str_replace("[website_idhash_4]", $this->id_hash($page_form->id, 1), $document_root);
            // get the ID of the client
            if($_SESSION["s"]["user"]["typ"] != 'admin' && !$app->auth->has_clients($_SESSION['s']['user']['userid'])) {
                $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
                $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = $client_group_id");
                $client_id = $app->functions->intval($client["client_id"]);
            } elseif (isset($page_form->dataRecord["client_group_id"])) {
                $client_group_id = $page_form->dataRecord["client_group_id"];
                $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ".$app->functions->intval(@$page_form->dataRecord["client_group_id"]));
                $client_id = $app->functions->intval($client["client_id"]);
            } else {
                $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ".$app->functions->intval($page_form->dataRecord["client_group_id"]));
                $client_id = $app->functions->intval($client["client_id"]);
            }
            // Set the values for document_root, system_user and system_group
            $system_user     = $app->db->quote('web'.$page_form->id);
            $system_group     = $app->db->quote('client'.$client_id);
            $document_root     = str_replace("[client_id]", $client_id, $document_root);
            $document_root    = str_replace("[client_idhash_1]", $this->id_hash($client_id, 1), $document_root);
            $document_root    = str_replace("[client_idhash_2]", $this->id_hash($client_id, 2), $document_root);
            $document_root    = str_replace("[client_idhash_3]", $this->id_hash($client_id, 3), $document_root);
            $document_root    = str_replace("[client_idhash_4]", $this->id_hash($client_id, 4), $document_root);
            $document_root     = $app->db->quote($document_root);
            if($event_name == 'sites:web_vhost_domain:on_after_update') {
                if(($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) &&  isset($page_form->dataRecord["client_group_id"]) && $page_form->dataRecord["client_group_id"] != $page_form->oldDataRecord["sys_groupid"]) {
                    $sql = "UPDATE web_domain SET system_user = '$system_user', system_group = '$system_group', document_root = '$document_root' WHERE domain_id = ".$page_form->id;
                    $app->db->query($sql);
                    // Update the FTP user(s) too
                    $records = $app->db->queryAllRecords("SELECT ftp_user_id FROM ftp_user WHERE parent_domain_id = ".$page_form->id);
                    foreach($records as $rec) {
                        $app->db->datalogUpdate('ftp_user', "sys_userid = '".$app->functions->intval($web_rec['sys_userid'])."', sys_groupid = '".$app->functions->intval($web_rec['sys_groupid'])."', uid = '$system_user', gid = '$system_group', dir = '$document_root'", 'ftp_user_id', $app->functions->intval($rec['ftp_user_id']));
                    }
                    unset($records);
                    unset($rec);
                    // Update the Shell user(s) too
                    $records = $app->db->queryAllRecords("SELECT shell_user_id FROM shell_user WHERE parent_domain_id = ".$page_form->id);
                    foreach($records as $rec) {
                        $app->db->datalogUpdate('shell_user', "sys_userid = '".$web_rec['sys_userid']."', sys_groupid = '".$web_rec['sys_groupid']."', puser = '$system_user', pgroup = '$system_group', dir = '$document_root'", 'shell_user_id', $app->functions->intval($rec['shell_user_id']));
                    }
                    unset($records);
                    unset($rec);
                    //* Update all subdomains and alias domains
                    $records = $app->db->queryAllRecords("SELECT domain_id, `domain`, `type`, `web_folder` FROM web_domain WHERE parent_domain_id = ".$page_form->id);
                    foreach($records as $rec) {
                        $update_columns = "sys_userid = '".$web_rec['sys_userid']."', sys_groupid = '".$web_rec['sys_groupid']."'";
                        if($rec['type'] == 'vhostsubdomain' || $rec['type'] == 'vhostalias') {
                            $php_open_basedir = str_replace("[website_path]/web", $document_root.'/'.$rec['web_folder'], $web_config["php_open_basedir"]);
                            $php_open_basedir = str_replace("[website_domain]/web", $rec['domain'].'/'.$rec['web_folder'], $php_open_basedir);
                            $php_open_basedir = str_replace("[website_path]", $document_root, $php_open_basedir);
                            $php_open_basedir = $app->db->quote(str_replace("[website_domain]", $rec['domain'], $php_open_basedir));
                            $update_columns .= ", document_root = '".$document_root."', `php_open_basedir` = '".$php_open_basedir."'";
                        }
                        $app->db->datalogUpdate('web_domain', $update_columns, 'domain_id', $rec['domain_id']);
                    }
                    unset($records);
                    unset($rec);
                    //* Update all databases
                    $records = $app->db->queryAllRecords("SELECT database_id FROM web_database WHERE parent_domain_id = ".$page_form->id);
                    foreach($records as $rec) {
                        $app->db->datalogUpdate('web_database', "sys_userid = '".$app->functions->intval($web_rec['sys_userid'])."', sys_groupid = '".$app->functions->intval($web_rec['sys_groupid'])."'", 'database_id', $app->functions->intval($rec['database_id']));
                    }
                    unset($records);
                    unset($rec);
                }
                //* If the domain name has been changed, we will have to change all subdomains + APS instances
                if(!empty($page_form->dataRecord["domain"]) && !empty($page_form->oldDataRecord["domain"]) && $page_form->dataRecord["domain"] != $page_form->oldDataRecord["domain"]) {
                    $records = $app->db->queryAllRecords("SELECT domain_id,domain FROM web_domain WHERE (type = 'subdomain' OR type = 'vhostsubdomain' OR type = 'vhostalias') AND domain LIKE '%.".$app->db->quote($page_form->oldDataRecord["domain"])."'");
                    foreach($records as $rec) {
                        $subdomain = $app->db->quote(str_replace($page_form->oldDataRecord["domain"], $page_form->dataRecord["domain"], $rec['domain']));
                        $app->db->datalogUpdate('web_domain', "domain = '".$subdomain."'", 'domain_id', $rec['domain_id']);
                    }
                    unset($records);
                    unset($rec);
                    unset($subdomain);
                    // Update APS instances
                    $records = $app->db->queryAllRecords("SELECT id, instance_id FROM aps_instances_settings WHERE name = 'main_domain' AND value = '".$app->db->quote($page_form->oldDataRecord["domain"])."'");
                    if(is_array($records) && !empty($records)){
                        foreach($records as $rec){
                            $app->db->datalogUpdate('aps_instances_settings', "value = '".$app->db->quote($page_form->dataRecord["domain"])."'", 'id', $rec['id']);
                            // Reinstall of package needed?
                            //$app->db->datalogUpdate('aps_instances', "instance_status = '1'", 'id', $rec['instance_id']);
                        }
                    }
                    unset($records);
                    unset($rec);
                }
                //* Set allow_override if empty
                if($web_rec['allow_override'] == '') {
                    $sql = "UPDATE web_domain SET allow_override = '".$app->db->quote($web_config["htaccess_allow_override"])."' WHERE domain_id = ".$page_form->id;
                    $app->db->query($sql);
                }
                //* Set php_open_basedir if empty or domain or client has been changed
                if(empty($web_rec['php_open_basedir']) ||
                    (!empty($page_form->dataRecord["domain"]) && !empty($page_form->oldDataRecord["domain"]) && $page_form->dataRecord["domain"] != $page_form->oldDataRecord["domain"])) {
                    $php_open_basedir = $web_rec['php_open_basedir'];
                    $php_open_basedir = $app->db->quote(str_replace($page_form->oldDataRecord['domain'], $web_rec['domain'], $php_open_basedir));
                    $sql = "UPDATE web_domain SET php_open_basedir = '$php_open_basedir' WHERE domain_id = ".$page_form->id;
                    $app->db->query($sql);
                }
                if(empty($web_rec['php_open_basedir']) ||
                    (isset($page_form->dataRecord["client_group_id"]) && $page_form->dataRecord["client_group_id"] != $page_form->oldDataRecord["sys_groupid"])) {
                    $document_root = $app->db->quote(str_replace("[client_id]", $client_id, $document_root));
                    $php_open_basedir = str_replace("[website_path]", $document_root, $web_config["php_open_basedir"]);
                    $php_open_basedir = $app->db->quote(str_replace("[website_domain]", $web_rec['domain'], $php_open_basedir));
                    $sql = "UPDATE web_domain SET php_open_basedir = '$php_open_basedir' WHERE domain_id = ".$page_form->id;
                    $app->db->query($sql);
                }
                //* Change database backup options when web backup options have been changed
                if(isset($page_form->dataRecord['backup_interval']) && ($page_form->dataRecord['backup_interval'] != $page_form->oldDataRecord['backup_interval'] || $page_form->dataRecord['backup_copies'] != $page_form->oldDataRecord['backup_copies'])) {
                    //* Update all databases
                    $backup_interval = $app->functions->intval($page_form->dataRecord['backup_interval']);
                    $backup_copies = $app->functions->intval($page_form->dataRecord['backup_copies']);
                    $records = $app->db->queryAllRecords("SELECT database_id FROM web_database WHERE parent_domain_id = ".$page_form->id);
                    foreach($records as $rec) {
                        $app->db->datalogUpdate('web_database', "backup_interval = '$backup_interval', backup_copies = '$backup_copies'", 'database_id', $rec['database_id']);
                    }
                    unset($records);
                    unset($rec);
                    unset($backup_copies);
                    unset($backup_interval);
                }
                //* Change vhost subdomain and alias ip/ipv6 if domain ip/ipv6 has changed
                if(isset($page_form->dataRecord['ip_address']) && ($page_form->dataRecord['ip_address'] != $page_form->oldDataRecord['ip_address'] || $page_form->dataRecord['ipv6_address'] != $page_form->oldDataRecord['ipv6_address'])) {
                    $records = $app->db->queryAllRecords("SELECT domain_id FROM web_domain WHERE (type = 'vhostsubdomain' OR type = 'vhostalias') AND parent_domain_id = ".$page_form->id);
                    foreach($records as $rec) {
                        $app->db->datalogUpdate('web_domain', "ip_address = '".$app->db->quote($web_rec['ip_address'])."', ipv6_address = '".$app->db->quote($web_rec['ipv6_address'])."'", 'domain_id', $rec['domain_id']);
                    }
                    unset($records);
                    unset($rec);
                }
            } else {
                $php_open_basedir    = str_replace("[website_path]", $document_root, $web_config["php_open_basedir"]);
                $php_open_basedir    = $app->db->quote(str_replace("[website_domain]", $page_form->dataRecord['domain'], $php_open_basedir));
                $htaccess_allow_override  = $app->db->quote($web_config["htaccess_allow_override"]);
                $sql = "UPDATE web_domain SET system_user = '$system_user', system_group = '$system_group', document_root = '$document_root', allow_override = '$htaccess_allow_override', php_open_basedir = '$php_open_basedir'  WHERE domain_id = ".$page_form->id;
                $app->db->query($sql);
            }
        } else {
            $parent_domain = $app->db->queryOneRecord("SELECT * FROM `web_domain` WHERE `domain_id` = '" . $app->functions->intval($page_form->dataRecord['parent_domain_id']) . "'");
            // Set the values for document_root, system_user and system_group
            $system_user = $app->db->quote($parent_domain['system_user']);
            $system_group = $app->db->quote($parent_domain['system_group']);
            $document_root = $app->db->quote($parent_domain['document_root']);
            $php_open_basedir = str_replace("[website_path]/web", $document_root.'/'.$page_form->dataRecord['web_folder'], $web_config["php_open_basedir"]);
            $php_open_basedir = str_replace("[website_domain]/web", $page_form->dataRecord['domain'].'/'.$page_form->dataRecord['web_folder'], $php_open_basedir);
            $php_open_basedir = str_replace("[website_path]", $document_root, $php_open_basedir);
            $php_open_basedir = $app->db->quote(str_replace("[website_domain]", $page_form->dataRecord['domain'], $php_open_basedir));
            $htaccess_allow_override = $app->db->quote($parent_domain['allow_override']);
            $sql = "UPDATE web_domain SET sys_groupid = ".$app->functions->intval($parent_domain['sys_groupid']).",system_user = '$system_user', system_group = '$system_group', document_root = '$document_root', allow_override = '$htaccess_allow_override', php_open_basedir = '$php_open_basedir'  WHERE domain_id = ".$page_form->id;
            $app->db->query($sql);
        }
    }
}
interface/lib/plugins/sites_web_vhost_subdomain_plugin.inc.php
File was deleted
interface/web/sites/form/web_vhost_aliasdomain.tform.php
File was deleted
interface/web/sites/form/web_vhost_domain.tform.php
File was renamed from interface/web/sites/form/web_domain.tform.php
@@ -38,15 +38,31 @@
*/
$form["title"]    = "Web Domain";
$vhostdomain_type = 'domain';
$form_title = "Web Domain";
$validator_function = 'web_domain';
if(isset($_SESSION['s']['var']['vhostdomain_type'])) {
    if($_SESSION['s']['var']['vhostdomain_type'] == 'subdomain') {
        $vhostdomain_type = 'subdomain';
        $form_title = "Subdomain";
        $validator_function = 'sub_domain';
    } elseif($_SESSION['s']['var']['vhostdomain_type'] == 'aliasdomain') {
        $vhostdomain_type = 'aliasdomain';
        $form_title = "Aliasdomain";
        $validator_function = 'alias_domain';
    }
}
$form["title"]    = $form_title;
$form["description"]  = "";
$form["name"]    = "web_domain";
$form["action"]   = "web_domain_edit.php";
$form["name"]    = "web_vhost_domain";
$form["action"]   = "web_vhost_domain_edit.php";
$form["db_table"]  = "web_domain";
$form["db_table_idx"] = "domain_id";
$form["db_history"]  = "yes";
$form["tab_default"] = "domain";
$form["list_default"] = "web_domain_list.php";
$form["list_default"] = "web_vhost_domain_list.php";
$form["auth"]   = 'yes'; // yes / no
$form["auth_preset"]["userid"]  = 0; // 0 = id of the user, > 0 id must match with id of current user
@@ -55,14 +71,16 @@
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
$web_domain_edit_readonly = false;
// Clients may not change the website basic settings if they are not resellers
if($app->auth->has_clients($_SESSION['s']['user']['userid']) || $app->auth->is_admin()) {
    $web_domain_edit_readonly = false;
} else {
    $web_domain_edit_readonly = true;
    if($vhostdomain_type == 'domain') $web_domain_edit_readonly = true;
}
$wildcard_available = true;
if($vhostdomain_type != 'domain') $wildcard_available = false;
$ssl_available = true;
if(!$app->auth->is_admin()) {
    $client_group_id = $_SESSION["s"]["user"]["default_group"];
@@ -78,7 +96,7 @@
$form["tabs"]['domain'] = array (
    'title'  => "Domain",
    'width'  => 100,
    'template'  => "templates/web_domain_edit.htm",
    'template'  => "templates/web_vhost_domain_edit.htm",
    'readonly' => $web_domain_edit_readonly,
    'fields'  => array (
        //#################################
@@ -88,9 +106,6 @@
            'datatype' => 'INTEGER',
            'formtype' => 'SELECT',
            'default' => '',
            'validators'    => array (  0 => array (    'type'  => 'NOTEMPTY',
                    'errmsg'=> 'no_server_error'),
            ),
            'datasource' => array (  'type' => 'SQL',
                'querystring' => 'SELECT server_id,server_name FROM server WHERE mirror_server_id = 0 AND web_server = 1 AND {AUTHSQL} ORDER BY server_name',
                'keyfield'=> 'server_id',
@@ -134,7 +149,7 @@
            ),
            'validators'    => array (  0 => array (    'type'  => 'CUSTOM',
                    'class' => 'validate_domain',
                    'function' => 'web_domain',
                    'function' => $validator_function,
                    'errmsg'=> 'domain_error_regex'),
            ),
            'default' => '',
@@ -147,17 +162,12 @@
            'datatype' => 'VARCHAR',
            'formtype' => 'SELECT',
            'default' => 'y',
            'value'  => array('vhost' => 'Site', 'alias' => 'Alias')
            'value'  => array('vhost' => 'Site', 'alias' => 'Alias', 'vhostalias' => 'Alias', 'subdomain' => 'Subdomain', 'vhostsubdomain' => 'Subdomain')
        ),
        'parent_domain_id' => array (
            'datatype' => 'INTEGER',
            'formtype' => 'SELECT',
            'default' => '',
            'datasource' => array (  'type' => 'SQL',
                'querystring' => "SELECT domain_id,domain FROM web_domain WHERE type = 'site' AND {AUTHSQL} ORDER BY domain",
                'keyfield'=> 'domain_id',
                'valuefield'=> 'domain'
            ),
            'value'  => ''
        ),
        'vhost_type' => array (
@@ -169,13 +179,7 @@
        'hd_quota' => array (
            'datatype' => 'INTEGER',
            'formtype' => 'TEXT',
            'validators' => array (  0 => array ( 'type' => 'NOTEMPTY',
                    'errmsg'=> 'hd_quota_error_empty'),
                1 => array ( 'type' => 'REGEX',
                    'regex' => '/^(\-1|[0-9]{1,10})$/',
                    'errmsg'=> 'hd_quota_error_regex'),
            ),
            'default' => '-1',
            'default' => ($vhostdomain_type == 'domain' ? '-1' : '0'),
            'value'  => '',
            'width'  => '7',
            'maxlength' => '7'
@@ -222,11 +226,6 @@
            'datatype' => 'VARCHAR',
            'formtype' => 'SELECT',
            'default' => 'www',
            'validators'    => array (  0 => array (    'type'  => 'CUSTOM',
                    'class' => 'validate_domain',
                    'function' => 'web_domain_autosub',
                    'errmsg'=> 'domain_error_autosub'),
            ),
            'value'  => ($wildcard_available ? array('none' => 'none_txt', 'www' => 'www.', '*' => '*.') : array('none' => 'none_txt', 'www' => 'www.'))
        ),
        'ssl' => array (
@@ -284,11 +283,66 @@
    )
);
// add type-specific field attributes
if($vhostdomain_type == 'domain') {
    $form['tabs']['domain']['fields']['server_id']['validators'] = array(
        0 => array (
            'type'  => 'NOTEMPTY',
            'errmsg'=> 'no_server_error'
        ),
    );
    $form['tabs']['domain']['fields']['parent_domain_id']['datasource'] = array (
        'type' => 'SQL',
        'querystring' => "SELECT web_domain.domain_id,web_domain.domain FROM web_domain WHERE type = 'vhost' AND {AUTHSQL} ORDER BY domain",
        'keyfield'=> 'domain_id',
        'valuefield'=> 'domain'
    );
    $form['tabs']['domain']['fields']['hd_quota']['validators'] = array (
        0 => array (
            'type' => 'NOTEMPTY',
            'errmsg'=> 'hd_quota_error_empty'
        ),
        1 => array (
            'type' => 'REGEX',
            'regex' => '/^(\-1|[0-9]{1,10})$/',
            'errmsg'=> 'hd_quota_error_regex'
        ),
    );
    $form['tabs']['domain']['fields']['subdomain']['validators'] = array(
        0 => array (
            'type'  => 'CUSTOM',
            'class' => 'validate_domain',
            'function' => 'web_domain_autosub',
            'errmsg'=> 'domain_error_autosub'
        ),
    );
} else {
    $form['tabs']['domain']['fields']['parent_domain_id']['datasource'] = array (
        'type' => 'SQL',
        'querystring' => "SELECT web_domain.domain_id, CONCAT(web_domain.domain, ' :: ', server.server_name) AS parent_domain FROM web_domain, server WHERE web_domain.type = 'vhost' AND web_domain.server_id = server.server_id AND {AUTHSQL::web_domain} ORDER BY web_domain.domain",
        'keyfield'=> 'domain_id',
        'valuefield'=> 'parent_domain'
    );
    $form['tabs']['domain']['fields']['web_folder'] = array (
        'datatype' => 'VARCHAR',
        'validators' => array (  0 => array ( 'type' => 'REGEX',
                'regex' => '@^((?!.*\.\.)[\w/_\.\-]{1,100})$@',
                'errmsg'=> 'web_folder_error_regex'),
        ),
        'formtype' => 'TEXT',
        'default' => '',
        'value'  => '',
        'width'  => '30',
        'maxlength' => '255'
    );
}
$form["tabs"]['redirect'] = array (
    'title'  => "Redirect",
    'width'  => 100,
    'template'  => "templates/web_domain_redirect.htm",
    'template'  => "templates/web_vhost_domain_redirect.htm",
    'readonly' => false,
    'fields'  => array (
        //#################################
@@ -336,7 +390,7 @@
    $form["tabs"]['ssl'] = array (
        'title'  => "SSL",
        'width'  => 100,
        'template'  => "templates/web_domain_ssl.htm",
        'template'  => "templates/web_vhost_domain_ssl.htm",
        'readonly' => false,
        'fields'  => array (
            //#################################
@@ -472,7 +526,7 @@
$form["tabs"]['stats'] = array (
    'title'  => "Stats",
    'width'  => 100,
    'template'  => "templates/web_domain_stats.htm",
    'template'  => "templates/web_vhost_domain_stats.htm",
    'readonly' => false,
    'fields'  => array (
        //#################################
@@ -505,7 +559,7 @@
$form["tabs"]['backup'] = array (
    'title'  => "Backup",
    'width'  => 100,
    'template'  => "templates/web_domain_backup.htm",
    'template'  => "templates/web_vhost_domain_backup.htm",
    'readonly' => false,
    'fields'  => array (
        //#################################
@@ -556,7 +610,7 @@
    $form["tabs"]['advanced'] = array (
        'title'  => "Options",
        'width'  => 100,
        'template'  => "templates/web_domain_advanced.htm",
        'template'  => "templates/web_vhost_domain_advanced.htm",
        'readonly' => false,
        'fields'  => array (
            //#################################
interface/web/sites/form/web_vhost_subdomain.tform.php
File was deleted
interface/web/sites/lib/lang/ar_web_domain_list.lng
File was deleted
interface/web/sites/lib/lang/ar_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/ar_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/ar_web_domain.lng
@@ -120,4 +120,10 @@
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
$wb['web_folder_txt'] = 'Web folder';
$wb['web_folder_invalid_txt'] = 'The web folder is invalid, please choose a different one.';
$wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.';
$wb['host_txt'] = 'Hostname';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
?>
interface/web/sites/lib/lang/ar_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/ar_web_vhost_domain_list.lng
File was renamed from interface/web/sites/lib/lang/br_web_domain_admin_list.lng
@@ -1,9 +1,10 @@
<?php
$wb['sys_groupid_txt'] = 'Client';
$wb['list_head_txt'] = 'Websites';
$wb['domain_id_txt'] = 'ID';
$wb['active_txt'] = 'Active';
$wb['server_id_txt'] = 'Server';
$wb['domain_txt'] = 'Domain';
$wb['add_new_record_txt'] = 'Add new website';
$wb['parent_domain_id_txt'] = 'Website';
?>
interface/web/sites/lib/lang/ar_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/ar_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/bg_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/bg_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/bg_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/bg_web_domain.lng
@@ -120,4 +120,10 @@
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
$wb['web_folder_txt'] = 'Web folder';
$wb['web_folder_invalid_txt'] = 'The web folder is invalid, please choose a different one.';
$wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.';
$wb['host_txt'] = 'Hostname';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
?>
interface/web/sites/lib/lang/bg_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/bg_web_vhost_domain_list.lng
File was renamed from interface/web/sites/lib/lang/bg_web_domain_list.lng
@@ -5,4 +5,6 @@
$wb['server_id_txt'] = 'Сървър';
$wb['domain_txt'] = 'Домейн';
$wb['add_new_record_txt'] = 'Нов сайт';
$wb['parent_domain_id_txt'] = 'Website';
?>
interface/web/sites/lib/lang/bg_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/bg_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/br_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/br_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/br_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/br_web_domain.lng
@@ -120,4 +120,10 @@
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
$wb['web_folder_txt'] = 'Web folder';
$wb['web_folder_invalid_txt'] = 'The web folder is invalid, please choose a different one.';
$wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.';
$wb['host_txt'] = 'Hostname';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
?>
interface/web/sites/lib/lang/br_web_vhost_domain_admin_list.lng
copy from interface/web/sites/lib/lang/ar_web_domain_admin_list.lng copy to interface/web/sites/lib/lang/br_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/br_web_vhost_domain_list.lng
File was renamed from interface/web/sites/lib/lang/br_web_domain_list.lng
@@ -5,4 +5,6 @@
$wb['server_id_txt'] = 'Servidor';
$wb['domain_txt'] = 'Domínio';
$wb['add_new_record_txt'] = 'Adcionar um novo site';
$wb['parent_domain_id_txt'] = 'Website';
?>
interface/web/sites/lib/lang/br_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/br_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/cz_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/cz_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/cz_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/cz_web_domain.lng
@@ -120,5 +120,10 @@
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
?>
$wb['web_folder_txt'] = 'Web folder';
$wb['web_folder_invalid_txt'] = 'The web folder is invalid, please choose a different one.';
$wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.';
$wb['host_txt'] = 'Hostname';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
?>
interface/web/sites/lib/lang/cz_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/cz_web_vhost_domain_list.lng
File was renamed from interface/web/sites/lib/lang/cz_web_domain_list.lng
@@ -5,5 +5,6 @@
$wb['server_id_txt'] = 'Server';
$wb['domain_txt'] = 'Doména';
$wb['add_new_record_txt'] = 'Přidat webovou stránku';
?>
$wb['parent_domain_id_txt'] = 'Webové stránky';
?>
interface/web/sites/lib/lang/cz_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/cz_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/de_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/de_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/de_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/de_web_domain.lng
@@ -126,4 +126,10 @@
$wb['backup_excludes_txt'] = 'Auszuschließende Verzeichnisse';
$wb['backup_excludes_note_txt'] = '(Mehrere Verzeichnisse mit Kommas trennen. Beispiel: web/cache/*,web/backup)';
$wb['backup_excludes_error_regex'] = 'Die auszuschließenden Verzeichnisse enthalten ungültige Zeichen.';
$wb['web_folder_txt'] = 'Basisordner';
$wb['web_folder_invalid_txt'] = 'Dieser Ordner darf nicht als Basisordner verwendet werden.';
$wb['web_folder_unique_txt'] = 'Dieser Ordner wird bereits verwendet, bitte geben Sie einen anderen Basisordner an.';
$wb['host_txt'] = 'Host';
$wb['domain_error_wildcard'] = 'Wildcard-Subdomains sind nicht erlaubt.';
?>
interface/web/sites/lib/lang/de_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/de_web_vhost_domain_list.lng
File was renamed from interface/web/sites/lib/lang/de_web_domain_list.lng
@@ -5,4 +5,6 @@
$wb['server_id_txt'] = 'Server';
$wb['domain_txt'] = 'Domain';
$wb['add_new_record_txt'] = 'Neue Domain hinzufügen';
$wb['parent_domain_id_txt'] = 'Webseite';
?>
interface/web/sites/lib/lang/de_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/de_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/el_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/el_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/el_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/el_web_domain.lng
@@ -120,4 +120,10 @@
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
$wb['web_folder_txt'] = 'Φάκελος Web';
$wb['web_folder_invalid_txt'] = 'Ο Φάκελος Web δεν είναι έγκυρος, διαλέξτε κάποιον άλλο.';
$wb['web_folder_unique_txt'] = 'Ο Φάκελος Web χρησιμοποιείται ήδη, διαλέξτε κάποιον άλλο.';
$wb['host_txt'] = 'Hostname';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
?>
interface/web/sites/lib/lang/el_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/el_web_vhost_domain_list.lng
File was renamed from interface/web/sites/lib/lang/el_web_domain_list.lng
@@ -5,4 +5,6 @@
$wb['server_id_txt'] = 'Server';
$wb['domain_txt'] = 'Domain';
$wb['add_new_record_txt'] = 'Νέο website';
$wb['parent_domain_id_txt'] = 'Website';
?>
interface/web/sites/lib/lang/el_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/el_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/en_web_domain.lng
File was deleted
interface/web/sites/lib/lang/en_web_domain_list.lng
File was deleted
interface/web/sites/lib/lang/en_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/en_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/en_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/ar_web_vhost_aliasdomain.lng
@@ -1,8 +1,4 @@
<?php
$wb['parent_domain_id_txt'] = 'Parent Website';
$wb['web_folder_txt'] = 'Web folder';
$wb['web_folder_invalid_txt'] = 'The web folder is invalid, please choose a different one.';
$wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.';
$wb['backup_interval_txt'] = 'Backup interval';
$wb['backup_copies_txt'] = 'Number of backup copies';
$wb['ssl_state_txt'] = 'State';
@@ -18,9 +14,9 @@
$wb['ssl_domain_txt'] = 'SSL Domain';
$wb['server_id_txt'] = 'Server';
$wb['domain_txt'] = 'Domain';
$wb['host_txt'] = 'Hostname';
$wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.';
$wb['type_txt'] = 'Type';
$wb['parent_domain_id_txt'] = 'Parent Website';
$wb['redirect_type_txt'] = 'Redirect Type';
$wb['redirect_path_txt'] = 'Redirect Path';
$wb['active_txt'] = 'Active';
@@ -47,7 +43,7 @@
$wb['domain_error_empty'] = 'Domain is empty.';
$wb['domain_error_unique'] = 'There is already a website or sub / aliasdomain with this domain name.';
$wb['domain_error_regex'] = 'Domain name invalid.';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
$wb['domain_error_autosub'] = 'There is already a subdomain with these settings.';
$wb['hd_quota_error_empty'] = 'Harddisk quota is 0 or empty.';
$wb['traffic_quota_error_empty'] = 'Traffic quota is empty.';
$wb['error_ssl_state_empty'] = 'SSL State is empty.';
@@ -57,13 +53,13 @@
$wb['error_ssl_country_empty'] = 'SSL Country is empty.';
$wb['error_ssl_cert_empty'] = 'SSL Certificate field is empty';
$wb['client_group_id_txt'] = 'Client';
$wb['stats_password_txt'] = 'Webstatistics password';
$wb['stats_password_txt'] = 'Set Webstatistics password';
$wb['allow_override_txt'] = 'Apache AllowOverride';
$wb['limit_web_quota_free_txt'] = 'Max. available Harddisk Quota';
$wb['ssl_state_error_regex'] = 'Invalid SSL State. Valid characters are: a-z, 0-9 and .,-_';
$wb['ssl_locality_error_regex'] = 'Invalid SSL Locality. Valid characters are: a-z, 0-9 and .,-_';
$wb['ssl_organisation_error_regex'] = 'Invalid SSL Organisation. Valid characters are: a-z, 0-9 and .,-_';
$wb['ssl_organistaion_unit_error_regex'] = 'Invalid SSL Organisation Unit. Valid characters are: a-z, 0-9 and .,-_';
$wb['ssl_state_error_regex'] = 'Invalid SSL State. Valid characters are: a-z, 0-9 and .,-_&äöüÄÖÜ';
$wb['ssl_locality_error_regex'] = 'Invalid SSL Locality. Valid characters are: a-z, 0-9 and .,-_&äöüÄÖÜ';
$wb['ssl_organisation_error_regex'] = 'Invalid SSL Organisation. Valid characters are: a-z, 0-9 and .,-_&äöüÄÖÜ';
$wb['ssl_organistaion_unit_error_regex'] = 'Invalid SSL Organisation Unit. Valid characters are: a-z, 0-9 and .,-_&äöüÄÖÜ';
$wb['ssl_country_error_regex'] = 'Invalid SSL Country. Valid characters are: A-Z';
$wb['limit_traffic_quota_free_txt'] = 'Max. available Traffic Quota';
$wb['redirect_error_regex'] = 'Invalid redirect path. Valid redirects are for example: /test/ or http://www.domain.tld/test/';
@@ -115,4 +111,26 @@
$wb['available_nginx_directive_snippets_txt'] = 'Available nginx Directive Snippets:';
$wb['proxy_directives_txt'] = 'Proxy Directives';
$wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
$wb['no_server_error'] = 'No server selected.';
$wb['no_backup_txt'] = 'No backup';
$wb['daily_backup_txt'] = 'Daily';
$wb['weekly_backup_txt'] = 'Weekly';
$wb['monthly_backup_txt'] = 'Monthly';
$wb['rewrite_rules_txt'] = 'Rewrite Rules';
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
$wb['server_chosen_not_ok'] = 'The selected server is not allowed for this account.';
$wb['variables_txt'] = 'Variables';
$wb['added_by_txt'] = 'Added by';
$wb['added_date_txt'] = 'Added date';
$wb['backup_excludes_txt'] = 'Excluded Directories';
$wb['backup_excludes_note_txt'] = '(Separate multiple directories with commas. Example: web/cache/*,web/backup)';
$wb['backup_excludes_error_regex'] = 'The excluded directories contain invalid characters.';
$wb['web_folder_txt'] = 'Web folder';
$wb['web_folder_invalid_txt'] = 'The web folder is invalid, please choose a different one.';
$wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.';
$wb['host_txt'] = 'Hostname';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
?>
interface/web/sites/lib/lang/en_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/en_web_vhost_domain_list.lng
copy from interface/web/sites/lib/lang/br_web_domain_admin_list.lng copy to interface/web/sites/lib/lang/en_web_vhost_domain_list.lng
File was copied from interface/web/sites/lib/lang/br_web_domain_admin_list.lng
@@ -1,9 +1,10 @@
<?php
$wb['sys_groupid_txt'] = 'Client';
$wb['list_head_txt'] = 'Websites';
$wb['domain_id_txt'] = 'ID';
$wb['active_txt'] = 'Active';
$wb['server_id_txt'] = 'Server';
$wb['domain_txt'] = 'Domain';
$wb['add_new_record_txt'] = 'Add new website';
$wb['parent_domain_id_txt'] = 'Website';
?>
interface/web/sites/lib/lang/en_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/en_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/es_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/es_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/es_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/es_web_domain.lng
@@ -120,4 +120,10 @@
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
$wb['web_folder_txt'] = 'Web folder';
$wb['web_folder_invalid_txt'] = 'The web folder is invalid, please choose a different one.';
$wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.';
$wb['host_txt'] = 'Hostname';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
?>
interface/web/sites/lib/lang/es_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/es_web_vhost_domain_list.lng
File was renamed from interface/web/sites/lib/lang/es_web_domain_list.lng
@@ -5,4 +5,6 @@
$wb['server_id_txt'] = 'Servidor';
$wb['domain_txt'] = 'Dominio';
$wb['add_new_record_txt'] = 'Añadir nuevo sitio web';
$wb['parent_domain_id_txt'] = 'Website';
?>
interface/web/sites/lib/lang/es_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/es_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/fi_web_domain_admin_list.lng
File was deleted
interface/web/sites/lib/lang/fi_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/fi_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/fi_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/fi_web_domain.lng
@@ -120,4 +120,10 @@
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
$wb['web_folder_txt'] = 'Web folder';
$wb['web_folder_invalid_txt'] = 'The web folder is invalid, please choose a different one.';
$wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.';
$wb['host_txt'] = 'Hostname';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
?>
interface/web/sites/lib/lang/fi_web_vhost_domain_admin_list.lng
copy from interface/web/sites/lib/lang/ar_web_domain_admin_list.lng copy to interface/web/sites/lib/lang/fi_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/fi_web_vhost_domain_list.lng
File was renamed from interface/web/sites/lib/lang/fi_web_domain_list.lng
@@ -5,4 +5,6 @@
$wb['domain_txt'] = 'Verkkotunnus';
$wb['add_new_record_txt'] = 'Lisää uusi verkkotunnus';
$wb['domain_id_txt'] = 'Verkkotunnus';
$wb['parent_domain_id_txt'] = 'Website';
?>
interface/web/sites/lib/lang/fi_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/fi_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/fr_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/fr_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/fr_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/fr_web_domain.lng
@@ -121,4 +121,10 @@
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
$wb['server_chosen_not_ok'] = 'Le serveur choisi n\'est pas autorisé pour ce compte.';
?>
$wb['web_folder_txt'] = 'Web folder';
$wb['web_folder_invalid_txt'] = 'The web folder is invalid, please choose a different one.';
$wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.';
$wb['host_txt'] = 'Hostname';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
?>
interface/web/sites/lib/lang/fr_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/fr_web_vhost_domain_list.lng
File was renamed from interface/web/sites/lib/lang/fr_web_domain_list.lng
@@ -5,4 +5,6 @@
$wb['server_id_txt'] = 'Serveur';
$wb['domain_txt'] = 'Domaine';
$wb['add_new_record_txt'] = 'Nouveau site web';
$wb['parent_domain_id_txt'] = 'Website';
?>
interface/web/sites/lib/lang/fr_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/fr_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/hr_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/hr_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/hr_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/hr_web_domain.lng
@@ -120,4 +120,10 @@
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
$wb['web_folder_txt'] = 'Web folder';
$wb['web_folder_invalid_txt'] = 'The web folder is invalid, please choose a different one.';
$wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.';
$wb['host_txt'] = 'Hostname';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
?>
interface/web/sites/lib/lang/hr_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/hr_web_vhost_domain_list.lng
File was renamed from interface/web/sites/lib/lang/hr_web_domain_list.lng
@@ -5,4 +5,6 @@
$wb['server_id_txt'] = 'Server';
$wb['domain_txt'] = 'Domena';
$wb['add_new_record_txt'] = 'Dodaj novu web stranicu';
$wb['parent_domain_id_txt'] = 'Website';
?>
interface/web/sites/lib/lang/hr_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/hr_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/hu_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/hu_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/hu_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/hu_web_domain.lng
@@ -120,4 +120,10 @@
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
$wb['web_folder_txt'] = 'Web folder';
$wb['web_folder_invalid_txt'] = 'The web folder is invalid, please choose a different one.';
$wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.';
$wb['host_txt'] = 'Hostname';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
?>
interface/web/sites/lib/lang/hu_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/hu_web_vhost_domain_list.lng
File was renamed from interface/web/sites/lib/lang/hu_web_domain_list.lng
@@ -5,4 +5,6 @@
$wb['server_id_txt'] = 'Szerver';
$wb['domain_txt'] = 'Domain';
$wb['add_new_record_txt'] = 'Új Webhely';
$wb['parent_domain_id_txt'] = 'Website';
?>
interface/web/sites/lib/lang/hu_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/hu_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/id_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/id_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/id_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/id_web_domain.lng
@@ -120,4 +120,10 @@
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
$wb['web_folder_txt'] = 'Web folder';
$wb['web_folder_invalid_txt'] = 'The web folder is invalid, please choose a different one.';
$wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.';
$wb['host_txt'] = 'Hostname';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
?>
interface/web/sites/lib/lang/id_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/id_web_vhost_domain_list.lng
File was renamed from interface/web/sites/lib/lang/id_web_domain_list.lng
@@ -5,4 +5,6 @@
$wb['server_id_txt'] = 'Server';
$wb['domain_txt'] = 'Domain';
$wb['add_new_record_txt'] = 'Tambah Situs Web Baru';
$wb['parent_domain_id_txt'] = 'Website';
?>
interface/web/sites/lib/lang/id_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/id_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/it_web_domain_admin_list.lng
File was deleted
interface/web/sites/lib/lang/it_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/it_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/it_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/it_web_domain.lng
@@ -120,4 +120,10 @@
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
$wb['web_folder_txt'] = 'Web folder';
$wb['web_folder_invalid_txt'] = 'The web folder is invalid, please choose a different one.';
$wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.';
$wb['host_txt'] = 'Hostname';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
?>
interface/web/sites/lib/lang/it_web_vhost_domain_admin_list.lng
copy from interface/web/sites/lib/lang/ar_web_domain_admin_list.lng copy to interface/web/sites/lib/lang/it_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/it_web_vhost_domain_list.lng
File was renamed from interface/web/sites/lib/lang/it_web_domain_list.lng
@@ -5,4 +5,6 @@
$wb['server_id_txt'] = 'Server';
$wb['domain_txt'] = 'Dominio';
$wb['add_new_record_txt'] = 'Aggiungi nuovo sito';
$wb['parent_domain_id_txt'] = 'Website';
?>
interface/web/sites/lib/lang/it_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/it_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/ja_web_domain_admin_list.lng
File was deleted
interface/web/sites/lib/lang/ja_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/ja_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/ja_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/ja_web_domain.lng
@@ -120,4 +120,10 @@
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
$wb['web_folder_txt'] = 'Web folder';
$wb['web_folder_invalid_txt'] = 'The web folder is invalid, please choose a different one.';
$wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.';
$wb['host_txt'] = 'Hostname';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
?>
interface/web/sites/lib/lang/ja_web_vhost_domain_admin_list.lng
copy from interface/web/sites/lib/lang/ar_web_domain_admin_list.lng copy to interface/web/sites/lib/lang/ja_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/ja_web_vhost_domain_list.lng
File was renamed from interface/web/sites/lib/lang/ja_web_domain_list.lng
@@ -5,4 +5,6 @@
$wb['server_id_txt'] = 'サーバー';
$wb['domain_txt'] = 'ドメイン';
$wb['add_new_record_txt'] = 'ウェブサイトを追加する';
$wb['parent_domain_id_txt'] = 'Website';
?>
interface/web/sites/lib/lang/ja_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/ja_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/nl_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/nl_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/nl_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/nl_web_domain.lng
@@ -120,4 +120,10 @@
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
$wb['web_folder_txt'] = 'Web folder';
$wb['web_folder_invalid_txt'] = 'The web folder is invalid, please choose a different one.';
$wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.';
$wb['host_txt'] = 'Hostname';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
?>
interface/web/sites/lib/lang/nl_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/nl_web_vhost_domain_list.lng
File was renamed from interface/web/sites/lib/lang/nl_web_domain_list.lng
@@ -5,4 +5,6 @@
$wb['server_id_txt'] = 'Server';
$wb['domain_txt'] = 'Domein';
$wb['add_new_record_txt'] = 'Toevoegen nieuwe website';
$wb['parent_domain_id_txt'] = 'Website';
?>
interface/web/sites/lib/lang/nl_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/nl_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/pl_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/pl_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/pl_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/pl_web_domain.lng
@@ -120,4 +120,10 @@
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
$wb['web_folder_txt'] = 'Folder strony';
$wb['web_folder_invalid_txt'] = 'Folder strony jest nieprawidłowy, proszę wybrać inny.';
$wb['web_folder_unique_txt'] = 'Folder strony jest już w użyciu, proszę wybrać inny.';
$wb['host_txt'] = 'Nazwa hosta';
$wb['domain_error_wildcard'] = 'Subdomeny typu wildcard nie są dozwolone.';
?>
interface/web/sites/lib/lang/pl_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/pl_web_vhost_domain_list.lng
File was renamed from interface/web/sites/lib/lang/pl_web_domain_list.lng
@@ -5,4 +5,6 @@
$wb['server_id_txt'] = 'Serwer';
$wb['domain_txt'] = 'Domena';
$wb['add_new_record_txt'] = 'Dodaj nową stronę';
$wb['parent_domain_id_txt'] = 'Website';
?>
interface/web/sites/lib/lang/pl_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/pl_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/pt_web_domain_admin_list.lng
File was deleted
interface/web/sites/lib/lang/pt_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/pt_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/pt_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/pt_web_domain.lng
@@ -120,4 +120,10 @@
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
$wb['web_folder_txt'] = 'Web folder';
$wb['web_folder_invalid_txt'] = 'The web folder is invalid, please choose a different one.';
$wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.';
$wb['host_txt'] = 'Hostname';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
?>
interface/web/sites/lib/lang/pt_web_vhost_domain_admin_list.lng
copy from interface/web/sites/lib/lang/ar_web_domain_admin_list.lng copy to interface/web/sites/lib/lang/pt_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/pt_web_vhost_domain_list.lng
File was renamed from interface/web/sites/lib/lang/pt_web_domain_list.lng
@@ -5,4 +5,6 @@
$wb['server_id_txt'] = 'Servidor';
$wb['domain_txt'] = 'Domínio';
$wb['add_new_record_txt'] = 'Adicionar um novo site';
$wb['parent_domain_id_txt'] = 'Website';
?>
interface/web/sites/lib/lang/pt_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/pt_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/ro_web_domain_admin_list.lng
File was deleted
interface/web/sites/lib/lang/ro_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/ro_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/ro_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/ro_web_domain.lng
@@ -120,4 +120,10 @@
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
$wb['web_folder_txt'] = 'Web folder';
$wb['web_folder_invalid_txt'] = 'The web folder is invalid, please choose a different one.';
$wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.';
$wb['host_txt'] = 'Hostname';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
?>
interface/web/sites/lib/lang/ro_web_vhost_domain_admin_list.lng
copy from interface/web/sites/lib/lang/ar_web_domain_admin_list.lng copy to interface/web/sites/lib/lang/ro_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/ro_web_vhost_domain_list.lng
File was renamed from interface/web/sites/lib/lang/ro_web_domain_list.lng
@@ -5,4 +5,6 @@
$wb['server_id_txt'] = 'Server';
$wb['domain_txt'] = 'Domain';
$wb['add_new_record_txt'] = 'Adauga un nou  website';
$wb['parent_domain_id_txt'] = 'Website';
?>
interface/web/sites/lib/lang/ro_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/ro_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/ru_web_domain_admin_list.lng
File was deleted
interface/web/sites/lib/lang/ru_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/ru_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/ru_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/ru_web_domain.lng
@@ -120,4 +120,10 @@
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
$wb['web_folder_txt'] = 'Web folder';
$wb['web_folder_invalid_txt'] = 'The web folder is invalid, please choose a different one.';
$wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.';
$wb['host_txt'] = 'Hostname';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
?>
interface/web/sites/lib/lang/ru_web_vhost_domain_admin_list.lng
copy from interface/web/sites/lib/lang/ar_web_domain_admin_list.lng copy to interface/web/sites/lib/lang/ru_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/ru_web_vhost_domain_list.lng
File was renamed from interface/web/sites/lib/lang/ru_web_domain_list.lng
@@ -5,4 +5,6 @@
$wb['domain_txt'] = 'Домен';
$wb['add_new_record_txt'] = 'Добавить новый вебсайт';
$wb['domain_id_txt'] = 'ID';
$wb['parent_domain_id_txt'] = 'Website';
?>
interface/web/sites/lib/lang/ru_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/ru_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/se_web_domain_admin_list.lng
File was deleted
interface/web/sites/lib/lang/se_web_domain_list.lng
File was deleted
interface/web/sites/lib/lang/se_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/se_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/se_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/se_web_domain.lng
@@ -120,4 +120,10 @@
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
$wb['web_folder_txt'] = 'Web folder';
$wb['web_folder_invalid_txt'] = 'The web folder is invalid, please choose a different one.';
$wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.';
$wb['host_txt'] = 'Hostname';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
?>
interface/web/sites/lib/lang/se_web_vhost_domain_admin_list.lng
copy from interface/web/sites/lib/lang/ar_web_domain_admin_list.lng copy to interface/web/sites/lib/lang/se_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/se_web_vhost_domain_list.lng
copy from interface/web/sites/lib/lang/br_web_domain_admin_list.lng copy to interface/web/sites/lib/lang/se_web_vhost_domain_list.lng
File was copied from interface/web/sites/lib/lang/br_web_domain_admin_list.lng
@@ -1,9 +1,10 @@
<?php
$wb['sys_groupid_txt'] = 'Client';
$wb['list_head_txt'] = 'Websites';
$wb['domain_id_txt'] = 'ID';
$wb['active_txt'] = 'Active';
$wb['server_id_txt'] = 'Server';
$wb['domain_txt'] = 'Domain';
$wb['add_new_record_txt'] = 'Add new website';
$wb['parent_domain_id_txt'] = 'Website';
?>
interface/web/sites/lib/lang/se_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/se_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/sk_web_domain_admin_list.lng
File was deleted
interface/web/sites/lib/lang/sk_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/sk_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/sk_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/sk_web_domain.lng
@@ -120,4 +120,10 @@
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
$wb['web_folder_txt'] = 'Web folder';
$wb['web_folder_invalid_txt'] = 'The web folder is invalid, please choose a different one.';
$wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.';
$wb['host_txt'] = 'Hostname';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
?>
interface/web/sites/lib/lang/sk_web_vhost_domain_admin_list.lng
copy from interface/web/sites/lib/lang/ar_web_domain_admin_list.lng copy to interface/web/sites/lib/lang/sk_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/sk_web_vhost_domain_list.lng
File was renamed from interface/web/sites/lib/lang/sk_web_domain_list.lng
@@ -5,4 +5,6 @@
$wb['server_id_txt'] = 'Server';
$wb['domain_txt'] = 'Doména';
$wb['add_new_record_txt'] = 'Pridať novú doménu';
$wb['parent_domain_id_txt'] = 'Website';
?>
interface/web/sites/lib/lang/sk_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/sk_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/lang/tr_web_domain_admin_list.lng
File was deleted
interface/web/sites/lib/lang/tr_web_vhost_aliasdomain.lng
File was deleted
interface/web/sites/lib/lang/tr_web_vhost_aliasdomain_list.lng
File was deleted
interface/web/sites/lib/lang/tr_web_vhost_domain.lng
File was renamed from interface/web/sites/lib/lang/tr_web_domain.lng
@@ -120,4 +120,10 @@
$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
$wb['configuration_error_txt'] = 'CONFIGURATION ERROR';
$wb['web_folder_txt'] = 'Web folder';
$wb['web_folder_invalid_txt'] = 'The web folder is invalid, please choose a different one.';
$wb['web_folder_unique_txt'] = 'The web folder is already used, please choose a different one.';
$wb['host_txt'] = 'Hostname';
$wb['domain_error_wildcard'] = 'Wildcard subdomains are not allowed.';
?>
interface/web/sites/lib/lang/tr_web_vhost_domain_admin_list.lng
copy from interface/web/sites/lib/lang/ar_web_domain_admin_list.lng copy to interface/web/sites/lib/lang/tr_web_vhost_domain_admin_list.lng
interface/web/sites/lib/lang/tr_web_vhost_domain_list.lng
File was renamed from interface/web/sites/lib/lang/tr_web_domain_list.lng
@@ -5,4 +5,6 @@
$wb['server_id_txt'] = 'Sunucu';
$wb['domain_txt'] = 'Domain';
$wb['add_new_record_txt'] = 'Yeni Website';
$wb['parent_domain_id_txt'] = 'Website';
?>
interface/web/sites/lib/lang/tr_web_vhost_subdomain.lng
File was deleted
interface/web/sites/lib/lang/tr_web_vhost_subdomain_list.lng
File was deleted
interface/web/sites/lib/module.conf.php
@@ -15,7 +15,7 @@
{
    $items[] = array(   'title'  => "Website",
        'target'  => 'content',
        'link' => 'sites/web_domain_list.php',
        'link' => 'sites/web_vhost_domain_list.php?type=domain',
        'html_id'   => 'domain_list');
}
@@ -32,7 +32,7 @@
    if($sys_config['vhost_subdomains'] == 'y') {
        $items[] = array(   'title'  => "Subdomain (Vhost)",
            'target'  => 'content',
            'link'      => 'sites/web_vhost_subdomain_list.php',
            'link'      => 'sites/web_vhost_domain_list.php?type=subdomain',
            'html_id'   => 'childdomain_list');
    }
}
@@ -50,7 +50,7 @@
    if($sys_config['vhost_aliasdomains'] == 'y') {
        $items[] = array(   'title'  => "Aliasdomain (Vhost)",
                'target'  => 'content',
                'link'      => 'sites/web_vhost_aliasdomain_list.php',
                'link'      => 'sites/web_vhost_domain_list.php?type=aliasdomain',
                'html_id'   => 'childdomain_list');
    }
}
interface/web/sites/list/web_vhost_aliasdomain.list.php
File was deleted
interface/web/sites/list/web_vhost_domain.list.php
File was renamed from interface/web/sites/list/web_domain.list.php
@@ -10,13 +10,22 @@
    - DATE
*/
$vhostdomain_type = 'domain';
if(isset($_SESSION['s']['var']['vhostdomain_type'])) {
    if($_SESSION['s']['var']['vhostdomain_type'] == 'subdomain') {
        $vhostdomain_type = 'subdomain';
    } elseif($_SESSION['s']['var']['vhostdomain_type'] == 'aliasdomain') {
        $vhostdomain_type = 'aliasdomain';
    }
}
// Name of the list
if($_SESSION['s']['user']['typ'] == 'admin') {
    $liste["name"]     = "web_domain_admin";
    $liste["name"]     = "web_vhost_domain_admin";
} else {
    $liste["name"]     = "web_domain";
    $liste["name"]     = "web_vhost_domain";
}
// Database table
@@ -32,13 +41,13 @@
$liste["records_per_page"]  = "15";
// Script File of the list
$liste["file"]    = "web_domain_list.php";
$liste["file"]    = "web_vhost_domain_list.php";
// Script file of the edit form
$liste["edit_file"]   = "web_domain_edit.php";
$liste["edit_file"]   = "web_vhost_domain_edit.php";
// Script File of the delete script
$liste["delete_file"]  = "web_domain_del.php";
$liste["delete_file"]  = "web_vhost_domain_del.php";
// Paging Template
$liste["paging_tpl"]  = "templates/paging.tpl.htm";
@@ -51,15 +60,16 @@
* Suchfelder
*****************************************************/
$liste["item"][] = array( 'field'  => "domain_id",
    'datatype' => "INTEGER",
    'formtype' => "TEXT",
    'op'  => "=",
    'prefix' => "",
    'suffix' => "",
    'width'  => "",
    'value'  => "");
if($vhostdomain_type == 'domain') {
    $liste["item"][] = array( 'field'  => "domain_id",
        'datatype' => "INTEGER",
        'formtype' => "TEXT",
        'op'  => "=",
        'prefix' => "",
        'suffix' => "",
        'width'  => "",
        'value'  => "");
}
$liste["item"][] = array( 'field'  => "active",
    'datatype' => "VARCHAR",
@@ -70,7 +80,7 @@
    'width'  => "",
    'value'  => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>"));
if($_SESSION['s']['user']['typ'] == 'admin') {
if($_SESSION['s']['user']['typ'] == 'admin' && $vhostdomain_type == 'domain') {
    $liste["item"][] = array( 'field'  => "sys_groupid",
        'datatype' => "INTEGER",
        'formtype' => "SELECT",
@@ -100,6 +110,26 @@
    'width'  => "",
    'value'  => "");
if($vhostdomain_type != 'domain') {
    $liste["item"][] = array( 'field'  => "parent_domain_id",
        'datatype' => "VARCHAR",
        'filters'   => array( 0 => array( 'event' => 'SHOW',
                'type' => 'IDNTOUTF8')
        ),
        'formtype' => "SELECT",
        'op'  => "=",
        'prefix' => "",
        'suffix' => "",
        'datasource' => array (  'type' => 'SQL',
            'querystring' => "SELECT domain_id,domain FROM web_domain WHERE type = 'vhost' AND {AUTHSQL} ORDER BY domain",
            'keyfield'=> 'domain_id',
            'valuefield'=> 'domain'
        ),
        'width'  => "",
        'value'  => "");
}
$liste["item"][] = array( 'field'  => "domain",
    'datatype' => "VARCHAR",
    'filters'   => array( 0 => array( 'event' => 'SHOW',
interface/web/sites/list/web_vhost_subdomain.list.php
File was deleted
interface/web/sites/templates/web_domain_admin_list.htm
File was deleted
interface/web/sites/templates/web_vhost_aliasdomain_advanced.htm
File was deleted
interface/web/sites/templates/web_vhost_aliasdomain_backup.htm
File was deleted
interface/web/sites/templates/web_vhost_aliasdomain_edit.htm
File was deleted
interface/web/sites/templates/web_vhost_aliasdomain_list.htm
File was deleted
interface/web/sites/templates/web_vhost_aliasdomain_redirect.htm
File was deleted
interface/web/sites/templates/web_vhost_aliasdomain_ssl.htm
File was deleted
interface/web/sites/templates/web_vhost_aliasdomain_stats.htm
File was deleted
interface/web/sites/templates/web_vhost_domain_admin_list.htm
New file
@@ -0,0 +1,69 @@
<h2><tmpl_var name="list_head_txt"></h2>
<div class="panel panel_list_web_vhost_domain_admin">
    <div class="pnl_toolsarea">
        <fieldset><legend>{tmpl_var name="toolsarea_head_txt"}</legend>
            <div class="buttons">
                <button class="button iconstxt icoAdd" type="button" onclick="loadContent('sites/web_vhost_domain_edit.php?type={tmpl_var name='vhostdomain_type'}');">
                    <span>{tmpl_var name="add_new_record_txt"}</span>
                </button>
            </div>
        </fieldset>
    </div>
    <div class="pnl_listarea">
        <fieldset><legend><tmpl_var name="list_head_txt"></legend>
            <table class="list">
                <thead>
                <tr class="caption">
                    <tmpl_if name="vhostdomain_type" value="domain"><th class="tbl_col_domain_id" scope="col"><tmpl_var name="domain_id_txt"></th></tmpl_if>
                    <th class="tbl_col_active" scope="col"><tmpl_var name="active_txt"></th>
                    <th class="tbl_col_sys_groupid" scope="col"><tmpl_var name="sys_groupid_txt"></th>
                    <th class="tbl_col_server_id" scope="col"><tmpl_var name="server_id_txt"></th>
                    <tmpl_if name="vhostdomain_type" op="!=" value="domain"><th class="tbl_col_parent_domain_id" scope="col"><tmpl_var name="parent_domain_id_txt"></th></tmpl_if>
                    <th class="tbl_col_domain" scope="col"><tmpl_var name="domain_txt"></th>
                    <th class="tbl_col_limit" scope="col">{tmpl_var name='search_limit'}</th>
                </tr>
                <tr class="filter">
                    <tmpl_if name="vhostdomain_type" value="domain"><td class="tbl_col_domain_id"><input type="text" size="5" name="search_domain_id" value="{tmpl_var name='search_domain_id'}" /></td></tmpl_if>
                    <td class="tbl_col_active"><select name="search_active">{tmpl_var name='search_active'}</select></td>
                    <td class="tbl_col_sys_groupid"><select name="search_sys_groupid">{tmpl_var name='search_sys_groupid'}</select></td>
                    <td class="tbl_col_server_id"><select name="search_server_id">{tmpl_var name='search_server_id'}</select></td>
                    <tmpl_if name="vhostdomain_type" op="!=" value="domain"><td class="tbl_col_parent_domain_id"><select name="search_parent_domain_id">{tmpl_var name='search_parent_domain_id'}</select></td></tmpl_if>
                    <td class="tbl_col_domain"><input type="text" name="search_domain" value="{tmpl_var name='search_domain'}" /></td>
                    <td class="tbl_col_buttons">
                        <button type="button" class="button icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="submitForm('pageForm','sites/web_vhost_domain_list.php');"><span>{tmpl_var name="filter_txt"}</span></button>
                    </td>
                </tr>
                </thead>
                <tbody>
                <tmpl_loop name="records">
                    <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
                        <tmpl_if name="vhostdomain_type" value="domain"><td class="tbl_col_domain_id"><a href="#" onclick="loadContent('sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}&type={tmpl_var name='vhostdomain_type'}');">{tmpl_var name="domain_id"}</a></td></tmpl_if>
                        <td class="tbl_col_active"><a href="#" onclick="loadContent('sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}&type={tmpl_var name='vhostdomain_type'}');">{tmpl_var name="active"}</a></td>
                        <td class="tbl_col_sys_groupid"><a href="#" onclick="loadContent('sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}&type={tmpl_var name='vhostdomain_type'}');">{tmpl_var name="sys_groupid"}</a></td>
                        <td class="tbl_col_server_id"><a href="#" onclick="loadContent('sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}&type={tmpl_var name='vhostdomain_type'}');">{tmpl_var name="server_id"}</a></td>
                        <tmpl_if name="vhostdomain_type" op="!=" value="domain"><td class="tbl_col_parent_domain_id"><a href="#" onclick="loadContent('sites/web_vhost_aliasdomain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="parent_domain_id"}</a></td></tmpl_if>
                        <td class="tbl_col_domain"><a href="#" onclick="loadContent('sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}&type={tmpl_var name='vhostdomain_type'}');">{tmpl_var name="domain"}</a><a href="http://{tmpl_var name="domain"}" target="_blank" class="button icons16 icoLink"><span>Link</span></a></td>
                        <td class="tbl_col_buttons">
                            <a class="button icons16 icoDelete" href="javascript: del_record('sites/web_vhost_domain_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>
                        </td>
                    </tr>
                </tmpl_loop>
                <tmpl_unless name="records">
                    <tr class="tbl_row_noresults tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
                        <td colspan="6">{tmpl_var name='globalsearch_noresults_text_txt'}</td>
                    </tr>
                </tmpl_unless>
                </tbody>
                <tfoot>
                    <tr>
                        <td class="tbl_footer tbl_paging" colspan="6"><tmpl_var name="paging"></td>
                    </tr>
                </tfoot>
            </table>
        </fieldset>
    </div>
</div>
interface/web/sites/templates/web_vhost_domain_advanced.htm
File was renamed from interface/web/sites/templates/web_domain_advanced.htm
@@ -103,8 +103,8 @@
        <input type="hidden" name="id" value="{tmpl_var name='id'}">
        <div class="buttonHolder buttons">
            <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','sites/web_domain_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
            <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('sites/web_domain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
            <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','sites/web_vhost_domain_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
            <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('sites/web_vhost_domain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
        </div>
    </div>
interface/web/sites/templates/web_vhost_domain_backup.htm
File was renamed from interface/web/sites/templates/web_domain_backup.htm
@@ -37,8 +37,8 @@
        <input type="hidden" name="id" value="{tmpl_var name='id'}">
        <div class="buttonHolder buttons">
            <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','sites/web_domain_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
            <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('sites/web_domain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
            <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','sites/web_vhost_domain_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
            <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('sites/web_vhost_domain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
        </div>
    </div>
interface/web/sites/templates/web_vhost_domain_edit.htm
File was renamed from interface/web/sites/templates/web_domain_edit.htm
@@ -14,6 +14,7 @@
    <div class="pnl_formsarea">
        <fieldset class="inlineLabels">
        <tmpl_if name="vhostdomain_type" value="domain">
            <tmpl_if name="is_admin">
                <div class="ctrlHolder">
                    <tmpl_if name="edit_disabled">
@@ -89,6 +90,60 @@
                <label for="hd_quota">{tmpl_var name='hd_quota_txt'}</label>
                <input name="hd_quota" id="hd_quota" value="{tmpl_var name='hd_quota'}" size="7" maxlength="7" type="text" class="textInput formLengthLimit" />&nbsp;MB
            </div>
        </tmpl_if>
        <tmpl_if name="vhostdomain_type" value="subdomain">
            <input type="hidden" name="server_id" id="server_id" value="{tmpl_var name='server_id_value'}" />
            <tmpl_if name="domain_option">
            <div class="ctrlHolder">
                <label for="parent_domain_id">{tmpl_var name='parent_domain_id_txt'}</label>
                <select id="parent_domain_id" name="parent_domain_id" class="selectInput formLengthHalf">{tmpl_var name='parent_domain_id'}</select>
            </div>
            </tmpl_if>
            <div class="ctrlHolder">
                <label for="domain">{tmpl_var name='host_txt'}</label>
                <input name="domain" id="domain" value="{tmpl_var name='domain'}" size="30" maxlength="255" type="text" class="textInput formLengthHalf" />
            </div>
            <tmpl_if name="domain_option">
            <div class="ctrlHolder">
                <label for="sel_domain">{tmpl_var name='domain_txt'}</label>
                    <select name="sel_domain" id="sel_domain" class="selectInput">
                        {tmpl_var name='domain_option'}
                    </select>
            </div>
            <tmpl_else>
            <div class="ctrlHolder">
                <label for="parent_domain_id">{tmpl_var name='domain_txt'}</label>
                <select id="parent_domain_id" name="parent_domain_id" class="selectInput formLengthHalf">{tmpl_var name='parent_domain_id'}</select>
            </div>
            </tmpl_if>
            <div class="ctrlHolder">
                <label for="web_folder">{tmpl_var name='web_folder_txt'}</label>
                <input name="web_folder" id="web_folder" value="{tmpl_var name='web_folder'}" size="30" maxlength="100" type="text" class="textInput formLengthHalf"<tmpl_if name='fixed_folder' op='==' value='y'> readonly="readonly"</tmpl_if> />
            </div>
        </tmpl_if>
        <tmpl_if name="vhostdomain_type" value="aliasdomain">
            <input type="hidden" name="server_id" id="server_id" value="{tmpl_var name='server_id_value'}" />
            <div class="ctrlHolder">
                <label for="domain">{tmpl_var name='domain_txt'}</label>
                <tmpl_if name="domain_option">
                    <select name="domain" id="domain" class="selectInput">
                        {tmpl_var name='domain_option'}
                    </select>
                    <tmpl_else>
                        <input name="domain" id="domain" value="{tmpl_var name='domain'}" size="30" maxlength="255" type="text" class="textInput" />
                </tmpl_if>
            </div>
            <div class="ctrlHolder">
                <label for="parent_domain_id">{tmpl_var name='parent_domain_id_txt'}</label>
                <select name="parent_domain_id" id="parent_domain_id" class="selectInput">
                    {tmpl_var name='parent_domain_id'}
                </select>
            </div>
            <div class="ctrlHolder">
                <label for="web_folder">{tmpl_var name='web_folder_txt'}</label>
                <input name="web_folder" id="web_folder" value="{tmpl_var name='web_folder'}" size="30" maxlength="100" type="text" class="textInput formLengthHalf"<tmpl_if name='fixed_folder' op='==' value='y'> readonly="readonly"</tmpl_if> />
            </div>
        </tmpl_if>
            <div class="ctrlHolder">
                <label for="traffic_quota">{tmpl_var name='traffic_quota_txt'}</label>
                <input name="traffic_quota" id="traffic_quota" value="{tmpl_var name='traffic_quota'}" size="7" maxlength="7" type="text" class="textInput formLengthLimit" />&nbsp;MB <tmpl_var name='traffic_quota_exceeded_txt'>
@@ -172,7 +227,7 @@
        <div class="buttonHolder buttons">
            <button id="dom-edit-submit" class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}"><span>{tmpl_var name='btn_save_txt'}</span></button>
            <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('sites/web_domain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
            <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('sites/web_vhost_domain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
        </div>
    </div>
@@ -216,7 +271,19 @@
            jQuery('.fastcgi_php_version:visible').hide();
        }
    });
    jQuery('#parent_domain_id').change(function() {
        reloadServerId(false);
    });
    function reloadServerId(noFormChange) {
        var parentWebId = jQuery('#parent_domain_id').val();
        jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {web_id : parentWebId, type : "getserverid"}, function(data) {
            if(data.serverid) serverId = data.serverid;
            adjustForm(noFormChange);
            if(noFormChange) reloadFastcgiPHPVersions(noFormChange);
        });
    }
    function adjustForm(noFormChange){
        jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {server_id : serverId, type : "getservertype"}, function(data) {
            if(data.servertype == "nginx"){
@@ -271,11 +338,11 @@
    <tmpl_if name="readonly_tab">
        jQuery('div.panel_web_domain').find('fieldset').find('input,select,button').bind('click mousedown', function(e) { e.preventDefault(); }).focus(function() { $(this).blur(); });
        jQuery('#dom-edit-submit').click(function() {
               submitForm('pageForm','sites/web_domain_edit.php');
               submitForm('pageForm','sites/web_vhost_domain_edit.php');
        });
    <tmpl_else>
        jQuery('#dom-edit-submit').click(function() {
            submitForm('pageForm','sites/web_domain_edit.php');
            submitForm('pageForm','sites/web_vhost_domain_edit.php');
        });
    </tmpl_if>
            
interface/web/sites/templates/web_vhost_domain_list.htm
File was renamed from interface/web/sites/templates/web_domain_list.htm
@@ -1,7 +1,7 @@
<h2><tmpl_var name="list_head_txt"></h2>
<p><tmpl_var name="list_desc_txt"></p>
<div class="panel panel_list_web_domain">
<div class="panel panel_list_web_vhost_domain">
    <div class="pnl_toolsarea">
        <tmpl_if name='datalog_changes_count' op='>' value='0'>
@@ -22,7 +22,7 @@
        </tmpl_if>
        <fieldset><legend>{tmpl_var name="toolsarea_head_txt"}</legend>
            <div class="buttons">
                <button class="button iconstxt icoAdd" type="button" onclick="loadContent('sites/web_domain_edit.php');">
                <button class="button iconstxt icoAdd" type="button" onclick="loadContent('sites/web_vhost_domain_edit.php?type={tmpl_var name='vhostdomain_type'}');">
                    <span>{tmpl_var name="add_new_record_txt"}</span>
                </button>
            </div>
@@ -34,31 +34,34 @@
            <table class="list">
                <thead>
                <tr class="caption">
                    <th class="tbl_col_domain_id" scope="col"><tmpl_var name="domain_id_txt"></th>
                    <tmpl_if name="vhostdomain_type" value="domain"><th class="tbl_col_domain_id" scope="col"><tmpl_var name="domain_id_txt"></th></tmpl_if>
                    <th class="tbl_col_active" scope="col"><tmpl_var name="active_txt"></th>
                    <th class="tbl_col_server_id" scope="col"><tmpl_var name="server_id_txt"></th>
                    <tmpl_if name="vhostdomain_type" op="!=" value="domain"><th class="tbl_col_parent_domain_id" scope="col"><tmpl_var name="parent_domain_id_txt"></th></tmpl_if>
                    <th class="tbl_col_domain" scope="col"><tmpl_var name="domain_txt"></th>
                    <th class="tbl_col_limit" scope="col">{tmpl_var name='search_limit'}</th>
                </tr>
                <tr class="filter">
                    <td class="tbl_col_domain_id"><input type="text" size="5" name="search_domain_id" value="{tmpl_var name='search_domain_id'}" /></td>
                    <tmpl_if name="vhostdomain_type" value="domain"><td class="tbl_col_domain_id"><input type="text" size="5" name="search_domain_id" value="{tmpl_var name='search_domain_id'}" /></td></tmpl_if>
                    <td class="tbl_col_active"><select name="search_active">{tmpl_var name='search_active'}</select></td>
                    <td class="tbl_col_server_id"><select name="search_server_id">{tmpl_var name='search_server_id'}</select></td>
                    <tmpl_if name="vhostdomain_type" op="!=" value="domain"><td class="tbl_col_parent_domain_id"><select name="search_parent_domain_id">{tmpl_var name='search_parent_domain_id'}</select></td></tmpl_if>
                    <td class="tbl_col_domain"><input type="text" name="search_domain" value="{tmpl_var name='search_domain'}" /></td>
                    <td class="tbl_col_buttons">
                        <button type="button" class="button icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="submitForm('pageForm','sites/web_domain_list.php');"><span>{tmpl_var name="filter_txt"}</span></button>
                        <button type="button" class="button icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onclick="submitForm('pageForm','sites/web_vhost_domain_list.php');"><span>{tmpl_var name="filter_txt"}</span></button>
                    </td>
                </tr>
                </thead>
                <tbody>
                <tmpl_loop name="records">
                    <tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
                        <td class="tbl_col_domain_id"><a href="#" onclick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="domain_id"}</a></td>
                        <td class="tbl_col_active"><a href="#" onclick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="active"}</a></td>
                        <td class="tbl_col_server_id"><a href="#" onclick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="server_id"}</a></td>
                        <td class="tbl_col_domain"><a href="#" onclick="loadContent('sites/web_domain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="domain"}</a><a href="http://{tmpl_var name="domain"}" target="_blank" class="button icons16 icoLink"><span>Link</span></a></td>
                        <tmpl_if name="vhostdomain_type" value="domain"><td class="tbl_col_domain_id"><a href="#" onclick="loadContent('sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}&type={tmpl_var name='vhostdomain_type'}');">{tmpl_var name="domain_id"}</a></td></tmpl_if>
                        <td class="tbl_col_active"><a href="#" onclick="loadContent('sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}&type={tmpl_var name='vhostdomain_type'}');">{tmpl_var name="active"}</a></td>
                        <td class="tbl_col_server_id"><a href="#" onclick="loadContent('sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}&type={tmpl_var name='vhostdomain_type'}');">{tmpl_var name="server_id"}</a></td>
                        <tmpl_if name="vhostdomain_type" op="!=" value="domain"><td class="tbl_col_parent_domain_id"><a href="#" onclick="loadContent('sites/web_vhost_aliasdomain_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="parent_domain_id"}</a></td></tmpl_if>
                        <td class="tbl_col_domain"><a href="#" onclick="loadContent('sites/web_vhost_domain_edit.php?id={tmpl_var name='id'}&type={tmpl_var name='vhostdomain_type'}');">{tmpl_var name="domain"}</a><a href="http://{tmpl_var name="domain"}" target="_blank" class="button icons16 icoLink"><span>Link</span></a></td>
                        <td class="tbl_col_buttons">
                            <a class="button icons16 icoDelete" href="javascript: del_record('sites/web_domain_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>
                            <a class="button icons16 icoDelete" href="javascript: del_record('sites/web_vhost_domain_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>
                        </td>
                    </tr>
                </tmpl_loop>
interface/web/sites/templates/web_vhost_domain_redirect.htm
File was renamed from interface/web/sites/templates/web_domain_redirect.htm
@@ -39,8 +39,8 @@
        <input type="hidden" name="id" value="{tmpl_var name='id'}">
        <div class="buttonHolder buttons">
            <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','sites/web_domain_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
            <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('sites/web_domain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
            <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','sites/web_vhost_domain_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
            <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('sites/web_vhost_domain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
        </div>
    </div>
interface/web/sites/templates/web_vhost_domain_ssl.htm
File was renamed from interface/web/sites/templates/web_domain_ssl.htm
@@ -69,8 +69,8 @@
        <input type="hidden" name="id" value="{tmpl_var name='id'}">
        <div class="buttonHolder buttons">
            <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','sites/web_domain_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
            <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('sites/web_domain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
            <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','sites/web_vhost_domain_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
            <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('sites/web_vhost_domain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
        </div>
    </div>
interface/web/sites/templates/web_vhost_domain_stats.htm
File was renamed from interface/web/sites/templates/web_domain_stats.htm
@@ -43,8 +43,8 @@
        <input type="hidden" name="id" value="{tmpl_var name='id'}">
        <div class="buttonHolder buttons">
            <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','sites/web_domain_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
            <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('sites/web_domain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
            <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onclick="submitForm('pageForm','sites/web_vhost_domain_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button>
            <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onclick="loadContent('sites/web_vhost_domain_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button>
        </div>
    </div>
interface/web/sites/templates/web_vhost_subdomain_advanced.htm
File was deleted
interface/web/sites/templates/web_vhost_subdomain_backup.htm
File was deleted
interface/web/sites/templates/web_vhost_subdomain_edit.htm
File was deleted
interface/web/sites/templates/web_vhost_subdomain_list.htm
File was deleted
interface/web/sites/templates/web_vhost_subdomain_redirect.htm
File was deleted
interface/web/sites/templates/web_vhost_subdomain_ssl.htm
File was deleted
interface/web/sites/templates/web_vhost_subdomain_stats.htm
File was deleted
interface/web/sites/web_domain_del.php
File was deleted
interface/web/sites/web_vhost_aliasdomain_del.php
File was deleted
interface/web/sites/web_vhost_aliasdomain_edit.php
File was deleted
interface/web/sites/web_vhost_aliasdomain_list.php
File was deleted
interface/web/sites/web_vhost_domain_del.php
New file
@@ -0,0 +1,142 @@
<?php
/*
Copyright (c) 2007, Till Brehm, projektfarm Gmbh
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
    * Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
    * Neither the name of ISPConfig nor the names of its contributors
      may be used to endorse or promote products derived from this software without
      specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/******************************************
* Begin Form configuration
******************************************/
$list_def_file = "list/web_vhost_domain.list.php";
$tform_def_file = "form/web_vhost_domain.tform.php";
/******************************************
* End Form configuration
******************************************/
require_once '../../lib/config.inc.php';
require_once '../../lib/app.inc.php';
//* Check permissions for module
$app->auth->check_module_permissions('sites');
$app->uses('tpl,tform,tform_actions');
$app->load('tform_actions');
//* Get and set the vhost domain type - store in session
$show_type = 'domain';
if(isset($_GET['type']) && $_GET['type'] == 'subdomain') {
    $show_type = 'subdomain';
} elseif(isset($_GET['type']) && $_GET['type'] == 'aliasdomain') {
    $show_type = 'aliasdomain';
} elseif(!isset($_GET['type']) && isset($_SESSION['s']['var']['vhostdomain_type']) && $_SESSION['s']['var']['vhostdomain_type'] == 'subdomain') {
    $show_type = 'subdomain';
} elseif(!isset($_GET['type']) && isset($_SESSION['s']['var']['vhostdomain_type']) && $_SESSION['s']['var']['vhostdomain_type'] == 'aliasdomain') {
    $show_type = 'aliasdomain';
}
$_SESSION['s']['var']['vhostdomain_type'] = $show_type;
class page_action extends tform_actions {
    function onBeforeDelete() {
        global $app; $conf;
        if($_SESSION['s']['var']['vhostdomain_type'] == 'domain') {
            if($app->tform->checkPerm($this->id, 'd') == false) $app->error($app->lng('error_no_delete_permission'));
            //* Delete all records that belong to this web.
            $records = $app->db->queryAllRecords("SELECT domain_id FROM web_domain WHERE parent_domain_id = '".$app->functions->intval($this->id)."' AND type != 'vhost'");
            foreach($records as $rec) {
                $app->db->datalogDelete('web_domain', 'domain_id', $rec['domain_id']);
            }
            //* Delete all records that belong to this web.
            $records = $app->db->queryAllRecords("SELECT ftp_user_id FROM ftp_user WHERE parent_domain_id = '".$app->functions->intval($this->id)."'");
            foreach($records as $rec) {
                $app->db->datalogDelete('ftp_user', 'ftp_user_id', $rec['ftp_user_id']);
            }
            //* Delete all records that belong to this web.
            $records = $app->db->queryAllRecords("SELECT shell_user_id FROM shell_user WHERE parent_domain_id = '".$app->functions->intval($this->id)."'");
            foreach($records as $rec) {
                $app->db->datalogDelete('shell_user', 'shell_user_id', $rec['shell_user_id']);
            }
            //* Delete all records that belong to this web.
            $records = $app->db->queryAllRecords("SELECT id FROM cron WHERE parent_domain_id = '".$app->functions->intval($this->id)."'");
            foreach($records as $rec) {
                $app->db->datalogDelete('cron', 'id', $rec['id']);
            }
            //* Delete all records that belong to this web
            $records = $app->db->queryAllRecords("SELECT webdav_user_id FROM webdav_user WHERE parent_domain_id = '".$app->functions->intval($this->id)."'");
            foreach($records as $rec) {
                $app->db->datalogDelete('webdav_user', 'webdav_user_id', $rec['webdav_user_id']);
            }
            //* Delete all records that belong to this web
            $records = $app->db->queryAllRecords("SELECT backup_id FROM web_backup WHERE parent_domain_id = '".$app->functions->intval($this->id)."'");
            foreach($records as $rec) {
                $app->db->datalogDelete('web_backup', 'backup_id', $rec['backup_id']);
            }
            //* Delete all records that belog to this web.
            $web_domain = $app->db->queryOneRecord("SELECT domain FROM web_domain WHERE domain_id = ".$app->functions->intval($this->id));
            if($web_domain['domain'] != ''){
                $aps_instances = $app->db->queryAllRecords("SELECT instance_id FROM aps_instances_settings WHERE name = 'main_domain' AND value = '".$app->db->quote($web_domain['domain'])."'");
                if(is_array($aps_instances) && !empty($aps_instances)){
                    foreach($aps_instances as $aps_instance){
                        if($aps_instance['instance_id'] > 0){
                            $app->db->datalogDelete('aps_instances_settings', 'instance_id', $aps_instance['instance_id']);
                            $app->db->datalogDelete('aps_instances', 'id', $aps_instance['instance_id']);
                        }
                    }
                }
            }
        }
        //* Delete all web folders
        $records = $app->db->queryAllRecords("SELECT web_folder_id FROM web_folder WHERE parent_domain_id = '".$app->functions->intval($this->id)."'");
        foreach($records as $rec) {
            //* Delete all web folder users
            $records2 = $app->db->queryAllRecords("SELECT web_folder_user_id FROM web_folder_user WHERE web_folder_id = '".$app->functions->intval($rec['web_folder_id'])."'");
            foreach($records2 as $rec2) {
                $app->db->datalogDelete('web_folder_user', 'web_folder_user_id', $rec2['web_folder_user_id']);
            }
            $app->db->datalogDelete('web_folder', 'web_folder_id', $rec['web_folder_id']);
        }
    }
}
$page = new page_action;
$page->onDelete();
?>
interface/web/sites/web_vhost_domain_edit.php
File was renamed from interface/web/sites/web_domain_edit.php
@@ -32,7 +32,7 @@
* Begin Form configuration
******************************************/
$tform_def_file = "form/web_domain.tform.php";
$tform_def_file = "form/web_vhost_domain.tform.php";
/******************************************
* End Form configuration
@@ -49,6 +49,7 @@
$app->load('tform_actions');
class page_action extends tform_actions {
    var $_vhostdomain_type = 'domain';
    //* Returna a "3/2/1" path hash from a numeric id '123'
    function id_hash($id, $levels) {
@@ -63,18 +64,51 @@
        return $hash;
    }
    function onLoad() {
        $show_type = 'domain';
        if(isset($_GET['type']) && $_GET['type'] == 'subdomain') {
            $show_type = 'subdomain';
        } elseif(isset($_GET['type']) && $_GET['type'] == 'aliasdomain') {
            $show_type = 'aliasdomain';
        } elseif(!isset($_GET['type']) && isset($_SESSION['s']['var']['vhostdomain_type']) && $_SESSION['s']['var']['vhostdomain_type'] == 'subdomain') {
            $show_type = 'subdomain';
        } elseif(!isset($_GET['type']) && isset($_SESSION['s']['var']['vhostdomain_type']) && $_SESSION['s']['var']['vhostdomain_type'] == 'aliasdomain') {
            $show_type = 'aliasdomain';
        }
        $_SESSION['s']['var']['vhostdomain_type'] = $show_type;
        $this->_vhostdomain_type = $show_type;
        parent::onLoad();
    }
    function onShowNew() {
        global $app, $conf;
        // we will check only users, not admins
        if($_SESSION["s"]["user"]["typ"] == 'user') {
            if(!$app->tform->checkClientLimit('limit_web_domain', "type = 'vhost'")) {
                $app->error($app->tform->wordbook["limit_web_domain_txt"]);
            if($this->_vhostdomain_type == 'domain') {
                if(!$app->tform->checkClientLimit('limit_web_domain', "type = 'vhost'")) {
                    $app->error($app->tform->wordbook["limit_web_domain_txt"]);
                }
                if(!$app->tform->checkResellerLimit('limit_web_domain', "type = 'vhost'")) {
                    $app->error('Reseller: '.$app->tform->wordbook["limit_web_domain_txt"]);
                }
            } elseif($this->_vhostdomain_type == 'subdomain') {
                if(!$app->tform->checkClientLimit('limit_web_subdomain', "(type = 'subdomain' OR type = 'vhostsubdomain')")) {
                    $app->error($app->tform->wordbook["limit_web_subdomain_txt"]);
                }
                if(!$app->tform->checkResellerLimit('limit_web_subdomain', "(type = 'subdomain' OR type = 'vhostsubdomain')")) {
                    $app->error('Reseller: '.$app->tform->wordbook["limit_web_subdomain_txt"]);
                }
            } elseif($this->_vhostdomain_type == 'aliasdomain') {
                if(!$app->tform->checkClientLimit('limit_web_aliasdomain', "(type = 'alias' OR type = 'vhostalias')")) {
                    $app->error($app->tform->wordbook["limit_web_aliasdomain_txt"]);
                }
                if(!$app->tform->checkResellerLimit('limit_web_aliasdomain', "(type = 'alias' OR type = 'vhostalias')")) {
                    $app->error('Reseller: '.$app->tform->wordbook["limit_web_aliasdomain_txt"]);
                }
            }
            if(!$app->tform->checkResellerLimit('limit_web_domain', "type = 'vhost'")) {
                $app->error('Reseller: '.$app->tform->wordbook["limit_web_domain_txt"]);
            }
            // Get the limits of the client
            $client_group_id = $_SESSION["s"]["user"]["default_group"];
            $client = $app->db->queryOneRecord("SELECT client.web_servers FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
@@ -84,6 +118,7 @@
        }
        $app->tform->formDef['tabs']['domain']['readonly'] = false;
        $app->tpl->setVar('vhostdomain_type', $this->_vhostdomain_type);
        parent::onShowNew();
    }
@@ -94,15 +129,22 @@
        $read_limits = array('limit_cgi', 'limit_ssi', 'limit_perl', 'limit_ruby', 'limit_python', 'force_suexec', 'limit_hterror', 'limit_wildcard', 'limit_ssl');
        if($this->_vhostdomain_type != 'domain') $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]));
        //* Client: If the logged in user is not admin and has no sub clients (no reseller)
        if($_SESSION["s"]["user"]["typ"] != 'admin' && !$app->auth->has_clients($_SESSION['s']['user']['userid'])) {
            // Get the limits of the client
            $client_group_id = $_SESSION["s"]["user"]["default_group"];
            $client = $app->db->queryOneRecord("SELECT client.limit_web_domain, client.web_servers, client." . implode(", client.", $read_limits) . " FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
            $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
            if($this->_vhostdomain_type == 'domain') {
                $client = $app->db->queryOneRecord("SELECT client.limit_web_domain, client.web_servers, client." . implode(", client.", $read_limits) . " FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
            } elseif($this->_vhostdomain_type == 'subdomain') {
                $client = $app->db->queryOneRecord("SELECT client.limit_web_subdomain, client.web_servers, client.default_webserver, client." . implode(", client.", $read_limits) . " FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
            } elseif($this->_vhostdomain_type == 'aliasdomain') {
                $client = $app->db->queryOneRecord("SELECT client.limit_web_aliasdomain, client.web_servers, client.default_webserver, client." . implode(", client.", $read_limits) . " FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
            }
            $client['web_servers_ids'] = explode(',', $client['web_servers']);
            $only_one_server = count($client['web_servers_ids']) === 1;
            $app->tpl->setVar('only_one_server', $only_one_server);
@@ -178,11 +220,21 @@
            $server_type = 'apache';
            if(!empty($web_config['server_type'])) $server_type = $web_config['server_type'];
            if($server_type == 'nginx' && $this->dataRecord['php'] == 'fast-cgi') $this->dataRecord['php'] = 'php-fpm';
            if($this->dataRecord['php'] == 'php-fpm'){
                $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = ".($this->id > 0 ? $app->functions->intval($this->dataRecord['server_id']) : $app->functions->intval($client['default_webserver']))." AND (client_id = 0 OR client_id=".$app->functions->intval($_SESSION['s']['user']['client_id']).")");
            }
            if($this->dataRecord['php'] == 'fast-cgi'){
                $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ".($this->id > 0 ? $app->functions->intval($this->dataRecord['server_id']) : $app->functions->intval($client['default_webserver']))." AND (client_id = 0 OR client_id=".$app->functions->intval($_SESSION['s']['user']['client_id']).")");
            if($this->_vhostdomain_type == 'domain') {
                if($this->dataRecord['php'] == 'php-fpm'){
                    $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = ".($this->id > 0 ? $app->functions->intval($this->dataRecord['server_id']) : $app->functions->intval($client['default_webserver']))." AND (client_id = 0 OR client_id=".$app->functions->intval($_SESSION['s']['user']['client_id']).")");
                }
                if($this->dataRecord['php'] == 'fast-cgi'){
                    $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ".($this->id > 0 ? $app->functions->intval($this->dataRecord['server_id']) : $app->functions->intval($client['default_webserver']))." AND (client_id = 0 OR client_id=".$app->functions->intval($_SESSION['s']['user']['client_id']).")");
                }
            } else {
                if($this->dataRecord['php'] == 'php-fpm'){
                    $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = ".$app->functions->intval($parent_domain['server_id'])." AND (client_id = 0 OR client_id=".$app->functions->intval($_SESSION['s']['user']['client_id']).")");
                }
                if($this->dataRecord['php'] == 'fast-cgi'){
                    $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ".$app->functions->intval($parent_domain['server_id'])." AND (client_id = 0 OR client_id=".$app->functions->intval($_SESSION['s']['user']['client_id']).")");
                }
            }
            $php_select = "<option value=''>Default</option>";
            if(is_array($php_records) && !empty($php_records)) {
@@ -208,7 +260,18 @@
            // Get the limits of the client
            $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
            $client = $app->db->queryOneRecord("SELECT client.client_id, client.limit_web_domain, client.default_webserver, client.contact_name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname, sys_group.name, client." . implode(", client.", $read_limits) . " FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
            if($this->_vhostdomain_type == 'domain') {
                $client = $app->db->queryOneRecord("SELECT client.client_id, client.limit_web_domain, client.web_servers, client.default_webserver, client.contact_name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname, sys_group.name, client." . implode(", client.", $read_limits) . " FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
                $app->tpl->setVar('only_one_server', $only_one_server);
            } elseif($this->_vhostdomain_type == 'subdomain') {
                $client = $app->db->queryOneRecord("SELECT client.client_id, client.limit_web_subdomain, client.web_servers, client.default_webserver, client.contact_name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname, sys_group.name, client." . implode(", client.", $read_limits) . " FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
            } elseif($this->_vhostdomain_type == 'aliasdomain') {
                $client = $app->db->queryOneRecord("SELECT client.client_id, client.limit_web_aliasdomain, client.web_servers, client.default_webserver, client.contact_name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname, sys_group.name, client." . implode(", client.", $read_limits) . " FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
            }
            $client['web_servers_ids'] = explode(',', $client['web_servers']);
            $only_one_server = count($client['web_servers_ids']) === 1;
            //* Get global web config
            foreach ($client['web_servers_ids'] as $web_server_id) {
@@ -291,11 +354,20 @@
            $selected_client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = ".$app->functions->intval($selected_client_group_id));
            //$sql_where = " AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id']." OR client_id = ".intval($selected_client['client_id']).")";
            $sql_where = " AND (client_id = 0 OR client_id = ".intval($selected_client['client_id']).")";
            if($this->dataRecord['php'] == 'php-fpm'){
                $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = ".($this->id > 0 ? $app->functions->intval($this->dataRecord['server_id']) : $app->functions->intval($client['default_webserver'])).$sql_where);
            }
            if($this->dataRecord['php'] == 'fast-cgi') {
                $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ".($this->id > 0 ? $app->functions->intval($this->dataRecord['server_id']) : $app->functions->intval($client['default_webserver'])).$sql_where);
            if($this->_vhostdomain_type == 'domain') {
                if($this->dataRecord['php'] == 'php-fpm'){
                    $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = ".($this->id > 0 ? $app->functions->intval($this->dataRecord['server_id']) : $app->functions->intval($client['default_webserver'])).$sql_where);
                }
                if($this->dataRecord['php'] == 'fast-cgi') {
                    $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ".($this->id > 0 ? $app->functions->intval($this->dataRecord['server_id']) : $app->functions->intval($client['default_webserver'])).$sql_where);
                }
            } else {
                if($this->dataRecord['php'] == 'php-fpm'){
                    $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = ".$app->functions->intval($parent_domain['server_id'])." AND (client_id = 0 OR client_id=".$app->functions->intval($_SESSION['s']['user']['client_id']).")");
                }
                if($this->dataRecord['php'] == 'fast-cgi') {
                    $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ".$app->functions->intval($parent_domain['server_id'])." AND (client_id = 0 OR client_id=".$app->functions->intval($_SESSION['s']['user']['client_id']).")");
                }
            }
            $php_select = "<option value=''>Default</option>";
            if(is_array($php_records) && !empty($php_records)) {
@@ -366,22 +438,27 @@
            //* Admin: If the logged in user is admin
        } else {
            // The user is admin, so we fill in all IP addresses of the server
            if($this->id > 0) {
                if(!isset($this->dataRecord["server_id"])){
                    $tmp = $app->db->queryOneRecord("SELECT server_id FROM web_domain WHERE domain_id = ".$app->functions->intval($this->id));
                    $this->dataRecord["server_id"] = $tmp["server_id"];
                    unset($tmp);
            if($this->_vhostdomain_type == 'domain') {
                // The user is admin, so we fill in all IP addresses of the server
                if($this->id > 0) {
                    if(!isset($this->dataRecord["server_id"])){
                        $tmp = $app->db->queryOneRecord("SELECT server_id FROM web_domain WHERE domain_id = ".$app->functions->intval($this->id));
                        $this->dataRecord["server_id"] = $tmp["server_id"];
                        unset($tmp);
                    }
                    $server_id = intval(@$this->dataRecord["server_id"]);
                } else {
                    // Get the first server ID
                    $tmp = $app->db->queryOneRecord("SELECT server_id FROM server WHERE web_server = 1 ORDER BY server_name LIMIT 0,1");
                    $server_id = intval($tmp['server_id']);
                }
                $server_id = intval(@$this->dataRecord["server_id"]);
            } else {
                // Get the first server ID
                $tmp = $app->db->queryOneRecord("SELECT server_id FROM server WHERE web_server = 1 ORDER BY server_name LIMIT 0,1");
                $server_id = intval($tmp['server_id']);
            }
            //* get global web config
            $web_config = $app->getconf->get_server_config($server_id, 'web');
                //* get global web config
                $web_config = $app->getconf->get_server_config($server_id, 'web');
            } else {
                //* get global web config
                $web_config = $app->getconf->get_server_config($parent_domain['server_id'], 'web');
            }
            //* Fill the IPv4 select field
            $sql = "SELECT ip_address FROM server_ip WHERE ip_type = 'IPv4' AND server_id = ".$app->functions->intval($server_id);
@@ -437,11 +514,20 @@
            $selected_client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = ".$app->functions->intval($selected_client_group_id));
            //$sql_where = " AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id']." OR client_id = ".intval($selected_client['client_id']).")";
            $sql_where = " AND (client_id = 0 OR client_id = ".$app->functions->intval($selected_client['client_id']).")";
            if($this->dataRecord['php'] == 'php-fpm'){
                $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = $server_id".$sql_where);
            }
            if($this->dataRecord['php'] == 'fast-cgi') {
                $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ".$app->functions->intval($server_id).$sql_where);
            if($this->_vhostdomain_type == 'domain') {
                if($this->dataRecord['php'] == 'php-fpm'){
                    $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = $server_id".$sql_where);
                }
                if($this->dataRecord['php'] == 'fast-cgi') {
                    $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ".$app->functions->intval($server_id).$sql_where);
                }
            } else {
                if($this->dataRecord['php'] == 'php-fpm'){
                    $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = " . $app->functions->intval($parent_domain['server_id']));
                }
                if($this->dataRecord['php'] == 'fast-cgi') {
                    $php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = " . $app->functions->intval($parent_domain['server_id']));
                }
            }
            $php_select = "<option value=''>Default</option>";
            if(is_array($php_records) && !empty($php_records)) {
@@ -523,9 +609,13 @@
        if($this->id > 0) {
            //* we are editing a existing record
            $app->tpl->setVar("edit_disabled", 1);
            $app->tpl->setVar("server_id_value", $this->dataRecord["server_id"]);
            $app->tpl->setVar('fixed_folder', 'y');
            if($this->_vhostdomain_type == 'domain') $app->tpl->setVar("server_id_value", $this->dataRecord["server_id"]);
            else $app->tpl->setVar('server_id_value', $parent_domain['server_id']);
        } else {
            $app->tpl->setVar("edit_disabled", 0);
            $app->tpl->setVar('fixed_folder', 'n');
            if($this->_vhostdomain_type != 'domain') $app->tpl->setVar('server_id_value', $parent_domain['server_id']);
        }
        $tmp_txt = ($this->dataRecord['traffic_quota_lock'] == 'y')?'<b>('.$app->tform->lng('traffic_quota_exceeded_txt').')</b>':'';
@@ -535,6 +625,7 @@
         * Now we have to check, if we should use the domain-module to select the domain
         * or not
         */
        $app->uses('ini_parser,getconf');
        $settings = $app->getconf->get_global_config('domains');
        if ($settings['use_domain_module'] == 'y') {
            /*
@@ -542,11 +633,17 @@
            */
            $domains = $app->tools_sites->getDomainModuleDomains();
            $domain_select = '';
            $selected_domain = '';
            if(is_array($domains) && sizeof($domains) > 0) {
                /* We have domains in the list, so create the drop-down-list */
                foreach( $domains as $domain) {
                    $domain_select .= "<option value=" . $domain['domain_id'] ;
                    if ($domain['domain'] == $this->dataRecord["domain"]) {
                    if ($this->_vhostdomain_type == 'subdomain' && '.' . $domain['domain'] == substr($this->dataRecord["domain"], -strlen($domain['domain']) - 1)) {
                        $domain_select .= " selected";
                        $selected_domain = $domain['domain'];
                    } elseif($this->_vhostdomain_type == 'aliasdomain' && $domain['domain'] == $this->dataRecord["domain"]) {
                        $domain_select .= " selected";
                    } elseif($this->_vhostdomain_type == 'domain' && $domain['domain'] == $this->dataRecord["domain"]) {
                        $domain_select .= " selected";
                    }
                    $domain_select .= ">" . $app->functions->idn_decode($domain['domain']) . "</option>\r\n";
@@ -562,6 +659,7 @@
            }
            $app->tpl->setVar("domain_option", $domain_select);
        }
        if($this->_vhostdomain_type != 'domain') $app->tpl->setVar("domain", $this->dataRecord["domain"]);
        // check for configuration errors in sys_datalog
        if($this->id > 0) {
@@ -573,6 +671,8 @@
                }
            }
        }
        $app->tpl->setVar('vhostdomain_type', $this->_vhostdomain_type);
        parent::onShowEnd();
    }
@@ -586,38 +686,86 @@
    function onSubmit() {
        global $app, $conf;
        // Set a few fixed values
        $this->dataRecord["vhost_type"] = 'name';
        if($this->_vhostdomain_type == 'domain') {
            $this->dataRecord["parent_domain_id"] = 0;
            $this->dataRecord["type"] = 'vhost';
        } else {
            // Get the record of the parent domain
            if(!@$this->dataRecord["parent_domain_id"] && $this->id) {
                $tmp = $app->db->queryOneRecord("SELECT parent_domain_id FROM web_domain WHERE domain_id = ".$app->functions->intval($this->id));
                if($tmp) $this->dataRecord["parent_domain_id"] = $tmp['parent_domain_id'];
                unset($tmp);
            }
            $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r'));
            if(!$parent_domain || $parent_domain['domain_id'] != @$this->dataRecord['parent_domain_id']) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm");
            if($this->_vhostdomain_type == 'subdomain') {
                $this->dataRecord["type"] = 'vhostsubdomain';
            } else {
                $this->dataRecord["type"] = 'vhostalias';
            }
            $this->dataRecord["server_id"] = $parent_domain["server_id"];
            $this->dataRecord["ip_address"] = $parent_domain["ip_address"];
            $this->dataRecord["ipv6_address"] = $parent_domain["ipv6_address"];
            $this->dataRecord["client_group_id"] = $parent_domain["client_group_id"];
            $this->parent_domain_record = $parent_domain;
        }
        $read_limits = array('limit_cgi', 'limit_ssi', 'limit_perl', 'limit_ruby', 'limit_python', 'force_suexec', 'limit_hterror', 'limit_wildcard', 'limit_ssl');
        /* check if the domain module is used - and check if the selected domain can be used! */
        if($app->tform->getCurrentTab() == 'domain') {
            $app->uses('ini_parser,getconf');
            $settings = $app->getconf->get_global_config('domains');
            if ($settings['use_domain_module'] == 'y') {
                $domain_check = $app->tools_sites->checkDomainModuleDomain($this->dataRecord['domain']);
                if($this->_vhostdomain_type == 'subdomain') $domain_check = $app->tools_sites->checkDomainModuleDomain($this->dataRecord['sel_domain']);
                else $domain_check = $app->tools_sites->checkDomainModuleDomain($this->dataRecord['domain']);
                if(!$domain_check) {
                    // invalid domain selected
                    $app->tform->errorMessage .= $app->tform->lng("domain_error_empty")."<br />";
                } else {
                    $this->dataRecord['domain'] = $domain_check;
                    if($this->_vhostdomain_type == 'subdomain') $this->dataRecord['domain'] = $this->dataRecord['domain'] . '.' . $domain_check;
                    else $this->dataRecord['domain'] = $domain_check;
                }
            } else {
                if($this->_vhostdomain_type == 'subdomain') $this->dataRecord["domain"] = $this->dataRecord["domain"].'.'.$parent_domain["domain"];
            }
            if($this->_vhostdomain_type != 'domain') {
                $this->dataRecord['web_folder'] = strtolower($this->dataRecord['web_folder']);
                if(substr($this->dataRecord['web_folder'], 0, 1) === '/') $this->dataRecord['web_folder'] = substr($this->dataRecord['web_folder'], 1);
                if(substr($this->dataRecord['web_folder'], -1) === '/') $this->dataRecord['web_folder'] = substr($this->dataRecord['web_folder'], 0, -1);
                $forbidden_folders = array('', 'cgi-bin', 'log', 'private', 'ssl', 'tmp', 'webdav');
                $check_folder = strtolower($this->dataRecord['web_folder']);
                if(substr($check_folder, 0, 1) === '/') $check_folder = substr($check_folder, 1); // strip / at beginning to check against forbidden entries
                if(strpos($check_folder, '/') !== false) $check_folder = substr($check_folder, 0, strpos($check_folder, '/')); // get the first part of the path to check it
                if(in_array($check_folder, $forbidden_folders)) {
                    $app->tform->errorMessage .= $app->tform->lng("web_folder_invalid_txt")."<br>";
                }
                // vhostaliasdomains do not have a quota of their own
                $this->dataRecord["hd_quota"] = 0;
                // check for duplicate folder usage
                /*
                $check = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_domain` WHERE `type` = 'vhostalias' AND `parent_domain_id` = '" . $app->functions->intval($this->dataRecord['parent_domain_id']) . "' AND `web_folder` = '" . $app->db->quote($this->dataRecord['web_folder']) . "' AND `domain_id` != '" . $app->functions->intval($this->id) . "'");
                if($check && $check['cnt'] > 0) {
                    $app->tform->errorMessage .= $app->tform->lng("web_folder_unique_txt")."<br>";
                }
                */
            }
        }
        // nginx: if redirect type is proxy and redirect path is no URL, display error
        //if($this->dataRecord["redirect_type"] == 'proxy' && substr($this->dataRecord['redirect_path'],0,1) == '/'){
        // $app->tform->errorMessage .= $app->tform->lng("error_proxy_requires_url")."<br />";
        //}
        // Set a few fixed values
        $this->dataRecord["parent_domain_id"] = 0;
        $this->dataRecord["type"] = 'vhost';
        $this->dataRecord["vhost_type"] = 'name';
        $read_limits = array('limit_cgi', 'limit_ssi', 'limit_perl', 'limit_ruby', 'limit_python', 'force_suexec', 'limit_hterror', 'limit_wildcard', 'limit_ssl');
        if($_SESSION["s"]["user"]["typ"] != 'admin') {
            // Get the limits of the client
            $client_group_id = $_SESSION["s"]["user"]["default_group"];
            $client = $app->db->queryOneRecord("SELECT limit_traffic_quota, limit_web_domain, web_servers, parent_client_id, limit_web_quota, client." . implode(", client.", $read_limits) . " FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
            $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
            $client = $app->db->queryOneRecord("SELECT limit_traffic_quota, limit_web_domain, limit_web_aliasdomain, limit_web_subdomain, web_servers, parent_client_id, limit_web_quota, client." . implode(", client.", $read_limits) . " FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
            $client['web_servers_ids'] = explode(',', $client['web_servers']);
@@ -637,21 +785,23 @@
            } else {
                $old_web_values = array();
            }
            //* Check the website quota of the client
            if(isset($_POST["hd_quota"]) && $client["limit_web_quota"] >= 0 && $_POST["hd_quota"] != $old_web_values["hd_quota"]) {
                $tmp = $app->db->queryOneRecord("SELECT sum(hd_quota) as webquota FROM web_domain WHERE domain_id != ".$app->functions->intval($this->id)." AND type = 'vhost' AND ".$app->tform->getAuthSQL('u'));
                $webquota = $tmp["webquota"];
                $new_web_quota = $app->functions->intval($this->dataRecord["hd_quota"]);
                if(($webquota + $new_web_quota > $client["limit_web_quota"]) || ($new_web_quota < 0 && $client["limit_web_quota"] >= 0)) {
                    $max_free_quota = floor($client["limit_web_quota"] - $webquota);
                    if($max_free_quota < 0) $max_free_quota = 0;
                    $app->tform->errorMessage .= $app->tform->lng("limit_web_quota_free_txt").": ".$max_free_quota." MB<br>";
                    // Set the quota field to the max free space
                    $this->dataRecord["hd_quota"] = $max_free_quota;
            if($this->_vhostdomain_type == 'domain') {
                //* Check the website quota of the client
                if(isset($_POST["hd_quota"]) && $client["limit_web_quota"] >= 0 && $_POST["hd_quota"] != $old_web_values["hd_quota"]) {
                    $tmp = $app->db->queryOneRecord("SELECT sum(hd_quota) as webquota FROM web_domain WHERE domain_id != ".$app->functions->intval($this->id)." AND type = 'vhost' AND ".$app->tform->getAuthSQL('u'));
                    $webquota = $tmp["webquota"];
                    $new_web_quota = $app->functions->intval($this->dataRecord["hd_quota"]);
                    if(($webquota + $new_web_quota > $client["limit_web_quota"]) || ($new_web_quota < 0 && $client["limit_web_quota"] >= 0)) {
                        $max_free_quota = floor($client["limit_web_quota"] - $webquota);
                        if($max_free_quota < 0) $max_free_quota = 0;
                        $app->tform->errorMessage .= $app->tform->lng("limit_web_quota_free_txt").": ".$max_free_quota." MB<br>";
                        // Set the quota field to the max free space
                        $this->dataRecord["hd_quota"] = $max_free_quota;
                    }
                    unset($tmp);
                    unset($tmp_quota);
                }
                unset($tmp);
                unset($tmp_quota);
            }
            //* Check the traffic quota of the client
@@ -672,22 +822,24 @@
            if($client['parent_client_id'] > 0) {
                // Get the limits of the reseller
                $reseller = $app->db->queryOneRecord("SELECT limit_traffic_quota, limit_web_domain, web_servers, limit_web_quota FROM client WHERE client_id = ".$client['parent_client_id']);
                $reseller = $app->db->queryOneRecord("SELECT limit_traffic_quota, limit_web_domain, limit_web_aliasdomain, limit_web_subdomain, web_servers, limit_web_quota FROM client WHERE client_id = ".$client['parent_client_id']);
                //* Check the website quota of the client
                if(isset($_POST["hd_quota"]) && $reseller["limit_web_quota"] >= 0 && $_POST["hd_quota"] != $old_web_values["hd_quota"]) {
                    $tmp = $app->db->queryOneRecord("SELECT sum(hd_quota) as webquota FROM web_domain WHERE domain_id != ".$app->functions->intval($this->id)." AND type = 'vhost' AND ".$app->tform->getAuthSQL('u'));
                    $webquota = $tmp["webquota"];
                    $new_web_quota = $app->functions->intval($this->dataRecord["hd_quota"]);
                    if(($webquota + $new_web_quota > $reseller["limit_web_quota"]) || ($new_web_quota < 0 && $reseller["limit_web_quota"] >= 0)) {
                        $max_free_quota = floor($reseller["limit_web_quota"] - $webquota);
                        if($max_free_quota < 0) $max_free_quota = 0;
                        $app->tform->errorMessage .= $app->tform->lng("limit_web_quota_free_txt").": ".$max_free_quota." MB<br>";
                        // Set the quota field to the max free space
                        $this->dataRecord["hd_quota"] = $max_free_quota;
                if($this->_vhostdomain_type == 'domain') {
                    //* Check the website quota of the client
                    if(isset($_POST["hd_quota"]) && $reseller["limit_web_quota"] >= 0 && $_POST["hd_quota"] != $old_web_values["hd_quota"]) {
                        $tmp = $app->db->queryOneRecord("SELECT sum(hd_quota) as webquota FROM web_domain WHERE domain_id != ".$app->functions->intval($this->id)." AND type = 'vhost' AND ".$app->tform->getAuthSQL('u'));
                        $webquota = $tmp["webquota"];
                        $new_web_quota = $app->functions->intval($this->dataRecord["hd_quota"]);
                        if(($webquota + $new_web_quota > $reseller["limit_web_quota"]) || ($new_web_quota < 0 && $reseller["limit_web_quota"] >= 0)) {
                            $max_free_quota = floor($reseller["limit_web_quota"] - $webquota);
                            if($max_free_quota < 0) $max_free_quota = 0;
                            $app->tform->errorMessage .= $app->tform->lng("limit_web_quota_free_txt").": ".$max_free_quota." MB<br>";
                            // Set the quota field to the max free space
                            $this->dataRecord["hd_quota"] = $max_free_quota;
                        }
                        unset($tmp);
                        unset($tmp_quota);
                    }
                    unset($tmp);
                    unset($tmp_quota);
                }
                //* Check the traffic quota of the client
@@ -710,8 +862,9 @@
            // When the record is updated
            if($this->id > 0) {
                // restore the server ID if the user is not admin and record is edited
                $tmp = $app->db->queryOneRecord("SELECT server_id, `cgi`, `ssi`, `perl`, `ruby`, `python`, `suexec`, `errordocs`, `subdomain`, `ssl` FROM web_domain WHERE domain_id = ".$app->functions->intval($this->id));
                $tmp = $app->db->queryOneRecord("SELECT server_id, `web_folder`, `cgi`, `ssi`, `perl`, `ruby`, `python`, `suexec`, `errordocs`, `subdomain`, `ssl` FROM web_domain WHERE domain_id = ".$app->functions->intval($this->id));
                $this->dataRecord["server_id"] = $tmp["server_id"];
                $this->dataRecord['web_folder'] = $tmp['web_folder']; // cannot be changed!
                // set the settings to current if not provided (or cleared due to limits)
                if($this->dataRecord['cgi'] == '-') $this->dataRecord['cgi'] = $tmp['cgi'];
@@ -727,26 +880,37 @@
                unset($tmp);
                // When the record is inserted
            } else {
                //* display an error if chosen server is not allowed for this client
                if (!is_array($client['web_servers_ids']) || !in_array($this->dataRecord['server_id'], $client['web_servers_ids'])) {
                    $app->error($app->tform->wordbook['server_chosen_not_ok']);
                if($this->_vhostdomain_type == 'domain') {
                    //* display an error if chosen server is not allowed for this client
                    if (!is_array($client['web_servers_ids']) || !in_array($this->dataRecord['server_id'], $client['web_servers_ids'])) {
                        $app->error($app->tform->wordbook['server_chosen_not_ok']);
                    }
                }
                // Check if the user may add another web_domain
                if($client["limit_web_domain"] >= 0) {
                if($this->_vhostdomain_type == 'domain' && $client["limit_web_domain"] >= 0) {
                    $tmp = $app->db->queryOneRecord("SELECT count(domain_id) as number FROM web_domain WHERE sys_groupid = $client_group_id and type = 'vhost'");
                    if($tmp["number"] >= $client["limit_web_domain"]) {
                        $app->error($app->tform->wordbook["limit_web_domain_txt"]);
                    }
                } elseif($this->_vhostdomain_type == 'aliasdomain' && $client["limit_web_aliasdomain"] >= 0) {
                    $tmp = $app->db->queryOneRecord("SELECT count(domain_id) as number FROM web_domain WHERE sys_groupid = $client_group_id and (type = 'alias' OR type = 'vhostalias')");
                    if($tmp["number"] >= $client["limit_web_aliasdomain"]) {
                        $app->error($app->tform->wordbook["limit_web_aliasdomain_txt"]);
                    }
                } elseif($this->_vhostdomain_type == 'subdomain' && $client["limit_web_subdomain"] >= 0) {
                    $tmp = $app->db->queryOneRecord("SELECT count(domain_id) as number FROM web_domain WHERE sys_groupid = $client_group_id and (type = 'subdomain' OR type = 'vhostsubdomain')");
                    if($tmp["number"] >= $client["limit_web_subdomain"]) {
                        $app->error($app->tform->wordbook["limit_web_subdomain_txt"]);
                    }
                }
            }
            // Clients may not set the client_group_id, so we unset them if user is not a admin and the client is not a reseller
            if(!$app->auth->has_clients($_SESSION['s']['user']['userid'])) unset($this->dataRecord["client_group_id"]);
        }
        //* make sure that the email domain is lowercase
        //* make sure that the domain is lowercase
        if(isset($this->dataRecord["domain"])) $this->dataRecord["domain"] = strtolower($this->dataRecord["domain"]);
        //* get the server config for this server
@@ -853,73 +1017,93 @@
        $app->uses("getconf");
        $web_rec = $app->tform->getDataRecord($this->id);
        $web_config = $app->getconf->get_server_config($app->functions->intval($web_rec["server_id"]), 'web');
        $document_root = str_replace("[website_id]", $this->id, $web_config["website_path"]);
        $document_root = str_replace("[website_idhash_1]", $this->id_hash($page_form->id, 1), $document_root);
        $document_root = str_replace("[website_idhash_2]", $this->id_hash($page_form->id, 1), $document_root);
        $document_root = str_replace("[website_idhash_3]", $this->id_hash($page_form->id, 1), $document_root);
        $document_root = str_replace("[website_idhash_4]", $this->id_hash($page_form->id, 1), $document_root);
        // get the ID of the client
        if($_SESSION["s"]["user"]["typ"] != 'admin' && !$app->auth->has_clients($_SESSION['s']['user']['userid'])) {
            $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
            $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = $client_group_id");
            $client_id = $app->functions->intval($client["client_id"]);
        } else {
            //$client_id = $app->functions->intval($this->dataRecord["client_group_id"]);
            $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ".$app->functions->intval($this->dataRecord["client_group_id"]));
            $client_id = $app->functions->intval($client["client_id"]);
        if($this->_vhostdomain_type == 'domain') {
            $document_root = str_replace("[website_id]", $this->id, $web_config["website_path"]);
            $document_root = str_replace("[website_idhash_1]", $this->id_hash($page_form->id, 1), $document_root);
            $document_root = str_replace("[website_idhash_2]", $this->id_hash($page_form->id, 1), $document_root);
            $document_root = str_replace("[website_idhash_3]", $this->id_hash($page_form->id, 1), $document_root);
            $document_root = str_replace("[website_idhash_4]", $this->id_hash($page_form->id, 1), $document_root);
            // get the ID of the client
            if($_SESSION["s"]["user"]["typ"] != 'admin' && !$app->auth->has_clients($_SESSION['s']['user']['userid'])) {
                $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
                $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = $client_group_id");
                $client_id = $app->functions->intval($client["client_id"]);
            } else {
                //$client_id = $app->functions->intval($this->dataRecord["client_group_id"]);
                $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ".$app->functions->intval($this->dataRecord["client_group_id"]));
                $client_id = $app->functions->intval($client["client_id"]);
            }
            // Set the values for document_root, system_user and system_group
            $system_user = $app->db->quote('web'.$this->id);
            $system_group = $app->db->quote('client'.$client_id);
            $document_root = str_replace("[client_id]", $client_id, $document_root);
            $document_root = str_replace("[client_idhash_1]", $this->id_hash($client_id, 1), $document_root);
            $document_root = str_replace("[client_idhash_2]", $this->id_hash($client_id, 2), $document_root);
            $document_root = str_replace("[client_idhash_3]", $this->id_hash($client_id, 3), $document_root);
            $document_root = str_replace("[client_idhash_4]", $this->id_hash($client_id, 4), $document_root);
            $document_root = $app->db->quote($document_root);
            $php_open_basedir = str_replace("[website_path]", $document_root, $web_config["php_open_basedir"]);
            $php_open_basedir = $app->db->quote(str_replace("[website_domain]", $web_rec['domain'], $php_open_basedir));
            $htaccess_allow_override = $app->db->quote($web_config["htaccess_allow_override"]);
            $added_date = date($app->lng('conf_format_dateshort'));
            $added_by = $app->db->quote($_SESSION['s']['user']['username']);
            $sql = "UPDATE web_domain SET system_user = '$system_user', system_group = '$system_group', document_root = '$document_root', allow_override = '$htaccess_allow_override', php_open_basedir = '$php_open_basedir', added_date = '$added_date', added_by = '$added_by'  WHERE domain_id = ".$this->id;
        } else  {
            // Set the values for document_root, system_user and system_group
            $system_user = $app->db->quote($this->parent_domain_record['system_user']);
            $system_group = $app->db->quote($this->parent_domain_record['system_group']);
            $document_root = $app->db->quote($this->parent_domain_record['document_root']);
            $php_open_basedir = str_replace("[website_path]/web", $document_root.'/'.$web_rec['web_folder'], $web_config["php_open_basedir"]);
            $php_open_basedir = str_replace("[website_domain]/web", $web_rec['domain'].'/'.$web_rec['web_folder'], $php_open_basedir);
            $php_open_basedir = str_replace("[website_path]", $document_root, $php_open_basedir);
            $php_open_basedir = $app->db->quote(str_replace("[website_domain]", $web_rec['domain'], $php_open_basedir));
            $htaccess_allow_override = $app->db->quote($this->parent_domain_record['allow_override']);
            $added_date = date($app->lng('conf_format_dateshort'));
            $added_by = $app->db->quote($_SESSION['s']['user']['username']);
            $sql = "UPDATE web_domain SET sys_groupid = ".$app->functions->intval($this->parent_domain_record['sys_groupid']).",system_user = '$system_user', system_group = '$system_group', document_root = '$document_root', allow_override = '$htaccess_allow_override', php_open_basedir = '$php_open_basedir', added_date = '$added_date', added_by = '$added_by' WHERE domain_id = ".$this->id;
        }
        // Set the values for document_root, system_user and system_group
        $system_user = $app->db->quote('web'.$this->id);
        $system_group = $app->db->quote('client'.$client_id);
        $document_root = str_replace("[client_id]", $client_id, $document_root);
        $document_root = str_replace("[client_idhash_1]", $this->id_hash($client_id, 1), $document_root);
        $document_root = str_replace("[client_idhash_2]", $this->id_hash($client_id, 2), $document_root);
        $document_root = str_replace("[client_idhash_3]", $this->id_hash($client_id, 3), $document_root);
        $document_root = str_replace("[client_idhash_4]", $this->id_hash($client_id, 4), $document_root);
        $document_root = $app->db->quote($document_root);
        $php_open_basedir = str_replace("[website_path]", $document_root, $web_config["php_open_basedir"]);
        $php_open_basedir = $app->db->quote(str_replace("[website_domain]", $web_rec['domain'], $php_open_basedir));
        $htaccess_allow_override = $app->db->quote($web_config["htaccess_allow_override"]);
        $added_date = date($app->lng('conf_format_dateshort'));
        $added_by = $app->db->quote($_SESSION['s']['user']['username']);
        $sql = "UPDATE web_domain SET system_user = '$system_user', system_group = '$system_group', document_root = '$document_root', allow_override = '$htaccess_allow_override', php_open_basedir = '$php_open_basedir', added_date = '$added_date', added_by = '$added_by'  WHERE domain_id = ".$this->id;
        $app->db->query($sql);
    }
    function onBeforeUpdate () {
        global $app, $conf;
        //* Check if the server has been changed
        // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway
        if($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) {
            if (isset($this->dataRecord["server_id"])) {
                $rec = $app->db->queryOneRecord("SELECT server_id from web_domain WHERE domain_id = ".$this->id);
                if($rec['server_id'] != $this->dataRecord["server_id"]) {
        if($this->_vhostdomain_type == 'domain') {
            //* Check if the server has been changed
            // We do this only for the admin or reseller users, as normal clients can not change the server ID anyway
            if($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) {
                if (isset($this->dataRecord["server_id"])) {
                    $rec = $app->db->queryOneRecord("SELECT server_id from web_domain WHERE domain_id = ".$this->id);
                    if($rec['server_id'] != $this->dataRecord["server_id"]) {
                        //* Add a error message and switch back to old server
                        $app->tform->errorMessage .= $app->lng('The Server can not be changed.');
                        $this->dataRecord["server_id"] = $rec['server_id'];
                    }
                    unset($rec);
                }
                //* If the user is neither admin nor reseller
            } else {
                //* We do not allow users to change a domain which has been created by the admin
                $rec = $app->db->queryOneRecord("SELECT sys_perm_group, domain, ip_address, ipv6_address from web_domain WHERE domain_id = ".$this->id);
                if(isset($this->dataRecord["domain"]) && $rec['domain'] != $this->dataRecord["domain"] && $app->tform->checkPerm($this->id, 'u')) {
                    //* Add a error message and switch back to old server
                    $app->tform->errorMessage .= $app->lng('The Server can not be changed.');
                    $this->dataRecord["server_id"] = $rec['server_id'];
                    $app->tform->errorMessage .= $app->lng('The Domain can not be changed. Please ask your Administrator if you want to change the domain name.');
                    $this->dataRecord["domain"] = $rec['domain'];
                }
                if(isset($this->dataRecord["ip_address"]) && $rec['ip_address'] != $this->dataRecord["ip_address"] && $rec['sys_perm_group'] != 'riud') {
                    $this->dataRecord["ip_address"] = $rec['ip_address'];
                }
                if(isset($this->dataRecord["ipv6_address"]) && $rec['ipv6_address'] != $this->dataRecord["ipv6_address"] && $rec['sys_perm_group'] != 'riud') {
                    $this->dataRecord["ipv6_address"] = $rec['ipv6_address'];
                }
                unset($rec);
            }
            //* If the user is neither admin nor reseller
        } else {
            //* We do not allow users to change a domain which has been created by the admin
            $rec = $app->db->queryOneRecord("SELECT sys_perm_group, domain, ip_address, ipv6_address from web_domain WHERE domain_id = ".$this->id);
            if(isset($this->dataRecord["domain"]) && $rec['domain'] != $this->dataRecord["domain"] && $app->tform->checkPerm($this->id, 'u')) {
                //* Add a error message and switch back to old server
                $app->tform->errorMessage .= $app->lng('The Domain can not be changed. Please ask your Administrator if you want to change the domain name.');
                $this->dataRecord["domain"] = $rec['domain'];
            }
            if(isset($this->dataRecord["ip_address"]) && $rec['ip_address'] != $this->dataRecord["ip_address"] && $rec['sys_perm_group'] != 'riud') {
                $this->dataRecord["ip_address"] = $rec['ip_address'];
            }
            if(isset($this->dataRecord["ipv6_address"]) && $rec['ipv6_address'] != $this->dataRecord["ipv6_address"] && $rec['sys_perm_group'] != 'riud') {
                $this->dataRecord["ipv6_address"] = $rec['ipv6_address'];
            }
            unset($rec);
        }
        //* Check that all fields for the SSL cert creation are filled
@@ -934,195 +1118,6 @@
        if(isset($this->dataRecord['ssl_action']) && $this->dataRecord['ssl_action'] == 'save') {
            if(trim($this->dataRecord['ssl_cert']) == '') $app->tform->errorMessage .= $app->tform->lng('error_ssl_cert_empty').'<br />';
        }
    }
    function onAfterUpdate() {
        global $app, $conf;
        // make sure that the record belongs to the client group and not the admin group when a admin inserts it
        // also make sure that the user can not delete domain created by a admin
        if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) {
            $client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]);
            $app->db->query("UPDATE web_domain SET sys_groupid = $client_group_id, sys_perm_group = 'ru' WHERE domain_id = ".$this->id);
        }
        if($app->auth->has_clients($_SESSION['s']['user']['userid']) && isset($this->dataRecord["client_group_id"])) {
            $client_group_id = $app->functions->intval($this->dataRecord["client_group_id"]);
            $app->db->query("UPDATE web_domain SET sys_groupid = $client_group_id, sys_perm_group = 'riud' WHERE domain_id = ".$this->id);
        }
        // Get configuration for the web system
        $app->uses("getconf");
        $web_rec = $app->tform->getDataRecord($this->id);
        $web_config = $app->getconf->get_server_config($app->functions->intval($web_rec["server_id"]), 'web');
        $document_root = str_replace("[website_id]", $this->id, $web_config["website_path"]);
        $page_formid = isset($page_form->id) ? $page_form->id : '';
        $document_root = str_replace("[website_idhash_1]", $this->id_hash($page_formid, 1), $document_root);
        $document_root = str_replace("[website_idhash_2]", $this->id_hash($page_formid, 1), $document_root);
        $document_root = str_replace("[website_idhash_3]", $this->id_hash($page_formid, 1), $document_root);
        $document_root = str_replace("[website_idhash_4]", $this->id_hash($page_formid, 1), $document_root);
        // get the ID of the client
        if($_SESSION["s"]["user"]["typ"] != 'admin' && !$app->auth->has_clients($_SESSION['s']['user']['userid'])) {
            $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
            $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = $client_group_id");
            $client_id = $app->functions->intval($client["client_id"]);
        } elseif (isset($this->dataRecord["client_group_id"])) {
            $client_group_id = $this->dataRecord["client_group_id"];
            $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ".$app->functions->intval(@$this->dataRecord["client_group_id"]));
            $client_id = $app->functions->intval($client["client_id"]);
        } else {
            $client_group_id = $web_rec['sys_groupid'];
            $client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE sys_group.groupid = ".$app->functions->intval($client_group_id));
            $client_id = $app->functions->intval($client["client_id"]);
        }
        if(($_SESSION["s"]["user"]["typ"] == 'admin' || $app->auth->has_clients($_SESSION['s']['user']['userid'])) &&  isset($this->dataRecord["client_group_id"]) && $this->dataRecord["client_group_id"] != $this->oldDataRecord["sys_groupid"]) {
            // Set the values for document_root, system_user and system_group
            $system_user = $app->db->quote('web'.$this->id);
            $system_group = $app->db->quote('client'.$client_id);
            $document_root = str_replace("[client_id]", $client_id, $document_root);
            $document_root = str_replace("[client_idhash_1]", $this->id_hash($client_id, 1), $document_root);
            $document_root = str_replace("[client_idhash_2]", $this->id_hash($client_id, 2), $document_root);
            $document_root = str_replace("[client_idhash_3]", $this->id_hash($client_id, 3), $document_root);
            $document_root = str_replace("[client_idhash_4]", $this->id_hash($client_id, 4), $document_root);
            $document_root = $app->db->quote($document_root);
            $sql = "UPDATE web_domain SET system_user = '$system_user', system_group = '$system_group', document_root = '$document_root' WHERE domain_id = ".$this->id;
            //$sql = "UPDATE web_domain SET system_user = '$system_user', system_group = '$system_group' WHERE domain_id = ".$this->id;
            $app->db->query($sql);
            // Update the FTP user(s) too
            $records = $app->db->queryAllRecords("SELECT ftp_user_id FROM ftp_user WHERE parent_domain_id = ".$this->id);
            foreach($records as $rec) {
                $app->db->datalogUpdate('ftp_user', "sys_userid = '".$app->functions->intval($web_rec['sys_userid'])."', sys_groupid = '".$app->functions->intval($web_rec['sys_groupid'])."', uid = '$system_user', gid = '$system_group', dir = '$document_root'", 'ftp_user_id', $app->functions->intval($rec['ftp_user_id']));
            }
            unset($records);
            unset($rec);
            // Update the Shell user(s) too
            $records = $app->db->queryAllRecords("SELECT shell_user_id FROM shell_user WHERE parent_domain_id = ".$this->id);
            foreach($records as $rec) {
                $app->db->datalogUpdate('shell_user', "sys_userid = '".$web_rec['sys_userid']."', sys_groupid = '".$web_rec['sys_groupid']."', puser = '$system_user', pgroup = '$system_group', dir = '$document_root'", 'shell_user_id', $app->functions->intval($rec['shell_user_id']));
            }
            unset($records);
            unset($rec);
            //* Update all subdomains and alias domains
            $records = $app->db->queryAllRecords("SELECT domain_id, `domain`, `type`, `web_folder` FROM web_domain WHERE parent_domain_id = ".$this->id);
            foreach($records as $rec) {
                $update_columns = "sys_userid = '".$web_rec['sys_userid']."', sys_groupid = '".$web_rec['sys_groupid']."'";
                if($rec['type'] == 'vhostsubdomain' || $rec['type'] == 'vhostalias') {
                    $php_open_basedir = str_replace("[website_path]/web", $document_root.'/'.$rec['web_folder'], $web_config["php_open_basedir"]);
                    $php_open_basedir = str_replace("[website_domain]/web", $rec['domain'].'/'.$rec['web_folder'], $php_open_basedir);
                    $php_open_basedir = str_replace("[website_path]", $document_root, $php_open_basedir);
                    $php_open_basedir = $app->db->quote(str_replace("[website_domain]", $rec['domain'], $php_open_basedir));
                    $update_columns .= ", document_root = '".$document_root."', `php_open_basedir` = '".$php_open_basedir."'";
                }
                $app->db->datalogUpdate('web_domain', $update_columns, 'domain_id', $rec['domain_id']);
            }
            unset($records);
            unset($rec);
            //* Update all databases
            $records = $app->db->queryAllRecords("SELECT database_id FROM web_database WHERE parent_domain_id = ".$this->id);
            foreach($records as $rec) {
                $app->db->datalogUpdate('web_database', "sys_userid = '".$app->functions->intval($web_rec['sys_userid'])."', sys_groupid = '".$app->functions->intval($web_rec['sys_groupid'])."'", 'database_id', $app->functions->intval($rec['database_id']));
            }
            unset($records);
            unset($rec);
        }
        //* If the domain name has been changed, we will have to change all subdomains + APS instances
        if(!empty($this->dataRecord["domain"]) && !empty($this->oldDataRecord["domain"]) && $this->dataRecord["domain"] != $this->oldDataRecord["domain"]) {
            $records = $app->db->queryAllRecords("SELECT domain_id,domain FROM web_domain WHERE (type = 'subdomain' OR type = 'vhostsubdomain' OR type = 'vhostalias') AND domain LIKE '%.".$app->db->quote($this->oldDataRecord["domain"])."'");
            foreach($records as $rec) {
                $subdomain = $app->db->quote(str_replace($this->oldDataRecord["domain"], $this->dataRecord["domain"], $rec['domain']));
                $app->db->datalogUpdate('web_domain', "domain = '".$subdomain."'", 'domain_id', $rec['domain_id']);
            }
            unset($records);
            unset($rec);
            unset($subdomain);
            // Update APS instances
            $records = $app->db->queryAllRecords("SELECT id, instance_id FROM aps_instances_settings WHERE name = 'main_domain' AND value = '".$app->db->quote($this->oldDataRecord["domain"])."'");
            if(is_array($records) && !empty($records)){
                foreach($records as $rec){
                    $app->db->datalogUpdate('aps_instances_settings', "value = '".$app->db->quote($this->dataRecord["domain"])."'", 'id', $rec['id']);
                    // Reinstall of package needed?
                    //$app->db->datalogUpdate('aps_instances', "instance_status = '1'", 'id', $rec['instance_id']);
                }
            }
            unset($records);
            unset($rec);
        }
        //* Set allow_override if empty
        if($web_rec['allow_override'] == '') {
            $sql = "UPDATE web_domain SET allow_override = '".$app->db->quote($web_config["htaccess_allow_override"])."' WHERE domain_id = ".$this->id;
            $app->db->query($sql);
        }
        //* Set php_open_basedir if empty or domain or client has been changed
        if(empty($web_rec['php_open_basedir']) ||
            (!empty($this->dataRecord["domain"]) && !empty($this->oldDataRecord["domain"]) && $this->dataRecord["domain"] != $this->oldDataRecord["domain"])) {
            $php_open_basedir = $web_rec['php_open_basedir'];
            $php_open_basedir = $app->db->quote(str_replace($this->oldDataRecord['domain'], $web_rec['domain'], $php_open_basedir));
            $sql = "UPDATE web_domain SET php_open_basedir = '$php_open_basedir' WHERE domain_id = ".$this->id;
            $app->db->query($sql);
        }
        if(empty($web_rec['php_open_basedir']) ||
            (isset($this->dataRecord["client_group_id"]) && $this->dataRecord["client_group_id"] != $this->oldDataRecord["sys_groupid"])) {
            $document_root = $app->db->quote(str_replace("[client_id]", $client_id, $document_root));
            $php_open_basedir = str_replace("[website_path]", $document_root, $web_config["php_open_basedir"]);
            $php_open_basedir = $app->db->quote(str_replace("[website_domain]", $web_rec['domain'], $php_open_basedir));
            $sql = "UPDATE web_domain SET php_open_basedir = '$php_open_basedir' WHERE domain_id = ".$this->id;
            $app->db->query($sql);
        }
        //* Change database backup options when web backup options have been changed
        if(isset($this->dataRecord['backup_interval']) && ($this->dataRecord['backup_interval'] != $this->oldDataRecord['backup_interval'] || $this->dataRecord['backup_copies'] != $this->oldDataRecord['backup_copies'])) {
            //* Update all databases
            $backup_interval = $app->functions->intval($this->dataRecord['backup_interval']);
            $backup_copies = $app->functions->intval($this->dataRecord['backup_copies']);
            $records = $app->db->queryAllRecords("SELECT database_id FROM web_database WHERE parent_domain_id = ".$this->id);
            foreach($records as $rec) {
                $app->db->datalogUpdate('web_database', "backup_interval = '$backup_interval', backup_copies = '$backup_copies'", 'database_id', $rec['database_id']);
            }
            unset($records);
            unset($rec);
            unset($backup_copies);
            unset($backup_interval);
        }
        //* Change vhost subdomain and alias ip/ipv6 if domain ip/ipv6 has changed
        if(isset($this->dataRecord['ip_address']) && ($this->dataRecord['ip_address'] != $this->oldDataRecord['ip_address'] || $this->dataRecord['ipv6_address'] != $this->oldDataRecord['ipv6_address'])) {
            $records = $app->db->queryAllRecords("SELECT domain_id FROM web_domain WHERE (type = 'vhostsubdomain' OR type = 'vhostalias') AND parent_domain_id = ".$this->id);
            foreach($records as $rec) {
                $app->db->datalogUpdate('web_domain', "ip_address = '".$app->db->quote($web_rec['ip_address'])."', ipv6_address = '".$app->db->quote($web_rec['ipv6_address'])."'", 'domain_id', $rec['domain_id']);
            }
            unset($records);
            unset($rec);
        }
    }
    function onAfterDelete() {
        global $app, $conf;
        // Delete the sub and alias domains
        $child_domains = $app->db->queryAllRecords("SELECT * FROM web_domain WHERE parent_domain_id = ".$this->id);
        foreach($child_domains as $d) {
            // Saving record to datalog when db_history enabled
            if($app->tform->formDef["db_history"] == 'yes') {
                $app->tform->datalogSave('DELETE', $d["domain_id"], $d, array());
            }
            $app->db->query("DELETE FROM web_domain WHERE domain_id = ".$app->functions->intval($d["domain_id"])." LIMIT 0,1");
        }
        unset($child_domains);
        unset($d);
    }
interface/web/sites/web_vhost_domain_list.php
File was renamed from interface/web/sites/web_domain_list.php
@@ -35,7 +35,7 @@
* Begin Form configuration
******************************************/
$list_def_file = "list/web_domain.list.php";
$list_def_file = "list/web_vhost_domain.list.php";
/******************************************
* End Form configuration
@@ -46,13 +46,37 @@
$app->load('listform_actions');
//* Get and set the vhost domain type - store in session
$query_type = 'vhost';
$show_type = 'domain';
if(isset($_GET['type']) && $_GET['type'] == 'subdomain') {
    $show_type = 'subdomain';
    $query_type = 'vhostsubdomain';
} elseif(isset($_GET['type']) && $_GET['type'] == 'aliasdomain') {
    $show_type = 'aliasdomain';
    $query_type = 'vhostalias';
} elseif(!isset($_GET['type']) && isset($_SESSION['s']['var']['vhostdomain_type']) && $_SESSION['s']['var']['vhostdomain_type'] == 'subdomain') {
    $show_type = 'subdomain';
    $query_type = 'vhostsubdomain';
} elseif(!isset($_GET['type']) && isset($_SESSION['s']['var']['vhostdomain_type']) && $_SESSION['s']['var']['vhostdomain_type'] == 'aliasdomain') {
    $show_type = 'aliasdomain';
    $query_type = 'vhostalias';
}
$_SESSION['s']['var']['vhostdomain_type'] = $show_type;
class list_action extends listform_actions {
    function onShow() {
        global $app;
        $app->tpl->setVar('vhostdomain_type', $_SESSION['s']['var']['vhostdomain_type']);
        parent::onShow();
    }
}
$list = new list_action;
$list->SQLExtWhere = "web_domain.type = 'vhost' AND web_domain.parent_domain_id = '0'";
$list->SQLExtWhere = "web_domain.type = '" . $query_type . "'" . ($show_type != 'domain' ? " AND web_domain.parent_domain_id = '0'" : "");
$list->SQLOrderBy = 'ORDER BY web_domain.domain';
$list->onLoad();
interface/web/sites/web_vhost_subdomain_del.php
File was deleted
interface/web/sites/web_vhost_subdomain_edit.php
File was deleted
interface/web/sites/web_vhost_subdomain_list.php
File was deleted