diff --git a/install/sql/incremental/upd_0036.sql b/install/sql/incremental/upd_0036.sql index db0d59d5e6cead499601ccb106d2229797b5fc32..ed03a97a31d09239e91a2908c3d90ffe2f99ceb3 100644 --- a/install/sql/incremental/upd_0036.sql +++ b/install/sql/incremental/upd_0036.sql @@ -2,4 +2,26 @@ ALTER TABLE `web_domain` ADD `perl` enum('n','y') NOT NULL default 'n' AFTER `python`; +-- -------------------------------------------------------- + +ALTER TABLE `client` ADD `limit_cgi` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `web_php_options`, + ADD `limit_ssi` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_cgi`, + ADD `limit_perl` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_ssi`, + ADD `limit_ruby` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_perl`, + ADD `limit_python` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_ruby`, + ADD `force_suexec` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'y' AFTER `limit_python`, + ADD `limit_hterror` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `force_suexec`, + ADD `limit_wildcard` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_hterror`, + ADD `limit_ssl` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_wildcard`; + +ALTER TABLE `client_template` ADD `limit_cgi` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `web_php_options`, + ADD `limit_ssi` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_cgi`, + ADD `limit_perl` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_ssi`, + ADD `limit_ruby` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_perl`, + ADD `limit_python` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_ruby`, + ADD `force_suexec` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'y' AFTER `limit_python`, + ADD `limit_hterror` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `force_suexec`, + ADD `limit_wildcard` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_hterror`, + ADD `limit_ssl` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n' AFTER `limit_wildcard`; + diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index 88a68846e945e8d68ecc1ac2db7ab054bf652297..e69f624bfd3e44daac8dce462873140bb9fdc133 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -179,6 +179,15 @@ CREATE TABLE `client` ( `limit_web_domain` int(11) NOT NULL DEFAULT '-1', `limit_web_quota` int(11) NOT NULL DEFAULT '-1', `web_php_options` varchar(255) NOT NULL DEFAULT 'no,fast-cgi,cgi,mod,suphp', + `limit_cgi` enum('n','y') NOT NULL DEFAULT 'n', + `limit_ssi` enum('n','y') NOT NULL DEFAULT 'n', + `limit_perl` enum('n','y') NOT NULL DEFAULT 'n', + `limit_ruby` enum('n','y') NOT NULL DEFAULT 'n', + `limit_python` enum('n','y') NOT NULL DEFAULT 'n', + `force_suexec` enum('n','y') NOT NULL DEFAULT 'y', + `limit_hterror` enum('n','y') NOT NULL DEFAULT 'n', + `limit_wildcard` enum('n','y') NOT NULL DEFAULT 'n', + `limit_ssl` enum('n','y') NOT NULL DEFAULT 'n', `limit_web_subdomain` int(11) NOT NULL DEFAULT '-1', `limit_web_aliasdomain` int(11) NOT NULL DEFAULT '-1', `limit_ftp_user` int(11) NOT NULL DEFAULT '-1', @@ -265,6 +274,15 @@ CREATE TABLE `client_template` ( `limit_web_domain` int(11) NOT NULL default '-1', `limit_web_quota` int(11) NOT NULL default '-1', `web_php_options` varchar(255) NOT NULL DEFAULT 'no', + `limit_cgi` enum('n','y') NOT NULL DEFAULT 'n', + `limit_ssi` enum('n','y') NOT NULL DEFAULT 'n', + `limit_perl` enum('n','y') NOT NULL DEFAULT 'n', + `limit_ruby` enum('n','y') NOT NULL DEFAULT 'n', + `limit_python` enum('n','y') NOT NULL DEFAULT 'n', + `force_suexec` enum('n','y') NOT NULL DEFAULT 'y', + `limit_hterror` enum('n','y') NOT NULL DEFAULT 'n', + `limit_wildcard` enum('n','y') NOT NULL DEFAULT 'n', + `limit_ssl` enum('n','y') NOT NULL DEFAULT 'n', `limit_web_subdomain` int(11) NOT NULL default '-1', `limit_web_aliasdomain` int(11) NOT NULL default '-1', `limit_ftp_user` int(11) NOT NULL default '-1', diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php index 8a76281bbadcc4bdb76b3ad8ee04164cd896a0a4..a8462194b1aefb071f2edd958fda91dbec7b06b7 100644 --- a/interface/web/client/form/client.tform.php +++ b/interface/web/client/form/client.tform.php @@ -688,6 +688,60 @@ $form["tabs"]['limits'] = array ( 'valuelimit' => 'client:web_php_options', 'value' => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP', 'php-fpm' => 'PHP-FPM') ), + 'limit_cgi' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), + 'limit_ssi' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), + 'limit_perl' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), + 'limit_ruby' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), + 'limit_python' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), + 'force_suexec' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'y', + 'value' => array(0 => 'n',1 => 'y') + ), + 'limit_hterror' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), + 'limit_wildcard' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), + 'limit_ssl' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), 'limit_web_aliasdomain' => array ( 'datatype' => 'INTEGER', 'formtype' => 'TEXT', diff --git a/interface/web/client/form/client_template.tform.php b/interface/web/client/form/client_template.tform.php index 0b5c1be95222379ad89850c291d1b13a38750cd5..bd98e2303767f861449c02ddae9310735f40dcfd 100644 --- a/interface/web/client/form/client_template.tform.php +++ b/interface/web/client/form/client_template.tform.php @@ -333,6 +333,60 @@ $form["tabs"]['limits'] = array ( 'valuelimit' => 'client:web_php_options', 'value' => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP', 'php-fpm' => 'PHP-FPM') ), + 'limit_cgi' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), + 'limit_ssi' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), + 'limit_perl' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), + 'limit_ruby' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), + 'limit_python' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), + 'force_suexec' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'y', + 'value' => array(0 => 'n',1 => 'y') + ), + 'limit_hterror' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), + 'limit_wildcard' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), + 'limit_ssl' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), 'limit_web_aliasdomain' => array ( 'datatype' => 'INTEGER', 'formtype' => 'TEXT', diff --git a/interface/web/client/form/reseller.tform.php b/interface/web/client/form/reseller.tform.php index fe3815917383f4e446db6ca51a0735c7cd82346a..0c669ece41b85ef084b073952419d3529c5c29f4 100644 --- a/interface/web/client/form/reseller.tform.php +++ b/interface/web/client/form/reseller.tform.php @@ -622,6 +622,60 @@ $form["tabs"]['limits'] = array ( 'separator' => ',', 'value' => array('no' => 'Disabled', 'fast-cgi' => 'Fast-CGI', 'cgi' => 'CGI', 'mod' => 'Mod-PHP', 'suphp' => 'SuPHP', 'php-fpm' => 'PHP-FPM') ), + 'limit_cgi' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), + 'limit_ssi' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), + 'limit_perl' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), + 'limit_ruby' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), + 'limit_python' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), + 'force_suexec' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'y', + 'value' => array(0 => 'n',1 => 'y') + ), + 'limit_hterror' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), + 'limit_wildcard' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), + 'limit_ssl' => array ( + 'datatype' => 'VARCHAR', + 'formtype' => 'CHECKBOX', + 'default' => 'n', + 'value' => array(0 => 'n',1 => 'y') + ), 'limit_web_aliasdomain' => array ( 'datatype' => 'INTEGER', 'formtype' => 'TEXT', diff --git a/interface/web/client/lib/lang/de_client.lng b/interface/web/client/lib/lang/de_client.lng index fc934be2de85697fd870655e51d40b503ce0a9e1..76e74aa774ce60bf8d1efec4ef82e64e182763b3 100644 --- a/interface/web/client/lib/lang/de_client.lng +++ b/interface/web/client/lib/lang/de_client.lng @@ -87,6 +87,15 @@ $wb["add_additional_template_txt"] = 'Zusätzliches Template hinzufügen'; $wb["delete_additional_template_txt"] = 'Zusätzliches Template löschen'; $wb['ssh_chroot_txt'] = 'SSH-Chroot Optionen'; $wb['web_php_options_txt'] = 'PHP Optionen'; +$wb["limit_cgi_txt"] = "CGI verfügbar"; +$wb["limit_ssi_txt"] = "SSI verfügbar"; +$wb["limit_perl_txt"] = "Perl verfügbar"; +$wb["limit_ruby_txt"] = "Ruby verfügbar"; +$wb["limit_python_txt"] = "Python verfügbar"; +$wb["force_suexec_txt"] = "SuEXEC erzwungen"; +$wb["limit_hterror_txt"] = "Eigene Fehlerseiten verfügbar"; +$wb["limit_wildcard_txt"] = "Wildcard Subdomain verfügbar"; +$wb["limit_ssl_txt"] = "SSL verfügbar"; $wb['limit_client_error'] = 'Die maximale Anzahl an Kunden wurde erreicht.'; $wb['limit_mailaliasdomain_txt'] = 'Max. Anzahl an Domain-Aliases'; $wb['limit_mailaliasdomain_error_notint'] = 'Das E-Mail Domain-Alias Limit muss eine Zahl sein.'; diff --git a/interface/web/client/lib/lang/de_client_template.lng b/interface/web/client/lib/lang/de_client_template.lng index bb35ef949b324ea008d27b7ead35138c584885fa..80a8c0df191d6c1941763612f9eba82b506871de 100644 --- a/interface/web/client/lib/lang/de_client_template.lng +++ b/interface/web/client/lib/lang/de_client_template.lng @@ -67,6 +67,15 @@ $wb['limit_openvz_vm_template_id_txt'] = 'Template für virtuelle Server erzwing $wb['limit_openvz_vm_error_notint'] = 'Das Limit virtueller Server muss eine Zahl sein.'; $wb['ssh_chroot_txt'] = 'SSH-Chroot Optionen'; $wb['web_php_options_txt'] = 'PHP-Optionen'; +$wb["limit_cgi_txt"] = "CGI verfügbar"; +$wb["limit_ssi_txt"] = "SSI verfügbar"; +$wb["limit_perl_txt"] = "Perl verfügbar"; +$wb["limit_ruby_txt"] = "Ruby verfügbar"; +$wb["limit_python_txt"] = "Python verfügbar"; +$wb["force_suexec_txt"] = "SuEXEC erzwungen"; +$wb["limit_hterror_txt"] = "Eigene Fehlerseiten verfügbar"; +$wb["limit_wildcard_txt"] = "Wildcard Subdomain verfügbar"; +$wb["limit_ssl_txt"] = "SSL verfügbar"; $wb['template_type_txt'] = 'Template-Typ'; $wb['template_name_txt'] = 'Template-Name'; $wb["web_limits_txt"] = 'Web-Limits'; diff --git a/interface/web/client/lib/lang/de_reseller.lng b/interface/web/client/lib/lang/de_reseller.lng index 9cfb981f5148aae8a07bcbf65bd5a15d17f47b04..2476cc81650dcef1e9b5e69b3904f5d9edc8e25b 100644 --- a/interface/web/client/lib/lang/de_reseller.lng +++ b/interface/web/client/lib/lang/de_reseller.lng @@ -87,6 +87,15 @@ $wb["add_additional_template_txt"] = 'Zusätzliches Template hinzufügen'; $wb["delete_additional_template_txt"] = 'Zusätzliches Template löschen'; $wb['ssh_chroot_txt'] = 'SSH-Chroot Optionen'; $wb['web_php_options_txt'] = 'PHP-Optionen'; +$wb["limit_cgi_txt"] = "CGI verfügbar"; +$wb["limit_ssi_txt"] = "SSI verfügbar"; +$wb["limit_perl_txt"] = "Perl verfügbar"; +$wb["limit_ruby_txt"] = "Ruby verfügbar"; +$wb["limit_python_txt"] = "Python verfügbar"; +$wb["force_suexec_txt"] = "SuEXEC erzwungen"; +$wb["limit_hterror_txt"] = "Eigene Fehlerseiten verfügbar"; +$wb["limit_wildcard_txt"] = "Wildcard Subdomain verfügbar"; +$wb["limit_ssl_txt"] = "SSL verfügbar"; $wb['limit_client_error'] = 'Die maximale Anzahl an Kunden wurde erreicht.'; $wb['limit_client_error_positive'] = 'Die Anzahl an Kunden muss > 0 sein'; $wb['limit_web_quota_txt'] = 'Web Quota'; diff --git a/interface/web/client/lib/lang/en_client.lng b/interface/web/client/lib/lang/en_client.lng index 8056fe74eadca2f32394464de837a68530caa422..4f18f9fe6ad40fb549a609ae38160fa0b94a17c5 100644 --- a/interface/web/client/lib/lang/en_client.lng +++ b/interface/web/client/lib/lang/en_client.lng @@ -98,6 +98,15 @@ $wb["add_additional_template_txt"] = 'Add additional template'; $wb["delete_additional_template_txt"] = 'Delete additional template'; $wb["ssh_chroot_txt"] = 'SSH-Chroot Options'; $wb["web_php_options_txt"] = 'PHP Options'; +$wb["limit_cgi_txt"] = "CGI available"; +$wb["limit_ssi_txt"] = "SSI available"; +$wb["limit_perl_txt"] = "Perl available"; +$wb["limit_ruby_txt"] = "Ruby available"; +$wb["limit_python_txt"] = "Python available"; +$wb["force_suexec_txt"] = "SuEXEC forced"; +$wb["limit_hterror_txt"] = "Custom error docs available"; +$wb["limit_wildcard_txt"] = "Wildcard subdomain available"; +$wb["limit_ssl_txt"] = "SSL available"; $wb["limit_client_error"] = 'The max. number of clients is reached.'; $wb["limit_web_quota_txt"] = 'Web Quota'; $wb["limit_traffic_quota_txt"] = 'Traffic Quota'; diff --git a/interface/web/client/lib/lang/en_client_template.lng b/interface/web/client/lib/lang/en_client_template.lng index c733a71796b4caa75adda72bae62e190a360bd90..3303eaebc4e9f79fbb3930e00bdfb83a9be634ab 100644 --- a/interface/web/client/lib/lang/en_client_template.lng +++ b/interface/web/client/lib/lang/en_client_template.lng @@ -70,6 +70,15 @@ $wb["limit_openvz_vm_template_id_txt"] = 'Force virtual server template'; $wb["limit_openvz_vm_error_notint"] = 'The virtual server limit must be a number.'; $wb["ssh_chroot_txt"] = 'SSH-Chroot Options'; $wb["web_php_options_txt"] = 'PHP Options'; +$wb["limit_cgi_txt"] = "CGI available"; +$wb["limit_ssi_txt"] = "SSI available"; +$wb["limit_perl_txt"] = "Perl available"; +$wb["limit_ruby_txt"] = "Ruby available"; +$wb["limit_python_txt"] = "Python available"; +$wb["force_suexec_txt"] = "SuEXEC forced"; +$wb["limit_hterror_txt"] = "Custom error docs available"; +$wb["limit_wildcard_txt"] = "Wildcard subdomain available"; +$wb["limit_ssl_txt"] = "SSL available"; $wb["web_limits_txt"] = 'Web Limits'; $wb["email_limits_txt"] = 'Email Limits'; $wb["database_limits_txt"] = 'Database Limits'; diff --git a/interface/web/client/lib/lang/en_reseller.lng b/interface/web/client/lib/lang/en_reseller.lng index 0e8d689f61b67fcec5a5135ef816e045c6bca938..367340d3f52fe5905f67bb16829998c70264eaae 100644 --- a/interface/web/client/lib/lang/en_reseller.lng +++ b/interface/web/client/lib/lang/en_reseller.lng @@ -97,6 +97,15 @@ $wb["add_additional_template_txt"] = 'Add additional template'; $wb["delete_additional_template_txt"] = 'Delete additional template'; $wb["ssh_chroot_txt"] = 'SSH-Chroot Options'; $wb["web_php_options_txt"] = 'PHP Options'; +$wb["limit_cgi_txt"] = "CGI available"; +$wb["limit_ssi_txt"] = "SSI available"; +$wb["limit_perl_txt"] = "Perl available"; +$wb["limit_ruby_txt"] = "Ruby available"; +$wb["limit_python_txt"] = "Python available"; +$wb["force_suexec_txt"] = "SuEXEC forced"; +$wb["limit_hterror_txt"] = "Custom error docs available"; +$wb["limit_wildcard_txt"] = "Wildcard subdomain available"; +$wb["limit_ssl_txt"] = "SSL available"; $wb["limit_client_error"] = 'The max. number of clients is reached.'; $wb["limit_client_error_positive"] = 'The number of clients must be > 0'; $wb["limit_web_quota_txt"] = 'Web Quota'; diff --git a/interface/web/client/templates/client_edit_limits.htm b/interface/web/client/templates/client_edit_limits.htm index 911ea38c5b842eac08b169105b6b2148ee8c63cd..8ce7f80fa6dec3e7a4ceb8388267085097593fcc 100644 --- a/interface/web/client/templates/client_edit_limits.htm +++ b/interface/web/client/templates/client_edit_limits.htm @@ -61,6 +61,60 @@ {tmpl_var name='web_php_options'} +
+

{tmpl_var name='limit_cgi_txt'}

+
+ {tmpl_var name='limit_cgi'} +
+
+
+

{tmpl_var name='limit_ssi_txt'}

+
+ {tmpl_var name='limit_ssi'} +
+
+
+

{tmpl_var name='limit_perl_txt'}

+
+ {tmpl_var name='limit_perl'} +
+
+
+

{tmpl_var name='limit_ruby_txt'}

+
+ {tmpl_var name='limit_ruby'} +
+
+
+

{tmpl_var name='limit_python_txt'}

+
+ {tmpl_var name='limit_python'} +
+
+
+

{tmpl_var name='force_suexec_txt'}

+
+ {tmpl_var name='force_suexec'} +
+
+
+

{tmpl_var name='limit_hterror_txt'}

+
+ {tmpl_var name='limit_hterror'} +
+
+
+

{tmpl_var name='limit_wildcard_txt'}

+
+ {tmpl_var name='limit_wildcard'} +
+
+
+

{tmpl_var name='limit_ssl_txt'}

+
+ {tmpl_var name='limit_ssl'} +
+
diff --git a/interface/web/client/templates/client_template_edit_limits.htm b/interface/web/client/templates/client_template_edit_limits.htm index 81a2e595b32087d2a80f0b3300394bb397bd465b..91f9bd52d94c57dbf1a1be54d02f5dd008722138 100644 --- a/interface/web/client/templates/client_template_edit_limits.htm +++ b/interface/web/client/templates/client_template_edit_limits.htm @@ -25,6 +25,60 @@ {tmpl_var name='web_php_options'}
+
+

{tmpl_var name='limit_cgi_txt'}

+
+ {tmpl_var name='limit_cgi'} +
+
+
+

{tmpl_var name='limit_ssi_txt'}

+
+ {tmpl_var name='limit_ssi'} +
+
+
+

{tmpl_var name='limit_perl_txt'}

+
+ {tmpl_var name='limit_perl'} +
+
+
+

{tmpl_var name='limit_ruby_txt'}

+
+ {tmpl_var name='limit_ruby'} +
+
+
+

{tmpl_var name='limit_python_txt'}

+
+ {tmpl_var name='limit_python'} +
+
+
+

{tmpl_var name='force_suexec_txt'}

+
+ {tmpl_var name='force_suexec'} +
+
+
+

{tmpl_var name='limit_hterror_txt'}

+
+ {tmpl_var name='limit_hterror'} +
+
+
+

{tmpl_var name='limit_wildcard_txt'}

+
+ {tmpl_var name='limit_wildcard'} +
+
+
+

{tmpl_var name='limit_ssl_txt'}

+
+ {tmpl_var name='limit_ssl'} +
+
diff --git a/interface/web/client/templates/reseller_edit_limits.htm b/interface/web/client/templates/reseller_edit_limits.htm index 85936e9519d0fb5e99648b6d1e11da8894d64912..621dfa2b3b4abd5ba3db0558e490ab284e97d6a2 100644 --- a/interface/web/client/templates/reseller_edit_limits.htm +++ b/interface/web/client/templates/reseller_edit_limits.htm @@ -56,6 +56,60 @@ {tmpl_var name='web_php_options'}
+
+

{tmpl_var name='limit_cgi_txt'}

+
+ {tmpl_var name='limit_cgi'} +
+
+
+

{tmpl_var name='limit_ssi_txt'}

+
+ {tmpl_var name='limit_ssi'} +
+
+
+

{tmpl_var name='limit_perl_txt'}

+
+ {tmpl_var name='limit_perl'} +
+
+
+

{tmpl_var name='limit_ruby_txt'}

+
+ {tmpl_var name='limit_ruby'} +
+
+
+

{tmpl_var name='limit_python_txt'}

+
+ {tmpl_var name='limit_python'} +
+
+
+

{tmpl_var name='force_suexec_txt'}

+
+ {tmpl_var name='force_suexec'} +
+
+
+

{tmpl_var name='limit_hterror_txt'}

+
+ {tmpl_var name='limit_hterror'} +
+
+
+

{tmpl_var name='limit_wildcard_txt'}

+
+ {tmpl_var name='limit_wildcard'} +
+
+
+

{tmpl_var name='limit_ssl_txt'}

+
+ {tmpl_var name='limit_ssl'} +
+
diff --git a/interface/web/sites/form/web_domain.tform.php b/interface/web/sites/form/web_domain.tform.php index ef9470e37ab563cd4b74645903b3d5180edf4836..f9ffa24550faab1bca6f30b9b146dbce47328c40 100644 --- a/interface/web/sites/form/web_domain.tform.php +++ b/interface/web/sites/form/web_domain.tform.php @@ -62,6 +62,15 @@ if($app->auth->has_clients($_SESSION['s']['user']['userid']) || $app->auth->is_a $web_domain_edit_readonly = true; } +$wildcard_available = true; +$ssl_available = true; +if(!$app->auth->is_admin()) { + $client_group_id = $_SESSION["s"]["user"]["default_group"]; + $client = $app->db->queryOneRecord("SELECT limit_wildcard, limit_ssl FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); + + if($client['limit_wildcard'] != 'y') $wildcard_available = false; + if($client['limit_ssl'] != 'y') $ssl_available = false; +} $form["tabs"]['domain'] = array ( 'title' => "Domain", @@ -203,7 +212,7 @@ $form["tabs"]['domain'] = array ( 'datatype' => 'VARCHAR', 'formtype' => 'SELECT', 'default' => 'www', - 'value' => array('none' => 'none_txt', 'www' => 'www.', '*' => '*.') + 'value' => ($wildcard_available ? array('none' => 'none_txt', 'www' => 'www.', '*' => '*.') : array('none' => 'none_txt', 'www' => 'www.')) ), 'ssl' => array ( 'datatype' => 'VARCHAR', @@ -300,6 +309,7 @@ $form["tabs"]['redirect'] = array ( ) ); +if($ssl_available) { $form["tabs"]['ssl'] = array ( 'title' => "SSL", 'width' => 100, @@ -433,6 +443,7 @@ $form["tabs"]['ssl'] = array ( ################################## ) ); +} //* Statistics $form["tabs"]['stats'] = array ( diff --git a/interface/web/sites/templates/web_domain_edit.htm b/interface/web/sites/templates/web_domain_edit.htm index 09d739a3183e08cf8a98ac3ce785c478b4891319..c2d9d21ea574fb7661785503365469cfd415c053 100644 --- a/interface/web/sites/templates/web_domain_edit.htm +++ b/interface/web/sites/templates/web_domain_edit.htm @@ -67,48 +67,48 @@  MB
-
+

{tmpl_var name='cgi_txt'}

{tmpl_var name='cgi'}
-
-
+
+

{tmpl_var name='ssi_txt'}

{tmpl_var name='ssi'}
-
-
+
+

{tmpl_var name='perl_txt'}

{tmpl_var name='perl'}
-
-
+
+

{tmpl_var name='ruby_txt'}

{tmpl_var name='ruby'}
-
-
+
+

{tmpl_var name='python_txt'}

{tmpl_var name='python'}
-
-
+
+

{tmpl_var name='suexec_txt'}

{tmpl_var name='suexec'}
-
-
+
+

{tmpl_var name='errordocs_txt'}

{tmpl_var name='errordocs'}
-
+
@@ -116,12 +116,12 @@ {tmpl_var name='subdomain'}
-
+

{tmpl_var name='ssl_txt'}

{tmpl_var name='ssl'}
-
+
- +
@@ -236,6 +236,14 @@ jQuery('div.tabbox_tabs').find('a').click(function() { jQuery('div.panel_web_domain').find('fieldset').find('input,select,button').removeAttr('disabled'); }); + jQuery('#dom-edit-submit').click(function() { + jQuery('div.panel_web_domain').find('fieldset').find('input,select,button').removeAttr('disabled'); + submitForm('pageForm','sites/web_domain_edit.php'); + }); + + jQuery('#dom-edit-submit').click(function() { + submitForm('pageForm','sites/web_domain_edit.php'); + }); \ No newline at end of file diff --git a/interface/web/sites/web_domain_edit.php b/interface/web/sites/web_domain_edit.php index caa2127e9aff49c909c2bba13507c2ebdf7f11d4..99e6670fe84e42bee34ea21e572277ab76f238a2 100644 --- a/interface/web/sites/web_domain_edit.php +++ b/interface/web/sites/web_domain_edit.php @@ -89,13 +89,14 @@ class page_action extends tform_actions { $app->uses('ini_parser,getconf'); + $read_limits = array('limit_cgi', 'limit_ssi', 'limit_perl', 'limit_ruby', 'limit_python', 'force_suexec', 'limit_hterror', 'limit_wildcard', 'limit_ssl'); //* 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.default_webserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); + $client = $app->db->queryOneRecord("SELECT client.limit_web_domain, 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"); //* Get global web config $web_config = $app->getconf->get_server_config($client['default_webserver'], 'web'); @@ -160,12 +161,16 @@ class page_action extends tform_actions { $app->tpl->setVar("fastcgi_php_version",$php_select); unset($php_records); + // add limits to template to be able to hide settings + foreach($read_limits as $limit) $app->tpl->setVar($limit, $client[$limit]); + + //* Reseller: If the logged in user is not admin and has sub clients (is a reseller) } elseif ($_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.client_id, client.limit_web_domain, client.default_webserver, client.contact_name, CONCAT(client.company_name,' :: ',client.contact_name) as contactname, sys_group.name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); + $client = $app->db->queryOneRecord("SELECT client.client_id, client.limit_web_domain, client.default_webserver, client.contact_name, CONCAT(client.company_name,' :: ',client.contact_name) 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"); //* Get global web config $web_config = $app->getconf->get_server_config($client['default_webserver'], 'web'); @@ -243,7 +248,11 @@ class page_action extends tform_actions { } $app->tpl->setVar("fastcgi_php_version",$php_select); unset($php_records); - + + // add limits to template to be able to hide settings + foreach($read_limits as $limit) $app->tpl->setVar($limit, $client[$limit]); + + //* Admin: If the logged in user is admin } else { @@ -332,7 +341,8 @@ class page_action extends tform_actions { } } $app->tpl->setVar("client_group_id",$client_select); - + + foreach($read_limits as $limit) $app->tpl->setVar($limit, 'y'); } $ssl_domain_select = ''; @@ -403,6 +413,12 @@ class page_action extends tform_actions { parent::onShowEnd(); } + + function onShowEdit() { + global $app; + if($app->tform->checkPerm($this->id, 'riud')) $app->tform->formDef['tabs']['domain']['readonly'] = false; + parent::onShowEdit(); + } function onSubmit() { global $app, $conf; @@ -412,11 +428,24 @@ class page_action extends tform_actions { $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, default_webserver, parent_client_id, limit_web_quota FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id"); - + $client = $app->db->queryOneRecord("SELECT limit_traffic_quota, limit_web_domain, default_webserver, 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"); + + if($client['limit_cgi'] != 'y') $this->dataRecord['cgi'] = '-'; + if($client['limit_ssi'] != 'y') $this->dataRecord['ssi'] = '-'; + if($client['limit_perl'] != 'y') $this->dataRecord['perl'] = '-'; + if($client['limit_ruby'] != 'y') $this->dataRecord['ruby'] = '-'; + if($client['limit_python'] != 'y') $this->dataRecord['python'] = '-'; + if($client['force_suexec'] != 'n') $this->dataRecord['suexec'] = '-'; + if($client['limit_hterror'] != 'y') $this->dataRecord['errordocs'] = '-'; + if($client['limit_wildcard'] != 'y' && $this->dataRecord['subdomain'] == '*') $this->dataRecord['subdomain'] = '-'; + if($client['limit_ssl'] != 'y') $this->dataRecord['ssl'] = '-'; + //* Check the website quota of the client if(isset($_POST["hd_quota"]) && $client["limit_web_quota"] >= 0) { $tmp = $app->db->queryOneRecord("SELECT sum(hd_quota) as webquota FROM web_domain WHERE domain_id != ".intval($this->id)." AND ".$app->tform->getAuthSQL('u')); @@ -489,8 +518,20 @@ class page_action extends tform_actions { // 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 FROM web_domain WHERE domain_id = ".intval($this->id)); + $tmp = $app->db->queryOneRecord("SELECT server_id, `cgi`, `ssi`, `perl`, `ruby`, `python`, `suexec`, `errordocs`, `subdomain`, `ssl` FROM web_domain WHERE domain_id = ".intval($this->id)); $this->dataRecord["server_id"] = $tmp["server_id"]; + + // set the settings to current if not provided (or cleared due to limits) + if($this->dataRecord['cgi'] == '-') $this->dataRecord['cgi'] = $tmp['cgi']; + if($this->dataRecord['ssi'] == '-') $this->dataRecord['ssi'] = $tmp['ssi']; + if($this->dataRecord['perl'] == '-') $this->dataRecord['perl'] = $tmp['perl']; + if($this->dataRecord['ruby'] == '-') $this->dataRecord['ruby'] = $tmp['ruby']; + if($this->dataRecord['python'] == '-') $this->dataRecord['python'] = $tmp['python']; + if($this->dataRecord['suexec'] == '-') $this->dataRecord['suexec'] = $tmp['suexec']; + if($this->dataRecord['errordocs'] == '-') $this->dataRecord['errordocs'] = $tmp['errordocs']; + if($this->dataRecord['subdomain'] == '-') $this->dataRecord['subdomain'] = $tmp['subdomain']; + if($this->dataRecord['ssl'] == '-') $this->dataRecord['ssl'] = $tmp['ssl']; + unset($tmp); // When the record is inserted } else { @@ -606,12 +647,18 @@ class page_action extends tform_actions { //* 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 domain from web_domain WHERE domain_id = ".$this->id); + $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); }