Commit 7e2a3fa2 authored by Florian Schaal's avatar Florian Schaal

Add DB-User limit (Issue #2586)

parent c74c6544
......@@ -222,3 +222,7 @@ ALTER TABLE `sys_user`
ADD COLUMN `lost_password_reqtime` DATETIME NULL default NULL;
ALTER TABLE `web_database` ADD COLUMN `quota_exceeded` enum('n','y') NOT NULL DEFAULT 'n' AFTER `database_quota`;
ALTER TABLE `client` ADD COLUMN `limit_database_users` int(11) NOT NULL DEFAULT '-1' after limit_database;
ALTER TABLE `client_template` ADD COLUMN `limit_database_users` int(11) NOT NULL DEFAULT '-1' after limit_database;
......@@ -230,6 +230,7 @@ CREATE TABLE `client` (
`default_dbserver` int(11) NOT NULL DEFAULT '1',
`dns_servers` blob,
`limit_database` int(11) NOT NULL DEFAULT '-1',
`limit_database_users` int(11) NOT NULL DEFAULT '-1',
`limit_database_quota` int(11) NOT NULL default '-1',
`limit_cron` int(11) NOT NULL DEFAULT '0',
`limit_cron_type` enum('url','chrooted','full') NOT NULL DEFAULT 'url',
......@@ -351,6 +352,7 @@ CREATE TABLE `client_template` (
`limit_dns_slave_zone` int(11) NOT NULL default '-1',
`limit_dns_record` int(11) NOT NULL default '-1',
`limit_database` int(11) NOT NULL default '-1',
`limit_database_users` int(11) NOT NULL DEFAULT '-1',
`limit_database_quota` int(11) NOT NULL default '-1',
`limit_cron` int(11) NOT NULL default '0',
`limit_cron_type` enum('url','chrooted','full') NOT NULL default 'url',
......
......@@ -1262,6 +1262,20 @@ $form["tabs"]['limits'] = array (
'rows' => '',
'cols' => ''
),
'limit_database_user' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'ISINT',
'errmsg'=> 'limit_database_user_notint'),
),
'default' => '-1',
'value' => '',
'separator' => '',
'width' => '10',
'maxlength' => '10',
'rows' => '',
'cols' => ''
),
'limit_database_quota' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
......
......@@ -729,6 +729,20 @@ $form["tabs"]['limits'] = array (
'rows' => '',
'cols' => ''
),
'limit_database_user' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'ISINT',
'errmsg'=> 'limit_database_user_error_notint'),
),
'default' => '0',
'value' => '',
'separator' => '',
'width' => '10',
'maxlength' => '10',
'rows' => '',
'cols' => ''
),
'limit_database_quota' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
......
......@@ -1261,6 +1261,20 @@ $form["tabs"]['limits'] = array (
'rows' => '',
'cols' => ''
),
'limit_database_user' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'ISINT',
'errmsg'=> 'limit_database_user_error_notint'),
),
'default' => '-1',
'value' => '',
'separator' => '',
'width' => '10',
'maxlength' => '10',
'rows' => '',
'cols' => ''
),
'limit_cron' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
......
......@@ -194,4 +194,6 @@ $wb['reseller_txt'] = 'Reseller';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -194,4 +194,6 @@ $wb['reseller_txt'] = 'Reseller';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -194,4 +194,6 @@ $wb['reseller_txt'] = 'Reseller';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -194,4 +194,6 @@ $wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['email_error_empty'] = 'Email is empty';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['email_error_empty'] = 'Email is empty';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -194,4 +194,6 @@ $wb['reseller_txt'] = 'Reseller';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -196,4 +196,6 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['limit_directive_snippets_txt'] = 'Webserver-Konfigurationsauswahl sichtbar';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -198,4 +198,8 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['limit_directive_snippets_txt'] = 'Webserver-Konfigurationsauswahl sichtbar';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -194,4 +194,6 @@ $wb['reseller_txt'] = 'Reseller';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -196,6 +196,9 @@ $wb['parent_client_id_txt'] = 'Client of reseller';
$wb['none_txt'] = 'none';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
$wb['limit_database_user_txt'] = "Max. Database users";
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['reseller_txt'] = 'Reseller';
$wb['btn_save_txt'] = "Save";
$wb['btn_cancel_txt'] = "Cancel";
......
......@@ -42,6 +42,7 @@ $wb["limit_domain_txt"] = 'limit_domain';
$wb["limit_subdomain_txt"] = 'limit_subdomain';
$wb["limit_webquota_txt"] = 'limit_webquota';
$wb["limit_database_txt"] = 'limit_database';
$wb["limit_database_user_txt"] = "Max. Database users";
$wb["limit_cron_txt"] = 'Max. number of cron jobs';
$wb["limit_cron_type_txt"] = 'Max. type of cron jobs (chrooted and full implies url)';
$wb["limit_cron_frequency_txt"] = 'Min. delay between executions';
......@@ -203,4 +204,8 @@ $wb["btn_cancel_txt"] = "Cancel";
$wb["email_error_empty"] = "Email is empty";
$wb['limit_directive_snippets_txt'] = 'Show web server config selection';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -194,4 +194,6 @@ $wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -194,4 +194,6 @@ $wb['reseller_txt'] = 'Reseller';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -194,4 +194,6 @@ $wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['email_error_empty'] = 'Email is empty';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['email_error_empty'] = 'Email is empty';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -194,4 +194,6 @@ $wb['reseller_txt'] = 'Reseller';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -194,4 +194,6 @@ $wb['reseller_txt'] = 'Reseller';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -194,4 +194,6 @@ $wb['reseller_txt'] = 'Reseller';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -194,4 +194,6 @@ $wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['email_error_empty'] = 'Email is empty';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['email_error_empty'] = 'Email is empty';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -194,4 +194,6 @@ $wb['reseller_txt'] = 'Reseller';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -194,4 +194,6 @@ $wb['reseller_txt'] = 'Reseller';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -194,4 +194,6 @@ $wb['reseller_txt'] = 'Reseller';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -194,4 +194,6 @@ $wb['reseller_txt'] = 'Reseller';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -194,4 +194,6 @@ $wb['reseller_txt'] = 'Reseller';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -194,4 +194,6 @@ $wb['reseller_txt'] = 'Reseller';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -194,4 +194,6 @@ $wb['reseller_txt'] = 'Reseller';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -194,4 +194,6 @@ $wb['reseller_txt'] = 'Reseller';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['limit_xmpp_vjud_txt'] = 'VJUD user directory available';
$wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -194,4 +194,6 @@ $wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['email_error_empty'] = 'Email is empty';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
?>
......@@ -196,4 +196,8 @@ $wb['invalid_vat_id'] = 'The VAT ID is invalid.';
$wb['btn_save_txt'] = 'Save';
$wb['btn_cancel_txt'] = 'Cancel';
$wb['email_error_empty'] = 'Email is empty';
$wb['limit_database_user_txt'] = 'Max. Database users';
$wb['limit_database_user_error_notint'] = 'The database user limit must be a number.';
$wb['limit_database_quota_txt'] = 'Database quota';
$wb['limit_database_quota_error_notint'] = 'The database quota limit must be a number.';
?>
......@@ -333,6 +333,9 @@
<div class="form-group">
<label for="limit_database" class="col-sm-3 control-label">{tmpl_var name='limit_database_txt'}</label>
<div class="col-sm-9"><input type="text" name="limit_database" id="limit_database" value="{tmpl_var name='limit_database'}" class="form-control" /></div></div>
<div class="form-group">
<label for="limit_database_user" class="col-sm-3 control-label">{tmpl_var name='limit_database_user_txt'}</label>
<div class="col-sm-9"><input type="text" name="limit_database_user" id="limit_database_user" value="{tmpl_var name='limit_database_user'}" class="form-control" /></div></div>
<div class="form-group">
<label for="limit_database_quota" class="col-sm-3 control-label">{tmpl_var name='limit_database_quota_txt'}</label>
<div class="col-sm-6"><input type="text" name="limit_database_quota" id="limit_database_quota" value="{tmpl_var name='limit_database_quota'}" class="form-control" /></div><div class="col-sm-3 input-sm">&nbsp;MB
......
......@@ -266,6 +266,9 @@
<div class="form-group">
<label for="limit_database" class="col-sm-3 control-label">{tmpl_var name='limit_database_txt'}</label>
<div class="col-sm-9"><input type="text" name="limit_database" id="limit_database" value="{tmpl_var name='limit_database'}" class="form-control" /></div></div>
<div class="form-group">
<label for="limit_database_user" class="col-sm-3 control-label">{tmpl_var name='limit_database_user_txt'}</label>
<div class="col-sm-9"><input type="text" name="limit_database_user" id="limit_database_user" value="{tmpl_var name='limit_database_user'}" class="form-control" /></div></div>
<div class="form-group">
<label for="limit_database_quota" class="col-sm-3 control-label">{tmpl_var name='limit_database_quota_txt'}</label>
<div class="col-sm-6"><input type="text" name="limit_database_quota" id="limit_database_quota" value="{tmpl_var name='limit_database_quota'}" class="form-control" /></div><div class="col-sm-3 input-sm">&nbsp;MB
......
......@@ -335,6 +335,9 @@
<div class="form-group">
<label for="limit_database" class="col-sm-3 control-label">{tmpl_var name='limit_database_txt'}</label>
<div class="col-sm-9"><input type="text" name="limit_database" id="limit_database" value="{tmpl_var name='limit_database'}" class="form-control" /></div></div>
<div class="form-group">
<label for="limit_database_user" class="col-sm-3 control-label">{tmpl_var name='limit_database_user_txt'}</label>
<div class="col-sm-9"><input type="text" name="limit_database_user" id="limit_database_user" value="{tmpl_var name='limit_database_user'}" class="form-control" /></div></div>
<div class="form-group">
<label for="limit_database_quota" class="col-sm-3 control-label">{tmpl_var name='limit_database_quota_txt'}</label>
<div class="col-sm-6"><input type="text" name="limit_database_quota" id="limit_database_quota" value="{tmpl_var name='limit_database_quota'}" class="form-control" /></div><div class="col-sm-3 input-sm">&nbsp;MB
......
......@@ -50,6 +50,22 @@ $app->load('tform_actions');
class page_action extends tform_actions {
function onShowNew() {
global $app;
// we will check only users, not admins
if($_SESSION['s']['user']['typ'] == 'user') {
if(!$app->tform->checkClientLimit('limit_database_users')) {
$app->error($app->tform->wordbook["limit_database_user_txt"]);
}
if(!$app->tform->checkResellerLimit('limit_database_users')) {
$app->error('Reseller: '.$app->tform->wordbook["limit_database_user_txt"]);
}
}
parent::onShowNew();
}
function onShowEnd() {
global $app, $conf, $interfaceConf;
......
......@@ -20,4 +20,5 @@ $wb['globalsearch_noresults_text_txt'] = 'No results.';
$wb['globalsearch_noresults_limit_txt'] = '0 results';
$wb['globalsearch_searchfield_watermark_txt'] = 'Search';
$wb['globalsearch_suggestions_text_txt'] = 'Suggestions';
$wb['limit_database_user_txt'] = 'The max. number of database users is reached.';
?>
......@@ -20,4 +20,5 @@ $wb['globalsearch_noresults_text_txt'] = 'No results.';
$wb['globalsearch_noresults_limit_txt'] = '0 results';
$wb['globalsearch_searchfield_watermark_txt'] = 'Search';
$wb['globalsearch_suggestions_text_txt'] = 'Suggestions';
$wb['limit_database_user_txt'] = 'The max. number of database users is reached.';
?>
......@@ -20,4 +20,5 @@ $wb['globalsearch_noresults_text_txt'] = 'No results.';
$wb['globalsearch_noresults_limit_txt'] = '0 results';
$wb['globalsearch_searchfield_watermark_txt'] = 'Search';
$wb['globalsearch_suggestions_text_txt'] = 'Suggestions';
$wb['limit_database_user_txt'] = 'The max. number of database users is reached.';
?>
......@@ -20,4 +20,5 @@ $wb['globalsearch_noresults_text_txt'] = 'Pas de résultat.';
$wb['globalsearch_noresults_limit_txt'] = '0 resultat';
$wb['globalsearch_searchfield_watermark_txt'] = 'Search';
$wb['globalsearch_suggestions_text_txt'] = 'Suggestions';
$wb['limit_database_user_txt'] = 'The max. number of database users is reached.';
?>
......@@ -20,4 +20,5 @@ $wb['globalsearch_noresults_text_txt'] = 'Žádné výsledky.';
$wb['globalsearch_noresults_limit_txt'] = '0 výsledků';
$wb['globalsearch_searchfield_watermark_txt'] = 'Hledat';
$wb['globalsearch_suggestions_text_txt'] = 'Návrhy';
$wb['limit_database_user_txt'] = 'The max. number of database users is reached.';
?>
......@@ -20,4 +20,5 @@ $wb['globalsearch_noresults_text_txt'] = 'Keine Treffer.';
$wb['globalsearch_noresults_limit_txt'] = '0 Treffer';
$wb['globalsearch_searchfield_watermark_txt'] = 'Suche';
$wb['globalsearch_suggestions_text_txt'] = 'Vorschläge';
$wb['limit_database_user_txt'] = 'The max. number of database users is reached.';
?>
......@@ -20,4 +20,5 @@ $wb['globalsearch_noresults_text_txt'] = 'No results.';
$wb['globalsearch_noresults_limit_txt'] = '0 results';
$wb['globalsearch_searchfield_watermark_txt'] = 'Search';
$wb['globalsearch_suggestions_text_txt'] = 'Suggestions';
$wb['limit_database_user_txt'] = 'The max. number of database users is reached.';
?>
......@@ -20,4 +20,5 @@ $wb['globalsearch_noresults_text_txt'] = "No results.";
$wb['globalsearch_noresults_limit_txt'] = "0 results";
$wb['globalsearch_searchfield_watermark_txt'] = "Search";
$wb['globalsearch_suggestions_text_txt'] = "Suggestions";
$wb['limit_database_user_txt'] = "The max. number of database users is reached.";
?>
......@@ -20,4 +20,5 @@ $wb['globalsearch_noresults_text_txt'] = 'Sin resultados.';
$wb['globalsearch_noresults_limit_txt'] = '0 resultados';
$wb['globalsearch_searchfield_watermark_txt'] = 'Buscar';
$wb['globalsearch_suggestions_text_txt'] = 'Sugerencias';
$wb['limit_database_user_txt'] = 'The max. number of database users is reached.';
?>
......@@ -20,4 +20,5 @@ $wb['globalsearch_noresults_text_txt'] = 'No results.';
$wb['globalsearch_noresults_limit_txt'] = '0 results';
$wb['globalsearch_searchfield_watermark_txt'] = 'Search';
$wb['globalsearch_suggestions_text_txt'] = 'Suggestions';
$wb['limit_database_user_txt'] = 'The max. number of database users is reached.';
?>
......@@ -20,4 +20,5 @@ $wb['globalsearch_noresults_text_txt'] = 'No results.';
$wb['globalsearch_noresults_limit_txt'] = '0 results';
$wb['globalsearch_searchfield_watermark_txt'] = 'Search';
$wb['globalsearch_suggestions_text_txt'] = 'Suggestions';
$wb['limit_database_user_txt'] = 'The max. number of database users is reached.';
?>