diff --git a/web/add/package/index.php b/web/add/package/index.php
index 7feb8218..29ef5355 100644
--- a/web/add/package/index.php
+++ b/web/add/package/index.php
@@ -19,7 +19,9 @@ if (!empty($_POST['ok'])) {
// Check empty fields
if (empty($_POST['v_package'])) $errors[] = __('package');
if (empty($_POST['v_web_template'])) $errors[] = __('web template');
- if (empty($_POST['v_proxy_template'])) $errors[] = __('proxy template');
+ if (!empty($_SESSION['PROXY_SYSTEM'])) {
+ if (empty($_POST['v_proxy_template'])) $errors[] = __('proxy template');
+ }
if (empty($_POST['v_dns_template'])) $errors[] = __('dns template');
if (empty($_POST['v_shell'])) $errrors[] = __('shell');
if (!isset($_POST['v_web_domains'])) $errors[] = __('web domains');
@@ -140,9 +142,11 @@ $web_templates = json_decode(implode('', $output), true);
unset($output);
// List web templates for proxy
-exec (VESTA_CMD."v-list-web-templates-proxy json", $output, $return_var);
-$proxy_templates = json_decode(implode('', $output), true);
-unset($output);
+if (!empty($_SESSION['PROXY_SYSTEM'])) {
+ exec (VESTA_CMD."v-list-web-templates-proxy json", $output, $return_var);
+ $proxy_templates = json_decode(implode('', $output), true);
+ unset($output);
+}
// List DNS templates
exec (VESTA_CMD."v-list-dns-templates json", $output, $return_var);
@@ -159,17 +163,17 @@ if (empty($v_web_template)) $v_web_template = 'default';
if (empty($v_proxy_template)) $v_proxy_template = 'default';
if (empty($v_dns_template)) $v_dns_template = 'default';
if (empty($v_shell)) $v_shell = 'nologin';
-if (empty($v_web_domains)) $v_web_domains = "'0'";
-if (empty($v_web_aliases)) $v_web_aliases = "'0'";
-if (empty($v_dns_domains)) $v_dns_domains = "'0'";
-if (empty($v_dns_records)) $v_dns_records = "'0'";
-if (empty($v_mail_domains)) $v_mail_domains = "'0'";
-if (empty($v_mail_accounts)) $v_mail_accounts = "'0'";
-if (empty($v_databases)) $v_databases = "'0'";
-if (empty($v_cron_jobs)) $v_cron_jobs = "'0'";
-if (empty($v_backups)) $v_backups = "'0'";
-if (empty($v_disk_quota)) $v_disk_quota = "'0'";
-if (empty($v_bandwidth)) $v_bandwidth = "'0'";
+if (empty($v_web_domains)) $v_web_domains = "'1'";
+if (empty($v_web_aliases)) $v_web_aliases = "'1'";
+if (empty($v_dns_domains)) $v_dns_domains = "'1'";
+if (empty($v_dns_records)) $v_dns_records = "'1'";
+if (empty($v_mail_domains)) $v_mail_domains = "'1'";
+if (empty($v_mail_accounts)) $v_mail_accounts = "'1'";
+if (empty($v_databases)) $v_databases = "'1'";
+if (empty($v_cron_jobs)) $v_cron_jobs = "'1'";
+if (empty($v_backups)) $v_backups = "'1'";
+if (empty($v_disk_quota)) $v_disk_quota = "'1000'";
+if (empty($v_bandwidth)) $v_bandwidth = "'1000'";
if (empty($v_ns1)) $v_ns1 = 'ns1.example.ltd';
if (empty($v_ns2)) $v_ns2 = 'ns2.example.ltd';
diff --git a/web/add/web/index.php b/web/add/web/index.php
index 48c996e5..5050cc5d 100644
--- a/web/add/web/index.php
+++ b/web/add/web/index.php
@@ -141,7 +141,7 @@ if (!empty($_POST['ok'])) {
}
// Add proxy support
- if (($_POST['v_proxy'] == 'on') && (empty($_SESSION['error_msg']))) {
+ if ((!empty($_SESSION['PROXY_SYSTEM'])) && ($_POST['v_proxy'] == 'on') && (empty($_SESSION['error_msg']))) {
$ext = str_replace(' ', '', $v_proxy_ext);
$ext = escapeshellarg($ext);
exec (VESTA_CMD."v-add-web-domain-proxy ".$user." ".$v_domain." '' ".$ext." 'no'", $output, $return_var);
@@ -217,7 +217,7 @@ if (!empty($_POST['ok'])) {
}
// Restart proxy server
- if (($_POST['v_proxy'] == 'on') && (empty($_SESSION['error_msg']))) {
+ if ((!empty($_SESSION['PROXY_SYSTEM'])) && ($_POST['v_proxy'] == 'on') && (empty($_SESSION['error_msg']))) {
exec (VESTA_CMD."v-restart-proxy", $output, $return_var);
check_return_code($return_var,$output);
unset($output);
diff --git a/web/edit/package/index.php b/web/edit/package/index.php
index 41b3640b..5cca03da 100644
--- a/web/edit/package/index.php
+++ b/web/edit/package/index.php
@@ -60,9 +60,11 @@ $web_templates = json_decode(implode('', $output), true);
unset($output);
// List proxy templates
-exec (VESTA_CMD."v-list-web-templates-proxy json", $output, $return_var);
-$proxy_templates = json_decode(implode('', $output), true);
-unset($output);
+if (!empty($_SESSION['PROXY_SYSTEM'])) {
+ exec (VESTA_CMD."v-list-web-templates-proxy json", $output, $return_var);
+ $proxy_templates = json_decode(implode('', $output), true);
+ unset($output);
+}
// List dns templates
exec (VESTA_CMD."v-list-dns-templates json", $output, $return_var);
diff --git a/web/edit/web/index.php b/web/edit/web/index.php
index 54e65aaa..1c1b8850 100644
--- a/web/edit/web/index.php
+++ b/web/edit/web/index.php
@@ -76,9 +76,11 @@ $templates = json_decode(implode('', $output), true);
unset($output);
// List proxy templates
-exec (VESTA_CMD."v-list-web-templates-proxy json", $output, $return_var);
-$proxy_templates = json_decode(implode('', $output), true);
-unset($output);
+if (!empty($_SESSION['PROXY_SYSTEM'])) {
+ exec (VESTA_CMD."v-list-web-templates-proxy json", $output, $return_var);
+ $proxy_templates = json_decode(implode('', $output), true);
+ unset($output);
+}
// List web stat engines
exec (VESTA_CMD."v-list-web-stats json", $output, $return_var);
@@ -189,7 +191,7 @@ if (!empty($_POST['save'])) {
}
// Delete proxy support
- if ((!empty($v_proxy)) && (empty($_POST['v_proxy'])) && (empty($_SESSION['error_msg']))) {
+ if ((!empty($_SESSION['PROXY_SYSTEM'])) && (!empty($v_proxy)) && (empty($_POST['v_proxy'])) && (empty($_SESSION['error_msg']))) {
exec (VESTA_CMD."v-delete-web-domain-proxy ".$v_username." ".$v_domain." 'no'", $output, $return_var);
check_return_code($return_var,$output);
unset($output);
@@ -198,13 +200,13 @@ if (!empty($_POST['save'])) {
}
// Change proxy template / Update extention list
- if ((!empty($v_proxy)) && (!empty($_POST['v_proxy'])) && (empty($_SESSION['error_msg']))) {
+ if ((!empty($_SESSION['PROXY_SYSTEM'])) && (!empty($v_proxy)) && (!empty($_POST['v_proxy'])) && (empty($_SESSION['error_msg']))) {
$ext = preg_replace("/\n/", " ", $_POST['v_proxy_ext']);
$ext = preg_replace("/,/", " ", $ext);
$ext = preg_replace('/\s+/', ' ',$ext);
$ext = trim($ext);
$ext = str_replace(' ', ", ", $ext);
- if (( $v_proxy_template != $_POST['v_proxy_template']) || ($v_proxy_ext != $ext)) {
+ if (( $v_proxy_template != $_POST['v_proxy_template']) || ($v_proxy_ext != $ext)) {
$ext = str_replace(', ', ",", $ext);
if (!empty($_POST['v_proxy_template'])) $v_proxy_template = $_POST['v_proxy_template'];
exec (VESTA_CMD."v-change-web-domain-proxy-tpl ".$v_username." ".$v_domain." ".escapeshellarg($v_proxy_template)." ".escapeshellarg($ext)." 'no'", $output, $return_var);
@@ -216,7 +218,7 @@ if (!empty($_POST['save'])) {
}
// Add proxy support
- if ((empty($v_proxy)) && (!empty($_POST['v_proxy'])) && (empty($_SESSION['error_msg']))) {
+ if ((!empty($_SESSION['PROXY_SYSTEM'])) && (empty($v_proxy)) && (!empty($_POST['v_proxy'])) && (empty($_SESSION['error_msg']))) {
$v_proxy_template = $_POST['v_proxy_template'];
if (!empty($_POST['v_proxy_ext'])) {
$ext = preg_replace("/\n/", " ", $_POST['v_proxy_ext']);
@@ -280,7 +282,7 @@ if (!empty($_POST['save'])) {
$v_ssl_crt = $_POST['v_ssl_crt'];
$v_ssl_key = $_POST['v_ssl_key'];
$v_ssl_ca = $_POST['v_ssl_ca'];
-
+
// Cleanup certificate tempfiles
if (!empty($_POST['v_ssl_crt'])) {
unlink($tmpdir."/".$_POST['v_domain'].".crt");
@@ -347,7 +349,7 @@ if (!empty($_POST['save'])) {
$v_ssl_key = $_POST['v_ssl_key'];
$v_ssl_ca = $_POST['v_ssl_ca'];
$v_ssl_home = $_POST['v_ssl_home'];
-
+
// Cleanup certificate tempfiles
if (!empty($_POST['v_ssl_crt'])) {
unlink($tmpdir."/".$_POST['v_domain'].".crt");
@@ -584,7 +586,7 @@ if (!empty($_POST['save'])) {
}
// Restart proxy server
- if (!empty($restart_proxy) && (empty($_SESSION['error_msg']))) {
+ if ((!empty($_SESSION['PROXY_SYSTEM'])) && !empty($restart_proxy) && (empty($_SESSION['error_msg']))) {
exec (VESTA_CMD."v-restart-proxy", $output, $return_var);
check_return_code($return_var,$output);
unset($output);
diff --git a/web/templates/admin/add_package.html b/web/templates/admin/add_package.html
index 632b9e51..9b8e12a4 100644
--- a/web/templates/admin/add_package.html
+++ b/web/templates/admin/add_package.html
@@ -67,6 +67,7 @@
+
@@ -90,6 +91,7 @@
|
+
@@ -232,7 +234,6 @@
|
>
-
|
diff --git a/web/templates/admin/add_web.html b/web/templates/admin/add_web.html
index 9945c17b..0858d2c4 100644
--- a/web/templates/admin/add_web.html
+++ b/web/templates/admin/add_web.html
@@ -133,6 +133,7 @@
+
@@ -154,6 +155,7 @@
|
+
/
diff --git a/web/templates/admin/edit_package.html b/web/templates/admin/edit_package.html
index 7de885f7..23de6585 100644
--- a/web/templates/admin/edit_package.html
+++ b/web/templates/admin/edit_package.html
@@ -73,6 +73,7 @@
|
+
@@ -96,6 +97,7 @@
|
+
@@ -206,7 +208,6 @@
|
>
-
|
|
@@ -239,7 +240,6 @@
>
-
|
diff --git a/web/templates/admin/edit_web.html b/web/templates/admin/edit_web.html
index b500414a..4a5527af 100644
--- a/web/templates/admin/edit_web.html
+++ b/web/templates/admin/edit_web.html
@@ -140,6 +140,7 @@
+
@@ -185,9 +186,10 @@
|
+
- /
+ /
|
diff --git a/web/templates/admin/list_packages.html b/web/templates/admin/list_packages.html
index 512d03d0..787ae941 100644
--- a/web/templates/admin/list_packages.html
+++ b/web/templates/admin/list_packages.html
@@ -71,10 +71,12 @@
: |
|
+
: |
|
+
: |
|
diff --git a/web/templates/admin/list_web.html b/web/templates/admin/list_web.html
index 938f0c85..c8b970cd 100644
--- a/web/templates/admin/list_web.html
+++ b/web/templates/admin/list_web.html
@@ -174,6 +174,7 @@
+ | |
: |
|
@@ -182,33 +183,31 @@
: |
|
-
: |
|
-
- : |
- |
-
-
|
+ | |
+
+
+ : |
+ |
+
: |
|
-
- : |
- |
-
+
: |
|
+
|