Commit ac099e20 authored by mcramer's avatar mcramer

FS#2385 - Extend client limits

parent 3501f913
......@@ -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`;
......@@ -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',
......
......@@ -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',
......
......@@ -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',
......
......@@ -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',
......
......@@ -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.';
......
......@@ -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';
......
......@@ -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';
......
......@@ -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';
......
......@@ -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';
......
......@@ -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';
......
......@@ -61,6 +61,60 @@
{tmpl_var name='web_php_options'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_cgi_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_cgi'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_ssi_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_ssi'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_perl_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_perl'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_ruby_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_ruby'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_python_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_python'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='force_suexec_txt'}</p>
<div class="multiField">
{tmpl_var name='force_suexec'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_hterror_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_hterror'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_wildcard_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_wildcard'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_ssl_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_ssl'}
</div>
</div>
<div class="ctrlHolder">
<label for="limit_web_aliasdomain">{tmpl_var name='limit_web_aliasdomain_txt'}</label>
<input name="limit_web_aliasdomain" id="limit_web_aliasdomain" value="{tmpl_var name='limit_web_aliasdomain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
......
......@@ -25,6 +25,60 @@
{tmpl_var name='web_php_options'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_cgi_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_cgi'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_ssi_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_ssi'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_perl_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_perl'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_ruby_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_ruby'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_python_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_python'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='force_suexec_txt'}</p>
<div class="multiField">
{tmpl_var name='force_suexec'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_hterror_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_hterror'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_wildcard_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_wildcard'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_ssl_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_ssl'}
</div>
</div>
<div class="ctrlHolder">
<label for="limit_web_aliasdomain">{tmpl_var name='limit_web_aliasdomain_txt'}</label>
<input name="limit_web_aliasdomain" id="limit_web_aliasdomain" value="{tmpl_var name='limit_web_aliasdomain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
......
......@@ -56,6 +56,60 @@
{tmpl_var name='web_php_options'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_cgi_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_cgi'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_ssi_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_ssi'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_perl_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_perl'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_ruby_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_ruby'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_python_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_python'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='force_suexec_txt'}</p>
<div class="multiField">
{tmpl_var name='force_suexec'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_hterror_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_hterror'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_wildcard_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_wildcard'}
</div>
</div>
<div class="ctrlHolder">
<p class="label">{tmpl_var name='limit_ssl_txt'}</p>
<div class="multiField">
{tmpl_var name='limit_ssl'}
</div>
</div>
<div class="ctrlHolder">
<label for="limit_web_aliasdomain">{tmpl_var name='limit_web_aliasdomain_txt'}</label>
<input name="limit_web_aliasdomain" id="limit_web_aliasdomain" value="{tmpl_var name='limit_web_aliasdomain'}" size="10" maxlength="10" type="text" class="textInput formLengthLimit" />
......
......@@ -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 (
......
......@@ -67,48 +67,48 @@
<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'>
</div>
<div class="ctrlHolder">
<tmpl_if name="limit_cgi" op="==" value="y"><div class="ctrlHolder">
<p class="label">{tmpl_var name='cgi_txt'}</p>
<div class="multiField">
{tmpl_var name='cgi'}
</div>
</div>
<div class="ctrlHolder">
</div></tmpl_if>
<tmpl_if name="limit_ssi" op="==" value="y"><div class="ctrlHolder">
<p class="label">{tmpl_var name='ssi_txt'}</p>
<div class="multiField">
{tmpl_var name='ssi'}
</div>
</div>
<div class="ctrlHolder apache">
</div></tmpl_if>
<tmpl_if name="limit_perl" op="==" value="y"><div class="ctrlHolder apache">
<p class="label">{tmpl_var name='perl_txt'}</p>
<div class="multiField">
{tmpl_var name='perl'}
</div>
</div>
<div class="ctrlHolder apache">
</div></tmpl_if>
<tmpl_if name="limit_ruby" op="==" value="y"><div class="ctrlHolder apache">
<p class="label">{tmpl_var name='ruby_txt'}</p>
<div class="multiField">
{tmpl_var name='ruby'}
</div>
</div>
<div class="ctrlHolder apache">
</div></tmpl_if>
<tmpl_if name="limit_python" op="==" value="y"><div class="ctrlHolder apache">
<p class="label">{tmpl_var name='python_txt'}</p>
<div class="multiField">
{tmpl_var name='python'}
</div>
</div>
<div class="ctrlHolder apache">
</div></tmpl_if>
<tmpl_if name="force_suexec" op="==" value="n"><div class="ctrlHolder apache">
<p class="label">{tmpl_var name='suexec_txt'}</p>
<div class="multiField">
{tmpl_var name='suexec'}
</div>
</div>
<div class="ctrlHolder">
</div></tmpl_if>
<tmpl_if name="limit_hterror" op="==" value="y"><div class="ctrlHolder">
<p class="label">{tmpl_var name='errordocs_txt'}</p>
<div class="multiField">
{tmpl_var name='errordocs'}
</div>
</div>
</div></tmpl_if>
<div class="ctrlHolder">
<label for="subdomain">{tmpl_var name='subdomain_txt'}</label>
......@@ -116,12 +116,12 @@
{tmpl_var name='subdomain'}
</select>
</div>
<div class="ctrlHolder">
<tmpl_if name="limit_ssl" op="==" value="y"><div class="ctrlHolder">
<p class="label">{tmpl_var name='ssl_txt'}</p>
<div class="multiField">
{tmpl_var name='ssl'}
</div>
</div>
</div></tmpl_if>
<div class="ctrlHolder">
<label for="php">{tmpl_var name='php_txt'}</label>
<select name="php" id="php" class="selectInput formLengthHalf">
......@@ -145,7 +145,7 @@
<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 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>
</div>
</div>
......@@ -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');
});
<tmpl_else>
jQuery('#dom-edit-submit').click(function() {
submitForm('pageForm','sites/web_domain_edit.php');
});
</tmpl_if>
</script>
\ No newline at end of file
......@@ -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."