diff --git a/interface/web/client/client_template_edit.php b/interface/web/client/client_template_edit.php index d3f5c65cf1420242abf23c06a6a4d25879d3726b..2de0e6300291d6871e1bfdf8b8319a19bd28c9d6 100644 --- a/interface/web/client/client_template_edit.php +++ b/interface/web/client/client_template_edit.php @@ -1,97 +1,97 @@ -auth->check_module_permissions('client'); -if(!$_SESSION["s"]["user"]["typ"] == 'admin') die('Client-Templates are only for Admins.'); - -// Loading classes -$app->uses('tpl,tform,tform_actions'); -$app->load('tform_actions'); - -class page_action extends tform_actions { - - function onBeforeUpdate() { - global $app; - - if(isset($this->dataRecord['template_type'])) { - //* Check if the template_type has been changed - $rec = $app->db->queryOneRecord("SELECT template_type from client_template WHERE template_id = ".$this->id); - if($rec['template_type'] != $this->dataRecord['template_type']) { - //* Add a error message and switch back to old server - $app->tform->errorMessage .= $app->lng('The template type can not be changed.'); - $this->dataRecord['template_type'] = $rec['template_type']; - } - unset($rec); - } - } - - - /* - This function is called automatically right after - the data was successful updated in the database. - */ - function onAfterUpdate() { - global $app; - - /* - * the template has changed. apply the new data to all clients - */ - if ($this->dataRecord["template_type"] == 'm'){ - $sql = "SELECT client_id FROM client WHERE template_master = " . $this->id; - } else { - $sql = "SELECT client_id FROM client WHERE template_additional LIKE '%/" . $this->id . '/%"'; - } - $clients = $app->db->queryAllRecords($sql); - if (is_array($clients)){ - foreach ($clients as $client){ - applyClientTemplates($client['client_id']); - } - } - } -} - -$page = new page_action; -$page->onLoad(); -?> +auth->check_module_permissions('client'); +if(!$_SESSION["s"]["user"]["typ"] == 'admin') die('Client-Templates are only for Admins.'); + +// Loading classes +$app->uses('tpl,tform,tform_actions'); +$app->load('tform_actions'); + +class page_action extends tform_actions { + + function onBeforeUpdate() { + global $app; + + if(isset($this->dataRecord['template_type'])) { + //* Check if the template_type has been changed + $rec = $app->db->queryOneRecord("SELECT template_type from client_template WHERE template_id = ".$this->id); + if($rec['template_type'] != $this->dataRecord['template_type']) { + //* Add a error message and switch back to old server + $app->tform->errorMessage .= $app->lng('The template type can not be changed.'); + $this->dataRecord['template_type'] = $rec['template_type']; + } + unset($rec); + } + } + + + /* + This function is called automatically right after + the data was successful updated in the database. + */ + function onAfterUpdate() { + global $app; + + /* + * the template has changed. apply the new data to all clients + */ + if ($this->dataRecord["template_type"] == 'm'){ + $sql = "SELECT client_id FROM client WHERE template_master = " . $this->id; + } else { + $sql = "SELECT client_id FROM client WHERE template_additional LIKE '%/" . $this->id . "/%'"; + } + $clients = $app->db->queryAllRecords($sql); + if (is_array($clients)){ + foreach ($clients as $client){ + applyClientTemplates($client['client_id']); + } + } + } +} + +$page = new page_action; +$page->onLoad(); +?> diff --git a/interface/web/client/lib/lang/de_client.lng b/interface/web/client/lib/lang/de_client.lng index 51ab88aa50cc2f36f2dd750a456ceea159376a18..587d0d5069fdeb01c6f1c96a74b9a0fc0df82e09 100644 --- a/interface/web/client/lib/lang/de_client.lng +++ b/interface/web/client/lib/lang/de_client.lng @@ -111,4 +111,10 @@ $wb['bank_code_txt'] = 'BLZ'; $wb['bank_name_txt'] = 'Bank'; $wb['bank_account_iban_txt'] = 'IBAN'; $wb['bank_account_swift_txt'] = 'BIC'; +$wb["web_limits_txt"] = 'Web-Limits'; +$wb["email_limits_txt"] = 'Email-Limits'; +$wb["database_limits_txt"] = 'Datenbank-Limits'; +$wb["cron_job_limits_txt"] = 'Cron Job-Limits'; +$wb["dns_limits_txt"] = 'DNS-Limits'; +$wb["virtualization_limits_txt"] = 'Virtualisierungs-Limits'; ?> diff --git a/interface/web/client/lib/lang/de_client_template.lng b/interface/web/client/lib/lang/de_client_template.lng index ea73ddab3f93a22c08f31f0b86cc9596c658dbb0..08e67f5e109af93dc830d0abcb23a9da6f9a4e8a 100644 --- a/interface/web/client/lib/lang/de_client_template.lng +++ b/interface/web/client/lib/lang/de_client_template.lng @@ -69,4 +69,10 @@ $wb['ssh_chroot_txt'] = 'SSH-Chroot Options'; $wb['web_php_options_txt'] = 'PHP Options'; $wb['template_type_txt'] = 'Template type'; $wb['template_name_txt'] = 'Template name'; +$wb["web_limits_txt"] = 'Web-Limits'; +$wb["email_limits_txt"] = 'Email-Limits'; +$wb["database_limits_txt"] = 'Datenbank-Limits'; +$wb["cron_job_limits_txt"] = 'Cron Job-Limits'; +$wb["dns_limits_txt"] = 'DNS-Limits'; +$wb["virtualization_limits_txt"] = 'Virtualisierungs-Limits'; ?> diff --git a/interface/web/client/lib/lang/de_reseller.lng b/interface/web/client/lib/lang/de_reseller.lng index 55dbfe0cb07c2a816346e004922d6f81345dfdc0..b34bd1cccda2aa078124bc84a23d0d3a6a4d8976 100644 --- a/interface/web/client/lib/lang/de_reseller.lng +++ b/interface/web/client/lib/lang/de_reseller.lng @@ -106,4 +106,10 @@ $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['web_php_options_notempty'] = 'No PHP option(s) selected. Select at least one PHP option.'; $wb['ssh_chroot_notempty'] = 'No SSH chroot option selected. Select at least one SSH option.'; +$wb["web_limits_txt"] = 'Web-Limits'; +$wb["email_limits_txt"] = 'Email-Limits'; +$wb["database_limits_txt"] = 'Datenbank-Limits'; +$wb["cron_job_limits_txt"] = 'Cron Job-Limits'; +$wb["dns_limits_txt"] = 'DNS-Limits'; +$wb["virtualization_limits_txt"] = 'Virtualisierungs-Limits'; ?> diff --git a/interface/web/client/lib/lang/en_client.lng b/interface/web/client/lib/lang/en_client.lng index 4981afa3f81a646a967585771add7708b35589e8..d912744554f3169603b115445347518c0d6fa4f4 100644 --- a/interface/web/client/lib/lang/en_client.lng +++ b/interface/web/client/lib/lang/en_client.lng @@ -114,4 +114,10 @@ $wb["bank_code_txt"] = 'Bank code'; $wb["bank_name_txt"] = 'Bank name'; $wb["bank_account_iban_txt"] = 'IBAN'; $wb["bank_account_swift_txt"] = 'BIC / Swift'; +$wb["web_limits_txt"] = 'Web Limits'; +$wb["email_limits_txt"] = 'Email Limits'; +$wb["database_limits_txt"] = 'Database Limits'; +$wb["cron_job_limits_txt"] = 'Cron Job Limits'; +$wb["dns_limits_txt"] = 'DNS Limits'; +$wb["virtualization_limits_txt"] = 'Virtualization Limits'; ?> diff --git a/interface/web/client/lib/lang/en_client_template.lng b/interface/web/client/lib/lang/en_client_template.lng index d6f6a5633033822c1f530e5f17888542e2c18fd8..c733a71796b4caa75adda72bae62e190a360bd90 100644 --- a/interface/web/client/lib/lang/en_client_template.lng +++ b/interface/web/client/lib/lang/en_client_template.lng @@ -70,4 +70,10 @@ $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["web_limits_txt"] = 'Web Limits'; +$wb["email_limits_txt"] = 'Email Limits'; +$wb["database_limits_txt"] = 'Database Limits'; +$wb["cron_job_limits_txt"] = 'Cron Job Limits'; +$wb["dns_limits_txt"] = 'DNS Limits'; +$wb["virtualization_limits_txt"] = 'Virtualization Limits'; ?> \ No newline at end of file diff --git a/interface/web/client/lib/lang/en_reseller.lng b/interface/web/client/lib/lang/en_reseller.lng index b93f54ee895fb491b1e44dc5fadf373ecde542f6..df2ec24ace746415a6d8eb913ae072d0b0d33aad 100644 --- a/interface/web/client/lib/lang/en_reseller.lng +++ b/interface/web/client/lib/lang/en_reseller.lng @@ -108,4 +108,10 @@ $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["web_php_options_notempty"] = 'No PHP option(s) selected. Select at least one PHP option.'; $wb["ssh_chroot_notempty"] = 'No SSH chroot option selected. Select at least one SSH option.'; +$wb["web_limits_txt"] = 'Web Limits'; +$wb["email_limits_txt"] = 'Email Limits'; +$wb["database_limits_txt"] = 'Database Limits'; +$wb["cron_job_limits_txt"] = 'Cron Job Limits'; +$wb["dns_limits_txt"] = 'DNS Limits'; +$wb["virtualization_limits_txt"] = 'Virtualization Limits'; ?> diff --git a/interface/web/client/templates/client_edit_limits.htm b/interface/web/client/templates/client_edit_limits.htm index 472fb877c27c67a5491e4b04da84338fc0bc9ba6..facff980a7f6d76e5a529052c8fc8704d31730b9 100644 --- a/interface/web/client/templates/client_edit_limits.htm +++ b/interface/web/client/templates/client_edit_limits.htm @@ -35,6 +35,61 @@   +
{tmpl_var name='web_limits_txt'}
+
+
+ + +
+
+ + +
+
+ +  MB +
+
+ +  MB +
+
+

{tmpl_var name='web_php_options_txt'}

+
+ {tmpl_var name='web_php_options'} +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+

{tmpl_var name='ssh_chroot_txt'}

+
+ {tmpl_var name='ssh_chroot'} +
+
+
+ + +
+
+
{tmpl_var name='email_limits_txt'}
+
-
- - -
-
- - -
-
- -  MB -
-
-

{tmpl_var name='web_php_options_txt'}

-
- {tmpl_var name='web_php_options'} -
+
{tmpl_var name='database_limits_txt'}
+
- - + +
- - + +
-
- -
+
{tmpl_var name='cron_job_limits_txt'}
+
- - -
+ + +
-

{tmpl_var name='ssh_chroot_txt'}

-
- {tmpl_var name='ssh_chroot'} -
-
+ + +
- - + + +
+
{tmpl_var name='dns_limits_txt'}
+
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -  MB
+
{tmpl_var name='virtualization_limits_txt'}
+
@@ -199,6 +216,7 @@ {tmpl_var name='limit_openvz_vm_template_id'}
+
diff --git a/interface/web/client/templates/client_template_edit_limits.htm b/interface/web/client/templates/client_template_edit_limits.htm index ac62a7c6f19bdd4fdf307fde2a3233248458a3ff..808d5558bb02d996af839ad26b578e7c367ac8a6 100644 --- a/interface/web/client/templates/client_template_edit_limits.htm +++ b/interface/web/client/templates/client_template_edit_limits.htm @@ -5,6 +5,55 @@
Limits +
{tmpl_var name='web_limits_txt'}
+
+
+ + +
+
+ +  MB +
+
+ +  MB +
+
+

{tmpl_var name='web_php_options_txt'}

+
+ {tmpl_var name='web_php_options'} +
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+

{tmpl_var name='ssh_chroot_txt'}

+
+ {tmpl_var name='ssh_chroot'} +
+
+
+ + +
+
+
{tmpl_var name='email_limits_txt'}
+
@@ -61,62 +110,16 @@
-
- - -
-
- -  MB -
-
-

{tmpl_var name='web_php_options_txt'}

-
- {tmpl_var name='web_php_options'} -
-
-
- - -
-
- - -
-
- - -
-
- - -
-
-

{tmpl_var name='ssh_chroot_txt'}

-
- {tmpl_var name='ssh_chroot'} -
-
-
- - -
-
- - -
-
- - -
-
- -
+
{tmpl_var name='database_limits_txt'}
+
+
+
{tmpl_var name='cron_job_limits_txt'}
+
@@ -131,10 +134,24 @@
+
+
{tmpl_var name='dns_limits_txt'}
+
- -  MB + + +
+
+ +
+
+ + +
+
+
{tmpl_var name='virtualization_limits_txt'}
+
@@ -145,6 +162,7 @@ {tmpl_var name='limit_openvz_vm_template_id'}
+
diff --git a/interface/web/client/templates/reseller_edit_limits.htm b/interface/web/client/templates/reseller_edit_limits.htm index f6ead60512029d0e52e1591590dc272ca9b9872e..118b8b89d5db905411b001e7586c63fb42dde1bf 100644 --- a/interface/web/client/templates/reseller_edit_limits.htm +++ b/interface/web/client/templates/reseller_edit_limits.htm @@ -26,7 +26,66 @@
--> +
+ + +
+
{tmpl_var name='web_limits_txt'}
+
+
+ + +
+
+ + +
+
+ +  MB +
+
+ +  MB +
+
+

{tmpl_var name='web_php_options_txt'}

+
+ {tmpl_var name='web_php_options'} +
+
+
+ + +
+
+ + +
+ + +
+
+ + +
+
+

{tmpl_var name='ssh_chroot_txt'}

+
+ {tmpl_var name='ssh_chroot'} +
+
+
+ + +
+
+
{tmpl_var name='email_limits_txt'}
+
+
+
+
{tmpl_var name='database_limits_txt'}
+
- - + {tmpl_var name='default_dbserver'}
- - -
-
- -  MB -
-
-

{tmpl_var name='web_php_options_txt'}

-
- {tmpl_var name='web_php_options'} -
-
-
- - -
-
- - -
-
- - + +
+
+
{tmpl_var name='cron_job_limits_txt'}
+
- - -
+ + +
-

{tmpl_var name='ssh_chroot_txt'}

-
- {tmpl_var name='ssh_chroot'} -
-
-
- - -
+ + +
+ + +
+ +
{tmpl_var name='dns_limits_txt'}
+
+
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- -  MB -
+
+
{tmpl_var name='virtualization_limits_txt'}
+
@@ -194,6 +211,7 @@ {tmpl_var name='limit_openvz_vm_template_id'}
+