From 7b47c0aa0aeee6f059f00008e36cc210ca89ecb9 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 21 Aug 2013 10:28:20 -0400
Subject: [PATCH] Merged revisions 4069-4117 from stable branch.

---
 interface/web/help/lib/lang/se_support_message.lng        |    7 
 interface/web/sites/lib/lang/el_web_folder_user.lng       |    1 
 interface/web/admin/lib/lang/it_software_repo.lng         |    1 
 interface/web/admin/lib/lang/es_server_config.lng         |   17 
 interface/web/sites/cron_edit.php                         |    3 
 interface/web/sites/lib/lang/fr_shell_user.lng            |    2 
 interface/web/sites/lib/lang/se_web_domain.lng            |    7 
 interface/web/login/lib/lang/ru.lng                       |    1 
 interface/web/sites/lib/lang/ro_web_folder_user.lng       |    1 
 interface/web/admin/lib/lang/nl_server_config.lng         |   17 
 interface/web/admin/lib/lang/ro_software_package_list.lng |    2 
 interface/web/client/lib/lang/tr_client.lng               |    1 
 interface/lib/classes/plugin_backuplist.inc.php           |    6 
 interface/web/admin/lib/lang/pt_software_package_list.lng |    2 
 interface/web/client/lib/lang/ja_reseller.lng             |    1 
 interface/web/admin/lib/lang/cz_software_repo.lng         |    1 
 interface/web/admin/lib/lang/tr_software_package.lng      |    6 
 interface/web/admin/lib/lang/se_software_package_list.lng |    2 
 interface/web/help/lib/lang/bg_support_message.lng        |    7 
 interface/web/client/lib/lang/hr_client_del.lng           |    1 
 interface/web/client/lib/lang/br_client_del.lng           |    1 
 interface/web/sites/lib/lang/de_web_domain.lng            |    1 
 interface/lib/lang/bg.lng                                 |    2 
 interface/web/sites/lib/lang/en_web_domain.lng            |    1 
 interface/web/dashboard/lib/lang/pl_dashlet_mailquota.lng |    8 
 interface/web/admin/lib/lang/fi_software_package.lng      |    6 
 interface/web/login/lib/lang/ar.lng                       |    1 
 interface/web/mail/lib/lang/it_user_quota_stats_list.lng  |    1 
 interface/web/client/lib/lang/fr_client.lng               |    1 
 interface/web/admin/lib/lang/pl_system_config.lng         |    3 
 interface/web/sites/lib/lang/ja_shell_user.lng            |    2 
 server/server.php                                         |    3 
 interface/web/client/lib/lang/hr_client.lng               |    1 
 interface/web/client/lib/lang/ro_client_template_list.lng |    1 
 interface/web/client/templates/reseller_edit_address.htm  |   18 
 interface/web/mail/lib/lang/sk_spamfilter_users.lng       |    2 
 interface/web/sites/templates/web_domain_advanced.htm     |    9 
 install/tpl/system.ini.master                             |    6 
 interface/web/client/lib/lang/tr_reseller.lng             |    1 
 interface/web/mail/lib/lang/fi_spamfilter_users.lng       |    2 
 interface/web/admin/lib/lang/ro_software_repo.lng         |    1 
 interface/web/client/lib/lang/ar_reseller.lng             |    1 
 interface/web/monitor/lib/lang/cz.lng                     |    6 
 interface/web/mail/lib/lang/cz_spamfilter_users.lng       |    2 
 interface/web/admin/language_edit.php                     |    2 
 interface/web/admin/lib/lang/ru_server_config.lng         |   17 
 interface/web/admin/lib/lang/se_system_config.lng         |    3 
 interface/web/dashboard/lib/lang/it_dashlet_mailquota.lng |    8 
 interface/web/login/lib/lang/ja.lng                       |    1 
 interface/web/sites/lib/lang/id_shell_user.lng            |    2 
 interface/lib/lang/nl.lng                                 |    2 
 interface/web/sites/templates/database_list.htm           |    3 
 interface/web/sites/lib/lang/it_web_folder_user.lng       |    1 
 interface/web/sites/lib/lang/pt_web_folder_user.lng       |    1 
 interface/web/admin/lib/lang/ja_software_package.lng      |    6 
 interface/web/dashboard/lib/lang/bg_dashlet_quota.lng     |    8 
 interface/web/dashboard/lib/lang/el_dashlet_mailquota.lng |    8 
 interface/web/sites/lib/lang/hu_web_folder_user.lng       |    1 
 interface/web/dashboard/lib/lang/de_dashlet_mailquota.lng |   14 
 interface/web/mail/lib/lang/tr_spamfilter_users.lng       |    2 
 interface/web/mail/lib/lang/ar_user_quota_stats_list.lng  |    1 
 interface/web/admin/lib/lang/es_software_package_list.lng |    2 
 interface/web/help/lib/lang/ja_support_message.lng        |    7 
 interface/web/client/lib/lang/pt_client_del.lng           |    1 
 interface/web/client/lib/lang/it_client_template_list.lng |    1 
 interface/web/dashboard/lib/lang/hu_dashlet_mailquota.lng |    8 
 interface/web/client/lib/lang/el_client_template_list.lng |    1 
 interface/web/dashboard/lib/lang/fi_dashlet_quota.lng     |    8 
 interface/web/admin/lib/lang/hu_software_package.lng      |    6 
 interface/web/sites/lib/lang/sk_web_folder_user.lng       |    1 
 interface/web/admin/lib/lang/se_software_package.lng      |    6 
 interface/web/admin/lib/lang/cz_software_package_list.lng |    2 
 interface/web/admin/lib/lang/hu_server_config.lng         |   17 
 interface/web/sites/webdav_user_edit.php                  |    3 
 interface/web/admin/lib/lang/el_server_config.lng         |   17 
 interface/web/login/lib/lang/sk.lng                       |    1 
 server/plugins-available/apache2_plugin.inc.php           |   32 
 interface/web/mail/lib/lang/br_spamfilter_users.lng       |    2 
 interface/web/client/lib/lang/it_client.lng               |    1 
 install/sql/incremental/upd_0056.sql                      |   12 
 interface/web/admin/lib/lang/fr_software_repo.lng         |    1 
 interface/web/sites/web_vhost_subdomain_edit.php          |    3 
 interface/web/dashboard/lib/lang/hr_dashlet_mailquota.lng |    8 
 interface/web/admin/lib/lang/fr_software_package_list.lng |    2 
 interface/web/client/lib/lang/pl_reseller.lng             |    1 
 interface/web/client/lib/lang/ro_client_del.lng           |    1 
 interface/web/admin/lib/lang/bg_software_package_list.lng |    2 
 interface/web/help/lib/lang/sk_support_message_list.lng   |    1 
 interface/web/admin/lib/lang/ru_software_package_list.lng |    2 
 interface/web/monitor/lib/lang/nl.lng                     |    6 
 interface/web/sites/lib/lang/hu_shell_user.lng            |    2 
 interface/web/help/lib/lang/ar_support_message_list.lng   |    1 
 interface/web/mail/lib/lang/id_spamfilter_users.lng       |    2 
 interface/web/admin/lib/lang/hr_software_package_list.lng |    2 
 interface/web/admin/lib/lang/br_software_repo.lng         |    1 
 interface/web/sites/lib/lang/pt_web_domain.lng            |    7 
 interface/web/admin/lib/lang/bg_software_package.lng      |    6 
 interface/web/dashboard/lib/lang/pt_dashlet_mailquota.lng |    8 
 interface/web/admin/lib/lang/ru_software_repo.lng         |    1 
 interface/web/admin/lib/lang/sk_software_package_list.lng |    2 
 interface/web/sites/templates/web_domain_ssl.htm          |    9 
 interface/web/help/lib/lang/hr_support_message_list.lng   |    1 
 interface/web/dashboard/lib/lang/it_dashlet_quota.lng     |    8 
 interface/web/sites/database_edit.php                     |    5 
 interface/web/login/lib/lang/es.lng                       |    1 
 interface/web/admin/lib/lang/bg_software_repo.lng         |    1 
 interface/web/admin/lib/lang/ro_server_config.lng         |   17 
 interface/web/client/lib/lang/tr_client_del.lng           |    1 
 server/plugins-available/nginx_plugin.inc.php             |   90 +
 interface/web/admin/lib/lang/br_server_config.lng         |   17 
 interface/web/admin/lib/lang/hr_server_config.lng         |   17 
 interface/web/client/lib/lang/ar_client.lng               |    1 
 interface/web/help/lib/lang/es_support_message.lng        |    7 
 interface/web/mail/lib/lang/fr_spamfilter_users.lng       |    2 
 interface/web/client/lib/lang/br_client_template_list.lng |    1 
 interface/web/client/lib/lang/cz_client_del.lng           |    1 
 interface/web/login/lib/lang/ro.lng                       |    1 
 interface/web/help/lib/lang/fr_support_message_list.lng   |    1 
 interface/web/dashboard/lib/lang/pt_dashlet_quota.lng     |    8 
 interface/lib/lang/hr.lng                                 |    2 
 interface/web/client/lib/lang/ru_client_template_list.lng |    1 
 interface/web/admin/lib/lang/fi_system_config.lng         |    3 
 interface/web/sites/lib/lang/bg_shell_user.lng            |    2 
 interface/web/mail/mail_get_edit.php                      |    6 
 server/mods-available/web_module.inc.php                  |    6 
 interface/web/login/lib/lang/id.lng                       |    1 
 interface/web/admin/lib/lang/ja_server_config.lng         |   17 
 interface/web/client/lib/lang/bg_client_del.lng           |    1 
 interface/web/admin/lib/lang/nl_software_repo.lng         |    1 
 interface/web/client/lib/lang/hr_reseller.lng             |    1 
 interface/web/sites/web_aliasdomain_edit.php              |    3 
 interface/web/mail/lib/lang/tr_user_quota_stats_list.lng  |    1 
 interface/web/help/lib/lang/ro_support_message.lng        |    7 
 interface/web/admin/lib/lang/tr_server_config.lng         |   18 
 interface/web/client/lib/lang/hu_client_del.lng           |    1 
 interface/web/admin/lib/lang/hu_software_package_list.lng |    2 
 interface/web/mail/lib/lang/el_spamfilter_users.lng       |    2 
 install/sql/incremental/upd_0055.sql                      |    1 
 interface/web/admin/lib/lang/nl_software_package.lng      |    6 
 interface/web/mail/lib/lang/ja_user_quota_stats_list.lng  |    1 
 interface/web/admin/lib/lang/fr_software_package.lng      |    6 
 interface/web/mail/lib/lang/nl_user_quota_stats_list.lng  |    1 
 interface/web/help/lib/lang/ja_support_message_list.lng   |    1 
 interface/web/sites/templates/web_domain_redirect.htm     |   11 
 interface/lib/classes/tree.inc.php                        |    6 
 interface/web/help/lib/lang/se_support_message_list.lng   |    1 
 interface/web/sites/lib/lang/nl_shell_user.lng            |    2 
 interface/web/monitor/lib/lang/hu.lng                     |    6 
 interface/web/help/lib/lang/br_support_message_list.lng   |    1 
 interface/web/admin/lib/lang/se_server_config.lng         |   17 
 interface/web/admin/lib/lang/hr_software_repo.lng         |    1 
 interface/web/mail/lib/lang/se_spamfilter_users.lng       |    2 
 interface/web/sites/lib/lang/es_shell_user.lng            |    2 
 interface/web/mail/lib/lang/ro_spamfilter_users.lng       |    2 
 interface/web/admin/form/system_config.tform.php          |   36 
 interface/web/sites/lib/lang/el_shell_user.lng            |    2 
 interface/web/sites/lib/lang/bg_web_folder_user.lng       |    1 
 interface/web/admin/lib/lang/fr_system_config.lng         |    3 
 interface/web/login/lib/lang/pl.lng                       |    1 
 interface/web/client/form/reseller.tform.php              |   18 
 interface/web/sites/templates/database_admin_list.htm     |    3 
 interface/web/sites/web_folder_user_edit.php              |    3 
 interface/lib/lang/sk.lng                                 |    2 
 interface/web/client/lib/lang/fi_client_del.lng           |    1 
 interface/web/client/lib/lang/se_client_template_list.lng |    1 
 interface/web/sites/lib/lang/fi_shell_user.lng            |    2 
 interface/web/client/lib/lang/id_client_del.lng           |    1 
 interface/web/dashboard/dashboard.php                     |   32 
 interface/web/sites/lib/lang/tr_web_domain.lng            |    8 
 interface/web/help/lib/lang/pt_support_message.lng        |    7 
 interface/web/mail/lib/lang/hu_user_quota_stats_list.lng  |    1 
 interface/web/admin/lib/lang/pt_software_repo.lng         |    1 
 interface/web/sites/lib/lang/ja_web_domain.lng            |    7 
 interface/web/sites/templates/web_domain_stats.htm        |    9 
 interface/web/client/lib/lang/hu_client_template_list.lng |    1 
 interface/web/dashboard/lib/lang/pl_dashlet_quota.lng     |    8 
 interface/web/client/lib/lang/id_client.lng               |    1 
 interface/lib/lang/de.lng                                 |    2 
 interface/lib/lang/it.lng                                 |    2 
 interface/web/monitor/lib/lang/hr.lng                     |    6 
 interface/web/client/templates/client_edit_limits.htm     |    6 
 install/dist/lib/opensuse.lib.php                         |   16 
 interface/web/admin/lib/lang/tr_software_package_list.lng |    2 
 interface/web/client/lib/lang/ru_client.lng               |    1 
 interface/web/sites/lib/lang/br_web_domain.lng            |    7 
 interface/web/sites/web_domain_edit.php                   |   75 
 interface/web/admin/lib/lang/id_software_package_list.lng |    2 
 interface/web/client/lib/lang/fi_client_template_list.lng |    1 
 interface/web/help/lib/lang/it_support_message.lng        |    7 
 interface/web/sites/lib/lang/hr_web_domain.lng            |    7 
 interface/web/sites/lib/lang/nl_web_folder_user.lng       |    1 
 interface/web/mail/mail_alias_edit.php                    |    6 
 interface/web/admin/lib/lang/cz_server_config.lng         |   17 
 interface/web/monitor/lib/lang/bg.lng                     |    6 
 interface/web/client/lib/lang/fr_client_del.lng           |    1 
 interface/web/login/lib/lang/br.lng                       |    1 
 interface/web/client/lib/lang/pt_client.lng               |    1 
 interface/web/help/lib/lang/hu_support_message.lng        |    7 
 interface/web/mail/lib/lang/bg_spamfilter_users.lng       |    2 
 interface/web/help/lib/lang/fr_support_message.lng        |    7 
 interface/web/dashboard/lib/lang/bg_dashlet_mailquota.lng |    8 
 install/dist/lib/fedora.lib.php                           |   18 
 interface/web/dashboard/lib/lang/cz_dashlet_mailquota.lng |    8 
 interface/web/sites/lib/lang/cz_web_folder_user.lng       |    1 
 interface/web/client/lib/lang/nl_client_template_list.lng |    1 
 interface/web/client/lib/lang/pt_client_template_list.lng |    1 
 interface/web/admin/lib/lang/pl_software_repo.lng         |    1 
 interface/web/help/lib/lang/sk_support_message.lng        |    7 
 install/lib/installer_base.lib.php                        |    6 
 interface/web/mail/lib/lang/nl_spamfilter_users.lng       |    2 
 interface/lib/classes/remoting.inc.php                    |  175 ++
 interface/web/client/lib/lang/fi_reseller.lng             |    1 
 interface/web/dashboard/dashlets/templates/mailquota.htm  |    2 
 interface/web/mail/lib/lang/pt_spamfilter_users.lng       |    2 
 interface/web/help/lib/lang/hu_support_message_list.lng   |    1 
 interface/web/client/lib/lang/nl_client_del.lng           |    1 
 interface/web/monitor/lib/lang/ar.lng                     |    6 
 interface/web/help/lib/lang/fi_support_message_list.lng   |    1 
 interface/web/client/lib/lang/de_client.lng               |    5 
 interface/web/mail/lib/lang/ru_spamfilter_users.lng       |    2 
 interface/web/client/lib/lang/pl_client_template_list.lng |    1 
 interface/web/admin/lib/lang/tr_system_config.lng         |    3 
 interface/web/client/lib/lang/el_client_del.lng           |    1 
 interface/web/admin/lib/lang/hr_system_config.lng         |    3 
 interface/web/client/lib/lang/es_client_template_list.lng |    1 
 interface/web/admin/lib/lang/el_software_package_list.lng |    2 
 interface/web/client/lib/lang/es_client_del.lng           |    1 
 interface/web/monitor/lib/lang/el.lng                     |    6 
 interface/lib/lang/cz.lng                                 |    2 
 interface/web/admin/lib/lang/it_software_package.lng      |    6 
 interface/web/admin/lib/lang/br_system_config.lng         |    3 
 interface/web/sites/lib/lang/fi_web_domain.lng            |    7 
 interface/web/admin/templates/system_config_misc_edit.htm |   24 
 interface/web/sites/lib/lang/ja_web_folder_user.lng       |    1 
 interface/web/login/lib/lang/pt.lng                       |    1 
 interface/web/dashboard/lib/lang/hr_dashlet_quota.lng     |    8 
 interface/web/help/lib/lang/nl_support_message_list.lng   |    1 
 interface/web/mail/lib/lang/pt_user_quota_stats_list.lng  |    1 
 interface/web/client/lib/lang/bg_reseller.lng             |    1 
 interface/web/dashboard/lib/lang/fr_dashlet_quota.lng     |    8 
 interface/web/sites/lib/lang/el_web_domain.lng            |    7 
 interface/web/admin/lib/lang/ar_software_package_list.lng |    2 
 interface/web/admin/lib/lang/pt_software_package.lng      |    6 
 interface/web/dashboard/lib/lang/tr_dashlet_quota.lng     |    8 
 interface/web/sites/lib/lang/es_web_folder_user.lng       |    1 
 interface/web/client/lib/lang/br_client.lng               |    1 
 interface/web/dashboard/dashlets/templates/quota.htm      |    2 
 interface/web/admin/lib/lang/en_system_config.lng         |    7 
 interface/web/admin/lib/lang/sk_software_package.lng      |    6 
 interface/web/help/lib/lang/tr_support_message.lng        |    7 
 interface/web/sites/lib/lang/nl_web_domain.lng            |    7 
 interface/web/sites/lib/lang/fi_web_folder_user.lng       |    1 
 interface/web/client/form/client.tform.php                |   18 
 interface/web/mail/lib/lang/es_user_quota_stats_list.lng  |    1 
 interface/web/admin/lib/lang/br_software_package_list.lng |    2 
 interface/web/login/lib/lang/it.lng                       |    1 
 interface/web/monitor/lib/lang/fi.lng                     |    6 
 interface/web/help/lib/lang/ru_support_message.lng        |    7 
 interface/web/help/lib/lang/pl_support_message_list.lng   |    1 
 interface/web/dashboard/lib/lang/br_dashlet_quota.lng     |    8 
 interface/web/admin/lib/lang/it_server_config.lng         |   17 
 interface/web/client/lib/lang/pl_client.lng               |    1 
 interface/web/monitor/lib/lang/fr.lng                     |    6 
 interface/web/help/lib/lang/es_support_message_list.lng   |    1 
 interface/web/client/lib/lang/sk_reseller.lng             |    1 
 interface/web/admin/lib/lang/cz_remote_action.lng         |    4 
 interface/web/sites/lib/lang/es_web_domain.lng            |    7 
 interface/web/monitor/lib/lang/se.lng                     |    6 
 interface/web/help/lib/lang/ar_support_message.lng        |    7 
 interface/web/mail/mail_user_edit.php                     |    2 
 interface/web/client/templates/client_edit_address.htm    |   18 
 interface/lib/lang/id.lng                                 |    2 
 interface/web/client/lib/lang/nl_client.lng               |    1 
 interface/web/dashboard/lib/lang/hu_dashlet_quota.lng     |    8 
 interface/web/admin/lib/lang/tr_software_repo.lng         |    1 
 interface/web/client/lib/lang/it_client_del.lng           |    1 
 interface/web/admin/lib/lang/ru_software_package.lng      |    6 
 interface/web/sites/lib/lang/hu_web_domain.lng            |    7 
 interface/web/sites/lib/lang/pt_shell_user.lng            |    2 
 interface/web/admin/lib/lang/se_software_repo.lng         |    1 
 interface/web/client/lib/lang/el_client.lng               |    1 
 interface/web/admin/lib/lang/fi_server_config.lng         |   17 
 interface/web/help/lib/lang/br_support_message.lng        |    7 
 interface/web/help/lib/lang/ru_support_message_list.lng   |    1 
 interface/web/admin/lib/lang/es_software_package.lng      |    6 
 interface/web/admin/lib/lang/el_system_config.lng         |    3 
 interface/lib/lang/pl.lng                                 |    2 
 interface/web/admin/lib/lang/ar_software_repo.lng         |    1 
 interface/web/dns/lib/lang/tr_dns_mx.lng                  |    1 
 interface/web/monitor/lib/lang/ja.lng                     |    6 
 interface/web/help/lib/lang/pl_support_message.lng        |    7 
 interface/web/sites/lib/lang/pl_web_domain.lng            |    7 
 interface/web/client/lib/lang/es_client.lng               |    1 
 interface/web/sites/templates/web_domain_edit.htm         |   12 
 interface/web/monitor/lib/lang/tr.lng                     |    6 
 interface/web/client/lib/lang/hu_reseller.lng             |    1 
 interface/web/help/lib/lang/pt_support_message_list.lng   |    1 
 interface/web/sites/lib/lang/bg_web_domain.lng            |    7 
 interface/web/client/lib/lang/bg_client.lng               |    1 
 interface/web/client/lib/lang/ja_client_del.lng           |    1 
 interface/web/mail/lib/lang/ru_user_quota_stats_list.lng  |    1 
 interface/web/mail/lib/lang/es_spamfilter_users.lng       |    2 
 interface/web/monitor/lib/lang/ru.lng                     |    6 
 interface/web/client/lib/lang/se_client.lng               |    1 
 interface/web/dashboard/lib/lang/nl_dashlet_mailquota.lng |    8 
 interface/web/sites/lib/lang/en_web_folder_user.lng       |    1 
 interface/web/dashboard/lib/lang/de_dashlet_quota.lng     |   14 
 interface/web/dashboard/lib/lang/nl_dashlet_quota.lng     |    8 
 interface/web/dashboard/lib/lang/es_dashlet_mailquota.lng |    8 
 interface/web/mail/lib/lang/se_user_quota_stats_list.lng  |    1 
 interface/web/dashboard/lib/lang/tr_dashlet_mailquota.lng |    8 
 interface/lib/lang/hu.lng                                 |    2 
 interface/web/mail/lib/lang/hr_user_quota_stats_list.lng  |    1 
 interface/lib/lang/ro.lng                                 |    2 
 interface/lib/lang/el.lng                                 |    2 
 interface/web/admin/lib/lang/it_system_config.lng         |    3 
 server/lib/app.inc.php                                    |    2 
 interface/web/dashboard/lib/lang/br_dashlet_mailquota.lng |    8 
 interface/web/help/lib/lang/nl_support_message.lng        |    7 
 interface/web/mail/lib/lang/fi_user_quota_stats_list.lng  |    1 
 interface/web/admin/lib/lang/it_software_package_list.lng |    2 
 interface/web/client/lib/lang/sk_client_template_list.lng |    1 
 interface/web/client/client_template_edit.php             |    2 
 interface/web/mail/lib/lang/pl_user_quota_stats_list.lng  |    1 
 install/install.php                                       |    3 
 interface/web/admin/lib/lang/ro_system_config.lng         |    3 
 interface/web/mail/lib/lang/el_user_quota_stats_list.lng  |    1 
 interface/lib/lang/es.lng                                 |    2 
 interface/web/dashboard/lib/lang/es_dashlet_quota.lng     |    8 
 interface/web/mail/lib/lang/it_spamfilter_users.lng       |    2 
 interface/lib/lang/ja.lng                                 |    2 
 interface/web/admin/lib/lang/ro_software_package.lng      |    6 
 interface/lib/lang/pt.lng                                 |    2 
 interface/web/client/lib/lang/hr_client_template_list.lng |    1 
 interface/web/help/lib/lang/cz_support_message.lng        |    7 
 interface/web/client/lib/lang/en_client.lng               |    5 
 interface/web/monitor/lib/lang/es.lng                     |    6 
 interface/web/login/lib/lang/cz.lng                       |    1 
 interface/web/sites/lib/lang/ru_web_folder_user.lng       |    1 
 install/sql/ispconfig3.sql                                |   20 
 interface/web/admin/lib/lang/es_system_config.lng         |    3 
 interface/web/admin/lib/lang/pl_server_config.lng         |   17 
 interface/web/sites/lib/lang/fr_web_folder_user.lng       |    1 
 interface/web/client/lib/lang/se_reseller.lng             |    1 
 interface/web/monitor/lib/lang/id.lng                     |    6 
 interface/web/client/lib/lang/cz_client_template_list.lng |    1 
 interface/web/js/scrigo.js.php                            |   71 
 interface/web/sites/lib/lang/br_shell_user.lng            |    2 
 server/lib/classes/db_mysql.inc.php                       |    9 
 interface/web/admin/lib/lang/el_software_package.lng      |    6 
 interface/web/admin/lib/lang/de_system_config.lng         |    7 
 interface/web/client/lib/lang/fr_client_template_list.lng |    1 
 interface/web/sites/lib/lang/de_web_folder_user.lng       |    1 
 interface/web/sites/lib/lang/de_database_admin_list.lng   |    1 
 interface/web/admin/lib/lang/sk_server_config.lng         |   17 
 interface/web/sites/lib/lang/fr_web_domain.lng            |    7 
 interface/web/help/lib/lang/it_support_message_list.lng   |    1 
 interface/web/monitor/lib/lang/ro.lng                     |    6 
 interface/web/admin/lib/lang/nl_system_config.lng         |    3 
 interface/web/admin/lib/lang/id_server_config.lng         |   17 
 install/lib/mysql.lib.php                                 |   79 
 interface/web/sites/lib/lang/id_web_domain.lng            |    7 
 interface/web/client/lib/lang/ja_client_template_list.lng |    1 
 interface/web/client/lib/lang/ru_reseller.lng             |    1 
 interface/web/help/lib/lang/el_support_message_list.lng   |    1 
 interface/web/client/lib/lang/en_reseller.lng             |    5 
 interface/web/sites/lib/lang/hr_web_folder_user.lng       |    1 
 interface/web/client/lib/lang/pt_reseller.lng             |    1 
 interface/web/client/client_edit.php                      |  180 +
 interface/lib/lang/ru.lng                                 |    2 
 interface/web/login/lib/lang/nl.lng                       |    1 
 interface/web/admin/lib/lang/cz_system_config.lng         |    3 
 interface/web/sites/shell_user_edit.php                   |   12 
 interface/web/sites/lib/lang/tr_shell_user.lng            |    2 
 interface/lib/lang/tr.lng                                 |    2 
 interface/web/sites/lib/lang/hr_shell_user.lng            |    2 
 server/cron_daily.php                                     |   18 
 interface/web/admin/lib/lang/fr_server_config.lng         |   17 
 interface/web/dashboard/lib/lang/fr_dashlet_mailquota.lng |    8 
 interface/web/admin/lib/lang/sk_software_repo.lng         |    1 
 interface/web/sites/lib/lang/id_web_folder_user.lng       |    1 
 interface/web/sites/lib/lang/ro_web_domain.lng            |    7 
 interface/web/admin/lib/lang/id_software_repo.lng         |    1 
 interface/web/client/lib/lang/nl_reseller.lng             |    1 
 interface/web/admin/lib/lang/hu_software_repo.lng         |    1 
 interface/web/sites/lib/lang/cz_shell_user.lng            |    2 
 interface/web/client/lib/lang/ar_client_template_list.lng |    1 
 interface/web/sites/lib/lang/en_database_list.lng         |    3 
 interface/lib/lang/br.lng                                 |    2 
 interface/web/help/lib/lang/fi_support_message.lng        |    7 
 interface/web/help/lib/lang/ro_support_message_list.lng   |    1 
 interface/web/client/lib/lang/fr_reseller.lng             |    1 
 interface/web/admin/lib/lang/ar_server_config.lng         |   17 
 interface/web/monitor/lib/lang/pt.lng                     |    6 
 interface/lib/classes/aps_guicontroller.inc.php           | 1692 ++++++++++----------
 interface/web/client/lib/lang/se_client_del.lng           |    1 
 interface/web/admin/lib/lang/es_software_repo.lng         |    1 
 interface/web/help/lib/lang/el_support_message.lng        |    7 
 interface/web/dashboard/lib/lang/el_dashlet_quota.lng     |    8 
 interface/web/client/lib/lang/cz_reseller.lng             |    1 
 interface/web/sites/lib/lang/ar_web_folder_user.lng       |    1 
 interface/web/sites/lib/lang/se_web_folder_user.lng       |    1 
 interface/web/help/lib/lang/tr_support_message_list.lng   |    1 
 interface/lib/lang/ar.lng                                 |    2 
 interface/web/admin/lib/lang/ja_software_repo.lng         |    1 
 interface/web/sites/lib/lang/it_web_domain.lng            |    7 
 interface/web/mail/lib/lang/de_mail_get.lng               |    2 
 interface/web/dashboard/lib/lang/ro_dashlet_quota.lng     |    8 
 interface/web/mail/lib/lang/br_user_quota_stats_list.lng  |    1 
 interface/lib/classes/remoting_lib.inc.php                |    2 
 interface/web/sites/lib/lang/tr_web_folder_user.lng       |    1 
 interface/web/login/lib/lang/el.lng                       |    1 
 interface/web/sites/lib/lang/ru_shell_user.lng            |    2 
 interface/web/help/lib/lang/bg_support_message_list.lng   |    1 
 interface/web/login/lib/lang/bg.lng                       |    1 
 interface/web/client/lib/lang/fi_client.lng               |    1 
 interface/web/client/lib/lang/bg_client_template_list.lng |    1 
 interface/web/login/lib/lang/hu.lng                       |    1 
 interface/web/client/lib/lang/it_reseller.lng             |    1 
 interface/web/dashboard/lib/lang/se_dashlet_mailquota.lng |    8 
 interface/web/sites/lib/lang/br_web_folder_user.lng       |    1 
 interface/web/client/lib/lang/ro_client.lng               |    1 
 interface/web/dashboard/lib/lang/ro_dashlet_mailquota.lng |    8 
 interface/web/mail/lib/lang/hu_spamfilter_users.lng       |    2 
 interface/lib/lang/en.lng                                 |    2 
 interface/web/admin/lib/lang/pl_software_package.lng      |    6 
 interface/web/mail/lib/lang/hr_spamfilter_users.lng       |    2 
 interface/web/mail/lib/lang/ja_spamfilter_users.lng       |    2 
 interface/web/sites/lib/lang/pl_web_folder_user.lng       |    1 
 interface/web/sites/lib/lang/ro_shell_user.lng            |    2 
 interface/web/sites/lib/lang/cz_web_domain.lng            |    7 
 interface/web/dashboard/templates/dashboard.htm           |    2 
 server/mods-available/dns_module.inc.php                  |    6 
 interface/web/dashboard/lib/lang/se_dashlet_quota.lng     |    8 
 interface/web/client/lib/lang/tr_client_template_list.lng |    1 
 interface/web/client/lib/lang/hu_client.lng               |    1 
 interface/web/dashboard/lib/lang/ar_dashlet_mailquota.lng |    8 
 interface/web/monitor/lib/lang/sk.lng                     |    6 
 interface/web/admin/lib/lang/br_software_package.lng      |    6 
 interface/web/mail/lib/lang/bg_user_quota_stats_list.lng  |    1 
 interface/web/dashboard/lib/lang/cz_dashlet_quota.lng     |    8 
 interface/web/mail/lib/lang/id_user_quota_stats_list.lng  |    1 
 interface/web/monitor/lib/lang/br.lng                     |    6 
 interface/web/help/lib/lang/cz_support_message_list.lng   |    1 
 interface/web/admin/lib/lang/ja_system_config.lng         |    3 
 interface/web/mail/lib/lang/ar_spamfilter_users.lng       |    2 
 interface/web/admin/lib/lang/pt_system_config.lng         |    3 
 interface/web/dashboard/lib/lang/id_dashlet_mailquota.lng |    8 
 interface/web/client/lib/lang/br_reseller.lng             |    1 
 interface/lib/classes/tform.inc.php                       |   13 
 interface/web/admin/lib/lang/ja_software_package_list.lng |    2 
 interface/web/client/lib/lang/de_reseller.lng             |    5 
 interface/web/sites/lib/lang/it_shell_user.lng            |    2 
 interface/web/admin/lib/lang/id_software_package.lng      |    6 
 interface/web/sites/lib/lang/ru_web_domain.lng            |    7 
 interface/web/client/lib/lang/pl_client_del.lng           |    1 
 interface/web/login/lib/lang/hr.lng                       |    1 
 interface/web/sites/lib/lang/se_shell_user.lng            |    2 
 interface/web/client/lib/lang/id_reseller.lng             |    1 
 interface/web/mail/lib/lang/pl_spamfilter_users.lng       |    2 
 interface/web/sites/lib/lang/en_database_admin_list.lng   |    1 
 interface/web/admin/lib/lang/bg_server_config.lng         |   17 
 interface/lib/lang/fr.lng                                 |    2 
 install/tpl/config.inc.php.master                         |    2 
 interface/web/login/lib/lang/tr.lng                       |    1 
 interface/web/admin/lib/lang/pl_software_package_list.lng |    2 
 interface/web/client/lib/lang/es_reseller.lng             |    1 
 interface/web/sites/lib/lang/pl_shell_user.lng            |    2 
 remoting_client/examples/client_add.php                   |    2 
 interface/web/client/lib/lang/ru_client_del.lng           |    1 
 interface/web/dashboard/lib/lang/sk_dashlet_mailquota.lng |    8 
 interface/web/sites/templates/web_domain_backup.htm       |    9 
 interface/web/monitor/lib/lang/pl.lng                     |    6 
 interface/web/mail/lib/lang/ro_user_quota_stats_list.lng  |    1 
 interface/web/dashboard/lib/lang/ru_dashlet_quota.lng     |    8 
 interface/web/client/lib/lang/cz_client.lng               |    1 
 interface/web/client/lib/lang/ja_client.lng               |    1 
 interface/web/login/lib/lang/fi.lng                       |    1 
 interface/web/sites/ftp_user_edit.php                     |   10 
 interface/web/help/lib/lang/id_support_message_list.lng   |    1 
 remoting_client/examples/client_update.php                |    7 
 interface/lib/lang/se.lng                                 |    2 
 interface/web/help/lib/lang/hr_support_message.lng        |    7 
 interface/web/dashboard/lib/lang/id_dashlet_quota.lng     |    8 
 interface/web/sites/list/database.list.php                |   17 
 interface/web/admin/lib/lang/fi_software_package_list.lng |    2 
 interface/web/sites/web_subdomain_edit.php                |    3 
 interface/web/admin/lib/lang/el_software_repo.lng         |    1 
 interface/web/admin/lib/lang/ar_system_config.lng         |    3 
 interface/lib/lang/fi.lng                                 |    2 
 interface/web/sites/lib/lang/ar_web_domain.lng            |    7 
 interface/web/admin/lib/lang/ar_software_package.lng      |    6 
 interface/web/mail/lib/lang/fr_user_quota_stats_list.lng  |    1 
 interface/web/sites/lib/lang/ar_shell_user.lng            |    2 
 interface/web/client/lib/lang/el_reseller.lng             |    1 
 interface/web/dashboard/lib/lang/ja_dashlet_quota.lng     |    8 
 interface/web/login/lib/lang/fr.lng                       |    1 
 interface/web/sites/lib/lang/sk_web_domain.lng            |    7 
 interface/web/client/lib/lang/ar_client_del.lng           |    1 
 interface/web/login/lib/lang/se.lng                       |    1 
 interface/web/sites/lib/lang/de_database_list.lng         |    1 
 interface/web/dashboard/lib/lang/sk_dashlet_quota.lng     |    8 
 interface/web/admin/lib/lang/id_system_config.lng         |    3 
 interface/web/client/lib/lang/ro_reseller.lng             |    1 
 interface/web/sites/lib/lang/sk_shell_user.lng            |    2 
 interface/web/admin/lib/lang/sk_system_config.lng         |    3 
 interface/web/client/lib/lang/sk_client_del.lng           |    1 
 interface/lib/classes/listform.inc.php                    |   10 
 interface/web/admin/lib/lang/bg_system_config.lng         |    3 
 interface/web/dashboard/lib/lang/ar_dashlet_quota.lng     |    8 
 interface/web/client/reseller_edit.php                    |   34 
 interface/web/admin/lib/lang/cz_software_package.lng      |    6 
 interface/web/mail/lib/lang/cz_user_quota_stats_list.lng  |    1 
 interface/web/client/client_template_del.php              |    7 
 interface/web/sites/ajax_get_json.php                     |   33 
 interface/web/admin/lib/lang/ru_system_config.lng         |    3 
 interface/web/admin/lib/lang/nl_software_package_list.lng |    2 
 interface/web/client/lib/lang/sk_client.lng               |    1 
 interface/web/dashboard/lib/lang/fi_dashlet_mailquota.lng |    8 
 interface/web/help/lib/lang/id_support_message.lng        |    7 
 interface/web/monitor/lib/lang/it.lng                     |    6 
 interface/web/client/lib/lang/id_client_template_list.lng |    1 
 interface/web/dashboard/lib/lang/ja_dashlet_mailquota.lng |    8 
 interface/lib/classes/client_templates.inc.php            |  239 ++
 interface/web/admin/lib/lang/fi_software_repo.lng         |    1 
 interface/web/dashboard/lib/lang/ru_dashlet_mailquota.lng |    8 
 interface/web/sites/web_folder_edit.php                   |    3 
 interface/web/mail/lib/lang/sk_user_quota_stats_list.lng  |    1 
 interface/web/admin/lib/lang/hu_system_config.lng         |    3 
 interface/web/admin/system_config_edit.php                |   23 
 interface/web/admin/lib/lang/pt_server_config.lng         |   17 
 interface/web/admin/lib/lang/hr_software_package.lng      |    6 
 532 files changed, 3,835 insertions(+), 1,137 deletions(-)

diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php
index a0136f6..61130a1 100644
--- a/install/dist/lib/fedora.lib.php
+++ b/install/dist/lib/fedora.lib.php
@@ -163,7 +163,23 @@
 		if(!is_group($cf['vmail_groupname'])) caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
 
 		$command = 'useradd -g '.$cf['vmail_groupname'].' -u '.$cf['vmail_userid'].' '.$cf['vmail_username'].' -d '.$cf['vmail_mailbox_base'].' -m';
-		if(!is_user($cf['vmail_username'])) caselog("$command &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");		
+		if(!is_user($cf['vmail_username'])) caselog("$command &> /dev/null", __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
+
+		//* These postconf commands will be executed on installation and update
+		$server_ini_rec = $this->db->queryOneRecord("SELECT config FROM server WHERE server_id = ".$conf['server_id']);
+		$server_ini_array = ini_to_array(stripslashes($server_ini_rec['config']));
+		unset($server_ini_rec);
+
+		//* If there are RBL's defined, format the list and add them to smtp_recipient_restrictions to prevent removeal after an update
+		$rbl_list = '';
+		if (@isset($server_ini_array['mail']['realtime_blackhole_list']) && $server_ini_array['mail']['realtime_blackhole_list'] != '') {
+			$rbl_hosts = explode(",",str_replace(" ", "", $server_ini_array['mail']['realtime_blackhole_list']));
+			foreach ($rbl_hosts as $key => $value) {
+				$rbl_list .= ", reject_rbl_client ". $value;
+			}
+		}
+		unset($rbl_hosts);
+		unset($server_ini_array);
 
 		//* These postconf commands will be executed on installation and update
         $postconf_placeholders = array('{config_dir}' => $config_dir,
diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php
index 57b2cd6..7a2fa26 100644
--- a/install/dist/lib/opensuse.lib.php
+++ b/install/dist/lib/opensuse.lib.php
@@ -179,6 +179,22 @@
 		if($cf['vmail_mailbox_base'] != '' && strlen($cf['vmail_mailbox_base']) >= 10 && $this->is_update === false) exec('chown -R '.$cf['vmail_username'].':'.$cf['vmail_groupname'].' '.$cf['vmail_mailbox_base']);
 		
 		//* These postconf commands will be executed on installation and update
+		$server_ini_rec = $this->db->queryOneRecord("SELECT config FROM server WHERE server_id = ".$conf['server_id']);
+		$server_ini_array = ini_to_array(stripslashes($server_ini_rec['config']));
+		unset($server_ini_rec);
+
+		//* If there are RBL's defined, format the list and add them to smtp_recipient_restrictions to prevent removeal after an update
+		$rbl_list = '';
+		if (@isset($server_ini_array['mail']['realtime_blackhole_list']) && $server_ini_array['mail']['realtime_blackhole_list'] != '') {
+			$rbl_hosts = explode(",",str_replace(" ", "", $server_ini_array['mail']['realtime_blackhole_list']));
+			foreach ($rbl_hosts as $key => $value) {
+				$rbl_list .= ", reject_rbl_client ". $value;
+			}
+		}
+		unset($rbl_hosts);
+		unset($server_ini_array);
+		
+		//* These postconf commands will be executed on installation and update
         $postconf_placeholders = array('{config_dir}' => $config_dir,
                                        '{vmail_mailbox_base}' => $cf['vmail_mailbox_base'],
                                        '{vmail_userid}' => $cf['vmail_userid'],
diff --git a/install/install.php b/install/install.php
index 96c164c..c6b85a3 100644
--- a/install/install.php
+++ b/install/install.php
@@ -571,7 +571,8 @@
 	}*/
 	
 	//** Configure ISPConfig :-)
-	if(strtolower($inst->simple_query('Install ISPConfig Web Interface',array('y','n'),'y')) == 'y') {
+	$install_ispconfig_interface_default = ($conf['mysql']['master_slave_setup'] == 'y')?'n':'y';
+	if(strtolower($inst->simple_query('Install ISPConfig Web Interface',array('y','n'),$install_ispconfig_interface_default)) == 'y') {
 		swriteln('Installing ISPConfig');
 		
 		//** We want to check if the server is a module or cgi based php enabled server
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 2c97558..1e8459e 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -400,7 +400,7 @@
 				$this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage);
 			}
 
-			$query = "GRANT SELECT, UPDATE(`status`) ON ".$value['db'].".`sys_datalog` TO '".$value['user']."'@'".$host."' ";
+			$query = "GRANT SELECT, UPDATE(`status`, `error`) ON ".$value['db'].".`sys_datalog` TO '".$value['user']."'@'".$host."' ";
 			if ($verbose){
 				echo $query ."\n";
 			}
@@ -2094,8 +2094,8 @@
 		}
 
 		$root_cron_jobs = array(
-				"* * * * * ".$install_dir."/server/server.sh > /dev/null 2>> ".$conf['ispconfig_log_dir']."/cron.log",
-				"30 00 * * * ".$install_dir."/server/cron_daily.sh > /dev/null 2>> ".$conf['ispconfig_log_dir']."/cron.log"
+				"* * * * * ".$install_dir."/server/server.sh 2>&1 > /dev/null | while read line; do echo `/bin/date` \"\$line\" >> ".$conf['ispconfig_log_dir']."/cron.log; done",
+				"30 00 * * * ".$install_dir."/server/cron_daily.sh 2>&1 > /dev/null | while read line; do echo `/bin/date` \"\$line\" >> ".$conf['ispconfig_log_dir']."/cron.log; done"
 		);
 
 		if ($conf['nginx']['installed'] == true) {
diff --git a/install/lib/mysql.lib.php b/install/lib/mysql.lib.php
index 0dc8f4b..b7f1ae8 100644
--- a/install/lib/mysql.lib.php
+++ b/install/lib/mysql.lib.php
@@ -35,7 +35,7 @@
 	var $dbUser = "";		  // database authorized user
 	var $dbPass = "";		  // user's password
 	var $dbCharset = "";      // what charset comes and goes to mysql: utf8 / latin1
-	var $linkId = 0;		  // last result of mysql_connect()
+	var $linkId = false;		  // last result of mysql_connect()
 	var $queryId = 0;		  // last result of mysql_query()
 	var $record	= array();	  // last record fetched
     var $autoCommit = 1;      // Autocommit Transactions
@@ -61,8 +61,8 @@
 	// error handler
 	function updateError($location)
 	{
-		$this->errorNumber = mysql_errno();
-		$this->errorMessage = mysql_error();
+		$this->errorNumber = mysqli_errno($this->linkId);
+		$this->errorMessage = mysqli_error($this->linkId);
 		$this->errorLocation = $location;
 		if($this->errorNumber && $this->show_error_messages)
 		{
@@ -73,16 +73,16 @@
 
 	function connect()
 	{
-		if($this->linkId == 0)
+		if(!$this->linkId)
 		{
-			$this->linkId = mysql_connect($this->dbHost, $this->dbUser, $this->dbPass);
+			$this->linkId = mysqli_connect($this->dbHost, $this->dbUser, $this->dbPass);
 
 			if(!$this->linkId)
 			{
-				$this->updateError('DB::connect()<br />mysql_connect');
+				$this->updateError('DB::connect()<br />mysqli_connect');
 				return false;
 			}
-			$this->queryId = @mysql_query('SET NAMES '.$this->dbCharset, $this->linkId);
+			$this->queryId = @mysqli_query($this->linkId, 'SET NAMES '.$this->dbCharset);
 		}
 		return true;
 	}
@@ -94,14 +94,14 @@
 			return false;
 		}
 		if($this->dbName != '') {
-			if(!mysql_select_db($this->dbName, $this->linkId))
+			if(!mysqli_select_db($this->linkId, $this->dbName))
 			{
-				$this->updateError('DB::connect()<br />mysql_select_db');
+				$this->updateError('DB::connect()<br />mysqli_select_db');
 				return false;
 			}
 		}
-		$this->queryId = @mysql_query($queryString, $this->linkId);
-		$this->updateError('DB::query('.$queryString.')<br />mysql_query');
+		$this->queryId = @mysqli_query($this->linkId, $queryString);
+		$this->updateError('DB::query('.$queryString.')<br />mysqli_query');
 		if(!$this->queryId)
 		{
 			return false;
@@ -138,8 +138,8 @@
 	// returns the next record in an array
 	function nextRecord()
 	{
-        $this->record = mysql_fetch_assoc($this->queryId);
-		$this->updateError('DB::nextRecord()<br />mysql_fetch_array');
+        $this->record = mysqli_fetch_assoc($this->queryId);
+		$this->updateError('DB::nextRecord()<br />mysqli_fetch_array');
 		if(!$this->record || !is_array($this->record))
 		{
 			return false;
@@ -151,18 +151,18 @@
 	// returns number of rows returned by the last select query
 	function numRows()
 	{
-		return mysql_num_rows($this->queryId);
+		return mysqli_num_rows($this->queryId);
 	}
 	
 	function affectedRows()
 	{
-		return mysql_affected_rows($this->linkId);
+		return mysqli_affected_rows($this->linkId);
 	}
 	
 	// returns mySQL insert id
 	function insertID()
 	{
-		return mysql_insert_id($this->linkId);
+		return mysqli_insert_id($this->linkId);
 	}
     
     // Check der variablen
@@ -175,7 +175,7 @@
 	// Check der variablen
     function quote($formfield)
     {
-        return mysql_real_escape_string($formfield);
+        return mysqli_real_escape_string($this->linkId, $formfield);
     }
 	
 	// Check der variablen
@@ -359,11 +359,22 @@
 		if($database_name == ''){
             $database_name = $this->dbName;
         }
-        $result = mysql_query("SHOW TABLES FROM `$database_name`");
+		
+		$tables = $this->queryAllRecords("SHOW TABLES FROM `$database_name`");
+		$tb_names = array();
+		if(is_array($tables) && !empty($tables)){
+			for($i = 0; $i < sizeof($tables); $i++){
+				$tb_names[$i] = $tables[$i]['Tables_in_'.$database_name];
+			}
+		}
+		
+		/*
+        $result = mysqli_query("SHOW TABLES FROM `$database_name`");
         $tb_names = array();
-        for ($i = 0; $i < mysql_num_rows($result); $i++) {
+        for ($i = 0; $i < mysqli_num_rows($result); $i++) {
             $tb_names[$i] = mysql_tablename($result, $i);
         }
+		*/
         return $tb_names;       
    }
    
@@ -438,35 +449,7 @@
     } else {
         return false;
     }
-    
-    
-    //$this->createTable('tester',$columns);
-    
-    /*
-    $result = mysql_list_fields($go_info["server"]["db_name"],$table_name);
-    $fields = mysql_num_fields ($result);
-    $i = 0;
-    $table = mysql_field_table ($result, $i);
-    while ($i < $fields) {
-        $name  = mysql_field_name  ($result, $i);
-        $type  = mysql_field_type  ($result, $i);
-        $len   = mysql_field_len   ($result, $i);
-        $flags = mysql_field_flags ($result, $i);
-        print_r($flags);
-        
-        $columns = array(name => $name,
-                    type =>     "",
-                    defaultValue =>  "",
-                    isnull =>   1,
-                    option =>   "");
-        $returnvar[] = $columns;
-        
-        $i++;
-    }
-    */
-    
-    
-   
+
    }
    
    function mapType($metaType,$typeValue) {
diff --git a/install/sql/incremental/upd_0055.sql b/install/sql/incremental/upd_0055.sql
index 7bcfa71..3a7c5d5 100644
--- a/install/sql/incremental/upd_0055.sql
+++ b/install/sql/incremental/upd_0055.sql
@@ -1,2 +1,3 @@
 ALTER TABLE `web_backup` CHANGE `backup_type` `backup_type` enum('web','mongodb','mysql') NOT NULL DEFAULT 'web';
 ALTER TABLE `web_database_user` ADD `database_password_mongo` varchar(32) DEFAULT NULL AFTER `database_password`;
+ALTER TABLE `sys_datalog` ADD `error` MEDIUMTEXT NULL DEFAULT NULL;
diff --git a/install/sql/incremental/upd_0056.sql b/install/sql/incremental/upd_0056.sql
new file mode 100644
index 0000000..c7cb528
--- /dev/null
+++ b/install/sql/incremental/upd_0056.sql
@@ -0,0 +1,12 @@
+CREATE TABLE `client_template_assigned` (
+  `assigned_template_id` bigint(20) NOT NULL auto_increment,
+  `client_id` bigint(11) NOT NULL DEFAULT '0',
+  `client_template_id` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`assigned_template_id`),
+  KEY `client_id` (`client_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
+
+ALTER TABLE `client` ADD `gender` enum('','m','f') NOT NULL DEFAULT '' AFTER `company_id`,
+  ADD `locked` enum('n','y') NOT NULL DEFAULT 'n' AFTER `created_at`,
+  ADD `canceled` enum('n','y') NOT NULL DEFAULT 'n' AFTER `locked`,
+  ADD `tmp_data` mediumblob AFTER `canceled` ;
diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql
index e9bdf95..8480e76 100644
--- a/install/sql/ispconfig3.sql
+++ b/install/sql/ispconfig3.sql
@@ -145,6 +145,7 @@
   `sys_perm_other` varchar(5) DEFAULT NULL,
   `company_name` varchar(64) DEFAULT NULL,
   `company_id` varchar(30) DEFAULT NULL,
+  `gender` enum('','m','f') NOT NULL DEFAULT '',
   `contact_name` varchar(64) DEFAULT NULL,
   `customer_no` varchar(64) DEFAULT NULL,
   `vat_id` varchar(64) DEFAULT NULL,
@@ -225,6 +226,9 @@
   `template_master` int(11) unsigned NOT NULL DEFAULT '0',
   `template_additional` text NOT NULL DEFAULT '',
   `created_at` bigint(20) DEFAULT NULL,
+  `locked` enum('n','y') NOT NULL DEFAULT 'n',
+  `canceled` enum('n','y') NOT NULL DEFAULT 'n',
+  `tmp_data` mediumblob,
   `id_rsa` varchar(2000) NOT NULL DEFAULT '',
   `ssh_rsa` varchar(600) NOT NULL DEFAULT '',
   PRIMARY KEY (`client_id`)
@@ -313,6 +317,19 @@
   PRIMARY KEY  (`template_id`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
+-- --------------------------------------------------------
+
+-- 
+-- Table structure for table  `client_template_assigned`
+-- 
+
+CREATE TABLE `client_template_assigned` (
+  `assigned_template_id` bigint(20) NOT NULL auto_increment,
+  `client_id` bigint(11) NOT NULL DEFAULT '0',
+  `client_template_id` int(11) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`assigned_template_id`),
+  KEY `client_id` (`client_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 -- --------------------------------------------------------
 
 --
@@ -1428,6 +1445,7 @@
   `user` varchar(255) NOT NULL default '',
   `data` longtext NOT NULL,
   `status` set('pending','ok','warning','error') NOT NULL default 'ok',
+  `error` mediumtext,
   PRIMARY KEY  (`datalog_id`),
   KEY `server_id` (`server_id`,`status`)
 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
@@ -2179,6 +2197,6 @@
 -- Dumping data for table `sys_config`
 --
 
-INSERT INTO sys_config VALUES ('1','db','db_version','3.0.5.2');
+INSERT INTO sys_config VALUES ('1','db','db_version','3.0.5.3');
 
 SET FOREIGN_KEY_CHECKS = 1;
diff --git a/install/tpl/config.inc.php.master b/install/tpl/config.inc.php.master
index 1c96732..8c8bedd 100644
--- a/install/tpl/config.inc.php.master
+++ b/install/tpl/config.inc.php.master
@@ -56,7 +56,7 @@
 
 //** Application
 define('ISPC_APP_TITLE', 'ISPConfig');
-define('ISPC_APP_VERSION', '3.0.5.2');
+define('ISPC_APP_VERSION', '3.0.5.3');
 define('DEVSYSTEM', 0);
 
 
diff --git a/install/tpl/system.ini.master b/install/tpl/system.ini.master
index 24f7eba..abb8931 100644
--- a/install/tpl/system.ini.master
+++ b/install/tpl/system.ini.master
@@ -41,3 +41,9 @@
 use_loadindicator=y
 use_combobox=y
 maintenance_mode=n
+admin_dashlets_left=
+admin_dashlets_right=
+reseller_dashlets_left=
+reseller_dashlets_right=
+client_dashlets_left=
+client_dashlets_right=
diff --git a/interface/lib/classes/aps_guicontroller.inc.php b/interface/lib/classes/aps_guicontroller.inc.php
index d8e641d..5a5cbe9 100644
--- a/interface/lib/classes/aps_guicontroller.inc.php
+++ b/interface/lib/classes/aps_guicontroller.inc.php
@@ -1,846 +1,846 @@
-<?php
-/*
-Copyright (c) 2012, ISPConfig UG
-Contributors: web wack creations,  http://www.web-wack.at
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification,
-are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice,
-      this list of conditions and the following disclaimer.
-    * Redistributions in binary form must reproduce the above copyright notice,
-      this list of conditions and the following disclaimer in the documentation
-      and/or other materials provided with the distribution.
-    * Neither the name of ISPConfig nor the names of its contributors
-      may be used to endorse or promote products derived from this software without
-      specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
-IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
-INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
-EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-require_once('aps_base.inc.php');
-
-class ApsGUIController extends ApsBase
-{
-    /**
-    * Constructor
-    *
-    * @param $app the application instance (db handle)
-    */
-    public function __construct($app)
-    {
-        parent::__construct($app);
-    }
-    
-    /**
-     * Reads in a package metadata file and registers it's namespaces
-     * 
-     * @param $filename the file to read
-     * @return $sxe a SimpleXMLElement handle
-     */
-    private function readInMetaFile($filename)
-    {
-        $metadata = file_get_contents($filename);
-        $metadata = str_replace("xmlns=", "ns=", $metadata);
-        $sxe = new SimpleXMLElement($metadata);
-        $namespaces = $sxe->getDocNamespaces(true);
-        foreach($namespaces as $ns => $url) $sxe->registerXPathNamespace($ns, $url);
-        
-        return $sxe; 
-    }
-    
-    /**
-     * Applies a RegEx pattern onto a location path in order to secure it against 
-     * code injections and invalid input
-     * 
-     * @param $location_unfiltered the file path to secure
-     * @return $location
-     */
-    private function secureLocation($location_unfiltered)
-    {
-        // Filter invalid slashes from string
-        $location = preg_replace(array('#/+#', '#\.+#', '#\0+#', '#\\\\+#'), 
-                                 array('/', '', '', '/'), 
-                                 $location_unfiltered);
-
-        // Remove a beginning or trailing slash
-        if(substr($location, -1) == '/') $location = substr($location, 0, strlen($location) - 1);
-        if(substr($location, 0, 1) == '/') $location = substr($location, 1);
-        
-        return $location;
-    }
-    
-    /**
-     * Gets the CustomerID (ClientID) which belongs to a specific domain
-     * 
-     * @param $domain the domain
-     * @return $customerid
-     */
-    private function getCustomerIDFromDomain($domain)
-    {
-        global $app;
-        $customerid = 0;
-        
-        $customerdata = $app->db->queryOneRecord("SELECT client_id FROM sys_group, web_domain
-            WHERE web_domain.sys_groupid = sys_group.groupid 
-            AND web_domain.domain = '".$app->db->quote($domain)."';");
-        if(!empty($customerdata)) $customerid = $customerdata['client_id'];
-        
-        return $customerid;
-    }
-    
-    /**
-     * Returns the server_id for an already installed instance. Is actually 
-     * just a little helper method to avoid redundant code
-     * 
-     * @param $instanceid the instance to process
-     * @return $webserver_id the server_id
-     */
-    private function getInstanceDataForDatalog($instanceid)
-    {
-        global $app;
-        $webserver_id = '';
-        
-        $websrv = $app->db->queryOneRecord("SELECT server_id FROM web_domain 
-            WHERE domain = (SELECT value FROM aps_instances_settings 
-                WHERE name = 'main_domain' AND instance_id = ".$app->db->quote($instanceid).");");
-
-        // If $websrv is empty, an error has occured. Domain no longer existing? Settings table damaged?
-        // Anyhow, remove this instance record because it's not useful at all
-        if(empty($websrv)) 
-        {
-            $app->db->query("DELETE FROM aps_instances WHERE id = ".$app->db->quote($instanceid).";");
-            $app->db->query("DELETE FROM aps_instances_settings WHERE instance_id = ".$app->db->quote($instanceid).";");
-        }
-        else $webserver_id = $websrv['server_id'];
-        
-        return $webserver_id;
-    } 
-    
-    /**
-     * Finds out if there is a newer package version for 
-     * a given (possibly valid) package ID
-     * 
-     * @param $id the ID to check
-     * @return $newer_pkg_id the newer package ID
-     */ 
-    public function getNewestPackageID($id)
-    {
-        global $app;
-        
-        if(preg_match('/^[0-9]+$/', $id) != 1) return 0;
-        
-        $result = $app->db->queryOneRecord("SELECT id, name, 
-            CONCAT(version, '-', CAST(`release` AS CHAR)) AS current_version 
-            FROM aps_packages 
-            WHERE name = (SELECT name FROM aps_packages WHERE id = ".$app->db->quote($id).")  
-            ORDER BY REPLACE(version, '.', '')+0 DESC, `release` DESC");
-            
-        if(!empty($result) && ($id != $result['id'])) return $result['id'];
-        
-        return 0; 
-    }
-
-    /**
-     * Validates a given package ID
-     *
-     * @param $id the ID to check
-     * @param $is_admin a flag to allow locked IDs too (for admin calls)
-     * @return boolean
-     */
-    public function isValidPackageID($id, $is_admin = false)
-    {
-        global $app;
-        
-         if(preg_match('/^[0-9]+$/', $id) != 1) return false;
-         
-         $sql_ext = (!$is_admin) ? 
-            'package_status = '.PACKAGE_ENABLED.' AND' :  
-            '(package_status = '.PACKAGE_ENABLED.' OR package_status = '.PACKAGE_LOCKED.') AND'; 
-
-         $result = $app->db->queryOneRecord("SELECT id FROM aps_packages WHERE ".$sql_ext." id = ".$app->db->quote($id).";");
-         if(!$result) return false;
-         
-         return true;
-    }
-    
-    /**
-     * Validates a given instance ID
-     *
-     * @param $id the ID to check
-     * @param $client_id the calling client ID
-     * @param $is_admin a flag to ignore the client ID check for admins
-     * @return boolean
-     */
-    public function isValidInstanceID($id, $client_id, $is_admin = false)
-    {
-        global $app;
-        
-         if(preg_match('/^[0-9]+$/', $id) != 1) return false;
-         
-         // Only filter if not admin
-         $sql_ext = (!$is_admin) ? 'customer_id = '.$app->db->quote($client_id).' AND' : ''; 
-
-         $result = $app->db->queryOneRecord('SELECT id FROM aps_instances WHERE '.$sql_ext.' id = '.$app->db->quote($id).';');
-         if(!$result) return false;
-         
-         return true;
-    }    
-    
-    /**
-     * Creates a new database record for the package instance and
-     * an install task
-     * 
-     * @param $settings the settings to enter into the DB
-     * @param $packageid the PackageID
-     */
-    public function createPackageInstance($settings, $packageid)
-    {
-		global $app;
-		
-		$app->uses('tools_sites');
-        
-		$webserver_id = 0;
-        $websrv = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain = '".$app->db->quote($settings['main_domain'])."';");
-        if(!empty($websrv)) $webserver_id = $websrv['server_id'];
-        $customerid = $this->getCustomerIDFromDomain($settings['main_domain']);
-        
-        if(empty($settings) || empty($webserver_id)) return false;
-		
-		//* Get server config of the web server
-		$app->uses("getconf");
-		$web_config = $app->getconf->get_server_config($app->functions->intval($websrv["server_id"]),'web');
-			
-		//* Set PHP mode to php-fcgi and enable suexec in website on apache servers / set PHP mode to PHP-FPM on nginx servers
-		if($web_config['server_type'] == 'apache') {
-			if(($websrv['php'] != 'fast-cgi' || $websrv['suexec'] != 'y') && $websrv['php'] != 'php-fpm') {
-				$app->db->datalogUpdate('web_domain', "php = 'fast-cgi', suexec = 'y'", 'domain_id', $websrv['domain_id']);
-			}
-		} else {
-			// nginx
-			if($websrv['php'] != 'php-fpm' && $websrv['php'] != 'fast-cgi') {
-				$app->db->datalogUpdate('web_domain', "php = 'php-fpm'", 'domain_id', $websrv['domain_id']);
-			}
-		}
-		
-		
-		//* Create the MySQL database for the application
-		$pkg = $app->db->queryOneRecord('SELECT * FROM aps_packages WHERE id = '.$app->db->quote($packageid).';');
-		$metafile = $this->interface_pkg_dir.'/'.$pkg['path'].'/APP-META.xml';
-		$sxe = $this->readInMetaFile($metafile);
-		
-		$db_id = parent::getXPathValue($sxe, '//db:id');
-		if (!empty($db_id)) {
-			$global_config = $app->getconf->get_global_config('sites');
-			
-			$tmp = array();
-			$tmp['parent_domain_id'] = $websrv['domain_id'];
-			$tmp['sys_groupid'] = $websrv['sys_groupid'];
-			$dbname_prefix = $app->tools_sites->replacePrefix($global_config['dbname_prefix'], $tmp);
-			$dbuser_prefix = $app->tools_sites->replacePrefix($global_config['dbuser_prefix'], $tmp);
-			unset($tmp);
-			
-            // get information if the webserver is a db server, too
-            $web_server = $app->db->queryOneRecord("SELECT server_id,server_name,db_server FROM server WHERE server_id  = ".$websrv['server_id']);
-            if($web_server['db_server'] == 1) {
-                // create database on "localhost" (webserver)
-				$mysql_db_server_id = $websrv['server_id'];
-				$mysql_db_host = 'localhost';
-				$mysql_db_remote_access = 'n';
-				$mysql_db_remote_ips = '';
-            } else {
-                //* get the default database server of the client
-                $client = $app->db->queryOneRecord("SELECT default_dbserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ".$websrv['sys_groupid']);
-                if(is_array($client) && $client['default_dbserver'] > 0 && $client['default_dbserver'] != $websrv['server_id']) {
-                    $mysql_db_server_id =  $client['default_dbserver'];
-                    $dbserver_config = $web_config = $app->getconf->get_server_config($app->functions->intval($mysql_db_server_id),'server');
-                    $mysql_db_host = $dbserver_config['ip_address'];
-                    $mysql_db_remote_access = 'y';
-                    $webserver_config = $app->getconf->get_server_config($app->functions->intval($websrv['server_id']),'server');
-                    $mysql_db_remote_ips = $webserver_config['ip_address'];
-                } else {
-                    /* I left this in place for a fallback that should NEVER! happen.
-                     * if we reach this point it means that there is NO default db server for the client
-                     * AND the webserver has NO db service enabled.
-                     * We have to abort the aps installation here... so I added a return false
-                     * although this does not present any error message to the user.
-                     */
-                    return false;
-                    
-                    /*$mysql_db_server_id = $websrv['server_id'];
-                    $mysql_db_host = 'localhost';
-                    $mysql_db_remote_access = 'n';
-                    $mysql_db_remote_ips = '';*/
-                }
-            }
-			
-            //* Find a free db name for the app
-			for($n = 1; $n <= 1000; $n++) {
-				$mysql_db_name = ($dbname_prefix != '' ? $dbname_prefix.'aps'.$n : uniqid('aps'));
-				$tmp = $app->db->queryOneRecord("SELECT count(database_id) as number FROM web_database WHERE database_name = '".$app->db->quote($mysql_db_name)."'");
-				if($tmp['number'] == 0) break;
-			}
-			//* Find a free db username for the app
-			for($n = 1; $n <= 1000; $n++) {
-				$mysql_db_user = ($dbuser_prefix != '' ? $dbuser_prefix.'aps'.$n : uniqid('aps'));
-				$tmp = $app->db->queryOneRecord("SELECT count(database_user_id) as number FROM web_database_user WHERE database_user = '".$app->db->quote($mysql_db_user)."'");
-				if($tmp['number'] == 0) break;
-			}
-			
-			$mysql_db_password = $settings['main_database_password'];
-			
-			//* Create the mysql database user
-			$insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `database_user`, `database_user_prefix`, `database_password`) 
-					  VALUES( ".$websrv['sys_userid'].", ".$websrv['sys_groupid'].", 'riud', '".$websrv['sys_perm_group']."', '', 0, '$mysql_db_user', '".$app->db->quote($dbuser_prefix) . "', PASSWORD('$mysql_db_password'))";
-			$mysql_db_user_id = $app->db->datalogInsert('web_database_user', $insert_data, 'database_user_id');
-            
-			//* Create the mysql database
-			$insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `parent_domain_id`, `type`, `database_name`, `database_name_prefix`, `database_user_id`, `database_ro_user_id`, `database_charset`, `remote_access`, `remote_ips`, `backup_copies`, `active`, `backup_interval`) 
-					  VALUES( ".$websrv['sys_userid'].", ".$websrv['sys_groupid'].", 'riud', '".$websrv['sys_perm_group']."', '', $mysql_db_server_id, ".$websrv['domain_id'].", 'mysql', '$mysql_db_name', '" . $app->db->quote($dbname_prefix) . "', '$mysql_db_user_id', 0, '', '$mysql_db_remote_access', '$mysql_db_remote_ips', ".$websrv['backup_copies'].", 'y', '".$websrv['backup_interval']."')";
-			$app->db->datalogInsert('web_database', $insert_data, 'database_id');
-			
-			//* Add db details to package settings
-			$settings['main_database_host'] = $mysql_db_host;
-			$settings['main_database_name'] = $mysql_db_name;
-			$settings['main_database_login'] = $mysql_db_user;
-		
-		}
-		
-		//* Insert new package instance
-		$insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `customer_id`, `package_id`, `instance_status`) VALUES (".$websrv['sys_userid'].", ".$websrv['sys_groupid'].", 'riud', '".$websrv['sys_perm_group']."', '', ".$app->db->quote($webserver_id).",".$app->db->quote($customerid).", ".$app->db->quote($packageid).", ".INSTANCE_PENDING.")";
-		$InstanceID = $app->db->datalogInsert('aps_instances', $insert_data, 'id');
-		
-		//* Insert all package settings
-		if(is_array($settings)) {
-			foreach($settings as $key => $value) {
-				$insert_data = "(server_id, instance_id, name, value) VALUES (".$app->db->quote($webserver_id).",".$app->db->quote($InstanceID).", '".$app->db->quote($key)."', '".$app->db->quote($value)."')";
-				$app->db->datalogInsert('aps_instances_settings', $insert_data, 'id');
-			}
-		}
-		
-		//* Set package status to install afetr we inserted the settings
-		$app->db->datalogUpdate('aps_instances', "instance_status = ".INSTANCE_INSTALL, 'id', $InstanceID);
-    }
-    
-    /**
-     * Sets the status of an instance to "should be removed" and creates a 
-     * datalog entry to give the ISPConfig server a real removal advice 
-     * 
-     * @param $instanceid the instance to delete
-     */
-    public function deleteInstance($instanceid)
-    {
-        global $app;
-		/*
-		$app->db->query("UPDATE aps_instances SET instance_status = ".INSTANCE_REMOVE." WHERE id = ".$instanceid.";");
-        
-        $webserver_id = $this->getInstanceDataForDatalog($instanceid);
-        if($webserver_id == '') return;
-        
-        // Create a sys_datalog entry for deletion
-        $datalog = array('Instance_id' => $instanceid, 'server_id' => $webserver_id);
-        $app->db->datalogSave('aps', 'DELETE', 'id', $instanceid, array(), $datalog);
-		*/
-		
-		$sql = "SELECT web_database.database_id as database_id, web_database.database_user_id as `database_user_id` FROM aps_instances_settings, web_database WHERE aps_instances_settings.value = web_database.database_name AND aps_instances_settings.value =  aps_instances_settings.name = 'main_database_name' AND aps_instances_settings.instance_id = ".$instanceid." LIMIT 0,1";
-		$tmp = $app->db->queryOneRecord($sql);
-		if($tmp['database_id'] > 0) $app->db->datalogDelete('web_database', 'database_id', $tmp['database_id']);
-		
-        $database_user = $tmp['database_user_id'];
-        $tmp = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `database_user_id` = '" . $app->functions->intval($database_user) . "' OR `database_ro_user_id` = '" . $app->functions->intval($database_user) . "'");
-        if($tmp['cnt'] < 1) $app->db->datalogDelete('web_database_user', 'database_user_id', $database_user);
-        
-		$app->db->datalogUpdate('aps_instances', "instance_status = ".INSTANCE_REMOVE, 'id', $instanceid);
-
-    }
-    
-    /**
-     * Sets the status of an instance to "installation planned" and creates a 
-     * datalog entry to re-install the package. The existing package is simply overwritten. 
-     * 
-     * @param $instanceid the instance to delete
-     */
-    public function reinstallInstance($instanceid)
-    {
-        global $app;
-        
-        /*
-		$app->db->query("UPDATE aps_instances SET instance_status = ".INSTANCE_INSTALL." WHERE id = ".$instanceid.";");
-        
-        $webserver_id = $this->getInstanceDataForDatalog($instanceid);
-        if($webserver_id == '') return;
-        
-        // Create a sys_datalog entry for re-installation
-        $datalog = array('instance_id' => $instanceid, 'server_id' => $webserver_id);
-        $app->db->datalogSave('aps', 'INSERT', 'id', $instanceid, array(), $datalog);
-		*/
-		
-		$sql = "SELECT web_database.database_id as database_id FROM aps_instances_settings, web_database WHERE aps_instances_settings.value = web_database.database_name AND aps_instances_settings.value =  aps_instances_settings.name = 'main_database_name' AND aps_instances_settings.instance_id = ".$instanceid." LIMIT 0,1";
-		$tmp = $app->db->queryOneRecord($sql);
-		if($tmp['database_id'] > 0) $app->db->datalogDelete('web_database', 'database_id', $tmp['database_id']);
-		
-		$app->db->datalogUpdate('aps_instances', "instance_status = ".INSTANCE_INSTALL, 'id', $instanceid);
-    }
-
-    /**
-     * Read the settings to be filled when installing
-     * 
-     * @param $id the internal ID of the package
-     * @return array
-     */
-    public function getPackageSettings($id)    
-    {
-        global $app;
-        
-        $pkg = $app->db->queryOneRecord('SELECT * FROM aps_packages WHERE id = '.$app->db->quote($id).';');
-        
-        // Load in meta file if existing and register its namespaces
-        $metafile = $this->interface_pkg_dir.'/'.$pkg['path'].'/APP-META.xml';
-        if(!file_exists($metafile)) 
-            return array('error' => 'The metafile for '.$settings['Name'].' couldn\'t be found');
-        
-        $sxe = $this->readInMetaFile($metafile);
-        
-        $groupsettings = parent::getXPathValue($sxe, '//settings/group/setting', true);
-        if(empty($groupsettings)) return array();
-        
-        $settings = array();
-        foreach($groupsettings as $setting)
-        {
-            $setting_id = strval($setting['id']);
-            
-            if($setting['type'] == 'string' || $setting['type'] == 'email' || $setting['type'] == 'integer'
-            || $setting['type'] == 'float' || $setting['type'] == 'domain-name')
-            {
-                $settings[] = array('SettingID' => $setting_id,
-                                    'SettingName' => $setting->name,
-                                    'SettingDescription' => $setting->description,
-                                    'SettingType' => $setting['type'],
-                                    'SettingInputType' => 'string',
-                                    'SettingDefaultValue' => strval($setting['default-value']),
-                                    'SettingRegex' => $setting['regex'],
-                                    'SettingMinLength' => $setting['min-length'],
-                                    'SettingMaxLength' => $setting['max-length']);
-            }
-            else if($setting['type'] == 'password')
-            {
-                $settings[] = array('SettingID' => $setting_id,
-                                    'SettingName' => $setting->name,
-                                    'SettingDescription' => $setting->description,
-                                    'SettingType' => 'password',
-                                    'SettingInputType' => 'password',
-                                    'SettingDefaultValue' => '',
-                                    'SettingRegex' => $setting['regex'],
-                                    'SettingMinLength' => $setting['min-length'],
-                                    'SettingMaxLength' => $setting['max-length']);
-            }
-            else if($setting['type'] == 'boolean')
-            {
-                $settings[] = array('SettingID' => $setting_id,
-                                    'SettingName' => $setting->name,
-                                    'SettingDescription' => $setting->description,
-                                    'SettingType' => 'boolean',
-                                    'SettingInputType' => 'checkbox',
-                                    'SettingDefaultValue' => strval($setting['default-value']));
-            }
-            else if($setting['type'] == 'enum')
-            {
-              $choices = array();
-              foreach($setting->choice as $choice)
-              {
-                $choices[] = array('EnumID' => strval($choice['id']),
-                                   'EnumName' => $choice->name);
-              }
-              $settings[] = array('SettingID' => $setting_id,
-                                  'SettingName' => $setting->name,
-                                  'SettingDescription' => $setting->description,
-                                  'SettingType' => 'enum',
-                                  'SettingInputType' => 'select',
-                                  'SettingDefaultValue' => strval($setting['default-value']),
-                                  'SettingChoices' => $choices);
-            }
-        }
-
-        return $settings;
-    }
-    
-    /**
-     * Validates the user input according to the settings array and
-     * delivers errors if occurring
-     * 
-     * @param $input the user $_POST array
-     * @param $pkg_details the package details
-     * @param $settings the package settings array
-     * @return array in this structure:
-     *               array(2) {
-     *                  ["input"]=> ...
-     *                  ["errors"]=> ...
-     *               }
-     */
-    public function validateInstallerInput($postinput, $pkg_details, $domains, $settings = array())
-    {
-        global $app;
-        
-        $ret = array();
-        $input = array(); 
-        $error = array();
-        
-        // Main domain (obligatory)
-        if(isset($postinput['main_domain']))
-        {
-            if(!in_array($postinput['main_domain'], $domains)) $error[] = $app->lng('error_main_domain');
-            else $input['main_domain'] = $postinput['main_domain'];
-        }
-        else $error[] = $app->lng('error_main_domain'); 
-        
-        // Main location (not obligatory but must be supplied)
-        if(isset($postinput['main_location']))
-        {
-            $temp_errstr = '';
-            // It can be empty but if the user did write something, check it
-            $userinput = false;
-            if(strlen($postinput['main_location']) > 0) $userinput = true; 
-            
-            // Filter invalid input slashes (twice!)
-            $main_location = $this->secureLocation($postinput['main_location']);
-            $main_location = $this->secureLocation($main_location);
-            // Only allow digits, words, / and -
-            $main_location = preg_replace("/[^\d\w\/\-]/i", "", $main_location);
-            if($userinput && (strlen($main_location) == 0)) $temp_errstr = $app->lng('error_inv_main_location');
-            
-            // Find out document_root and make sure no apps are installed twice to one location
-            if(in_array($postinput['main_domain'], $domains))
-            {
-                $docroot = $app->db->queryOneRecord("SELECT document_root FROM web_domain 
-                    WHERE domain = '".$app->db->quote($postinput['main_domain'])."';");
-                $new_path = $docroot['document_root'];
-                if(substr($new_path, -1) != '/') $new_path .= '/';
-                $new_path .= $main_location;
-                
-                // Get the $customerid which belongs to the selected domain
-                $customerid = $this->getCustomerIDFromDomain($postinput['main_domain']);
-                
-                // First get all domains used for an install, then their loop them
-                // and get the corresponding document roots as well as the defined
-                // locations. If an existing doc_root + location matches with the
-                // new one -> error
-                $instance_domains = $app->db->queryAllRecords("SELECT instance_id, s.value AS domain 
-                    FROM aps_instances AS i, aps_instances_settings AS s 
-                    WHERE i.id = s.instance_id AND s.name = 'main_domain' 
-                        AND i.customer_id = '".$app->db->quote($customerid)."';");
-                for($i = 0; $i < count($instance_domains); $i++)
-                {
-                    $used_path = '';
-                    
-                    $doc_root = $app->db->queryOneRecord("SELECT document_root FROM web_domain 
-                        WHERE domain = '".$app->db->quote($instance_domains[$i]['domain'])."';");
-
-                    // Probably the domain settings were changed later, so make sure the doc_root
-                    // is not empty for further validation
-                    if(!empty($doc_root))
-                    {
-                        $used_path = $doc_root['document_root'];
-                        if(substr($used_path, -1) != '/') $used_path .= '/';
-                        
-                        $location_for_domain = $app->db->queryOneRecord("SELECT value 
-                            FROM aps_instances_settings WHERE name = 'main_location' 
-                            AND instance_id = '".$app->db->quote($instance_domains[$i]['instance_id'])."';");
-                        
-                        // The location might be empty but the DB return must not be false!
-                        if($location_for_domain) $used_path .= $location_for_domain['value'];  						
-
-                        if($new_path == $used_path)
-                        {
-                            $temp_errstr = $app->lng('error_used_location');
-                            break;
-                        }
-                    }
-                }
-            }
-            else $temp_errstr = $app->lng('error_main_domain');
-            
-            if($temp_errstr == '') $input['main_location'] = htmlspecialchars($main_location);
-            else $error[] = $temp_errstr;            
-        }
-        else $error[] = $app->lng('error_no_main_location');
-        
-        // License (the checkbox must be set)
-        if(isset($pkg_details['License need agree']) 
-        && $pkg_details['License need agree'] == 'true')
-        {
-            if(isset($postinput['license']) && $postinput['license'] == 'on') $input['license'] = 'true';
-            else $error[] = $app->lng('error_license_agreement');
-        } 
-        
-        // Database
-        if(isset($pkg_details['Requirements Database'])
-        && $pkg_details['Requirements Database'] != '')
-        {
-            if(isset($postinput['main_database_password']))
-            {
-                if($postinput['main_database_password'] == '') $error[] = $app->lng('error_no_database_pw');
-                else if(strlen($postinput['main_database_password']) > 8) 
-                    $input['main_database_password'] = htmlspecialchars($postinput['main_database_password']);
-                else $error[] = $app->lng('error_short_database_pw');
-            }
-            else $error[] = $app->lng('error_no_database_pw');
-        }
-        
-        // Validate the package settings 
-        foreach($settings as $setting)
-        {
-            $temp_errstr = '';
-            $setting_id = strval($setting['SettingID']); 
-            
-            // We assume that every setting must be set
-            if((isset($postinput[$setting_id]) && ($postinput[$setting_id] != ''))
-            || ($setting['SettingType'] == 'boolean'))
-            {
-                if($setting['SettingType'] == 'string' || $setting['SettingType'] == 'password')
-                {
-                    if($app->functions->intval($setting['SettingMinLength'], true) != 0 
-                    && strlen($postinput[$setting_id]) < $app->functions->intval($setting['SettingMinLength'], true))
-                        $temp_errstr = sprintf($app->lng('error_short_value_for'), $setting['setting_name']);
-                        
-                    if($app->functions->intval($setting['SettingMaxLength'], true) != 0 
-                    && strlen($postinput[$setting_id]) > $app->functions->intval($setting['SettingMaxLength'], true))
-                        $temp_errstr = sprintf($app->lng('error_long_value_for'), $setting['setting_name']);
-
-                    if(isset($setting['SettingRegex'])
-                    && !preg_match("/".$setting['SettingRegex']."/", $postinput[$setting_id]))
-                        $temp_errstr = sprintf($app->lng('error_inv_value_for'), $setting['setting_name']);
-                }
-                else if($setting['SettingType'] == 'email')
-                {
-                    if(filter_var(strtolower($postinput[$setting_id]), FILTER_VALIDATE_EMAIL) === false)
-                        $temp_errstr = sprintf($app->lng('error_inv_email_for'), $setting['setting_name']);
-                }
-                else if($setting['SettingType'] == 'domain-name')
-                {
-                    if(!preg_match("^(http|https)\://([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\?\'\\\+&%\$#\=~_\-]+))*$", 
-                        $postinput[$setting_id]))
-                    $temp_errstr = sprintf($app->lng('error_inv_domain_for'), $setting['setting_name']);    
-                }
-                else if($setting['SettingType'] == 'integer')
-                {
-                    if(filter_var($postinput[$setting_id], FILTER_VALIDATE_INT) === false)
-                        $temp_errstr = sprintf($app->lng('error_inv_integer_for'), $setting['setting_name']);
-                }
-                else if($setting['SettingType'] == 'float')
-                {
-                    if(filter_var($postinput[$setting_id], FILTER_VALIDATE_FLOAT) === false)
-                        $temp_errstr = sprintf($app->lng('error_inv_float_for'), $setting['setting_name']);
-                }
-                else if($setting['SettingType'] == 'boolean')
-                {
-                    // If we have a boolean value set, it must be either true or false
-                    if(!isset($postinput[$setting_id])) $postinput[$setting_id] = 'false';
-                    else if(isset($postinput[$setting_id]) && $postinput[$setting_id] != 'true') 
-                        $postinput[$setting_id] = 'true';
-                }
-                else if($setting['SettingType'] == 'enum')
-                {
-                    $found = false;
-                    for($i = 0; $i < count($setting['SettingChoices']); $i++)
-                    {
-                        if($setting['SettingChoices'][$i]['EnumID'] == $postinput[$setting_id])
-                            $found = true;
-                    }
-                    if(!$found) $temp_errstr = sprintf($app->lng('error_inv_value_for'), $setting['SettingName']);
-                }
-                
-                if($temp_errstr == '') $input[$setting_id] = $postinput[$setting_id];
-                else $error[] = $temp_errstr;
-            }
-            else $error[] = sprintf($app->lng('error_no_value_for'), $setting['SettingName']);
-        }
-        
-        $ret['input'] = $input;
-        $ret['error'] = array_unique($error);
-        
-        return $ret;
-    }
-    
-    /**
-     * Read the metadata of a package and returns some content
-     * 
-     * @param $id the internal ID of the package
-     * @return array
-     */
-    public function getPackageDetails($id)
-    {
-        global $app;
-        
-        $pkg = $app->db->queryOneRecord('SELECT * FROM aps_packages WHERE id = '.$app->db->quote($id).';');
-        
-        // Load in meta file if existing and register its namespaces
-        $metafile = $this->interface_pkg_dir.'/'.$pkg['path'].'/APP-META.xml';
-        if(!file_exists($metafile)) 
-            return array('error' => 'The metafile for '.$pkg['name'].' couldn\'t be found');
-        
-        $metadata = file_get_contents($metafile);
-        $metadata = str_replace("xmlns=", "ns=", $metadata);
-        $sxe = new SimpleXMLElement($metadata);
-        $namespaces = $sxe->getDocNamespaces(true);
-        foreach($namespaces as $ns => $url) $sxe->registerXPathNamespace($ns, $url); 
-
-        $pkg['Summary'] = htmlspecialchars(parent::getXPathValue($sxe, '//summary'));
-        $pkg['Homepage'] = parent::getXPathValue($sxe, '//homepage');
-        $pkg['Description'] = nl2br(htmlspecialchars(trim(parent::getXPathValue($sxe, '//description'))));
-        $pkg['Config script'] = strtoupper(parent::getXPathValue($sxe, '//configuration-script-language'));
-        $installed_size = parent::getXPathValue($sxe, '//installed-size');
-        $pkg['Installed Size'] = (!empty($installed_size)) ? parent::convertSize((int)$installed_size) : '';        
-        
-        // License
-        $pkg['License need agree'] = parent::getXPathValue($sxe, '//license/@must-accept');
-        $pkg['License name'] = parent::getXPathValue($sxe, '//license/text/name'); // might be empty
-        $pkg['License type'] = 'file'; // default type
-        $pkg['License content'] = ''; // default license filename on local system
-        $license_url = parent::getXPathValue($sxe, '//license/text/url');
-        if(!empty($license_url)) 
-        {
-            $pkg['License type'] = 'url';
-            $pkg['License content'] = htmlspecialchars($license_url);
-        }
-        else
-        {
-            $lic = @file_get_contents($this->interface_pkg_dir.'/'.$pkg['path'].'/LICENSE');
-            $pkg['License content'] = htmlentities($lic, ENT_QUOTES, 'ISO-8859-1');
-        }  
-        
-        // Languages
-        $languages = parent::getXPathValue($sxe, '//languages/language', true);
-        $pkg['Languages'] = (is_array($languages)) ? implode(' ', $languages) : '';
-        
-        // Icon
-        $icon = parent::getXPathValue($sxe, '//icon/@path');
-        if(!empty($icon))
-        {
-            // Using parse_url() to filter malformed URLs
-            $path = dirname(parse_url($_SERVER['PHP_SELF'], PHP_URL_PATH)).'/'.
-                    basename($this->interface_pkg_dir).'/'.$pkg['path'].'/'.basename((string)$icon);
-	    // nginx: if $_SERVER['PHP_SELF'] is doubled, remove /sites/aps_packagedetails_show.php from beginning of path
-	    $path = preg_replace('@^/sites/aps_packagedetails_show.php(.*)@', '$1', $path);
-
-            $pkg['Icon'] = $path;
-        }
-        else $pkg['Icon'] = '';
-        
-        // Screenshots
-        $screenshots = parent::getXPathValue($sxe, '//screenshot', true);
-        if(!empty($screenshots))
-        {
-            foreach($screenshots as $screen)
-            {
-                // Using parse_url() to filter malformed URLs
-                $path = dirname(parse_url($_SERVER['PHP_SELF'], PHP_URL_PATH)).'/'.
-                        basename($this->interface_pkg_dir).'/'.$pkg['path'].'/'.basename((string)$screen['path']);
-		// nginx: if $_SERVER['PHP_SELF'] is doubled, remove /sites/aps_packagedetails_show.php from beginning of path
-		$path = preg_replace('@^/sites/aps_packagedetails_show.php(.*)@', '$1', $path);
-
-                $pkg['Screenshots'][] = array('ScreenPath' => $path,
-                                              'ScreenDescription' => htmlspecialchars(trim((string)$screen->description)));
-            }
-        }
-        else $pkg['Screenshots'] = ''; // if no screenshots are available, set the variable though
-                
-        // Changelog
-        $changelog = parent::getXPathValue($sxe, '//changelog/version', true);
-        if(!empty($changelog))
-        {
-            foreach($changelog as $change)
-            {
-                $entries = array(); 
-                foreach($change->entry as $entry) $entries[] = htmlspecialchars(trim((string)$entry)); 
-
-                $pkg['Changelog'][] = array('ChangelogVersion' => (string)$change['version'], 
-                                            'ChangelogDescription' => implode('<br />', $entries));
-            }
-        }
-		
-        else $pkg['Changelog'] = '';
-        
-        // PHP extensions
-        $php_extensions = parent::getXPathValue($sxe, '//php:extension', true);
-        $php_ext = '';
-        if(!empty($php_extensions))
-        {
-            foreach($php_extensions as $extension)
-            {
-                if(strtolower($extension) == 'php') continue;
-                $php_ext .= $extension.' ';
-            }
-        }
-        $pkg['Requirements PHP extensions'] = trim($php_ext);
-        
-        // PHP bool options
-        $pkg['Requirements PHP settings'] = '';
-        $php_bool_options = array('allow-url-fopen', 'file-uploads', 'magic-quotes-gpc', 
-                                  'register-globals', 'safe-mode', 'short-open-tag');
-        foreach($php_bool_options as $option)
-        {
-            $value = parent::getXPathValue($sxe, '//php:'.$option);
-            if(!empty($value))
-            {
-                $option = str_replace('-', '_', $option);
-                $value = str_replace(array('false', 'true'), array('off', 'on'), $value);
-                $pkg['Requirements PHP settings'][] = array('PHPSettingName' => $option,
-                                                            'PHPSettingValue' => $value);
-            }
-        }
-        
-        // PHP integer value settings
-        $memory_limit = parent::getXPathValue($sxe, '//php:memory-limit');
-        if(!empty($memory_limit))
-            $pkg['Requirements PHP settings'][] = array('PHPSettingName' => 'memory_limit',
-                                                        'PHPSettingValue' => parent::convertSize((int)$memory_limit));
-
-        $max_exec_time = parent::getXPathValue($sxe, '//php:max-execution-time');
-        if(!empty($max_exec_time))
-            $pkg['Requirements PHP settings'][] = array('PHPSettingName' => 'max-execution-time',
-                                                        'PHPSettingValue' => $max_exec_time);
-        
-        $post_max_size = parent::getXPathValue($sxe, '//php:post-max-size');
-        if(!empty($post_max_size))
-            $pkg['Requirements PHP settings'][] = array('PHPSettingName' => 'post_max_size',
-                                                        'PHPSettingValue' => parent::convertSize((int)$post_max_size));
-        
-        // Get supported PHP versions
-        $pkg['Requirements Supported PHP versions'] = '';
-        $php_min_version = parent::getXPathValue($sxe, '//php:version/@min');
-        $php_max_not_including = parent::getXPathValue($sxe, '//php:version/@max-not-including');
-        if(!empty($php_min_version) && !empty($php_max_not_including)) 
-            $pkg['Requirements Supported PHP versions'] = $php_min_version.' - '.$php_max_not_including;
-        else if(!empty($php_min_version)) 
-            $pkg['Requirements Supported PHP versions'] = '> '.$php_min_version;
-        else if(!empty($php_max_not_including))
-            $pkg['Requirements Supported PHP versions'] = '< '.$php_min_version;
-        
-        // Database
-        $db_id = parent::getXPathValue($sxe, '//db:id');
-        $db_server_type = parent::getXPathValue($sxe, '//db:server-type');
-        $db_min_version = parent::getXPathValue($sxe, '//db:server-min-version'); 
-        if(!empty($db_id))
-        {
-            $db_server_type = str_replace('postgresql', 'PostgreSQL', $db_server_type);
-            $db_server_type = str_replace('microsoft:sqlserver', 'MSSQL', $db_server_type);
-            $db_server_type = str_replace('mysql', 'MySQL', $db_server_type);
-            
-            $pkg['Requirements Database'] = $db_server_type;
-            if(!empty($db_min_version)) $pkg['Requirements Database'] .= ' > '.$db_min_version;
-        }
-        else $pkg['Requirements Database'] = '';
-        
-        return $pkg;
-    }
-}
-?>
+<?php
+/*
+Copyright (c) 2012, ISPConfig UG
+Contributors: web wack creations,  http://www.web-wack.at
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Neither the name of ISPConfig nor the names of its contributors
+      may be used to endorse or promote products derived from this software without
+      specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+require_once('aps_base.inc.php');
+
+class ApsGUIController extends ApsBase
+{
+    /**
+    * Constructor
+    *
+    * @param $app the application instance (db handle)
+    */
+    public function __construct($app)
+    {
+        parent::__construct($app);
+    }
+    
+    /**
+     * Reads in a package metadata file and registers it's namespaces
+     * 
+     * @param $filename the file to read
+     * @return $sxe a SimpleXMLElement handle
+     */
+    private function readInMetaFile($filename)
+    {
+        $metadata = file_get_contents($filename);
+        $metadata = str_replace("xmlns=", "ns=", $metadata);
+        $sxe = new SimpleXMLElement($metadata);
+        $namespaces = $sxe->getDocNamespaces(true);
+        foreach($namespaces as $ns => $url) $sxe->registerXPathNamespace($ns, $url);
+        
+        return $sxe; 
+    }
+    
+    /**
+     * Applies a RegEx pattern onto a location path in order to secure it against 
+     * code injections and invalid input
+     * 
+     * @param $location_unfiltered the file path to secure
+     * @return $location
+     */
+    private function secureLocation($location_unfiltered)
+    {
+        // Filter invalid slashes from string
+        $location = preg_replace(array('#/+#', '#\.+#', '#\0+#', '#\\\\+#'), 
+                                 array('/', '', '', '/'), 
+                                 $location_unfiltered);
+
+        // Remove a beginning or trailing slash
+        if(substr($location, -1) == '/') $location = substr($location, 0, strlen($location) - 1);
+        if(substr($location, 0, 1) == '/') $location = substr($location, 1);
+        
+        return $location;
+    }
+    
+    /**
+     * Gets the CustomerID (ClientID) which belongs to a specific domain
+     * 
+     * @param $domain the domain
+     * @return $customerid
+     */
+    private function getCustomerIDFromDomain($domain)
+    {
+        global $app;
+        $customerid = 0;
+        
+        $customerdata = $app->db->queryOneRecord("SELECT client_id FROM sys_group, web_domain
+            WHERE web_domain.sys_groupid = sys_group.groupid 
+            AND web_domain.domain = '".$app->db->quote($domain)."';");
+        if(!empty($customerdata)) $customerid = $customerdata['client_id'];
+        
+        return $customerid;
+    }
+    
+    /**
+     * Returns the server_id for an already installed instance. Is actually 
+     * just a little helper method to avoid redundant code
+     * 
+     * @param $instanceid the instance to process
+     * @return $webserver_id the server_id
+     */
+    private function getInstanceDataForDatalog($instanceid)
+    {
+        global $app;
+        $webserver_id = '';
+        
+        $websrv = $app->db->queryOneRecord("SELECT server_id FROM web_domain 
+            WHERE domain = (SELECT value FROM aps_instances_settings 
+                WHERE name = 'main_domain' AND instance_id = ".$app->db->quote($instanceid).");");
+
+        // If $websrv is empty, an error has occured. Domain no longer existing? Settings table damaged?
+        // Anyhow, remove this instance record because it's not useful at all
+        if(empty($websrv)) 
+        {
+            $app->db->query("DELETE FROM aps_instances WHERE id = ".$app->db->quote($instanceid).";");
+            $app->db->query("DELETE FROM aps_instances_settings WHERE instance_id = ".$app->db->quote($instanceid).";");
+        }
+        else $webserver_id = $websrv['server_id'];
+        
+        return $webserver_id;
+    } 
+    
+    /**
+     * Finds out if there is a newer package version for 
+     * a given (possibly valid) package ID
+     * 
+     * @param $id the ID to check
+     * @return $newer_pkg_id the newer package ID
+     */ 
+    public function getNewestPackageID($id)
+    {
+        global $app;
+        
+        if(preg_match('/^[0-9]+$/', $id) != 1) return 0;
+        
+        $result = $app->db->queryOneRecord("SELECT id, name, 
+            CONCAT(version, '-', CAST(`release` AS CHAR)) AS current_version 
+            FROM aps_packages 
+            WHERE name = (SELECT name FROM aps_packages WHERE id = ".$app->db->quote($id).")  
+            ORDER BY REPLACE(version, '.', '')+0 DESC, `release` DESC");
+            
+        if(!empty($result) && ($id != $result['id'])) return $result['id'];
+        
+        return 0; 
+    }
+
+    /**
+     * Validates a given package ID
+     *
+     * @param $id the ID to check
+     * @param $is_admin a flag to allow locked IDs too (for admin calls)
+     * @return boolean
+     */
+    public function isValidPackageID($id, $is_admin = false)
+    {
+        global $app;
+        
+         if(preg_match('/^[0-9]+$/', $id) != 1) return false;
+         
+         $sql_ext = (!$is_admin) ? 
+            'package_status = '.PACKAGE_ENABLED.' AND' :  
+            '(package_status = '.PACKAGE_ENABLED.' OR package_status = '.PACKAGE_LOCKED.') AND'; 
+
+         $result = $app->db->queryOneRecord("SELECT id FROM aps_packages WHERE ".$sql_ext." id = ".$app->db->quote($id).";");
+         if(!$result) return false;
+         
+         return true;
+    }
+    
+    /**
+     * Validates a given instance ID
+     *
+     * @param $id the ID to check
+     * @param $client_id the calling client ID
+     * @param $is_admin a flag to ignore the client ID check for admins
+     * @return boolean
+     */
+    public function isValidInstanceID($id, $client_id, $is_admin = false)
+    {
+        global $app;
+        
+         if(preg_match('/^[0-9]+$/', $id) != 1) return false;
+         
+         // Only filter if not admin
+         $sql_ext = (!$is_admin) ? 'customer_id = '.$app->db->quote($client_id).' AND' : ''; 
+
+         $result = $app->db->queryOneRecord('SELECT id FROM aps_instances WHERE '.$sql_ext.' id = '.$app->db->quote($id).';');
+         if(!$result) return false;
+         
+         return true;
+    }    
+    
+    /**
+     * Creates a new database record for the package instance and
+     * an install task
+     * 
+     * @param $settings the settings to enter into the DB
+     * @param $packageid the PackageID
+     */
+    public function createPackageInstance($settings, $packageid)
+    {
+		global $app;
+		
+		$app->uses('tools_sites');
+        
+		$webserver_id = 0;
+        $websrv = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain = '".$app->db->quote($settings['main_domain'])."';");
+        if(!empty($websrv)) $webserver_id = $websrv['server_id'];
+        $customerid = $this->getCustomerIDFromDomain($settings['main_domain']);
+        
+        if(empty($settings) || empty($webserver_id)) return false;
+		
+		//* Get server config of the web server
+		$app->uses("getconf");
+		$web_config = $app->getconf->get_server_config($app->functions->intval($websrv["server_id"]),'web');
+			
+		//* Set PHP mode to php-fcgi and enable suexec in website on apache servers / set PHP mode to PHP-FPM on nginx servers
+		if($web_config['server_type'] == 'apache') {
+			if(($websrv['php'] != 'fast-cgi' || $websrv['suexec'] != 'y') && $websrv['php'] != 'php-fpm') {
+				$app->db->datalogUpdate('web_domain', "php = 'fast-cgi', suexec = 'y'", 'domain_id', $websrv['domain_id']);
+			}
+		} else {
+			// nginx
+			if($websrv['php'] != 'php-fpm' && $websrv['php'] != 'fast-cgi') {
+				$app->db->datalogUpdate('web_domain', "php = 'php-fpm'", 'domain_id', $websrv['domain_id']);
+			}
+		}
+		
+		
+		//* Create the MySQL database for the application
+		$pkg = $app->db->queryOneRecord('SELECT * FROM aps_packages WHERE id = '.$app->db->quote($packageid).';');
+		$metafile = $this->interface_pkg_dir.'/'.$pkg['path'].'/APP-META.xml';
+		$sxe = $this->readInMetaFile($metafile);
+		
+		$db_id = parent::getXPathValue($sxe, '//db:id');
+		if (!empty($db_id)) {
+			$global_config = $app->getconf->get_global_config('sites');
+			
+			$tmp = array();
+			$tmp['parent_domain_id'] = $websrv['domain_id'];
+			$tmp['sys_groupid'] = $websrv['sys_groupid'];
+			$dbname_prefix = $app->tools_sites->replacePrefix($global_config['dbname_prefix'], $tmp);
+			$dbuser_prefix = $app->tools_sites->replacePrefix($global_config['dbuser_prefix'], $tmp);
+			unset($tmp);
+			
+            // get information if the webserver is a db server, too
+            $web_server = $app->db->queryOneRecord("SELECT server_id,server_name,db_server FROM server WHERE server_id  = ".$websrv['server_id']);
+            if($web_server['db_server'] == 1) {
+                // create database on "localhost" (webserver)
+				$mysql_db_server_id = $websrv['server_id'];
+				$mysql_db_host = 'localhost';
+				$mysql_db_remote_access = 'n';
+				$mysql_db_remote_ips = '';
+            } else {
+                //* get the default database server of the client
+                $client = $app->db->queryOneRecord("SELECT default_dbserver FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ".$websrv['sys_groupid']);
+                if(is_array($client) && $client['default_dbserver'] > 0 && $client['default_dbserver'] != $websrv['server_id']) {
+                    $mysql_db_server_id =  $client['default_dbserver'];
+                    $dbserver_config = $web_config = $app->getconf->get_server_config($app->functions->intval($mysql_db_server_id),'server');
+                    $mysql_db_host = $dbserver_config['ip_address'];
+                    $mysql_db_remote_access = 'y';
+                    $webserver_config = $app->getconf->get_server_config($app->functions->intval($websrv['server_id']),'server');
+                    $mysql_db_remote_ips = $webserver_config['ip_address'];
+                } else {
+                    /* I left this in place for a fallback that should NEVER! happen.
+                     * if we reach this point it means that there is NO default db server for the client
+                     * AND the webserver has NO db service enabled.
+                     * We have to abort the aps installation here... so I added a return false
+                     * although this does not present any error message to the user.
+                     */
+                    return false;
+                    
+                    /*$mysql_db_server_id = $websrv['server_id'];
+                    $mysql_db_host = 'localhost';
+                    $mysql_db_remote_access = 'n';
+                    $mysql_db_remote_ips = '';*/
+                }
+            }
+			
+            //* Find a free db name for the app
+			for($n = 1; $n <= 1000; $n++) {
+				$mysql_db_name = ($dbname_prefix != '' ? $dbname_prefix.'aps'.$n : uniqid('aps'));
+				$tmp = $app->db->queryOneRecord("SELECT count(database_id) as number FROM web_database WHERE database_name = '".$app->db->quote($mysql_db_name)."'");
+				if($tmp['number'] == 0) break;
+			}
+			//* Find a free db username for the app
+			for($n = 1; $n <= 1000; $n++) {
+				$mysql_db_user = ($dbuser_prefix != '' ? $dbuser_prefix.'aps'.$n : uniqid('aps'));
+				$tmp = $app->db->queryOneRecord("SELECT count(database_user_id) as number FROM web_database_user WHERE database_user = '".$app->db->quote($mysql_db_user)."'");
+				if($tmp['number'] == 0) break;
+			}
+			
+			$mysql_db_password = $settings['main_database_password'];
+			
+			//* Create the mysql database user
+			$insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `database_user`, `database_user_prefix`, `database_password`) 
+					  VALUES( ".$websrv['sys_userid'].", ".$websrv['sys_groupid'].", 'riud', '".$websrv['sys_perm_group']."', '', 0, '$mysql_db_user', '".$app->db->quote($dbuser_prefix) . "', PASSWORD('$mysql_db_password'))";
+			$mysql_db_user_id = $app->db->datalogInsert('web_database_user', $insert_data, 'database_user_id');
+            
+			//* Create the mysql database
+			$insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `parent_domain_id`, `type`, `database_name`, `database_name_prefix`, `database_user_id`, `database_ro_user_id`, `database_charset`, `remote_access`, `remote_ips`, `backup_copies`, `active`, `backup_interval`) 
+					  VALUES( ".$websrv['sys_userid'].", ".$websrv['sys_groupid'].", 'riud', '".$websrv['sys_perm_group']."', '', $mysql_db_server_id, ".$websrv['domain_id'].", 'mysql', '$mysql_db_name', '" . $app->db->quote($dbname_prefix) . "', '$mysql_db_user_id', 0, '', '$mysql_db_remote_access', '$mysql_db_remote_ips', ".$websrv['backup_copies'].", 'y', '".$websrv['backup_interval']."')";
+			$app->db->datalogInsert('web_database', $insert_data, 'database_id');
+			
+			//* Add db details to package settings
+			$settings['main_database_host'] = $mysql_db_host;
+			$settings['main_database_name'] = $mysql_db_name;
+			$settings['main_database_login'] = $mysql_db_user;
+		
+		}
+		
+		//* Insert new package instance
+		$insert_data = "(`sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `server_id`, `customer_id`, `package_id`, `instance_status`) VALUES (".$websrv['sys_userid'].", ".$websrv['sys_groupid'].", 'riud', '".$websrv['sys_perm_group']."', '', ".$app->db->quote($webserver_id).",".$app->db->quote($customerid).", ".$app->db->quote($packageid).", ".INSTANCE_PENDING.")";
+		$InstanceID = $app->db->datalogInsert('aps_instances', $insert_data, 'id');
+		
+		//* Insert all package settings
+		if(is_array($settings)) {
+			foreach($settings as $key => $value) {
+				$insert_data = "(server_id, instance_id, name, value) VALUES (".$app->db->quote($webserver_id).",".$app->db->quote($InstanceID).", '".$app->db->quote($key)."', '".$app->db->quote($value)."')";
+				$app->db->datalogInsert('aps_instances_settings', $insert_data, 'id');
+			}
+		}
+		
+		//* Set package status to install afetr we inserted the settings
+		$app->db->datalogUpdate('aps_instances', "instance_status = ".INSTANCE_INSTALL, 'id', $InstanceID);
+    }
+    
+    /**
+     * Sets the status of an instance to "should be removed" and creates a 
+     * datalog entry to give the ISPConfig server a real removal advice 
+     * 
+     * @param $instanceid the instance to delete
+     */
+    public function deleteInstance($instanceid)
+    {
+        global $app;
+		/*
+		$app->db->query("UPDATE aps_instances SET instance_status = ".INSTANCE_REMOVE." WHERE id = ".$instanceid.";");
+        
+        $webserver_id = $this->getInstanceDataForDatalog($instanceid);
+        if($webserver_id == '') return;
+        
+        // Create a sys_datalog entry for deletion
+        $datalog = array('Instance_id' => $instanceid, 'server_id' => $webserver_id);
+        $app->db->datalogSave('aps', 'DELETE', 'id', $instanceid, array(), $datalog);
+		*/
+		
+		$sql = "SELECT web_database.database_id as database_id, web_database.database_user_id as `database_user_id` FROM aps_instances_settings, web_database WHERE aps_instances_settings.value = web_database.database_name AND aps_instances_settings.name = 'main_database_name' AND aps_instances_settings.instance_id = ".$instanceid." LIMIT 0,1";
+		$tmp = $app->db->queryOneRecord($sql);
+		if($tmp['database_id'] > 0) $app->db->datalogDelete('web_database', 'database_id', $tmp['database_id']);
+		
+        $database_user = $tmp['database_user_id'];
+        $tmp = $app->db->queryOneRecord("SELECT COUNT(*) as `cnt` FROM `web_database` WHERE `database_user_id` = '" . $app->functions->intval($database_user) . "' OR `database_ro_user_id` = '" . $app->functions->intval($database_user) . "'");
+        if($tmp['cnt'] < 1) $app->db->datalogDelete('web_database_user', 'database_user_id', $database_user);
+        
+		$app->db->datalogUpdate('aps_instances', "instance_status = ".INSTANCE_REMOVE, 'id', $instanceid);
+
+    }
+    
+    /**
+     * Sets the status of an instance to "installation planned" and creates a 
+     * datalog entry to re-install the package. The existing package is simply overwritten. 
+     * 
+     * @param $instanceid the instance to delete
+     */
+    public function reinstallInstance($instanceid)
+    {
+        global $app;
+        
+        /*
+		$app->db->query("UPDATE aps_instances SET instance_status = ".INSTANCE_INSTALL." WHERE id = ".$instanceid.";");
+        
+        $webserver_id = $this->getInstanceDataForDatalog($instanceid);
+        if($webserver_id == '') return;
+        
+        // Create a sys_datalog entry for re-installation
+        $datalog = array('instance_id' => $instanceid, 'server_id' => $webserver_id);
+        $app->db->datalogSave('aps', 'INSERT', 'id', $instanceid, array(), $datalog);
+		*/
+		
+		$sql = "SELECT web_database.database_id as database_id FROM aps_instances_settings, web_database WHERE aps_instances_settings.value = web_database.database_name AND aps_instances_settings.value =  aps_instances_settings.name = 'main_database_name' AND aps_instances_settings.instance_id = ".$instanceid." LIMIT 0,1";
+		$tmp = $app->db->queryOneRecord($sql);
+		if($tmp['database_id'] > 0) $app->db->datalogDelete('web_database', 'database_id', $tmp['database_id']);
+		
+		$app->db->datalogUpdate('aps_instances', "instance_status = ".INSTANCE_INSTALL, 'id', $instanceid);
+    }
+
+    /**
+     * Read the settings to be filled when installing
+     * 
+     * @param $id the internal ID of the package
+     * @return array
+     */
+    public function getPackageSettings($id)    
+    {
+        global $app;
+        
+        $pkg = $app->db->queryOneRecord('SELECT * FROM aps_packages WHERE id = '.$app->db->quote($id).';');
+        
+        // Load in meta file if existing and register its namespaces
+        $metafile = $this->interface_pkg_dir.'/'.$pkg['path'].'/APP-META.xml';
+        if(!file_exists($metafile)) 
+            return array('error' => 'The metafile for '.$settings['Name'].' couldn\'t be found');
+        
+        $sxe = $this->readInMetaFile($metafile);
+        
+        $groupsettings = parent::getXPathValue($sxe, '//settings/group/setting', true);
+        if(empty($groupsettings)) return array();
+        
+        $settings = array();
+        foreach($groupsettings as $setting)
+        {
+            $setting_id = strval($setting['id']);
+            
+            if($setting['type'] == 'string' || $setting['type'] == 'email' || $setting['type'] == 'integer'
+            || $setting['type'] == 'float' || $setting['type'] == 'domain-name')
+            {
+                $settings[] = array('SettingID' => $setting_id,
+                                    'SettingName' => $setting->name,
+                                    'SettingDescription' => $setting->description,
+                                    'SettingType' => $setting['type'],
+                                    'SettingInputType' => 'string',
+                                    'SettingDefaultValue' => strval($setting['default-value']),
+                                    'SettingRegex' => $setting['regex'],
+                                    'SettingMinLength' => $setting['min-length'],
+                                    'SettingMaxLength' => $setting['max-length']);
+            }
+            else if($setting['type'] == 'password')
+            {
+                $settings[] = array('SettingID' => $setting_id,
+                                    'SettingName' => $setting->name,
+                                    'SettingDescription' => $setting->description,
+                                    'SettingType' => 'password',
+                                    'SettingInputType' => 'password',
+                                    'SettingDefaultValue' => '',
+                                    'SettingRegex' => $setting['regex'],
+                                    'SettingMinLength' => $setting['min-length'],
+                                    'SettingMaxLength' => $setting['max-length']);
+            }
+            else if($setting['type'] == 'boolean')
+            {
+                $settings[] = array('SettingID' => $setting_id,
+                                    'SettingName' => $setting->name,
+                                    'SettingDescription' => $setting->description,
+                                    'SettingType' => 'boolean',
+                                    'SettingInputType' => 'checkbox',
+                                    'SettingDefaultValue' => strval($setting['default-value']));
+            }
+            else if($setting['type'] == 'enum')
+            {
+              $choices = array();
+              foreach($setting->choice as $choice)
+              {
+                $choices[] = array('EnumID' => strval($choice['id']),
+                                   'EnumName' => $choice->name);
+              }
+              $settings[] = array('SettingID' => $setting_id,
+                                  'SettingName' => $setting->name,
+                                  'SettingDescription' => $setting->description,
+                                  'SettingType' => 'enum',
+                                  'SettingInputType' => 'select',
+                                  'SettingDefaultValue' => strval($setting['default-value']),
+                                  'SettingChoices' => $choices);
+            }
+        }
+
+        return $settings;
+    }
+    
+    /**
+     * Validates the user input according to the settings array and
+     * delivers errors if occurring
+     * 
+     * @param $input the user $_POST array
+     * @param $pkg_details the package details
+     * @param $settings the package settings array
+     * @return array in this structure:
+     *               array(2) {
+     *                  ["input"]=> ...
+     *                  ["errors"]=> ...
+     *               }
+     */
+    public function validateInstallerInput($postinput, $pkg_details, $domains, $settings = array())
+    {
+        global $app;
+        
+        $ret = array();
+        $input = array(); 
+        $error = array();
+        
+        // Main domain (obligatory)
+        if(isset($postinput['main_domain']))
+        {
+            if(!in_array($postinput['main_domain'], $domains)) $error[] = $app->lng('error_main_domain');
+            else $input['main_domain'] = $postinput['main_domain'];
+        }
+        else $error[] = $app->lng('error_main_domain'); 
+        
+        // Main location (not obligatory but must be supplied)
+        if(isset($postinput['main_location']))
+        {
+            $temp_errstr = '';
+            // It can be empty but if the user did write something, check it
+            $userinput = false;
+            if(strlen($postinput['main_location']) > 0) $userinput = true; 
+            
+            // Filter invalid input slashes (twice!)
+            $main_location = $this->secureLocation($postinput['main_location']);
+            $main_location = $this->secureLocation($main_location);
+            // Only allow digits, words, / and -
+            $main_location = preg_replace("/[^\d\w\/\-]/i", "", $main_location);
+            if($userinput && (strlen($main_location) == 0)) $temp_errstr = $app->lng('error_inv_main_location');
+            
+            // Find out document_root and make sure no apps are installed twice to one location
+            if(in_array($postinput['main_domain'], $domains))
+            {
+                $docroot = $app->db->queryOneRecord("SELECT document_root FROM web_domain 
+                    WHERE domain = '".$app->db->quote($postinput['main_domain'])."';");
+                $new_path = $docroot['document_root'];
+                if(substr($new_path, -1) != '/') $new_path .= '/';
+                $new_path .= $main_location;
+                
+                // Get the $customerid which belongs to the selected domain
+                $customerid = $this->getCustomerIDFromDomain($postinput['main_domain']);
+                
+                // First get all domains used for an install, then their loop them
+                // and get the corresponding document roots as well as the defined
+                // locations. If an existing doc_root + location matches with the
+                // new one -> error
+                $instance_domains = $app->db->queryAllRecords("SELECT instance_id, s.value AS domain 
+                    FROM aps_instances AS i, aps_instances_settings AS s 
+                    WHERE i.id = s.instance_id AND s.name = 'main_domain' 
+                        AND i.customer_id = '".$app->db->quote($customerid)."';");
+                for($i = 0; $i < count($instance_domains); $i++)
+                {
+                    $used_path = '';
+                    
+                    $doc_root = $app->db->queryOneRecord("SELECT document_root FROM web_domain 
+                        WHERE domain = '".$app->db->quote($instance_domains[$i]['domain'])."';");
+
+                    // Probably the domain settings were changed later, so make sure the doc_root
+                    // is not empty for further validation
+                    if(!empty($doc_root))
+                    {
+                        $used_path = $doc_root['document_root'];
+                        if(substr($used_path, -1) != '/') $used_path .= '/';
+                        
+                        $location_for_domain = $app->db->queryOneRecord("SELECT value 
+                            FROM aps_instances_settings WHERE name = 'main_location' 
+                            AND instance_id = '".$app->db->quote($instance_domains[$i]['instance_id'])."';");
+                        
+                        // The location might be empty but the DB return must not be false!
+                        if($location_for_domain) $used_path .= $location_for_domain['value'];  						
+
+                        if($new_path == $used_path)
+                        {
+                            $temp_errstr = $app->lng('error_used_location');
+                            break;
+                        }
+                    }
+                }
+            }
+            else $temp_errstr = $app->lng('error_main_domain');
+            
+            if($temp_errstr == '') $input['main_location'] = htmlspecialchars($main_location);
+            else $error[] = $temp_errstr;            
+        }
+        else $error[] = $app->lng('error_no_main_location');
+        
+        // License (the checkbox must be set)
+        if(isset($pkg_details['License need agree']) 
+        && $pkg_details['License need agree'] == 'true')
+        {
+            if(isset($postinput['license']) && $postinput['license'] == 'on') $input['license'] = 'true';
+            else $error[] = $app->lng('error_license_agreement');
+        } 
+        
+        // Database
+        if(isset($pkg_details['Requirements Database'])
+        && $pkg_details['Requirements Database'] != '')
+        {
+            if(isset($postinput['main_database_password']))
+            {
+                if($postinput['main_database_password'] == '') $error[] = $app->lng('error_no_database_pw');
+                else if(strlen($postinput['main_database_password']) > 8) 
+                    $input['main_database_password'] = htmlspecialchars($postinput['main_database_password']);
+                else $error[] = $app->lng('error_short_database_pw');
+            }
+            else $error[] = $app->lng('error_no_database_pw');
+        }
+        
+        // Validate the package settings 
+        foreach($settings as $setting)
+        {
+            $temp_errstr = '';
+            $setting_id = strval($setting['SettingID']); 
+            
+            // We assume that every setting must be set
+            if((isset($postinput[$setting_id]) && ($postinput[$setting_id] != ''))
+            || ($setting['SettingType'] == 'boolean'))
+            {
+                if($setting['SettingType'] == 'string' || $setting['SettingType'] == 'password')
+                {
+                    if($app->functions->intval($setting['SettingMinLength'], true) != 0 
+                    && strlen($postinput[$setting_id]) < $app->functions->intval($setting['SettingMinLength'], true))
+                        $temp_errstr = sprintf($app->lng('error_short_value_for'), $setting['setting_name']);
+                        
+                    if($app->functions->intval($setting['SettingMaxLength'], true) != 0 
+                    && strlen($postinput[$setting_id]) > $app->functions->intval($setting['SettingMaxLength'], true))
+                        $temp_errstr = sprintf($app->lng('error_long_value_for'), $setting['setting_name']);
+
+                    if(isset($setting['SettingRegex'])
+                    && !preg_match("/".$setting['SettingRegex']."/", $postinput[$setting_id]))
+                        $temp_errstr = sprintf($app->lng('error_inv_value_for'), $setting['setting_name']);
+                }
+                else if($setting['SettingType'] == 'email')
+                {
+                    if(filter_var(strtolower($postinput[$setting_id]), FILTER_VALIDATE_EMAIL) === false)
+                        $temp_errstr = sprintf($app->lng('error_inv_email_for'), $setting['setting_name']);
+                }
+                else if($setting['SettingType'] == 'domain-name')
+                {
+                    if(!preg_match("^(http|https)\://([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\?\'\\\+&%\$#\=~_\-]+))*$", 
+                        $postinput[$setting_id]))
+                    $temp_errstr = sprintf($app->lng('error_inv_domain_for'), $setting['setting_name']);    
+                }
+                else if($setting['SettingType'] == 'integer')
+                {
+                    if(filter_var($postinput[$setting_id], FILTER_VALIDATE_INT) === false)
+                        $temp_errstr = sprintf($app->lng('error_inv_integer_for'), $setting['setting_name']);
+                }
+                else if($setting['SettingType'] == 'float')
+                {
+                    if(filter_var($postinput[$setting_id], FILTER_VALIDATE_FLOAT) === false)
+                        $temp_errstr = sprintf($app->lng('error_inv_float_for'), $setting['setting_name']);
+                }
+                else if($setting['SettingType'] == 'boolean')
+                {
+                    // If we have a boolean value set, it must be either true or false
+                    if(!isset($postinput[$setting_id])) $postinput[$setting_id] = 'false';
+                    else if(isset($postinput[$setting_id]) && $postinput[$setting_id] != 'true') 
+                        $postinput[$setting_id] = 'true';
+                }
+                else if($setting['SettingType'] == 'enum')
+                {
+                    $found = false;
+                    for($i = 0; $i < count($setting['SettingChoices']); $i++)
+                    {
+                        if($setting['SettingChoices'][$i]['EnumID'] == $postinput[$setting_id])
+                            $found = true;
+                    }
+                    if(!$found) $temp_errstr = sprintf($app->lng('error_inv_value_for'), $setting['SettingName']);
+                }
+                
+                if($temp_errstr == '') $input[$setting_id] = $postinput[$setting_id];
+                else $error[] = $temp_errstr;
+            }
+            else $error[] = sprintf($app->lng('error_no_value_for'), $setting['SettingName']);
+        }
+        
+        $ret['input'] = $input;
+        $ret['error'] = array_unique($error);
+        
+        return $ret;
+    }
+    
+    /**
+     * Read the metadata of a package and returns some content
+     * 
+     * @param $id the internal ID of the package
+     * @return array
+     */
+    public function getPackageDetails($id)
+    {
+        global $app;
+        
+        $pkg = $app->db->queryOneRecord('SELECT * FROM aps_packages WHERE id = '.$app->db->quote($id).';');
+        
+        // Load in meta file if existing and register its namespaces
+        $metafile = $this->interface_pkg_dir.'/'.$pkg['path'].'/APP-META.xml';
+        if(!file_exists($metafile)) 
+            return array('error' => 'The metafile for '.$pkg['name'].' couldn\'t be found');
+        
+        $metadata = file_get_contents($metafile);
+        $metadata = str_replace("xmlns=", "ns=", $metadata);
+        $sxe = new SimpleXMLElement($metadata);
+        $namespaces = $sxe->getDocNamespaces(true);
+        foreach($namespaces as $ns => $url) $sxe->registerXPathNamespace($ns, $url); 
+
+        $pkg['Summary'] = htmlspecialchars(parent::getXPathValue($sxe, '//summary'));
+        $pkg['Homepage'] = parent::getXPathValue($sxe, '//homepage');
+        $pkg['Description'] = nl2br(htmlspecialchars(trim(parent::getXPathValue($sxe, '//description'))));
+        $pkg['Config script'] = strtoupper(parent::getXPathValue($sxe, '//configuration-script-language'));
+        $installed_size = parent::getXPathValue($sxe, '//installed-size');
+        $pkg['Installed Size'] = (!empty($installed_size)) ? parent::convertSize((int)$installed_size) : '';        
+        
+        // License
+        $pkg['License need agree'] = parent::getXPathValue($sxe, '//license/@must-accept');
+        $pkg['License name'] = parent::getXPathValue($sxe, '//license/text/name'); // might be empty
+        $pkg['License type'] = 'file'; // default type
+        $pkg['License content'] = ''; // default license filename on local system
+        $license_url = parent::getXPathValue($sxe, '//license/text/url');
+        if(!empty($license_url)) 
+        {
+            $pkg['License type'] = 'url';
+            $pkg['License content'] = htmlspecialchars($license_url);
+        }
+        else
+        {
+            $lic = @file_get_contents($this->interface_pkg_dir.'/'.$pkg['path'].'/LICENSE');
+            $pkg['License content'] = htmlentities($lic, ENT_QUOTES, 'ISO-8859-1');
+        }  
+        
+        // Languages
+        $languages = parent::getXPathValue($sxe, '//languages/language', true);
+        $pkg['Languages'] = (is_array($languages)) ? implode(' ', $languages) : '';
+        
+        // Icon
+        $icon = parent::getXPathValue($sxe, '//icon/@path');
+        if(!empty($icon))
+        {
+            // Using parse_url() to filter malformed URLs
+            $path = dirname(parse_url($_SERVER['PHP_SELF'], PHP_URL_PATH)).'/'.
+                    basename($this->interface_pkg_dir).'/'.$pkg['path'].'/'.basename((string)$icon);
+	    // nginx: if $_SERVER['PHP_SELF'] is doubled, remove /sites/aps_packagedetails_show.php from beginning of path
+	    $path = preg_replace('@^/sites/aps_packagedetails_show.php(.*)@', '$1', $path);
+
+            $pkg['Icon'] = $path;
+        }
+        else $pkg['Icon'] = '';
+        
+        // Screenshots
+        $screenshots = parent::getXPathValue($sxe, '//screenshot', true);
+        if(!empty($screenshots))
+        {
+            foreach($screenshots as $screen)
+            {
+                // Using parse_url() to filter malformed URLs
+                $path = dirname(parse_url($_SERVER['PHP_SELF'], PHP_URL_PATH)).'/'.
+                        basename($this->interface_pkg_dir).'/'.$pkg['path'].'/'.basename((string)$screen['path']);
+		// nginx: if $_SERVER['PHP_SELF'] is doubled, remove /sites/aps_packagedetails_show.php from beginning of path
+		$path = preg_replace('@^/sites/aps_packagedetails_show.php(.*)@', '$1', $path);
+
+                $pkg['Screenshots'][] = array('ScreenPath' => $path,
+                                              'ScreenDescription' => htmlspecialchars(trim((string)$screen->description)));
+            }
+        }
+        else $pkg['Screenshots'] = ''; // if no screenshots are available, set the variable though
+                
+        // Changelog
+        $changelog = parent::getXPathValue($sxe, '//changelog/version', true);
+        if(!empty($changelog))
+        {
+            foreach($changelog as $change)
+            {
+                $entries = array(); 
+                foreach($change->entry as $entry) $entries[] = htmlspecialchars(trim((string)$entry)); 
+
+                $pkg['Changelog'][] = array('ChangelogVersion' => (string)$change['version'], 
+                                            'ChangelogDescription' => implode('<br />', $entries));
+            }
+        }
+		
+        else $pkg['Changelog'] = '';
+        
+        // PHP extensions
+        $php_extensions = parent::getXPathValue($sxe, '//php:extension', true);
+        $php_ext = '';
+        if(!empty($php_extensions))
+        {
+            foreach($php_extensions as $extension)
+            {
+                if(strtolower($extension) == 'php') continue;
+                $php_ext .= $extension.' ';
+            }
+        }
+        $pkg['Requirements PHP extensions'] = trim($php_ext);
+        
+        // PHP bool options
+        $pkg['Requirements PHP settings'] = '';
+        $php_bool_options = array('allow-url-fopen', 'file-uploads', 'magic-quotes-gpc', 
+                                  'register-globals', 'safe-mode', 'short-open-tag');
+        foreach($php_bool_options as $option)
+        {
+            $value = parent::getXPathValue($sxe, '//php:'.$option);
+            if(!empty($value))
+            {
+                $option = str_replace('-', '_', $option);
+                $value = str_replace(array('false', 'true'), array('off', 'on'), $value);
+                $pkg['Requirements PHP settings'][] = array('PHPSettingName' => $option,
+                                                            'PHPSettingValue' => $value);
+            }
+        }
+        
+        // PHP integer value settings
+        $memory_limit = parent::getXPathValue($sxe, '//php:memory-limit');
+        if(!empty($memory_limit))
+            $pkg['Requirements PHP settings'][] = array('PHPSettingName' => 'memory_limit',
+                                                        'PHPSettingValue' => parent::convertSize((int)$memory_limit));
+
+        $max_exec_time = parent::getXPathValue($sxe, '//php:max-execution-time');
+        if(!empty($max_exec_time))
+            $pkg['Requirements PHP settings'][] = array('PHPSettingName' => 'max-execution-time',
+                                                        'PHPSettingValue' => $max_exec_time);
+        
+        $post_max_size = parent::getXPathValue($sxe, '//php:post-max-size');
+        if(!empty($post_max_size))
+            $pkg['Requirements PHP settings'][] = array('PHPSettingName' => 'post_max_size',
+                                                        'PHPSettingValue' => parent::convertSize((int)$post_max_size));
+        
+        // Get supported PHP versions
+        $pkg['Requirements Supported PHP versions'] = '';
+        $php_min_version = parent::getXPathValue($sxe, '//php:version/@min');
+        $php_max_not_including = parent::getXPathValue($sxe, '//php:version/@max-not-including');
+        if(!empty($php_min_version) && !empty($php_max_not_including)) 
+            $pkg['Requirements Supported PHP versions'] = $php_min_version.' - '.$php_max_not_including;
+        else if(!empty($php_min_version)) 
+            $pkg['Requirements Supported PHP versions'] = '> '.$php_min_version;
+        else if(!empty($php_max_not_including))
+            $pkg['Requirements Supported PHP versions'] = '< '.$php_min_version;
+        
+        // Database
+        $db_id = parent::getXPathValue($sxe, '//db:id');
+        $db_server_type = parent::getXPathValue($sxe, '//db:server-type');
+        $db_min_version = parent::getXPathValue($sxe, '//db:server-min-version'); 
+        if(!empty($db_id))
+        {
+            $db_server_type = str_replace('postgresql', 'PostgreSQL', $db_server_type);
+            $db_server_type = str_replace('microsoft:sqlserver', 'MSSQL', $db_server_type);
+            $db_server_type = str_replace('mysql', 'MySQL', $db_server_type);
+            
+            $pkg['Requirements Database'] = $db_server_type;
+            if(!empty($db_min_version)) $pkg['Requirements Database'] .= ' > '.$db_min_version;
+        }
+        else $pkg['Requirements Database'] = '';
+        
+        return $pkg;
+    }
+}
+?>
diff --git a/interface/lib/classes/client_templates.inc.php b/interface/lib/classes/client_templates.inc.php
index c2ef0bb..cdd9ea9 100644
--- a/interface/lib/classes/client_templates.inc.php
+++ b/interface/lib/classes/client_templates.inc.php
@@ -9,7 +9,94 @@
  
 class client_templates {
 
-	function apply_client_templates($clientId) {
+    /** 
+     *  - check for old-style templates and change to new style
+     *  - update assigned templates
+     */
+	function update_client_templates($clientId, $templates = array()) {
+        global $app, $conf;
+        
+        if(!is_array($templates)) return false;
+        
+        $new_tpl = array();
+        $used_assigned = array();
+        $needed_types = array();
+        $old_style = true;
+        foreach($templates as $item) {
+            $item = trim($item);
+            if($item == '') continue;
+            
+            $tpl_id = 0;
+            $assigned_id = 0;
+            if(strpos($item, ':') === false) {
+                $tpl_id = $item;
+            } else {
+                $old_style = false; // has new-style assigns
+                list($assigned_id, $tpl_id) = explode(':', $item, 2);
+                if(substr($assigned_id, 0, 1) === 'n') $assigned_id = 0; // newly inserted items
+            }
+            if(array_key_exists($tpl_id, $needed_types) == false) $needed_types[$tpl_id] = 0;
+            $needed_types[$tpl_id]++;
+            
+            if($assigned_id > 0) {
+                $used_assigned[] = $assigned_id; // for comparison with database
+            } else {
+                $new_tpl[] = $tpl_id;
+            }
+        }
+        
+        if($old_style == true) {
+            // we have to take care of this in an other way
+            $in_db = $app->db->queryAllRecords('SELECT `assigned_template_id`, `client_template_id` FROM `client_template_assigned` WHERE `client_id` = ' . $clientId);
+            if(is_array($in_db) && count($in_db) > 0) {
+                foreach($in_db as $item) {
+                    if(array_key_exists($item['client_template_id'], $needed_types) == false) $needed_types[$item['client_template_id']] = 0;
+                    $needed_types[$item['client_template_id']]--;
+                }
+            }
+            
+            foreach($needed_types as $tpl_id => $count) {
+                if($count > 0) {
+                    // add new template to client (includes those from old-style without assigned_template_id)
+                    for($i = $count; $i > 0; $i--) {
+                        $app->db->query('INSERT INTO `client_template_assigned` (`client_id`, `client_template_id`) VALUES (' . $clientId . ', ' . $tpl_id . ')');
+                    }
+                } elseif($count < 0) {
+                    // remove old ones
+                    for($i = $count; $i < 0; $i++) {
+                        $app->db->query('DELETE FROM `client_template_assigned` WHERE client_id = ' . $clientId . ' AND client_template_id = ' . $tpl_id . ' LIMIT 1');
+                    }
+                }
+            }
+        } else {
+            // we have to take care of this in an other way
+            $in_db = $app->db->queryAllRecords('SELECT `assigned_template_id`, `client_template_id` FROM `client_template_assigned` WHERE `client_id` = ' . $clientId);
+            if(is_array($in_db) && count($in_db) > 0) {
+                // check which templates were removed from this client
+                foreach($in_db as $item) {
+                    if(in_array($item['assigned_template_id'], $used_assigned) == false) {
+                        // delete this one
+                        $app->db->query('DELETE FROM `client_template_assigned` WHERE `assigned_template_id` = ' . $item['assigned_template_id']);
+                    }
+                }
+            }
+            
+            if(count($new_tpl) > 0) {
+                foreach($new_tpl as $item) {
+                    // add new template to client (includes those from old-style without assigned_template_id)
+                    $app->db->query('INSERT INTO `client_template_assigned` (`client_id`, `client_template_id`) VALUES (' . $clientId . ', ' . $item . ')');
+                }
+            }
+        }
+        
+        unset($new_tpl);
+        unset($in_db);
+        unset($templates);
+        unset($used_assigned);
+        return true;
+    }
+    
+    function apply_client_templates($clientId) {
         global $app;
         
         include('../client/form/client.tform.php');
@@ -20,8 +107,14 @@
         $sql = "SELECT template_master, template_additional FROM client WHERE client_id = " . $app->functions->intval($clientId);
         $record = $app->db->queryOneRecord($sql);
         $masterTemplateId = $record['template_master'];
-        $additionalTemplateStr = $record['template_additional'];
-
+        
+        if($record['template_additional'] != '') {
+            // we have to call the update_client_templates function
+            $templates = explode('/', $record['template_additional']);
+            $this->update_client_templates($clientId, $templates);
+            $app->db->query('UPDATE `client` SET `template_additional` = \'\' WHERE `client_id` = ' . $app->functions->intval($clientId));
+        }
+        
         /*
          * if the master-Template is custom there is NO changing
          */
@@ -40,82 +133,82 @@
          * if != -1)
          */
         $addTpl = explode('/', $additionalTemplateStr);
-        foreach ($addTpl as $item){
-            if (trim($item) != ''){
-                $sql = "SELECT * FROM client_template WHERE template_id = " . $app->functions->intval($item);
-                $addLimits = $app->db->queryOneRecord($sql);
-                $app->log('Template processing subtemplate ' . $item . ' for client ' . $clientId, LOGLEVEL_DEBUG);
-                /* maybe the template is deleted in the meantime */
-                if (is_array($addLimits)){
-                    foreach($addLimits as $k => $v){
-                        /* we can remove this condition, but it is easier to debug with it (don't add ids and other non-limit values) */
-                        if (strpos($k, 'limit') !== false or $k == 'ssh_chroot' or $k == 'web_php_options' or $k == 'force_suexec'){
-                            $app->log('Template processing key ' . $k . ' for client ' . $clientId, LOGLEVEL_DEBUG);
+        $addTpls = $app->db->queryAllRecords('SELECT `client_template_id` FROM `client_template_assigned` WHERE `client_id` = ' . $app->functions->intval($clientId));
+        foreach ($addTpls as $addTpl){
+            $item = $addTpl['client_template_id'];
+            $sql = "SELECT * FROM client_template WHERE template_id = " . $app->functions->intval($item);
+            $addLimits = $app->db->queryOneRecord($sql);
+            $app->log('Template processing subtemplate ' . $item . ' for client ' . $clientId, LOGLEVEL_DEBUG);
+            /* maybe the template is deleted in the meantime */
+            if (is_array($addLimits)){
+                foreach($addLimits as $k => $v){
+                    /* we can remove this condition, but it is easier to debug with it (don't add ids and other non-limit values) */
+                    if (strpos($k, 'limit') !== false or $k == 'ssh_chroot' or $k == 'web_php_options' or $k == 'force_suexec'){
+                        $app->log('Template processing key ' . $k . ' for client ' . $clientId, LOGLEVEL_DEBUG);
 
-                            /* process the numerical limits */
-                            if (is_numeric($v)){
-                                /* switch for special cases */
-                                switch ($k){
-                                case 'limit_cron_frequency':
-                                    if ($v < $limits[$k]) $limits[$k] = $v;
-                                    /* silent adjustment of the minimum cron frequency to 1 minute */
-                                    /* maybe this control test should be done via validator definition in tform.php file, but I don't know how */
-                                    if ($limits[$k] < 1) $limits[$k] = 1;
-                                break;
+                        /* process the numerical limits */
+                        if (is_numeric($v)){
+                            /* switch for special cases */
+                            switch ($k){
+                            case 'limit_cron_frequency':
+                                if ($v < $limits[$k]) $limits[$k] = $v;
+                                /* silent adjustment of the minimum cron frequency to 1 minute */
+                                /* maybe this control test should be done via validator definition in tform.php file, but I don't know how */
+                                if ($limits[$k] < 1) $limits[$k] = 1;
+                            break;
 
-                                default:
-                                    if ($limits[$k] > -1){
-                                        if ($v == -1){
-                                            $limits[$k] = -1;
-                                        }
-                                        else {
-                                            $limits[$k] += $v;
-                                        }
+                            default:
+                                if ($limits[$k] > -1){
+                                    if ($v == -1){
+                                        $limits[$k] = -1;
+                                    }
+                                    else {
+                                        $limits[$k] += $v;
                                     }
                                 }
                             }
-                            /* process the string limits (CHECKBOXARRAY, SELECT etc.) */
-                            elseif (is_string($v)){
-                                switch ($form["tabs"]["limits"]["fields"][$k]['formtype']){
-                                case 'CHECKBOXARRAY':
-                                    if (!isset($limits[$k])){
-                                        $limits[$k] = array();
-                                    }
-
-                                    $limits_values = $limits[$k];
-                                    if (is_string($limits[$k])){
-                                        $limits_values = explode($form["tabs"]["limits"]["fields"][$k]["separator"],$limits[$k]);
-                                    }
-                                    $additional_values = explode($form["tabs"]["limits"]["fields"][$k]["separator"],$v);
-                                    $app->log('Template processing key ' . $k . ' type CHECKBOXARRAY, lim / add: ' . implode(',', $limits_values) . ' / ' . implode(',', $additional_values) . ' for client ' . $clientId, LOGLEVEL_DEBUG);
-                                    /* unification of limits_values (master template) and additional_values (additional template) */
-                                    $limits_unified = array();
-                                    foreach($form["tabs"]["limits"]["fields"][$k]["value"] as $key => $val){
-                                        if (in_array($key,$limits_values) || in_array($key,$additional_values)) $limits_unified[] = $key;
-                                    }
-                                    $limits[$k] = implode($form["tabs"]["limits"]["fields"][$k]["separator"],$limits_unified);
-                                break;
-                                case 'CHECKBOX':
-                                    if($k == 'force_suexec') {
-                                        // 'n' is less limited than y
-                                        if (!isset($limits[$k])){
-                                            $limits[$k] = 'y';
-                                        }
-                                        if($limits[$k] == 'n' || $v == 'n') $limits[$k] = 'n';
-                                    } else {
-                                        // 'y' is less limited than n
-                                        if (!isset($limits[$k])){
-                                            $limits[$k] = 'n';
-                                        }
-                                        if($limits[$k] == 'y' || $v == 'y') $limits[$k] = 'y';
-                                    }
-                                break;
-                                case 'SELECT':
-                                    $limit_values = array_keys($form["tabs"]["limits"]["fields"][$k]["value"]);
-                                    /* choose the lower index of the two SELECT items */
-                                    $limits[$k] = $limit_values[min(array_search($limits[$k], $limit_values), array_search($v, $limit_values))];
-                                break;
+                        }
+                        /* process the string limits (CHECKBOXARRAY, SELECT etc.) */
+                        elseif (is_string($v)){
+                            switch ($form["tabs"]["limits"]["fields"][$k]['formtype']){
+                            case 'CHECKBOXARRAY':
+                                if (!isset($limits[$k])){
+                                    $limits[$k] = array();
                                 }
+
+                                $limits_values = $limits[$k];
+                                if (is_string($limits[$k])){
+                                    $limits_values = explode($form["tabs"]["limits"]["fields"][$k]["separator"],$limits[$k]);
+                                }
+                                $additional_values = explode($form["tabs"]["limits"]["fields"][$k]["separator"],$v);
+                                $app->log('Template processing key ' . $k . ' type CHECKBOXARRAY, lim / add: ' . implode(',', $limits_values) . ' / ' . implode(',', $additional_values) . ' for client ' . $clientId, LOGLEVEL_DEBUG);
+                                /* unification of limits_values (master template) and additional_values (additional template) */
+                                $limits_unified = array();
+                                foreach($form["tabs"]["limits"]["fields"][$k]["value"] as $key => $val){
+                                    if (in_array($key,$limits_values) || in_array($key,$additional_values)) $limits_unified[] = $key;
+                                }
+                                $limits[$k] = implode($form["tabs"]["limits"]["fields"][$k]["separator"],$limits_unified);
+                            break;
+                            case 'CHECKBOX':
+                                if($k == 'force_suexec') {
+                                    // 'n' is less limited than y
+                                    if (!isset($limits[$k])){
+                                        $limits[$k] = 'y';
+                                    }
+                                    if($limits[$k] == 'n' || $v == 'n') $limits[$k] = 'n';
+                                } else {
+                                    // 'y' is less limited than n
+                                    if (!isset($limits[$k])){
+                                        $limits[$k] = 'n';
+                                    }
+                                    if($limits[$k] == 'y' || $v == 'y') $limits[$k] = 'y';
+                                }
+                            break;
+                            case 'SELECT':
+                                $limit_values = array_keys($form["tabs"]["limits"]["fields"][$k]["value"]);
+                                /* choose the lower index of the two SELECT items */
+                                $limits[$k] = $limit_values[min(array_search($limits[$k], $limit_values), array_search($v, $limit_values))];
+                            break;
                             }
                         }
                     }
diff --git a/interface/lib/classes/listform.inc.php b/interface/lib/classes/listform.inc.php
index b3a59e9..197c406 100644
--- a/interface/lib/classes/listform.inc.php
+++ b/interface/lib/classes/listform.inc.php
@@ -193,11 +193,15 @@
     public function getPagingSQL($sql_where = '1') 
     {
         global $app, $conf;
-        
-        //* Add Global Limit from selectbox
-        if(!empty($_POST['search_limit']) AND $app->functions->intval($_POST['search_limit'])){
+		
+		//* Add Global Limit from selectbox
+        if(!empty($_POST['search_limit']) AND $app->functions->intval($_POST['search_limit']) > 0){
 			$_SESSION['search']['limit'] = $app->functions->intval($_POST['search_limit']);
 		}
+		
+		if(preg_match('{^[0-9]$}',$_SESSION['search']['limit'])){
+			$_SESSION['search']['limit'] = 15;
+		}
 
         //* Get Config variables
         $list_name          = $this->listDef['name'];
diff --git a/interface/lib/classes/plugin_backuplist.inc.php b/interface/lib/classes/plugin_backuplist.inc.php
index ad567b2..2e0fdc5 100644
--- a/interface/lib/classes/plugin_backuplist.inc.php
+++ b/interface/lib/classes/plugin_backuplist.inc.php
@@ -55,6 +55,12 @@
 				if(isset($_GET['backup_action'])) {
 					$backup_id = $app->functions->intval($_GET['backup_id']);
 					
+					//* check if the user is  owner of the parent domain
+					$domain_backup = $app->db->queryOneRecord("SELECT parent_domain_id FROM web_backup WHERE backup_id = ".$backup_id);
+					if(!$app->tform->checkOwnerPermisssions($this->dataRecord["parent_domain_id"])){
+						$app->error($app->tform->lng('no_domain_perm'));
+					}
+					
 					if($_GET['backup_action'] == 'download' && $backup_id > 0) {
 						$sql = "SELECT count(action_id) as number FROM sys_remoteaction WHERE action_state = 'pending' AND action_type = 'backup_download' AND action_param = '$backup_id'";
 						$tmp = $app->db->queryOneRecord($sql);
diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php
index 66ba90d..55759f4 100644
--- a/interface/lib/classes/remoting.inc.php
+++ b/interface/lib/classes/remoting.inc.php
@@ -1103,7 +1103,40 @@
 		}
 		$app->uses('remoting_lib');
 		$app->remoting_lib->loadFormDef('../client/form/client.tform.php');
-		return $app->remoting_lib->getDataRecord($client_id);
+		$data = $app->remoting_lib->getDataRecord($client_id);
+        
+        // we need to get the new-style templates for backwards-compatibility - maybe we remove this in a later version
+        if(is_array($data) && count($data) > 0) {
+            if(isset($data['client_id'])) {
+                // this is a single record
+                if($data['template_additional'] == '') {
+                    $tpls = $app->db->queryAllRecords('SELECT CONCAT(`assigned_template_id`, \':\', `client_template_id`) as `item` FROM `client_template_assigned` WHERE `client_id` = ' . $data['client_id']);
+                    $tpl_arr = array();
+                    if($tpls) {
+                        foreach($tpls as $tpl) $tpl_arr[] = $tpl['item'];
+                    }
+                    $data['template_additional'] = implode('/', $tpl_arr);
+                    unset($tpl_arr);
+                    unset($tpls);
+                }
+            } elseif(isset($data[0]['client_id'])) {
+                // multiple client records
+                foreach($data as $index => $client) {
+                    if($client['template_additional'] == '') {
+                        $tpls = $app->db->queryAllRecords('SELECT CONCAT(`assigned_template_id`, \':\', `client_template_id`) as `item` FROM `client_template_assigned` WHERE `client_id` = ' . $client['client_id']);
+                        $tpl_arr = array();
+                        if($tpls) {
+                            foreach($tpls as $tpl) $tpl_arr[] = $tpl['item'];
+                        }
+                        $data[$index]['template_additional'] = implode('/', $tpl_arr); // dont use the $client array here - changes would not be returned to soap
+                    }
+                    unset($tpl_arr);
+                    unset($tpls);
+                }
+            }
+        }
+        
+        return $data;
 	}
 	
 	public function client_get_id($session_id, $sys_userid)
@@ -1169,6 +1202,33 @@
 					$this->server->fault('permission_denied','You do not have the permissions to access this function.');
 					return false;
 			}
+            
+            $app->uses('remoting_lib');
+            $app->remoting_lib->loadFormDef('../client/form/' . (isset($params['limit_client']) && $params['limit_client'] > 0 ? 'reseller' : 'client') . '.tform.php');
+            $old_rec = $app->remoting_lib->getDataRecord($client_id);
+            
+            // we need the previuos templates assigned here
+            $this->oldTemplatesAssigned = $app->db->queryAllRecords('SELECT * FROM `client_template_assigned` WHERE `client_id` = ' . $client_id);
+            if(!is_array($this->oldTemplatesAssigned) || count($this->oldTemplatesAssigned) < 1) {
+                // check previous type of storing templates
+                $tpls = explode('/', $old_rec['template_additional']);
+                $this->oldTemplatesAssigned = array();
+                foreach($tpls as $item) {
+                    $item = trim($item);
+                    if(!$item) continue;
+                    $this->oldTemplatesAssigned[] = array('assigned_template_id' => 0, 'client_template_id' => $item, 'client_id' => $client_id);
+                }
+                unset($tpls);
+            }
+            if(isset($params['template_additional'])) {
+                $app->uses('client_templates');
+                $templates = explode('/', $params['template_additional']);
+                $params['template_additional'] = '';
+                $app->client_templates->update_client_templates($client_id, $templates);
+                unset($templates);
+            }
+
+            
             if(!isset($params['parent_client_id']) || $params['parent_client_id'] == 0) $params['parent_client_id'] = $reseller_id;
 			$affected_rows = $this->updateQuery('../client/form/' . (isset($params['limit_client']) && $params['limit_client'] > 0 ? 'reseller' : 'client') . '.tform.php', $reseller_id, $client_id, $params, 'client:' . ($reseller_id ? 'reseller' : 'client') . ':on_after_update');
 			
@@ -1176,7 +1236,120 @@
 			
 			return $affected_rows;
 	}
+    
+    public function client_template_additional_get($session_id, $client_id) {
+        global $app;
 
+		if(!$this->checkPerm($session_id, 'client_get')) {
+			$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
+			return false;
+		}
+        
+        if(@is_numeric($client_id)) {
+            $sql = "SELECT * FROM `client_template_assigned` WHERE `client_id` = ".$client_id;
+            return $app->db->queryOneRecord($sql);
+        } else {
+            $this->server->fault('The ID must be an integer.');
+            return array();
+        }
+    }
+    
+    private function _set_client_formdata($client_id) {
+        global $app;
+        
+        $this->id = $client_id;
+        $this->dataRecord = $app->db->queryOneRecord('SELECT * FROM `client` WHERE `client_id` = ' . $client_id);
+        $this->oldDataRecord = $this->dataRecord;
+        
+        $this->oldTemplatesAssigned = $app->db->queryAllRecords('SELECT * FROM `client_template_assigned` WHERE `client_id` = ' . $client_id);
+        if(!is_array($this->oldTemplatesAssigned) || count($this->oldTemplatesAssigned) < 1) {
+            // check previous type of storing templates
+            $tpls = explode('/', $this->oldDataRecord['template_additional']);
+            $this->oldTemplatesAssigned = array();
+            foreach($tpls as $item) {
+                $item = trim($item);
+                if(!$item) continue;
+                $this->oldTemplatesAssigned[] = array('assigned_template_id' => 0, 'client_template_id' => $item, 'client_id' => $client_id);
+            }
+            unset($tpls);
+        }
+    }
+    
+    public function client_template_additional_add($session_id, $client_id, $template_id) {
+        global $app;
+        
+		if(!$this->checkPerm($session_id, 'client_update')) {
+			$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
+			return false;
+		}
+        
+        if(@is_numeric($client_id) && @is_numeric($template_id)) {
+            // check if client exists
+            $check = $app->db->queryOneRecord('SELECT `client_id` FROM `client` WHERE `client_id` = ' . $client_id);
+            if(!$check) {
+                $this->server->fault('Invalid client');
+                return false;
+            }
+            // check if template exists
+            $check = $app->db->queryOneRecord('SELECT `template_id` FROM `client_template` WHERE `template_id` = ' . $template_id);
+            if(!$check) {
+                $this->server->fault('Invalid template');
+                return false;
+            }
+            
+            // for the update event we have to cheat a bit
+            $this->_set_client_formdata($client_id);
+            
+            $sql = "INSERT INTO `client_template_assigned` (`client_id`, `client_template_id`) VALUES (" . $client_id . ", " . $template_id . ")";
+            $app->db->query($sql);
+            $insert_id = $app->db->insertID();
+            
+            $app->plugin->raiseEvent('client:client:on_after_update',$this);
+            
+            return $insert_id;
+        } else {
+            $this->server->fault('The IDs must be of type integer.');
+            return false;
+        }
+    }
+
+    public function client_template_additional_delete($session_id, $client_id, $assigned_template_id) {
+        global $app;
+        
+		if(!$this->checkPerm($session_id, 'client_update')) {
+			$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
+			return false;
+		}
+        
+        if(@is_numeric($client_id) && @is_numeric($template_id)) {
+            // check if client exists
+            $check = $app->db->queryOneRecord('SELECT `client_id` FROM `client` WHERE `client_id` = ' . $client_id);
+            if(!$check) {
+                $this->server->fault('Invalid client');
+                return false;
+            }
+            // check if template exists
+            $check = $app->db->queryOneRecord('SELECT `assigned_template_id` FROM `client_template_assigned` WHERE `assigned_template_id` = ' . $assigned_template_id);
+            if(!$check) {
+                $this->server->fault('Invalid template');
+                return false;
+            }
+            
+            // for the update event we have to cheat a bit
+            $this->_set_client_formdata($client_id);
+            
+            $sql = "DELETE FROM `client_template_assigned` WHERE `assigned_template_id` = " . $template_id . " AND `client_id` = " . $client_id;
+            $app->db->query($sql);
+            $affected_rows = $app->db->affectedRows();
+            
+            $app->plugin->raiseEvent('client:client:on_after_update',$this);
+            
+            return $affected_rows;
+        } else {
+            $this->server->fault('The IDs must be of type integer.');
+            return false;
+        }
+    }
 
 	public function client_delete($session_id,$client_id)
 	{
diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php
index f9cf59d..0c40a86 100644
--- a/interface/lib/classes/remoting_lib.inc.php
+++ b/interface/lib/classes/remoting_lib.inc.php
@@ -133,6 +133,8 @@
 				}
 			}
 			unset($form);
+			
+			$this->dateformat = $app->lng('conf_format_dateshort');
 				
             return true;
         }
diff --git a/interface/lib/classes/tform.inc.php b/interface/lib/classes/tform.inc.php
index d1fd373..f4ea0d7 100644
--- a/interface/lib/classes/tform.inc.php
+++ b/interface/lib/classes/tform.inc.php
@@ -552,9 +552,10 @@
 												$new_record[$key] = $out;
 										break;
 
-								case 'PASSWORD':
-										$new_record[$key] = '';
-								break;
+                                case 'PASSWORD':
+                                        //$new_record[$key] = '';
+										$new_record[$key] = htmlspecialchars($field['default']);
+                                break;
 
 								case 'CHECKBOX':
 										// $checked = (empty($field["default"]))?'':' CHECKED';
@@ -1257,7 +1258,7 @@
 		function getDataRecord($primary_id) {
 			global $app;
 			$escape = '`';
-			$sql = "SELECT * FROM ".$escape.$this->formDef['db_table'].$escape." WHERE ".$this->formDef['db_table_idx']." = ".$primary_id;
+			$sql = "SELECT * FROM ".$escape.$this->formDef['db_table'].$escape." WHERE ".$this->formDef['db_table_idx']." = ".$primary_id." AND ".$this->getAuthSQL('r',$this->formDef['db_table']);
 			return $app->db->queryOneRecord($sql);
 		}
 
@@ -1267,7 +1268,7 @@
 
 				$app->db->datalogSave($this->formDef['db_table'], $action, $this->formDef['db_table_idx'], $primary_id, $record_old, $record_new);
 				return true;
-
+<<<<<<< .mine
 				/*
 				// Add backticks for incomplete table names.
 				if(stristr($this->formDef['db_table'],'.')) {
@@ -1331,7 +1332,7 @@
 				return true;
 				*/
 
-		}
+=======>>>>>>> .theirs		}
 
 		function getAuthSQL($perm, $table = '') {
 				if($_SESSION["s"]["user"]["typ"] == 'admin') {
diff --git a/interface/lib/classes/tree.inc.php b/interface/lib/classes/tree.inc.php
index a2bdfd2..dcc2d61 100644
--- a/interface/lib/classes/tree.inc.php
+++ b/interface/lib/classes/tree.inc.php
@@ -147,14 +147,14 @@
     
     function deltree($tree_id) {
     	// lösche Einträge recursiv
-    	$this->_deltree_recurse(&$this->obj[$this->root_id],$tree_id, 0);
+    	$this->_deltree_recurse($this->obj[$this->root_id],$tree_id, 0);
     }
     
     /*
     	Hilfsfunktion für deltree
     */
     
-    function _deltree_recurse($myobj,$tree_id,$delete) {
+    function _deltree_recurse(&$myobj,$tree_id,$delete) {
 		if(is_array($myobj->childs)) {
             foreach($myobj->childs as $val) {
             	
@@ -164,7 +164,7 @@
                 }
                 
                 // recurse durch Objekte
-            	$this->_deltree_recurse(&$val,$tree_id,$delete);
+            	$this->_deltree_recurse($val,$tree_id,$delete);
                 
                 // lösche Eintrag
                 if($delete == 1) {
diff --git a/interface/lib/lang/ar.lng b/interface/lib/lang/ar.lng
index a49f6fb..8bea2ec 100644
--- a/interface/lib/lang/ar.lng
+++ b/interface/lib/lang/ar.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
 $wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
 $wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/lib/lang/bg.lng b/interface/lib/lang/bg.lng
index 8b15a9a..2887017 100644
--- a/interface/lib/lang/bg.lng
+++ b/interface/lib/lang/bg.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
 $wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
 $wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/lib/lang/br.lng b/interface/lib/lang/br.lng
index ae65e87..0caeef4 100644
--- a/interface/lib/lang/br.lng
+++ b/interface/lib/lang/br.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
 $wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
 $wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/lib/lang/cz.lng b/interface/lib/lang/cz.lng
index 4bff9bc..0c30719 100644
--- a/interface/lib/lang/cz.lng
+++ b/interface/lib/lang/cz.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_web_folder_user'] = 'Aktualizace nastavení uživatele pro adresáře chráněné heslem';
 $wb['datalog_status_d_web_folder_user'] = 'Odstranění uživatele pro adresáře chráněné heslem';
 $wb['login_as_txt'] = 'Přihlaste se jako';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/lib/lang/de.lng b/interface/lib/lang/de.lng
index 56b1c1b..328b520 100644
--- a/interface/lib/lang/de.lng
+++ b/interface/lib/lang/de.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_web_folder_user'] = 'Verzeichnisschutz Benutzer ändern';
 $wb['datalog_status_d_web_folder_user'] = 'Verzeichnisschutz Benutzer löschen';
 $wb['login_as_txt'] = 'Anmelden als';
+$wb['no_domain_perm'] = 'Sie haben keine Berechtigung für diese Domain.';
+$wb['no_destination_perm'] = 'Sie haben keine Berechtigung für dieses Ziel.';
 ?>
diff --git a/interface/lib/lang/el.lng b/interface/lib/lang/el.lng
index a85327d..b633c1b 100644
--- a/interface/lib/lang/el.lng
+++ b/interface/lib/lang/el.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
 $wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
 $wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/lib/lang/en.lng b/interface/lib/lang/en.lng
index 60e9bd3..47b6115 100644
--- a/interface/lib/lang/en.lng
+++ b/interface/lib/lang/en.lng
@@ -133,4 +133,6 @@
 $wb['datalog_status_d_web_folder_user'] = 'Delete folder protection user';
 
 $wb['login_as_txt'] = 'Log in as';
+$wb["no_domain_perm"] = 'You have no permission for this domain.';
+$wb["no_destination_perm"] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/lib/lang/es.lng b/interface/lib/lang/es.lng
index 619ae97..8d79fb9 100644
--- a/interface/lib/lang/es.lng
+++ b/interface/lib/lang/es.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_web_folder_user'] = 'Update folder protection user';
 $wb['datalog_status_d_web_folder_user'] = 'Delete folder protection user';
 $wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/lib/lang/fi.lng b/interface/lib/lang/fi.lng
index 9b89ed1..01d89e2 100755
--- a/interface/lib/lang/fi.lng
+++ b/interface/lib/lang/fi.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
 $wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
 $wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/lib/lang/fr.lng b/interface/lib/lang/fr.lng
index c611a6a..ff5f9ff 100644
--- a/interface/lib/lang/fr.lng
+++ b/interface/lib/lang/fr.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_web_folder_user'] = 'Update folder protection user';
 $wb['datalog_status_d_web_folder_user'] = 'Delete folder protection user';
 $wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/lib/lang/hr.lng b/interface/lib/lang/hr.lng
index 8ba16f1..903e727 100644
--- a/interface/lib/lang/hr.lng
+++ b/interface/lib/lang/hr.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
 $wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
 $wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/lib/lang/hu.lng b/interface/lib/lang/hu.lng
index 7ed92c5..da03022 100644
--- a/interface/lib/lang/hu.lng
+++ b/interface/lib/lang/hu.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
 $wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
 $wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/lib/lang/id.lng b/interface/lib/lang/id.lng
index 6313b8f..83383e0 100644
--- a/interface/lib/lang/id.lng
+++ b/interface/lib/lang/id.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
 $wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
 $wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/lib/lang/it.lng b/interface/lib/lang/it.lng
index 4f05227..a64b252 100644
--- a/interface/lib/lang/it.lng
+++ b/interface/lib/lang/it.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
 $wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
 $wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/lib/lang/ja.lng b/interface/lib/lang/ja.lng
index e849369..df33aa8 100644
--- a/interface/lib/lang/ja.lng
+++ b/interface/lib/lang/ja.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
 $wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
 $wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/lib/lang/nl.lng b/interface/lib/lang/nl.lng
index d0d8d9e..459de7f 100644
--- a/interface/lib/lang/nl.lng
+++ b/interface/lib/lang/nl.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
 $wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
 $wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/lib/lang/pl.lng b/interface/lib/lang/pl.lng
index 7374ab6..3383661 100644
--- a/interface/lib/lang/pl.lng
+++ b/interface/lib/lang/pl.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_web_folder_user'] = 'Edytuj konto zabezpieczonego folderu';
 $wb['datalog_status_d_web_folder_user'] = 'Usuń konto zabezpieczonego folderu';
 $wb['login_as_txt'] = 'Zaloguj jako';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/lib/lang/pt.lng b/interface/lib/lang/pt.lng
index cb16283..bc4a99c 100644
--- a/interface/lib/lang/pt.lng
+++ b/interface/lib/lang/pt.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
 $wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
 $wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/lib/lang/ro.lng b/interface/lib/lang/ro.lng
index c30a9b7..7c54cd2 100644
--- a/interface/lib/lang/ro.lng
+++ b/interface/lib/lang/ro.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
 $wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
 $wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/lib/lang/ru.lng b/interface/lib/lang/ru.lng
index 0396224..07a8118 100644
--- a/interface/lib/lang/ru.lng
+++ b/interface/lib/lang/ru.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
 $wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
 $wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/lib/lang/se.lng b/interface/lib/lang/se.lng
index 712e415..8334a1f 100644
--- a/interface/lib/lang/se.lng
+++ b/interface/lib/lang/se.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
 $wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
 $wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/lib/lang/sk.lng b/interface/lib/lang/sk.lng
index 15923d2..1c87817 100644
--- a/interface/lib/lang/sk.lng
+++ b/interface/lib/lang/sk.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
 $wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
 $wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/lib/lang/tr.lng b/interface/lib/lang/tr.lng
index 55041ac..7122519 100644
--- a/interface/lib/lang/tr.lng
+++ b/interface/lib/lang/tr.lng
@@ -131,4 +131,6 @@
 $wb['datalog_status_u_spamfilter_users'] = 'Update spam filter settings';
 $wb['datalog_status_d_spamfilter_users'] = 'Delete spam filter settings';
 $wb['login_as_txt'] = 'Log in as';
+$wb['no_domain_perm'] = 'You have no permission for this domain.';
+$wb['no_destination_perm'] = 'You have no permission for this destination.';
 ?>
diff --git a/interface/web/admin/form/system_config.tform.php b/interface/web/admin/form/system_config.tform.php
index da67f6b..f09d4db 100644
--- a/interface/web/admin/form/system_config.tform.php
+++ b/interface/web/admin/form/system_config.tform.php
@@ -433,6 +433,42 @@
 			'default'	=> 'n',
 			'value'		=> array(0 => 'n',1 => 'y')
 		),
+		'admin_dashlets_left' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'TEXT',
+			'default'	=> '',
+			'value'		=> ''
+		),
+		'admin_dashlets_right' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'TEXT',
+			'default'	=> '',
+			'value'		=> ''
+		),
+		'reseller_dashlets_left' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'TEXT',
+			'default'	=> '',
+			'value'		=> ''
+		),
+		'reseller_dashlets_right' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'TEXT',
+			'default'	=> '',
+			'value'		=> ''
+		),
+		'client_dashlets_left' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'TEXT',
+			'default'	=> '',
+			'value'		=> ''
+		),
+		'client_dashlets_right' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'TEXT',
+			'default'	=> '',
+			'value'		=> ''
+		),
 	##################################
 	# ENDE Datatable fields
 	##################################
diff --git a/interface/web/admin/language_edit.php b/interface/web/admin/language_edit.php
index f16ea68..208f1ac 100644
--- a/interface/web/admin/language_edit.php
+++ b/interface/web/admin/language_edit.php
@@ -85,7 +85,7 @@
 $keyword_list = array();
 if(isset($wb) && is_array($wb)) {
 	foreach($wb as $key => $val) {
-		$keyword_list[] = array('key' => $key, 'val' => $val);
+		$keyword_list[] = array('key' => $key, 'val' => htmlentities($val));
 	}
 
 	$app->tpl->setLoop('records', $keyword_list);
diff --git a/interface/web/admin/lib/lang/ar_server_config.lng b/interface/web/admin/lib/lang/ar_server_config.lng
index 618b69e..1c21551 100644
--- a/interface/web/admin/lib/lang/ar_server_config.lng
+++ b/interface/web/admin/lib/lang/ar_server_config.lng
@@ -171,4 +171,21 @@
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/ar_software_package.lng b/interface/web/admin/lib/lang/ar_software_package.lng
new file mode 100644
index 0000000..62ef734
--- /dev/null
+++ b/interface/web/admin/lib/lang/ar_software_package.lng
@@ -0,0 +1,6 @@
+<?php
+$wb["package_title_txt"] = 'Package Title';
+$wb["package_key_txt"] = 'Package Key';
+$wb["Software Package"] = 'Software Package';
+$wb['Modify software package details'] = 'Modify software package details';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/ar_software_package_list.lng b/interface/web/admin/lib/lang/ar_software_package_list.lng
index 87b27fd..9fa5386 100644
--- a/interface/web/admin/lib/lang/ar_software_package_list.lng
+++ b/interface/web/admin/lib/lang/ar_software_package_list.lng
@@ -8,4 +8,6 @@
 $wb['repoupdate_txt'] = 'Update package list';
 $wb['package_id_txt'] = 'local App-ID';
 $wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
 ?>
diff --git a/interface/web/admin/lib/lang/ar_software_repo.lng b/interface/web/admin/lib/lang/ar_software_repo.lng
index 574dd11..f2cbbb2 100644
--- a/interface/web/admin/lib/lang/ar_software_repo.lng
+++ b/interface/web/admin/lib/lang/ar_software_repo.lng
@@ -4,4 +4,5 @@
 $wb['repo_username_txt'] = 'User (optional)';
 $wb['repo_password_txt'] = 'Password (optional)';
 $wb['active_txt'] = 'Active';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
 ?>
diff --git a/interface/web/admin/lib/lang/ar_system_config.lng b/interface/web/admin/lib/lang/ar_system_config.lng
index 1cc07ec..11604d3 100644
--- a/interface/web/admin/lib/lang/ar_system_config.lng
+++ b/interface/web/admin/lib/lang/ar_system_config.lng
@@ -49,4 +49,7 @@
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/bg_server_config.lng b/interface/web/admin/lib/lang/bg_server_config.lng
index 18cae75..c050aad 100644
--- a/interface/web/admin/lib/lang/bg_server_config.lng
+++ b/interface/web/admin/lib/lang/bg_server_config.lng
@@ -171,4 +171,21 @@
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/bg_software_package.lng b/interface/web/admin/lib/lang/bg_software_package.lng
new file mode 100644
index 0000000..62ef734
--- /dev/null
+++ b/interface/web/admin/lib/lang/bg_software_package.lng
@@ -0,0 +1,6 @@
+<?php
+$wb["package_title_txt"] = 'Package Title';
+$wb["package_key_txt"] = 'Package Key';
+$wb["Software Package"] = 'Software Package';
+$wb['Modify software package details'] = 'Modify software package details';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/bg_software_package_list.lng b/interface/web/admin/lib/lang/bg_software_package_list.lng
index 6ff7b4a..e251c95 100644
--- a/interface/web/admin/lib/lang/bg_software_package_list.lng
+++ b/interface/web/admin/lib/lang/bg_software_package_list.lng
@@ -8,4 +8,6 @@
 $wb['repoupdate_txt'] = 'Обновяване на пакетите ';
 $wb['package_id_txt'] = 'local App-ID';
 $wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
 ?>
diff --git a/interface/web/admin/lib/lang/bg_software_repo.lng b/interface/web/admin/lib/lang/bg_software_repo.lng
index a69c741..f515654 100644
--- a/interface/web/admin/lib/lang/bg_software_repo.lng
+++ b/interface/web/admin/lib/lang/bg_software_repo.lng
@@ -4,4 +4,5 @@
 $wb['repo_username_txt'] = 'Потребител (не е задължително)';
 $wb['repo_password_txt'] = 'Парола (не е задължително)';
 $wb['active_txt'] = 'Активен';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
 ?>
diff --git a/interface/web/admin/lib/lang/bg_system_config.lng b/interface/web/admin/lib/lang/bg_system_config.lng
index b7b364b..e3c6678 100644
--- a/interface/web/admin/lib/lang/bg_system_config.lng
+++ b/interface/web/admin/lib/lang/bg_system_config.lng
@@ -49,4 +49,7 @@
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/br_server_config.lng b/interface/web/admin/lib/lang/br_server_config.lng
index 1f8e3f7..71288a9 100644
--- a/interface/web/admin/lib/lang/br_server_config.lng
+++ b/interface/web/admin/lib/lang/br_server_config.lng
@@ -171,4 +171,21 @@
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/br_software_package.lng b/interface/web/admin/lib/lang/br_software_package.lng
new file mode 100644
index 0000000..62ef734
--- /dev/null
+++ b/interface/web/admin/lib/lang/br_software_package.lng
@@ -0,0 +1,6 @@
+<?php
+$wb["package_title_txt"] = 'Package Title';
+$wb["package_key_txt"] = 'Package Key';
+$wb["Software Package"] = 'Software Package';
+$wb['Modify software package details'] = 'Modify software package details';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/br_software_package_list.lng b/interface/web/admin/lib/lang/br_software_package_list.lng
index 2adf5b8..fd4f41e 100644
--- a/interface/web/admin/lib/lang/br_software_package_list.lng
+++ b/interface/web/admin/lib/lang/br_software_package_list.lng
@@ -8,4 +8,6 @@
 $wb['repoupdate_txt'] = 'Update package list';
 $wb['package_id_txt'] = 'local App-ID';
 $wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
 ?>
diff --git a/interface/web/admin/lib/lang/br_software_repo.lng b/interface/web/admin/lib/lang/br_software_repo.lng
index 5b54c30..dc89937 100644
--- a/interface/web/admin/lib/lang/br_software_repo.lng
+++ b/interface/web/admin/lib/lang/br_software_repo.lng
@@ -4,4 +4,5 @@
 $wb['repo_username_txt'] = 'Usuário (opcional)';
 $wb['repo_password_txt'] = 'Senha (opcional)';
 $wb['active_txt'] = 'Ativo';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
 ?>
diff --git a/interface/web/admin/lib/lang/br_system_config.lng b/interface/web/admin/lib/lang/br_system_config.lng
index 76d2c06..3bc0172 100644
--- a/interface/web/admin/lib/lang/br_system_config.lng
+++ b/interface/web/admin/lib/lang/br_system_config.lng
@@ -49,4 +49,7 @@
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/cz_remote_action.lng b/interface/web/admin/lib/lang/cz_remote_action.lng
index 68da1c0..e1908e2 100644
--- a/interface/web/admin/lib/lang/cz_remote_action.lng
+++ b/interface/web/admin/lib/lang/cz_remote_action.lng
@@ -2,9 +2,9 @@
 $wb['select_server_txt'] = 'Zvolit server';
 $wb['btn_do_txt'] = 'Provést akci';
 $wb['do_osupdate_caption'] = 'Aktualizace operačního systému na vzdáleném serveru.';
-$wb['do_osupdate_desc'] = 'Tato akce provede \"aptitude -y\" aktualizaci na vybraném serveru.<br><br><strong>POUŽITÍ TÉTO AKCE NA VLASTNÍ NEBEZPEČÍ !</strong>';
+$wb['do_osupdate_desc'] = 'Tato akce provede \\"aptitude -y\\" aktualizaci na vybraném serveru.<br><br><strong>POUŽITÍ TÉTO AKCE NA VLASTNÍ NEBEZPEČÍ !</strong>';
 $wb['do_ispcupdate_caption'] = 'Provedení ISPConfig 3 - aktualizace na vzdáleném serveru';
-$wb['do_ispcupdate_desc'] = 'Tato akce provede \"ISPConfig 3\" aktualizaci na vašem vybraném serveru.<br><br><strong>POUŽITÍ TÉTO AKCE NA VLASTNÍ NEBEZPEČÍ !</strong>';
+$wb['do_ispcupdate_desc'] = 'Tato akce provede \\"ISPConfig 3\\" aktualizaci na vašem vybraném serveru.<br><br><strong>POUŽITÍ TÉTO AKCE NA VLASTNÍ NEBEZPEČÍ !</strong>';
 $wb['action_scheduled'] = 'Akce je naplánována na provedení';
 $wb['select_all_server'] = 'Všechny servery';
 $wb['ispconfig_update_title'] = 'ISPConfig pokyny k aktualizaci';
diff --git a/interface/web/admin/lib/lang/cz_server_config.lng b/interface/web/admin/lib/lang/cz_server_config.lng
index c0e4240..049da22 100644
--- a/interface/web/admin/lib/lang/cz_server_config.lng
+++ b/interface/web/admin/lib/lang/cz_server_config.lng
@@ -171,4 +171,21 @@
 $wb['overtraffic_notify_admin_txt'] = 'Při překročení limitu přenesených dat, poslat oznámení adminovi';
 $wb['overtraffic_notify_client_txt'] = 'Při překročení limitu přenesených dat, poslat oznámení klientovi';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/cz_software_package.lng b/interface/web/admin/lib/lang/cz_software_package.lng
new file mode 100644
index 0000000..62ef734
--- /dev/null
+++ b/interface/web/admin/lib/lang/cz_software_package.lng
@@ -0,0 +1,6 @@
+<?php
+$wb["package_title_txt"] = 'Package Title';
+$wb["package_key_txt"] = 'Package Key';
+$wb["Software Package"] = 'Software Package';
+$wb['Modify software package details'] = 'Modify software package details';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/cz_software_package_list.lng b/interface/web/admin/lib/lang/cz_software_package_list.lng
index 7df837f..9d227ac 100644
--- a/interface/web/admin/lib/lang/cz_software_package_list.lng
+++ b/interface/web/admin/lib/lang/cz_software_package_list.lng
@@ -8,4 +8,6 @@
 $wb['repoupdate_txt'] = 'Aktualizace seznamu balíků';
 $wb['package_id_txt'] = 'místní App-ID';
 $wb['no_packages_txt'] = 'Žádné balíčky nejsou k dispozici';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
 ?>
diff --git a/interface/web/admin/lib/lang/cz_software_repo.lng b/interface/web/admin/lib/lang/cz_software_repo.lng
index 64a190d..6e200d8 100644
--- a/interface/web/admin/lib/lang/cz_software_repo.lng
+++ b/interface/web/admin/lib/lang/cz_software_repo.lng
@@ -4,4 +4,5 @@
 $wb['repo_username_txt'] = 'Uživatel (volitelné)';
 $wb['repo_password_txt'] = 'Heslo (volitelné)';
 $wb['active_txt'] = 'Aktivní';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
 ?>
diff --git a/interface/web/admin/lib/lang/cz_system_config.lng b/interface/web/admin/lib/lang/cz_system_config.lng
index 8073830..167b933 100644
--- a/interface/web/admin/lib/lang/cz_system_config.lng
+++ b/interface/web/admin/lib/lang/cz_system_config.lng
@@ -49,4 +49,7 @@
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show Autoresponder tab in Mailbox detail';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show Mail Filter tab in Mailbox detail';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show Custom Rules tab in Mailbox detail';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/de_system_config.lng b/interface/web/admin/lib/lang/de_system_config.lng
index 163fa34..217b95d 100644
--- a/interface/web/admin/lib/lang/de_system_config.lng
+++ b/interface/web/admin/lib/lang/de_system_config.lng
@@ -52,4 +52,11 @@
 $wb['reseller_can_use_options_txt'] = 'Reseller können den Optionen Reiter bei Webseiten verwenden';
 $wb['phpmyadmin_url_note_txt'] = 'Platzhalter:';
 $wb['webmail_url_note_txt'] = 'Platzhalter:';
+$wb['available_dashlets_note_txt'] = 'Verfügbare Dashlets:';
+$wb['admin_dashlets_left_txt'] = 'Admin-Dashlets links';
+$wb['admin_dashlets_right_txt'] = 'Admin-Dashlets rechts';
+$wb['reseller_dashlets_left_txt'] = 'Reseller-Dashlets links';
+$wb['reseller_dashlets_right_txt'] = 'Reseller-Dashlets rechts';
+$wb['client_dashlets_left_txt'] = 'Kunden-Dashlets links';
+$wb['client_dashlets_right_txt'] = 'Kunden-Dashlets rechts';
 ?>
diff --git a/interface/web/admin/lib/lang/el_server_config.lng b/interface/web/admin/lib/lang/el_server_config.lng
index b9913e6..99bdf6f 100644
--- a/interface/web/admin/lib/lang/el_server_config.lng
+++ b/interface/web/admin/lib/lang/el_server_config.lng
@@ -171,4 +171,21 @@
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/el_software_package.lng b/interface/web/admin/lib/lang/el_software_package.lng
new file mode 100644
index 0000000..62ef734
--- /dev/null
+++ b/interface/web/admin/lib/lang/el_software_package.lng
@@ -0,0 +1,6 @@
+<?php
+$wb["package_title_txt"] = 'Package Title';
+$wb["package_key_txt"] = 'Package Key';
+$wb["Software Package"] = 'Software Package';
+$wb['Modify software package details'] = 'Modify software package details';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/el_software_package_list.lng b/interface/web/admin/lib/lang/el_software_package_list.lng
index 1528928..1553ea1 100644
--- a/interface/web/admin/lib/lang/el_software_package_list.lng
+++ b/interface/web/admin/lib/lang/el_software_package_list.lng
@@ -8,4 +8,6 @@
 $wb['repoupdate_txt'] = 'Ενημέρωση λίστας πακκέτων';
 $wb['package_id_txt'] = 'τοπικό App-ID';
 $wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
 ?>
diff --git a/interface/web/admin/lib/lang/el_software_repo.lng b/interface/web/admin/lib/lang/el_software_repo.lng
index 5b1e222..3b12d3f 100644
--- a/interface/web/admin/lib/lang/el_software_repo.lng
+++ b/interface/web/admin/lib/lang/el_software_repo.lng
@@ -4,4 +4,5 @@
 $wb['repo_username_txt'] = 'Χρήστης (Προαιρετικό)';
 $wb['repo_password_txt'] = 'Συνθηματικό (Προαιρετικό)';
 $wb['active_txt'] = 'Ενεργό';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
 ?>
diff --git a/interface/web/admin/lib/lang/el_system_config.lng b/interface/web/admin/lib/lang/el_system_config.lng
index d85a083..f69e58a 100644
--- a/interface/web/admin/lib/lang/el_system_config.lng
+++ b/interface/web/admin/lib/lang/el_system_config.lng
@@ -49,4 +49,7 @@
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/en_system_config.lng b/interface/web/admin/lib/lang/en_system_config.lng
index 2edd543..7c5fe6e 100644
--- a/interface/web/admin/lib/lang/en_system_config.lng
+++ b/interface/web/admin/lib/lang/en_system_config.lng
@@ -55,4 +55,11 @@
 $wb['webmail_url_error_regex'] = 'Invalid webmail URL';
 $wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
 $wb['webmail_url_note_txt'] = 'Placeholder:';
+$wb['available_dashlets_note_txt'] = 'Available Dashlets:';
+$wb['admin_dashlets_left_txt'] = 'Left Admin Dashlets';
+$wb['admin_dashlets_right_txt'] = 'Right Admin Dashlets';
+$wb['reseller_dashlets_left_txt'] = 'Left Reseller Dashlets';
+$wb['reseller_dashlets_right_txt'] = 'Right Reseller Dashlets';
+$wb['client_dashlets_left_txt'] = 'Left Client Dashlets';
+$wb['client_dashlets_right_txt'] = 'Right Client Dashlets';
 ?>
diff --git a/interface/web/admin/lib/lang/es_server_config.lng b/interface/web/admin/lib/lang/es_server_config.lng
index 92d9b45..1987c51 100644
--- a/interface/web/admin/lib/lang/es_server_config.lng
+++ b/interface/web/admin/lib/lang/es_server_config.lng
@@ -171,4 +171,21 @@
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/es_software_package.lng b/interface/web/admin/lib/lang/es_software_package.lng
new file mode 100644
index 0000000..62ef734
--- /dev/null
+++ b/interface/web/admin/lib/lang/es_software_package.lng
@@ -0,0 +1,6 @@
+<?php
+$wb["package_title_txt"] = 'Package Title';
+$wb["package_key_txt"] = 'Package Key';
+$wb["Software Package"] = 'Software Package';
+$wb['Modify software package details'] = 'Modify software package details';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/es_software_package_list.lng b/interface/web/admin/lib/lang/es_software_package_list.lng
index 1032609..3986ef8 100644
--- a/interface/web/admin/lib/lang/es_software_package_list.lng
+++ b/interface/web/admin/lib/lang/es_software_package_list.lng
@@ -8,4 +8,6 @@
 $wb['repoupdate_txt'] = 'Update package list';
 $wb['package_id_txt'] = 'local App-ID';
 $wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
 ?>
diff --git a/interface/web/admin/lib/lang/es_software_repo.lng b/interface/web/admin/lib/lang/es_software_repo.lng
index 3b9a89e..b8487cf 100644
--- a/interface/web/admin/lib/lang/es_software_repo.lng
+++ b/interface/web/admin/lib/lang/es_software_repo.lng
@@ -4,4 +4,5 @@
 $wb['repo_username_txt'] = 'Usuario (opcional)';
 $wb['repo_password_txt'] = 'Contraseña (opcional)';
 $wb['active_txt'] = 'Activar';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
 ?>
diff --git a/interface/web/admin/lib/lang/es_system_config.lng b/interface/web/admin/lib/lang/es_system_config.lng
index f4ed53c..118a0df 100644
--- a/interface/web/admin/lib/lang/es_system_config.lng
+++ b/interface/web/admin/lib/lang/es_system_config.lng
@@ -49,4 +49,7 @@
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/fi_server_config.lng b/interface/web/admin/lib/lang/fi_server_config.lng
index 0bddcc7..efa1220 100755
--- a/interface/web/admin/lib/lang/fi_server_config.lng
+++ b/interface/web/admin/lib/lang/fi_server_config.lng
@@ -171,4 +171,21 @@
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/fi_software_package.lng b/interface/web/admin/lib/lang/fi_software_package.lng
new file mode 100644
index 0000000..62ef734
--- /dev/null
+++ b/interface/web/admin/lib/lang/fi_software_package.lng
@@ -0,0 +1,6 @@
+<?php
+$wb["package_title_txt"] = 'Package Title';
+$wb["package_key_txt"] = 'Package Key';
+$wb["Software Package"] = 'Software Package';
+$wb['Modify software package details'] = 'Modify software package details';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/fi_software_package_list.lng b/interface/web/admin/lib/lang/fi_software_package_list.lng
index 85e31f9..87a9e19 100755
--- a/interface/web/admin/lib/lang/fi_software_package_list.lng
+++ b/interface/web/admin/lib/lang/fi_software_package_list.lng
@@ -8,4 +8,6 @@
 $wb['repoupdate_txt'] = 'Update package list';
 $wb['package_id_txt'] = 'local App-ID';
 $wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
 ?>
diff --git a/interface/web/admin/lib/lang/fi_software_repo.lng b/interface/web/admin/lib/lang/fi_software_repo.lng
index c899694..f875f42 100755
--- a/interface/web/admin/lib/lang/fi_software_repo.lng
+++ b/interface/web/admin/lib/lang/fi_software_repo.lng
@@ -4,4 +4,5 @@
 $wb['repo_username_txt'] = 'Käyttäjätunnus (valinnainen)';
 $wb['repo_password_txt'] = 'Salasana (valinnnainen)';
 $wb['active_txt'] = 'Käytössä';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
 ?>
diff --git a/interface/web/admin/lib/lang/fi_system_config.lng b/interface/web/admin/lib/lang/fi_system_config.lng
index 1ed3935..c2c1dab 100755
--- a/interface/web/admin/lib/lang/fi_system_config.lng
+++ b/interface/web/admin/lib/lang/fi_system_config.lng
@@ -49,4 +49,7 @@
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/fr_server_config.lng b/interface/web/admin/lib/lang/fr_server_config.lng
index c74d89e..eabca44 100644
--- a/interface/web/admin/lib/lang/fr_server_config.lng
+++ b/interface/web/admin/lib/lang/fr_server_config.lng
@@ -171,4 +171,21 @@
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/fr_software_package.lng b/interface/web/admin/lib/lang/fr_software_package.lng
new file mode 100644
index 0000000..62ef734
--- /dev/null
+++ b/interface/web/admin/lib/lang/fr_software_package.lng
@@ -0,0 +1,6 @@
+<?php
+$wb["package_title_txt"] = 'Package Title';
+$wb["package_key_txt"] = 'Package Key';
+$wb["Software Package"] = 'Software Package';
+$wb['Modify software package details'] = 'Modify software package details';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/fr_software_package_list.lng b/interface/web/admin/lib/lang/fr_software_package_list.lng
index d6e1d14..405b9e2 100644
--- a/interface/web/admin/lib/lang/fr_software_package_list.lng
+++ b/interface/web/admin/lib/lang/fr_software_package_list.lng
@@ -8,4 +8,6 @@
 $wb['repoupdate_txt'] = 'Mettre à jour la liste des paquets';
 $wb['package_id_txt'] = 'App-ID locale';
 $wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
 ?>
diff --git a/interface/web/admin/lib/lang/fr_software_repo.lng b/interface/web/admin/lib/lang/fr_software_repo.lng
index 7b3ec48..f65c955 100644
--- a/interface/web/admin/lib/lang/fr_software_repo.lng
+++ b/interface/web/admin/lib/lang/fr_software_repo.lng
@@ -4,4 +4,5 @@
 $wb['repo_username_txt'] = 'Utilisateur (optionnel)';
 $wb['repo_password_txt'] = 'Mot de passe (optionnel)';
 $wb['active_txt'] = 'Actif';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
 ?>
diff --git a/interface/web/admin/lib/lang/fr_system_config.lng b/interface/web/admin/lib/lang/fr_system_config.lng
index 7a404d6..561a5d7 100644
--- a/interface/web/admin/lib/lang/fr_system_config.lng
+++ b/interface/web/admin/lib/lang/fr_system_config.lng
@@ -49,4 +49,7 @@
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/hr_server_config.lng b/interface/web/admin/lib/lang/hr_server_config.lng
index 27168f2..a441f96 100644
--- a/interface/web/admin/lib/lang/hr_server_config.lng
+++ b/interface/web/admin/lib/lang/hr_server_config.lng
@@ -171,4 +171,21 @@
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/hr_software_package.lng b/interface/web/admin/lib/lang/hr_software_package.lng
new file mode 100644
index 0000000..62ef734
--- /dev/null
+++ b/interface/web/admin/lib/lang/hr_software_package.lng
@@ -0,0 +1,6 @@
+<?php
+$wb["package_title_txt"] = 'Package Title';
+$wb["package_key_txt"] = 'Package Key';
+$wb["Software Package"] = 'Software Package';
+$wb['Modify software package details'] = 'Modify software package details';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/hr_software_package_list.lng b/interface/web/admin/lib/lang/hr_software_package_list.lng
index 66ee959..8381110 100644
--- a/interface/web/admin/lib/lang/hr_software_package_list.lng
+++ b/interface/web/admin/lib/lang/hr_software_package_list.lng
@@ -8,4 +8,6 @@
 $wb['repoupdate_txt'] = 'Obnovi listu paketa';
 $wb['package_id_txt'] = 'lokalni App-ID';
 $wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
 ?>
diff --git a/interface/web/admin/lib/lang/hr_software_repo.lng b/interface/web/admin/lib/lang/hr_software_repo.lng
index 42064a1..bbfb2e2 100644
--- a/interface/web/admin/lib/lang/hr_software_repo.lng
+++ b/interface/web/admin/lib/lang/hr_software_repo.lng
@@ -4,4 +4,5 @@
 $wb['repo_username_txt'] = 'Korisničko ime (opcionalno)';
 $wb['repo_password_txt'] = 'Šifra (opcionalno)';
 $wb['active_txt'] = 'Aktivno';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
 ?>
diff --git a/interface/web/admin/lib/lang/hr_system_config.lng b/interface/web/admin/lib/lang/hr_system_config.lng
index 210a18b..2ff0cbc 100644
--- a/interface/web/admin/lib/lang/hr_system_config.lng
+++ b/interface/web/admin/lib/lang/hr_system_config.lng
@@ -49,4 +49,7 @@
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/hu_server_config.lng b/interface/web/admin/lib/lang/hu_server_config.lng
index 5349608..0be61ef 100644
--- a/interface/web/admin/lib/lang/hu_server_config.lng
+++ b/interface/web/admin/lib/lang/hu_server_config.lng
@@ -171,4 +171,21 @@
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/hu_software_package.lng b/interface/web/admin/lib/lang/hu_software_package.lng
new file mode 100644
index 0000000..62ef734
--- /dev/null
+++ b/interface/web/admin/lib/lang/hu_software_package.lng
@@ -0,0 +1,6 @@
+<?php
+$wb["package_title_txt"] = 'Package Title';
+$wb["package_key_txt"] = 'Package Key';
+$wb["Software Package"] = 'Software Package';
+$wb['Modify software package details'] = 'Modify software package details';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/hu_software_package_list.lng b/interface/web/admin/lib/lang/hu_software_package_list.lng
index d4749f0..430583c 100644
--- a/interface/web/admin/lib/lang/hu_software_package_list.lng
+++ b/interface/web/admin/lib/lang/hu_software_package_list.lng
@@ -8,4 +8,6 @@
 $wb['repoupdate_txt'] = 'Csomaglista frissítése';
 $wb['package_id_txt'] = 'local App-ID';
 $wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
 ?>
diff --git a/interface/web/admin/lib/lang/hu_software_repo.lng b/interface/web/admin/lib/lang/hu_software_repo.lng
index f05284f..3c578e3 100644
--- a/interface/web/admin/lib/lang/hu_software_repo.lng
+++ b/interface/web/admin/lib/lang/hu_software_repo.lng
@@ -4,4 +4,5 @@
 $wb['repo_username_txt'] = 'Felhasználó (opcionális)';
 $wb['repo_password_txt'] = 'Jelszó (opcionális)';
 $wb['active_txt'] = 'Aktív';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
 ?>
diff --git a/interface/web/admin/lib/lang/hu_system_config.lng b/interface/web/admin/lib/lang/hu_system_config.lng
index f18d12f..ee5f429 100644
--- a/interface/web/admin/lib/lang/hu_system_config.lng
+++ b/interface/web/admin/lib/lang/hu_system_config.lng
@@ -49,4 +49,7 @@
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/id_server_config.lng b/interface/web/admin/lib/lang/id_server_config.lng
index 39217c3..54a4493 100644
--- a/interface/web/admin/lib/lang/id_server_config.lng
+++ b/interface/web/admin/lib/lang/id_server_config.lng
@@ -171,4 +171,21 @@
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/id_software_package.lng b/interface/web/admin/lib/lang/id_software_package.lng
new file mode 100644
index 0000000..62ef734
--- /dev/null
+++ b/interface/web/admin/lib/lang/id_software_package.lng
@@ -0,0 +1,6 @@
+<?php
+$wb["package_title_txt"] = 'Package Title';
+$wb["package_key_txt"] = 'Package Key';
+$wb["Software Package"] = 'Software Package';
+$wb['Modify software package details'] = 'Modify software package details';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/id_software_package_list.lng b/interface/web/admin/lib/lang/id_software_package_list.lng
index a7e4987..02642be 100644
--- a/interface/web/admin/lib/lang/id_software_package_list.lng
+++ b/interface/web/admin/lib/lang/id_software_package_list.lng
@@ -8,4 +8,6 @@
 $wb['repoupdate_txt'] = 'Mutakhirkan daftar paket';
 $wb['package_id_txt'] = 'App-ID lokal';
 $wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
 ?>
diff --git a/interface/web/admin/lib/lang/id_software_repo.lng b/interface/web/admin/lib/lang/id_software_repo.lng
index a5647bc..1c3b030 100644
--- a/interface/web/admin/lib/lang/id_software_repo.lng
+++ b/interface/web/admin/lib/lang/id_software_repo.lng
@@ -4,4 +4,5 @@
 $wb['repo_username_txt'] = 'Pengguna (opsional)';
 $wb['repo_password_txt'] = 'Sandi (opsional)';
 $wb['active_txt'] = 'Aktif';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
 ?>
diff --git a/interface/web/admin/lib/lang/id_system_config.lng b/interface/web/admin/lib/lang/id_system_config.lng
index c68bc67..ecbf3c7 100644
--- a/interface/web/admin/lib/lang/id_system_config.lng
+++ b/interface/web/admin/lib/lang/id_system_config.lng
@@ -49,4 +49,7 @@
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/it_server_config.lng b/interface/web/admin/lib/lang/it_server_config.lng
index 6bea4d2..d040768 100644
--- a/interface/web/admin/lib/lang/it_server_config.lng
+++ b/interface/web/admin/lib/lang/it_server_config.lng
@@ -171,4 +171,21 @@
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/it_software_package.lng b/interface/web/admin/lib/lang/it_software_package.lng
new file mode 100644
index 0000000..62ef734
--- /dev/null
+++ b/interface/web/admin/lib/lang/it_software_package.lng
@@ -0,0 +1,6 @@
+<?php
+$wb["package_title_txt"] = 'Package Title';
+$wb["package_key_txt"] = 'Package Key';
+$wb["Software Package"] = 'Software Package';
+$wb['Modify software package details'] = 'Modify software package details';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/it_software_package_list.lng b/interface/web/admin/lib/lang/it_software_package_list.lng
index 87b27fd..9fa5386 100644
--- a/interface/web/admin/lib/lang/it_software_package_list.lng
+++ b/interface/web/admin/lib/lang/it_software_package_list.lng
@@ -8,4 +8,6 @@
 $wb['repoupdate_txt'] = 'Update package list';
 $wb['package_id_txt'] = 'local App-ID';
 $wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
 ?>
diff --git a/interface/web/admin/lib/lang/it_software_repo.lng b/interface/web/admin/lib/lang/it_software_repo.lng
index 28ac875..7adc6b0 100644
--- a/interface/web/admin/lib/lang/it_software_repo.lng
+++ b/interface/web/admin/lib/lang/it_software_repo.lng
@@ -4,4 +4,5 @@
 $wb['repo_username_txt'] = 'Utente (facoltativo)';
 $wb['repo_password_txt'] = 'Password (facoltativa)';
 $wb['active_txt'] = 'Attivo';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
 ?>
diff --git a/interface/web/admin/lib/lang/it_system_config.lng b/interface/web/admin/lib/lang/it_system_config.lng
index 60512a4..8ba0b9f 100644
--- a/interface/web/admin/lib/lang/it_system_config.lng
+++ b/interface/web/admin/lib/lang/it_system_config.lng
@@ -49,4 +49,7 @@
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/ja_server_config.lng b/interface/web/admin/lib/lang/ja_server_config.lng
index ce88036..890bb56 100644
--- a/interface/web/admin/lib/lang/ja_server_config.lng
+++ b/interface/web/admin/lib/lang/ja_server_config.lng
@@ -171,4 +171,21 @@
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/ja_software_package.lng b/interface/web/admin/lib/lang/ja_software_package.lng
new file mode 100644
index 0000000..62ef734
--- /dev/null
+++ b/interface/web/admin/lib/lang/ja_software_package.lng
@@ -0,0 +1,6 @@
+<?php
+$wb["package_title_txt"] = 'Package Title';
+$wb["package_key_txt"] = 'Package Key';
+$wb["Software Package"] = 'Software Package';
+$wb['Modify software package details'] = 'Modify software package details';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/ja_software_package_list.lng b/interface/web/admin/lib/lang/ja_software_package_list.lng
index fb58776..e5352e9 100644
--- a/interface/web/admin/lib/lang/ja_software_package_list.lng
+++ b/interface/web/admin/lib/lang/ja_software_package_list.lng
@@ -8,4 +8,6 @@
 $wb['repoupdate_txt'] = 'Update package list';
 $wb['package_id_txt'] = 'local App-ID';
 $wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
 ?>
diff --git a/interface/web/admin/lib/lang/ja_software_repo.lng b/interface/web/admin/lib/lang/ja_software_repo.lng
index fba63e9..c95399a 100644
--- a/interface/web/admin/lib/lang/ja_software_repo.lng
+++ b/interface/web/admin/lib/lang/ja_software_repo.lng
@@ -4,4 +4,5 @@
 $wb['repo_username_txt'] = 'ユーザー(必要があれば)';
 $wb['repo_password_txt'] = 'パスワード(必要があれば)';
 $wb['active_txt'] = '有効';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
 ?>
diff --git a/interface/web/admin/lib/lang/ja_system_config.lng b/interface/web/admin/lib/lang/ja_system_config.lng
index f58ce70..842b65f 100644
--- a/interface/web/admin/lib/lang/ja_system_config.lng
+++ b/interface/web/admin/lib/lang/ja_system_config.lng
@@ -49,4 +49,7 @@
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/nl_server_config.lng b/interface/web/admin/lib/lang/nl_server_config.lng
index c3b3ce0..5d08e91 100644
--- a/interface/web/admin/lib/lang/nl_server_config.lng
+++ b/interface/web/admin/lib/lang/nl_server_config.lng
@@ -171,4 +171,21 @@
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/nl_software_package.lng b/interface/web/admin/lib/lang/nl_software_package.lng
new file mode 100644
index 0000000..62ef734
--- /dev/null
+++ b/interface/web/admin/lib/lang/nl_software_package.lng
@@ -0,0 +1,6 @@
+<?php
+$wb["package_title_txt"] = 'Package Title';
+$wb["package_key_txt"] = 'Package Key';
+$wb["Software Package"] = 'Software Package';
+$wb['Modify software package details'] = 'Modify software package details';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/nl_software_package_list.lng b/interface/web/admin/lib/lang/nl_software_package_list.lng
index ee5516a..33e6602 100644
--- a/interface/web/admin/lib/lang/nl_software_package_list.lng
+++ b/interface/web/admin/lib/lang/nl_software_package_list.lng
@@ -8,4 +8,6 @@
 $wb['repoupdate_txt'] = 'Update pakketlijst';
 $wb['package_id_txt'] = 'locaal App-ID';
 $wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
 ?>
diff --git a/interface/web/admin/lib/lang/nl_software_repo.lng b/interface/web/admin/lib/lang/nl_software_repo.lng
index 91f060d..665c419 100644
--- a/interface/web/admin/lib/lang/nl_software_repo.lng
+++ b/interface/web/admin/lib/lang/nl_software_repo.lng
@@ -4,4 +4,5 @@
 $wb['repo_username_txt'] = 'User (optionieel)';
 $wb['repo_password_txt'] = 'Password (optionieel)';
 $wb['active_txt'] = 'Actief';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
 ?>
diff --git a/interface/web/admin/lib/lang/nl_system_config.lng b/interface/web/admin/lib/lang/nl_system_config.lng
index 65ed315..fe3b85e 100644
--- a/interface/web/admin/lib/lang/nl_system_config.lng
+++ b/interface/web/admin/lib/lang/nl_system_config.lng
@@ -52,4 +52,7 @@
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/pl_server_config.lng b/interface/web/admin/lib/lang/pl_server_config.lng
index 175c9be..32c4c00 100644
--- a/interface/web/admin/lib/lang/pl_server_config.lng
+++ b/interface/web/admin/lib/lang/pl_server_config.lng
@@ -171,4 +171,21 @@
 $wb['overtraffic_notify_admin_txt'] = 'Prześlij informacje o przekroczeniu transferu do admina';
 $wb['overtraffic_notify_client_txt'] = 'Prześlij informacje o przekroczeniu transferu do klienta';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/pl_software_package.lng b/interface/web/admin/lib/lang/pl_software_package.lng
new file mode 100644
index 0000000..62ef734
--- /dev/null
+++ b/interface/web/admin/lib/lang/pl_software_package.lng
@@ -0,0 +1,6 @@
+<?php
+$wb["package_title_txt"] = 'Package Title';
+$wb["package_key_txt"] = 'Package Key';
+$wb["Software Package"] = 'Software Package';
+$wb['Modify software package details'] = 'Modify software package details';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/pl_software_package_list.lng b/interface/web/admin/lib/lang/pl_software_package_list.lng
index 78c412c..cb47abc 100644
--- a/interface/web/admin/lib/lang/pl_software_package_list.lng
+++ b/interface/web/admin/lib/lang/pl_software_package_list.lng
@@ -8,4 +8,6 @@
 $wb['repoupdate_txt'] = 'Aktualizuj listę pakietów';
 $wb['package_id_txt'] = 'lokalny App-ID';
 $wb['no_packages_txt'] = 'Brak dostępnych pakietów';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
 ?>
diff --git a/interface/web/admin/lib/lang/pl_software_repo.lng b/interface/web/admin/lib/lang/pl_software_repo.lng
index d11a1b3..1cc3dbb 100644
--- a/interface/web/admin/lib/lang/pl_software_repo.lng
+++ b/interface/web/admin/lib/lang/pl_software_repo.lng
@@ -4,4 +4,5 @@
 $wb['repo_username_txt'] = 'Użytkownik (Opcjonalnie)';
 $wb['repo_password_txt'] = 'Hasło (Opcjonalnie)';
 $wb['active_txt'] = 'Aktywny';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
 ?>
diff --git a/interface/web/admin/lib/lang/pl_system_config.lng b/interface/web/admin/lib/lang/pl_system_config.lng
index dbcd61f..9d4f6f5 100644
--- a/interface/web/admin/lib/lang/pl_system_config.lng
+++ b/interface/web/admin/lib/lang/pl_system_config.lng
@@ -49,4 +49,7 @@
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Pokaż zakładkę autorespondera w szczegółach konta email.';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Pokaż zakładkę filtra email w szczegółach konta email.';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Pokaż zakładkę własnych filtrów email w szczegółach konta email.';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/pt_server_config.lng b/interface/web/admin/lib/lang/pt_server_config.lng
index 25d19f3..e427ed9 100644
--- a/interface/web/admin/lib/lang/pt_server_config.lng
+++ b/interface/web/admin/lib/lang/pt_server_config.lng
@@ -171,4 +171,21 @@
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/pt_software_package.lng b/interface/web/admin/lib/lang/pt_software_package.lng
new file mode 100644
index 0000000..62ef734
--- /dev/null
+++ b/interface/web/admin/lib/lang/pt_software_package.lng
@@ -0,0 +1,6 @@
+<?php
+$wb["package_title_txt"] = 'Package Title';
+$wb["package_key_txt"] = 'Package Key';
+$wb["Software Package"] = 'Software Package';
+$wb['Modify software package details'] = 'Modify software package details';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/pt_software_package_list.lng b/interface/web/admin/lib/lang/pt_software_package_list.lng
index 80b0c2e..1ec77bd 100644
--- a/interface/web/admin/lib/lang/pt_software_package_list.lng
+++ b/interface/web/admin/lib/lang/pt_software_package_list.lng
@@ -8,4 +8,6 @@
 $wb['repoupdate_txt'] = 'Update package list';
 $wb['package_id_txt'] = 'local App-ID';
 $wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
 ?>
diff --git a/interface/web/admin/lib/lang/pt_software_repo.lng b/interface/web/admin/lib/lang/pt_software_repo.lng
index c0e8fd2..436758e 100644
--- a/interface/web/admin/lib/lang/pt_software_repo.lng
+++ b/interface/web/admin/lib/lang/pt_software_repo.lng
@@ -4,4 +4,5 @@
 $wb['repo_username_txt'] = 'Utilizador (opcional)';
 $wb['repo_password_txt'] = 'Senha (opcional)';
 $wb['active_txt'] = 'Activo';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
 ?>
diff --git a/interface/web/admin/lib/lang/pt_system_config.lng b/interface/web/admin/lib/lang/pt_system_config.lng
index 93389bb..32ed93f 100644
--- a/interface/web/admin/lib/lang/pt_system_config.lng
+++ b/interface/web/admin/lib/lang/pt_system_config.lng
@@ -49,4 +49,7 @@
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/ro_server_config.lng b/interface/web/admin/lib/lang/ro_server_config.lng
index d3247ac..55b7355 100644
--- a/interface/web/admin/lib/lang/ro_server_config.lng
+++ b/interface/web/admin/lib/lang/ro_server_config.lng
@@ -171,4 +171,21 @@
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/ro_software_package.lng b/interface/web/admin/lib/lang/ro_software_package.lng
new file mode 100644
index 0000000..62ef734
--- /dev/null
+++ b/interface/web/admin/lib/lang/ro_software_package.lng
@@ -0,0 +1,6 @@
+<?php
+$wb["package_title_txt"] = 'Package Title';
+$wb["package_key_txt"] = 'Package Key';
+$wb["Software Package"] = 'Software Package';
+$wb['Modify software package details'] = 'Modify software package details';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/ro_software_package_list.lng b/interface/web/admin/lib/lang/ro_software_package_list.lng
index 1eca7d4..4a8dcbc 100644
--- a/interface/web/admin/lib/lang/ro_software_package_list.lng
+++ b/interface/web/admin/lib/lang/ro_software_package_list.lng
@@ -8,4 +8,6 @@
 $wb['repoupdate_txt'] = 'Update package list';
 $wb['package_id_txt'] = 'local App-ID';
 $wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
 ?>
diff --git a/interface/web/admin/lib/lang/ro_software_repo.lng b/interface/web/admin/lib/lang/ro_software_repo.lng
index 574dd11..f2cbbb2 100644
--- a/interface/web/admin/lib/lang/ro_software_repo.lng
+++ b/interface/web/admin/lib/lang/ro_software_repo.lng
@@ -4,4 +4,5 @@
 $wb['repo_username_txt'] = 'User (optional)';
 $wb['repo_password_txt'] = 'Password (optional)';
 $wb['active_txt'] = 'Active';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
 ?>
diff --git a/interface/web/admin/lib/lang/ro_system_config.lng b/interface/web/admin/lib/lang/ro_system_config.lng
index d8486c8..d237d63 100644
--- a/interface/web/admin/lib/lang/ro_system_config.lng
+++ b/interface/web/admin/lib/lang/ro_system_config.lng
@@ -49,4 +49,7 @@
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/ru_server_config.lng b/interface/web/admin/lib/lang/ru_server_config.lng
index f9cea0c..5ae21a9 100644
--- a/interface/web/admin/lib/lang/ru_server_config.lng
+++ b/interface/web/admin/lib/lang/ru_server_config.lng
@@ -171,4 +171,21 @@
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/ru_software_package.lng b/interface/web/admin/lib/lang/ru_software_package.lng
new file mode 100644
index 0000000..62ef734
--- /dev/null
+++ b/interface/web/admin/lib/lang/ru_software_package.lng
@@ -0,0 +1,6 @@
+<?php
+$wb["package_title_txt"] = 'Package Title';
+$wb["package_key_txt"] = 'Package Key';
+$wb["Software Package"] = 'Software Package';
+$wb['Modify software package details'] = 'Modify software package details';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/ru_software_package_list.lng b/interface/web/admin/lib/lang/ru_software_package_list.lng
index 41ebca9..028ef00 100644
--- a/interface/web/admin/lib/lang/ru_software_package_list.lng
+++ b/interface/web/admin/lib/lang/ru_software_package_list.lng
@@ -8,4 +8,6 @@
 $wb['repoupdate_txt'] = 'Update package list';
 $wb['package_id_txt'] = 'local App-ID';
 $wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
 ?>
diff --git a/interface/web/admin/lib/lang/ru_software_repo.lng b/interface/web/admin/lib/lang/ru_software_repo.lng
index 74fb30e..5aec876 100644
--- a/interface/web/admin/lib/lang/ru_software_repo.lng
+++ b/interface/web/admin/lib/lang/ru_software_repo.lng
@@ -4,4 +4,5 @@
 $wb['repo_username_txt'] = 'Логин (опционально)';
 $wb['repo_password_txt'] = 'Пароль (опционально)';
 $wb['active_txt'] = 'Активен?';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
 ?>
diff --git a/interface/web/admin/lib/lang/ru_system_config.lng b/interface/web/admin/lib/lang/ru_system_config.lng
index 8d47e5f..ee0fc50 100644
--- a/interface/web/admin/lib/lang/ru_system_config.lng
+++ b/interface/web/admin/lib/lang/ru_system_config.lng
@@ -49,4 +49,7 @@
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/se_server_config.lng b/interface/web/admin/lib/lang/se_server_config.lng
index df557e2..089e629 100644
--- a/interface/web/admin/lib/lang/se_server_config.lng
+++ b/interface/web/admin/lib/lang/se_server_config.lng
@@ -171,4 +171,21 @@
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/se_software_package.lng b/interface/web/admin/lib/lang/se_software_package.lng
new file mode 100644
index 0000000..62ef734
--- /dev/null
+++ b/interface/web/admin/lib/lang/se_software_package.lng
@@ -0,0 +1,6 @@
+<?php
+$wb["package_title_txt"] = 'Package Title';
+$wb["package_key_txt"] = 'Package Key';
+$wb["Software Package"] = 'Software Package';
+$wb['Modify software package details'] = 'Modify software package details';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/se_software_package_list.lng b/interface/web/admin/lib/lang/se_software_package_list.lng
index 87b27fd..9fa5386 100644
--- a/interface/web/admin/lib/lang/se_software_package_list.lng
+++ b/interface/web/admin/lib/lang/se_software_package_list.lng
@@ -8,4 +8,6 @@
 $wb['repoupdate_txt'] = 'Update package list';
 $wb['package_id_txt'] = 'local App-ID';
 $wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
 ?>
diff --git a/interface/web/admin/lib/lang/se_software_repo.lng b/interface/web/admin/lib/lang/se_software_repo.lng
index 574dd11..f2cbbb2 100644
--- a/interface/web/admin/lib/lang/se_software_repo.lng
+++ b/interface/web/admin/lib/lang/se_software_repo.lng
@@ -4,4 +4,5 @@
 $wb['repo_username_txt'] = 'User (optional)';
 $wb['repo_password_txt'] = 'Password (optional)';
 $wb['active_txt'] = 'Active';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
 ?>
diff --git a/interface/web/admin/lib/lang/se_system_config.lng b/interface/web/admin/lib/lang/se_system_config.lng
index d8486c8..d237d63 100644
--- a/interface/web/admin/lib/lang/se_system_config.lng
+++ b/interface/web/admin/lib/lang/se_system_config.lng
@@ -49,4 +49,7 @@
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/sk_server_config.lng b/interface/web/admin/lib/lang/sk_server_config.lng
index 0ea3647..c01606b 100644
--- a/interface/web/admin/lib/lang/sk_server_config.lng
+++ b/interface/web/admin/lib/lang/sk_server_config.lng
@@ -171,4 +171,21 @@
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
 $wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/sk_software_package.lng b/interface/web/admin/lib/lang/sk_software_package.lng
new file mode 100644
index 0000000..62ef734
--- /dev/null
+++ b/interface/web/admin/lib/lang/sk_software_package.lng
@@ -0,0 +1,6 @@
+<?php
+$wb["package_title_txt"] = 'Package Title';
+$wb["package_key_txt"] = 'Package Key';
+$wb["Software Package"] = 'Software Package';
+$wb['Modify software package details'] = 'Modify software package details';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/sk_software_package_list.lng b/interface/web/admin/lib/lang/sk_software_package_list.lng
index d6cf511..502a3a2 100644
--- a/interface/web/admin/lib/lang/sk_software_package_list.lng
+++ b/interface/web/admin/lib/lang/sk_software_package_list.lng
@@ -8,4 +8,6 @@
 $wb['repoupdate_txt'] = 'Update package list';
 $wb['package_id_txt'] = 'local App-ID';
 $wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
 ?>
diff --git a/interface/web/admin/lib/lang/sk_software_repo.lng b/interface/web/admin/lib/lang/sk_software_repo.lng
index 16e8350..263614f 100644
--- a/interface/web/admin/lib/lang/sk_software_repo.lng
+++ b/interface/web/admin/lib/lang/sk_software_repo.lng
@@ -4,4 +4,5 @@
 $wb['repo_username_txt'] = 'Uživateľ (voliteľný)';
 $wb['repo_password_txt'] = 'Heslo (voliteľné)';
 $wb['active_txt'] = 'Aktivovať';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
 ?>
diff --git a/interface/web/admin/lib/lang/sk_system_config.lng b/interface/web/admin/lib/lang/sk_system_config.lng
index bf2c077..3b8b683 100644
--- a/interface/web/admin/lib/lang/sk_system_config.lng
+++ b/interface/web/admin/lib/lang/sk_system_config.lng
@@ -49,4 +49,7 @@
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/tr_server_config.lng b/interface/web/admin/lib/lang/tr_server_config.lng
index a949490..81595ff 100644
--- a/interface/web/admin/lib/lang/tr_server_config.lng
+++ b/interface/web/admin/lib/lang/tr_server_config.lng
@@ -170,4 +170,22 @@
 $wb['web_folder_protection_txt'] = 'Make web folders immutable (extended attributes)';
 $wb['overtraffic_notify_admin_txt'] = 'Send overtraffic notification to admin';
 $wb['overtraffic_notify_client_txt'] = 'Send overtraffic notification to client';
+$wb['rbl_error_regex'] = 'Please specify valid RBL hostnames.';
+$wb['overquota_notify_admin_txt'] = 'Send quota warnings to admin';
+$wb['overquota_notify_client_txt'] = 'Send quota warnings to client';
+$wb['overquota_notify_onok_txt'] = 'Send quota ok message to client';
+$wb['overquota_notify_freq_txt'] = 'Send quota warning each X days';
+$wb['overquota_notify_freq_note_txt'] = '0 = send message just once, no repeated messages';
+$wb['admin_notify_events_txt'] = 'Send email to admin starting with the following level';
+$wb['no_notifications_txt'] = 'No Notifications';
+$wb['monit_url_txt'] = 'Monit URL';
+$wb['monit_user_txt'] = 'Monit User';
+$wb['monit_password_txt'] = 'Monit Password';
+$wb['monit_url_error_regex'] = 'Invalid Monit URL';
+$wb['monit_url_note_txt'] = 'Placeholder:';
+$wb['munin_url_txt'] = 'Munin URL';
+$wb['munin_user_txt'] = 'Munin User';
+$wb['munin_password_txt'] = 'Munin Password';
+$wb['munin_url_error_regex'] = 'Invalid Munin URL';
+$wb['munin_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/lib/lang/tr_software_package.lng b/interface/web/admin/lib/lang/tr_software_package.lng
new file mode 100644
index 0000000..62ef734
--- /dev/null
+++ b/interface/web/admin/lib/lang/tr_software_package.lng
@@ -0,0 +1,6 @@
+<?php
+$wb["package_title_txt"] = 'Package Title';
+$wb["package_key_txt"] = 'Package Key';
+$wb["Software Package"] = 'Software Package';
+$wb['Modify software package details'] = 'Modify software package details';
+?>
\ No newline at end of file
diff --git a/interface/web/admin/lib/lang/tr_software_package_list.lng b/interface/web/admin/lib/lang/tr_software_package_list.lng
index eb18128..0f33d0a 100644
--- a/interface/web/admin/lib/lang/tr_software_package_list.lng
+++ b/interface/web/admin/lib/lang/tr_software_package_list.lng
@@ -8,4 +8,6 @@
 $wb['repoupdate_txt'] = 'Update package list';
 $wb['package_id_txt'] = 'local App-ID';
 $wb['no_packages_txt'] = 'No packages available';
+$wb['edit_txt'] = 'Edit';
+$wb['delete_txt'] = 'Delete';
 ?>
diff --git a/interface/web/admin/lib/lang/tr_software_repo.lng b/interface/web/admin/lib/lang/tr_software_repo.lng
index 67ce387..08c443b 100644
--- a/interface/web/admin/lib/lang/tr_software_repo.lng
+++ b/interface/web/admin/lib/lang/tr_software_repo.lng
@@ -4,4 +4,5 @@
 $wb['repo_username_txt'] = 'Kullanıcı (isteğe bağlı)';
 $wb['repo_password_txt'] = 'Şifre (isteğe bağlı)';
 $wb['active_txt'] = 'Aktif';
+$wb['Software Repository which may contain addons or updates'] = 'Software Repository which may contain addons or updates';
 ?>
diff --git a/interface/web/admin/lib/lang/tr_system_config.lng b/interface/web/admin/lib/lang/tr_system_config.lng
index 70e4853..e538a31 100644
--- a/interface/web/admin/lib/lang/tr_system_config.lng
+++ b/interface/web/admin/lib/lang/tr_system_config.lng
@@ -49,4 +49,7 @@
 $wb['mailbox_show_autoresponder_tab_txt'] = 'Show autoresponder tab in mail account details';
 $wb['mailbox_show_mail_filter_tab_txt'] = 'Show mail filter tab in mail account details';
 $wb['mailbox_show_custom_rules_tab_txt'] = 'Show custom mailfilter tab in mail account details';
+$wb['webmail_url_error_regex'] = 'Invalid webmail URL';
+$wb['phpmyadmin_url_note_txt'] = 'Placeholder:';
+$wb['webmail_url_note_txt'] = 'Placeholder:';
 ?>
diff --git a/interface/web/admin/system_config_edit.php b/interface/web/admin/system_config_edit.php
index b83e704..c2702c7 100644
--- a/interface/web/admin/system_config_edit.php
+++ b/interface/web/admin/system_config_edit.php
@@ -78,6 +78,24 @@
 		$app->tpl->setVar($record);
 	}
 	
+	function onShowEnd() {
+		global $app, $conf;
+		
+		// available dashlets
+		$available_dashlets_txt = '';
+		$handle = @opendir(ISPC_WEB_PATH.'/dashboard/dashlets'); 
+		while ($file = @readdir ($handle)) { 
+			if ($file != '.' && $file != '..' && !is_dir($file)) {
+				$available_dashlets_txt .= '<a href="javascript:void(0);" class="addPlaceholderContent">['.substr($file,0,-4).']<pre class="addPlaceholderContent" style="display:none;">['.substr($file,0,-4).'],</pre></a> ';
+			}
+		}
+		
+		if($available_dashlets_txt == '') $available_dashlets_txt = '------';
+		$app->tpl->setVar("available_dashlets_txt",$available_dashlets_txt);
+		
+		parent::onShowEnd();
+	}
+	
     function onSubmit() {
         global $app;
         
@@ -135,8 +153,9 @@
         $server_config_array[$section] = $new_config;
 		$server_config_str = $app->ini_parser->get_ini_string($server_config_array);
 		
-		$sql = "UPDATE sys_ini SET config = '".$app->db->quote($server_config_str)."' WHERE sysini_id = 1";
-		if($conf['demo_mode'] != true) $app->db->query($sql);
+		//$sql = "UPDATE sys_ini SET config = '".$app->db->quote($server_config_str)."' WHERE sysini_id = 1";
+		//if($conf['demo_mode'] != true) $app->db->query($sql);
+		if($conf['demo_mode'] != true) $app->db->datalogUpdate('sys_ini', "config = '".$app->db->quote($server_config_str)."'", 'sysini_id', 1);
 
 		/*
 		 * If we should use the domain-module, we have to insert all existing domains into the table
diff --git a/interface/web/admin/templates/system_config_misc_edit.htm b/interface/web/admin/templates/system_config_misc_edit.htm
index 16f6052..6538236 100644
--- a/interface/web/admin/templates/system_config_misc_edit.htm
+++ b/interface/web/admin/templates/system_config_misc_edit.htm
@@ -21,6 +21,30 @@
                 <label for="monitor_key">{tmpl_var name='monitor_key_txt'}</label>
                 <input name="monitor_key" id="monitor_key" value="{tmpl_var name='monitor_key'}" size="" maxlength="" type="text" class="textInput" />
             </div>
+			<div class="ctrlHolder">
+                <label for="admin_dashlets_left">{tmpl_var name='admin_dashlets_left_txt'}</label>
+                <input name="admin_dashlets_left" id="admin_dashlets_left" value="{tmpl_var name='admin_dashlets_left'}" size="" maxlength="" type="text" class="textInput" />&nbsp;{tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"}
+            </div>
+			<div class="ctrlHolder">
+                <label for="admin_dashlets_right">{tmpl_var name='admin_dashlets_right_txt'}</label>
+                <input name="admin_dashlets_right" id="admin_dashlets_right" value="{tmpl_var name='admin_dashlets_right'}" size="" maxlength="" type="text" class="textInput" />&nbsp;{tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"}
+            </div>
+			<div class="ctrlHolder">
+                <label for="reseller_dashlets_left">{tmpl_var name='reseller_dashlets_left_txt'}</label>
+                <input name="reseller_dashlets_left" id="reseller_dashlets_left" value="{tmpl_var name='reseller_dashlets_left'}" size="" maxlength="" type="text" class="textInput" />&nbsp;{tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"}
+            </div>
+			<div class="ctrlHolder">
+                <label for="reseller_dashlets_right">{tmpl_var name='reseller_dashlets_right_txt'}</label>
+                <input name="reseller_dashlets_right" id="reseller_dashlets_right" value="{tmpl_var name='reseller_dashlets_right'}" size="" maxlength="" type="text" class="textInput" />&nbsp;{tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"}
+            </div>
+			<div class="ctrlHolder">
+                <label for="client_dashlets_left">{tmpl_var name='client_dashlets_left_txt'}</label>
+                <input name="client_dashlets_left" id="client_dashlets_left" value="{tmpl_var name='client_dashlets_left'}" size="" maxlength="" type="text" class="textInput" />&nbsp;{tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"}
+            </div>
+			<div class="ctrlHolder">
+                <label for="client_dashlets_right">{tmpl_var name='client_dashlets_right_txt'}</label>
+                <input name="client_dashlets_right" id="client_dashlets_right" value="{tmpl_var name='client_dashlets_right'}" size="" maxlength="" type="text" class="textInput" />&nbsp;{tmpl_var name='available_dashlets_note_txt'} {tmpl_var name="available_dashlets_txt"}
+            </div>
             <div class="ctrlHolder">
                 <p class="label">{tmpl_var name='tab_change_discard_txt'}</p>
                 <div class="multiField">
diff --git a/interface/web/client/client_edit.php b/interface/web/client/client_edit.php
index 2b72d81..ab33d9e 100644
--- a/interface/web/client/client_edit.php
+++ b/interface/web/client/client_edit.php
@@ -49,8 +49,8 @@
 $app->load('tform_actions');
 
 class page_action extends tform_actions {
-
-
+    var $_template_additional = array();
+    
 	function onShowNew() {
 		global $app, $conf;
 		
@@ -92,8 +92,28 @@
 				}
 			}
 		}
-		
-		parent::onSubmit();
+        
+        if($this->id != 0) {
+            $this->oldTemplatesAssigned = $app->db->queryAllRecords('SELECT * FROM `client_template_assigned` WHERE `client_id` = ' . $this->id);
+            if(!is_array($this->oldTemplatesAssigned) || count($this->oldTemplatesAssigned) < 1) {
+                // check previous type of storing templates
+                $tpls = explode('/', $this->oldDataRecord['template_additional']);
+                $this->oldTemplatesAssigned = array();
+                foreach($tpls as $item) {
+                    $item = trim($item);
+                    if(!$item) continue;
+                    $this->oldTemplatesAssigned[] = array('assigned_template_id' => 0, 'client_template_id' => $item, 'client_id' => $this->id);
+                }
+                unset($tpls);
+            }
+        } else {
+            $this->oldTemplatesAssigned = array();
+        }
+        
+        $this->_template_additional = explode('/', $this->dataRecord['template_additional']);
+        $this->dataRecord['template_additional'] = '';
+        
+        parent::onSubmit();
 	}
 
 	function onShowEnd() {
@@ -110,16 +130,44 @@
 		}
 		$app->tpl->setVar('tpl_add_select',$option);
 
-		$sql = "SELECT template_additional FROM client WHERE client_id = " . $this->id;
-		$result = $app->db->queryOneRecord($sql);
-		$tplAdd = explode("/", $result['template_additional']);
-		$text = '';
-		foreach($tplAdd as $item){
-			if (trim($item) != ''){
-				if ($text != '') $text .= '';
-				$text .= '<li>' . $tpl[$item]. '</li>';
-			}
-		}
+        // check for new-style records
+        $result = $app->db->queryAllRecords('SELECT assigned_template_id, client_template_id FROM client_template_assigned WHERE client_id = ' . $this->id);
+        if($result && count($result) > 0) {
+            // new style
+            $items = array();
+            $text = '';
+            foreach($result as $item){
+                if (trim($item['client_template_id']) != ''){
+                    if ($text != '') $text .= '';
+                    $text .= '<li rel="' . $item['assigned_template_id'] . '">' . $tpl[$item['client_template_id']];
+                    $text .= '<a href="#" class="button icons16 icoDelete"></a>';
+                                        $tmp = new stdClass();
+                    $tmp->id = $item['assigned_template_id'];
+                    $tmp->data = '';
+                    $app->plugin->raiseEvent('get_client_template_details', $tmp);
+                    if($tmp->data != '') $text .= '<br /><em>' . $tmp->data . '</em>';
+
+                    $text .= '</li>';
+                    $items[] = $item['assigned_template_id'] . ':' . $item['client_template_id'];
+                }
+            }
+
+            $tmprec = $app->tform->getHTML(array('template_additional' => implode('/', $items)), $this->active_tab, 'EDIT');
+            $app->tpl->setVar('template_additional', $tmprec['template_additional']);
+            unset($tmprec);
+        } else {
+            // old style
+            $sql = "SELECT template_additional FROM client WHERE client_id = " . $this->id;
+            $result = $app->db->queryOneRecord($sql);
+            $tplAdd = explode("/", $result['template_additional']);
+            $text = '';
+            foreach($tplAdd as $item){
+                if (trim($item) != ''){
+                    if ($text != '') $text .= '';
+                    $text .= '<li>' . $tpl[$item]. '<a href="#" class="button icons16 icoDelete"></a></li>';
+                }
+            }
+        }
 
 		$app->tpl->setVar('template_additional_list', $text);
 		$app->tpl->setVar('app_module','client');
@@ -127,7 +175,7 @@
 		parent::onShowEnd();
 
 	}
-
+    
 	/*
 	 This function is called automatically right after
 	 the data was successful inserted in the database.
@@ -180,6 +228,10 @@
 		$sql = "UPDATE client SET default_mailserver = $default_mailserver, default_webserver = $default_webserver, default_dnsserver = $default_dnsserver, default_slave_dnsserver = $default_dnsserver, default_dbserver = $default_dbserver WHERE client_id = ".$this->id;
 		$app->db->query($sql);
 		
+        if(isset($this->dataRecord['template_master'])) {
+            $app->uses('client_templates');
+            $app->client_templates->update_client_templates($this->id, $this->_template_additional);
+        }
 
 		parent::onAfterInsert();
 	}
@@ -218,6 +270,99 @@
 			$app->db->query($sql);
 		}
 		
+        if(!isset($this->dataRecord['locked'])) $this->dataRecord['locked'] = 'n';
+        if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && $this->dataRecord["locked"] != $this->oldDataRecord['locked']) {
+            /** lock all the things like web, mail etc. - easy to extend */
+            
+            // get tmp_data of client
+            $client_data = $app->db->queryOneRecord('SELECT `tmp_data` FROM `client` WHERE `client_id` = ' . $this->id);
+            
+            if($client_data['tmp_data'] == '') $tmp_data = array();
+            else $tmp_data = unserialize($client_data['tmp_data']);
+            
+            if(!is_array($tmp_data)) $tmp_data = array();
+            
+            // database tables with their primary key columns
+            $to_disable = array('cron' => 'id',
+                                'ftp_user' => 'ftp_user_id',
+                                'mail_domain' => 'domain_id',
+                                'mail_forwarding' => 'forwarding_id',
+                                'mail_get' => 'mailget_id',
+                                'openvz_vm' => 'vm_id',
+                                'shell_user' => 'shell_user_id',
+                                'webdav_user' => 'webdav_user_id',
+                                'web_database' => 'database_id',
+                                'web_domain' => 'domain_id',
+                                'web_folder' => 'web_folder_id',
+                                'web_folder_user' => 'web_folder_user_id'
+                               );
+            
+            $udata = $app->db->queryOneRecord('SELECT `userid` FROM `sys_user` WHERE `client_id` = ' . $this->id);
+            $gdata = $app->db->queryOneRecord('SELECT `groupid` FROM `sys_group` WHERE `client_id` = ' . $this->id);
+            $sys_groupid = $gdata['groupid'];
+            $sys_userid = $udata['userid'];
+            
+            $entries = array();
+            if($this->dataRecord['locked'] == 'y') {
+                $prev_active = array();
+                $prev_sysuser = array();
+                foreach($to_disable as $current => $keycolumn) {
+                    $prev_active[$current] = array();
+                    $prev_sysuser[$current] = array();
+                    
+                    $entries = $app->db->queryAllRecords('SELECT `' . $keycolumn . '` as `id`, `sys_userid`, `active` FROM `' . $current . '` WHERE `sys_groupid` = ' . $sys_groupid);
+                    foreach($entries as $item) {
+                        
+                        if($item['active'] != 'y') $prev_active[$current][$item['id']]['active'] = 'n';
+                        if($item['sys_userid'] != $sys_userid) $prev_sysuser[$current][$item['id']]['active'] = $item['sys_userid'];
+                        // we don't have to store these if y, as everything without previous state gets enabled later
+                        
+                        $app->db->datalogUpdate($current, array('active' => 'n', 'sys_userid' => $_SESSION["s"]["user"]["userid"]), $keycolumn, $item['id']);
+                    }
+                }
+                
+                $tmp_data['prev_active'] = $prev_active;
+                $tmp_data['prev_sys_userid'] = $prev_sysuser;
+                $app->db->query("UPDATE `client` SET `tmp_data` = '" . $app->db->quote(serialize($tmp_data)) . "' WHERE `client_id` = " . $this->id);
+                unset($prev_active);
+                unset($prev_sysuser);
+            } elseif($this->dataRecord['locked'] == 'n') {
+                foreach($to_disable as $current => $keycolumn) {
+                    $entries = $app->db->queryAllRecords('SELECT `' . $keycolumn . '` as `id` FROM `' . $current . '` WHERE `sys_groupid` = ' . $sys_groupid);
+                    foreach($entries as $item) {
+                        $set_active = 'y';
+                        $set_sysuser = $sys_userid;
+                        if(array_key_exists('prev_active', $tmp_data) == true
+                            && array_key_exists($current, $tmp_data['prev_active']) == true
+                            && array_key_exists($item['id'], $tmp_data['prev_active'][$current]) == true
+                            && $tmp_data['prev_active'][$current][$item['id']] == 'n') $set_active = 'n';
+                        if(array_key_exists('prev_sysuser', $tmp_data) == true
+                            && array_key_exists($current, $tmp_data['prev_sysuser']) == true
+                            && array_key_exists($item['id'], $tmp_data['prev_sysuser'][$current]) == true
+                            && $tmp_data['prev_sysuser'][$current][$item['id']] != $sys_userid) $set_sysuser = $tmp_data['prev_sysuser'][$current][$item['id']];
+                        
+                        $app->db->datalogUpdate($current, array('active' => $set_active, 'sys_userid' => $set_sysuser), $keycolumn, $item['id']);
+                    }
+                }
+                if(array_key_exists('prev_active', $tmp_data)) unset($tmp_data['prev_active']);
+                $app->db->query("UPDATE `client` SET `tmp_data` = '" . $app->db->quote(serialize($tmp_data)) . "' WHERE `client_id` = " . $this->id);
+            }
+            unset($tmp_data);
+            unset($entries);
+            unset($to_disable);
+        }
+        
+        if(!isset($this->dataRecord['canceled'])) $this->dataRecord['canceled'] = 'n';
+        if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && $this->dataRecord["canceled"] != $this->oldDataRecord['canceled']) {
+            if($this->dataRecord['canceled'] == 'y') {
+                $sql = "UPDATE sys_user SET active = '0' WHERE client_id = " . $this->id;
+                $app->db->query($sql);
+            } elseif($this->dataRecord['canceled'] == 'n') {
+                $sql = "UPDATE sys_user SET active = '1' WHERE client_id = " . $this->id;
+                $app->db->query($sql);
+            }
+        }
+        
 		// language changed
 		if(isset($conf['demo_mode']) && $conf['demo_mode'] != true && isset($this->dataRecord['language']) && $this->dataRecord['language'] != '' && $this->oldDataRecord['language'] != $this->dataRecord['language']) {
 			$language = $app->db->quote($this->dataRecord["language"]);
@@ -236,6 +381,11 @@
 			$app->db->query($sql);
 		}
 		
+        if(isset($this->dataRecord['template_master'])) {
+            $app->uses('client_templates');
+            $app->client_templates->update_client_templates($this->id, $this->_template_additional);
+        }
+        
 		parent::onAfterUpdate();
 	}
 }
diff --git a/interface/web/client/client_template_del.php b/interface/web/client/client_template_del.php
index dbe8639..647ad7c 100644
--- a/interface/web/client/client_template_del.php
+++ b/interface/web/client/client_template_del.php
@@ -53,6 +53,13 @@
 	function onBeforeDelete() {
 		global $app;
 		
+		// check new style
+        $rec = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client_template_assigned WHERE client_template_id = ".$this->id);
+		if($rec['number'] > 0) {
+			$app->error($app->tform->lng('template_del_aborted_txt'));
+		}
+        
+        // check old style
 		$rec = $app->db->queryOneRecord("SELECT count(client_id) as number FROM client WHERE template_master = ".$this->id." OR template_additional like '%/".$this->id."/%'");
 		if($rec['number'] > 0) {
 			$app->error($app->tform->lng('template_del_aborted_txt'));
diff --git a/interface/web/client/client_template_edit.php b/interface/web/client/client_template_edit.php
index a683800..bb2fd94 100644
--- a/interface/web/client/client_template_edit.php
+++ b/interface/web/client/client_template_edit.php
@@ -81,7 +81,7 @@
 		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 . "/%' OR template_additional LIKE '" . $this->id . "/%' OR template_additional LIKE '%/" . $this->id . "'";
+			$sql = "SELECT client_id FROM client WHERE template_additional LIKE '%/" . $this->id . "/%' OR template_additional LIKE '" . $this->id . "/%' OR template_additional LIKE '%/" . $this->id . "' UNION SELECT client_id FROM client_template_assigned WHERE client_template_id = " . $this->id;
 		}
 		$clients = $app->db->queryAllRecords($sql);
 		if (is_array($clients)){
diff --git a/interface/web/client/form/client.tform.php b/interface/web/client/form/client.tform.php
index b29a831..0362480 100644
--- a/interface/web/client/form/client.tform.php
+++ b/interface/web/client/form/client.tform.php
@@ -100,6 +100,12 @@
 			'cols'		=> '',
 			'searchable' => 2
 		),
+		'gender' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'SELECT',
+			'default'	=> '',
+			'value'		=> array('' => '', 'm' => 'gender_m_txt', 'f' => 'gender_f_txt')
+		),
 		'contact_name' => array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
@@ -454,6 +460,18 @@
 			'cols'		=> '',
 			'searchable' => 2
 		),
+		'locked' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'CHECKBOX',
+			'default'	=> 'n',
+			'value'		=> array(0 => 'n',1 => 'y')
+		),
+		'canceled' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'CHECKBOX',
+			'default'	=> 'n',
+			'value'		=> array(0 => 'n',1 => 'y')
+		),
 	##################################
 	# END Datatable fields
 	##################################
diff --git a/interface/web/client/form/reseller.tform.php b/interface/web/client/form/reseller.tform.php
index a6c4bd9..c78ed8e 100644
--- a/interface/web/client/form/reseller.tform.php
+++ b/interface/web/client/form/reseller.tform.php
@@ -100,6 +100,12 @@
 			'cols'		=> '',
 			'searchable' => 2
 		),
+		'gender' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'SELECT',
+			'default'	=> '',
+			'value'		=> array('' => '', 'm' => 'gender_m_txt', 'f' => 'gender_f_txt')
+		),
 		'contact_name' => array (
 			'datatype'	=> 'VARCHAR',
 			'formtype'	=> 'TEXT',
@@ -451,6 +457,18 @@
 			'cols'		=> '',
 			'searchable' => 2
 		),
+		'locked' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'CHECKBOX',
+			'default'	=> 'n',
+			'value'		=> array(0 => 'n',1 => 'y')
+		),
+		'canceled' => array (
+			'datatype'	=> 'VARCHAR',
+			'formtype'	=> 'CHECKBOX',
+			'default'	=> 'n',
+			'value'		=> array(0 => 'n',1 => 'y')
+		),
 	##################################
 	# END Datatable fields
 	##################################
diff --git a/interface/web/client/lib/lang/ar_client.lng b/interface/web/client/lib/lang/ar_client.lng
index 42aeea1..0c1d0f6 100644
--- a/interface/web/client/lib/lang/ar_client.lng
+++ b/interface/web/client/lib/lang/ar_client.lng
@@ -143,4 +143,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/ar_client_del.lng b/interface/web/client/lib/lang/ar_client_del.lng
index a826d64..0932e95 100644
--- a/interface/web/client/lib/lang/ar_client_del.lng
+++ b/interface/web/client/lib/lang/ar_client_del.lng
@@ -3,4 +3,5 @@
 $wb['delete_explanation'] = 'This action will delete the following number of records associated with this client';
 $wb['btn_save_txt'] = 'Delete the client';
 $wb['btn_cancel_txt'] = 'Cancel without deleting the client';
+$wb['confirm_client_delete_txt'] = 'Are you sure you want to delete this client?';
 ?>
diff --git a/interface/web/client/lib/lang/ar_client_template_list.lng b/interface/web/client/lib/lang/ar_client_template_list.lng
index b93a5f9..0840184 100644
--- a/interface/web/client/lib/lang/ar_client_template_list.lng
+++ b/interface/web/client/lib/lang/ar_client_template_list.lng
@@ -2,4 +2,5 @@
 $wb['list_head_txt'] = 'Client-Templates';
 $wb['template_type_txt'] = 'Type';
 $wb['template_name_txt'] = 'Template name';
+$wb['template_id_txt'] = 'Template ID';
 ?>
diff --git a/interface/web/client/lib/lang/ar_reseller.lng b/interface/web/client/lib/lang/ar_reseller.lng
index 91025a9..32c9bb1 100644
--- a/interface/web/client/lib/lang/ar_reseller.lng
+++ b/interface/web/client/lib/lang/ar_reseller.lng
@@ -142,4 +142,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/bg_client.lng b/interface/web/client/lib/lang/bg_client.lng
index 7d8a12a..229dace 100644
--- a/interface/web/client/lib/lang/bg_client.lng
+++ b/interface/web/client/lib/lang/bg_client.lng
@@ -143,4 +143,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/bg_client_del.lng b/interface/web/client/lib/lang/bg_client_del.lng
index 8c5e36a..54d4831 100644
--- a/interface/web/client/lib/lang/bg_client_del.lng
+++ b/interface/web/client/lib/lang/bg_client_del.lng
@@ -3,4 +3,5 @@
 $wb['delete_explanation'] = 'This action will delete the following number of records associated with this client';
 $wb['btn_save_txt'] = 'Изтрии клиента';
 $wb['btn_cancel_txt'] = 'Отказ, без изтриване на клиента';
+$wb['confirm_client_delete_txt'] = 'Are you sure you want to delete this client?';
 ?>
diff --git a/interface/web/client/lib/lang/bg_client_template_list.lng b/interface/web/client/lib/lang/bg_client_template_list.lng
index b93a5f9..0840184 100644
--- a/interface/web/client/lib/lang/bg_client_template_list.lng
+++ b/interface/web/client/lib/lang/bg_client_template_list.lng
@@ -2,4 +2,5 @@
 $wb['list_head_txt'] = 'Client-Templates';
 $wb['template_type_txt'] = 'Type';
 $wb['template_name_txt'] = 'Template name';
+$wb['template_id_txt'] = 'Template ID';
 ?>
diff --git a/interface/web/client/lib/lang/bg_reseller.lng b/interface/web/client/lib/lang/bg_reseller.lng
index 6f57b52..857e4a8 100644
--- a/interface/web/client/lib/lang/bg_reseller.lng
+++ b/interface/web/client/lib/lang/bg_reseller.lng
@@ -142,4 +142,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/br_client.lng b/interface/web/client/lib/lang/br_client.lng
index 01b45f2..ae2c122 100644
--- a/interface/web/client/lib/lang/br_client.lng
+++ b/interface/web/client/lib/lang/br_client.lng
@@ -143,4 +143,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/br_client_del.lng b/interface/web/client/lib/lang/br_client_del.lng
index 57788b0..3b879b0 100644
--- a/interface/web/client/lib/lang/br_client_del.lng
+++ b/interface/web/client/lib/lang/br_client_del.lng
@@ -3,4 +3,5 @@
 $wb['delete_explanation'] = 'Atenção: está ação ira remover todos os objetos associados ao cliente!';
 $wb['btn_save_txt'] = 'Remover o cliente';
 $wb['btn_cancel_txt'] = 'Cancelar sem remover o cliente';
+$wb['confirm_client_delete_txt'] = 'Are you sure you want to delete this client?';
 ?>
diff --git a/interface/web/client/lib/lang/br_client_template_list.lng b/interface/web/client/lib/lang/br_client_template_list.lng
index 231f7fd..f5d9ee6 100644
--- a/interface/web/client/lib/lang/br_client_template_list.lng
+++ b/interface/web/client/lib/lang/br_client_template_list.lng
@@ -2,4 +2,5 @@
 $wb['list_head_txt'] = 'Gabarito de Cliente ';
 $wb['template_type_txt'] = 'Tipo';
 $wb['template_name_txt'] = 'Nome do Gabarito';
+$wb['template_id_txt'] = 'Template ID';
 ?>
diff --git a/interface/web/client/lib/lang/br_reseller.lng b/interface/web/client/lib/lang/br_reseller.lng
index c565aec..2fa5368 100644
--- a/interface/web/client/lib/lang/br_reseller.lng
+++ b/interface/web/client/lib/lang/br_reseller.lng
@@ -142,4 +142,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/cz_client.lng b/interface/web/client/lib/lang/cz_client.lng
index eb1273f..d5980d1 100644
--- a/interface/web/client/lib/lang/cz_client.lng
+++ b/interface/web/client/lib/lang/cz_client.lng
@@ -143,4 +143,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/cz_client_del.lng b/interface/web/client/lib/lang/cz_client_del.lng
index 4515806..ca1a13f 100644
--- a/interface/web/client/lib/lang/cz_client_del.lng
+++ b/interface/web/client/lib/lang/cz_client_del.lng
@@ -3,4 +3,5 @@
 $wb['delete_explanation'] = 'Tato akce smaže následující počet záznamů přidružených s tímto klientem';
 $wb['btn_save_txt'] = 'Smazat klienta';
 $wb['btn_cancel_txt'] = 'Zrušit bez smazání klienta';
+$wb['confirm_client_delete_txt'] = 'Are you sure you want to delete this client?';
 ?>
diff --git a/interface/web/client/lib/lang/cz_client_template_list.lng b/interface/web/client/lib/lang/cz_client_template_list.lng
index c3faae1..675da95 100644
--- a/interface/web/client/lib/lang/cz_client_template_list.lng
+++ b/interface/web/client/lib/lang/cz_client_template_list.lng
@@ -2,4 +2,5 @@
 $wb['list_head_txt'] = 'Klientské šablony';
 $wb['template_type_txt'] = 'Typ';
 $wb['template_name_txt'] = 'Název šablony';
+$wb['template_id_txt'] = 'Template ID';
 ?>
diff --git a/interface/web/client/lib/lang/cz_reseller.lng b/interface/web/client/lib/lang/cz_reseller.lng
index 6e7fec6..07af2a4 100644
--- a/interface/web/client/lib/lang/cz_reseller.lng
+++ b/interface/web/client/lib/lang/cz_reseller.lng
@@ -142,4 +142,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/de_client.lng b/interface/web/client/lib/lang/de_client.lng
index 57310d8..4aa8abd 100644
--- a/interface/web/client/lib/lang/de_client.lng
+++ b/interface/web/client/lib/lang/de_client.lng
@@ -144,4 +144,9 @@
 $wb['limit_aps_txt'] = 'Max. Anzahl an APS-Instanzen';
 $wb['limit_aps_error_notint'] = 'Das APS Instanzen Limit muss eine Zahl sein.';
 $wb['default_slave_dnsserver_txt'] = 'Standard Secondary DNS Server';
+$wb['locked_txt'] = 'Gesperrt (deaktiviert alle Webs, etc.)';
+$wb['canceled_txt'] = 'Gek&uuml;ndigt (verhindert Kundenlogin)';
+$wb['gender_txt'] = 'Anrede';
+$wb['gender_m_txt'] = 'Herr';
+$wb['gender_f_txt'] = 'Frau';
 ?>
diff --git a/interface/web/client/lib/lang/de_reseller.lng b/interface/web/client/lib/lang/de_reseller.lng
index 072d648..9bc4d53 100644
--- a/interface/web/client/lib/lang/de_reseller.lng
+++ b/interface/web/client/lib/lang/de_reseller.lng
@@ -143,4 +143,9 @@
 $wb['limit_aps_txt'] = 'Max. Anzahl an APS-Instanzen';
 $wb['limit_aps_error_notint'] = 'Das APS Instanzen Limit muss eine Zahl sein.';
 $wb['default_slave_dnsserver_txt'] = 'Standard Secondary DNS Server';
+$wb['locked_txt'] = 'Gesperrt';
+$wb['canceled_txt'] = 'Gek&uuml;ndigt';
+$wb['gender_m_txt'] = 'Herr';
+$wb['gender_f_txt'] = 'Frau';
+$wb['gender_txt'] = 'Anrede';
 ?>
diff --git a/interface/web/client/lib/lang/el_client.lng b/interface/web/client/lib/lang/el_client.lng
index 6fdb9cf..ba5c682 100644
--- a/interface/web/client/lib/lang/el_client.lng
+++ b/interface/web/client/lib/lang/el_client.lng
@@ -143,4 +143,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/el_client_del.lng b/interface/web/client/lib/lang/el_client_del.lng
index ef21bfe..60ebd61 100644
--- a/interface/web/client/lib/lang/el_client_del.lng
+++ b/interface/web/client/lib/lang/el_client_del.lng
@@ -3,4 +3,5 @@
 $wb['delete_explanation'] = 'Η ενέργεια θα διαγράψει τις παρακάτω εγγραφές που αφορούν τον πελάτη';
 $wb['btn_save_txt'] = 'Διαγραφή πελάτη';
 $wb['btn_cancel_txt'] = 'Ακύρωση χωρίς διαγραφή πελάτη';
+$wb['confirm_client_delete_txt'] = 'Are you sure you want to delete this client?';
 ?>
diff --git a/interface/web/client/lib/lang/el_client_template_list.lng b/interface/web/client/lib/lang/el_client_template_list.lng
index 1ce866d..175c2bf 100644
--- a/interface/web/client/lib/lang/el_client_template_list.lng
+++ b/interface/web/client/lib/lang/el_client_template_list.lng
@@ -2,4 +2,5 @@
 $wb['list_head_txt'] = 'Πρότυπα Πελάτη';
 $wb['template_type_txt'] = 'Τύπος';
 $wb['template_name_txt'] = 'Όνομα Προτύπου';
+$wb['template_id_txt'] = 'Template ID';
 ?>
diff --git a/interface/web/client/lib/lang/el_reseller.lng b/interface/web/client/lib/lang/el_reseller.lng
index 2438cda..c920ab6 100644
--- a/interface/web/client/lib/lang/el_reseller.lng
+++ b/interface/web/client/lib/lang/el_reseller.lng
@@ -142,4 +142,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/en_client.lng b/interface/web/client/lib/lang/en_client.lng
index 69574d8..7c4ee26 100644
--- a/interface/web/client/lib/lang/en_client.lng
+++ b/interface/web/client/lib/lang/en_client.lng
@@ -147,4 +147,9 @@
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
 $wb["default_slave_dnsserver_txt"] = 'Default Secondary DNS Server';
+$wb['locked_txt'] = 'Locked (disables all webs etc.)';
+$wb['canceled_txt'] = 'Canceled (disables client login)';
+$wb['gender_txt'] = 'Title';
+$wb['gender_m_txt'] = 'Mr.';
+$wb['gender_f_txt'] = 'Ms.';
 ?>
diff --git a/interface/web/client/lib/lang/en_reseller.lng b/interface/web/client/lib/lang/en_reseller.lng
index d936ddb..4076dd5 100644
--- a/interface/web/client/lib/lang/en_reseller.lng
+++ b/interface/web/client/lib/lang/en_reseller.lng
@@ -145,4 +145,9 @@
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
 $wb["default_slave_dnsserver_txt"] = 'Default Secondary DNS Server';
+$wb['locked_txt'] = 'Locked';
+$wb['canceled_txt'] = 'Canceled';
+$wb['gender_m_txt'] = 'Mr.';
+$wb['gender_f_txt'] = 'Ms.';
+$wb['gender_txt'] = 'Title';
 ?>
diff --git a/interface/web/client/lib/lang/es_client.lng b/interface/web/client/lib/lang/es_client.lng
index 751d863..d38b0b9 100644
--- a/interface/web/client/lib/lang/es_client.lng
+++ b/interface/web/client/lib/lang/es_client.lng
@@ -143,4 +143,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/es_client_del.lng b/interface/web/client/lib/lang/es_client_del.lng
index 8a3f580..a40194b 100644
--- a/interface/web/client/lib/lang/es_client_del.lng
+++ b/interface/web/client/lib/lang/es_client_del.lng
@@ -3,4 +3,5 @@
 $wb['delete_explanation'] = 'Esta acción eliminara los siguientes registros asociados a este cliente';
 $wb['btn_save_txt'] = 'Eliminar cliente';
 $wb['btn_cancel_txt'] = 'Cancelar sin eliminar cliente';
+$wb['confirm_client_delete_txt'] = 'Are you sure you want to delete this client?';
 ?>
diff --git a/interface/web/client/lib/lang/es_client_template_list.lng b/interface/web/client/lib/lang/es_client_template_list.lng
index 9bbe98d..66aefc7 100644
--- a/interface/web/client/lib/lang/es_client_template_list.lng
+++ b/interface/web/client/lib/lang/es_client_template_list.lng
@@ -2,4 +2,5 @@
 $wb['list_head_txt'] = 'Plantillas de clientes';
 $wb['template_type_txt'] = 'Tipo';
 $wb['template_name_txt'] = 'Nombre';
+$wb['template_id_txt'] = 'Template ID';
 ?>
diff --git a/interface/web/client/lib/lang/es_reseller.lng b/interface/web/client/lib/lang/es_reseller.lng
index 6b809ba..ea07f21 100644
--- a/interface/web/client/lib/lang/es_reseller.lng
+++ b/interface/web/client/lib/lang/es_reseller.lng
@@ -142,4 +142,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/fi_client.lng b/interface/web/client/lib/lang/fi_client.lng
index c0b38cf..317c024 100755
--- a/interface/web/client/lib/lang/fi_client.lng
+++ b/interface/web/client/lib/lang/fi_client.lng
@@ -143,4 +143,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/fi_client_del.lng b/interface/web/client/lib/lang/fi_client_del.lng
index 6ddc1f1..b87895b 100644
--- a/interface/web/client/lib/lang/fi_client_del.lng
+++ b/interface/web/client/lib/lang/fi_client_del.lng
@@ -3,4 +3,5 @@
 $wb['delete_explanation'] = 'Tämä toiminto alla olevan määrän tämän asiakkaan tietueita';
 $wb['btn_save_txt'] = 'Poista käyttäjä';
 $wb['btn_cancel_txt'] = 'Keskeytä poistamatta asiakasta';
+$wb['confirm_client_delete_txt'] = 'Are you sure you want to delete this client?';
 ?>
diff --git a/interface/web/client/lib/lang/fi_client_template_list.lng b/interface/web/client/lib/lang/fi_client_template_list.lng
index 094c3c7..b3f310f 100755
--- a/interface/web/client/lib/lang/fi_client_template_list.lng
+++ b/interface/web/client/lib/lang/fi_client_template_list.lng
@@ -2,4 +2,5 @@
 $wb['list_head_txt'] = 'Asiakasmallit';
 $wb['template_type_txt'] = 'Tyyppi';
 $wb['template_name_txt'] = 'Asiakasmallin nimi';
+$wb['template_id_txt'] = 'Template ID';
 ?>
diff --git a/interface/web/client/lib/lang/fi_reseller.lng b/interface/web/client/lib/lang/fi_reseller.lng
index 25023da..ed9ebd1 100644
--- a/interface/web/client/lib/lang/fi_reseller.lng
+++ b/interface/web/client/lib/lang/fi_reseller.lng
@@ -142,4 +142,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/fr_client.lng b/interface/web/client/lib/lang/fr_client.lng
index 13e15ef..84400ca 100644
--- a/interface/web/client/lib/lang/fr_client.lng
+++ b/interface/web/client/lib/lang/fr_client.lng
@@ -143,4 +143,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/fr_client_del.lng b/interface/web/client/lib/lang/fr_client_del.lng
index b4d7d55..de7757a 100644
--- a/interface/web/client/lib/lang/fr_client_del.lng
+++ b/interface/web/client/lib/lang/fr_client_del.lng
@@ -3,4 +3,5 @@
 $wb['delete_explanation'] = 'Cette action va supprimer le nombre d\'enregistrements suivants associés avec le client';
 $wb['btn_save_txt'] = 'Effacer le client';
 $wb['btn_cancel_txt'] = 'Annuler sans effacer le client';
+$wb['confirm_client_delete_txt'] = 'Are you sure you want to delete this client?';
 ?>
diff --git a/interface/web/client/lib/lang/fr_client_template_list.lng b/interface/web/client/lib/lang/fr_client_template_list.lng
index 3405427..571b870 100644
--- a/interface/web/client/lib/lang/fr_client_template_list.lng
+++ b/interface/web/client/lib/lang/fr_client_template_list.lng
@@ -2,4 +2,5 @@
 $wb['list_head_txt'] = 'Modèles de clients';
 $wb['template_type_txt'] = 'Type';
 $wb['template_name_txt'] = 'Nom du modèle';
+$wb['template_id_txt'] = 'Template ID';
 ?>
diff --git a/interface/web/client/lib/lang/fr_reseller.lng b/interface/web/client/lib/lang/fr_reseller.lng
index 7162656..f00be20 100644
--- a/interface/web/client/lib/lang/fr_reseller.lng
+++ b/interface/web/client/lib/lang/fr_reseller.lng
@@ -142,4 +142,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/hr_client.lng b/interface/web/client/lib/lang/hr_client.lng
index 3812613..ed38e03 100644
--- a/interface/web/client/lib/lang/hr_client.lng
+++ b/interface/web/client/lib/lang/hr_client.lng
@@ -143,4 +143,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/hr_client_del.lng b/interface/web/client/lib/lang/hr_client_del.lng
index 240f0c8..939cc59 100644
--- a/interface/web/client/lib/lang/hr_client_del.lng
+++ b/interface/web/client/lib/lang/hr_client_del.lng
@@ -3,4 +3,5 @@
 $wb['delete_explanation'] = 'Ukoliko potvrdite izbrisati će se svi zapisi povezani sa ovim klijentom';
 $wb['btn_save_txt'] = 'Obriši klijenta';
 $wb['btn_cancel_txt'] = 'Prekini i ne briši klijenta';
+$wb['confirm_client_delete_txt'] = 'Are you sure you want to delete this client?';
 ?>
diff --git a/interface/web/client/lib/lang/hr_client_template_list.lng b/interface/web/client/lib/lang/hr_client_template_list.lng
index d2c9518..cdc2f00 100644
--- a/interface/web/client/lib/lang/hr_client_template_list.lng
+++ b/interface/web/client/lib/lang/hr_client_template_list.lng
@@ -2,4 +2,5 @@
 $wb['list_head_txt'] = 'Predlošci za klijente';
 $wb['template_type_txt'] = 'Vrsta';
 $wb['template_name_txt'] = 'Naziv predloška';
+$wb['template_id_txt'] = 'Template ID';
 ?>
diff --git a/interface/web/client/lib/lang/hr_reseller.lng b/interface/web/client/lib/lang/hr_reseller.lng
index 5674d6a..1de56c7 100644
--- a/interface/web/client/lib/lang/hr_reseller.lng
+++ b/interface/web/client/lib/lang/hr_reseller.lng
@@ -142,4 +142,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/hu_client.lng b/interface/web/client/lib/lang/hu_client.lng
index b393ee7..7bcaccc 100644
--- a/interface/web/client/lib/lang/hu_client.lng
+++ b/interface/web/client/lib/lang/hu_client.lng
@@ -143,4 +143,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/hu_client_del.lng b/interface/web/client/lib/lang/hu_client_del.lng
index a826d64..0932e95 100644
--- a/interface/web/client/lib/lang/hu_client_del.lng
+++ b/interface/web/client/lib/lang/hu_client_del.lng
@@ -3,4 +3,5 @@
 $wb['delete_explanation'] = 'This action will delete the following number of records associated with this client';
 $wb['btn_save_txt'] = 'Delete the client';
 $wb['btn_cancel_txt'] = 'Cancel without deleting the client';
+$wb['confirm_client_delete_txt'] = 'Are you sure you want to delete this client?';
 ?>
diff --git a/interface/web/client/lib/lang/hu_client_template_list.lng b/interface/web/client/lib/lang/hu_client_template_list.lng
index 70e047f..316de63 100644
--- a/interface/web/client/lib/lang/hu_client_template_list.lng
+++ b/interface/web/client/lib/lang/hu_client_template_list.lng
@@ -2,4 +2,5 @@
 $wb['list_head_txt'] = 'Ügyfél-Sablonok';
 $wb['template_type_txt'] = 'típus';
 $wb['template_name_txt'] = 'Sablon neve';
+$wb['template_id_txt'] = 'Template ID';
 ?>
diff --git a/interface/web/client/lib/lang/hu_reseller.lng b/interface/web/client/lib/lang/hu_reseller.lng
index 9c45093..019bbc1 100644
--- a/interface/web/client/lib/lang/hu_reseller.lng
+++ b/interface/web/client/lib/lang/hu_reseller.lng
@@ -142,4 +142,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/id_client.lng b/interface/web/client/lib/lang/id_client.lng
index 549493f..339a310 100644
--- a/interface/web/client/lib/lang/id_client.lng
+++ b/interface/web/client/lib/lang/id_client.lng
@@ -143,4 +143,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/id_client_del.lng b/interface/web/client/lib/lang/id_client_del.lng
index c8b58ac..1adf18b 100644
--- a/interface/web/client/lib/lang/id_client_del.lng
+++ b/interface/web/client/lib/lang/id_client_del.lng
@@ -3,4 +3,5 @@
 $wb['delete_explanation'] = 'Tindakan ini akan menghapus sejumlah record yang terkait dengan klien ini';
 $wb['btn_save_txt'] = 'Hapus Klien';
 $wb['btn_cancel_txt'] = 'Batalkan Tanpa Menghapus Klien';
+$wb['confirm_client_delete_txt'] = 'Are you sure you want to delete this client?';
 ?>
diff --git a/interface/web/client/lib/lang/id_client_template_list.lng b/interface/web/client/lib/lang/id_client_template_list.lng
index b9ec9ab..e0da971 100644
--- a/interface/web/client/lib/lang/id_client_template_list.lng
+++ b/interface/web/client/lib/lang/id_client_template_list.lng
@@ -2,4 +2,5 @@
 $wb['list_head_txt'] = 'Template Klien';
 $wb['template_type_txt'] = 'Tipe';
 $wb['template_name_txt'] = 'Nama Template';
+$wb['template_id_txt'] = 'Template ID';
 ?>
diff --git a/interface/web/client/lib/lang/id_reseller.lng b/interface/web/client/lib/lang/id_reseller.lng
index f558d51..3c49f04 100644
--- a/interface/web/client/lib/lang/id_reseller.lng
+++ b/interface/web/client/lib/lang/id_reseller.lng
@@ -142,4 +142,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/it_client.lng b/interface/web/client/lib/lang/it_client.lng
index a2e6f3e..bb6b4e9 100644
--- a/interface/web/client/lib/lang/it_client.lng
+++ b/interface/web/client/lib/lang/it_client.lng
@@ -143,4 +143,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/it_client_del.lng b/interface/web/client/lib/lang/it_client_del.lng
index df74987..49811c3 100644
--- a/interface/web/client/lib/lang/it_client_del.lng
+++ b/interface/web/client/lib/lang/it_client_del.lng
@@ -3,4 +3,5 @@
 $wb['delete_explanation'] = 'Questa operazione cancellerà i seguenti record associati a questo cliente';
 $wb['btn_save_txt'] = 'Cancella cliente';
 $wb['btn_cancel_txt'] = 'Annulla senza cancellare il cliente';
+$wb['confirm_client_delete_txt'] = 'Are you sure you want to delete this client?';
 ?>
diff --git a/interface/web/client/lib/lang/it_client_template_list.lng b/interface/web/client/lib/lang/it_client_template_list.lng
index 03aa10e..d78faf8 100644
--- a/interface/web/client/lib/lang/it_client_template_list.lng
+++ b/interface/web/client/lib/lang/it_client_template_list.lng
@@ -2,4 +2,5 @@
 $wb['list_head_txt'] = 'Modelli cliente';
 $wb['template_type_txt'] = 'Tipo';
 $wb['template_name_txt'] = 'Nome modello';
+$wb['template_id_txt'] = 'Template ID';
 ?>
diff --git a/interface/web/client/lib/lang/it_reseller.lng b/interface/web/client/lib/lang/it_reseller.lng
index 91025a9..32c9bb1 100644
--- a/interface/web/client/lib/lang/it_reseller.lng
+++ b/interface/web/client/lib/lang/it_reseller.lng
@@ -142,4 +142,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/ja_client.lng b/interface/web/client/lib/lang/ja_client.lng
index e11629f..85e35b9 100644
--- a/interface/web/client/lib/lang/ja_client.lng
+++ b/interface/web/client/lib/lang/ja_client.lng
@@ -143,4 +143,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/ja_client_del.lng b/interface/web/client/lib/lang/ja_client_del.lng
index a826d64..0932e95 100644
--- a/interface/web/client/lib/lang/ja_client_del.lng
+++ b/interface/web/client/lib/lang/ja_client_del.lng
@@ -3,4 +3,5 @@
 $wb['delete_explanation'] = 'This action will delete the following number of records associated with this client';
 $wb['btn_save_txt'] = 'Delete the client';
 $wb['btn_cancel_txt'] = 'Cancel without deleting the client';
+$wb['confirm_client_delete_txt'] = 'Are you sure you want to delete this client?';
 ?>
diff --git a/interface/web/client/lib/lang/ja_client_template_list.lng b/interface/web/client/lib/lang/ja_client_template_list.lng
index 05d3358..8adca01 100644
--- a/interface/web/client/lib/lang/ja_client_template_list.lng
+++ b/interface/web/client/lib/lang/ja_client_template_list.lng
@@ -2,4 +2,5 @@
 $wb['list_head_txt'] = 'クライアントテンプレート';
 $wb['template_type_txt'] = '種別';
 $wb['template_name_txt'] = 'テンプレート名';
+$wb['template_id_txt'] = 'Template ID';
 ?>
diff --git a/interface/web/client/lib/lang/ja_reseller.lng b/interface/web/client/lib/lang/ja_reseller.lng
index 812dbf4..9f3251d 100644
--- a/interface/web/client/lib/lang/ja_reseller.lng
+++ b/interface/web/client/lib/lang/ja_reseller.lng
@@ -142,4 +142,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/nl_client.lng b/interface/web/client/lib/lang/nl_client.lng
index a86a887..42bea64 100644
--- a/interface/web/client/lib/lang/nl_client.lng
+++ b/interface/web/client/lib/lang/nl_client.lng
@@ -143,4 +143,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/nl_client_del.lng b/interface/web/client/lib/lang/nl_client_del.lng
index 00b7c2f..6a6b3b6 100644
--- a/interface/web/client/lib/lang/nl_client_del.lng
+++ b/interface/web/client/lib/lang/nl_client_del.lng
@@ -3,4 +3,5 @@
 $wb['delete_explanation'] = 'Deze actie verwijderd het volgende aantal aan records die geassocieerd zijn met deze klant';
 $wb['btn_save_txt'] = 'Verwijder de klant';
 $wb['btn_cancel_txt'] = 'Annuleren zonder de klant te verwijderen';
+$wb['confirm_client_delete_txt'] = 'Are you sure you want to delete this client?';
 ?>
diff --git a/interface/web/client/lib/lang/nl_client_template_list.lng b/interface/web/client/lib/lang/nl_client_template_list.lng
index 228f195..8bbe7a5 100644
--- a/interface/web/client/lib/lang/nl_client_template_list.lng
+++ b/interface/web/client/lib/lang/nl_client_template_list.lng
@@ -2,4 +2,5 @@
 $wb['list_head_txt'] = 'Client-Templates';
 $wb['template_type_txt'] = 'Type';
 $wb['template_name_txt'] = 'Template naam';
+$wb['template_id_txt'] = 'Template ID';
 ?>
diff --git a/interface/web/client/lib/lang/nl_reseller.lng b/interface/web/client/lib/lang/nl_reseller.lng
index bf3eedc..cf87157 100644
--- a/interface/web/client/lib/lang/nl_reseller.lng
+++ b/interface/web/client/lib/lang/nl_reseller.lng
@@ -142,4 +142,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/pl_client.lng b/interface/web/client/lib/lang/pl_client.lng
index 3607bff..3f8ac0c 100644
--- a/interface/web/client/lib/lang/pl_client.lng
+++ b/interface/web/client/lib/lang/pl_client.lng
@@ -143,4 +143,5 @@
 $wb['aps_limits_txt'] = 'Limity Instalatora APS';
 $wb['limit_aps_txt'] = 'Maks. liczba instalacji APS';
 $wb['limit_aps_error_notint'] = 'Limit instalacji APS musi być liczbą';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/pl_client_del.lng b/interface/web/client/lib/lang/pl_client_del.lng
index 666e12a..429c61b 100644
--- a/interface/web/client/lib/lang/pl_client_del.lng
+++ b/interface/web/client/lib/lang/pl_client_del.lng
@@ -3,4 +3,5 @@
 $wb['delete_explanation'] = 'Ta akcja usunie następującą liczbę rekordów powiązanych z klientem';
 $wb['btn_save_txt'] = 'Usuń klienta';
 $wb['btn_cancel_txt'] = 'Anuluj bez usuwania klienta';
+$wb['confirm_client_delete_txt'] = 'Are you sure you want to delete this client?';
 ?>
diff --git a/interface/web/client/lib/lang/pl_client_template_list.lng b/interface/web/client/lib/lang/pl_client_template_list.lng
index 06a3976..d6bd952 100644
--- a/interface/web/client/lib/lang/pl_client_template_list.lng
+++ b/interface/web/client/lib/lang/pl_client_template_list.lng
@@ -2,4 +2,5 @@
 $wb['list_head_txt'] = 'Szablon klienta';
 $wb['template_type_txt'] = 'Typ';
 $wb['template_name_txt'] = 'Nazwa szablonu';
+$wb['template_id_txt'] = 'Template ID';
 ?>
diff --git a/interface/web/client/lib/lang/pl_reseller.lng b/interface/web/client/lib/lang/pl_reseller.lng
index 64bd813..63e4c23 100644
--- a/interface/web/client/lib/lang/pl_reseller.lng
+++ b/interface/web/client/lib/lang/pl_reseller.lng
@@ -142,4 +142,5 @@
 $wb['aps_limits_txt'] = 'Limit instalacji APS';
 $wb['limit_aps_txt'] = 'Maks. liczba instancji APS';
 $wb['limit_aps_error_notint'] = 'Limit instancji APS musi być liczbą';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/pt_client.lng b/interface/web/client/lib/lang/pt_client.lng
index 5798a00..9e43b0f 100644
--- a/interface/web/client/lib/lang/pt_client.lng
+++ b/interface/web/client/lib/lang/pt_client.lng
@@ -143,4 +143,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/pt_client_del.lng b/interface/web/client/lib/lang/pt_client_del.lng
index ba2425d..ef71fa9 100644
--- a/interface/web/client/lib/lang/pt_client_del.lng
+++ b/interface/web/client/lib/lang/pt_client_del.lng
@@ -3,4 +3,5 @@
 $wb['delete_explanation'] = 'Atenção: está acção ira remover todos os objectos associados ao cliente!';
 $wb['btn_save_txt'] = 'Remover o cliente';
 $wb['btn_cancel_txt'] = 'Cancelar sem remover o cliente';
+$wb['confirm_client_delete_txt'] = 'Are you sure you want to delete this client?';
 ?>
diff --git a/interface/web/client/lib/lang/pt_client_template_list.lng b/interface/web/client/lib/lang/pt_client_template_list.lng
index cd57886..d5f4511 100644
--- a/interface/web/client/lib/lang/pt_client_template_list.lng
+++ b/interface/web/client/lib/lang/pt_client_template_list.lng
@@ -2,4 +2,5 @@
 $wb['list_head_txt'] = 'Templates de Cliente ';
 $wb['template_type_txt'] = 'Tipo';
 $wb['template_name_txt'] = 'Nome da template';
+$wb['template_id_txt'] = 'Template ID';
 ?>
diff --git a/interface/web/client/lib/lang/pt_reseller.lng b/interface/web/client/lib/lang/pt_reseller.lng
index 7e46600..d2f34e9 100644
--- a/interface/web/client/lib/lang/pt_reseller.lng
+++ b/interface/web/client/lib/lang/pt_reseller.lng
@@ -142,4 +142,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/ro_client.lng b/interface/web/client/lib/lang/ro_client.lng
index 5651460..50dd005 100644
--- a/interface/web/client/lib/lang/ro_client.lng
+++ b/interface/web/client/lib/lang/ro_client.lng
@@ -143,4 +143,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/ro_client_del.lng b/interface/web/client/lib/lang/ro_client_del.lng
index a826d64..0932e95 100644
--- a/interface/web/client/lib/lang/ro_client_del.lng
+++ b/interface/web/client/lib/lang/ro_client_del.lng
@@ -3,4 +3,5 @@
 $wb['delete_explanation'] = 'This action will delete the following number of records associated with this client';
 $wb['btn_save_txt'] = 'Delete the client';
 $wb['btn_cancel_txt'] = 'Cancel without deleting the client';
+$wb['confirm_client_delete_txt'] = 'Are you sure you want to delete this client?';
 ?>
diff --git a/interface/web/client/lib/lang/ro_client_template_list.lng b/interface/web/client/lib/lang/ro_client_template_list.lng
index b19f5d4..17fbf99 100644
--- a/interface/web/client/lib/lang/ro_client_template_list.lng
+++ b/interface/web/client/lib/lang/ro_client_template_list.lng
@@ -2,4 +2,5 @@
 $wb['list_head_txt'] = 'Template client';
 $wb['template_type_txt'] = 'Tp';
 $wb['template_name_txt'] = 'Nume Template';
+$wb['template_id_txt'] = 'Template ID';
 ?>
diff --git a/interface/web/client/lib/lang/ro_reseller.lng b/interface/web/client/lib/lang/ro_reseller.lng
index 91025a9..32c9bb1 100644
--- a/interface/web/client/lib/lang/ro_reseller.lng
+++ b/interface/web/client/lib/lang/ro_reseller.lng
@@ -142,4 +142,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/ru_client.lng b/interface/web/client/lib/lang/ru_client.lng
index b927418..1bd8e59 100644
--- a/interface/web/client/lib/lang/ru_client.lng
+++ b/interface/web/client/lib/lang/ru_client.lng
@@ -143,4 +143,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/ru_client_del.lng b/interface/web/client/lib/lang/ru_client_del.lng
index 96a5774..8fae0aa 100644
--- a/interface/web/client/lib/lang/ru_client_del.lng
+++ b/interface/web/client/lib/lang/ru_client_del.lng
@@ -3,4 +3,5 @@
 $wb['delete_explanation'] = 'Это действие удалит следующее число записей сопоставленных с этим клиентом';
 $wb['btn_save_txt'] = 'Удалить клиента';
 $wb['btn_cancel_txt'] = 'Отменить без удаления';
+$wb['confirm_client_delete_txt'] = 'Are you sure you want to delete this client?';
 ?>
diff --git a/interface/web/client/lib/lang/ru_client_template_list.lng b/interface/web/client/lib/lang/ru_client_template_list.lng
index b1a90d8..dbdde0e 100644
--- a/interface/web/client/lib/lang/ru_client_template_list.lng
+++ b/interface/web/client/lib/lang/ru_client_template_list.lng
@@ -2,4 +2,5 @@
 $wb['list_head_txt'] = 'Шаблоны клиентов';
 $wb['template_type_txt'] = 'Тип';
 $wb['template_name_txt'] = 'Имя шаблона';
+$wb['template_id_txt'] = 'Template ID';
 ?>
diff --git a/interface/web/client/lib/lang/ru_reseller.lng b/interface/web/client/lib/lang/ru_reseller.lng
index 3c24b30..29975f2 100644
--- a/interface/web/client/lib/lang/ru_reseller.lng
+++ b/interface/web/client/lib/lang/ru_reseller.lng
@@ -142,4 +142,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/se_client.lng b/interface/web/client/lib/lang/se_client.lng
index cbc9917..c2a31de 100644
--- a/interface/web/client/lib/lang/se_client.lng
+++ b/interface/web/client/lib/lang/se_client.lng
@@ -143,4 +143,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/se_client_del.lng b/interface/web/client/lib/lang/se_client_del.lng
index a826d64..0932e95 100644
--- a/interface/web/client/lib/lang/se_client_del.lng
+++ b/interface/web/client/lib/lang/se_client_del.lng
@@ -3,4 +3,5 @@
 $wb['delete_explanation'] = 'This action will delete the following number of records associated with this client';
 $wb['btn_save_txt'] = 'Delete the client';
 $wb['btn_cancel_txt'] = 'Cancel without deleting the client';
+$wb['confirm_client_delete_txt'] = 'Are you sure you want to delete this client?';
 ?>
diff --git a/interface/web/client/lib/lang/se_client_template_list.lng b/interface/web/client/lib/lang/se_client_template_list.lng
index b93a5f9..0840184 100644
--- a/interface/web/client/lib/lang/se_client_template_list.lng
+++ b/interface/web/client/lib/lang/se_client_template_list.lng
@@ -2,4 +2,5 @@
 $wb['list_head_txt'] = 'Client-Templates';
 $wb['template_type_txt'] = 'Type';
 $wb['template_name_txt'] = 'Template name';
+$wb['template_id_txt'] = 'Template ID';
 ?>
diff --git a/interface/web/client/lib/lang/se_reseller.lng b/interface/web/client/lib/lang/se_reseller.lng
index 91025a9..32c9bb1 100644
--- a/interface/web/client/lib/lang/se_reseller.lng
+++ b/interface/web/client/lib/lang/se_reseller.lng
@@ -142,4 +142,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/sk_client.lng b/interface/web/client/lib/lang/sk_client.lng
index 7dea61a..42e0f3c 100644
--- a/interface/web/client/lib/lang/sk_client.lng
+++ b/interface/web/client/lib/lang/sk_client.lng
@@ -143,4 +143,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/sk_client_del.lng b/interface/web/client/lib/lang/sk_client_del.lng
index a826d64..0932e95 100644
--- a/interface/web/client/lib/lang/sk_client_del.lng
+++ b/interface/web/client/lib/lang/sk_client_del.lng
@@ -3,4 +3,5 @@
 $wb['delete_explanation'] = 'This action will delete the following number of records associated with this client';
 $wb['btn_save_txt'] = 'Delete the client';
 $wb['btn_cancel_txt'] = 'Cancel without deleting the client';
+$wb['confirm_client_delete_txt'] = 'Are you sure you want to delete this client?';
 ?>
diff --git a/interface/web/client/lib/lang/sk_client_template_list.lng b/interface/web/client/lib/lang/sk_client_template_list.lng
index b3b5de8..ac25b8f 100644
--- a/interface/web/client/lib/lang/sk_client_template_list.lng
+++ b/interface/web/client/lib/lang/sk_client_template_list.lng
@@ -2,4 +2,5 @@
 $wb['list_head_txt'] = 'Klient-Šablóny';
 $wb['template_type_txt'] = 'Typ';
 $wb['template_name_txt'] = 'Meno šablóny';
+$wb['template_id_txt'] = 'Template ID';
 ?>
diff --git a/interface/web/client/lib/lang/sk_reseller.lng b/interface/web/client/lib/lang/sk_reseller.lng
index 792c131..ab95430 100644
--- a/interface/web/client/lib/lang/sk_reseller.lng
+++ b/interface/web/client/lib/lang/sk_reseller.lng
@@ -142,4 +142,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/tr_client.lng b/interface/web/client/lib/lang/tr_client.lng
index 13bb60e..e3c5c53 100644
--- a/interface/web/client/lib/lang/tr_client.lng
+++ b/interface/web/client/lib/lang/tr_client.lng
@@ -143,4 +143,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/lib/lang/tr_client_del.lng b/interface/web/client/lib/lang/tr_client_del.lng
index 91c8198..62e7876 100644
--- a/interface/web/client/lib/lang/tr_client_del.lng
+++ b/interface/web/client/lib/lang/tr_client_del.lng
@@ -3,4 +3,5 @@
 $wb['delete_explanation'] = 'Bu işlem ilgili müşteri ile alakalı bütün kayıtları silecektir.';
 $wb['btn_save_txt'] = 'Müşteriyi sil';
 $wb['btn_cancel_txt'] = 'İptal et';
+$wb['confirm_client_delete_txt'] = 'Are you sure you want to delete this client?';
 ?>
diff --git a/interface/web/client/lib/lang/tr_client_template_list.lng b/interface/web/client/lib/lang/tr_client_template_list.lng
index af5c1c7..ea91861 100644
--- a/interface/web/client/lib/lang/tr_client_template_list.lng
+++ b/interface/web/client/lib/lang/tr_client_template_list.lng
@@ -2,4 +2,5 @@
 $wb['list_head_txt'] = 'Müşteri-Şablon';
 $wb['template_type_txt'] = 'Çeşit';
 $wb['template_name_txt'] = 'Şablon adı';
+$wb['template_id_txt'] = 'Template ID';
 ?>
diff --git a/interface/web/client/lib/lang/tr_reseller.lng b/interface/web/client/lib/lang/tr_reseller.lng
index ce687c5..f04edbf 100644
--- a/interface/web/client/lib/lang/tr_reseller.lng
+++ b/interface/web/client/lib/lang/tr_reseller.lng
@@ -142,4 +142,5 @@
 $wb['aps_limits_txt'] = 'APS Installer Limits';
 $wb['limit_aps_txt'] = 'Max. number of APS instances';
 $wb['limit_aps_error_notint'] = 'The APS instances limit must be a number.';
+$wb['default_slave_dnsserver_txt'] = 'Default Secondary DNS Server';
 ?>
diff --git a/interface/web/client/reseller_edit.php b/interface/web/client/reseller_edit.php
index 1d02237..ca2780c 100644
--- a/interface/web/client/reseller_edit.php
+++ b/interface/web/client/reseller_edit.php
@@ -113,16 +113,30 @@
 		}
 		$app->tpl->setVar('tpl_add_select',$option);
 
-		$sql = "SELECT template_additional FROM client WHERE client_id = " . $this->id;
-		$result = $app->db->queryOneRecord($sql);
-		$tplAdd = explode("/", $result['template_additional']);
-		$text = '';
-		foreach($tplAdd as $item){
-			if (trim($item) != ''){
-				if ($text != '') $text .= '<br />';
-				$text .= $tpl[$item];
-			}
-		}
+        // check for new-style records
+        $result = $app->db->queryAllRecords('SELECT assigned_template_id, client_template_id FROM client_template_assigned WHERE client_id = ' . $this->id);
+        if($result && count($result) > 0) {
+            // new style
+            $text = '';
+            foreach($result as $item){
+                if (trim($item['client_template_id']) != ''){
+                    if ($text != '') $text .= '';
+                    $text .= '<li rel="' . $item['assigned_template_id'] . '">' . $tpl[$item['client_template_id']]. '<a href="#" class="button icons16 icoDelete"></a></li>';
+                }
+            }
+        } else {
+            // old style
+            $sql = "SELECT template_additional FROM client WHERE client_id = " . $this->id;
+            $result = $app->db->queryOneRecord($sql);
+            $tplAdd = explode("/", $result['template_additional']);
+            $text = '';
+            foreach($tplAdd as $item){
+                if (trim($item) != ''){
+                    if ($text != '') $text .= '';
+                    $text .= '<li>' . $tpl[$item]. '<a href="#" class="button icons16 icoDelete"></a></li>';
+                }
+            }
+        }
 
 		$app->tpl->setVar('template_additional_list', $text);
 
diff --git a/interface/web/client/templates/client_edit_address.htm b/interface/web/client/templates/client_edit_address.htm
index f9d96f0..018d1d5 100644
--- a/interface/web/client/templates/client_edit_address.htm
+++ b/interface/web/client/templates/client_edit_address.htm
@@ -10,6 +10,12 @@
                 <input name="company_name" id="company_name" value="{tmpl_var name='company_name'}" size="30" maxlength="255" type="text" class="textInput" />
             </div>
             <div class="ctrlHolder">
+                <label for="gender">{tmpl_var name='gender_txt'}</label>
+                <select name="gender" id="gender" class="selectInput">
+                    {tmpl_var name='gender'}
+                </select>
+            </div>
+            <div class="ctrlHolder">
                 <label for="contact_name">{tmpl_var name='contact_name_txt'}*</label>
                 <input name="contact_name" id="contact_name" value="{tmpl_var name='contact_name'}" size="30" maxlength="255" type="text" class="textInput" />
             </div>
@@ -134,6 +140,18 @@
                 <label for="notes">{tmpl_var name='notes_txt'}</label>
                 <textarea name="notes" id="notes" rows='10' cols='30'>{tmpl_var name='notes'}</textarea>
             </div>
+            <div class="ctrlHolder">
+                <p class="label">{tmpl_var name='locked_txt'}</p>
+                <div class="multiField">
+                    {tmpl_var name='locked'}
+                </div>
+            </div>
+            <div class="ctrlHolder">
+                <p class="label">{tmpl_var name='canceled_txt'}</p>
+                <div class="multiField">
+                    {tmpl_var name='canceled'}
+                </div>
+            </div>
             {tmpl_var name='required_fields_txt'}
         </fieldset>
 
diff --git a/interface/web/client/templates/client_edit_limits.htm b/interface/web/client/templates/client_edit_limits.htm
index 2e81002..ba349b6 100644
--- a/interface/web/client/templates/client_edit_limits.htm
+++ b/interface/web/client/templates/client_edit_limits.htm
@@ -8,7 +8,6 @@
             <fieldset><legend>{tmpl_var name="toolsarea_head_txt"}</legend>
                 <div class="buttons topbuttons">
                     <button class="positive iconstxt icoAdd" type="button" value="{tmpl_var name='add_additional_template_txt'}" onclick="addAdditionalTemplate();"><span>{tmpl_var name='add_additional_template_txt'}</span></button>
-                    <button class="negative iconstxt icoDelete" type="button" value="{tmpl_var name='delete_additional_template_txt'}" onclick="delAdditionalTemplate();"><span>{tmpl_var name='delete_additional_template_txt'}</span></button>
                 </div>
             </fieldset>
         </div>
@@ -309,6 +308,11 @@
     return ($('#template_master').val() == '0' ? true : false);
 }
 
+jQuery('#template_additional_list').find('li > a').click(function(e) {
+    e.preventDefault();
+    delAdditionalTemplate($(this).parent().attr('rel'));
+});
+
 jQuery('div.panel_client')
         .find('div.pnl_formsarea')
         .find('fieldset')
diff --git a/interface/web/client/templates/reseller_edit_address.htm b/interface/web/client/templates/reseller_edit_address.htm
index 67eabbe..4ffd78a 100644
--- a/interface/web/client/templates/reseller_edit_address.htm
+++ b/interface/web/client/templates/reseller_edit_address.htm
@@ -10,6 +10,12 @@
                 <input name="company_name" id="company_name" value="{tmpl_var name='company_name'}" size="30" maxlength="255" type="text" class="textInput" />
             </div>
             <div class="ctrlHolder">
+                <label for="gender">{tmpl_var name='gender_txt'}</label>
+                <select name="gender" id="gender" class="selectInput">
+                    {tmpl_var name='gender'}
+                </select>
+            </div>
+            <div class="ctrlHolder">
                 <label for="contact_name">{tmpl_var name='contact_name_txt'}*</label>
                 <input name="contact_name" id="contact_name" value="{tmpl_var name='contact_name'}" size="30" maxlength="255" type="text" class="textInput" />
             </div>
@@ -134,6 +140,18 @@
                 <label for="notes">{tmpl_var name='notes_txt'}</label>
                 <textarea name="notes" id="notes" rows='10' cols='30'>{tmpl_var name='notes'}</textarea>
             </div>
+            <div class="ctrlHolder">
+                <p class="label">{tmpl_var name='locked_txt'}</p>
+                <div class="multiField">
+                    {tmpl_var name='locked'}
+                </div>
+            </div>
+            <div class="ctrlHolder">
+                <p class="label">{tmpl_var name='canceled_txt'}</p>
+                <div class="multiField">
+                    {tmpl_var name='canceled'}
+                </div>
+            </div>
             {tmpl_var name='required_fields_txt'}
         </fieldset>
 
diff --git a/interface/web/dashboard/dashboard.php b/interface/web/dashboard/dashboard.php
index dae00f8..0626758 100644
--- a/interface/web/dashboard/dashboard.php
+++ b/interface/web/dashboard/dashboard.php
@@ -157,8 +157,36 @@
 
 /* Which dashlets in which column */
 /******************************************************************************/
-$leftcol_dashlets = array('modules','invoices','quota','mailquota');
-$rightcol_dashlets = array('limits');
+$default_leftcol_dashlets = array('modules','invoices','quota','mailquota');
+$default_rightcol_dashlets = array('limits');
+
+$app->uses('getconf');
+$dashlets_config = $app->getconf->get_global_config('misc');
+//* 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'])) {
+	$role = 'client';
+//* 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'])) {
+	$role = 'reseller';
+//* Admin: If the logged in user is admin
+} else {
+	$role = 'admin';
+}
+$dashlets_config[$role.'_dashlets_left'] = trim($dashlets_config[$role.'_dashlets_left']);
+$dashlets_config[$role.'_dashlets_right'] = trim($dashlets_config[$role.'_dashlets_right']);
+
+if($dashlets_config[$role.'_dashlets_left'] != ''){
+	preg_match_all('@\[(.*?)\]@', $dashlets_config[$role.'_dashlets_left'], $matches);
+	$leftcol_dashlets = $matches[1]; 
+} else {
+	$leftcol_dashlets = $default_leftcol_dashlets;
+}
+if($dashlets_config[$role.'_dashlets_right'] != ''){
+	preg_match_all('@\[(.*?)\]@', $dashlets_config[$role.'_dashlets_right'], $matches);
+	$rightcol_dashlets = $matches[1];
+} else {
+	$rightcol_dashlets = $default_rightcol_dashlets;
+}
 /******************************************************************************/
 
 
diff --git a/interface/web/dashboard/dashlets/templates/mailquota.htm b/interface/web/dashboard/dashlets/templates/mailquota.htm
index 25ee9d7..a239c48 100644
--- a/interface/web/dashboard/dashlets/templates/mailquota.htm
+++ b/interface/web/dashboard/dashlets/templates/mailquota.htm
@@ -1,6 +1,6 @@
 <div style="float: left;">
 	<h2>{tmpl_var name='mailquota_txt'}</h2>
-	<div style="width:320px;">
+	<div style="width:350px;">
 	<table class="list">
 		<thead>
 		<tr>
diff --git a/interface/web/dashboard/dashlets/templates/quota.htm b/interface/web/dashboard/dashlets/templates/quota.htm
index 3cf40e7..feb8e1f 100644
--- a/interface/web/dashboard/dashlets/templates/quota.htm
+++ b/interface/web/dashboard/dashlets/templates/quota.htm
@@ -1,6 +1,6 @@
 <div style="float: left;">
 	<h2>{tmpl_var name='quota_txt'}</h2>
-	<div style="width:320px;">
+	<div style="width:350px;">
 	<table class="list">
 		<thead>
 		<tr>
diff --git a/interface/web/dashboard/lib/lang/ar_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/ar_dashlet_mailquota.lng
new file mode 100644
index 0000000..2c2b6cd
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/ar_dashlet_mailquota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["mailquota_txt"] = 'Mailbox Quota';
+$wb["email_txt"] = 'Email Address';
+$wb["name_txt"] = 'Name';
+$wb["used_txt"] = 'Used Space';
+$wb["quota_txt"] = 'Quota';
+$wb["no_email_accounts_txt"] = 'No email accounts found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/ar_dashlet_quota.lng b/interface/web/dashboard/lib/lang/ar_dashlet_quota.lng
new file mode 100644
index 0000000..8b2e3d4
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/ar_dashlet_quota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["quota_txt"] = 'Website Harddisk Quota';
+$wb["domain_txt"] = 'Domain / Website';
+$wb["used_txt"] = 'Used space';
+$wb["hard_txt"] = 'Hard limit';
+$wb["soft_txt"] = 'Soft limit';
+$wb["no_sites_txt"] = 'No web sites found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/bg_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/bg_dashlet_mailquota.lng
new file mode 100644
index 0000000..2c2b6cd
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/bg_dashlet_mailquota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["mailquota_txt"] = 'Mailbox Quota';
+$wb["email_txt"] = 'Email Address';
+$wb["name_txt"] = 'Name';
+$wb["used_txt"] = 'Used Space';
+$wb["quota_txt"] = 'Quota';
+$wb["no_email_accounts_txt"] = 'No email accounts found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/bg_dashlet_quota.lng b/interface/web/dashboard/lib/lang/bg_dashlet_quota.lng
new file mode 100644
index 0000000..8b2e3d4
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/bg_dashlet_quota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["quota_txt"] = 'Website Harddisk Quota';
+$wb["domain_txt"] = 'Domain / Website';
+$wb["used_txt"] = 'Used space';
+$wb["hard_txt"] = 'Hard limit';
+$wb["soft_txt"] = 'Soft limit';
+$wb["no_sites_txt"] = 'No web sites found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/br_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/br_dashlet_mailquota.lng
new file mode 100644
index 0000000..2c2b6cd
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/br_dashlet_mailquota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["mailquota_txt"] = 'Mailbox Quota';
+$wb["email_txt"] = 'Email Address';
+$wb["name_txt"] = 'Name';
+$wb["used_txt"] = 'Used Space';
+$wb["quota_txt"] = 'Quota';
+$wb["no_email_accounts_txt"] = 'No email accounts found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/br_dashlet_quota.lng b/interface/web/dashboard/lib/lang/br_dashlet_quota.lng
new file mode 100644
index 0000000..8b2e3d4
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/br_dashlet_quota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["quota_txt"] = 'Website Harddisk Quota';
+$wb["domain_txt"] = 'Domain / Website';
+$wb["used_txt"] = 'Used space';
+$wb["hard_txt"] = 'Hard limit';
+$wb["soft_txt"] = 'Soft limit';
+$wb["no_sites_txt"] = 'No web sites found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/cz_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/cz_dashlet_mailquota.lng
new file mode 100644
index 0000000..2c2b6cd
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/cz_dashlet_mailquota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["mailquota_txt"] = 'Mailbox Quota';
+$wb["email_txt"] = 'Email Address';
+$wb["name_txt"] = 'Name';
+$wb["used_txt"] = 'Used Space';
+$wb["quota_txt"] = 'Quota';
+$wb["no_email_accounts_txt"] = 'No email accounts found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/cz_dashlet_quota.lng b/interface/web/dashboard/lib/lang/cz_dashlet_quota.lng
new file mode 100644
index 0000000..8b2e3d4
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/cz_dashlet_quota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["quota_txt"] = 'Website Harddisk Quota';
+$wb["domain_txt"] = 'Domain / Website';
+$wb["used_txt"] = 'Used space';
+$wb["hard_txt"] = 'Hard limit';
+$wb["soft_txt"] = 'Soft limit';
+$wb["no_sites_txt"] = 'No web sites found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/de_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/de_dashlet_mailquota.lng
index 2fb3f6d..9216881 100644
--- a/interface/web/dashboard/lib/lang/de_dashlet_mailquota.lng
+++ b/interface/web/dashboard/lib/lang/de_dashlet_mailquota.lng
@@ -1,8 +1,8 @@
 <?php
-$wb["mailquota_txt"] = 'Mailbox-Speicherplatz';
-$wb["email_txt"] = 'E-Mail-Adresse';
-$wb["name_txt"] = 'Name';
-$wb["used_txt"] = 'Verwendet';
-$wb["quota_txt"] = 'Verfügbar';
-$wb["no_email_accounts_txt"] = 'Kein E-Mail-Konto gefunden.';
-?>
\ No newline at end of file
+$wb['mailquota_txt'] = 'Mailbox-Speicherplatz';
+$wb['email_txt'] = 'E-Mail-Adresse';
+$wb['name_txt'] = 'Name';
+$wb['used_txt'] = 'Verwendet';
+$wb['quota_txt'] = 'Verfügbar';
+$wb['no_email_accounts_txt'] = 'Kein E-Mail-Konto gefunden.';
+?>
diff --git a/interface/web/dashboard/lib/lang/de_dashlet_quota.lng b/interface/web/dashboard/lib/lang/de_dashlet_quota.lng
index 6050e10..c694f1e 100644
--- a/interface/web/dashboard/lib/lang/de_dashlet_quota.lng
+++ b/interface/web/dashboard/lib/lang/de_dashlet_quota.lng
@@ -1,8 +1,8 @@
 <?php
-$wb["quota_txt"] = 'Webseiten-Speicherplatz';
-$wb["domain_txt"] = 'Domain / Webseite';
-$wb["used_txt"] = 'Verwendet';
-$wb["hard_txt"] = 'Hard Limit';
-$wb["soft_txt"] = 'Soft Limit';
-$wb["no_sites_txt"] = 'Keine Webseite gefunden.';
-?>
\ No newline at end of file
+$wb['quota_txt'] = 'Webseiten-Speicherplatz';
+$wb['domain_txt'] = 'Domain / Webseite';
+$wb['used_txt'] = 'Verwendet';
+$wb['hard_txt'] = 'Hard Limit';
+$wb['soft_txt'] = 'Soft Limit';
+$wb['no_sites_txt'] = 'Keine Webseite gefunden.';
+?>
diff --git a/interface/web/dashboard/lib/lang/el_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/el_dashlet_mailquota.lng
new file mode 100644
index 0000000..2c2b6cd
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/el_dashlet_mailquota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["mailquota_txt"] = 'Mailbox Quota';
+$wb["email_txt"] = 'Email Address';
+$wb["name_txt"] = 'Name';
+$wb["used_txt"] = 'Used Space';
+$wb["quota_txt"] = 'Quota';
+$wb["no_email_accounts_txt"] = 'No email accounts found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/el_dashlet_quota.lng b/interface/web/dashboard/lib/lang/el_dashlet_quota.lng
new file mode 100644
index 0000000..8b2e3d4
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/el_dashlet_quota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["quota_txt"] = 'Website Harddisk Quota';
+$wb["domain_txt"] = 'Domain / Website';
+$wb["used_txt"] = 'Used space';
+$wb["hard_txt"] = 'Hard limit';
+$wb["soft_txt"] = 'Soft limit';
+$wb["no_sites_txt"] = 'No web sites found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/es_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/es_dashlet_mailquota.lng
new file mode 100644
index 0000000..2c2b6cd
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/es_dashlet_mailquota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["mailquota_txt"] = 'Mailbox Quota';
+$wb["email_txt"] = 'Email Address';
+$wb["name_txt"] = 'Name';
+$wb["used_txt"] = 'Used Space';
+$wb["quota_txt"] = 'Quota';
+$wb["no_email_accounts_txt"] = 'No email accounts found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/es_dashlet_quota.lng b/interface/web/dashboard/lib/lang/es_dashlet_quota.lng
new file mode 100644
index 0000000..8b2e3d4
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/es_dashlet_quota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["quota_txt"] = 'Website Harddisk Quota';
+$wb["domain_txt"] = 'Domain / Website';
+$wb["used_txt"] = 'Used space';
+$wb["hard_txt"] = 'Hard limit';
+$wb["soft_txt"] = 'Soft limit';
+$wb["no_sites_txt"] = 'No web sites found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/fi_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/fi_dashlet_mailquota.lng
new file mode 100644
index 0000000..2c2b6cd
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/fi_dashlet_mailquota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["mailquota_txt"] = 'Mailbox Quota';
+$wb["email_txt"] = 'Email Address';
+$wb["name_txt"] = 'Name';
+$wb["used_txt"] = 'Used Space';
+$wb["quota_txt"] = 'Quota';
+$wb["no_email_accounts_txt"] = 'No email accounts found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/fi_dashlet_quota.lng b/interface/web/dashboard/lib/lang/fi_dashlet_quota.lng
new file mode 100644
index 0000000..8b2e3d4
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/fi_dashlet_quota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["quota_txt"] = 'Website Harddisk Quota';
+$wb["domain_txt"] = 'Domain / Website';
+$wb["used_txt"] = 'Used space';
+$wb["hard_txt"] = 'Hard limit';
+$wb["soft_txt"] = 'Soft limit';
+$wb["no_sites_txt"] = 'No web sites found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/fr_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/fr_dashlet_mailquota.lng
new file mode 100644
index 0000000..2c2b6cd
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/fr_dashlet_mailquota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["mailquota_txt"] = 'Mailbox Quota';
+$wb["email_txt"] = 'Email Address';
+$wb["name_txt"] = 'Name';
+$wb["used_txt"] = 'Used Space';
+$wb["quota_txt"] = 'Quota';
+$wb["no_email_accounts_txt"] = 'No email accounts found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/fr_dashlet_quota.lng b/interface/web/dashboard/lib/lang/fr_dashlet_quota.lng
new file mode 100644
index 0000000..8b2e3d4
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/fr_dashlet_quota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["quota_txt"] = 'Website Harddisk Quota';
+$wb["domain_txt"] = 'Domain / Website';
+$wb["used_txt"] = 'Used space';
+$wb["hard_txt"] = 'Hard limit';
+$wb["soft_txt"] = 'Soft limit';
+$wb["no_sites_txt"] = 'No web sites found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/hr_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/hr_dashlet_mailquota.lng
new file mode 100644
index 0000000..2c2b6cd
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/hr_dashlet_mailquota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["mailquota_txt"] = 'Mailbox Quota';
+$wb["email_txt"] = 'Email Address';
+$wb["name_txt"] = 'Name';
+$wb["used_txt"] = 'Used Space';
+$wb["quota_txt"] = 'Quota';
+$wb["no_email_accounts_txt"] = 'No email accounts found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/hr_dashlet_quota.lng b/interface/web/dashboard/lib/lang/hr_dashlet_quota.lng
new file mode 100644
index 0000000..8b2e3d4
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/hr_dashlet_quota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["quota_txt"] = 'Website Harddisk Quota';
+$wb["domain_txt"] = 'Domain / Website';
+$wb["used_txt"] = 'Used space';
+$wb["hard_txt"] = 'Hard limit';
+$wb["soft_txt"] = 'Soft limit';
+$wb["no_sites_txt"] = 'No web sites found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/hu_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/hu_dashlet_mailquota.lng
new file mode 100644
index 0000000..2c2b6cd
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/hu_dashlet_mailquota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["mailquota_txt"] = 'Mailbox Quota';
+$wb["email_txt"] = 'Email Address';
+$wb["name_txt"] = 'Name';
+$wb["used_txt"] = 'Used Space';
+$wb["quota_txt"] = 'Quota';
+$wb["no_email_accounts_txt"] = 'No email accounts found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/hu_dashlet_quota.lng b/interface/web/dashboard/lib/lang/hu_dashlet_quota.lng
new file mode 100644
index 0000000..8b2e3d4
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/hu_dashlet_quota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["quota_txt"] = 'Website Harddisk Quota';
+$wb["domain_txt"] = 'Domain / Website';
+$wb["used_txt"] = 'Used space';
+$wb["hard_txt"] = 'Hard limit';
+$wb["soft_txt"] = 'Soft limit';
+$wb["no_sites_txt"] = 'No web sites found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/id_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/id_dashlet_mailquota.lng
new file mode 100644
index 0000000..2c2b6cd
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/id_dashlet_mailquota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["mailquota_txt"] = 'Mailbox Quota';
+$wb["email_txt"] = 'Email Address';
+$wb["name_txt"] = 'Name';
+$wb["used_txt"] = 'Used Space';
+$wb["quota_txt"] = 'Quota';
+$wb["no_email_accounts_txt"] = 'No email accounts found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/id_dashlet_quota.lng b/interface/web/dashboard/lib/lang/id_dashlet_quota.lng
new file mode 100644
index 0000000..8b2e3d4
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/id_dashlet_quota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["quota_txt"] = 'Website Harddisk Quota';
+$wb["domain_txt"] = 'Domain / Website';
+$wb["used_txt"] = 'Used space';
+$wb["hard_txt"] = 'Hard limit';
+$wb["soft_txt"] = 'Soft limit';
+$wb["no_sites_txt"] = 'No web sites found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/it_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/it_dashlet_mailquota.lng
new file mode 100644
index 0000000..2c2b6cd
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/it_dashlet_mailquota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["mailquota_txt"] = 'Mailbox Quota';
+$wb["email_txt"] = 'Email Address';
+$wb["name_txt"] = 'Name';
+$wb["used_txt"] = 'Used Space';
+$wb["quota_txt"] = 'Quota';
+$wb["no_email_accounts_txt"] = 'No email accounts found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/it_dashlet_quota.lng b/interface/web/dashboard/lib/lang/it_dashlet_quota.lng
new file mode 100644
index 0000000..8b2e3d4
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/it_dashlet_quota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["quota_txt"] = 'Website Harddisk Quota';
+$wb["domain_txt"] = 'Domain / Website';
+$wb["used_txt"] = 'Used space';
+$wb["hard_txt"] = 'Hard limit';
+$wb["soft_txt"] = 'Soft limit';
+$wb["no_sites_txt"] = 'No web sites found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/ja_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/ja_dashlet_mailquota.lng
new file mode 100644
index 0000000..2c2b6cd
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/ja_dashlet_mailquota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["mailquota_txt"] = 'Mailbox Quota';
+$wb["email_txt"] = 'Email Address';
+$wb["name_txt"] = 'Name';
+$wb["used_txt"] = 'Used Space';
+$wb["quota_txt"] = 'Quota';
+$wb["no_email_accounts_txt"] = 'No email accounts found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/ja_dashlet_quota.lng b/interface/web/dashboard/lib/lang/ja_dashlet_quota.lng
new file mode 100644
index 0000000..8b2e3d4
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/ja_dashlet_quota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["quota_txt"] = 'Website Harddisk Quota';
+$wb["domain_txt"] = 'Domain / Website';
+$wb["used_txt"] = 'Used space';
+$wb["hard_txt"] = 'Hard limit';
+$wb["soft_txt"] = 'Soft limit';
+$wb["no_sites_txt"] = 'No web sites found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/nl_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/nl_dashlet_mailquota.lng
new file mode 100644
index 0000000..2c2b6cd
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/nl_dashlet_mailquota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["mailquota_txt"] = 'Mailbox Quota';
+$wb["email_txt"] = 'Email Address';
+$wb["name_txt"] = 'Name';
+$wb["used_txt"] = 'Used Space';
+$wb["quota_txt"] = 'Quota';
+$wb["no_email_accounts_txt"] = 'No email accounts found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/nl_dashlet_quota.lng b/interface/web/dashboard/lib/lang/nl_dashlet_quota.lng
new file mode 100644
index 0000000..8b2e3d4
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/nl_dashlet_quota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["quota_txt"] = 'Website Harddisk Quota';
+$wb["domain_txt"] = 'Domain / Website';
+$wb["used_txt"] = 'Used space';
+$wb["hard_txt"] = 'Hard limit';
+$wb["soft_txt"] = 'Soft limit';
+$wb["no_sites_txt"] = 'No web sites found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/pl_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/pl_dashlet_mailquota.lng
new file mode 100644
index 0000000..2c2b6cd
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/pl_dashlet_mailquota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["mailquota_txt"] = 'Mailbox Quota';
+$wb["email_txt"] = 'Email Address';
+$wb["name_txt"] = 'Name';
+$wb["used_txt"] = 'Used Space';
+$wb["quota_txt"] = 'Quota';
+$wb["no_email_accounts_txt"] = 'No email accounts found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/pl_dashlet_quota.lng b/interface/web/dashboard/lib/lang/pl_dashlet_quota.lng
new file mode 100644
index 0000000..8b2e3d4
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/pl_dashlet_quota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["quota_txt"] = 'Website Harddisk Quota';
+$wb["domain_txt"] = 'Domain / Website';
+$wb["used_txt"] = 'Used space';
+$wb["hard_txt"] = 'Hard limit';
+$wb["soft_txt"] = 'Soft limit';
+$wb["no_sites_txt"] = 'No web sites found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/pt_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/pt_dashlet_mailquota.lng
new file mode 100644
index 0000000..2c2b6cd
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/pt_dashlet_mailquota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["mailquota_txt"] = 'Mailbox Quota';
+$wb["email_txt"] = 'Email Address';
+$wb["name_txt"] = 'Name';
+$wb["used_txt"] = 'Used Space';
+$wb["quota_txt"] = 'Quota';
+$wb["no_email_accounts_txt"] = 'No email accounts found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/pt_dashlet_quota.lng b/interface/web/dashboard/lib/lang/pt_dashlet_quota.lng
new file mode 100644
index 0000000..8b2e3d4
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/pt_dashlet_quota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["quota_txt"] = 'Website Harddisk Quota';
+$wb["domain_txt"] = 'Domain / Website';
+$wb["used_txt"] = 'Used space';
+$wb["hard_txt"] = 'Hard limit';
+$wb["soft_txt"] = 'Soft limit';
+$wb["no_sites_txt"] = 'No web sites found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/ro_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/ro_dashlet_mailquota.lng
new file mode 100644
index 0000000..2c2b6cd
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/ro_dashlet_mailquota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["mailquota_txt"] = 'Mailbox Quota';
+$wb["email_txt"] = 'Email Address';
+$wb["name_txt"] = 'Name';
+$wb["used_txt"] = 'Used Space';
+$wb["quota_txt"] = 'Quota';
+$wb["no_email_accounts_txt"] = 'No email accounts found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/ro_dashlet_quota.lng b/interface/web/dashboard/lib/lang/ro_dashlet_quota.lng
new file mode 100644
index 0000000..8b2e3d4
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/ro_dashlet_quota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["quota_txt"] = 'Website Harddisk Quota';
+$wb["domain_txt"] = 'Domain / Website';
+$wb["used_txt"] = 'Used space';
+$wb["hard_txt"] = 'Hard limit';
+$wb["soft_txt"] = 'Soft limit';
+$wb["no_sites_txt"] = 'No web sites found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/ru_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/ru_dashlet_mailquota.lng
new file mode 100644
index 0000000..2c2b6cd
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/ru_dashlet_mailquota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["mailquota_txt"] = 'Mailbox Quota';
+$wb["email_txt"] = 'Email Address';
+$wb["name_txt"] = 'Name';
+$wb["used_txt"] = 'Used Space';
+$wb["quota_txt"] = 'Quota';
+$wb["no_email_accounts_txt"] = 'No email accounts found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/ru_dashlet_quota.lng b/interface/web/dashboard/lib/lang/ru_dashlet_quota.lng
new file mode 100644
index 0000000..8b2e3d4
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/ru_dashlet_quota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["quota_txt"] = 'Website Harddisk Quota';
+$wb["domain_txt"] = 'Domain / Website';
+$wb["used_txt"] = 'Used space';
+$wb["hard_txt"] = 'Hard limit';
+$wb["soft_txt"] = 'Soft limit';
+$wb["no_sites_txt"] = 'No web sites found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/se_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/se_dashlet_mailquota.lng
new file mode 100644
index 0000000..2c2b6cd
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/se_dashlet_mailquota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["mailquota_txt"] = 'Mailbox Quota';
+$wb["email_txt"] = 'Email Address';
+$wb["name_txt"] = 'Name';
+$wb["used_txt"] = 'Used Space';
+$wb["quota_txt"] = 'Quota';
+$wb["no_email_accounts_txt"] = 'No email accounts found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/se_dashlet_quota.lng b/interface/web/dashboard/lib/lang/se_dashlet_quota.lng
new file mode 100644
index 0000000..8b2e3d4
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/se_dashlet_quota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["quota_txt"] = 'Website Harddisk Quota';
+$wb["domain_txt"] = 'Domain / Website';
+$wb["used_txt"] = 'Used space';
+$wb["hard_txt"] = 'Hard limit';
+$wb["soft_txt"] = 'Soft limit';
+$wb["no_sites_txt"] = 'No web sites found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/sk_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/sk_dashlet_mailquota.lng
new file mode 100644
index 0000000..2c2b6cd
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/sk_dashlet_mailquota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["mailquota_txt"] = 'Mailbox Quota';
+$wb["email_txt"] = 'Email Address';
+$wb["name_txt"] = 'Name';
+$wb["used_txt"] = 'Used Space';
+$wb["quota_txt"] = 'Quota';
+$wb["no_email_accounts_txt"] = 'No email accounts found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/sk_dashlet_quota.lng b/interface/web/dashboard/lib/lang/sk_dashlet_quota.lng
new file mode 100644
index 0000000..8b2e3d4
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/sk_dashlet_quota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["quota_txt"] = 'Website Harddisk Quota';
+$wb["domain_txt"] = 'Domain / Website';
+$wb["used_txt"] = 'Used space';
+$wb["hard_txt"] = 'Hard limit';
+$wb["soft_txt"] = 'Soft limit';
+$wb["no_sites_txt"] = 'No web sites found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/tr_dashlet_mailquota.lng b/interface/web/dashboard/lib/lang/tr_dashlet_mailquota.lng
new file mode 100644
index 0000000..2c2b6cd
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/tr_dashlet_mailquota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["mailquota_txt"] = 'Mailbox Quota';
+$wb["email_txt"] = 'Email Address';
+$wb["name_txt"] = 'Name';
+$wb["used_txt"] = 'Used Space';
+$wb["quota_txt"] = 'Quota';
+$wb["no_email_accounts_txt"] = 'No email accounts found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/lib/lang/tr_dashlet_quota.lng b/interface/web/dashboard/lib/lang/tr_dashlet_quota.lng
new file mode 100644
index 0000000..8b2e3d4
--- /dev/null
+++ b/interface/web/dashboard/lib/lang/tr_dashlet_quota.lng
@@ -0,0 +1,8 @@
+<?php
+$wb["quota_txt"] = 'Website Harddisk Quota';
+$wb["domain_txt"] = 'Domain / Website';
+$wb["used_txt"] = 'Used space';
+$wb["hard_txt"] = 'Hard limit';
+$wb["soft_txt"] = 'Soft limit';
+$wb["no_sites_txt"] = 'No web sites found.';
+?>
\ No newline at end of file
diff --git a/interface/web/dashboard/templates/dashboard.htm b/interface/web/dashboard/templates/dashboard.htm
index 4d68fbd..c8c3145 100644
--- a/interface/web/dashboard/templates/dashboard.htm
+++ b/interface/web/dashboard/templates/dashboard.htm
@@ -41,7 +41,7 @@
 			</tmpl_if>
         </tmpl_loop>
     </div>
-    <div style="float:left; width:350px;">
+    <div style="float:left; width:350px;padding-left:15px;">
         <tmpl_loop name='rightcol'>
             {tmpl_var name='content'}
 			<tmpl_if name='content'>
diff --git a/interface/web/dns/lib/lang/tr_dns_mx.lng b/interface/web/dns/lib/lang/tr_dns_mx.lng
index 201f686..abdf7a4 100644
--- a/interface/web/dns/lib/lang/tr_dns_mx.lng
+++ b/interface/web/dns/lib/lang/tr_dns_mx.lng
@@ -13,4 +13,5 @@
 $wb['name_error_regex'] = 'Hostname yanlış formatta.';
 $wb['data_error_empty'] = 'Mail sunucusu hostname boş';
 $wb['data_error_regex'] = 'Mail sunucusu hostname geçersiz formatta';
+$wb['duplicate_mx_record_txt'] = 'Duplicate MX record.';
 ?>
diff --git a/interface/web/help/lib/lang/ar_support_message.lng b/interface/web/help/lib/lang/ar_support_message.lng
index 59816c6..bcc50ac 100644
--- a/interface/web/help/lib/lang/ar_support_message.lng
+++ b/interface/web/help/lib/lang/ar_support_message.lng
@@ -5,4 +5,11 @@
 $wb['message_txt'] = 'Message';
 $wb['tstamp_txt'] = 'Timestamp';
 $wb['reply_txt'] = 'Reply';
+$wb['date_txt'] = 'Date';
+$wb['support_request_subject_txt'] = 'Support Request';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
 ?>
diff --git a/interface/web/help/lib/lang/ar_support_message_list.lng b/interface/web/help/lib/lang/ar_support_message_list.lng
index d6bc2aa..719f4b0 100644
--- a/interface/web/help/lib/lang/ar_support_message_list.lng
+++ b/interface/web/help/lib/lang/ar_support_message_list.lng
@@ -3,4 +3,5 @@
 $wb['sender_id_txt'] = 'Sender';
 $wb['subject_txt'] = 'Subject';
 $wb['add_new_record_txt'] = 'Create new support message';
+$wb['date_txt'] = 'Date';
 ?>
diff --git a/interface/web/help/lib/lang/bg_support_message.lng b/interface/web/help/lib/lang/bg_support_message.lng
index 5c7c067..fb10925 100644
--- a/interface/web/help/lib/lang/bg_support_message.lng
+++ b/interface/web/help/lib/lang/bg_support_message.lng
@@ -5,4 +5,11 @@
 $wb['message_txt'] = 'Съобщение';
 $wb['tstamp_txt'] = 'Дата';
 $wb['reply_txt'] = 'Отговори';
+$wb['date_txt'] = 'Date';
+$wb['support_request_subject_txt'] = 'Support Request';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
 ?>
diff --git a/interface/web/help/lib/lang/bg_support_message_list.lng b/interface/web/help/lib/lang/bg_support_message_list.lng
index 1a5c21c..8f313eb 100644
--- a/interface/web/help/lib/lang/bg_support_message_list.lng
+++ b/interface/web/help/lib/lang/bg_support_message_list.lng
@@ -3,4 +3,5 @@
 $wb['sender_id_txt'] = 'Подател';
 $wb['subject_txt'] = 'Тема';
 $wb['add_new_record_txt'] = 'Ново съобщение';
+$wb['date_txt'] = 'Date';
 ?>
diff --git a/interface/web/help/lib/lang/br_support_message.lng b/interface/web/help/lib/lang/br_support_message.lng
index bce2c35..84a60d8 100644
--- a/interface/web/help/lib/lang/br_support_message.lng
+++ b/interface/web/help/lib/lang/br_support_message.lng
@@ -5,4 +5,11 @@
 $wb['message_txt'] = 'Mensagem';
 $wb['tstamp_txt'] = 'Dados';
 $wb['reply_txt'] = 'Responder';
+$wb['date_txt'] = 'Date';
+$wb['support_request_subject_txt'] = 'Support Request';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
 ?>
diff --git a/interface/web/help/lib/lang/br_support_message_list.lng b/interface/web/help/lib/lang/br_support_message_list.lng
index d5ba958..734dd28 100644
--- a/interface/web/help/lib/lang/br_support_message_list.lng
+++ b/interface/web/help/lib/lang/br_support_message_list.lng
@@ -3,4 +3,5 @@
 $wb['sender_id_txt'] = 'De';
 $wb['subject_txt'] = 'Assunto';
 $wb['add_new_record_txt'] = 'Crie uma nova mensagem de suporte';
+$wb['date_txt'] = 'Date';
 ?>
diff --git a/interface/web/help/lib/lang/cz_support_message.lng b/interface/web/help/lib/lang/cz_support_message.lng
index 6c27284..a6afd5a 100644
--- a/interface/web/help/lib/lang/cz_support_message.lng
+++ b/interface/web/help/lib/lang/cz_support_message.lng
@@ -5,4 +5,11 @@
 $wb['message_txt'] = 'Zpráva';
 $wb['tstamp_txt'] = 'Časové razítko';
 $wb['reply_txt'] = 'Odpovědět';
+$wb['date_txt'] = 'Date';
+$wb['support_request_subject_txt'] = 'Support Request';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
 ?>
diff --git a/interface/web/help/lib/lang/cz_support_message_list.lng b/interface/web/help/lib/lang/cz_support_message_list.lng
index 8629a2f..c4c43eb 100644
--- a/interface/web/help/lib/lang/cz_support_message_list.lng
+++ b/interface/web/help/lib/lang/cz_support_message_list.lng
@@ -3,4 +3,5 @@
 $wb['sender_id_txt'] = 'Odesílatel';
 $wb['subject_txt'] = 'Předmět';
 $wb['add_new_record_txt'] = 'Vytvořit zprávu pro podporu';
+$wb['date_txt'] = 'Date';
 ?>
diff --git a/interface/web/help/lib/lang/el_support_message.lng b/interface/web/help/lib/lang/el_support_message.lng
index 4810e08..1c277ca 100644
--- a/interface/web/help/lib/lang/el_support_message.lng
+++ b/interface/web/help/lib/lang/el_support_message.lng
@@ -5,4 +5,11 @@
 $wb['message_txt'] = 'Μήνυμα';
 $wb['tstamp_txt'] = 'Ημερομηνία/Ώρα';
 $wb['reply_txt'] = 'Απάντηση';
+$wb['date_txt'] = 'Date';
+$wb['support_request_subject_txt'] = 'Support Request';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
 ?>
diff --git a/interface/web/help/lib/lang/el_support_message_list.lng b/interface/web/help/lib/lang/el_support_message_list.lng
index e8b2cf3..46ea54c 100644
--- a/interface/web/help/lib/lang/el_support_message_list.lng
+++ b/interface/web/help/lib/lang/el_support_message_list.lng
@@ -3,4 +3,5 @@
 $wb['sender_id_txt'] = 'Αποστολέας';
 $wb['subject_txt'] = 'Θέμα';
 $wb['add_new_record_txt'] = 'Νέο μήνυμα υποστήριξης';
+$wb['date_txt'] = 'Date';
 ?>
diff --git a/interface/web/help/lib/lang/es_support_message.lng b/interface/web/help/lib/lang/es_support_message.lng
index 4f6c552..d0b8d04 100644
--- a/interface/web/help/lib/lang/es_support_message.lng
+++ b/interface/web/help/lib/lang/es_support_message.lng
@@ -5,4 +5,11 @@
 $wb['message_txt'] = 'Mensaje';
 $wb['tstamp_txt'] = 'Marca de tiempo';
 $wb['reply_txt'] = 'Responder';
+$wb['date_txt'] = 'Date';
+$wb['support_request_subject_txt'] = 'Support Request';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
 ?>
diff --git a/interface/web/help/lib/lang/es_support_message_list.lng b/interface/web/help/lib/lang/es_support_message_list.lng
index 0ff8eb9..9db4de7 100644
--- a/interface/web/help/lib/lang/es_support_message_list.lng
+++ b/interface/web/help/lib/lang/es_support_message_list.lng
@@ -3,4 +3,5 @@
 $wb['sender_id_txt'] = 'Remitente';
 $wb['subject_txt'] = 'Asunto';
 $wb['add_new_record_txt'] = 'Crear nuevo mensaje de soporte';
+$wb['date_txt'] = 'Date';
 ?>
diff --git a/interface/web/help/lib/lang/fi_support_message.lng b/interface/web/help/lib/lang/fi_support_message.lng
index 3995f2d..0e0c517 100755
--- a/interface/web/help/lib/lang/fi_support_message.lng
+++ b/interface/web/help/lib/lang/fi_support_message.lng
@@ -5,4 +5,11 @@
 $wb['message_txt'] = 'Tukipyyntö';
 $wb['tstamp_txt'] = 'Päiväys';
 $wb['reply_txt'] = 'Reply';
+$wb['date_txt'] = 'Date';
+$wb['support_request_subject_txt'] = 'Support Request';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
 ?>
diff --git a/interface/web/help/lib/lang/fi_support_message_list.lng b/interface/web/help/lib/lang/fi_support_message_list.lng
index 4bbc1de..0b50a2f 100755
--- a/interface/web/help/lib/lang/fi_support_message_list.lng
+++ b/interface/web/help/lib/lang/fi_support_message_list.lng
@@ -3,4 +3,5 @@
 $wb['sender_id_txt'] = 'Tukipyynnön lähettäjä';
 $wb['subject_txt'] = 'Tukipyynnön aihe';
 $wb['add_new_record_txt'] = 'Lähetä uusi tukipyyntö';
+$wb['date_txt'] = 'Date';
 ?>
diff --git a/interface/web/help/lib/lang/fr_support_message.lng b/interface/web/help/lib/lang/fr_support_message.lng
index 6d64344..9f9dbe8 100644
--- a/interface/web/help/lib/lang/fr_support_message.lng
+++ b/interface/web/help/lib/lang/fr_support_message.lng
@@ -5,4 +5,11 @@
 $wb['message_txt'] = 'Message';
 $wb['tstamp_txt'] = 'Timestamp';
 $wb['reply_txt'] = 'Répondre';
+$wb['date_txt'] = 'Date';
+$wb['support_request_subject_txt'] = 'Support Request';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
 ?>
diff --git a/interface/web/help/lib/lang/fr_support_message_list.lng b/interface/web/help/lib/lang/fr_support_message_list.lng
index ac63d3f..271f9dc 100644
--- a/interface/web/help/lib/lang/fr_support_message_list.lng
+++ b/interface/web/help/lib/lang/fr_support_message_list.lng
@@ -3,4 +3,5 @@
 $wb['sender_id_txt'] = 'Expéditeur';
 $wb['subject_txt'] = 'Sujet';
 $wb['add_new_record_txt'] = 'Créer un nouveau message de support';
+$wb['date_txt'] = 'Date';
 ?>
diff --git a/interface/web/help/lib/lang/hr_support_message.lng b/interface/web/help/lib/lang/hr_support_message.lng
index 2576d18..fca139b 100644
--- a/interface/web/help/lib/lang/hr_support_message.lng
+++ b/interface/web/help/lib/lang/hr_support_message.lng
@@ -5,4 +5,11 @@
 $wb['message_txt'] = 'Poruka';
 $wb['tstamp_txt'] = 'Vrijeme';
 $wb['reply_txt'] = 'Odgovori';
+$wb['date_txt'] = 'Date';
+$wb['support_request_subject_txt'] = 'Support Request';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
 ?>
diff --git a/interface/web/help/lib/lang/hr_support_message_list.lng b/interface/web/help/lib/lang/hr_support_message_list.lng
index 5c9dff1..e7aea1a 100644
--- a/interface/web/help/lib/lang/hr_support_message_list.lng
+++ b/interface/web/help/lib/lang/hr_support_message_list.lng
@@ -3,4 +3,5 @@
 $wb['sender_id_txt'] = 'Pošiljatelj';
 $wb['subject_txt'] = 'Naslov poruke';
 $wb['add_new_record_txt'] = 'Pošalji novu poruku';
+$wb['date_txt'] = 'Date';
 ?>
diff --git a/interface/web/help/lib/lang/hu_support_message.lng b/interface/web/help/lib/lang/hu_support_message.lng
index 6bc4aad..b0d1d71 100644
--- a/interface/web/help/lib/lang/hu_support_message.lng
+++ b/interface/web/help/lib/lang/hu_support_message.lng
@@ -5,4 +5,11 @@
 $wb['message_txt'] = 'Üzenet';
 $wb['tstamp_txt'] = 'Időbélyeg';
 $wb['reply_txt'] = 'Reply';
+$wb['date_txt'] = 'Date';
+$wb['support_request_subject_txt'] = 'Support Request';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
 ?>
diff --git a/interface/web/help/lib/lang/hu_support_message_list.lng b/interface/web/help/lib/lang/hu_support_message_list.lng
index 98f3051..f6152e5 100644
--- a/interface/web/help/lib/lang/hu_support_message_list.lng
+++ b/interface/web/help/lib/lang/hu_support_message_list.lng
@@ -3,4 +3,5 @@
 $wb['sender_id_txt'] = 'Feladó';
 $wb['subject_txt'] = 'Tárgy';
 $wb['add_new_record_txt'] = 'Új support üzenet';
+$wb['date_txt'] = 'Date';
 ?>
diff --git a/interface/web/help/lib/lang/id_support_message.lng b/interface/web/help/lib/lang/id_support_message.lng
index 7471f7c..645f40e 100644
--- a/interface/web/help/lib/lang/id_support_message.lng
+++ b/interface/web/help/lib/lang/id_support_message.lng
@@ -5,4 +5,11 @@
 $wb['message_txt'] = 'Pesan';
 $wb['tstamp_txt'] = 'Tanda Waktu';
 $wb['reply_txt'] = 'Reply';
+$wb['date_txt'] = 'Date';
+$wb['support_request_subject_txt'] = 'Support Request';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
 ?>
diff --git a/interface/web/help/lib/lang/id_support_message_list.lng b/interface/web/help/lib/lang/id_support_message_list.lng
index 6c856cc..3df9cf7 100644
--- a/interface/web/help/lib/lang/id_support_message_list.lng
+++ b/interface/web/help/lib/lang/id_support_message_list.lng
@@ -3,4 +3,5 @@
 $wb['sender_id_txt'] = 'Pengirim';
 $wb['subject_txt'] = 'Judul';
 $wb['add_new_record_txt'] = 'Buat Pesan Dukungan Baru';
+$wb['date_txt'] = 'Date';
 ?>
diff --git a/interface/web/help/lib/lang/it_support_message.lng b/interface/web/help/lib/lang/it_support_message.lng
index 4ef9951..a4712bd 100644
--- a/interface/web/help/lib/lang/it_support_message.lng
+++ b/interface/web/help/lib/lang/it_support_message.lng
@@ -5,4 +5,11 @@
 $wb['message_txt'] = 'Messaggio';
 $wb['tstamp_txt'] = 'Timestamp';
 $wb['reply_txt'] = 'Reply';
+$wb['date_txt'] = 'Date';
+$wb['support_request_subject_txt'] = 'Support Request';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
 ?>
diff --git a/interface/web/help/lib/lang/it_support_message_list.lng b/interface/web/help/lib/lang/it_support_message_list.lng
index 95f3558..1416474 100644
--- a/interface/web/help/lib/lang/it_support_message_list.lng
+++ b/interface/web/help/lib/lang/it_support_message_list.lng
@@ -3,4 +3,5 @@
 $wb['sender_id_txt'] = 'Mittente';
 $wb['subject_txt'] = 'Oggetto';
 $wb['add_new_record_txt'] = 'Crea nuovo messaggio di supporto';
+$wb['date_txt'] = 'Date';
 ?>
diff --git a/interface/web/help/lib/lang/ja_support_message.lng b/interface/web/help/lib/lang/ja_support_message.lng
index f2f1066..346497e 100644
--- a/interface/web/help/lib/lang/ja_support_message.lng
+++ b/interface/web/help/lib/lang/ja_support_message.lng
@@ -5,4 +5,11 @@
 $wb['message_txt'] = '本文';
 $wb['tstamp_txt'] = '送信日時';
 $wb['reply_txt'] = 'Reply';
+$wb['date_txt'] = 'Date';
+$wb['support_request_subject_txt'] = 'Support Request';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
 ?>
diff --git a/interface/web/help/lib/lang/ja_support_message_list.lng b/interface/web/help/lib/lang/ja_support_message_list.lng
index 0a68de9..94c1217 100644
--- a/interface/web/help/lib/lang/ja_support_message_list.lng
+++ b/interface/web/help/lib/lang/ja_support_message_list.lng
@@ -3,4 +3,5 @@
 $wb['sender_id_txt'] = '送信者';
 $wb['subject_txt'] = '件名';
 $wb['add_new_record_txt'] = 'サポートメッセージを作成する';
+$wb['date_txt'] = 'Date';
 ?>
diff --git a/interface/web/help/lib/lang/nl_support_message.lng b/interface/web/help/lib/lang/nl_support_message.lng
index 436e3de..d886887 100644
--- a/interface/web/help/lib/lang/nl_support_message.lng
+++ b/interface/web/help/lib/lang/nl_support_message.lng
@@ -5,4 +5,11 @@
 $wb['message_txt'] = 'Bericht';
 $wb['tstamp_txt'] = 'Tijdstip';
 $wb['reply_txt'] = 'Reply';
+$wb['date_txt'] = 'Date';
+$wb['support_request_subject_txt'] = 'Support Request';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
 ?>
diff --git a/interface/web/help/lib/lang/nl_support_message_list.lng b/interface/web/help/lib/lang/nl_support_message_list.lng
index 12cd898..6e1871e 100644
--- a/interface/web/help/lib/lang/nl_support_message_list.lng
+++ b/interface/web/help/lib/lang/nl_support_message_list.lng
@@ -3,4 +3,5 @@
 $wb['sender_id_txt'] = 'Afzender';
 $wb['subject_txt'] = 'Onderwerp';
 $wb['add_new_record_txt'] = 'Maak een nieuw support bericht';
+$wb['date_txt'] = 'Date';
 ?>
diff --git a/interface/web/help/lib/lang/pl_support_message.lng b/interface/web/help/lib/lang/pl_support_message.lng
index 7482e35..0584d30 100644
--- a/interface/web/help/lib/lang/pl_support_message.lng
+++ b/interface/web/help/lib/lang/pl_support_message.lng
@@ -5,4 +5,11 @@
 $wb['message_txt'] = 'Wiadomość';
 $wb['tstamp_txt'] = 'Kalendarz';
 $wb['reply_txt'] = 'Odpowiedź';
+$wb['date_txt'] = 'Date';
+$wb['support_request_subject_txt'] = 'Support Request';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
 ?>
diff --git a/interface/web/help/lib/lang/pl_support_message_list.lng b/interface/web/help/lib/lang/pl_support_message_list.lng
index bc32856..78e1eaf 100644
--- a/interface/web/help/lib/lang/pl_support_message_list.lng
+++ b/interface/web/help/lib/lang/pl_support_message_list.lng
@@ -3,4 +3,5 @@
 $wb['sender_id_txt'] = 'Nadawca';
 $wb['subject_txt'] = 'Temat';
 $wb['add_new_record_txt'] = 'Wyślij wiadomość';
+$wb['date_txt'] = 'Date';
 ?>
diff --git a/interface/web/help/lib/lang/pt_support_message.lng b/interface/web/help/lib/lang/pt_support_message.lng
index 6f426cc..54428b7 100644
--- a/interface/web/help/lib/lang/pt_support_message.lng
+++ b/interface/web/help/lib/lang/pt_support_message.lng
@@ -5,4 +5,11 @@
 $wb['message_txt'] = 'Mensagem';
 $wb['tstamp_txt'] = 'Data';
 $wb['reply_txt'] = 'Reply';
+$wb['date_txt'] = 'Date';
+$wb['support_request_subject_txt'] = 'Support Request';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
 ?>
diff --git a/interface/web/help/lib/lang/pt_support_message_list.lng b/interface/web/help/lib/lang/pt_support_message_list.lng
index d5ba958..734dd28 100644
--- a/interface/web/help/lib/lang/pt_support_message_list.lng
+++ b/interface/web/help/lib/lang/pt_support_message_list.lng
@@ -3,4 +3,5 @@
 $wb['sender_id_txt'] = 'De';
 $wb['subject_txt'] = 'Assunto';
 $wb['add_new_record_txt'] = 'Crie uma nova mensagem de suporte';
+$wb['date_txt'] = 'Date';
 ?>
diff --git a/interface/web/help/lib/lang/ro_support_message.lng b/interface/web/help/lib/lang/ro_support_message.lng
index be5f50b..39c42da 100644
--- a/interface/web/help/lib/lang/ro_support_message.lng
+++ b/interface/web/help/lib/lang/ro_support_message.lng
@@ -5,4 +5,11 @@
 $wb['message_txt'] = 'Mesaj';
 $wb['tstamp_txt'] = 'Timestamp';
 $wb['reply_txt'] = 'Reply';
+$wb['date_txt'] = 'Date';
+$wb['support_request_subject_txt'] = 'Support Request';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
 ?>
diff --git a/interface/web/help/lib/lang/ro_support_message_list.lng b/interface/web/help/lib/lang/ro_support_message_list.lng
index 34aebb8..667f03d 100644
--- a/interface/web/help/lib/lang/ro_support_message_list.lng
+++ b/interface/web/help/lib/lang/ro_support_message_list.lng
@@ -3,4 +3,5 @@
 $wb['sender_id_txt'] = 'Expeditor';
 $wb['subject_txt'] = 'Subiect';
 $wb['add_new_record_txt'] = 'Creatie mesaj nou catre support';
+$wb['date_txt'] = 'Date';
 ?>
diff --git a/interface/web/help/lib/lang/ru_support_message.lng b/interface/web/help/lib/lang/ru_support_message.lng
index ae0545b..3c2b2cd 100644
--- a/interface/web/help/lib/lang/ru_support_message.lng
+++ b/interface/web/help/lib/lang/ru_support_message.lng
@@ -5,4 +5,11 @@
 $wb['message_txt'] = 'Сообщение';
 $wb['tstamp_txt'] = 'Штамп времени';
 $wb['reply_txt'] = 'Reply';
+$wb['date_txt'] = 'Date';
+$wb['support_request_subject_txt'] = 'Support Request';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
 ?>
diff --git a/interface/web/help/lib/lang/ru_support_message_list.lng b/interface/web/help/lib/lang/ru_support_message_list.lng
index a25816b..9293f1d 100644
--- a/interface/web/help/lib/lang/ru_support_message_list.lng
+++ b/interface/web/help/lib/lang/ru_support_message_list.lng
@@ -3,4 +3,5 @@
 $wb['sender_id_txt'] = 'От';
 $wb['subject_txt'] = 'Тема';
 $wb['add_new_record_txt'] = 'Создайте новое сообщение службы поддержки';
+$wb['date_txt'] = 'Date';
 ?>
diff --git a/interface/web/help/lib/lang/se_support_message.lng b/interface/web/help/lib/lang/se_support_message.lng
index 59816c6..bcc50ac 100644
--- a/interface/web/help/lib/lang/se_support_message.lng
+++ b/interface/web/help/lib/lang/se_support_message.lng
@@ -5,4 +5,11 @@
 $wb['message_txt'] = 'Message';
 $wb['tstamp_txt'] = 'Timestamp';
 $wb['reply_txt'] = 'Reply';
+$wb['date_txt'] = 'Date';
+$wb['support_request_subject_txt'] = 'Support Request';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
 ?>
diff --git a/interface/web/help/lib/lang/se_support_message_list.lng b/interface/web/help/lib/lang/se_support_message_list.lng
index d6bc2aa..719f4b0 100644
--- a/interface/web/help/lib/lang/se_support_message_list.lng
+++ b/interface/web/help/lib/lang/se_support_message_list.lng
@@ -3,4 +3,5 @@
 $wb['sender_id_txt'] = 'Sender';
 $wb['subject_txt'] = 'Subject';
 $wb['add_new_record_txt'] = 'Create new support message';
+$wb['date_txt'] = 'Date';
 ?>
diff --git a/interface/web/help/lib/lang/sk_support_message.lng b/interface/web/help/lib/lang/sk_support_message.lng
index a7d3b31..4c8c5a9 100644
--- a/interface/web/help/lib/lang/sk_support_message.lng
+++ b/interface/web/help/lib/lang/sk_support_message.lng
@@ -5,4 +5,11 @@
 $wb['message_txt'] = 'Správa';
 $wb['tstamp_txt'] = 'Časová pečiatka';
 $wb['reply_txt'] = 'Reply';
+$wb['date_txt'] = 'Date';
+$wb['support_request_subject_txt'] = 'Support Request';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
 ?>
diff --git a/interface/web/help/lib/lang/sk_support_message_list.lng b/interface/web/help/lib/lang/sk_support_message_list.lng
index 63007d8..afc4bdf 100644
--- a/interface/web/help/lib/lang/sk_support_message_list.lng
+++ b/interface/web/help/lib/lang/sk_support_message_list.lng
@@ -3,4 +3,5 @@
 $wb['sender_id_txt'] = 'Odosielateľ';
 $wb['subject_txt'] = 'Predmet';
 $wb['add_new_record_txt'] = 'Vytvoriť novú správu pre podporu';
+$wb['date_txt'] = 'Date';
 ?>
diff --git a/interface/web/help/lib/lang/tr_support_message.lng b/interface/web/help/lib/lang/tr_support_message.lng
index 59816c6..bcc50ac 100644
--- a/interface/web/help/lib/lang/tr_support_message.lng
+++ b/interface/web/help/lib/lang/tr_support_message.lng
@@ -5,4 +5,11 @@
 $wb['message_txt'] = 'Message';
 $wb['tstamp_txt'] = 'Timestamp';
 $wb['reply_txt'] = 'Reply';
+$wb['date_txt'] = 'Date';
+$wb['support_request_subject_txt'] = 'Support Request';
+$wb['support_request_txt'] = 'You have got a support request. Please don\'t reply to this email, but process the support request inside ISPConfig.';
+$wb['answer_to_support_request_txt'] = 'You have got a reply to your support request. Please don\'t reply to this email, but process the message inside ISPConfig.';
+$wb['answer_to_support_request_sent_txt'] = 'Your reply to the support request has been sent. Please don\'t reply to this email.';
+$wb['support_request_sent_txt'] = 'Your support request has been sent. Please don\'t reply to this email.';
+$wb['recipient_or_sender_email_address_not_valid_txt'] = 'The message could not be sent because the recipient and/or the sender email address is not valid.';
 ?>
diff --git a/interface/web/help/lib/lang/tr_support_message_list.lng b/interface/web/help/lib/lang/tr_support_message_list.lng
index acdb363..5728cb0 100644
--- a/interface/web/help/lib/lang/tr_support_message_list.lng
+++ b/interface/web/help/lib/lang/tr_support_message_list.lng
@@ -3,4 +3,5 @@
 $wb['sender_id_txt'] = 'Gönderici';
 $wb['subject_txt'] = 'Konu';
 $wb['add_new_record_txt'] = 'Yeni destek mesajı oluştur';
+$wb['date_txt'] = 'Date';
 ?>
diff --git a/interface/web/js/scrigo.js.php b/interface/web/js/scrigo.js.php
index c78406a..418b26b 100644
--- a/interface/web/js/scrigo.js.php
+++ b/interface/web/js/scrigo.js.php
@@ -642,40 +642,65 @@
 	return false;
 }
 
+var new_tpl_add_id = 0;
 function addAdditionalTemplate(){
-	var tpl_add = document.getElementById('template_additional').value;
-	
-	  var tpl_list = document.getElementById('template_additional_list').innerHTML;
-	  var addTemplate = document.getElementById('tpl_add_select').value.split('|',2);
-	  var addTplId = addTemplate[0];
-	  var addTplText = addTemplate[1];
+    var tpl_add = jQuery('#template_additional').val();
+    var addTemplate = jQuery('#tpl_add_select').val().split('|',2);
+	var addTplId = addTemplate[0];
+	var addTplText = addTemplate[1];
 	if(addTplId > 0) {
-	  var newVal = tpl_add + '/' + addTplId + '/';
-	  newVal = newVal.replace('//', '/');
-	  var newList = tpl_list + '<br>' + addTplText;
-	  newList = newList.replace('<br><br>', '<br>');
-	  document.getElementById('template_additional').value = newVal;
-	  document.getElementById('template_additional_list').innerHTML = newList;
-	  alert('additional template ' + addTplText + ' added to customer');
+        var newVal = tpl_add.split('/');
+        new_tpl_add_id += 1;
+        var delbtn = jQuery('<a href="#"></a>').attr('class', 'button icons16 icoDelete').click(function(e) {
+            e.preventDefault();
+            delAdditionalTemplate($(this).parent().attr('rel'));
+        });
+        newVal[newVal.length] = 'n' + new_tpl_add_id + ':' + addTplId;
+	    jQuery('<li>' + addTplText + '</li>').attr('rel', 'n' + new_tpl_add_id).append(delbtn).appendTo('#template_additional_list ul');
+	    jQuery('#template_additional').val(newVal.join('/'));
+	    alert('additional template ' + addTplText + ' added to customer');
 	} else {
-	  alert('no additional template selcted');
+	    alert('no additional template selcted');
 	}
 }
 
-function delAdditionalTemplate(){
-	var tpl_add = document.getElementById('template_additional').value;
-	if(tpl_add != '') {
-		var tpl_list = document.getElementById('template_additional_list').innerHTML;
+function delAdditionalTemplate(tpl_id){
+    var tpl_add = jQuery('#template_additional').val();
+	if(tpl_id) {
+        // new style
+		var $el = jQuery('#template_additional_list ul').find('li[rel="' + tpl_id + '"]').eq(0); // only the first
+        var addTplText = $el.text();
+        $el.remove();
+        
+		var oldVal = tpl_add.split('/');
+		var newVal = new Array();
+        for(var i = 0; i < oldVal.length; i++) {
+            var tmp = oldVal[i].split(':', 2);
+            if(tmp.length == 2 && tmp[0] == tpl_id) continue;
+            newVal[newVal.length] = oldVal[i];
+        }
+        jQuery('#template_additional').val(newVal.join('/'));
+		alert('additional template ' + addTplText + ' deleted from customer');
+    } else if(tpl_add != '') {
+        // old style
 		var addTemplate = document.getElementById('tpl_add_select').value.split('|',2);
 		var addTplId = addTemplate[0];
 		var addTplText = addTemplate[1];
+
+		jQuery('#template_additional_list ul').find('li:not([rel])').each(function() {
+            var text = jQuery(this).text();
+            if(text == addTplText) {
+                jQuery(this).remove();
+                return false;
+            }
+            return this;
+        });
+        
 		var newVal = tpl_add;
-		newVal = newVal.replace(addTplId, '');
+        var repl = new RegExp('(^|\/)' + addTplId + '(\/|$)');
+		newVal = newVal.replace(repl, '');
 		newVal = newVal.replace('//', '/');
-		var newList = tpl_list.replace(addTplText, '');
-		newList = newList.replace('<br><br>', '<br>');
-		document.getElementById('template_additional').value = newVal;
-		document.getElementById('template_additional_list').innerHTML = newList;
+		jQuery('#template_additional').val(newVal);
 		alert('additional template ' + addTplText + ' deleted from customer');
   } else {
   	alert('no additional template selcted');
diff --git a/interface/web/login/lib/lang/ar.lng b/interface/web/login/lib/lang/ar.lng
index f7362b5..ef17493 100644
--- a/interface/web/login/lib/lang/ar.lng
+++ b/interface/web/login/lib/lang/ar.lng
@@ -21,4 +21,5 @@
 $wb['pw_button_txt'] = 'Resend password';
 $wb['email_txt'] = 'Email';
 $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.';
+$wb['back_txt'] = 'Back';
 ?>
diff --git a/interface/web/login/lib/lang/bg.lng b/interface/web/login/lib/lang/bg.lng
index cb27951..b0e353b 100644
--- a/interface/web/login/lib/lang/bg.lng
+++ b/interface/web/login/lib/lang/bg.lng
@@ -21,4 +21,5 @@
 $wb['email_txt'] = 'Email';
 $wb['error_maintenance_mode'] = 'This ISPConfig installation is currently under maintenance. We should be back shortly. Thank you for your patience.';
 $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.';
+$wb['back_txt'] = 'Back';
 ?>
diff --git a/interface/web/login/lib/lang/br.lng b/interface/web/login/lib/lang/br.lng
index 0d21447..f00af30 100644
--- a/interface/web/login/lib/lang/br.lng
+++ b/interface/web/login/lib/lang/br.lng
@@ -21,4 +21,5 @@
 $wb['pw_button_txt'] = 'Resend password';
 $wb['email_txt'] = 'Email';
 $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.';
+$wb['back_txt'] = 'Back';
 ?>
diff --git a/interface/web/login/lib/lang/cz.lng b/interface/web/login/lib/lang/cz.lng
index cf65934..f789b21 100644
--- a/interface/web/login/lib/lang/cz.lng
+++ b/interface/web/login/lib/lang/cz.lng
@@ -21,4 +21,5 @@
 $wb['pw_button_txt'] = 'Znovu odeslat heslo';
 $wb['email_txt'] = 'E-mail';
 $wb['theme_not_compatible'] = 'Zvolené téma není kompatibilní s aktuální verzí ISPConfig. Zkontrolujte prosím, zda není nová verze tématu.<br />Výchozí motiv byl aktivován automaticky.';
+$wb['back_txt'] = 'Back';
 ?>
diff --git a/interface/web/login/lib/lang/el.lng b/interface/web/login/lib/lang/el.lng
index 12271ac..00646c6 100644
--- a/interface/web/login/lib/lang/el.lng
+++ b/interface/web/login/lib/lang/el.lng
@@ -21,4 +21,5 @@
 $wb['pw_button_txt'] = 'Resend password';
 $wb['email_txt'] = 'Email';
 $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.';
+$wb['back_txt'] = 'Back';
 ?>
diff --git a/interface/web/login/lib/lang/es.lng b/interface/web/login/lib/lang/es.lng
index d80bb7c..e19e81d 100644
--- a/interface/web/login/lib/lang/es.lng
+++ b/interface/web/login/lib/lang/es.lng
@@ -21,4 +21,5 @@
 $wb['email_txt'] = 'Email';
 $wb['error_maintenance_mode'] = 'This ISPConfig installation is currently under maintenance. We should be back shortly. Thank you for your patience.';
 $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.';
+$wb['back_txt'] = 'Back';
 ?>
diff --git a/interface/web/login/lib/lang/fi.lng b/interface/web/login/lib/lang/fi.lng
index 427f8de..c6bc2b8 100755
--- a/interface/web/login/lib/lang/fi.lng
+++ b/interface/web/login/lib/lang/fi.lng
@@ -21,4 +21,5 @@
 $wb['pw_button_txt'] = 'Resend password';
 $wb['email_txt'] = 'Email';
 $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.';
+$wb['back_txt'] = 'Back';
 ?>
diff --git a/interface/web/login/lib/lang/fr.lng b/interface/web/login/lib/lang/fr.lng
index beb76a5..f71178c 100644
--- a/interface/web/login/lib/lang/fr.lng
+++ b/interface/web/login/lib/lang/fr.lng
@@ -21,4 +21,5 @@
 $wb['pw_button_txt'] = 'Resend password';
 $wb['email_txt'] = 'Email';
 $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.';
+$wb['back_txt'] = 'Back';
 ?>
diff --git a/interface/web/login/lib/lang/hr.lng b/interface/web/login/lib/lang/hr.lng
index 7f84d6f..2b06414 100644
--- a/interface/web/login/lib/lang/hr.lng
+++ b/interface/web/login/lib/lang/hr.lng
@@ -21,4 +21,5 @@
 $wb['pw_button_txt'] = 'Resend password';
 $wb['email_txt'] = 'Email';
 $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.';
+$wb['back_txt'] = 'Back';
 ?>
diff --git a/interface/web/login/lib/lang/hu.lng b/interface/web/login/lib/lang/hu.lng
index 1dc8ef3..69c7452 100644
--- a/interface/web/login/lib/lang/hu.lng
+++ b/interface/web/login/lib/lang/hu.lng
@@ -21,4 +21,5 @@
 $wb['pw_button_txt'] = 'Resend password';
 $wb['email_txt'] = 'Email';
 $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.';
+$wb['back_txt'] = 'Back';
 ?>
diff --git a/interface/web/login/lib/lang/id.lng b/interface/web/login/lib/lang/id.lng
index 5e82059..27c3857 100644
--- a/interface/web/login/lib/lang/id.lng
+++ b/interface/web/login/lib/lang/id.lng
@@ -21,4 +21,5 @@
 $wb['pw_button_txt'] = 'Resend password';
 $wb['email_txt'] = 'Email';
 $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.';
+$wb['back_txt'] = 'Back';
 ?>
diff --git a/interface/web/login/lib/lang/it.lng b/interface/web/login/lib/lang/it.lng
index c69cb52..05c7e35 100644
--- a/interface/web/login/lib/lang/it.lng
+++ b/interface/web/login/lib/lang/it.lng
@@ -21,4 +21,5 @@
 $wb['pw_button_txt'] = 'Resend password';
 $wb['email_txt'] = 'Email';
 $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.';
+$wb['back_txt'] = 'Back';
 ?>
diff --git a/interface/web/login/lib/lang/ja.lng b/interface/web/login/lib/lang/ja.lng
index 70ab27c..959f67f 100644
--- a/interface/web/login/lib/lang/ja.lng
+++ b/interface/web/login/lib/lang/ja.lng
@@ -21,4 +21,5 @@
 $wb['pw_button_txt'] = 'Resend password';
 $wb['email_txt'] = 'Email';
 $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.';
+$wb['back_txt'] = 'Back';
 ?>
diff --git a/interface/web/login/lib/lang/nl.lng b/interface/web/login/lib/lang/nl.lng
index 59564e5..b203f72 100644
--- a/interface/web/login/lib/lang/nl.lng
+++ b/interface/web/login/lib/lang/nl.lng
@@ -21,4 +21,5 @@
 $wb['pw_button_txt'] = 'Resend password';
 $wb['email_txt'] = 'Email';
 $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.';
+$wb['back_txt'] = 'Back';
 ?>
diff --git a/interface/web/login/lib/lang/pl.lng b/interface/web/login/lib/lang/pl.lng
index 29bd8b2..7fe9ae1 100644
--- a/interface/web/login/lib/lang/pl.lng
+++ b/interface/web/login/lib/lang/pl.lng
@@ -21,4 +21,5 @@
 $wb['email_txt'] = 'E-mail';
 $wb['error_maintenance_mode'] = 'Ta instalacja ISPConfig jest aktualnie w trakcje modernizacji. Wracamy niebawem - proszę o cierpliwość.';
 $wb['theme_not_compatible'] = 'Wybrany temat nie jest kompatybilny z aktualną wersją ISPConfig. Proszę wybrać nową wersję tematu.<br />Został aktywowany automatycznie domyślny temat.';
+$wb['back_txt'] = 'Back';
 ?>
diff --git a/interface/web/login/lib/lang/pt.lng b/interface/web/login/lib/lang/pt.lng
index 6c5414c..a5798e4 100644
--- a/interface/web/login/lib/lang/pt.lng
+++ b/interface/web/login/lib/lang/pt.lng
@@ -21,4 +21,5 @@
 $wb['pw_button_txt'] = 'Resend password';
 $wb['email_txt'] = 'Email';
 $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.';
+$wb['back_txt'] = 'Back';
 ?>
diff --git a/interface/web/login/lib/lang/ro.lng b/interface/web/login/lib/lang/ro.lng
index 76b314a..5588c3f 100644
--- a/interface/web/login/lib/lang/ro.lng
+++ b/interface/web/login/lib/lang/ro.lng
@@ -21,4 +21,5 @@
 $wb['pw_button_txt'] = 'Resend password';
 $wb['email_txt'] = 'Email';
 $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.';
+$wb['back_txt'] = 'Back';
 ?>
diff --git a/interface/web/login/lib/lang/ru.lng b/interface/web/login/lib/lang/ru.lng
index 866a957..78a787e 100644
--- a/interface/web/login/lib/lang/ru.lng
+++ b/interface/web/login/lib/lang/ru.lng
@@ -21,4 +21,5 @@
 $wb['pw_button_txt'] = 'Resend password';
 $wb['email_txt'] = 'Email';
 $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.';
+$wb['back_txt'] = 'Back';
 ?>
diff --git a/interface/web/login/lib/lang/se.lng b/interface/web/login/lib/lang/se.lng
index f7362b5..ef17493 100644
--- a/interface/web/login/lib/lang/se.lng
+++ b/interface/web/login/lib/lang/se.lng
@@ -21,4 +21,5 @@
 $wb['pw_button_txt'] = 'Resend password';
 $wb['email_txt'] = 'Email';
 $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.';
+$wb['back_txt'] = 'Back';
 ?>
diff --git a/interface/web/login/lib/lang/sk.lng b/interface/web/login/lib/lang/sk.lng
index d1fc46d..6e4bb87 100644
--- a/interface/web/login/lib/lang/sk.lng
+++ b/interface/web/login/lib/lang/sk.lng
@@ -21,4 +21,5 @@
 $wb['pw_button_txt'] = 'Resend password';
 $wb['email_txt'] = 'Email';
 $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.';
+$wb['back_txt'] = 'Back';
 ?>
diff --git a/interface/web/login/lib/lang/tr.lng b/interface/web/login/lib/lang/tr.lng
index 00f027e..46143b7 100644
--- a/interface/web/login/lib/lang/tr.lng
+++ b/interface/web/login/lib/lang/tr.lng
@@ -21,4 +21,5 @@
 $wb['pw_button_txt'] = 'Resend password';
 $wb['email_txt'] = 'Email';
 $wb['theme_not_compatible'] = 'The chosen theme is not compatible with the current ISPConfig version. Please check for a new version of the theme.<br />The default theme as been activated automatically.';
+$wb['back_txt'] = 'Back';
 ?>
diff --git a/interface/web/mail/lib/lang/ar_spamfilter_users.lng b/interface/web/mail/lib/lang/ar_spamfilter_users.lng
index a93d94d..3edc749 100644
--- a/interface/web/mail/lib/lang/ar_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/ar_spamfilter_users.lng
@@ -5,4 +5,6 @@
 $wb['email_txt'] = 'Email (Pattern)';
 $wb['fullname_txt'] = 'Name';
 $wb['local_txt'] = 'Local';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
 ?>
diff --git a/interface/web/mail/lib/lang/ar_user_quota_stats_list.lng b/interface/web/mail/lib/lang/ar_user_quota_stats_list.lng
index 95fff21..394e97c 100755
--- a/interface/web/mail/lib/lang/ar_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/ar_user_quota_stats_list.lng
@@ -4,4 +4,5 @@
 $wb['name_txt'] = 'Name';
 $wb['email_txt'] = 'Email Address';
 $wb['used_txt'] = 'Used space';
+$wb['percentage_txt'] = 'Used %';
 ?>
diff --git a/interface/web/mail/lib/lang/bg_spamfilter_users.lng b/interface/web/mail/lib/lang/bg_spamfilter_users.lng
index a93d94d..3edc749 100644
--- a/interface/web/mail/lib/lang/bg_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/bg_spamfilter_users.lng
@@ -5,4 +5,6 @@
 $wb['email_txt'] = 'Email (Pattern)';
 $wb['fullname_txt'] = 'Name';
 $wb['local_txt'] = 'Local';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
 ?>
diff --git a/interface/web/mail/lib/lang/bg_user_quota_stats_list.lng b/interface/web/mail/lib/lang/bg_user_quota_stats_list.lng
index 48b7044..a777266 100755
--- a/interface/web/mail/lib/lang/bg_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/bg_user_quota_stats_list.lng
@@ -4,4 +4,5 @@
 $wb['name_txt'] = 'Име';
 $wb['email_txt'] = 'Емайл адрес';
 $wb['used_txt'] = 'Използвано място';
+$wb['percentage_txt'] = 'Used %';
 ?>
diff --git a/interface/web/mail/lib/lang/br_spamfilter_users.lng b/interface/web/mail/lib/lang/br_spamfilter_users.lng
index 4515009..7bf8557 100644
--- a/interface/web/mail/lib/lang/br_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/br_spamfilter_users.lng
@@ -5,4 +5,6 @@
 $wb['email_txt'] = 'Correio (Padrão)';
 $wb['fullname_txt'] = 'Nome';
 $wb['local_txt'] = 'Local';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
 ?>
diff --git a/interface/web/mail/lib/lang/br_user_quota_stats_list.lng b/interface/web/mail/lib/lang/br_user_quota_stats_list.lng
index 95fff21..394e97c 100755
--- a/interface/web/mail/lib/lang/br_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/br_user_quota_stats_list.lng
@@ -4,4 +4,5 @@
 $wb['name_txt'] = 'Name';
 $wb['email_txt'] = 'Email Address';
 $wb['used_txt'] = 'Used space';
+$wb['percentage_txt'] = 'Used %';
 ?>
diff --git a/interface/web/mail/lib/lang/cz_spamfilter_users.lng b/interface/web/mail/lib/lang/cz_spamfilter_users.lng
index 914304c..4f5c0e8 100644
--- a/interface/web/mail/lib/lang/cz_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/cz_spamfilter_users.lng
@@ -5,4 +5,6 @@
 $wb['email_txt'] = 'Email (vzor)';
 $wb['fullname_txt'] = 'Název';
 $wb['local_txt'] = 'Lokální';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
 ?>
diff --git a/interface/web/mail/lib/lang/cz_user_quota_stats_list.lng b/interface/web/mail/lib/lang/cz_user_quota_stats_list.lng
index c8b73a9..f60e616 100755
--- a/interface/web/mail/lib/lang/cz_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/cz_user_quota_stats_list.lng
@@ -4,4 +4,5 @@
 $wb['name_txt'] = 'Jméno';
 $wb['email_txt'] = 'E-mailová adresa';
 $wb['used_txt'] = 'Využité místo';
+$wb['percentage_txt'] = 'Used %';
 ?>
diff --git a/interface/web/mail/lib/lang/de_mail_get.lng b/interface/web/mail/lib/lang/de_mail_get.lng
index b972650..e6064ca 100644
--- a/interface/web/mail/lib/lang/de_mail_get.lng
+++ b/interface/web/mail/lib/lang/de_mail_get.lng
@@ -14,5 +14,5 @@
 $wb['destination_error_isemail'] = 'Kein Ziel gewählt.';
 $wb['source_server_error_regex'] = 'POP3/IMAP Server ist kein gültiger Domainname.';
 $wb['source_read_all_txt'] = 'Alle E-Mails abrufen (inkl. bereits gelesene E-Mails)';
-$wb['error_delete_read_all_combination'] = 'Unzulässige Kombination von Optionen. Sie können ';
+$wb['error_delete_read_all_combination'] = 'Unzulässige Kombination von Optionen. Sie können "E-Mails nach Empfang löschen" = nein nicht zusammen mit "Alle E-Mails abrufen (inkl. bereits gelesene E-Mails)" = ja benutzen.';
 ?>
diff --git a/interface/web/mail/lib/lang/el_spamfilter_users.lng b/interface/web/mail/lib/lang/el_spamfilter_users.lng
index 39a9273..0a896b1 100644
--- a/interface/web/mail/lib/lang/el_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/el_spamfilter_users.lng
@@ -5,4 +5,6 @@
 $wb['email_txt'] = 'Email (Μοτίβο)';
 $wb['fullname_txt'] = 'Όνομα';
 $wb['local_txt'] = 'Τοπικός';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
 ?>
diff --git a/interface/web/mail/lib/lang/el_user_quota_stats_list.lng b/interface/web/mail/lib/lang/el_user_quota_stats_list.lng
index 2dfdf3a..8c40407 100755
--- a/interface/web/mail/lib/lang/el_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/el_user_quota_stats_list.lng
@@ -4,4 +4,5 @@
 $wb['name_txt'] = 'Όνομα';
 $wb['email_txt'] = 'Διεύθυνση Email';
 $wb['used_txt'] = 'Χώρος σε χρήση';
+$wb['percentage_txt'] = 'Used %';
 ?>
diff --git a/interface/web/mail/lib/lang/es_spamfilter_users.lng b/interface/web/mail/lib/lang/es_spamfilter_users.lng
index 361c2fe..0078870 100644
--- a/interface/web/mail/lib/lang/es_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/es_spamfilter_users.lng
@@ -5,4 +5,6 @@
 $wb['email_txt'] = 'Correo';
 $wb['fullname_txt'] = 'Nombre';
 $wb['local_txt'] = 'Local';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
 ?>
diff --git a/interface/web/mail/lib/lang/es_user_quota_stats_list.lng b/interface/web/mail/lib/lang/es_user_quota_stats_list.lng
index f069424..75ce5a1 100755
--- a/interface/web/mail/lib/lang/es_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/es_user_quota_stats_list.lng
@@ -4,4 +4,5 @@
 $wb['name_txt'] = 'Nombre';
 $wb['email_txt'] = 'Correo';
 $wb['used_txt'] = 'Usado';
+$wb['percentage_txt'] = 'Used %';
 ?>
diff --git a/interface/web/mail/lib/lang/fi_spamfilter_users.lng b/interface/web/mail/lib/lang/fi_spamfilter_users.lng
index d960f5c..d8a4a3f 100755
--- a/interface/web/mail/lib/lang/fi_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/fi_spamfilter_users.lng
@@ -5,4 +5,6 @@
 $wb['email_txt'] = 'Sähköpostiosoite (RegExp)';
 $wb['fullname_txt'] = 'Koko nimi';
 $wb['local_txt'] = 'Paikallinen';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
 ?>
diff --git a/interface/web/mail/lib/lang/fi_user_quota_stats_list.lng b/interface/web/mail/lib/lang/fi_user_quota_stats_list.lng
index 95fff21..394e97c 100755
--- a/interface/web/mail/lib/lang/fi_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/fi_user_quota_stats_list.lng
@@ -4,4 +4,5 @@
 $wb['name_txt'] = 'Name';
 $wb['email_txt'] = 'Email Address';
 $wb['used_txt'] = 'Used space';
+$wb['percentage_txt'] = 'Used %';
 ?>
diff --git a/interface/web/mail/lib/lang/fr_spamfilter_users.lng b/interface/web/mail/lib/lang/fr_spamfilter_users.lng
index e88d33e..07d0646 100644
--- a/interface/web/mail/lib/lang/fr_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/fr_spamfilter_users.lng
@@ -5,4 +5,6 @@
 $wb['email_txt'] = 'Email (Schéma)';
 $wb['fullname_txt'] = 'Nom';
 $wb['local_txt'] = 'Local';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
 ?>
diff --git a/interface/web/mail/lib/lang/fr_user_quota_stats_list.lng b/interface/web/mail/lib/lang/fr_user_quota_stats_list.lng
index 258d73f..06931ed 100755
--- a/interface/web/mail/lib/lang/fr_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/fr_user_quota_stats_list.lng
@@ -4,4 +4,5 @@
 $wb['name_txt'] = 'Nom';
 $wb['email_txt'] = 'Adresse email';
 $wb['used_txt'] = 'Espace utilisé';
+$wb['percentage_txt'] = 'Used %';
 ?>
diff --git a/interface/web/mail/lib/lang/hr_spamfilter_users.lng b/interface/web/mail/lib/lang/hr_spamfilter_users.lng
index ff988f5..ddd2856 100644
--- a/interface/web/mail/lib/lang/hr_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/hr_spamfilter_users.lng
@@ -5,4 +5,6 @@
 $wb['email_txt'] = 'Email (Pattern)';
 $wb['fullname_txt'] = 'Name';
 $wb['local_txt'] = 'Local';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
 ?>
diff --git a/interface/web/mail/lib/lang/hr_user_quota_stats_list.lng b/interface/web/mail/lib/lang/hr_user_quota_stats_list.lng
index 15cd7d1..a41b1a9 100644
--- a/interface/web/mail/lib/lang/hr_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/hr_user_quota_stats_list.lng
@@ -4,4 +4,5 @@
 $wb['name_txt'] = 'Name';
 $wb['email_txt'] = 'Email Address';
 $wb['used_txt'] = 'Used space';
+$wb['percentage_txt'] = 'Used %';
 ?>
diff --git a/interface/web/mail/lib/lang/hu_spamfilter_users.lng b/interface/web/mail/lib/lang/hu_spamfilter_users.lng
index 4fd29bb..2800c3d 100644
--- a/interface/web/mail/lib/lang/hu_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/hu_spamfilter_users.lng
@@ -5,4 +5,6 @@
 $wb['email_txt'] = 'Email (Minta)';
 $wb['fullname_txt'] = 'Név';
 $wb['local_txt'] = 'Helyi';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
 ?>
diff --git a/interface/web/mail/lib/lang/hu_user_quota_stats_list.lng b/interface/web/mail/lib/lang/hu_user_quota_stats_list.lng
index 95fff21..394e97c 100755
--- a/interface/web/mail/lib/lang/hu_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/hu_user_quota_stats_list.lng
@@ -4,4 +4,5 @@
 $wb['name_txt'] = 'Name';
 $wb['email_txt'] = 'Email Address';
 $wb['used_txt'] = 'Used space';
+$wb['percentage_txt'] = 'Used %';
 ?>
diff --git a/interface/web/mail/lib/lang/id_spamfilter_users.lng b/interface/web/mail/lib/lang/id_spamfilter_users.lng
index 9b2868f..c316090 100644
--- a/interface/web/mail/lib/lang/id_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/id_spamfilter_users.lng
@@ -5,4 +5,6 @@
 $wb['email_txt'] = 'Email (Pola)';
 $wb['fullname_txt'] = 'Nama';
 $wb['local_txt'] = 'Lokal';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
 ?>
diff --git a/interface/web/mail/lib/lang/id_user_quota_stats_list.lng b/interface/web/mail/lib/lang/id_user_quota_stats_list.lng
index 95fff21..394e97c 100755
--- a/interface/web/mail/lib/lang/id_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/id_user_quota_stats_list.lng
@@ -4,4 +4,5 @@
 $wb['name_txt'] = 'Name';
 $wb['email_txt'] = 'Email Address';
 $wb['used_txt'] = 'Used space';
+$wb['percentage_txt'] = 'Used %';
 ?>
diff --git a/interface/web/mail/lib/lang/it_spamfilter_users.lng b/interface/web/mail/lib/lang/it_spamfilter_users.lng
index a93d94d..3edc749 100644
--- a/interface/web/mail/lib/lang/it_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/it_spamfilter_users.lng
@@ -5,4 +5,6 @@
 $wb['email_txt'] = 'Email (Pattern)';
 $wb['fullname_txt'] = 'Name';
 $wb['local_txt'] = 'Local';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
 ?>
diff --git a/interface/web/mail/lib/lang/it_user_quota_stats_list.lng b/interface/web/mail/lib/lang/it_user_quota_stats_list.lng
index 95fff21..394e97c 100755
--- a/interface/web/mail/lib/lang/it_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/it_user_quota_stats_list.lng
@@ -4,4 +4,5 @@
 $wb['name_txt'] = 'Name';
 $wb['email_txt'] = 'Email Address';
 $wb['used_txt'] = 'Used space';
+$wb['percentage_txt'] = 'Used %';
 ?>
diff --git a/interface/web/mail/lib/lang/ja_spamfilter_users.lng b/interface/web/mail/lib/lang/ja_spamfilter_users.lng
index 815e723..9c31558 100644
--- a/interface/web/mail/lib/lang/ja_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/ja_spamfilter_users.lng
@@ -5,4 +5,6 @@
 $wb['email_txt'] = 'メールアドレス(パターン)';
 $wb['fullname_txt'] = 'Name';
 $wb['local_txt'] = 'Local';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
 ?>
diff --git a/interface/web/mail/lib/lang/ja_user_quota_stats_list.lng b/interface/web/mail/lib/lang/ja_user_quota_stats_list.lng
index 95fff21..394e97c 100755
--- a/interface/web/mail/lib/lang/ja_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/ja_user_quota_stats_list.lng
@@ -4,4 +4,5 @@
 $wb['name_txt'] = 'Name';
 $wb['email_txt'] = 'Email Address';
 $wb['used_txt'] = 'Used space';
+$wb['percentage_txt'] = 'Used %';
 ?>
diff --git a/interface/web/mail/lib/lang/nl_spamfilter_users.lng b/interface/web/mail/lib/lang/nl_spamfilter_users.lng
index a6f4ab7..3d32279 100644
--- a/interface/web/mail/lib/lang/nl_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/nl_spamfilter_users.lng
@@ -5,4 +5,6 @@
 $wb['email_txt'] = 'E-mail (Patroon)';
 $wb['fullname_txt'] = 'Naam';
 $wb['local_txt'] = 'Locaal';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
 ?>
diff --git a/interface/web/mail/lib/lang/nl_user_quota_stats_list.lng b/interface/web/mail/lib/lang/nl_user_quota_stats_list.lng
index 95fff21..394e97c 100755
--- a/interface/web/mail/lib/lang/nl_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/nl_user_quota_stats_list.lng
@@ -4,4 +4,5 @@
 $wb['name_txt'] = 'Name';
 $wb['email_txt'] = 'Email Address';
 $wb['used_txt'] = 'Used space';
+$wb['percentage_txt'] = 'Used %';
 ?>
diff --git a/interface/web/mail/lib/lang/pl_spamfilter_users.lng b/interface/web/mail/lib/lang/pl_spamfilter_users.lng
index 656c29e..ef0ebbe 100644
--- a/interface/web/mail/lib/lang/pl_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/pl_spamfilter_users.lng
@@ -5,4 +5,6 @@
 $wb['email_txt'] = 'E-mail (wzór)';
 $wb['fullname_txt'] = 'Nazwa';
 $wb['local_txt'] = 'Lokalne';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
 ?>
diff --git a/interface/web/mail/lib/lang/pl_user_quota_stats_list.lng b/interface/web/mail/lib/lang/pl_user_quota_stats_list.lng
index 2b33b10..14b26b8 100755
--- a/interface/web/mail/lib/lang/pl_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/pl_user_quota_stats_list.lng
@@ -4,4 +4,5 @@
 $wb['name_txt'] = 'Nazwa';
 $wb['email_txt'] = 'Adres e-mail';
 $wb['used_txt'] = 'Użycie dysku';
+$wb['percentage_txt'] = 'Used %';
 ?>
diff --git a/interface/web/mail/lib/lang/pt_spamfilter_users.lng b/interface/web/mail/lib/lang/pt_spamfilter_users.lng
index 4515009..7bf8557 100644
--- a/interface/web/mail/lib/lang/pt_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/pt_spamfilter_users.lng
@@ -5,4 +5,6 @@
 $wb['email_txt'] = 'Correio (Padrão)';
 $wb['fullname_txt'] = 'Nome';
 $wb['local_txt'] = 'Local';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
 ?>
diff --git a/interface/web/mail/lib/lang/pt_user_quota_stats_list.lng b/interface/web/mail/lib/lang/pt_user_quota_stats_list.lng
index 95fff21..394e97c 100755
--- a/interface/web/mail/lib/lang/pt_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/pt_user_quota_stats_list.lng
@@ -4,4 +4,5 @@
 $wb['name_txt'] = 'Name';
 $wb['email_txt'] = 'Email Address';
 $wb['used_txt'] = 'Used space';
+$wb['percentage_txt'] = 'Used %';
 ?>
diff --git a/interface/web/mail/lib/lang/ro_spamfilter_users.lng b/interface/web/mail/lib/lang/ro_spamfilter_users.lng
index d07cd49..a506428 100644
--- a/interface/web/mail/lib/lang/ro_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/ro_spamfilter_users.lng
@@ -5,4 +5,6 @@
 $wb['email_txt'] = 'Email (Pattern)';
 $wb['fullname_txt'] = 'Nume';
 $wb['local_txt'] = 'Local';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
 ?>
diff --git a/interface/web/mail/lib/lang/ro_user_quota_stats_list.lng b/interface/web/mail/lib/lang/ro_user_quota_stats_list.lng
index 95fff21..394e97c 100755
--- a/interface/web/mail/lib/lang/ro_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/ro_user_quota_stats_list.lng
@@ -4,4 +4,5 @@
 $wb['name_txt'] = 'Name';
 $wb['email_txt'] = 'Email Address';
 $wb['used_txt'] = 'Used space';
+$wb['percentage_txt'] = 'Used %';
 ?>
diff --git a/interface/web/mail/lib/lang/ru_spamfilter_users.lng b/interface/web/mail/lib/lang/ru_spamfilter_users.lng
index 6c66658..f5a1dc4 100644
--- a/interface/web/mail/lib/lang/ru_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/ru_spamfilter_users.lng
@@ -5,4 +5,6 @@
 $wb['email_txt'] = 'Email (Шаблон)';
 $wb['fullname_txt'] = 'Имя';
 $wb['local_txt'] = 'Локальный';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
 ?>
diff --git a/interface/web/mail/lib/lang/ru_user_quota_stats_list.lng b/interface/web/mail/lib/lang/ru_user_quota_stats_list.lng
index 95fff21..394e97c 100755
--- a/interface/web/mail/lib/lang/ru_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/ru_user_quota_stats_list.lng
@@ -4,4 +4,5 @@
 $wb['name_txt'] = 'Name';
 $wb['email_txt'] = 'Email Address';
 $wb['used_txt'] = 'Used space';
+$wb['percentage_txt'] = 'Used %';
 ?>
diff --git a/interface/web/mail/lib/lang/se_spamfilter_users.lng b/interface/web/mail/lib/lang/se_spamfilter_users.lng
index a93d94d..3edc749 100644
--- a/interface/web/mail/lib/lang/se_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/se_spamfilter_users.lng
@@ -5,4 +5,6 @@
 $wb['email_txt'] = 'Email (Pattern)';
 $wb['fullname_txt'] = 'Name';
 $wb['local_txt'] = 'Local';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
 ?>
diff --git a/interface/web/mail/lib/lang/se_user_quota_stats_list.lng b/interface/web/mail/lib/lang/se_user_quota_stats_list.lng
index 95fff21..394e97c 100755
--- a/interface/web/mail/lib/lang/se_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/se_user_quota_stats_list.lng
@@ -4,4 +4,5 @@
 $wb['name_txt'] = 'Name';
 $wb['email_txt'] = 'Email Address';
 $wb['used_txt'] = 'Used space';
+$wb['percentage_txt'] = 'Used %';
 ?>
diff --git a/interface/web/mail/lib/lang/sk_spamfilter_users.lng b/interface/web/mail/lib/lang/sk_spamfilter_users.lng
index f193d42..47aba5e 100644
--- a/interface/web/mail/lib/lang/sk_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/sk_spamfilter_users.lng
@@ -5,4 +5,6 @@
 $wb['email_txt'] = 'E-mail (vzor)';
 $wb['fullname_txt'] = 'Meno';
 $wb['local_txt'] = 'Miestny';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
 ?>
diff --git a/interface/web/mail/lib/lang/sk_user_quota_stats_list.lng b/interface/web/mail/lib/lang/sk_user_quota_stats_list.lng
index 95fff21..394e97c 100755
--- a/interface/web/mail/lib/lang/sk_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/sk_user_quota_stats_list.lng
@@ -4,4 +4,5 @@
 $wb['name_txt'] = 'Name';
 $wb['email_txt'] = 'Email Address';
 $wb['used_txt'] = 'Used space';
+$wb['percentage_txt'] = 'Used %';
 ?>
diff --git a/interface/web/mail/lib/lang/tr_spamfilter_users.lng b/interface/web/mail/lib/lang/tr_spamfilter_users.lng
index b1e3ff8..2efbed4 100644
--- a/interface/web/mail/lib/lang/tr_spamfilter_users.lng
+++ b/interface/web/mail/lib/lang/tr_spamfilter_users.lng
@@ -5,4 +5,6 @@
 $wb['email_txt'] = 'Email (Desen)';
 $wb['fullname_txt'] = 'İsim';
 $wb['local_txt'] = 'Yerel';
+$wb['email_error_notempty'] = 'The email address must not be empty.';
+$wb['fullname_error_notempty'] = 'The name must not be empty.';
 ?>
diff --git a/interface/web/mail/lib/lang/tr_user_quota_stats_list.lng b/interface/web/mail/lib/lang/tr_user_quota_stats_list.lng
index 95fff21..394e97c 100755
--- a/interface/web/mail/lib/lang/tr_user_quota_stats_list.lng
+++ b/interface/web/mail/lib/lang/tr_user_quota_stats_list.lng
@@ -4,4 +4,5 @@
 $wb['name_txt'] = 'Name';
 $wb['email_txt'] = 'Email Address';
 $wb['used_txt'] = 'Used space';
+$wb['percentage_txt'] = 'Used %';
 ?>
diff --git a/interface/web/mail/mail_alias_edit.php b/interface/web/mail/mail_alias_edit.php
index b7219d7..bb96a7e 100644
--- a/interface/web/mail/mail_alias_edit.php
+++ b/interface/web/mail/mail_alias_edit.php
@@ -98,6 +98,12 @@
 		$domain = $app->db->queryOneRecord("SELECT server_id, domain FROM mail_domain WHERE domain = '".$app->db->quote($app->functions->idn_encode($_POST["email_domain"]))."' AND ".$app->tform->getAuthSQL('r'));
 		if($domain["domain"] != $app->functions->idn_encode($_POST["email_domain"])) $app->tform->errorMessage .= $app->tform->wordbook["no_domain_perm"];
 		
+		//* Check if destination email belongs to user
+		if(isset($_POST["destination"])) {
+			$email = $app->db->queryOneRecord("SELECT email FROM mail_user WHERE email = '".$app->db->quote($app->functions->idn_encode($_POST["destination"]))."' AND ".$app->tform->getAuthSQL('r'));
+			if($email["email"] != $app->functions->idn_encode($_POST["destination"])) $app->tform->errorMessage .= $app->tform->lng("no_destination_perm");
+		}
+		
 		// Check the client limits, if user is not the admin
 		if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin
 			// Get the limits of the client
diff --git a/interface/web/mail/mail_get_edit.php b/interface/web/mail/mail_get_edit.php
index 41434c0..cd7741b 100644
--- a/interface/web/mail/mail_get_edit.php
+++ b/interface/web/mail/mail_get_edit.php
@@ -69,6 +69,12 @@
 	function onSubmit() {
 		global $app, $conf;
 		
+		//* Check if destination email belongs to user
+		if(isset($_POST["destination"])) {
+			$email = $app->db->queryOneRecord("SELECT email FROM mail_user WHERE email = '".$app->db->quote($app->functions->idn_encode($_POST["destination"]))."' AND ".$app->tform->getAuthSQL('r'));
+			if($email["email"] != $app->functions->idn_encode($_POST["destination"])) $app->tform->errorMessage .= $app->tform->lng("no_destination_perm");
+		}
+		
 		// Check the client limits, if user is not the admin
 		if($_SESSION["s"]["user"]["typ"] != 'admin') { // if user is not admin
 			// Get the limits of the client
diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php
index ca973c5..da3f99cb 100644
--- a/interface/web/mail/mail_user_edit.php
+++ b/interface/web/mail/mail_user_edit.php
@@ -166,7 +166,7 @@
 			}
 			
 			// Check the quota and adjust
-			if(isset($_POST["quota"]) && $client["limit_mailquota"] >= 0) {
+			if(isset($_POST["quota"]) && $client["limit_mailquota"] >= 0 && $app->functions->intval($this->dataRecord["quota"]) * 1024 * 1024 != $this->oldDataRecord['quota']) {
 				$tmp = $app->db->queryOneRecord("SELECT sum(quota) as mailquota FROM mail_user WHERE mailuser_id != ".$app->functions->intval($this->id)." AND ".$app->tform->getAuthSQL('u'));
 				$mailquota = $tmp["mailquota"] / 1024 / 1024;
 				$new_mailbox_quota = $app->functions->intval($this->dataRecord["quota"]);
diff --git a/interface/web/monitor/lib/lang/ar.lng b/interface/web/monitor/lib/lang/ar.lng
index 01a7963..150729e 100644
--- a/interface/web/monitor/lib/lang/ar.lng
+++ b/interface/web/monitor/lib/lang/ar.lng
@@ -146,4 +146,10 @@
 $wb['Show fail2ban-Log'] = 'Show fail2ban-Log';
 $wb['Show IPTables'] = 'Show IPTables';
 $wb['Show OpenVz VE BeanCounter'] = 'Show OpenVz VE BeanCounter';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 ?>
diff --git a/interface/web/monitor/lib/lang/bg.lng b/interface/web/monitor/lib/lang/bg.lng
index 87df355..80dee6c 100644
--- a/interface/web/monitor/lib/lang/bg.lng
+++ b/interface/web/monitor/lib/lang/bg.lng
@@ -146,4 +146,10 @@
 $wb['Show fail2ban-Log'] = 'Покажи fail2ban-Log';
 $wb['Show IPTables'] = 'Покажи IPTables';
 $wb['Show OpenVz VE BeanCounter'] = 'Покажи OpenVz VE BeanCounter';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 ?>
diff --git a/interface/web/monitor/lib/lang/br.lng b/interface/web/monitor/lib/lang/br.lng
index d3f3d30..ff38df2 100644
--- a/interface/web/monitor/lib/lang/br.lng
+++ b/interface/web/monitor/lib/lang/br.lng
@@ -146,4 +146,10 @@
 $wb['Show fail2ban-Log'] = 'Show fail2ban-Log';
 $wb['Show IPTables'] = 'Show IPTables';
 $wb['Show OpenVz VE BeanCounter'] = 'Show OpenVz VE BeanCounter';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 ?>
diff --git a/interface/web/monitor/lib/lang/cz.lng b/interface/web/monitor/lib/lang/cz.lng
index 36647b7..2379533 100644
--- a/interface/web/monitor/lib/lang/cz.lng
+++ b/interface/web/monitor/lib/lang/cz.lng
@@ -146,4 +146,10 @@
 $wb['Show fail2ban-Log'] = 'Zobrazit Fail2Ban Log';
 $wb['Show IPTables'] = 'Zobrazit IPTables pravidla';
 $wb['Show OpenVz VE BeanCounter'] = 'Ukázat OpenVz VE BeanCounter';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 ?>
diff --git a/interface/web/monitor/lib/lang/el.lng b/interface/web/monitor/lib/lang/el.lng
index 88e7f12..d840b6b 100644
--- a/interface/web/monitor/lib/lang/el.lng
+++ b/interface/web/monitor/lib/lang/el.lng
@@ -146,4 +146,10 @@
 $wb['Show IPTables'] = 'Εμφάνιση IPTables';
 $wb['Show OpenVz VE BeanCounter'] = 'Show OpenVz VE BeanCounter';
 $wb['monitor_serverstate_raidresync_txt'] = 'Your RAID is in RESYNC mode';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 ?>
diff --git a/interface/web/monitor/lib/lang/es.lng b/interface/web/monitor/lib/lang/es.lng
index 64c6cd7..020cf4d 100644
--- a/interface/web/monitor/lib/lang/es.lng
+++ b/interface/web/monitor/lib/lang/es.lng
@@ -146,4 +146,10 @@
 $wb['Show fail2ban-Log'] = 'Mostrar el registro de Fail2ban';
 $wb['Show IPTables'] = 'Mostrar IPTables';
 $wb['Show OpenVz VE BeanCounter'] = 'Mostrar OpenVz VE BeanCounter';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 ?>
diff --git a/interface/web/monitor/lib/lang/fi.lng b/interface/web/monitor/lib/lang/fi.lng
index 4036b3c..5d3e4d1 100755
--- a/interface/web/monitor/lib/lang/fi.lng
+++ b/interface/web/monitor/lib/lang/fi.lng
@@ -146,4 +146,10 @@
 $wb['Show fail2ban-Log'] = 'Show fail2ban-Log';
 $wb['Show IPTables'] = 'Show IPTables';
 $wb['Show OpenVz VE BeanCounter'] = 'Show OpenVz VE BeanCounter';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 ?>
diff --git a/interface/web/monitor/lib/lang/fr.lng b/interface/web/monitor/lib/lang/fr.lng
index f107669..70bb47b 100644
--- a/interface/web/monitor/lib/lang/fr.lng
+++ b/interface/web/monitor/lib/lang/fr.lng
@@ -146,4 +146,10 @@
 $wb['monitor_title_beancounter_txt'] = 'Compteur OpenVz VE';
 $wb['monitor_updates_nosupport_txt'] = 'Votre distribution nest pas supportée par le moniteur';
 $wb['monitor_beancounter_nosupport_txt'] = 'Ce serveur n\'est pas un VE OpenVz et n\'a pas d\'information de compteur';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 ?>
diff --git a/interface/web/monitor/lib/lang/hr.lng b/interface/web/monitor/lib/lang/hr.lng
index b141292..da1a09d 100644
--- a/interface/web/monitor/lib/lang/hr.lng
+++ b/interface/web/monitor/lib/lang/hr.lng
@@ -146,4 +146,10 @@
 $wb['Show fail2ban-Log'] = 'Prikaži Fail2Ban log';
 $wb['Show IPTables'] = 'Prikaži IPTables';
 $wb['Show OpenVz VE BeanCounter'] = 'Prikaži OpenVz VE BeanCounter';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 ?>
diff --git a/interface/web/monitor/lib/lang/hu.lng b/interface/web/monitor/lib/lang/hu.lng
index b16d6fc..833b470 100644
--- a/interface/web/monitor/lib/lang/hu.lng
+++ b/interface/web/monitor/lib/lang/hu.lng
@@ -146,4 +146,10 @@
 $wb['Show fail2ban-Log'] = 'Show fail2ban-Log';
 $wb['Show IPTables'] = 'Show IPTables';
 $wb['Show OpenVz VE BeanCounter'] = 'Show OpenVz VE BeanCounter';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 ?>
diff --git a/interface/web/monitor/lib/lang/id.lng b/interface/web/monitor/lib/lang/id.lng
index e0871f3..e2a0286 100644
--- a/interface/web/monitor/lib/lang/id.lng
+++ b/interface/web/monitor/lib/lang/id.lng
@@ -146,4 +146,10 @@
 $wb['Show fail2ban-Log'] = 'Show fail2ban-Log';
 $wb['Show IPTables'] = 'Show IPTables';
 $wb['Show OpenVz VE BeanCounter'] = 'Show OpenVz VE BeanCounter';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 ?>
diff --git a/interface/web/monitor/lib/lang/it.lng b/interface/web/monitor/lib/lang/it.lng
index 8c7b8be..7b5de12 100644
--- a/interface/web/monitor/lib/lang/it.lng
+++ b/interface/web/monitor/lib/lang/it.lng
@@ -146,4 +146,10 @@
 $wb['Show IPTables'] = 'Show IPTables';
 $wb['Show OpenVz VE BeanCounter'] = 'Show OpenVz VE BeanCounter';
 $wb['monitor_title_iptables_txt'] = 'IPTables Rules';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 ?>
diff --git a/interface/web/monitor/lib/lang/ja.lng b/interface/web/monitor/lib/lang/ja.lng
index 0d33407..57e5374 100644
--- a/interface/web/monitor/lib/lang/ja.lng
+++ b/interface/web/monitor/lib/lang/ja.lng
@@ -146,4 +146,10 @@
 $wb['Show fail2ban-Log'] = 'Show fail2ban-Log';
 $wb['Show IPTables'] = 'Show IPTables';
 $wb['Show OpenVz VE BeanCounter'] = 'Show OpenVz VE BeanCounter';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 ?>
diff --git a/interface/web/monitor/lib/lang/nl.lng b/interface/web/monitor/lib/lang/nl.lng
index e4bfb03..103c202 100644
--- a/interface/web/monitor/lib/lang/nl.lng
+++ b/interface/web/monitor/lib/lang/nl.lng
@@ -146,4 +146,10 @@
 $wb['Show fail2ban-Log'] = 'Show fail2ban-Log';
 $wb['Show IPTables'] = 'Show IPTables';
 $wb['Show OpenVz VE BeanCounter'] = 'Show OpenVz VE BeanCounter';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 ?>
diff --git a/interface/web/monitor/lib/lang/pl.lng b/interface/web/monitor/lib/lang/pl.lng
index f1ce821..870e348 100644
--- a/interface/web/monitor/lib/lang/pl.lng
+++ b/interface/web/monitor/lib/lang/pl.lng
@@ -146,4 +146,10 @@
 $wb['Show fail2ban-Log'] = 'Pokaż log fail2ban';
 $wb['Show IPTables'] = 'Pokaż reguły IPTables';
 $wb['Show OpenVz VE BeanCounter'] = 'Show OpenVz VE BeanCounter';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 ?>
diff --git a/interface/web/monitor/lib/lang/pt.lng b/interface/web/monitor/lib/lang/pt.lng
index 08d6d59..42f21a1 100644
--- a/interface/web/monitor/lib/lang/pt.lng
+++ b/interface/web/monitor/lib/lang/pt.lng
@@ -146,4 +146,10 @@
 $wb['Show fail2ban-Log'] = 'Show fail2ban-Log';
 $wb['Show IPTables'] = 'Show IPTables';
 $wb['Show OpenVz VE BeanCounter'] = 'Show OpenVz VE BeanCounter';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 ?>
diff --git a/interface/web/monitor/lib/lang/ro.lng b/interface/web/monitor/lib/lang/ro.lng
index 859c416..167c2f9 100644
--- a/interface/web/monitor/lib/lang/ro.lng
+++ b/interface/web/monitor/lib/lang/ro.lng
@@ -146,4 +146,10 @@
 $wb['Show fail2ban-Log'] = 'Show fail2ban-Log';
 $wb['Show IPTables'] = 'Show IPTables';
 $wb['Show OpenVz VE BeanCounter'] = 'Show OpenVz VE BeanCounter';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 ?>
diff --git a/interface/web/monitor/lib/lang/ru.lng b/interface/web/monitor/lib/lang/ru.lng
index c1b310f..42173f5 100644
--- a/interface/web/monitor/lib/lang/ru.lng
+++ b/interface/web/monitor/lib/lang/ru.lng
@@ -146,4 +146,10 @@
 $wb['Show fail2ban-Log'] = 'Show fail2ban-Log';
 $wb['Show IPTables'] = 'Show IPTables';
 $wb['Show OpenVz VE BeanCounter'] = 'Show OpenVz VE BeanCounter';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 ?>
diff --git a/interface/web/monitor/lib/lang/se.lng b/interface/web/monitor/lib/lang/se.lng
index 5385f76..65c57ae 100644
--- a/interface/web/monitor/lib/lang/se.lng
+++ b/interface/web/monitor/lib/lang/se.lng
@@ -146,4 +146,10 @@
 $wb['Show fail2ban-Log'] = 'Show fail2ban-Log';
 $wb['Show IPTables'] = 'Show IPTables';
 $wb['Show OpenVz VE BeanCounter'] = 'Show OpenVz VE BeanCounter';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 ?>
diff --git a/interface/web/monitor/lib/lang/sk.lng b/interface/web/monitor/lib/lang/sk.lng
index 9fed474..a5ea26c 100644
--- a/interface/web/monitor/lib/lang/sk.lng
+++ b/interface/web/monitor/lib/lang/sk.lng
@@ -146,4 +146,10 @@
 $wb['Show fail2ban-Log'] = 'Show fail2ban-Log';
 $wb['Show IPTables'] = 'Show IPTables';
 $wb['Show OpenVz VE BeanCounter'] = 'Show OpenVz VE BeanCounter';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 ?>
diff --git a/interface/web/monitor/lib/lang/tr.lng b/interface/web/monitor/lib/lang/tr.lng
index aaea022..d15ef4e 100644
--- a/interface/web/monitor/lib/lang/tr.lng
+++ b/interface/web/monitor/lib/lang/tr.lng
@@ -146,4 +146,10 @@
 $wb['Show fail2ban-Log'] = 'Show fail2ban-Log';
 $wb['Show IPTables'] = 'Show IPTables';
 $wb['Show OpenVz VE BeanCounter'] = 'Show OpenVz VE BeanCounter';
+$wb['Show Monit'] = 'Show Monit';
+$wb['no_monit_url_defined_txt'] = 'No Monit URL defined.';
+$wb['no_permissions_to_view_monit_txt'] = 'You are not allowed to access Monit.';
+$wb['Show Munin'] = 'Show Munin';
+$wb['no_munin_url_defined_txt'] = 'No Munin URL defined.';
+$wb['no_permissions_to_view_munin_txt'] = 'You are not allowed to access Munin.';
 ?>
diff --git a/interface/web/sites/ajax_get_json.php b/interface/web/sites/ajax_get_json.php
index 334738a..9da4513 100644
--- a/interface/web/sites/ajax_get_json.php
+++ b/interface/web/sites/ajax_get_json.php
@@ -34,11 +34,12 @@
 //* Check permissions for module
 $app->auth->check_module_permissions('sites');
 
-$app->uses('getconf');
+$app->uses('getconf,tform');
 
 $server_id = $app->functions->intval($_GET["server_id"]);
 $web_id = $app->functions->intval($_GET["web_id"]);
 $php_type = $_GET["php_type"];
+$client_group_id = $app->functions->intval($_GET['client_group_id']);
 $type = $_GET["type"];
 
 //if($_SESSION["s"]["user"]["typ"] == 'admin') {
@@ -55,7 +56,7 @@
 	
 	if($type == 'getserverid'){
 		$json = '{"serverid":"';
-		$sql = "SELECT server_id FROM web_domain WHERE domain_id = $web_id";
+		$sql = "SELECT server_id FROM web_domain WHERE domain_id = $web_id AND ".$app->tform->getAuthSQL('r');
 		$server = $app->db->queryOneRecord($sql);
 		$json .= $server['server_id'];
 		unset($server);
@@ -69,10 +70,26 @@
 		$web_config = $app->getconf->get_server_config($server_id, 'web');
 		if(!empty($web_config['server_type'])) $server_type = $web_config['server_type'];
 		if($server_type == 'nginx' && $php_type == 'fast-cgi') $php_type = 'php-fpm';
-		// get client id
 		$sql_where = '';
-		if($_SESSION["s"]["user"]["typ"] != 'admin'){
-			$sql_where = " AND client_id = ".$_SESSION["s"]["user"]["client_id"];
+		
+		//* 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'])) {
+			$sql_where = " AND (client_id = 0 OR client_id = ".$_SESSION["s"]["user"]["client_id"] . ")";
+		//* 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'])) {
+			$client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = $client_group_id");
+			//$sql_where = " AND (client_id = 0 OR client_id = ".$_SESSION["s"]["user"]["client_id"];
+			$sql_where = " AND (client_id = 0";
+			if($app->functions->intval($client['client_id']) > 0) $sql_where .= " OR client_id = ".$app->functions->intval($client['client_id']);
+			$sql_where .= ")";
+		//* Admin: If the logged in user is admin
+		} else {
+			//$sql_where = '';
+			$client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = $client_group_id");
+			//$sql_where = " AND (client_id = 0 OR client_id = ".$_SESSION["s"]["user"]["client_id"];
+			$sql_where = " AND (client_id = 0";
+			if($app->functions->intval($client['client_id']) > 0) $sql_where .= " OR client_id = ".$app->functions->intval($client['client_id']);
+			$sql_where .= ")";
 		}
 		
 		if($php_type == 'php-fpm'){
@@ -99,7 +116,7 @@
 	
 	if($type == 'getphptype'){
 		$json = '{"phptype":"';
-		$sql = "SELECT php FROM web_domain WHERE domain_id = $web_id";
+		$sql = "SELECT php FROM web_domain WHERE domain_id = $web_id AND ".$app->tform->getAuthSQL('r');
 		$php = $app->db->queryOneRecord($sql);
 		$json .= $php['php'];
 		unset($php);
@@ -108,7 +125,7 @@
 	
 	if($type == 'getredirecttype'){
 		$json = '{"redirecttype":"';
-		$sql = "SELECT redirect_type FROM web_domain WHERE domain_id = $web_id";
+		$sql = "SELECT redirect_type FROM web_domain WHERE domain_id = $web_id AND ".$app->tform->getAuthSQL('r');
 		$redirect = $app->db->queryOneRecord($sql);
 		$json .= $redirect['redirect_type'];
 		unset($redirect);
@@ -138,7 +155,7 @@
     if($type == 'getdatabaseusers') {
         $json = '{}';
 		
-		$sql = "SELECT sys_groupid FROM web_domain WHERE domain_id = $web_id";
+		$sql = "SELECT sys_groupid FROM web_domain WHERE domain_id = $web_id AND ".$app->tform->getAuthSQL('r');
         $group = $app->db->queryOneRecord($sql);
         if($group) {
             $sql = "SELECT database_user_id, database_user FROM web_database_user WHERE sys_groupid = '" . $group['sys_groupid'] . "'";
diff --git a/interface/web/sites/cron_edit.php b/interface/web/sites/cron_edit.php
index 4c584d1..fea4a7b 100644
--- a/interface/web/sites/cron_edit.php
+++ b/interface/web/sites/cron_edit.php
@@ -104,7 +104,8 @@
 		}
 		
         // Get the record of the parent domain
-        $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]));
+        $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r'));
+        if(!$parent_domain || $parent_domain['domain_id'] != @$this->dataRecord['parent_domain_id']) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm");
         
         // Set fixed values
         $this->dataRecord["server_id"] = $parent_domain["server_id"];
diff --git a/interface/web/sites/database_edit.php b/interface/web/sites/database_edit.php
index 8dc3ab3..99e0bbd 100644
--- a/interface/web/sites/database_edit.php
+++ b/interface/web/sites/database_edit.php
@@ -136,6 +136,9 @@
 	function onSubmit() {
 		global $app, $conf;
 
+        $parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r'));
+        if(!$parent_domain || $parent_domain['domain_id'] != @$this->dataRecord['parent_domain_id']) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm");
+        
 		if($_SESSION["s"]["user"]["typ"] != 'admin') {
 			// Get the limits of the client
 			$client_group_id = $_SESSION["s"]["user"]["default_group"];
@@ -186,7 +189,7 @@
 	function onBeforeUpdate() {
 		global $app, $conf, $interfaceConf;
 
-		//* Site shell not be empty
+		//* Site shall not be empty
 		if($this->dataRecord['parent_domain_id'] == 0) $app->tform->errorMessage .= $app->tform->lng("database_site_error_empty").'<br />';
 		
 		//* Get the database name and database user prefix
diff --git a/interface/web/sites/ftp_user_edit.php b/interface/web/sites/ftp_user_edit.php
index 798233d..59a3680 100644
--- a/interface/web/sites/ftp_user_edit.php
+++ b/interface/web/sites/ftp_user_edit.php
@@ -91,7 +91,15 @@
 		global $app, $conf;
 		
 		// Get the record of the parent domain
-		$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]));
+		if(isset($this->dataRecord["parent_domain_id"])) {
+			$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r'));
+			if(!$parent_domain || $parent_domain['domain_id'] != @$this->dataRecord['parent_domain_id']) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm");
+		} else {
+			$tmp = $app->tform->getDataRecord($this->id);
+			$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval($tmp["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r'));
+			if(!$parent_domain) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm");
+			unset($tmp);
+		}
 		
 		// Set a few fixed values
 		$this->dataRecord["server_id"] = $parent_domain["server_id"];
diff --git a/interface/web/sites/lib/lang/ar_shell_user.lng b/interface/web/sites/lib/lang/ar_shell_user.lng
index 4f59994..8460d4e 100644
--- a/interface/web/sites/lib/lang/ar_shell_user.lng
+++ b/interface/web/sites/lib/lang/ar_shell_user.lng
@@ -26,4 +26,6 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
 ?>
diff --git a/interface/web/sites/lib/lang/ar_web_domain.lng b/interface/web/sites/lib/lang/ar_web_domain.lng
index f10cc42..8bdb312 100644
--- a/interface/web/sites/lib/lang/ar_web_domain.lng
+++ b/interface/web/sites/lib/lang/ar_web_domain.lng
@@ -112,4 +112,11 @@
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
 $wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
 ?>
diff --git a/interface/web/sites/lib/lang/ar_web_folder_user.lng b/interface/web/sites/lib/lang/ar_web_folder_user.lng
index bf56653..3534ea7 100644
--- a/interface/web/sites/lib/lang/ar_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/ar_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['no_folder_perm'] = 'You have no permission for this folder.';
 ?>
diff --git a/interface/web/sites/lib/lang/bg_shell_user.lng b/interface/web/sites/lib/lang/bg_shell_user.lng
index 888a1b8..82a44af 100644
--- a/interface/web/sites/lib/lang/bg_shell_user.lng
+++ b/interface/web/sites/lib/lang/bg_shell_user.lng
@@ -26,4 +26,6 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
 ?>
diff --git a/interface/web/sites/lib/lang/bg_web_domain.lng b/interface/web/sites/lib/lang/bg_web_domain.lng
index c2816ad..dc2d3ff 100644
--- a/interface/web/sites/lib/lang/bg_web_domain.lng
+++ b/interface/web/sites/lib/lang/bg_web_domain.lng
@@ -112,4 +112,11 @@
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
 $wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
 ?>
diff --git a/interface/web/sites/lib/lang/bg_web_folder_user.lng b/interface/web/sites/lib/lang/bg_web_folder_user.lng
index df127eb..c84ea71 100644
--- a/interface/web/sites/lib/lang/bg_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/bg_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['no_folder_perm'] = 'You have no permission for this folder.';
 ?>
diff --git a/interface/web/sites/lib/lang/br_shell_user.lng b/interface/web/sites/lib/lang/br_shell_user.lng
index a001451..8a098cb 100644
--- a/interface/web/sites/lib/lang/br_shell_user.lng
+++ b/interface/web/sites/lib/lang/br_shell_user.lng
@@ -26,4 +26,6 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
 ?>
diff --git a/interface/web/sites/lib/lang/br_web_domain.lng b/interface/web/sites/lib/lang/br_web_domain.lng
index 623bc0b..b2abb2a 100644
--- a/interface/web/sites/lib/lang/br_web_domain.lng
+++ b/interface/web/sites/lib/lang/br_web_domain.lng
@@ -112,4 +112,11 @@
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
 $wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
 ?>
diff --git a/interface/web/sites/lib/lang/br_web_folder_user.lng b/interface/web/sites/lib/lang/br_web_folder_user.lng
index bf56653..3534ea7 100644
--- a/interface/web/sites/lib/lang/br_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/br_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['no_folder_perm'] = 'You have no permission for this folder.';
 ?>
diff --git a/interface/web/sites/lib/lang/cz_shell_user.lng b/interface/web/sites/lib/lang/cz_shell_user.lng
index 97b8a0d..711475e 100644
--- a/interface/web/sites/lib/lang/cz_shell_user.lng
+++ b/interface/web/sites/lib/lang/cz_shell_user.lng
@@ -26,4 +26,6 @@
 $wb['repeat_password_txt'] = 'Opakujte heslo';
 $wb['password_mismatch_txt'] = 'Hesla se neshodují.';
 $wb['password_match_txt'] = 'Hesla se shodují.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
 ?>
diff --git a/interface/web/sites/lib/lang/cz_web_domain.lng b/interface/web/sites/lib/lang/cz_web_domain.lng
index f3e31d3..49ee278 100644
--- a/interface/web/sites/lib/lang/cz_web_domain.lng
+++ b/interface/web/sites/lib/lang/cz_web_domain.lng
@@ -112,4 +112,11 @@
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
 $wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
 ?>
diff --git a/interface/web/sites/lib/lang/cz_web_folder_user.lng b/interface/web/sites/lib/lang/cz_web_folder_user.lng
index 48f4260..d55cb29 100644
--- a/interface/web/sites/lib/lang/cz_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/cz_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Opakujte heslo';
 $wb['password_mismatch_txt'] = 'Hesla se neshodují.';
 $wb['password_match_txt'] = 'Hesla se shodují.';
+$wb['no_folder_perm'] = 'You have no permission for this folder.';
 ?>
diff --git a/interface/web/sites/lib/lang/de_database_admin_list.lng b/interface/web/sites/lib/lang/de_database_admin_list.lng
index 3b11b2c..f77b4ca 100644
--- a/interface/web/sites/lib/lang/de_database_admin_list.lng
+++ b/interface/web/sites/lib/lang/de_database_admin_list.lng
@@ -8,4 +8,5 @@
 $wb['database_name_txt'] = 'Datenbankname';
 $wb['add_new_record_txt'] = 'Neue Datenbank hinzufügen';
 $wb['sys_groupid_txt'] = 'Kunde';
+$wb['parent_domain_id_txt'] = 'Domain';
 ?>
diff --git a/interface/web/sites/lib/lang/de_database_list.lng b/interface/web/sites/lib/lang/de_database_list.lng
index 89caea3..d355181 100644
--- a/interface/web/sites/lib/lang/de_database_list.lng
+++ b/interface/web/sites/lib/lang/de_database_list.lng
@@ -7,4 +7,5 @@
 $wb['database_name_txt'] = 'Datenbankname';
 $wb['add_new_record_txt'] = 'Neue Datenbank hinzufügen';
 $wb['database_user_txt'] = 'Database user';
+$wb['parent_domain_id_txt'] = 'Domain';
 ?>
diff --git a/interface/web/sites/lib/lang/de_web_domain.lng b/interface/web/sites/lib/lang/de_web_domain.lng
index 5467c99..15bbcfd 100644
--- a/interface/web/sites/lib/lang/de_web_domain.lng
+++ b/interface/web/sites/lib/lang/de_web_domain.lng
@@ -119,4 +119,5 @@
 $wb['rewrite_rules_txt'] = 'Rewrite Rules';
 $wb['invalid_rewrite_rules_txt'] = 'Unzulässige Rewrite Rules';
 $wb['allowed_rewrite_rule_directives_txt'] = 'Erlaubte Direktiven:';
+$wb['configuration_error_txt'] = "KONFIGURATIONSFEHLER";
 ?>
diff --git a/interface/web/sites/lib/lang/de_web_folder_user.lng b/interface/web/sites/lib/lang/de_web_folder_user.lng
index 9562168..6983dc1 100644
--- a/interface/web/sites/lib/lang/de_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/de_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Passwort wiederholen';
 $wb['password_mismatch_txt'] = 'Die Passwörter stimmen nicht überein.';
 $wb['password_match_txt'] = 'Die Passwörter stimmen überein.';
+$wb['no_folder_perm'] = 'Sie haben keine Berechtigung für diesen Ordner.';
 ?>
diff --git a/interface/web/sites/lib/lang/el_shell_user.lng b/interface/web/sites/lib/lang/el_shell_user.lng
index e41572a..3c3ea31 100644
--- a/interface/web/sites/lib/lang/el_shell_user.lng
+++ b/interface/web/sites/lib/lang/el_shell_user.lng
@@ -26,4 +26,6 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
 ?>
diff --git a/interface/web/sites/lib/lang/el_web_domain.lng b/interface/web/sites/lib/lang/el_web_domain.lng
index e13af50..6cdc3d7 100644
--- a/interface/web/sites/lib/lang/el_web_domain.lng
+++ b/interface/web/sites/lib/lang/el_web_domain.lng
@@ -112,4 +112,11 @@
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
 $wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
 ?>
diff --git a/interface/web/sites/lib/lang/el_web_folder_user.lng b/interface/web/sites/lib/lang/el_web_folder_user.lng
index 0435d23..6835eaa 100644
--- a/interface/web/sites/lib/lang/el_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/el_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['no_folder_perm'] = 'You have no permission for this folder.';
 ?>
diff --git a/interface/web/sites/lib/lang/en_database_admin_list.lng b/interface/web/sites/lib/lang/en_database_admin_list.lng
index 5d0ad7a..e68d993 100644
--- a/interface/web/sites/lib/lang/en_database_admin_list.lng
+++ b/interface/web/sites/lib/lang/en_database_admin_list.lng
@@ -8,4 +8,5 @@
 $wb["database_name_txt"] = 'Database name';
 $wb["add_new_record_txt"] = 'Add new Database';
 $wb["sys_groupid_txt"] = 'Client';
+$wb["parent_domain_id_txt"] = 'Website';
 ?>
diff --git a/interface/web/sites/lib/lang/en_database_list.lng b/interface/web/sites/lib/lang/en_database_list.lng
index 0a8d6ff..13bb304 100644
--- a/interface/web/sites/lib/lang/en_database_list.lng
+++ b/interface/web/sites/lib/lang/en_database_list.lng
@@ -7,4 +7,5 @@
 $wb["database_user_txt"] = 'Database user';
 $wb["database_name_txt"] = 'Database name';
 $wb["add_new_record_txt"] = 'Add new Database';
-?>
+$wb["parent_domain_id_txt"] = 'Website';
+?>
\ No newline at end of file
diff --git a/interface/web/sites/lib/lang/en_web_domain.lng b/interface/web/sites/lib/lang/en_web_domain.lng
index f48953f..6f5647b 100644
--- a/interface/web/sites/lib/lang/en_web_domain.lng
+++ b/interface/web/sites/lib/lang/en_web_domain.lng
@@ -119,4 +119,5 @@
 $wb['rewrite_rules_txt'] = 'Rewrite Rules';
 $wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
 $wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
+$wb['configuration_error_txt'] = "CONFIGURATION ERROR";
 ?>
\ No newline at end of file
diff --git a/interface/web/sites/lib/lang/en_web_folder_user.lng b/interface/web/sites/lib/lang/en_web_folder_user.lng
index 4d46ec8..63c1856 100644
--- a/interface/web/sites/lib/lang/en_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/en_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb["no_folder_perm"] = 'You have no permission for this folder.';
 ?>
\ No newline at end of file
diff --git a/interface/web/sites/lib/lang/es_shell_user.lng b/interface/web/sites/lib/lang/es_shell_user.lng
index 2ca9c55..45fd930 100644
--- a/interface/web/sites/lib/lang/es_shell_user.lng
+++ b/interface/web/sites/lib/lang/es_shell_user.lng
@@ -26,4 +26,6 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
 ?>
diff --git a/interface/web/sites/lib/lang/es_web_domain.lng b/interface/web/sites/lib/lang/es_web_domain.lng
index db0a0b6..b3f4660 100644
--- a/interface/web/sites/lib/lang/es_web_domain.lng
+++ b/interface/web/sites/lib/lang/es_web_domain.lng
@@ -112,4 +112,11 @@
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
 $wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
 ?>
diff --git a/interface/web/sites/lib/lang/es_web_folder_user.lng b/interface/web/sites/lib/lang/es_web_folder_user.lng
index 645fe3a..f3468c9 100644
--- a/interface/web/sites/lib/lang/es_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/es_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['no_folder_perm'] = 'You have no permission for this folder.';
 ?>
diff --git a/interface/web/sites/lib/lang/fi_shell_user.lng b/interface/web/sites/lib/lang/fi_shell_user.lng
index 423939d..06fe1bd 100755
--- a/interface/web/sites/lib/lang/fi_shell_user.lng
+++ b/interface/web/sites/lib/lang/fi_shell_user.lng
@@ -26,4 +26,6 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
 ?>
diff --git a/interface/web/sites/lib/lang/fi_web_domain.lng b/interface/web/sites/lib/lang/fi_web_domain.lng
index 7c31eeb..1c4055a 100755
--- a/interface/web/sites/lib/lang/fi_web_domain.lng
+++ b/interface/web/sites/lib/lang/fi_web_domain.lng
@@ -112,4 +112,11 @@
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
 $wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
 ?>
diff --git a/interface/web/sites/lib/lang/fi_web_folder_user.lng b/interface/web/sites/lib/lang/fi_web_folder_user.lng
index bf56653..3534ea7 100644
--- a/interface/web/sites/lib/lang/fi_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/fi_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['no_folder_perm'] = 'You have no permission for this folder.';
 ?>
diff --git a/interface/web/sites/lib/lang/fr_shell_user.lng b/interface/web/sites/lib/lang/fr_shell_user.lng
index 3af188c..1fbc93c 100644
--- a/interface/web/sites/lib/lang/fr_shell_user.lng
+++ b/interface/web/sites/lib/lang/fr_shell_user.lng
@@ -26,4 +26,6 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
 ?>
diff --git a/interface/web/sites/lib/lang/fr_web_domain.lng b/interface/web/sites/lib/lang/fr_web_domain.lng
index d002990..d96e6ad 100644
--- a/interface/web/sites/lib/lang/fr_web_domain.lng
+++ b/interface/web/sites/lib/lang/fr_web_domain.lng
@@ -112,4 +112,11 @@
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
 $wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
 ?>
diff --git a/interface/web/sites/lib/lang/fr_web_folder_user.lng b/interface/web/sites/lib/lang/fr_web_folder_user.lng
index df2f802..444814c 100644
--- a/interface/web/sites/lib/lang/fr_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/fr_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['no_folder_perm'] = 'You have no permission for this folder.';
 ?>
diff --git a/interface/web/sites/lib/lang/hr_shell_user.lng b/interface/web/sites/lib/lang/hr_shell_user.lng
index b38dde9..4173787 100644
--- a/interface/web/sites/lib/lang/hr_shell_user.lng
+++ b/interface/web/sites/lib/lang/hr_shell_user.lng
@@ -26,4 +26,6 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
 ?>
diff --git a/interface/web/sites/lib/lang/hr_web_domain.lng b/interface/web/sites/lib/lang/hr_web_domain.lng
index 37bed82..8c47934 100644
--- a/interface/web/sites/lib/lang/hr_web_domain.lng
+++ b/interface/web/sites/lib/lang/hr_web_domain.lng
@@ -112,4 +112,11 @@
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
 $wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
 ?>
diff --git a/interface/web/sites/lib/lang/hr_web_folder_user.lng b/interface/web/sites/lib/lang/hr_web_folder_user.lng
index b81caa5..8ebc859 100644
--- a/interface/web/sites/lib/lang/hr_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/hr_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['no_folder_perm'] = 'You have no permission for this folder.';
 ?>
diff --git a/interface/web/sites/lib/lang/hu_shell_user.lng b/interface/web/sites/lib/lang/hu_shell_user.lng
index 3191cc8..849f380 100644
--- a/interface/web/sites/lib/lang/hu_shell_user.lng
+++ b/interface/web/sites/lib/lang/hu_shell_user.lng
@@ -26,4 +26,6 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
 ?>
diff --git a/interface/web/sites/lib/lang/hu_web_domain.lng b/interface/web/sites/lib/lang/hu_web_domain.lng
index 2bf0127..0060787 100644
--- a/interface/web/sites/lib/lang/hu_web_domain.lng
+++ b/interface/web/sites/lib/lang/hu_web_domain.lng
@@ -112,4 +112,11 @@
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
 $wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
 ?>
diff --git a/interface/web/sites/lib/lang/hu_web_folder_user.lng b/interface/web/sites/lib/lang/hu_web_folder_user.lng
index bf56653..3534ea7 100644
--- a/interface/web/sites/lib/lang/hu_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/hu_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['no_folder_perm'] = 'You have no permission for this folder.';
 ?>
diff --git a/interface/web/sites/lib/lang/id_shell_user.lng b/interface/web/sites/lib/lang/id_shell_user.lng
index f36c057..0ec09cc 100644
--- a/interface/web/sites/lib/lang/id_shell_user.lng
+++ b/interface/web/sites/lib/lang/id_shell_user.lng
@@ -26,4 +26,6 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
 ?>
diff --git a/interface/web/sites/lib/lang/id_web_domain.lng b/interface/web/sites/lib/lang/id_web_domain.lng
index 6c46439..5bcfb28 100644
--- a/interface/web/sites/lib/lang/id_web_domain.lng
+++ b/interface/web/sites/lib/lang/id_web_domain.lng
@@ -112,4 +112,11 @@
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
 $wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
 ?>
diff --git a/interface/web/sites/lib/lang/id_web_folder_user.lng b/interface/web/sites/lib/lang/id_web_folder_user.lng
index bf56653..3534ea7 100644
--- a/interface/web/sites/lib/lang/id_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/id_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['no_folder_perm'] = 'You have no permission for this folder.';
 ?>
diff --git a/interface/web/sites/lib/lang/it_shell_user.lng b/interface/web/sites/lib/lang/it_shell_user.lng
index 4f59994..8460d4e 100644
--- a/interface/web/sites/lib/lang/it_shell_user.lng
+++ b/interface/web/sites/lib/lang/it_shell_user.lng
@@ -26,4 +26,6 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
 ?>
diff --git a/interface/web/sites/lib/lang/it_web_domain.lng b/interface/web/sites/lib/lang/it_web_domain.lng
index 084b4ac..d605e88 100644
--- a/interface/web/sites/lib/lang/it_web_domain.lng
+++ b/interface/web/sites/lib/lang/it_web_domain.lng
@@ -112,4 +112,11 @@
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
 $wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
 ?>
diff --git a/interface/web/sites/lib/lang/it_web_folder_user.lng b/interface/web/sites/lib/lang/it_web_folder_user.lng
index bf56653..3534ea7 100644
--- a/interface/web/sites/lib/lang/it_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/it_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['no_folder_perm'] = 'You have no permission for this folder.';
 ?>
diff --git a/interface/web/sites/lib/lang/ja_shell_user.lng b/interface/web/sites/lib/lang/ja_shell_user.lng
index 04c7a78..19f09a5 100644
--- a/interface/web/sites/lib/lang/ja_shell_user.lng
+++ b/interface/web/sites/lib/lang/ja_shell_user.lng
@@ -26,4 +26,6 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
 ?>
diff --git a/interface/web/sites/lib/lang/ja_web_domain.lng b/interface/web/sites/lib/lang/ja_web_domain.lng
index 43162ef..a6dbbf6 100644
--- a/interface/web/sites/lib/lang/ja_web_domain.lng
+++ b/interface/web/sites/lib/lang/ja_web_domain.lng
@@ -112,4 +112,11 @@
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
 $wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
 ?>
diff --git a/interface/web/sites/lib/lang/ja_web_folder_user.lng b/interface/web/sites/lib/lang/ja_web_folder_user.lng
index bf56653..3534ea7 100644
--- a/interface/web/sites/lib/lang/ja_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/ja_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['no_folder_perm'] = 'You have no permission for this folder.';
 ?>
diff --git a/interface/web/sites/lib/lang/nl_shell_user.lng b/interface/web/sites/lib/lang/nl_shell_user.lng
index bfd9635..53fed20 100644
--- a/interface/web/sites/lib/lang/nl_shell_user.lng
+++ b/interface/web/sites/lib/lang/nl_shell_user.lng
@@ -26,4 +26,6 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
 ?>
diff --git a/interface/web/sites/lib/lang/nl_web_domain.lng b/interface/web/sites/lib/lang/nl_web_domain.lng
index 785471d..e2bb5cb 100644
--- a/interface/web/sites/lib/lang/nl_web_domain.lng
+++ b/interface/web/sites/lib/lang/nl_web_domain.lng
@@ -112,4 +112,11 @@
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
 $wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
 ?>
diff --git a/interface/web/sites/lib/lang/nl_web_folder_user.lng b/interface/web/sites/lib/lang/nl_web_folder_user.lng
index bf56653..3534ea7 100644
--- a/interface/web/sites/lib/lang/nl_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/nl_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['no_folder_perm'] = 'You have no permission for this folder.';
 ?>
diff --git a/interface/web/sites/lib/lang/pl_shell_user.lng b/interface/web/sites/lib/lang/pl_shell_user.lng
index 5259aeb..e51ef64 100644
--- a/interface/web/sites/lib/lang/pl_shell_user.lng
+++ b/interface/web/sites/lib/lang/pl_shell_user.lng
@@ -26,4 +26,6 @@
 $wb['repeat_password_txt'] = 'Powtórz hasło';
 $wb['password_mismatch_txt'] = 'Hasła nie pasują do siebie';
 $wb['password_match_txt'] = 'Hasła pasują';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
 ?>
diff --git a/interface/web/sites/lib/lang/pl_web_domain.lng b/interface/web/sites/lib/lang/pl_web_domain.lng
index 4cac25f..c08113e 100644
--- a/interface/web/sites/lib/lang/pl_web_domain.lng
+++ b/interface/web/sites/lib/lang/pl_web_domain.lng
@@ -112,4 +112,11 @@
 $wb['proxy_directives_txt'] = 'Dyrektywy Proxy';
 $wb['available_proxy_directive_snippets_txt'] = 'Dostępne zestawy dyrektyw Proxy:';
 $wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
 ?>
diff --git a/interface/web/sites/lib/lang/pl_web_folder_user.lng b/interface/web/sites/lib/lang/pl_web_folder_user.lng
index 1975ae5..25f7de4 100644
--- a/interface/web/sites/lib/lang/pl_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/pl_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Powtórz hasło';
 $wb['password_mismatch_txt'] = 'Hasła nie pasują do siebie';
 $wb['password_match_txt'] = 'Hasła pasują';
+$wb['no_folder_perm'] = 'You have no permission for this folder.';
 ?>
diff --git a/interface/web/sites/lib/lang/pt_shell_user.lng b/interface/web/sites/lib/lang/pt_shell_user.lng
index 821e5cb..5e34648 100644
--- a/interface/web/sites/lib/lang/pt_shell_user.lng
+++ b/interface/web/sites/lib/lang/pt_shell_user.lng
@@ -26,4 +26,6 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
 ?>
diff --git a/interface/web/sites/lib/lang/pt_web_domain.lng b/interface/web/sites/lib/lang/pt_web_domain.lng
index e3acc8a..787e1c7 100644
--- a/interface/web/sites/lib/lang/pt_web_domain.lng
+++ b/interface/web/sites/lib/lang/pt_web_domain.lng
@@ -112,4 +112,11 @@
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
 $wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
 ?>
diff --git a/interface/web/sites/lib/lang/pt_web_folder_user.lng b/interface/web/sites/lib/lang/pt_web_folder_user.lng
index bf56653..3534ea7 100644
--- a/interface/web/sites/lib/lang/pt_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/pt_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['no_folder_perm'] = 'You have no permission for this folder.';
 ?>
diff --git a/interface/web/sites/lib/lang/ro_shell_user.lng b/interface/web/sites/lib/lang/ro_shell_user.lng
index 1eea93f..d4620af 100644
--- a/interface/web/sites/lib/lang/ro_shell_user.lng
+++ b/interface/web/sites/lib/lang/ro_shell_user.lng
@@ -26,4 +26,6 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
 ?>
diff --git a/interface/web/sites/lib/lang/ro_web_domain.lng b/interface/web/sites/lib/lang/ro_web_domain.lng
index d100895..31e0112 100644
--- a/interface/web/sites/lib/lang/ro_web_domain.lng
+++ b/interface/web/sites/lib/lang/ro_web_domain.lng
@@ -112,4 +112,11 @@
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
 $wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
 ?>
diff --git a/interface/web/sites/lib/lang/ro_web_folder_user.lng b/interface/web/sites/lib/lang/ro_web_folder_user.lng
index bf56653..3534ea7 100644
--- a/interface/web/sites/lib/lang/ro_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/ro_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['no_folder_perm'] = 'You have no permission for this folder.';
 ?>
diff --git a/interface/web/sites/lib/lang/ru_shell_user.lng b/interface/web/sites/lib/lang/ru_shell_user.lng
index 6723395..d87f544 100644
--- a/interface/web/sites/lib/lang/ru_shell_user.lng
+++ b/interface/web/sites/lib/lang/ru_shell_user.lng
@@ -26,4 +26,6 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
 ?>
diff --git a/interface/web/sites/lib/lang/ru_web_domain.lng b/interface/web/sites/lib/lang/ru_web_domain.lng
index 46f377f..5f6aafd 100644
--- a/interface/web/sites/lib/lang/ru_web_domain.lng
+++ b/interface/web/sites/lib/lang/ru_web_domain.lng
@@ -112,4 +112,11 @@
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
 $wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
 ?>
diff --git a/interface/web/sites/lib/lang/ru_web_folder_user.lng b/interface/web/sites/lib/lang/ru_web_folder_user.lng
index bf56653..3534ea7 100644
--- a/interface/web/sites/lib/lang/ru_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/ru_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['no_folder_perm'] = 'You have no permission for this folder.';
 ?>
diff --git a/interface/web/sites/lib/lang/se_shell_user.lng b/interface/web/sites/lib/lang/se_shell_user.lng
index 4f59994..8460d4e 100644
--- a/interface/web/sites/lib/lang/se_shell_user.lng
+++ b/interface/web/sites/lib/lang/se_shell_user.lng
@@ -26,4 +26,6 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
 ?>
diff --git a/interface/web/sites/lib/lang/se_web_domain.lng b/interface/web/sites/lib/lang/se_web_domain.lng
index a44eee8..3e309ed 100644
--- a/interface/web/sites/lib/lang/se_web_domain.lng
+++ b/interface/web/sites/lib/lang/se_web_domain.lng
@@ -112,4 +112,11 @@
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
 $wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
 ?>
diff --git a/interface/web/sites/lib/lang/se_web_folder_user.lng b/interface/web/sites/lib/lang/se_web_folder_user.lng
index bf56653..3534ea7 100644
--- a/interface/web/sites/lib/lang/se_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/se_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['no_folder_perm'] = 'You have no permission for this folder.';
 ?>
diff --git a/interface/web/sites/lib/lang/sk_shell_user.lng b/interface/web/sites/lib/lang/sk_shell_user.lng
index fc05429..79f9eac 100644
--- a/interface/web/sites/lib/lang/sk_shell_user.lng
+++ b/interface/web/sites/lib/lang/sk_shell_user.lng
@@ -26,4 +26,6 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
 ?>
diff --git a/interface/web/sites/lib/lang/sk_web_domain.lng b/interface/web/sites/lib/lang/sk_web_domain.lng
index b127ec2..952216f 100644
--- a/interface/web/sites/lib/lang/sk_web_domain.lng
+++ b/interface/web/sites/lib/lang/sk_web_domain.lng
@@ -112,4 +112,11 @@
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
 $wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
 ?>
diff --git a/interface/web/sites/lib/lang/sk_web_folder_user.lng b/interface/web/sites/lib/lang/sk_web_folder_user.lng
index bf56653..3534ea7 100644
--- a/interface/web/sites/lib/lang/sk_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/sk_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['no_folder_perm'] = 'You have no permission for this folder.';
 ?>
diff --git a/interface/web/sites/lib/lang/tr_shell_user.lng b/interface/web/sites/lib/lang/tr_shell_user.lng
index 17a5ff0..ac45063 100644
--- a/interface/web/sites/lib/lang/tr_shell_user.lng
+++ b/interface/web/sites/lib/lang/tr_shell_user.lng
@@ -26,4 +26,6 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['username_must_not_exceed_32_chars_txt'] = 'The username must not exceed 32 characters.';
+$wb['username_not_allowed_txt'] = 'The username is not allowed.';
 ?>
diff --git a/interface/web/sites/lib/lang/tr_web_domain.lng b/interface/web/sites/lib/lang/tr_web_domain.lng
index 814f600..23a5374 100644
--- a/interface/web/sites/lib/lang/tr_web_domain.lng
+++ b/interface/web/sites/lib/lang/tr_web_domain.lng
@@ -111,4 +111,12 @@
 $wb['available_nginx_directive_snippets_txt'] = 'Available nginx Directive Snippets:';
 $wb['proxy_directives_txt'] = 'Proxy Directives';
 $wb['available_proxy_directive_snippets_txt'] = 'Available Proxy Directive Snippets:';
+$wb['no_server_error'] = 'No server selected.';
+$wb['no_backup_txt'] = 'No backup';
+$wb['daily_backup_txt'] = 'Daily';
+$wb['weekly_backup_txt'] = 'Weekly';
+$wb['monthly_backup_txt'] = 'Monthly';
+$wb['rewrite_rules_txt'] = 'Rewrite Rules';
+$wb['invalid_rewrite_rules_txt'] = 'Invalid Rewrite Rules';
+$wb['allowed_rewrite_rule_directives_txt'] = 'Allowed Directives:';
 ?>
diff --git a/interface/web/sites/lib/lang/tr_web_folder_user.lng b/interface/web/sites/lib/lang/tr_web_folder_user.lng
index bf56653..3534ea7 100644
--- a/interface/web/sites/lib/lang/tr_web_folder_user.lng
+++ b/interface/web/sites/lib/lang/tr_web_folder_user.lng
@@ -9,4 +9,5 @@
 $wb['repeat_password_txt'] = 'Repeat Password';
 $wb['password_mismatch_txt'] = 'The passwords do not match.';
 $wb['password_match_txt'] = 'The passwords do match.';
+$wb['no_folder_perm'] = 'You have no permission for this folder.';
 ?>
diff --git a/interface/web/sites/list/database.list.php b/interface/web/sites/list/database.list.php
index f512bef..76dbec5 100644
--- a/interface/web/sites/list/database.list.php
+++ b/interface/web/sites/list/database.list.php
@@ -112,6 +112,23 @@
 									 				  ),
 							'width'		=> "",
 							'value'		=> "");
+							
+$liste["item"][] = array(	'field'		=> "parent_domain_id",
+							'datatype'	=> "VARCHAR",
+                            'filters'   => array( 0 => array( 'event' => 'SHOW',
+                                                              'type' => 'IDNTOUTF8')
+                                                ),
+							'formtype'	=> "SELECT",
+							'op'		=> "=",
+							'prefix'	=> "",
+							'suffix'	=> "",
+							'datasource'	=> array ( 	'type'	=> 'SQL',
+										'querystring' => "SELECT domain_id,domain FROM web_domain WHERE type = 'vhost' AND {AUTHSQL} ORDER BY domain",
+										'keyfield'=> 'domain_id',
+										'valuefield'=> 'domain'
+									 ),
+							'width'		=> "",
+							'value'		=> "");
 
 $liste["item"][] = array(	'field'		=> "database_user_id",
 							'datatype'	=> "INTEGER",
diff --git a/interface/web/sites/shell_user_edit.php b/interface/web/sites/shell_user_edit.php
index b14963a..a18dd8e 100644
--- a/interface/web/sites/shell_user_edit.php
+++ b/interface/web/sites/shell_user_edit.php
@@ -99,7 +99,17 @@
 		global $app, $conf;
 		
 		// Get the record of the parent domain
-		$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]));
+		//$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r'));
+        //if(!$parent_domain || $parent_domain['domain_id'] != @$this->dataRecord['parent_domain_id']) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm");
+		if(isset($this->dataRecord["parent_domain_id"])) {
+			$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r'));
+			if(!$parent_domain || $parent_domain['domain_id'] != @$this->dataRecord['parent_domain_id']) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm");
+		} else {
+			$tmp = $app->tform->getDataRecord($this->id);
+			$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval($tmp["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r'));
+			if(!$parent_domain) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm");
+			unset($tmp);
+		}
 		
 		// Set a few fixed values
 		$this->dataRecord["server_id"] = $parent_domain["server_id"];
diff --git a/interface/web/sites/templates/database_admin_list.htm b/interface/web/sites/templates/database_admin_list.htm
index 2f96738..e4aefdb 100644
--- a/interface/web/sites/templates/database_admin_list.htm
+++ b/interface/web/sites/templates/database_admin_list.htm
@@ -22,6 +22,7 @@
                         <th class="tbl_col_type" scope="col"><tmpl_var name="type_txt"></th>
                         <th class="tbl_col_sys_groupid" scope="col"><tmpl_var name="sys_groupid_txt"></th>
                         <th class="tbl_col_server_id" scope="col"><tmpl_var name="server_id_txt"></th>
+						<th class="tbl_col_parent_domain_id" scope="col"><tmpl_var name="parent_domain_id_txt"></th>
                         <th class="tbl_col_database_user_id" scope="col"><tmpl_var name="database_user_txt"></th>
                         <th class="tbl_col_database_name" scope="col"><tmpl_var name="database_name_txt"></th>
                         <th class="tbl_col_limit" scope="col">{tmpl_var name='search_limit'}</th>
@@ -32,6 +33,7 @@
                         <td class="tbl_col_type"><select name="search_type">{tmpl_var name='search_type'}</select></td>
                         <td class="tbl_col_sys_groupid"><select name="search_sys_groupid">{tmpl_var name='search_sys_groupid'}</select></td>
                         <td class="tbl_col_server_id"><select name="search_server_id">{tmpl_var name='search_server_id'}</select></td>
+						<td class="tbl_col_parent_domain_id"><select name="search_parent_domain_id">{tmpl_var name='search_parent_domain_id'}</select></td>
                         <td class="tbl_col_database_user"><select name="search_database_user_id">{tmpl_var name='search_database_user_id'}</select></td>
                         <td class="tbl_col_database_name"><input type="text" name="search_database_name" value="{tmpl_var name='search_database_name'}" /></td>
                         <td class="tbl_col_buttons">
@@ -47,6 +49,7 @@
                             <td class="tbl_col_type"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="type"}</a></td>
                             <td class="tbl_col_sys_groupid"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="sys_groupid"}</a></td>
                             <td class="tbl_col_server_id"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="server_id"}</a></td>
+							<td class="tbl_col_parent_domain_id"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="parent_domain_id"}</a></td>
                             <td class="tbl_col_database_user"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="database_user_id"}</a></td>
                             <td class="tbl_col_database_name"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="database_name"}</a></td>
                             <td class="tbl_col_buttons">
diff --git a/interface/web/sites/templates/database_list.htm b/interface/web/sites/templates/database_list.htm
index 888f3ba..15a8ae7 100644
--- a/interface/web/sites/templates/database_list.htm
+++ b/interface/web/sites/templates/database_list.htm
@@ -38,6 +38,7 @@
                         <th class="tbl_col_remote_access" scope="col"><tmpl_var name="remote_access_txt"></th>
                         <th class="tbl_col_type" scope="col"><tmpl_var name="type_txt"></th>
                         <th class="tbl_col_server_id" scope="col"><tmpl_var name="server_id_txt"></th>
+						<th class="tbl_col_parent_domain_id" scope="col"><tmpl_var name="parent_domain_id_txt"></th>
                         <th class="tbl_col_database_user_id" scope="col"><tmpl_var name="database_user_txt"></th>
                         <th class="tbl_col_database_name" scope="col"><tmpl_var name="database_name_txt"></th>
                         <th class="tbl_col_limit" scope="col">{tmpl_var name='search_limit'}</th>
@@ -47,6 +48,7 @@
                         <td class="tbl_col_remote_access"><select name="search_remote_access">{tmpl_var name='search_remote_access'}</select></td>
                         <td class="tbl_col_type"><select name="search_type">{tmpl_var name='search_type'}</select></td>
                         <td class="tbl_col_server_id"><select name="search_server_id">{tmpl_var name='search_server_id'}</select></td>
+						<td class="tbl_col_parent_domain_id"><select name="search_parent_domain_id">{tmpl_var name='search_parent_domain_id'}</select></td>
                         <td class="tbl_col_database_user_id"><select name="search_database_user_id">{tmpl_var name='search_database_user_id'}</select></td>
                         <td class="tbl_col_database_name"><input type="text" name="search_database_name" value="{tmpl_var name='search_database_name'}"/></td>
                         <td class="tbl_col_buttons">
@@ -61,6 +63,7 @@
                             <td class="tbl_col_remote_access"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="remote_access"}</a></td>
                             <td class="tbl_col_type"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="type"}</a></td>
                             <td class="tbl_col_server_id"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="server_id"}</a></td>
+							<td class="tbl_col_parent_domain_id"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="parent_domain_id"}</a></td>
                             <td class="tbl_col_database_user"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="database_user_id"}</a></td>
                             <td class="tbl_col_database_name"><a href="#" onclick="loadContent('sites/database_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="database_name"}</a></td>
                             <td class="tbl_col_buttons">
diff --git a/interface/web/sites/templates/web_domain_advanced.htm b/interface/web/sites/templates/web_domain_advanced.htm
index 5df608a..2f5136e 100644
--- a/interface/web/sites/templates/web_domain_advanced.htm
+++ b/interface/web/sites/templates/web_domain_advanced.htm
@@ -1,6 +1,15 @@
 <h2><tmpl_var name="list_head_txt"></h2>
 <p><tmpl_var name="list_desc_txt"></p>
 
+<tmpl_if name="config_error_msg">
+<div style="background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; margin: 1.5em 0 1.5em 0; padding: 7px;">
+                <p style="font-face:bold">{tmpl_var name='configuration_error_txt'}</p>
+				<div>
+				<div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div><div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
+				</div>
+</div>
+</tmpl_if>
+
 <div class="panel panel_web_domain">
 
     <div class="pnl_formsarea">
diff --git a/interface/web/sites/templates/web_domain_backup.htm b/interface/web/sites/templates/web_domain_backup.htm
index 3c78fe7..cfe4337 100644
--- a/interface/web/sites/templates/web_domain_backup.htm
+++ b/interface/web/sites/templates/web_domain_backup.htm
@@ -1,6 +1,15 @@
 <h2><tmpl_var name="list_head_txt"></h2>
 <p><tmpl_var name="list_desc_txt"></p>
 
+<tmpl_if name="config_error_msg">
+<div style="background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; margin: 1.5em 0 1.5em 0; padding: 7px;">
+                <p style="font-face:bold">{tmpl_var name='configuration_error_txt'}</p>
+				<div>
+				<div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div><div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
+				</div>
+</div>
+</tmpl_if>
+
 <div class="panel panel_web_domain">
 
     <div class="pnl_formsarea">
diff --git a/interface/web/sites/templates/web_domain_edit.htm b/interface/web/sites/templates/web_domain_edit.htm
index 9a10623..d12c3a3 100644
--- a/interface/web/sites/templates/web_domain_edit.htm
+++ b/interface/web/sites/templates/web_domain_edit.htm
@@ -1,6 +1,15 @@
 <h2><tmpl_var name="list_head_txt"></h2>
 <p><tmpl_var name="list_desc_txt"></p>
 
+<tmpl_if name="config_error_msg">
+<div style="background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; margin: 1.5em 0 1.5em 0; padding: 7px;">
+                <p style="font-face:bold">{tmpl_var name='configuration_error_txt'}</p>
+				<div>
+				<div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div><div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
+				</div>
+</div>
+</tmpl_if>
+
 <div class="panel panel_web_domain">
 
     <div class="pnl_formsarea">
@@ -172,6 +181,7 @@
     jQuery('#client_group_id').change(function(){
         clientGroupId = $(this).val();
         reloadWebIP();
+		reloadFastcgiPHPVersions();
     });
 		
     if(jQuery('#php').val() == 'fast-cgi' || jQuery('#php').val() == 'php-fpm'){
@@ -225,7 +235,7 @@
     }
 		
     function reloadFastcgiPHPVersions(noFormChange) {
-        jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {server_id : serverId, php_type : jQuery('#php').val(), type : "getphpfastcgi"}, function(data) {
+        jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {server_id : serverId, php_type : jQuery('#php').val(), type : "getphpfastcgi", client_group_id : clientGroupId}, function(data) {
             var options = '<option value="">Default</option>';
             var phpfastcgiselected = '';
             $.each(data, function(key, val) {
diff --git a/interface/web/sites/templates/web_domain_redirect.htm b/interface/web/sites/templates/web_domain_redirect.htm
index faff044..c0bd977 100644
--- a/interface/web/sites/templates/web_domain_redirect.htm
+++ b/interface/web/sites/templates/web_domain_redirect.htm
@@ -1,6 +1,15 @@
 <h2><tmpl_var name="list_head_txt"></h2>
 <p><tmpl_var name="list_desc_txt"></p>
 
+<tmpl_if name="config_error_msg">
+<div style="background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; margin: 1.5em 0 1.5em 0; padding: 7px;">
+                <p style="font-face:bold">{tmpl_var name='configuration_error_txt'}</p>
+				<div>
+				<div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div><div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
+				</div>
+</div>
+</tmpl_if>
+
 <div class="panel panel_web_domain">
 
     <div class="pnl_formsarea">
@@ -23,7 +32,7 @@
             </div>
 			<div class="ctrlHolder nginx">
                 <label for="rewrite_rules">{tmpl_var name='rewrite_rules_txt'}</label>
-                <textarea name="rewrite_rules" id="rewrite_rules" rows='10' cols='50' style="width:400px;">{tmpl_var name='rewrite_rules'}</textarea>&nbsp;<b>{tmpl_var name="allowed_rewrite_rule_directives_txt"}</b><br><br>&nbsp;break<br>&nbsp;if<br>&nbsp;return<br>&nbsp;rewrite<br>&nbsp;set
+                <textarea name="rewrite_rules" id="rewrite_rules" rows='10' cols='50' style="width:400px;">{tmpl_var name='rewrite_rules'}</textarea>&nbsp;<b>{tmpl_var name="allowed_rewrite_rule_directives_txt"}</b><br><br>&nbsp;break<br>&nbsp;if<br>&nbsp;return<br>&nbsp;rewrite<br>&nbsp;set<br><br>&nbsp;<a href="http://wiki.nginx.org/HttpRewriteModule" target="_blank">http://wiki.nginx.org/HttpRewriteModule</a>
             </div>
         </fieldset>
 
diff --git a/interface/web/sites/templates/web_domain_ssl.htm b/interface/web/sites/templates/web_domain_ssl.htm
index 832d623..50d95d3 100644
--- a/interface/web/sites/templates/web_domain_ssl.htm
+++ b/interface/web/sites/templates/web_domain_ssl.htm
@@ -1,6 +1,15 @@
 <h2><tmpl_var name="list_head_txt"></h2>
 <p><tmpl_var name="list_desc_txt"></p>
 
+<tmpl_if name="config_error_msg">
+<div style="background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; margin: 1.5em 0 1.5em 0; padding: 7px;">
+                <p style="font-face:bold">{tmpl_var name='configuration_error_txt'}</p>
+				<div>
+				<div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div><div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
+				</div>
+</div>
+</tmpl_if>
+
 <div class="panel panel_web_domain">
 
     <div class="pnl_formsarea">
diff --git a/interface/web/sites/templates/web_domain_stats.htm b/interface/web/sites/templates/web_domain_stats.htm
index f497f1b..769e088 100644
--- a/interface/web/sites/templates/web_domain_stats.htm
+++ b/interface/web/sites/templates/web_domain_stats.htm
@@ -1,6 +1,15 @@
 <h2><tmpl_var name="list_head_txt"></h2>
 <p><tmpl_var name="list_desc_txt"></p>
 
+<tmpl_if name="config_error_msg">
+<div style="background: #ffdfdf; border: 1px solid #df7d7d; border-width: 1px 0; margin: 1.5em 0 1.5em 0; padding: 7px;">
+                <p style="font-face:bold">{tmpl_var name='configuration_error_txt'}</p>
+				<div>
+				<div style="float:left;width:150px;">{tmpl_var name='config_error_tstamp'} :&nbsp;</div><div style="padding-left:150px;">{tmpl_var name='config_error_msg'}</div>
+				</div>
+</div>
+</tmpl_if>
+
 <div class="panel panel_web_domain">
 
     <div class="pnl_formsarea">
diff --git a/interface/web/sites/web_aliasdomain_edit.php b/interface/web/sites/web_aliasdomain_edit.php
index 150cb36..1d05a5e 100644
--- a/interface/web/sites/web_aliasdomain_edit.php
+++ b/interface/web/sites/web_aliasdomain_edit.php
@@ -143,7 +143,8 @@
 		}
         
 		// Get the record of the parent domain
-		$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]));
+		$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r'));
+        if(!$parent_domain || $parent_domain['domain_id'] != @$this->dataRecord['parent_domain_id']) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm");
 		
 		// Set a few fixed values
 		$this->dataRecord["type"] = 'alias';
diff --git a/interface/web/sites/web_domain_edit.php b/interface/web/sites/web_domain_edit.php
index 5c0ec9a..062529fda 100644
--- a/interface/web/sites/web_domain_edit.php
+++ b/interface/web/sites/web_domain_edit.php
@@ -188,8 +188,11 @@
 			$client_select = '<option value="'.$tmp['groupid'].'">'.$client['contactname'].'</option>';
 			//$tmp_data_record = $app->tform->getDataRecord($this->id);
 			if(is_array($records)) {
+				$selected_client_group_id = 0; // needed to get list of PHP versions
 				foreach( $records as $rec) {
+					if(is_array($this->dataRecord) && ($rec["groupid"] == $this->dataRecord['client_group_id'] || $rec["groupid"] == $this->dataRecord['sys_groupid']) && !$selected_client_group_id) $selected_client_group_id = $rec["groupid"];
 					$selected = @(is_array($this->dataRecord) && ($rec["groupid"] == $this->dataRecord['client_group_id'] || $rec["groupid"] == $this->dataRecord['sys_groupid']))?'SELECTED':'';
+					if($selected == 'SELECTED') $selected_client_group_id = $rec["groupid"];
 					$client_select .= "<option value='$rec[groupid]' $selected>$rec[contactname]</option>\r\n";
 				}
 			}
@@ -229,11 +232,14 @@
 			$server_type = 'apache';
 			if(!empty($web_config['server_type'])) $server_type = $web_config['server_type'];
 			if($server_type == 'nginx' && $this->dataRecord['php'] == 'fast-cgi') $this->dataRecord['php'] = 'php-fpm';
+			$selected_client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = $selected_client_group_id");
+			//$sql_where = " AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id']." OR client_id = ".intval($selected_client['client_id']).")";
+			$sql_where = " AND (client_id = 0 OR client_id = ".intval($selected_client['client_id']).")";
 			if($this->dataRecord['php'] == 'php-fpm'){
-				$php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = ".($this->id > 0 ? $this->dataRecord['server_id'] : intval($client['default_webserver']))." AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id'].")");
+				$php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = ".($this->id > 0 ? $this->dataRecord['server_id'] : intval($client['default_webserver'])).$sql_where);
 			}
 			if($this->dataRecord['php'] == 'fast-cgi') {
-				$php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ".($this->id > 0 ? $this->dataRecord['server_id'] : intval($client['default_webserver']))." AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id'].")");
+				$php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = ".($this->id > 0 ? $this->dataRecord['server_id'] : intval($client['default_webserver'])).$sql_where);
 			}
 			$php_select = "<option value=''>Default</option>";
 			if(is_array($php_records) && !empty($php_records)) {
@@ -350,16 +356,36 @@
 			$app->tpl->setVar("ipv6_address",$ip_select);
 			unset($tmp);
 			unset($ips);
+
+			// Fill the client select field
+			$sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
+			$clients = $app->db->queryAllRecords($sql);
+			$client_select = "<option value='0'></option>";
+			//$tmp_data_record = $app->tform->getDataRecord($this->id);
+			if(is_array($clients)) {
+				$selected_client_group_id = 0; // needed to get list of PHP versions
+				foreach($clients as $client) {
+					if(is_array($this->dataRecord) && ($client["groupid"] == $this->dataRecord['client_group_id'] || $client["groupid"] == $this->dataRecord['sys_groupid']) && !$selected_client_group_id) $selected_client_group_id = $client["groupid"];
+					//$selected = @($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':'';
+					$selected = @(is_array($this->dataRecord) && ($client["groupid"] == $this->dataRecord['client_group_id'] || $client["groupid"] == $this->dataRecord['sys_groupid']))?'SELECTED':'';
+					if($selected == 'SELECTED') $selected_client_group_id = $client["groupid"];
+					$client_select .= "<option value='$client[groupid]' $selected>$client[contactname]</option>\r\n";
+				}
+			}
+			$app->tpl->setVar("client_group_id",$client_select);
 			
 			//PHP Version Selection (FastCGI)
 			$server_type = 'apache';
 			if(!empty($web_config['server_type'])) $server_type = $web_config['server_type'];
 			if($server_type == 'nginx' && $this->dataRecord['php'] == 'fast-cgi') $this->dataRecord['php'] = 'php-fpm';
+			$selected_client = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = $selected_client_group_id");
+			//$sql_where = " AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id']." OR client_id = ".intval($selected_client['client_id']).")";
+			$sql_where = " AND (client_id = 0 OR client_id = ".intval($selected_client['client_id']).")";
 			if($this->dataRecord['php'] == 'php-fpm'){
-				$php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = $server_id");
+				$php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fpm_init_script != '' AND php_fpm_ini_dir != '' AND php_fpm_pool_dir != '' AND server_id = $server_id".$sql_where);
 			}
 			if($this->dataRecord['php'] == 'fast-cgi') {
-				$php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = $server_id");
+				$php_records = $app->db->queryAllRecords("SELECT * FROM server_php WHERE php_fastcgi_binary != '' AND php_fastcgi_ini_dir != '' AND server_id = $server_id".$sql_where);
 			}
 			$php_select = "<option value=''>Default</option>";
 			if(is_array($php_records) && !empty($php_records)) {
@@ -375,20 +401,6 @@
 			}
 			$app->tpl->setVar("fastcgi_php_version",$php_select);
 			unset($php_records);
-
-			// Fill the client select field
-			$sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
-			$clients = $app->db->queryAllRecords($sql);
-			$client_select = "<option value='0'></option>";
-			//$tmp_data_record = $app->tform->getDataRecord($this->id);
-			if(is_array($clients)) {
-				foreach( $clients as $client) {
-					//$selected = @($client["groupid"] == $tmp_data_record["sys_groupid"])?'SELECTED':'';
-					$selected = @(is_array($this->dataRecord) && ($client["groupid"] == $this->dataRecord['client_group_id'] || $client["groupid"] == $this->dataRecord['sys_groupid']))?'SELECTED':'';
-					$client_select .= "<option value='$client[groupid]' $selected>$client[contactname]</option>\r\n";
-				}
-			}
-			$app->tpl->setVar("client_group_id",$client_select);
             
             foreach($read_limits as $limit) $app->tpl->setVar($limit, ($limit == 'force_suexec' ? 'n' : 'y'));
 			
@@ -493,6 +505,17 @@
 				$domain_select .= "<option value=''></option>\r\n";
 			}
 			$app->tpl->setVar("domain_option",$domain_select);
+		}
+		
+		// check for configuration errors in sys_datalog
+		if($this->id > 0) {
+			$datalog = $app->db->queryOneRecord("SELECT sys_datalog.error, sys_log.tstamp FROM sys_datalog, sys_log WHERE sys_datalog.dbtable = 'web_domain' AND sys_datalog.dbidx = 'domain_id:".$this->id."' AND sys_datalog.datalog_id = sys_log.datalog_id AND sys_log.message = CONCAT('Processed datalog_id ',sys_log.datalog_id) ORDER BY sys_datalog.tstamp DESC");
+			if(is_array($datalog) && !empty($datalog)){
+				if(trim($datalog['error']) != ''){
+					$app->tpl->setVar("config_error_msg",nl2br(htmlentities($datalog['error'])));
+					$app->tpl->setVar("config_error_tstamp",date($app->lng('conf_format_datetime'), $datalog['tstamp']));
+				}
+			}
 		}
 
 		parent::onShowEnd();
@@ -700,6 +723,10 @@
 			$rewrite_rule_lines = explode("\n", $rewrite_rules);
 			if(is_array($rewrite_rule_lines) && !empty($rewrite_rule_lines)){
 				foreach($rewrite_rule_lines as $rewrite_rule_line){
+					// ignore comments
+					if(substr(ltrim($rewrite_rule_line),0,1) == '#') continue;
+					// empty lines
+					if(trim($rewrite_rule_line) == '') continue;
 					// rewrite
 					if(preg_match('@^\s*rewrite\s+(^/)?\S+(\$)?\s+\S+(\s+(last|break|redirect|permanent|))?\s*;\s*$@', $rewrite_rule_line)) continue;
 					// if
@@ -714,7 +741,6 @@
 					}
 					// break
 					if(preg_match('@^\s*break\s*;\s*$@', $rewrite_rule_line)){
-						$if_level += 1;
 						continue;
 					}
 					// return code [ text ]
@@ -1001,7 +1027,16 @@
 			unset($backup_copies);
 			unset($backup_interval);
 		}
-
+        
+        //* Change vhost subdomain ip/ipv6 if domain ip/ipv6 has changed
+        if(isset($this->dataRecord['ip_address']) && ($this->dataRecord['ip_address'] != $this->oldDataRecord['ip_address'] || $this->dataRecord['ipv6_address'] != $this->oldDataRecord['ipv6_address'])) {
+			$records = $app->db->queryAllRecords("SELECT domain_id FROM web_domain WHERE type = 'vhostsubdomain' AND parent_domain_id = ".$this->id);
+			foreach($records as $rec) {
+				$app->db->datalogUpdate('web_domain', "ip_address = '".$web_rec['ip_address']."', ipv6_address = '".$web_rec['ipv6_address']."'", 'domain_id', $rec['domain_id']);
+			}
+			unset($records);
+			unset($rec);
+        }
 	}
 
 	function onAfterDelete() {
diff --git a/interface/web/sites/web_folder_edit.php b/interface/web/sites/web_folder_edit.php
index 178c2af..2f888a1 100644
--- a/interface/web/sites/web_folder_edit.php
+++ b/interface/web/sites/web_folder_edit.php
@@ -55,7 +55,8 @@
 		global $app, $conf;
 		
 		// Get the record of the parent domain
-		$parent_domain = $app->db->queryOneRecord("select server_id FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]));
+		$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r'));
+        if(!$parent_domain || $parent_domain['domain_id'] != @$this->dataRecord['parent_domain_id']) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm");
 		
 		// Set a few fixed values
 		$this->dataRecord["server_id"] = $parent_domain["server_id"];
diff --git a/interface/web/sites/web_folder_user_edit.php b/interface/web/sites/web_folder_user_edit.php
index 95a8864..c67e823 100644
--- a/interface/web/sites/web_folder_user_edit.php
+++ b/interface/web/sites/web_folder_user_edit.php
@@ -55,7 +55,8 @@
 		global $app, $conf;
 		
 		// Get the record of the parent domain
-		$folder = $app->db->queryOneRecord("select server_id FROM web_folder WHERE web_folder_id = ".$app->functions->intval(@$this->dataRecord["web_folder_id"]));
+		$folder = $app->db->queryOneRecord("select * FROM web_folder WHERE web_folder_id = ".$app->functions->intval(@$this->dataRecord["web_folder_id"]) . " AND ".$app->tform->getAuthSQL('r'));
+        if(!$folder || $folder['web_folder_id'] != @$this->dataRecord['web_folder_id']) $app->tform->errorMessage .= $app->tform->lng("no_folder_perm");
 		
 		// Set a few fixed values
 		$this->dataRecord["server_id"] = $folder["server_id"];
diff --git a/interface/web/sites/web_subdomain_edit.php b/interface/web/sites/web_subdomain_edit.php
index ae9ee07..3475ed5 100644
--- a/interface/web/sites/web_subdomain_edit.php
+++ b/interface/web/sites/web_subdomain_edit.php
@@ -132,7 +132,8 @@
 		global $app, $conf;
 		
         // Get the record of the parent domain
-        $parent_domain = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]));
+        $parent_domain = $app->db->queryOneRecord("SELECT * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r'));
+        if(!$parent_domain || $parent_domain['domain_id'] != @$this->dataRecord['parent_domain_id']) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm");
         
 		$app->uses('ini_parser,getconf');
 		$settings = $app->getconf->get_global_config('domains');
diff --git a/interface/web/sites/web_vhost_subdomain_edit.php b/interface/web/sites/web_vhost_subdomain_edit.php
index 656a7dd..97e84f4 100644
--- a/interface/web/sites/web_vhost_subdomain_edit.php
+++ b/interface/web/sites/web_vhost_subdomain_edit.php
@@ -368,7 +368,8 @@
             unset($tmp);
         }
         
-		$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]));
+		$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r'));
+        if(!$parent_domain || $parent_domain['domain_id'] != @$this->dataRecord['parent_domain_id']) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm");
 
 		// Set a few fixed values
 		$this->dataRecord["type"] = 'vhostsubdomain';
diff --git a/interface/web/sites/webdav_user_edit.php b/interface/web/sites/webdav_user_edit.php
index c6eaaf9..377b00e 100644
--- a/interface/web/sites/webdav_user_edit.php
+++ b/interface/web/sites/webdav_user_edit.php
@@ -98,7 +98,8 @@
 		global $app, $conf;
 
 		/* Get the record of the parent domain */
-		$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]));
+		$parent_domain = $app->db->queryOneRecord("select * FROM web_domain WHERE domain_id = ".$app->functions->intval(@$this->dataRecord["parent_domain_id"]) . " AND ".$app->tform->getAuthSQL('r'));
+        if(!$parent_domain || $parent_domain['domain_id'] != @$this->dataRecord['parent_domain_id']) $app->tform->errorMessage .= $app->tform->lng("no_domain_perm");
 
 		/*
 		 * Set a few fixed values
diff --git a/remoting_client/examples/client_add.php b/remoting_client/examples/client_add.php
index 25412ec..95faffd 100644
--- a/remoting_client/examples/client_add.php
+++ b/remoting_client/examples/client_add.php
@@ -25,7 +25,7 @@
 			'zip' => '21337',
 			'city' => 'london',
 			'state' => 'bavaria',
-			'country' => 'UK',
+			'country' => 'GB',
 			'telephone' => '123456789',
 			'mobile' => '987654321',
 			'fax' => '546718293',
diff --git a/remoting_client/examples/client_update.php b/remoting_client/examples/client_update.php
index 82f8797..e884378 100644
--- a/remoting_client/examples/client_update.php
+++ b/remoting_client/examples/client_update.php
@@ -16,17 +16,20 @@
 
 	//* Parameters
 	$reseller_id = 1;
-	$c_id = 1;
+	$client_id = 1;
 
 
 	//* Get the client record
-	$client_record = $client->client_get($session_id, $reseller_id);
+	$client_record = $client->client_get($session_id, $client_id);
 
 	//* Change parameters
 	$client_record['country'] = 'de';
 	$client_record['username'] = 'mguy';
 	$client_record['contact_name'] = 'brush';
 	
+	//* We set the client password to a empty string as we do not want to change it.
+	$client_record['password'] = '';
+	
 	$affected_rows = $client->client_update($session_id, $c_id, $reseller_id, $client_record);
 
 	echo "Number of records that have been changed in the database: ".$affected_rows."<br>";
diff --git a/server/cron_daily.php b/server/cron_daily.php
index 21d8f84..029c4f3 100644
--- a/server/cron_daily.php
+++ b/server/cron_daily.php
@@ -33,6 +33,7 @@
 require(SCRIPT_PATH."/lib/app.inc.php");
 
 set_time_limit(0);
+ini_set('error_reporting', E_ALL & ~E_NOTICE);
 
 // make sure server_id is always an int
 $conf['server_id'] = intval($conf['server_id']);
@@ -742,10 +743,10 @@
 
 				//* Send traffic notifications
 				if($rec['traffic_quota_lock'] != 'y' && ($web_config['overtraffic_notify_admin'] == 'y' || $web_config['overtraffic_notify_client'] == 'y')) {
-
+                    
 					$placeholders = array('{domain}' => $rec['domain'],
-										  '{admin_mail}' => $global_config['admin_mail']);
-
+                                          '{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'));
+                    
 					$recipients = array();
 					//* send email to admin
 					if($global_config['admin_mail'] != '' && $web_config['overtraffic_notify_admin'] == 'y') {
@@ -860,7 +861,7 @@
                 // send notification - everything ok again
                 if($rec['last_quota_notification'] && $web_config['overquota_notify_onok'] == 'y' && ($web_config['overquota_notify_admin'] == 'y' || $web_config['overquota_notify_client'] == 'y')) {
                     $placeholders = array('{domain}' => $rec['domain'],
-                                          '{admin_mail}' => $global_config['admin_mail'],
+                                          '{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'),
                                           '{used}' => $rec['used'],
                                           '{soft}' => $rec['soft'],
                                           '{hard}' => $rec['hard'],
@@ -897,7 +898,7 @@
 				$app->dbmaster->datalogUpdate('web_domain', "last_quota_notification = CURDATE()", 'domain_id', $rec['domain_id']);
 
                 $placeholders = array('{domain}' => $rec['domain'],
-                                      '{admin_mail}' => $global_config['admin_mail'],
+                                      '{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'),
                                       '{used}' => $rec['used'],
                                       '{soft}' => $rec['soft'],
                                       '{hard}' => $rec['hard'],
@@ -990,7 +991,7 @@
                 // send notification - everything ok again
                 if($rec['last_quota_notification'] && $mail_config['overquota_notify_onok'] == 'y' && ($mail_config['overquota_notify_admin'] == 'y' || $mail_config['overquota_notify_client'] == 'y')) {
                     $placeholders = array('{email}' => $rec['email'],
-                              '{admin_mail}' => $global_config['admin_mail'],
+                              '{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'),
                               '{used}' => $rec['used'],
                               '{name}' => $rec['name'],
                               '{quota}' => $rec['quota'],
@@ -1027,7 +1028,7 @@
 				$app->dbmaster->datalogUpdate('mail_user', "last_quota_notification = CURDATE()", 'mailuser_id', $rec['mailuser_id']);
 
                 $placeholders = array('{email}' => $rec['email'],
-                          '{admin_mail}' => $global_config['admin_mail'],
+                          '{admin_mail}' => ($global_config['admin_mail'] != ''? $global_config['admin_mail'] : 'root'),
                           '{used}' => $rec['used'],
                           '{name}' => $rec['name'],
                           '{quota}' => $rec['quota'],
@@ -1237,7 +1238,8 @@
 
 				if ($rec['type'] == 'mysql') {
 					$db_backup_file = 'db_'.$db_name.'_'.date('Y-m-d_H-i').'.sql';
-					$command = "mysqldump -h '".escapeshellcmd($clientdb_host)."' -u '".escapeshellcmd($clientdb_user)."' -p'".escapeshellcmd($clientdb_password)."' -c --add-drop-table --create-options --quick --result-file='".$db_backup_dir.'/'.$db_backup_file."' '".$db_name."'";
+					//$command = "mysqldump -h '".escapeshellcmd($clientdb_host)."' -u '".escapeshellcmd($clientdb_user)."' -p'".escapeshellcmd($clientdb_password)."' -c --add-drop-table --create-options --quick --result-file='".$db_backup_dir.'/'.$db_backup_file."' '".$db_name."'";
+					$command = "mysqldump -h ".escapeshellarg($clientdb_host)." -u ".escapeshellarg($clientdb_user)." -p".escapeshellarg($clientdb_password)." -c --add-drop-table --create-options --quick --result-file='".$db_backup_dir.'/'.$db_backup_file."' '".$db_name."'";
 					exec($command, $tmp_output, $retval);
 
 					//* Compress the backup with gzip
diff --git a/server/lib/app.inc.php b/server/lib/app.inc.php
index 11bf8da..321e5c6 100755
--- a/server/lib/app.inc.php
+++ b/server/lib/app.inc.php
@@ -156,7 +156,7 @@
     
                 } // if
 				
-				if($priority >= $conf['admin_notify_priority'] && $conf['admin_mail'] != '') {
+				if(isset($conf['admin_notify_priority']) && $priority >= $conf['admin_notify_priority'] && $conf['admin_mail'] != '') {
 					// send notification to admin
 					$mailBody = $log_msg;
 					$mailSubject = substr($log_msg,0,50).'...';
diff --git a/server/lib/classes/db_mysql.inc.php b/server/lib/classes/db_mysql.inc.php
index 2974da0..23ba8a6 100644
--- a/server/lib/classes/db_mysql.inc.php
+++ b/server/lib/classes/db_mysql.inc.php
@@ -373,6 +373,15 @@
 
       return true;
     }
+	
+	//** Deletes a record and saves the changes into the datalog
+    public function datalogError($errormsg) {
+      global $app;
+	  
+	  if(isset($app->modules->current_datalog_id) && $app->modules->current_datalog_id > 0) $this->query("UPDATE sys_datalog set error = '".$this->quote($errormsg)."' WHERE datalog_id = ".$app->modules->current_datalog_id);
+
+      return true;
+    }
 
 
     public function freeResult($query) 
diff --git a/server/mods-available/dns_module.inc.php b/server/mods-available/dns_module.inc.php
index 2fac7b5..2a06361 100644
--- a/server/mods-available/dns_module.inc.php
+++ b/server/mods-available/dns_module.inc.php
@@ -130,9 +130,9 @@
 		
 		$retval = array('output' => '', 'retval' => 0);
 		if($action == 'restart') {
-			exec($conf['init_scripts'] . '/' . $daemon . ' restart', $retval['output'], $retval['retval']);
+			exec($conf['init_scripts'] . '/' . $daemon . ' restart 2>&1', $retval['output'], $retval['retval']);
 		} else {
-			exec($conf['init_scripts'] . '/' . $daemon . ' reload', $retval['output'], $retval['retval']);
+			exec($conf['init_scripts'] . '/' . $daemon . ' reload 2>&1', $retval['output'], $retval['retval']);
 		}
 		return $retval;
 	}
@@ -179,7 +179,7 @@
 		}
 
 		$retval = array('output' => '', 'retval' => 0);
-		exec($conf['init_scripts'] . '/' . $daemon . ' restart', $retval['output'], $retval['retval']);
+		exec($conf['init_scripts'] . '/' . $daemon . ' restart 2>&1', $retval['output'], $retval['retval']);
 
 //     unset $tmps;
 		return $retval;
diff --git a/server/mods-available/web_module.inc.php b/server/mods-available/web_module.inc.php
index 52d4aed..868cf9e 100644
--- a/server/mods-available/web_module.inc.php
+++ b/server/mods-available/web_module.inc.php
@@ -212,9 +212,9 @@
 
 		$retval = array('output' => '', 'retval' => 0);
 		if($action == 'restart') {
-			exec($conf['init_scripts'] . '/' . $daemon . ' restart', $retval['output'], $retval['retval']);
+			exec($conf['init_scripts'] . '/' . $daemon . ' restart 2>&1', $retval['output'], $retval['retval']);
 		} else {
-			exec($conf['init_scripts'] . '/' . $daemon . ' reload', $retval['output'], $retval['retval']);
+			exec($conf['init_scripts'] . '/' . $daemon . ' reload 2>&1', $retval['output'], $retval['retval']);
 		}
 		return $retval;
 	}
@@ -231,7 +231,7 @@
 		if(!$init_script) $init_script = $conf['init_scripts'].'/'.$web_config['php_fpm_init_script'];
 		
 		$retval = array('output' => '', 'retval' => 0);
-		exec($init_script.' '.$action, $retval['output'], $retval['retval']);
+		exec($init_script.' '.$action.' 2>&1', $retval['output'], $retval['retval']);
 		return $retval;
 	}
 
diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 0107cbb..5bc4407 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -1563,7 +1563,7 @@
 		if($web_config['check_apache_config'] == 'y') {
 			//* Test if apache starts with the new configuration file
 			$apache_online_status_before_restart = $this->_checkTcp('localhost',80);
-			$app->log('Apache status is: '.$apache_online_status_before_restart,LOGLEVEL_DEBUG);
+			$app->log('Apache status is: '.($apache_online_status_before_restart === true? 'running' : 'down'),LOGLEVEL_DEBUG);
 
 			$retval = $app->services->restartService('httpd','restart'); // $retval['retval'] is 0 on success and > 0 on failure
 			$app->log('Apache restart return value is: '.$retval['retval'],LOGLEVEL_DEBUG);
@@ -1577,39 +1577,49 @@
 				sleep(1);
 			}
 			//* Check if apache restarted successfully if it was online before
-			$app->log('Apache online status after restart is: '.$apache_online_status_after_restart,LOGLEVEL_DEBUG);
+			$app->log('Apache online status after restart is: '.($apache_online_status_after_restart === true? 'running' : 'down'),LOGLEVEL_DEBUG);
 			if($apache_online_status_before_restart && !$apache_online_status_after_restart || $retval['retval'] > 0) {
 				$app->log('Apache did not restart after the configuration change for website '.$data['new']['domain'].'. Reverting the configuration. Saved non-working config as '.$vhost_file.'.err',LOGLEVEL_WARN);
 				if(is_array($retval['output']) && !empty($retval['output'])){
 					$app->log('Reason for Apache restart failure: '.implode("\n", $retval['output']),LOGLEVEL_WARN);
+					$app->dbmaster->datalogError(implode("\n", $retval['output']));
 				} else {
 					// if no output is given, check again
 					$webserver_binary = '';
-					exec('which apache2', $webserver_check_output, $webserver_check_retval);
+					exec('which apache2ctl', $webserver_check_output, $webserver_check_retval);
 					if($webserver_check_retval == 0){
-						$webserver_binary = 'apache2';
+						$webserver_binary = 'apache2ctl';
 					} else {
 						unset($webserver_check_output, $webserver_check_retval);
-						exec('which httpd2', $webserver_check_output, $webserver_check_retval);
+						exec('which apache2', $webserver_check_output, $webserver_check_retval);
 						if($webserver_check_retval == 0){
-							$webserver_binary = 'httpd2';
+							$webserver_binary = 'apache2';
 						} else {
 							unset($webserver_check_output, $webserver_check_retval);
-							exec('which httpd', $webserver_check_output, $webserver_check_retval);
+							exec('which httpd2', $webserver_check_output, $webserver_check_retval);
 							if($webserver_check_retval == 0){
-								$webserver_binary = 'httpd';
+								$webserver_binary = 'httpd2';
 							} else {
 								unset($webserver_check_output, $webserver_check_retval);
-								exec('which apache', $webserver_check_output, $webserver_check_retval);
+								exec('which httpd', $webserver_check_output, $webserver_check_retval);
 								if($webserver_check_retval == 0){
-									$webserver_binary = 'apache';
+									$webserver_binary = 'httpd';
+								} else {
+									unset($webserver_check_output, $webserver_check_retval);
+									exec('which apache', $webserver_check_output, $webserver_check_retval);
+									if($webserver_check_retval == 0){
+										$webserver_binary = 'apache';
+									}
 								}
 							}
 						}
 					}
 					if($webserver_binary != ''){
 						exec($webserver_binary.' -t 2>&1', $tmp_output, $tmp_retval);
-						if($tmp_retval > 0 && is_array($tmp_output) && !empty($tmp_output)) $app->log('Reason for Apache restart failure: '.implode("\n", $tmp_output),LOGLEVEL_WARN);
+						if($tmp_retval > 0 && is_array($tmp_output) && !empty($tmp_output)){
+							$app->log('Reason for Apache restart failure: '.implode("\n", $tmp_output),LOGLEVEL_WARN);
+							$app->dbmaster->datalogError(implode("\n", $tmp_output));
+						}
 						unset($tmp_output, $tmp_retval);
 					}
 				}
diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php
index dd9bcd7..181eedb 100644
--- a/server/plugins-available/nginx_plugin.inc.php
+++ b/server/plugins-available/nginx_plugin.inc.php
@@ -940,6 +940,7 @@
 		if($vhost_data['php'] == 'fast-cgi') $vhost_data['php'] = 'php-fpm';
 		
 		// Custom rewrite rules
+		/*
 		$final_rewrite_rules = array();
 		$custom_rewrite_rules = $data['new']['rewrite_rules'];
 		// Make sure we only have Unix linebreaks
@@ -949,6 +950,85 @@
 		if(is_array($custom_rewrite_rule_lines) && !empty($custom_rewrite_rule_lines)){
 			foreach($custom_rewrite_rule_lines as $custom_rewrite_rule_line){
 				$final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line);
+			}
+		}
+		$tpl->setLoop('rewrite_rules', $final_rewrite_rules);
+		*/
+		
+		// Custom rewrite rules
+		$final_rewrite_rules = array();
+		
+		if(isset($data['new']['rewrite_rules']) && trim($data['new']['rewrite_rules']) != '') {
+			$custom_rewrite_rules = trim($data['new']['rewrite_rules']);
+			$custom_rewrites_are_valid = true;
+			// use this counter to make sure all curly brackets are properly closed
+			$if_level = 0;
+			// Make sure we only have Unix linebreaks
+			$custom_rewrite_rules = str_replace("\r\n", "\n", $custom_rewrite_rules);
+			$custom_rewrite_rules = str_replace("\r", "\n", $custom_rewrite_rules);
+			$custom_rewrite_rule_lines = explode("\n", $custom_rewrite_rules);
+			if(is_array($custom_rewrite_rule_lines) && !empty($custom_rewrite_rule_lines)){
+				foreach($custom_rewrite_rule_lines as $custom_rewrite_rule_line){
+					// ignore comments
+					if(substr(ltrim($custom_rewrite_rule_line),0,1) == '#'){
+						$final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line);
+						continue;
+					}
+					// empty lines
+					if(trim($custom_rewrite_rule_line) == ''){
+						$final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line);
+						continue;
+					}
+					// rewrite
+					if(preg_match('@^\s*rewrite\s+(^/)?\S+(\$)?\s+\S+(\s+(last|break|redirect|permanent|))?\s*;\s*$@', $custom_rewrite_rule_line)){
+						$final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line);
+						continue;
+					}
+					// if
+					if(preg_match('@^\s*if\s+\(\s*\$\S+(\s+(\!?(=|~|~\*))\s+(\S+|\".+\"))?\s*\)\s*\{\s*$@', $custom_rewrite_rule_line)){
+						$final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line);
+						$if_level += 1;
+						continue;
+					}
+					// if - check for files, directories, etc.
+					if(preg_match('@^\s*if\s+\(\s*\!?-(f|d|e|x)\s+\S+\s*\)\s*\{\s*$@', $custom_rewrite_rule_line)){
+						$final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line);
+						$if_level += 1;
+						continue;
+					}
+					// break
+					if(preg_match('@^\s*break\s*;\s*$@', $custom_rewrite_rule_line)){
+						$final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line);
+						continue;
+					}
+					// return code [ text ]
+					if(preg_match('@^\s*return\s+\d\d\d.*;\s*$@', $custom_rewrite_rule_line)){
+						$final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line);
+						continue;
+					}
+					// return code URL
+					// return URL
+					if(preg_match('@^\s*return(\s+\d\d\d)?\s+(http|https|ftp)\://([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&%\$\-]+)*\@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(/($|[a-zA-Z0-9\.\,\?\'\\\+&%\$#\=~_\-]+))*\s*;\s*$@', $custom_rewrite_rule_line)){
+						$final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line);
+						continue;
+					}
+					// set
+					if(preg_match('@^\s*set\s+\$\S+\s+\S+\s*;\s*$@', $custom_rewrite_rule_line)){
+						$final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line);
+						continue;
+					}
+					// closing curly bracket
+					if(trim($custom_rewrite_rule_line) == '}'){
+						$final_rewrite_rules[] = array('rewrite_rule' => $custom_rewrite_rule_line);
+						$if_level -= 1;
+						continue;
+					}
+					$custom_rewrites_are_valid = false;
+					break;
+				}
+			}
+			if(!$custom_rewrites_are_valid || $if_level != 0){
+				$final_rewrite_rules = array();
 			}
 		}
 		$tpl->setLoop('rewrite_rules', $final_rewrite_rules);
@@ -1538,7 +1618,7 @@
 		if($web_config['check_apache_config'] == 'y') {
 			//* Test if nginx starts with the new configuration file
 			$nginx_online_status_before_restart = $this->_checkTcp('localhost',80);
-			$app->log('nginx status is: '.$nginx_online_status_before_restart,LOGLEVEL_DEBUG);
+			$app->log('nginx status is: '.($nginx_online_status_before_restart === true? 'running' : 'down'),LOGLEVEL_DEBUG);
 
 			$retval = $app->services->restartService('httpd','restart'); // $retval['retval'] is 0 on success and > 0 on failure
 			$app->log('nginx restart return value is: '.$retval['retval'],LOGLEVEL_DEBUG);
@@ -1548,15 +1628,19 @@
 		
 			//* Check if nginx restarted successfully if it was online before
 			$nginx_online_status_after_restart = $this->_checkTcp('localhost',80);
-			$app->log('nginx online status after restart is: '.$nginx_online_status_after_restart,LOGLEVEL_DEBUG);
+			$app->log('nginx online status after restart is: '.($nginx_online_status_after_restart === true? 'running' : 'down'),LOGLEVEL_DEBUG);
 			if($nginx_online_status_before_restart && !$nginx_online_status_after_restart || $retval['retval'] > 0) { 
 				$app->log('nginx did not restart after the configuration change for website '.$data['new']['domain'].'. Reverting the configuration. Saved non-working config as '.$vhost_file.'.err',LOGLEVEL_WARN);
 				if(is_array($retval['output']) && !empty($retval['output'])){
 					$app->log('Reason for nginx restart failure: '.implode("\n", $retval['output']),LOGLEVEL_WARN);
+					$app->dbmaster->datalogError(implode("\n", $retval['output']));
 				} else {
 					// if no output is given, check again
 					exec('nginx -t 2>&1', $tmp_output, $tmp_retval);
-					if($tmp_retval > 0 && is_array($tmp_output) && !empty($tmp_output)) $app->log('Reason for nginx restart failure: '.implode("\n", $tmp_output),LOGLEVEL_WARN);
+					if($tmp_retval > 0 && is_array($tmp_output) && !empty($tmp_output)){
+						$app->log('Reason for nginx restart failure: '.implode("\n", $tmp_output),LOGLEVEL_WARN);
+						$app->dbmaster->datalogError(implode("\n", $tmp_output));
+					}
 					unset($tmp_output, $tmp_retval);
 				}
 				$app->system->copy($vhost_file,$vhost_file.'.err');
diff --git a/server/server.php b/server/server.php
index 38baa77..2ead490 100644
--- a/server/server.php
+++ b/server/server.php
@@ -71,7 +71,8 @@
 	unset($server_db_record);
 	
 	// retrieve admin email address for notifications
-	$sys_ini = $app->dbmaster->queryOneRecord("SELECT * FROM sys_ini WHERE sysini_id = 1");
+	//$sys_ini = $app->dbmaster->queryOneRecord("SELECT * FROM sys_ini WHERE sysini_id = 1");
+	$sys_ini = $app->db->queryOneRecord("SELECT * FROM sys_ini WHERE sysini_id = 1");
 	$conf['sys_ini'] = $app->ini_parser->parse_ini_string(stripslashes($sys_ini['config']));
 	$conf['admin_mail'] = $conf['sys_ini']['mail']['admin_mail'];
 	unset($sys_ini);

--
Gitblit v1.9.1