diff --git a/actions/admin/settings/000.version.php b/actions/admin/settings/000.version.php index 6fac7384..107f1e92 100644 --- a/actions/admin/settings/000.version.php +++ b/actions/admin/settings/000.version.php @@ -1,72 +1,72 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Settings - * @version $Id$ - */ - -return array( - 'groups' => array( - 'version' => array( - 'fields' => array( - 'panel_version' => array( - 'settinggroup' => 'panel', - 'varname' => 'version', - 'type' => 'hidden', - 'default' => '', - ), - 'panel_frontend' => array( - 'settinggroup' => 'panel', - 'varname' => 'frontend', - 'type' => 'hidden', - 'default' => '', - ), - 'system_last_tasks_run' => array( - 'settinggroup' => 'system', - 'varname' => 'last_tasks_run', - 'type' => 'hidden', - 'default' => '', - 'save_method' => 'storeSettingField', - ), - 'system_last_traffic_run' => array( - 'settinggroup' => 'system', - 'varname' => 'last_traffic_run', - 'type' => 'hidden', - 'default' => '', - ), - 'system_lastcronrun' => array( - 'settinggroup' => 'system', - 'varname' => 'lastcronrun', - 'type' => 'hidden', - 'default' => '', - ), - 'system_lastguid' => array( - 'settinggroup' => 'system', - 'varname' => 'lastguid', - 'type' => 'hidden', - 'default' => 9999, - ), - 'system_lastaccountnumber' => array( - 'settinggroup' => 'system', - 'varname' => 'lastaccountnumber', - 'type' => 'hidden', - 'default' => 0, - ), - ), - ), - ), - ); - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Settings + * @version $Id$ + */ + +return array( + 'groups' => array( + 'version' => array( + 'fields' => array( + 'panel_version' => array( + 'settinggroup' => 'panel', + 'varname' => 'version', + 'type' => 'hidden', + 'default' => '', + ), + 'panel_frontend' => array( + 'settinggroup' => 'panel', + 'varname' => 'frontend', + 'type' => 'hidden', + 'default' => '', + ), + 'system_last_tasks_run' => array( + 'settinggroup' => 'system', + 'varname' => 'last_tasks_run', + 'type' => 'hidden', + 'default' => '', + 'save_method' => 'storeSettingField', + ), + 'system_last_traffic_run' => array( + 'settinggroup' => 'system', + 'varname' => 'last_traffic_run', + 'type' => 'hidden', + 'default' => '', + ), + 'system_lastcronrun' => array( + 'settinggroup' => 'system', + 'varname' => 'lastcronrun', + 'type' => 'hidden', + 'default' => '', + ), + 'system_lastguid' => array( + 'settinggroup' => 'system', + 'varname' => 'lastguid', + 'type' => 'hidden', + 'default' => 9999, + ), + 'system_lastaccountnumber' => array( + 'settinggroup' => 'system', + 'varname' => 'lastaccountnumber', + 'type' => 'hidden', + 'default' => 0, + ), + ), + ), + ), + ); + +?> diff --git a/actions/admin/settings/100.panel.php b/actions/admin/settings/100.panel.php index c968ba56..511af5b4 100644 --- a/actions/admin/settings/100.panel.php +++ b/actions/admin/settings/100.panel.php @@ -1,165 +1,165 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Language - * @version $Id$ - */ - -return array( - 'groups' => array( - 'panel' => array( - 'title' => $lng['admin']['panelsettings'], - 'fields' => array( - 'panel_standardlanguage' => array( - 'label' => array('title' => $lng['login']['language'], 'description' => $lng['serversettings']['language']['description']), - 'settinggroup' => 'panel', - 'varname' => 'standardlanguage', - 'type' => 'option', - 'default' => 'English', - 'option_mode' => 'one', - 'option_options_method' => 'getLanguages', - 'save_method' => 'storeSettingField', - ), - 'panel_natsorting' => array( - 'label' => $lng['serversettings']['natsorting'], - 'settinggroup' => 'panel', - 'varname' => 'natsorting', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'panel_no_robots' => array( - 'label' => $lng['serversettings']['no_robots'], - 'settinggroup' => 'panel', - 'varname' => 'no_robots', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'panel_paging' => array( - 'label' => $lng['serversettings']['paging'], - 'settinggroup' => 'panel', - 'varname' => 'paging', - 'type' => 'int', - 'int_min' => 0, - 'default' => 0, - 'save_method' => 'storeSettingField', - ), - 'panel_pathedit' => array( - 'label' => $lng['serversettings']['pathedit'], - 'settinggroup' => 'panel', - 'varname' => 'pathedit', - 'type' => 'option', - 'default' => 'Manual', - 'option_mode' => 'one', - 'option_options' => array('Manual' => 'Manual', 'Dropdown' => 'Dropdown'), - 'save_method' => 'storeSettingField', - ), - 'panel_adminmail' => array( - 'label' => $lng['serversettings']['adminmail'], - 'settinggroup' => 'panel', - 'varname' => 'adminmail', - 'type' => 'string', - 'string_type' => 'mail', - 'string_emptyallowed' => false, - 'default' => '', - 'save_method' => 'storeSettingField', - ), - 'panel_decimal_places' => array( - 'label' => $lng['serversettings']['decimal_places'], - 'settinggroup' => 'panel', - 'varname' => 'decimal_places', - 'type' => 'int', - 'int_min' => 0, - 'int_max' => 15, - 'default' => 4, - 'save_method' => 'storeSettingField', - ), - 'panel_phpmyadmin_url' => array( - 'label' => $lng['serversettings']['phpmyadmin_url'], - 'settinggroup' => 'panel', - 'varname' => 'phpmyadmin_url', - 'type' => 'string', - 'string_type' => 'url', - 'string_emptyallowed' => true, - 'default' => '', - 'save_method' => 'storeSettingField', - ), - 'panel_webmail_url' => array( - 'label' => $lng['serversettings']['webmail_url'], - 'settinggroup' => 'panel', - 'varname' => 'webmail_url', - 'type' => 'string', - 'string_type' => 'url', - 'string_emptyallowed' => true, - 'default' => '', - 'save_method' => 'storeSettingField', - ), - 'panel_webftp_url' => array( - 'label' => $lng['serversettings']['webftp_url'], - 'settinggroup' => 'panel', - 'varname' => 'webftp_url', - 'type' => 'string', - 'string_type' => 'url', - 'string_emptyallowed' => true, - 'default' => '', - 'save_method' => 'storeSettingField', - ), - 'admin_show_version_login' => array( - 'label' => $lng['admin']['show_version_login'], - 'settinggroup' => 'admin', - 'varname' => 'show_version_login', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'admin_show_version_footer' => array( - 'label' => $lng['admin']['show_version_footer'], - 'settinggroup' => 'admin', - 'varname' => 'show_version_footer', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'admin_froxlor_graphic' => array( - 'label' => $lng['admin']['froxlor_graphic'], - 'settinggroup' => 'admin', - 'varname' => 'froxlor_graphic', - 'type' => 'string', - 'default' => '', - 'save_method' => 'storeSettingField', - ), - 'panel_allow_domain_change_admin' => array( - 'label' => $lng['serversettings']['panel_allow_domain_change_admin'], - 'settinggroup' => 'panel', - 'varname' => 'allow_domain_change_admin', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'panel_allow_domain_change_customer' => array( - 'label' => $lng['serversettings']['panel_allow_domain_change_customer'], - 'settinggroup' => 'panel', - 'varname' => 'allow_domain_change_customer', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - ), - ), - ), - ); - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Language + * @version $Id$ + */ + +return array( + 'groups' => array( + 'panel' => array( + 'title' => $lng['admin']['panelsettings'], + 'fields' => array( + 'panel_standardlanguage' => array( + 'label' => array('title' => $lng['login']['language'], 'description' => $lng['serversettings']['language']['description']), + 'settinggroup' => 'panel', + 'varname' => 'standardlanguage', + 'type' => 'option', + 'default' => 'English', + 'option_mode' => 'one', + 'option_options_method' => 'getLanguages', + 'save_method' => 'storeSettingField', + ), + 'panel_natsorting' => array( + 'label' => $lng['serversettings']['natsorting'], + 'settinggroup' => 'panel', + 'varname' => 'natsorting', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'panel_no_robots' => array( + 'label' => $lng['serversettings']['no_robots'], + 'settinggroup' => 'panel', + 'varname' => 'no_robots', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'panel_paging' => array( + 'label' => $lng['serversettings']['paging'], + 'settinggroup' => 'panel', + 'varname' => 'paging', + 'type' => 'int', + 'int_min' => 0, + 'default' => 0, + 'save_method' => 'storeSettingField', + ), + 'panel_pathedit' => array( + 'label' => $lng['serversettings']['pathedit'], + 'settinggroup' => 'panel', + 'varname' => 'pathedit', + 'type' => 'option', + 'default' => 'Manual', + 'option_mode' => 'one', + 'option_options' => array('Manual' => 'Manual', 'Dropdown' => 'Dropdown'), + 'save_method' => 'storeSettingField', + ), + 'panel_adminmail' => array( + 'label' => $lng['serversettings']['adminmail'], + 'settinggroup' => 'panel', + 'varname' => 'adminmail', + 'type' => 'string', + 'string_type' => 'mail', + 'string_emptyallowed' => false, + 'default' => '', + 'save_method' => 'storeSettingField', + ), + 'panel_decimal_places' => array( + 'label' => $lng['serversettings']['decimal_places'], + 'settinggroup' => 'panel', + 'varname' => 'decimal_places', + 'type' => 'int', + 'int_min' => 0, + 'int_max' => 15, + 'default' => 4, + 'save_method' => 'storeSettingField', + ), + 'panel_phpmyadmin_url' => array( + 'label' => $lng['serversettings']['phpmyadmin_url'], + 'settinggroup' => 'panel', + 'varname' => 'phpmyadmin_url', + 'type' => 'string', + 'string_type' => 'url', + 'string_emptyallowed' => true, + 'default' => '', + 'save_method' => 'storeSettingField', + ), + 'panel_webmail_url' => array( + 'label' => $lng['serversettings']['webmail_url'], + 'settinggroup' => 'panel', + 'varname' => 'webmail_url', + 'type' => 'string', + 'string_type' => 'url', + 'string_emptyallowed' => true, + 'default' => '', + 'save_method' => 'storeSettingField', + ), + 'panel_webftp_url' => array( + 'label' => $lng['serversettings']['webftp_url'], + 'settinggroup' => 'panel', + 'varname' => 'webftp_url', + 'type' => 'string', + 'string_type' => 'url', + 'string_emptyallowed' => true, + 'default' => '', + 'save_method' => 'storeSettingField', + ), + 'admin_show_version_login' => array( + 'label' => $lng['admin']['show_version_login'], + 'settinggroup' => 'admin', + 'varname' => 'show_version_login', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'admin_show_version_footer' => array( + 'label' => $lng['admin']['show_version_footer'], + 'settinggroup' => 'admin', + 'varname' => 'show_version_footer', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'admin_froxlor_graphic' => array( + 'label' => $lng['admin']['froxlor_graphic'], + 'settinggroup' => 'admin', + 'varname' => 'froxlor_graphic', + 'type' => 'string', + 'default' => '', + 'save_method' => 'storeSettingField', + ), + 'panel_allow_domain_change_admin' => array( + 'label' => $lng['serversettings']['panel_allow_domain_change_admin'], + 'settinggroup' => 'panel', + 'varname' => 'allow_domain_change_admin', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'panel_allow_domain_change_customer' => array( + 'label' => $lng['serversettings']['panel_allow_domain_change_customer'], + 'settinggroup' => 'panel', + 'varname' => 'allow_domain_change_customer', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + ), + ), + ), + ); + +?> diff --git a/actions/admin/settings/110.accounts.php b/actions/admin/settings/110.accounts.php index 2287406c..4f095731 100644 --- a/actions/admin/settings/110.accounts.php +++ b/actions/admin/settings/110.accounts.php @@ -1,112 +1,112 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Settings - * @version $Id$ - */ - -return array( - 'groups' => array( - 'accounts' => array( - 'title' => $lng['admin']['accountsettings'], - 'fields' => array( - 'session_sessiontimeout' => array( - 'label' => $lng['serversettings']['session_timeout'], - 'settinggroup' => 'session', - 'varname' => 'sessiontimeout', - 'type' => 'int', - 'default' => 600, - 'save_method' => 'storeSettingField', - ), - 'session_allow_multiple_login' => array( - 'label' => $lng['serversettings']['session_allow_multiple_login'], - 'settinggroup' => 'session', - 'varname' => 'allow_multiple_login', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'login_maxloginattempts' => array( - 'label' => $lng['serversettings']['maxloginattempts'], - 'settinggroup' => 'login', - 'varname' => 'maxloginattempts', - 'type' => 'int', - 'default' => 3, - 'save_method' => 'storeSettingField', - ), - 'login_deactivatetime' => array( - 'label' => $lng['serversettings']['deactivatetime'], - 'settinggroup' => 'login', - 'varname' => 'deactivatetime', - 'type' => 'int', - 'default' => 900, - 'save_method' => 'storeSettingField', - ), - 'customer_accountprefix' => array( - 'label' => $lng['serversettings']['accountprefix'], - 'settinggroup' => 'customer', - 'varname' => 'accountprefix', - 'type' => 'string', - 'default' => '', - 'plausibility_check_method' => 'checkUsername', - 'save_method' => 'storeSettingField', - ), - 'customer_mysqlprefix' => array( - 'label' => $lng['serversettings']['mysqlprefix'], - 'settinggroup' => 'customer', - 'varname' => 'mysqlprefix', - 'type' => 'string', - 'default' => '', - 'plausibility_check_method' => 'checkUsername', - 'save_method' => 'storeSettingField', - ), - 'customer_ftpprefix' => array( - 'label' => $lng['serversettings']['ftpprefix'], - 'settinggroup' => 'customer', - 'varname' => 'ftpprefix', - 'type' => 'string', - 'default' => '', - 'save_method' => 'storeSettingField', - ), - 'customer_ftpatdomain' => array( - 'label' => $lng['serversettings']['ftpdomain'], - 'settinggroup' => 'customer', - 'varname' => 'ftpatdomain', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'panel_allow_preset' => array( - 'label' => $lng['serversettings']['allow_password_reset'], - 'settinggroup' => 'panel', - 'varname' => 'allow_preset', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'panel_allow_preset_admin' => array( - 'label' => $lng['serversettings']['allow_password_reset_admin'], - 'settinggroup' => 'panel', - 'varname' => 'allow_preset_admin', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - ), - ), - ), - ); - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Settings + * @version $Id$ + */ + +return array( + 'groups' => array( + 'accounts' => array( + 'title' => $lng['admin']['accountsettings'], + 'fields' => array( + 'session_sessiontimeout' => array( + 'label' => $lng['serversettings']['session_timeout'], + 'settinggroup' => 'session', + 'varname' => 'sessiontimeout', + 'type' => 'int', + 'default' => 600, + 'save_method' => 'storeSettingField', + ), + 'session_allow_multiple_login' => array( + 'label' => $lng['serversettings']['session_allow_multiple_login'], + 'settinggroup' => 'session', + 'varname' => 'allow_multiple_login', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'login_maxloginattempts' => array( + 'label' => $lng['serversettings']['maxloginattempts'], + 'settinggroup' => 'login', + 'varname' => 'maxloginattempts', + 'type' => 'int', + 'default' => 3, + 'save_method' => 'storeSettingField', + ), + 'login_deactivatetime' => array( + 'label' => $lng['serversettings']['deactivatetime'], + 'settinggroup' => 'login', + 'varname' => 'deactivatetime', + 'type' => 'int', + 'default' => 900, + 'save_method' => 'storeSettingField', + ), + 'customer_accountprefix' => array( + 'label' => $lng['serversettings']['accountprefix'], + 'settinggroup' => 'customer', + 'varname' => 'accountprefix', + 'type' => 'string', + 'default' => '', + 'plausibility_check_method' => 'checkUsername', + 'save_method' => 'storeSettingField', + ), + 'customer_mysqlprefix' => array( + 'label' => $lng['serversettings']['mysqlprefix'], + 'settinggroup' => 'customer', + 'varname' => 'mysqlprefix', + 'type' => 'string', + 'default' => '', + 'plausibility_check_method' => 'checkUsername', + 'save_method' => 'storeSettingField', + ), + 'customer_ftpprefix' => array( + 'label' => $lng['serversettings']['ftpprefix'], + 'settinggroup' => 'customer', + 'varname' => 'ftpprefix', + 'type' => 'string', + 'default' => '', + 'save_method' => 'storeSettingField', + ), + 'customer_ftpatdomain' => array( + 'label' => $lng['serversettings']['ftpdomain'], + 'settinggroup' => 'customer', + 'varname' => 'ftpatdomain', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'panel_allow_preset' => array( + 'label' => $lng['serversettings']['allow_password_reset'], + 'settinggroup' => 'panel', + 'varname' => 'allow_preset', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'panel_allow_preset_admin' => array( + 'label' => $lng['serversettings']['allow_password_reset_admin'], + 'settinggroup' => 'panel', + 'varname' => 'allow_preset_admin', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + ), + ), + ), + ); + ?> \ No newline at end of file diff --git a/actions/admin/settings/120.system.php b/actions/admin/settings/120.system.php index 52784f7f..d896eb6a 100644 --- a/actions/admin/settings/120.system.php +++ b/actions/admin/settings/120.system.php @@ -1,113 +1,113 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Settings - * @version $Id$ - */ - -return array( - 'groups' => array( - 'system' => array( - 'title' => $lng['admin']['systemsettings'], - 'fields' => array( - 'system_documentroot_prefix' => array( - 'label' => $lng['serversettings']['documentroot_prefix'], - 'settinggroup' => 'system', - 'varname' => 'documentroot_prefix', - 'type' => 'string', - 'default' => '/var/customers/webs/', - 'save_method' => 'storeSettingField', - ), - 'system_ipaddress' => array( - 'label' => $lng['serversettings']['ipaddress'], - 'settinggroup' => 'system', - 'varname' => 'ipaddress', - 'type' => 'option', - 'option_mode' => 'one', - 'option_options_method' => 'getIpAddresses', - 'default' => '', - 'save_method' => 'storeSettingIpAddress', - ), - 'system_defaultip' => array( - 'label' => $lng['serversettings']['defaultip'], - 'settinggroup' => 'system', - 'varname' => 'defaultip', - 'type' => 'option', - 'option_mode' => 'one', - 'option_options_method' => 'getIpPortCombinations', - 'default' => '', - 'save_method' => 'storeSettingDefaultIp', - ), - 'system_hostname' => array( - 'label' => $lng['serversettings']['hostname'], - 'settinggroup' => 'system', - 'varname' => 'hostname', - 'type' => 'string', - 'default' => '', - 'save_method' => 'storeSettingHostname', - ), - 'system_mysql_access_host' => array( - 'label' => $lng['serversettings']['mysql_access_host'], - 'settinggroup' => 'system', - 'varname' => 'mysql_access_host', - 'type' => 'string', - 'default' => '127.0.0.1,localhost', - 'plausibility_check_method' => 'checkMysqlAccessHost', - 'save_method' => 'storeSettingMysqlAccessHost', - ), - 'system_realtime_port' => array( - 'label' => $lng['serversettings']['system_realtime_port'], - 'settinggroup' => 'system', - 'varname' => 'realtime_port', - 'type' => 'int', - 'int_max' => 65535, - 'default' => 0, - 'save_method' => 'storeSettingField', - ), - 'system_index_file_extension' => array( - 'label' => $lng['serversettings']['index_file_extension'], - 'settinggroup' => 'system', - 'varname' => 'index_file_extension', - 'type' => 'string', - 'string_regexp' => '/^[a-zA-Z0-9]{1,6}$/', - 'default' => 'html', - 'save_method' => 'storeSettingField', - ), - 'system_httpuser' => array( - 'settinggroup' => 'system', - 'varname' => 'httpuser', - 'type' => 'hidden', - 'default' => 'www-data', - ), - 'system_httpgroup' => array( - 'settinggroup' => 'system', - 'varname' => 'httpgroup', - 'type' => 'hidden', - 'default' => 'www-data', - ), - 'system_debug_cron' => array( - 'label' => $lng['serversettings']['cron']['debug'], - 'settinggroup' => 'system', - 'varname' => 'debug_cron', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - ), - ), - ), - ); - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Settings + * @version $Id$ + */ + +return array( + 'groups' => array( + 'system' => array( + 'title' => $lng['admin']['systemsettings'], + 'fields' => array( + 'system_documentroot_prefix' => array( + 'label' => $lng['serversettings']['documentroot_prefix'], + 'settinggroup' => 'system', + 'varname' => 'documentroot_prefix', + 'type' => 'string', + 'default' => '/var/customers/webs/', + 'save_method' => 'storeSettingField', + ), + 'system_ipaddress' => array( + 'label' => $lng['serversettings']['ipaddress'], + 'settinggroup' => 'system', + 'varname' => 'ipaddress', + 'type' => 'option', + 'option_mode' => 'one', + 'option_options_method' => 'getIpAddresses', + 'default' => '', + 'save_method' => 'storeSettingIpAddress', + ), + 'system_defaultip' => array( + 'label' => $lng['serversettings']['defaultip'], + 'settinggroup' => 'system', + 'varname' => 'defaultip', + 'type' => 'option', + 'option_mode' => 'one', + 'option_options_method' => 'getIpPortCombinations', + 'default' => '', + 'save_method' => 'storeSettingDefaultIp', + ), + 'system_hostname' => array( + 'label' => $lng['serversettings']['hostname'], + 'settinggroup' => 'system', + 'varname' => 'hostname', + 'type' => 'string', + 'default' => '', + 'save_method' => 'storeSettingHostname', + ), + 'system_mysql_access_host' => array( + 'label' => $lng['serversettings']['mysql_access_host'], + 'settinggroup' => 'system', + 'varname' => 'mysql_access_host', + 'type' => 'string', + 'default' => '127.0.0.1,localhost', + 'plausibility_check_method' => 'checkMysqlAccessHost', + 'save_method' => 'storeSettingMysqlAccessHost', + ), + 'system_realtime_port' => array( + 'label' => $lng['serversettings']['system_realtime_port'], + 'settinggroup' => 'system', + 'varname' => 'realtime_port', + 'type' => 'int', + 'int_max' => 65535, + 'default' => 0, + 'save_method' => 'storeSettingField', + ), + 'system_index_file_extension' => array( + 'label' => $lng['serversettings']['index_file_extension'], + 'settinggroup' => 'system', + 'varname' => 'index_file_extension', + 'type' => 'string', + 'string_regexp' => '/^[a-zA-Z0-9]{1,6}$/', + 'default' => 'html', + 'save_method' => 'storeSettingField', + ), + 'system_httpuser' => array( + 'settinggroup' => 'system', + 'varname' => 'httpuser', + 'type' => 'hidden', + 'default' => 'www-data', + ), + 'system_httpgroup' => array( + 'settinggroup' => 'system', + 'varname' => 'httpgroup', + 'type' => 'hidden', + 'default' => 'www-data', + ), + 'system_debug_cron' => array( + 'label' => $lng['serversettings']['cron']['debug'], + 'settinggroup' => 'system', + 'varname' => 'debug_cron', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + ), + ), + ), + ); + ?> \ No newline at end of file diff --git a/actions/admin/settings/130.webserver.php b/actions/admin/settings/130.webserver.php index fe2b8f34..97d0fcb2 100644 --- a/actions/admin/settings/130.webserver.php +++ b/actions/admin/settings/130.webserver.php @@ -1,170 +1,170 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Settings - * @version $Id$ - */ - -return array( - 'groups' => array( - 'webserver' => array( - 'title' => $lng['admin']['webserversettings'], - 'fields' => array( - 'system_webserver' => array( - 'label' => $lng['admin']['webserver'], - 'settinggroup' => 'system', - 'varname' => 'webserver', - 'type' => 'option', - 'default' => 'Apache2', - 'option_mode' => 'one', - 'option_options' => array('apache2' => 'Apache 2', 'lighttpd' => 'ligHTTPd'), - 'save_method' => 'storeSettingField', - ), - 'system_apacheconf_vhost' => array( - 'label' => $lng['serversettings']['apacheconf_vhost'], - 'settinggroup' => 'system', - 'varname' => 'apacheconf_vhost', - 'type' => 'string', - 'string_type' => 'filedir', - 'default' => '/etc/apache2/sites-enabled/', - 'save_method' => 'storeSettingField', - ), - 'system_apacheconf_diroptions' => array( - 'label' => $lng['serversettings']['apacheconf_diroptions'], - 'settinggroup' => 'system', - 'varname' => 'apacheconf_diroptions', - 'type' => 'string', - 'string_type' => 'filedir', - 'default' => '/etc/apache2/sites-enabled/', - 'save_method' => 'storeSettingField', - ), - 'system_apacheconf_htpasswddir' => array( - 'label' => $lng['serversettings']['apacheconf_htpasswddir'], - 'settinggroup' => 'system', - 'varname' => 'apacheconf_htpasswddir', - 'type' => 'string', - 'string_type' => 'dir', - 'default' => '/etc/apache2/htpasswd/', - 'save_method' => 'storeSettingField', - ), - 'system_apachereload_command' => array( - 'label' => $lng['serversettings']['apachereload_command'], - 'settinggroup' => 'system', - 'varname' => 'apachereload_command', - 'type' => 'string', - 'default' => '/etc/init.d/apache2 reload', - 'save_method' => 'storeSettingField', - ), - 'system_mod_log_sql' => array( - 'label' => $lng['serversettings']['mod_log_sql'], - 'settinggroup' => 'system', - 'varname' => 'mod_log_sql', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'system_logfiles_directory' => array( - 'label' => $lng['serversettings']['logfiles_directory'], - 'settinggroup' => 'system', - 'varname' => 'logfiles_directory', - 'type' => 'string', - 'string_type' => 'dir', - 'default' => '/var/customers/logs/', - 'save_method' => 'storeSettingField', - ), - 'system_phpappendopenbasedir' => array( - 'label' => $lng['serversettings']['phpappendopenbasedir'], - 'settinggroup' => 'system', - 'varname' => 'phpappendopenbasedir', - 'type' => 'string', - 'string_emptyallowed' => true, - 'default' => '', - 'save_method' => 'storeSettingField', - ), - 'system_deactivateddocroot' => array( - 'label' => $lng['serversettings']['deactivateddocroot'], - 'settinggroup' => 'system', - 'varname' => 'deactivateddocroot', - 'type' => 'string', - 'string_type' => 'dir', - 'string_emptyallowed' => true, - 'default' => '', - 'save_method' => 'storeSettingField', - ), - 'system_default_vhostconf' => array( - 'label' => $lng['serversettings']['default_vhostconf'], - 'settinggroup' => 'system', - 'varname' => 'default_vhostconf', - 'type' => 'text', - 'default' => '', - 'save_method' => 'storeSettingField', - ), - ), - ), - 'ssl' => array( - 'title' => $lng['admin']['sslsettings'], - 'fields' => array( - 'system_ssl_enabled' => array( - 'label' => $lng['serversettings']['ssl']['use_ssl'], - 'settinggroup' => 'system', - 'varname' => 'use_ssl', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'system_ssl_cert_file' => array( - 'label' => $lng['serversettings']['ssl']['ssl_cert_file'], - 'settinggroup' => 'system', - 'varname' => 'ssl_cert_file', - 'type' => 'string', - 'string_type' => 'file', - 'string_emptyallowed' => true, - 'default' => '/etc/apache2/apache2.pem', - 'save_method' => 'storeSettingField', - ), - 'system_ssl_key_file' => array( - 'label' => $lng['serversettings']['ssl']['ssl_key_file'], - 'settinggroup' => 'system', - 'varname' => 'ssl_key_file', - 'type' => 'string', - 'string_type' => 'file', - 'string_emptyallowed' => true, - 'default' => '/etc/apache2/apache2.key', - 'save_method' => 'storeSettingField', - ), - 'system_ssl_ca_file' => array( - 'label' => $lng['serversettings']['ssl']['ssl_ca_file'], - 'settinggroup' => 'system', - 'varname' => 'ssl_ca_file', - 'type' => 'string', - 'string_type' => 'file', - 'string_emptyallowed' => true, - 'default' => '', - 'save_method' => 'storeSettingField', - ), - 'system_ssl_openssl_cnf' => array( - 'label' => $lng['serversettings']['ssl']['openssl_cnf'], - 'settinggroup' => 'system', - 'varname' => 'openssl_cnf', - 'type' => 'text', - 'default' => '', - 'save_method' => 'storeSettingField', - ), - ), - ), - ), - ); - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Settings + * @version $Id$ + */ + +return array( + 'groups' => array( + 'webserver' => array( + 'title' => $lng['admin']['webserversettings'], + 'fields' => array( + 'system_webserver' => array( + 'label' => $lng['admin']['webserver'], + 'settinggroup' => 'system', + 'varname' => 'webserver', + 'type' => 'option', + 'default' => 'Apache2', + 'option_mode' => 'one', + 'option_options' => array('apache2' => 'Apache 2', 'lighttpd' => 'ligHTTPd'), + 'save_method' => 'storeSettingField', + ), + 'system_apacheconf_vhost' => array( + 'label' => $lng['serversettings']['apacheconf_vhost'], + 'settinggroup' => 'system', + 'varname' => 'apacheconf_vhost', + 'type' => 'string', + 'string_type' => 'filedir', + 'default' => '/etc/apache2/sites-enabled/', + 'save_method' => 'storeSettingField', + ), + 'system_apacheconf_diroptions' => array( + 'label' => $lng['serversettings']['apacheconf_diroptions'], + 'settinggroup' => 'system', + 'varname' => 'apacheconf_diroptions', + 'type' => 'string', + 'string_type' => 'filedir', + 'default' => '/etc/apache2/sites-enabled/', + 'save_method' => 'storeSettingField', + ), + 'system_apacheconf_htpasswddir' => array( + 'label' => $lng['serversettings']['apacheconf_htpasswddir'], + 'settinggroup' => 'system', + 'varname' => 'apacheconf_htpasswddir', + 'type' => 'string', + 'string_type' => 'dir', + 'default' => '/etc/apache2/htpasswd/', + 'save_method' => 'storeSettingField', + ), + 'system_apachereload_command' => array( + 'label' => $lng['serversettings']['apachereload_command'], + 'settinggroup' => 'system', + 'varname' => 'apachereload_command', + 'type' => 'string', + 'default' => '/etc/init.d/apache2 reload', + 'save_method' => 'storeSettingField', + ), + 'system_mod_log_sql' => array( + 'label' => $lng['serversettings']['mod_log_sql'], + 'settinggroup' => 'system', + 'varname' => 'mod_log_sql', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'system_logfiles_directory' => array( + 'label' => $lng['serversettings']['logfiles_directory'], + 'settinggroup' => 'system', + 'varname' => 'logfiles_directory', + 'type' => 'string', + 'string_type' => 'dir', + 'default' => '/var/customers/logs/', + 'save_method' => 'storeSettingField', + ), + 'system_phpappendopenbasedir' => array( + 'label' => $lng['serversettings']['phpappendopenbasedir'], + 'settinggroup' => 'system', + 'varname' => 'phpappendopenbasedir', + 'type' => 'string', + 'string_emptyallowed' => true, + 'default' => '', + 'save_method' => 'storeSettingField', + ), + 'system_deactivateddocroot' => array( + 'label' => $lng['serversettings']['deactivateddocroot'], + 'settinggroup' => 'system', + 'varname' => 'deactivateddocroot', + 'type' => 'string', + 'string_type' => 'dir', + 'string_emptyallowed' => true, + 'default' => '', + 'save_method' => 'storeSettingField', + ), + 'system_default_vhostconf' => array( + 'label' => $lng['serversettings']['default_vhostconf'], + 'settinggroup' => 'system', + 'varname' => 'default_vhostconf', + 'type' => 'text', + 'default' => '', + 'save_method' => 'storeSettingField', + ), + ), + ), + 'ssl' => array( + 'title' => $lng['admin']['sslsettings'], + 'fields' => array( + 'system_ssl_enabled' => array( + 'label' => $lng['serversettings']['ssl']['use_ssl'], + 'settinggroup' => 'system', + 'varname' => 'use_ssl', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'system_ssl_cert_file' => array( + 'label' => $lng['serversettings']['ssl']['ssl_cert_file'], + 'settinggroup' => 'system', + 'varname' => 'ssl_cert_file', + 'type' => 'string', + 'string_type' => 'file', + 'string_emptyallowed' => true, + 'default' => '/etc/apache2/apache2.pem', + 'save_method' => 'storeSettingField', + ), + 'system_ssl_key_file' => array( + 'label' => $lng['serversettings']['ssl']['ssl_key_file'], + 'settinggroup' => 'system', + 'varname' => 'ssl_key_file', + 'type' => 'string', + 'string_type' => 'file', + 'string_emptyallowed' => true, + 'default' => '/etc/apache2/apache2.key', + 'save_method' => 'storeSettingField', + ), + 'system_ssl_ca_file' => array( + 'label' => $lng['serversettings']['ssl']['ssl_ca_file'], + 'settinggroup' => 'system', + 'varname' => 'ssl_ca_file', + 'type' => 'string', + 'string_type' => 'file', + 'string_emptyallowed' => true, + 'default' => '', + 'save_method' => 'storeSettingField', + ), + 'system_ssl_openssl_cnf' => array( + 'label' => $lng['serversettings']['ssl']['openssl_cnf'], + 'settinggroup' => 'system', + 'varname' => 'openssl_cnf', + 'type' => 'text', + 'default' => '', + 'save_method' => 'storeSettingField', + ), + ), + ), + ), + ); + ?> \ No newline at end of file diff --git a/actions/admin/settings/140.statistics.php b/actions/admin/settings/140.statistics.php index c3a1ebb1..0c678b55 100644 --- a/actions/admin/settings/140.statistics.php +++ b/actions/admin/settings/140.statistics.php @@ -1,84 +1,84 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Settings - * @version $Id$ - */ - -return array( - 'groups' => array( - 'statistics' => array( - 'title' => $lng['admin']['statisticsettings'], - 'fields' => array( - 'system_webalizer_quiet' => array( - 'label' => $lng['serversettings']['webalizer_quiet'], - 'settinggroup' => 'system', - 'varname' => 'webalizer_quiet', - 'type' => 'option', - 'default' => 2, - 'option_mode' => 'one', - 'option_options' => array(0 => $lng['admin']['webalizer']['normal'], 1 => $lng['admin']['webalizer']['quiet'], 2 => $lng['admin']['webalizer']['veryquiet']), - 'save_method' => 'storeSettingField', - ), - 'system_awstats_enabled' => array( - 'label' => $lng['serversettings']['awstats_enabled'], - 'settinggroup' => 'system', - 'varname' => 'awstats_enabled', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'system_awstats_domain_file' => array( - 'label' => $lng['serversettings']['awstats_domain_file'], - 'settinggroup' => 'system', - 'varname' => 'awstats_domain_file', - 'type' => 'string', - 'string_type' => 'dir', - 'default' => '/etc/awstats/', - 'save_method' => 'storeSettingField', - ), - 'system_awstats_model_file' => array( - 'label' => $lng['serversettings']['awstats_model_file'], - 'settinggroup' => 'system', - 'varname' => 'awstats_model_file', - 'type' => 'string', - 'string_type' => 'file', - 'default' => '/etc/awstats/awstats.model.conf.syscp', - 'save_method' => 'storeSettingField', - ), - 'system_awstats_path' => array( - 'label' => $lng['serversettings']['awstats_path'], - 'settinggroup' => 'system', - 'varname' => 'awstats_path', - 'type' => 'string', - 'string_type' => 'dir', - 'default' => '/usr/share/awstats/VERSION/webroot/cgi-bin/', - 'save_method' => 'storeSettingField', - ), - 'system_awstats_updateall_command' => array( - 'label' => $lng['serversettings']['awstats_updateall_command'], - 'settinggroup' => 'system', - 'varname' => 'awstats_updateall_command', - 'type' => 'string', - 'string_type' => 'file', - 'default' => '/usr/bin/awstats_updateall.pl', - 'save_method' => 'storeSettingField', - ), - ), - ), - ), - ); - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Settings + * @version $Id$ + */ + +return array( + 'groups' => array( + 'statistics' => array( + 'title' => $lng['admin']['statisticsettings'], + 'fields' => array( + 'system_webalizer_quiet' => array( + 'label' => $lng['serversettings']['webalizer_quiet'], + 'settinggroup' => 'system', + 'varname' => 'webalizer_quiet', + 'type' => 'option', + 'default' => 2, + 'option_mode' => 'one', + 'option_options' => array(0 => $lng['admin']['webalizer']['normal'], 1 => $lng['admin']['webalizer']['quiet'], 2 => $lng['admin']['webalizer']['veryquiet']), + 'save_method' => 'storeSettingField', + ), + 'system_awstats_enabled' => array( + 'label' => $lng['serversettings']['awstats_enabled'], + 'settinggroup' => 'system', + 'varname' => 'awstats_enabled', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'system_awstats_domain_file' => array( + 'label' => $lng['serversettings']['awstats_domain_file'], + 'settinggroup' => 'system', + 'varname' => 'awstats_domain_file', + 'type' => 'string', + 'string_type' => 'dir', + 'default' => '/etc/awstats/', + 'save_method' => 'storeSettingField', + ), + 'system_awstats_model_file' => array( + 'label' => $lng['serversettings']['awstats_model_file'], + 'settinggroup' => 'system', + 'varname' => 'awstats_model_file', + 'type' => 'string', + 'string_type' => 'file', + 'default' => '/etc/awstats/awstats.model.conf.syscp', + 'save_method' => 'storeSettingField', + ), + 'system_awstats_path' => array( + 'label' => $lng['serversettings']['awstats_path'], + 'settinggroup' => 'system', + 'varname' => 'awstats_path', + 'type' => 'string', + 'string_type' => 'dir', + 'default' => '/usr/share/awstats/VERSION/webroot/cgi-bin/', + 'save_method' => 'storeSettingField', + ), + 'system_awstats_updateall_command' => array( + 'label' => $lng['serversettings']['awstats_updateall_command'], + 'settinggroup' => 'system', + 'varname' => 'awstats_updateall_command', + 'type' => 'string', + 'string_type' => 'file', + 'default' => '/usr/bin/awstats_updateall.pl', + 'save_method' => 'storeSettingField', + ), + ), + ), + ), + ); + ?> \ No newline at end of file diff --git a/actions/admin/settings/150.mail.php b/actions/admin/settings/150.mail.php index e2ed498f..70186169 100644 --- a/actions/admin/settings/150.mail.php +++ b/actions/admin/settings/150.mail.php @@ -1,97 +1,97 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Settings - * @version $Id$ - */ - -return array( - 'groups' => array( - 'mail' => array( - 'title' => $lng['admin']['mailserversettings'], - 'fields' => array( - 'system_vmail_uid' => array( - 'label' => $lng['serversettings']['vmail_uid'], - 'settinggroup' => 'system', - 'varname' => 'vmail_uid', - 'type' => 'int', - 'default' => 2000, - 'int_min' => 1, - 'int_max' => 65535, - 'save_method' => 'storeSettingField', - ), - 'system_vmail_gid' => array( - 'label' => $lng['serversettings']['vmail_gid'], - 'settinggroup' => 'system', - 'varname' => 'vmail_gid', - 'type' => 'int', - 'default' => 2000, - 'int_min' => 1, - 'int_max' => 65535, - 'save_method' => 'storeSettingField', - ), - 'system_vmail_homedir' => array( - 'label' => $lng['serversettings']['vmail_homedir'], - 'settinggroup' => 'system', - 'varname' => 'vmail_homedir', - 'type' => 'string', - 'string_type' => 'dir', - 'default' => '/var/customers/mail/', - 'save_method' => 'storeSettingField', - ), - 'panel_sendalternativemail' => array( - 'label' => $lng['serversettings']['sendalternativemail'], - 'settinggroup' => 'panel', - 'varname' => 'sendalternativemail', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'system_mail_quota_enabled' => array( - 'label' => $lng['serversettings']['mail_quota_enabled'], - 'settinggroup' => 'system', - 'varname' => 'mail_quota_enabled', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'system_mail_quota' => array( - 'label' => $lng['serversettings']['mail_quota'], - 'settinggroup' => 'system', - 'varname' => 'mail_quota', - 'type' => 'int', - 'default' => 100, - 'save_method' => 'storeSettingField', - ), - 'systen_autoresponder_enabled' => array( - 'label' => $lng['serversettings']['autoresponder_active'], - 'settinggroup' => 'autoresponder', - 'varname' => 'autoresponder_active', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'systen_last_autoresponder_run' => array( - 'settinggroup' => 'autoresponder', - 'varname' => 'last_autoresponder_run', - 'type' => 'hidden', - 'default' => 0, - ), - ), - ), - ), - ); - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Settings + * @version $Id$ + */ + +return array( + 'groups' => array( + 'mail' => array( + 'title' => $lng['admin']['mailserversettings'], + 'fields' => array( + 'system_vmail_uid' => array( + 'label' => $lng['serversettings']['vmail_uid'], + 'settinggroup' => 'system', + 'varname' => 'vmail_uid', + 'type' => 'int', + 'default' => 2000, + 'int_min' => 1, + 'int_max' => 65535, + 'save_method' => 'storeSettingField', + ), + 'system_vmail_gid' => array( + 'label' => $lng['serversettings']['vmail_gid'], + 'settinggroup' => 'system', + 'varname' => 'vmail_gid', + 'type' => 'int', + 'default' => 2000, + 'int_min' => 1, + 'int_max' => 65535, + 'save_method' => 'storeSettingField', + ), + 'system_vmail_homedir' => array( + 'label' => $lng['serversettings']['vmail_homedir'], + 'settinggroup' => 'system', + 'varname' => 'vmail_homedir', + 'type' => 'string', + 'string_type' => 'dir', + 'default' => '/var/customers/mail/', + 'save_method' => 'storeSettingField', + ), + 'panel_sendalternativemail' => array( + 'label' => $lng['serversettings']['sendalternativemail'], + 'settinggroup' => 'panel', + 'varname' => 'sendalternativemail', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'system_mail_quota_enabled' => array( + 'label' => $lng['serversettings']['mail_quota_enabled'], + 'settinggroup' => 'system', + 'varname' => 'mail_quota_enabled', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'system_mail_quota' => array( + 'label' => $lng['serversettings']['mail_quota'], + 'settinggroup' => 'system', + 'varname' => 'mail_quota', + 'type' => 'int', + 'default' => 100, + 'save_method' => 'storeSettingField', + ), + 'systen_autoresponder_enabled' => array( + 'label' => $lng['serversettings']['autoresponder_active'], + 'settinggroup' => 'autoresponder', + 'varname' => 'autoresponder_active', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'systen_last_autoresponder_run' => array( + 'settinggroup' => 'autoresponder', + 'varname' => 'last_autoresponder_run', + 'type' => 'hidden', + 'default' => 0, + ), + ), + ), + ), + ); + ?> \ No newline at end of file diff --git a/actions/admin/settings/160.nameserver.php b/actions/admin/settings/160.nameserver.php index e50ac994..fcfeeb06 100644 --- a/actions/admin/settings/160.nameserver.php +++ b/actions/admin/settings/160.nameserver.php @@ -1,67 +1,67 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Settings - * @version $Id$ - */ - -return array( - 'groups' => array( - 'nameserver' => array( - 'title' => $lng['admin']['nameserversettings'], - 'fields' => array( - 'system_bindconf_directory' => array( - 'label' => $lng['serversettings']['bindconf_directory'], - 'settinggroup' => 'system', - 'varname' => 'bindconf_directory', - 'type' => 'string', - 'string_type' => 'dir', - 'default' => '/etc/bind/', - 'save_method' => 'storeSettingField', - ), - 'system_bindreload_command' => array( - 'label' => $lng['serversettings']['bindreload_command'], - 'settinggroup' => 'system', - 'varname' => 'bindreload_command', - 'type' => 'string', - 'default' => '/etc/init.d/bind9 reload', - 'save_method' => 'storeSettingField', - ), - 'system_nameservers' => array( - 'label' => $lng['serversettings']['nameservers'], - 'settinggroup' => 'system', - 'varname' => 'nameservers', - 'type' => 'string', - 'string_regexp' => '/^(([a-z0-9\-\._]+, ?)*[a-z0-9\-\._]+)?$/i', - 'string_emptyallowed' => true, - 'default' => '', - 'save_method' => 'storeSettingFieldInsertBindTask', - ), - 'system_mxservers' => array( - 'label' => $lng['serversettings']['mxservers'], - 'settinggroup' => 'system', - 'varname' => 'mxservers', - 'type' => 'string', - 'string_regexp' => '/^(([0-9]+ [a-z0-9\-\._]+, ?)*[0-9]+ [a-z0-9\-\._]+)?$/i', - 'string_emptyallowed' => true, - 'default' => '', - 'save_method' => 'storeSettingField', - ), - ), - ), - ), - ); - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Settings + * @version $Id$ + */ + +return array( + 'groups' => array( + 'nameserver' => array( + 'title' => $lng['admin']['nameserversettings'], + 'fields' => array( + 'system_bindconf_directory' => array( + 'label' => $lng['serversettings']['bindconf_directory'], + 'settinggroup' => 'system', + 'varname' => 'bindconf_directory', + 'type' => 'string', + 'string_type' => 'dir', + 'default' => '/etc/bind/', + 'save_method' => 'storeSettingField', + ), + 'system_bindreload_command' => array( + 'label' => $lng['serversettings']['bindreload_command'], + 'settinggroup' => 'system', + 'varname' => 'bindreload_command', + 'type' => 'string', + 'default' => '/etc/init.d/bind9 reload', + 'save_method' => 'storeSettingField', + ), + 'system_nameservers' => array( + 'label' => $lng['serversettings']['nameservers'], + 'settinggroup' => 'system', + 'varname' => 'nameservers', + 'type' => 'string', + 'string_regexp' => '/^(([a-z0-9\-\._]+, ?)*[a-z0-9\-\._]+)?$/i', + 'string_emptyallowed' => true, + 'default' => '', + 'save_method' => 'storeSettingFieldInsertBindTask', + ), + 'system_mxservers' => array( + 'label' => $lng['serversettings']['mxservers'], + 'settinggroup' => 'system', + 'varname' => 'mxservers', + 'type' => 'string', + 'string_regexp' => '/^(([0-9]+ [a-z0-9\-\._]+, ?)*[0-9]+ [a-z0-9\-\._]+)?$/i', + 'string_emptyallowed' => true, + 'default' => '', + 'save_method' => 'storeSettingField', + ), + ), + ), + ), + ); + ?> \ No newline at end of file diff --git a/actions/admin/settings/170.logger.php b/actions/admin/settings/170.logger.php index e8f99adb..4bb5f51a 100644 --- a/actions/admin/settings/170.logger.php +++ b/actions/admin/settings/170.logger.php @@ -1,76 +1,76 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Settings - * @version $Id$ - */ - -return array( - 'groups' => array( - 'logging' => array( - 'title' => $lng['admin']['loggersettings'], - 'fields' => array( - 'logger_enabled' => array( - 'label' => $lng['serversettings']['logger']['enable'], - 'settinggroup' => 'logger', - 'varname' => 'enabled', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'logger_severity' => array( - 'label' => $lng['serversettings']['logger']['severity'], - 'settinggroup' => 'logger', - 'varname' => 'severity', - 'type' => 'option', - 'default' => 1, - 'option_mode' => 'one', - 'option_options' => array(1 => $lng['admin']['logger']['normal'], 2 => $lng['admin']['logger']['paranoid']), - 'save_method' => 'storeSettingField', - ), - 'logger_logtypes' => array( - 'label' => $lng['serversettings']['logger']['types'], - 'settinggroup' => 'logger', - 'varname' => 'logtypes', - 'type' => 'option', - 'default' => 'syslog,mysql', - 'option_mode' => 'multiple', - 'option_options' => array('syslog' => 'syslog', 'file' => 'file', 'mysql' => 'mysql'), - 'save_method' => 'storeSettingField', - ), - 'logger_logfile' => array( - 'label' => $lng['serversettings']['logger']['logfile'], - 'settinggroup' => 'logger', - 'varname' => 'logfile', - 'type' => 'string', - 'string_type' => 'file', - 'string_emptyallowed' => true, - 'default' => '', - 'save_method' => 'storeSettingField', - ), - 'logger_log_cron' => array( - 'label' => $lng['serversettings']['logger']['logcron'], - 'settinggroup' => 'logger', - 'varname' => 'log_cron', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - ), - ), - ) - ); - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Settings + * @version $Id$ + */ + +return array( + 'groups' => array( + 'logging' => array( + 'title' => $lng['admin']['loggersettings'], + 'fields' => array( + 'logger_enabled' => array( + 'label' => $lng['serversettings']['logger']['enable'], + 'settinggroup' => 'logger', + 'varname' => 'enabled', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'logger_severity' => array( + 'label' => $lng['serversettings']['logger']['severity'], + 'settinggroup' => 'logger', + 'varname' => 'severity', + 'type' => 'option', + 'default' => 1, + 'option_mode' => 'one', + 'option_options' => array(1 => $lng['admin']['logger']['normal'], 2 => $lng['admin']['logger']['paranoid']), + 'save_method' => 'storeSettingField', + ), + 'logger_logtypes' => array( + 'label' => $lng['serversettings']['logger']['types'], + 'settinggroup' => 'logger', + 'varname' => 'logtypes', + 'type' => 'option', + 'default' => 'syslog,mysql', + 'option_mode' => 'multiple', + 'option_options' => array('syslog' => 'syslog', 'file' => 'file', 'mysql' => 'mysql'), + 'save_method' => 'storeSettingField', + ), + 'logger_logfile' => array( + 'label' => $lng['serversettings']['logger']['logfile'], + 'settinggroup' => 'logger', + 'varname' => 'logfile', + 'type' => 'string', + 'string_type' => 'file', + 'string_emptyallowed' => true, + 'default' => '', + 'save_method' => 'storeSettingField', + ), + 'logger_log_cron' => array( + 'label' => $lng['serversettings']['logger']['logcron'], + 'settinggroup' => 'logger', + 'varname' => 'log_cron', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + ), + ), + ) + ); + ?> \ No newline at end of file diff --git a/actions/admin/settings/180.dkim.php b/actions/admin/settings/180.dkim.php index a4658559..2ff3ecc3 100644 --- a/actions/admin/settings/180.dkim.php +++ b/actions/admin/settings/180.dkim.php @@ -1,72 +1,72 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Settings - * @version $Id$ - */ - -return array( - 'groups' => array( - 'dkim' => array( - 'title' => $lng['admin']['dkimsettings'], - 'fields' => array( - 'dkim_enabled' => array( - 'label' => $lng['dkim']['use_dkim'], - 'settinggroup' => 'dkim', - 'varname' => 'use_dkim', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'dkim_prefix' => array( - 'label' => $lng['dkim']['dkim_prefix'], - 'settinggroup' => 'dkim', - 'varname' => 'dkim_prefix', - 'type' => 'string', - 'default' => '/etc/postfix/dkim/', - 'save_method' => 'storeSettingField', - ), - 'dkim_domains' => array( - 'label' => $lng['dkim']['dkim_domains'], - 'settinggroup' => 'dkim', - 'varname' => 'dkim_domains', - 'type' => 'string', - 'string_regexp' => '/^[a-z0-9\._]+$/i', - 'default' => 'domains', - 'save_method' => 'storeSettingField', - ), - 'dkim_dkimkeys' => array( - 'label' => $lng['dkim']['dkim_dkimkeys'], - 'settinggroup' => 'dkim', - 'varname' => 'dkim_dkimkeys', - 'type' => 'string', - 'string_regexp' => '/^[a-z0-9\._]+$/i', - 'default' => 'dkim-keys.conf', - 'save_method' => 'storeSettingField', - ), - 'dkimrestart_command' => array( - 'label' => $lng['dkim']['dkimrestart_command'], - 'settinggroup' => 'dkim', - 'varname' => 'dkimrestart_command', - 'type' => 'string', - 'default' => '/etc/init.d/dkim-filter restart', - 'save_method' => 'storeSettingField', - ), - ), - ), - ), - ); - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Settings + * @version $Id$ + */ + +return array( + 'groups' => array( + 'dkim' => array( + 'title' => $lng['admin']['dkimsettings'], + 'fields' => array( + 'dkim_enabled' => array( + 'label' => $lng['dkim']['use_dkim'], + 'settinggroup' => 'dkim', + 'varname' => 'use_dkim', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'dkim_prefix' => array( + 'label' => $lng['dkim']['dkim_prefix'], + 'settinggroup' => 'dkim', + 'varname' => 'dkim_prefix', + 'type' => 'string', + 'default' => '/etc/postfix/dkim/', + 'save_method' => 'storeSettingField', + ), + 'dkim_domains' => array( + 'label' => $lng['dkim']['dkim_domains'], + 'settinggroup' => 'dkim', + 'varname' => 'dkim_domains', + 'type' => 'string', + 'string_regexp' => '/^[a-z0-9\._]+$/i', + 'default' => 'domains', + 'save_method' => 'storeSettingField', + ), + 'dkim_dkimkeys' => array( + 'label' => $lng['dkim']['dkim_dkimkeys'], + 'settinggroup' => 'dkim', + 'varname' => 'dkim_dkimkeys', + 'type' => 'string', + 'string_regexp' => '/^[a-z0-9\._]+$/i', + 'default' => 'dkim-keys.conf', + 'save_method' => 'storeSettingField', + ), + 'dkimrestart_command' => array( + 'label' => $lng['dkim']['dkimrestart_command'], + 'settinggroup' => 'dkim', + 'varname' => 'dkimrestart_command', + 'type' => 'string', + 'default' => '/etc/init.d/dkim-filter restart', + 'save_method' => 'storeSettingField', + ), + ), + ), + ), + ); + ?> \ No newline at end of file diff --git a/actions/admin/settings/190.ticket.php b/actions/admin/settings/190.ticket.php index 027d9dae..581d4520 100644 --- a/actions/admin/settings/190.ticket.php +++ b/actions/admin/settings/190.ticket.php @@ -1,131 +1,131 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Settings - * @version $Id$ - */ - -return array( - 'groups' => array( - 'ticket' => array( - 'title' => $lng['admin']['ticketsettings'], - 'fields' => array( - 'ticket_enabled' => array( - 'label' => $lng['serversettings']['ticket']['enable'], - 'settinggroup' => 'ticket', - 'varname' => 'enabled', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'ticket_noreply_email' => array( - 'label' => $lng['serversettings']['ticket']['noreply_email'], - 'settinggroup' => 'ticket', - 'varname' => 'noreply_email', - 'type' => 'string', - 'string_type' => 'mail', - 'default' => '', - 'save_method' => 'storeSettingField', - ), - 'ticket_noreply_name' => array( - 'label' => $lng['serversettings']['ticket']['noreply_name'], - 'settinggroup' => 'ticket', - 'varname' => 'noreply_name', - 'type' => 'string', - 'default' => '', - 'save_method' => 'storeSettingField', - ), - 'ticket_reset_cycle' => array( - 'label' => $lng['serversettings']['ticket']['reset_cycle'], - 'settinggroup' => 'ticket', - 'varname' => 'reset_cycle', - 'type' => 'option', - 'default' => 1, - 'option_mode' => 'one', - 'option_options' => array(0 => html_entity_decode($lng['admin']['tickets']['daily']), 1 => html_entity_decode($lng['admin']['tickets']['weekly']), 2 => html_entity_decode($lng['admin']['tickets']['monthly']), 3 => html_entity_decode($lng['admin']['tickets']['yearly'])), - 'save_method' => 'storeSettingField', - ), - 'ticket_concurrently_open' => array( - 'label' => $lng['serversettings']['ticket']['concurrentlyopen'], - 'settinggroup' => 'ticket', - 'varname' => 'concurrently_open', - 'type' => 'int', - 'default' => 5, - 'save_method' => 'storeSettingField', - ), - 'ticket_archiving_days' => array( - 'label' => $lng['serversettings']['ticket']['archiving_days'], - 'settinggroup' => 'ticket', - 'varname' => 'archiving_days', - 'type' => 'int', - 'int_min' => 1, - 'int_max' => 99, - 'default' => 5, - 'save_method' => 'storeSettingField', - ), - 'ticket_worktime_all' => array( - 'label' => $lng['serversettings']['ticket']['worktime_all'], - 'settinggroup' => 'ticket', - 'varname' => 'worktime_all', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'ticket_worktime_begin' => array( - 'label' => $lng['serversettings']['ticket']['worktime_begin'], - 'settinggroup' => 'ticket', - 'varname' => 'worktime_begin', - 'type' => 'string', - 'string_regexp' => '/^[012][0-9]:[0-6][0-9]$/', - 'default' => '', - 'save_method' => 'storeSettingField', - ), - 'ticket_worktime_end' => array( - 'label' => $lng['serversettings']['ticket']['worktime_end'], - 'settinggroup' => 'ticket', - 'varname' => 'worktime_end', - 'type' => 'string', - 'string_regexp' => '/^[012][0-9]:[0-6][0-9]$/', - 'default' => '', - 'save_method' => 'storeSettingField', - ), - 'ticket_worktime_sat' => array( - 'label' => $lng['serversettings']['ticket']['worktime_sat'], - 'settinggroup' => 'ticket', - 'varname' => 'worktime_sat', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'ticket_worktime_sun' => array( - 'label' => $lng['serversettings']['ticket']['worktime_sun'], - 'settinggroup' => 'ticket', - 'varname' => 'worktime_sun', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'system_last_archive_run' => array( - 'settinggroup' => 'system', - 'varname' => 'last_archive_run', - 'type' => 'hidden', - 'default' => '', - ), - ), - ), - ) - ); - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Settings + * @version $Id$ + */ + +return array( + 'groups' => array( + 'ticket' => array( + 'title' => $lng['admin']['ticketsettings'], + 'fields' => array( + 'ticket_enabled' => array( + 'label' => $lng['serversettings']['ticket']['enable'], + 'settinggroup' => 'ticket', + 'varname' => 'enabled', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'ticket_noreply_email' => array( + 'label' => $lng['serversettings']['ticket']['noreply_email'], + 'settinggroup' => 'ticket', + 'varname' => 'noreply_email', + 'type' => 'string', + 'string_type' => 'mail', + 'default' => '', + 'save_method' => 'storeSettingField', + ), + 'ticket_noreply_name' => array( + 'label' => $lng['serversettings']['ticket']['noreply_name'], + 'settinggroup' => 'ticket', + 'varname' => 'noreply_name', + 'type' => 'string', + 'default' => '', + 'save_method' => 'storeSettingField', + ), + 'ticket_reset_cycle' => array( + 'label' => $lng['serversettings']['ticket']['reset_cycle'], + 'settinggroup' => 'ticket', + 'varname' => 'reset_cycle', + 'type' => 'option', + 'default' => 1, + 'option_mode' => 'one', + 'option_options' => array(0 => html_entity_decode($lng['admin']['tickets']['daily']), 1 => html_entity_decode($lng['admin']['tickets']['weekly']), 2 => html_entity_decode($lng['admin']['tickets']['monthly']), 3 => html_entity_decode($lng['admin']['tickets']['yearly'])), + 'save_method' => 'storeSettingField', + ), + 'ticket_concurrently_open' => array( + 'label' => $lng['serversettings']['ticket']['concurrentlyopen'], + 'settinggroup' => 'ticket', + 'varname' => 'concurrently_open', + 'type' => 'int', + 'default' => 5, + 'save_method' => 'storeSettingField', + ), + 'ticket_archiving_days' => array( + 'label' => $lng['serversettings']['ticket']['archiving_days'], + 'settinggroup' => 'ticket', + 'varname' => 'archiving_days', + 'type' => 'int', + 'int_min' => 1, + 'int_max' => 99, + 'default' => 5, + 'save_method' => 'storeSettingField', + ), + 'ticket_worktime_all' => array( + 'label' => $lng['serversettings']['ticket']['worktime_all'], + 'settinggroup' => 'ticket', + 'varname' => 'worktime_all', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'ticket_worktime_begin' => array( + 'label' => $lng['serversettings']['ticket']['worktime_begin'], + 'settinggroup' => 'ticket', + 'varname' => 'worktime_begin', + 'type' => 'string', + 'string_regexp' => '/^[012][0-9]:[0-6][0-9]$/', + 'default' => '', + 'save_method' => 'storeSettingField', + ), + 'ticket_worktime_end' => array( + 'label' => $lng['serversettings']['ticket']['worktime_end'], + 'settinggroup' => 'ticket', + 'varname' => 'worktime_end', + 'type' => 'string', + 'string_regexp' => '/^[012][0-9]:[0-6][0-9]$/', + 'default' => '', + 'save_method' => 'storeSettingField', + ), + 'ticket_worktime_sat' => array( + 'label' => $lng['serversettings']['ticket']['worktime_sat'], + 'settinggroup' => 'ticket', + 'varname' => 'worktime_sat', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'ticket_worktime_sun' => array( + 'label' => $lng['serversettings']['ticket']['worktime_sun'], + 'settinggroup' => 'ticket', + 'varname' => 'worktime_sun', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'system_last_archive_run' => array( + 'settinggroup' => 'system', + 'varname' => 'last_archive_run', + 'type' => 'hidden', + 'default' => '', + ), + ), + ), + ) + ); + ?> \ No newline at end of file diff --git a/actions/admin/settings/200.aps.php b/actions/admin/settings/200.aps.php index 937dd550..5b71ca52 100644 --- a/actions/admin/settings/200.aps.php +++ b/actions/admin/settings/200.aps.php @@ -1,100 +1,100 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Settings - * @version $Id$ - */ - -return array( - 'groups' => array( - 'aps' => array( - 'title' => $lng['admin']['aps'], - 'fields' => array( - 'aps_enable' => array( - 'label' => $lng['aps']['activate_aps'], - 'settinggroup' => 'aps', - 'varname' => 'aps_active', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'aps_items_per_page' => array( - 'label' => $lng['aps']['packages_per_page'], - 'settinggroup' => 'aps', - 'varname' => 'items_per_page', - 'type' => 'int', - 'default' => 20, - 'save_method' => 'storeSettingField', - ), - 'aps_upload_fields' => array( - 'label' => $lng['aps']['upload_fields'], - 'settinggroup' => 'aps', - 'varname' => 'upload_fields', - 'type' => 'int', - 'default' => 5, - 'save_method' => 'storeSettingField', - ), - 'aps_exceptions' => array( - 'label' => $lng['aps']['exceptions'], - 'type' => 'label', - ), - 'aps_php-extension' => array( - 'label' => $lng['aps']['settings_php_extensions'], - 'settinggroup' => 'aps', - 'varname' => 'php-extension', - 'type' => 'option', - 'default' => '', - 'option_mode' => 'multiple', - 'option_options' => array('gd' => 'GD Library', 'pcre' => 'PCRE', 'ioncube' => 'ionCube', 'ioncube loader' => 'ionCube Loader', 'curl' => 'curl', 'mcrypt' => 'mcrypt', 'imap' => 'imap'), - 'save_method' => 'storeSettingApsPhpExtensions', - ), - 'aps_php-function' => array( - 'settinggroup' => 'aps', - 'varname' => 'php-function', - 'type' => 'hidden', - 'default' => '', - ), - 'aps_php-configuration' => array( - 'label' => $lng['aps']['settings_php_configuration'], - 'settinggroup' => 'aps', - 'varname' => 'php-configuration', - 'type' => 'option', - 'default' => '', - 'option_mode' => 'multiple', - 'option_options' => array('short_open_tag' => 'short_open_tag', 'file_uploads' => 'file_uploads', 'magic_quotes_gpc' => 'magic_quotes_gpc', 'register_globals' => 'register_globals', 'allow_url_fopen' => 'allow_url_fopen', 'safe_mode' => 'safe_mode', 'post_max_size' => 'post_max_size', 'memory_limit' => 'memory_limit', 'max_execution_time' => 'max_execution_time'), - 'save_method' => 'storeSettingField', - ), - 'aps_webserver-module' => array( - 'label' => $lng['aps']['settings_webserver_modules'], - 'settinggroup' => 'aps', - 'varname' => 'webserver-module', - 'type' => 'option', - 'default' => '', - 'option_mode' => 'multiple', - 'option_options' => array('mod_perl' => 'mod_perl', 'mod_rewrite' => 'mod_rewrite', 'mod_access' => 'mod_access', 'fcgid-any' => 'FastCGI/mod_fcgid', 'htaccess' => '.htaccess'), - 'save_method' => 'storeSettingApsWebserverModules', - ), - 'aps_webserver-htaccess' => array( - 'settinggroup' => 'aps', - 'varname' => 'webserver-htaccess', - 'type' => 'hidden', - 'default' => '', - ), - ), - ), - ), - ); - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Settings + * @version $Id$ + */ + +return array( + 'groups' => array( + 'aps' => array( + 'title' => $lng['admin']['aps'], + 'fields' => array( + 'aps_enable' => array( + 'label' => $lng['aps']['activate_aps'], + 'settinggroup' => 'aps', + 'varname' => 'aps_active', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'aps_items_per_page' => array( + 'label' => $lng['aps']['packages_per_page'], + 'settinggroup' => 'aps', + 'varname' => 'items_per_page', + 'type' => 'int', + 'default' => 20, + 'save_method' => 'storeSettingField', + ), + 'aps_upload_fields' => array( + 'label' => $lng['aps']['upload_fields'], + 'settinggroup' => 'aps', + 'varname' => 'upload_fields', + 'type' => 'int', + 'default' => 5, + 'save_method' => 'storeSettingField', + ), + 'aps_exceptions' => array( + 'label' => $lng['aps']['exceptions'], + 'type' => 'label', + ), + 'aps_php-extension' => array( + 'label' => $lng['aps']['settings_php_extensions'], + 'settinggroup' => 'aps', + 'varname' => 'php-extension', + 'type' => 'option', + 'default' => '', + 'option_mode' => 'multiple', + 'option_options' => array('gd' => 'GD Library', 'pcre' => 'PCRE', 'ioncube' => 'ionCube', 'ioncube loader' => 'ionCube Loader', 'curl' => 'curl', 'mcrypt' => 'mcrypt', 'imap' => 'imap'), + 'save_method' => 'storeSettingApsPhpExtensions', + ), + 'aps_php-function' => array( + 'settinggroup' => 'aps', + 'varname' => 'php-function', + 'type' => 'hidden', + 'default' => '', + ), + 'aps_php-configuration' => array( + 'label' => $lng['aps']['settings_php_configuration'], + 'settinggroup' => 'aps', + 'varname' => 'php-configuration', + 'type' => 'option', + 'default' => '', + 'option_mode' => 'multiple', + 'option_options' => array('short_open_tag' => 'short_open_tag', 'file_uploads' => 'file_uploads', 'magic_quotes_gpc' => 'magic_quotes_gpc', 'register_globals' => 'register_globals', 'allow_url_fopen' => 'allow_url_fopen', 'safe_mode' => 'safe_mode', 'post_max_size' => 'post_max_size', 'memory_limit' => 'memory_limit', 'max_execution_time' => 'max_execution_time'), + 'save_method' => 'storeSettingField', + ), + 'aps_webserver-module' => array( + 'label' => $lng['aps']['settings_webserver_modules'], + 'settinggroup' => 'aps', + 'varname' => 'webserver-module', + 'type' => 'option', + 'default' => '', + 'option_mode' => 'multiple', + 'option_options' => array('mod_perl' => 'mod_perl', 'mod_rewrite' => 'mod_rewrite', 'mod_access' => 'mod_access', 'fcgid-any' => 'FastCGI/mod_fcgid', 'htaccess' => '.htaccess'), + 'save_method' => 'storeSettingApsWebserverModules', + ), + 'aps_webserver-htaccess' => array( + 'settinggroup' => 'aps', + 'varname' => 'webserver-htaccess', + 'type' => 'hidden', + 'default' => '', + ), + ), + ), + ), + ); + ?> \ No newline at end of file diff --git a/actions/admin/settings/210.security.php b/actions/admin/settings/210.security.php index a3a4e9da..5683ffbc 100644 --- a/actions/admin/settings/210.security.php +++ b/actions/admin/settings/210.security.php @@ -1,108 +1,108 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Settings - * @version $Id$ - */ - -return array( - 'groups' => array( - 'security' => array( - 'title' => $lng['admin']['security_settings'], - 'fields' => array( - 'panel_unix_names' => array( - 'label' => $lng['serversettings']['unix_names'], - 'settinggroup' => 'panel', - 'varname' => 'unix_names', - 'type' => 'bool', - 'default' => true, - 'save_method' => 'storeSettingField', - ), - 'system_mailpwcleartext' => array( - 'label' => $lng['serversettings']['mailpwcleartext'], - 'settinggroup' => 'system', - 'varname' => 'mailpwcleartext', - 'type' => 'bool', - 'default' => true, - 'save_method' => 'storeSettingField', - ), - 'system_mod_fcgid_enabled' => array( - 'label' => $lng['serversettings']['mod_fcgid'], - 'settinggroup' => 'system', - 'varname' => 'mod_fcgid', - 'type' => 'bool', - 'default' => false, - 'save_method' => 'storeSettingField', - ), - 'system_mod_fcgid_configdir' => array( - 'label' => $lng['serversettings']['mod_fcgid']['configdir'], - 'settinggroup' => 'system', - 'varname' => 'mod_fcgid_configdir', - 'type' => 'string', - 'string_type' => 'dir', - 'default' => '/var/www/php-fcgi-scripts/', - 'save_method' => 'storeSettingField', - ), - 'system_mod_fcgid_tmpdir' => array( - 'label' => $lng['serversettings']['mod_fcgid']['tmpdir'], - 'settinggroup' => 'system', - 'varname' => 'mod_fcgid_tmpdir', - 'type' => 'string', - 'string_type' => 'dir', - 'default' => '/var/customers/tmp/', - 'save_method' => 'storeSettingField', - ), - 'system_mod_fcgid_peardir' => array( - 'label' => $lng['serversettings']['mod_fcgid']['peardir'], - 'settinggroup' => 'system', - 'varname' => 'mod_fcgid_peardir', - 'type' => 'string', - 'string_type' => 'dir', - 'string_delimiter' => ':', - 'string_emptyallowed' => true, - 'default' => '/usr/share/php/:/usr/share/php5/', - 'save_method' => 'storeSettingField', - ), - 'system_mod_fcgid_wrapper' => array( - 'label' => $lng['serversettings']['mod_fcgid']['wrapper'], - 'settinggroup' => 'system', - 'varname' => 'mod_fcgid_wrapper', - 'type' => 'option', - 'option_options' => array(0 => 'ScriptAlias', 1=> 'FCGIWrapper'), - 'default' => 0, - 'save_method' => 'storeSettingField', - ), - 'system_mod_fcgid_starter' => array( - 'label' => $lng['serversettings']['mod_fcgid']['starter'], - 'settinggroup' => 'system', - 'varname' => 'mod_fcgid_starter', - 'type' => 'int', - 'default' => 0, - 'save_method' => 'storeSettingField', - ), - 'system_mod_fcgid_maxrequests' => array( - 'label' => $lng['serversettings']['mod_fcgid']['maxrequests'], - 'settinggroup' => 'system', - 'varname' => 'mod_fcgid_maxrequests', - 'type' => 'int', - 'default' => 250, - 'save_method' => 'storeSettingField', - ), - ), - ), - ), - ); - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Settings + * @version $Id$ + */ + +return array( + 'groups' => array( + 'security' => array( + 'title' => $lng['admin']['security_settings'], + 'fields' => array( + 'panel_unix_names' => array( + 'label' => $lng['serversettings']['unix_names'], + 'settinggroup' => 'panel', + 'varname' => 'unix_names', + 'type' => 'bool', + 'default' => true, + 'save_method' => 'storeSettingField', + ), + 'system_mailpwcleartext' => array( + 'label' => $lng['serversettings']['mailpwcleartext'], + 'settinggroup' => 'system', + 'varname' => 'mailpwcleartext', + 'type' => 'bool', + 'default' => true, + 'save_method' => 'storeSettingField', + ), + 'system_mod_fcgid_enabled' => array( + 'label' => $lng['serversettings']['mod_fcgid'], + 'settinggroup' => 'system', + 'varname' => 'mod_fcgid', + 'type' => 'bool', + 'default' => false, + 'save_method' => 'storeSettingField', + ), + 'system_mod_fcgid_configdir' => array( + 'label' => $lng['serversettings']['mod_fcgid']['configdir'], + 'settinggroup' => 'system', + 'varname' => 'mod_fcgid_configdir', + 'type' => 'string', + 'string_type' => 'dir', + 'default' => '/var/www/php-fcgi-scripts/', + 'save_method' => 'storeSettingField', + ), + 'system_mod_fcgid_tmpdir' => array( + 'label' => $lng['serversettings']['mod_fcgid']['tmpdir'], + 'settinggroup' => 'system', + 'varname' => 'mod_fcgid_tmpdir', + 'type' => 'string', + 'string_type' => 'dir', + 'default' => '/var/customers/tmp/', + 'save_method' => 'storeSettingField', + ), + 'system_mod_fcgid_peardir' => array( + 'label' => $lng['serversettings']['mod_fcgid']['peardir'], + 'settinggroup' => 'system', + 'varname' => 'mod_fcgid_peardir', + 'type' => 'string', + 'string_type' => 'dir', + 'string_delimiter' => ':', + 'string_emptyallowed' => true, + 'default' => '/usr/share/php/:/usr/share/php5/', + 'save_method' => 'storeSettingField', + ), + 'system_mod_fcgid_wrapper' => array( + 'label' => $lng['serversettings']['mod_fcgid']['wrapper'], + 'settinggroup' => 'system', + 'varname' => 'mod_fcgid_wrapper', + 'type' => 'option', + 'option_options' => array(0 => 'ScriptAlias', 1=> 'FCGIWrapper'), + 'default' => 0, + 'save_method' => 'storeSettingField', + ), + 'system_mod_fcgid_starter' => array( + 'label' => $lng['serversettings']['mod_fcgid']['starter'], + 'settinggroup' => 'system', + 'varname' => 'mod_fcgid_starter', + 'type' => 'int', + 'default' => 0, + 'save_method' => 'storeSettingField', + ), + 'system_mod_fcgid_maxrequests' => array( + 'label' => $lng['serversettings']['mod_fcgid']['maxrequests'], + 'settinggroup' => 'system', + 'varname' => 'mod_fcgid_maxrequests', + 'type' => 'int', + 'default' => 250, + 'save_method' => 'storeSettingField', + ), + ), + ), + ), + ); + ?> \ No newline at end of file diff --git a/admin_admins.php b/admin_admins.php index 937f1fd9..217ea16a 100644 --- a/admin_admins.php +++ b/admin_admins.php @@ -1,740 +1,740 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Panel - * @version $Id$ - */ - -define('AREA', 'admin'); - -/** - * Include our init.php, which manages Sessions, Language etc. - */ - -require ("./lib/init.php"); - -if(isset($_POST['id'])) -{ - $id = intval($_POST['id']); -} -elseif(isset($_GET['id'])) -{ - $id = intval($_GET['id']); -} - -if($page == 'admins' - && $userinfo['change_serversettings'] == '1') -{ - if($action == '') - { - $log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_admins"); - $fields = array( - 'loginname' => $lng['login']['username'], - 'name' => $lng['customer']['name'], - 'diskspace' => $lng['customer']['diskspace'], - 'diskspace_used' => $lng['customer']['diskspace'] . ' (' . $lng['panel']['used'] . ')', - 'traffic' => $lng['customer']['traffic'], - 'traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')', - 'mysqls' => $lng['customer']['mysqls'], - 'mysqls_used' => $lng['customer']['mysqls'] . ' (' . $lng['panel']['used'] . ')', - 'ftps' => $lng['customer']['ftps'], - 'ftps_used' => $lng['customer']['ftps'] . ' (' . $lng['panel']['used'] . ')', - 'tickets' => $lng['customer']['tickets'], - 'tickets_used' => $lng['customer']['tickets'] . ' (' . $lng['panel']['used'] . ')', - 'subdomains' => $lng['customer']['subdomains'], - 'subdomains_used' => $lng['customer']['subdomains'] . ' (' . $lng['panel']['used'] . ')', - 'emails' => $lng['customer']['emails'], - 'emails_used' => $lng['customer']['emails'] . ' (' . $lng['panel']['used'] . ')', - 'email_accounts' => $lng['customer']['accounts'], - 'email_accounts_used' => $lng['customer']['accounts'] . ' (' . $lng['panel']['used'] . ')', - 'email_forwarders' => $lng['customer']['forwarders'], - 'email_forwarders_used' => $lng['customer']['forwarders'] . ' (' . $lng['panel']['used'] . ')', - 'email_quota' => $lng['customer']['email_quota'], - 'email_quota_used' => $lng['customer']['email_quota'] . ' (' . $lng['panel']['used'] . ')', - 'deactivated' => $lng['admin']['deactivated'] - ); - $paging = new paging($userinfo, $db, TABLE_PANEL_ADMINS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']); - $admins = ''; - $result = $db->query("SELECT * FROM `" . TABLE_PANEL_ADMINS . "` " . $paging->getSqlWhere(false) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit()); - $paging->setEntries($db->num_rows($result)); - $sortcode = $paging->getHtmlSortCode($lng, true); - $arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s); - $searchcode = $paging->getHtmlSearchCode($lng); - $pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s); - $i = 0; - $count = 0; - - while($row = $db->fetch_array($result)) - { - if($paging->checkDisplay($i)) - { - $row['traffic_used'] = round($row['traffic_used'] / (1024 * 1024), $settings['panel']['decimal_places']); - $row['traffic'] = round($row['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']); - $row['diskspace_used'] = round($row['diskspace_used'] / 1024, $settings['panel']['decimal_places']); - $row['diskspace'] = round($row['diskspace'] / 1024, $settings['panel']['decimal_places']); - $row = str_replace_array('-1', 'UL', $row, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps subdomains tickets'); - $row = htmlentities_array($row); - eval("\$admins.=\"" . getTemplate("admins/admins_admin") . "\";"); - $count++; - } - - $i++; - } - - eval("echo \"" . getTemplate("admins/admins") . "\";"); - } - elseif($action == 'su') - { - $result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid` = '" . (int)$id . "'"); - $destination_admin = $result['loginname']; - - if($destination_admin != '' - && $result['adminid'] != $userinfo['userid']) - { - $result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid`='" . (int)$userinfo['userid'] . "'"); - $s = md5(uniqid(microtime(), 1)); - $db->query("INSERT INTO `" . TABLE_PANEL_SESSIONS . "` (`hash`, `userid`, `ipaddress`, `useragent`, `lastactivity`, `language`, `adminsession`) VALUES ('" . $db->escape($s) . "', '" . (int)$id . "', '" . $db->escape($result['ipaddress']) . "', '" . $db->escape($result['useragent']) . "', '" . time() . "', '" . $db->escape($result['language']) . "', '1')"); - $log->logAction(ADM_ACTION, LOG_INFO, "switched adminuser and is now '" . $destination_admin . "'"); - redirectTo('admin_index.php', Array('s' => $s)); - } - else - { - redirectTo('index.php', Array('action' => 'login')); - } - } - elseif($action == 'delete' - && $id != 0) - { - $result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$id . "'"); - - if($result['loginname'] != '') - { - if($result['adminid'] == $userinfo['userid']) - { - standard_error('youcantdeleteyourself'); - exit; - } - - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - $db->query("DELETE FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$id . "'"); - $db->query("DELETE FROM `" . TABLE_PANEL_TRAFFIC_ADMINS . "` WHERE `adminid`='" . (int)$id . "'"); - $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `adminid` = '" . (int)$userinfo['userid'] . "' WHERE `adminid` = '" . (int)$id . "'"); - $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `adminid` = '" . (int)$userinfo['userid'] . "' WHERE `adminid` = '" . (int)$id . "'"); - $log->logAction(ADM_ACTION, LOG_INFO, "deleted admin '" . $result['loginname'] . "'"); - updateCounters(); - redirectTo($filename, Array('page' => $page, 's' => $s)); - } - else - { - ask_yesno('admin_admin_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['loginname']); - } - } - } - elseif($action == 'add') - { - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - $name = validate($_POST['name'], 'name'); - $email = $idna_convert->encode(validate($_POST['email'], 'email')); - - $loginname = validate($_POST['loginname'], 'loginname'); - $password = validate($_POST['admin_password'], 'password'); - $def_language = validate($_POST['def_language'], 'default language'); - $customers = intval_ressource($_POST['customers']); - - if(isset($_POST['customers_ul'])) - { - $customers = - 1; - } - - $domains = intval_ressource($_POST['domains']); - - if(isset($_POST['domains_ul'])) - { - $domains = - 1; - } - - $subdomains = intval_ressource($_POST['subdomains']); - - if(isset($_POST['subdomains_ul'])) - { - $subdomains = - 1; - } - - $emails = intval_ressource($_POST['emails']); - - if(isset($_POST['emails_ul'])) - { - $emails = - 1; - } - - $email_accounts = intval_ressource($_POST['email_accounts']); - - if(isset($_POST['email_accounts_ul'])) - { - $email_accounts = - 1; - } - - $email_forwarders = intval_ressource($_POST['email_forwarders']); - - if(isset($_POST['email_forwarders_ul'])) - { - $email_forwarders = - 1; - } - - if($settings['system']['mail_quota_enabled'] == '1') - { - $email_quota = validate($_POST['email_quota'], 'email_quota', '/^\d+$/', 'vmailquotawrong', array('0', '')); - - if(isset($_POST['email_quota_ul'])) - { - $email_quota = - 1; - } - } - else - { - $email_quota = - 1; - } - - $ftps = intval_ressource($_POST['ftps']); - - if(isset($_POST['ftps_ul'])) - { - $ftps = - 1; - } - - $tickets = intval_ressource($_POST['tickets']); - - if(isset($_POST['tickets_ul']) - && $settings['ticket']['enabled'] == '1') - { - $tickets = - 1; - } - - $mysqls = intval_ressource($_POST['mysqls']); - - if(isset($_POST['mysqls_ul'])) - { - $mysqls = - 1; - } - - if($settings['aps']['aps_active'] == '1') - { - $number_of_aps_packages = intval_ressource($_POST['number_of_aps_packages']); - - if(isset($_POST['number_of_aps_packages_ul'])) - { - $number_of_aps_packages = - 1; - } - - $can_manage_aps_packages = intval($_POST['can_manage_aps_packages']); - } - else - { - $number_of_aps_packages = 0; - $can_manage_aps_packages = 0; - } - - $customers_see_all = intval($_POST['customers_see_all']); - $domains_see_all = intval($_POST['domains_see_all']); - $caneditphpsettings = intval($_POST['caneditphpsettings']); - $change_serversettings = intval($_POST['change_serversettings']); - - $diskspace = intval_ressource($_POST['diskspace']); - - if(isset($_POST['diskspace_ul'])) - { - $diskspace = - 1; - } - - $traffic = doubleval_ressource($_POST['traffic']); - - if(isset($_POST['traffic_ul'])) - { - $traffic = - 1; - } - - $diskspace = $diskspace * 1024; - $traffic = $traffic * 1024 * 1024; - $ipaddress = intval_ressource($_POST['ipaddress']); - - // Check if the account already exists - - $loginname_check = $db->query_first("SELECT `loginname` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `loginname` = '" . $db->escape($loginname) . "'"); - $loginname_check_admin = $db->query_first("SELECT `loginname` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `loginname` = '" . $db->escape($loginname) . "'"); - - if($loginname == '') - { - standard_error(array('stringisempty', 'myloginname')); - } - elseif(strtolower($loginname_check['loginname']) == strtolower($loginname) - || strtolower($loginname_check_admin['loginname']) == strtolower($loginname)) - { - standard_error('loginnameexists', $loginname); - } - - // Accounts which match systemaccounts are not allowed, filtering them - - elseif (preg_match('/^' . preg_quote($settings['customer']['accountprefix'], '/') . '([0-9]+)/', $loginname)) - { - standard_error('loginnameissystemaccount', $settings['customer']['accountprefix']); - } - elseif(!validateUsername($loginname)) - { - standard_error('loginnameiswrong', $loginname); - } - elseif($name == '') - { - standard_error(array('stringisempty', 'myname')); - } - elseif($email == '') - { - standard_error(array('stringisempty', 'emailadd')); - } - elseif($password == '') - { - standard_error(array('stringisempty', 'mypassword')); - } - elseif(!validateEmail($email)) - { - standard_error('emailiswrong', $email); - } - else - { - if($customers_see_all != '1') - { - $customers_see_all = '0'; - } - - if($domains_see_all != '1') - { - $domains_see_all = '0'; - } - - if($caneditphpsettings != '1') - { - $caneditphpsettings = '0'; - } - - if($change_serversettings != '1') - { - $change_serversettings = '0'; - } - - $result = $db->query("INSERT INTO `" . TABLE_PANEL_ADMINS . "` (`loginname`, `password`, `name`, `email`, `def_language`, `change_serversettings`, `customers`, `customers_see_all`, `domains`, `domains_see_all`, `caneditphpsettings`, `diskspace`, `traffic`, `subdomains`, `emails`, `email_accounts`, `email_forwarders`, `email_quota`, `ftps`, `tickets`, `mysqls`, `ip`, `can_manage_aps_packages`, `aps_packages`) - VALUES ('" . $db->escape($loginname) . "', '" . md5($password) . "', '" . $db->escape($name) . "', '" . $db->escape($email) . "','" . $db->escape($def_language) . "', '" . $db->escape($change_serversettings) . "', '" . $db->escape($customers) . "', '" . $db->escape($customers_see_all) . "', '" . $db->escape($domains) . "', '" . $db->escape($domains_see_all) . "', '" . (int)$caneditphpsettings . "', '" . $db->escape($diskspace) . "', '" . $db->escape($traffic) . "', '" . $db->escape($subdomains) . "', '" . $db->escape($emails) . "', '" . $db->escape($email_accounts) . "', '" . $db->escape($email_forwarders) . "', '" . $db->escape($email_quota) . "', '" . $db->escape($ftps) . "', '" . $db->escape($tickets) . "', '" . $db->escape($mysqls) . "', '" . (int)$ipaddress . "', " . (int)$can_manage_aps_packages . ", " . (int)$number_of_aps_packages . ")"); - $adminid = $db->insert_id(); - $log->logAction(ADM_ACTION, LOG_INFO, "added admin '" . $loginname . "'"); - redirectTo($filename, Array('page' => $page, 's' => $s)); - } - } - else - { - $language_options = ''; - - while(list($language_file, $language_name) = each($languages)) - { - $language_options.= makeoption($language_name, $language_file, $userinfo['language'], true); - } - - $ipaddress = makeoption($lng['admin']['allips'], "-1"); - $ips = array(); - $ipsandports = $db->query('SELECT `id`, `ip` FROM `' . TABLE_PANEL_IPSANDPORTS . '` ORDER BY `ip`, `port` ASC'); - - while($row = $db->fetch_array($ipsandports)) - { - if(filter_var($row['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) - { - $row['ip'] = '[' . $row['ip'] . ']'; - } - - if(!in_array($row['ip'], $ips)) - { - $ipaddress.= makeoption($row['ip'], $row['id']); - $ips[] = $row['ip']; - } - } - - $customers_ul = makecheckbox('customers_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); - $diskspace_ul = makecheckbox('diskspace_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); - $traffic_ul = makecheckbox('traffic_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); - $domains_ul = makecheckbox('domains_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); - $subdomains_ul = makecheckbox('subdomains_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); - $emails_ul = makecheckbox('emails_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); - $email_accounts_ul = makecheckbox('email_accounts_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); - $email_forwarders_ul = makecheckbox('email_forwarders_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); - $email_quota_ul = makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); - $ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); - $tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); - $mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); - $change_serversettings = makeyesno('change_serversettings', '1', '0', '0'); - $customers_see_all = makeyesno('customers_see_all', '1', '0', '0'); - $domains_see_all = makeyesno('domains_see_all', '1', '0', '0'); - $caneditphpsettings = makeyesno('caneditphpsettings', '1', '0', '0'); - $can_manage_aps_packages = makeyesno('can_manage_aps_packages', '1', '0', '0'); - $number_of_aps_packages_ul = makecheckbox('number_of_aps_packages_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); - - eval("echo \"" . getTemplate("admins/admins_add") . "\";"); - } - } - elseif($action == 'edit' - && $id != 0) - { - $result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$id . "'"); - - if($result['loginname'] != '') - { - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - $name = validate($_POST['name'], 'name'); - $email = $idna_convert->encode(validate($_POST['email'], 'email')); - - if($result['adminid'] == $userinfo['userid']) - { - $password = ''; - $def_language = $result['def_language']; - $deactivated = $result['deactivated']; - $customers = $result['customers']; - $domains = $result['domains']; - $subdomains = $result['subdomains']; - $emails = $result['emails']; - $email_accounts = $result['email_accounts']; - $email_forwarders = $result['email_forwarders']; - $email_quota = $result['email_quota']; - $ftps = $result['ftps']; - $tickets = $result['tickets']; - $mysqls = $result['mysqls']; - $customers_see_all = $result['customers_see_all']; - $domains_see_all = $result['domains_see_all']; - $caneditphpsettings = $result['caneditphpsettings']; - $change_serversettings = $result['change_serversettings']; - $diskspace = $result['diskspace']; - $traffic = $result['traffic']; - $ipaddress = $result['ip']; - $can_manage_aps_packages = $result['can_manage_aps_packages']; - $number_of_aps_packages = $result['aps_packages']; - } - else - { - $password = validate($_POST['admin_password'], 'new password'); - $def_language = validate($_POST['def_language'], 'default language'); - $deactivated = intval($_POST['deactivated']); - $customers = intval_ressource($_POST['customers']); - - if(isset($_POST['customers_ul'])) - { - $customers = - 1; - } - - $domains = intval_ressource($_POST['domains']); - - if(isset($_POST['domains_ul'])) - { - $domains = - 1; - } - - $subdomains = intval_ressource($_POST['subdomains']); - - if(isset($_POST['subdomains_ul'])) - { - $subdomains = - 1; - } - - $emails = intval_ressource($_POST['emails']); - - if(isset($_POST['emails_ul'])) - { - $emails = - 1; - } - - $email_accounts = intval_ressource($_POST['email_accounts']); - - if(isset($_POST['email_accounts_ul'])) - { - $email_accounts = - 1; - } - - $email_forwarders = intval_ressource($_POST['email_forwarders']); - - if(isset($_POST['email_forwarders_ul'])) - { - $email_forwarders = - 1; - } - - if($settings['system']['mail_quota_enabled'] == '1') - { - $email_quota = validate($_POST['email_quota'], 'email_quota', '/^\d+$/', 'vmailquotawrong', array('0', '')); - - if(isset($_POST['email_quota_ul'])) - { - $email_quota = - 1; - } - } - else - { - $email_quota = - 1; - } - - $ftps = intval_ressource($_POST['ftps']); - - if(isset($_POST['ftps_ul'])) - { - $ftps = - 1; - } - - $tickets = intval_ressource($_POST['tickets']); - - if(isset($_POST['tickets_ul'])) - { - $tickets = - 1; - } - - $mysqls = intval_ressource($_POST['mysqls']); - - if(isset($_POST['mysqls_ul'])) - { - $mysqls = - 1; - } - - $number_of_aps_packages = intval_ressource($_POST['number_of_aps_packages']); - - if(isset($_POST['number_of_aps_packages_ul'])) - { - $number_of_aps_packages = - 1; - } - - $customers_see_all = intval($_POST['customers_see_all']); - $domains_see_all = intval($_POST['domains_see_all']); - $caneditphpsettings = intval($_POST['caneditphpsettings']); - $change_serversettings = intval($_POST['change_serversettings']); - $can_manage_aps_packages = intval($_POST['can_manage_aps_packages']); - - $diskspace = intval($_POST['diskspace']); - - if(isset($_POST['diskspace_ul'])) - { - $diskspace = - 1; - } - - $traffic = doubleval_ressource($_POST['traffic']); - - if(isset($_POST['traffic_ul'])) - { - $traffic = - 1; - } - - $diskspace = $diskspace * 1024; - $traffic = $traffic * 1024 * 1024; - $ipaddress = intval_ressource($_POST['ipaddress']); - } - - if($name == '') - { - standard_error(array('stringisempty', 'myname')); - } - elseif($email == '') - { - standard_error(array('stringisempty', 'emailadd')); - } - elseif(!validateEmail($email)) - { - standard_error('emailiswrong', $email); - } - else - { - if($password != '') - { - $password = md5($password); - } - else - { - $password = $result['password']; - } - - if($deactivated != '1') - { - $deactivated = '0'; - } - - if($customers_see_all != '1') - { - $customers_see_all = '0'; - } - - if($domains_see_all != '1') - { - $domains_see_all = '0'; - } - - if($caneditphpsettings != '1') - { - $caneditphpsettings = '0'; - } - - if($change_serversettings != '1') - { - $change_serversettings = '0'; - } - - $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `name`='" . $db->escape($name) . "', `email`='" . $db->escape($email) . "', `def_language`='" . $db->escape($def_language) . "', `change_serversettings` = '" . $db->escape($change_serversettings) . "', `customers` = '" . $db->escape($customers) . "', `customers_see_all` = '" . $db->escape($customers_see_all) . "', `domains` = '" . $db->escape($domains) . "', `domains_see_all` = '" . $db->escape($domains_see_all) . "', `caneditphpsettings` = '" . (int)$caneditphpsettings . "', `password` = '" . $password . "', `diskspace`='" . $db->escape($diskspace) . "', `traffic`='" . $db->escape($traffic) . "', `subdomains`='" . $db->escape($subdomains) . "', `emails`='" . $db->escape($emails) . "', `email_accounts` = '" . $db->escape($email_accounts) . "', `email_forwarders`='" . $db->escape($email_forwarders) . "', `email_quota`='" . $db->escape($email_quota) . "', `ftps`='" . $db->escape($ftps) . "', `tickets`='" . $db->escape($tickets) . "', `mysqls`='" . $db->escape($mysqls) . "', `ip`='" . (int)$ipaddress . "', `deactivated`='" . $db->escape($deactivated) . "', `can_manage_aps_packages`=" . (int)$can_manage_aps_packages . ", `aps_packages`=" . (int)$number_of_aps_packages . " WHERE `adminid`='" . $db->escape($id) . "'"); - $log->logAction(ADM_ACTION, LOG_INFO, "edited admin '#" . $id . "'"); - $redirect_props = Array( - 'page' => $page, - 's' => $s - ); - - redirectTo($filename, $redirect_props); - } - } - else - { - $result['traffic'] = round($result['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']); - $result['diskspace'] = round($result['diskspace'] / 1024, $settings['panel']['decimal_places']); - $result['email'] = $idna_convert->decode($result['email']); - $customers_ul = makecheckbox('customers_ul', $lng['customer']['unlimited'], '-1', false, $result['customers'], true, true); - - if($result['customers'] == '-1') - { - $result['customers'] = ''; - } - - $diskspace_ul = makecheckbox('diskspace_ul', $lng['customer']['unlimited'], '-1', false, $result['diskspace'], true, true); - - if($result['diskspace'] == '-1') - { - $result['diskspace'] = ''; - } - - $traffic_ul = makecheckbox('traffic_ul', $lng['customer']['unlimited'], '-1', false, $result['traffic'], true, true); - - if($result['traffic'] == '-1') - { - $result['traffic'] = ''; - } - - $domains_ul = makecheckbox('domains_ul', $lng['customer']['unlimited'], '-1', false, $result['domains'], true, true); - - if($result['domains'] == '-1') - { - $result['domains'] = ''; - } - - $subdomains_ul = makecheckbox('subdomains_ul', $lng['customer']['unlimited'], '-1', false, $result['subdomains'], true, true); - - if($result['subdomains'] == '-1') - { - $result['subdomains'] = ''; - } - - $emails_ul = makecheckbox('emails_ul', $lng['customer']['unlimited'], '-1', false, $result['emails'], true, true); - - if($result['emails'] == '-1') - { - $result['emails'] = ''; - } - - $email_accounts_ul = makecheckbox('email_accounts_ul', $lng['customer']['unlimited'], '-1', false, $result['email_accounts'], true, true); - - if($result['email_accounts'] == '-1') - { - $result['email_accounts'] = ''; - } - - $email_forwarders_ul = makecheckbox('email_forwarders_ul', $lng['customer']['unlimited'], '-1', false, $result['email_forwarders'], true, true); - - if($result['email_forwarders'] == '-1') - { - $result['email_forwarders'] = ''; - } - - $email_quota_ul = makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, $result['email_quota'], true, true); - - if($result['email_quota'] == '-1') - { - $result['email_quota'] = ''; - } - - $ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, $result['ftps'], true, true); - - if($result['ftps'] == '-1') - { - $result['ftps'] = ''; - } - - $tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, $result['tickets'], true, true); - - if($result['tickets'] == '-1') - { - $result['tickets'] = ''; - } - - $mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, $result['mysqls'], true, true); - - if($result['mysqls'] == '-1') - { - $result['mysqls'] = ''; - } - - $number_of_aps_packages_ul = makecheckbox('number_of_aps_packages_ul', $lng['customer']['unlimited'], '-1', false, $result['aps_packages'], true, true); - - if($result['aps_packages'] == '-1') - { - $result['aps_packages'] = ''; - } - - $language_options = ''; - - while(list($language_file, $language_name) = each($languages)) - { - $language_options.= makeoption($language_name, $language_file, $result['def_language'], true); - } - - $ipaddress = makeoption($lng['admin']['allips'], "-1", $result['ip']); - $ips = array(); - $ipsandports = $db->query('SELECT `id`, `ip` FROM `' . TABLE_PANEL_IPSANDPORTS . '` ORDER BY `ip`, `port` ASC'); - - while($row = $db->fetch_array($ipsandports)) - { - if(filter_var($row['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) - { - $row['ip'] = '[' . $row['ip'] . ']'; - } - - if(!in_array($row['ip'], $ips)) - { - $ipaddress.= makeoption($row['ip'], $row['id'], $result['ip']); - $ips[] = $row['ip']; - } - } - - $change_serversettings = makeyesno('change_serversettings', '1', '0', $result['change_serversettings']); - $customers_see_all = makeyesno('customers_see_all', '1', '0', $result['customers_see_all']); - $domains_see_all = makeyesno('domains_see_all', '1', '0', $result['domains_see_all']); - $caneditphpsettings = makeyesno('caneditphpsettings', '1', '0', $result['caneditphpsettings']); - $deactivated = makeyesno('deactivated', '1', '0', $result['deactivated']); - $can_manage_aps_packages = makeyesno('can_manage_aps_packages', '1', '0', $result['can_manage_aps_packages']); - - $result = htmlentities_array($result); - eval("echo \"" . getTemplate("admins/admins_edit") . "\";"); - } - } - } -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Panel + * @version $Id$ + */ + +define('AREA', 'admin'); + +/** + * Include our init.php, which manages Sessions, Language etc. + */ + +require ("./lib/init.php"); + +if(isset($_POST['id'])) +{ + $id = intval($_POST['id']); +} +elseif(isset($_GET['id'])) +{ + $id = intval($_GET['id']); +} + +if($page == 'admins' + && $userinfo['change_serversettings'] == '1') +{ + if($action == '') + { + $log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_admins"); + $fields = array( + 'loginname' => $lng['login']['username'], + 'name' => $lng['customer']['name'], + 'diskspace' => $lng['customer']['diskspace'], + 'diskspace_used' => $lng['customer']['diskspace'] . ' (' . $lng['panel']['used'] . ')', + 'traffic' => $lng['customer']['traffic'], + 'traffic_used' => $lng['customer']['traffic'] . ' (' . $lng['panel']['used'] . ')', + 'mysqls' => $lng['customer']['mysqls'], + 'mysqls_used' => $lng['customer']['mysqls'] . ' (' . $lng['panel']['used'] . ')', + 'ftps' => $lng['customer']['ftps'], + 'ftps_used' => $lng['customer']['ftps'] . ' (' . $lng['panel']['used'] . ')', + 'tickets' => $lng['customer']['tickets'], + 'tickets_used' => $lng['customer']['tickets'] . ' (' . $lng['panel']['used'] . ')', + 'subdomains' => $lng['customer']['subdomains'], + 'subdomains_used' => $lng['customer']['subdomains'] . ' (' . $lng['panel']['used'] . ')', + 'emails' => $lng['customer']['emails'], + 'emails_used' => $lng['customer']['emails'] . ' (' . $lng['panel']['used'] . ')', + 'email_accounts' => $lng['customer']['accounts'], + 'email_accounts_used' => $lng['customer']['accounts'] . ' (' . $lng['panel']['used'] . ')', + 'email_forwarders' => $lng['customer']['forwarders'], + 'email_forwarders_used' => $lng['customer']['forwarders'] . ' (' . $lng['panel']['used'] . ')', + 'email_quota' => $lng['customer']['email_quota'], + 'email_quota_used' => $lng['customer']['email_quota'] . ' (' . $lng['panel']['used'] . ')', + 'deactivated' => $lng['admin']['deactivated'] + ); + $paging = new paging($userinfo, $db, TABLE_PANEL_ADMINS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']); + $admins = ''; + $result = $db->query("SELECT * FROM `" . TABLE_PANEL_ADMINS . "` " . $paging->getSqlWhere(false) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit()); + $paging->setEntries($db->num_rows($result)); + $sortcode = $paging->getHtmlSortCode($lng, true); + $arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s); + $searchcode = $paging->getHtmlSearchCode($lng); + $pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s); + $i = 0; + $count = 0; + + while($row = $db->fetch_array($result)) + { + if($paging->checkDisplay($i)) + { + $row['traffic_used'] = round($row['traffic_used'] / (1024 * 1024), $settings['panel']['decimal_places']); + $row['traffic'] = round($row['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']); + $row['diskspace_used'] = round($row['diskspace_used'] / 1024, $settings['panel']['decimal_places']); + $row['diskspace'] = round($row['diskspace'] / 1024, $settings['panel']['decimal_places']); + $row = str_replace_array('-1', 'UL', $row, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps subdomains tickets'); + $row = htmlentities_array($row); + eval("\$admins.=\"" . getTemplate("admins/admins_admin") . "\";"); + $count++; + } + + $i++; + } + + eval("echo \"" . getTemplate("admins/admins") . "\";"); + } + elseif($action == 'su') + { + $result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid` = '" . (int)$id . "'"); + $destination_admin = $result['loginname']; + + if($destination_admin != '' + && $result['adminid'] != $userinfo['userid']) + { + $result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid`='" . (int)$userinfo['userid'] . "'"); + $s = md5(uniqid(microtime(), 1)); + $db->query("INSERT INTO `" . TABLE_PANEL_SESSIONS . "` (`hash`, `userid`, `ipaddress`, `useragent`, `lastactivity`, `language`, `adminsession`) VALUES ('" . $db->escape($s) . "', '" . (int)$id . "', '" . $db->escape($result['ipaddress']) . "', '" . $db->escape($result['useragent']) . "', '" . time() . "', '" . $db->escape($result['language']) . "', '1')"); + $log->logAction(ADM_ACTION, LOG_INFO, "switched adminuser and is now '" . $destination_admin . "'"); + redirectTo('admin_index.php', Array('s' => $s)); + } + else + { + redirectTo('index.php', Array('action' => 'login')); + } + } + elseif($action == 'delete' + && $id != 0) + { + $result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$id . "'"); + + if($result['loginname'] != '') + { + if($result['adminid'] == $userinfo['userid']) + { + standard_error('youcantdeleteyourself'); + exit; + } + + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + $db->query("DELETE FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$id . "'"); + $db->query("DELETE FROM `" . TABLE_PANEL_TRAFFIC_ADMINS . "` WHERE `adminid`='" . (int)$id . "'"); + $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `adminid` = '" . (int)$userinfo['userid'] . "' WHERE `adminid` = '" . (int)$id . "'"); + $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `adminid` = '" . (int)$userinfo['userid'] . "' WHERE `adminid` = '" . (int)$id . "'"); + $log->logAction(ADM_ACTION, LOG_INFO, "deleted admin '" . $result['loginname'] . "'"); + updateCounters(); + redirectTo($filename, Array('page' => $page, 's' => $s)); + } + else + { + ask_yesno('admin_admin_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['loginname']); + } + } + } + elseif($action == 'add') + { + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + $name = validate($_POST['name'], 'name'); + $email = $idna_convert->encode(validate($_POST['email'], 'email')); + + $loginname = validate($_POST['loginname'], 'loginname'); + $password = validate($_POST['admin_password'], 'password'); + $def_language = validate($_POST['def_language'], 'default language'); + $customers = intval_ressource($_POST['customers']); + + if(isset($_POST['customers_ul'])) + { + $customers = - 1; + } + + $domains = intval_ressource($_POST['domains']); + + if(isset($_POST['domains_ul'])) + { + $domains = - 1; + } + + $subdomains = intval_ressource($_POST['subdomains']); + + if(isset($_POST['subdomains_ul'])) + { + $subdomains = - 1; + } + + $emails = intval_ressource($_POST['emails']); + + if(isset($_POST['emails_ul'])) + { + $emails = - 1; + } + + $email_accounts = intval_ressource($_POST['email_accounts']); + + if(isset($_POST['email_accounts_ul'])) + { + $email_accounts = - 1; + } + + $email_forwarders = intval_ressource($_POST['email_forwarders']); + + if(isset($_POST['email_forwarders_ul'])) + { + $email_forwarders = - 1; + } + + if($settings['system']['mail_quota_enabled'] == '1') + { + $email_quota = validate($_POST['email_quota'], 'email_quota', '/^\d+$/', 'vmailquotawrong', array('0', '')); + + if(isset($_POST['email_quota_ul'])) + { + $email_quota = - 1; + } + } + else + { + $email_quota = - 1; + } + + $ftps = intval_ressource($_POST['ftps']); + + if(isset($_POST['ftps_ul'])) + { + $ftps = - 1; + } + + $tickets = intval_ressource($_POST['tickets']); + + if(isset($_POST['tickets_ul']) + && $settings['ticket']['enabled'] == '1') + { + $tickets = - 1; + } + + $mysqls = intval_ressource($_POST['mysqls']); + + if(isset($_POST['mysqls_ul'])) + { + $mysqls = - 1; + } + + if($settings['aps']['aps_active'] == '1') + { + $number_of_aps_packages = intval_ressource($_POST['number_of_aps_packages']); + + if(isset($_POST['number_of_aps_packages_ul'])) + { + $number_of_aps_packages = - 1; + } + + $can_manage_aps_packages = intval($_POST['can_manage_aps_packages']); + } + else + { + $number_of_aps_packages = 0; + $can_manage_aps_packages = 0; + } + + $customers_see_all = intval($_POST['customers_see_all']); + $domains_see_all = intval($_POST['domains_see_all']); + $caneditphpsettings = intval($_POST['caneditphpsettings']); + $change_serversettings = intval($_POST['change_serversettings']); + + $diskspace = intval_ressource($_POST['diskspace']); + + if(isset($_POST['diskspace_ul'])) + { + $diskspace = - 1; + } + + $traffic = doubleval_ressource($_POST['traffic']); + + if(isset($_POST['traffic_ul'])) + { + $traffic = - 1; + } + + $diskspace = $diskspace * 1024; + $traffic = $traffic * 1024 * 1024; + $ipaddress = intval_ressource($_POST['ipaddress']); + + // Check if the account already exists + + $loginname_check = $db->query_first("SELECT `loginname` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `loginname` = '" . $db->escape($loginname) . "'"); + $loginname_check_admin = $db->query_first("SELECT `loginname` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `loginname` = '" . $db->escape($loginname) . "'"); + + if($loginname == '') + { + standard_error(array('stringisempty', 'myloginname')); + } + elseif(strtolower($loginname_check['loginname']) == strtolower($loginname) + || strtolower($loginname_check_admin['loginname']) == strtolower($loginname)) + { + standard_error('loginnameexists', $loginname); + } + + // Accounts which match systemaccounts are not allowed, filtering them + + elseif (preg_match('/^' . preg_quote($settings['customer']['accountprefix'], '/') . '([0-9]+)/', $loginname)) + { + standard_error('loginnameissystemaccount', $settings['customer']['accountprefix']); + } + elseif(!validateUsername($loginname)) + { + standard_error('loginnameiswrong', $loginname); + } + elseif($name == '') + { + standard_error(array('stringisempty', 'myname')); + } + elseif($email == '') + { + standard_error(array('stringisempty', 'emailadd')); + } + elseif($password == '') + { + standard_error(array('stringisempty', 'mypassword')); + } + elseif(!validateEmail($email)) + { + standard_error('emailiswrong', $email); + } + else + { + if($customers_see_all != '1') + { + $customers_see_all = '0'; + } + + if($domains_see_all != '1') + { + $domains_see_all = '0'; + } + + if($caneditphpsettings != '1') + { + $caneditphpsettings = '0'; + } + + if($change_serversettings != '1') + { + $change_serversettings = '0'; + } + + $result = $db->query("INSERT INTO `" . TABLE_PANEL_ADMINS . "` (`loginname`, `password`, `name`, `email`, `def_language`, `change_serversettings`, `customers`, `customers_see_all`, `domains`, `domains_see_all`, `caneditphpsettings`, `diskspace`, `traffic`, `subdomains`, `emails`, `email_accounts`, `email_forwarders`, `email_quota`, `ftps`, `tickets`, `mysqls`, `ip`, `can_manage_aps_packages`, `aps_packages`) + VALUES ('" . $db->escape($loginname) . "', '" . md5($password) . "', '" . $db->escape($name) . "', '" . $db->escape($email) . "','" . $db->escape($def_language) . "', '" . $db->escape($change_serversettings) . "', '" . $db->escape($customers) . "', '" . $db->escape($customers_see_all) . "', '" . $db->escape($domains) . "', '" . $db->escape($domains_see_all) . "', '" . (int)$caneditphpsettings . "', '" . $db->escape($diskspace) . "', '" . $db->escape($traffic) . "', '" . $db->escape($subdomains) . "', '" . $db->escape($emails) . "', '" . $db->escape($email_accounts) . "', '" . $db->escape($email_forwarders) . "', '" . $db->escape($email_quota) . "', '" . $db->escape($ftps) . "', '" . $db->escape($tickets) . "', '" . $db->escape($mysqls) . "', '" . (int)$ipaddress . "', " . (int)$can_manage_aps_packages . ", " . (int)$number_of_aps_packages . ")"); + $adminid = $db->insert_id(); + $log->logAction(ADM_ACTION, LOG_INFO, "added admin '" . $loginname . "'"); + redirectTo($filename, Array('page' => $page, 's' => $s)); + } + } + else + { + $language_options = ''; + + while(list($language_file, $language_name) = each($languages)) + { + $language_options.= makeoption($language_name, $language_file, $userinfo['language'], true); + } + + $ipaddress = makeoption($lng['admin']['allips'], "-1"); + $ips = array(); + $ipsandports = $db->query('SELECT `id`, `ip` FROM `' . TABLE_PANEL_IPSANDPORTS . '` ORDER BY `ip`, `port` ASC'); + + while($row = $db->fetch_array($ipsandports)) + { + if(filter_var($row['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) + { + $row['ip'] = '[' . $row['ip'] . ']'; + } + + if(!in_array($row['ip'], $ips)) + { + $ipaddress.= makeoption($row['ip'], $row['id']); + $ips[] = $row['ip']; + } + } + + $customers_ul = makecheckbox('customers_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); + $diskspace_ul = makecheckbox('diskspace_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); + $traffic_ul = makecheckbox('traffic_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); + $domains_ul = makecheckbox('domains_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); + $subdomains_ul = makecheckbox('subdomains_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); + $emails_ul = makecheckbox('emails_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); + $email_accounts_ul = makecheckbox('email_accounts_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); + $email_forwarders_ul = makecheckbox('email_forwarders_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); + $email_quota_ul = makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); + $ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); + $tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); + $mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); + $change_serversettings = makeyesno('change_serversettings', '1', '0', '0'); + $customers_see_all = makeyesno('customers_see_all', '1', '0', '0'); + $domains_see_all = makeyesno('domains_see_all', '1', '0', '0'); + $caneditphpsettings = makeyesno('caneditphpsettings', '1', '0', '0'); + $can_manage_aps_packages = makeyesno('can_manage_aps_packages', '1', '0', '0'); + $number_of_aps_packages_ul = makecheckbox('number_of_aps_packages_ul', $lng['customer']['unlimited'], '-1', false, '0', true, true); + + eval("echo \"" . getTemplate("admins/admins_add") . "\";"); + } + } + elseif($action == 'edit' + && $id != 0) + { + $result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$id . "'"); + + if($result['loginname'] != '') + { + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + $name = validate($_POST['name'], 'name'); + $email = $idna_convert->encode(validate($_POST['email'], 'email')); + + if($result['adminid'] == $userinfo['userid']) + { + $password = ''; + $def_language = $result['def_language']; + $deactivated = $result['deactivated']; + $customers = $result['customers']; + $domains = $result['domains']; + $subdomains = $result['subdomains']; + $emails = $result['emails']; + $email_accounts = $result['email_accounts']; + $email_forwarders = $result['email_forwarders']; + $email_quota = $result['email_quota']; + $ftps = $result['ftps']; + $tickets = $result['tickets']; + $mysqls = $result['mysqls']; + $customers_see_all = $result['customers_see_all']; + $domains_see_all = $result['domains_see_all']; + $caneditphpsettings = $result['caneditphpsettings']; + $change_serversettings = $result['change_serversettings']; + $diskspace = $result['diskspace']; + $traffic = $result['traffic']; + $ipaddress = $result['ip']; + $can_manage_aps_packages = $result['can_manage_aps_packages']; + $number_of_aps_packages = $result['aps_packages']; + } + else + { + $password = validate($_POST['admin_password'], 'new password'); + $def_language = validate($_POST['def_language'], 'default language'); + $deactivated = intval($_POST['deactivated']); + $customers = intval_ressource($_POST['customers']); + + if(isset($_POST['customers_ul'])) + { + $customers = - 1; + } + + $domains = intval_ressource($_POST['domains']); + + if(isset($_POST['domains_ul'])) + { + $domains = - 1; + } + + $subdomains = intval_ressource($_POST['subdomains']); + + if(isset($_POST['subdomains_ul'])) + { + $subdomains = - 1; + } + + $emails = intval_ressource($_POST['emails']); + + if(isset($_POST['emails_ul'])) + { + $emails = - 1; + } + + $email_accounts = intval_ressource($_POST['email_accounts']); + + if(isset($_POST['email_accounts_ul'])) + { + $email_accounts = - 1; + } + + $email_forwarders = intval_ressource($_POST['email_forwarders']); + + if(isset($_POST['email_forwarders_ul'])) + { + $email_forwarders = - 1; + } + + if($settings['system']['mail_quota_enabled'] == '1') + { + $email_quota = validate($_POST['email_quota'], 'email_quota', '/^\d+$/', 'vmailquotawrong', array('0', '')); + + if(isset($_POST['email_quota_ul'])) + { + $email_quota = - 1; + } + } + else + { + $email_quota = - 1; + } + + $ftps = intval_ressource($_POST['ftps']); + + if(isset($_POST['ftps_ul'])) + { + $ftps = - 1; + } + + $tickets = intval_ressource($_POST['tickets']); + + if(isset($_POST['tickets_ul'])) + { + $tickets = - 1; + } + + $mysqls = intval_ressource($_POST['mysqls']); + + if(isset($_POST['mysqls_ul'])) + { + $mysqls = - 1; + } + + $number_of_aps_packages = intval_ressource($_POST['number_of_aps_packages']); + + if(isset($_POST['number_of_aps_packages_ul'])) + { + $number_of_aps_packages = - 1; + } + + $customers_see_all = intval($_POST['customers_see_all']); + $domains_see_all = intval($_POST['domains_see_all']); + $caneditphpsettings = intval($_POST['caneditphpsettings']); + $change_serversettings = intval($_POST['change_serversettings']); + $can_manage_aps_packages = intval($_POST['can_manage_aps_packages']); + + $diskspace = intval($_POST['diskspace']); + + if(isset($_POST['diskspace_ul'])) + { + $diskspace = - 1; + } + + $traffic = doubleval_ressource($_POST['traffic']); + + if(isset($_POST['traffic_ul'])) + { + $traffic = - 1; + } + + $diskspace = $diskspace * 1024; + $traffic = $traffic * 1024 * 1024; + $ipaddress = intval_ressource($_POST['ipaddress']); + } + + if($name == '') + { + standard_error(array('stringisempty', 'myname')); + } + elseif($email == '') + { + standard_error(array('stringisempty', 'emailadd')); + } + elseif(!validateEmail($email)) + { + standard_error('emailiswrong', $email); + } + else + { + if($password != '') + { + $password = md5($password); + } + else + { + $password = $result['password']; + } + + if($deactivated != '1') + { + $deactivated = '0'; + } + + if($customers_see_all != '1') + { + $customers_see_all = '0'; + } + + if($domains_see_all != '1') + { + $domains_see_all = '0'; + } + + if($caneditphpsettings != '1') + { + $caneditphpsettings = '0'; + } + + if($change_serversettings != '1') + { + $change_serversettings = '0'; + } + + $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `name`='" . $db->escape($name) . "', `email`='" . $db->escape($email) . "', `def_language`='" . $db->escape($def_language) . "', `change_serversettings` = '" . $db->escape($change_serversettings) . "', `customers` = '" . $db->escape($customers) . "', `customers_see_all` = '" . $db->escape($customers_see_all) . "', `domains` = '" . $db->escape($domains) . "', `domains_see_all` = '" . $db->escape($domains_see_all) . "', `caneditphpsettings` = '" . (int)$caneditphpsettings . "', `password` = '" . $password . "', `diskspace`='" . $db->escape($diskspace) . "', `traffic`='" . $db->escape($traffic) . "', `subdomains`='" . $db->escape($subdomains) . "', `emails`='" . $db->escape($emails) . "', `email_accounts` = '" . $db->escape($email_accounts) . "', `email_forwarders`='" . $db->escape($email_forwarders) . "', `email_quota`='" . $db->escape($email_quota) . "', `ftps`='" . $db->escape($ftps) . "', `tickets`='" . $db->escape($tickets) . "', `mysqls`='" . $db->escape($mysqls) . "', `ip`='" . (int)$ipaddress . "', `deactivated`='" . $db->escape($deactivated) . "', `can_manage_aps_packages`=" . (int)$can_manage_aps_packages . ", `aps_packages`=" . (int)$number_of_aps_packages . " WHERE `adminid`='" . $db->escape($id) . "'"); + $log->logAction(ADM_ACTION, LOG_INFO, "edited admin '#" . $id . "'"); + $redirect_props = Array( + 'page' => $page, + 's' => $s + ); + + redirectTo($filename, $redirect_props); + } + } + else + { + $result['traffic'] = round($result['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']); + $result['diskspace'] = round($result['diskspace'] / 1024, $settings['panel']['decimal_places']); + $result['email'] = $idna_convert->decode($result['email']); + $customers_ul = makecheckbox('customers_ul', $lng['customer']['unlimited'], '-1', false, $result['customers'], true, true); + + if($result['customers'] == '-1') + { + $result['customers'] = ''; + } + + $diskspace_ul = makecheckbox('diskspace_ul', $lng['customer']['unlimited'], '-1', false, $result['diskspace'], true, true); + + if($result['diskspace'] == '-1') + { + $result['diskspace'] = ''; + } + + $traffic_ul = makecheckbox('traffic_ul', $lng['customer']['unlimited'], '-1', false, $result['traffic'], true, true); + + if($result['traffic'] == '-1') + { + $result['traffic'] = ''; + } + + $domains_ul = makecheckbox('domains_ul', $lng['customer']['unlimited'], '-1', false, $result['domains'], true, true); + + if($result['domains'] == '-1') + { + $result['domains'] = ''; + } + + $subdomains_ul = makecheckbox('subdomains_ul', $lng['customer']['unlimited'], '-1', false, $result['subdomains'], true, true); + + if($result['subdomains'] == '-1') + { + $result['subdomains'] = ''; + } + + $emails_ul = makecheckbox('emails_ul', $lng['customer']['unlimited'], '-1', false, $result['emails'], true, true); + + if($result['emails'] == '-1') + { + $result['emails'] = ''; + } + + $email_accounts_ul = makecheckbox('email_accounts_ul', $lng['customer']['unlimited'], '-1', false, $result['email_accounts'], true, true); + + if($result['email_accounts'] == '-1') + { + $result['email_accounts'] = ''; + } + + $email_forwarders_ul = makecheckbox('email_forwarders_ul', $lng['customer']['unlimited'], '-1', false, $result['email_forwarders'], true, true); + + if($result['email_forwarders'] == '-1') + { + $result['email_forwarders'] = ''; + } + + $email_quota_ul = makecheckbox('email_quota_ul', $lng['customer']['unlimited'], '-1', false, $result['email_quota'], true, true); + + if($result['email_quota'] == '-1') + { + $result['email_quota'] = ''; + } + + $ftps_ul = makecheckbox('ftps_ul', $lng['customer']['unlimited'], '-1', false, $result['ftps'], true, true); + + if($result['ftps'] == '-1') + { + $result['ftps'] = ''; + } + + $tickets_ul = makecheckbox('tickets_ul', $lng['customer']['unlimited'], '-1', false, $result['tickets'], true, true); + + if($result['tickets'] == '-1') + { + $result['tickets'] = ''; + } + + $mysqls_ul = makecheckbox('mysqls_ul', $lng['customer']['unlimited'], '-1', false, $result['mysqls'], true, true); + + if($result['mysqls'] == '-1') + { + $result['mysqls'] = ''; + } + + $number_of_aps_packages_ul = makecheckbox('number_of_aps_packages_ul', $lng['customer']['unlimited'], '-1', false, $result['aps_packages'], true, true); + + if($result['aps_packages'] == '-1') + { + $result['aps_packages'] = ''; + } + + $language_options = ''; + + while(list($language_file, $language_name) = each($languages)) + { + $language_options.= makeoption($language_name, $language_file, $result['def_language'], true); + } + + $ipaddress = makeoption($lng['admin']['allips'], "-1", $result['ip']); + $ips = array(); + $ipsandports = $db->query('SELECT `id`, `ip` FROM `' . TABLE_PANEL_IPSANDPORTS . '` ORDER BY `ip`, `port` ASC'); + + while($row = $db->fetch_array($ipsandports)) + { + if(filter_var($row['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) + { + $row['ip'] = '[' . $row['ip'] . ']'; + } + + if(!in_array($row['ip'], $ips)) + { + $ipaddress.= makeoption($row['ip'], $row['id'], $result['ip']); + $ips[] = $row['ip']; + } + } + + $change_serversettings = makeyesno('change_serversettings', '1', '0', $result['change_serversettings']); + $customers_see_all = makeyesno('customers_see_all', '1', '0', $result['customers_see_all']); + $domains_see_all = makeyesno('domains_see_all', '1', '0', $result['domains_see_all']); + $caneditphpsettings = makeyesno('caneditphpsettings', '1', '0', $result['caneditphpsettings']); + $deactivated = makeyesno('deactivated', '1', '0', $result['deactivated']); + $can_manage_aps_packages = makeyesno('can_manage_aps_packages', '1', '0', $result['can_manage_aps_packages']); + + $result = htmlentities_array($result); + eval("echo \"" . getTemplate("admins/admins_edit") . "\";"); + } + } + } +} + +?> diff --git a/admin_configfiles.php b/admin_configfiles.php index dc77edd9..fdf16c94 100644 --- a/admin_configfiles.php +++ b/admin_configfiles.php @@ -1,181 +1,181 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Panel - * @version $Id$ - */ - -define('AREA', 'admin'); - -/** - * Include our init.php, which manages Sessions, Language etc. - */ - -$need_db_sql_data = true; -require ("./lib/init.php"); -require ("./lib/configfiles_index.inc.php"); -$distribution = ''; -$distributions_select = ''; -$service = ''; -$services_select = ''; -$daemon = ''; -$daemons_select = ''; - -if($userinfo['change_serversettings'] == '1') -{ - if(isset($_GET['distribution']) - && $_GET['distribution'] != '' - && isset($configfiles[$_GET['distribution']]) - && is_array($configfiles[$_GET['distribution']])) - { - $distribution = $_GET['distribution']; - - if(isset($_GET['service']) - && $_GET['service'] != '' - && isset($configfiles[$distribution]['services'][$_GET['service']]) - && is_array($configfiles[$distribution]['services'][$_GET['service']])) - { - $service = $_GET['service']; - - if(isset($_GET['daemon']) - && $_GET['daemon'] != '' - && isset($configfiles[$distribution]['services'][$service]['daemons'][$_GET['daemon']]) - && is_array($configfiles[$distribution]['services'][$service]['daemons'][$_GET['daemon']])) - { - $daemon = $_GET['daemon']; - } - else - { - foreach($configfiles[$distribution]['services'][$service]['daemons'] as $daemon_name => $daemon_details) - { - $daemons_select.= makeoption($daemon_details['label'], $daemon_name); - } - } - } - else - { - foreach($configfiles[$distribution]['services'] as $service_name => $service_details) - { - $services_select.= makeoption($service_details['label'], $service_name); - } - } - } - else - { - foreach($configfiles as $distribution_name => $distribution_details) - { - $distributions_select.= makeoption($distribution_details['label'], $distribution_name); - } - } - - if($distribution != '' - && $service != '' - && $daemon != '') - { - $replace_arr = Array( - '' => $sql['user'], - '' => 'MYSQL_PASSWORD', - '' => $sql['db'], - '' => $sql['host'], - '' => $settings['system']['hostname'], - '' => $settings['system']['ipaddress'], - '' => $settings['system']['nameservers'], - '' => $settings['system']['vmail_homedir'], - '' => $settings['system']['vmail_uid'], - '' => $settings['system']['vmail_gid'], - '' => $settings['system']['awstats_path'], - '' => ($settings['system']['use_ssl'] == '1') ? 'imaps pop3s' : '', - '' => $settings['system']['realtime_port'] - ); - $files = ''; - $configpage = ''; - foreach($configfiles[$distribution]['services'][$service]['daemons'][$daemon] as $action => $value) - { - if(substr($action, 0, 8) == 'commands') - { - $commands = ''; - - if(is_array($value)) - { - $commands = implode("\n", $value); - - if($commands != '') - { - eval("\$configpage.=\"" . getTemplate("configfiles/configfiles_commands") . "\";"); - } - } - } - elseif(substr($action, 0, 5) == 'files') - { - $files = ''; - - if(is_array($value)) - { - while(list($filename, $realname) = each($value)) - { - $file_content = file_get_contents('./templates/misc/configfiles/' . $distribution . '/' . $daemon . '/' . $filename); - $file_content = strtr($file_content, $replace_arr); - $file_content = htmlspecialchars($file_content); - $numbrows = count(explode("\n", $file_content)); - eval("\$files.=\"" . getTemplate("configfiles/configfiles_file") . "\";"); - } - - eval("\$configpage.=\"" . getTemplate("configfiles/configfiles_files") . "\";"); - } - } - } - - if(isset($configfiles[$distribution]['services'][$service]['daemons'][$daemon]['restart']) - && is_array($configfiles[$distribution]['services'][$service]['daemons'][$daemon]['restart'])) - { - $restart = implode("\n", $configfiles[$distribution]['services'][$service]['daemons'][$daemon]['restart']); - } - else - { - $restart = ''; - } - - eval("echo \"" . getTemplate("configfiles/configfiles") . "\";"); - } - elseif($page == 'overview') - { - $log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_configfiles"); - $distributions = ''; - foreach($configfiles as $distribution_name => $distribution_details) - { - $services = ''; - foreach($distribution_details['services'] as $service_name => $service_details) - { - $daemons = ''; - foreach($service_details['daemons'] as $daemon_name => $daemon_details) - { - eval("\$daemons.=\"" . getTemplate("configfiles/choose_daemon") . "\";"); - } - - eval("\$services.=\"" . getTemplate("configfiles/choose_service") . "\";"); - } - - eval("\$distributions.=\"" . getTemplate("configfiles/choose_distribution") . "\";"); - } - - eval("echo \"" . getTemplate("configfiles/choose") . "\";"); - } - else - { - eval("echo \"" . getTemplate("configfiles/wizard") . "\";"); - } -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Panel + * @version $Id$ + */ + +define('AREA', 'admin'); + +/** + * Include our init.php, which manages Sessions, Language etc. + */ + +$need_db_sql_data = true; +require ("./lib/init.php"); +require ("./lib/configfiles_index.inc.php"); +$distribution = ''; +$distributions_select = ''; +$service = ''; +$services_select = ''; +$daemon = ''; +$daemons_select = ''; + +if($userinfo['change_serversettings'] == '1') +{ + if(isset($_GET['distribution']) + && $_GET['distribution'] != '' + && isset($configfiles[$_GET['distribution']]) + && is_array($configfiles[$_GET['distribution']])) + { + $distribution = $_GET['distribution']; + + if(isset($_GET['service']) + && $_GET['service'] != '' + && isset($configfiles[$distribution]['services'][$_GET['service']]) + && is_array($configfiles[$distribution]['services'][$_GET['service']])) + { + $service = $_GET['service']; + + if(isset($_GET['daemon']) + && $_GET['daemon'] != '' + && isset($configfiles[$distribution]['services'][$service]['daemons'][$_GET['daemon']]) + && is_array($configfiles[$distribution]['services'][$service]['daemons'][$_GET['daemon']])) + { + $daemon = $_GET['daemon']; + } + else + { + foreach($configfiles[$distribution]['services'][$service]['daemons'] as $daemon_name => $daemon_details) + { + $daemons_select.= makeoption($daemon_details['label'], $daemon_name); + } + } + } + else + { + foreach($configfiles[$distribution]['services'] as $service_name => $service_details) + { + $services_select.= makeoption($service_details['label'], $service_name); + } + } + } + else + { + foreach($configfiles as $distribution_name => $distribution_details) + { + $distributions_select.= makeoption($distribution_details['label'], $distribution_name); + } + } + + if($distribution != '' + && $service != '' + && $daemon != '') + { + $replace_arr = Array( + '' => $sql['user'], + '' => 'MYSQL_PASSWORD', + '' => $sql['db'], + '' => $sql['host'], + '' => $settings['system']['hostname'], + '' => $settings['system']['ipaddress'], + '' => $settings['system']['nameservers'], + '' => $settings['system']['vmail_homedir'], + '' => $settings['system']['vmail_uid'], + '' => $settings['system']['vmail_gid'], + '' => $settings['system']['awstats_path'], + '' => ($settings['system']['use_ssl'] == '1') ? 'imaps pop3s' : '', + '' => $settings['system']['realtime_port'] + ); + $files = ''; + $configpage = ''; + foreach($configfiles[$distribution]['services'][$service]['daemons'][$daemon] as $action => $value) + { + if(substr($action, 0, 8) == 'commands') + { + $commands = ''; + + if(is_array($value)) + { + $commands = implode("\n", $value); + + if($commands != '') + { + eval("\$configpage.=\"" . getTemplate("configfiles/configfiles_commands") . "\";"); + } + } + } + elseif(substr($action, 0, 5) == 'files') + { + $files = ''; + + if(is_array($value)) + { + while(list($filename, $realname) = each($value)) + { + $file_content = file_get_contents('./templates/misc/configfiles/' . $distribution . '/' . $daemon . '/' . $filename); + $file_content = strtr($file_content, $replace_arr); + $file_content = htmlspecialchars($file_content); + $numbrows = count(explode("\n", $file_content)); + eval("\$files.=\"" . getTemplate("configfiles/configfiles_file") . "\";"); + } + + eval("\$configpage.=\"" . getTemplate("configfiles/configfiles_files") . "\";"); + } + } + } + + if(isset($configfiles[$distribution]['services'][$service]['daemons'][$daemon]['restart']) + && is_array($configfiles[$distribution]['services'][$service]['daemons'][$daemon]['restart'])) + { + $restart = implode("\n", $configfiles[$distribution]['services'][$service]['daemons'][$daemon]['restart']); + } + else + { + $restart = ''; + } + + eval("echo \"" . getTemplate("configfiles/configfiles") . "\";"); + } + elseif($page == 'overview') + { + $log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_configfiles"); + $distributions = ''; + foreach($configfiles as $distribution_name => $distribution_details) + { + $services = ''; + foreach($distribution_details['services'] as $service_name => $service_details) + { + $daemons = ''; + foreach($service_details['daemons'] as $daemon_name => $daemon_details) + { + eval("\$daemons.=\"" . getTemplate("configfiles/choose_daemon") . "\";"); + } + + eval("\$services.=\"" . getTemplate("configfiles/choose_service") . "\";"); + } + + eval("\$distributions.=\"" . getTemplate("configfiles/choose_distribution") . "\";"); + } + + eval("echo \"" . getTemplate("configfiles/choose") . "\";"); + } + else + { + eval("echo \"" . getTemplate("configfiles/wizard") . "\";"); + } +} + +?> diff --git a/admin_cronjobs.php b/admin_cronjobs.php index 2685477b..4237972a 100644 --- a/admin_cronjobs.php +++ b/admin_cronjobs.php @@ -12,7 +12,7 @@ * @author Froxlor team (2010-) * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @package Panel - * @version $Id: $ + * @version $Id$ */ define('AREA', 'admin'); diff --git a/admin_domains.php b/admin_domains.php index 15d1872c..c0ffdc5c 100644 --- a/admin_domains.php +++ b/admin_domains.php @@ -1,1124 +1,1124 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Panel - * @version $Id$ - */ - -define('AREA', 'admin'); - -/** - * Include our init.php, which manages Sessions, Language etc. - */ - -require ("./lib/init.php"); - -if(isset($_POST['id'])) -{ - $id = intval($_POST['id']); -} -elseif(isset($_GET['id'])) -{ - $id = intval($_GET['id']); -} - -if($page == 'domains' - || $page == 'overview') -{ - // Let's see how many customers we have - - $countcustomers = $db->query_first("SELECT COUNT(`customerid`) as `countcustomers` FROM `" . TABLE_PANEL_CUSTOMERS . "` " . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int)$userinfo['adminid'] . "' ") . ""); - $countcustomers = (int)$countcustomers['countcustomers']; - - if($action == '') - { - $log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_domains"); - $fields = array( - 'd.domain' => $lng['domains']['domainname'], - 'ip.ip' => $lng['admin']['ipsandports']['ip'], - 'ip.port' => $lng['admin']['ipsandports']['port'], - 'c.name' => $lng['customer']['name'], - 'c.firstname' => $lng['customer']['firstname'], - 'c.company' => $lng['customer']['company'], - 'c.loginname' => $lng['login']['username'], - 'd.aliasdomain' => $lng['domains']['aliasdomain'] - ); - $paging = new paging($userinfo, $db, TABLE_PANEL_DOMAINS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']); - $domains = ''; - $result = $db->query("SELECT `d`.*, `c`.`loginname`, `c`.`name`, `c`.`firstname`, `c`.`company`, `c`.`standardsubdomain`, `ad`.`id` AS `aliasdomainid`, `ad`.`domain` AS `aliasdomain`, `ip`.`id` AS `ipid`, `ip`.`ip`, `ip`.`port` " . "FROM `" . TABLE_PANEL_DOMAINS . "` `d` " . "LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) " . "LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `ad` ON `d`.`aliasdomain`=`ad`.`id` " . "LEFT JOIN `" . TABLE_PANEL_IPSANDPORTS . "` `ip` ON (`d`.`ipandport` = `ip`.`id`) " . "WHERE `d`.`parentdomainid`='0' " . ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "' ") . " " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit()); - $paging->setEntries($db->num_rows($result)); - $sortcode = $paging->getHtmlSortCode($lng); - $arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s); - $searchcode = $paging->getHtmlSearchCode($lng); - $pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s); - $domain_array = array(); - - while($row = $db->fetch_array($result)) - { - $row['domain'] = $idna_convert->decode($row['domain']); - $row['aliasdomain'] = $idna_convert->decode($row['aliasdomain']); - - if(filter_var($row['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) - { - $row['ipandport'] = '[' . $row['ip'] . ']:' . $row['port']; - } - else - { - $row['ipandport'] = $row['ip'] . ':' . $row['port']; - } - - if(!isset($domain_array[$row['domain']])) - { - $domain_array[$row['domain']] = $row; - } - else - { - $domain_array[$row['domain']] = array_merge($row, $domain_array[$row['domain']]); - } - - if(isset($row['aliasdomainid']) && $row['aliasdomainid'] != NULL && isset($row['aliasdomain']) && $row['aliasdomain'] != '') - { - if(!isset($domain_array[$row['aliasdomain']])) - { - $domain_array[$row['aliasdomain']] = array(); - } - - $domain_array[$row['aliasdomain']]['domainaliasid'] = $row['id']; - $domain_array[$row['aliasdomain']]['domainalias'] = $row['domain']; - } - } - - /** - * We need ksort/krsort here to make sure idna-domains are also sorted correctly - */ - - if($paging->sortfield == 'd.domain' - && $paging->sortorder == 'asc') - { - ksort($domain_array); - } - elseif($paging->sortfield == 'd.domain' - && $paging->sortorder == 'desc') - { - krsort($domain_array); - } - - $i = 0; - $count = 0; - foreach($domain_array as $row) - { - if(isset($row['domain']) && $row['domain'] != '' && $paging->checkDisplay($i)) - { - $row['customername'] = getCorrectFullUserDetails($row); - $row = htmlentities_array($row); - eval("\$domains.=\"" . getTemplate("domains/domains_domain") . "\";"); - $count++; - } - - $i++; - } - - // Display the list - - eval("echo \"" . getTemplate("domains/domains") . "\";"); - } - elseif($action == 'delete' - && $id != 0) - { - - $result = $db->query_first("SELECT `d`.`id`, `d`.`domain`, `d`.`customerid`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`zonefile` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`id`='" . (int)$id . "' AND `d`.`id` <> `c`.`standardsubdomain`" . ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "' ")); - $alias_check = $db->query_first('SELECT COUNT(`id`) AS `count` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$id . '\''); - - if($result['domain'] != '' - && $alias_check['count'] == 0) - { - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - $query = 'SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE (`id`="' . (int)$id . '" OR `parentdomainid`="' . (int)$id . '") AND `isemaildomain`="1"'; - $subResult = $db->query($query); - $idString = array(); - - while($subRow = $db->fetch_array($subResult)) - { - $idString[] = '`domainid` = "' . (int)$subRow['id'] . '"'; - } - - $idString = implode(' OR ', $idString); - - if($idString != '') - { - $query = 'DELETE FROM `' . TABLE_MAIL_USERS . '` WHERE ' . $idString; - $db->query($query); - $query = 'DELETE FROM `' . TABLE_MAIL_VIRTUAL . '` WHERE ' . $idString; - $db->query($query); - $log->logAction(ADM_ACTION, LOG_NOTICE, "deleted domain/s from mail-tables"); - } - - $db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `id`='" . (int)$id . "' OR `parentdomainid`='" . (int)$result['id'] . "'"); - $deleted_domains = (int)$db->affected_rows(); - $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used` = `subdomains_used` - " . (int)($deleted_domains - 1) . " WHERE `customerid` = '" . (int)$result['customerid'] . "'"); - $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` - 1 WHERE `adminid` = '" . (int)$userinfo['adminid'] . "'"); - $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'0\' WHERE `standardsubdomain`=\'' . (int)$result['id'] . '\' AND `customerid`=\'' . (int)$result['customerid'] . '\''); - $log->logAction(ADM_ACTION, LOG_INFO, "deleted domain/subdomains (#" . $result['id'] . ")"); - updateCounters(); - inserttask('1'); - inserttask('4'); - redirectTo($filename, Array('page' => $page, 's' => $s)); - } - else - { - ask_yesno('admin_domain_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['domain'])); - } - } - } - elseif($action == 'add') - { - if($userinfo['domains_used'] < $userinfo['domains'] - || $userinfo['domains'] == '-1') - { - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - if($_POST['domain'] == $settings['system']['hostname']) - { - standard_error('admin_domain_emailsystemhostname'); - exit; - } - - $domain = $idna_convert->encode(preg_replace(Array('/\:(\d)+$/', '/^https?\:\/\//'), '', validate($_POST['domain'], 'domain'))); - $subcanemaildomain = intval($_POST['subcanemaildomain']); - $isemaildomain = intval($_POST['isemaildomain']); - $email_only = intval($_POST['email_only']); - $wwwserveralias = intval($_POST['wwwserveralias']); - $speciallogfile = intval($_POST['speciallogfile']); - $aliasdomain = intval($_POST['alias']); - $customerid = intval($_POST['customerid']); - $customer = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$customerid . "' " . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " "); - - if(empty($customer) - || $customer['customerid'] != $customerid) - { - standard_error('customerdoesntexist'); - } - - if($userinfo['customers_see_all'] == '1') - { - $adminid = intval($_POST['adminid']); - $admin = $db->query_first("SELECT * FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$adminid . "' AND ( `domains_used` < `domains` OR `domains` = '-1' )"); - - if(empty($admin) - || $admin['adminid'] != $adminid) - { - standard_error('admindoesntexist'); - } - } - else - { - $adminid = $userinfo['adminid']; - $admin = $userinfo; - } - - $documentroot = $customer['documentroot']; - $registration_date = validate($_POST['registration_date'], 'registration_date', '/^(19|20)\d\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/', '', array('0000-00-00', '0', '')); - - if($userinfo['change_serversettings'] == '1') - { - $isbinddomain = intval($_POST['isbinddomain']); - $caneditdomain = intval($_POST['caneditdomain']); - $zonefile = validate($_POST['zonefile'], 'zonefile'); - - if(isset($_POST['dkim'])) - { - $dkim = intval($_POST['dkim']); - } - else - { - $dkim = '1'; - } - - $specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/'); - validate($_POST['documentroot'], 'documentroot'); - - if(isset($_POST['documentroot']) - && $_POST['documentroot'] != '') - { - if(substr($_POST['documentroot'], 0, 1) != '/' - && !preg_match('/^https?\:\/\//', $_POST['documentroot'])) - { - $documentroot.= '/' . $_POST['documentroot']; - } - else - { - $documentroot = $_POST['documentroot']; - } - } - } - else - { - $isbinddomain = '1'; - $caneditdomain = '1'; - $zonefile = ''; - $dkim = '1'; - $specialsettings = ''; - } - - if($userinfo['caneditphpsettings'] == '1' - || $userinfo['change_serversettings'] == '1') - { - $openbasedir = intval($_POST['openbasedir']); - $safemode = intval($_POST['safemode']); - - if((int)$settings['system']['mod_fcgid'] == 1) - { - $phpsettingid = (int)$_POST['phpsettingid']; - $phpsettingid_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = " . (int)$phpsettingid); - - if(!isset($phpsettingid_check['id']) - || $phpsettingid_check['id'] == '0' - || $phpsettingid_check['id'] != $phpsettingid) - { - standard_error('phpsettingidwrong'); - } - - $mod_fcgid_starter = validate($_POST['mod_fcgid_starter'], 'mod_fcgid_starter', '/^[0-9]*$/', '', array('-1', '')); - $mod_fcgid_maxrequests = validate($_POST['mod_fcgid_maxrequests'], 'mod_fcgid_maxrequests', '/^[0-9]*$/', '', array('-1', '')); - } - else - { - $phpsettingid = '1'; - $mod_fcgid_starter = '-1'; - $mod_fcgid_maxrequests = '-1'; - } - } - else - { - $openbasedir = '1'; - $safemode = '1'; - $phpsettingid = '1'; - $mod_fcgid_starter = '-1'; - $mod_fcgid_maxrequests = '-1'; - } - - if($userinfo['ip'] != "-1") - { - $admin_ip = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id`='" . (int)$userinfo['ip'] . "' ORDER BY `ip`, `port` ASC"); - $additional_ip_condition = ' AND `ip` = \'' . $admin_ip['ip'] . '\' '; - } - else - { - $additional_ip_condition = ''; - } - - $ipandport = intval($_POST['ipandport']); - $ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ipandport) . "' AND `ssl` = '0'" . $additional_ip_condition); - - if(!isset($ipandport_check['id']) - || $ipandport_check['id'] == '0' - || $ipandport_check['id'] != $ipandport) - { - standard_error('ipportdoesntexist'); - } - - if($settings['system']['use_ssl'] == "1" - && isset($_POST['ssl']) - && isset($_POST['ssl_redirect']) - && isset($_POST['ssl_ipandport']) - && $_POST['ssl'] != '0') - { - $ssl = (int)$_POST['ssl']; - $ssl_redirect = (int)$_POST['ssl_redirect']; - $ssl_ipandport = (int)$_POST['ssl_ipandport']; - $ssl_ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ssl_ipandport) . "' AND `ssl` = '1'" . $additional_ip_condition); - - if(!isset($ssl_ipandport_check['id']) - || $ssl_ipandport_check['id'] == '0' - || $ssl_ipandport_check['id'] != $ssl_ipandport) - { - standard_error('ipportdoesntexist'); - } - } - else - { - $ssl = 0; - $ssl_redirect = 0; - $ssl_ipandport = 0; - } - - if(!preg_match('/^https?\:\/\//', $documentroot)) - { - $documentroot = makeCorrectDir($documentroot); - } - - $domain_check = $db->query_first("SELECT `id`, `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain` = '" . $db->escape(strtolower($domain)) . "'"); - $aliasdomain_check = array( - 'id' => 0 - ); - - if($aliasdomain != 0) - { - $aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\''); - } - - if($openbasedir != '1') - { - $openbasedir = '0'; - } - - if($safemode != '1') - { - $safemode = '0'; - } - - if($speciallogfile != '1') - { - $speciallogfile = '0'; - } - - if($isbinddomain != '1') - { - $isbinddomain = '0'; - } - - if($isemaildomain != '1') - { - $isemaildomain = '0'; - } - - if($email_only == '1') - { - $isemaildomain = '1'; - } - else - { - $email_only = '0'; - } - - if($subcanemaildomain != '1' - && $subcanemaildomain != '2' - && $subcanemaildomain != '3') - { - $subcanemaildomain = '0'; - } - - if($dkim != '1') - { - $dkim = '0'; - } - - if($wwwserveralias != '1') - { - $wwwserveralias = '0'; - } - - if($caneditdomain != '1') - { - $caneditdomain = '0'; - } - - if($domain == '') - { - standard_error(array('stringisempty', 'mydomain')); - } - elseif(!validateDomain($domain)) - { - standard_error(array('stringiswrong', 'mydomain')); - } - elseif($documentroot == '') - { - standard_error(array('stringisempty', 'mydocumentroot')); - } - elseif($customerid == 0) - { - standard_error('adduserfirst'); - } - elseif(strtolower($domain_check['domain']) == strtolower($domain)) - { - standard_error('domainalreadyexists', $idna_convert->decode($domain)); - } - elseif($aliasdomain_check['id'] != $aliasdomain) - { - standard_error('domainisaliasorothercustomer'); - } - else - { - $params = array( - 'page' => $page, - 'action' => $action, - 'domain' => $domain, - 'customerid' => $customerid, - 'adminid' => $adminid, - 'documentroot' => $documentroot, - 'alias' => $aliasdomain, - 'isbinddomain' => $isbinddomain, - 'isemaildomain' => $isemaildomain, - 'email_only' => $email_only, - 'subcanemaildomain' => $subcanemaildomain, - 'caneditdomain' => $caneditdomain, - 'zonefile' => $zonefile, - 'dkim' => $dkim, - 'speciallogfile' => $speciallogfile, - 'wwwserveralias' => $wwwserveralias, - 'ipandport' => $ipandport, - 'ssl' => $ssl, - 'ssl_redirect' => $ssl_redirect, - 'ssl_ipandport' => $ssl_ipandport, - 'openbasedir' => $openbasedir, - 'safemode' => $safemode, - 'phpsettingid' => $phpsettingid, - 'mod_fcgid_starter' => $mod_fcgid_starter, - 'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests, - 'specialsettings' => $specialsettings, - 'registration_date' => $registration_date - ); - - $security_questions = array( - 'reallydisablesecuritysetting' => (($openbasedir == '0' || $safemode == '0') && $userinfo['change_serversettings'] == '1'), - 'reallydocrootoutofcustomerroot' => (substr($documentroot, 0, strlen($customer['documentroot'])) != $customer['documentroot'] && !preg_match('/^https?\:\/\//', $documentroot)) - ); - foreach($security_questions as $question_name => $question_launch) - { - if($question_launch !== false) - { - $params[$question_name] = $question_name; - - if(!isset($_POST[$question_name]) - || $_POST[$question_name] != $question_name) - { - ask_yesno('admin_domain_' . $question_name, $filename, $params); - exit; - } - } - } - - $db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` (`domain`, `customerid`, `adminid`, `documentroot`, `ipandport`,`aliasdomain`, `zonefile`, `dkim`, `wwwserveralias`, `isbinddomain`, `isemaildomain`, `email_only`, `subcanemaildomain`, `caneditdomain`, `openbasedir`, `safemode`,`speciallogfile`, `specialsettings`, `ssl`, `ssl_redirect`, `ssl_ipandport`, `add_date`, `registration_date`, `phpsettingid`, `mod_fcgid_starter`, `mod_fcgid_maxrequests`) VALUES ('" . $db->escape($domain) . "', '" . (int)$customerid . "', '" . (int)$adminid . "', '" . $db->escape($documentroot) . "', '" . $db->escape($ipandport) . "', " . (($aliasdomain != 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", '" . $db->escape($zonefile) . "', '" . $db->escape($dkim) . "', '" . $db->escape($wwwserveralias) . "', '" . $db->escape($isbinddomain) . "', '" . $db->escape($isemaildomain) . "', '" . $db->escape($email_only) . "', '" . $db->escape($subcanemaildomain) . "', '" . $db->escape($caneditdomain) . "', '" . $db->escape($openbasedir) . "', '" . $db->escape($safemode) . "', '" . $db->escape($speciallogfile) . "', '" . $db->escape($specialsettings) . "', '" . $ssl . "', '" . $ssl_redirect . "' , '" . $ssl_ipandport . "', '" . $db->escape(time()) . "', '" . $db->escape($registration_date) . "', '" . (int)$phpsettingid . "', '" . (int)$mod_fcgid_starter . "', '" . (int)$mod_fcgid_maxrequests . "')"); - $domainid = $db->insert_id(); - $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` + 1 WHERE `adminid` = '" . (int)$adminid . "'"); - $log->logAction(ADM_ACTION, LOG_INFO, "added domain '" . $domain . "'"); - inserttask('1'); - inserttask('4'); - redirectTo($filename, Array('page' => $page, 's' => $s)); - } - } - else - { - $customers = makeoption($lng['panel']['please_choose'], 0, 0, true); - $result_customers = $db->query("SELECT `customerid`, `loginname`, `name`, `firstname`, `company` FROM `" . TABLE_PANEL_CUSTOMERS . "` " . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " ORDER BY `name` ASC"); - - while($row_customer = $db->fetch_array($result_customers)) - { - $customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']); - } - - $admins = ''; - - if($userinfo['customers_see_all'] == '1') - { - $result_admins = $db->query("SELECT `adminid`, `loginname`, `name` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `domains_used` < `domains` OR `domains` = '-1' ORDER BY `name` ASC"); - - while($row_admin = $db->fetch_array($result_admins)) - { - $admins.= makeoption(getCorrectFullUserDetails($row_admin) . ' (' . $row_admin['loginname'] . ')', $row_admin['adminid'], $userinfo['adminid']); - } - } - - if($userinfo['ip'] == "-1") - { - $result_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='0' ORDER BY `ip`, `port` ASC"); - $result_ssl_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='1' ORDER BY `ip`, `port` ASC"); - } - else - { - $admin_ip = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id`='" . (int)$userinfo['ip'] . "' ORDER BY `ip`, `port` ASC"); - $result_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='0' AND `ip`='" . $admin_ip['ip'] . "' ORDER BY `ip`, `port` ASC"); - $result_ssl_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='1' AND `ip`='" . $admin_ip['ip'] . "' ORDER BY `ip`, `port` ASC"); - } - - $ipsandports = ''; - - while($row_ipandport = $db->fetch_array($result_ipsandports)) - { - if(filter_var($row_ipandport['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) - { - $row_ipandport['ip'] = '[' . $row_ipandport['ip'] . ']'; - } - - $ipsandports.= makeoption($row_ipandport['ip'] . ':' . $row_ipandport['port'], $row_ipandport['id']); - } - - $ssl_ipsandports = ''; - - while($row_ssl_ipandport = $db->fetch_array($result_ssl_ipsandports)) - { - if(filter_var($row_ssl_ipandport['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) - { - $row_ssl_ipandport['ip'] = '[' . $row_ssl_ipandport['ip'] . ']'; - } - - $ssl_ipsandports.= makeoption($row_ssl_ipandport['ip'] . ':' . $row_ssl_ipandport['port'], $row_ssl_ipandport['id'], $settings['system']['defaultip']); - } - - $ssl = makeyesno('ssl', '1', '0', $result['ssl']); - $ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']); - $standardsubdomains = array(); - $result_standardsubdomains = $db->query('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`, `' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`id`=`c`.`standardsubdomain`'); - - while($row_standardsubdomain = $db->fetch_array($result_standardsubdomains)) - { - $standardsubdomains[] = $db->escape($row_standardsubdomain['id']); - } - - if(count($standardsubdomains) > 0) - { - $standardsubdomains = 'AND `d`.`id` NOT IN (' . join(',', $standardsubdomains) . ') '; - } - else - { - $standardsubdomains = ''; - } - - $domains = makeoption($lng['domains']['noaliasdomain'], 0, NULL, true); - $result_domains = $db->query("SELECT `d`.`id`, `d`.`domain`, `c`.`loginname` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`parentdomainid`=0 " . $standardsubdomains . ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "'") . " AND `d`.`customerid`=`c`.`customerid` ORDER BY `loginname`, `domain` ASC"); - - while($row_domain = $db->fetch_array($result_domains)) - { - $domains.= makeoption($idna_convert->decode($row_domain['domain']) . ' (' . $row_domain['loginname'] . ')', $row_domain['id']); - } - - $phpconfigs = ''; - $configs = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`"); - - while($row = $db->fetch_array($configs)) - { - $phpconfigs.= makeoption($row['description'], $row['id'], '1', true, true); - } - - $isbinddomain = makeyesno('isbinddomain', '1', '0', '1'); - $isemaildomain = makeyesno('isemaildomain', '1', '0', '1'); - $email_only = makeyesno('email_only', '1', '0', '0'); - $subcanemaildomain = makeoption($lng['admin']['subcanemaildomain']['never'], '0', '0', true, true) . makeoption($lng['admin']['subcanemaildomain']['choosableno'], '1', '0', true, true) . makeoption($lng['admin']['subcanemaildomain']['choosableyes'], '2', '0', true, true) . makeoption($lng['admin']['subcanemaildomain']['always'], '3', '0', true, true); - $dkim = makeyesno('dkim', '1', '0', '1'); - $wwwserveralias = makeyesno('wwwserveralias', '1', '0', '1'); - $caneditdomain = makeyesno('caneditdomain', '1', '0', '1'); - $openbasedir = makeyesno('openbasedir', '1', '0', '1'); - $safemode = makeyesno('safemode', '1', '0', '1'); - $speciallogfile = makeyesno('speciallogfile', '1', '0', '0'); - $add_date = date('Y-m-d'); - - eval("echo \"" . getTemplate("domains/domains_add") . "\";"); - } - } - } - elseif($action == 'edit' - && $id != 0) - { - $result = $db->query_first("SELECT `d`.`id`, `d`.`domain`, `d`.`customerid`, `d`.`adminid`, `d`.`email_only`, `d`.`documentroot`, `d`.`ssl`, `d`.`ssl_redirect`, `d`.`ssl_ipandport`,`d`.`ipandport`, `d`.`aliasdomain`, `d`.`isbinddomain`, `d`.`isemaildomain`, `d`.`subcanemaildomain`, `d`.`dkim`, `d`.`caneditdomain`, `d`.`zonefile`, `d`.`wwwserveralias`, `d`.`openbasedir`, `d`.`safemode`, `d`.`speciallogfile`, `d`.`specialsettings`, `d`.`add_date`, `d`.`registration_date`, `c`.`loginname`, `c`.`name`, `c`.`firstname`, `c`.`company`, `d`.`phpsettingid`, `d`.`mod_fcgid_starter`, `d`.`mod_fcgid_maxrequests` " . "FROM `" . TABLE_PANEL_DOMAINS . "` `d` " . "LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) " . "WHERE `d`.`parentdomainid`='0' AND `d`.`id`='" . (int)$id . "'" . ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "' ")); - - if($result['domain'] != '') - { - $subdomains = $db->query_first('SELECT COUNT(`id`) AS count FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `parentdomainid`=\'' . (int)$result['id'] . '\''); - $subdomains = $subdomains['count']; - $alias_check = $db->query_first('SELECT COUNT(`id`) AS count FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$result['id'] . '\''); - $alias_check = $alias_check['count']; - $domain_emails_result = $db->query('SELECT `email`, `email_full`, `destination`, `popaccountid` AS `number_email_forwarders` FROM `' . TABLE_MAIL_VIRTUAL . '` WHERE `customerid` = "' . (int)$result['customerid'] . '" AND `domainid` = "' . (int)$result['id'] . '" '); - $emails = $db->num_rows($domain_emails_result); - $email_forwarders = 0; - $email_accounts = 0; - - while($domain_emails_row = $db->fetch_array($domain_emails_result)) - { - if($domain_emails_row['destination'] != '') - { - $domain_emails_row['destination'] = explode(' ', makeCorrectDestination($domain_emails_row['destination'])); - $email_forwarders+= count($domain_emails_row['destination']); - - if(in_array($domain_emails_row['email_full'], $domain_emails_row['destination'])) - { - $email_forwarders-= 1; - $email_accounts++; - } - } - } - - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - $customer = $customer_old = $db->query_first("SELECT * FROM " . TABLE_PANEL_CUSTOMERS . " WHERE `customerid`='" . (int)$result['customerid'] . "'"); - - if(isset($_POST['customerid']) - && ($customerid = intval($_POST['customerid'])) != $result['customerid'] - && $settings['panel']['allow_domain_change_customer'] == '1') - { - $customer = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$customerid . "' AND (`subdomains_used` + " . (int)$subdomains . " <= `subdomains` OR `subdomains` = '-1' ) AND (`emails_used` + " . (int)$emails . " <= `emails` OR `emails` = '-1' ) AND (`email_forwarders_used` + " . (int)$email_forwarders . " <= `email_forwarders` OR `email_forwarders` = '-1' ) AND (`email_accounts_used` + " . (int)$email_accounts . " <= `email_accounts` OR `email_accounts` = '-1' ) " . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " "); - - if(empty($customer) - || $customer['customerid'] != $customerid) - { - standard_error('customerdoesntexist'); - } - } - else - { - $customerid = $result['customerid']; - } - - $admin = $admin_old = $db->query_first("SELECT * FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$result['adminid'] . "' "); - - if($userinfo['customers_see_all'] == '1') - { - if(isset($_POST['adminid']) - && ($adminid = intval($_POST['adminid'])) != $result['adminid'] - && $settings['panel']['allow_domain_change_admin'] == '1') - { - $admin = $db->query_first("SELECT * FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$adminid . "' AND ( `domains_used` < `domains` OR `domains` = '-1' )"); - - if(empty($admin) - || $admin['adminid'] != $adminid) - { - standard_error('admindoesntexist'); - } - } - else - { - $adminid = $result['adminid']; - } - } - else - { - $adminid = $result['adminid']; - } - - $aliasdomain = intval($_POST['alias']); - $isemaildomain = intval($_POST['isemaildomain']); - $email_only = intval($_POST['email_only']); - $subcanemaildomain = intval($_POST['subcanemaildomain']); - $caneditdomain = intval($_POST['caneditdomain']); - $wwwserveralias = intval($_POST['wwwserveralias']); - $registration_date = validate($_POST['registration_date'], 'registration_date', '/^(19|20)\d\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/', '', array('0000-00-00', '0', '')); - - if($userinfo['change_serversettings'] == '1') - { - $isbinddomain = intval($_POST['isbinddomain']); - $zonefile = validate($_POST['zonefile'], 'zonefile'); - - if($settings['dkim']['use_dkim'] == '1') - { - $dkim = intval($_POST['dkim']); - } - else - { - $dkim = $result['dkim']; - } - - $specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/'); - $documentroot = validate($_POST['documentroot'], 'documentroot'); - - if($documentroot == '') - { - $documentroot = $customer['documentroot']; - } - } - else - { - $isbinddomain = $result['isbinddomain']; - $zonefile = $result['zonefile']; - $dkim = $result['dkim']; - $specialsettings = $result['specialsettings']; - $documentroot = $result['documentroot']; - } - - if($userinfo['caneditphpsettings'] == '1' - || $userinfo['change_serversettings'] == '1') - { - $openbasedir = intval($_POST['openbasedir']); - $safemode = intval($_POST['safemode']); - - if((int)$settings['system']['mod_fcgid'] == 1) - { - $phpsettingid = (int)$_POST['phpsettingid']; - $phpsettingid_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = " . (int)$phpsettingid); - - if(!isset($phpsettingid_check['id']) - || $phpsettingid_check['id'] == '0' - || $phpsettingid_check['id'] != $phpsettingid) - { - standard_error('phpsettingidwrong'); - } - - $mod_fcgid_starter = validate($_POST['mod_fcgid_starter'], 'mod_fcgid_starter', '/^[0-9]*$/', '', array('-1', '')); - $mod_fcgid_maxrequests = validate($_POST['mod_fcgid_maxrequests'], 'mod_fcgid_maxrequests', '/^[0-9]*$/', '', array('-1', '')); - } - else - { - $phpsettingid = $result['phpsettingid']; - $mod_fcgid_starter = $result['mod_fcgid_starter']; - $mod_fcgid_maxrequests = $result['mod_fcgid_maxrequests']; - } - } - else - { - $openbasedir = $result['openbasedir']; - $safemode = $result['safemode']; - $phpsettingid = $result['phpsettingid']; - $mod_fcgid_starter = $result['mod_fcgid_starter']; - $mod_fcgid_maxrequests = $result['mod_fcgid_maxrequests']; - } - - if($userinfo['ip'] != "-1") - { - $admin_ip = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id`='" . (int)$userinfo['ip'] . "' ORDER BY `ip`, `port` ASC"); - $additional_ip_condition = ' AND `ip` = \'' . $admin_ip['ip'] . '\' '; - } - else - { - $additional_ip_condition = ''; - } - - $ipandport = intval($_POST['ipandport']); - $ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ipandport) . "' AND `ssl` = '0'" . $additional_ip_condition); - - if(!isset($ipandport_check['id']) - || $ipandport_check['id'] == '0' - || $ipandport_check['id'] != $ipandport) - { - standard_error('ipportdoesntexist'); - } - - if($settings['system']['use_ssl'] == "1" - && isset($_POST['ssl']) - && isset($_POST['ssl_redirect']) - && isset($_POST['ssl_ipandport']) - && $_POST['ssl'] != '0') - { - $ssl = (int)$_POST['ssl']; - $ssl_redirect = (int)$_POST['ssl_redirect']; - $ssl_ipandport = (int)$_POST['ssl_ipandport']; - $ssl_ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ssl_ipandport) . "' AND `ssl` = '1'" . $additional_ip_condition); - - if(!isset($ssl_ipandport_check['id']) - || $ssl_ipandport_check['id'] == '0' - || $ssl_ipandport_check['id'] != $ssl_ipandport) - { - standard_error('ipportdoesntexist'); - } - } - else - { - $ssl = 0; - $ssl_redirect = 0; - $ssl_ipandport = 0; - } - - if(!preg_match('/^https?\:\/\//', $documentroot)) - { - $documentroot = makeCorrectDir($documentroot); - } - - if($openbasedir != '1') - { - $openbasedir = '0'; - } - - if($safemode != '1') - { - $safemode = '0'; - } - - if($isbinddomain != '1') - { - $isbinddomain = '0'; - } - - if($isemaildomain != '1') - { - $isemaildomain = '0'; - } - - if($email_only == '1') - { - $isemaildomain = '1'; - } - else - { - $email_only = '0'; - } - - if($subcanemaildomain != '1' - && $subcanemaildomain != '2' - && $subcanemaildomain != '3') - { - $subcanemaildomain = '0'; - } - - if($dkim != '1') - { - $dkim = '0'; - } - - if($caneditdomain != '1') - { - $caneditdomain = '0'; - } - - $aliasdomain_check = array( - 'id' => 0 - ); - - if($aliasdomain != 0) - { - $aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\''); - } - - if($aliasdomain_check['id'] != $aliasdomain) - { - standard_error('domainisaliasorothercustomer'); - } - - $params = array( - 'id' => $id, - 'page' => $page, - 'action' => $action, - 'customerid' => $customerid, - 'adminid' => $adminid, - 'documentroot' => $documentroot, - 'alias' => $aliasdomain, - 'isbinddomain' => $isbinddomain, - 'isemaildomain' => $isemaildomain, - 'email_only' => $email_only, - 'subcanemaildomain' => $subcanemaildomain, - 'caneditdomain' => $caneditdomain, - 'zonefile' => $zonefile, - 'dkim' => $dkim, - 'wwwserveralias' => $wwwserveralias, - 'ipandport' => $ipandport, - 'ssl' => $ssl, - 'ssl_redirect' => $ssl_redirect, - 'ssl_ipandport' => $ssl_ipandport, - 'openbasedir' => $openbasedir, - 'safemode' => $safemode, - 'phpsettingid' => $phpsettingid, - 'mod_fcgid_starter' => $mod_fcgid_starter, - 'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests, - 'specialsettings' => $specialsettings, - 'registration_date' => $registration_date - ); - - $security_questions = array( - 'reallydisablesecuritysetting' => (($openbasedir == '0' || $safemode == '0') && $userinfo['change_serversettings'] == '1'), - 'reallydocrootoutofcustomerroot' => (substr($documentroot, 0, strlen($customer['documentroot'])) != $customer['documentroot'] && !preg_match('/^https?\:\/\//', $documentroot)) - ); - foreach($security_questions as $question_name => $question_launch) - { - if($question_launch !== false) - { - $params[$question_name] = $question_name; - - if(!isset($_POST[$question_name]) - || $_POST[$question_name] != $question_name) - { - ask_yesno('admin_domain_' . $question_name, $filename, $params); - exit; - } - } - } - - if($documentroot != $result['documentroot'] - || $ipandport != $result['ipandport'] - || $ssl != $result['ssl'] - || $ssl_redirect != $result['ssl_redirect'] - || $ssl_ipandport != $result['ssl_ipandport'] - || $wwwserveralias != $result['wwwserveralias'] - || $openbasedir != $result['openbasedir'] - || $safemode != $result['safemode'] - || $phpsettingid != $result['phpsettingid'] - || $mod_fcgid_starter != $result['mod_fcgid_starter'] - || $mod_fcgid_maxrequests != $result['mod_fcgid_maxrequests'] - || $specialsettings != $result['specialsettings'] - || $aliasdomain != $result['aliasdomain']) - { - inserttask('1'); - } - - if($isbinddomain != $result['isbinddomain'] - || $zonefile != $result['zonefile'] - || $dkim != $result['dkim'] - || $ipandport != $result['ipandport']) - { - inserttask('4'); - } - - if($isemaildomain == '0' - && $result['isemaildomain'] == '1') - { - $db->query("DELETE FROM `" . TABLE_MAIL_USERS . "` WHERE `domainid`='" . (int)$id . "' "); - $db->query("DELETE FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `domainid`='" . (int)$id . "' "); - $log->logAction(ADM_ACTION, LOG_NOTICE, "deleted domain #" . $id . " from mail-tables"); - } - - $updatechildren = ''; - - if($subcanemaildomain == '0' - && $result['subcanemaildomain'] != '0') - { - $updatechildren = ', `isemaildomain`=\'0\' '; - } - elseif($subcanemaildomain == '3' - && $result['subcanemaildomain'] != '3') - { - $updatechildren = ', `isemaildomain`=\'1\' '; - } - - if($customerid != $result['customerid'] - && $settings['panel']['allow_domain_change_customer'] == '1') - { - $db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `customerid` = '" . (int)$customerid . "' WHERE `domainid` = '" . (int)$result['id'] . "' "); - $db->query("UPDATE `" . TABLE_MAIL_VIRTUAL . "` SET `customerid` = '" . (int)$customerid . "' WHERE `domainid` = '" . (int)$result['id'] . "' "); - $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used` = `subdomains_used` + '" . (int)$subdomains . "', `emails_used` = `emails_used` + '" . (int)$emails . "', `email_forwarders_used` = `email_forwarders_used` + '" . (int)$email_forwarders . "', `email_accounts_used` = `email_accounts_used` + '" . (int)$email_accounts . "' WHERE `customerid` = '" . (int)$customerid . "' "); - $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used` = `subdomains_used` - '" . (int)$subdomains . "', `emails_used` = `emails_used` - '" . (int)$emails . "', `email_forwarders_used` = `email_forwarders_used` - '" . (int)$email_forwarders . "', `email_accounts_used` = `email_accounts_used` - '" . (int)$email_accounts . "' WHERE `customerid` = '" . (int)$result['customerid'] . "' "); - } - - if($adminid != $result['adminid'] - && $settings['panel']['allow_domain_change_admin'] == '1') - { - $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` + 1 WHERE `adminid` = '" . (int)$adminid . "' "); - $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` - 1 WHERE `adminid` = '" . (int)$result['adminid'] . "' "); - } - - $result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `documentroot`='" . $db->escape($documentroot) . "', `ipandport`='" . $db->escape($ipandport) . "', `ssl`='" . (int)$ssl . "', `ssl_redirect`='" . (int)$ssl_redirect . "', `ssl_ipandport`='" . (int)$ssl_ipandport . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", `isbinddomain`='" . $db->escape($isbinddomain) . "', `isemaildomain`='" . $db->escape($isemaildomain) . "', `email_only`='" . $db->escape($email_only) . "', `subcanemaildomain`='" . $db->escape($subcanemaildomain) . "', `dkim`='" . $db->escape($dkim) . "', `caneditdomain`='" . $db->escape($caneditdomain) . "', `zonefile`='" . $db->escape($zonefile) . "', `wwwserveralias`='" . $db->escape($wwwserveralias) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "', `specialsettings`='" . $db->escape($specialsettings) . "', `registration_date`='" . $db->escape($registration_date) . "' WHERE `id`='" . (int)$id . "'"); - $result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `ipandport`='" . $db->escape($ipandport) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "', `specialsettings`='" . $db->escape($specialsettings) . "'" . $updatechildren . " WHERE `parentdomainid`='" . (int)$id . "'"); - $log->logAction(ADM_ACTION, LOG_INFO, "edited domain #" . $id); - $redirect_props = Array( - 'page' => $page, - 's' => $s - ); - - redirectTo($filename, $redirect_props); - } - else - { - if($settings['panel']['allow_domain_change_customer'] == '1') - { - $customers = ''; - $result_customers = $db->query("SELECT `customerid`, `loginname`, `name`, `firstname`, `company` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE ( (`subdomains_used` + " . (int)$subdomains . " <= `subdomains` OR `subdomains` = '-1' ) AND (`emails_used` + " . (int)$emails . " <= `emails` OR `emails` = '-1' ) AND (`email_forwarders_used` + " . (int)$email_forwarders . " <= `email_forwarders` OR `email_forwarders` = '-1' ) AND (`email_accounts_used` + " . (int)$email_accounts . " <= `email_accounts` OR `email_accounts` = '-1' ) " . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' ") . ") OR `customerid` = '" . (int)$result['customerid'] . "' ORDER BY `name` ASC"); - - while($row_customer = $db->fetch_array($result_customers)) - { - $customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid'], $result['customerid']); - } - } - else - { - $customer = $db->query_first("SELECT `customerid`, `loginname`, `name`, `firstname`, `company` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid` = '" . (int)$result['customerid'] . "'"); - $result['customername'] = getCorrectFullUserDetails($customer) . ' (' . $customer['loginname'] . ')'; - } - - if($userinfo['customers_see_all'] == '1') - { - if($settings['panel']['allow_domain_change_admin'] == '1') - { - $admins = ''; - $result_admins = $db->query("SELECT `adminid`, `loginname`, `name` FROM `" . TABLE_PANEL_ADMINS . "` WHERE (`domains_used` < `domains` OR `domains` = '-1') OR `adminid` = '" . (int)$result['adminid'] . "' ORDER BY `name` ASC"); - - while($row_admin = $db->fetch_array($result_admins)) - { - $admins.= makeoption(getCorrectFullUserDetails($row_admin) . ' (' . $row_admin['loginname'] . ')', $row_admin['adminid'], $result['adminid']); - } - } - else - { - $admin = $db->query_first("SELECT `adminid`, `loginname`, `name` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid` = '" . (int)$result['adminid'] . "'"); - $result['adminname'] = getCorrectFullUserDetails($admin) . ' (' . $admin['loginname'] . ')'; - } - } - - $result['domain'] = $idna_convert->decode($result['domain']); - $domains = makeoption($lng['domains']['noaliasdomain'], 0, NULL, true); - $result_domains = $db->query("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`parentdomainid`=0 AND `d`.`id`<>'" . (int)$result['id'] . "' AND `c`.`standardsubdomain`<>`d`.`id` AND `d`.`customerid`='" . (int)$result['customerid'] . "' AND `c`.`customerid`=`d`.`customerid` ORDER BY `d`.`domain` ASC"); - - while($row_domain = $db->fetch_array($result_domains)) - { - $domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id'], $result['aliasdomain']); - } - - if($userinfo['ip'] == "-1") - { - $result_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='0' ORDER BY `ip`, `port` ASC"); - $result_ssl_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='1' ORDER BY `ip`, `port` ASC"); - } - else - { - $admin_ip = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id`='" . (int)$userinfo['ip'] . "' ORDER BY `ip`, `port` ASC"); - $result_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='0' AND `ip`='" . $admin_ip['ip'] . "' ORDER BY `ip`, `port` ASC"); - $result_ssl_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='1' AND `ip`='" . $admin_ip['ip'] . "' ORDER BY `ip`, `port` ASC"); - } - - $ipsandports = ''; - - while($row_ipandport = $db->fetch_array($result_ipsandports)) - { - if(filter_var($row_ipandport['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) - { - $row_ipandport['ip'] = '[' . $row_ipandport['ip'] . ']'; - } - - $ipsandports.= makeoption($row_ipandport['ip'] . ':' . $row_ipandport['port'], $row_ipandport['id'], $result['ipandport']); - } - - $ssl_ipsandports = ''; - - while($row_ssl_ipandport = $db->fetch_array($result_ssl_ipsandports)) - { - if(filter_var($row_ssl_ipandport['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) - { - $row_ssl_ipandport['ip'] = '[' . $row_ssl_ipandport['ip'] . ']'; - } - - $ssl_ipsandports.= makeoption($row_ssl_ipandport['ip'] . ':' . $row_ssl_ipandport['port'], $row_ssl_ipandport['id'], $result['ssl_ipandport']); - } - - $result['specialsettings'] = $result['specialsettings']; - $isbinddomain = makeyesno('isbinddomain', '1', '0', $result['isbinddomain']); - $wwwserveralias = makeyesno('wwwserveralias', '1', '0', $result['wwwserveralias']); - $isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']); - $email_only = makeyesno('email_only', '1', '0', $result['email_only']); - $ssl = makeyesno('ssl', '1', '0', $result['ssl']); - $ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']); - $subcanemaildomain = makeoption($lng['admin']['subcanemaildomain']['never'], '0', $result['subcanemaildomain'], true, true); - $subcanemaildomain.= makeoption($lng['admin']['subcanemaildomain']['choosableno'], '1', $result['subcanemaildomain'], true, true); - $subcanemaildomain.= makeoption($lng['admin']['subcanemaildomain']['choosableyes'], '2', $result['subcanemaildomain'], true, true); - $subcanemaildomain.= makeoption($lng['admin']['subcanemaildomain']['always'], '3', $result['subcanemaildomain'], true, true); - $dkim = makeyesno('dkim', '1', '0', $result['dkim']); - $caneditdomain = makeyesno('caneditdomain', '1', '0', $result['caneditdomain']); - $openbasedir = makeyesno('openbasedir', '1', '0', $result['openbasedir']); - $safemode = makeyesno('safemode', '1', '0', $result['safemode']); - $speciallogfile = ($result['speciallogfile'] == 1 ? $lng['panel']['yes'] : $lng['panel']['no']); - $result['add_date'] = date('Y-m-d', $result['add_date']); - - $phpconfigs = ''; - $phpconfigs_result = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`"); - - while($phpconfigs_row = $db->fetch_array($phpconfigs_result)) - { - $phpconfigs.= makeoption($phpconfigs_row['description'], $phpconfigs_row['id'], $result['phpsettingid'], true, true); - } - - $result = htmlentities_array($result); - eval("echo \"" . getTemplate("domains/domains_edit") . "\";"); - } - } - } -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Panel + * @version $Id$ + */ + +define('AREA', 'admin'); + +/** + * Include our init.php, which manages Sessions, Language etc. + */ + +require ("./lib/init.php"); + +if(isset($_POST['id'])) +{ + $id = intval($_POST['id']); +} +elseif(isset($_GET['id'])) +{ + $id = intval($_GET['id']); +} + +if($page == 'domains' + || $page == 'overview') +{ + // Let's see how many customers we have + + $countcustomers = $db->query_first("SELECT COUNT(`customerid`) as `countcustomers` FROM `" . TABLE_PANEL_CUSTOMERS . "` " . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int)$userinfo['adminid'] . "' ") . ""); + $countcustomers = (int)$countcustomers['countcustomers']; + + if($action == '') + { + $log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_domains"); + $fields = array( + 'd.domain' => $lng['domains']['domainname'], + 'ip.ip' => $lng['admin']['ipsandports']['ip'], + 'ip.port' => $lng['admin']['ipsandports']['port'], + 'c.name' => $lng['customer']['name'], + 'c.firstname' => $lng['customer']['firstname'], + 'c.company' => $lng['customer']['company'], + 'c.loginname' => $lng['login']['username'], + 'd.aliasdomain' => $lng['domains']['aliasdomain'] + ); + $paging = new paging($userinfo, $db, TABLE_PANEL_DOMAINS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']); + $domains = ''; + $result = $db->query("SELECT `d`.*, `c`.`loginname`, `c`.`name`, `c`.`firstname`, `c`.`company`, `c`.`standardsubdomain`, `ad`.`id` AS `aliasdomainid`, `ad`.`domain` AS `aliasdomain`, `ip`.`id` AS `ipid`, `ip`.`ip`, `ip`.`port` " . "FROM `" . TABLE_PANEL_DOMAINS . "` `d` " . "LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) " . "LEFT JOIN `" . TABLE_PANEL_DOMAINS . "` `ad` ON `d`.`aliasdomain`=`ad`.`id` " . "LEFT JOIN `" . TABLE_PANEL_IPSANDPORTS . "` `ip` ON (`d`.`ipandport` = `ip`.`id`) " . "WHERE `d`.`parentdomainid`='0' " . ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "' ") . " " . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit()); + $paging->setEntries($db->num_rows($result)); + $sortcode = $paging->getHtmlSortCode($lng); + $arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s); + $searchcode = $paging->getHtmlSearchCode($lng); + $pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s); + $domain_array = array(); + + while($row = $db->fetch_array($result)) + { + $row['domain'] = $idna_convert->decode($row['domain']); + $row['aliasdomain'] = $idna_convert->decode($row['aliasdomain']); + + if(filter_var($row['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) + { + $row['ipandport'] = '[' . $row['ip'] . ']:' . $row['port']; + } + else + { + $row['ipandport'] = $row['ip'] . ':' . $row['port']; + } + + if(!isset($domain_array[$row['domain']])) + { + $domain_array[$row['domain']] = $row; + } + else + { + $domain_array[$row['domain']] = array_merge($row, $domain_array[$row['domain']]); + } + + if(isset($row['aliasdomainid']) && $row['aliasdomainid'] != NULL && isset($row['aliasdomain']) && $row['aliasdomain'] != '') + { + if(!isset($domain_array[$row['aliasdomain']])) + { + $domain_array[$row['aliasdomain']] = array(); + } + + $domain_array[$row['aliasdomain']]['domainaliasid'] = $row['id']; + $domain_array[$row['aliasdomain']]['domainalias'] = $row['domain']; + } + } + + /** + * We need ksort/krsort here to make sure idna-domains are also sorted correctly + */ + + if($paging->sortfield == 'd.domain' + && $paging->sortorder == 'asc') + { + ksort($domain_array); + } + elseif($paging->sortfield == 'd.domain' + && $paging->sortorder == 'desc') + { + krsort($domain_array); + } + + $i = 0; + $count = 0; + foreach($domain_array as $row) + { + if(isset($row['domain']) && $row['domain'] != '' && $paging->checkDisplay($i)) + { + $row['customername'] = getCorrectFullUserDetails($row); + $row = htmlentities_array($row); + eval("\$domains.=\"" . getTemplate("domains/domains_domain") . "\";"); + $count++; + } + + $i++; + } + + // Display the list + + eval("echo \"" . getTemplate("domains/domains") . "\";"); + } + elseif($action == 'delete' + && $id != 0) + { + + $result = $db->query_first("SELECT `d`.`id`, `d`.`domain`, `d`.`customerid`, `d`.`documentroot`, `d`.`isemaildomain`, `d`.`zonefile` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`id`='" . (int)$id . "' AND `d`.`id` <> `c`.`standardsubdomain`" . ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "' ")); + $alias_check = $db->query_first('SELECT COUNT(`id`) AS `count` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$id . '\''); + + if($result['domain'] != '' + && $alias_check['count'] == 0) + { + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + $query = 'SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE (`id`="' . (int)$id . '" OR `parentdomainid`="' . (int)$id . '") AND `isemaildomain`="1"'; + $subResult = $db->query($query); + $idString = array(); + + while($subRow = $db->fetch_array($subResult)) + { + $idString[] = '`domainid` = "' . (int)$subRow['id'] . '"'; + } + + $idString = implode(' OR ', $idString); + + if($idString != '') + { + $query = 'DELETE FROM `' . TABLE_MAIL_USERS . '` WHERE ' . $idString; + $db->query($query); + $query = 'DELETE FROM `' . TABLE_MAIL_VIRTUAL . '` WHERE ' . $idString; + $db->query($query); + $log->logAction(ADM_ACTION, LOG_NOTICE, "deleted domain/s from mail-tables"); + } + + $db->query("DELETE FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `id`='" . (int)$id . "' OR `parentdomainid`='" . (int)$result['id'] . "'"); + $deleted_domains = (int)$db->affected_rows(); + $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used` = `subdomains_used` - " . (int)($deleted_domains - 1) . " WHERE `customerid` = '" . (int)$result['customerid'] . "'"); + $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` - 1 WHERE `adminid` = '" . (int)$userinfo['adminid'] . "'"); + $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'0\' WHERE `standardsubdomain`=\'' . (int)$result['id'] . '\' AND `customerid`=\'' . (int)$result['customerid'] . '\''); + $log->logAction(ADM_ACTION, LOG_INFO, "deleted domain/subdomains (#" . $result['id'] . ")"); + updateCounters(); + inserttask('1'); + inserttask('4'); + redirectTo($filename, Array('page' => $page, 's' => $s)); + } + else + { + ask_yesno('admin_domain_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $idna_convert->decode($result['domain'])); + } + } + } + elseif($action == 'add') + { + if($userinfo['domains_used'] < $userinfo['domains'] + || $userinfo['domains'] == '-1') + { + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + if($_POST['domain'] == $settings['system']['hostname']) + { + standard_error('admin_domain_emailsystemhostname'); + exit; + } + + $domain = $idna_convert->encode(preg_replace(Array('/\:(\d)+$/', '/^https?\:\/\//'), '', validate($_POST['domain'], 'domain'))); + $subcanemaildomain = intval($_POST['subcanemaildomain']); + $isemaildomain = intval($_POST['isemaildomain']); + $email_only = intval($_POST['email_only']); + $wwwserveralias = intval($_POST['wwwserveralias']); + $speciallogfile = intval($_POST['speciallogfile']); + $aliasdomain = intval($_POST['alias']); + $customerid = intval($_POST['customerid']); + $customer = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$customerid . "' " . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " "); + + if(empty($customer) + || $customer['customerid'] != $customerid) + { + standard_error('customerdoesntexist'); + } + + if($userinfo['customers_see_all'] == '1') + { + $adminid = intval($_POST['adminid']); + $admin = $db->query_first("SELECT * FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$adminid . "' AND ( `domains_used` < `domains` OR `domains` = '-1' )"); + + if(empty($admin) + || $admin['adminid'] != $adminid) + { + standard_error('admindoesntexist'); + } + } + else + { + $adminid = $userinfo['adminid']; + $admin = $userinfo; + } + + $documentroot = $customer['documentroot']; + $registration_date = validate($_POST['registration_date'], 'registration_date', '/^(19|20)\d\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/', '', array('0000-00-00', '0', '')); + + if($userinfo['change_serversettings'] == '1') + { + $isbinddomain = intval($_POST['isbinddomain']); + $caneditdomain = intval($_POST['caneditdomain']); + $zonefile = validate($_POST['zonefile'], 'zonefile'); + + if(isset($_POST['dkim'])) + { + $dkim = intval($_POST['dkim']); + } + else + { + $dkim = '1'; + } + + $specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/'); + validate($_POST['documentroot'], 'documentroot'); + + if(isset($_POST['documentroot']) + && $_POST['documentroot'] != '') + { + if(substr($_POST['documentroot'], 0, 1) != '/' + && !preg_match('/^https?\:\/\//', $_POST['documentroot'])) + { + $documentroot.= '/' . $_POST['documentroot']; + } + else + { + $documentroot = $_POST['documentroot']; + } + } + } + else + { + $isbinddomain = '1'; + $caneditdomain = '1'; + $zonefile = ''; + $dkim = '1'; + $specialsettings = ''; + } + + if($userinfo['caneditphpsettings'] == '1' + || $userinfo['change_serversettings'] == '1') + { + $openbasedir = intval($_POST['openbasedir']); + $safemode = intval($_POST['safemode']); + + if((int)$settings['system']['mod_fcgid'] == 1) + { + $phpsettingid = (int)$_POST['phpsettingid']; + $phpsettingid_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = " . (int)$phpsettingid); + + if(!isset($phpsettingid_check['id']) + || $phpsettingid_check['id'] == '0' + || $phpsettingid_check['id'] != $phpsettingid) + { + standard_error('phpsettingidwrong'); + } + + $mod_fcgid_starter = validate($_POST['mod_fcgid_starter'], 'mod_fcgid_starter', '/^[0-9]*$/', '', array('-1', '')); + $mod_fcgid_maxrequests = validate($_POST['mod_fcgid_maxrequests'], 'mod_fcgid_maxrequests', '/^[0-9]*$/', '', array('-1', '')); + } + else + { + $phpsettingid = '1'; + $mod_fcgid_starter = '-1'; + $mod_fcgid_maxrequests = '-1'; + } + } + else + { + $openbasedir = '1'; + $safemode = '1'; + $phpsettingid = '1'; + $mod_fcgid_starter = '-1'; + $mod_fcgid_maxrequests = '-1'; + } + + if($userinfo['ip'] != "-1") + { + $admin_ip = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id`='" . (int)$userinfo['ip'] . "' ORDER BY `ip`, `port` ASC"); + $additional_ip_condition = ' AND `ip` = \'' . $admin_ip['ip'] . '\' '; + } + else + { + $additional_ip_condition = ''; + } + + $ipandport = intval($_POST['ipandport']); + $ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ipandport) . "' AND `ssl` = '0'" . $additional_ip_condition); + + if(!isset($ipandport_check['id']) + || $ipandport_check['id'] == '0' + || $ipandport_check['id'] != $ipandport) + { + standard_error('ipportdoesntexist'); + } + + if($settings['system']['use_ssl'] == "1" + && isset($_POST['ssl']) + && isset($_POST['ssl_redirect']) + && isset($_POST['ssl_ipandport']) + && $_POST['ssl'] != '0') + { + $ssl = (int)$_POST['ssl']; + $ssl_redirect = (int)$_POST['ssl_redirect']; + $ssl_ipandport = (int)$_POST['ssl_ipandport']; + $ssl_ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ssl_ipandport) . "' AND `ssl` = '1'" . $additional_ip_condition); + + if(!isset($ssl_ipandport_check['id']) + || $ssl_ipandport_check['id'] == '0' + || $ssl_ipandport_check['id'] != $ssl_ipandport) + { + standard_error('ipportdoesntexist'); + } + } + else + { + $ssl = 0; + $ssl_redirect = 0; + $ssl_ipandport = 0; + } + + if(!preg_match('/^https?\:\/\//', $documentroot)) + { + $documentroot = makeCorrectDir($documentroot); + } + + $domain_check = $db->query_first("SELECT `id`, `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain` = '" . $db->escape(strtolower($domain)) . "'"); + $aliasdomain_check = array( + 'id' => 0 + ); + + if($aliasdomain != 0) + { + $aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$customerid . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\''); + } + + if($openbasedir != '1') + { + $openbasedir = '0'; + } + + if($safemode != '1') + { + $safemode = '0'; + } + + if($speciallogfile != '1') + { + $speciallogfile = '0'; + } + + if($isbinddomain != '1') + { + $isbinddomain = '0'; + } + + if($isemaildomain != '1') + { + $isemaildomain = '0'; + } + + if($email_only == '1') + { + $isemaildomain = '1'; + } + else + { + $email_only = '0'; + } + + if($subcanemaildomain != '1' + && $subcanemaildomain != '2' + && $subcanemaildomain != '3') + { + $subcanemaildomain = '0'; + } + + if($dkim != '1') + { + $dkim = '0'; + } + + if($wwwserveralias != '1') + { + $wwwserveralias = '0'; + } + + if($caneditdomain != '1') + { + $caneditdomain = '0'; + } + + if($domain == '') + { + standard_error(array('stringisempty', 'mydomain')); + } + elseif(!validateDomain($domain)) + { + standard_error(array('stringiswrong', 'mydomain')); + } + elseif($documentroot == '') + { + standard_error(array('stringisempty', 'mydocumentroot')); + } + elseif($customerid == 0) + { + standard_error('adduserfirst'); + } + elseif(strtolower($domain_check['domain']) == strtolower($domain)) + { + standard_error('domainalreadyexists', $idna_convert->decode($domain)); + } + elseif($aliasdomain_check['id'] != $aliasdomain) + { + standard_error('domainisaliasorothercustomer'); + } + else + { + $params = array( + 'page' => $page, + 'action' => $action, + 'domain' => $domain, + 'customerid' => $customerid, + 'adminid' => $adminid, + 'documentroot' => $documentroot, + 'alias' => $aliasdomain, + 'isbinddomain' => $isbinddomain, + 'isemaildomain' => $isemaildomain, + 'email_only' => $email_only, + 'subcanemaildomain' => $subcanemaildomain, + 'caneditdomain' => $caneditdomain, + 'zonefile' => $zonefile, + 'dkim' => $dkim, + 'speciallogfile' => $speciallogfile, + 'wwwserveralias' => $wwwserveralias, + 'ipandport' => $ipandport, + 'ssl' => $ssl, + 'ssl_redirect' => $ssl_redirect, + 'ssl_ipandport' => $ssl_ipandport, + 'openbasedir' => $openbasedir, + 'safemode' => $safemode, + 'phpsettingid' => $phpsettingid, + 'mod_fcgid_starter' => $mod_fcgid_starter, + 'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests, + 'specialsettings' => $specialsettings, + 'registration_date' => $registration_date + ); + + $security_questions = array( + 'reallydisablesecuritysetting' => (($openbasedir == '0' || $safemode == '0') && $userinfo['change_serversettings'] == '1'), + 'reallydocrootoutofcustomerroot' => (substr($documentroot, 0, strlen($customer['documentroot'])) != $customer['documentroot'] && !preg_match('/^https?\:\/\//', $documentroot)) + ); + foreach($security_questions as $question_name => $question_launch) + { + if($question_launch !== false) + { + $params[$question_name] = $question_name; + + if(!isset($_POST[$question_name]) + || $_POST[$question_name] != $question_name) + { + ask_yesno('admin_domain_' . $question_name, $filename, $params); + exit; + } + } + } + + $db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` (`domain`, `customerid`, `adminid`, `documentroot`, `ipandport`,`aliasdomain`, `zonefile`, `dkim`, `wwwserveralias`, `isbinddomain`, `isemaildomain`, `email_only`, `subcanemaildomain`, `caneditdomain`, `openbasedir`, `safemode`,`speciallogfile`, `specialsettings`, `ssl`, `ssl_redirect`, `ssl_ipandport`, `add_date`, `registration_date`, `phpsettingid`, `mod_fcgid_starter`, `mod_fcgid_maxrequests`) VALUES ('" . $db->escape($domain) . "', '" . (int)$customerid . "', '" . (int)$adminid . "', '" . $db->escape($documentroot) . "', '" . $db->escape($ipandport) . "', " . (($aliasdomain != 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", '" . $db->escape($zonefile) . "', '" . $db->escape($dkim) . "', '" . $db->escape($wwwserveralias) . "', '" . $db->escape($isbinddomain) . "', '" . $db->escape($isemaildomain) . "', '" . $db->escape($email_only) . "', '" . $db->escape($subcanemaildomain) . "', '" . $db->escape($caneditdomain) . "', '" . $db->escape($openbasedir) . "', '" . $db->escape($safemode) . "', '" . $db->escape($speciallogfile) . "', '" . $db->escape($specialsettings) . "', '" . $ssl . "', '" . $ssl_redirect . "' , '" . $ssl_ipandport . "', '" . $db->escape(time()) . "', '" . $db->escape($registration_date) . "', '" . (int)$phpsettingid . "', '" . (int)$mod_fcgid_starter . "', '" . (int)$mod_fcgid_maxrequests . "')"); + $domainid = $db->insert_id(); + $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` + 1 WHERE `adminid` = '" . (int)$adminid . "'"); + $log->logAction(ADM_ACTION, LOG_INFO, "added domain '" . $domain . "'"); + inserttask('1'); + inserttask('4'); + redirectTo($filename, Array('page' => $page, 's' => $s)); + } + } + else + { + $customers = makeoption($lng['panel']['please_choose'], 0, 0, true); + $result_customers = $db->query("SELECT `customerid`, `loginname`, `name`, `firstname`, `company` FROM `" . TABLE_PANEL_CUSTOMERS . "` " . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " ORDER BY `name` ASC"); + + while($row_customer = $db->fetch_array($result_customers)) + { + $customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid']); + } + + $admins = ''; + + if($userinfo['customers_see_all'] == '1') + { + $result_admins = $db->query("SELECT `adminid`, `loginname`, `name` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `domains_used` < `domains` OR `domains` = '-1' ORDER BY `name` ASC"); + + while($row_admin = $db->fetch_array($result_admins)) + { + $admins.= makeoption(getCorrectFullUserDetails($row_admin) . ' (' . $row_admin['loginname'] . ')', $row_admin['adminid'], $userinfo['adminid']); + } + } + + if($userinfo['ip'] == "-1") + { + $result_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='0' ORDER BY `ip`, `port` ASC"); + $result_ssl_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='1' ORDER BY `ip`, `port` ASC"); + } + else + { + $admin_ip = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id`='" . (int)$userinfo['ip'] . "' ORDER BY `ip`, `port` ASC"); + $result_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='0' AND `ip`='" . $admin_ip['ip'] . "' ORDER BY `ip`, `port` ASC"); + $result_ssl_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='1' AND `ip`='" . $admin_ip['ip'] . "' ORDER BY `ip`, `port` ASC"); + } + + $ipsandports = ''; + + while($row_ipandport = $db->fetch_array($result_ipsandports)) + { + if(filter_var($row_ipandport['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) + { + $row_ipandport['ip'] = '[' . $row_ipandport['ip'] . ']'; + } + + $ipsandports.= makeoption($row_ipandport['ip'] . ':' . $row_ipandport['port'], $row_ipandport['id']); + } + + $ssl_ipsandports = ''; + + while($row_ssl_ipandport = $db->fetch_array($result_ssl_ipsandports)) + { + if(filter_var($row_ssl_ipandport['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) + { + $row_ssl_ipandport['ip'] = '[' . $row_ssl_ipandport['ip'] . ']'; + } + + $ssl_ipsandports.= makeoption($row_ssl_ipandport['ip'] . ':' . $row_ssl_ipandport['port'], $row_ssl_ipandport['id'], $settings['system']['defaultip']); + } + + $ssl = makeyesno('ssl', '1', '0', $result['ssl']); + $ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']); + $standardsubdomains = array(); + $result_standardsubdomains = $db->query('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`, `' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`id`=`c`.`standardsubdomain`'); + + while($row_standardsubdomain = $db->fetch_array($result_standardsubdomains)) + { + $standardsubdomains[] = $db->escape($row_standardsubdomain['id']); + } + + if(count($standardsubdomains) > 0) + { + $standardsubdomains = 'AND `d`.`id` NOT IN (' . join(',', $standardsubdomains) . ') '; + } + else + { + $standardsubdomains = ''; + } + + $domains = makeoption($lng['domains']['noaliasdomain'], 0, NULL, true); + $result_domains = $db->query("SELECT `d`.`id`, `d`.`domain`, `c`.`loginname` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`parentdomainid`=0 " . $standardsubdomains . ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "'") . " AND `d`.`customerid`=`c`.`customerid` ORDER BY `loginname`, `domain` ASC"); + + while($row_domain = $db->fetch_array($result_domains)) + { + $domains.= makeoption($idna_convert->decode($row_domain['domain']) . ' (' . $row_domain['loginname'] . ')', $row_domain['id']); + } + + $phpconfigs = ''; + $configs = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`"); + + while($row = $db->fetch_array($configs)) + { + $phpconfigs.= makeoption($row['description'], $row['id'], '1', true, true); + } + + $isbinddomain = makeyesno('isbinddomain', '1', '0', '1'); + $isemaildomain = makeyesno('isemaildomain', '1', '0', '1'); + $email_only = makeyesno('email_only', '1', '0', '0'); + $subcanemaildomain = makeoption($lng['admin']['subcanemaildomain']['never'], '0', '0', true, true) . makeoption($lng['admin']['subcanemaildomain']['choosableno'], '1', '0', true, true) . makeoption($lng['admin']['subcanemaildomain']['choosableyes'], '2', '0', true, true) . makeoption($lng['admin']['subcanemaildomain']['always'], '3', '0', true, true); + $dkim = makeyesno('dkim', '1', '0', '1'); + $wwwserveralias = makeyesno('wwwserveralias', '1', '0', '1'); + $caneditdomain = makeyesno('caneditdomain', '1', '0', '1'); + $openbasedir = makeyesno('openbasedir', '1', '0', '1'); + $safemode = makeyesno('safemode', '1', '0', '1'); + $speciallogfile = makeyesno('speciallogfile', '1', '0', '0'); + $add_date = date('Y-m-d'); + + eval("echo \"" . getTemplate("domains/domains_add") . "\";"); + } + } + } + elseif($action == 'edit' + && $id != 0) + { + $result = $db->query_first("SELECT `d`.`id`, `d`.`domain`, `d`.`customerid`, `d`.`adminid`, `d`.`email_only`, `d`.`documentroot`, `d`.`ssl`, `d`.`ssl_redirect`, `d`.`ssl_ipandport`,`d`.`ipandport`, `d`.`aliasdomain`, `d`.`isbinddomain`, `d`.`isemaildomain`, `d`.`subcanemaildomain`, `d`.`dkim`, `d`.`caneditdomain`, `d`.`zonefile`, `d`.`wwwserveralias`, `d`.`openbasedir`, `d`.`safemode`, `d`.`speciallogfile`, `d`.`specialsettings`, `d`.`add_date`, `d`.`registration_date`, `c`.`loginname`, `c`.`name`, `c`.`firstname`, `c`.`company`, `d`.`phpsettingid`, `d`.`mod_fcgid_starter`, `d`.`mod_fcgid_maxrequests` " . "FROM `" . TABLE_PANEL_DOMAINS . "` `d` " . "LEFT JOIN `" . TABLE_PANEL_CUSTOMERS . "` `c` USING(`customerid`) " . "WHERE `d`.`parentdomainid`='0' AND `d`.`id`='" . (int)$id . "'" . ($userinfo['customers_see_all'] ? '' : " AND `d`.`adminid` = '" . (int)$userinfo['adminid'] . "' ")); + + if($result['domain'] != '') + { + $subdomains = $db->query_first('SELECT COUNT(`id`) AS count FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `parentdomainid`=\'' . (int)$result['id'] . '\''); + $subdomains = $subdomains['count']; + $alias_check = $db->query_first('SELECT COUNT(`id`) AS count FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `aliasdomain`=\'' . (int)$result['id'] . '\''); + $alias_check = $alias_check['count']; + $domain_emails_result = $db->query('SELECT `email`, `email_full`, `destination`, `popaccountid` AS `number_email_forwarders` FROM `' . TABLE_MAIL_VIRTUAL . '` WHERE `customerid` = "' . (int)$result['customerid'] . '" AND `domainid` = "' . (int)$result['id'] . '" '); + $emails = $db->num_rows($domain_emails_result); + $email_forwarders = 0; + $email_accounts = 0; + + while($domain_emails_row = $db->fetch_array($domain_emails_result)) + { + if($domain_emails_row['destination'] != '') + { + $domain_emails_row['destination'] = explode(' ', makeCorrectDestination($domain_emails_row['destination'])); + $email_forwarders+= count($domain_emails_row['destination']); + + if(in_array($domain_emails_row['email_full'], $domain_emails_row['destination'])) + { + $email_forwarders-= 1; + $email_accounts++; + } + } + } + + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + $customer = $customer_old = $db->query_first("SELECT * FROM " . TABLE_PANEL_CUSTOMERS . " WHERE `customerid`='" . (int)$result['customerid'] . "'"); + + if(isset($_POST['customerid']) + && ($customerid = intval($_POST['customerid'])) != $result['customerid'] + && $settings['panel']['allow_domain_change_customer'] == '1') + { + $customer = $db->query_first("SELECT * FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid`='" . (int)$customerid . "' AND (`subdomains_used` + " . (int)$subdomains . " <= `subdomains` OR `subdomains` = '-1' ) AND (`emails_used` + " . (int)$emails . " <= `emails` OR `emails` = '-1' ) AND (`email_forwarders_used` + " . (int)$email_forwarders . " <= `email_forwarders` OR `email_forwarders` = '-1' ) AND (`email_accounts_used` + " . (int)$email_accounts . " <= `email_accounts` OR `email_accounts` = '-1' ) " . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' ") . " "); + + if(empty($customer) + || $customer['customerid'] != $customerid) + { + standard_error('customerdoesntexist'); + } + } + else + { + $customerid = $result['customerid']; + } + + $admin = $admin_old = $db->query_first("SELECT * FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$result['adminid'] . "' "); + + if($userinfo['customers_see_all'] == '1') + { + if(isset($_POST['adminid']) + && ($adminid = intval($_POST['adminid'])) != $result['adminid'] + && $settings['panel']['allow_domain_change_admin'] == '1') + { + $admin = $db->query_first("SELECT * FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$adminid . "' AND ( `domains_used` < `domains` OR `domains` = '-1' )"); + + if(empty($admin) + || $admin['adminid'] != $adminid) + { + standard_error('admindoesntexist'); + } + } + else + { + $adminid = $result['adminid']; + } + } + else + { + $adminid = $result['adminid']; + } + + $aliasdomain = intval($_POST['alias']); + $isemaildomain = intval($_POST['isemaildomain']); + $email_only = intval($_POST['email_only']); + $subcanemaildomain = intval($_POST['subcanemaildomain']); + $caneditdomain = intval($_POST['caneditdomain']); + $wwwserveralias = intval($_POST['wwwserveralias']); + $registration_date = validate($_POST['registration_date'], 'registration_date', '/^(19|20)\d\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/', '', array('0000-00-00', '0', '')); + + if($userinfo['change_serversettings'] == '1') + { + $isbinddomain = intval($_POST['isbinddomain']); + $zonefile = validate($_POST['zonefile'], 'zonefile'); + + if($settings['dkim']['use_dkim'] == '1') + { + $dkim = intval($_POST['dkim']); + } + else + { + $dkim = $result['dkim']; + } + + $specialsettings = validate(str_replace("\r\n", "\n", $_POST['specialsettings']), 'specialsettings', '/^[^\0]*$/'); + $documentroot = validate($_POST['documentroot'], 'documentroot'); + + if($documentroot == '') + { + $documentroot = $customer['documentroot']; + } + } + else + { + $isbinddomain = $result['isbinddomain']; + $zonefile = $result['zonefile']; + $dkim = $result['dkim']; + $specialsettings = $result['specialsettings']; + $documentroot = $result['documentroot']; + } + + if($userinfo['caneditphpsettings'] == '1' + || $userinfo['change_serversettings'] == '1') + { + $openbasedir = intval($_POST['openbasedir']); + $safemode = intval($_POST['safemode']); + + if((int)$settings['system']['mod_fcgid'] == 1) + { + $phpsettingid = (int)$_POST['phpsettingid']; + $phpsettingid_check = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = " . (int)$phpsettingid); + + if(!isset($phpsettingid_check['id']) + || $phpsettingid_check['id'] == '0' + || $phpsettingid_check['id'] != $phpsettingid) + { + standard_error('phpsettingidwrong'); + } + + $mod_fcgid_starter = validate($_POST['mod_fcgid_starter'], 'mod_fcgid_starter', '/^[0-9]*$/', '', array('-1', '')); + $mod_fcgid_maxrequests = validate($_POST['mod_fcgid_maxrequests'], 'mod_fcgid_maxrequests', '/^[0-9]*$/', '', array('-1', '')); + } + else + { + $phpsettingid = $result['phpsettingid']; + $mod_fcgid_starter = $result['mod_fcgid_starter']; + $mod_fcgid_maxrequests = $result['mod_fcgid_maxrequests']; + } + } + else + { + $openbasedir = $result['openbasedir']; + $safemode = $result['safemode']; + $phpsettingid = $result['phpsettingid']; + $mod_fcgid_starter = $result['mod_fcgid_starter']; + $mod_fcgid_maxrequests = $result['mod_fcgid_maxrequests']; + } + + if($userinfo['ip'] != "-1") + { + $admin_ip = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id`='" . (int)$userinfo['ip'] . "' ORDER BY `ip`, `port` ASC"); + $additional_ip_condition = ' AND `ip` = \'' . $admin_ip['ip'] . '\' '; + } + else + { + $additional_ip_condition = ''; + } + + $ipandport = intval($_POST['ipandport']); + $ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ipandport) . "' AND `ssl` = '0'" . $additional_ip_condition); + + if(!isset($ipandport_check['id']) + || $ipandport_check['id'] == '0' + || $ipandport_check['id'] != $ipandport) + { + standard_error('ipportdoesntexist'); + } + + if($settings['system']['use_ssl'] == "1" + && isset($_POST['ssl']) + && isset($_POST['ssl_redirect']) + && isset($_POST['ssl_ipandport']) + && $_POST['ssl'] != '0') + { + $ssl = (int)$_POST['ssl']; + $ssl_redirect = (int)$_POST['ssl_redirect']; + $ssl_ipandport = (int)$_POST['ssl_ipandport']; + $ssl_ipandport_check = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id` = '" . $db->escape($ssl_ipandport) . "' AND `ssl` = '1'" . $additional_ip_condition); + + if(!isset($ssl_ipandport_check['id']) + || $ssl_ipandport_check['id'] == '0' + || $ssl_ipandport_check['id'] != $ssl_ipandport) + { + standard_error('ipportdoesntexist'); + } + } + else + { + $ssl = 0; + $ssl_redirect = 0; + $ssl_ipandport = 0; + } + + if(!preg_match('/^https?\:\/\//', $documentroot)) + { + $documentroot = makeCorrectDir($documentroot); + } + + if($openbasedir != '1') + { + $openbasedir = '0'; + } + + if($safemode != '1') + { + $safemode = '0'; + } + + if($isbinddomain != '1') + { + $isbinddomain = '0'; + } + + if($isemaildomain != '1') + { + $isemaildomain = '0'; + } + + if($email_only == '1') + { + $isemaildomain = '1'; + } + else + { + $email_only = '0'; + } + + if($subcanemaildomain != '1' + && $subcanemaildomain != '2' + && $subcanemaildomain != '3') + { + $subcanemaildomain = '0'; + } + + if($dkim != '1') + { + $dkim = '0'; + } + + if($caneditdomain != '1') + { + $caneditdomain = '0'; + } + + $aliasdomain_check = array( + 'id' => 0 + ); + + if($aliasdomain != 0) + { + $aliasdomain_check = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_DOMAINS . '` `d`,`' . TABLE_PANEL_CUSTOMERS . '` `c` WHERE `d`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`aliasdomain` IS NULL AND `d`.`id`<>`c`.`standardsubdomain` AND `c`.`customerid`=\'' . (int)$result['customerid'] . '\' AND `d`.`id`=\'' . (int)$aliasdomain . '\''); + } + + if($aliasdomain_check['id'] != $aliasdomain) + { + standard_error('domainisaliasorothercustomer'); + } + + $params = array( + 'id' => $id, + 'page' => $page, + 'action' => $action, + 'customerid' => $customerid, + 'adminid' => $adminid, + 'documentroot' => $documentroot, + 'alias' => $aliasdomain, + 'isbinddomain' => $isbinddomain, + 'isemaildomain' => $isemaildomain, + 'email_only' => $email_only, + 'subcanemaildomain' => $subcanemaildomain, + 'caneditdomain' => $caneditdomain, + 'zonefile' => $zonefile, + 'dkim' => $dkim, + 'wwwserveralias' => $wwwserveralias, + 'ipandport' => $ipandport, + 'ssl' => $ssl, + 'ssl_redirect' => $ssl_redirect, + 'ssl_ipandport' => $ssl_ipandport, + 'openbasedir' => $openbasedir, + 'safemode' => $safemode, + 'phpsettingid' => $phpsettingid, + 'mod_fcgid_starter' => $mod_fcgid_starter, + 'mod_fcgid_maxrequests' => $mod_fcgid_maxrequests, + 'specialsettings' => $specialsettings, + 'registration_date' => $registration_date + ); + + $security_questions = array( + 'reallydisablesecuritysetting' => (($openbasedir == '0' || $safemode == '0') && $userinfo['change_serversettings'] == '1'), + 'reallydocrootoutofcustomerroot' => (substr($documentroot, 0, strlen($customer['documentroot'])) != $customer['documentroot'] && !preg_match('/^https?\:\/\//', $documentroot)) + ); + foreach($security_questions as $question_name => $question_launch) + { + if($question_launch !== false) + { + $params[$question_name] = $question_name; + + if(!isset($_POST[$question_name]) + || $_POST[$question_name] != $question_name) + { + ask_yesno('admin_domain_' . $question_name, $filename, $params); + exit; + } + } + } + + if($documentroot != $result['documentroot'] + || $ipandport != $result['ipandport'] + || $ssl != $result['ssl'] + || $ssl_redirect != $result['ssl_redirect'] + || $ssl_ipandport != $result['ssl_ipandport'] + || $wwwserveralias != $result['wwwserveralias'] + || $openbasedir != $result['openbasedir'] + || $safemode != $result['safemode'] + || $phpsettingid != $result['phpsettingid'] + || $mod_fcgid_starter != $result['mod_fcgid_starter'] + || $mod_fcgid_maxrequests != $result['mod_fcgid_maxrequests'] + || $specialsettings != $result['specialsettings'] + || $aliasdomain != $result['aliasdomain']) + { + inserttask('1'); + } + + if($isbinddomain != $result['isbinddomain'] + || $zonefile != $result['zonefile'] + || $dkim != $result['dkim'] + || $ipandport != $result['ipandport']) + { + inserttask('4'); + } + + if($isemaildomain == '0' + && $result['isemaildomain'] == '1') + { + $db->query("DELETE FROM `" . TABLE_MAIL_USERS . "` WHERE `domainid`='" . (int)$id . "' "); + $db->query("DELETE FROM `" . TABLE_MAIL_VIRTUAL . "` WHERE `domainid`='" . (int)$id . "' "); + $log->logAction(ADM_ACTION, LOG_NOTICE, "deleted domain #" . $id . " from mail-tables"); + } + + $updatechildren = ''; + + if($subcanemaildomain == '0' + && $result['subcanemaildomain'] != '0') + { + $updatechildren = ', `isemaildomain`=\'0\' '; + } + elseif($subcanemaildomain == '3' + && $result['subcanemaildomain'] != '3') + { + $updatechildren = ', `isemaildomain`=\'1\' '; + } + + if($customerid != $result['customerid'] + && $settings['panel']['allow_domain_change_customer'] == '1') + { + $db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `customerid` = '" . (int)$customerid . "' WHERE `domainid` = '" . (int)$result['id'] . "' "); + $db->query("UPDATE `" . TABLE_MAIL_VIRTUAL . "` SET `customerid` = '" . (int)$customerid . "' WHERE `domainid` = '" . (int)$result['id'] . "' "); + $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used` = `subdomains_used` + '" . (int)$subdomains . "', `emails_used` = `emails_used` + '" . (int)$emails . "', `email_forwarders_used` = `email_forwarders_used` + '" . (int)$email_forwarders . "', `email_accounts_used` = `email_accounts_used` + '" . (int)$email_accounts . "' WHERE `customerid` = '" . (int)$customerid . "' "); + $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `subdomains_used` = `subdomains_used` - '" . (int)$subdomains . "', `emails_used` = `emails_used` - '" . (int)$emails . "', `email_forwarders_used` = `email_forwarders_used` - '" . (int)$email_forwarders . "', `email_accounts_used` = `email_accounts_used` - '" . (int)$email_accounts . "' WHERE `customerid` = '" . (int)$result['customerid'] . "' "); + } + + if($adminid != $result['adminid'] + && $settings['panel']['allow_domain_change_admin'] == '1') + { + $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` + 1 WHERE `adminid` = '" . (int)$adminid . "' "); + $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `domains_used` = `domains_used` - 1 WHERE `adminid` = '" . (int)$result['adminid'] . "' "); + } + + $result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `documentroot`='" . $db->escape($documentroot) . "', `ipandport`='" . $db->escape($ipandport) . "', `ssl`='" . (int)$ssl . "', `ssl_redirect`='" . (int)$ssl_redirect . "', `ssl_ipandport`='" . (int)$ssl_ipandport . "', `aliasdomain`=" . (($aliasdomain != 0 && $alias_check == 0) ? '\'' . $db->escape($aliasdomain) . '\'' : 'NULL') . ", `isbinddomain`='" . $db->escape($isbinddomain) . "', `isemaildomain`='" . $db->escape($isemaildomain) . "', `email_only`='" . $db->escape($email_only) . "', `subcanemaildomain`='" . $db->escape($subcanemaildomain) . "', `dkim`='" . $db->escape($dkim) . "', `caneditdomain`='" . $db->escape($caneditdomain) . "', `zonefile`='" . $db->escape($zonefile) . "', `wwwserveralias`='" . $db->escape($wwwserveralias) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "', `specialsettings`='" . $db->escape($specialsettings) . "', `registration_date`='" . $db->escape($registration_date) . "' WHERE `id`='" . (int)$id . "'"); + $result = $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `customerid` = '" . (int)$customerid . "', `adminid` = '" . (int)$adminid . "', `ipandport`='" . $db->escape($ipandport) . "', `openbasedir`='" . $db->escape($openbasedir) . "', `safemode`='" . $db->escape($safemode) . "', `phpsettingid`='" . $db->escape($phpsettingid) . "', `mod_fcgid_starter`='" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests`='" . $db->escape($mod_fcgid_maxrequests) . "', `specialsettings`='" . $db->escape($specialsettings) . "'" . $updatechildren . " WHERE `parentdomainid`='" . (int)$id . "'"); + $log->logAction(ADM_ACTION, LOG_INFO, "edited domain #" . $id); + $redirect_props = Array( + 'page' => $page, + 's' => $s + ); + + redirectTo($filename, $redirect_props); + } + else + { + if($settings['panel']['allow_domain_change_customer'] == '1') + { + $customers = ''; + $result_customers = $db->query("SELECT `customerid`, `loginname`, `name`, `firstname`, `company` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE ( (`subdomains_used` + " . (int)$subdomains . " <= `subdomains` OR `subdomains` = '-1' ) AND (`emails_used` + " . (int)$emails . " <= `emails` OR `emails` = '-1' ) AND (`email_forwarders_used` + " . (int)$email_forwarders . " <= `email_forwarders` OR `email_forwarders` = '-1' ) AND (`email_accounts_used` + " . (int)$email_accounts . " <= `email_accounts` OR `email_accounts` = '-1' ) " . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' ") . ") OR `customerid` = '" . (int)$result['customerid'] . "' ORDER BY `name` ASC"); + + while($row_customer = $db->fetch_array($result_customers)) + { + $customers.= makeoption(getCorrectFullUserDetails($row_customer) . ' (' . $row_customer['loginname'] . ')', $row_customer['customerid'], $result['customerid']); + } + } + else + { + $customer = $db->query_first("SELECT `customerid`, `loginname`, `name`, `firstname`, `company` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `customerid` = '" . (int)$result['customerid'] . "'"); + $result['customername'] = getCorrectFullUserDetails($customer) . ' (' . $customer['loginname'] . ')'; + } + + if($userinfo['customers_see_all'] == '1') + { + if($settings['panel']['allow_domain_change_admin'] == '1') + { + $admins = ''; + $result_admins = $db->query("SELECT `adminid`, `loginname`, `name` FROM `" . TABLE_PANEL_ADMINS . "` WHERE (`domains_used` < `domains` OR `domains` = '-1') OR `adminid` = '" . (int)$result['adminid'] . "' ORDER BY `name` ASC"); + + while($row_admin = $db->fetch_array($result_admins)) + { + $admins.= makeoption(getCorrectFullUserDetails($row_admin) . ' (' . $row_admin['loginname'] . ')', $row_admin['adminid'], $result['adminid']); + } + } + else + { + $admin = $db->query_first("SELECT `adminid`, `loginname`, `name` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid` = '" . (int)$result['adminid'] . "'"); + $result['adminname'] = getCorrectFullUserDetails($admin) . ' (' . $admin['loginname'] . ')'; + } + } + + $result['domain'] = $idna_convert->decode($result['domain']); + $domains = makeoption($lng['domains']['noaliasdomain'], 0, NULL, true); + $result_domains = $db->query("SELECT `d`.`id`, `d`.`domain` FROM `" . TABLE_PANEL_DOMAINS . "` `d`, `" . TABLE_PANEL_CUSTOMERS . "` `c` WHERE `d`.`aliasdomain` IS NULL AND `d`.`parentdomainid`=0 AND `d`.`id`<>'" . (int)$result['id'] . "' AND `c`.`standardsubdomain`<>`d`.`id` AND `d`.`customerid`='" . (int)$result['customerid'] . "' AND `c`.`customerid`=`d`.`customerid` ORDER BY `d`.`domain` ASC"); + + while($row_domain = $db->fetch_array($result_domains)) + { + $domains.= makeoption($idna_convert->decode($row_domain['domain']), $row_domain['id'], $result['aliasdomain']); + } + + if($userinfo['ip'] == "-1") + { + $result_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='0' ORDER BY `ip`, `port` ASC"); + $result_ssl_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='1' ORDER BY `ip`, `port` ASC"); + } + else + { + $admin_ip = $db->query_first("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `id`='" . (int)$userinfo['ip'] . "' ORDER BY `ip`, `port` ASC"); + $result_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='0' AND `ip`='" . $admin_ip['ip'] . "' ORDER BY `ip`, `port` ASC"); + $result_ssl_ipsandports = $db->query("SELECT `id`, `ip`, `port` FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='1' AND `ip`='" . $admin_ip['ip'] . "' ORDER BY `ip`, `port` ASC"); + } + + $ipsandports = ''; + + while($row_ipandport = $db->fetch_array($result_ipsandports)) + { + if(filter_var($row_ipandport['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) + { + $row_ipandport['ip'] = '[' . $row_ipandport['ip'] . ']'; + } + + $ipsandports.= makeoption($row_ipandport['ip'] . ':' . $row_ipandport['port'], $row_ipandport['id'], $result['ipandport']); + } + + $ssl_ipsandports = ''; + + while($row_ssl_ipandport = $db->fetch_array($result_ssl_ipsandports)) + { + if(filter_var($row_ssl_ipandport['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) + { + $row_ssl_ipandport['ip'] = '[' . $row_ssl_ipandport['ip'] . ']'; + } + + $ssl_ipsandports.= makeoption($row_ssl_ipandport['ip'] . ':' . $row_ssl_ipandport['port'], $row_ssl_ipandport['id'], $result['ssl_ipandport']); + } + + $result['specialsettings'] = $result['specialsettings']; + $isbinddomain = makeyesno('isbinddomain', '1', '0', $result['isbinddomain']); + $wwwserveralias = makeyesno('wwwserveralias', '1', '0', $result['wwwserveralias']); + $isemaildomain = makeyesno('isemaildomain', '1', '0', $result['isemaildomain']); + $email_only = makeyesno('email_only', '1', '0', $result['email_only']); + $ssl = makeyesno('ssl', '1', '0', $result['ssl']); + $ssl_redirect = makeyesno('ssl_redirect', '1', '0', $result['ssl_redirect']); + $subcanemaildomain = makeoption($lng['admin']['subcanemaildomain']['never'], '0', $result['subcanemaildomain'], true, true); + $subcanemaildomain.= makeoption($lng['admin']['subcanemaildomain']['choosableno'], '1', $result['subcanemaildomain'], true, true); + $subcanemaildomain.= makeoption($lng['admin']['subcanemaildomain']['choosableyes'], '2', $result['subcanemaildomain'], true, true); + $subcanemaildomain.= makeoption($lng['admin']['subcanemaildomain']['always'], '3', $result['subcanemaildomain'], true, true); + $dkim = makeyesno('dkim', '1', '0', $result['dkim']); + $caneditdomain = makeyesno('caneditdomain', '1', '0', $result['caneditdomain']); + $openbasedir = makeyesno('openbasedir', '1', '0', $result['openbasedir']); + $safemode = makeyesno('safemode', '1', '0', $result['safemode']); + $speciallogfile = ($result['speciallogfile'] == 1 ? $lng['panel']['yes'] : $lng['panel']['no']); + $result['add_date'] = date('Y-m-d', $result['add_date']); + + $phpconfigs = ''; + $phpconfigs_result = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`"); + + while($phpconfigs_row = $db->fetch_array($phpconfigs_result)) + { + $phpconfigs.= makeoption($phpconfigs_row['description'], $phpconfigs_row['id'], $result['phpsettingid'], true, true); + } + + $result = htmlentities_array($result); + eval("echo \"" . getTemplate("domains/domains_edit") . "\";"); + } + } + } +} + +?> diff --git a/admin_index.php b/admin_index.php index d1c02cef..6e12c3ec 100644 --- a/admin_index.php +++ b/admin_index.php @@ -1,296 +1,296 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Panel - * @version $Id$ - */ - -define('AREA', 'admin'); - -/** - * Include our init.php, which manages Sessions, Language etc. - */ - -require ("./lib/init.php"); - -if($action == 'logout') -{ - $log->logAction(ADM_ACTION, LOG_NOTICE, "logged out"); - - if($settings['session']['allow_multiple_login'] == '1') - { - $db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['adminid'] . "' AND `adminsession` = '1' AND `hash` = '" . $s . "'"); - } - else - { - $db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['adminid'] . "' AND `adminsession` = '1'"); - } - - redirectTo('index.php'); - exit; -} - -if(isset($_POST['id'])) -{ - $id = intval($_POST['id']); -} -elseif(isset($_GET['id'])) -{ - $id = intval($_GET['id']); -} - -if($page == 'overview') -{ - $log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_index"); - $overview = $db->query_first("SELECT COUNT(*) AS `number_customers`, - SUM(`diskspace_used`) AS `diskspace_used`, - SUM(`mysqls_used`) AS `mysqls_used`, - SUM(`emails_used`) AS `emails_used`, - SUM(`email_accounts_used`) AS `email_accounts_used`, - SUM(`email_forwarders_used`) AS `email_forwarders_used`, - SUM(`email_quota_used`) AS `email_quota_used`, - SUM(`ftps_used`) AS `ftps_used`, - SUM(`tickets_used`) AS `tickets_used`, - SUM(`subdomains_used`) AS `subdomains_used`, - SUM(`traffic_used`) AS `traffic_used`, - SUM(`aps_packages_used`) AS `aps_packages_used` - FROM `" . TABLE_PANEL_CUSTOMERS . "`" . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int)$userinfo['adminid'] . "' ")); - $overview['traffic_used'] = round($overview['traffic_used'] / (1024 * 1024), $settings['panel']['decimal_places']); - $overview['diskspace_used'] = round($overview['diskspace_used'] / 1024, $settings['panel']['decimal_places']); - $number_domains = $db->query_first("SELECT COUNT(*) AS `number_domains` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `parentdomainid`='0'" . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' ")); - $overview['number_domains'] = $number_domains['number_domains']; - $phpversion = phpversion(); - $phpmemorylimit = @ini_get("memory_limit"); - - if($phpmemorylimit == "") - { - $phpmemorylimit = $lng['admin']['memorylimitdisabled']; - } - - $mysqlserverversion = mysql_get_server_info(); - $mysqlclientversion = mysql_get_client_info(); - $webserverinterface = strtoupper(@php_sapi_name()); - - if((isset($_GET['lookfornewversion']) && $_GET['lookfornewversion'] == 'yes') - || (isset($lookfornewversion) && $lookfornewversion == 'yes')) - { - $latestversion = @file('http://version.froxlor.org/legacy/' . $version); - - if(is_array($latestversion) - && count($latestversion) >= 2) - { - $lookfornewversion_lable = $latestversion[0]; - $lookfornewversion_link = $latestversion[1]; - $lookfornewversion_addinfo = ''; - - if(count($latestversion) >= 3) - { - $addinfo = $latestversion; - unset($addinfo[0]); - unset($addinfo[1]); - $lookfornewversion_addinfo = implode("\n", $addinfo); - } - } - else - { - redirectTo('http://version.froxlor.org/legacy/' . $version . '/pretty', NULL); - } - } - else - { - $lookfornewversion_lable = $lng['admin']['lookfornewversion']['clickhere']; - $lookfornewversion_link = htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes'); - $lookfornewversion_addinfo = ''; - } - - $userinfo['diskspace'] = round($userinfo['diskspace'] / 1024, $settings['panel']['decimal_places']); - $userinfo['diskspace_used'] = round($userinfo['diskspace_used'] / 1024, $settings['panel']['decimal_places']); - $userinfo['traffic'] = round($userinfo['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']); - $userinfo['traffic_used'] = round($userinfo['traffic_used'] / (1024 * 1024), $settings['panel']['decimal_places']); - $userinfo = str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps tickets subdomains aps_packages'); - - if($settings['system']['last_tasks_run'] == 0) - { - $cronlastrun = $lng['cronjobs']['notyetrun']; - } - else - { - $cronlastrun = date("d.m.Y H:i:s", $settings['system']['last_tasks_run']); - } - - if($settings['system']['last_traffic_run'] == 0) - { - $trafficlastrun = $lng['cronjobs']['notyetrun']; - } - else - { - $trafficlastrun = date("d.m.Y H:i:s", $settings['system']['last_traffic_run']); - } - - if($settings['system']['last_archive_run'] == 0) - { - $archivelastrun = $lng['cronjobs']['notyetrun']; - } - else - { - $archivelastrun = date("d.m.Y H:i:s", $settings['system']['last_archive_run']); - } - - $opentickets = 0; - $opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '` - WHERE `answerto` = "0" AND (`status` = "0" OR `status` = "1") - AND `lastreplier`="0" AND `adminid` = "' . $userinfo['adminid'] . '"'); - $awaitingtickets = $opentickets['count']; - $awaitingtickets_text = ''; - - if($opentickets > 0) - { - $awaitingtickets_text = strtr($lng['ticket']['awaitingticketreply'], array('%s' => '' . $opentickets['count'] . '')); - } - - if(function_exists('sys_getloadavg')) - { - $loadArray = sys_getloadavg(); - $load = number_format($loadArray[0], 2, '.', '') . " / " . number_format($loadArray[1], 2, '.', '') . " / " . number_format($loadArray[2], 2, '.', ''); - } - else - { - $load = @file_get_contents('/proc/loadavg'); - - if(!$load) - { - $load = $lng['admin']['noloadavailable']; - } - } - - if(function_exists('posix_uname')) - { - $showkernel = 1; - $kernel_nfo = posix_uname(); - $kernel = $kernel_nfo['release'] . ' (' . $kernel_nfo['machine'] . ')'; - } - else - { - $showkernel = 0; - $kernel = ''; - } - - // Try to get the uptime - // First: With exec (let's hope it's enabled for the SysCP - vHost) - - $uptime_array = explode(" ", @file_get_contents("/proc/uptime")); - - if(is_array($uptime_array) - && isset($uptime_array[0]) - && is_numeric($uptime_array[0])) - { - // Some calculatioon to get a nicly formatted display - - $seconds = round($uptime_array[0], 0); - $minutes = $seconds / 60; - $hours = $minutes / 60; - $days = floor($hours / 24); - $hours = floor($hours - ($days * 24)); - $minutes = floor($minutes - ($days * 24 * 60) - ($hours * 60)); - $seconds = floor($seconds - ($days * 24 * 60 * 60) - ($hours * 60 * 60) - ($minutes * 60)); - $uptime = "{$days}d, {$hours}h, {$minutes}m, {$seconds}s"; - - // Just cleanup - - unset($uptime_array, $seconds, $minutes, $hours, $days); - } - else - { - // Nothing of the above worked, show an error :/ - - $uptime = ''; - } - - eval("echo \"" . getTemplate("index/index") . "\";"); -} -elseif($page == 'change_password') -{ - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - $old_password = validate($_POST['old_password'], 'old password'); - - if(md5($old_password) != $userinfo['password']) - { - standard_error('oldpasswordnotcorrect'); - exit; - } - - $new_password = validate($_POST['new_password'], 'new password'); - $new_password_confirm = validate($_POST['new_password_confirm'], 'new password confirm'); - - if($old_password == '') - { - standard_error(array('stringisempty', 'oldpassword')); - } - elseif($new_password == '') - { - standard_error(array('stringisempty', 'newpassword')); - } - elseif($new_password_confirm == '') - { - standard_error(array('stringisempty', 'newpasswordconfirm')); - } - elseif($new_password != $new_password_confirm) - { - standard_error('newpasswordconfirmerror'); - } - else - { - $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `password`='" . md5($new_password) . "' WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `password`='" . md5($old_password) . "'"); - $log->logAction(ADM_ACTION, LOG_NOTICE, 'changed password'); - redirectTo($filename, Array('s' => $s)); - } - } - else - { - eval("echo \"" . getTemplate("index/change_password") . "\";"); - } -} -elseif($page == 'change_language') -{ - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - $def_language = validate($_POST['def_language'], 'default language'); - - if(isset($languages[$def_language])) - { - $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `def_language`='" . $db->escape($def_language) . "' WHERE `adminid`='" . (int)$userinfo['adminid'] . "'"); - $db->query("UPDATE `" . TABLE_PANEL_SESSIONS . "` SET `language`='" . $db->escape($def_language) . "' WHERE `hash`='" . $db->escape($s) . "'"); - } - - $log->logAction(ADM_ACTION, LOG_NOTICE, "changed his/her default language to '" . $def_language . "'"); - redirectTo($filename, Array('s' => $s)); - } - else - { - $language_options = ''; - - while(list($language_file, $language_name) = each($languages)) - { - $language_options.= makeoption($language_name, $language_file, $userinfo['def_language'], true); - } - - eval("echo \"" . getTemplate("index/change_language") . "\";"); - } -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Panel + * @version $Id$ + */ + +define('AREA', 'admin'); + +/** + * Include our init.php, which manages Sessions, Language etc. + */ + +require ("./lib/init.php"); + +if($action == 'logout') +{ + $log->logAction(ADM_ACTION, LOG_NOTICE, "logged out"); + + if($settings['session']['allow_multiple_login'] == '1') + { + $db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['adminid'] . "' AND `adminsession` = '1' AND `hash` = '" . $s . "'"); + } + else + { + $db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['adminid'] . "' AND `adminsession` = '1'"); + } + + redirectTo('index.php'); + exit; +} + +if(isset($_POST['id'])) +{ + $id = intval($_POST['id']); +} +elseif(isset($_GET['id'])) +{ + $id = intval($_GET['id']); +} + +if($page == 'overview') +{ + $log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_index"); + $overview = $db->query_first("SELECT COUNT(*) AS `number_customers`, + SUM(`diskspace_used`) AS `diskspace_used`, + SUM(`mysqls_used`) AS `mysqls_used`, + SUM(`emails_used`) AS `emails_used`, + SUM(`email_accounts_used`) AS `email_accounts_used`, + SUM(`email_forwarders_used`) AS `email_forwarders_used`, + SUM(`email_quota_used`) AS `email_quota_used`, + SUM(`ftps_used`) AS `ftps_used`, + SUM(`tickets_used`) AS `tickets_used`, + SUM(`subdomains_used`) AS `subdomains_used`, + SUM(`traffic_used`) AS `traffic_used`, + SUM(`aps_packages_used`) AS `aps_packages_used` + FROM `" . TABLE_PANEL_CUSTOMERS . "`" . ($userinfo['customers_see_all'] ? '' : " WHERE `adminid` = '" . (int)$userinfo['adminid'] . "' ")); + $overview['traffic_used'] = round($overview['traffic_used'] / (1024 * 1024), $settings['panel']['decimal_places']); + $overview['diskspace_used'] = round($overview['diskspace_used'] / 1024, $settings['panel']['decimal_places']); + $number_domains = $db->query_first("SELECT COUNT(*) AS `number_domains` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `parentdomainid`='0'" . ($userinfo['customers_see_all'] ? '' : " AND `adminid` = '" . (int)$userinfo['adminid'] . "' ")); + $overview['number_domains'] = $number_domains['number_domains']; + $phpversion = phpversion(); + $phpmemorylimit = @ini_get("memory_limit"); + + if($phpmemorylimit == "") + { + $phpmemorylimit = $lng['admin']['memorylimitdisabled']; + } + + $mysqlserverversion = mysql_get_server_info(); + $mysqlclientversion = mysql_get_client_info(); + $webserverinterface = strtoupper(@php_sapi_name()); + + if((isset($_GET['lookfornewversion']) && $_GET['lookfornewversion'] == 'yes') + || (isset($lookfornewversion) && $lookfornewversion == 'yes')) + { + $latestversion = @file('http://version.froxlor.org/legacy/' . $version); + + if(is_array($latestversion) + && count($latestversion) >= 2) + { + $lookfornewversion_lable = $latestversion[0]; + $lookfornewversion_link = $latestversion[1]; + $lookfornewversion_addinfo = ''; + + if(count($latestversion) >= 3) + { + $addinfo = $latestversion; + unset($addinfo[0]); + unset($addinfo[1]); + $lookfornewversion_addinfo = implode("\n", $addinfo); + } + } + else + { + redirectTo('http://version.froxlor.org/legacy/' . $version . '/pretty', NULL); + } + } + else + { + $lookfornewversion_lable = $lng['admin']['lookfornewversion']['clickhere']; + $lookfornewversion_link = htmlspecialchars($filename . '?s=' . urlencode($s) . '&page=' . urlencode($page) . '&lookfornewversion=yes'); + $lookfornewversion_addinfo = ''; + } + + $userinfo['diskspace'] = round($userinfo['diskspace'] / 1024, $settings['panel']['decimal_places']); + $userinfo['diskspace_used'] = round($userinfo['diskspace_used'] / 1024, $settings['panel']['decimal_places']); + $userinfo['traffic'] = round($userinfo['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']); + $userinfo['traffic_used'] = round($userinfo['traffic_used'] / (1024 * 1024), $settings['panel']['decimal_places']); + $userinfo = str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'customers domains diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps tickets subdomains aps_packages'); + + if($settings['system']['last_tasks_run'] == 0) + { + $cronlastrun = $lng['cronjobs']['notyetrun']; + } + else + { + $cronlastrun = date("d.m.Y H:i:s", $settings['system']['last_tasks_run']); + } + + if($settings['system']['last_traffic_run'] == 0) + { + $trafficlastrun = $lng['cronjobs']['notyetrun']; + } + else + { + $trafficlastrun = date("d.m.Y H:i:s", $settings['system']['last_traffic_run']); + } + + if($settings['system']['last_archive_run'] == 0) + { + $archivelastrun = $lng['cronjobs']['notyetrun']; + } + else + { + $archivelastrun = date("d.m.Y H:i:s", $settings['system']['last_archive_run']); + } + + $opentickets = 0; + $opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '` + WHERE `answerto` = "0" AND (`status` = "0" OR `status` = "1") + AND `lastreplier`="0" AND `adminid` = "' . $userinfo['adminid'] . '"'); + $awaitingtickets = $opentickets['count']; + $awaitingtickets_text = ''; + + if($opentickets > 0) + { + $awaitingtickets_text = strtr($lng['ticket']['awaitingticketreply'], array('%s' => '' . $opentickets['count'] . '')); + } + + if(function_exists('sys_getloadavg')) + { + $loadArray = sys_getloadavg(); + $load = number_format($loadArray[0], 2, '.', '') . " / " . number_format($loadArray[1], 2, '.', '') . " / " . number_format($loadArray[2], 2, '.', ''); + } + else + { + $load = @file_get_contents('/proc/loadavg'); + + if(!$load) + { + $load = $lng['admin']['noloadavailable']; + } + } + + if(function_exists('posix_uname')) + { + $showkernel = 1; + $kernel_nfo = posix_uname(); + $kernel = $kernel_nfo['release'] . ' (' . $kernel_nfo['machine'] . ')'; + } + else + { + $showkernel = 0; + $kernel = ''; + } + + // Try to get the uptime + // First: With exec (let's hope it's enabled for the SysCP - vHost) + + $uptime_array = explode(" ", @file_get_contents("/proc/uptime")); + + if(is_array($uptime_array) + && isset($uptime_array[0]) + && is_numeric($uptime_array[0])) + { + // Some calculatioon to get a nicly formatted display + + $seconds = round($uptime_array[0], 0); + $minutes = $seconds / 60; + $hours = $minutes / 60; + $days = floor($hours / 24); + $hours = floor($hours - ($days * 24)); + $minutes = floor($minutes - ($days * 24 * 60) - ($hours * 60)); + $seconds = floor($seconds - ($days * 24 * 60 * 60) - ($hours * 60 * 60) - ($minutes * 60)); + $uptime = "{$days}d, {$hours}h, {$minutes}m, {$seconds}s"; + + // Just cleanup + + unset($uptime_array, $seconds, $minutes, $hours, $days); + } + else + { + // Nothing of the above worked, show an error :/ + + $uptime = ''; + } + + eval("echo \"" . getTemplate("index/index") . "\";"); +} +elseif($page == 'change_password') +{ + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + $old_password = validate($_POST['old_password'], 'old password'); + + if(md5($old_password) != $userinfo['password']) + { + standard_error('oldpasswordnotcorrect'); + exit; + } + + $new_password = validate($_POST['new_password'], 'new password'); + $new_password_confirm = validate($_POST['new_password_confirm'], 'new password confirm'); + + if($old_password == '') + { + standard_error(array('stringisempty', 'oldpassword')); + } + elseif($new_password == '') + { + standard_error(array('stringisempty', 'newpassword')); + } + elseif($new_password_confirm == '') + { + standard_error(array('stringisempty', 'newpasswordconfirm')); + } + elseif($new_password != $new_password_confirm) + { + standard_error('newpasswordconfirmerror'); + } + else + { + $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `password`='" . md5($new_password) . "' WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `password`='" . md5($old_password) . "'"); + $log->logAction(ADM_ACTION, LOG_NOTICE, 'changed password'); + redirectTo($filename, Array('s' => $s)); + } + } + else + { + eval("echo \"" . getTemplate("index/change_password") . "\";"); + } +} +elseif($page == 'change_language') +{ + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + $def_language = validate($_POST['def_language'], 'default language'); + + if(isset($languages[$def_language])) + { + $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `def_language`='" . $db->escape($def_language) . "' WHERE `adminid`='" . (int)$userinfo['adminid'] . "'"); + $db->query("UPDATE `" . TABLE_PANEL_SESSIONS . "` SET `language`='" . $db->escape($def_language) . "' WHERE `hash`='" . $db->escape($s) . "'"); + } + + $log->logAction(ADM_ACTION, LOG_NOTICE, "changed his/her default language to '" . $def_language . "'"); + redirectTo($filename, Array('s' => $s)); + } + else + { + $language_options = ''; + + while(list($language_file, $language_name) = each($languages)) + { + $language_options.= makeoption($language_name, $language_file, $userinfo['def_language'], true); + } + + eval("echo \"" . getTemplate("index/change_language") . "\";"); + } +} + +?> diff --git a/admin_message.php b/admin_message.php index 8f8729e7..91417d40 100644 --- a/admin_message.php +++ b/admin_message.php @@ -1,148 +1,148 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Panel - * @version $Id$ - */ - -define('AREA', 'admin'); - -/** - * Include our init.php, which manages Sessions, Language etc. - */ - -require ("./lib/init.php"); - -if(isset($_POST['id'])) -{ - $id = intval($_POST['id']); -} -elseif(isset($_GET['id'])) -{ - $id = intval($_GET['id']); -} - -if($page == 'message') -{ - if($action == '') - { - $log->logAction(ADM_ACTION, LOG_NOTICE, "viewed panel_message"); - - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - if($_POST['receipient'] == 0 - && $userinfo['customers_see_all'] == '1') - { - $log->logAction(ADM_ACTION, LOG_NOTICE, "sending messages to admins"); - $result = $db->query('SELECT `firstname`, `name`, `email` FROM `' . TABLE_PANEL_ADMINS . "`"); - } - elseif($_POST['receipient'] == 1) - { - if($userinfo['customers_see_all'] == "1") - { - $log->logAction(ADM_ACTION, LOG_NOTICE, "sending messages to ALL customers"); - $result = $db->query('SELECT `firstname`, `name`, `email` FROM `' . TABLE_PANEL_CUSTOMERS . "`"); - } - else - { - $log->logAction(ADM_ACTION, LOG_NOTICE, "sending messages to customers"); - $result = $db->query('SELECT `firstname`, `name`, `email` FROM `' . TABLE_PANEL_CUSTOMERS . "` WHERE `adminid`='" . $userinfo['adminid'] . "'"); - } - } - else - { - standard_error('noreceipientsgiven'); - } - - $subject = $_POST['subject']; - $message = wordwrap($_POST['message'], 70); - - if(!empty($message)) - { - $mailcounter = 0; - $mail->Body = $message; - $mail->Subject = $subject; - - while($row = $db->fetch_array($result)) - { - $mail->AddAddress($row['email'], $row['firstname'] . ' ' . $row['name']); - $mail->From = $userinfo['email']; - $mail->FromName = $userinfo['firstname'] . ' ' . $userinfo['name']; - - if(!$mail->Send()) - { - if($mail->ErrorInfo != '') - { - $mailerr_msg = $mail->ErrorInfo; - } - else - { - $mailerr_msg = $row["email"]; - } - - $log->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg); - standard_error('errorsendingmail', $row["email"]); - } - - $mailcounter++; - $mail->ClearAddresses(); - } - - redirectTo($filename, Array('page' => $page, 's' => $s, 'action' => 'showsuccess', 'sentitems' => $mailcounter)); - } - else - { - standard_error('nomessagetosend'); - } - } - } - - if($action == 'showsuccess') - { - $success = 1; - $sentitems = isset($_GET['sentitems']) ? (int)$_GET['sentitems'] : 0; - - if($sentitems == 0) - { - $successmessage = $lng['message']['noreceipients']; - } - else - { - $successmessage = str_replace('%s', $sentitems, $lng['message']['success']); - } - - $action = ''; - } - else - { - $success = 0; - $sentitems = 0; - $successmessage = ''; - $action = ''; - } - - $receipients = ''; - - if($userinfo['customers_see_all'] == "1") - { - $receipients.= makeoption($lng['panel']['reseller'], 0); - } - - $receipients.= makeoption($lng['panel']['customer'], 1); - eval("echo \"" . getTemplate("message/message") . "\";"); -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Panel + * @version $Id$ + */ + +define('AREA', 'admin'); + +/** + * Include our init.php, which manages Sessions, Language etc. + */ + +require ("./lib/init.php"); + +if(isset($_POST['id'])) +{ + $id = intval($_POST['id']); +} +elseif(isset($_GET['id'])) +{ + $id = intval($_GET['id']); +} + +if($page == 'message') +{ + if($action == '') + { + $log->logAction(ADM_ACTION, LOG_NOTICE, "viewed panel_message"); + + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + if($_POST['receipient'] == 0 + && $userinfo['customers_see_all'] == '1') + { + $log->logAction(ADM_ACTION, LOG_NOTICE, "sending messages to admins"); + $result = $db->query('SELECT `firstname`, `name`, `email` FROM `' . TABLE_PANEL_ADMINS . "`"); + } + elseif($_POST['receipient'] == 1) + { + if($userinfo['customers_see_all'] == "1") + { + $log->logAction(ADM_ACTION, LOG_NOTICE, "sending messages to ALL customers"); + $result = $db->query('SELECT `firstname`, `name`, `email` FROM `' . TABLE_PANEL_CUSTOMERS . "`"); + } + else + { + $log->logAction(ADM_ACTION, LOG_NOTICE, "sending messages to customers"); + $result = $db->query('SELECT `firstname`, `name`, `email` FROM `' . TABLE_PANEL_CUSTOMERS . "` WHERE `adminid`='" . $userinfo['adminid'] . "'"); + } + } + else + { + standard_error('noreceipientsgiven'); + } + + $subject = $_POST['subject']; + $message = wordwrap($_POST['message'], 70); + + if(!empty($message)) + { + $mailcounter = 0; + $mail->Body = $message; + $mail->Subject = $subject; + + while($row = $db->fetch_array($result)) + { + $mail->AddAddress($row['email'], $row['firstname'] . ' ' . $row['name']); + $mail->From = $userinfo['email']; + $mail->FromName = $userinfo['firstname'] . ' ' . $userinfo['name']; + + if(!$mail->Send()) + { + if($mail->ErrorInfo != '') + { + $mailerr_msg = $mail->ErrorInfo; + } + else + { + $mailerr_msg = $row["email"]; + } + + $log->logAction(ADM_ACTION, LOG_ERR, "Error sending mail: " . $mailerr_msg); + standard_error('errorsendingmail', $row["email"]); + } + + $mailcounter++; + $mail->ClearAddresses(); + } + + redirectTo($filename, Array('page' => $page, 's' => $s, 'action' => 'showsuccess', 'sentitems' => $mailcounter)); + } + else + { + standard_error('nomessagetosend'); + } + } + } + + if($action == 'showsuccess') + { + $success = 1; + $sentitems = isset($_GET['sentitems']) ? (int)$_GET['sentitems'] : 0; + + if($sentitems == 0) + { + $successmessage = $lng['message']['noreceipients']; + } + else + { + $successmessage = str_replace('%s', $sentitems, $lng['message']['success']); + } + + $action = ''; + } + else + { + $success = 0; + $sentitems = 0; + $successmessage = ''; + $action = ''; + } + + $receipients = ''; + + if($userinfo['customers_see_all'] == "1") + { + $receipients.= makeoption($lng['panel']['reseller'], 0); + } + + $receipients.= makeoption($lng['panel']['customer'], 1); + eval("echo \"" . getTemplate("message/message") . "\";"); +} + +?> diff --git a/admin_phpsettings.php b/admin_phpsettings.php index 9d0c3a43..40ae2651 100644 --- a/admin_phpsettings.php +++ b/admin_phpsettings.php @@ -1,185 +1,185 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Panel - * @version $Id$ - */ - -define('AREA', 'admin'); - -/** - * Include our init.php, which manages Sessions, Language etc. - */ - -require ("./lib/init.php"); - -if(isset($_POST['id'])) -{ - $id = intval($_POST['id']); -} -elseif(isset($_GET['id'])) -{ - $id = intval($_GET['id']); -} - -if($page == 'overview') -{ - if($action == '') - { - $tablecontent = ''; - $result = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`"); - - while($row = $db->fetch_array($result)) - { - $domainresult = false; - - if((int)$userinfo['domains_see_all'] == 0) - { - $domainresult = $db->query("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `adminid` = " . (int)$userinfo['userid'] . " AND `phpsettingid` = " . (int)$row['id']); - } - else - { - $domainresult = $db->query("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `phpsettingid` = " . (int)$row['id']); - } - - $domains = ''; - - if($db->num_rows($domainresult) > 0) - { - while($row2 = $db->fetch_array($domainresult)) - { - $domains.= $row2['domain'] . '
'; - } - } - else - { - $domains = $lng['admin']['phpsettings']['notused']; - } - - eval("\$tablecontent.=\"" . getTemplate("phpconfig/overview_overview") . "\";"); - } - - $log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting overview has been viewed by '" . $userinfo['loginname'] . "'"); - eval("echo \"" . getTemplate("phpconfig/overview") . "\";"); - } - - if($action == 'add') - { - if((int)$userinfo['change_serversettings'] == 1) - { - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - $description = validate($_POST['description'], 'description'); - $binary = makeCorrectFile(validate($_POST['binary'], 'binary')); - $file_extensions = validate($_POST['file_extensions'], 'file_extensions', '/^[a-zA-Z0-9\s]*$/'); - $phpsettings = validate(str_replace("\r\n", "\n", $_POST['phpsettings']), 'phpsettings', '/^[^\0]*$/'); - $mod_fcgid_starter = validate($_POST['mod_fcgid_starter'], 'mod_fcgid_starter', '/^[0-9]*$/', '', array('-1', '')); - $mod_fcgid_maxrequests = validate($_POST['mod_fcgid_maxrequests'], 'mod_fcgid_maxrequests', '/^[0-9]*$/', '', array('-1', '')); - - if(strlen($description) == 0 - || strlen($description) > 50) - { - standard_error('descriptioninvalid'); - } - - $db->query("INSERT INTO `" . TABLE_PANEL_PHPCONFIGS . "` SET `description` = '" . $db->escape($description) . "', `binary` = '" . $db->escape($binary) . "', `file_extensions` = '" . $db->escape($file_extensions) . "', `mod_fcgid_starter` = '" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests` = '" . $db->escape($mod_fcgid_maxrequests) . "', `phpsettings` = '" . $db->escape($phpsettings) . "'"); - inserttask('1'); - $log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with description '" . $value . "' has been created by '" . $userinfo['loginname'] . "'"); - redirectTo($filename, Array('page' => $page, 's' => $s)); - } - else - { - $result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = 1"); - eval("echo \"" . getTemplate("phpconfig/overview_add") . "\";"); - } - } - else - { - standard_error('nopermissionsorinvalidid'); - } - } - - if($action == 'delete') - { - $result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = " . (int)$id); - - if($result['id'] != 0 - && $result['id'] == $id - && (int)$userinfo['change_serversettings'] == 1 - && $id != 1) - { - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `phpsettingid` = 1 WHERE `phpsettingid` = " . (int)$id); - $db->query("DELETE FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = " . (int)$id); - inserttask('1'); - $log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with id #" . (int)$id . " has been deleted by '" . $userinfo['loginname'] . "'"); - redirectTo($filename, Array('page' => $page, 's' => $s)); - } - else - { - ask_yesno('phpsetting_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['description']); - } - } - else - { - standard_error('nopermissionsorinvalidid'); - } - } - - if($action == 'edit') - { - $result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = " . (int)$id); - - if($result['id'] != 0 - && $result['id'] == $id - && (int)$userinfo['change_serversettings'] == 1) - { - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - $description = validate($_POST['description'], 'description'); - $binary = makeCorrectFile(validate($_POST['binary'], 'binary')); - $file_extensions = validate($_POST['file_extensions'], 'file_extensions', '/^[a-zA-Z0-9\s]*$/'); - $phpsettings = validate(str_replace("\r\n", "\n", $_POST['phpsettings']), 'phpsettings', '/^[^\0]*$/'); - $mod_fcgid_starter = validate($_POST['mod_fcgid_starter'], 'mod_fcgid_starter', '/^[0-9]*$/', '', array('-1', '')); - $mod_fcgid_maxrequests = validate($_POST['mod_fcgid_maxrequests'], 'mod_fcgid_maxrequests', '/^[0-9]*$/', '', array('-1', '')); - - if(strlen($description) == 0 - || strlen($description) > 50) - { - standard_error('descriptioninvalid'); - } - - $db->query("UPDATE `" . TABLE_PANEL_PHPCONFIGS . "` SET `description` = '" . $db->escape($description) . "', `binary` = '" . $db->escape($binary) . "', `file_extensions` = '" . $db->escape($file_extensions) . "', `mod_fcgid_starter` = '" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests` = '" . $db->escape($mod_fcgid_maxrequests) . "', `phpsettings` = '" . $db->escape($phpsettings) . "' WHERE `id` = " . (int)$id); - inserttask('1'); - $log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with description '" . $description . "' has been changed by '" . $userinfo['loginname'] . "'"); - redirectTo($filename, Array('page' => $page, 's' => $s)); - } - else - { - eval("echo \"" . getTemplate("phpconfig/overview_edit") . "\";"); - } - } - else - { - standard_error('nopermissionsorinvalidid'); - } - } -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Panel + * @version $Id$ + */ + +define('AREA', 'admin'); + +/** + * Include our init.php, which manages Sessions, Language etc. + */ + +require ("./lib/init.php"); + +if(isset($_POST['id'])) +{ + $id = intval($_POST['id']); +} +elseif(isset($_GET['id'])) +{ + $id = intval($_GET['id']); +} + +if($page == 'overview') +{ + if($action == '') + { + $tablecontent = ''; + $result = $db->query("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`"); + + while($row = $db->fetch_array($result)) + { + $domainresult = false; + + if((int)$userinfo['domains_see_all'] == 0) + { + $domainresult = $db->query("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `adminid` = " . (int)$userinfo['userid'] . " AND `phpsettingid` = " . (int)$row['id']); + } + else + { + $domainresult = $db->query("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `phpsettingid` = " . (int)$row['id']); + } + + $domains = ''; + + if($db->num_rows($domainresult) > 0) + { + while($row2 = $db->fetch_array($domainresult)) + { + $domains.= $row2['domain'] . '
'; + } + } + else + { + $domains = $lng['admin']['phpsettings']['notused']; + } + + eval("\$tablecontent.=\"" . getTemplate("phpconfig/overview_overview") . "\";"); + } + + $log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting overview has been viewed by '" . $userinfo['loginname'] . "'"); + eval("echo \"" . getTemplate("phpconfig/overview") . "\";"); + } + + if($action == 'add') + { + if((int)$userinfo['change_serversettings'] == 1) + { + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + $description = validate($_POST['description'], 'description'); + $binary = makeCorrectFile(validate($_POST['binary'], 'binary')); + $file_extensions = validate($_POST['file_extensions'], 'file_extensions', '/^[a-zA-Z0-9\s]*$/'); + $phpsettings = validate(str_replace("\r\n", "\n", $_POST['phpsettings']), 'phpsettings', '/^[^\0]*$/'); + $mod_fcgid_starter = validate($_POST['mod_fcgid_starter'], 'mod_fcgid_starter', '/^[0-9]*$/', '', array('-1', '')); + $mod_fcgid_maxrequests = validate($_POST['mod_fcgid_maxrequests'], 'mod_fcgid_maxrequests', '/^[0-9]*$/', '', array('-1', '')); + + if(strlen($description) == 0 + || strlen($description) > 50) + { + standard_error('descriptioninvalid'); + } + + $db->query("INSERT INTO `" . TABLE_PANEL_PHPCONFIGS . "` SET `description` = '" . $db->escape($description) . "', `binary` = '" . $db->escape($binary) . "', `file_extensions` = '" . $db->escape($file_extensions) . "', `mod_fcgid_starter` = '" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests` = '" . $db->escape($mod_fcgid_maxrequests) . "', `phpsettings` = '" . $db->escape($phpsettings) . "'"); + inserttask('1'); + $log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with description '" . $value . "' has been created by '" . $userinfo['loginname'] . "'"); + redirectTo($filename, Array('page' => $page, 's' => $s)); + } + else + { + $result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = 1"); + eval("echo \"" . getTemplate("phpconfig/overview_add") . "\";"); + } + } + else + { + standard_error('nopermissionsorinvalidid'); + } + } + + if($action == 'delete') + { + $result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = " . (int)$id); + + if($result['id'] != 0 + && $result['id'] == $id + && (int)$userinfo['change_serversettings'] == 1 + && $id != 1) + { + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `phpsettingid` = 1 WHERE `phpsettingid` = " . (int)$id); + $db->query("DELETE FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = " . (int)$id); + inserttask('1'); + $log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with id #" . (int)$id . " has been deleted by '" . $userinfo['loginname'] . "'"); + redirectTo($filename, Array('page' => $page, 's' => $s)); + } + else + { + ask_yesno('phpsetting_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $result['description']); + } + } + else + { + standard_error('nopermissionsorinvalidid'); + } + } + + if($action == 'edit') + { + $result = $db->query_first("SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = " . (int)$id); + + if($result['id'] != 0 + && $result['id'] == $id + && (int)$userinfo['change_serversettings'] == 1) + { + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + $description = validate($_POST['description'], 'description'); + $binary = makeCorrectFile(validate($_POST['binary'], 'binary')); + $file_extensions = validate($_POST['file_extensions'], 'file_extensions', '/^[a-zA-Z0-9\s]*$/'); + $phpsettings = validate(str_replace("\r\n", "\n", $_POST['phpsettings']), 'phpsettings', '/^[^\0]*$/'); + $mod_fcgid_starter = validate($_POST['mod_fcgid_starter'], 'mod_fcgid_starter', '/^[0-9]*$/', '', array('-1', '')); + $mod_fcgid_maxrequests = validate($_POST['mod_fcgid_maxrequests'], 'mod_fcgid_maxrequests', '/^[0-9]*$/', '', array('-1', '')); + + if(strlen($description) == 0 + || strlen($description) > 50) + { + standard_error('descriptioninvalid'); + } + + $db->query("UPDATE `" . TABLE_PANEL_PHPCONFIGS . "` SET `description` = '" . $db->escape($description) . "', `binary` = '" . $db->escape($binary) . "', `file_extensions` = '" . $db->escape($file_extensions) . "', `mod_fcgid_starter` = '" . $db->escape($mod_fcgid_starter) . "', `mod_fcgid_maxrequests` = '" . $db->escape($mod_fcgid_maxrequests) . "', `phpsettings` = '" . $db->escape($phpsettings) . "' WHERE `id` = " . (int)$id); + inserttask('1'); + $log->logAction(ADM_ACTION, LOG_INFO, "php.ini setting with description '" . $description . "' has been changed by '" . $userinfo['loginname'] . "'"); + redirectTo($filename, Array('page' => $page, 's' => $s)); + } + else + { + eval("echo \"" . getTemplate("phpconfig/overview_edit") . "\";"); + } + } + else + { + standard_error('nopermissionsorinvalidid'); + } + } +} + +?> diff --git a/admin_templates.php b/admin_templates.php index a61eb8de..1cdfa355 100644 --- a/admin_templates.php +++ b/admin_templates.php @@ -1,380 +1,380 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Panel - * @version $Id$ - */ - -define('AREA', 'admin'); - -/** - * Include our init.php, which manages Sessions, Language etc. - */ - -require ("./lib/init.php"); - -if(isset($_POST['subjectid'])) -{ - $subjectid = intval($_POST['subjectid']); - $mailbodyid = intval($_POST['mailbodyid']); -} -elseif(isset($_GET['subjectid'])) -{ - $subjectid = intval($_GET['subjectid']); - $mailbodyid = intval($_GET['mailbodyid']); -} - -if(isset($_POST['id'])) -{ - $id = intval($_POST['id']); -} -elseif(isset($_GET['id'])) -{ - $id = intval($_GET['id']); -} - -$available_templates = array( - 'createcustomer', - 'pop_success', - 'trafficninetypercent', - 'new_ticket_by_customer', - 'new_ticket_for_customer', - 'new_ticket_by_staff', - 'new_reply_ticket_by_customer', - 'new_reply_ticket_by_staff' -); -$file_templates = array( - 'index_html' -); - -if($action == '') -{ - //email templates - - $log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_templates"); - - if($settings['panel']['sendalternativemail'] == 1) - { - $available_templates[] = 'pop_success_alternative'; - } - - $templates_array = array(); - $result = $db->query("SELECT `id`, `language`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `templategroup`='mails' ORDER BY `language`, `varname`"); - - while($row = $db->fetch_array($result)) - { - $parts = array(); - preg_match('/^([a-z]([a-z_]+[a-z])*)_(mailbody|subject)$/', $row['varname'], $parts); - $templates_array[$row['language']][$parts[1]][$parts[3]] = $row['id']; - } - - $templates = ''; - foreach($templates_array as $language => $template_defs) - { - foreach($template_defs as $action => $email) - { - $subjectid = $email['subject']; - $mailbodyid = $email['mailbody']; - $template = $lng['admin']['templates'][$action]; - eval("\$templates.=\"" . getTemplate("templates/templates_template") . "\";"); - } - } - - $add = false; - - while(list($language_file, $language_name) = each($languages)) - { - $templates_done = array(); - $result = $db->query('SELECT `varname` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($language_name) . '\' AND `templategroup`=\'mails\' AND `varname` LIKE \'%_subject\''); - - while(($row = $db->fetch_array($result)) != false) - { - $templates_done[] = str_replace('_subject', '', $row['varname']); - } - - if(count(array_diff($available_templates, $templates_done)) > 0) - { - $add = true; - } - } - - //filetemplates - - $filetemplates = ''; - $filetemplateadd = false; - $result = $db->query("SELECT `id`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `templategroup`='files'"); - - if($db->num_rows($result) != count($file_templates))$filetemplateadd = true; - - while($row = $db->fetch_array($result)) - { - eval("\$filetemplates.=\"" . getTemplate("templates/templates_filetemplate") . "\";"); - } - - eval("echo \"" . getTemplate("templates/templates") . "\";"); -} -elseif($action == 'delete' - && $subjectid != 0 - && $mailbodyid != 0) -{ - //email templates - - $result = $db->query_first("SELECT `language`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `id`='" . (int)$subjectid . "'"); - - if($result['varname'] != '') - { - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - $db->query("DELETE FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND (`id`='" . (int)$subjectid . "' OR `id`='" . (int)$mailbodyid . "')"); - $log->logAction(ADM_ACTION, LOG_INFO, "deleted template '" . $result['language'] . ' - ' . $lng['admin']['templates'][str_replace('_subject', '', $result['varname'])] . "'"); - redirectTo($filename, Array('page' => $page, 's' => $s)); - } - else - { - ask_yesno('admin_template_reallydelete', $filename, array('subjectid' => $subjectid, 'mailbodyid' => $mailbodyid, 'page' => $page, 'action' => $action), $result['language'] . ' - ' . $lng['admin']['templates'][str_replace('_subject', '', $result['varname'])]); - } - } -} -elseif($action == 'delete' - && $id != 0) -{ - //file templates - - $result = $db->query("SELECT * FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `id`='" . (int)$id . "'"); - - if($db->num_rows($result) > 0) - { - $row = $db->fetch_array($result); - - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - $db->query("DELETE FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`=" . (int)$userinfo['adminid'] . " AND `id`=" . (int)$id . ""); - $log->logAction(ADM_ACTION, LOG_INFO, "deleted template '" . $lng['admin']['templates'][$row['varname']] . "'"); - redirectTo($filename, Array('page' => $page, 's' => $s)); - } - else - { - ask_yesno('admin_template_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $lng['admin']['templates'][$row['varname']]); - } - } - else - { - standard_error('templatenotfound'); - exit; - } -} -elseif($action == 'add') -{ - if($settings['panel']['sendalternativemail'] == 1) - { - $available_templates[] = 'pop_success_alternative'; - } - - if(isset($_POST['prepare']) - && $_POST['prepare'] == 'prepare') - { - //email templates - - $language = validate($_POST['language'], 'language'); - $templates = array(); - $result = $db->query('SELECT `varname` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($language) . '\' AND `templategroup`=\'mails\' AND `varname` LIKE \'%_subject\''); - - while(($row = $db->fetch_array($result)) != false) - { - $templates[] = str_replace('_subject', '', $row['varname']); - } - - $templates = array_diff($available_templates, $templates); - $template_options = ''; - foreach($templates as $template) - { - $template_options.= makeoption($lng['admin']['templates'][$template], $template, NULL, true); - } - - eval("echo \"" . getTemplate("templates/templates_add_2") . "\";"); - } - elseif(isset($_POST['send']) - && $_POST['send'] == 'send') - { - //email templates - - $language = validate($_POST['language'], 'language', '/^[^\r\n\0"\']+$/', 'nolanguageselect'); - $template = validate($_POST['template'], 'template'); - $subject = validate($_POST['subject'], 'subject', '/^[^\r\n\0]+$/', 'nosubjectcreate'); - $mailbody = validate($_POST['mailbody'], 'mailbody', '/^[^\0]+$/', 'nomailbodycreate'); - $templates = array(); - $result = $db->query('SELECT `varname` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($language) . '\' AND `templategroup`=\'mails\' AND `varname` LIKE \'%_subject\''); - - while(($row = $db->fetch_array($result)) != false) - { - $templates[] = str_replace('_subject', '', $row['varname']); - } - - $templates = array_diff($available_templates, $templates); - - if(array_search($template, $templates) === false) - { - standard_error('templatenotfound'); - } - else - { - $result = $db->query("INSERT INTO `" . TABLE_PANEL_TEMPLATES . "` (`adminid`, `language`, `templategroup`, `varname`, `value`) - VALUES ('" . (int)$userinfo['adminid'] . "', '" . $db->escape($language) . "', 'mails', '" . $db->escape($template) . "_subject','" . $db->escape($subject) . "')"); - $result = $db->query("INSERT INTO `" . TABLE_PANEL_TEMPLATES . "` (`adminid`, `language`, `templategroup`, `varname`, `value`) - VALUES ('" . (int)$userinfo['adminid'] . "', '" . $db->escape($language) . "', 'mails', '" . $db->escape($template) . "_mailbody','" . $db->escape($mailbody) . "')"); - $log->logAction(ADM_ACTION, LOG_INFO, "added template '" . $language . ' - ' . $template . "'"); - redirectTo($filename, Array('page' => $page, 's' => $s)); - } - } - elseif(isset($_POST['filesend']) - && $_POST['filesend'] == 'filesend') - { - //file templates - - $template = validate($_POST['template'], 'template'); - $filecontent = validate($_POST['filecontent'], 'filecontent', '/^[^\0]+$/', 'filecontentnotset'); - $db->query("INSERT INTO `" . TABLE_PANEL_TEMPLATES . "` (`adminid`, `language`, `templategroup`, `varname`, `value`) - VALUES ('" . (int)$userinfo['adminid'] . "', '', 'files', '" . $db->escape($template) . "','" . $db->escape($filecontent) . "')"); - $log->logAction(ADM_ACTION, LOG_INFO, "added template '" . $template . "'"); - redirectTo($filename, Array('page' => $page, 's' => $s)); - } - elseif(!isset($_GET['files'])) - { - //email templates - - $add = false; - $language_options = ''; - - while(list($language_file, $language_name) = each($languages)) - { - $templates = array(); - $result = $db->query('SELECT `varname` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($language_name) . '\' AND `templategroup`=\'mails\' AND `varname` LIKE \'%_subject\''); - - while(($row = $db->fetch_array($result)) != false) - { - $templates[] = str_replace('_subject', '', $row['varname']); - } - - if(count(array_diff($available_templates, $templates)) > 0) - { - $add = true; - $language_options.= makeoption($language_name, $language_file, $userinfo['language'], true); - } - } - - if($add) - { - eval("echo \"" . getTemplate("templates/templates_add_1") . "\";"); - } - else - { - standard_error('alltemplatesdefined'); - exit; - } - } - else - { - //filetemplates - - $result = $db->query("SELECT `id`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `templategroup`='files'"); - - if($db->num_rows($result) == count($file_templates)) - { - standard_error('alltemplatesdefined'); - exit; - } - else - { - $templatesdefined = array(); - $free_templates = ''; - - while($row = $db->fetch_array($result))$templatesdefined[] = $row['varname']; - foreach(array_diff($file_templates, $templatesdefined) as $template) - { - $free_templates.= makeoption($lng['admin']['templates'][$template], $template, '', true); - } - - eval("echo \"" . getTemplate("templates/filetemplates_add") . "\";"); - } - } -} -elseif($action == 'edit' - && $subjectid != 0 - && $mailbodyid != 0) -{ - //email templates - - $result = $db->query_first("SELECT `language`, `varname`, `value` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `id`='" . (int)$subjectid . "'"); - - if($result['varname'] != '') - { - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - $subject = validate($_POST['subject'], 'subject', '/^[^\r\n\0]+$/', 'nosubjectcreate'); - $mailbody = validate($_POST['mailbody'], 'mailbody', '/^[^\0]+$/', 'nomailbodycreate'); - $db->query("UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET `value`='" . $db->escape($subject) . "' WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `id`='" . (int)$subjectid . "'"); - $db->query("UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET `value`='" . $db->escape($mailbody) . "' WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `id`='" . (int)$mailbodyid . "'"); - $log->logAction(ADM_ACTION, LOG_INFO, "edited template '" . $result['varname'] . "'"); - redirectTo($filename, Array('page' => $page, 's' => $s)); - } - else - { - $result = htmlentities_array($result); - $template = $lng['admin']['templates'][str_replace('_subject', '', $result['varname'])]; - $subject = $result['value']; - $result = $db->query_first("SELECT `language`, `varname`, `value` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `id`='$mailbodyid'"); - $result = htmlentities_array($result); - $mailbody = $result['value']; - eval("echo \"" . getTemplate("templates/templates_edit") . "\";"); - } - } -} -elseif($action == 'edit' - && $id != 0) -{ - //file templates - - $result = $db->query("SELECT * FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `id`='" . (int)$id . "'"); - - if($db->num_rows($result) > 0) - { - $row = $db->fetch_array($result); - - //filetemplates - - if(isset($_POST['filesend']) - && $_POST['filesend'] == 'filesend') - { - $filecontent = validate($_POST['filecontent'], 'filecontent', '/^[^\0]+$/', 'filecontentnotset'); - $db->query("UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET `value`='" . $db->escape($filecontent) . "' WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `id`='" . (int)$id . "'"); - $log->logAction(ADM_ACTION, LOG_INFO, "edited template '" . $row['varname'] . "'"); - redirectTo($filename, Array('page' => $page, 's' => $s)); - } - else - { - eval("echo \"" . getTemplate("templates/filetemplates_edit") . "\";"); - } - } - else - { - standard_error('templatenotfound'); - exit; - } -} - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Panel + * @version $Id$ + */ + +define('AREA', 'admin'); + +/** + * Include our init.php, which manages Sessions, Language etc. + */ + +require ("./lib/init.php"); + +if(isset($_POST['subjectid'])) +{ + $subjectid = intval($_POST['subjectid']); + $mailbodyid = intval($_POST['mailbodyid']); +} +elseif(isset($_GET['subjectid'])) +{ + $subjectid = intval($_GET['subjectid']); + $mailbodyid = intval($_GET['mailbodyid']); +} + +if(isset($_POST['id'])) +{ + $id = intval($_POST['id']); +} +elseif(isset($_GET['id'])) +{ + $id = intval($_GET['id']); +} + +$available_templates = array( + 'createcustomer', + 'pop_success', + 'trafficninetypercent', + 'new_ticket_by_customer', + 'new_ticket_for_customer', + 'new_ticket_by_staff', + 'new_reply_ticket_by_customer', + 'new_reply_ticket_by_staff' +); +$file_templates = array( + 'index_html' +); + +if($action == '') +{ + //email templates + + $log->logAction(ADM_ACTION, LOG_NOTICE, "viewed admin_templates"); + + if($settings['panel']['sendalternativemail'] == 1) + { + $available_templates[] = 'pop_success_alternative'; + } + + $templates_array = array(); + $result = $db->query("SELECT `id`, `language`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `templategroup`='mails' ORDER BY `language`, `varname`"); + + while($row = $db->fetch_array($result)) + { + $parts = array(); + preg_match('/^([a-z]([a-z_]+[a-z])*)_(mailbody|subject)$/', $row['varname'], $parts); + $templates_array[$row['language']][$parts[1]][$parts[3]] = $row['id']; + } + + $templates = ''; + foreach($templates_array as $language => $template_defs) + { + foreach($template_defs as $action => $email) + { + $subjectid = $email['subject']; + $mailbodyid = $email['mailbody']; + $template = $lng['admin']['templates'][$action]; + eval("\$templates.=\"" . getTemplate("templates/templates_template") . "\";"); + } + } + + $add = false; + + while(list($language_file, $language_name) = each($languages)) + { + $templates_done = array(); + $result = $db->query('SELECT `varname` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($language_name) . '\' AND `templategroup`=\'mails\' AND `varname` LIKE \'%_subject\''); + + while(($row = $db->fetch_array($result)) != false) + { + $templates_done[] = str_replace('_subject', '', $row['varname']); + } + + if(count(array_diff($available_templates, $templates_done)) > 0) + { + $add = true; + } + } + + //filetemplates + + $filetemplates = ''; + $filetemplateadd = false; + $result = $db->query("SELECT `id`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `templategroup`='files'"); + + if($db->num_rows($result) != count($file_templates))$filetemplateadd = true; + + while($row = $db->fetch_array($result)) + { + eval("\$filetemplates.=\"" . getTemplate("templates/templates_filetemplate") . "\";"); + } + + eval("echo \"" . getTemplate("templates/templates") . "\";"); +} +elseif($action == 'delete' + && $subjectid != 0 + && $mailbodyid != 0) +{ + //email templates + + $result = $db->query_first("SELECT `language`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `id`='" . (int)$subjectid . "'"); + + if($result['varname'] != '') + { + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + $db->query("DELETE FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND (`id`='" . (int)$subjectid . "' OR `id`='" . (int)$mailbodyid . "')"); + $log->logAction(ADM_ACTION, LOG_INFO, "deleted template '" . $result['language'] . ' - ' . $lng['admin']['templates'][str_replace('_subject', '', $result['varname'])] . "'"); + redirectTo($filename, Array('page' => $page, 's' => $s)); + } + else + { + ask_yesno('admin_template_reallydelete', $filename, array('subjectid' => $subjectid, 'mailbodyid' => $mailbodyid, 'page' => $page, 'action' => $action), $result['language'] . ' - ' . $lng['admin']['templates'][str_replace('_subject', '', $result['varname'])]); + } + } +} +elseif($action == 'delete' + && $id != 0) +{ + //file templates + + $result = $db->query("SELECT * FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `id`='" . (int)$id . "'"); + + if($db->num_rows($result) > 0) + { + $row = $db->fetch_array($result); + + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + $db->query("DELETE FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`=" . (int)$userinfo['adminid'] . " AND `id`=" . (int)$id . ""); + $log->logAction(ADM_ACTION, LOG_INFO, "deleted template '" . $lng['admin']['templates'][$row['varname']] . "'"); + redirectTo($filename, Array('page' => $page, 's' => $s)); + } + else + { + ask_yesno('admin_template_reallydelete', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $lng['admin']['templates'][$row['varname']]); + } + } + else + { + standard_error('templatenotfound'); + exit; + } +} +elseif($action == 'add') +{ + if($settings['panel']['sendalternativemail'] == 1) + { + $available_templates[] = 'pop_success_alternative'; + } + + if(isset($_POST['prepare']) + && $_POST['prepare'] == 'prepare') + { + //email templates + + $language = validate($_POST['language'], 'language'); + $templates = array(); + $result = $db->query('SELECT `varname` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($language) . '\' AND `templategroup`=\'mails\' AND `varname` LIKE \'%_subject\''); + + while(($row = $db->fetch_array($result)) != false) + { + $templates[] = str_replace('_subject', '', $row['varname']); + } + + $templates = array_diff($available_templates, $templates); + $template_options = ''; + foreach($templates as $template) + { + $template_options.= makeoption($lng['admin']['templates'][$template], $template, NULL, true); + } + + eval("echo \"" . getTemplate("templates/templates_add_2") . "\";"); + } + elseif(isset($_POST['send']) + && $_POST['send'] == 'send') + { + //email templates + + $language = validate($_POST['language'], 'language', '/^[^\r\n\0"\']+$/', 'nolanguageselect'); + $template = validate($_POST['template'], 'template'); + $subject = validate($_POST['subject'], 'subject', '/^[^\r\n\0]+$/', 'nosubjectcreate'); + $mailbody = validate($_POST['mailbody'], 'mailbody', '/^[^\0]+$/', 'nomailbodycreate'); + $templates = array(); + $result = $db->query('SELECT `varname` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($language) . '\' AND `templategroup`=\'mails\' AND `varname` LIKE \'%_subject\''); + + while(($row = $db->fetch_array($result)) != false) + { + $templates[] = str_replace('_subject', '', $row['varname']); + } + + $templates = array_diff($available_templates, $templates); + + if(array_search($template, $templates) === false) + { + standard_error('templatenotfound'); + } + else + { + $result = $db->query("INSERT INTO `" . TABLE_PANEL_TEMPLATES . "` (`adminid`, `language`, `templategroup`, `varname`, `value`) + VALUES ('" . (int)$userinfo['adminid'] . "', '" . $db->escape($language) . "', 'mails', '" . $db->escape($template) . "_subject','" . $db->escape($subject) . "')"); + $result = $db->query("INSERT INTO `" . TABLE_PANEL_TEMPLATES . "` (`adminid`, `language`, `templategroup`, `varname`, `value`) + VALUES ('" . (int)$userinfo['adminid'] . "', '" . $db->escape($language) . "', 'mails', '" . $db->escape($template) . "_mailbody','" . $db->escape($mailbody) . "')"); + $log->logAction(ADM_ACTION, LOG_INFO, "added template '" . $language . ' - ' . $template . "'"); + redirectTo($filename, Array('page' => $page, 's' => $s)); + } + } + elseif(isset($_POST['filesend']) + && $_POST['filesend'] == 'filesend') + { + //file templates + + $template = validate($_POST['template'], 'template'); + $filecontent = validate($_POST['filecontent'], 'filecontent', '/^[^\0]+$/', 'filecontentnotset'); + $db->query("INSERT INTO `" . TABLE_PANEL_TEMPLATES . "` (`adminid`, `language`, `templategroup`, `varname`, `value`) + VALUES ('" . (int)$userinfo['adminid'] . "', '', 'files', '" . $db->escape($template) . "','" . $db->escape($filecontent) . "')"); + $log->logAction(ADM_ACTION, LOG_INFO, "added template '" . $template . "'"); + redirectTo($filename, Array('page' => $page, 's' => $s)); + } + elseif(!isset($_GET['files'])) + { + //email templates + + $add = false; + $language_options = ''; + + while(list($language_file, $language_name) = each($languages)) + { + $templates = array(); + $result = $db->query('SELECT `varname` FROM `' . TABLE_PANEL_TEMPLATES . '` WHERE `adminid`=\'' . (int)$userinfo['adminid'] . '\' AND `language`=\'' . $db->escape($language_name) . '\' AND `templategroup`=\'mails\' AND `varname` LIKE \'%_subject\''); + + while(($row = $db->fetch_array($result)) != false) + { + $templates[] = str_replace('_subject', '', $row['varname']); + } + + if(count(array_diff($available_templates, $templates)) > 0) + { + $add = true; + $language_options.= makeoption($language_name, $language_file, $userinfo['language'], true); + } + } + + if($add) + { + eval("echo \"" . getTemplate("templates/templates_add_1") . "\";"); + } + else + { + standard_error('alltemplatesdefined'); + exit; + } + } + else + { + //filetemplates + + $result = $db->query("SELECT `id`, `varname` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `templategroup`='files'"); + + if($db->num_rows($result) == count($file_templates)) + { + standard_error('alltemplatesdefined'); + exit; + } + else + { + $templatesdefined = array(); + $free_templates = ''; + + while($row = $db->fetch_array($result))$templatesdefined[] = $row['varname']; + foreach(array_diff($file_templates, $templatesdefined) as $template) + { + $free_templates.= makeoption($lng['admin']['templates'][$template], $template, '', true); + } + + eval("echo \"" . getTemplate("templates/filetemplates_add") . "\";"); + } + } +} +elseif($action == 'edit' + && $subjectid != 0 + && $mailbodyid != 0) +{ + //email templates + + $result = $db->query_first("SELECT `language`, `varname`, `value` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `id`='" . (int)$subjectid . "'"); + + if($result['varname'] != '') + { + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + $subject = validate($_POST['subject'], 'subject', '/^[^\r\n\0]+$/', 'nosubjectcreate'); + $mailbody = validate($_POST['mailbody'], 'mailbody', '/^[^\0]+$/', 'nomailbodycreate'); + $db->query("UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET `value`='" . $db->escape($subject) . "' WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `id`='" . (int)$subjectid . "'"); + $db->query("UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET `value`='" . $db->escape($mailbody) . "' WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `id`='" . (int)$mailbodyid . "'"); + $log->logAction(ADM_ACTION, LOG_INFO, "edited template '" . $result['varname'] . "'"); + redirectTo($filename, Array('page' => $page, 's' => $s)); + } + else + { + $result = htmlentities_array($result); + $template = $lng['admin']['templates'][str_replace('_subject', '', $result['varname'])]; + $subject = $result['value']; + $result = $db->query_first("SELECT `language`, `varname`, `value` FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `id`='$mailbodyid'"); + $result = htmlentities_array($result); + $mailbody = $result['value']; + eval("echo \"" . getTemplate("templates/templates_edit") . "\";"); + } + } +} +elseif($action == 'edit' + && $id != 0) +{ + //file templates + + $result = $db->query("SELECT * FROM `" . TABLE_PANEL_TEMPLATES . "` WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `id`='" . (int)$id . "'"); + + if($db->num_rows($result) > 0) + { + $row = $db->fetch_array($result); + + //filetemplates + + if(isset($_POST['filesend']) + && $_POST['filesend'] == 'filesend') + { + $filecontent = validate($_POST['filecontent'], 'filecontent', '/^[^\0]+$/', 'filecontentnotset'); + $db->query("UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET `value`='" . $db->escape($filecontent) . "' WHERE `adminid`='" . (int)$userinfo['adminid'] . "' AND `id`='" . (int)$id . "'"); + $log->logAction(ADM_ACTION, LOG_INFO, "edited template '" . $row['varname'] . "'"); + redirectTo($filename, Array('page' => $page, 's' => $s)); + } + else + { + eval("echo \"" . getTemplate("templates/filetemplates_edit") . "\";"); + } + } + else + { + standard_error('templatenotfound'); + exit; + } +} + ?> \ No newline at end of file diff --git a/admin_updates.php b/admin_updates.php index fc122982..87fdcb16 100644 --- a/admin_updates.php +++ b/admin_updates.php @@ -12,7 +12,7 @@ * @author Froxlor team (2010-) * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @package Panel - * @version $Id: $ + * @version $Id$ */ define('AREA', 'admin'); diff --git a/customer_aps.php b/customer_aps.php index 84bdc9f2..4f7b50c2 100644 --- a/customer_aps.php +++ b/customer_aps.php @@ -1,35 +1,35 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Panel - * @version $Id$ - */ - -// Required code - -define('AREA', 'customer'); -require ("./lib/init.php"); -require ("./lib/class_apsparser.php"); -$Id = 0; - -if(isset($_GET['id']))$Id = (int)$_GET['id']; - -if(isset($_POST['id']))$Id = (int)$_POST['id']; -eval("echo \"" . getTemplate("aps/header") . "\";"); -$Aps = new ApsParser($userinfo, $settings, $db); -$Aps->MainHandler($action); -eval("echo \"" . getTemplate("aps/footer") . "\";"); - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Panel + * @version $Id$ + */ + +// Required code + +define('AREA', 'customer'); +require ("./lib/init.php"); +require ("./lib/class_apsparser.php"); +$Id = 0; + +if(isset($_GET['id']))$Id = (int)$_GET['id']; + +if(isset($_POST['id']))$Id = (int)$_POST['id']; +eval("echo \"" . getTemplate("aps/header") . "\";"); +$Aps = new ApsParser($userinfo, $settings, $db); +$Aps->MainHandler($action); +eval("echo \"" . getTemplate("aps/footer") . "\";"); + ?> \ No newline at end of file diff --git a/customer_autoresponder.php b/customer_autoresponder.php index 4f34463d..140235f6 100644 --- a/customer_autoresponder.php +++ b/customer_autoresponder.php @@ -1,306 +1,306 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Panel - * @version $Id$ - */ - -// Required code - -define('AREA', 'customer'); -require ("./lib/init.php"); - -// Create new autoresponder - -if($action == "add") -{ - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - $account = trim($_POST['account']); - $subject = trim($_POST['subject']); - $message = trim($_POST['message']); - - $date_from_off = isset($_POST['date_from_off']) ? -1 : 0; - $date_until_off = isset($_POST['date_from_off']) ? -1 : 0; - - /* - * @TODO validate date (DD-MM-YYYY) - */ - $ts_from = -1; - $ts_until = -1; - - if($date_from_off > -1) - { - $date_from = $_POST['date_from']; - $ts_from = mktime(0, 0, 0, substr($date_from, 3, 2), substr($date_from, 0, 2), substr($date_from, 6, 4)); - } - if($date_until_off > -1) - { - $date_until = $_POST['date_until']; - $ts_until = mktime(0, 0, 0, substr($date_until, 3, 2), substr($date_until, 0, 2), substr($date_until, 6, 4)); - } - - if(empty($account) - || empty($subject) - || empty($message)) - { - standard_error('missingfields'); - } - - // Does account exist? - - $result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($account) . "' LIMIT 0,1"); - - if($db->num_rows($result) == 0) - { - standard_error('accountnotexisting'); - } - - // Does autoresponder exist? - - $result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($account) . "' LIMIT 0,1"); - - if($db->num_rows($result) == 1) - { - standard_error('autoresponderalreadyexists'); - } - - $db->query("INSERT INTO `" . TABLE_MAIL_AUTORESPONDER . "` - SET `email` = '" . $db->escape($account) . "', - `message` = '" . $db->escape($message) . "', - `enabled` = '" . (int)$_POST['active'] . "', - `ts_from` = '" . (int)$ts_from . "', - `ts_until` = '" . (int)$ts_until . "', - `subject` = '" . $db->escape($subject) . "', - `customerid` = '" . $db->escape((int)$userinfo['customerid']) . "' - "); - redirectTo($filename, Array('s' => $s)); - } - - // Get accounts - - $result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` NOT IN (SELECT `email` FROM `" . TABLE_MAIL_AUTORESPONDER . "`) ORDER BY email ASC"); - - if($db->num_rows($result) == 0) - { - standard_error('noemailaccount'); - } - - $accounts = ''; - - while($row = $db->fetch_array($result)) - { - $accounts.= ""; - } - - $date_from_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true); - $date_until_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true); - - eval("echo \"" . getTemplate("email/autoresponder_add") . "\";"); -} - -// Edit autoresponder - -else - -if($action == "edit") -{ - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - $account = trim($_POST['account']); - $subject = trim($_POST['subject']); - $message = trim($_POST['message']); - - $date_from_off = isset($_POST['date_from_off']) ? -1 : 0; - $date_until_off = isset($_POST['date_from_off']) ? -1 : 0; - - /* - * @TODO validate date (DD-MM-YYYY) - */ - $ts_from = -1; - $ts_until = -1; - - if($date_from_off > -1) - { - $date_from = $_POST['date_from']; - $ts_from = mktime(0, 0, 0, substr($date_from, 3, 2), substr($date_from, 0, 2), substr($date_from, 6, 4)); - } - if($date_until_off > -1) - { - $date_until = $_POST['date_until']; - $ts_until = mktime(0, 0, 0, substr($date_until, 3, 2), substr($date_until, 0, 2), substr($date_until, 6, 4)); - } - - if(empty($account) - || empty($subject) - || empty($message)) - { - standard_error('missingfields'); - } - - // Does account exist? - - $result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($account) . "' LIMIT 0,1"); - - if($db->num_rows($result) == 0) - { - standard_error('accountnotexisting'); - } - - // Does autoresponder exist? - - $result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($account) . "' LIMIT 0,1"); - - if($db->num_rows($result) == 0) - { - standard_error('invalidautoresponder'); - } - - $ResponderActive = 0; - - if(isset($_POST['active']) - && $_POST['active'] == '1') - { - $ResponderActive = 1; - } - - $db->query("UPDATE `" . TABLE_MAIL_AUTORESPONDER . "` - SET `message` = '" . $db->escape($message) . "', - `enabled` = '" . (int)$ResponderActive . "', - `ts_from` = '" . (int)$ts_from . "', - `ts_until` = '" . (int)$ts_until . "', - `subject` = '" . $db->escape($subject) . "' - WHERE `email` = '" . $db->escape($account) . "' - AND `customerid` = '" . $db->escape((int)$userinfo['customerid']) . "' - "); - redirectTo($filename, Array('s' => $s)); - } - - $email = trim(htmlspecialchars($_GET['email'])); - - // Get account data - - $result = $db->query("SELECT * FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($email) . "' LIMIT 0,1"); - - if($db->num_rows($result) == 0) - { - standard_error('invalidautoresponder'); - } - - $row = $db->fetch_array($result); - $subject = htmlspecialchars($row['subject']); - $message = htmlspecialchars($row['message']); - - $date_from = (int)$row['date_from']; - $date_until = (int)$row['date_until']; - - if($date_from == -1) - { - $deactivated = '-1'; - } - else - { - $deactivated = '0'; - $date_from = date('d-m-Y', $date_from); - } - $date_from_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true); - - if($date_until == -1) - { - $deactivated = '-1'; - $date_until = '-1'; - } - else - { - $deactivated = '0'; - $date_until = date('d-m-Y', $date_until); - } - $date_from_off = makecheckbox('date_until_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true); - - $checked = ''; - - if($row['enabled'] == 1) - { - $checked = "checked=\"checked\""; - } - - eval("echo \"" . getTemplate("email/autoresponder_edit") . "\";"); -} - -// Delete autoresponder - -else - -if($action == "delete") -{ - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - $account = trim($_POST['account']); - - // Does autoresponder exist? - - $result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($account) . "' LIMIT 0,1"); - - if($db->num_rows($result) == 0) - { - standard_error('invalidautoresponder'); - } - - $db->query("DELETE FROM `" . TABLE_MAIL_AUTORESPONDER . "` - WHERE `email` = '" . $db->escape($account) . "' - AND `customerid` = '" . $db->escape((int)$userinfo['customerid']) . "' - "); - redirectTo($filename, Array('s' => $s)); - } - - $email = trim(htmlspecialchars($_GET['email'])); - ask_yesno('autoresponderdelete', $filename, array('action' => $action, 'account' => $email)); -} - -// List existing autoresponders - -else -{ - $autoresponder = ''; - $result = $db->query("SELECT * FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' ORDER BY email ASC"); - - while($row = $db->fetch_array($result)) - { - if($result['date_from'] == -1 && $result['date_until'] == -1) - { - $activated_date = $lng['panel']['not_activated']; - } - elseif($result['date_from'] == -1 && $result['date_until'] != -1) - { - $activated_date = $lng['autoresponder']['date_until'].': '.date('d-m-Y', $result['date_until']); - } - elseif($result['date_from'] != -1 && $result['date_until'] == -1) - { - $activated_date = $lng['autoresponder']['date_from'].': '.date('d-m-Y', $result['date_from']); - } - else - { - $activated_date = $date('d-m-Y', $result['date_from']) . ' - ' . date('d-m-Y', $result['date_until']); - } - eval("\$autoresponder.=\"" . getTemplate("email/autoresponder_autoresponder") . "\";"); - } - - eval("echo \"" . getTemplate("email/autoresponder") . "\";"); -} - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Panel + * @version $Id$ + */ + +// Required code + +define('AREA', 'customer'); +require ("./lib/init.php"); + +// Create new autoresponder + +if($action == "add") +{ + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + $account = trim($_POST['account']); + $subject = trim($_POST['subject']); + $message = trim($_POST['message']); + + $date_from_off = isset($_POST['date_from_off']) ? -1 : 0; + $date_until_off = isset($_POST['date_from_off']) ? -1 : 0; + + /* + * @TODO validate date (DD-MM-YYYY) + */ + $ts_from = -1; + $ts_until = -1; + + if($date_from_off > -1) + { + $date_from = $_POST['date_from']; + $ts_from = mktime(0, 0, 0, substr($date_from, 3, 2), substr($date_from, 0, 2), substr($date_from, 6, 4)); + } + if($date_until_off > -1) + { + $date_until = $_POST['date_until']; + $ts_until = mktime(0, 0, 0, substr($date_until, 3, 2), substr($date_until, 0, 2), substr($date_until, 6, 4)); + } + + if(empty($account) + || empty($subject) + || empty($message)) + { + standard_error('missingfields'); + } + + // Does account exist? + + $result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($account) . "' LIMIT 0,1"); + + if($db->num_rows($result) == 0) + { + standard_error('accountnotexisting'); + } + + // Does autoresponder exist? + + $result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($account) . "' LIMIT 0,1"); + + if($db->num_rows($result) == 1) + { + standard_error('autoresponderalreadyexists'); + } + + $db->query("INSERT INTO `" . TABLE_MAIL_AUTORESPONDER . "` + SET `email` = '" . $db->escape($account) . "', + `message` = '" . $db->escape($message) . "', + `enabled` = '" . (int)$_POST['active'] . "', + `ts_from` = '" . (int)$ts_from . "', + `ts_until` = '" . (int)$ts_until . "', + `subject` = '" . $db->escape($subject) . "', + `customerid` = '" . $db->escape((int)$userinfo['customerid']) . "' + "); + redirectTo($filename, Array('s' => $s)); + } + + // Get accounts + + $result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` NOT IN (SELECT `email` FROM `" . TABLE_MAIL_AUTORESPONDER . "`) ORDER BY email ASC"); + + if($db->num_rows($result) == 0) + { + standard_error('noemailaccount'); + } + + $accounts = ''; + + while($row = $db->fetch_array($result)) + { + $accounts.= ""; + } + + $date_from_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true); + $date_until_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, '-1', true, true); + + eval("echo \"" . getTemplate("email/autoresponder_add") . "\";"); +} + +// Edit autoresponder + +else + +if($action == "edit") +{ + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + $account = trim($_POST['account']); + $subject = trim($_POST['subject']); + $message = trim($_POST['message']); + + $date_from_off = isset($_POST['date_from_off']) ? -1 : 0; + $date_until_off = isset($_POST['date_from_off']) ? -1 : 0; + + /* + * @TODO validate date (DD-MM-YYYY) + */ + $ts_from = -1; + $ts_until = -1; + + if($date_from_off > -1) + { + $date_from = $_POST['date_from']; + $ts_from = mktime(0, 0, 0, substr($date_from, 3, 2), substr($date_from, 0, 2), substr($date_from, 6, 4)); + } + if($date_until_off > -1) + { + $date_until = $_POST['date_until']; + $ts_until = mktime(0, 0, 0, substr($date_until, 3, 2), substr($date_until, 0, 2), substr($date_until, 6, 4)); + } + + if(empty($account) + || empty($subject) + || empty($message)) + { + standard_error('missingfields'); + } + + // Does account exist? + + $result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_USERS . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($account) . "' LIMIT 0,1"); + + if($db->num_rows($result) == 0) + { + standard_error('accountnotexisting'); + } + + // Does autoresponder exist? + + $result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($account) . "' LIMIT 0,1"); + + if($db->num_rows($result) == 0) + { + standard_error('invalidautoresponder'); + } + + $ResponderActive = 0; + + if(isset($_POST['active']) + && $_POST['active'] == '1') + { + $ResponderActive = 1; + } + + $db->query("UPDATE `" . TABLE_MAIL_AUTORESPONDER . "` + SET `message` = '" . $db->escape($message) . "', + `enabled` = '" . (int)$ResponderActive . "', + `ts_from` = '" . (int)$ts_from . "', + `ts_until` = '" . (int)$ts_until . "', + `subject` = '" . $db->escape($subject) . "' + WHERE `email` = '" . $db->escape($account) . "' + AND `customerid` = '" . $db->escape((int)$userinfo['customerid']) . "' + "); + redirectTo($filename, Array('s' => $s)); + } + + $email = trim(htmlspecialchars($_GET['email'])); + + // Get account data + + $result = $db->query("SELECT * FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($email) . "' LIMIT 0,1"); + + if($db->num_rows($result) == 0) + { + standard_error('invalidautoresponder'); + } + + $row = $db->fetch_array($result); + $subject = htmlspecialchars($row['subject']); + $message = htmlspecialchars($row['message']); + + $date_from = (int)$row['date_from']; + $date_until = (int)$row['date_until']; + + if($date_from == -1) + { + $deactivated = '-1'; + } + else + { + $deactivated = '0'; + $date_from = date('d-m-Y', $date_from); + } + $date_from_off = makecheckbox('date_from_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true); + + if($date_until == -1) + { + $deactivated = '-1'; + $date_until = '-1'; + } + else + { + $deactivated = '0'; + $date_until = date('d-m-Y', $date_until); + } + $date_from_off = makecheckbox('date_until_off', $lng['panel']['not_activated'], '-1', false, $deactivated, true, true); + + $checked = ''; + + if($row['enabled'] == 1) + { + $checked = "checked=\"checked\""; + } + + eval("echo \"" . getTemplate("email/autoresponder_edit") . "\";"); +} + +// Delete autoresponder + +else + +if($action == "delete") +{ + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + $account = trim($_POST['account']); + + // Does autoresponder exist? + + $result = $db->query("SELECT `email` FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' AND `email` = '" . $db->escape($account) . "' LIMIT 0,1"); + + if($db->num_rows($result) == 0) + { + standard_error('invalidautoresponder'); + } + + $db->query("DELETE FROM `" . TABLE_MAIL_AUTORESPONDER . "` + WHERE `email` = '" . $db->escape($account) . "' + AND `customerid` = '" . $db->escape((int)$userinfo['customerid']) . "' + "); + redirectTo($filename, Array('s' => $s)); + } + + $email = trim(htmlspecialchars($_GET['email'])); + ask_yesno('autoresponderdelete', $filename, array('action' => $action, 'account' => $email)); +} + +// List existing autoresponders + +else +{ + $autoresponder = ''; + $result = $db->query("SELECT * FROM `" . TABLE_MAIL_AUTORESPONDER . "` WHERE `customerid` = '" . (int)$userinfo['customerid'] . "' ORDER BY email ASC"); + + while($row = $db->fetch_array($result)) + { + if($result['date_from'] == -1 && $result['date_until'] == -1) + { + $activated_date = $lng['panel']['not_activated']; + } + elseif($result['date_from'] == -1 && $result['date_until'] != -1) + { + $activated_date = $lng['autoresponder']['date_until'].': '.date('d-m-Y', $result['date_until']); + } + elseif($result['date_from'] != -1 && $result['date_until'] == -1) + { + $activated_date = $lng['autoresponder']['date_from'].': '.date('d-m-Y', $result['date_from']); + } + else + { + $activated_date = $date('d-m-Y', $result['date_from']) . ' - ' . date('d-m-Y', $result['date_until']); + } + eval("\$autoresponder.=\"" . getTemplate("email/autoresponder_autoresponder") . "\";"); + } + + eval("echo \"" . getTemplate("email/autoresponder") . "\";"); +} + ?> \ No newline at end of file diff --git a/customer_index.php b/customer_index.php index 26c32b20..137489a0 100644 --- a/customer_index.php +++ b/customer_index.php @@ -1,184 +1,184 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Panel - * @version $Id$ - */ - -define('AREA', 'customer'); - -/** - * Include our init.php, which manages Sessions, Language etc. - */ - -require ("./lib/init.php"); - -if($action == 'logout') -{ - $log->logAction(USR_ACTION, LOG_NOTICE, "logged out"); - - if($settings['session']['allow_multiple_login'] == '1') - { - $db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['customerid'] . "' AND `adminsession` = '0' AND `hash` = '" . $s . "'"); - } - else - { - $db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['customerid'] . "' AND `adminsession` = '0'"); - } - - redirectTo('index.php'); - exit; -} - -if($page == 'overview') -{ - $log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_index"); - $domains = ''; - $result = $db->query("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `id` <> '" . (int)$userinfo['standardsubdomain'] . "' "); - $domainArray = array(); - - while($row = $db->fetch_array($result)) - { - $domainArray[] = $idna_convert->decode($row['domain']); - } - - natsort($domainArray); - $domains = implode(', ', $domainArray); - $userinfo['email'] = $idna_convert->decode($userinfo['email']); - $yesterday = time() - (60 * 60 * 24); - $month = date('M Y', $yesterday); - - /* $traffic=$db->query_first("SELECT SUM(http) AS http_sum, SUM(ftp_up) AS ftp_up_sum, SUM(ftp_down) AS ftp_down_sum, SUM(mail) AS mail_sum FROM ".TABLE_PANEL_TRAFFIC." WHERE year='".date('Y')."' AND month='".date('m')."' AND day<='".date('d')."' AND customerid='".$userinfo['customerid']."'"); - $userinfo['traffic_used']=$traffic['http_sum']+$traffic['ftp_up_sum']+$traffic['ftp_down_sum']+$traffic['mail_sum'];*/ - - $userinfo['diskspace'] = round($userinfo['diskspace'] / 1024, $settings['panel']['decimal_places']); - $userinfo['diskspace_used'] = round($userinfo['diskspace_used'] / 1024, $settings['panel']['decimal_places']); - $userinfo['traffic'] = round($userinfo['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']); - $userinfo['traffic_used'] = round($userinfo['traffic_used'] / (1024 * 1024), $settings['panel']['decimal_places']); - $userinfo = str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps tickets subdomains aps_packages'); - $opentickets = 0; - $opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '` - WHERE `customerid` = "' . $userinfo['customerid'] . '" - AND `answerto` = "0" - AND (`status` = "0" OR `status` = "2") - AND `lastreplier`="1"'); - $awaitingtickets = $opentickets['count']; - $awaitingtickets_text = ''; - - if($opentickets > 0) - { - $awaitingtickets_text = strtr($lng['ticket']['awaitingticketreply'], array('%s' => '' . $opentickets['count'] . '')); - } - - eval("echo \"" . getTemplate("index/index") . "\";"); -} -elseif($page == 'change_password') -{ - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - $old_password = validate($_POST['old_password'], 'old password'); - - if(md5($old_password) != $userinfo['password']) - { - standard_error('oldpasswordnotcorrect'); - exit; - } - - $new_password = validate($_POST['new_password'], 'new password'); - $new_password_confirm = validate($_POST['new_password_confirm'], 'new password confirm'); - - if($old_password == '') - { - standard_error(array('stringisempty', 'oldpassword')); - } - elseif($new_password == '') - { - standard_error(array('stringisempty', 'newpassword')); - } - elseif($new_password_confirm == '') - { - standard_error(array('stringisempty', 'newpasswordconfirm')); - } - elseif($new_password != $new_password_confirm) - { - standard_error('newpasswordconfirmerror'); - } - else - { - $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `password`='" . md5($new_password) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `password`='" . md5($old_password) . "'"); - $log->logAction(USR_ACTION, LOG_NOTICE, 'changed password'); - - if(isset($_POST['change_main_ftp']) - && $_POST['change_main_ftp'] == 'true') - { - $db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`=ENCRYPT('" . $db->escape($new_password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `username`='" . $db->escape($userinfo['loginname']) . "'"); - $log->logAction(USR_ACTION, LOG_NOTICE, 'changed main ftp password'); - } - - if(isset($_POST['change_webalizer']) - && $_POST['change_webalizer'] == 'true') - { - if(CRYPT_STD_DES == 1) - { - $saltfordescrypt = substr(md5(uniqid(microtime(), 1)), 4, 2); - $new_webalizer_password = crypt($new_password, $saltfordescrypt); - } - else - { - $new_webalizer_password = crypt($new_password); - } - - $db->query("UPDATE `" . TABLE_PANEL_HTPASSWDS . "` SET `password`='" . $db->escape($new_webalizer_password) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `username`='" . $db->escape($userinfo['loginname']) . "'"); - } - - redirectTo($filename, Array('s' => $s)); - } - } - else - { - eval("echo \"" . getTemplate("index/change_password") . "\";"); - } -} -elseif($page == 'change_language') -{ - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - $def_language = validate($_POST['def_language'], 'default language'); - - if(isset($languages[$def_language])) - { - $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `def_language`='" . $db->escape($def_language) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "'"); - $db->query("UPDATE `" . TABLE_PANEL_SESSIONS . "` SET `language`='" . $db->escape($def_language) . "' WHERE `hash`='" . $db->escape($s) . "'"); - $log->logAction(USR_ACTION, LOG_NOTICE, "changed default language to '" . $def_language . "'"); - } - - redirectTo($filename, Array('s' => $s)); - } - else - { - $language_options = ''; - - while(list($language_file, $language_name) = each($languages)) - { - $language_options.= makeoption($language_name, $language_file, $userinfo['def_language'], true); - } - - eval("echo \"" . getTemplate("index/change_language") . "\";"); - } -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Panel + * @version $Id$ + */ + +define('AREA', 'customer'); + +/** + * Include our init.php, which manages Sessions, Language etc. + */ + +require ("./lib/init.php"); + +if($action == 'logout') +{ + $log->logAction(USR_ACTION, LOG_NOTICE, "logged out"); + + if($settings['session']['allow_multiple_login'] == '1') + { + $db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['customerid'] . "' AND `adminsession` = '0' AND `hash` = '" . $s . "'"); + } + else + { + $db->query("DELETE FROM `" . TABLE_PANEL_SESSIONS . "` WHERE `userid` = '" . (int)$userinfo['customerid'] . "' AND `adminsession` = '0'"); + } + + redirectTo('index.php'); + exit; +} + +if($page == 'overview') +{ + $log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_index"); + $domains = ''; + $result = $db->query("SELECT `domain` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `parentdomainid`='0' AND `id` <> '" . (int)$userinfo['standardsubdomain'] . "' "); + $domainArray = array(); + + while($row = $db->fetch_array($result)) + { + $domainArray[] = $idna_convert->decode($row['domain']); + } + + natsort($domainArray); + $domains = implode(', ', $domainArray); + $userinfo['email'] = $idna_convert->decode($userinfo['email']); + $yesterday = time() - (60 * 60 * 24); + $month = date('M Y', $yesterday); + + /* $traffic=$db->query_first("SELECT SUM(http) AS http_sum, SUM(ftp_up) AS ftp_up_sum, SUM(ftp_down) AS ftp_down_sum, SUM(mail) AS mail_sum FROM ".TABLE_PANEL_TRAFFIC." WHERE year='".date('Y')."' AND month='".date('m')."' AND day<='".date('d')."' AND customerid='".$userinfo['customerid']."'"); + $userinfo['traffic_used']=$traffic['http_sum']+$traffic['ftp_up_sum']+$traffic['ftp_down_sum']+$traffic['mail_sum'];*/ + + $userinfo['diskspace'] = round($userinfo['diskspace'] / 1024, $settings['panel']['decimal_places']); + $userinfo['diskspace_used'] = round($userinfo['diskspace_used'] / 1024, $settings['panel']['decimal_places']); + $userinfo['traffic'] = round($userinfo['traffic'] / (1024 * 1024), $settings['panel']['decimal_places']); + $userinfo['traffic_used'] = round($userinfo['traffic_used'] / (1024 * 1024), $settings['panel']['decimal_places']); + $userinfo = str_replace_array('-1', $lng['customer']['unlimited'], $userinfo, 'diskspace traffic mysqls emails email_accounts email_forwarders email_quota ftps tickets subdomains aps_packages'); + $opentickets = 0; + $opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '` + WHERE `customerid` = "' . $userinfo['customerid'] . '" + AND `answerto` = "0" + AND (`status` = "0" OR `status` = "2") + AND `lastreplier`="1"'); + $awaitingtickets = $opentickets['count']; + $awaitingtickets_text = ''; + + if($opentickets > 0) + { + $awaitingtickets_text = strtr($lng['ticket']['awaitingticketreply'], array('%s' => '' . $opentickets['count'] . '')); + } + + eval("echo \"" . getTemplate("index/index") . "\";"); +} +elseif($page == 'change_password') +{ + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + $old_password = validate($_POST['old_password'], 'old password'); + + if(md5($old_password) != $userinfo['password']) + { + standard_error('oldpasswordnotcorrect'); + exit; + } + + $new_password = validate($_POST['new_password'], 'new password'); + $new_password_confirm = validate($_POST['new_password_confirm'], 'new password confirm'); + + if($old_password == '') + { + standard_error(array('stringisempty', 'oldpassword')); + } + elseif($new_password == '') + { + standard_error(array('stringisempty', 'newpassword')); + } + elseif($new_password_confirm == '') + { + standard_error(array('stringisempty', 'newpasswordconfirm')); + } + elseif($new_password != $new_password_confirm) + { + standard_error('newpasswordconfirmerror'); + } + else + { + $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `password`='" . md5($new_password) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `password`='" . md5($old_password) . "'"); + $log->logAction(USR_ACTION, LOG_NOTICE, 'changed password'); + + if(isset($_POST['change_main_ftp']) + && $_POST['change_main_ftp'] == 'true') + { + $db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`=ENCRYPT('" . $db->escape($new_password) . "') WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `username`='" . $db->escape($userinfo['loginname']) . "'"); + $log->logAction(USR_ACTION, LOG_NOTICE, 'changed main ftp password'); + } + + if(isset($_POST['change_webalizer']) + && $_POST['change_webalizer'] == 'true') + { + if(CRYPT_STD_DES == 1) + { + $saltfordescrypt = substr(md5(uniqid(microtime(), 1)), 4, 2); + $new_webalizer_password = crypt($new_password, $saltfordescrypt); + } + else + { + $new_webalizer_password = crypt($new_password); + } + + $db->query("UPDATE `" . TABLE_PANEL_HTPASSWDS . "` SET `password`='" . $db->escape($new_webalizer_password) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "' AND `username`='" . $db->escape($userinfo['loginname']) . "'"); + } + + redirectTo($filename, Array('s' => $s)); + } + } + else + { + eval("echo \"" . getTemplate("index/change_password") . "\";"); + } +} +elseif($page == 'change_language') +{ + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + $def_language = validate($_POST['def_language'], 'default language'); + + if(isset($languages[$def_language])) + { + $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `def_language`='" . $db->escape($def_language) . "' WHERE `customerid`='" . (int)$userinfo['customerid'] . "'"); + $db->query("UPDATE `" . TABLE_PANEL_SESSIONS . "` SET `language`='" . $db->escape($def_language) . "' WHERE `hash`='" . $db->escape($s) . "'"); + $log->logAction(USR_ACTION, LOG_NOTICE, "changed default language to '" . $def_language . "'"); + } + + redirectTo($filename, Array('s' => $s)); + } + else + { + $language_options = ''; + + while(list($language_file, $language_name) = each($languages)) + { + $language_options.= makeoption($language_name, $language_file, $userinfo['def_language'], true); + } + + eval("echo \"" . getTemplate("index/change_language") . "\";"); + } +} + +?> diff --git a/customer_tickets.php b/customer_tickets.php index d5e27220..6f4f7404 100644 --- a/customer_tickets.php +++ b/customer_tickets.php @@ -1,414 +1,414 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Panel - * @version $Id$ - */ - -define('AREA', 'customer'); - -/** - * Include our init.php, which manages Sessions, Language etc. - */ - -require ("./lib/init.php"); - -if(isset($_POST['id'])) -{ - $id = intval($_POST['id']); -} -elseif(isset($_GET['id'])) -{ - $id = intval($_GET['id']); -} - -if($page == 'overview') -{ - $log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_tickets"); - eval("echo \"" . getTemplate("ticket/ticket") . "\";"); -} -elseif($page == 'tickets') -{ - if($action == '') - { - $log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_tickets::tickets"); - $fields = array( - 'status' => $lng['ticket']['status'], - 'priority' => $lng['ticket']['priority'], - 'lastchange' => $lng['ticket']['lastchange'], - 'ticket_answers' => $lng['ticket']['ticket_answers'], - 'subject' => $lng['ticket']['subject'], - 'lastreplier' => $lng['ticket']['lastreplier'] - ); - $paging = new paging($userinfo, $db, TABLE_PANEL_TICKETS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']); - $paging->sortfield = 'lastchange'; - $paging->sortorder = 'desc'; - $result = $db->query('SELECT `main`.`id`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` FROM `' . TABLE_PANEL_TICKETS . '` as `main` WHERE `main`.`answerto` = "0" AND `archived` = "0" AND `customerid`="' . (int)$userinfo['customerid'] . '" AND `adminid`="' . (int)$userinfo['adminid'] . '" ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit()); - $paging->setEntries($db->num_rows($result)); - $sortcode = $paging->getHtmlSortCode($lng); - $arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s); - $searchcode = $paging->getHtmlSearchCode($lng); - $pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s); - $i = 0; - $count = 0; - $tickets = ''; - $tickets_count = 0; - - while($row = $db->fetch_array($result)) - { - if($paging->checkDisplay($i)) - { - $tickets_count++; - $row = htmlentities_array($row); - $row['lastchange'] = date("d.m.y H:i", $row['lastchange']); - - if($row['status'] >= 0 - && $row['status'] <= 2) - { - $reopen = 0; - } - else - { - $reopen = 1; - } - - $row['status'] = ticket::getStatusText($lng, $row['status']); - $row['priority'] = ticket::getPriorityText($lng, $row['priority']); - - if($row['lastreplier'] == '1') - { - $row['lastreplier'] = $lng['ticket']['staff']; - $cananswer = 1; - } - else - { - $row['lastreplier'] = $lng['ticket']['customer']; - $cananswer = 0; - } - - if(strlen($row['subject']) > 20) - { - $row['subject'] = substr($row['subject'], 0, 17) . '...'; - } - - eval("\$tickets.=\"" . getTemplate("ticket/tickets_tickets") . "\";"); - $count++; - } - - $i++; - } - - $supportavailable = 0; - $time = date("Hi", time()); - $day = date("w", time()); - $start = substr($settings['ticket']['worktime_begin'], 0, 2) . substr($settings['ticket']['worktime_begin'], 3, 2); - $end = substr($settings['ticket']['worktime_end'], 0, 2) . substr($settings['ticket']['worktime_end'], 3, 2); - - if($time >= $start - && $time <= $end) - { - $supportavailable = 1; - } - - if($settings['ticket']['worktime_sat'] == "0" - && $day == "6") - { - $supportavailable = 0; - } - - if($settings['ticket']['worktime_sun'] == "0" - && $day == "0") - { - $supportavailable = 0; - } - - if($settings['ticket']['worktime_all'] == "1") - { - $supportavailable = 1; - } - - $ticketsopen = 0; - $opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '` - WHERE `customerid` = "' . $userinfo['customerid'] . '" - AND `answerto` = "0" - AND (`status` = "0" OR `status` = "1" OR `status` = "2")'); - - if($settings['ticket']['concurrently_open'] != - 1 - && $settings['ticket']['concurrently_open'] != '') - { - $notmorethanxopentickets = strtr($lng['ticket']['notmorethanxopentickets'], array('%s' => $settings['ticket']['concurrently_open'])); - } - else - { - $notmorethanxopentickets = ''; - } - - $ticketsopen = (int)$opentickets['count']; - eval("echo \"" . getTemplate("ticket/tickets") . "\";"); - } - elseif($action == 'new') - { - if($userinfo['tickets_used'] < $userinfo['tickets'] - || $userinfo['tickets'] == '-1') - { - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - $newticket = ticket::getInstanceOf($userinfo, $db, $settings, -1); - $newticket->Set('subject', validate($_POST['subject'], 'subject'), true, false); - $newticket->Set('priority', validate($_POST['priority'], 'priority'), true, false); - $newticket->Set('category', validate($_POST['category'], 'category'), true, false); - $newticket->Set('customer', (int)$userinfo['customerid'], true, false); - $newticket->Set('admin', (int)$userinfo['adminid'], true, false); - $newticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false); - - if($newticket->Get('subject') == null) - { - standard_error(array('stringisempty', 'mysubject')); - } - elseif($newticket->Get('message') == null) - { - standard_error(array('stringisempty', 'mymessage')); - } - else - { - $now = time(); - $newticket->Set('dt', $now, true, true); - $newticket->Set('lastchange', $now, true, true); - $newticket->Set('ip', $_SERVER['REMOTE_ADDR'], true, true); - $newticket->Set('status', '0', true, true); - $newticket->Set('lastreplier', '0', true, true); - $newticket->Set('by', '0', true, true); - $newticket->Insert(); - $log->logAction(USR_ACTION, LOG_NOTICE, "opened support-ticket '" . $newticket->Get('subject') . "'"); - $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` - SET `tickets_used`=`tickets_used`+1 WHERE `customerid`="' . (int)$userinfo['customerid'] . '"'); - - // Customer mail - - $newticket->sendMail((int)$userinfo['customerid'], 'new_ticket_for_customer_subject', $lng['mails']['new_ticket_for_customer']['subject'], 'new_ticket_for_customer_mailbody', $lng['mails']['new_ticket_for_customer']['mailbody']); - - // Admin mail - - $newticket->sendMail(-1, 'new_ticket_by_customer_subject', $lng['mails']['new_ticket_by_customer']['subject'], 'new_ticket_by_customer_mailbody', $lng['mails']['new_ticket_by_customer']['mailbody']); - redirectTo($filename, Array('page' => $page, 's' => $s)); - } - } - else - { - $categories = ''; - $result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC'); - - if(isset($result['name']) - && $result['name'] != '') - { - $result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC'); - - while($row = $db->fetch_array($result2)) - { - $categories.= makeoption($row['name'], $row['id']); - } - } - else - { - $categories = makeoption($lng['ticket']['no_cat'], '0'); - } - - $priorities = makeoption($lng['ticket']['unf_high'], '1'); - $priorities.= makeoption($lng['ticket']['unf_normal'], '2'); - $priorities.= makeoption($lng['ticket']['unf_low'], '3'); - $ticketsopen = 0; - $opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '` - WHERE `customerid` = "' . $userinfo['customerid'] . '" - AND `answerto` = "0" - AND (`status` = "0" OR `status` = "1" OR `status` = "2")'); - - if($settings['ticket']['concurrently_open'] != - 1 - && $settings['ticket']['concurrently_open'] != '') - { - $notmorethanxopentickets = strtr($lng['ticket']['notmorethanxopentickets'], array('%s' => $settings['ticket']['concurrently_open'])); - } - else - { - $notmorethanxopentickets = ''; - } - - $ticketsopen = (int)$opentickets['count']; - eval("echo \"" . getTemplate("ticket/tickets_new") . "\";"); - } - } - else - { - standard_error('nomoreticketsavailable'); - } - } - elseif($action == 'answer' - && $id != 0) - { - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - $replyticket = ticket::getInstanceOf($userinfo, $db, $settings, -1); - $replyticket->Set('subject', validate($_POST['subject'], 'subject'), true, false); - $replyticket->Set('priority', validate($_POST['priority'], 'priority'), true, false); - $replyticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false); - - if($replyticket->Get('message') == null) - { - standard_error(array('stringisempty', 'mymessage')); - } - else - { - $now = time(); - $replyticket->Set('customerid', (int)$userinfo['customerid'], true, true); - $replyticket->Set('lastchange', $now, true, true); - $replyticket->Set('ip', $_SERVER['REMOTE_ADDR'], true, true); - $replyticket->Set('status', '1', true, true); - $replyticket->Set('answerto', (int)$id, true, false); - $replyticket->Set('by', '0', true, true); - $replyticket->Insert(); - - // Update priority if changed - - $mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id); - - if($replyticket->Get('priority') != $mainticket->Get('priority')) - { - $mainticket->Set('priority', $replyticket->Get('priority'), true); - } - - $mainticket->Set('lastchange', $now); - $mainticket->Set('lastreplier', '0'); - $mainticket->Set('status', '1'); - $mainticket->Update(); - $log->logAction(USR_ACTION, LOG_NOTICE, "answered support-ticket '" . $mainticket->Get('subject') . "'"); - $mainticket->sendMail(-1, 'new_reply_ticket_by_customer_subject', $lng['mails']['new_reply_ticket_by_customer']['subject'], 'new_reply_ticket_by_customer_mailbody', $lng['mails']['new_reply_ticket_by_customer']['mailbody']); - redirectTo($filename, Array('page' => $page, 's' => $s)); - } - } - else - { - $ticket_replies = ''; - $mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id); - $dt = date("d.m.Y H:i\h", $mainticket->Get('dt')); - $status = ticket::getStatusText($lng, $mainticket->Get('status')); - - if($mainticket->Get('status') >= 0 - && $mainticket->Get('status') <= 2) - { - $isclosed = 0; - } - else - { - $isclosed = 1; - } - - if($mainticket->Get('by') == '1') - { - $by = $lng['ticket']['staff']; - } - else - { - $by = $lng['ticket']['customer']; - } - - $subject = $mainticket->Get('subject'); - $message = $mainticket->Get('message'); - eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_main") . "\";"); - $result = $db->query('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` - WHERE `id`="' . (int)$mainticket->Get('category') . '"'); - $row = $db->fetch_array($result); - $andere = $db->query('SELECT * FROM `' . TABLE_PANEL_TICKETS . '` WHERE `answerto`="' . (int)$id . '" ORDER BY `lastchange` ASC'); - - while($row2 = $db->fetch_array($andere)) - { - $subticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$row2['id']); - $lastchange = date("d.m.Y H:i\h", $subticket->Get('lastchange')); - - if($subticket->Get('by') == '1') - { - $by = $lng['ticket']['staff']; - } - else - { - $by = $lng['ticket']['customer']; - } - - $subject = $subticket->Get('subject'); - $message = $subticket->Get('message'); - eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_list") . "\";"); - } - - $priorities = makeoption($lng['ticket']['high'], '1', $mainticket->Get('priority'), true, true); - $priorities.= makeoption($lng['ticket']['normal'], '2', $mainticket->Get('priority'), true, true); - $priorities.= makeoption($lng['ticket']['low'], '3', $mainticket->Get('priority'), true, true); - $subject = $mainticket->Get('subject'); - $ticket_replies_count = $db->num_rows($andere) + 1; - - // don't forget the main-ticket! - - eval("echo \"" . getTemplate("ticket/tickets_reply") . "\";"); - } - } - elseif($action == 'close' - && $id != 0) - { - if(isset($_POST['send']) - && $_POST['send'] == 'send') - { - $now = time(); - $mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id); - $mainticket->Set('lastchange', $now, true, true); - $mainticket->Set('lastreplier', '0', true, true); - $mainticket->Set('status', '3', true, true); - $mainticket->Update(); - $log->logAction(USR_ACTION, LOG_NOTICE, "closed support-ticket '" . $mainticket->Get('subject') . "'"); - redirectTo($filename, Array('page' => $page, 's' => $s)); - } - else - { - $mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id); - ask_yesno('ticket_reallyclose', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $mainticket->Get('subject')); - } - } - elseif($action == 'reopen' - && $id != 0) - { - $ticketsopen = 0; - $opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '` - WHERE `customerid` = "' . $userinfo['customerid'] . '" - AND `answerto` = "0" - AND (`status` = "0" OR `status` = "1" OR `status` = "2")'); - $ticketsopen = (int)$opentickets['count']; - - if($ticketsopen > $settings['ticket']['concurrently_open'] - && $settings['ticket']['concurrently_open'] != - 1 - && $settings['ticket']['concurrently_open'] != '') - { - standard_error('notmorethanxopentickets', $settings['ticket']['concurrently_open']); - } - - $now = time(); - $mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id); - $mainticket->Set('lastchange', $now, true, true); - $mainticket->Set('lastreplier', '0', true, true); - $mainticket->Set('status', '0', true, true); - $mainticket->Update(); - $log->logAction(USR_ACTION, LOG_NOTICE, "reopened support-ticket '" . $mainticket->Get('subject') . "'"); - redirectTo($filename, Array('page' => $page, 's' => $s)); - } -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Panel + * @version $Id$ + */ + +define('AREA', 'customer'); + +/** + * Include our init.php, which manages Sessions, Language etc. + */ + +require ("./lib/init.php"); + +if(isset($_POST['id'])) +{ + $id = intval($_POST['id']); +} +elseif(isset($_GET['id'])) +{ + $id = intval($_GET['id']); +} + +if($page == 'overview') +{ + $log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_tickets"); + eval("echo \"" . getTemplate("ticket/ticket") . "\";"); +} +elseif($page == 'tickets') +{ + if($action == '') + { + $log->logAction(USR_ACTION, LOG_NOTICE, "viewed customer_tickets::tickets"); + $fields = array( + 'status' => $lng['ticket']['status'], + 'priority' => $lng['ticket']['priority'], + 'lastchange' => $lng['ticket']['lastchange'], + 'ticket_answers' => $lng['ticket']['ticket_answers'], + 'subject' => $lng['ticket']['subject'], + 'lastreplier' => $lng['ticket']['lastreplier'] + ); + $paging = new paging($userinfo, $db, TABLE_PANEL_TICKETS, $fields, $settings['panel']['paging'], $settings['panel']['natsorting']); + $paging->sortfield = 'lastchange'; + $paging->sortorder = 'desc'; + $result = $db->query('SELECT `main`.`id`, (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers`, `main`.`lastchange`, `main`.`subject`, `main`.`status`, `main`.`lastreplier`, `main`.`priority` FROM `' . TABLE_PANEL_TICKETS . '` as `main` WHERE `main`.`answerto` = "0" AND `archived` = "0" AND `customerid`="' . (int)$userinfo['customerid'] . '" AND `adminid`="' . (int)$userinfo['adminid'] . '" ' . $paging->getSqlWhere(true) . " " . $paging->getSqlOrderBy() . " " . $paging->getSqlLimit()); + $paging->setEntries($db->num_rows($result)); + $sortcode = $paging->getHtmlSortCode($lng); + $arrowcode = $paging->getHtmlArrowCode($filename . '?page=' . $page . '&s=' . $s); + $searchcode = $paging->getHtmlSearchCode($lng); + $pagingcode = $paging->getHtmlPagingCode($filename . '?page=' . $page . '&s=' . $s); + $i = 0; + $count = 0; + $tickets = ''; + $tickets_count = 0; + + while($row = $db->fetch_array($result)) + { + if($paging->checkDisplay($i)) + { + $tickets_count++; + $row = htmlentities_array($row); + $row['lastchange'] = date("d.m.y H:i", $row['lastchange']); + + if($row['status'] >= 0 + && $row['status'] <= 2) + { + $reopen = 0; + } + else + { + $reopen = 1; + } + + $row['status'] = ticket::getStatusText($lng, $row['status']); + $row['priority'] = ticket::getPriorityText($lng, $row['priority']); + + if($row['lastreplier'] == '1') + { + $row['lastreplier'] = $lng['ticket']['staff']; + $cananswer = 1; + } + else + { + $row['lastreplier'] = $lng['ticket']['customer']; + $cananswer = 0; + } + + if(strlen($row['subject']) > 20) + { + $row['subject'] = substr($row['subject'], 0, 17) . '...'; + } + + eval("\$tickets.=\"" . getTemplate("ticket/tickets_tickets") . "\";"); + $count++; + } + + $i++; + } + + $supportavailable = 0; + $time = date("Hi", time()); + $day = date("w", time()); + $start = substr($settings['ticket']['worktime_begin'], 0, 2) . substr($settings['ticket']['worktime_begin'], 3, 2); + $end = substr($settings['ticket']['worktime_end'], 0, 2) . substr($settings['ticket']['worktime_end'], 3, 2); + + if($time >= $start + && $time <= $end) + { + $supportavailable = 1; + } + + if($settings['ticket']['worktime_sat'] == "0" + && $day == "6") + { + $supportavailable = 0; + } + + if($settings['ticket']['worktime_sun'] == "0" + && $day == "0") + { + $supportavailable = 0; + } + + if($settings['ticket']['worktime_all'] == "1") + { + $supportavailable = 1; + } + + $ticketsopen = 0; + $opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '` + WHERE `customerid` = "' . $userinfo['customerid'] . '" + AND `answerto` = "0" + AND (`status` = "0" OR `status` = "1" OR `status` = "2")'); + + if($settings['ticket']['concurrently_open'] != - 1 + && $settings['ticket']['concurrently_open'] != '') + { + $notmorethanxopentickets = strtr($lng['ticket']['notmorethanxopentickets'], array('%s' => $settings['ticket']['concurrently_open'])); + } + else + { + $notmorethanxopentickets = ''; + } + + $ticketsopen = (int)$opentickets['count']; + eval("echo \"" . getTemplate("ticket/tickets") . "\";"); + } + elseif($action == 'new') + { + if($userinfo['tickets_used'] < $userinfo['tickets'] + || $userinfo['tickets'] == '-1') + { + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + $newticket = ticket::getInstanceOf($userinfo, $db, $settings, -1); + $newticket->Set('subject', validate($_POST['subject'], 'subject'), true, false); + $newticket->Set('priority', validate($_POST['priority'], 'priority'), true, false); + $newticket->Set('category', validate($_POST['category'], 'category'), true, false); + $newticket->Set('customer', (int)$userinfo['customerid'], true, false); + $newticket->Set('admin', (int)$userinfo['adminid'], true, false); + $newticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false); + + if($newticket->Get('subject') == null) + { + standard_error(array('stringisempty', 'mysubject')); + } + elseif($newticket->Get('message') == null) + { + standard_error(array('stringisempty', 'mymessage')); + } + else + { + $now = time(); + $newticket->Set('dt', $now, true, true); + $newticket->Set('lastchange', $now, true, true); + $newticket->Set('ip', $_SERVER['REMOTE_ADDR'], true, true); + $newticket->Set('status', '0', true, true); + $newticket->Set('lastreplier', '0', true, true); + $newticket->Set('by', '0', true, true); + $newticket->Insert(); + $log->logAction(USR_ACTION, LOG_NOTICE, "opened support-ticket '" . $newticket->Get('subject') . "'"); + $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` + SET `tickets_used`=`tickets_used`+1 WHERE `customerid`="' . (int)$userinfo['customerid'] . '"'); + + // Customer mail + + $newticket->sendMail((int)$userinfo['customerid'], 'new_ticket_for_customer_subject', $lng['mails']['new_ticket_for_customer']['subject'], 'new_ticket_for_customer_mailbody', $lng['mails']['new_ticket_for_customer']['mailbody']); + + // Admin mail + + $newticket->sendMail(-1, 'new_ticket_by_customer_subject', $lng['mails']['new_ticket_by_customer']['subject'], 'new_ticket_by_customer_mailbody', $lng['mails']['new_ticket_by_customer']['mailbody']); + redirectTo($filename, Array('page' => $page, 's' => $s)); + } + } + else + { + $categories = ''; + $result = $db->query_first('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC'); + + if(isset($result['name']) + && $result['name'] != '') + { + $result2 = $db->query('SELECT `id`, `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` ORDER BY `name` ASC'); + + while($row = $db->fetch_array($result2)) + { + $categories.= makeoption($row['name'], $row['id']); + } + } + else + { + $categories = makeoption($lng['ticket']['no_cat'], '0'); + } + + $priorities = makeoption($lng['ticket']['unf_high'], '1'); + $priorities.= makeoption($lng['ticket']['unf_normal'], '2'); + $priorities.= makeoption($lng['ticket']['unf_low'], '3'); + $ticketsopen = 0; + $opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '` + WHERE `customerid` = "' . $userinfo['customerid'] . '" + AND `answerto` = "0" + AND (`status` = "0" OR `status` = "1" OR `status` = "2")'); + + if($settings['ticket']['concurrently_open'] != - 1 + && $settings['ticket']['concurrently_open'] != '') + { + $notmorethanxopentickets = strtr($lng['ticket']['notmorethanxopentickets'], array('%s' => $settings['ticket']['concurrently_open'])); + } + else + { + $notmorethanxopentickets = ''; + } + + $ticketsopen = (int)$opentickets['count']; + eval("echo \"" . getTemplate("ticket/tickets_new") . "\";"); + } + } + else + { + standard_error('nomoreticketsavailable'); + } + } + elseif($action == 'answer' + && $id != 0) + { + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + $replyticket = ticket::getInstanceOf($userinfo, $db, $settings, -1); + $replyticket->Set('subject', validate($_POST['subject'], 'subject'), true, false); + $replyticket->Set('priority', validate($_POST['priority'], 'priority'), true, false); + $replyticket->Set('message', validate(str_replace("\r\n", "\n", $_POST['message']), 'message', '/^[^\0]*$/'), true, false); + + if($replyticket->Get('message') == null) + { + standard_error(array('stringisempty', 'mymessage')); + } + else + { + $now = time(); + $replyticket->Set('customerid', (int)$userinfo['customerid'], true, true); + $replyticket->Set('lastchange', $now, true, true); + $replyticket->Set('ip', $_SERVER['REMOTE_ADDR'], true, true); + $replyticket->Set('status', '1', true, true); + $replyticket->Set('answerto', (int)$id, true, false); + $replyticket->Set('by', '0', true, true); + $replyticket->Insert(); + + // Update priority if changed + + $mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id); + + if($replyticket->Get('priority') != $mainticket->Get('priority')) + { + $mainticket->Set('priority', $replyticket->Get('priority'), true); + } + + $mainticket->Set('lastchange', $now); + $mainticket->Set('lastreplier', '0'); + $mainticket->Set('status', '1'); + $mainticket->Update(); + $log->logAction(USR_ACTION, LOG_NOTICE, "answered support-ticket '" . $mainticket->Get('subject') . "'"); + $mainticket->sendMail(-1, 'new_reply_ticket_by_customer_subject', $lng['mails']['new_reply_ticket_by_customer']['subject'], 'new_reply_ticket_by_customer_mailbody', $lng['mails']['new_reply_ticket_by_customer']['mailbody']); + redirectTo($filename, Array('page' => $page, 's' => $s)); + } + } + else + { + $ticket_replies = ''; + $mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id); + $dt = date("d.m.Y H:i\h", $mainticket->Get('dt')); + $status = ticket::getStatusText($lng, $mainticket->Get('status')); + + if($mainticket->Get('status') >= 0 + && $mainticket->Get('status') <= 2) + { + $isclosed = 0; + } + else + { + $isclosed = 1; + } + + if($mainticket->Get('by') == '1') + { + $by = $lng['ticket']['staff']; + } + else + { + $by = $lng['ticket']['customer']; + } + + $subject = $mainticket->Get('subject'); + $message = $mainticket->Get('message'); + eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_main") . "\";"); + $result = $db->query('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` + WHERE `id`="' . (int)$mainticket->Get('category') . '"'); + $row = $db->fetch_array($result); + $andere = $db->query('SELECT * FROM `' . TABLE_PANEL_TICKETS . '` WHERE `answerto`="' . (int)$id . '" ORDER BY `lastchange` ASC'); + + while($row2 = $db->fetch_array($andere)) + { + $subticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$row2['id']); + $lastchange = date("d.m.Y H:i\h", $subticket->Get('lastchange')); + + if($subticket->Get('by') == '1') + { + $by = $lng['ticket']['staff']; + } + else + { + $by = $lng['ticket']['customer']; + } + + $subject = $subticket->Get('subject'); + $message = $subticket->Get('message'); + eval("\$ticket_replies.=\"" . getTemplate("ticket/tickets_tickets_list") . "\";"); + } + + $priorities = makeoption($lng['ticket']['high'], '1', $mainticket->Get('priority'), true, true); + $priorities.= makeoption($lng['ticket']['normal'], '2', $mainticket->Get('priority'), true, true); + $priorities.= makeoption($lng['ticket']['low'], '3', $mainticket->Get('priority'), true, true); + $subject = $mainticket->Get('subject'); + $ticket_replies_count = $db->num_rows($andere) + 1; + + // don't forget the main-ticket! + + eval("echo \"" . getTemplate("ticket/tickets_reply") . "\";"); + } + } + elseif($action == 'close' + && $id != 0) + { + if(isset($_POST['send']) + && $_POST['send'] == 'send') + { + $now = time(); + $mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id); + $mainticket->Set('lastchange', $now, true, true); + $mainticket->Set('lastreplier', '0', true, true); + $mainticket->Set('status', '3', true, true); + $mainticket->Update(); + $log->logAction(USR_ACTION, LOG_NOTICE, "closed support-ticket '" . $mainticket->Get('subject') . "'"); + redirectTo($filename, Array('page' => $page, 's' => $s)); + } + else + { + $mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id); + ask_yesno('ticket_reallyclose', $filename, array('id' => $id, 'page' => $page, 'action' => $action), $mainticket->Get('subject')); + } + } + elseif($action == 'reopen' + && $id != 0) + { + $ticketsopen = 0; + $opentickets = $db->query_first('SELECT COUNT(`id`) as `count` FROM `' . TABLE_PANEL_TICKETS . '` + WHERE `customerid` = "' . $userinfo['customerid'] . '" + AND `answerto` = "0" + AND (`status` = "0" OR `status` = "1" OR `status` = "2")'); + $ticketsopen = (int)$opentickets['count']; + + if($ticketsopen > $settings['ticket']['concurrently_open'] + && $settings['ticket']['concurrently_open'] != - 1 + && $settings['ticket']['concurrently_open'] != '') + { + standard_error('notmorethanxopentickets', $settings['ticket']['concurrently_open']); + } + + $now = time(); + $mainticket = ticket::getInstanceOf($userinfo, $db, $settings, (int)$id); + $mainticket->Set('lastchange', $now, true, true); + $mainticket->Set('lastreplier', '0', true, true); + $mainticket->Set('status', '0', true, true); + $mainticket->Update(); + $log->logAction(USR_ACTION, LOG_NOTICE, "reopened support-ticket '" . $mainticket->Get('subject') . "'"); + redirectTo($filename, Array('page' => $page, 's' => $s)); + } +} + +?> diff --git a/customer_traffic.php b/customer_traffic.php index 168d170f..06254c0b 100644 --- a/customer_traffic.php +++ b/customer_traffic.php @@ -1,278 +1,278 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Panel - * @version $Id$ - */ - -define('AREA', 'customer'); - -/** - * Include our init.php, which manages Sessions, Language etc. - */ - -require ("./lib/init.php"); -$traffic = ''; -$month = null; -$year = null; - -if(isset($_POST['month']) - && isset($_POST['year'])) -{ - $month = intval($_POST['month']); - $year = intval($_POST['year']); -} -elseif(isset($_GET['month']) - && isset($_GET['year'])) -{ - $month = intval($_GET['month']); - $year = intval($_GET['year']); -} - -//BAM! $_GET??? - -elseif (isset($_GET['page']) - && $_GET['page'] == "current") -{ - if(date('d') != '01') - { - $month = date('m'); - $year = date('Y'); - } - else - { - if(date('m') == '01') - { - $month = 12; - $year = date('Y') - 1; - } - else - { - $month = date('m') - 1; - $year = date('Y'); - } - } -} - -if(!is_null($month) - && !is_null($year)) -{ - $traf['byte'] = 0; - $result = $db->query("SELECT MAX(`http`), MAX(`ftp_up`+`ftp_down`), MAX(`mail`) - FROM `" . TABLE_PANEL_TRAFFIC . "` - WHERE `customerid`='" . $userinfo['customerid'] . "' - AND `month` = '" . $month . "' - AND `year` = '" . $year . "'"); - rsort($row = mysql_fetch_row($result)); - $traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));; - $result = $db->query("SELECT - SUM(`http`) as 'http', SUM(`ftp_up`) AS 'ftp_up', SUM(`ftp_down`) as 'ftp_down', SUM(`mail`) as 'mail', - `day`, `month`, `year` - FROM `" . TABLE_PANEL_TRAFFIC . "` - WHERE `customerid`='" . $userinfo['customerid'] . "' - AND `month` = '" . $month . "' AND `year` = '" . $year . "' - GROUP BY `day` ORDER BY `day` ASC"); - $traffic_complete['http'] = 0; - $traffic_complete['ftp'] = 0; - $traffic_complete['mail'] = 0; - $show = ''; - - while($row = $db->fetch_array($result)) - { - $http = $row['http']; - $ftp = $row['ftp_up'] + $row['ftp_down']; - $mail = $row['mail']; - $traf['byte'] = $http + $ftp + $mail; - $traffic_complete['http']+= $http; - $traffic_complete['ftp']+= $ftp; - $traffic_complete['mail']+= $mail; - $traf['day'] = $row['day']; - - if(extension_loaded('bcmath')) - { - $traf['ftptext'] = bcdiv($row['ftp_up'], 1024, $settings['panel']['decimal_places']) . " MB up/ " . bcdiv($row['ftp_down'], 1024, $settings['panel']['decimal_places']) . " MB down (FTP)"; - $traf['httptext'] = bcdiv($http, 1024, $settings['panel']['decimal_places']) . " MB (HTTP)"; - $traf['mailtext'] = bcdiv($mail, 1024, $settings['panel']['decimal_places']) . " MB (Mail)"; - } - else - { - $traf['ftptext'] = round($row['ftp_up'] / 1024, $settings['panel']['decimal_places']) . " MB up/ " . round($row['ftp_down'] / 1024, $settings['panel']['decimal_places']) . " MB down (FTP)"; - $traf['httptext'] = round($http / 1024, $settings['panel']['decimal_places']) . " MB (HTTP)"; - $traf['mailtext'] = round($mail / 1024, $settings['panel']['decimal_places']) . " MB (Mail)"; - } - - if($traf['byte'] != 0 - && $traf['max'] != 0) - { - $proz = $traf['max'] / 100; - $traf['http'] = round($http / $proz, 0); - $traf['ftp'] = round($ftp / $proz, 0); - $traf['mail'] = round($mail / $proz, 0); - - if($traf['http'] == 0) - { - $traf['http'] = 1; - } - - if($traf['ftp'] == 0) - { - $traf['ftp'] = 1; - } - - if($traf['mail'] == 0) - { - $traf['mail'] = 1; - } - } - else - { - $traf['http'] = 0; - $traf['ftp'] = 0; - $traf['mail'] = 0; - } - - if(extension_loaded('bcmath')) - { - $traf['byte'] = bcdiv($traf['byte'], 1024, $settings['panel']['decimal_places']); - } - else - { - $traf['byte'] = round($traf['byte'] / 1024, $settings['panel']['decimal_places']); - } - - eval("\$traffic.=\"" . getTemplate("traffic/traffic_month") . "\";"); - $show = $lng['traffic']['months'][intval($row['month'])] . " " . $row['year']; - } - - if(extension_loaded('bcmath')) - { - $traffic_complete['http'] = bcdiv($traffic_complete['http'], 1024, $settings['panel']['decimal_places']); - $traffic_complete['ftp'] = bcdiv($traffic_complete['ftp'], 1024, $settings['panel']['decimal_places']); - $traffic_complete['mail'] = bcdiv($traffic_complete['mail'], 1024, $settings['panel']['decimal_places']); - } - else - { - $traffic_complete['http'] = round($traffic_complete['http'] / 1024, $settings['panel']['decimal_places']); - $traffic_complete['ftp'] = round($traffic_complete['ftp'] / 1024, $settings['panel']['decimal_places']); - $traffic_complete['mail'] = round($traffic_complete['mail'] / 1024, $settings['panel']['decimal_places']); - } - - eval("echo \"" . getTemplate("traffic/traffic_details") . "\";"); -} -else -{ - $result = $db->query("(SELECT SUM(`http`) as sum FROM `" . TABLE_PANEL_TRAFFIC . "` - WHERE `customerid` = '" . $userinfo['customerid'] . "' - GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12) UNION - (SELECT SUM(`ftp_up`+`ftp_down`) FROM `" . TABLE_PANEL_TRAFFIC . "` - WHERE `customerid` = '" . $userinfo['customerid'] . "' - GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12) UNION - (SELECT SUM(`mail`) FROM `" . TABLE_PANEL_TRAFFIC . "` - WHERE `customerid` = '" . $userinfo['customerid'] . "' - GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12) ORDER BY sum DESC LIMIT 1"); - $row = $db->fetch_array($result); - $traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));; - $result = $db->query("SELECT `month`, `year`, SUM(`http`) AS http, SUM(`ftp_up`) AS ftp_up, SUM(`ftp_down`) AS ftp_down, SUM(`mail`) AS mail - FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid` = '" . $userinfo['customerid'] . "' - GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12"); - $traffic_complete['http'] = 0; - $traffic_complete['ftp'] = 0; - $traffic_complete['mail'] = 0; - - while($row = $db->fetch_array($result)) - { - $http = $row['http']; - $ftp_up = $row['ftp_up']; - $ftp_down = $row['ftp_down']; - $mail = $row['mail']; - $traffic_complete['http']+= $http; - $traffic_complete['ftp']+= $ftp_up + $ftp_down; - $traffic_complete['mail']+= $mail; - $traf['month'] = $row['month']; - $traf['year'] = $row['year']; - $traf['monthname'] = $lng['traffic']['months'][intval($row['month'])] . " " . $row['year']; - $traf['byte'] = $http + $ftp_up + $ftp_down + $mail; - - if(extension_loaded('bcmath')) - { - $traf['ftptext'] = bcdiv($ftp_up, 1024 * 1024, $settings['panel']['decimal_places']) . " GB up/ " . bcdiv($ftp_down, 1024 * 1024, $settings['panel']['decimal_places']) . " GB down (FTP)"; - $traf['httptext'] = bcdiv($http, 1024 * 1024, $settings['panel']['decimal_places']) . " GB (HTTP)"; - $traf['mailtext'] = bcdiv($mail, 1024 * 1024, $settings['panel']['decimal_places']) . " GB (Mail)"; - } - else - { - $traf['ftptext'] = round($ftp_up / 1024 * 1024, $settings['panel']['decimal_places']) . " GB up/ " . round($ftp_down / 1024 * 1024, $settings['panel']['decimal_places']) . " GB down (FTP)"; - $traf['httptext'] = round($http / 1024 * 1024, $settings['panel']['decimal_places']) . " GB (HTTP)"; - $traf['mailtext'] = round($mail / 1024 * 1024, $settings['panel']['decimal_places']) . " GB (Mail)"; - } - - if($traf['max'] != 0) - { - $proz = $traf['max'] / 100; - $traf['ftp'] = round(($ftp_up + $ftp_down) / $proz, 0); - $traf['http'] = round($http / $proz, 0); - $traf['mail'] = round($mail / $proz, 0); - - if($traf['http'] == 0) - { - $traf['http'] = 1; - } - - if($traf['ftp'] == 0) - { - $traf['ftp'] = 1; - } - - if($traf['mail'] == 0) - { - $traf['mail'] = 1; - } - } - else - { - $traf['ftp'] = 0; - $traf['http'] = 0; - $traf['mail'] = 0; - } - - if(extension_loaded('bcmath')) - { - $traf['byte'] = bcadd($traf['byte'] / (1024 * 1024), 0.0000, 4); - } - else - { - $traf['byte'] = round($traf['byte'] + (1024 * 1024), 4); - } - - eval("\$traffic.=\"" . getTemplate("traffic/traffic_traffic") . "\";"); - } - - if(extension_loaded('bcmath')) - { - $traffic_complete['http'] = bcdiv($traffic_complete['http'], 1024 * 1024, $settings['panel']['decimal_places']); - $traffic_complete['ftp'] = bcdiv($traffic_complete['ftp'], 1024 * 1024, $settings['panel']['decimal_places']); - $traffic_complete['mail'] = bcdiv($traffic_complete['mail'], 1024 * 1024, $settings['panel']['decimal_places']); - } - else - { - $traffic_complete['http'] = round($traffic_complete['http'] / 1024 * 1024, $settings['panel']['decimal_places']); - $traffic_complete['ftp'] = round($traffic_complete['ftp'] / 1024 * 1024, $settings['panel']['decimal_places']); - $traffic_complete['mail'] = round($traffic_complete['mail'] / 1024 * 1024, $settings['panel']['decimal_places']); - } - - eval("echo \"" . getTemplate("traffic/traffic") . "\";"); -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Panel + * @version $Id$ + */ + +define('AREA', 'customer'); + +/** + * Include our init.php, which manages Sessions, Language etc. + */ + +require ("./lib/init.php"); +$traffic = ''; +$month = null; +$year = null; + +if(isset($_POST['month']) + && isset($_POST['year'])) +{ + $month = intval($_POST['month']); + $year = intval($_POST['year']); +} +elseif(isset($_GET['month']) + && isset($_GET['year'])) +{ + $month = intval($_GET['month']); + $year = intval($_GET['year']); +} + +//BAM! $_GET??? + +elseif (isset($_GET['page']) + && $_GET['page'] == "current") +{ + if(date('d') != '01') + { + $month = date('m'); + $year = date('Y'); + } + else + { + if(date('m') == '01') + { + $month = 12; + $year = date('Y') - 1; + } + else + { + $month = date('m') - 1; + $year = date('Y'); + } + } +} + +if(!is_null($month) + && !is_null($year)) +{ + $traf['byte'] = 0; + $result = $db->query("SELECT MAX(`http`), MAX(`ftp_up`+`ftp_down`), MAX(`mail`) + FROM `" . TABLE_PANEL_TRAFFIC . "` + WHERE `customerid`='" . $userinfo['customerid'] . "' + AND `month` = '" . $month . "' + AND `year` = '" . $year . "'"); + rsort($row = mysql_fetch_row($result)); + $traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));; + $result = $db->query("SELECT + SUM(`http`) as 'http', SUM(`ftp_up`) AS 'ftp_up', SUM(`ftp_down`) as 'ftp_down', SUM(`mail`) as 'mail', + `day`, `month`, `year` + FROM `" . TABLE_PANEL_TRAFFIC . "` + WHERE `customerid`='" . $userinfo['customerid'] . "' + AND `month` = '" . $month . "' AND `year` = '" . $year . "' + GROUP BY `day` ORDER BY `day` ASC"); + $traffic_complete['http'] = 0; + $traffic_complete['ftp'] = 0; + $traffic_complete['mail'] = 0; + $show = ''; + + while($row = $db->fetch_array($result)) + { + $http = $row['http']; + $ftp = $row['ftp_up'] + $row['ftp_down']; + $mail = $row['mail']; + $traf['byte'] = $http + $ftp + $mail; + $traffic_complete['http']+= $http; + $traffic_complete['ftp']+= $ftp; + $traffic_complete['mail']+= $mail; + $traf['day'] = $row['day']; + + if(extension_loaded('bcmath')) + { + $traf['ftptext'] = bcdiv($row['ftp_up'], 1024, $settings['panel']['decimal_places']) . " MB up/ " . bcdiv($row['ftp_down'], 1024, $settings['panel']['decimal_places']) . " MB down (FTP)"; + $traf['httptext'] = bcdiv($http, 1024, $settings['panel']['decimal_places']) . " MB (HTTP)"; + $traf['mailtext'] = bcdiv($mail, 1024, $settings['panel']['decimal_places']) . " MB (Mail)"; + } + else + { + $traf['ftptext'] = round($row['ftp_up'] / 1024, $settings['panel']['decimal_places']) . " MB up/ " . round($row['ftp_down'] / 1024, $settings['panel']['decimal_places']) . " MB down (FTP)"; + $traf['httptext'] = round($http / 1024, $settings['panel']['decimal_places']) . " MB (HTTP)"; + $traf['mailtext'] = round($mail / 1024, $settings['panel']['decimal_places']) . " MB (Mail)"; + } + + if($traf['byte'] != 0 + && $traf['max'] != 0) + { + $proz = $traf['max'] / 100; + $traf['http'] = round($http / $proz, 0); + $traf['ftp'] = round($ftp / $proz, 0); + $traf['mail'] = round($mail / $proz, 0); + + if($traf['http'] == 0) + { + $traf['http'] = 1; + } + + if($traf['ftp'] == 0) + { + $traf['ftp'] = 1; + } + + if($traf['mail'] == 0) + { + $traf['mail'] = 1; + } + } + else + { + $traf['http'] = 0; + $traf['ftp'] = 0; + $traf['mail'] = 0; + } + + if(extension_loaded('bcmath')) + { + $traf['byte'] = bcdiv($traf['byte'], 1024, $settings['panel']['decimal_places']); + } + else + { + $traf['byte'] = round($traf['byte'] / 1024, $settings['panel']['decimal_places']); + } + + eval("\$traffic.=\"" . getTemplate("traffic/traffic_month") . "\";"); + $show = $lng['traffic']['months'][intval($row['month'])] . " " . $row['year']; + } + + if(extension_loaded('bcmath')) + { + $traffic_complete['http'] = bcdiv($traffic_complete['http'], 1024, $settings['panel']['decimal_places']); + $traffic_complete['ftp'] = bcdiv($traffic_complete['ftp'], 1024, $settings['panel']['decimal_places']); + $traffic_complete['mail'] = bcdiv($traffic_complete['mail'], 1024, $settings['panel']['decimal_places']); + } + else + { + $traffic_complete['http'] = round($traffic_complete['http'] / 1024, $settings['panel']['decimal_places']); + $traffic_complete['ftp'] = round($traffic_complete['ftp'] / 1024, $settings['panel']['decimal_places']); + $traffic_complete['mail'] = round($traffic_complete['mail'] / 1024, $settings['panel']['decimal_places']); + } + + eval("echo \"" . getTemplate("traffic/traffic_details") . "\";"); +} +else +{ + $result = $db->query("(SELECT SUM(`http`) as sum FROM `" . TABLE_PANEL_TRAFFIC . "` + WHERE `customerid` = '" . $userinfo['customerid'] . "' + GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12) UNION + (SELECT SUM(`ftp_up`+`ftp_down`) FROM `" . TABLE_PANEL_TRAFFIC . "` + WHERE `customerid` = '" . $userinfo['customerid'] . "' + GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12) UNION + (SELECT SUM(`mail`) FROM `" . TABLE_PANEL_TRAFFIC . "` + WHERE `customerid` = '" . $userinfo['customerid'] . "' + GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12) ORDER BY sum DESC LIMIT 1"); + $row = $db->fetch_array($result); + $traf['max'] = ($row[0] > $row[1] ? ($row[0] > $row[2] ? $row[0] : $row[2]) : ($row[1] > $row[2] ? $row[1] : $row[2]));; + $result = $db->query("SELECT `month`, `year`, SUM(`http`) AS http, SUM(`ftp_up`) AS ftp_up, SUM(`ftp_down`) AS ftp_down, SUM(`mail`) AS mail + FROM `" . TABLE_PANEL_TRAFFIC . "` WHERE `customerid` = '" . $userinfo['customerid'] . "' + GROUP BY CONCAT(`year`,`month`) ORDER BY CONCAT(`year`,`month`) DESC LIMIT 12"); + $traffic_complete['http'] = 0; + $traffic_complete['ftp'] = 0; + $traffic_complete['mail'] = 0; + + while($row = $db->fetch_array($result)) + { + $http = $row['http']; + $ftp_up = $row['ftp_up']; + $ftp_down = $row['ftp_down']; + $mail = $row['mail']; + $traffic_complete['http']+= $http; + $traffic_complete['ftp']+= $ftp_up + $ftp_down; + $traffic_complete['mail']+= $mail; + $traf['month'] = $row['month']; + $traf['year'] = $row['year']; + $traf['monthname'] = $lng['traffic']['months'][intval($row['month'])] . " " . $row['year']; + $traf['byte'] = $http + $ftp_up + $ftp_down + $mail; + + if(extension_loaded('bcmath')) + { + $traf['ftptext'] = bcdiv($ftp_up, 1024 * 1024, $settings['panel']['decimal_places']) . " GB up/ " . bcdiv($ftp_down, 1024 * 1024, $settings['panel']['decimal_places']) . " GB down (FTP)"; + $traf['httptext'] = bcdiv($http, 1024 * 1024, $settings['panel']['decimal_places']) . " GB (HTTP)"; + $traf['mailtext'] = bcdiv($mail, 1024 * 1024, $settings['panel']['decimal_places']) . " GB (Mail)"; + } + else + { + $traf['ftptext'] = round($ftp_up / 1024 * 1024, $settings['panel']['decimal_places']) . " GB up/ " . round($ftp_down / 1024 * 1024, $settings['panel']['decimal_places']) . " GB down (FTP)"; + $traf['httptext'] = round($http / 1024 * 1024, $settings['panel']['decimal_places']) . " GB (HTTP)"; + $traf['mailtext'] = round($mail / 1024 * 1024, $settings['panel']['decimal_places']) . " GB (Mail)"; + } + + if($traf['max'] != 0) + { + $proz = $traf['max'] / 100; + $traf['ftp'] = round(($ftp_up + $ftp_down) / $proz, 0); + $traf['http'] = round($http / $proz, 0); + $traf['mail'] = round($mail / $proz, 0); + + if($traf['http'] == 0) + { + $traf['http'] = 1; + } + + if($traf['ftp'] == 0) + { + $traf['ftp'] = 1; + } + + if($traf['mail'] == 0) + { + $traf['mail'] = 1; + } + } + else + { + $traf['ftp'] = 0; + $traf['http'] = 0; + $traf['mail'] = 0; + } + + if(extension_loaded('bcmath')) + { + $traf['byte'] = bcadd($traf['byte'] / (1024 * 1024), 0.0000, 4); + } + else + { + $traf['byte'] = round($traf['byte'] + (1024 * 1024), 4); + } + + eval("\$traffic.=\"" . getTemplate("traffic/traffic_traffic") . "\";"); + } + + if(extension_loaded('bcmath')) + { + $traffic_complete['http'] = bcdiv($traffic_complete['http'], 1024 * 1024, $settings['panel']['decimal_places']); + $traffic_complete['ftp'] = bcdiv($traffic_complete['ftp'], 1024 * 1024, $settings['panel']['decimal_places']); + $traffic_complete['mail'] = bcdiv($traffic_complete['mail'], 1024 * 1024, $settings['panel']['decimal_places']); + } + else + { + $traffic_complete['http'] = round($traffic_complete['http'] / 1024 * 1024, $settings['panel']['decimal_places']); + $traffic_complete['ftp'] = round($traffic_complete['ftp'] / 1024 * 1024, $settings['panel']['decimal_places']); + $traffic_complete['mail'] = round($traffic_complete['mail'] / 1024 * 1024, $settings['panel']['decimal_places']); + } + + eval("echo \"" . getTemplate("traffic/traffic") . "\";"); +} + +?> diff --git a/install/install.php b/install/install.php index 17c1f403..4f0e58b5 100644 --- a/install/install.php +++ b/install/install.php @@ -1,830 +1,830 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Install - * @version $Id$ - */ - -/** - * Most elements are taken from the phpBB (www.phpbb.com) - * installer, (c) 1999 - 2004 phpBB Group. - */ - -if(file_exists('../lib/userdata.inc.php')) -{ - /** - * Includes the Usersettings eg. MySQL-Username/Passwort etc. to test if Froxlor is already installed - */ - - require ('../lib/userdata.inc.php'); - - if(isset($sql) - && is_array($sql)) - { - die('Sorry, Froxlor is already configured...'); - } -} - -/** - * Include the functions - */ - -require ('../lib/functions.php'); - -/** - * Include the MySQL-Table-Definitions - */ - -require ('../lib/tables.inc.php'); - -/** - * Language Managament - */ - -$languages = Array( - 'german' => 'Deutsch', - 'english' => 'English', - 'french' => 'Francais' -); -$standardlanguage = 'english'; - -if(isset($_GET['language']) - && isset($languages[$_GET['language']])) -{ - $language = $_GET['language']; -} -elseif(isset($_POST['language']) - && isset($languages[$_POST['language']])) -{ - $language = $_POST['language']; -} -else -{ - $language = $standardlanguage; -} - -if(file_exists('./lng/' . $language . '.lng.php')) -{ - /** - * Includes file /lng/$language.lng.php if it exists - */ - - require ('./lng/' . $language . '.lng.php'); -} - -/** - * BEGIN FUNCTIONS ----------------------------------------------- - */ - -function page_header() -{ - -?> - - - - - - Froxlor - - - - - - - - - -
 
- - - - -
-
-
- -
- - - - -
- - -\n\t\t\t$text"; - } - else - { - echo " $text\n\t\t\n"; - } -} - -/** - * END FUNCTIONS --------------------------------------------------- - */ - -/** - * BEGIN VARIABLES --------------------------------------------------- - */ - -//guess Servername - -if(!empty($_POST['servername'])) -{ - $servername = $_POST['servername']; -} -else -{ - if(!empty($_SERVER['SERVER_NAME'])) - { - if(validate_ip($_SERVER['SERVER_NAME'], true) == false) - { - $servername = $_SERVER['SERVER_NAME']; - } - else - { - $servername = ''; - } - } - else - { - $servername = ''; - } -} - -//guess serverip - -if(!empty($_POST['serverip'])) -{ - $serverip = $_POST['serverip']; -} -else -{ - if(!empty($_SERVER['SERVER_ADDR'])) - { - $serverip = $_SERVER['SERVER_ADDR']; - } - else - { - $serverip = ''; - } -} - -if(!empty($_POST['mysql_host'])) -{ - $mysql_host = $_POST['mysql_host']; -} -else -{ - $mysql_host = '127.0.0.1'; -} - -if(!empty($_POST['mysql_database'])) -{ - $mysql_database = $_POST['mysql_database']; -} -else -{ - $mysql_database = 'froxlor'; -} - -if(!empty($_POST['mysql_unpriv_user'])) -{ - $mysql_unpriv_user = $_POST['mysql_unpriv_user']; -} -else -{ - $mysql_unpriv_user = 'froxlor'; -} - -if(!empty($_POST['mysql_unpriv_pass'])) -{ - $mysql_unpriv_pass = $_POST['mysql_unpriv_pass']; -} -else -{ - $mysql_unpriv_pass = ''; -} - -if(!empty($_POST['mysql_root_user'])) -{ - $mysql_root_user = $_POST['mysql_root_user']; -} -else -{ - $mysql_root_user = 'root'; -} - -if(!empty($_POST['mysql_root_pass'])) -{ - $mysql_root_pass = $_POST['mysql_root_pass']; -} -else -{ - $mysql_root_pass = ''; -} - -if(!empty($_POST['admin_user'])) -{ - $admin_user = $_POST['admin_user']; -} -else -{ - $admin_user = 'admin'; -} - -if(!empty($_POST['admin_pass1'])) -{ - $admin_pass1 = $_POST['admin_pass1']; -} -else -{ - $admin_pass1 = ''; -} - -if(!empty($_POST['admin_pass2'])) -{ - $admin_pass2 = $_POST['admin_pass2']; -} -else -{ - $admin_pass2 = ''; -} - -if($mysql_host == 'localhost' - || $mysql_host == '127.0.0.1') -{ - $mysql_access_host = $mysql_host; -} -else -{ - $mysql_access_host = $serverip; -} - -// gues http software - -if(!empty($_POST['webserver'])) -{ - $webserver = $_POST['webserver']; -} -else -{ - if(strtoupper(@php_sapi_name()) == "APACHE2HANDLER" - || stristr($_SERVER[SERVER_SOFTWARE], "apache/2")) - { - $webserver = 'apache2'; - } - elseif(substr(strtoupper(@php_sapi_name()), 0, 8) == "LIGHTTPD" - || stristr($_SERVER[SERVER_SOFTWARE], "lighttpd")) - { - $webserver = 'lighttpd'; - } - else - { - // we don't need to bail out, since unknown does not affect any critical installation routines - - $webserver = 'unknown'; - } -} - -if(!empty($_POST['httpuser'])) -{ - $httpuser = $_POST['httpuser']; -} -else -{ - $httpuser = ''; -} - -if(!empty($_POST['httpgroup'])) -{ - $httpgroup = $_POST['httpgroup']; -} -else -{ - $httpgroup = ''; -} - -/** - * END VARIABLES --------------------------------------------------- - */ - -/** - * BEGIN INSTALL --------------------------------------------------- - */ - -if(isset($_POST['installstep']) - && $_POST['installstep'] == '1' - && $admin_pass1 == $admin_pass2 - && $admin_pass1 != '' - && $admin_pass2 != '' - && $mysql_unpriv_pass != '' - && $mysql_root_pass != '' - && $servername != '' - && $serverip != '' - && $httpuser != '' - && $httpgroup != '' - && $mysql_unpriv_user != $mysql_root_user) -{ - page_header(); - -?> - - - - -=")) - { - status_message('red', $lng['install']['notinstalled']); - $_die = true; - } - else - { - status_message('green', 'OK'); - } - - - status_message('begin', $lng['install']['phpmysql']); - - if(!extension_loaded('mysql')) - { - status_message('red', $lng['install']['notinstalled']); - $_die = true; - } - else - { - status_message('green', 'OK'); - } - - status_message('begin', $lng['install']['phpfilter']); - - if(!extension_loaded('filter')) - { - status_message('red', $lng['install']['notinstalled']); - $_die = true; - } - else - { - status_message('green', 'OK'); - } - - status_message('begin', $lng['install']['phpposix']); - - if(!extension_loaded('posix')) - { - status_message('red', $lng['install']['notinstalled']); - $_die = true; - } - else - { - status_message('green', 'OK'); - } - - status_message('begin', $lng['install']['phpbcmath']); - - if(!extension_loaded('bcmath')) - { - status_message('orange', $lng['install']['notinstalled'] . '
' . $lng['install']['bcmathdescription']); - $_die = false; - } - else - { - status_message('green', 'OK'); - } - - status_message('begin', $lng['install']['openbasedir']); - $php_ob = @ini_get("open_basedir"); - - if(!empty($php_ob) - && $php_ob != '') - { - status_message('orange', $lng['install']['openbasedirenabled']); - $_die = false; - } - else - { - status_message('green', 'OK'); - } - - if($_die) - { - status_message('begin', $lng['install']['diedbecauseofrequirements']); - die(); - } - - //first test if we can access the database server with the given root user and password - - status_message('begin', $lng['install']['testing_mysql']); - $db_root = new db($mysql_host, $mysql_root_user, $mysql_root_pass, ''); - - //ok, if we are here, the database class is build up (otherwise it would have already die'd this script) - - status_message('green', 'OK'); - - //first we make a backup of the old DB if it exists - - status_message('begin', $lng['install']['backup_old_db']); - $result = mysql_list_tables($mysql_database); - - if($result) - { - $filename = "/tmp/froxlor_backup_" . date(YmdHi) . ".sql"; - - if(is_file("/usr/bin/mysqldump")) - { - $command = "/usr/bin/mysqldump " . $mysql_database . " -u " . $mysql_root_user . " --password='" . $mysql_root_pass . "' --result-file=" . $filename; - $output = exec($command); - - if(stristr($output, "error")) - { - status_message('red', $lng['install']['backing_up_failed']); - } - else - { - status_message('green', 'OK'); - } - } - else - { - status_message('red', $lng['install']['backing_up_binary_missing']); - } - } - - //so first we have to delete the database and the user given for the unpriv-user if they exit - - status_message('begin', $lng['install']['erasing_old_db']); - $db_root->query("DELETE FROM `mysql`.`user` WHERE `User` = '" . $db_root->escape($mysql_unpriv_user) . "' AND `Host` = '" . $db_root->escape($mysql_access_host) . "'"); - $db_root->query("DELETE FROM `mysql`.`db` WHERE `User` = '" . $db_root->escape($mysql_unpriv_user) . "' AND `Host` = '" . $db_root->escape($mysql_access_host) . "'"); - $db_root->query("DELETE FROM `mysql`.`tables_priv` WHERE `User` = '" . $db_root->escape($mysql_unpriv_user) . "' AND `Host` = '" . $db_root->escape($mysql_access_host) . "'"); - $db_root->query("DELETE FROM `mysql`.`columns_priv` WHERE `User` = '" . $db_root->escape($mysql_unpriv_user) . "' AND `Host` = '" . $db_root->escape($mysql_access_host) . "'"); - $db_root->query("DROP DATABASE IF EXISTS `" . $db_root->escape(str_replace('`', '', $mysql_database)) . "` ;"); - $db_root->query("FLUSH PRIVILEGES;"); - status_message('green', 'OK'); - - //then we have to create a new user and database for the froxlor unprivileged mysql access - - status_message('begin', $lng['install']['create_mysqluser_and_db']); - $db_root->query("CREATE DATABASE `" . $db_root->escape(str_replace('`', '', $mysql_database)) . "`"); - $mysql_access_host_array = array_map('trim', explode(',', $mysql_access_host)); - - if(in_array('127.0.0.1', $mysql_access_host_array) - && !in_array('localhost', $mysql_access_host_array)) - { - $mysql_access_host_array[] = 'localhost'; - } - - if(!in_array('127.0.0.1', $mysql_access_host_array) - && in_array('localhost', $mysql_access_host_array)) - { - $mysql_access_host_array[] = '127.0.0.1'; - } - - $mysql_access_host_array[] = $serverip; - foreach($mysql_access_host_array as $mysql_access_host) - { - $db_root->query("GRANT ALL PRIVILEGES ON `" . $db_root->escape(str_replace('`', '', $mysql_database)) . "`.* TO '" . $db_root->escape($mysql_unpriv_user) . "'@'" . $db_root->escape($mysql_access_host) . "' IDENTIFIED BY 'password'"); - $db_root->query("SET PASSWORD FOR '" . $db_root->escape($mysql_unpriv_user) . "'@'" . $db_root->escape($mysql_access_host) . "' = PASSWORD('" . $db_root->escape($mysql_unpriv_pass) . "')"); - } - - $db_root->query("FLUSH PRIVILEGES;"); - $mysql_access_host = implode(',', $mysql_access_host_array); - status_message('green', 'OK'); - - //now a new database and the new froxlor-unprivileged-mysql-account have been created and we can fill it now with the data. - - status_message('begin', $lng['install']['testing_new_db']); - $db = new db($mysql_host, $mysql_unpriv_user, $mysql_unpriv_pass, $mysql_database); - status_message('green', 'OK'); - status_message('begin', $lng['install']['importing_data']); - $db_schema = './froxlor.sql'; - $sql_query = @file_get_contents($db_schema, 'r'); - $sql_query = remove_remarks($sql_query); - $sql_query = split_sql_file($sql_query, ';'); - for ($i = 0;$i < sizeof($sql_query);$i++) - { - if(trim($sql_query[$i]) != '') - { - $result = $db->query($sql_query[$i]); - } - } - - status_message('green', 'OK'); - status_message('begin', 'System Servername...'); - - if(validate_ip($_SERVER['SERVER_NAME'], true) !== false) - { - status_message('red', $lng['install']['servername_should_be_fqdn']); - } - else - { - status_message('green', 'OK'); - } - - //now let's change the settings in our settings-table - - status_message('begin', $lng['install']['changing_data']); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = 'admin@" . $db->escape($servername) . "' WHERE `settinggroup` = 'panel' AND `varname` = 'adminmail'"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($serverip) . "' WHERE `settinggroup` = 'system' AND `varname` = 'ipaddress'"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($servername) . "' WHERE `settinggroup` = 'system' AND `varname` = 'hostname'"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($version) . "' WHERE `settinggroup` = 'panel' AND `varname` = 'version'"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($languages[$language]) . "' WHERE `settinggroup` = 'panel' AND `varname` = 'standardlanguage'"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($mysql_access_host) . "' WHERE `settinggroup` = 'system' AND `varname` = 'mysql_access_host'"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($webserver) . "' WHERE `settinggroup` = 'system' AND `varname` = 'webserver'"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($webserver) . "' WHERE `settinggroup` = 'system' AND `varname` = 'webserver'"); - - //FIXME - - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($httpuser) . "' WHERE `settinggroup` = 'system' AND `varname` = 'httpuser'"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($httpgroup) . "' WHERE `settinggroup` = 'system' AND `varname` = 'httpgroup'"); - - if($webserver == "apache2") - { - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/apache2/sites-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_vhost'"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/apache2/sites-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_diroptions'"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/apache2/froxlor-htpasswd/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_htpasswddir'"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/init.d/apache2 reload' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'"); - } - elseif($webserver == "lighttpd") - { - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/conf-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_vhost'"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/froxlor-diroptions/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_diroptions'"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/froxlor-htpasswd/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_htpasswddir'"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/init.d/lighttpd reload' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/lighttpd.pem' WHERE `settinggroup` = 'system' AND `varname` = 'ssl_cert_file'"); - } - - // insert the lastcronrun to be the installation date - - $query = 'UPDATE `%s` SET `value` = UNIX_TIMESTAMP() WHERE `settinggroup` = \'system\' AND `varname` = \'lastcronrun\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - - // and lets insert the default ip and port - - $query = 'INSERT INTO `%s` SET `ip` = \'%s\', `port` = \'80\' '; - $query = sprintf($query, TABLE_PANEL_IPSANDPORTS, $db->escape($serverip)); - $db->query($query); - $defaultip = $db->insert_id(); - - // insert the defaultip - - $query = 'UPDATE `%s` SET `value` = \'%s\' WHERE `settinggroup` = \'system\' AND `varname` = \'defaultip\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS, $db->escape($defaultip)); - $db->query($query); - status_message('green', 'OK'); - - //last but not least create the main admin - - status_message('begin', $lng['install']['adding_admin_user']); - $db->query("INSERT INTO `" . TABLE_PANEL_ADMINS . "` SET - `loginname` = '" . $db->escape($admin_user) . "', - `password` = '" . md5($admin_pass1) . "', - `name` = 'Siteadmin', - `email` = 'admin@" . $db->escape($servername) . "', - `customers` = -1, - `customers_used` = 0, - `customers_see_all` = 1, - `caneditphpsettings` = 1, - `domains` = -1, - `domains_used` = 0, - `domains_see_all` = 1, - `change_serversettings` = 1, - `diskspace` = -1024, - `diskspace_used` = 0, - `mysqls` = -1, - `mysqls_used` = 0, - `emails` = -1, - `emails_used` = 0, - `email_accounts` = -1, - `email_accounts_used` = 0, - `email_forwarders` = -1, - `email_forwarders_used` = 0, - `email_quota` = -1, - `email_quota_used` = 0, - `ftps` = -1, - `ftps_used` = 0, - `tickets` = -1, - `tickets_used` = 0, - `subdomains` = -1, - `subdomains_used` = 0, - `traffic` = -1048576, - `traffic_used` = 0, - `deactivated` = 0, - `aps_packages` = -1"); - status_message('green', 'OK'); - - //now we create the userdata.inc.php with the mysql-accounts - - status_message('begin', $lng['install']['creating_configfile']); - $userdata = ""; - - //we test now if we can store the userdata.inc.php in ../lib - - if($fp = @fopen('../lib/userdata.inc.php', 'w')) - { - $result = @fputs($fp, $userdata, strlen($userdata)); - @fclose($fp); - status_message('green', $lng['install']['creating_configfile_succ']); - chmod('../lib/userdata.inc.php', 0440); - } - elseif($fp = @fopen('/tmp/userdata.inc.php', 'w')) - { - $result = @fputs($fp, $userdata, strlen($userdata)); - @fclose($fp); - status_message('orange', $lng['install']['creating_configfile_temp']); - chmod('/tmp/userdata.inc.php', 0440); - } - else - { - status_message('red', $lng['install']['creating_configfile_failed']); - echo "\t\t\n\t\t\t\n\t\t\n"; - } - -?> - - - -
 Froxlor Installation

" . nl2br(htmlspecialchars($userdata)) . "

-
- -
-
-
- -
- - - - - - - - - - - - - - -
 
: - -
- -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
:
:
>:
>:
>:
>:
 
:
>:
>:
 
>:
>:
>:/>Apache2 
/>Lighttpd
>:
>:
-
-
-
- + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Install + * @version $Id$ + */ + +/** + * Most elements are taken from the phpBB (www.phpbb.com) + * installer, (c) 1999 - 2004 phpBB Group. + */ + +if(file_exists('../lib/userdata.inc.php')) +{ + /** + * Includes the Usersettings eg. MySQL-Username/Passwort etc. to test if Froxlor is already installed + */ + + require ('../lib/userdata.inc.php'); + + if(isset($sql) + && is_array($sql)) + { + die('Sorry, Froxlor is already configured...'); + } +} + +/** + * Include the functions + */ + +require ('../lib/functions.php'); + +/** + * Include the MySQL-Table-Definitions + */ + +require ('../lib/tables.inc.php'); + +/** + * Language Managament + */ + +$languages = Array( + 'german' => 'Deutsch', + 'english' => 'English', + 'french' => 'Francais' +); +$standardlanguage = 'english'; + +if(isset($_GET['language']) + && isset($languages[$_GET['language']])) +{ + $language = $_GET['language']; +} +elseif(isset($_POST['language']) + && isset($languages[$_POST['language']])) +{ + $language = $_POST['language']; +} +else +{ + $language = $standardlanguage; +} + +if(file_exists('./lng/' . $language . '.lng.php')) +{ + /** + * Includes file /lng/$language.lng.php if it exists + */ + + require ('./lng/' . $language . '.lng.php'); +} + +/** + * BEGIN FUNCTIONS ----------------------------------------------- + */ + +function page_header() +{ + +?> + + + + + + Froxlor + + + + + + + + + +
 
+ + + + +
+
+
+ +
+ + + + +
+ + +\n\t\t\t$text"; + } + else + { + echo " $text\n\t\t\n"; + } +} + +/** + * END FUNCTIONS --------------------------------------------------- + */ + +/** + * BEGIN VARIABLES --------------------------------------------------- + */ + +//guess Servername + +if(!empty($_POST['servername'])) +{ + $servername = $_POST['servername']; +} +else +{ + if(!empty($_SERVER['SERVER_NAME'])) + { + if(validate_ip($_SERVER['SERVER_NAME'], true) == false) + { + $servername = $_SERVER['SERVER_NAME']; + } + else + { + $servername = ''; + } + } + else + { + $servername = ''; + } +} + +//guess serverip + +if(!empty($_POST['serverip'])) +{ + $serverip = $_POST['serverip']; +} +else +{ + if(!empty($_SERVER['SERVER_ADDR'])) + { + $serverip = $_SERVER['SERVER_ADDR']; + } + else + { + $serverip = ''; + } +} + +if(!empty($_POST['mysql_host'])) +{ + $mysql_host = $_POST['mysql_host']; +} +else +{ + $mysql_host = '127.0.0.1'; +} + +if(!empty($_POST['mysql_database'])) +{ + $mysql_database = $_POST['mysql_database']; +} +else +{ + $mysql_database = 'froxlor'; +} + +if(!empty($_POST['mysql_unpriv_user'])) +{ + $mysql_unpriv_user = $_POST['mysql_unpriv_user']; +} +else +{ + $mysql_unpriv_user = 'froxlor'; +} + +if(!empty($_POST['mysql_unpriv_pass'])) +{ + $mysql_unpriv_pass = $_POST['mysql_unpriv_pass']; +} +else +{ + $mysql_unpriv_pass = ''; +} + +if(!empty($_POST['mysql_root_user'])) +{ + $mysql_root_user = $_POST['mysql_root_user']; +} +else +{ + $mysql_root_user = 'root'; +} + +if(!empty($_POST['mysql_root_pass'])) +{ + $mysql_root_pass = $_POST['mysql_root_pass']; +} +else +{ + $mysql_root_pass = ''; +} + +if(!empty($_POST['admin_user'])) +{ + $admin_user = $_POST['admin_user']; +} +else +{ + $admin_user = 'admin'; +} + +if(!empty($_POST['admin_pass1'])) +{ + $admin_pass1 = $_POST['admin_pass1']; +} +else +{ + $admin_pass1 = ''; +} + +if(!empty($_POST['admin_pass2'])) +{ + $admin_pass2 = $_POST['admin_pass2']; +} +else +{ + $admin_pass2 = ''; +} + +if($mysql_host == 'localhost' + || $mysql_host == '127.0.0.1') +{ + $mysql_access_host = $mysql_host; +} +else +{ + $mysql_access_host = $serverip; +} + +// gues http software + +if(!empty($_POST['webserver'])) +{ + $webserver = $_POST['webserver']; +} +else +{ + if(strtoupper(@php_sapi_name()) == "APACHE2HANDLER" + || stristr($_SERVER[SERVER_SOFTWARE], "apache/2")) + { + $webserver = 'apache2'; + } + elseif(substr(strtoupper(@php_sapi_name()), 0, 8) == "LIGHTTPD" + || stristr($_SERVER[SERVER_SOFTWARE], "lighttpd")) + { + $webserver = 'lighttpd'; + } + else + { + // we don't need to bail out, since unknown does not affect any critical installation routines + + $webserver = 'unknown'; + } +} + +if(!empty($_POST['httpuser'])) +{ + $httpuser = $_POST['httpuser']; +} +else +{ + $httpuser = ''; +} + +if(!empty($_POST['httpgroup'])) +{ + $httpgroup = $_POST['httpgroup']; +} +else +{ + $httpgroup = ''; +} + +/** + * END VARIABLES --------------------------------------------------- + */ + +/** + * BEGIN INSTALL --------------------------------------------------- + */ + +if(isset($_POST['installstep']) + && $_POST['installstep'] == '1' + && $admin_pass1 == $admin_pass2 + && $admin_pass1 != '' + && $admin_pass2 != '' + && $mysql_unpriv_pass != '' + && $mysql_root_pass != '' + && $servername != '' + && $serverip != '' + && $httpuser != '' + && $httpgroup != '' + && $mysql_unpriv_user != $mysql_root_user) +{ + page_header(); + +?> + + + + +=")) + { + status_message('red', $lng['install']['notinstalled']); + $_die = true; + } + else + { + status_message('green', 'OK'); + } + + + status_message('begin', $lng['install']['phpmysql']); + + if(!extension_loaded('mysql')) + { + status_message('red', $lng['install']['notinstalled']); + $_die = true; + } + else + { + status_message('green', 'OK'); + } + + status_message('begin', $lng['install']['phpfilter']); + + if(!extension_loaded('filter')) + { + status_message('red', $lng['install']['notinstalled']); + $_die = true; + } + else + { + status_message('green', 'OK'); + } + + status_message('begin', $lng['install']['phpposix']); + + if(!extension_loaded('posix')) + { + status_message('red', $lng['install']['notinstalled']); + $_die = true; + } + else + { + status_message('green', 'OK'); + } + + status_message('begin', $lng['install']['phpbcmath']); + + if(!extension_loaded('bcmath')) + { + status_message('orange', $lng['install']['notinstalled'] . '
' . $lng['install']['bcmathdescription']); + $_die = false; + } + else + { + status_message('green', 'OK'); + } + + status_message('begin', $lng['install']['openbasedir']); + $php_ob = @ini_get("open_basedir"); + + if(!empty($php_ob) + && $php_ob != '') + { + status_message('orange', $lng['install']['openbasedirenabled']); + $_die = false; + } + else + { + status_message('green', 'OK'); + } + + if($_die) + { + status_message('begin', $lng['install']['diedbecauseofrequirements']); + die(); + } + + //first test if we can access the database server with the given root user and password + + status_message('begin', $lng['install']['testing_mysql']); + $db_root = new db($mysql_host, $mysql_root_user, $mysql_root_pass, ''); + + //ok, if we are here, the database class is build up (otherwise it would have already die'd this script) + + status_message('green', 'OK'); + + //first we make a backup of the old DB if it exists + + status_message('begin', $lng['install']['backup_old_db']); + $result = mysql_list_tables($mysql_database); + + if($result) + { + $filename = "/tmp/froxlor_backup_" . date(YmdHi) . ".sql"; + + if(is_file("/usr/bin/mysqldump")) + { + $command = "/usr/bin/mysqldump " . $mysql_database . " -u " . $mysql_root_user . " --password='" . $mysql_root_pass . "' --result-file=" . $filename; + $output = exec($command); + + if(stristr($output, "error")) + { + status_message('red', $lng['install']['backing_up_failed']); + } + else + { + status_message('green', 'OK'); + } + } + else + { + status_message('red', $lng['install']['backing_up_binary_missing']); + } + } + + //so first we have to delete the database and the user given for the unpriv-user if they exit + + status_message('begin', $lng['install']['erasing_old_db']); + $db_root->query("DELETE FROM `mysql`.`user` WHERE `User` = '" . $db_root->escape($mysql_unpriv_user) . "' AND `Host` = '" . $db_root->escape($mysql_access_host) . "'"); + $db_root->query("DELETE FROM `mysql`.`db` WHERE `User` = '" . $db_root->escape($mysql_unpriv_user) . "' AND `Host` = '" . $db_root->escape($mysql_access_host) . "'"); + $db_root->query("DELETE FROM `mysql`.`tables_priv` WHERE `User` = '" . $db_root->escape($mysql_unpriv_user) . "' AND `Host` = '" . $db_root->escape($mysql_access_host) . "'"); + $db_root->query("DELETE FROM `mysql`.`columns_priv` WHERE `User` = '" . $db_root->escape($mysql_unpriv_user) . "' AND `Host` = '" . $db_root->escape($mysql_access_host) . "'"); + $db_root->query("DROP DATABASE IF EXISTS `" . $db_root->escape(str_replace('`', '', $mysql_database)) . "` ;"); + $db_root->query("FLUSH PRIVILEGES;"); + status_message('green', 'OK'); + + //then we have to create a new user and database for the froxlor unprivileged mysql access + + status_message('begin', $lng['install']['create_mysqluser_and_db']); + $db_root->query("CREATE DATABASE `" . $db_root->escape(str_replace('`', '', $mysql_database)) . "`"); + $mysql_access_host_array = array_map('trim', explode(',', $mysql_access_host)); + + if(in_array('127.0.0.1', $mysql_access_host_array) + && !in_array('localhost', $mysql_access_host_array)) + { + $mysql_access_host_array[] = 'localhost'; + } + + if(!in_array('127.0.0.1', $mysql_access_host_array) + && in_array('localhost', $mysql_access_host_array)) + { + $mysql_access_host_array[] = '127.0.0.1'; + } + + $mysql_access_host_array[] = $serverip; + foreach($mysql_access_host_array as $mysql_access_host) + { + $db_root->query("GRANT ALL PRIVILEGES ON `" . $db_root->escape(str_replace('`', '', $mysql_database)) . "`.* TO '" . $db_root->escape($mysql_unpriv_user) . "'@'" . $db_root->escape($mysql_access_host) . "' IDENTIFIED BY 'password'"); + $db_root->query("SET PASSWORD FOR '" . $db_root->escape($mysql_unpriv_user) . "'@'" . $db_root->escape($mysql_access_host) . "' = PASSWORD('" . $db_root->escape($mysql_unpriv_pass) . "')"); + } + + $db_root->query("FLUSH PRIVILEGES;"); + $mysql_access_host = implode(',', $mysql_access_host_array); + status_message('green', 'OK'); + + //now a new database and the new froxlor-unprivileged-mysql-account have been created and we can fill it now with the data. + + status_message('begin', $lng['install']['testing_new_db']); + $db = new db($mysql_host, $mysql_unpriv_user, $mysql_unpriv_pass, $mysql_database); + status_message('green', 'OK'); + status_message('begin', $lng['install']['importing_data']); + $db_schema = './froxlor.sql'; + $sql_query = @file_get_contents($db_schema, 'r'); + $sql_query = remove_remarks($sql_query); + $sql_query = split_sql_file($sql_query, ';'); + for ($i = 0;$i < sizeof($sql_query);$i++) + { + if(trim($sql_query[$i]) != '') + { + $result = $db->query($sql_query[$i]); + } + } + + status_message('green', 'OK'); + status_message('begin', 'System Servername...'); + + if(validate_ip($_SERVER['SERVER_NAME'], true) !== false) + { + status_message('red', $lng['install']['servername_should_be_fqdn']); + } + else + { + status_message('green', 'OK'); + } + + //now let's change the settings in our settings-table + + status_message('begin', $lng['install']['changing_data']); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = 'admin@" . $db->escape($servername) . "' WHERE `settinggroup` = 'panel' AND `varname` = 'adminmail'"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($serverip) . "' WHERE `settinggroup` = 'system' AND `varname` = 'ipaddress'"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($servername) . "' WHERE `settinggroup` = 'system' AND `varname` = 'hostname'"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($version) . "' WHERE `settinggroup` = 'panel' AND `varname` = 'version'"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($languages[$language]) . "' WHERE `settinggroup` = 'panel' AND `varname` = 'standardlanguage'"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($mysql_access_host) . "' WHERE `settinggroup` = 'system' AND `varname` = 'mysql_access_host'"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($webserver) . "' WHERE `settinggroup` = 'system' AND `varname` = 'webserver'"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($webserver) . "' WHERE `settinggroup` = 'system' AND `varname` = 'webserver'"); + + //FIXME + + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($httpuser) . "' WHERE `settinggroup` = 'system' AND `varname` = 'httpuser'"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '" . $db->escape($httpgroup) . "' WHERE `settinggroup` = 'system' AND `varname` = 'httpgroup'"); + + if($webserver == "apache2") + { + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/apache2/sites-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_vhost'"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/apache2/sites-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_diroptions'"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/apache2/froxlor-htpasswd/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_htpasswddir'"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/init.d/apache2 reload' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'"); + } + elseif($webserver == "lighttpd") + { + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/conf-enabled/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_vhost'"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/froxlor-diroptions/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_diroptions'"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/froxlor-htpasswd/' WHERE `settinggroup` = 'system' AND `varname` = 'apacheconf_htpasswddir'"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/init.d/lighttpd reload' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/lighttpd/lighttpd.pem' WHERE `settinggroup` = 'system' AND `varname` = 'ssl_cert_file'"); + } + + // insert the lastcronrun to be the installation date + + $query = 'UPDATE `%s` SET `value` = UNIX_TIMESTAMP() WHERE `settinggroup` = \'system\' AND `varname` = \'lastcronrun\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + + // and lets insert the default ip and port + + $query = 'INSERT INTO `%s` SET `ip` = \'%s\', `port` = \'80\' '; + $query = sprintf($query, TABLE_PANEL_IPSANDPORTS, $db->escape($serverip)); + $db->query($query); + $defaultip = $db->insert_id(); + + // insert the defaultip + + $query = 'UPDATE `%s` SET `value` = \'%s\' WHERE `settinggroup` = \'system\' AND `varname` = \'defaultip\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS, $db->escape($defaultip)); + $db->query($query); + status_message('green', 'OK'); + + //last but not least create the main admin + + status_message('begin', $lng['install']['adding_admin_user']); + $db->query("INSERT INTO `" . TABLE_PANEL_ADMINS . "` SET + `loginname` = '" . $db->escape($admin_user) . "', + `password` = '" . md5($admin_pass1) . "', + `name` = 'Siteadmin', + `email` = 'admin@" . $db->escape($servername) . "', + `customers` = -1, + `customers_used` = 0, + `customers_see_all` = 1, + `caneditphpsettings` = 1, + `domains` = -1, + `domains_used` = 0, + `domains_see_all` = 1, + `change_serversettings` = 1, + `diskspace` = -1024, + `diskspace_used` = 0, + `mysqls` = -1, + `mysqls_used` = 0, + `emails` = -1, + `emails_used` = 0, + `email_accounts` = -1, + `email_accounts_used` = 0, + `email_forwarders` = -1, + `email_forwarders_used` = 0, + `email_quota` = -1, + `email_quota_used` = 0, + `ftps` = -1, + `ftps_used` = 0, + `tickets` = -1, + `tickets_used` = 0, + `subdomains` = -1, + `subdomains_used` = 0, + `traffic` = -1048576, + `traffic_used` = 0, + `deactivated` = 0, + `aps_packages` = -1"); + status_message('green', 'OK'); + + //now we create the userdata.inc.php with the mysql-accounts + + status_message('begin', $lng['install']['creating_configfile']); + $userdata = ""; + + //we test now if we can store the userdata.inc.php in ../lib + + if($fp = @fopen('../lib/userdata.inc.php', 'w')) + { + $result = @fputs($fp, $userdata, strlen($userdata)); + @fclose($fp); + status_message('green', $lng['install']['creating_configfile_succ']); + chmod('../lib/userdata.inc.php', 0440); + } + elseif($fp = @fopen('/tmp/userdata.inc.php', 'w')) + { + $result = @fputs($fp, $userdata, strlen($userdata)); + @fclose($fp); + status_message('orange', $lng['install']['creating_configfile_temp']); + chmod('/tmp/userdata.inc.php', 0440); + } + else + { + status_message('red', $lng['install']['creating_configfile_failed']); + echo "\t\t\n\t\t\t\n\t\t\n"; + } + +?> + + + +
 Froxlor Installation

" . nl2br(htmlspecialchars($userdata)) . "

+
+ +
+
+
+ +
+ + + + + + + + + + + + + + +
 
: + +
+ +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
:
:
>:
>:
>:
>:
 
:
>:
>:
 
>:
>:
>:/>Apache2 
/>Lighttpd
>:
>:
+
+
+
+ diff --git a/install/lng/english.lng.php b/install/lng/english.lng.php index 6a77d7eb..fd3b7ce0 100644 --- a/install/lng/english.lng.php +++ b/install/lng/english.lng.php @@ -1,87 +1,87 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Language - * @version $Id$ - */ - -/** - * Begin - */ - -$lng['install']['language'] = 'Installation - Language'; -$lng['install']['welcome'] = 'Welcome to Froxlor Installation'; -$lng['install']['welcometext'] = 'Thank you for choosing Froxlor. Please fill out the following fields with the required information to start the installation.
Attention: If the database you chose for Froxlor already exists on your System, it will be erased with all containing data!'; -$lng['install']['database'] = 'Database'; -$lng['install']['mysql_hostname'] = 'MySQL-Hostname'; -$lng['install']['mysql_database'] = 'MySQL-Database'; -$lng['install']['mysql_unpriv_user'] = 'Username for the unprivileged MySQL-account'; -$lng['install']['mysql_unpriv_pass'] = 'Password for the unprivileged MySQL-account'; -$lng['install']['mysql_root_user'] = 'Username for the MySQL-root-account'; -$lng['install']['mysql_root_pass'] = 'Password for the MySQL-root-account'; -$lng['install']['admin_account'] = 'Administrator Account'; -$lng['install']['admin_user'] = 'Administrator Username'; -$lng['install']['admin_pass'] = 'Administrator Password'; -$lng['install']['admin_pass_confirm'] = 'Administrator-Password (confirm)'; -$lng['install']['serversettings'] = 'Server settings'; -$lng['install']['servername'] = 'Server name (FQDN)'; -$lng['install']['serverip'] = 'Server IP'; -$lng['install']['httpuser'] = 'HTTP username'; -$lng['install']['httpgroup'] = 'HTTP groupname'; -$lng['install']['apacheversion'] = 'Apacheversion'; -$lng['install']['next'] = 'Next'; - -/** - * Progress - */ - -$lng['install']['testing_mysql'] = 'Testing if MySQL-root-username and password are correct...'; -$lng['install']['erasing_old_db'] = 'Erasing old Database...'; -$lng['install']['backup_old_db'] = 'Create backup of the old Database...'; -$lng['install']['backing_up'] = 'Backing up'; -$lng['install']['backing_up_binary_missing'] = '/usr/bin/mysqldump is missing'; -$lng['install']['create_mysqluser_and_db'] = 'Creating MySQL-database and username...'; -$lng['install']['testing_new_db'] = 'Testing if MySQL-database and username have been created correctly...'; -$lng['install']['importing_data'] = 'Importing data into MySQL-database...'; -$lng['install']['changing_data'] = 'Changing imported data...'; -$lng['install']['adding_admin_user'] = 'Adding Administrator Account...'; -$lng['install']['creating_configfile'] = 'Creating configfile...'; -$lng['install']['creating_configfile_succ'] = 'OK, userdata.inc.php was saved in lib/.'; -$lng['install']['creating_configfile_temp'] = 'File was saved in /tmp/userdata.inc.php, please move to lib/.'; -$lng['install']['creating_configfile_failed'] = 'Cannot create lib/userdata.inc.php, please create it manually with the following data:'; -$lng['install']['froxlor_succ_installed'] = 'Froxlor was installed successfully.'; -$lng['install']['click_here_to_login'] = 'Click here to login.'; -$lng['install']['phpmysql'] = 'Testing if PHP MySQL-extension is installed...'; -$lng['install']['phpfilter'] = 'Testing if PHP filter-extension is installed...'; -$lng['install']['diedbecauseofrequirements'] = 'Cannot install Froxlor without these requirements! Aborting...'; -$lng['install']['notinstalled'] = 'not installed!'; -$lng['install']['phpbcmath'] = 'Testing if PHP bcmath-extension is installed...'; -$lng['install']['bcmathdescription'] = 'Traffic-calculation related functions will not work correctly!'; -$lng['install']['openbasedir'] = 'Testing if open_basedir is enabled...'; -$lng['install']['openbasedirenabled'] = 'enabled. Froxlor will not work properly with open_basedir enabled. Please disable open_basedir for Froxlor'; - -/** - * Renamed in 1.2.19-svn40 - */ - -$lng['install']['webserver'] = 'Webserver'; - -/* - * Added in Froxlor 0.9 - */ -$lng['install']['phpversion'] = 'Checking for PHP version >= 5.2'; -$lng['install']['phpposix'] = 'Testing if PHP posix-extension is installed...'; - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Language + * @version $Id$ + */ + +/** + * Begin + */ + +$lng['install']['language'] = 'Installation - Language'; +$lng['install']['welcome'] = 'Welcome to Froxlor Installation'; +$lng['install']['welcometext'] = 'Thank you for choosing Froxlor. Please fill out the following fields with the required information to start the installation.
Attention: If the database you chose for Froxlor already exists on your System, it will be erased with all containing data!'; +$lng['install']['database'] = 'Database'; +$lng['install']['mysql_hostname'] = 'MySQL-Hostname'; +$lng['install']['mysql_database'] = 'MySQL-Database'; +$lng['install']['mysql_unpriv_user'] = 'Username for the unprivileged MySQL-account'; +$lng['install']['mysql_unpriv_pass'] = 'Password for the unprivileged MySQL-account'; +$lng['install']['mysql_root_user'] = 'Username for the MySQL-root-account'; +$lng['install']['mysql_root_pass'] = 'Password for the MySQL-root-account'; +$lng['install']['admin_account'] = 'Administrator Account'; +$lng['install']['admin_user'] = 'Administrator Username'; +$lng['install']['admin_pass'] = 'Administrator Password'; +$lng['install']['admin_pass_confirm'] = 'Administrator-Password (confirm)'; +$lng['install']['serversettings'] = 'Server settings'; +$lng['install']['servername'] = 'Server name (FQDN)'; +$lng['install']['serverip'] = 'Server IP'; +$lng['install']['httpuser'] = 'HTTP username'; +$lng['install']['httpgroup'] = 'HTTP groupname'; +$lng['install']['apacheversion'] = 'Apacheversion'; +$lng['install']['next'] = 'Next'; + +/** + * Progress + */ + +$lng['install']['testing_mysql'] = 'Testing if MySQL-root-username and password are correct...'; +$lng['install']['erasing_old_db'] = 'Erasing old Database...'; +$lng['install']['backup_old_db'] = 'Create backup of the old Database...'; +$lng['install']['backing_up'] = 'Backing up'; +$lng['install']['backing_up_binary_missing'] = '/usr/bin/mysqldump is missing'; +$lng['install']['create_mysqluser_and_db'] = 'Creating MySQL-database and username...'; +$lng['install']['testing_new_db'] = 'Testing if MySQL-database and username have been created correctly...'; +$lng['install']['importing_data'] = 'Importing data into MySQL-database...'; +$lng['install']['changing_data'] = 'Changing imported data...'; +$lng['install']['adding_admin_user'] = 'Adding Administrator Account...'; +$lng['install']['creating_configfile'] = 'Creating configfile...'; +$lng['install']['creating_configfile_succ'] = 'OK, userdata.inc.php was saved in lib/.'; +$lng['install']['creating_configfile_temp'] = 'File was saved in /tmp/userdata.inc.php, please move to lib/.'; +$lng['install']['creating_configfile_failed'] = 'Cannot create lib/userdata.inc.php, please create it manually with the following data:'; +$lng['install']['froxlor_succ_installed'] = 'Froxlor was installed successfully.'; +$lng['install']['click_here_to_login'] = 'Click here to login.'; +$lng['install']['phpmysql'] = 'Testing if PHP MySQL-extension is installed...'; +$lng['install']['phpfilter'] = 'Testing if PHP filter-extension is installed...'; +$lng['install']['diedbecauseofrequirements'] = 'Cannot install Froxlor without these requirements! Aborting...'; +$lng['install']['notinstalled'] = 'not installed!'; +$lng['install']['phpbcmath'] = 'Testing if PHP bcmath-extension is installed...'; +$lng['install']['bcmathdescription'] = 'Traffic-calculation related functions will not work correctly!'; +$lng['install']['openbasedir'] = 'Testing if open_basedir is enabled...'; +$lng['install']['openbasedirenabled'] = 'enabled. Froxlor will not work properly with open_basedir enabled. Please disable open_basedir for Froxlor'; + +/** + * Renamed in 1.2.19-svn40 + */ + +$lng['install']['webserver'] = 'Webserver'; + +/* + * Added in Froxlor 0.9 + */ +$lng['install']['phpversion'] = 'Checking for PHP version >= 5.2'; +$lng['install']['phpposix'] = 'Testing if PHP posix-extension is installed...'; + +?> diff --git a/install/lng/french.lng.php b/install/lng/french.lng.php index d2f4da3d..ab9d5291 100644 --- a/install/lng/french.lng.php +++ b/install/lng/french.lng.php @@ -1,71 +1,71 @@ - - * @author Romain MARIADASSOU - * @author Froxlor Team - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Language - * @version $Id$ - */ - -/** - * Begin - */ - -$lng['install']['language'] = 'Langue d\'installation'; -$lng['install']['welcome'] = 'Bienvenue ŕ l\'installation de Froxlor'; -$lng['install']['welcometext'] = 'Merci beaucoup d\'avoir choisi Froxlor. Pour installer Froxlor remplissez les cases ci-dessous avec les informations demandées.
Attention : Si vous entrez le nom d\'une base de données existante, celle-ci sera effacée !'; -$lng['install']['database'] = 'Base de données'; -$lng['install']['mysql_hostname'] = 'Nom d\'hôte du serveur MySQL'; -$lng['install']['mysql_database'] = 'Base de données MySQL'; -$lng['install']['mysql_unpriv_user'] = 'Utilisateur pour l\'accčs non privilégié ŕ MySQL'; -$lng['install']['mysql_unpriv_pass'] = 'Mot de passe pour l\'accčs non privilégié ŕ MySQL'; -$lng['install']['mysql_root_user'] = 'Utilisateur pour l\'accčs root ŕ MySQL'; -$lng['install']['mysql_root_pass'] = 'Mot de passe pour l\'accčs root ŕ MySQL'; -$lng['install']['admin_account'] = 'Accčs administratif'; -$lng['install']['admin_user'] = 'Login de l\'administrateur'; -$lng['install']['admin_pass'] = 'Mot de passe de l\'administrateur'; -$lng['install']['admin_pass_confirm'] = 'Mot de passe de l\'administrateur (confirmation)'; -$lng['install']['serversettings'] = 'Configuration du serveur'; -$lng['install']['servername'] = 'Nom du serveur (FQDN)'; -$lng['install']['serverip'] = 'Adresse IP du serveur'; -$lng['install']['apacheversion'] = 'Version du serveur Apache'; -$lng['install']['next'] = 'Continuer'; - -/** - * Progress - */ - -$lng['install']['testing_mysql'] = 'Vérification du login root de MySQL ...'; -$lng['install']['erasing_old_db'] = 'Effacement de l\'ancienne base de données ...'; -$lng['install']['create_mysqluser_and_db'] = 'Création de la base de données puis des utilisateurs ...'; -$lng['install']['testing_new_db'] = 'Vérification de la base de données et des utilisateurs ...'; -$lng['install']['importing_data'] = 'Importation des informations dans la base de données ...'; -$lng['install']['changing_data'] = 'Modification des données importés ...'; -$lng['install']['adding_admin_user'] = 'Ajout de l\'utilisateur administrateur ...'; -$lng['install']['creating_configfile'] = 'Création du fichier de configuration ...'; -$lng['install']['creating_configfile_succ'] = 'OK, userdata.inc.php a été sauvegardé dans le dossier lib/ de Froxlor.'; -$lng['install']['creating_configfile_temp'] = 'Le fichier a été sauvegardé dans /tmp/userdata.inc.php, veuillez le déplacer / copier dans le dossier lib/ de Froxlor.'; -$lng['install']['creating_configfile_failed'] = 'Erreur en créant le fichier lib/userdata.inc.php, veuillez le créer avec le contenu ci-dessous :'; -$lng['install']['froxlor_succ_installed'] = 'Froxlor a été installé correctement.'; -$lng['install']['click_here_to_login'] = 'Cliquez ici pour vous rendre ŕ l\'invite de connexion.'; -$lng['install']['httpuser'] = 'Nom du utilisateur du HTTP'; -$lng['install']['httpgroup'] = 'Nom du la group du HTTP'; - -/** - * Renamed in 1.2.19-svn40 - */ - -$lng['install']['webserver'] = 'Version du serveur'; - -?> + + * @author Romain MARIADASSOU + * @author Froxlor Team + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Language + * @version $Id$ + */ + +/** + * Begin + */ + +$lng['install']['language'] = 'Langue d\'installation'; +$lng['install']['welcome'] = 'Bienvenue ŕ l\'installation de Froxlor'; +$lng['install']['welcometext'] = 'Merci beaucoup d\'avoir choisi Froxlor. Pour installer Froxlor remplissez les cases ci-dessous avec les informations demandées.
Attention : Si vous entrez le nom d\'une base de données existante, celle-ci sera effacée !'; +$lng['install']['database'] = 'Base de données'; +$lng['install']['mysql_hostname'] = 'Nom d\'hôte du serveur MySQL'; +$lng['install']['mysql_database'] = 'Base de données MySQL'; +$lng['install']['mysql_unpriv_user'] = 'Utilisateur pour l\'accčs non privilégié ŕ MySQL'; +$lng['install']['mysql_unpriv_pass'] = 'Mot de passe pour l\'accčs non privilégié ŕ MySQL'; +$lng['install']['mysql_root_user'] = 'Utilisateur pour l\'accčs root ŕ MySQL'; +$lng['install']['mysql_root_pass'] = 'Mot de passe pour l\'accčs root ŕ MySQL'; +$lng['install']['admin_account'] = 'Accčs administratif'; +$lng['install']['admin_user'] = 'Login de l\'administrateur'; +$lng['install']['admin_pass'] = 'Mot de passe de l\'administrateur'; +$lng['install']['admin_pass_confirm'] = 'Mot de passe de l\'administrateur (confirmation)'; +$lng['install']['serversettings'] = 'Configuration du serveur'; +$lng['install']['servername'] = 'Nom du serveur (FQDN)'; +$lng['install']['serverip'] = 'Adresse IP du serveur'; +$lng['install']['apacheversion'] = 'Version du serveur Apache'; +$lng['install']['next'] = 'Continuer'; + +/** + * Progress + */ + +$lng['install']['testing_mysql'] = 'Vérification du login root de MySQL ...'; +$lng['install']['erasing_old_db'] = 'Effacement de l\'ancienne base de données ...'; +$lng['install']['create_mysqluser_and_db'] = 'Création de la base de données puis des utilisateurs ...'; +$lng['install']['testing_new_db'] = 'Vérification de la base de données et des utilisateurs ...'; +$lng['install']['importing_data'] = 'Importation des informations dans la base de données ...'; +$lng['install']['changing_data'] = 'Modification des données importés ...'; +$lng['install']['adding_admin_user'] = 'Ajout de l\'utilisateur administrateur ...'; +$lng['install']['creating_configfile'] = 'Création du fichier de configuration ...'; +$lng['install']['creating_configfile_succ'] = 'OK, userdata.inc.php a été sauvegardé dans le dossier lib/ de Froxlor.'; +$lng['install']['creating_configfile_temp'] = 'Le fichier a été sauvegardé dans /tmp/userdata.inc.php, veuillez le déplacer / copier dans le dossier lib/ de Froxlor.'; +$lng['install']['creating_configfile_failed'] = 'Erreur en créant le fichier lib/userdata.inc.php, veuillez le créer avec le contenu ci-dessous :'; +$lng['install']['froxlor_succ_installed'] = 'Froxlor a été installé correctement.'; +$lng['install']['click_here_to_login'] = 'Cliquez ici pour vous rendre ŕ l\'invite de connexion.'; +$lng['install']['httpuser'] = 'Nom du utilisateur du HTTP'; +$lng['install']['httpgroup'] = 'Nom du la group du HTTP'; + +/** + * Renamed in 1.2.19-svn40 + */ + +$lng['install']['webserver'] = 'Version du serveur'; + +?> diff --git a/install/lng/german.lng.php b/install/lng/german.lng.php index bca08f8f..fc9b4410 100644 --- a/install/lng/german.lng.php +++ b/install/lng/german.lng.php @@ -1,84 +1,84 @@ - (2003-2007) - * @author Froxlor Team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Language - * @version $Id$ - */ - -/** - * Begin - */ - -$lng['install']['language'] = 'Installations - Sprache'; -$lng['install']['welcome'] = 'Willkommen zur Froxlor Installation'; -$lng['install']['welcometext'] = 'Vielen Dank dass Sie sich für Froxlor entschieden haben. Um Ihre Installation von Froxlor zu starten, füllen Sie bitte alle Felder unten mit den geforderten Angaben.
Achtung: Eine eventuell bereits existierende Datenbank, die den selben Namen hat wie den, den Sie unten eingeben werden, wird mit allen enthaltenen Daten gelöscht!'; -$lng['install']['database'] = 'Datenbank'; -$lng['install']['mysql_hostname'] = 'MySQL-Hostname'; -$lng['install']['mysql_database'] = 'MySQL-Datenbank'; -$lng['install']['mysql_unpriv_user'] = 'Benutzername für den unprivilegierten MySQL-Account'; -$lng['install']['mysql_unpriv_pass'] = 'Passwort für den unprivilegierten MySQL-Account'; -$lng['install']['mysql_root_user'] = 'Benutzername für den MySQL-Root-Account'; -$lng['install']['mysql_root_pass'] = 'Passwort für den MySQL-Root-Account'; -$lng['install']['admin_account'] = 'Admin-Zugang'; -$lng['install']['admin_user'] = 'Administrator-Benutzername'; -$lng['install']['admin_pass'] = 'Administrator-Passwort'; -$lng['install']['admin_pass_confirm'] = 'Administrator-Passwort (Bestätigung)'; -$lng['install']['serversettings'] = 'Servereinstellungen'; -$lng['install']['servername'] = 'Servername (FQDN)'; -$lng['install']['serverip'] = 'Server-IP'; -$lng['install']['apacheversion'] = 'Apacheversion'; -$lng['install']['next'] = 'Fortfahren'; - -/** - * Progress - */ - -$lng['install']['testing_mysql'] = 'Teste, ob die MySQL-Root-Benutzerdaten richtig sind...'; -$lng['install']['erasing_old_db'] = 'Entferne alte Datenbank...'; -$lng['install']['create_mysqluser_and_db'] = 'Erstelle Datenbank und Benutzer...'; -$lng['install']['testing_new_db'] = 'Teste, ob die Datenbank und Passwort korrekt angelegt wurden...'; -$lng['install']['importing_data'] = 'Importiere Daten in die MySQL-Datenbank...'; -$lng['install']['changing_data'] = 'Passe die importierten Daten an...'; -$lng['install']['adding_admin_user'] = 'Füge den Admin-Benutzer hinzu...'; -$lng['install']['creating_configfile'] = 'Erstelle Konfigurationsdatei...'; -$lng['install']['creating_configfile_succ'] = 'OK, userdata.inc.php wurde in lib/ gespeichert.'; -$lng['install']['creating_configfile_temp'] = 'Datei wurde in /tmp/userdata.inc.php gespeichert, bitte nach lib/ verschieben.'; -$lng['install']['creating_configfile_failed'] = 'Konnte lib/userdata.inc.php nicht erstellen, bitte manuell mit folgendem Inhalt anlegen:'; -$lng['install']['froxlor_succ_installed'] = 'Froxlor wurde erfolgreich installiert.'; -$lng['install']['click_here_to_login'] = 'Hier geht es weiter zum Login-Fenster.'; -$lng['install']['phpmysql'] = 'Teste, ob die PHP MySQL-Erweiterung installiert ist...'; -$lng['install']['phpfilter'] = 'Teste, ob die PHP Filter-Erweiterung installiert ist...'; -$lng['install']['diedbecauseofrequirements'] = 'Kann Froxlor ohne diese Voraussetzungen nicht installieren! Breche ab...'; -$lng['install']['notinstalled'] = 'nicht installiert!'; -$lng['install']['phpbcmath'] = 'Teste, ob die PHP bcmath-Erweiterung installiert ist...'; -$lng['install']['bcmathdescription'] = 'Traffic-Berechnungs bezogene Funktionen stehen nicht vollständig zur Verfügung!'; -$lng['install']['openbasedir'] = 'Teste, ob open_basedir genutzt wird...'; -$lng['install']['openbasedirenabled'] = 'aktiviert. Froxlor wird mit aktiviertem open_basedir nicht vollständig funktionieren. Bitte deaktivieren Sie open_basedir für Froxlor'; -$lng['install']['httpuser'] = 'HTTP Username'; -$lng['install']['httpgroup'] = 'HTTP Gruppenname'; - -/** - * Renamed in 1.2.19-svn40 - */ - -$lng['install']['webserver'] = 'Webserver'; - -/* - * Added in Froxlor 0.9 - */ -$lng['install']['phpversion'] = 'Prüfe PHP Version >= 5.2'; -$lng['install']['phpposix'] = 'Teste, ob die PHP Posix-Erweiterung installiert ist...'; - -?> + (2003-2007) + * @author Froxlor Team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Language + * @version $Id$ + */ + +/** + * Begin + */ + +$lng['install']['language'] = 'Installations - Sprache'; +$lng['install']['welcome'] = 'Willkommen zur Froxlor Installation'; +$lng['install']['welcometext'] = 'Vielen Dank dass Sie sich für Froxlor entschieden haben. Um Ihre Installation von Froxlor zu starten, füllen Sie bitte alle Felder unten mit den geforderten Angaben.
Achtung: Eine eventuell bereits existierende Datenbank, die den selben Namen hat wie den, den Sie unten eingeben werden, wird mit allen enthaltenen Daten gelöscht!'; +$lng['install']['database'] = 'Datenbank'; +$lng['install']['mysql_hostname'] = 'MySQL-Hostname'; +$lng['install']['mysql_database'] = 'MySQL-Datenbank'; +$lng['install']['mysql_unpriv_user'] = 'Benutzername für den unprivilegierten MySQL-Account'; +$lng['install']['mysql_unpriv_pass'] = 'Passwort für den unprivilegierten MySQL-Account'; +$lng['install']['mysql_root_user'] = 'Benutzername für den MySQL-Root-Account'; +$lng['install']['mysql_root_pass'] = 'Passwort für den MySQL-Root-Account'; +$lng['install']['admin_account'] = 'Admin-Zugang'; +$lng['install']['admin_user'] = 'Administrator-Benutzername'; +$lng['install']['admin_pass'] = 'Administrator-Passwort'; +$lng['install']['admin_pass_confirm'] = 'Administrator-Passwort (Bestätigung)'; +$lng['install']['serversettings'] = 'Servereinstellungen'; +$lng['install']['servername'] = 'Servername (FQDN)'; +$lng['install']['serverip'] = 'Server-IP'; +$lng['install']['apacheversion'] = 'Apacheversion'; +$lng['install']['next'] = 'Fortfahren'; + +/** + * Progress + */ + +$lng['install']['testing_mysql'] = 'Teste, ob die MySQL-Root-Benutzerdaten richtig sind...'; +$lng['install']['erasing_old_db'] = 'Entferne alte Datenbank...'; +$lng['install']['create_mysqluser_and_db'] = 'Erstelle Datenbank und Benutzer...'; +$lng['install']['testing_new_db'] = 'Teste, ob die Datenbank und Passwort korrekt angelegt wurden...'; +$lng['install']['importing_data'] = 'Importiere Daten in die MySQL-Datenbank...'; +$lng['install']['changing_data'] = 'Passe die importierten Daten an...'; +$lng['install']['adding_admin_user'] = 'Füge den Admin-Benutzer hinzu...'; +$lng['install']['creating_configfile'] = 'Erstelle Konfigurationsdatei...'; +$lng['install']['creating_configfile_succ'] = 'OK, userdata.inc.php wurde in lib/ gespeichert.'; +$lng['install']['creating_configfile_temp'] = 'Datei wurde in /tmp/userdata.inc.php gespeichert, bitte nach lib/ verschieben.'; +$lng['install']['creating_configfile_failed'] = 'Konnte lib/userdata.inc.php nicht erstellen, bitte manuell mit folgendem Inhalt anlegen:'; +$lng['install']['froxlor_succ_installed'] = 'Froxlor wurde erfolgreich installiert.'; +$lng['install']['click_here_to_login'] = 'Hier geht es weiter zum Login-Fenster.'; +$lng['install']['phpmysql'] = 'Teste, ob die PHP MySQL-Erweiterung installiert ist...'; +$lng['install']['phpfilter'] = 'Teste, ob die PHP Filter-Erweiterung installiert ist...'; +$lng['install']['diedbecauseofrequirements'] = 'Kann Froxlor ohne diese Voraussetzungen nicht installieren! Breche ab...'; +$lng['install']['notinstalled'] = 'nicht installiert!'; +$lng['install']['phpbcmath'] = 'Teste, ob die PHP bcmath-Erweiterung installiert ist...'; +$lng['install']['bcmathdescription'] = 'Traffic-Berechnungs bezogene Funktionen stehen nicht vollständig zur Verfügung!'; +$lng['install']['openbasedir'] = 'Teste, ob open_basedir genutzt wird...'; +$lng['install']['openbasedirenabled'] = 'aktiviert. Froxlor wird mit aktiviertem open_basedir nicht vollständig funktionieren. Bitte deaktivieren Sie open_basedir für Froxlor'; +$lng['install']['httpuser'] = 'HTTP Username'; +$lng['install']['httpgroup'] = 'HTTP Gruppenname'; + +/** + * Renamed in 1.2.19-svn40 + */ + +$lng['install']['webserver'] = 'Webserver'; + +/* + * Added in Froxlor 0.9 + */ +$lng['install']['phpversion'] = 'Prüfe PHP Version >= 5.2'; +$lng['install']['phpposix'] = 'Teste, ob die PHP Posix-Erweiterung installiert ist...'; + +?> diff --git a/install/scripts/htpasswd-htaccess-remover.php b/install/scripts/htpasswd-htaccess-remover.php index 190e22c7..292b148e 100644 --- a/install/scripts/htpasswd-htaccess-remover.php +++ b/install/scripts/htpasswd-htaccess-remover.php @@ -1,106 +1,106 @@ - - * @license GPLv2 http://files.syscp.org/misc/COPYING.txt - * @package System - * @version $Id$ - */ - -if(@php_sapi_name() != 'cli' - && @php_sapi_name() != 'cgi' - && @php_sapi_name() != 'cgi-fcgi') -{ - die('This script will only work in the shell.'); -} - -$pathtophpfiles = '/var/www/syscp'; -$filename = 'htpasswd-htaccess-remover.php'; - -/** - * Includes the Usersettings eg. MySQL-Username/Passwort etc. - */ - -require ("$pathtophpfiles/lib/userdata.inc.php"); - -/** - * Includes the MySQL-Tabledefinitions etc. - */ - -require ("$pathtophpfiles/lib/tables.inc.php"); - -/** - * Includes the MySQL-Connection-Class - */ - -require ("$pathtophpfiles/lib/class_mysqldb.php"); -$debugMsg[] = 'Database Class has been loaded'; -$db = new db($sql['host'], $sql['user'], $sql['password'], $sql['db']); -$db_root = new db($sql['host'], $sql['root_user'], $sql['root_password'], ''); - -if($db->link_id == 0 - || $db_root->link_id == 0) -{ - /** - * Do not proceed further if no database connection could be established (either normal or root) - */ - - die('Cant connect to mysqlserver. Please check userdata.inc.php! Exiting...'); -} - -unset($sql['password']); -unset($db->password); -$result = $db->query("SELECT `settingid`, `settinggroup`, `varname`, `value` FROM `" . TABLE_PANEL_SETTINGS . "`"); - -while($row = $db->fetch_array($result)) -{ - $settings["$row[settinggroup]"]["$row[varname]"] = $row['value']; -} - -unset($row); -unset($result); - -if(!isset($settings['panel']['version']) - || $settings['panel']['version'] != $version) -{ - /** - * Do not proceed further if the Database version is not the same as the script version - */ - - die('Version of File doesnt match Version of Database. Exiting...'); -} - -/** - * Includes the Functions - */ - -require ("$pathtophpfiles/lib/functions.php"); -$result = $db->query('SELECT * FROM `' . TABLE_PANEL_HTACCESS . '` '); - -while($row = $db->fetch_array($result)) -{ - if(file_exists($row['path'] . '.htaccess')) - { - unlink($row['path'] . '.htaccess'); - } -} - -$result = $db->query('SELECT * FROM `' . TABLE_PANEL_HTPASSWDS . '` '); - -while($row = $db->fetch_array($result)) -{ - if(file_exists($row['path'] . '.htpasswd')) - { - unlink($row['path'] . '.htpasswd'); - } -} - -?> + + * @license GPLv2 http://files.syscp.org/misc/COPYING.txt + * @package System + * @version $Id$ + */ + +if(@php_sapi_name() != 'cli' + && @php_sapi_name() != 'cgi' + && @php_sapi_name() != 'cgi-fcgi') +{ + die('This script will only work in the shell.'); +} + +$pathtophpfiles = '/var/www/syscp'; +$filename = 'htpasswd-htaccess-remover.php'; + +/** + * Includes the Usersettings eg. MySQL-Username/Passwort etc. + */ + +require ("$pathtophpfiles/lib/userdata.inc.php"); + +/** + * Includes the MySQL-Tabledefinitions etc. + */ + +require ("$pathtophpfiles/lib/tables.inc.php"); + +/** + * Includes the MySQL-Connection-Class + */ + +require ("$pathtophpfiles/lib/class_mysqldb.php"); +$debugMsg[] = 'Database Class has been loaded'; +$db = new db($sql['host'], $sql['user'], $sql['password'], $sql['db']); +$db_root = new db($sql['host'], $sql['root_user'], $sql['root_password'], ''); + +if($db->link_id == 0 + || $db_root->link_id == 0) +{ + /** + * Do not proceed further if no database connection could be established (either normal or root) + */ + + die('Cant connect to mysqlserver. Please check userdata.inc.php! Exiting...'); +} + +unset($sql['password']); +unset($db->password); +$result = $db->query("SELECT `settingid`, `settinggroup`, `varname`, `value` FROM `" . TABLE_PANEL_SETTINGS . "`"); + +while($row = $db->fetch_array($result)) +{ + $settings["$row[settinggroup]"]["$row[varname]"] = $row['value']; +} + +unset($row); +unset($result); + +if(!isset($settings['panel']['version']) + || $settings['panel']['version'] != $version) +{ + /** + * Do not proceed further if the Database version is not the same as the script version + */ + + die('Version of File doesnt match Version of Database. Exiting...'); +} + +/** + * Includes the Functions + */ + +require ("$pathtophpfiles/lib/functions.php"); +$result = $db->query('SELECT * FROM `' . TABLE_PANEL_HTACCESS . '` '); + +while($row = $db->fetch_array($result)) +{ + if(file_exists($row['path'] . '.htaccess')) + { + unlink($row['path'] . '.htaccess'); + } +} + +$result = $db->query('SELECT * FROM `' . TABLE_PANEL_HTPASSWDS . '` '); + +while($row = $db->fetch_array($result)) +{ + if(file_exists($row['path'] . '.htpasswd')) + { + unlink($row['path'] . '.htpasswd'); + } +} + +?> diff --git a/install/scripts/language-check.php b/install/scripts/language-check.php index c9dce741..ddb29f34 100644 --- a/install/scripts/language-check.php +++ b/install/scripts/language-check.php @@ -1,186 +1,186 @@ - - * @license GPLv2 http://files.syscp.org/misc/COPYING.txt - * @package System - * @version $Id$ - */ - -// some configs - -$baseLanguage = 'english.lng.php'; - -// Check if we're in the CLI - -if(@php_sapi_name() != 'cli' - && @php_sapi_name() != 'cgi' - && @php_sapi_name() != 'cgi-fcgi') -{ - die('This script will only work in the shell.'); -} - -// Check argument count - -if(sizeof($argv) != 2) -{ - print_help($argv); - exit; -} - -// Load the contents of the given path - -$path = $argv[1]; -$files = array(); - -if($dh = opendir($path)) -{ - while(false !== ($file = readdir($dh))) - { - if($file != "." - && $file != ".." - && !is_dir($file) - && preg_match('/(.+)\.lng\.php/i', $file)) - { - $files[$file] = str_replace('//', '/', $path . '/' . $file); - } - } - - closedir($dh); -} -else -{ - print "ERROR: The path you requested cannot be read! \n "; - print "\n"; - print_help(); - exit; -} - -// check if there is the default language defined - -if(!isset($files[$baseLanguage])) -{ - print "ERROR: The baselanguage cannot be found! \n"; - print "\n"; - print_help(); - exit; -} - -// import the baselanguage - -$base = import($files[$baseLanguage]); - -// and unset it in the files, because we don't need to compare base to base - -unset($files[$baseLanguage]); - -// compare each language with the baselanguage - -foreach($files as $key => $file) -{ - $comp = import($file); - print "\n\nComparing " . $baseLanguage . " to " . $key . "\n"; - $result = compare($base, $comp); - - if(is_array($result) - && sizeof($result) > 0) - { - print " found missing strings: \n"; - foreach($result as $value) - { - print " " . $value . "\n"; - } - } - else - { - print " no missing strings found! \n "; - } - - print "\nReverse Checking " . $key . " to " . $baseLanguage . "\n"; - $result = compare($comp, $base); - - if(is_array($result) - && sizeof($result) > 0) - { - print " found strings not in basefile: \n"; - foreach($result as $key => $value) - { - print " " . $value . "\n"; - } - } - else - { - print " There are no strings which are not in the basefile! \n "; - } -} - -//----------------------------------------------------------------------------------------- -// FUNCTIONS -//----------------------------------------------------------------------------------------- - -/** - * prints the help screen - * - * @param array $argv - */ - -function print_help($argv) -{ - print "Usage: php " . $argv[0] . " /PATH/TO/LNG \n"; - print " \n "; -} - -function import($file) -{ - $input = file($file); - $return = array(); - foreach($input as $key => $value) - { - if(!preg_match('/^\$/', $value)) - { - unset($input[$key]); - } - else - { - // generate the key - - $key = preg_replace('/^\$lng\[\'(.*)=(.*)$/U', '\\1', $value); - $key = str_replace('[\'', '/', $key); - $key = trim(str_replace('\']', '', $key)); - - //generate the value - - $value = trim($value); - - // set the result - - $return[$key] = $value; - } - } - - return $return; -} - -function compare($array1, $array2) -{ - $result = array(); - foreach($array1 as $key => $value) - { - if(!isset($array2[$key])) - { - $result[$key] = $value; - } - } - - return $result; -} - + + * @license GPLv2 http://files.syscp.org/misc/COPYING.txt + * @package System + * @version $Id$ + */ + +// some configs + +$baseLanguage = 'english.lng.php'; + +// Check if we're in the CLI + +if(@php_sapi_name() != 'cli' + && @php_sapi_name() != 'cgi' + && @php_sapi_name() != 'cgi-fcgi') +{ + die('This script will only work in the shell.'); +} + +// Check argument count + +if(sizeof($argv) != 2) +{ + print_help($argv); + exit; +} + +// Load the contents of the given path + +$path = $argv[1]; +$files = array(); + +if($dh = opendir($path)) +{ + while(false !== ($file = readdir($dh))) + { + if($file != "." + && $file != ".." + && !is_dir($file) + && preg_match('/(.+)\.lng\.php/i', $file)) + { + $files[$file] = str_replace('//', '/', $path . '/' . $file); + } + } + + closedir($dh); +} +else +{ + print "ERROR: The path you requested cannot be read! \n "; + print "\n"; + print_help(); + exit; +} + +// check if there is the default language defined + +if(!isset($files[$baseLanguage])) +{ + print "ERROR: The baselanguage cannot be found! \n"; + print "\n"; + print_help(); + exit; +} + +// import the baselanguage + +$base = import($files[$baseLanguage]); + +// and unset it in the files, because we don't need to compare base to base + +unset($files[$baseLanguage]); + +// compare each language with the baselanguage + +foreach($files as $key => $file) +{ + $comp = import($file); + print "\n\nComparing " . $baseLanguage . " to " . $key . "\n"; + $result = compare($base, $comp); + + if(is_array($result) + && sizeof($result) > 0) + { + print " found missing strings: \n"; + foreach($result as $value) + { + print " " . $value . "\n"; + } + } + else + { + print " no missing strings found! \n "; + } + + print "\nReverse Checking " . $key . " to " . $baseLanguage . "\n"; + $result = compare($comp, $base); + + if(is_array($result) + && sizeof($result) > 0) + { + print " found strings not in basefile: \n"; + foreach($result as $key => $value) + { + print " " . $value . "\n"; + } + } + else + { + print " There are no strings which are not in the basefile! \n "; + } +} + +//----------------------------------------------------------------------------------------- +// FUNCTIONS +//----------------------------------------------------------------------------------------- + +/** + * prints the help screen + * + * @param array $argv + */ + +function print_help($argv) +{ + print "Usage: php " . $argv[0] . " /PATH/TO/LNG \n"; + print " \n "; +} + +function import($file) +{ + $input = file($file); + $return = array(); + foreach($input as $key => $value) + { + if(!preg_match('/^\$/', $value)) + { + unset($input[$key]); + } + else + { + // generate the key + + $key = preg_replace('/^\$lng\[\'(.*)=(.*)$/U', '\\1', $value); + $key = str_replace('[\'', '/', $key); + $key = trim(str_replace('\']', '', $key)); + + //generate the value + + $value = trim($value); + + // set the result + + $return[$key] = $value; + } + } + + return $return; +} + +function compare($array1, $array2) +{ + $result = array(); + foreach($array1 as $key => $value) + { + if(!isset($array2[$key])) + { + $result[$key] = $value; + } + } + + return $result; +} + ?> \ No newline at end of file diff --git a/install/updates/syscp/1.0/update_1.0.10_1.2-beta1.inc.php b/install/updates/syscp/1.0/update_1.0.10_1.2-beta1.inc.php index d99190d9..c4f902fa 100644 --- a/install/updates/syscp/1.0/update_1.0.10_1.2-beta1.inc.php +++ b/install/updates/syscp/1.0/update_1.0.10_1.2-beta1.inc.php @@ -1,82 +1,82 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Install - * @version $Id$ - */ - -/** - * We need those defines, because the tables.inc.php doesn't have them. - */ - -define('TABLE_POSTFIX_TRANSPORT', 'postfix_transport'); -define('TABLE_POSTFIX_USERS', 'postfix_users'); -define('TABLE_POSTFIX_VIRTUAL', 'postfix_virtual'); -define('TABLE_PROFTPD_GROUPS', 'proftpd_groups'); -define('TABLE_PROFTPD_USERS', 'proftpd_users'); - -if($settings['panel']['version'] == '1.0.10') -{ - // Drop/Rename postfix_ tables - - $db->query("DROP TABLE `" . TABLE_POSTFIX_TRANSPORT . "`"); - $db->query("ALTER TABLE `" . TABLE_POSTFIX_USERS . "` RENAME `" . TABLE_MAIL_USERS . "` "); - $db->query("ALTER TABLE `" . TABLE_POSTFIX_VIRTUAL . "` RENAME `" . TABLE_MAIL_VIRTUAL . "` "); - - // Rename proftpd_ tables - - $db->query("ALTER TABLE `" . TABLE_PROFTPD_USERS . "` RENAME `" . TABLE_FTP_USERS . "` "); - $db->query("ALTER TABLE `" . TABLE_PROFTPD_GROUPS . "` RENAME `" . TABLE_FTP_GROUPS . "` "); - - // Adding tables - - $db->query("DROP TABLE IF EXISTS `" . TABLE_PANEL_HTACCESS . "`;"); - $db->query("CREATE TABLE `" . TABLE_PANEL_HTACCESS . "` (" . " `id` int(11) unsigned NOT NULL auto_increment," . " `customerid` int(11) unsigned NOT NULL default '0'," . " `path` varchar(255) NOT NULL default ''," . " `options_indexes` tinyint(1) NOT NULL default '0'," . " PRIMARY KEY (`id`)" . ") TYPE=MyISAM ;"); - $db->query("DROP TABLE IF EXISTS `" . TABLE_PANEL_ADMINS . "`;"); - $db->query("CREATE TABLE `" . TABLE_PANEL_ADMINS . "` (" . " `adminid` int(11) unsigned NOT NULL auto_increment," . " `loginname` varchar(50) NOT NULL default ''," . " `password` varchar(50) NOT NULL default ''," . " `name` varchar(255) NOT NULL default ''," . " `email` varchar(255) NOT NULL default ''," . " `customers` int(15) NOT NULL default '0'," . " `customers_used` int(15) NOT NULL default '0'," . " `customers_see_all` tinyint(1) NOT NULL default '0'," . " `domains` int(15) NOT NULL default '0'," . " `domains_used` int(15) NOT NULL default '0'," . " `domains_see_all` tinyint(1) NOT NULL default '0'," . " `change_serversettings` tinyint(1) NOT NULL default '0'," . " `diskspace` int(15) NOT NULL default '0'," . " `diskspace_used` int(15) NOT NULL default '0'," . " `mysqls` int(15) NOT NULL default '0'," . " `mysqls_used` int(15) NOT NULL default '0'," . " `emails` int(15) NOT NULL default '0'," . " `emails_used` int(15) NOT NULL default '0'," . " `email_forwarders` int(15) NOT NULL default '0'," . " `email_forwarders_used` int(15) NOT NULL default '0'," . " `ftps` int(15) NOT NULL default '0'," . " `ftps_used` int(15) NOT NULL default '0'," . " `subdomains` int(15) NOT NULL default '0'," . " `subdomains_used` int(15) NOT NULL default '0'," . " `traffic` int(15) NOT NULL default '0'," . " `traffic_used` int(15) NOT NULL default '0'," . " `deactivated` tinyint(1) NOT NULL default '0'," . " `lastlogin_succ` int(11) unsigned NOT NULL default '0'," . " `lastlogin_fail` int(11) unsigned NOT NULL default '0'," . " `loginfail_count` int(11) unsigned NOT NULL default '0'," . " PRIMARY KEY (`adminid`)" . ") TYPE=MyISAM ;"); - - // Insert Admin user - - if(!isset($adminusername) - || $adminusername == '') - { - $adminusername = 'admin'; - $adminpassword = 'admin'; - } - - $db->query("INSERT INTO `" . TABLE_PANEL_ADMINS . "` (`loginname`, `password`, `name`, `email`, `customers`, `customers_used`, `customers_see_all`, `domains`, `domains_used`, `domains_see_all`, `change_serversettings`, `diskspace`, `diskspace_used`, `mysqls`, `mysqls_used`, `emails`, `emails_used`, `email_forwarders`, `email_forwarders_used`, `ftps`, `ftps_used`, `subdomains`, `subdomains_used`, `traffic`, `traffic_used`, `deactivated`) VALUES ('" . $db->escape($adminusername) . "', '" . md5($adminpassword) . "', 'Siteadmin', 'admin@servername', -1, 0, 1, -1, 0, 1, 1, -1024, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1048576, 0, 0);"); - - // Alter Tables - - $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `adminid` INT( 11 ) UNSIGNED NOT NULL ," . "ADD `lastlogin_succ` INT( 11 ) UNSIGNED NOT NULL ," . "ADD `lastlogin_fail` INT( 11 ) UNSIGNED NOT NULL ," . "ADD `loginfail_count` INT( 11 ) UNSIGNED NOT NULL ;"); - $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD INDEX ( `adminid` ) ;"); - $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `adminid` = '1'"); - $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `adminid` INT( 11 ) UNSIGNED NOT NULL ," . "ADD `iswildcarddomain` TINYINT( 1 ) NOT NULL ," . "ADD `speciallogfile` TINYINT( 1 ) NOT NULL ;"); - $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD INDEX ( `adminid` ) ;"); - $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `adminid` = '1'"); - $db->query("ALTER TABLE `" . TABLE_PANEL_SESSIONS . "` CHANGE `customerid` `userid` INT( 11 ) UNSIGNED DEFAULT '0' NOT NULL "); - $db->query("ALTER TABLE `" . TABLE_MAIL_USERS . "` CHANGE `password` `password_enc` VARCHAR( 128 ) NOT NULL "); - $db->query("ALTER TABLE `" . TABLE_MAIL_USERS . "` ADD `password` VARCHAR( 128 ) NOT NULL AFTER `email` ;"); - $db->query("INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (24, 'login', 'maxloginattempts', '3');"); - $db->query("INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (25, 'login', 'deactivatetime', '900');"); - $db->query("INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (26, 'panel', 'webmail_url', '');"); - $db->query("INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (27, 'panel', 'webftp_url', '');"); - $db->query("INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (28, 'panel', 'standardlanguage', 'german');"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `varname`='ipaddress' WHERE `settinggroup`='system' AND `varname`='ipadress'"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.0' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.0'; -} - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Install + * @version $Id$ + */ + +/** + * We need those defines, because the tables.inc.php doesn't have them. + */ + +define('TABLE_POSTFIX_TRANSPORT', 'postfix_transport'); +define('TABLE_POSTFIX_USERS', 'postfix_users'); +define('TABLE_POSTFIX_VIRTUAL', 'postfix_virtual'); +define('TABLE_PROFTPD_GROUPS', 'proftpd_groups'); +define('TABLE_PROFTPD_USERS', 'proftpd_users'); + +if($settings['panel']['version'] == '1.0.10') +{ + // Drop/Rename postfix_ tables + + $db->query("DROP TABLE `" . TABLE_POSTFIX_TRANSPORT . "`"); + $db->query("ALTER TABLE `" . TABLE_POSTFIX_USERS . "` RENAME `" . TABLE_MAIL_USERS . "` "); + $db->query("ALTER TABLE `" . TABLE_POSTFIX_VIRTUAL . "` RENAME `" . TABLE_MAIL_VIRTUAL . "` "); + + // Rename proftpd_ tables + + $db->query("ALTER TABLE `" . TABLE_PROFTPD_USERS . "` RENAME `" . TABLE_FTP_USERS . "` "); + $db->query("ALTER TABLE `" . TABLE_PROFTPD_GROUPS . "` RENAME `" . TABLE_FTP_GROUPS . "` "); + + // Adding tables + + $db->query("DROP TABLE IF EXISTS `" . TABLE_PANEL_HTACCESS . "`;"); + $db->query("CREATE TABLE `" . TABLE_PANEL_HTACCESS . "` (" . " `id` int(11) unsigned NOT NULL auto_increment," . " `customerid` int(11) unsigned NOT NULL default '0'," . " `path` varchar(255) NOT NULL default ''," . " `options_indexes` tinyint(1) NOT NULL default '0'," . " PRIMARY KEY (`id`)" . ") TYPE=MyISAM ;"); + $db->query("DROP TABLE IF EXISTS `" . TABLE_PANEL_ADMINS . "`;"); + $db->query("CREATE TABLE `" . TABLE_PANEL_ADMINS . "` (" . " `adminid` int(11) unsigned NOT NULL auto_increment," . " `loginname` varchar(50) NOT NULL default ''," . " `password` varchar(50) NOT NULL default ''," . " `name` varchar(255) NOT NULL default ''," . " `email` varchar(255) NOT NULL default ''," . " `customers` int(15) NOT NULL default '0'," . " `customers_used` int(15) NOT NULL default '0'," . " `customers_see_all` tinyint(1) NOT NULL default '0'," . " `domains` int(15) NOT NULL default '0'," . " `domains_used` int(15) NOT NULL default '0'," . " `domains_see_all` tinyint(1) NOT NULL default '0'," . " `change_serversettings` tinyint(1) NOT NULL default '0'," . " `diskspace` int(15) NOT NULL default '0'," . " `diskspace_used` int(15) NOT NULL default '0'," . " `mysqls` int(15) NOT NULL default '0'," . " `mysqls_used` int(15) NOT NULL default '0'," . " `emails` int(15) NOT NULL default '0'," . " `emails_used` int(15) NOT NULL default '0'," . " `email_forwarders` int(15) NOT NULL default '0'," . " `email_forwarders_used` int(15) NOT NULL default '0'," . " `ftps` int(15) NOT NULL default '0'," . " `ftps_used` int(15) NOT NULL default '0'," . " `subdomains` int(15) NOT NULL default '0'," . " `subdomains_used` int(15) NOT NULL default '0'," . " `traffic` int(15) NOT NULL default '0'," . " `traffic_used` int(15) NOT NULL default '0'," . " `deactivated` tinyint(1) NOT NULL default '0'," . " `lastlogin_succ` int(11) unsigned NOT NULL default '0'," . " `lastlogin_fail` int(11) unsigned NOT NULL default '0'," . " `loginfail_count` int(11) unsigned NOT NULL default '0'," . " PRIMARY KEY (`adminid`)" . ") TYPE=MyISAM ;"); + + // Insert Admin user + + if(!isset($adminusername) + || $adminusername == '') + { + $adminusername = 'admin'; + $adminpassword = 'admin'; + } + + $db->query("INSERT INTO `" . TABLE_PANEL_ADMINS . "` (`loginname`, `password`, `name`, `email`, `customers`, `customers_used`, `customers_see_all`, `domains`, `domains_used`, `domains_see_all`, `change_serversettings`, `diskspace`, `diskspace_used`, `mysqls`, `mysqls_used`, `emails`, `emails_used`, `email_forwarders`, `email_forwarders_used`, `ftps`, `ftps_used`, `subdomains`, `subdomains_used`, `traffic`, `traffic_used`, `deactivated`) VALUES ('" . $db->escape($adminusername) . "', '" . md5($adminpassword) . "', 'Siteadmin', 'admin@servername', -1, 0, 1, -1, 0, 1, 1, -1024, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1, 0, -1048576, 0, 0);"); + + // Alter Tables + + $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `adminid` INT( 11 ) UNSIGNED NOT NULL ," . "ADD `lastlogin_succ` INT( 11 ) UNSIGNED NOT NULL ," . "ADD `lastlogin_fail` INT( 11 ) UNSIGNED NOT NULL ," . "ADD `loginfail_count` INT( 11 ) UNSIGNED NOT NULL ;"); + $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD INDEX ( `adminid` ) ;"); + $db->query("UPDATE `" . TABLE_PANEL_CUSTOMERS . "` SET `adminid` = '1'"); + $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `adminid` INT( 11 ) UNSIGNED NOT NULL ," . "ADD `iswildcarddomain` TINYINT( 1 ) NOT NULL ," . "ADD `speciallogfile` TINYINT( 1 ) NOT NULL ;"); + $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD INDEX ( `adminid` ) ;"); + $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `adminid` = '1'"); + $db->query("ALTER TABLE `" . TABLE_PANEL_SESSIONS . "` CHANGE `customerid` `userid` INT( 11 ) UNSIGNED DEFAULT '0' NOT NULL "); + $db->query("ALTER TABLE `" . TABLE_MAIL_USERS . "` CHANGE `password` `password_enc` VARCHAR( 128 ) NOT NULL "); + $db->query("ALTER TABLE `" . TABLE_MAIL_USERS . "` ADD `password` VARCHAR( 128 ) NOT NULL AFTER `email` ;"); + $db->query("INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (24, 'login', 'maxloginattempts', '3');"); + $db->query("INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (25, 'login', 'deactivatetime', '900');"); + $db->query("INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (26, 'panel', 'webmail_url', '');"); + $db->query("INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (27, 'panel', 'webftp_url', '');"); + $db->query("INSERT INTO `panel_settings` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (28, 'panel', 'standardlanguage', 'german');"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `varname`='ipaddress' WHERE `settinggroup`='system' AND `varname`='ipadress'"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.0' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.0'; +} + ?> \ No newline at end of file diff --git a/install/updates/syscp/1.0/update_1.0_1.0.10.inc.php b/install/updates/syscp/1.0/update_1.0_1.0.10.inc.php index 3defd4ed..50409896 100644 --- a/install/updates/syscp/1.0/update_1.0_1.0.10.inc.php +++ b/install/updates/syscp/1.0/update_1.0_1.0.10.inc.php @@ -1,132 +1,132 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Install - * @version $Id$ - */ - -define('TABLE_POSTFIX_TRANSPORT', 'postfix_transport'); -define('TABLE_POSTFIX_USERS', 'postfix_users'); -define('TABLE_POSTFIX_VIRTUAL', 'postfix_virtual'); -define('TABLE_PROFTPD_GROUPS', 'proftpd_groups'); -define('TABLE_PROFTPD_USERS', 'proftpd_users'); - -if(!isset($settings['panel']['version'])) -{ - $settings['panel']['version'] = '1.0.0'; -} - -if($settings['panel']['version'] == '1.0.0') -{ - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '1.0.1')"); - $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `openbasedir` TINYINT( 1 ) NOT NULL , ADD `safemode` TINYINT( 1 ) NOT NULL"); - $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `openbasedir`='1', `safemode`='1'"); - $settings['panel']['version'] = '1.0.1'; -} - -if($settings['panel']['version'] == '1.0.1') -{ - $db->query("ALTER TABLE `" . TABLE_POSTFIX_USERS . "` ADD `domainid` INT( 11 ) NOT NULL AFTER `postfix`"); - $db->query("ALTER TABLE `" . TABLE_POSTFIX_VIRTUAL . "` ADD `domainid` INT( 11 ) NOT NULL AFTER `destination`"); - $result = $db->query("SELECT `id`, `domain` FROM `" . TABLE_PANEL_DOMAINS . "`"); - - while($row = $db->fetch_array($result)) - { - $db->query("UPDATE `" . TABLE_POSTFIX_USERS . "` SET `domainid`='" . (int)$row['id'] . "' WHERE `email` LIKE '%@" . $db->escape($row['domain']) . "'"); - $db->query("UPDATE `" . TABLE_POSTFIX_VIRTUAL . "` SET `domainid`='" . (int)$row['id'] . "' WHERE `email` LIKE '%@" . $db->escape($row['domain']) . "'"); - } - - $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `createstdsubdomain` TINYINT( 1 ) NOT NULL AFTER `documentroot`"); - inserttask('1'); - inserttask('4'); - $hostname = explode('@', $settings['panel']['adminmail']); - $hostname = $hostname[1]; - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (23, 'system', 'hostname', '" . $db->escape($hostname) . "')"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.0.2' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.0.2'; -} - -if($settings['panel']['version'] == '1.0.2') -{ - $db->query("ALTER TABLE `" . TABLE_PANEL_SESSIONS . "` ADD `language` VARCHAR( 64 ) NOT NULL AFTER `lastactivity` ;"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.0.3' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.0.3'; -} - -if($settings['panel']['version'] == '1.0.3') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.0.4' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.0.4'; -} - -if($settings['panel']['version'] == '1.0.4') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.0.5' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.0.5'; -} - -if($settings['panel']['version'] == '1.0.5') -{ - $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `deactivated` TINYINT( 1 ) NOT NULL ;"); - $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `deactivated` TINYINT( 1 ) NOT NULL ;"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.0.6' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.0.6'; -} - -if($settings['panel']['version'] == '1.0.6') -{ - $db->query("ALTER TABLE `" . TABLE_POSTFIX_VIRTUAL . "` ADD `popaccountid` INT( 11 ) NOT NULL ;"); - $result = $db->query("SELECT `id`, `email` FROM `" . TABLE_POSTFIX_USERS . "`"); - - while($row = $db->fetch_array($result)) - { - $db->query("UPDATE `" . TABLE_POSTFIX_VIRTUAL . "` SET `popaccountid`='" . (int)$row['id'] . "' WHERE `email` = '" . $db->escape(str_replace($settings['email']['catchallkeyword'], '', $row['email'])) . "' AND `destination` = '" . $db->escape($row['email']) . "'"); - } - - $result = $db->query("SELECT `id`, `email`, `destination` FROM `" . TABLE_POSTFIX_VIRTUAL . "` WHERE `popaccountid` = '0'"); - - while($row = $db->fetch_array($result)) - { - if(str_replace($settings['email']['catchallkeyword'], '', $row['email']) != $row['email']) - { - $db->query("UPDATE `" . TABLE_POSTFIX_VIRTUAL . "` SET `email` = '" . $db->escape(str_replace($settings['email']['catchallkeyword'], '', $row['email'])) . "' WHERE `id` = '" . (int)$row['id'] . "'"); - } - } - - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.0.7' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.0.7'; -} - -if($settings['panel']['version'] == '1.0.7') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.0.8' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.0.8'; -} - -if($settings['panel']['version'] == '1.0.8') -{ - $db->query("ALTER TABLE `" . TABLE_PANEL_DATABASES . "` DROP `password` ;"); - $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `specialsettings` TEXT NOT NULL AFTER `safemode` ;"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.0.9' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.0.9'; -} - -if($settings['panel']['version'] == '1.0.9') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.0.10' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.0.10'; -} - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Install + * @version $Id$ + */ + +define('TABLE_POSTFIX_TRANSPORT', 'postfix_transport'); +define('TABLE_POSTFIX_USERS', 'postfix_users'); +define('TABLE_POSTFIX_VIRTUAL', 'postfix_virtual'); +define('TABLE_PROFTPD_GROUPS', 'proftpd_groups'); +define('TABLE_PROFTPD_USERS', 'proftpd_users'); + +if(!isset($settings['panel']['version'])) +{ + $settings['panel']['version'] = '1.0.0'; +} + +if($settings['panel']['version'] == '1.0.0') +{ + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (22, 'panel', 'version', '1.0.1')"); + $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `openbasedir` TINYINT( 1 ) NOT NULL , ADD `safemode` TINYINT( 1 ) NOT NULL"); + $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `openbasedir`='1', `safemode`='1'"); + $settings['panel']['version'] = '1.0.1'; +} + +if($settings['panel']['version'] == '1.0.1') +{ + $db->query("ALTER TABLE `" . TABLE_POSTFIX_USERS . "` ADD `domainid` INT( 11 ) NOT NULL AFTER `postfix`"); + $db->query("ALTER TABLE `" . TABLE_POSTFIX_VIRTUAL . "` ADD `domainid` INT( 11 ) NOT NULL AFTER `destination`"); + $result = $db->query("SELECT `id`, `domain` FROM `" . TABLE_PANEL_DOMAINS . "`"); + + while($row = $db->fetch_array($result)) + { + $db->query("UPDATE `" . TABLE_POSTFIX_USERS . "` SET `domainid`='" . (int)$row['id'] . "' WHERE `email` LIKE '%@" . $db->escape($row['domain']) . "'"); + $db->query("UPDATE `" . TABLE_POSTFIX_VIRTUAL . "` SET `domainid`='" . (int)$row['id'] . "' WHERE `email` LIKE '%@" . $db->escape($row['domain']) . "'"); + } + + $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `createstdsubdomain` TINYINT( 1 ) NOT NULL AFTER `documentroot`"); + inserttask('1'); + inserttask('4'); + $hostname = explode('@', $settings['panel']['adminmail']); + $hostname = $hostname[1]; + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (23, 'system', 'hostname', '" . $db->escape($hostname) . "')"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.0.2' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.0.2'; +} + +if($settings['panel']['version'] == '1.0.2') +{ + $db->query("ALTER TABLE `" . TABLE_PANEL_SESSIONS . "` ADD `language` VARCHAR( 64 ) NOT NULL AFTER `lastactivity` ;"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.0.3' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.0.3'; +} + +if($settings['panel']['version'] == '1.0.3') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.0.4' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.0.4'; +} + +if($settings['panel']['version'] == '1.0.4') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.0.5' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.0.5'; +} + +if($settings['panel']['version'] == '1.0.5') +{ + $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `deactivated` TINYINT( 1 ) NOT NULL ;"); + $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `deactivated` TINYINT( 1 ) NOT NULL ;"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.0.6' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.0.6'; +} + +if($settings['panel']['version'] == '1.0.6') +{ + $db->query("ALTER TABLE `" . TABLE_POSTFIX_VIRTUAL . "` ADD `popaccountid` INT( 11 ) NOT NULL ;"); + $result = $db->query("SELECT `id`, `email` FROM `" . TABLE_POSTFIX_USERS . "`"); + + while($row = $db->fetch_array($result)) + { + $db->query("UPDATE `" . TABLE_POSTFIX_VIRTUAL . "` SET `popaccountid`='" . (int)$row['id'] . "' WHERE `email` = '" . $db->escape(str_replace($settings['email']['catchallkeyword'], '', $row['email'])) . "' AND `destination` = '" . $db->escape($row['email']) . "'"); + } + + $result = $db->query("SELECT `id`, `email`, `destination` FROM `" . TABLE_POSTFIX_VIRTUAL . "` WHERE `popaccountid` = '0'"); + + while($row = $db->fetch_array($result)) + { + if(str_replace($settings['email']['catchallkeyword'], '', $row['email']) != $row['email']) + { + $db->query("UPDATE `" . TABLE_POSTFIX_VIRTUAL . "` SET `email` = '" . $db->escape(str_replace($settings['email']['catchallkeyword'], '', $row['email'])) . "' WHERE `id` = '" . (int)$row['id'] . "'"); + } + } + + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.0.7' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.0.7'; +} + +if($settings['panel']['version'] == '1.0.7') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.0.8' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.0.8'; +} + +if($settings['panel']['version'] == '1.0.8') +{ + $db->query("ALTER TABLE `" . TABLE_PANEL_DATABASES . "` DROP `password` ;"); + $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `specialsettings` TEXT NOT NULL AFTER `safemode` ;"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.0.9' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.0.9'; +} + +if($settings['panel']['version'] == '1.0.9') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.0.10' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.0.10'; +} + ?> \ No newline at end of file diff --git a/install/updates/syscp/1.2/update_1.2-beta1_1.2.19.inc.php b/install/updates/syscp/1.2/update_1.2-beta1_1.2.19.inc.php index 750f5df4..4b858b7b 100644 --- a/install/updates/syscp/1.2/update_1.2-beta1_1.2.19.inc.php +++ b/install/updates/syscp/1.2/update_1.2-beta1_1.2.19.inc.php @@ -1,1189 +1,1189 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Install - * @version $Id$ - */ - -if($settings['panel']['version'] == '1.2-beta1' - || $settings['panel']['version'] == '1.2-rc1') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.0' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.0'; -} - -if($settings['panel']['version'] == '1.2.0') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.1' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.1'; -} - -if($settings['panel']['version'] == '1.2.1') -{ - $db->query("ALTER TABLE `" . TABLE_PANEL_SESSIONS . "` CHANGE `useragent` `useragent` VARCHAR( 255 ) NOT NULL"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.2' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.2'; -} - -if($settings['panel']['version'] == '1.2.2') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.2-cvs1' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.2-cvs1'; -} - -if($settings['panel']['version'] == '1.2.2-cvs1') -{ - $db->query(" - CREATE TABLE `" . TABLE_PANEL_LANGUAGE . "` ( - `id` int(11) unsigned NOT NULL auto_increment, - `language` varchar(30) NOT NULL default '', - `file` varchar(255) NOT NULL default '', - PRIMARY KEY (`id`) - ) TYPE=MyISAM - "); - $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`id`, `language`, `file`) VALUES (1, 'Deutsch', 'lng/german.lng.php');"); - $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`id`, `language`, `file`) VALUES (2, 'English', 'lng/english.lng.php');"); - $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`id`, `language`, `file`) VALUES (3, 'Francais', 'lng/french.lng.php');"); - $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`id`, `language`, `file`) VALUES (4, 'Chinese', 'lng/zh-cn.lng.php');"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.2-cvs2' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.2-cvs2'; -} - -if($settings['panel']['version'] == '1.2.2-cvs2') -{ - if($settings['panel']['standardlanguage'] == 'german') - { - $standardlanguage_new = 'Deutsch'; - } - elseif($settings['panel']['standardlanguage'] == 'french') - { - $standardlanguage_new = 'Francais'; - } - else - { - $standardlanguage_new = 'English'; - } - - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='" . $db->escape($standardlanguage_new) . "' WHERE `settinggroup`='panel' AND `varname`='standardlanguage'"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.2-cvs3' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.2-cvs3'; -} - -if($settings['panel']['version'] == '1.2.2-cvs3') -{ - $db->query(" - CREATE TABLE `" . TABLE_PANEL_CRONSCRIPT . "` ( - `id` int(11) unsigned NOT NULL auto_increment, - `file` varchar(255) NOT NULL default '', - PRIMARY KEY (`id`) - ) TYPE=MyISAM - "); - $db->query("INSERT INTO `" . TABLE_PANEL_CRONSCRIPT . "` (`id`, `file`) VALUES (1, 'cron_traffic.php');"); - $db->query("INSERT INTO `" . TABLE_PANEL_CRONSCRIPT . "` (`id`, `file`) VALUES (2, 'cron_tasks.php');"); - $settings['panel']['version'] = '1.2.2-cvs4'; - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.2-cvs4' WHERE `settinggroup`='panel' AND `varname`='version'"); -} - -if($settings['panel']['version'] == '1.2.2-cvs4') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.3' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.3'; -} - -if($settings['panel']['version'] == '1.2.3') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.3-cvs1' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.3-cvs1'; -} - -if($settings['panel']['version'] == '1.2.3-cvs1') -{ - $db->query('ALTER TABLE `' . TABLE_PANEL_DATABASES . '` ADD `description` VARCHAR( 255 ) NOT NULL'); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.3-cvs2' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.3-cvs2'; -} - -if($settings['panel']['version'] == '1.2.3-cvs2') -{ - $db->query("ALTER TABLE `" . TABLE_MAIL_USERS . "` ADD `username` VARCHAR( 128 ) NOT NULL"); - $db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `username`=`email`"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.3-cvs3' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.3-cvs3'; -} - -if($settings['panel']['version'] == '1.2.3-cvs3') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.3-cvs4' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.3-cvs4'; -} - -if($settings['panel']['version'] == '1.2.3-cvs4') -{ - $db->query("ALTER TABLE `" . TABLE_PANEL_TRAFFIC . "` ADD UNIQUE `date` ( `customerid` , `year` , `month` , `day` )"); - $db->query(" - CREATE TABLE `" . TABLE_PANEL_TRAFFIC_ADMINS . "` ( - `id` int(11) unsigned NOT NULL auto_increment, - `adminid` int(11) unsigned NOT NULL default '0', - `year` int(4) unsigned zerofill NOT NULL default '0000', - `month` int(2) unsigned zerofill NOT NULL default '00', - `day` int(2) unsigned zerofill NOT NULL default '00', - `http` bigint(30) unsigned NOT NULL default '0', - `ftp_up` bigint(30) unsigned NOT NULL default '0', - `ftp_down` bigint(30) unsigned NOT NULL default '0', - `mail` bigint(30) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `adminid` (`adminid`), - UNIQUE `date` (`adminid` , `year` , `month` , `day`) - ) TYPE=MyISAM - "); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.3-cvs5' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.3-cvs5'; -} - -if($settings['panel']['version'] == '1.2.3-cvs5') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.4' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.4'; -} - -if($settings['panel']['version'] == '1.2.4') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.4-2' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.4-2'; -} - -if($settings['panel']['version'] == '1.2.4-2') -{ - $db->query('ALTER TABLE `' . TABLE_PANEL_HTACCESS . '` ADD `error404path` VARCHAR( 255 ) NOT NULL , - ADD `error403path` VARCHAR( 255 ) NOT NULL , - ADD `error500path` VARCHAR( 255 ) NOT NULL , - ADD `error401path` VARCHAR( 255 ) NOT NULL - '); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.4-2cvs1' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.4-2cvs1'; -} - -if($settings['panel']['version'] == '1.2.4-2cvs1') -{ - $db->query('ALTER TABLE `' . TABLE_PANEL_CUSTOMERS . '` - ADD `email_accounts` INT( 15 ) NOT NULL AFTER `emails_used` , - ADD `email_accounts_used` INT( 15 ) NOT NULL AFTER `email_accounts` - '); - $db->query('ALTER TABLE `' . TABLE_PANEL_ADMINS . '` - ADD `email_accounts` INT( 15 ) NOT NULL AFTER `emails_used` , - ADD `email_accounts_used` INT( 15 ) NOT NULL AFTER `email_accounts` - '); - $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `email_accounts` = `emails` '); - $db->query('UPDATE `' . TABLE_PANEL_ADMINS . '` SET `email_accounts` = `emails` '); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.4-2cvs2' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.4-2cvs2'; -} - -if($settings['panel']['version'] == '1.2.4-2cvs2') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.5' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.5'; -} - -if($settings['panel']['version'] == '1.2.5') -{ - $db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`=ENCRYPT(`password`)"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.5-cvs1' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.5-cvs1'; -} - -if($settings['panel']['version'] == '1.2.5-cvs1') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.5-cvs2' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.5-cvs2'; -} - -if($settings['panel']['version'] == '1.2.5-cvs2') -{ - $db->query('ALTER TABLE `' . TABLE_MAIL_VIRTUAL . '` - ADD `email_full` VARCHAR( 50 ) NOT NULL AFTER `email` , - ADD `iscatchall` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `popaccountid` - '); - $db->query('UPDATE `' . TABLE_MAIL_VIRTUAL . '` SET `email_full` = `email`'); - $email_virtual_result = $db->query('SELECT `id`, `email` FROM `' . TABLE_MAIL_VIRTUAL . '`'); - - while($email_virtual_row = $db->fetch_array($email_virtual_result)) - { - if($email_virtual_row['email'] - { - 0 - } == '@') - { - $email_full = $settings['email']['catchallkeyword'] . $email_virtual_row['email']; - $db->query('UPDATE `' . TABLE_MAIL_VIRTUAL . '` SET `email_full` = "' . $db->escape($email_full) . '", `iscatchall` = "1" WHERE `id` = "' . (int)$email_virtual_row['id'] . '"'); - } - } - - $db->query(' DELETE FROM `' . TABLE_PANEL_SETTINGS . '` WHERE `settinggroup` = "email" AND `varname` = "catchallkeyword" '); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.5-cvs3' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.5-cvs3'; -} - -if($settings['panel']['version'] == '1.2.5-cvs3') -{ - $db->query('UPDATE `' . TABLE_PANEL_HTACCESS . '` SET `error404path` = "", `error403path` = "", `error401path` = "", `error500path` = "" '); - inserttask('1'); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.5-cvs4' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.5-cvs4'; -} - -if($settings['panel']['version'] == '1.2.5-cvs4') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.6' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.6'; -} - -if($settings['panel']['version'] == '1.2.6') -{ - $result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_SETTINGS . '` WHERE `settinggroup` = \'panel\' AND `varname` = \'standardlanguage\''); - $def_language = $result['value']; - $db->query('ALTER TABLE `' . TABLE_PANEL_ADMINS . '` ADD `def_language` VARCHAR( 255 ) NOT NULL AFTER `email`'); - $db->query('UPDATE `' . TABLE_PANEL_ADMINS . '` SET `def_language` = \'' . $db->escape($def_language) . '\''); - $db->query('ALTER TABLE `' . TABLE_PANEL_CUSTOMERS . '` ADD `def_language` VARCHAR( 255 ) NOT NULL AFTER `customernumber`'); - $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `def_language` = \'' . $db->escape($def_language) . '\''); - $db->query('CREATE TABLE `' . TABLE_PANEL_TEMPLATES . '` ( - `id` int(11) NOT NULL auto_increment, - `adminid` int(11) NOT NULL default \'0\', - `language` varchar(255) NOT NULL default \'\', - `templategroup` varchar(255) NOT NULL default \'\', - `varname` varchar(255) NOT NULL default \'\', - `value` longtext NOT NULL, - PRIMARY KEY (`id`), - KEY `adminid` (`adminid`) - ) TYPE=MyISAM - '); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.6-cvs1' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.6-cvs1'; -} - -if($settings['panel']['version'] == '1.2.6-cvs1') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.6-cvs2' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.6-cvs2'; -} - -if($settings['panel']['version'] == '1.2.6-cvs2') -{ - if($sql['host'] == 'localhost') - { - $mysql_access_host = 'localhost'; - } - else - { - $mysql_access_host = $serverip; - } - - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`,`varname`,`value`) VALUES ('system','mysql_access_host','" . $db->escape($mysql_access_host) . "')"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.6-cvs3' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.6-cvs3'; -} - -if($settings['panel']['version'] == '1.2.6-cvs3') -{ - $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` CHANGE `surname` `firstname` VARCHAR( 255 ) NOT NULL "); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.6-cvs4' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.6-cvs4'; -} - -if($settings['panel']['version'] == '1.2.6-cvs4') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.7' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.7'; -} - -if($settings['panel']['version'] == '1.2.7') -{ - inserttask('1'); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.7-cvs1' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.7-cvs1'; -} - -if($settings['panel']['version'] == '1.2.7-cvs1') -{ - $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` CHANGE `createstdsubdomain` `standardsubdomain` INT( 11 ) NOT NULL "); - $result = $db->query('SELECT * FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `standardsubdomain`=\'1\''); - - while($row = $db->fetch_array($result)) - { - $db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` " . "(`domain`, `customerid`, `adminid`, `documentroot`, `zonefile`, `isemaildomain`, `openbasedir`, `safemode`, `speciallogfile`, `specialsettings`) " . "VALUES ('" . $db->escape($row['loginname']) . '.' . $db->escape($settings['system']['hostname']) . "', '" . (int)$row['customerid'] . "', '" . (int)$row['adminid'] . "', '" . $db->escape($row['documentroot']) . "', '', '0', '1', '1', '0', '')"); - $domainid = $db->insert_id(); - $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'' . (int)$domainid . '\' WHERE `customerid`=\'' . (int)$row['customerid'] . '\''); - } - - inserttask('1'); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.7-cvs2' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.7-cvs2'; -} - -if($settings['panel']['version'] == '1.2.7-cvs2') -{ - $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `isbinddomain` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `documentroot`"); - $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `subcanemaildomain` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `iswildcarddomain`"); - $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `caneditdomain` TINYINT( 1 ) NOT NULL DEFAULT '1' AFTER `subcanemaildomain`"); - $db->query('UPDATE `' . TABLE_PANEL_DOMAINS . '` SET `isbinddomain`=\'1\' WHERE `isemaildomain`=\'1\''); - $standardsubdomainids = Array(); - $result = $db->query('SELECT * FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `standardsubdomain`<>\'0\''); - - while($row = $db->fetch_array($result)) - { - $standardsubdomainids[] = "'" . (int)$row['standardsubdomain'] . "'"; - } - - $standardsubdomainids = implode(',', $standardsubdomainids); - - if($standardsubdomainids != '') - { - $db->query('UPDATE `' . TABLE_PANEL_DOMAINS . '` SET `caneditdomain`=\'0\' WHERE `id` IN(' . $standardsubdomainids . ')'); - } - - inserttask('1'); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.7-cvs3' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.7-cvs3'; -} - -if($settings['panel']['version'] == '1.2.7-cvs3') -{ - $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Catalan', 'lng/catalan.lng.php');"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.7-cvs4' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.7-cvs4'; -} - -if($settings['panel']['version'] == '1.2.7-cvs4') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.8' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.8'; -} - -if($settings['panel']['version'] == '1.2.8' - || $settings['panel']['version'] == '1.2.8-cvs1') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.9' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.9'; -} - -if($settings['panel']['version'] == '1.2.9') -{ - $db->query("UPDATE `" . TABLE_PANEL_LANGUAGE . "` SET `language`='Français' WHERE `language`='Francais'"); - $db->query("UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET `language`='Français' WHERE `language`='Francais'"); - $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Español', 'lng/spanish.lng.php');"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.9-cvs1' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.9-cvs1'; -} - -if($settings['panel']['version'] == '1.2.9-cvs1') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.10' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.10'; -} - -if($settings['panel']['version'] == '1.2.10') -{ - $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Português', 'lng/portugues.lng.php');"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.10-cvs1' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.10-cvs1'; -} - -if($settings['panel']['version'] == '1.2.10-cvs1') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.11' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.11'; -} - -if($settings['panel']['version'] == '1.2.11') -{ - $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `aliasdomain` INT( 11 ) UNSIGNED NULL AFTER `customerid`"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.11-cvs1' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.11-cvs1'; -} - -if($settings['panel']['version'] == '1.2.11-cvs1') -{ - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settingid` = \'\' , `settinggroup` = \'panel\', `varname` = \'pathedit\', `value` = \'Manual\''); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.11-cvs2' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.11-cvs2'; -} - -if($settings['panel']['version'] == '1.2.11-cvs2') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.11-cvs3' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.11-cvs3'; -} - -if($settings['panel']['version'] == '1.2.11-cvs3') -{ - $db->query('ALTER TABLE `' . TABLE_MAIL_USERS . '` CHANGE `email` `email` VARCHAR( 255 ) NOT NULL , CHANGE `username` `username` VARCHAR( 255 ) NOT NULL , CHANGE `homedir` `homedir` VARCHAR( 255 ) NOT NULL , CHANGE `maildir` `maildir` VARCHAR( 255 ) NOT NULL '); - $db->query('ALTER TABLE `' . TABLE_MAIL_VIRTUAL . '` CHANGE `email` `email` VARCHAR( 255 ) NOT NULL , CHANGE `email_full` `email_full` VARCHAR( 255 ) NOT NULL '); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.11-cvs4' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.11-cvs4'; -} - -if($settings['panel']['version'] == '1.2.11-cvs4') -{ - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.12' WHERE `settinggroup`='panel' AND `varname`='version'"); - $settings['panel']['version'] = '1.2.12'; -} - -if($settings['panel']['version'] == '1.2.12') -{ - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'apacheconf_filename\', `value` = \'vhosts.conf\' '); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'lastcronrun\', `value` = \'\' '); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'panel\', `varname` = \'paging\', `value` = \'20\' '); - $db->query('UPDATE `' . TABLE_PANEL_SETTINGS . '` SET `value` = \'1.2.12-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''); - $settings['panel']['version'] = '1.2.12-svn1'; -} - -if($settings['panel']['version'] == '1.2.12-svn1') -{ - $db->query('ALTER TABLE `' . TABLE_PANEL_DOMAINS . '` ADD `ipandport` int(11) unsigned NOT NULL default \'1\' AFTER `documentroot`'); - $db->query('CREATE TABLE `' . TABLE_PANEL_IPSANDPORTS . '` ( - `id` int(11) unsigned NOT NULL auto_increment, - `ip` varchar(15) NOT NULL default \'\', - `port` int(5) NOT NULL default \'80\', - `default` int(1) NOT NULL default \'0\', - PRIMARY KEY (`id`) - ) TYPE=MyISAM'); - $db->query('INSERT INTO `' . TABLE_PANEL_IPSANDPORTS . '` (`ip`, `port`, `default`) VALUES (\'' . $settings['system']['ipaddress'] . '\', \'80\', \'1\')'); - $db->query('UPDATE `' . TABLE_PANEL_SETTINGS . '` SET `value` = \'1.2.12-svn2\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''); - $settings['panel']['version'] = '1.2.12-svn2'; -} - -if($settings['panel']['version'] == '1.2.12-svn2') -{ - $db->query('UPDATE `' . TABLE_PANEL_SETTINGS . '` SET `value` = \'1.2.13-rc1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''); - $settings['panel']['version'] = '1.2.13-rc1'; -} - -if($settings['panel']['version'] == '1.2.13-rc1') -{ - $db->query('UPDATE `' . TABLE_PANEL_SETTINGS . '` SET `value` = \'1.2.13-rc2\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''); - $settings['panel']['version'] = '1.2.13-rc2'; -} - -if($settings['panel']['version'] == '1.2.13-rc2') -{ - $db->query('UPDATE `' . TABLE_PANEL_SETTINGS . '` SET `value` = \'1.2.13-rc3\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''); - $settings['panel']['version'] = '1.2.13-rc3'; -} - -if($settings['panel']['version'] == '1.2.13-rc3') -{ - // update lastcronrun to current date - - $query = 'UPDATE `%s` SET `value` = UNIX_TIMESTAMP() WHERE `settinggroup` = \'system\' AND `varname` = \'lastcronrun\' '; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.13-rc4\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.13-rc4'; -} - -if($settings['panel']['version'] == '1.2.13-rc4') -{ - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.13\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.13'; -} - -if($settings['panel']['version'] == '1.2.13') -{ - //get highest accountnumber - - $query = 'SELECT `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `loginname` LIKE \'' . $db->escape($settings['customer']['accountprefix']) . '%\';'; - $result = $db->query($query); - $lastaccountnumber = 0; - - while($row = $db->fetch_array($result)) - { - $tmpnumber = intval(substr($row['loginname'], strlen($settings['customer']['accountprefix']))); - - if($tmpnumber > $lastaccountnumber) - { - $lastaccountnumber = $tmpnumber; - } - } - - //update the lastaccountnumber to refer to the highest account availible + 1 - - $query = 'UPDATE `%s` SET `value` = \'' . (int)$lastaccountnumber . '\' WHERE `settinggroup` = \'system\' AND `varname` = \'lastaccountnumber\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['system']['lastaccountnumber'] = $lastaccountnumber; - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.13-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.13-svn1'; -} - -if($settings['panel']['version'] == '1.2.13-svn1') -{ - $query = 'ALTER TABLE `%s` ADD `openbasedir_path` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `openbasedir` '; - $query = sprintf($query, TABLE_PANEL_DOMAINS); - $db->query($query); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.13-svn2\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.13-svn2'; -} - -if($settings['panel']['version'] == '1.2.13-svn2') -{ - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.13-svn3\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.13-svn3'; -} - -if($settings['panel']['version'] == '1.2.13-svn3') -{ - $result = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_IPSANDPORTS . '` WHERE `default` = \'1\' '); - $defaultip = $result['id']; - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'defaultip\', `value` = \'' . (int)$defaultip . '\' '); - $db->query('ALTER TABLE `' . TABLE_PANEL_IPSANDPORTS . '` DROP `default` '); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.13-svn4\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.13-svn4'; -} - -if($settings['panel']['version'] == '1.2.13-svn4') -{ - $db->query('ALTER TABLE `' . TABLE_PANEL_SESSIONS . '` ADD `lastpaging` VARCHAR( 255 ) NOT NULL AFTER `lastactivity` '); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.13-svn5\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.13-svn5'; -} - -if($settings['panel']['version'] == '1.2.13-svn5') -{ - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.14-rc1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.14-rc1'; -} - -if($settings['panel']['version'] == '1.2.14-rc1') -{ - $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Russian', 'lng/russian.lng.php');"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.14-rc1-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.14-rc1-svn1'; -} - -if($settings['panel']['version'] == '1.2.14-rc1-svn1') -{ - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.14-rc2\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.14-rc2'; -} - -if($settings['panel']['version'] == '1.2.14-rc2') -{ - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.14-rc3\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.14-rc3'; -} - -if($settings['panel']['version'] == '1.2.14-rc3') -{ - $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Danish', 'lng/danish.lng.php');"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.14-rc3-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.14-rc3-svn1'; -} - -if($settings['panel']['version'] == '1.2.14-rc3-svn1') -{ - $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` CHANGE `diskspace` `diskspace` BIGINT( 30 ) NOT NULL DEFAULT '0';"); - $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` CHANGE `diskspace_used` `diskspace_used` BIGINT( 30 ) NOT NULL DEFAULT '0';"); - $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` CHANGE `traffic` `traffic` BIGINT( 30 ) NOT NULL DEFAULT '0';"); - $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` CHANGE `traffic_used` `traffic_used` BIGINT( 30 ) NOT NULL DEFAULT '0';"); - $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` CHANGE `diskspace` `diskspace` BIGINT( 30 ) NOT NULL DEFAULT '0';"); - $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` CHANGE `diskspace_used` `diskspace_used` BIGINT( 30 ) NOT NULL DEFAULT '0';"); - $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` CHANGE `traffic` `traffic` BIGINT( 30 ) NOT NULL DEFAULT '0';"); - $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` CHANGE `traffic_used` `traffic_used` BIGINT( 30 ) NOT NULL DEFAULT '0';"); - $query = 'SELECT * FROM `' . TABLE_PANEL_LANGUAGE . '` WHERE `language` = \'Russian\';'; - $result = $db->query($query); - - if($db->num_rows($result) == 0) - { - $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Russian', 'lng/russian.lng.php');"); - } - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.14-rc3-svn2\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.14-rc3-svn2'; -} - -if($settings['panel']['version'] == '1.2.14-rc3-svn2') -{ - $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Italian', 'lng/italian.lng.php');"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.14-rc3-svn3\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.14-rc3-svn3'; -} - -if($settings['panel']['version'] == '1.2.14-rc3-svn3') -{ - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.14-rc4\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.14-rc4'; -} - -if($settings['panel']['version'] == '1.2.14-rc4') -{ - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.14\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.14'; -} - -if($settings['panel']['version'] == '1.2.14') -{ - // insert apacheversion (guess) - - if(strtoupper(@php_sapi_name()) == "APACHE2HANDLER") - { - $apacheversion = 'apache2'; - } - else - { - $apacheversion = 'apache1'; - } - - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'apacheversion\', `value` = \'' . $apacheversion . '\' '); - $settings['system']['apacheversion'] = $apacheversion; - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.14-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.14-svn1'; -} - -if($settings['panel']['version'] == '1.2.14-svn1') -{ - $tables = getTables($db); - - if(isset($tables[TABLE_PANEL_CUSTOMERS]) - && is_array($tables[TABLE_PANEL_CUSTOMERS]) - && isset($tables[TABLE_PANEL_CUSTOMERS]['loginname'])) - { - $db->query('ALTER TABLE `' . TABLE_PANEL_CUSTOMERS . '` DROP INDEX `loginname` '); - } - - $db->query('ALTER TABLE `' . TABLE_PANEL_ADMINS . '` ADD UNIQUE ( `loginname` )'); - $db->query('ALTER TABLE `' . TABLE_PANEL_CUSTOMERS . '` ADD UNIQUE ( `loginname` )'); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.14-svn2\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.14-svn2'; -} - -if($settings['panel']['version'] == '1.2.14-svn2') -{ - $db->query('ALTER TABLE `' . TABLE_MAIL_VIRTUAL . '` ADD INDEX ( `email` ) '); - $db->query('ALTER TABLE `' . TABLE_PANEL_DOMAINS . '` ADD INDEX ( `domain` ) '); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.14-svn3\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.14-svn3'; -} - -if($settings['panel']['version'] == '1.2.14-svn3') -{ - $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Bulgarian', 'lng/bulgarian.lng.php');"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.14-svn4\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.14-svn4'; -} - -if($settings['panel']['version'] == '1.2.14-svn4') -{ - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'phpappendopenbasedir\', `value` = \'/tmp/\' '); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.14-svn5\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.14-svn5'; -} - -if($settings['panel']['version'] == '1.2.14-svn5') -{ - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.15\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.15'; -} - -if($settings['panel']['version'] == '1.2.15') -{ - $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Slovak', 'lng/slovak.lng.php');"); - $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Dutch', 'lng/dutch.lng.php');"); - $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Hungarian', 'lng/hungarian.lng.php');"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.15-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.15-svn1'; -} - -if($settings['panel']['version'] == '1.2.15-svn1') -{ - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.16\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.16'; -} - -if($settings['panel']['version'] == '1.2.16') -{ - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'panel\', `varname` = \'natsorting\', `value` = \'1\' '); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.16-svn1'; -} - -if($settings['panel']['version'] == '1.2.16-svn1') -{ - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'deactivateddocroot\', `value` = \'\' '); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn2\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.16-svn2'; -} - -if($settings['panel']['version'] == '1.2.16-svn2') -{ - $tables = getTables($db); - - if(isset($tables[TABLE_PANEL_CRONSCRIPT]) - && is_array($tables[TABLE_PANEL_CRONSCRIPT])) - { - $deletecronscriptstable = true; - $cronscripts_result = $db->query('SELECT * FROM `' . TABLE_PANEL_CRONSCRIPT . '`'); - - while($cronscripts_row = $db->fetch_array($cronscripts_result)) - { - if($cronscripts_row['file'] != 'cron_tasks.php' - && $cronscripts_row['file'] != 'cron_traffic.php') - { - $deletecronscriptstable = false; - } - } - - if($deletecronscriptstable === true) - { - $db->query('DROP TABLE IF EXISTS `' . TABLE_PANEL_CRONSCRIPT . '` '); - } - else - { - $db->query('DELETE FROM `' . TABLE_PANEL_CRONSCRIPT . '` WHERE `file` IN( "cron_tasks.php", "cron_traffic.php" ) '); - } - } - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn3\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.16-svn3'; -} - -if($settings['panel']['version'] == '1.2.16-svn3') -{ - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn4\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.16-svn4'; -} - -if($settings['panel']['version'] == '1.2.16-svn4') -{ - $tables = getTables($db); - $db->query('ALTER TABLE `' . TABLE_PANEL_TRAFFIC . '` ADD `stamp` INT( 11 ) unsigned NOT NULL DEFAULT \'0\' AFTER `day` '); - - if(isset($tables[TABLE_PANEL_TRAFFIC]) - && is_array($tables[TABLE_PANEL_TRAFFIC]) - && isset($tables[TABLE_PANEL_TRAFFIC]['date'])) - { - $db->query('ALTER TABLE `' . TABLE_PANEL_TRAFFIC . '` DROP INDEX `date` '); - } - - $tables = getTables($db); - $db->query('ALTER TABLE `' . TABLE_PANEL_TRAFFIC_ADMINS . '` ADD `stamp` INT( 11 ) unsigned NOT NULL DEFAULT \'0\' AFTER `day` '); - - if(isset($tables[TABLE_PANEL_TRAFFIC_ADMINS]) - && is_array($tables[TABLE_PANEL_TRAFFIC_ADMINS]) - && isset($tables[TABLE_PANEL_TRAFFIC_ADMINS]['date'])) - { - $db->query('ALTER TABLE `' . TABLE_PANEL_TRAFFIC_ADMINS . '` DROP INDEX `date` '); - } - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn5\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.16-svn5'; -} - -if($settings['panel']['version'] == '1.2.16-svn5') -{ - $db->query('ALTER TABLE `' . TABLE_PANEL_CUSTOMERS . '` ADD `reportsent` TINYINT( 4 ) unsigned NOT NULL DEFAULT \'0\' AFTER `loginfail_count` '); - $db->query('ALTER TABLE `' . TABLE_PANEL_ADMINS . '` ADD `reportsent` TINYINT( 4 ) unsigned NOT NULL DEFAULT \'0\' AFTER `loginfail_count` '); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'last_traffic_report_run\', `value` = \'\' '); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn6\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.16-svn6'; -} - -if($settings['panel']['version'] == '1.2.16-svn6') -{ - $db->query('ALTER TABLE `' . TABLE_PANEL_IPSANDPORTS . '` ADD `vhostcontainer` TINYINT( 1 ) NOT NULL DEFAULT \'0\', ADD `specialsettings` TEXT NOT NULL '); - $db->query('UPDATE `' . TABLE_PANEL_IPSANDPORTS . '` SET `vhostcontainer` = \'1\' '); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn7\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.16-svn7'; -} - -if($settings['panel']['version'] == '1.2.16-svn7') -{ - $db->query("ALTER TABLE `" . TABLE_PANEL_SESSIONS . "` CHANGE `ipaddress` `ipaddress` VARCHAR( 255 ) NOT NULL"); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'mailpwcleartext\', `value` = \'1\' '); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn8\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.16-svn8'; -} - -if($settings['panel']['version'] == '1.2.16-svn8') -{ - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'last_tasks_run\', `value` = \'0\' '); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn9\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.16-svn9'; -} - -if($settings['panel']['version'] == '1.2.16-svn9') -{ - $db->query("ALTER TABLE `" . TABLE_FTP_USERS . "` CHANGE `username` `username` VARCHAR( 255 ) NOT NULL"); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'customer\', `varname` = \'ftpatdomain\', `value` = \'0\' '); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn10\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.16-svn10'; -} - -if($settings['panel']['version'] == '1.2.16-svn10') -{ - $db->query('ALTER TABLE `' . TABLE_PANEL_DOMAINS . '` ADD `bindserial` VARCHAR( 10 ) NOT NULL DEFAULT \'2000010100\''); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'system\', \'nameservers\', \'\')'); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'system\', \'mxservers\', \'\')'); - $db->query('DELETE FROM `' . TABLE_PANEL_SETTINGS . '` WHERE `settinggroup`=\'system\' AND `varname`=\'binddefaultzone\''); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn11\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.16-svn11'; -} - -if($settings['panel']['version'] == '1.2.16-svn11') -{ - $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `phpenabled` TINYINT( 1 ) unsigned NOT NULL DEFAULT '1' AFTER `deactivated`"); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'mod_log_sql\', `value` = \'0\' '); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'mod_fcgid\', `value` = \'0\' '); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn12\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.16-svn12'; -} - -if($settings['panel']['version'] == '1.2.16-svn12') -{ - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'panel\', `varname` = \'sendalternativemail\', `value` = \'0\' '); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn13\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.16-svn13'; -} - -if($settings['panel']['version'] == '1.2.16-svn13') -{ - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'apacheconf_vhost\', `value` = \'' . makeCorrectFile($settings['system']['apacheconf_directory'] . '/' . $settings['system']['apacheconf_filename']) . '\' '); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'apacheconf_diroptions\', `value` = \'' . makeCorrectFile($settings['system']['apacheconf_directory'] . '/diroptions.conf') . '\' '); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'apacheconf_htpasswddir\', `value` = \'' . makeCorrectDir($settings['system']['apacheconf_directory'] . '/htpasswd/') . '\' '); - $db->query('DELETE FROM `' . TABLE_PANEL_SETTINGS . '` WHERE `settinggroup` = \'system\' AND `varname` = \'apacheconf_directory\' '); - $db->query('DELETE FROM `' . TABLE_PANEL_SETTINGS . '` WHERE `settinggroup` = \'system\' AND `varname` = \'apacheconf_filename\' '); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn14\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.16-svn14'; -} - -if($settings['panel']['version'] == '1.2.16-svn14') -{ - $db->query('ALTER TABLE `' . TABLE_PANEL_SESSIONS . '` ADD `formtoken` CHAR( 32 ) NOT NULL AFTER `lastpaging` '); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn15\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.16-svn15'; -} - -if($settings['panel']['version'] == '1.2.16-svn15') -{ - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.17\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.17'; -} - -if($settings['panel']['version'] == '1.2.17') -{ - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.18\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.18'; -} - -if($settings['panel']['version'] == '1.2.18') -{ - $db->query('ALTER TABLE `' . TABLE_PANEL_IPSANDPORTS . '` ADD `listen_statement` TINYINT( 1 ) NOT NULL DEFAULT \'0\', ADD `namevirtualhost_statement` TINYINT( 1 ) NOT NULL DEFAULT \'0\', ADD `vhostcontainer_servername_statement` TINYINT( 1 ) NOT NULL DEFAULT \'0\' '); - $db->query('UPDATE `' . TABLE_PANEL_IPSANDPORTS . '` SET `listen_statement` = 0, `namevirtualhost_statement` = 1, `vhostcontainer_servername_statement` = 1 '); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.18-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.18-svn1'; -} - -if($settings['panel']['version'] == '1.2.18-svn1') -{ - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'webalizer_quiet\', `value` = \'2\' '); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.18-svn2\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.18-svn2'; -} - -if($settings['panel']['version'] == '1.2.18-svn2') -{ - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'ticket\', `varname` = \'noreply_email\', `value` = \'NO-REPLY@SERVERNAME\' '); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'ticket\', `varname` = \'admin_email\', `value` = \'admin@SERVERNAME\' '); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'ticket\', `varname` = \'worktime_all\', `value` = \'1\' '); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'ticket\', `varname` = \'worktime_begin\', `value` = \'00:00\' '); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'ticket\', `varname` = \'worktime_end\', `value` = \'23:59\' '); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'ticket\', `varname` = \'worktime_sat\', `value` = \'0\' '); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'ticket\', `varname` = \'worktime_sun\', `value` = \'0\' '); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'ticket\', `varname` = \'archiving_days\', `value` = \'5\' '); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'ticket\', `varname` = \'last_archive_run\', `value` = \'0\' '); - $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `tickets` INT( 15 ) NOT NULL DEFAULT '0' AFTER `ftps_used`"); - $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `tickets_used` INT( 15 ) NOT NULL DEFAULT '0' AFTER `tickets`"); - $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` ADD `tickets` INT( 15 ) NOT NULL DEFAULT '-1' AFTER `ftps_used`"); - $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` ADD `tickets_used` INT( 15 ) NOT NULL DEFAULT '0' AFTER `tickets`"); - $db->query("CREATE TABLE `" . TABLE_PANEL_TICKETS . "` ( - `id` int(11) unsigned NOT NULL auto_increment, - `customerid` int(11) NOT NULL, - `category` smallint(5) unsigned NOT NULL default '1', - `priority` enum('1','2','3') NOT NULL default '3', - `subject` varchar(70) NOT NULL, - `message` text NOT NULL, - `dt` int(15) NOT NULL, - `lastchange` int(15) NOT NULL, - `ip` varchar(20) NOT NULL, - `status` enum('0','1','2','3') NOT NULL default '1', - `lastreplier` enum('0','1') NOT NULL default '0', - `answerto` int(11) unsigned NOT NULL, - `by` enum('0','1') NOT NULL default '0', - `archived` enum('0','1') NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `customerid` (`customerid`)) ENGINE=MyISAM;"); - $db->query("CREATE TABLE `" . TABLE_PANEL_TICKET_CATS . "` ( - `id` smallint(5) unsigned NOT NULL auto_increment, - `name` varchar(60) NOT NULL, - PRIMARY KEY (`id`)) ENGINE=MyISAM;"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.18-svn3\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.18-svn3'; -} - -if($settings['panel']['version'] == '1.2.18-svn3') -{ - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'ticket\', \'enabled\', \'1\');'); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'ticket\', \'concurrently_open\', \'5\');'); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.18-svn4\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.18-svn4'; -} - -if($settings['panel']['version'] == '1.2.18-svn4') -{ - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'ticket\', \'noreply_name\', \'SysCP Support\')'); - $db->query('DELETE FROM `' . TABLE_PANEL_SETTINGS . '` WHERE `settinggroup` = \'ticket\' AND `varname`=\'admin_email\''); - $db->query('ALTER TABLE `' . TABLE_PANEL_TICKETS . '` ADD `adminid` INT( 11 ) NOT NULL DEFAULT \'1\' AFTER `customerid` '); - $db->query('ALTER TABLE `' . TABLE_PANEL_TICKET_CATS . '` ADD `adminid` INT( 11 ) NOT NULL DEFAULT \'1\' AFTER `name` '); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.18-svn5\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.18-svn5'; -} - -if($settings['panel']['version'] == '1.2.18-svn5') -{ - $db->query('UPDATE `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\' WHERE `settinggroup` = \'ticket\' AND `varname` = \'last_archive_run\''); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19'; -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Install + * @version $Id$ + */ + +if($settings['panel']['version'] == '1.2-beta1' + || $settings['panel']['version'] == '1.2-rc1') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.0' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.0'; +} + +if($settings['panel']['version'] == '1.2.0') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.1' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.1'; +} + +if($settings['panel']['version'] == '1.2.1') +{ + $db->query("ALTER TABLE `" . TABLE_PANEL_SESSIONS . "` CHANGE `useragent` `useragent` VARCHAR( 255 ) NOT NULL"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.2' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.2'; +} + +if($settings['panel']['version'] == '1.2.2') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.2-cvs1' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.2-cvs1'; +} + +if($settings['panel']['version'] == '1.2.2-cvs1') +{ + $db->query(" + CREATE TABLE `" . TABLE_PANEL_LANGUAGE . "` ( + `id` int(11) unsigned NOT NULL auto_increment, + `language` varchar(30) NOT NULL default '', + `file` varchar(255) NOT NULL default '', + PRIMARY KEY (`id`) + ) TYPE=MyISAM + "); + $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`id`, `language`, `file`) VALUES (1, 'Deutsch', 'lng/german.lng.php');"); + $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`id`, `language`, `file`) VALUES (2, 'English', 'lng/english.lng.php');"); + $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`id`, `language`, `file`) VALUES (3, 'Francais', 'lng/french.lng.php');"); + $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`id`, `language`, `file`) VALUES (4, 'Chinese', 'lng/zh-cn.lng.php');"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.2-cvs2' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.2-cvs2'; +} + +if($settings['panel']['version'] == '1.2.2-cvs2') +{ + if($settings['panel']['standardlanguage'] == 'german') + { + $standardlanguage_new = 'Deutsch'; + } + elseif($settings['panel']['standardlanguage'] == 'french') + { + $standardlanguage_new = 'Francais'; + } + else + { + $standardlanguage_new = 'English'; + } + + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='" . $db->escape($standardlanguage_new) . "' WHERE `settinggroup`='panel' AND `varname`='standardlanguage'"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.2-cvs3' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.2-cvs3'; +} + +if($settings['panel']['version'] == '1.2.2-cvs3') +{ + $db->query(" + CREATE TABLE `" . TABLE_PANEL_CRONSCRIPT . "` ( + `id` int(11) unsigned NOT NULL auto_increment, + `file` varchar(255) NOT NULL default '', + PRIMARY KEY (`id`) + ) TYPE=MyISAM + "); + $db->query("INSERT INTO `" . TABLE_PANEL_CRONSCRIPT . "` (`id`, `file`) VALUES (1, 'cron_traffic.php');"); + $db->query("INSERT INTO `" . TABLE_PANEL_CRONSCRIPT . "` (`id`, `file`) VALUES (2, 'cron_tasks.php');"); + $settings['panel']['version'] = '1.2.2-cvs4'; + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.2-cvs4' WHERE `settinggroup`='panel' AND `varname`='version'"); +} + +if($settings['panel']['version'] == '1.2.2-cvs4') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.3' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.3'; +} + +if($settings['panel']['version'] == '1.2.3') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.3-cvs1' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.3-cvs1'; +} + +if($settings['panel']['version'] == '1.2.3-cvs1') +{ + $db->query('ALTER TABLE `' . TABLE_PANEL_DATABASES . '` ADD `description` VARCHAR( 255 ) NOT NULL'); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.3-cvs2' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.3-cvs2'; +} + +if($settings['panel']['version'] == '1.2.3-cvs2') +{ + $db->query("ALTER TABLE `" . TABLE_MAIL_USERS . "` ADD `username` VARCHAR( 128 ) NOT NULL"); + $db->query("UPDATE `" . TABLE_MAIL_USERS . "` SET `username`=`email`"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.3-cvs3' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.3-cvs3'; +} + +if($settings['panel']['version'] == '1.2.3-cvs3') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.3-cvs4' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.3-cvs4'; +} + +if($settings['panel']['version'] == '1.2.3-cvs4') +{ + $db->query("ALTER TABLE `" . TABLE_PANEL_TRAFFIC . "` ADD UNIQUE `date` ( `customerid` , `year` , `month` , `day` )"); + $db->query(" + CREATE TABLE `" . TABLE_PANEL_TRAFFIC_ADMINS . "` ( + `id` int(11) unsigned NOT NULL auto_increment, + `adminid` int(11) unsigned NOT NULL default '0', + `year` int(4) unsigned zerofill NOT NULL default '0000', + `month` int(2) unsigned zerofill NOT NULL default '00', + `day` int(2) unsigned zerofill NOT NULL default '00', + `http` bigint(30) unsigned NOT NULL default '0', + `ftp_up` bigint(30) unsigned NOT NULL default '0', + `ftp_down` bigint(30) unsigned NOT NULL default '0', + `mail` bigint(30) unsigned NOT NULL default '0', + PRIMARY KEY (`id`), + KEY `adminid` (`adminid`), + UNIQUE `date` (`adminid` , `year` , `month` , `day`) + ) TYPE=MyISAM + "); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.3-cvs5' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.3-cvs5'; +} + +if($settings['panel']['version'] == '1.2.3-cvs5') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.4' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.4'; +} + +if($settings['panel']['version'] == '1.2.4') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.4-2' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.4-2'; +} + +if($settings['panel']['version'] == '1.2.4-2') +{ + $db->query('ALTER TABLE `' . TABLE_PANEL_HTACCESS . '` ADD `error404path` VARCHAR( 255 ) NOT NULL , + ADD `error403path` VARCHAR( 255 ) NOT NULL , + ADD `error500path` VARCHAR( 255 ) NOT NULL , + ADD `error401path` VARCHAR( 255 ) NOT NULL + '); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.4-2cvs1' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.4-2cvs1'; +} + +if($settings['panel']['version'] == '1.2.4-2cvs1') +{ + $db->query('ALTER TABLE `' . TABLE_PANEL_CUSTOMERS . '` + ADD `email_accounts` INT( 15 ) NOT NULL AFTER `emails_used` , + ADD `email_accounts_used` INT( 15 ) NOT NULL AFTER `email_accounts` + '); + $db->query('ALTER TABLE `' . TABLE_PANEL_ADMINS . '` + ADD `email_accounts` INT( 15 ) NOT NULL AFTER `emails_used` , + ADD `email_accounts_used` INT( 15 ) NOT NULL AFTER `email_accounts` + '); + $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `email_accounts` = `emails` '); + $db->query('UPDATE `' . TABLE_PANEL_ADMINS . '` SET `email_accounts` = `emails` '); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.4-2cvs2' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.4-2cvs2'; +} + +if($settings['panel']['version'] == '1.2.4-2cvs2') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.5' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.5'; +} + +if($settings['panel']['version'] == '1.2.5') +{ + $db->query("UPDATE `" . TABLE_FTP_USERS . "` SET `password`=ENCRYPT(`password`)"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.5-cvs1' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.5-cvs1'; +} + +if($settings['panel']['version'] == '1.2.5-cvs1') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.5-cvs2' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.5-cvs2'; +} + +if($settings['panel']['version'] == '1.2.5-cvs2') +{ + $db->query('ALTER TABLE `' . TABLE_MAIL_VIRTUAL . '` + ADD `email_full` VARCHAR( 50 ) NOT NULL AFTER `email` , + ADD `iscatchall` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `popaccountid` + '); + $db->query('UPDATE `' . TABLE_MAIL_VIRTUAL . '` SET `email_full` = `email`'); + $email_virtual_result = $db->query('SELECT `id`, `email` FROM `' . TABLE_MAIL_VIRTUAL . '`'); + + while($email_virtual_row = $db->fetch_array($email_virtual_result)) + { + if($email_virtual_row['email'] + { + 0 + } == '@') + { + $email_full = $settings['email']['catchallkeyword'] . $email_virtual_row['email']; + $db->query('UPDATE `' . TABLE_MAIL_VIRTUAL . '` SET `email_full` = "' . $db->escape($email_full) . '", `iscatchall` = "1" WHERE `id` = "' . (int)$email_virtual_row['id'] . '"'); + } + } + + $db->query(' DELETE FROM `' . TABLE_PANEL_SETTINGS . '` WHERE `settinggroup` = "email" AND `varname` = "catchallkeyword" '); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.5-cvs3' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.5-cvs3'; +} + +if($settings['panel']['version'] == '1.2.5-cvs3') +{ + $db->query('UPDATE `' . TABLE_PANEL_HTACCESS . '` SET `error404path` = "", `error403path` = "", `error401path` = "", `error500path` = "" '); + inserttask('1'); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.5-cvs4' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.5-cvs4'; +} + +if($settings['panel']['version'] == '1.2.5-cvs4') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.6' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.6'; +} + +if($settings['panel']['version'] == '1.2.6') +{ + $result = $db->query_first('SELECT `value` FROM `' . TABLE_PANEL_SETTINGS . '` WHERE `settinggroup` = \'panel\' AND `varname` = \'standardlanguage\''); + $def_language = $result['value']; + $db->query('ALTER TABLE `' . TABLE_PANEL_ADMINS . '` ADD `def_language` VARCHAR( 255 ) NOT NULL AFTER `email`'); + $db->query('UPDATE `' . TABLE_PANEL_ADMINS . '` SET `def_language` = \'' . $db->escape($def_language) . '\''); + $db->query('ALTER TABLE `' . TABLE_PANEL_CUSTOMERS . '` ADD `def_language` VARCHAR( 255 ) NOT NULL AFTER `customernumber`'); + $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `def_language` = \'' . $db->escape($def_language) . '\''); + $db->query('CREATE TABLE `' . TABLE_PANEL_TEMPLATES . '` ( + `id` int(11) NOT NULL auto_increment, + `adminid` int(11) NOT NULL default \'0\', + `language` varchar(255) NOT NULL default \'\', + `templategroup` varchar(255) NOT NULL default \'\', + `varname` varchar(255) NOT NULL default \'\', + `value` longtext NOT NULL, + PRIMARY KEY (`id`), + KEY `adminid` (`adminid`) + ) TYPE=MyISAM + '); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.6-cvs1' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.6-cvs1'; +} + +if($settings['panel']['version'] == '1.2.6-cvs1') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.6-cvs2' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.6-cvs2'; +} + +if($settings['panel']['version'] == '1.2.6-cvs2') +{ + if($sql['host'] == 'localhost') + { + $mysql_access_host = 'localhost'; + } + else + { + $mysql_access_host = $serverip; + } + + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`,`varname`,`value`) VALUES ('system','mysql_access_host','" . $db->escape($mysql_access_host) . "')"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.6-cvs3' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.6-cvs3'; +} + +if($settings['panel']['version'] == '1.2.6-cvs3') +{ + $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` CHANGE `surname` `firstname` VARCHAR( 255 ) NOT NULL "); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.6-cvs4' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.6-cvs4'; +} + +if($settings['panel']['version'] == '1.2.6-cvs4') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.7' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.7'; +} + +if($settings['panel']['version'] == '1.2.7') +{ + inserttask('1'); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.7-cvs1' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.7-cvs1'; +} + +if($settings['panel']['version'] == '1.2.7-cvs1') +{ + $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` CHANGE `createstdsubdomain` `standardsubdomain` INT( 11 ) NOT NULL "); + $result = $db->query('SELECT * FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `standardsubdomain`=\'1\''); + + while($row = $db->fetch_array($result)) + { + $db->query("INSERT INTO `" . TABLE_PANEL_DOMAINS . "` " . "(`domain`, `customerid`, `adminid`, `documentroot`, `zonefile`, `isemaildomain`, `openbasedir`, `safemode`, `speciallogfile`, `specialsettings`) " . "VALUES ('" . $db->escape($row['loginname']) . '.' . $db->escape($settings['system']['hostname']) . "', '" . (int)$row['customerid'] . "', '" . (int)$row['adminid'] . "', '" . $db->escape($row['documentroot']) . "', '', '0', '1', '1', '0', '')"); + $domainid = $db->insert_id(); + $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `standardsubdomain`=\'' . (int)$domainid . '\' WHERE `customerid`=\'' . (int)$row['customerid'] . '\''); + } + + inserttask('1'); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.7-cvs2' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.7-cvs2'; +} + +if($settings['panel']['version'] == '1.2.7-cvs2') +{ + $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `isbinddomain` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `documentroot`"); + $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `subcanemaildomain` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `iswildcarddomain`"); + $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `caneditdomain` TINYINT( 1 ) NOT NULL DEFAULT '1' AFTER `subcanemaildomain`"); + $db->query('UPDATE `' . TABLE_PANEL_DOMAINS . '` SET `isbinddomain`=\'1\' WHERE `isemaildomain`=\'1\''); + $standardsubdomainids = Array(); + $result = $db->query('SELECT * FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `standardsubdomain`<>\'0\''); + + while($row = $db->fetch_array($result)) + { + $standardsubdomainids[] = "'" . (int)$row['standardsubdomain'] . "'"; + } + + $standardsubdomainids = implode(',', $standardsubdomainids); + + if($standardsubdomainids != '') + { + $db->query('UPDATE `' . TABLE_PANEL_DOMAINS . '` SET `caneditdomain`=\'0\' WHERE `id` IN(' . $standardsubdomainids . ')'); + } + + inserttask('1'); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.7-cvs3' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.7-cvs3'; +} + +if($settings['panel']['version'] == '1.2.7-cvs3') +{ + $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Catalan', 'lng/catalan.lng.php');"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.7-cvs4' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.7-cvs4'; +} + +if($settings['panel']['version'] == '1.2.7-cvs4') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.8' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.8'; +} + +if($settings['panel']['version'] == '1.2.8' + || $settings['panel']['version'] == '1.2.8-cvs1') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.9' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.9'; +} + +if($settings['panel']['version'] == '1.2.9') +{ + $db->query("UPDATE `" . TABLE_PANEL_LANGUAGE . "` SET `language`='Français' WHERE `language`='Francais'"); + $db->query("UPDATE `" . TABLE_PANEL_TEMPLATES . "` SET `language`='Français' WHERE `language`='Francais'"); + $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Español', 'lng/spanish.lng.php');"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.9-cvs1' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.9-cvs1'; +} + +if($settings['panel']['version'] == '1.2.9-cvs1') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.10' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.10'; +} + +if($settings['panel']['version'] == '1.2.10') +{ + $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Português', 'lng/portugues.lng.php');"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.10-cvs1' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.10-cvs1'; +} + +if($settings['panel']['version'] == '1.2.10-cvs1') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.11' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.11'; +} + +if($settings['panel']['version'] == '1.2.11') +{ + $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `aliasdomain` INT( 11 ) UNSIGNED NULL AFTER `customerid`"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.11-cvs1' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.11-cvs1'; +} + +if($settings['panel']['version'] == '1.2.11-cvs1') +{ + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settingid` = \'\' , `settinggroup` = \'panel\', `varname` = \'pathedit\', `value` = \'Manual\''); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.11-cvs2' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.11-cvs2'; +} + +if($settings['panel']['version'] == '1.2.11-cvs2') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.11-cvs3' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.11-cvs3'; +} + +if($settings['panel']['version'] == '1.2.11-cvs3') +{ + $db->query('ALTER TABLE `' . TABLE_MAIL_USERS . '` CHANGE `email` `email` VARCHAR( 255 ) NOT NULL , CHANGE `username` `username` VARCHAR( 255 ) NOT NULL , CHANGE `homedir` `homedir` VARCHAR( 255 ) NOT NULL , CHANGE `maildir` `maildir` VARCHAR( 255 ) NOT NULL '); + $db->query('ALTER TABLE `' . TABLE_MAIL_VIRTUAL . '` CHANGE `email` `email` VARCHAR( 255 ) NOT NULL , CHANGE `email_full` `email_full` VARCHAR( 255 ) NOT NULL '); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.11-cvs4' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.11-cvs4'; +} + +if($settings['panel']['version'] == '1.2.11-cvs4') +{ + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value`='1.2.12' WHERE `settinggroup`='panel' AND `varname`='version'"); + $settings['panel']['version'] = '1.2.12'; +} + +if($settings['panel']['version'] == '1.2.12') +{ + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'apacheconf_filename\', `value` = \'vhosts.conf\' '); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'lastcronrun\', `value` = \'\' '); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'panel\', `varname` = \'paging\', `value` = \'20\' '); + $db->query('UPDATE `' . TABLE_PANEL_SETTINGS . '` SET `value` = \'1.2.12-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''); + $settings['panel']['version'] = '1.2.12-svn1'; +} + +if($settings['panel']['version'] == '1.2.12-svn1') +{ + $db->query('ALTER TABLE `' . TABLE_PANEL_DOMAINS . '` ADD `ipandport` int(11) unsigned NOT NULL default \'1\' AFTER `documentroot`'); + $db->query('CREATE TABLE `' . TABLE_PANEL_IPSANDPORTS . '` ( + `id` int(11) unsigned NOT NULL auto_increment, + `ip` varchar(15) NOT NULL default \'\', + `port` int(5) NOT NULL default \'80\', + `default` int(1) NOT NULL default \'0\', + PRIMARY KEY (`id`) + ) TYPE=MyISAM'); + $db->query('INSERT INTO `' . TABLE_PANEL_IPSANDPORTS . '` (`ip`, `port`, `default`) VALUES (\'' . $settings['system']['ipaddress'] . '\', \'80\', \'1\')'); + $db->query('UPDATE `' . TABLE_PANEL_SETTINGS . '` SET `value` = \'1.2.12-svn2\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''); + $settings['panel']['version'] = '1.2.12-svn2'; +} + +if($settings['panel']['version'] == '1.2.12-svn2') +{ + $db->query('UPDATE `' . TABLE_PANEL_SETTINGS . '` SET `value` = \'1.2.13-rc1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''); + $settings['panel']['version'] = '1.2.13-rc1'; +} + +if($settings['panel']['version'] == '1.2.13-rc1') +{ + $db->query('UPDATE `' . TABLE_PANEL_SETTINGS . '` SET `value` = \'1.2.13-rc2\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''); + $settings['panel']['version'] = '1.2.13-rc2'; +} + +if($settings['panel']['version'] == '1.2.13-rc2') +{ + $db->query('UPDATE `' . TABLE_PANEL_SETTINGS . '` SET `value` = \'1.2.13-rc3\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''); + $settings['panel']['version'] = '1.2.13-rc3'; +} + +if($settings['panel']['version'] == '1.2.13-rc3') +{ + // update lastcronrun to current date + + $query = 'UPDATE `%s` SET `value` = UNIX_TIMESTAMP() WHERE `settinggroup` = \'system\' AND `varname` = \'lastcronrun\' '; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.13-rc4\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.13-rc4'; +} + +if($settings['panel']['version'] == '1.2.13-rc4') +{ + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.13\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.13'; +} + +if($settings['panel']['version'] == '1.2.13') +{ + //get highest accountnumber + + $query = 'SELECT `loginname` FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `loginname` LIKE \'' . $db->escape($settings['customer']['accountprefix']) . '%\';'; + $result = $db->query($query); + $lastaccountnumber = 0; + + while($row = $db->fetch_array($result)) + { + $tmpnumber = intval(substr($row['loginname'], strlen($settings['customer']['accountprefix']))); + + if($tmpnumber > $lastaccountnumber) + { + $lastaccountnumber = $tmpnumber; + } + } + + //update the lastaccountnumber to refer to the highest account availible + 1 + + $query = 'UPDATE `%s` SET `value` = \'' . (int)$lastaccountnumber . '\' WHERE `settinggroup` = \'system\' AND `varname` = \'lastaccountnumber\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['system']['lastaccountnumber'] = $lastaccountnumber; + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.13-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.13-svn1'; +} + +if($settings['panel']['version'] == '1.2.13-svn1') +{ + $query = 'ALTER TABLE `%s` ADD `openbasedir_path` TINYINT( 1 ) UNSIGNED NOT NULL AFTER `openbasedir` '; + $query = sprintf($query, TABLE_PANEL_DOMAINS); + $db->query($query); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.13-svn2\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.13-svn2'; +} + +if($settings['panel']['version'] == '1.2.13-svn2') +{ + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.13-svn3\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.13-svn3'; +} + +if($settings['panel']['version'] == '1.2.13-svn3') +{ + $result = $db->query_first('SELECT `id` FROM `' . TABLE_PANEL_IPSANDPORTS . '` WHERE `default` = \'1\' '); + $defaultip = $result['id']; + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'defaultip\', `value` = \'' . (int)$defaultip . '\' '); + $db->query('ALTER TABLE `' . TABLE_PANEL_IPSANDPORTS . '` DROP `default` '); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.13-svn4\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.13-svn4'; +} + +if($settings['panel']['version'] == '1.2.13-svn4') +{ + $db->query('ALTER TABLE `' . TABLE_PANEL_SESSIONS . '` ADD `lastpaging` VARCHAR( 255 ) NOT NULL AFTER `lastactivity` '); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.13-svn5\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.13-svn5'; +} + +if($settings['panel']['version'] == '1.2.13-svn5') +{ + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.14-rc1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.14-rc1'; +} + +if($settings['panel']['version'] == '1.2.14-rc1') +{ + $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Russian', 'lng/russian.lng.php');"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.14-rc1-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.14-rc1-svn1'; +} + +if($settings['panel']['version'] == '1.2.14-rc1-svn1') +{ + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.14-rc2\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.14-rc2'; +} + +if($settings['panel']['version'] == '1.2.14-rc2') +{ + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.14-rc3\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.14-rc3'; +} + +if($settings['panel']['version'] == '1.2.14-rc3') +{ + $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Danish', 'lng/danish.lng.php');"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.14-rc3-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.14-rc3-svn1'; +} + +if($settings['panel']['version'] == '1.2.14-rc3-svn1') +{ + $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` CHANGE `diskspace` `diskspace` BIGINT( 30 ) NOT NULL DEFAULT '0';"); + $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` CHANGE `diskspace_used` `diskspace_used` BIGINT( 30 ) NOT NULL DEFAULT '0';"); + $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` CHANGE `traffic` `traffic` BIGINT( 30 ) NOT NULL DEFAULT '0';"); + $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` CHANGE `traffic_used` `traffic_used` BIGINT( 30 ) NOT NULL DEFAULT '0';"); + $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` CHANGE `diskspace` `diskspace` BIGINT( 30 ) NOT NULL DEFAULT '0';"); + $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` CHANGE `diskspace_used` `diskspace_used` BIGINT( 30 ) NOT NULL DEFAULT '0';"); + $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` CHANGE `traffic` `traffic` BIGINT( 30 ) NOT NULL DEFAULT '0';"); + $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` CHANGE `traffic_used` `traffic_used` BIGINT( 30 ) NOT NULL DEFAULT '0';"); + $query = 'SELECT * FROM `' . TABLE_PANEL_LANGUAGE . '` WHERE `language` = \'Russian\';'; + $result = $db->query($query); + + if($db->num_rows($result) == 0) + { + $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Russian', 'lng/russian.lng.php');"); + } + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.14-rc3-svn2\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.14-rc3-svn2'; +} + +if($settings['panel']['version'] == '1.2.14-rc3-svn2') +{ + $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Italian', 'lng/italian.lng.php');"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.14-rc3-svn3\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.14-rc3-svn3'; +} + +if($settings['panel']['version'] == '1.2.14-rc3-svn3') +{ + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.14-rc4\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.14-rc4'; +} + +if($settings['panel']['version'] == '1.2.14-rc4') +{ + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.14\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.14'; +} + +if($settings['panel']['version'] == '1.2.14') +{ + // insert apacheversion (guess) + + if(strtoupper(@php_sapi_name()) == "APACHE2HANDLER") + { + $apacheversion = 'apache2'; + } + else + { + $apacheversion = 'apache1'; + } + + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'apacheversion\', `value` = \'' . $apacheversion . '\' '); + $settings['system']['apacheversion'] = $apacheversion; + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.14-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.14-svn1'; +} + +if($settings['panel']['version'] == '1.2.14-svn1') +{ + $tables = getTables($db); + + if(isset($tables[TABLE_PANEL_CUSTOMERS]) + && is_array($tables[TABLE_PANEL_CUSTOMERS]) + && isset($tables[TABLE_PANEL_CUSTOMERS]['loginname'])) + { + $db->query('ALTER TABLE `' . TABLE_PANEL_CUSTOMERS . '` DROP INDEX `loginname` '); + } + + $db->query('ALTER TABLE `' . TABLE_PANEL_ADMINS . '` ADD UNIQUE ( `loginname` )'); + $db->query('ALTER TABLE `' . TABLE_PANEL_CUSTOMERS . '` ADD UNIQUE ( `loginname` )'); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.14-svn2\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.14-svn2'; +} + +if($settings['panel']['version'] == '1.2.14-svn2') +{ + $db->query('ALTER TABLE `' . TABLE_MAIL_VIRTUAL . '` ADD INDEX ( `email` ) '); + $db->query('ALTER TABLE `' . TABLE_PANEL_DOMAINS . '` ADD INDEX ( `domain` ) '); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.14-svn3\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.14-svn3'; +} + +if($settings['panel']['version'] == '1.2.14-svn3') +{ + $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Bulgarian', 'lng/bulgarian.lng.php');"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.14-svn4\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.14-svn4'; +} + +if($settings['panel']['version'] == '1.2.14-svn4') +{ + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'phpappendopenbasedir\', `value` = \'/tmp/\' '); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.14-svn5\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.14-svn5'; +} + +if($settings['panel']['version'] == '1.2.14-svn5') +{ + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.15\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.15'; +} + +if($settings['panel']['version'] == '1.2.15') +{ + $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Slovak', 'lng/slovak.lng.php');"); + $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Dutch', 'lng/dutch.lng.php');"); + $db->query("INSERT INTO `" . TABLE_PANEL_LANGUAGE . "` (`language`, `file`) VALUES ('Hungarian', 'lng/hungarian.lng.php');"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.15-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.15-svn1'; +} + +if($settings['panel']['version'] == '1.2.15-svn1') +{ + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.16\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.16'; +} + +if($settings['panel']['version'] == '1.2.16') +{ + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'panel\', `varname` = \'natsorting\', `value` = \'1\' '); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.16-svn1'; +} + +if($settings['panel']['version'] == '1.2.16-svn1') +{ + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'deactivateddocroot\', `value` = \'\' '); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn2\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.16-svn2'; +} + +if($settings['panel']['version'] == '1.2.16-svn2') +{ + $tables = getTables($db); + + if(isset($tables[TABLE_PANEL_CRONSCRIPT]) + && is_array($tables[TABLE_PANEL_CRONSCRIPT])) + { + $deletecronscriptstable = true; + $cronscripts_result = $db->query('SELECT * FROM `' . TABLE_PANEL_CRONSCRIPT . '`'); + + while($cronscripts_row = $db->fetch_array($cronscripts_result)) + { + if($cronscripts_row['file'] != 'cron_tasks.php' + && $cronscripts_row['file'] != 'cron_traffic.php') + { + $deletecronscriptstable = false; + } + } + + if($deletecronscriptstable === true) + { + $db->query('DROP TABLE IF EXISTS `' . TABLE_PANEL_CRONSCRIPT . '` '); + } + else + { + $db->query('DELETE FROM `' . TABLE_PANEL_CRONSCRIPT . '` WHERE `file` IN( "cron_tasks.php", "cron_traffic.php" ) '); + } + } + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn3\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.16-svn3'; +} + +if($settings['panel']['version'] == '1.2.16-svn3') +{ + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn4\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.16-svn4'; +} + +if($settings['panel']['version'] == '1.2.16-svn4') +{ + $tables = getTables($db); + $db->query('ALTER TABLE `' . TABLE_PANEL_TRAFFIC . '` ADD `stamp` INT( 11 ) unsigned NOT NULL DEFAULT \'0\' AFTER `day` '); + + if(isset($tables[TABLE_PANEL_TRAFFIC]) + && is_array($tables[TABLE_PANEL_TRAFFIC]) + && isset($tables[TABLE_PANEL_TRAFFIC]['date'])) + { + $db->query('ALTER TABLE `' . TABLE_PANEL_TRAFFIC . '` DROP INDEX `date` '); + } + + $tables = getTables($db); + $db->query('ALTER TABLE `' . TABLE_PANEL_TRAFFIC_ADMINS . '` ADD `stamp` INT( 11 ) unsigned NOT NULL DEFAULT \'0\' AFTER `day` '); + + if(isset($tables[TABLE_PANEL_TRAFFIC_ADMINS]) + && is_array($tables[TABLE_PANEL_TRAFFIC_ADMINS]) + && isset($tables[TABLE_PANEL_TRAFFIC_ADMINS]['date'])) + { + $db->query('ALTER TABLE `' . TABLE_PANEL_TRAFFIC_ADMINS . '` DROP INDEX `date` '); + } + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn5\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.16-svn5'; +} + +if($settings['panel']['version'] == '1.2.16-svn5') +{ + $db->query('ALTER TABLE `' . TABLE_PANEL_CUSTOMERS . '` ADD `reportsent` TINYINT( 4 ) unsigned NOT NULL DEFAULT \'0\' AFTER `loginfail_count` '); + $db->query('ALTER TABLE `' . TABLE_PANEL_ADMINS . '` ADD `reportsent` TINYINT( 4 ) unsigned NOT NULL DEFAULT \'0\' AFTER `loginfail_count` '); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'last_traffic_report_run\', `value` = \'\' '); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn6\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.16-svn6'; +} + +if($settings['panel']['version'] == '1.2.16-svn6') +{ + $db->query('ALTER TABLE `' . TABLE_PANEL_IPSANDPORTS . '` ADD `vhostcontainer` TINYINT( 1 ) NOT NULL DEFAULT \'0\', ADD `specialsettings` TEXT NOT NULL '); + $db->query('UPDATE `' . TABLE_PANEL_IPSANDPORTS . '` SET `vhostcontainer` = \'1\' '); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn7\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.16-svn7'; +} + +if($settings['panel']['version'] == '1.2.16-svn7') +{ + $db->query("ALTER TABLE `" . TABLE_PANEL_SESSIONS . "` CHANGE `ipaddress` `ipaddress` VARCHAR( 255 ) NOT NULL"); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'mailpwcleartext\', `value` = \'1\' '); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn8\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.16-svn8'; +} + +if($settings['panel']['version'] == '1.2.16-svn8') +{ + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'last_tasks_run\', `value` = \'0\' '); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn9\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.16-svn9'; +} + +if($settings['panel']['version'] == '1.2.16-svn9') +{ + $db->query("ALTER TABLE `" . TABLE_FTP_USERS . "` CHANGE `username` `username` VARCHAR( 255 ) NOT NULL"); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'customer\', `varname` = \'ftpatdomain\', `value` = \'0\' '); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn10\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.16-svn10'; +} + +if($settings['panel']['version'] == '1.2.16-svn10') +{ + $db->query('ALTER TABLE `' . TABLE_PANEL_DOMAINS . '` ADD `bindserial` VARCHAR( 10 ) NOT NULL DEFAULT \'2000010100\''); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'system\', \'nameservers\', \'\')'); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'system\', \'mxservers\', \'\')'); + $db->query('DELETE FROM `' . TABLE_PANEL_SETTINGS . '` WHERE `settinggroup`=\'system\' AND `varname`=\'binddefaultzone\''); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn11\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.16-svn11'; +} + +if($settings['panel']['version'] == '1.2.16-svn11') +{ + $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `phpenabled` TINYINT( 1 ) unsigned NOT NULL DEFAULT '1' AFTER `deactivated`"); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'mod_log_sql\', `value` = \'0\' '); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'mod_fcgid\', `value` = \'0\' '); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn12\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.16-svn12'; +} + +if($settings['panel']['version'] == '1.2.16-svn12') +{ + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'panel\', `varname` = \'sendalternativemail\', `value` = \'0\' '); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn13\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.16-svn13'; +} + +if($settings['panel']['version'] == '1.2.16-svn13') +{ + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'apacheconf_vhost\', `value` = \'' . makeCorrectFile($settings['system']['apacheconf_directory'] . '/' . $settings['system']['apacheconf_filename']) . '\' '); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'apacheconf_diroptions\', `value` = \'' . makeCorrectFile($settings['system']['apacheconf_directory'] . '/diroptions.conf') . '\' '); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'apacheconf_htpasswddir\', `value` = \'' . makeCorrectDir($settings['system']['apacheconf_directory'] . '/htpasswd/') . '\' '); + $db->query('DELETE FROM `' . TABLE_PANEL_SETTINGS . '` WHERE `settinggroup` = \'system\' AND `varname` = \'apacheconf_directory\' '); + $db->query('DELETE FROM `' . TABLE_PANEL_SETTINGS . '` WHERE `settinggroup` = \'system\' AND `varname` = \'apacheconf_filename\' '); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn14\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.16-svn14'; +} + +if($settings['panel']['version'] == '1.2.16-svn14') +{ + $db->query('ALTER TABLE `' . TABLE_PANEL_SESSIONS . '` ADD `formtoken` CHAR( 32 ) NOT NULL AFTER `lastpaging` '); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.16-svn15\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.16-svn15'; +} + +if($settings['panel']['version'] == '1.2.16-svn15') +{ + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.17\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.17'; +} + +if($settings['panel']['version'] == '1.2.17') +{ + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.18\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.18'; +} + +if($settings['panel']['version'] == '1.2.18') +{ + $db->query('ALTER TABLE `' . TABLE_PANEL_IPSANDPORTS . '` ADD `listen_statement` TINYINT( 1 ) NOT NULL DEFAULT \'0\', ADD `namevirtualhost_statement` TINYINT( 1 ) NOT NULL DEFAULT \'0\', ADD `vhostcontainer_servername_statement` TINYINT( 1 ) NOT NULL DEFAULT \'0\' '); + $db->query('UPDATE `' . TABLE_PANEL_IPSANDPORTS . '` SET `listen_statement` = 0, `namevirtualhost_statement` = 1, `vhostcontainer_servername_statement` = 1 '); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.18-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.18-svn1'; +} + +if($settings['panel']['version'] == '1.2.18-svn1') +{ + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\', `varname` = \'webalizer_quiet\', `value` = \'2\' '); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.18-svn2\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.18-svn2'; +} + +if($settings['panel']['version'] == '1.2.18-svn2') +{ + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'ticket\', `varname` = \'noreply_email\', `value` = \'NO-REPLY@SERVERNAME\' '); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'ticket\', `varname` = \'admin_email\', `value` = \'admin@SERVERNAME\' '); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'ticket\', `varname` = \'worktime_all\', `value` = \'1\' '); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'ticket\', `varname` = \'worktime_begin\', `value` = \'00:00\' '); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'ticket\', `varname` = \'worktime_end\', `value` = \'23:59\' '); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'ticket\', `varname` = \'worktime_sat\', `value` = \'0\' '); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'ticket\', `varname` = \'worktime_sun\', `value` = \'0\' '); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'ticket\', `varname` = \'archiving_days\', `value` = \'5\' '); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'ticket\', `varname` = \'last_archive_run\', `value` = \'0\' '); + $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `tickets` INT( 15 ) NOT NULL DEFAULT '0' AFTER `ftps_used`"); + $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `tickets_used` INT( 15 ) NOT NULL DEFAULT '0' AFTER `tickets`"); + $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` ADD `tickets` INT( 15 ) NOT NULL DEFAULT '-1' AFTER `ftps_used`"); + $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` ADD `tickets_used` INT( 15 ) NOT NULL DEFAULT '0' AFTER `tickets`"); + $db->query("CREATE TABLE `" . TABLE_PANEL_TICKETS . "` ( + `id` int(11) unsigned NOT NULL auto_increment, + `customerid` int(11) NOT NULL, + `category` smallint(5) unsigned NOT NULL default '1', + `priority` enum('1','2','3') NOT NULL default '3', + `subject` varchar(70) NOT NULL, + `message` text NOT NULL, + `dt` int(15) NOT NULL, + `lastchange` int(15) NOT NULL, + `ip` varchar(20) NOT NULL, + `status` enum('0','1','2','3') NOT NULL default '1', + `lastreplier` enum('0','1') NOT NULL default '0', + `answerto` int(11) unsigned NOT NULL, + `by` enum('0','1') NOT NULL default '0', + `archived` enum('0','1') NOT NULL default '0', + PRIMARY KEY (`id`), + KEY `customerid` (`customerid`)) ENGINE=MyISAM;"); + $db->query("CREATE TABLE `" . TABLE_PANEL_TICKET_CATS . "` ( + `id` smallint(5) unsigned NOT NULL auto_increment, + `name` varchar(60) NOT NULL, + PRIMARY KEY (`id`)) ENGINE=MyISAM;"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.18-svn3\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.18-svn3'; +} + +if($settings['panel']['version'] == '1.2.18-svn3') +{ + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'ticket\', \'enabled\', \'1\');'); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'ticket\', \'concurrently_open\', \'5\');'); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.18-svn4\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.18-svn4'; +} + +if($settings['panel']['version'] == '1.2.18-svn4') +{ + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'ticket\', \'noreply_name\', \'SysCP Support\')'); + $db->query('DELETE FROM `' . TABLE_PANEL_SETTINGS . '` WHERE `settinggroup` = \'ticket\' AND `varname`=\'admin_email\''); + $db->query('ALTER TABLE `' . TABLE_PANEL_TICKETS . '` ADD `adminid` INT( 11 ) NOT NULL DEFAULT \'1\' AFTER `customerid` '); + $db->query('ALTER TABLE `' . TABLE_PANEL_TICKET_CATS . '` ADD `adminid` INT( 11 ) NOT NULL DEFAULT \'1\' AFTER `name` '); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.18-svn5\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.18-svn5'; +} + +if($settings['panel']['version'] == '1.2.18-svn5') +{ + $db->query('UPDATE `' . TABLE_PANEL_SETTINGS . '` SET `settinggroup` = \'system\' WHERE `settinggroup` = \'ticket\' AND `varname` = \'last_archive_run\''); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19'; +} + +?> diff --git a/install/updates/syscp/1.2/update_1.2.19_1.4.inc.php b/install/updates/syscp/1.2/update_1.2.19_1.4.inc.php index d79d85b7..8d519b19 100644 --- a/install/updates/syscp/1.2/update_1.2.19_1.4.inc.php +++ b/install/updates/syscp/1.2/update_1.2.19_1.4.inc.php @@ -1,1084 +1,1084 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Install - * @version $Id$ - */ - -if($settings['panel']['version'] == '1.2.19') -{ - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'system\', \'mod_fcgid_configdir\', \'/var/www/php-fcgi-scripts\')'); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'system\', \'mod_fcgid_tmpdir\', \'/var/kunden/tmp\')'); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn1'; -} - -if($settings['panel']['version'] == '1.2.19-svn1') -{ - $db->query('INSERT INTO `' . TABLE_PANEL_LANGUAGE . '` (`language`, `file`) VALUES (\'Swedish\', \'lng/swedish.lng.php\');'); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn2\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn2'; -} - -if($settings['panel']['version'] == '1.2.19-svn2') -{ - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'ticket\', \'reset_cycle\', \'2\')'); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn3\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn3'; -} - -if($settings['panel']['version'] == '1.2.19-svn3') -{ - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn4\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn4'; -} - -if($settings['panel']['version'] == '1.2.19-svn4') -{ - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'panel\', \'no_robots\', \'1\')'); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn4.5\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn4.5'; -} - -if($settings['panel']['version'] == '1.2.19-svn4.5') -{ - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'logger\', \'enabled\', \'1\');'); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'logger\', \'log_cron\', \'0\');'); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'logger\', \'logfile\', \'\');'); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'logger\', \'logtypes\', \'syslog\');'); - $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'logger\', \'severity\', \'2\');'); - $db->query('CREATE TABLE IF NOT EXISTS `panel_syslog` ( - `logid` bigint(20) NOT NULL auto_increment, - `action` int(5) NOT NULL default \'10\', - `type` int(5) NOT NULL default \'0\', - `date` int(15) NOT NULL, - `user` varchar(50) NOT NULL, - `text` text NOT NULL, - PRIMARY KEY (`logid`) - ) ENGINE=MyISAM;'); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn6\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn6'; -} - -// ok, from this version on, we need the php filter-extension! - -if(!extension_loaded('filter')) -{ - $updatelog->logAction(ADM_ACTION, LOG_ERR, "You need to install the php filter-extension! Update to 1.2.19-svn6 aborted"); - - // skipping the update will not work, this ends up in an endless redirection from index.php to updatesql.php and back to index.php - - die("You need to install the php filter-extension! Update to 1.2.19-svn6 aborted"); -} -else -{ - if(!extension_loaded('bcmath')) - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "The php extension 'bcmath' is not installed - SysCP will work without it but might not return exact traffic/space-usage values!"); - } - - $php_ob = @ini_get("open_basedir"); - - if(!empty($php_ob) - && $php_ob != '') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Detected enabled 'open_basedir', please disable open_basedir to make SysCP work properly!"); - } - - if($settings['panel']['version'] == '1.2.19-svn6') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn6 to 1.2.19-svn7"); - $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `ssl` tinyint(4) NOT NULL default '0'"); - $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `ssl_redirect` tinyint(4) NOT NULL default '0'"); - $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `ssl_ipandport` tinyint(4) NOT NULL default '0'"); - $db->query("ALTER TABLE `" . TABLE_PANEL_IPSANDPORTS . "` ADD `ssl` tinyint(4) NOT NULL default '0'"); - $db->query("ALTER TABLE `" . TABLE_PANEL_IPSANDPORTS . "` ADD `ssl_cert` tinytext AFTER `ssl`"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system','ssl_cert_file','/etc/apache2/apache2.pem')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system','use_ssl','1')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system','openssl_cnf','[ req ]\r\ndefault_bits = 1024\r\ndistinguished_name = req_distinguished_name\r\nattributes = req_attributes\r\nprompt = no\r\noutput_password =\r\ninput_password =\r\n[ req_distinguished_name ]\r\nC = DE\r\nST = syscp\r\nL = syscp \r\nO = Testcertificate\r\nOU = syscp \r\nCN = @@domain_name@@\r\nemailAddress = @@email@@ \r\n[ req_attributes ]\r\nchallengePassword =\r\n')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system','default_vhostconf', '')"); - $db->query("ALTER TABLE `" . TABLE_MAIL_USERS . "` ADD `quota` BIGINT( 13 ) NOT NULL DEFAULT '0' AFTER `customerid`, ADD `pop3` TINYINT( 1 ) NOT NULL DEFAULT '1' AFTER `quota` , ADD `imap` TINYINT( 1 ) NOT NULL DEFAULT '1' AFTER `pop3`"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'mail_quota_enabled', '0')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'mail_quota', '104857600')"); - $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `email_quota` BIGINT( 13 ) NOT NULL DEFAULT '0' AFTER `email_forwarders_used` , ADD `email_quota_used` BIGINT( 13 ) NOT NULL DEFAULT '0' AFTER `email_quota`, ADD `imap` TINYINT( 1 ) NOT NULL DEFAULT '1', ADD `pop3` TINYINT( 1 ) NOT NULL DEFAULT '1'"); - $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` ADD `email_quota` BIGINT( 13 ) NOT NULL DEFAULT '0' AFTER `email_forwarders_used` , ADD `email_quota_used` BIGINT( 13 ) NOT NULL DEFAULT '0' AFTER `email_quota`"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'decimal_places', '4')"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn7\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn7'; - } - - if($settings['panel']['version'] == '1.2.19-svn7') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn7 to 1.2.19-svn8"); - $db->query(" - CREATE TABLE `mail_dkim` ( - `id` int(11) NOT NULL auto_increment, - `domain_id` int(11) NOT NULL default '0', - `publickey` text NOT NULL, - PRIMARY KEY (`id`) - ) ENGINE=MyISAM - "); - $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `dkim` tinyint(1) NOT NULL default '0' AFTER `zonefile`"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_prefix', '/etc/postfix/dkim/')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_domains', 'domains')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_dkimkeys', 'dkim-keys.conf')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkimrestart_command', '/etc/init.d/dkim-filter restart')"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn8\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn8'; - } - - if($settings['panel']['version'] == '1.2.19-svn8') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn8 to 1.2.19-svn9"); - $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` ADD `caneditphpsettings` tinyint(1) NOT NULL default '0' AFTER `domains_see_all`"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn9\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn9'; - } - - if($settings['panel']['version'] == '1.2.19-svn9') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn9 to 1.2.19-svn10"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn10\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn10'; - } - - if($settings['panel']['version'] == '1.2.19-svn10') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn10 to 1.2.19-svn11"); - $db->query("ALTER TABLE `" . TABLE_PANEL_IPSANDPORTS . "` CHANGE `ip` `ip` VARCHAR(39) NOT NULL default ''"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn11\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn11'; - } - - if($settings['panel']['version'] == '1.2.19-svn11') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn11 to 1.2.19-svn12"); - $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` ADD `ip` tinyint(4) NOT NULL default '-1' AFTER `def_language`"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn12\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn12'; - } - - if($settings['panel']['version'] == '1.2.19-svn12') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn12 to 1.2.19-svn13"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'use_dkim', '0')"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn13\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn13'; - } - - if($settings['panel']['version'] == '1.2.19-svn13') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn13 to 1.2.19-svn14"); - $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `email_only` tinyint(1) NOT NULL default '0' AFTER `isemaildomain`"); - $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `wwwserveralias` tinyint(1) NOT NULL default '1' AFTER `dkim`"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn14\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn14'; - } - - if($settings['panel']['version'] == '1.2.19-svn14') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn14 to 1.2.19-svn15"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'webalizer_enabled', '1')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'awstats_enabled', '0')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'awstats_domain_file', '/etc/awstats/')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'awstats_model_file', '/etc/awstats/awstats.model.conf.syscp')"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn15\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn15'; - } - - if($settings['panel']['version'] == '1.2.19-svn15') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn15 to 1.2.19-svn16"); - $db->query(" - CREATE TABLE `panel_dns` ( - `dnsid` bigint(15) NOT NULL auto_increment, - `domainid` int(11) NOT NULL, - `customerid` int(11) NOT NULL, - `adminid` int(11) NOT NULL, - `ipv4` varchar(15) NOT NULL, - `ipv6` varchar(39) NOT NULL, - `cname` varchar(255) NOT NULL, - `mx10` varchar(255) NOT NULL, - `mx20` varchar(255) NOT NULL, - `txt` text NOT NULL, - PRIMARY KEY (`dnsid`), - UNIQUE KEY `domainid` (`domainid`) - ) ENGINE=MyISAM; - "); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'userdns', '0')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'customerdns', '0')"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn16\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn16'; - } - - if($settings['panel']['version'] == '1.2.19-svn16') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn16 to 1.2.19-svn17"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'unix_names', '1')"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn17\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn17'; - } - - if($settings['panel']['version'] == '1.2.19-svn17') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn17 to 1.2.19-svn18"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'allow_preset', '1')"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn18\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn18'; - } - - if($settings['panel']['version'] == '1.2.19-svn18') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn18 to 1.2.19-svn19"); - - // Update all email-admins and give'em unlimited email_quota resources - - $sql = "SELECT `adminid` FROM `" . TABLE_PANEL_ADMINS . "` - WHERE `emails` = '-1' - AND `email_accounts` = '-1' - AND `email_forwarders` = '-1'"; - $admins = $db->query($sql); - - while($admin = $db->fetch_array($admins)) - { - $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `email_quota` = '-1' WHERE `adminid` = '" . $admin['adminid'] . "'"); - } - - if($settings['system']['apacheversion'] == 'lighttpd' - && $settings['system']['apachereload_command'] == '/etc/init.d/lighttpd force-reload') - { - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/init.d/lighttpd reload' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'"); - } - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn19\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn19'; - } - - if($settings['panel']['version'] == '1.2.19-svn19') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn19 to 1.2.19-svn20"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'awstats_path', '/usr/share/awstats/VERSION/webroot/cgi-bin/')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'awstats_updateall_command', '/usr/bin/awstats_updateall.pl')"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn20\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn20'; - } - - if($settings['panel']['version'] == '1.2.19-svn20') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn20 to 1.2.19-svn21"); - - // ADDING BILLING - - $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` - ADD `firstname` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `title` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `company` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `street` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `zipcode` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `city` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `country` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `phone` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `fax` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `taxid` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `contract_date` DATE NOT NULL, - ADD `contract_number` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `contract_details` TEXT NOT NULL DEFAULT '', - ADD `included_domains_qty` INT( 11 ) NOT NULL DEFAULT '0', - ADD `included_domains_tld` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `additional_traffic_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', - ADD `additional_traffic_unit` BIGINT( 30 ) NOT NULL DEFAULT '0', - ADD `additional_diskspace_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', - ADD `additional_diskspace_unit` BIGINT( 30 ) NOT NULL DEFAULT '0', - ADD `taxclass` INT( 11 ) NOT NULL DEFAULT '0', - ADD `setup_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', - ADD `interval_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', - ADD `interval_length` INT( 11 ) NOT NULL DEFAULT '0', - ADD `interval_type` VARCHAR( 1 ) NOT NULL DEFAULT 'm', - ADD `interval_payment` TINYINT( 1 ) NOT NULL DEFAULT '0', - ADD `calc_tax` TINYINT( 1 ) NOT NULL DEFAULT '1', - ADD `term_of_payment` INT( 11 ) NOT NULL DEFAULT '0', - ADD `payment_every` INT( 11 ) NOT NULL DEFAULT '0', - ADD `payment_method` INT( 11 ) NOT NULL DEFAULT '0', - ADD `bankaccount_holder` TEXT NOT NULL DEFAULT '', - ADD `bankaccount_number` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `bankaccount_blz` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `bankaccount_bank` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `service_active` TINYINT( 1 ) NOT NULL DEFAULT '0', - ADD `servicestart_date` DATE NOT NULL, - ADD `serviceend_date` DATE NOT NULL, - ADD `lastinvoiced_date` DATE NOT NULL, - ADD `lastinvoiced_date_traffic` DATE NOT NULL, - ADD `lastinvoiced_date_diskspace` DATE NOT NULL, - ADD `customer_categories_once` TEXT NOT NULL DEFAULT '', - ADD `customer_categories_period` TEXT NOT NULL DEFAULT '', - ADD `invoice_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', - ADD `invoice_fee_hosting` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', - ADD `invoice_fee_hosting_customers` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', - ADD `invoice_fee_domains` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', - ADD `invoice_fee_traffic` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', - ADD `invoice_fee_diskspace` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', - ADD `invoice_fee_other` DECIMAL( 10,2 ) NOT NULL DEFAULT '0';"); - $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` - ADD `taxid` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `title` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `country` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `additional_service_description` TEXT NOT NULL DEFAULT '', - ADD `contract_date` DATE NOT NULL, - ADD `contract_number` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `contract_details` TEXT NOT NULL DEFAULT '', - ADD `included_domains_qty` INT( 11 ) NOT NULL DEFAULT '0', - ADD `included_domains_tld` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `additional_traffic_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', - ADD `additional_traffic_unit` BIGINT( 30 ) NOT NULL DEFAULT '0', - ADD `additional_diskspace_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', - ADD `additional_diskspace_unit` BIGINT( 30 ) NOT NULL DEFAULT '0', - ADD `taxclass` INT( 11 ) NOT NULL DEFAULT '0', - ADD `setup_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', - ADD `interval_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', - ADD `interval_length` INT( 11 ) NOT NULL DEFAULT '0', - ADD `interval_type` VARCHAR( 1 ) NOT NULL DEFAULT 'm', - ADD `interval_payment` TINYINT( 1 ) NOT NULL DEFAULT '0', - ADD `calc_tax` TINYINT( 1 ) NOT NULL DEFAULT '1', - ADD `term_of_payment` INT( 11 ) NOT NULL DEFAULT '0', - ADD `payment_every` INT( 11 ) NOT NULL DEFAULT '0', - ADD `payment_method` INT( 11 ) NOT NULL DEFAULT '0', - ADD `bankaccount_holder` TEXT NOT NULL DEFAULT '', - ADD `bankaccount_number` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `bankaccount_blz` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `bankaccount_bank` VARCHAR( 255 ) NOT NULL DEFAULT '', - ADD `service_active` TINYINT( 1 ) NOT NULL DEFAULT '0', - ADD `servicestart_date` DATE NOT NULL, - ADD `serviceend_date` DATE NOT NULL, - ADD `lastinvoiced_date` DATE NOT NULL, - ADD `lastinvoiced_date_traffic` DATE NOT NULL, - ADD `lastinvoiced_date_diskspace` DATE NOT NULL, - ADD `invoice_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', - ADD `invoice_fee_hosting` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', - ADD `invoice_fee_domains` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', - ADD `invoice_fee_traffic` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', - ADD `invoice_fee_diskspace` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', - ADD `invoice_fee_other` DECIMAL( 10,2 ) NOT NULL DEFAULT '0';"); - $db->query("ALTER TABLE `panel_domains` - ADD `add_date` INT( 11 ) NOT NULL DEFAULT '0', - ADD `registration_date` DATE NOT NULL, - ADD `taxclass` INT( 11 ) NOT NULL DEFAULT '0', - ADD `setup_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', - ADD `interval_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', - ADD `interval_length` INT( 11 ) NOT NULL DEFAULT '0', - ADD `interval_type` VARCHAR( 1 ) NOT NULL DEFAULT 'y', - ADD `interval_payment` TINYINT( 1 ) NOT NULL DEFAULT '0', - ADD `service_active` TINYINT( 1 ) NOT NULL DEFAULT '0', - ADD `servicestart_date` DATE NOT NULL, - ADD `serviceend_date` DATE NOT NULL, - ADD `lastinvoiced_date` DATE NOT NULL;"); - $db->query("CREATE TABLE `" . TABLE_BILLING_SERVICE_CATEGORIES . "` ( - `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , - `category_name` VARCHAR( 255 ) NOT NULL DEFAULT '', - `category_order` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', - `category_classname` VARCHAR( 255 ) NOT NULL DEFAULT '', - `category_classfile` VARCHAR( 255 ) NOT NULL DEFAULT '', - `category_cachefield` VARCHAR( 255 ) NOT NULL DEFAULT '', - `category_caption` VARCHAR( 255 ) NOT NULL DEFAULT '', - `category_rowcaption_setup` VARCHAR( 255 ) NOT NULL DEFAULT '', - `category_rowcaption_interval` VARCHAR( 255 ) NOT NULL DEFAULT '' - ) TYPE = MYISAM ;"); - $db->query("CREATE TABLE `" . TABLE_BILLING_SERVICE_CATEGORIES_ADMINS . "` ( - `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , - `category_name` VARCHAR( 255 ) NOT NULL DEFAULT '', - `category_order` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', - `category_mode` TINYINT( 1 ) NOT NULL DEFAULT '0', - `category_classname` VARCHAR( 255 ) NOT NULL DEFAULT '', - `category_classfile` VARCHAR( 255 ) NOT NULL DEFAULT '', - `category_cachefield` VARCHAR( 255 ) NOT NULL DEFAULT '', - `category_caption` VARCHAR( 255 ) NOT NULL DEFAULT '', - `category_rowcaption_setup` VARCHAR( 255 ) NOT NULL DEFAULT '', - `category_rowcaption_interval` VARCHAR( 255 ) NOT NULL DEFAULT '' - ) TYPE = MYISAM ;"); - $db->query("CREATE TABLE `" . TABLE_BILLING_SERVICE_DOMAINS_TEMPLATES . "` ( - `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , - `tld` VARCHAR( 255 ) NOT NULL DEFAULT '', - `valid_from` DATE NOT NULL, - `valid_to` DATE NOT NULL, - `taxclass` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', - `setup_fee` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00', - `interval_fee` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00', - `interval_length` INT( 11 ) NOT NULL DEFAULT '0', - `interval_type` VARCHAR( 1 ) NOT NULL DEFAULT 'y', - `interval_payment` TINYINT( 1 ) NOT NULL DEFAULT '0' - ) TYPE = MYISAM ;"); - $db->query("CREATE TABLE `" . TABLE_BILLING_SERVICE_OTHER . "` ( - `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , - `customerid` INT( 11 ) NOT NULL DEFAULT '0', - `templateid` INT( 11 ) NOT NULL DEFAULT '0', - `service_type` VARCHAR( 255 ) NOT NULL DEFAULT '', - `caption_setup` VARCHAR( 255 ) NOT NULL DEFAULT '', - `caption_interval` VARCHAR( 255 ) NOT NULL DEFAULT '', - `taxclass` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', - `quantity` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', - `setup_fee` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00', - `interval_fee` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00', - `interval_length` INT( 11 ) NOT NULL DEFAULT '0', - `interval_type` VARCHAR( 1 ) NOT NULL DEFAULT 'm', - `interval_payment` TINYINT( 1 ) NOT NULL DEFAULT '0', - `service_active` TINYINT( 1 ) NOT NULL DEFAULT '0', - `servicestart_date` DATE NOT NULL, - `serviceend_date` DATE NOT NULL, - `lastinvoiced_date` DATE NOT NULL - ) TYPE = MYISAM ;"); - $db->query("CREATE TABLE `" . TABLE_BILLING_SERVICE_OTHER_TEMPLATES . "` ( - `templateid` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , - `valid_from` DATE NOT NULL, - `valid_to` DATE NOT NULL, - `service_type` VARCHAR( 255 ) NOT NULL DEFAULT '', - `caption_setup` VARCHAR( 255 ) NOT NULL DEFAULT '', - `caption_interval` VARCHAR( 255 ) NOT NULL DEFAULT '', - `taxclass` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', - `setup_fee` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00', - `interval_fee` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00', - `interval_length` INT( 11 ) NOT NULL DEFAULT '0', - `interval_type` VARCHAR( 1 ) NOT NULL DEFAULT 'm', - `interval_payment` TINYINT( 1 ) NOT NULL DEFAULT '0' - ) TYPE = MYISAM ;"); - $db->query("CREATE TABLE `" . TABLE_BILLING_TAXCLASSES . "` ( - `classid` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , - `classname` VARCHAR( 255 ) NOT NULL DEFAULT '', - `default` TINYINT( 1 ) NOT NULL DEFAULT '0' - ) TYPE = MYISAM ;"); - $db->query("CREATE TABLE `" . TABLE_BILLING_TAXRATES . "` ( - `taxid` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , - `taxclass` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', - `taxrate` DECIMAL( 4, 4 ) NOT NULL , - `valid_from` DATE NOT NULL - ) TYPE = MYISAM ;"); - $db->query("CREATE TABLE `" . TABLE_BILLING_INVOICES . "` ( - `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , - `customerid` INT( 11 ) NOT NULL DEFAULT '0', - `xml` LONGTEXT NOT NULL DEFAULT '', - `invoice_date` DATE NOT NULL, - `state` TINYINT( 1 ) NOT NULL DEFAULT '0', - `state_change` INT( 11 ) NOT NULL DEFAULT '0', - `invoice_number` VARCHAR( 255 ) NOT NULL DEFAULT '', - `total_fee` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00', - `total_fee_taxed` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00' - ) TYPE = MYISAM ;"); - $db->query("CREATE TABLE `" . TABLE_BILLING_INVOICES_ADMINS . "` ( - `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , - `adminid` INT( 11 ) NOT NULL DEFAULT '0', - `xml` LONGTEXT NOT NULL DEFAULT '', - `invoice_date` DATE NOT NULL, - `state` TINYINT( 1 ) NOT NULL DEFAULT '0', - `state_change` INT( 11 ) NOT NULL DEFAULT '0', - `invoice_number` VARCHAR( 255 ) NOT NULL DEFAULT '', - `total_fee` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00', - `total_fee_taxed` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00' - ) TYPE = MYISAM ;"); - $db->query("CREATE TABLE `" . TABLE_BILLING_INVOICE_CHANGES . "` ( - `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , - `customerid` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', - `userid` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', - `timestamp` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', - `key` VARCHAR( 255 ) NOT NULL DEFAULT '', - `action` TINYINT( 1 ) NOT NULL DEFAULT '0', - `caption` VARCHAR( 255 ) NOT NULL DEFAULT '', - `interval` VARCHAR( 255 ) NOT NULL DEFAULT '', - `quantity` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', - `total_fee` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00', - `taxrate` DECIMAL( 4, 4 ) NOT NULL - ) TYPE = MYISAM ;"); - $db->query("CREATE TABLE `" . TABLE_BILLING_INVOICE_CHANGES_ADMINS . "` ( - `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , - `adminid` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', - `userid` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', - `timestamp` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', - `key` VARCHAR( 255 ) NOT NULL DEFAULT '', - `action` TINYINT( 1 ) NOT NULL DEFAULT '0', - `caption` VARCHAR( 255 ) NOT NULL DEFAULT '', - `interval` VARCHAR( 255 ) NOT NULL DEFAULT '', - `quantity` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', - `total_fee` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00', - `taxrate` DECIMAL( 4, 4 ) NOT NULL - ) TYPE = MYISAM ;"); - $db->query("CREATE TABLE `" . TABLE_PANEL_DISKSPACE . "` ( - `id` int(11) unsigned NOT NULL auto_increment, - `customerid` int(11) unsigned NOT NULL default '0', - `year` int(4) unsigned zerofill NOT NULL default '0000', - `month` int(2) unsigned zerofill NOT NULL default '00', - `day` int(2) unsigned zerofill NOT NULL default '00', - `stamp` int(11) unsigned NOT NULL default '0', - `webspace` bigint(30) unsigned NOT NULL default '0', - `mail` bigint(30) unsigned NOT NULL default '0', - `mysql` bigint(30) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `customerid` (`customerid`) - ) TYPE=MyISAM ;"); - $db->query("CREATE TABLE `" . TABLE_PANEL_DISKSPACE_ADMINS . "` ( - `id` int(11) unsigned NOT NULL auto_increment, - `adminid` int(11) unsigned NOT NULL default '0', - `year` int(4) unsigned zerofill NOT NULL default '0000', - `month` int(2) unsigned zerofill NOT NULL default '00', - `day` int(2) unsigned zerofill NOT NULL default '00', - `stamp` int(11) unsigned NOT NULL default '0', - `webspace` bigint(30) unsigned NOT NULL default '0', - `mail` bigint(30) unsigned NOT NULL default '0', - `mysql` bigint(30) unsigned NOT NULL default '0', - PRIMARY KEY (`id`), - KEY `adminid` (`adminid`) - ) TYPE=MyISAM ;"); - $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES . "` (`id`, `category_name`, `category_order`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (1, 'hosting', 10, 'hosting', 'lib/billing_class_hosting.php', 'invoice_fee_hosting', 'hosting_caption', 'hosting_rowcaption_setup', 'hosting_rowcaption_interval');"); - $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES . "` (`id`, `category_name`, `category_order`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (2, 'domains', 20, 'domains', 'lib/billing_class_domains.php', 'invoice_fee_domains', 'domains_caption', 'domains_rowcaption_setup', 'domains_rowcaption_interval');"); - $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES . "` (`id`, `category_name`, `category_order`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (3, 'traffic', 30, 'traffic', 'lib/billing_class_traffic.php', 'invoice_fee_traffic', 'traffic_caption', 'traffic_rowcaption_setup', 'traffic_rowcaption_interval');"); - $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES . "` (`id`, `category_name`, `category_order`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (4, 'diskspace', 40, 'diskspace', 'lib/billing_class_diskspace.php', 'invoice_fee_diskspace', 'diskspace_caption', 'diskspace_rowcaption_setup', 'diskspace_rowcaption_interval');"); - $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES . "` (`id`, `category_name`, `category_order`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (5, 'other', 50, 'other', 'lib/billing_class_other.php', 'invoice_fee_other', 'other_caption', 'other_rowcaption_setup', 'other_rowcaption_interval');"); - $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES_ADMINS . "` (`id`, `category_name`, `category_order`, `category_mode`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (1, 'hosting', 10, 0, 'hosting', 'lib/billing_class_hosting.php', 'invoice_fee_hosting', 'hosting_caption', 'hosting_rowcaption_setup', 'hosting_rowcaption_interval');"); - $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES_ADMINS . "` (`id`, `category_name`, `category_order`, `category_mode`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (2, 'hosting_customers', 20, 1, 'hosting', 'lib/billing_class_hosting.php', 'invoice_fee_hosting_customers', 'hosting_caption', 'hosting_rowcaption_setup_withloginname', 'hosting_rowcaption_interval_withloginname');"); - $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES_ADMINS . "` (`id`, `category_name`, `category_order`, `category_mode`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (3, 'domains', 30, 1, 'domains', 'lib/billing_class_domains.php', 'invoice_fee_domains', 'domains_caption', 'domains_rowcaption_setup', 'domains_rowcaption_interval');"); - $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES_ADMINS . "` (`id`, `category_name`, `category_order`, `category_mode`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (4, 'traffic', 40, 0, 'traffic', 'lib/billing_class_traffic.php', 'invoice_fee_traffic', 'traffic_caption', 'traffic_rowcaption_setup', 'traffic_rowcaption_interval');"); - $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES_ADMINS . "` (`id`, `category_name`, `category_order`, `category_mode`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (5, 'diskspace', 50, 0, 'diskspace', 'lib/billing_class_diskspace.php', 'invoice_fee_diskspace', 'diskspace_caption', 'diskspace_rowcaption_setup', 'diskspace_rowcaption_interval');"); - $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES_ADMINS . "` (`id`, `category_name`, `category_order`, `category_mode`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (6, 'other', 60, 1, 'other', 'lib/billing_class_other.php', 'invoice_fee_other', 'other_caption', 'other_rowcaption_setup', 'other_rowcaption_interval');"); - $db->query("INSERT INTO `" . TABLE_BILLING_TAXCLASSES . "` (`classid`, `classname`, `default`) VALUES ( NULL, 'MwSt Deutschland', '1' );"); - $db->query("INSERT INTO `" . TABLE_BILLING_TAXCLASSES . "` (`classid`, `classname`, `default`) VALUES ( NULL, 'MwSt Deutschland (reduziert)', '0' );"); - $db->query("INSERT INTO `" . TABLE_BILLING_TAXRATES . "` (`taxid`, `taxclass`, `taxrate`, `valid_from`) VALUES ( NULL, 1, 0.1600, '0' );"); - $db->query("INSERT INTO `" . TABLE_BILLING_TAXRATES . "` (`taxid`, `taxclass`, `taxrate`, `valid_from`) VALUES ( NULL, 1, 0.1900, '2007-01-01' );"); - $db->query("INSERT INTO `" . TABLE_BILLING_TAXRATES . "` (`taxid`, `taxclass`, `taxrate`, `valid_from`) VALUES ( NULL, 2, 0.0700, '0' );"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (NULL, 'billing', 'invoicenumber_count', '0');"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn21\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn21'; - } - - if($settings['panel']['version'] == '1.2.19-svn21') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn21 to 1.2.19-svn22"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'allow_preset_admin', '0')"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn22\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn22'; - } - - if($settings['panel']['version'] == '1.2.19-svn22') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn22 to 1.2.19-svn23"); - $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` ADD `edit_billingdata` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `change_serversettings`"); - $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `edit_billingdata` = '1' WHERE `customers_see_all` = '1'"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn23\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn23'; - } - - if($settings['panel']['version'] == '1.2.19-svn23') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn23 to 1.2.19-svn24"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('billing', 'activate_billing', '0')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('billing', 'highlight_inactive', '0')"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn24\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn24'; - } - - if($settings['panel']['version'] == '1.2.19-svn24') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn24 to 1.2.19-svn25"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn25\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn25'; - } - - if($settings['panel']['version'] == '1.2.19-svn25') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn25 to 1.2.19-svn26"); - $db->query("INSERT INTO " . TABLE_PANEL_LANGUAGE . " SET `language` = 'Swedish', `file` = 'lng/swedish.lng.php';"); - $db->query("INSERT INTO " . TABLE_PANEL_LANGUAGE . " SET `language` = 'Czech', `file` = 'lng/czech.lng.php';"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn26\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn26'; - } - - if($settings['panel']['version'] == '1.2.19-svn26') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn26 to 1.2.19-svn27"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'webserver', 'apache2')"); - $db->query("CREATE TABLE `" . TABLE_MAIL_AUTORESPONDER . "` ( - `email` varchar(255) NOT NULL default '', - `message` text NOT NULL, - `enabled` tinyint(1) NOT NULL default '0', - `subject` varchar(255) NOT NULL default '', - `customerid` int(11) NOT NULL default '0', - PRIMARY KEY (`email`), - KEY `customerid` (`customerid`), - FULLTEXT KEY `message` (`message`) - ) ENGINE=MyISAM"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('autoresponder', 'autoresponder_active', '0')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('autoresponder', 'last_autoresponder_run', '0')"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn27\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn27'; - } - - if($settings['panel']['version'] == '1.2.19-svn27') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn27 to 1.2.19-svn28"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('admin', 'show_version_login', '0')"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn28\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn28'; - } - - if($settings['panel']['version'] == '1.2.19-svn28') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn28 to 1.2.19-svn29"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('admin', 'show_version_footer', '0')"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn29\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn29'; - } - - if($settings['panel']['version'] == '1.2.19-svn29') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn29 to 1.2.19-svn30"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('admin', 'syscp_graphic', 'images/header.gif')"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn30\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn30'; - } - - if($settings['panel']['version'] == '1.2.19-svn30') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn30 to 1.2.19-svn31"); - - //fcgid improvements - - $db->query("CREATE TABLE `" . TABLE_PANEL_PHPCONFIGS . "` ( - `id` int(11) unsigned NOT NULL auto_increment, - `phpsettings` text NOT NULL, - `description` varchar(50) NOT NULL, - PRIMARY KEY (`id`) - ) ENGINE=MyISAM"); - $db->query("INSERT INTO `" . TABLE_PANEL_PHPCONFIGS . "` (`id`, `phpsettings`, `description`) VALUES(1, 'short_open_tag = On\r\nasp_tags = Off\r\nprecision = 14\r\noutput_buffering = 4096\r\nallow_call_time_pass_reference = Off\r\nsafe_mode = {SAFE_MODE}\r\nsafe_mode_gid = Off\r\nsafe_mode_include_dir = \"{PEAR_DIR}\"\r\nsafe_mode_allowed_env_vars = PHP_\r\nsafe_mode_protected_env_vars = LD_LIBRARY_PATH\r\nopen_basedir = \"{OPEN_BASEDIR}\"\r\ndisable_functions = exec,passthru,shell_exec,system,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate\r\ndisable_classes =\r\nexpose_php = Off\r\nmax_execution_time = 30\r\nmax_input_time = 60\r\nmemory_limit = 16M\r\npost_max_size = 16M\r\nerror_reporting = E_ALL & ~E_NOTICE\r\ndisplay_errors = On\r\ndisplay_startup_errors = Off\r\nlog_errors = On\r\nlog_errors_max_len = 1024\r\nignore_repeated_errors = Off\r\nignore_repeated_source = Off\r\nreport_memleaks = On\r\ntrack_errors = Off\r\nhtml_errors = Off\r\nvariables_order = \"GPCS\"\r\nregister_globals = Off\r\nregister_argc_argv = Off\r\ngpc_order = \"GPC\"\r\nmagic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off\r\ninclude_path = \".:{PEAR_DIR}\"\r\nenable_dl = Off\r\nfile_uploads = On\r\nupload_tmp_dir = \"{TMP_DIR}\"\r\nupload_max_filesize = 32M\r\nallow_url_fopen = Off\r\nsendmail_path = \"/usr/sbin/sendmail -t -f {CUSTOMER_EMAIL}\"\r\nsession.save_handler = files\r\nsession.save_path = \"{TMP_DIR}\"\r\nsession.use_cookies = 1\r\nsession.name = PHPSESSID\r\nsession.auto_start = 0\r\nsession.cookie_lifetime = 0\r\nsession.cookie_path = /\r\nsession.cookie_domain =\r\nsession.serialize_handler = php\r\nsession.gc_probability = 1\r\nsession.gc_divisor = 1000\r\nsession.gc_maxlifetime = 1440\r\nsession.bug_compat_42 = 0\r\nsession.bug_compat_warn = 1\r\nsession.referer_check =\r\nsession.entropy_length = 16\r\nsession.entropy_file = /dev/urandom\r\nsession.cache_limiter = nocache\r\nsession.cache_expire = 180\r\nsession.use_trans_sid = 0\r\nsuhosin.simulation = Off\r\nsuhosin.mail.protect = 1\r\n', 'Default Config')"); - $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `phpsettingid` INT( 11 ) UNSIGNED NOT NULL DEFAULT '1'"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES('system', 'mod_fcgid_wrapper', '0')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES('system', 'mod_fcgid_starter', '0')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES('system', 'mod_fcgid_peardir', '/usr/share/php/:/usr/share/php5/')"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn31\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn31'; - } - - if($settings['panel']['version'] == '1.2.19-svn31') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn31 to 1.2.19-svn32"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES('system', 'index_file_extension', 'html');"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn32\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn32'; - } - - if($settings['panel']['version'] == '1.2.19-svn32') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn32 to 1.2.19-svn33"); - $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `dkim_id` INT( 11 ) UNSIGNED NOT NULL AFTER `dkim`, ADD `dkim_privkey` TEXT NOT NULL AFTER `dkim_id`, ADD `dkim_pubkey` TEXT NOT NULL AFTER `dkim_privkey`"); - $db->query("DROP TABLE IF EXISTS `mail_dkim`"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn33\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn33'; - } - - if($settings['panel']['version'] == '1.2.19-svn33') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn33 to 1.2.19-svn34"); - $db->query("DELETE FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup` = 'system' AND `varname` = 'userdns'"); - $db->query("DELETE FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup` = 'system' AND `varname` = 'customerdns'"); - $db->query("DROP TABLE IF EXISTS `panel_dns`"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn34\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn34'; - } - - if($settings['panel']['version'] == '1.2.19-svn34') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn34 to 1.2.19-svn35"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('aps', 'items_per_page', '20')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('aps', 'upload_fields', '5')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('aps', 'aps_active', '0')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('aps', 'php-extension', '')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('aps', 'php-configuration', '')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('aps', 'webserver-htaccess', '')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('aps', 'php-function', '')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('aps', 'webserver-module', '')"); - $db->query("CREATE TABLE IF NOT EXISTS `" . TABLE_APS_INSTANCES . "` ( - `ID` int(4) NOT NULL auto_increment, - `CustomerID` int(4) NOT NULL, - `PackageID` int(4) NOT NULL, - `Status` int(4) NOT NULL, - PRIMARY KEY (`ID`) - ) ENGINE=MyISAM"); - $db->query("CREATE TABLE IF NOT EXISTS `" . TABLE_APS_PACKAGES . "` ( - `ID` int(4) NOT NULL auto_increment, - `Path` varchar(500) NOT NULL, - `Name` varchar(500) NOT NULL, - `Version` varchar(20) NOT NULL, - `Release` int(4) NOT NULL, - `Status` int(1) NOT NULL default '1', - PRIMARY KEY (`ID`) - ) ENGINE=MyISAM"); - $db->query("CREATE TABLE IF NOT EXISTS `" . TABLE_APS_SETTINGS . "` ( - `ID` int(4) NOT NULL auto_increment, - `InstanceID` int(4) NOT NULL, - `Name` varchar(250) NOT NULL, - `Value` varchar(250) NOT NULL, - PRIMARY KEY (`ID`) - ) ENGINE=MyISAM"); - $db->query("CREATE TABLE IF NOT EXISTS `" . TABLE_APS_TASKS . "` ( - `ID` int(4) NOT NULL auto_increment, - `InstanceID` int(4) NOT NULL, - `Task` int(4) NOT NULL, - PRIMARY KEY (`ID`) - ) ENGINE=MyISAM"); - $db->query("CREATE TABLE IF NOT EXISTS `" . TABLE_APS_TEMP_SETTINGS . "` ( - `ID` int(4) NOT NULL auto_increment, - `PackageID` int(4) NOT NULL, - `CustomerID` int(4) NOT NULL, - `Name` varchar(250) NOT NULL, - `Value` varchar(250) NOT NULL, - PRIMARY KEY (`ID`) - ) ENGINE=MyISAM"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn35\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn35'; - } - - if($settings['panel']['version'] == '1.2.19-svn35') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn35 to 1.2.19-svn36"); - $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `mod_fcgid_starter` INT( 4 ) NULL DEFAULT '-1'"); - $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` ADD `can_manage_aps_packages` TINYINT( 1 ) NOT NULL DEFAULT '1'"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn36\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn36'; - } - - if($settings['panel']['version'] == '1.2.19-svn36') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn36 to 1.2.19-svn37"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'realtime_port', '0')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('session', 'allow_multiple_login', '0')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'allow_domain_change_admin', '0')"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'allow_domain_change_customer', '0')"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn37\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn37'; - } - - if($settings['panel']['version'] == '1.2.19-svn37') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn37 to 1.2.19-svn38"); - $db->query("ALTER TABLE `" . TABLE_PANEL_PHPCONFIGS . "` ADD `binary` VARCHAR( 255 ) NOT NULL, ADD `file_extensions` VARCHAR( 255 ) NOT NULL, ADD `mod_fcgid_starter` int(4) NOT NULL DEFAULT '-1', ADD `mod_fcgid_maxrequests` int(4) NOT NULL DEFAULT '-1'"); - $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `mod_fcgid_maxrequests` INT( 4 ) NULL DEFAULT '-1'"); - $db->query("UPDATE `" . TABLE_PANEL_PHPCONFIGS . "` SET `binary` = '/usr/bin/php-cgi', `file_extensions` = 'php'"); - $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES('system', 'mod_fcgid_maxrequests', '250')"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn38\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn38'; - } - - if($settings['panel']['version'] == '1.2.19-svn38') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn38 to 1.2.19-svn39"); - $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` ADD `aps_packages` INT( 5 ) NOT NULL DEFAULT '0', ADD `aps_packages_used` INT( 5 ) NOT NULL DEFAULT '0'"); - $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `aps_packages` INT( 5 ) NOT NULL DEFAULT '0', ADD `aps_packages_used` INT( 5 ) NOT NULL DEFAULT '0'"); - - //give admins which can see all customers and domains plus change serversettings the ability to have unlimited aps instances - - $admins = $db->query("SELECT `adminid` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `customers_see_all` = 1 AND `domains_see_all` = 1 AND `change_serversettings` = 1"); - - while($admin = $db->fetch_array($admins)) - { - $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `aps_packages` = -1 WHERE `adminid` = '" . $admin['adminid'] . "'"); - } - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn39\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn39'; - } - - if($settings['panel']['version'] == '1.2.19-svn39') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn39 to 1.2.19-svn40"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `varname` = 'webserver' WHERE `settinggroup` = 'system' AND `varname` = 'apacheversion'"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn40\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn40'; - } - - if($settings['panel']['version'] == '1.2.19-svn40') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn40 to 1.2.19-svn41"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn41\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn41'; - } - - if($settings['panel']['version'] == '1.2.19-svn41') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn41 to 1.2.19-svn42"); - $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '100' WHERE `settinggroup` = 'system' AND `varname` = 'mail_quota' AND `value` = '104857600'"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn42\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn42'; - } - - if($settings['panel']['version'] == '1.2.19-svn42') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn42 to 1.2.19-svn43"); - - // Going to fix double slashes in the database - - $result = $db->query("SELECT * FROM `" . TABLE_PANEL_HTACCESS . "` WHERE `path` LIKE '%//%';"); - - while($row = $db->fetch_array($result)) - { - $row['path'] = makeCorrectDir($row['path']); - $db->query("UPDATE `" . TABLE_PANEL_HTACCESS . "` SET `path` = '" . $db->escape($row['path']) . "' WHERE `id` = '" . $row['id'] . "';"); - } - - $result = $db->query("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `path` LIKE '%//%';"); - - while($row = $db->fetch_array($result)) - { - $row['path'] = makeCorrectDir($row['path']); - $db->query("UPDATE `" . TABLE_PANEL_HTPASSWDS . "` SET `path` = '" . $db->escape($row['path']) . "' WHERE `id` = '" . $row['id'] . "';"); - } - - $result = $db->query("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `documentroot` LIKE '%//%';"); - - while($row = $db->fetch_array($result)) - { - if(!preg_match("#^https?://#i", $row['documentroot'])) - { - $row['documentroot'] = makeCorrectDir($row['documentroot']); - $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `documentroot` = '" . $db->escape($row['documentroot']) . "' WHERE `id` = '" . $row['id'] . "';"); - } - } - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn43\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.2.19-svn43'; - } - - if($settings['panel']['version'] == '1.2.19-svn43') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn43 to 1.4"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.4\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.4'; - } -} - -// php filter-extension check - - - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Install + * @version $Id$ + */ + +if($settings['panel']['version'] == '1.2.19') +{ + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'system\', \'mod_fcgid_configdir\', \'/var/www/php-fcgi-scripts\')'); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'system\', \'mod_fcgid_tmpdir\', \'/var/kunden/tmp\')'); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn1'; +} + +if($settings['panel']['version'] == '1.2.19-svn1') +{ + $db->query('INSERT INTO `' . TABLE_PANEL_LANGUAGE . '` (`language`, `file`) VALUES (\'Swedish\', \'lng/swedish.lng.php\');'); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn2\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn2'; +} + +if($settings['panel']['version'] == '1.2.19-svn2') +{ + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'ticket\', \'reset_cycle\', \'2\')'); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn3\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn3'; +} + +if($settings['panel']['version'] == '1.2.19-svn3') +{ + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn4\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn4'; +} + +if($settings['panel']['version'] == '1.2.19-svn4') +{ + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'panel\', \'no_robots\', \'1\')'); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn4.5\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn4.5'; +} + +if($settings['panel']['version'] == '1.2.19-svn4.5') +{ + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'logger\', \'enabled\', \'1\');'); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'logger\', \'log_cron\', \'0\');'); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'logger\', \'logfile\', \'\');'); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'logger\', \'logtypes\', \'syslog\');'); + $db->query('INSERT INTO `' . TABLE_PANEL_SETTINGS . '` (`settinggroup`, `varname`, `value`) VALUES (\'logger\', \'severity\', \'2\');'); + $db->query('CREATE TABLE IF NOT EXISTS `panel_syslog` ( + `logid` bigint(20) NOT NULL auto_increment, + `action` int(5) NOT NULL default \'10\', + `type` int(5) NOT NULL default \'0\', + `date` int(15) NOT NULL, + `user` varchar(50) NOT NULL, + `text` text NOT NULL, + PRIMARY KEY (`logid`) + ) ENGINE=MyISAM;'); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn6\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn6'; +} + +// ok, from this version on, we need the php filter-extension! + +if(!extension_loaded('filter')) +{ + $updatelog->logAction(ADM_ACTION, LOG_ERR, "You need to install the php filter-extension! Update to 1.2.19-svn6 aborted"); + + // skipping the update will not work, this ends up in an endless redirection from index.php to updatesql.php and back to index.php + + die("You need to install the php filter-extension! Update to 1.2.19-svn6 aborted"); +} +else +{ + if(!extension_loaded('bcmath')) + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "The php extension 'bcmath' is not installed - SysCP will work without it but might not return exact traffic/space-usage values!"); + } + + $php_ob = @ini_get("open_basedir"); + + if(!empty($php_ob) + && $php_ob != '') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Detected enabled 'open_basedir', please disable open_basedir to make SysCP work properly!"); + } + + if($settings['panel']['version'] == '1.2.19-svn6') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn6 to 1.2.19-svn7"); + $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `ssl` tinyint(4) NOT NULL default '0'"); + $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `ssl_redirect` tinyint(4) NOT NULL default '0'"); + $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `ssl_ipandport` tinyint(4) NOT NULL default '0'"); + $db->query("ALTER TABLE `" . TABLE_PANEL_IPSANDPORTS . "` ADD `ssl` tinyint(4) NOT NULL default '0'"); + $db->query("ALTER TABLE `" . TABLE_PANEL_IPSANDPORTS . "` ADD `ssl_cert` tinytext AFTER `ssl`"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system','ssl_cert_file','/etc/apache2/apache2.pem')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system','use_ssl','1')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system','openssl_cnf','[ req ]\r\ndefault_bits = 1024\r\ndistinguished_name = req_distinguished_name\r\nattributes = req_attributes\r\nprompt = no\r\noutput_password =\r\ninput_password =\r\n[ req_distinguished_name ]\r\nC = DE\r\nST = syscp\r\nL = syscp \r\nO = Testcertificate\r\nOU = syscp \r\nCN = @@domain_name@@\r\nemailAddress = @@email@@ \r\n[ req_attributes ]\r\nchallengePassword =\r\n')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system','default_vhostconf', '')"); + $db->query("ALTER TABLE `" . TABLE_MAIL_USERS . "` ADD `quota` BIGINT( 13 ) NOT NULL DEFAULT '0' AFTER `customerid`, ADD `pop3` TINYINT( 1 ) NOT NULL DEFAULT '1' AFTER `quota` , ADD `imap` TINYINT( 1 ) NOT NULL DEFAULT '1' AFTER `pop3`"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'mail_quota_enabled', '0')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'mail_quota', '104857600')"); + $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `email_quota` BIGINT( 13 ) NOT NULL DEFAULT '0' AFTER `email_forwarders_used` , ADD `email_quota_used` BIGINT( 13 ) NOT NULL DEFAULT '0' AFTER `email_quota`, ADD `imap` TINYINT( 1 ) NOT NULL DEFAULT '1', ADD `pop3` TINYINT( 1 ) NOT NULL DEFAULT '1'"); + $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` ADD `email_quota` BIGINT( 13 ) NOT NULL DEFAULT '0' AFTER `email_forwarders_used` , ADD `email_quota_used` BIGINT( 13 ) NOT NULL DEFAULT '0' AFTER `email_quota`"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'decimal_places', '4')"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn7\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn7'; + } + + if($settings['panel']['version'] == '1.2.19-svn7') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn7 to 1.2.19-svn8"); + $db->query(" + CREATE TABLE `mail_dkim` ( + `id` int(11) NOT NULL auto_increment, + `domain_id` int(11) NOT NULL default '0', + `publickey` text NOT NULL, + PRIMARY KEY (`id`) + ) ENGINE=MyISAM + "); + $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `dkim` tinyint(1) NOT NULL default '0' AFTER `zonefile`"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_prefix', '/etc/postfix/dkim/')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_domains', 'domains')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkim_dkimkeys', 'dkim-keys.conf')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'dkimrestart_command', '/etc/init.d/dkim-filter restart')"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn8\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn8'; + } + + if($settings['panel']['version'] == '1.2.19-svn8') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn8 to 1.2.19-svn9"); + $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` ADD `caneditphpsettings` tinyint(1) NOT NULL default '0' AFTER `domains_see_all`"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn9\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn9'; + } + + if($settings['panel']['version'] == '1.2.19-svn9') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn9 to 1.2.19-svn10"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn10\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn10'; + } + + if($settings['panel']['version'] == '1.2.19-svn10') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn10 to 1.2.19-svn11"); + $db->query("ALTER TABLE `" . TABLE_PANEL_IPSANDPORTS . "` CHANGE `ip` `ip` VARCHAR(39) NOT NULL default ''"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn11\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn11'; + } + + if($settings['panel']['version'] == '1.2.19-svn11') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn11 to 1.2.19-svn12"); + $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` ADD `ip` tinyint(4) NOT NULL default '-1' AFTER `def_language`"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn12\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn12'; + } + + if($settings['panel']['version'] == '1.2.19-svn12') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn12 to 1.2.19-svn13"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('dkim', 'use_dkim', '0')"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn13\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn13'; + } + + if($settings['panel']['version'] == '1.2.19-svn13') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn13 to 1.2.19-svn14"); + $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `email_only` tinyint(1) NOT NULL default '0' AFTER `isemaildomain`"); + $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `wwwserveralias` tinyint(1) NOT NULL default '1' AFTER `dkim`"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn14\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn14'; + } + + if($settings['panel']['version'] == '1.2.19-svn14') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn14 to 1.2.19-svn15"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'webalizer_enabled', '1')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'awstats_enabled', '0')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'awstats_domain_file', '/etc/awstats/')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'awstats_model_file', '/etc/awstats/awstats.model.conf.syscp')"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn15\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn15'; + } + + if($settings['panel']['version'] == '1.2.19-svn15') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn15 to 1.2.19-svn16"); + $db->query(" + CREATE TABLE `panel_dns` ( + `dnsid` bigint(15) NOT NULL auto_increment, + `domainid` int(11) NOT NULL, + `customerid` int(11) NOT NULL, + `adminid` int(11) NOT NULL, + `ipv4` varchar(15) NOT NULL, + `ipv6` varchar(39) NOT NULL, + `cname` varchar(255) NOT NULL, + `mx10` varchar(255) NOT NULL, + `mx20` varchar(255) NOT NULL, + `txt` text NOT NULL, + PRIMARY KEY (`dnsid`), + UNIQUE KEY `domainid` (`domainid`) + ) ENGINE=MyISAM; + "); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'userdns', '0')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'customerdns', '0')"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn16\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn16'; + } + + if($settings['panel']['version'] == '1.2.19-svn16') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn16 to 1.2.19-svn17"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'unix_names', '1')"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn17\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn17'; + } + + if($settings['panel']['version'] == '1.2.19-svn17') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn17 to 1.2.19-svn18"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'allow_preset', '1')"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn18\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn18'; + } + + if($settings['panel']['version'] == '1.2.19-svn18') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn18 to 1.2.19-svn19"); + + // Update all email-admins and give'em unlimited email_quota resources + + $sql = "SELECT `adminid` FROM `" . TABLE_PANEL_ADMINS . "` + WHERE `emails` = '-1' + AND `email_accounts` = '-1' + AND `email_forwarders` = '-1'"; + $admins = $db->query($sql); + + while($admin = $db->fetch_array($admins)) + { + $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `email_quota` = '-1' WHERE `adminid` = '" . $admin['adminid'] . "'"); + } + + if($settings['system']['apacheversion'] == 'lighttpd' + && $settings['system']['apachereload_command'] == '/etc/init.d/lighttpd force-reload') + { + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '/etc/init.d/lighttpd reload' WHERE `settinggroup` = 'system' AND `varname` = 'apachereload_command'"); + } + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn19\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn19'; + } + + if($settings['panel']['version'] == '1.2.19-svn19') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn19 to 1.2.19-svn20"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'awstats_path', '/usr/share/awstats/VERSION/webroot/cgi-bin/')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'awstats_updateall_command', '/usr/bin/awstats_updateall.pl')"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn20\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn20'; + } + + if($settings['panel']['version'] == '1.2.19-svn20') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn20 to 1.2.19-svn21"); + + // ADDING BILLING + + $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` + ADD `firstname` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `title` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `company` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `street` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `zipcode` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `city` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `country` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `phone` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `fax` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `taxid` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `contract_date` DATE NOT NULL, + ADD `contract_number` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `contract_details` TEXT NOT NULL DEFAULT '', + ADD `included_domains_qty` INT( 11 ) NOT NULL DEFAULT '0', + ADD `included_domains_tld` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `additional_traffic_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', + ADD `additional_traffic_unit` BIGINT( 30 ) NOT NULL DEFAULT '0', + ADD `additional_diskspace_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', + ADD `additional_diskspace_unit` BIGINT( 30 ) NOT NULL DEFAULT '0', + ADD `taxclass` INT( 11 ) NOT NULL DEFAULT '0', + ADD `setup_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', + ADD `interval_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', + ADD `interval_length` INT( 11 ) NOT NULL DEFAULT '0', + ADD `interval_type` VARCHAR( 1 ) NOT NULL DEFAULT 'm', + ADD `interval_payment` TINYINT( 1 ) NOT NULL DEFAULT '0', + ADD `calc_tax` TINYINT( 1 ) NOT NULL DEFAULT '1', + ADD `term_of_payment` INT( 11 ) NOT NULL DEFAULT '0', + ADD `payment_every` INT( 11 ) NOT NULL DEFAULT '0', + ADD `payment_method` INT( 11 ) NOT NULL DEFAULT '0', + ADD `bankaccount_holder` TEXT NOT NULL DEFAULT '', + ADD `bankaccount_number` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `bankaccount_blz` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `bankaccount_bank` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `service_active` TINYINT( 1 ) NOT NULL DEFAULT '0', + ADD `servicestart_date` DATE NOT NULL, + ADD `serviceend_date` DATE NOT NULL, + ADD `lastinvoiced_date` DATE NOT NULL, + ADD `lastinvoiced_date_traffic` DATE NOT NULL, + ADD `lastinvoiced_date_diskspace` DATE NOT NULL, + ADD `customer_categories_once` TEXT NOT NULL DEFAULT '', + ADD `customer_categories_period` TEXT NOT NULL DEFAULT '', + ADD `invoice_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', + ADD `invoice_fee_hosting` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', + ADD `invoice_fee_hosting_customers` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', + ADD `invoice_fee_domains` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', + ADD `invoice_fee_traffic` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', + ADD `invoice_fee_diskspace` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', + ADD `invoice_fee_other` DECIMAL( 10,2 ) NOT NULL DEFAULT '0';"); + $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` + ADD `taxid` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `title` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `country` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `additional_service_description` TEXT NOT NULL DEFAULT '', + ADD `contract_date` DATE NOT NULL, + ADD `contract_number` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `contract_details` TEXT NOT NULL DEFAULT '', + ADD `included_domains_qty` INT( 11 ) NOT NULL DEFAULT '0', + ADD `included_domains_tld` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `additional_traffic_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', + ADD `additional_traffic_unit` BIGINT( 30 ) NOT NULL DEFAULT '0', + ADD `additional_diskspace_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', + ADD `additional_diskspace_unit` BIGINT( 30 ) NOT NULL DEFAULT '0', + ADD `taxclass` INT( 11 ) NOT NULL DEFAULT '0', + ADD `setup_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', + ADD `interval_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', + ADD `interval_length` INT( 11 ) NOT NULL DEFAULT '0', + ADD `interval_type` VARCHAR( 1 ) NOT NULL DEFAULT 'm', + ADD `interval_payment` TINYINT( 1 ) NOT NULL DEFAULT '0', + ADD `calc_tax` TINYINT( 1 ) NOT NULL DEFAULT '1', + ADD `term_of_payment` INT( 11 ) NOT NULL DEFAULT '0', + ADD `payment_every` INT( 11 ) NOT NULL DEFAULT '0', + ADD `payment_method` INT( 11 ) NOT NULL DEFAULT '0', + ADD `bankaccount_holder` TEXT NOT NULL DEFAULT '', + ADD `bankaccount_number` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `bankaccount_blz` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `bankaccount_bank` VARCHAR( 255 ) NOT NULL DEFAULT '', + ADD `service_active` TINYINT( 1 ) NOT NULL DEFAULT '0', + ADD `servicestart_date` DATE NOT NULL, + ADD `serviceend_date` DATE NOT NULL, + ADD `lastinvoiced_date` DATE NOT NULL, + ADD `lastinvoiced_date_traffic` DATE NOT NULL, + ADD `lastinvoiced_date_diskspace` DATE NOT NULL, + ADD `invoice_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', + ADD `invoice_fee_hosting` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', + ADD `invoice_fee_domains` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', + ADD `invoice_fee_traffic` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', + ADD `invoice_fee_diskspace` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', + ADD `invoice_fee_other` DECIMAL( 10,2 ) NOT NULL DEFAULT '0';"); + $db->query("ALTER TABLE `panel_domains` + ADD `add_date` INT( 11 ) NOT NULL DEFAULT '0', + ADD `registration_date` DATE NOT NULL, + ADD `taxclass` INT( 11 ) NOT NULL DEFAULT '0', + ADD `setup_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', + ADD `interval_fee` DECIMAL( 10,2 ) NOT NULL DEFAULT '0', + ADD `interval_length` INT( 11 ) NOT NULL DEFAULT '0', + ADD `interval_type` VARCHAR( 1 ) NOT NULL DEFAULT 'y', + ADD `interval_payment` TINYINT( 1 ) NOT NULL DEFAULT '0', + ADD `service_active` TINYINT( 1 ) NOT NULL DEFAULT '0', + ADD `servicestart_date` DATE NOT NULL, + ADD `serviceend_date` DATE NOT NULL, + ADD `lastinvoiced_date` DATE NOT NULL;"); + $db->query("CREATE TABLE `" . TABLE_BILLING_SERVICE_CATEGORIES . "` ( + `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `category_name` VARCHAR( 255 ) NOT NULL DEFAULT '', + `category_order` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', + `category_classname` VARCHAR( 255 ) NOT NULL DEFAULT '', + `category_classfile` VARCHAR( 255 ) NOT NULL DEFAULT '', + `category_cachefield` VARCHAR( 255 ) NOT NULL DEFAULT '', + `category_caption` VARCHAR( 255 ) NOT NULL DEFAULT '', + `category_rowcaption_setup` VARCHAR( 255 ) NOT NULL DEFAULT '', + `category_rowcaption_interval` VARCHAR( 255 ) NOT NULL DEFAULT '' + ) TYPE = MYISAM ;"); + $db->query("CREATE TABLE `" . TABLE_BILLING_SERVICE_CATEGORIES_ADMINS . "` ( + `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `category_name` VARCHAR( 255 ) NOT NULL DEFAULT '', + `category_order` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', + `category_mode` TINYINT( 1 ) NOT NULL DEFAULT '0', + `category_classname` VARCHAR( 255 ) NOT NULL DEFAULT '', + `category_classfile` VARCHAR( 255 ) NOT NULL DEFAULT '', + `category_cachefield` VARCHAR( 255 ) NOT NULL DEFAULT '', + `category_caption` VARCHAR( 255 ) NOT NULL DEFAULT '', + `category_rowcaption_setup` VARCHAR( 255 ) NOT NULL DEFAULT '', + `category_rowcaption_interval` VARCHAR( 255 ) NOT NULL DEFAULT '' + ) TYPE = MYISAM ;"); + $db->query("CREATE TABLE `" . TABLE_BILLING_SERVICE_DOMAINS_TEMPLATES . "` ( + `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `tld` VARCHAR( 255 ) NOT NULL DEFAULT '', + `valid_from` DATE NOT NULL, + `valid_to` DATE NOT NULL, + `taxclass` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', + `setup_fee` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00', + `interval_fee` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00', + `interval_length` INT( 11 ) NOT NULL DEFAULT '0', + `interval_type` VARCHAR( 1 ) NOT NULL DEFAULT 'y', + `interval_payment` TINYINT( 1 ) NOT NULL DEFAULT '0' + ) TYPE = MYISAM ;"); + $db->query("CREATE TABLE `" . TABLE_BILLING_SERVICE_OTHER . "` ( + `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `customerid` INT( 11 ) NOT NULL DEFAULT '0', + `templateid` INT( 11 ) NOT NULL DEFAULT '0', + `service_type` VARCHAR( 255 ) NOT NULL DEFAULT '', + `caption_setup` VARCHAR( 255 ) NOT NULL DEFAULT '', + `caption_interval` VARCHAR( 255 ) NOT NULL DEFAULT '', + `taxclass` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', + `quantity` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', + `setup_fee` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00', + `interval_fee` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00', + `interval_length` INT( 11 ) NOT NULL DEFAULT '0', + `interval_type` VARCHAR( 1 ) NOT NULL DEFAULT 'm', + `interval_payment` TINYINT( 1 ) NOT NULL DEFAULT '0', + `service_active` TINYINT( 1 ) NOT NULL DEFAULT '0', + `servicestart_date` DATE NOT NULL, + `serviceend_date` DATE NOT NULL, + `lastinvoiced_date` DATE NOT NULL + ) TYPE = MYISAM ;"); + $db->query("CREATE TABLE `" . TABLE_BILLING_SERVICE_OTHER_TEMPLATES . "` ( + `templateid` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `valid_from` DATE NOT NULL, + `valid_to` DATE NOT NULL, + `service_type` VARCHAR( 255 ) NOT NULL DEFAULT '', + `caption_setup` VARCHAR( 255 ) NOT NULL DEFAULT '', + `caption_interval` VARCHAR( 255 ) NOT NULL DEFAULT '', + `taxclass` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', + `setup_fee` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00', + `interval_fee` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00', + `interval_length` INT( 11 ) NOT NULL DEFAULT '0', + `interval_type` VARCHAR( 1 ) NOT NULL DEFAULT 'm', + `interval_payment` TINYINT( 1 ) NOT NULL DEFAULT '0' + ) TYPE = MYISAM ;"); + $db->query("CREATE TABLE `" . TABLE_BILLING_TAXCLASSES . "` ( + `classid` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `classname` VARCHAR( 255 ) NOT NULL DEFAULT '', + `default` TINYINT( 1 ) NOT NULL DEFAULT '0' + ) TYPE = MYISAM ;"); + $db->query("CREATE TABLE `" . TABLE_BILLING_TAXRATES . "` ( + `taxid` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `taxclass` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', + `taxrate` DECIMAL( 4, 4 ) NOT NULL , + `valid_from` DATE NOT NULL + ) TYPE = MYISAM ;"); + $db->query("CREATE TABLE `" . TABLE_BILLING_INVOICES . "` ( + `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `customerid` INT( 11 ) NOT NULL DEFAULT '0', + `xml` LONGTEXT NOT NULL DEFAULT '', + `invoice_date` DATE NOT NULL, + `state` TINYINT( 1 ) NOT NULL DEFAULT '0', + `state_change` INT( 11 ) NOT NULL DEFAULT '0', + `invoice_number` VARCHAR( 255 ) NOT NULL DEFAULT '', + `total_fee` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00', + `total_fee_taxed` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00' + ) TYPE = MYISAM ;"); + $db->query("CREATE TABLE `" . TABLE_BILLING_INVOICES_ADMINS . "` ( + `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `adminid` INT( 11 ) NOT NULL DEFAULT '0', + `xml` LONGTEXT NOT NULL DEFAULT '', + `invoice_date` DATE NOT NULL, + `state` TINYINT( 1 ) NOT NULL DEFAULT '0', + `state_change` INT( 11 ) NOT NULL DEFAULT '0', + `invoice_number` VARCHAR( 255 ) NOT NULL DEFAULT '', + `total_fee` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00', + `total_fee_taxed` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00' + ) TYPE = MYISAM ;"); + $db->query("CREATE TABLE `" . TABLE_BILLING_INVOICE_CHANGES . "` ( + `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `customerid` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', + `userid` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', + `timestamp` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', + `key` VARCHAR( 255 ) NOT NULL DEFAULT '', + `action` TINYINT( 1 ) NOT NULL DEFAULT '0', + `caption` VARCHAR( 255 ) NOT NULL DEFAULT '', + `interval` VARCHAR( 255 ) NOT NULL DEFAULT '', + `quantity` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', + `total_fee` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00', + `taxrate` DECIMAL( 4, 4 ) NOT NULL + ) TYPE = MYISAM ;"); + $db->query("CREATE TABLE `" . TABLE_BILLING_INVOICE_CHANGES_ADMINS . "` ( + `id` INT( 11 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , + `adminid` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', + `userid` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', + `timestamp` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', + `key` VARCHAR( 255 ) NOT NULL DEFAULT '', + `action` TINYINT( 1 ) NOT NULL DEFAULT '0', + `caption` VARCHAR( 255 ) NOT NULL DEFAULT '', + `interval` VARCHAR( 255 ) NOT NULL DEFAULT '', + `quantity` INT( 11 ) UNSIGNED NOT NULL DEFAULT '0', + `total_fee` DECIMAL( 10, 2 ) NOT NULL DEFAULT '0.00', + `taxrate` DECIMAL( 4, 4 ) NOT NULL + ) TYPE = MYISAM ;"); + $db->query("CREATE TABLE `" . TABLE_PANEL_DISKSPACE . "` ( + `id` int(11) unsigned NOT NULL auto_increment, + `customerid` int(11) unsigned NOT NULL default '0', + `year` int(4) unsigned zerofill NOT NULL default '0000', + `month` int(2) unsigned zerofill NOT NULL default '00', + `day` int(2) unsigned zerofill NOT NULL default '00', + `stamp` int(11) unsigned NOT NULL default '0', + `webspace` bigint(30) unsigned NOT NULL default '0', + `mail` bigint(30) unsigned NOT NULL default '0', + `mysql` bigint(30) unsigned NOT NULL default '0', + PRIMARY KEY (`id`), + KEY `customerid` (`customerid`) + ) TYPE=MyISAM ;"); + $db->query("CREATE TABLE `" . TABLE_PANEL_DISKSPACE_ADMINS . "` ( + `id` int(11) unsigned NOT NULL auto_increment, + `adminid` int(11) unsigned NOT NULL default '0', + `year` int(4) unsigned zerofill NOT NULL default '0000', + `month` int(2) unsigned zerofill NOT NULL default '00', + `day` int(2) unsigned zerofill NOT NULL default '00', + `stamp` int(11) unsigned NOT NULL default '0', + `webspace` bigint(30) unsigned NOT NULL default '0', + `mail` bigint(30) unsigned NOT NULL default '0', + `mysql` bigint(30) unsigned NOT NULL default '0', + PRIMARY KEY (`id`), + KEY `adminid` (`adminid`) + ) TYPE=MyISAM ;"); + $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES . "` (`id`, `category_name`, `category_order`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (1, 'hosting', 10, 'hosting', 'lib/billing_class_hosting.php', 'invoice_fee_hosting', 'hosting_caption', 'hosting_rowcaption_setup', 'hosting_rowcaption_interval');"); + $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES . "` (`id`, `category_name`, `category_order`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (2, 'domains', 20, 'domains', 'lib/billing_class_domains.php', 'invoice_fee_domains', 'domains_caption', 'domains_rowcaption_setup', 'domains_rowcaption_interval');"); + $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES . "` (`id`, `category_name`, `category_order`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (3, 'traffic', 30, 'traffic', 'lib/billing_class_traffic.php', 'invoice_fee_traffic', 'traffic_caption', 'traffic_rowcaption_setup', 'traffic_rowcaption_interval');"); + $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES . "` (`id`, `category_name`, `category_order`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (4, 'diskspace', 40, 'diskspace', 'lib/billing_class_diskspace.php', 'invoice_fee_diskspace', 'diskspace_caption', 'diskspace_rowcaption_setup', 'diskspace_rowcaption_interval');"); + $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES . "` (`id`, `category_name`, `category_order`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (5, 'other', 50, 'other', 'lib/billing_class_other.php', 'invoice_fee_other', 'other_caption', 'other_rowcaption_setup', 'other_rowcaption_interval');"); + $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES_ADMINS . "` (`id`, `category_name`, `category_order`, `category_mode`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (1, 'hosting', 10, 0, 'hosting', 'lib/billing_class_hosting.php', 'invoice_fee_hosting', 'hosting_caption', 'hosting_rowcaption_setup', 'hosting_rowcaption_interval');"); + $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES_ADMINS . "` (`id`, `category_name`, `category_order`, `category_mode`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (2, 'hosting_customers', 20, 1, 'hosting', 'lib/billing_class_hosting.php', 'invoice_fee_hosting_customers', 'hosting_caption', 'hosting_rowcaption_setup_withloginname', 'hosting_rowcaption_interval_withloginname');"); + $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES_ADMINS . "` (`id`, `category_name`, `category_order`, `category_mode`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (3, 'domains', 30, 1, 'domains', 'lib/billing_class_domains.php', 'invoice_fee_domains', 'domains_caption', 'domains_rowcaption_setup', 'domains_rowcaption_interval');"); + $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES_ADMINS . "` (`id`, `category_name`, `category_order`, `category_mode`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (4, 'traffic', 40, 0, 'traffic', 'lib/billing_class_traffic.php', 'invoice_fee_traffic', 'traffic_caption', 'traffic_rowcaption_setup', 'traffic_rowcaption_interval');"); + $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES_ADMINS . "` (`id`, `category_name`, `category_order`, `category_mode`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (5, 'diskspace', 50, 0, 'diskspace', 'lib/billing_class_diskspace.php', 'invoice_fee_diskspace', 'diskspace_caption', 'diskspace_rowcaption_setup', 'diskspace_rowcaption_interval');"); + $db->query("INSERT INTO `" . TABLE_BILLING_SERVICE_CATEGORIES_ADMINS . "` (`id`, `category_name`, `category_order`, `category_mode`, `category_classname`, `category_classfile`, `category_cachefield`, `category_caption`, `category_rowcaption_setup`, `category_rowcaption_interval`) VALUES (6, 'other', 60, 1, 'other', 'lib/billing_class_other.php', 'invoice_fee_other', 'other_caption', 'other_rowcaption_setup', 'other_rowcaption_interval');"); + $db->query("INSERT INTO `" . TABLE_BILLING_TAXCLASSES . "` (`classid`, `classname`, `default`) VALUES ( NULL, 'MwSt Deutschland', '1' );"); + $db->query("INSERT INTO `" . TABLE_BILLING_TAXCLASSES . "` (`classid`, `classname`, `default`) VALUES ( NULL, 'MwSt Deutschland (reduziert)', '0' );"); + $db->query("INSERT INTO `" . TABLE_BILLING_TAXRATES . "` (`taxid`, `taxclass`, `taxrate`, `valid_from`) VALUES ( NULL, 1, 0.1600, '0' );"); + $db->query("INSERT INTO `" . TABLE_BILLING_TAXRATES . "` (`taxid`, `taxclass`, `taxrate`, `valid_from`) VALUES ( NULL, 1, 0.1900, '2007-01-01' );"); + $db->query("INSERT INTO `" . TABLE_BILLING_TAXRATES . "` (`taxid`, `taxclass`, `taxrate`, `valid_from`) VALUES ( NULL, 2, 0.0700, '0' );"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settingid`, `settinggroup`, `varname`, `value`) VALUES (NULL, 'billing', 'invoicenumber_count', '0');"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn21\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn21'; + } + + if($settings['panel']['version'] == '1.2.19-svn21') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn21 to 1.2.19-svn22"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'allow_preset_admin', '0')"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn22\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn22'; + } + + if($settings['panel']['version'] == '1.2.19-svn22') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn22 to 1.2.19-svn23"); + $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` ADD `edit_billingdata` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `change_serversettings`"); + $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `edit_billingdata` = '1' WHERE `customers_see_all` = '1'"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn23\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn23'; + } + + if($settings['panel']['version'] == '1.2.19-svn23') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn23 to 1.2.19-svn24"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('billing', 'activate_billing', '0')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('billing', 'highlight_inactive', '0')"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn24\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn24'; + } + + if($settings['panel']['version'] == '1.2.19-svn24') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn24 to 1.2.19-svn25"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn25\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn25'; + } + + if($settings['panel']['version'] == '1.2.19-svn25') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn25 to 1.2.19-svn26"); + $db->query("INSERT INTO " . TABLE_PANEL_LANGUAGE . " SET `language` = 'Swedish', `file` = 'lng/swedish.lng.php';"); + $db->query("INSERT INTO " . TABLE_PANEL_LANGUAGE . " SET `language` = 'Czech', `file` = 'lng/czech.lng.php';"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn26\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn26'; + } + + if($settings['panel']['version'] == '1.2.19-svn26') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn26 to 1.2.19-svn27"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'webserver', 'apache2')"); + $db->query("CREATE TABLE `" . TABLE_MAIL_AUTORESPONDER . "` ( + `email` varchar(255) NOT NULL default '', + `message` text NOT NULL, + `enabled` tinyint(1) NOT NULL default '0', + `subject` varchar(255) NOT NULL default '', + `customerid` int(11) NOT NULL default '0', + PRIMARY KEY (`email`), + KEY `customerid` (`customerid`), + FULLTEXT KEY `message` (`message`) + ) ENGINE=MyISAM"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('autoresponder', 'autoresponder_active', '0')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('autoresponder', 'last_autoresponder_run', '0')"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn27\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn27'; + } + + if($settings['panel']['version'] == '1.2.19-svn27') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn27 to 1.2.19-svn28"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('admin', 'show_version_login', '0')"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn28\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn28'; + } + + if($settings['panel']['version'] == '1.2.19-svn28') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn28 to 1.2.19-svn29"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('admin', 'show_version_footer', '0')"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn29\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn29'; + } + + if($settings['panel']['version'] == '1.2.19-svn29') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn29 to 1.2.19-svn30"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('admin', 'syscp_graphic', 'images/header.gif')"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn30\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn30'; + } + + if($settings['panel']['version'] == '1.2.19-svn30') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn30 to 1.2.19-svn31"); + + //fcgid improvements + + $db->query("CREATE TABLE `" . TABLE_PANEL_PHPCONFIGS . "` ( + `id` int(11) unsigned NOT NULL auto_increment, + `phpsettings` text NOT NULL, + `description` varchar(50) NOT NULL, + PRIMARY KEY (`id`) + ) ENGINE=MyISAM"); + $db->query("INSERT INTO `" . TABLE_PANEL_PHPCONFIGS . "` (`id`, `phpsettings`, `description`) VALUES(1, 'short_open_tag = On\r\nasp_tags = Off\r\nprecision = 14\r\noutput_buffering = 4096\r\nallow_call_time_pass_reference = Off\r\nsafe_mode = {SAFE_MODE}\r\nsafe_mode_gid = Off\r\nsafe_mode_include_dir = \"{PEAR_DIR}\"\r\nsafe_mode_allowed_env_vars = PHP_\r\nsafe_mode_protected_env_vars = LD_LIBRARY_PATH\r\nopen_basedir = \"{OPEN_BASEDIR}\"\r\ndisable_functions = exec,passthru,shell_exec,system,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate\r\ndisable_classes =\r\nexpose_php = Off\r\nmax_execution_time = 30\r\nmax_input_time = 60\r\nmemory_limit = 16M\r\npost_max_size = 16M\r\nerror_reporting = E_ALL & ~E_NOTICE\r\ndisplay_errors = On\r\ndisplay_startup_errors = Off\r\nlog_errors = On\r\nlog_errors_max_len = 1024\r\nignore_repeated_errors = Off\r\nignore_repeated_source = Off\r\nreport_memleaks = On\r\ntrack_errors = Off\r\nhtml_errors = Off\r\nvariables_order = \"GPCS\"\r\nregister_globals = Off\r\nregister_argc_argv = Off\r\ngpc_order = \"GPC\"\r\nmagic_quotes_gpc = Off\r\nmagic_quotes_runtime = Off\r\nmagic_quotes_sybase = Off\r\ninclude_path = \".:{PEAR_DIR}\"\r\nenable_dl = Off\r\nfile_uploads = On\r\nupload_tmp_dir = \"{TMP_DIR}\"\r\nupload_max_filesize = 32M\r\nallow_url_fopen = Off\r\nsendmail_path = \"/usr/sbin/sendmail -t -f {CUSTOMER_EMAIL}\"\r\nsession.save_handler = files\r\nsession.save_path = \"{TMP_DIR}\"\r\nsession.use_cookies = 1\r\nsession.name = PHPSESSID\r\nsession.auto_start = 0\r\nsession.cookie_lifetime = 0\r\nsession.cookie_path = /\r\nsession.cookie_domain =\r\nsession.serialize_handler = php\r\nsession.gc_probability = 1\r\nsession.gc_divisor = 1000\r\nsession.gc_maxlifetime = 1440\r\nsession.bug_compat_42 = 0\r\nsession.bug_compat_warn = 1\r\nsession.referer_check =\r\nsession.entropy_length = 16\r\nsession.entropy_file = /dev/urandom\r\nsession.cache_limiter = nocache\r\nsession.cache_expire = 180\r\nsession.use_trans_sid = 0\r\nsuhosin.simulation = Off\r\nsuhosin.mail.protect = 1\r\n', 'Default Config')"); + $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `phpsettingid` INT( 11 ) UNSIGNED NOT NULL DEFAULT '1'"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES('system', 'mod_fcgid_wrapper', '0')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES('system', 'mod_fcgid_starter', '0')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES('system', 'mod_fcgid_peardir', '/usr/share/php/:/usr/share/php5/')"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn31\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn31'; + } + + if($settings['panel']['version'] == '1.2.19-svn31') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn31 to 1.2.19-svn32"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES('system', 'index_file_extension', 'html');"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn32\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn32'; + } + + if($settings['panel']['version'] == '1.2.19-svn32') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn32 to 1.2.19-svn33"); + $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `dkim_id` INT( 11 ) UNSIGNED NOT NULL AFTER `dkim`, ADD `dkim_privkey` TEXT NOT NULL AFTER `dkim_id`, ADD `dkim_pubkey` TEXT NOT NULL AFTER `dkim_privkey`"); + $db->query("DROP TABLE IF EXISTS `mail_dkim`"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn33\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn33'; + } + + if($settings['panel']['version'] == '1.2.19-svn33') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn33 to 1.2.19-svn34"); + $db->query("DELETE FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup` = 'system' AND `varname` = 'userdns'"); + $db->query("DELETE FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup` = 'system' AND `varname` = 'customerdns'"); + $db->query("DROP TABLE IF EXISTS `panel_dns`"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn34\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn34'; + } + + if($settings['panel']['version'] == '1.2.19-svn34') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn34 to 1.2.19-svn35"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('aps', 'items_per_page', '20')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('aps', 'upload_fields', '5')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('aps', 'aps_active', '0')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('aps', 'php-extension', '')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('aps', 'php-configuration', '')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('aps', 'webserver-htaccess', '')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('aps', 'php-function', '')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('aps', 'webserver-module', '')"); + $db->query("CREATE TABLE IF NOT EXISTS `" . TABLE_APS_INSTANCES . "` ( + `ID` int(4) NOT NULL auto_increment, + `CustomerID` int(4) NOT NULL, + `PackageID` int(4) NOT NULL, + `Status` int(4) NOT NULL, + PRIMARY KEY (`ID`) + ) ENGINE=MyISAM"); + $db->query("CREATE TABLE IF NOT EXISTS `" . TABLE_APS_PACKAGES . "` ( + `ID` int(4) NOT NULL auto_increment, + `Path` varchar(500) NOT NULL, + `Name` varchar(500) NOT NULL, + `Version` varchar(20) NOT NULL, + `Release` int(4) NOT NULL, + `Status` int(1) NOT NULL default '1', + PRIMARY KEY (`ID`) + ) ENGINE=MyISAM"); + $db->query("CREATE TABLE IF NOT EXISTS `" . TABLE_APS_SETTINGS . "` ( + `ID` int(4) NOT NULL auto_increment, + `InstanceID` int(4) NOT NULL, + `Name` varchar(250) NOT NULL, + `Value` varchar(250) NOT NULL, + PRIMARY KEY (`ID`) + ) ENGINE=MyISAM"); + $db->query("CREATE TABLE IF NOT EXISTS `" . TABLE_APS_TASKS . "` ( + `ID` int(4) NOT NULL auto_increment, + `InstanceID` int(4) NOT NULL, + `Task` int(4) NOT NULL, + PRIMARY KEY (`ID`) + ) ENGINE=MyISAM"); + $db->query("CREATE TABLE IF NOT EXISTS `" . TABLE_APS_TEMP_SETTINGS . "` ( + `ID` int(4) NOT NULL auto_increment, + `PackageID` int(4) NOT NULL, + `CustomerID` int(4) NOT NULL, + `Name` varchar(250) NOT NULL, + `Value` varchar(250) NOT NULL, + PRIMARY KEY (`ID`) + ) ENGINE=MyISAM"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn35\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn35'; + } + + if($settings['panel']['version'] == '1.2.19-svn35') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn35 to 1.2.19-svn36"); + $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `mod_fcgid_starter` INT( 4 ) NULL DEFAULT '-1'"); + $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` ADD `can_manage_aps_packages` TINYINT( 1 ) NOT NULL DEFAULT '1'"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn36\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn36'; + } + + if($settings['panel']['version'] == '1.2.19-svn36') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn36 to 1.2.19-svn37"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('system', 'realtime_port', '0')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('session', 'allow_multiple_login', '0')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'allow_domain_change_admin', '0')"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES ('panel', 'allow_domain_change_customer', '0')"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn37\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn37'; + } + + if($settings['panel']['version'] == '1.2.19-svn37') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn37 to 1.2.19-svn38"); + $db->query("ALTER TABLE `" . TABLE_PANEL_PHPCONFIGS . "` ADD `binary` VARCHAR( 255 ) NOT NULL, ADD `file_extensions` VARCHAR( 255 ) NOT NULL, ADD `mod_fcgid_starter` int(4) NOT NULL DEFAULT '-1', ADD `mod_fcgid_maxrequests` int(4) NOT NULL DEFAULT '-1'"); + $db->query("ALTER TABLE `" . TABLE_PANEL_DOMAINS . "` ADD `mod_fcgid_maxrequests` INT( 4 ) NULL DEFAULT '-1'"); + $db->query("UPDATE `" . TABLE_PANEL_PHPCONFIGS . "` SET `binary` = '/usr/bin/php-cgi', `file_extensions` = 'php'"); + $db->query("INSERT INTO `" . TABLE_PANEL_SETTINGS . "` (`settinggroup`, `varname`, `value`) VALUES('system', 'mod_fcgid_maxrequests', '250')"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn38\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn38'; + } + + if($settings['panel']['version'] == '1.2.19-svn38') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn38 to 1.2.19-svn39"); + $db->query("ALTER TABLE `" . TABLE_PANEL_ADMINS . "` ADD `aps_packages` INT( 5 ) NOT NULL DEFAULT '0', ADD `aps_packages_used` INT( 5 ) NOT NULL DEFAULT '0'"); + $db->query("ALTER TABLE `" . TABLE_PANEL_CUSTOMERS . "` ADD `aps_packages` INT( 5 ) NOT NULL DEFAULT '0', ADD `aps_packages_used` INT( 5 ) NOT NULL DEFAULT '0'"); + + //give admins which can see all customers and domains plus change serversettings the ability to have unlimited aps instances + + $admins = $db->query("SELECT `adminid` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `customers_see_all` = 1 AND `domains_see_all` = 1 AND `change_serversettings` = 1"); + + while($admin = $db->fetch_array($admins)) + { + $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `aps_packages` = -1 WHERE `adminid` = '" . $admin['adminid'] . "'"); + } + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn39\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn39'; + } + + if($settings['panel']['version'] == '1.2.19-svn39') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn39 to 1.2.19-svn40"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `varname` = 'webserver' WHERE `settinggroup` = 'system' AND `varname` = 'apacheversion'"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn40\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn40'; + } + + if($settings['panel']['version'] == '1.2.19-svn40') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn40 to 1.2.19-svn41"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn41\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn41'; + } + + if($settings['panel']['version'] == '1.2.19-svn41') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn41 to 1.2.19-svn42"); + $db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` SET `value` = '100' WHERE `settinggroup` = 'system' AND `varname` = 'mail_quota' AND `value` = '104857600'"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn42\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn42'; + } + + if($settings['panel']['version'] == '1.2.19-svn42') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn42 to 1.2.19-svn43"); + + // Going to fix double slashes in the database + + $result = $db->query("SELECT * FROM `" . TABLE_PANEL_HTACCESS . "` WHERE `path` LIKE '%//%';"); + + while($row = $db->fetch_array($result)) + { + $row['path'] = makeCorrectDir($row['path']); + $db->query("UPDATE `" . TABLE_PANEL_HTACCESS . "` SET `path` = '" . $db->escape($row['path']) . "' WHERE `id` = '" . $row['id'] . "';"); + } + + $result = $db->query("SELECT * FROM `" . TABLE_PANEL_HTPASSWDS . "` WHERE `path` LIKE '%//%';"); + + while($row = $db->fetch_array($result)) + { + $row['path'] = makeCorrectDir($row['path']); + $db->query("UPDATE `" . TABLE_PANEL_HTPASSWDS . "` SET `path` = '" . $db->escape($row['path']) . "' WHERE `id` = '" . $row['id'] . "';"); + } + + $result = $db->query("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `documentroot` LIKE '%//%';"); + + while($row = $db->fetch_array($result)) + { + if(!preg_match("#^https?://#i", $row['documentroot'])) + { + $row['documentroot'] = makeCorrectDir($row['documentroot']); + $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `documentroot` = '" . $db->escape($row['documentroot']) . "' WHERE `id` = '" . $row['id'] . "';"); + } + } + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.2.19-svn43\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.2.19-svn43'; + } + + if($settings['panel']['version'] == '1.2.19-svn43') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19-svn43 to 1.4"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.4\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.4'; + } +} + +// php filter-extension check + + + ?> \ No newline at end of file diff --git a/install/updates/syscp/1.4/update_1.4.inc.php b/install/updates/syscp/1.4/update_1.4.inc.php index a3e6193a..29647b6f 100644 --- a/install/updates/syscp/1.4/update_1.4.inc.php +++ b/install/updates/syscp/1.4/update_1.4.inc.php @@ -1,120 +1,120 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Install - * @version $Id$ - */ - -if($settings['panel']['version'] == '1.4') -{ - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.4 to 1.4-svn1"); - - // Going to fix the stuff the update 1.2.19-svn42 to 1.2.19-svn43 broke - - $result = $db->query("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `documentroot` LIKE 'http%';"); - - while($row = $db->fetch_array($result)) - { - if(preg_match("#(https?)://?(.*)#i", $row['documentroot'], $matches)) - { - $row['documentroot'] = $matches[1] . "://" . $matches[2]; - $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `documentroot` = '" . $db->escape($row['documentroot']) . "' WHERE `id` = '" . $row['id'] . "';"); - } - } - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.4-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.4-svn1'; -} - -if($settings['panel']['version'] == '1.4-svn1') -{ - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.4-svn1 to 1.4.1"); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.4.1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.4.1'; -} - -if($settings['panel']['version'] == '1.4.1') -{ - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.4.1 to 1.4.1-svn1"); - - // give at least ONE admin the permission to edit phpsettings, bug #1031 - - $cntCanEditPHP = $db->query_first("SELECT COUNT(`caneditphpsettings`) as `cnt` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `caneditphpsettings` = '1'"); - - if($cntCanEditPHP['cnt'] <= 0) - { - // none of the admins can edit php-settings, - //so we give those who can edit serversettings the right to edit php-settings - - $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `caneditphpsettings` = '1' WHERE `change_serversettings` = '1'"); - } - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'1.4.1-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = '1.4.1-svn1'; -} - -if($settings['panel']['version'] == '1.4.1-svn1') -{ - $updateto = '1.4.1-svn2'; - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from " . $settings['panel']['version'] . " to " . $updateto); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'' . $updateto . '\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = $updateto; -} - -if($settings['panel']['version'] == '1.4.1-svn2') -{ - $updateto = '1.4.1-svn3'; - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from " . $settings['panel']['version'] . " to " . $updateto); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'' . $updateto . '\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = $updateto; -} - -if($settings['panel']['version'] == '1.4.1-svn3') -{ - $updateto = '1.4.2'; - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from " . $settings['panel']['version'] . " to " . $updateto); - - // set new version - - $query = 'UPDATE `%s` SET `value` = \'' . $updateto . '\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; - $query = sprintf($query, TABLE_PANEL_SETTINGS); - $db->query($query); - $settings['panel']['version'] = $updateto; -} - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Install + * @version $Id$ + */ + +if($settings['panel']['version'] == '1.4') +{ + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.4 to 1.4-svn1"); + + // Going to fix the stuff the update 1.2.19-svn42 to 1.2.19-svn43 broke + + $result = $db->query("SELECT * FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `documentroot` LIKE 'http%';"); + + while($row = $db->fetch_array($result)) + { + if(preg_match("#(https?)://?(.*)#i", $row['documentroot'], $matches)) + { + $row['documentroot'] = $matches[1] . "://" . $matches[2]; + $db->query("UPDATE `" . TABLE_PANEL_DOMAINS . "` SET `documentroot` = '" . $db->escape($row['documentroot']) . "' WHERE `id` = '" . $row['id'] . "';"); + } + } + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.4-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.4-svn1'; +} + +if($settings['panel']['version'] == '1.4-svn1') +{ + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.4-svn1 to 1.4.1"); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.4.1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.4.1'; +} + +if($settings['panel']['version'] == '1.4.1') +{ + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.4.1 to 1.4.1-svn1"); + + // give at least ONE admin the permission to edit phpsettings, bug #1031 + + $cntCanEditPHP = $db->query_first("SELECT COUNT(`caneditphpsettings`) as `cnt` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `caneditphpsettings` = '1'"); + + if($cntCanEditPHP['cnt'] <= 0) + { + // none of the admins can edit php-settings, + //so we give those who can edit serversettings the right to edit php-settings + + $db->query("UPDATE `" . TABLE_PANEL_ADMINS . "` SET `caneditphpsettings` = '1' WHERE `change_serversettings` = '1'"); + } + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'1.4.1-svn1\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = '1.4.1-svn1'; +} + +if($settings['panel']['version'] == '1.4.1-svn1') +{ + $updateto = '1.4.1-svn2'; + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from " . $settings['panel']['version'] . " to " . $updateto); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'' . $updateto . '\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = $updateto; +} + +if($settings['panel']['version'] == '1.4.1-svn2') +{ + $updateto = '1.4.1-svn3'; + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from " . $settings['panel']['version'] . " to " . $updateto); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'' . $updateto . '\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = $updateto; +} + +if($settings['panel']['version'] == '1.4.1-svn3') +{ + $updateto = '1.4.2'; + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from " . $settings['panel']['version'] . " to " . $updateto); + + // set new version + + $query = 'UPDATE `%s` SET `value` = \'' . $updateto . '\' WHERE `settinggroup` = \'panel\' AND `varname` = \'version\''; + $query = sprintf($query, TABLE_PANEL_SETTINGS); + $db->query($query); + $settings['panel']['version'] = $updateto; +} + ?> \ No newline at end of file diff --git a/install/updatesql.php b/install/updatesql.php index 7004a3a7..531130c2 100644 --- a/install/updatesql.php +++ b/install/updatesql.php @@ -1,95 +1,95 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Install - * @version $Id$ - */ - -$updatelog = FroxlorLogger::getInstanceOf(array('loginname' => 'updater'), $db, $settings); - -/* - * since froxlor, we have to check if there's still someone - * out there using syscp and needs to upgrade - */ -if(!isFroxlor()) -{ - /** - * First case: We are updating from a version < 1.0.10 - */ - - if(!isset($settings['panel']['version']) - || (substr($settings['panel']['version'], 0, 3) == '1.0' && $settings['panel']['version'] != '1.0.10')) - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.0 to 1.0.10"); - include_once (makeCorrectFile(dirname(__FILE__).'/updates/syscp/1.0/update_1.0_1.0.10.inc.php')); - } - - /** - * Second case: We are updating from version = 1.0.10 - */ - - if($settings['panel']['version'] == '1.0.10') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.0.10 to 1.2-beta1"); - include_once (makeCorrectFile(dirname(__FILE__).'/updates/syscp/1.0/update_1.0.10_1.2-beta1.inc.php')); - } - - /** - * Third case: We are updating from a version > 1.2-beta1 - */ - - if(substr($settings['panel']['version'], 0, 3) == '1.2') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2-beta1 to 1.2.19"); - include_once (makeCorrectFile(dirname(__FILE__).'/updates/syscp/1.2/update_1.2-beta1_1.2.19.inc.php')); - } - - /** - * 4th case: We are updating from 1.2.19 to 1.2.20 (prolly the last from the 1.2.x series) - */ - - if(substr($settings['panel']['version'], 0, 6) == '1.2.19') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19 to 1.4"); - include_once (makeCorrectFile(dirname(__FILE__).'/updates/syscp/1.2/update_1.2.19_1.4.inc.php')); - } - - /** - * 5th case: We are updating from a version >= 1.4 - */ - - if(substr($settings['panel']['version'], 0, 3) == '1.4') - { - $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.4"); - include_once (makeCorrectFile(dirname(__FILE__).'/updates/syscp/1.4/update_1.4.inc.php')); - } - - /** - * Upgrading SysCP to Froxlor-0.9 - * - * when we reach this part, all necessary updates - * should have been installes automatically by the - * update scripts. - */ - include_once (makeCorrectFile(dirname(__FILE__).'/updates/froxlor/upgrade_syscp.inc.php')); - -} - -if(isFroxlor()) -{ - include_once (makeCorrectFile(dirname(__FILE__).'/updates/froxlor/0.9/update_0.9.inc.php')); -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Install + * @version $Id$ + */ + +$updatelog = FroxlorLogger::getInstanceOf(array('loginname' => 'updater'), $db, $settings); + +/* + * since froxlor, we have to check if there's still someone + * out there using syscp and needs to upgrade + */ +if(!isFroxlor()) +{ + /** + * First case: We are updating from a version < 1.0.10 + */ + + if(!isset($settings['panel']['version']) + || (substr($settings['panel']['version'], 0, 3) == '1.0' && $settings['panel']['version'] != '1.0.10')) + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.0 to 1.0.10"); + include_once (makeCorrectFile(dirname(__FILE__).'/updates/syscp/1.0/update_1.0_1.0.10.inc.php')); + } + + /** + * Second case: We are updating from version = 1.0.10 + */ + + if($settings['panel']['version'] == '1.0.10') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.0.10 to 1.2-beta1"); + include_once (makeCorrectFile(dirname(__FILE__).'/updates/syscp/1.0/update_1.0.10_1.2-beta1.inc.php')); + } + + /** + * Third case: We are updating from a version > 1.2-beta1 + */ + + if(substr($settings['panel']['version'], 0, 3) == '1.2') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2-beta1 to 1.2.19"); + include_once (makeCorrectFile(dirname(__FILE__).'/updates/syscp/1.2/update_1.2-beta1_1.2.19.inc.php')); + } + + /** + * 4th case: We are updating from 1.2.19 to 1.2.20 (prolly the last from the 1.2.x series) + */ + + if(substr($settings['panel']['version'], 0, 6) == '1.2.19') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.2.19 to 1.4"); + include_once (makeCorrectFile(dirname(__FILE__).'/updates/syscp/1.2/update_1.2.19_1.4.inc.php')); + } + + /** + * 5th case: We are updating from a version >= 1.4 + */ + + if(substr($settings['panel']['version'], 0, 3) == '1.4') + { + $updatelog->logAction(ADM_ACTION, LOG_WARNING, "Updating from 1.4"); + include_once (makeCorrectFile(dirname(__FILE__).'/updates/syscp/1.4/update_1.4.inc.php')); + } + + /** + * Upgrading SysCP to Froxlor-0.9 + * + * when we reach this part, all necessary updates + * should have been installes automatically by the + * update scripts. + */ + include_once (makeCorrectFile(dirname(__FILE__).'/updates/froxlor/upgrade_syscp.inc.php')); + +} + +if(isFroxlor()) +{ + include_once (makeCorrectFile(dirname(__FILE__).'/updates/froxlor/0.9/update_0.9.inc.php')); +} + +?> diff --git a/lib/classes/aps/class.ApsInstaller.php b/lib/classes/aps/class.ApsInstaller.php index f3360118..e94eed03 100644 --- a/lib/classes/aps/class.ApsInstaller.php +++ b/lib/classes/aps/class.ApsInstaller.php @@ -1,570 +1,570 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package APS - * @version $Id$ - * @todo logging - * run with user uid/gid - * folder truncation/tar all files - */ - -class ApsInstaller extends ApsParser -{ - private $db = false; - private $db_root = false; - private $DomainPath = ''; - private $Domain = ''; - private $RealPath = ''; - private $RootDir = ''; - private $Hosts = ''; - - /** - * constructor of class. setup some basic variables - * - * @param settings array with the global settings from syscp - * @param db instance of the database class from syscp - * @param db_root instance of the database class from syscp with root permissions - */ - - public function __construct($settings, $db, $db_root) - { - $this->db = $db; - $this->db_root = $db_root; - $this->RootDir = dirname(dirname(__FILE__)) . '/'; - $this->Hosts = $settings['system']['mysql_access_host']; - } - - /** - * main function of class which handles all - */ - - public function InstallHandler() - { - chdir($this->RootDir); - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_TASKS . '` AS `t` INNER JOIN `' . TABLE_APS_INSTANCES . '` AS `i` ON `t`.`InstanceID` = `i`.`ID` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `TASK` NOT IN (' . TASK_SYSTEM_UPDATE . ', ' . TASK_SYSTEM_DOWNLOAD . ')'); - - while($Row = $this->db->fetch_array($result)) - { - //check for existing aps xml file - - if(!file_exists($this->RootDir . 'packages/' . $Row['Path'] . '/APP-META.xml')) - { - $this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_ERROR . ' WHERE `ID` = ' . $this->db->escape($Row['InstanceID'])); - continue; - } - - //get contents and parse them - - $XmlContent = file_get_contents($this->RootDir . 'packages/' . $Row['Path'] . '/APP-META.xml'); - $Xml = new SimpleXMLElement($XmlContent); - - //check for unparseable xml data - - if($Xml == false) - { - $this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_ERROR . ' WHERE `ID` = ' . $this->db->escape($Row['InstanceID'])); - continue; - } - - $Task = $Row['Task']; - $this->DomainPath = ''; - $this->Domain = ''; - $this->RealPath = ''; - - //lock instance so installation cannot be canceled from the panel - - $this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_TASK_ACTIVE . ' WHERE `ID` = ' . $this->db->escape($Row['InstanceID'])); - - //setup environment with data for domain/installation location - - self::PrepareBasics($Row); - - //create database if necessary and setup environment variables - - self::PrepareDatabase($Xml, $Row, $Task); - - //unpack installation scripts and package files if necessary - - if(self::PrepareFiles($Xml, $Row, $Task)) - { - //setup environment variables fetched from installation wizard - - self::PrepareWizardData($Xml, $Row, $Task); - - //run installation scripts from packages - - self::RunInstaller($Xml, $Row, $Task); - } - - //remove installation scripts - - self::CleanupData($Xml, $Row, $Task); - unset($Xml); - } - } - - /** - * run the installation script and log errors if there are some - * - * @param xml instance of a valid xml object with a parsed APP-META.xml file - * @param row current entry from the database for app to handle - * @param task numeric code to specify what to do - * @return success true/error false - */ - - private function RunInstaller($Xml, $Row, $Task) - { - //installation - - if($Task == TASK_INSTALL) - { - //setup right path and run installation script - - chdir($this->RealPath . $this->DomainPath . '/install_scripts/'); - $Return = array(); - $ReturnStatus = 0; - $Return = safe_exec('php ' . escapeshellarg($this->RealPath . $this->DomainPath . '/install_scripts/configure install'), $ReturnStatus); - - if($ReturnStatus != 0) - { - //write output of script on error into database for admin - - $Buffer = ''; - $Count = 0; - foreach($Return as $Line) - { - $Count+= 1; - $Buffer.= $Line; - - if($Count != count($Return))$Buffer.= "\n"; - } - - //FIXME error logging - - echo ("error : installer\n" . $Buffer . "\n"); - $this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_ERROR . ' WHERE `ID` = ' . $this->db->escape($Row['InstanceID'])); - return false; - } - else - { - //installation succeeded - //chown all files if installtion script has created some new files. otherwise customers cannot edit the files via ftp - - safe_exec('chown ' . (int)$Row['guid'] . ':' . (int)$Row['guid'] . ' -R ' . escapeshellarg($this->RealPath . $this->DomainPath . '/')); - - //update database - - $this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_SUCCESS . ' WHERE `ID` = ' . $this->db->escape($Row['InstanceID'])); - return true; - } - } - } - - /** - * remove installation scripts from filesystem and remove tasks and update the database - * - * @param xml instance of a valid xml object with a parsed APP-META.xml file - * @param row current entry from the database for app to handle - * @param task numeric code to specify what to do - */ - - private function CleanupData($Xml, $Row, $Task) - { - chdir($this->RootDir); - - if($Task == TASK_INSTALL) - { - //cleanup installation - - self::UnlinkRecursive($this->RealPath . $this->DomainPath . '/install_scripts/'); - - //remove task - - $this->db->query('DELETE FROM `' . TABLE_APS_TASKS . '` WHERE `Task` = ' . TASK_INSTALL . ' AND `InstanceID` = ' . $this->db->escape($Row['InstanceID'])); - } - elseif($Task == TASK_REMOVE) - { - //FIXME cleanup installation - //remove files from: $this->RealPath . $this->DomainPath . '/' - //remove permissions - //drop database - - $XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db'); - - if($XmlDb->db->id) - { - //database management - - $Database = 'web' . $Row['CustomerID'] . 'aps' . $Row['InstanceID']; - foreach(array_map('trim', explode(',', $this->Hosts)) as $DatabaseHost) - { - $this->db_root->query('REVOKE ALL PRIVILEGES ON * . * FROM `' . $this->db->escape($Database) . '`@`' . $this->db->escape($DatabaseHost) . '`'); - $this->db_root->query('REVOKE ALL PRIVILEGES ON `' . $this->db->escape($Database) . '` . * FROM `' . $this->db->escape($Database) . '`@`' . $this->db->escape($DatabaseHost) . '`'); - $this->db_root->query('DELETE FROM `mysql`.`user` WHERE `User` = "' . $this->db->escape($Database) . '" AND `Host` = "' . $this->db->escape($DatabaseHost) . '"'); - } - - $this->db_root->query('DROP DATABASE IF EXISTS `' . $this->db->escape($Database) . '`'); - $this->db_root->query('FLUSH PRIVILEGES'); - } - - //remove task & delete package instance + settings - - $this->db->query('DELETE FROM `' . TABLE_APS_TASKS . '` WHERE `Task` = ' . TASK_REMOVE . ' AND `InstanceID` = ' . $this->db->escape($Row['InstanceID'])); - $this->db->query('DELETE FROM `' . TABLE_APS_INSTANCES . '` WHERE `ID` = ' . $this->db->escape($Row['InstanceID'])); - $this->db->query('DELETE FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . $this->db->escape($Row['InstanceID'])); - } - } - - /** - * setup all environment variables from the wizard, they're all needed by the installation script - * - * @param xml instance of a valid xml object with a parsed APP-META.xml file - * @param row current entry from the database for app to handle - * @param task numeric code to specify what to do - */ - - private function PrepareWizardData($Xml, $Row, $Task) - { - //data collected by wizard - //FIXME install_only parameter/reconfigure - - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . $this->db->escape($Row['InstanceID'])); - - while($Row2 = $this->db->fetch_array($result)) - { - //skip APS internal data - - if($Row2['Name'] == 'main_location' - || $Row2['Name'] == 'main_domain' - || $Row2['Name'] == 'main_database_password' - || $Row2['Name'] == 'license')continue; - putenv('SETTINGS_' . $Row2['Name'] . '=' . $Row2['Value']); - } - } - - /** - * extract all needed files from the aps packages - * - * @param xml instance of a valid xml object with a parsed APP-META.xml file - * @param row current entry from the database for app to handle - * @param task numeric code to specify what to do - * @return success true/error false - */ - - private function PrepareFiles($Xml, $Row, $Task) - { - if($Task == TASK_INSTALL) - { - //FIXME truncate customer directory - //remove files from: $this->RealPath . $this->DomainPath . '/*' - - if(!file_exists($this->RealPath . $this->DomainPath . '/'))mkdir($this->RealPath . $this->DomainPath . '/', 0777, true); - - //extract all files and chown them to the customer guid - - if(self::ExtractZip($this->RootDir . 'packages/' . $Row['Path'] . '/' . $Row['Path'], $Xml->mapping['path'], $this->RealPath . $this->DomainPath . '/') == false - || self::ExtractZip($this->RootDir . 'packages/' . $Row['Path'] . '/' . $Row['Path'], 'scripts', $this->RealPath . $this->DomainPath . '/install_scripts/') == false) - { - $this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_ERROR . ' WHERE `ID` = ' . $this->db->escape($Row['InstanceID'])); - - //FIXME clean up already installed data - //remove files from: $this->RealPath . $this->DomainPath . '/*' - - return false; - } - - safe_exec('chown ' . (int)$Row['guid'] . ':' . (int)$Row['guid'] . ' -R ' . escapeshellarg($this->RealPath . $this->DomainPath . '/')); - } - else - { - if(self::ExtractZip($this->RootDir . 'packages/' . $Row['Path'] . '/' . $Row['Path'], 'scripts', $this->RealPath . $this->DomainPath . '/install_scripts/') == false) - { - $this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_ERROR . ' WHERE `ID` = ' . $this->db->escape($Row['InstanceID'])); - - //clean up already installed data - - self::UnlinkRecursive($this->RealPath . $this->DomainPath . '/install_scripts/'); - return false; - } - - //set right file owner - - safe_exec('chown ' . (int)$Row['guid'] . ':' . (int)$Row['guid'] . ' -R ' . escapeshellarg($this->RealPath . $this->DomainPath . '/')); - } - - //recursive mappings - - self::PrepareMappings($Xml->mapping, $Xml->mapping['url'], $this->RealPath . $this->DomainPath . '/'); - return true; - } - - /** - * setup path environment variables for the installation script - * - * @param parentmapping instance of parsed xml file, current mapping position - * @param url relative path for application specifying the current path within the mapping tree - * @param path absolute path for application specifying the current path within the mapping tree - */ - - private function PrepareMappings($ParentMapping, $Url, $Path) - { - //check for special PHP permissions - //must be done with xpath otherwise check not possible (XML parser problem with attributes) - - $ParentMapping->registerXPathNamespace('p', 'http://apstandard.com/ns/1/php'); - $Result = $ParentMapping->xpath('p:permissions'); - - if($Result[0]['writable'] == 'true') - { - //fixing file permissions to writeable - - if(is_dir($Path)) - { - chmod($Path, 0775); - } - else - { - chmod($Path, 0664); - } - } - - if($Result[0]['readable'] == 'false') - { - //fixing file permissions to non readable - - if(is_dir($Path)) - { - chmod($Path, 0333); - } - else - { - chmod($Path, 0222); - } - } - - //set environment variables - - $EnvVariable = str_replace("/", "_", $Url); - putenv('WEB_' . $EnvVariable . '_DIR=' . $Path); - - //resolve deeper mappings - - foreach($ParentMapping->mapping as $Mapping) - { - //recursive check of other mappings - - if($Url == '/') - { - self::PrepareMappings($Mapping, $Url . $Mapping['url'], $Path . $Mapping['url']); - } - else - { - self::PrepareMappings($Mapping, $Url . '/' . $Mapping['url'], $Path . '/' . $Mapping['url']); - } - } - } - - /** - * setup domain environment variables for the installation script - * - * @param xml instance of a valid xml object with a parsed APP-META.xml file - */ - - private function PrepareBasics($Row) - { - //domain - - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . $this->db->escape($Row['InstanceID']) . ' AND `Name` = "main_domain"'); - $Row3 = $this->db->fetch_array($result); - $result2 = $this->db->query('SELECT * FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `id` = ' . $this->db->escape($Row3['Value'])); - $Row3 = $this->db->fetch_array($result2); - $this->Domain = $Row3['domain']; - $this->RealPath = $Row3['documentroot']; - - //location - - $result3 = $this->db->query('SELECT * FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . $this->db->escape($Row['InstanceID']) . ' AND `Name` = "main_location"'); - $Row3 = $this->db->fetch_array($result3); - $this->DomainPath = $Row3['Value']; - - //if application is directly installed on domain remove / at the end - - if($this->DomainPath == '')$this->RealPath = substr($this->RealPath, 0, strlen($this->RealPath) - 1); - - //url environment variables - - putenv('BASE_URL_HOST=' . $this->Domain); - putenv('BASE_URL_PATH=' . $this->DomainPath . '/'); - putenv('BASE_URL_SCHEME=http'); - } - - /** - * create a database if necessary and setup environment variables - * - * @param xml instance of a valid xml object with a parsed APP-META.xml file - * @param row current entry from the database for app to handle - * @param task numeric code to specify what to do - */ - - private function PrepareDatabase($Xml, $Row, $Task) - { - global $db_root; - $XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db'); - - if($XmlDb->db->id) - { - //database management - - $NewDatabase = 'web' . $Row['CustomerID'] . 'aps' . $Row['InstanceID']; - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . $this->db->escape($Row['InstanceID']) . ' AND `Name` = "main_database_password"'); - $Row3 = $this->db->fetch_array($result); - $DbPassword = $Row3['Value']; - - if($Task == TASK_INSTALL) - { - $this->db_root->query('DROP DATABASE IF EXISTS `' . $this->db->escape($NewDatabase) . '`'); - $this->db_root->query('CREATE DATABASE IF NOT EXISTS `' . $this->db->escape($NewDatabase) . '`'); - foreach(array_map('trim', explode(',', $this->Hosts)) as $DatabaseHost) - { - $this->db_root->query('GRANT ALL PRIVILEGES ON `' . $this->db->escape($NewDatabase) . '`.* TO `' . $this->db->escape($NewDatabase) . '`@`' . $this->db->escape($DatabaseHost) . '` IDENTIFIED BY \'password\''); - $this->db_root->query('SET PASSWORD FOR `' . $this->db->escape($NewDatabase) . '`@`' . $this->db->escape($DatabaseHost) . '` = PASSWORD(\'' . $DbPassword . '\')'); - } - - $this->db_root->query('FLUSH PRIVILEGES'); - } - - //get first mysql access host - - $AccessHosts = array_map('trim', explode(',', $this->Hosts)); - - //environment variables - - putenv('DB_' . $XmlDb->db->id . '_TYPE=mysql'); - putenv('DB_' . $XmlDb->db->id . '_NAME=' . $NewDatabase); - putenv('DB_' . $XmlDb->db->id . '_LOGIN=' . $NewDatabase); - putenv('DB_' . $XmlDb->db->id . '_PASSWORD=' . $DbPassword); - putenv('DB_' . $XmlDb->db->id . '_HOST=' . $AccessHosts[0]); - putenv('DB_' . $XmlDb->db->id . '_PORT=3306'); - putenv('DB_' . $XmlDb->db->id . '_VERSION=' . mysql_get_server_info()); - } - } - - /** - * extract complete directories from a zipfile - * - * @param filename path to zipfile to extract - * @param directory which directory in zipfile to extract - * @param destination destination directory for files to extract - * @return success true/error false - */ - - private function ExtractZip($Filename, $Directory, $Destination) - { - if(!file_exists($Filename))return false; - - //fix slash notation for correct paths - - if(substr($Directory, -1, 1) == '/')$Directory = substr($Directory, 0, strlen($Directory) - 1); - - if(substr($Destination, -1, 1) != '/')$Destination.= '/'; - - //open zipfile to read its contents - - $ZipHandle = zip_open(realpath($Filename)); - - if(is_resource($ZipHandle)) - { - while($ZipEntry = zip_read($ZipHandle)) - { - if(substr(zip_entry_name($ZipEntry), 0, strlen($Directory)) == $Directory) - { - //fix relative path from zipfile - - $NewPath = zip_entry_name($ZipEntry); - $NewPath = substr($NewPath, strlen($Directory)); - - //directory - - if(substr($NewPath, -1, 1) == '/') - { - if(!file_exists($Destination . $NewPath))mkdir($Destination . $NewPath, 0777, true); - } - else - { - //files - - if(zip_entry_open($ZipHandle, $ZipEntry)) - { - // handle new directory - $dir = dirname($Destination.$NewPath); - if (!file_exists($dir)) { - mkdir ($dir, 0777, true); - } - - $File = fopen($Destination . $NewPath, "wb"); - - if($File) - { - while($Line = zip_entry_read($ZipEntry)) - { - fwrite($File, $Line); - } - - fclose($File); - } - else - { - return false; - } - } - } - } - } - - zip_close($ZipHandle); - return true; - } - else - { - $ReturnLines = array(); - $ReturnVal = - 1; - - //on 64 bit systems the zip functions can fail -> use exec to extract the files - - $ReturnLines = safe_exec('unzip -o -qq ' . escapeshellarg(realpath($Filename)) . ' ' . escapeshellarg($Directory . '/*') . ' -d ' . escapeshellarg(sys_get_temp_dir()), $ReturnVal); - - if($ReturnVal == 0) - { - //fix absolute structure of extracted data - - if(!file_exists($Destination))mkdir($Destination, 0777, true); - safe_exec('cp -Rf ' . sys_get_temp_dir() . '/' . $Directory . '/*' . ' ' . escapeshellarg($Destination)); - self::UnlinkRecursive(sys_get_temp_dir() . '/' . $Directory . '/'); - return true; - } - else - { - return false; - } - } - - return false; - } -} - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package APS + * @version $Id$ + * @todo logging + * run with user uid/gid + * folder truncation/tar all files + */ + +class ApsInstaller extends ApsParser +{ + private $db = false; + private $db_root = false; + private $DomainPath = ''; + private $Domain = ''; + private $RealPath = ''; + private $RootDir = ''; + private $Hosts = ''; + + /** + * constructor of class. setup some basic variables + * + * @param settings array with the global settings from syscp + * @param db instance of the database class from syscp + * @param db_root instance of the database class from syscp with root permissions + */ + + public function __construct($settings, $db, $db_root) + { + $this->db = $db; + $this->db_root = $db_root; + $this->RootDir = dirname(dirname(__FILE__)) . '/'; + $this->Hosts = $settings['system']['mysql_access_host']; + } + + /** + * main function of class which handles all + */ + + public function InstallHandler() + { + chdir($this->RootDir); + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_TASKS . '` AS `t` INNER JOIN `' . TABLE_APS_INSTANCES . '` AS `i` ON `t`.`InstanceID` = `i`.`ID` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `TASK` NOT IN (' . TASK_SYSTEM_UPDATE . ', ' . TASK_SYSTEM_DOWNLOAD . ')'); + + while($Row = $this->db->fetch_array($result)) + { + //check for existing aps xml file + + if(!file_exists($this->RootDir . 'packages/' . $Row['Path'] . '/APP-META.xml')) + { + $this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_ERROR . ' WHERE `ID` = ' . $this->db->escape($Row['InstanceID'])); + continue; + } + + //get contents and parse them + + $XmlContent = file_get_contents($this->RootDir . 'packages/' . $Row['Path'] . '/APP-META.xml'); + $Xml = new SimpleXMLElement($XmlContent); + + //check for unparseable xml data + + if($Xml == false) + { + $this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_ERROR . ' WHERE `ID` = ' . $this->db->escape($Row['InstanceID'])); + continue; + } + + $Task = $Row['Task']; + $this->DomainPath = ''; + $this->Domain = ''; + $this->RealPath = ''; + + //lock instance so installation cannot be canceled from the panel + + $this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_TASK_ACTIVE . ' WHERE `ID` = ' . $this->db->escape($Row['InstanceID'])); + + //setup environment with data for domain/installation location + + self::PrepareBasics($Row); + + //create database if necessary and setup environment variables + + self::PrepareDatabase($Xml, $Row, $Task); + + //unpack installation scripts and package files if necessary + + if(self::PrepareFiles($Xml, $Row, $Task)) + { + //setup environment variables fetched from installation wizard + + self::PrepareWizardData($Xml, $Row, $Task); + + //run installation scripts from packages + + self::RunInstaller($Xml, $Row, $Task); + } + + //remove installation scripts + + self::CleanupData($Xml, $Row, $Task); + unset($Xml); + } + } + + /** + * run the installation script and log errors if there are some + * + * @param xml instance of a valid xml object with a parsed APP-META.xml file + * @param row current entry from the database for app to handle + * @param task numeric code to specify what to do + * @return success true/error false + */ + + private function RunInstaller($Xml, $Row, $Task) + { + //installation + + if($Task == TASK_INSTALL) + { + //setup right path and run installation script + + chdir($this->RealPath . $this->DomainPath . '/install_scripts/'); + $Return = array(); + $ReturnStatus = 0; + $Return = safe_exec('php ' . escapeshellarg($this->RealPath . $this->DomainPath . '/install_scripts/configure install'), $ReturnStatus); + + if($ReturnStatus != 0) + { + //write output of script on error into database for admin + + $Buffer = ''; + $Count = 0; + foreach($Return as $Line) + { + $Count+= 1; + $Buffer.= $Line; + + if($Count != count($Return))$Buffer.= "\n"; + } + + //FIXME error logging + + echo ("error : installer\n" . $Buffer . "\n"); + $this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_ERROR . ' WHERE `ID` = ' . $this->db->escape($Row['InstanceID'])); + return false; + } + else + { + //installation succeeded + //chown all files if installtion script has created some new files. otherwise customers cannot edit the files via ftp + + safe_exec('chown ' . (int)$Row['guid'] . ':' . (int)$Row['guid'] . ' -R ' . escapeshellarg($this->RealPath . $this->DomainPath . '/')); + + //update database + + $this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_SUCCESS . ' WHERE `ID` = ' . $this->db->escape($Row['InstanceID'])); + return true; + } + } + } + + /** + * remove installation scripts from filesystem and remove tasks and update the database + * + * @param xml instance of a valid xml object with a parsed APP-META.xml file + * @param row current entry from the database for app to handle + * @param task numeric code to specify what to do + */ + + private function CleanupData($Xml, $Row, $Task) + { + chdir($this->RootDir); + + if($Task == TASK_INSTALL) + { + //cleanup installation + + self::UnlinkRecursive($this->RealPath . $this->DomainPath . '/install_scripts/'); + + //remove task + + $this->db->query('DELETE FROM `' . TABLE_APS_TASKS . '` WHERE `Task` = ' . TASK_INSTALL . ' AND `InstanceID` = ' . $this->db->escape($Row['InstanceID'])); + } + elseif($Task == TASK_REMOVE) + { + //FIXME cleanup installation + //remove files from: $this->RealPath . $this->DomainPath . '/' + //remove permissions + //drop database + + $XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db'); + + if($XmlDb->db->id) + { + //database management + + $Database = 'web' . $Row['CustomerID'] . 'aps' . $Row['InstanceID']; + foreach(array_map('trim', explode(',', $this->Hosts)) as $DatabaseHost) + { + $this->db_root->query('REVOKE ALL PRIVILEGES ON * . * FROM `' . $this->db->escape($Database) . '`@`' . $this->db->escape($DatabaseHost) . '`'); + $this->db_root->query('REVOKE ALL PRIVILEGES ON `' . $this->db->escape($Database) . '` . * FROM `' . $this->db->escape($Database) . '`@`' . $this->db->escape($DatabaseHost) . '`'); + $this->db_root->query('DELETE FROM `mysql`.`user` WHERE `User` = "' . $this->db->escape($Database) . '" AND `Host` = "' . $this->db->escape($DatabaseHost) . '"'); + } + + $this->db_root->query('DROP DATABASE IF EXISTS `' . $this->db->escape($Database) . '`'); + $this->db_root->query('FLUSH PRIVILEGES'); + } + + //remove task & delete package instance + settings + + $this->db->query('DELETE FROM `' . TABLE_APS_TASKS . '` WHERE `Task` = ' . TASK_REMOVE . ' AND `InstanceID` = ' . $this->db->escape($Row['InstanceID'])); + $this->db->query('DELETE FROM `' . TABLE_APS_INSTANCES . '` WHERE `ID` = ' . $this->db->escape($Row['InstanceID'])); + $this->db->query('DELETE FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . $this->db->escape($Row['InstanceID'])); + } + } + + /** + * setup all environment variables from the wizard, they're all needed by the installation script + * + * @param xml instance of a valid xml object with a parsed APP-META.xml file + * @param row current entry from the database for app to handle + * @param task numeric code to specify what to do + */ + + private function PrepareWizardData($Xml, $Row, $Task) + { + //data collected by wizard + //FIXME install_only parameter/reconfigure + + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . $this->db->escape($Row['InstanceID'])); + + while($Row2 = $this->db->fetch_array($result)) + { + //skip APS internal data + + if($Row2['Name'] == 'main_location' + || $Row2['Name'] == 'main_domain' + || $Row2['Name'] == 'main_database_password' + || $Row2['Name'] == 'license')continue; + putenv('SETTINGS_' . $Row2['Name'] . '=' . $Row2['Value']); + } + } + + /** + * extract all needed files from the aps packages + * + * @param xml instance of a valid xml object with a parsed APP-META.xml file + * @param row current entry from the database for app to handle + * @param task numeric code to specify what to do + * @return success true/error false + */ + + private function PrepareFiles($Xml, $Row, $Task) + { + if($Task == TASK_INSTALL) + { + //FIXME truncate customer directory + //remove files from: $this->RealPath . $this->DomainPath . '/*' + + if(!file_exists($this->RealPath . $this->DomainPath . '/'))mkdir($this->RealPath . $this->DomainPath . '/', 0777, true); + + //extract all files and chown them to the customer guid + + if(self::ExtractZip($this->RootDir . 'packages/' . $Row['Path'] . '/' . $Row['Path'], $Xml->mapping['path'], $this->RealPath . $this->DomainPath . '/') == false + || self::ExtractZip($this->RootDir . 'packages/' . $Row['Path'] . '/' . $Row['Path'], 'scripts', $this->RealPath . $this->DomainPath . '/install_scripts/') == false) + { + $this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_ERROR . ' WHERE `ID` = ' . $this->db->escape($Row['InstanceID'])); + + //FIXME clean up already installed data + //remove files from: $this->RealPath . $this->DomainPath . '/*' + + return false; + } + + safe_exec('chown ' . (int)$Row['guid'] . ':' . (int)$Row['guid'] . ' -R ' . escapeshellarg($this->RealPath . $this->DomainPath . '/')); + } + else + { + if(self::ExtractZip($this->RootDir . 'packages/' . $Row['Path'] . '/' . $Row['Path'], 'scripts', $this->RealPath . $this->DomainPath . '/install_scripts/') == false) + { + $this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_ERROR . ' WHERE `ID` = ' . $this->db->escape($Row['InstanceID'])); + + //clean up already installed data + + self::UnlinkRecursive($this->RealPath . $this->DomainPath . '/install_scripts/'); + return false; + } + + //set right file owner + + safe_exec('chown ' . (int)$Row['guid'] . ':' . (int)$Row['guid'] . ' -R ' . escapeshellarg($this->RealPath . $this->DomainPath . '/')); + } + + //recursive mappings + + self::PrepareMappings($Xml->mapping, $Xml->mapping['url'], $this->RealPath . $this->DomainPath . '/'); + return true; + } + + /** + * setup path environment variables for the installation script + * + * @param parentmapping instance of parsed xml file, current mapping position + * @param url relative path for application specifying the current path within the mapping tree + * @param path absolute path for application specifying the current path within the mapping tree + */ + + private function PrepareMappings($ParentMapping, $Url, $Path) + { + //check for special PHP permissions + //must be done with xpath otherwise check not possible (XML parser problem with attributes) + + $ParentMapping->registerXPathNamespace('p', 'http://apstandard.com/ns/1/php'); + $Result = $ParentMapping->xpath('p:permissions'); + + if($Result[0]['writable'] == 'true') + { + //fixing file permissions to writeable + + if(is_dir($Path)) + { + chmod($Path, 0775); + } + else + { + chmod($Path, 0664); + } + } + + if($Result[0]['readable'] == 'false') + { + //fixing file permissions to non readable + + if(is_dir($Path)) + { + chmod($Path, 0333); + } + else + { + chmod($Path, 0222); + } + } + + //set environment variables + + $EnvVariable = str_replace("/", "_", $Url); + putenv('WEB_' . $EnvVariable . '_DIR=' . $Path); + + //resolve deeper mappings + + foreach($ParentMapping->mapping as $Mapping) + { + //recursive check of other mappings + + if($Url == '/') + { + self::PrepareMappings($Mapping, $Url . $Mapping['url'], $Path . $Mapping['url']); + } + else + { + self::PrepareMappings($Mapping, $Url . '/' . $Mapping['url'], $Path . '/' . $Mapping['url']); + } + } + } + + /** + * setup domain environment variables for the installation script + * + * @param xml instance of a valid xml object with a parsed APP-META.xml file + */ + + private function PrepareBasics($Row) + { + //domain + + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . $this->db->escape($Row['InstanceID']) . ' AND `Name` = "main_domain"'); + $Row3 = $this->db->fetch_array($result); + $result2 = $this->db->query('SELECT * FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `id` = ' . $this->db->escape($Row3['Value'])); + $Row3 = $this->db->fetch_array($result2); + $this->Domain = $Row3['domain']; + $this->RealPath = $Row3['documentroot']; + + //location + + $result3 = $this->db->query('SELECT * FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . $this->db->escape($Row['InstanceID']) . ' AND `Name` = "main_location"'); + $Row3 = $this->db->fetch_array($result3); + $this->DomainPath = $Row3['Value']; + + //if application is directly installed on domain remove / at the end + + if($this->DomainPath == '')$this->RealPath = substr($this->RealPath, 0, strlen($this->RealPath) - 1); + + //url environment variables + + putenv('BASE_URL_HOST=' . $this->Domain); + putenv('BASE_URL_PATH=' . $this->DomainPath . '/'); + putenv('BASE_URL_SCHEME=http'); + } + + /** + * create a database if necessary and setup environment variables + * + * @param xml instance of a valid xml object with a parsed APP-META.xml file + * @param row current entry from the database for app to handle + * @param task numeric code to specify what to do + */ + + private function PrepareDatabase($Xml, $Row, $Task) + { + global $db_root; + $XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db'); + + if($XmlDb->db->id) + { + //database management + + $NewDatabase = 'web' . $Row['CustomerID'] . 'aps' . $Row['InstanceID']; + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . $this->db->escape($Row['InstanceID']) . ' AND `Name` = "main_database_password"'); + $Row3 = $this->db->fetch_array($result); + $DbPassword = $Row3['Value']; + + if($Task == TASK_INSTALL) + { + $this->db_root->query('DROP DATABASE IF EXISTS `' . $this->db->escape($NewDatabase) . '`'); + $this->db_root->query('CREATE DATABASE IF NOT EXISTS `' . $this->db->escape($NewDatabase) . '`'); + foreach(array_map('trim', explode(',', $this->Hosts)) as $DatabaseHost) + { + $this->db_root->query('GRANT ALL PRIVILEGES ON `' . $this->db->escape($NewDatabase) . '`.* TO `' . $this->db->escape($NewDatabase) . '`@`' . $this->db->escape($DatabaseHost) . '` IDENTIFIED BY \'password\''); + $this->db_root->query('SET PASSWORD FOR `' . $this->db->escape($NewDatabase) . '`@`' . $this->db->escape($DatabaseHost) . '` = PASSWORD(\'' . $DbPassword . '\')'); + } + + $this->db_root->query('FLUSH PRIVILEGES'); + } + + //get first mysql access host + + $AccessHosts = array_map('trim', explode(',', $this->Hosts)); + + //environment variables + + putenv('DB_' . $XmlDb->db->id . '_TYPE=mysql'); + putenv('DB_' . $XmlDb->db->id . '_NAME=' . $NewDatabase); + putenv('DB_' . $XmlDb->db->id . '_LOGIN=' . $NewDatabase); + putenv('DB_' . $XmlDb->db->id . '_PASSWORD=' . $DbPassword); + putenv('DB_' . $XmlDb->db->id . '_HOST=' . $AccessHosts[0]); + putenv('DB_' . $XmlDb->db->id . '_PORT=3306'); + putenv('DB_' . $XmlDb->db->id . '_VERSION=' . mysql_get_server_info()); + } + } + + /** + * extract complete directories from a zipfile + * + * @param filename path to zipfile to extract + * @param directory which directory in zipfile to extract + * @param destination destination directory for files to extract + * @return success true/error false + */ + + private function ExtractZip($Filename, $Directory, $Destination) + { + if(!file_exists($Filename))return false; + + //fix slash notation for correct paths + + if(substr($Directory, -1, 1) == '/')$Directory = substr($Directory, 0, strlen($Directory) - 1); + + if(substr($Destination, -1, 1) != '/')$Destination.= '/'; + + //open zipfile to read its contents + + $ZipHandle = zip_open(realpath($Filename)); + + if(is_resource($ZipHandle)) + { + while($ZipEntry = zip_read($ZipHandle)) + { + if(substr(zip_entry_name($ZipEntry), 0, strlen($Directory)) == $Directory) + { + //fix relative path from zipfile + + $NewPath = zip_entry_name($ZipEntry); + $NewPath = substr($NewPath, strlen($Directory)); + + //directory + + if(substr($NewPath, -1, 1) == '/') + { + if(!file_exists($Destination . $NewPath))mkdir($Destination . $NewPath, 0777, true); + } + else + { + //files + + if(zip_entry_open($ZipHandle, $ZipEntry)) + { + // handle new directory + $dir = dirname($Destination.$NewPath); + if (!file_exists($dir)) { + mkdir ($dir, 0777, true); + } + + $File = fopen($Destination . $NewPath, "wb"); + + if($File) + { + while($Line = zip_entry_read($ZipEntry)) + { + fwrite($File, $Line); + } + + fclose($File); + } + else + { + return false; + } + } + } + } + } + + zip_close($ZipHandle); + return true; + } + else + { + $ReturnLines = array(); + $ReturnVal = - 1; + + //on 64 bit systems the zip functions can fail -> use exec to extract the files + + $ReturnLines = safe_exec('unzip -o -qq ' . escapeshellarg(realpath($Filename)) . ' ' . escapeshellarg($Directory . '/*') . ' -d ' . escapeshellarg(sys_get_temp_dir()), $ReturnVal); + + if($ReturnVal == 0) + { + //fix absolute structure of extracted data + + if(!file_exists($Destination))mkdir($Destination, 0777, true); + safe_exec('cp -Rf ' . sys_get_temp_dir() . '/' . $Directory . '/*' . ' ' . escapeshellarg($Destination)); + self::UnlinkRecursive(sys_get_temp_dir() . '/' . $Directory . '/'); + return true; + } + else + { + return false; + } + } + + return false; + } +} + ?> \ No newline at end of file diff --git a/lib/classes/aps/class.ApsParser.php b/lib/classes/aps/class.ApsParser.php index c33c73ee..218d1bef 100644 --- a/lib/classes/aps/class.ApsParser.php +++ b/lib/classes/aps/class.ApsParser.php @@ -1,3252 +1,3252 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package APS - * @version $Id$ - * @todo implement charset validation - * reconfigure - * patch- and versionmanagement - * use settings/userinfo array instead a copy of this vars - * remove locked packages - * replace all html code - * add https support - * multi language support (package localization) - * zip stuff in own class - * logging - * button for remove of all failed installations - * increse database counter for customer - */ - -class ApsParser -{ - private $userinfo = array(); - private $settings = array(); - private $db = false; - - /** - * Constructor of class, setup basic variables needed by the class - * - * @param userinfo global array with the current userinfos - * @param settings global array with the current system settings - * @param db valid instance of the database class - */ - - public function __construct($userinfo, $settings, $db) - { - $this->settings = $settings; - $this->userinfo = $userinfo; - $this->db = $db; - } - - /** - * function provides instance management for admins - */ - - private function ManageInstances() - { - global $lng, $filename, $s, $page, $action; - $Question = false; - - //dont do anything if there is no instance - - if((int)$this->userinfo['customers_see_all'] == 1) - { - $Instances = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID`'); - } - else - { - $Instances = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `c`.`adminid` = ' . (int)$this->userinfo['adminid']); - } - - if($this->db->num_rows($Instances) == 0) - { - self::InfoBox($lng['aps']['noinstancesexisting']); - return; - } - - if(isset($_POST['save'])) - { - $Ids = ''; - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '`'); - - while($Row = $this->db->fetch_array($Result)) - { - //has admin clicked "yes" for question - - if(isset($_POST['answer']) - && $_POST['answer'] == $lng['panel']['yes']) - { - //instance installation stop - - if(isset($_POST['stop' . $Row['ID']]) - && $_POST['stop' . $Row['ID']] == '1') - { - //remove task - - $this->db->query('DELETE FROM `' . TABLE_APS_TASKS . '` WHERE `InstanceID` = ' . (int)$Row['ID']); - - //remove settings - - $this->db->query('DELETE FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . (int)$Row['ID']); - - //remove instance - - $this->db->query('DELETE FROM `' . TABLE_APS_INSTANCES . '` WHERE `ID` = ' . (int)$Row['ID']); - - //decrease used flag - - $this->db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `aps_packages_used` = `aps_packages_used` - 1 WHERE `customerid` = ' . (int)$Row[' CustomerID']); - } - - //instance uninstallation - - if(isset($_POST['remove' . $Row['ID']]) - && $_POST['remove' . $Row['ID']] == '1') - { - //remove installation task if it still exists - - $this->db->query('DELETE FROM `' . TABLE_APS_TASKS . '` WHERE `InstanceID` = ' . (int)$Row['ID'] . ' AND `Task` = ' . TASK_INSTALL); - - //insert task for uninstallation if it doesnt exists already - - $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_TASKS . '` WHERE `InstanceID` = ' . (int)$Row['ID'] . ' AND `Task` = ' . TASK_REMOVE); - - if($this->db->num_rows($Result2) == 0) - { - $this->db->query('INSERT INTO `' . TABLE_APS_TASKS . '` (`InstanceID`, `Task`) VALUES (' . (int)$Row['ID'] . ', ' . TASK_REMOVE . ')'); - $this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_UNINSTALL . ' WHERE `ID` = ' . (int)$Row['ID']); - $this->db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `aps_packages_used` = `aps_packages_used` - 1 WHERE `customerid` = ' . (int)$Row[' CustomerID']); - } - } - } - else - { - //backup all selected ids for yes/no question - - if(isset($_POST['stop' . $Row['ID']]) - && $_POST['stop' . $Row['ID']] == '1') - { - $Ids.= ''; - } - - if(isset($_POST['remove' . $Row['ID']]) - && $_POST['remove' . $Row['ID']] == '1') - { - $Ids.= ''; - } - } - } - - //if there are some ids, show yes/no question - - if($Ids != '' - && !isset($_POST['answer'])) - { - //show yes/no question - - $Message = $lng['question']['reallydoaction']; - eval("echo \"" . getTemplate("aps/askyesno") . "\";"); - $Question = true; - } - } - - //create table with contents based on instance status - - if($Question != true) - { - //INSTALL - - $InstancesInstall = ''; - - if((int)$this->userinfo['customers_see_all'] == 1) - { - $Result = $this->db->query('SELECT `p`.`Name`, `p`.`Version`, `p`.`Release`, `i`.`PackageID` FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` WHERE `i`.`Status` = ' . INSTANCE_INSTALL . ' GROUP BY `Version`, `Release`'); - } - else - { - $Result = $this->db->query('SELECT `p`.`Name`, `p`.`Version`, `p`.`Release`, `i`.`PackageID` FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `i`.`Status` = ' . INSTANCE_INSTALL . ' AND `c`.`adminid` = ' . (int)$this->userinfo['adminid'] . ' GROUP BY `Version`, `Release`'); - } - - while($Row = $this->db->fetch_array($Result)) - { - eval("\$InstancesInstall.=\"" . getTemplate("aps/manage_instances_package") . "\";"); - - //get instances - - if((int)$this->userinfo['customers_see_all'] == 1) - { - $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `Status` = ' . INSTANCE_INSTALL . ' AND `PackageID` = ' . $Row['PackageID']); - } - else - { - $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `i`.`Status` = ' . INSTANCE_INSTALL . ' AND `i`.`PackageID` = ' . $Row['PackageID'] . ' AND `c`.`adminid` = ' . (int)$this->userinfo['adminid']); - } - - while($Row2 = $this->db->fetch_array($Result2)) - { - //get customer name - - $Result3 = $this->db->query('SELECT * FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `customerid` = ' . $Row2['CustomerID']); - $Row3 = $this->db->fetch_array($Result3); - $Stop = makecheckbox('stop' . $Row2['ID'], '', '1'); - eval("\$InstancesInstall.=\"" . getTemplate("aps/manage_instances_install") . "\";"); - } - } - - //TASK ACTIVE - - $InstancesTaskActive = ''; - - if((int)$this->userinfo['customers_see_all'] == 1) - { - $Result = $this->db->query('SELECT `p`.`Name`, `p`.`Version`, `p`.`Release`, `i`.`PackageID` FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` WHERE `i`.`Status` = ' . INSTANCE_TASK_ACTIVE . ' GROUP BY `Version`, `Release`'); - } - else - { - $Result = $this->db->query('SELECT `p`.`Name`, `p`.`Version`, `p`.`Release`, `i`.`PackageID` FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `i`.`Status` = ' . INSTANCE_TASK_ACTIVE . ' AND `c`.`adminid` = ' . (int)$this->userinfo['adminid'] . ' GROUP BY `Version`, `Release`'); - } - - while($Row = $this->db->fetch_array($Result)) - { - eval("\$InstancesTaskActive.=\"" . getTemplate("aps/manage_instances_package") . "\";"); - - //get instances - - if((int)$this->userinfo['customers_see_all'] == 1) - { - $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `Status` = ' . INSTANCE_TASK_ACTIVE . ' AND `PackageID` = ' . $Row['PackageID']); - } - else - { - $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `i`.`Status` = ' . INSTANCE_TASK_ACTIVE . ' AND `i`.`PackageID` = ' . $Row['PackageID'] . ' AND `c`.`adminid` = ' . (int)$this->userinfo['adminid']); - } - - while($Row2 = $this->db->fetch_array($Result2)) - { - //get customer name - - $Result3 = $this->db->query('SELECT * FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `customerid` = ' . $Row2['CustomerID']); - $Row3 = $this->db->fetch_array($Result3); - eval("\$InstancesTaskActive.=\"" . getTemplate("aps/manage_instances_taskactive") . "\";"); - } - } - - //SUCCESS - - $InstancesSuccess = ''; - - if((int)$this->userinfo['customers_see_all'] == 1) - { - $Result = $this->db->query('SELECT `p`.`Name`, `p`.`Version`, `p`.`Release`, `i`.`PackageID` FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` WHERE `i`.`Status` = ' . INSTANCE_SUCCESS . ' GROUP BY `Version`, `Release`'); - } - else - { - $Result = $this->db->query('SELECT `p`.`Name`, `p`.`Version`, `p`.`Release`, `i`.`PackageID` FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `i`.`Status` = ' . INSTANCE_SUCCESS . ' AND `c`.`adminid` = ' . (int)$this->userinfo['adminid'] . ' GROUP BY `Version`, `Release`'); - } - - while($Row = $this->db->fetch_array($Result)) - { - eval("\$InstancesSuccess.=\"" . getTemplate("aps/manage_instances_package") . "\";"); - - //get instances - - if((int)$this->userinfo['customers_see_all'] == 1) - { - $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `Status` = ' . INSTANCE_SUCCESS . ' AND `PackageID` = ' . $Row['PackageID']); - } - else - { - $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `i`.`Status` = ' . INSTANCE_SUCCESS . ' AND `i`.`PackageID` = ' . $Row['PackageID'] . ' AND `c`.`adminid` = ' . (int)$this->userinfo['adminid']); - } - - while($Row2 = $this->db->fetch_array($Result2)) - { - //get customer name - - $Result3 = $this->db->query('SELECT * FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `customerid` = ' . $Row2['CustomerID']); - $Row3 = $this->db->fetch_array($Result3); - $Remove = makecheckbox('remove' . $Row2['ID'], '', '1'); - eval("\$InstancesSuccess.=\"" . getTemplate("aps/manage_instances_success") . "\";"); - } - } - - //ERROR - - $InstancesError = ''; - - if((int)$this->userinfo['customers_see_all'] == 1) - { - $Result = $this->db->query('SELECT `p`.`Name`, `p`.`Version`, `p`.`Release`, `i`.`PackageID` FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` WHERE `i`.`Status` = ' . INSTANCE_ERROR . ' GROUP BY `Version`, `Release`'); - } - else - { - $Result = $this->db->query('SELECT `p`.`Name`, `p`.`Version`, `p`.`Release`, `i`.`PackageID` FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `i`.`Status` = ' . INSTANCE_ERROR . ' AND `c`.`adminid` = ' . (int)$this->userinfo['adminid'] . ' GROUP BY `Version`, `Release`'); - } - - while($Row = $this->db->fetch_array($Result)) - { - eval("\$InstancesError.=\"" . getTemplate("aps/manage_instances_package") . "\";"); - - //get instances - - if((int)$this->userinfo['customers_see_all'] == 1) - { - $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `Status` = ' . INSTANCE_ERROR . ' AND `PackageID` = ' . $Row['PackageID']); - } - else - { - $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `i`.`Status` = ' . INSTANCE_ERROR . ' AND `i`.`PackageID` = ' . $Row['PackageID'] . ' AND `c`.`adminid` = ' . (int)$this->userinfo['adminid']); - } - - while($Row2 = $this->db->fetch_array($Result2)) - { - //get customer name - - $Result3 = $this->db->query('SELECT * FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `customerid` = ' . $Row2['CustomerID']); - $Row3 = $this->db->fetch_array($Result3); - $Remove = makecheckbox('remove' . $Row2['ID'], '', '1'); - eval("\$InstancesError.=\"" . getTemplate("aps/manage_instances_error") . "\";"); - } - } - - //UNINSTALL - - $InstancesUninstall = ''; - - if((int)$this->userinfo['customers_see_all'] == 1) - { - $Result = $this->db->query('SELECT `p`.`Name`, `p`.`Version`, `p`.`Release`, `i`.`PackageID` FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` WHERE `i`.`Status` = ' . INSTANCE_UNINSTALL . ' GROUP BY `Version`, `Release`'); - } - else - { - $Result = $this->db->query('SELECT `p`.`Name`, `p`.`Version`, `p`.`Release`, `i`.`PackageID` FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `i`.`Status` = ' . INSTANCE_UNINSTALL . ' AND `c`.`adminid` = ' . (int)$this->userinfo['adminid'] . ' GROUP BY `Version`, `Release`'); - } - - while($Row = $this->db->fetch_array($Result)) - { - eval("\$InstancesUninstall.=\"" . getTemplate("aps/manage_instances_package") . "\";"); - - //get instances - - if((int)$this->userinfo['customers_see_all'] == 1) - { - $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `Status` = ' . INSTANCE_UNINSTALL . ' AND `PackageID` = ' . $Row['PackageID']); - } - else - { - $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `i`.`Status` = ' . INSTANCE_UNINSTALL . ' AND `i`.`PackageID` = ' . $Row['PackageID'] . ' AND `c`.`adminid` = ' . (int)$this->userinfo['adminid']); - } - - while($Row2 = $this->db->fetch_array($Result2)) - { - //get customer name - - $Result3 = $this->db->query('SELECT * FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `customerid` = ' . $Row2['CustomerID']); - $Row3 = $this->db->fetch_array($Result3); - eval("\$InstancesUninstall.=\"" . getTemplate("aps/manage_instances_uninstall") . "\";"); - } - } - - //create some statistics - - $Statistics = ''; - - if((int)$this->userinfo['customers_see_all'] == 1) - { - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '`'); - $Statistics.= sprintf($lng['aps']['numerofinstances'], $this->db->num_rows($Result)); - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `Status` = ' . INSTANCE_SUCCESS); - $Statistics.= sprintf($lng['aps']['numerofinstancessuccess'], $this->db->num_rows($Result)); - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `Status` = ' . INSTANCE_ERROR); - $Statistics.= sprintf($lng['aps']['numerofinstanceserror'], $this->db->num_rows($Result)); - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `Status` IN (' . INSTANCE_INSTALL . ', ' . INSTANCE_TASK_ACTIVE . ', ' . INSTANCE_UNINSTALL . ')'); - $Statistics.= sprintf($lng['aps']['numerofinstancesaction'], $this->db->num_rows($Result)); - } - else - { - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `c`.`adminid` = ' . (int)$this->userinfo['adminid']); - $Statistics.= sprintf($lng['aps']['numerofinstances'], $this->db->num_rows($Result)); - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `c`.`adminid` = ' . (int)$this->userinfo['adminid'] . ' AND `Status` = ' . INSTANCE_SUCCESS); - $Statistics.= sprintf($lng['aps']['numerofinstancessuccess'], $this->db->num_rows($Result)); - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `c`.`adminid` = ' . (int)$this->userinfo['adminid'] . ' AND `Status` = ' . INSTANCE_ERROR); - $Statistics.= sprintf($lng['aps']['numerofinstanceserror'], $this->db->num_rows($Result)); - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `c`.`adminid` = ' . (int)$this->userinfo['adminid'] . ' AND `Status` IN (' . INSTANCE_INSTALL . ', ' . INSTANCE_TASK_ACTIVE . ', ' . INSTANCE_UNINSTALL . ')'); - $Statistics.= sprintf($lng['aps']['numerofinstancesaction'], $this->db->num_rows($Result)); - } - - eval("echo \"" . getTemplate("aps/manage_instances") . "\";"); - } - } - - /** - * unlink files recursively - * - * @param dir directory to delete recursive - */ - - protected function UnlinkRecursive($Dir) - { - if(!$DirHandle = @opendir($Dir))return; - - while(false !== ($Object = readdir($DirHandle))) - { - if($Object == '.' - || $Object == '..')continue; - - if(!@unlink($Dir . '/' . $Object)) - { - self::UnlinkRecursive($Dir . '/' . $Object); - } - } - - closedir($DirHandle); - @rmdir($Dir); - } - - /** - * function provides package management for admins - */ - - private function ManagePackages() - { - global $lng, $filename, $s, $page, $action; - $Question = false; - - if(isset($_POST['save'])) - { - if(isset($_POST['all']) - && $_POST['all'] == 'lock') - { - //lock alle packages - - $this->db->query('UPDATE `' . TABLE_APS_PACKAGES . '` SET `Status` = ' . PACKAGE_LOCKED . ' WHERE 1'); - } - elseif(isset($_POST['all']) - && $_POST['all'] == 'unlock') - { - //enable all packages - - $this->db->query('UPDATE `' . TABLE_APS_PACKAGES . '` SET `Status` = ' . PACKAGE_ENABLED . ' WHERE 1'); - } - elseif(isset($_POST['downloadallpackages'])) - { - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_TASKS . '` WHERE `Task` = ' . TASK_SYSTEM_DOWNLOAD); - - if($this->db->num_rows($Result) > 0) - { - self::InfoBox($lng['aps']['downloadtaskexists']); - } - else - { - $this->db->query('INSERT INTO `' . TABLE_APS_TASKS . '` (`Task`, `InstanceID`) VALUES (' . TASK_SYSTEM_DOWNLOAD . ', 0)'); - self::InfoBox($lng['aps']['downloadtaskinserted']); - } - } - elseif(isset($_POST['updateallpackages'])) - { - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_TASKS . '` WHERE `Task` = ' . TASK_SYSTEM_UPDATE); - - if($this->db->num_rows($Result) > 0) - { - self::InfoBox($lng['aps']['updatetaskexists']); - } - else - { - $this->db->query('INSERT INTO `' . TABLE_APS_TASKS . '` (`Task`, `InstanceID`) VALUES (' . TASK_SYSTEM_UPDATE . ', 0)'); - self::InfoBox($lng['aps']['updatetaskinserted']); - } - } - elseif(isset($_POST['enablenewest'])) - { - //lock alle packages, then find newerst package and enable it - - $this->db->query('UPDATE `' . TABLE_APS_PACKAGES . '` SET `Status` = ' . PACKAGE_LOCKED); - - //get all packages - - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` GROUP BY `Name`'); - - while($Row = $this->db->fetch_array($Result)) - { - //get newest version of package - - $NewestVersion = ''; - $NewestId = ''; - $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Name` = "' . $this->db->escape($Row['Name']) . '"'); - - while($Row2 = $this->db->fetch_array($Result2)) - { - if(version_compare($Row2['Version'] . '-' . $Row2['Release'], $NewestVersion) == 1) - { - $NewestVersion = $Row2['Version'] . '-' . $Row2['Release']; - $NewestId = $Row2['ID']; - } - } - - //enable newest version - - $this->db->query('UPDATE `' . TABLE_APS_PACKAGES . '` SET `Status` = ' . PACKAGE_ENABLED . ' WHERE `ID` = ' . $NewestId); - } - } - elseif(isset($_POST['removeunused'])) - { - //remove all packages which have no dependencies (count of package instances = 0) - - if(isset($_POST['answer']) - && $_POST['answer'] == $lng['panel']['yes']) - { - //get all packages - - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '`'); - - while($Row = $this->db->fetch_array($Result)) - { - //query how often package has been installed - - $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `PackageID` = ' . $Row['ID']); - - if($this->db->num_rows($Result2) == 0) - { - //remove package if number of package instances is 0 - - self::UnlinkRecursive('./packages/' . $Row['Path']); - $this->db->query('DELETE FROM `' . TABLE_APS_PACKAGES . '` WHERE `ID` = ' . $Row['ID']); - } - } - } - else - { - //show yes/no question - - $Message = $lng['question']['reallyremovepackages']; - $Ids = ''; - eval("echo \"" . getTemplate("aps/askyesno") . "\";"); - $Question = true; - } - } - elseif(isset($_POST['all']) - && $_POST['all'] == 'remove') - { - //remove all packages from system - - if(isset($_POST['answer']) - && $_POST['answer'] == $lng['panel']['yes']) - { - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '`'); - - //check for dependencies - - while($Row = $this->db->fetch_array($Result)) - { - //query how often package has been installed - - $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `PackageID` = ' . $Row['ID']); - - if($this->db->num_rows($Result2) == 0) - { - //remove package if number of package instances is 0 - - self::UnlinkRecursive('./packages/' . $Row['Path']); - $this->db->query('DELETE FROM `' . TABLE_APS_PACKAGES . '` WHERE `ID` = ' . $Row['ID']); - } - } - } - else - { - //show yes/no question - - $Message = $lng['question']['reallyremovepackages']; - $Ids = ''; - eval("echo \"" . getTemplate("aps/askyesno") . "\";"); - $Question = true; - } - } - else - { - //no special button or "all" function has been clicked - //continue to parse "single" options - - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '`'); - $Ids = ''; - - while($Row = $this->db->fetch_array($Result)) - { - //set new status of package (locked) - - if($Row['Status'] == PACKAGE_ENABLED - && isset($_POST['lock' . $Row['ID']])) - { - $this->db->query('UPDATE `' . TABLE_APS_PACKAGES . '` SET `Status` = ' . PACKAGE_LOCKED . ' WHERE `ID` = ' . $this->db->escape($Row['ID'])); - } - - //set new status of package (enabled) - - if($Row['Status'] == PACKAGE_LOCKED - && isset($_POST['unlock' . $Row['ID']])) - { - $this->db->query('UPDATE `' . TABLE_APS_PACKAGES . '` SET `Status` = ' . PACKAGE_ENABLED . ' WHERE `ID` = ' . $this->db->escape($Row['ID'])); - } - - //save id of package to remove for yes/no question - - if(isset($_POST['remove' . $Row['ID']])) - { - $Ids.= ''; - - //remove package if answer is yes - - if(isset($_POST['answer']) - && $_POST['answer'] == $lng['panel']['yes']) - { - self::UnlinkRecursive('./packages/' . $Row['Path']); - $this->db->query('DELETE FROM `' . TABLE_APS_PACKAGES . '` WHERE `ID` = ' . $Row['ID']); - } - } - } - - //if there are some ids to remove, show yes/no box - - if($Ids != '' - && !isset($_POST['answer'])) - { - //show yes/no question - - $Message = $lng['question']['reallyremovepackages']; - eval("echo \"" . getTemplate("aps/askyesno") . "\";"); - $Question = true; - } - } - } - - //show package overview with options - - if(!isset($_POST['save']) - || $Question == false) - { - //query all packages grouped by package name - - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` GROUP BY `Name` ORDER BY `Name` ASC'); - $Packages = ''; - - while($Row = $this->db->fetch_array($Result)) - { - eval("\$Packages.=\"" . getTemplate("aps/manage_packages_row") . "\";"); - - //get all package versions of current package - - $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Name` = "' . $this->db->escape($Row['Name']) . '" ORDER BY `Version` DESC, `Release` DESC'); - - while($Row2 = $this->db->fetch_array($Result2)) - { - //show package with options - - $Lock = ''; - $Unlock = ''; - - if($Row2['Status'] == PACKAGE_ENABLED) - { - $Lock = makecheckbox('lock' . $Row2['ID'], '', '1'); - } - - if($Row2['Status'] == PACKAGE_LOCKED) - { - $Unlock = makecheckbox('unlock' . $Row2['ID'], '', '1'); - } - - //query how often package has been installed - - $Result3 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `PackageID` = ' . $Row2['ID']); - $Installations = $this->db->num_rows($Result3); - - if($Installations == 0)$Remove = makecheckbox('remove' . $Row2['ID'], '', '1'); - eval("\$Packages.=\"" . getTemplate("aps/manage_packages_detail") . "\";"); - } - } - - if($this->db->num_rows($Result) == 0) - { - //no packages have been installed in system - - self::InfoBox($lng['aps']['nopackagesinsystem']); - eval("echo \"" . getTemplate("aps/manage_packages_download") . "\";"); - } - else - { - //generate some statistics - - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '`'); - $Temp = $this->db->num_rows($Result); - $Statistics = sprintf($lng['aps']['numerofpackagesinstalled'], $this->db->num_rows($Result)); - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Status` = ' . PACKAGE_ENABLED); - $Statistics.= sprintf($lng['aps']['numerofpackagesenabled'], $this->db->num_rows($Result)); - $Statistics.= sprintf($lng['aps']['numerofpackageslocked'], $Temp - $this->db->num_rows($Result)); - - if((int)$this->userinfo['customers_see_all'] == 1) - { - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '`'); - $Statistics.= sprintf($lng['aps']['numerofinstances'], $this->db->num_rows($Result)); - } - else - { - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `c`.`adminid` = ' . (int)$this->userinfo['adminid']); - $Statistics.= sprintf($lng['aps']['numerofinstances'], $this->db->num_rows($Result)); - } - - eval("echo \"" . getTemplate("aps/manage_packages") . "\";"); - } - } - } - - /** - * function provides a upload site for new packages - */ - - private function UploadNewPackages() - { - global $lng, $filename, $s, $page, $action; - - //define how many files can be uploaded at once - - $Files = array(); - - //define how many upload fields will be shown - - for ($i = 1;$i <= (int)$this->settings['aps']['upload_fields'];$i++) - { - $Files[] = 'file' . $i; - } - - //check whether one file has been uploaded - - $FilesSet = false; - foreach($Files as $File) - { - if(isset($_FILES[$File]))$FilesSet = true; - } - - if($FilesSet == true) - { - //any file has been uploaded, now check for errors and parse the input - - foreach($Files as $File) - { - if(isset($_FILES[$File])) - { - $Errors = array(); - - //check uploaded files against some things - //check for filetype - - if(substr($_FILES[$File]['name'], -3) != 'zip' - && $_FILES[$File]['error'] == 0) - { - $Errors[] = $lng['aps']['notazipfile']; - } - - //check for filesize - - if(($_FILES[$File]['size'] > self::PhpMemorySizeToBytes(ini_get('upload_max_filesize')) && $_FILES[$File]['error'] == 0) - || $_FILES[$File]['error'] == 1) - { - $Errors[] = $lng['aps']['filetoobig']; - } - - //check is file isnt complete - - if($_FILES[$File]['error'] == 3) - { - $Errors[] = $lng['aps']['filenotcomplete']; - } - - //check for other php internal errors - - if($_FILES[$File]['error'] >= 6) - { - $Errors[] = $lng['aps']['phperror'] . (int)$_FILES[$File]['error']; - } - - //all checks are ok, try to install the package - - if(count($Errors) == 0 - && $_FILES[$File]['error'] == 0) - { - //install package in system - - if(move_uploaded_file($_FILES[$File]['tmp_name'], './temp/' . basename($_FILES[$File]['name'])) == true) - { - self::InstallNewPackage('./temp/' . basename($_FILES[$File]['name'])); - } - else - { - $Errors[] = $lng['aps']['moveproblem']; - } - } - - if(count($Errors) > 0) - { - //throw errors - - $ErrorMessage = ''; - foreach($Errors as $Error) - { - $ErrorMessage.= '
  • ' . $Error . '
  • '; - } - - self::InfoBox(sprintf($lng['aps']['uploaderrors'], htmlspecialchars($_FILES[$File]['name']), $ErrorMessage)); - } - } - } - } - - //generate upload fields - - $Output = ''; - foreach($Files as $File) - { - $Output.= '

    '; - } - - eval("echo \"" . getTemplate("aps/upload") . "\";"); - } - - /** - * function provides a frontend for customers to search packages - */ - - private function SearchPackages() - { - global $lng, $filename, $s, $page, $action; - $Error = 0; - $Ids = array(); - $ShowAll = 0; - - if(isset($_GET['keyword']) - && preg_match('/^[- _0-9a-z\.,:;]+$/i', $_GET['keyword']) != false) - { - //split all keywords - - $Elements = split('[ ,;]', trim($_GET['keyword'])); - - if(count($Elements) == 1 - && strlen($Elements[0]) == 0) - { - //no keyword given -> show all packages - - $ShowAll = 1; - } - else - { - foreach($Elements as $Key) - { - //skip empty values -> prevents that whitespaces lead to the result that all packages will be found - - if($Key == '')continue; - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Status` = ' . PACKAGE_ENABLED . ' AND (`Name` LIKE "%' . $this->db->escape($Key) . '%" OR `Path` LIKE "%' . $this->db->escape($Key) . '%" OR `Version` LIKE "%' . $this->db->escape($Key) . '%") '); - - //check if keyword got a result - - if($this->db->num_rows($result) > 0) - { - //add all package ids which match to result array - - while($Temp = $this->db->fetch_array($result)) - { - if(!in_array($Temp['ID'], $Ids))$Ids[] = $Temp['ID']; - } - } - } - - //no matches found to given keywords - - if(count($Ids) == 0) - { - $Error = 2; - } - } - } - elseif(isset($_GET['keyword']) - && strlen($_GET['keyword']) != 0) - { - //input contains illegal characters - - $Error = 1; - } - elseif(isset($_GET['keyword']) - && strlen($_GET['keyword']) == 0) - { - //nothing has been entered - show all packages - - $ShowAll = 1; - } - - //show errors - - if($Error == 1) - { - self::InfoBox($lng['aps']['nospecialchars']); - } - elseif($Error == 2) - { - self::InfoBox($lng['aps']['noitemsfound']); - } - - //show keyword only if format is ok - - $Keyword = ''; - - if(isset($_GET['keyword']) - && $Error == 0)$Keyword = htmlspecialchars($_GET['keyword']); - eval("echo \"" . getTemplate("aps/search") . "\";"); - - //show results - - if(($Error == 0 && count($Ids) > 0) - || $ShowAll == 1) - { - //run query based on search results - - if($ShowAll != 1) - { - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `ID` IN (' . $this->db->escape(implode(',', $Ids)) . ')'); - } - else - { - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Status` = ' . PACKAGE_ENABLED); - } - - //show package infos - - if($this->db->num_rows($result) > 0) - { - if($this->db->num_rows($result) == 1) - { - self::InfoBox(sprintf($lng['aps']['searchoneresult'], $this->db->num_rows($result))); - } - else - { - self::InfoBox(sprintf($lng['aps']['searchmultiresult'], $this->db->num_rows($result))); - } - - while($Row = $this->db->fetch_array($result)) - { - self::ShowPackageInfo($Row['ID']); - } - } - } - } - - /** - * function provides a frontend for customers to show the status of installed packages - * - * @param customerid id of customer from database - */ - - private function CustomerStatus($CustomerId) - { - global $lng, $filename, $s, $page, $action; - $Data = ''; - $Fieldname = ''; - $Fieldvalue = ''; - $Groupname = ''; - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `CustomerID` = ' . $this->db->escape($CustomerId)); - - //customer hasnt installed any package yet - - if($this->db->num_rows($result) == 0) - { - self::InfoBox($lng['aps']['nopackagesinstalled']); - return; - } - - while($Row = $this->db->fetch_array($result)) - { - $Data = ''; - $result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `ID` = ' . $this->db->escape($Row['PackageID'])); - $Row2 = $this->db->fetch_array($result2); - $Xml = self::GetXmlFromFile('./packages/' . $Row2['Path'] . '/APP-META.xml'); - - //skip if parse of xml has failed - - if($Xml == false)continue; - $Icon = './images/default.png'; - - //show data and status of package - - if($Xml->icon['path']) - { - $Icon = './packages/' . $Row2['Path'] . '/' . basename($Xml->icon['path']); - } - - $Summary = $Xml->summary; - $Fieldname = $lng['aps']['version']; - $Fieldvalue = $Xml->version . ' (Release ' . $Xml->release . ')'; - eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); - $Temp = ''; - - switch($Row['Status']) - { - case INSTANCE_INSTALL: - $Temp.= $lng['aps']['instance_install']; - break; - case INSTANCE_TASK_ACTIVE: - $Temp.= $lng['aps']['instance_task_active']; - break; - case INSTANCE_SUCCESS: - $Temp.= $lng['aps']['instance_success']; - break; - case INSTANCE_ERROR: - $Temp.= $lng['aps']['instance_error']; - break; - case INSTANCE_UNINSTALL: - $Temp.= $lng['aps']['instance_uninstall']; - break; - default: - $Temp.= $lng['aps']['unknown_status']; - break; - } - - $Fieldname = $lng['aps']['currentstatus']; - $Fieldvalue = $Temp; - eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); - $result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_TASKS . '` WHERE `InstanceID` = ' . $this->db->escape($Row['ID'])); - $Temp = ''; - - if($this->db->num_rows($result2) > 0) - { - while($Row2 = $this->db->fetch_array($result2)) - { - switch($Row2['Task']) - { - case TASK_INSTALL: - $Temp.= $lng['aps']['task_install'] . '
    '; - break; - case TASK_REMOVE: - $Temp.= $lng['aps']['task_remove'] . '
    '; - break; - case TASK_RECONFIGURE: - $Temp.= $lng['aps']['task_reconfigure'] . '
    '; - break; - case TASK_UPGRADE: - $Temp.= $lng['aps']['task_upgrade'] . '
    '; - break; - default: - $Temp.= $lng['aps']['unknown_status'] . '
    '; - break; - } - } - } - else - { - $Temp.= $lng['aps']['no_task']; - } - - $Fieldname = $lng['aps']['activetasks']; - $Fieldvalue = $Temp; - eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); - - //show entrypoints for application (important URLs within the application) - - if($Row['Status'] == INSTANCE_SUCCESS) - { - $Temp = ''; - - //get domain to domain id - - $result3 = $this->db->query('SELECT * FROM `' . TABLE_APS_SETTINGS . '` WHERE `Name` = "main_domain" AND `InstanceID` = ' . $this->db->escape($Row['ID'])); - $Row3 = $this->db->fetch_array($result3); - $result4 = $this->db->query('SELECT * FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `customerid` = ' . $this->db->escape($CustomerId) . ' AND `id` = ' . $this->db->escape($Row3['Value'])); - $Row3 = $this->db->fetch_array($result4); - $Domain = $Row3['domain']; - - //get sub location for domain - - $result5 = $this->db->query('SELECT * FROM `' . TABLE_APS_SETTINGS . '` WHERE `Name` = "main_location" AND `InstanceID` = ' . $this->db->escape($Row['ID'])); - $Row3 = $this->db->fetch_array($result5); - $Location = $Row3['Value']; - - //show main site link - - if($Location == '') - { - $Temp.= '' . $lng['aps']['mainsite'] . '
    '; - } - else - { - $Temp.= '' . $lng['aps']['mainsite'] . '
    '; - } - - //show other links from meta data - - if($Xml->{'entry-points'}) - { - foreach($Xml->{'entry-points'}->entry as $Entry) - { - if($Location == '') - { - $Temp.= '' . $Entry->label . '
    '; - } - else - { - $Temp.= '' . $Entry->label . '
    '; - } - } - } - - $Fieldname = $lng['aps']['applicationlinks']; - $Fieldvalue = $Temp; - eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); - } - - eval("echo \"" . getTemplate("aps/package_status") . "\";"); - unset($Xml); - } - } - - /** - * function creates a new instance of a package based on the installer data - * - * @param packageid id of package from database - * @param customerid id of customer from database - * @return success true/error false - */ - - private function CreatePackageInstance($PackageId, $CustomerId) - { - global $lng; - - if(!self::IsValidPackageId($PackageId, true))return false; - - //has user pressed F5/reload? - - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_TEMP_SETTINGS . '` WHERE `CustomerID` = ' . $this->db->escape($CustomerId)); - - if($this->db->num_rows($result) == 0) - { - self::InfoBox($lng['aps']['erroronnewinstance']); - return false; - } - - //get path to package xml file - - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `ID` = ' . $this->db->escape($PackageId)); - $Row = $this->db->fetch_array($result); - $Xml = self::GetXmlFromFile('./packages/' . $Row['Path'] . '/APP-META.xml'); - - //return if parse of xml file has failed - - if($Xml == false)return false; - - //add new instance - - $this->db->query('INSERT INTO `' . TABLE_APS_INSTANCES . '` (`CustomerID`, `PackageID`, `Status`) VALUES (' . $this->db->escape($CustomerId) . ', ' . $this->db->escape($PackageId) . ', ' . INSTANCE_INSTALL . ')'); - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `CustomerID` = ' . $this->db->escape($CustomerId) . ' AND `PackageID` = ' . $this->db->escape($PackageId) . ' AND `Status` = ' . INSTANCE_INSTALL . ' ORDER BY ID DESC'); - $Row = $this->db->fetch_array($result); - - //copy & delete temporary data - - $this->db->query('INSERT INTO `' . TABLE_APS_SETTINGS . '` (`InstanceID`, `Name`, `Value`) SELECT ' . $this->db->escape($Row['ID']) . ' AS `InstanceID`, `Name`, `Value` FROM `' . TABLE_APS_TEMP_SETTINGS . '` WHERE `CustomerID` = ' . $this->db->escape($CustomerId) . ' AND `PackageID` = ' . $this->db->escape($PackageId)); - $this->db->query('DELETE FROM `' . TABLE_APS_TEMP_SETTINGS . '` WHERE `CustomerID` = ' . $this->db->escape($CustomerId) . ' AND `PackageID` = ' . $this->db->escape($PackageId)); - - //add task for installation - - $this->db->query('INSERT INTO `' . TABLE_APS_TASKS . '` (`InstanceID`, `Task`) VALUES(' . $this->db->escape($Row['ID']) . ', ' . TASK_INSTALL . ')'); - - //update used counter for packages - - $this->db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `aps_packages_used` = `aps_packages_used` + 1 WHERE `customerid` = ' . (int)$CustomerId); - self::InfoBox(sprintf($lng['aps']['successonnewinstance'], $Xml->name)); - unset($Xml); - } - - /** - * convert human readable memory sizes into bytes - * - * @param value ini_get() formated memory size - * @return memory size in bytes - */ - - private function PhpMemorySizeToBytes($Value) - { - //convert memory formats from php.ini to a integer value in bytes - - $Value = trim($Value); - $Last = strtolower($Value{strlen($Value) - 1}); - - switch($Last) - { - case 'g': - $Value*= 1024; - case 'm': - $Value*= 1024; - case 'k': - $Value*= 1024; - } - - return $Value; - } - - /** - * convert php.ini formated strings into true and false as a string - * - * @param value value to read from php.ini (format: safe_mode or safe-mode) - * @return (true|false) as string - */ - - private function TrueFalseIniGet($Value) - { - //convert php.ini values to true and false as string - - $Value = ini_get(str_replace(array('-'), array('_'), $Value)); - - if($Value == 0 - || $Value == false - || $Value == 'off') - { - return 'false'; - } - else - { - return 'true'; - } - } - - /** - * packages can fail during the validation process. this function allows to check for exceptions - * - * @param category category as string to check - * @param item item within category to check - * @return success true (value has exception) / error false (value has no exception) - */ - - private function CheckException($Category, $Item, $Value) - { - global $settings; - - //search for element within system settings - - $Elements = explode(',', $settings['aps'][$Category . '-' . $Item]); - foreach($Elements as $Element) - { - if(strtolower($Element) == strtolower($Value))return true; - } - - return false; - } - - /** - * packages must be validated within the submappings of a filesystem structure - * - * @param parentmapping instance of parsed xml file, current mapping position - * @param url relative path for application specifying the current path within the mapping tree - * @return array with errors found, optional empty when no errors were found - */ - - private function CheckSubmappings($ParentMapping, $Url) - { - global $lng; - $Error = array(); - - //check for special PHP handler extensions - - $XmlPhpMapping = $ParentMapping->children('http://apstandard.com/ns/1/php'); - foreach($XmlPhpMapping->handler as $Handler) - { - if(isset($Handler->extension[0]) - && strval($Handler->extension[0]) != 'php') - { - $Error[] = $lng['aps']['php_misc_handler']; - } - - if(isset($Handler->disabled)) - { - $Error[] = $lng['aps']['php_misc_directoryhandler']; - } - } - - //check for special ASP.NET url handler within mappings - - $XmlAspMapping = $ParentMapping->children('http://apstandard.com/ns/1/aspnet'); - - if($XmlAspMapping->handler) - { - $Error[] = $lng['aps']['asp_net']; - } - - //check for special CGI url handlers within mappings - - $XmlCgiMapping = $ParentMapping->children('http://apstandard.com/ns/1/cgi'); - - if($XmlCgiMapping->handler) - { - $Error[] = $lng['aps']['cgi']; - } - - //resolve deeper mappings - - foreach($ParentMapping->mapping as $Mapping) - { - $Return = array(); - - //recursive check of other mappings - - if($Url == '/') - { - $Return = self::CheckSubmappings($Mapping, $Url . $Mapping['url']); - } - else - { - $Return = self::CheckSubmappings($Mapping, $Url . '/' . $Mapping['url']); - } - - //if recursive checks found errors, attach them - - if(count($Return) != 0) - { - foreach($Return as $Value) - { - if(!in_array($Value, $Error))$Error[] = $Value; - } - } - } - - return $Error; - } - - /** - * function validates a package against a lot of options and installs it if all conditions have succeeded - * - * @param filename path to zipfile to install - */ - - private function InstallNewPackage($Filename) - { - global $lng; - - if(file_exists($Filename) - && $Xml = self::GetXmlFromZip($Filename)) - { - $Error = array(); - - //check alot of stuff if package is supported - //php modules - - $XmlPhp = $Xml->requirements->children('http://apstandard.com/ns/1/php'); - - if($XmlPhp->extension) - { - $ExtensionsLoaded = get_loaded_extensions(); - foreach($XmlPhp->extension as $Extension) - { - if(!in_array($Extension, $ExtensionsLoaded) - && !self::CheckException('php', 'extension', $Extension)) - { - $Error[] = sprintf($lng['aps']['php_extension'], $Extension); - } - } - } - - //php functions - - if($XmlPhp->function) - { - foreach($XmlPhp->function as $Function) - { - if(!function_exists($Function) - && !self::CheckException('php', 'function', $Function)) - { - $Error[] = sprintf($lng['aps']['php_function'], $Function); - } - } - } - - //php values - - $PhpValues = array( - 'short-open-tag', - 'file-uploads', - 'magic-quotes-gpc', - 'register-globals', - 'allow-url-fopen', - 'safe-mode' - ); - foreach($PhpValues as $Value) - { - if($XmlPhp->{$Value}) - { - if(self::TrueFalseIniGet($Value) != $XmlPhp->{$Value} - && !self::CheckException('php', 'configuration', str_replace(array('-'), array('_'), $Value))) - { - $Error[] = sprintf($lng['aps']['php_configuration'], str_replace(array('-'), array('_'), $Value)); - } - } - } - - if($XmlPhp->{'post-max-size'}) - { - if(self::PhpMemorySizeToBytes(ini_get('post_max_size')) < intval($XmlPhp->{'post-max-size'}) - && !self::CheckException('php', 'configuration', 'post_max_size')) - { - $Error[] = $lng['aps']['php_configuration_post_max_size']; - } - } - - if($XmlPhp->{'memory-limit'}) - { - if(self::PhpMemorySizeToBytes(ini_get('memory_limit')) < intval($XmlPhp->{'memory-limit'}) - && !self::CheckException('php', 'configuration', 'memory_limit')) - { - $Error[] = $lng['aps']['php_configuration_memory_limit']; - } - } - - if($XmlPhp->{'max-execution-time'}) - { - if(ini_get('max_execution_time') < intval($XmlPhp->{'max-execution-time'}) - && !self::CheckException('php', 'configuration', 'max_execution_time')) - { - $Error[] = $lng['aps']['php_configuration_max_execution_time']; - } - } - - //php version - //must be done with xpath otherwise check not possible (XML parser problem with attributes) - - $Xml->registerXPathNamespace('phpversion', 'http://apstandard.com/ns/1/php'); - $Result = $Xml->xpath('//phpversion:version'); - - if(isset($Result[0]['min'])) - { - if(version_compare($Result[0]['min'], PHP_VERSION) == 1) - { - $Error[] = $lng['aps']['php_general_old']; - } - } - - if(isset($Result[0]['max-not-including'])) - { - if(version_compare($Result[0]['max-not-including'], PHP_VERSION) == - 1) - { - $Error[] = $lng['aps']['php_general_new']; - } - } - - //database - - $XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db'); - - if($XmlDb->db->id) - { - if($XmlDb->db->{'server-type'} != 'mysql') - { - $Error[] = $lng['aps']['db_mysql_support']; - } - - if(version_compare($XmlDb->db->{'server-min-version'}, mysql_get_server_info()) == 1) - { - $Error[] = $lng['aps']['db_mysql_version']; - } - } - - //ASP.NET - - $XmlAsp = $Xml->requirements->children('http://apstandard.com/ns/1/aspnet'); - - if($XmlAsp->handler - || $XmlAsp->permissions - || $XmlAsp->version) - { - $Error[] = $lng['aps']['asp_net']; - } - - //CGI - - $XmlCgi = $Xml->requirements->children('http://apstandard.com/ns/1/cgi'); - - if($XmlCgi->handler) - { - $Error[] = $lng['aps']['cgi']; - } - - //webserver modules - - $XmlWebserver = $Xml->requirements->children('http://apstandard.com/ns/1/apache'); - - if($XmlWebserver->{'required-module'}) - { - if(function_exists('apache_get_modules')) - { - $ModulesLoaded = apache_get_modules(); - foreach($XmlWebserver->{'required-module'} as $Module) - { - if(!in_array($Module, $ModulesLoaded) - && !self::CheckException('webserver', 'module', $Module)) - { - $Error[] = sprintf($lng['aps']['webserver_module'], $Module); - } - } - } - else - { - if(!self::CheckException('webserver', 'module', 'fcgid-any'))$Error[] = $lng['aps']['webserver_fcgid']; - } - } - - //webserver .htaccess - - if($XmlWebserver->htaccess - && !self::CheckException('webserver', 'htaccess', 'htaccess')) - { - $Error[] = $lng['aps']['webserver_htaccess']; - } - - //configuration script check - - if($Xml->{'configuration-script-language'} - && $Xml->{'configuration-script-language'} != 'php') - { - $Error[] = $lng['aps']['misc_configscript']; - } - - //validation against a charset not possible in current version - - foreach($Xml->settings->group as $Group) - { - foreach($Group->setting as $Setting) - { - if($Setting['type'] == 'string' - || $Setting['type'] == 'password') - { - if(isset($Setting['charset'])) - { - if(!in_array($lng['aps']['misc_charset'], $Error))$Error[] = $lng['aps']['misc_charset']; - } - } - } - } - - //check different errors/features in submappings - - $Return = self::CheckSubmappings($Xml->mapping, $Xml->mapping['url']); - - if(count($Return) != 0) - { - foreach($Return as $Value) - { - if(!in_array($Value, $Error))$Error[] = $Value; - } - } - - //check already installed versions - - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Name` = "' . $this->db->escape($Xml->name) . '"'); - $Newer = 0; - - if($this->db->num_rows($result) > 0) - { - while($Row = $this->db->fetch_array($result)) - { - //package is newer, install package as a update - - if(version_compare($Row['Version'] . '-' . $Row['Release'], $Xml->version . '-' . $Xml->release) == - 1) - { - $Newer = 1; - } - - //package is installed already with same version, cancel installation - - if(version_compare($Row['Version'] . '-' . $Row['Release'], $Xml->version . '-' . $Xml->release) == 0) - { - $Error[] = $lng['aps']['misc_version_already_installed']; - break; - } - - //package is older than the one which is installed already, cancel installation - - if(version_compare($Row['Version'] . '-' . $Row['Release'], $Xml->version . '-' . $Xml->release) == 1) - { - $Error[] = $lng['aps']['misc_only_newer_versions']; - break; - } - } - } - - if(count($Error) > 0) - { - //show errors - - $Output = ''; - foreach($Error as $Entry) - { - $Output.= '
  • ' . $Entry . '
  • '; - } - - self::InfoBox(sprintf($lng['aps']['erroronscan'], $Xml->name, $Output)); - return false; - } - else - { - //install package in system, all checks succeeded - - $Destination = './packages/' . basename($Filename) . '/'; - - //create package directory - - if(!file_exists($Destination))mkdir($Destination, 0777, true); - - //copy xml meta data - - self::GetContentFromZip($Filename, 'APP-META.xml', $Destination . 'APP-META.xml'); - - //copy screenshots - - if($Xml->screenshot) - { - foreach($Xml->screenshot as $Screenshot) - { - self::GetContentFromZip($Filename, $Screenshot['path'], $Destination . basename($Screenshot['path'])); - } - } - - //copy icon - - if($Xml->icon['path']) - { - self::GetContentFromZip($Filename, $Xml->icon['path'], $Destination . basename($Xml->icon['path'])); - } - - //copy license - - if($Xml->license - && $Xml->license->text->file) - { - self::GetContentFromZip($Filename, $Xml->license->text->file, $Destination . 'license.txt'); - } - - //insert package to database - - $this->db->query('INSERT INTO `' . TABLE_APS_PACKAGES . '` (`Path`, `Name`, `Version`, `Release`, `Status`) VALUES ("' . $this->db->escape(basename($Filename)) . '", "' . $this->db->escape($Xml->name) . '", "' . $this->db->escape($Xml->version) . '", ' . $this->db->escape($Xml->release) . ', ' . PACKAGE_LOCKED . ')'); - - //copy zipfile do destination - - copy($Filename, $Destination . basename($Filename)); - unlink($Filename); - - //show some feedback messages to admin - - if($Newer == 1) - { - self::InfoBox(sprintf($lng['aps']['successpackageupdate'], $Xml->name)); - } - else - { - self::InfoBox(sprintf($lng['aps']['successpackageinstall'], $Xml->name)); - } - - unset($Xml); - return true; - } - } - else - { - //file cannot be unzipped or parse of xml data has failed - - self::InfoBox(sprintf($lng['aps']['invalidzipfile'], basename($Filename))); - return false; - } - } - - /** - * main function of the class, provides all of the aps installer frontend - */ - - public function MainHandler($Action) - { - global $lng, $filename, $s, $page, $action, $Id; - - //check for basic functions, classes and permissions - - $Error = ''; - - if(!class_exists('SimpleXMLElement') - || !function_exists('zip_open')) - { - $Error.= '
  • ' . $lng['aps']['class_zip_missing'] . '
  • '; - } - - if(!is_writable('./temp/') - || !is_writable('./packages/')) - { - $Error.= '
  • ' . $lng['aps']['dir_permissions'] . '
  • '; - } - - if($Error != '') - { - //show different error to customer and admin - - if(!isset($this->userinfo['customerid'])) - { - self::InfoBox(sprintf($lng['aps']['initerror'], $Error)); - } - else - { - self::InfoBox($lng['aps']['initerror_customer']); - } - - return; - } - - $CustomerId = $this->userinfo['customerid']; - $AdminId = $this->userinfo['adminid']; - $PackagesPerSite = $this->settings['aps']['items_per_page']; - - //run different functions based on action - - if($Action == 'install') - { - //check for valid package id - - if(self::IsValidPackageId($Id, true)) - { - //installation data is given - - if(isset($_POST['withinput'])) - { - $Errors = self::ValidatePackageData($Id, $CustomerId); - - //if there are no input errors, create a new instance - - if(count($Errors) == 0) - { - self::CreatePackageInstance($Id, $CustomerId); - } - else - { - self::ShowPackageInstaller($Id, $Errors, $CustomerId); - } - } - else - { - //empty array -> no errors will be shown to customer - - $Errors = array(); - self::ShowPackageInstaller($Id, $Errors, $CustomerId); - } - } - else - { - self::InfoBox($lng['aps']['iderror']); - } - } - elseif($Action == 'remove') - { - //check for valid instance id - - if(self::IsValidInstanceId($Id, $CustomerId)) - { - //customer has clicked yes to uninstall a package - - if(isset($_POST['answer']) - && $_POST['answer'] == $lng['panel']['yes']) - { - //check if there is already an task - - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_TASKS . '` WHERE `InstanceID` = ' . $this->db->escape($Id) . ' AND `Task` = ' . TASK_REMOVE); - - if($this->db->num_rows($result) > 0) - { - self::InfoBox($lng['aps']['removetaskexisting']); - } - else - { - //remove package, no task existing - - $this->db->query('INSERT INTO `' . TABLE_APS_TASKS . '` (`InstanceID`, `Task`) VALUES (' . (int)$Id . ', ' . TASK_REMOVE . ')'); - $this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_UNINSTALL . ' WHERE `ID` = ' . (int)$Id); - $this->db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `aps_packages_used` = `aps_packages_used` - 1 WHERE `customerid` = ' . (int)$CustomerId); - self::InfoBox($lng['aps']['packagewillberemoved']); - } - } - else - { - //show yes/no question - - $Message = $lng['question']['reallywanttoremove']; - $action_alt = 'customerstatus'; - $Ids = ''; - eval("echo \"" . getTemplate("aps/askyesno") . "\";"); - } - } - else - { - self::InfoBox($lng['aps']['iderror']); - } - } - elseif($Action == 'stopinstall') - { - //check for valid instance id - - if(self::IsValidInstanceId($Id, $CustomerId)) - { - //check if application installation runs already - - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `ID` = ' . $this->db->escape($Id)); - $Row = $this->db->fetch_array($Result); - - if($Row['Status'] == INSTANCE_TASK_ACTIVE) - { - self::InfoBox($lng['aps']['installstoperror']); - } - else - { - if(isset($_POST['answer']) - && $_POST['answer'] == $lng['panel']['yes']) - { - //remove task - - $this->db->query('DELETE FROM `' . TABLE_APS_TASKS . '` WHERE `InstanceID` = ' . $this->db->escape($Id)); - - //remove settings - - $this->db->query('DELETE FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . $this->db->escape($Id)); - - //remove instance - - $this->db->query('DELETE FROM `' . TABLE_APS_INSTANCES . '` WHERE `ID` = ' . $this->db->escape($Id)); - - //update used counter - - $this->db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `aps_packages_used` = `aps_packages_used` - 1 WHERE `customerid` = ' . (int)$CustomerId); - self::InfoBox($lng['aps']['installstopped']); - } - else - { - //show yes/no question - - $Message = $lng['question']['reallywanttostop']; - $action_alt = 'customerstatus'; - $Ids = ''; - eval("echo \"" . getTemplate("aps/askyesno") . "\";"); - } - } - } - else - { - self::InfoBox($lng['aps']['iderror']); - } - } - elseif($Action == 'reconfigure') - { - //check for valid instance id - - if(self::IsValidInstanceId($Id, $CustomerId)) - { - self::InfoBox('Reconfigure function not implemented in current version!'); - } - else - { - self::InfoBox($lng['aps']['iderror']); - } - } - elseif($Action == 'details') - { - //show advanced package infos if package id is valid - - if(self::IsValidPackageId($Id, true)) - { - self::ShowPackageInfo($Id, true); - } - else - { - self::InfoBox($lng['aps']['iderror']); - } - } - elseif($Action == 'scan' - && !isset($this->userinfo['customerid'])) - { - //find all files in temp directory - - $Files = scandir('./temp/'); - $Counter = 0; - foreach($Files as $File) - { - //skip invalid "files" - - if(substr($File, -4) != '.zip')continue; - - //install new package in system - - self::InstallNewPackage('./temp/' . $File); - $Counter+= 1; - } - - if($Counter == 0) - { - //throw error if no file was found - - self::InfoBox($lng['aps']['nopacketsforinstallation']); - } - } - elseif($Action == 'manageinstances' - && !isset($this->userinfo['customerid'])) - { - self::ManageInstances(); - } - elseif($Action == 'managepackages' - && !isset($this->userinfo['customerid'])) - { - self::ManagePackages(); - } - elseif($Action == 'upload' - && !isset($this->userinfo['customerid'])) - { - self::UploadNewPackages(); - } - elseif($Action == 'customerstatus') - { - self::CustomerStatus($CustomerId); - } - elseif($Action == 'search') - { - self::SearchPackages(); - } - elseif($Action == 'overview') - { - // show packages with paging - - if(isset($_GET['page']) - && preg_match('/^[0-9]+$/', $_GET['page']) != - 1) - { - //check if page parameter is valid - //get all packages to find out how many pages are needed - - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Status` = ' . PACKAGE_ENABLED . ' ORDER BY `Name` ASC'); - $Pages = intval($this->db->num_rows($result) / $PackagesPerSite); - - if(($this->db->num_rows($result) / $PackagesPerSite) > $Pages)$Pages+= 1; - - if($_GET['page'] >= 1 - && $_GET['page'] <= $Pages) - { - //page parameter is within available pages, now show packages for that given page - - $result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Status` = ' . PACKAGE_ENABLED . ' ORDER BY `Name` ASC LIMIT ' . $this->db->escape((intval($_GET['page']) - 1) * $PackagesPerSite) . ', ' . $this->db->escape($PackagesPerSite)); - - //show packages - - while($Row3 = $this->db->fetch_array($result2)) - { - self::ShowPackageInfo($Row3['ID']); - } - - //show URLs for other pages - - if($Pages > 1) - { - echo ('

    '); - for ($i = 1;$i < $Pages + 1;$i++) - { - if($i == $_GET['page']) - { - echo ('' . $i . ''); - } - else - { - echo ('' . $i . ''); - } - } - - echo ('


    '); - } - } - else - { - //page parameter isnt within available pages, show packages from first page - - $result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Status` = ' . PACKAGE_ENABLED . ' ORDER BY `Name` ASC LIMIT 0, ' . $this->db->escape($PackagesPerSite)); - - //show packages - - while($Row3 = $this->db->fetch_array($result2)) - { - self::ShowPackageInfo($Row3['ID']); - } - - //fetch number of packages to calculate the number of pages - - $result3 = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Status` = ' . PACKAGE_ENABLED . ' ORDER BY `Name` ASC'); - $Pages = intval($this->db->num_rows($result3) / $PackagesPerSite); - - if(($this->db->num_rows($result3) / $PackagesPerSite) > $Pages)$Pages+= 1; - - //show URLs for other pages - - if($Pages > 1) - { - echo ('

    '); - for ($i = 1;$i < $Pages + 1;$i++) - { - echo ('' . $i . ''); - } - - echo ('
    '); - } - } - } - else - { - //page parameter isnt valid, show packages from first page - - $result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Status` = ' . PACKAGE_ENABLED . ' ORDER BY `Name` ASC LIMIT 0, ' . $this->db->escape($PackagesPerSite)); - - if($this->db->num_rows($result2) == 0) - { - self::InfoBox($lng['aps']['nopackagestoinstall']); - return; - } - - //show packages - - while($Row3 = $this->db->fetch_array($result2)) - { - self::ShowPackageInfo($Row3['ID']); - } - - //fetch number of packages to calculate number of pages - - $result3 = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Status` = ' . PACKAGE_ENABLED . ' ORDER BY `Name` ASC'); - $Pages = intval($this->db->num_rows($result3) / $PackagesPerSite); - - if(($this->db->num_rows($result3) / $PackagesPerSite) > $Pages)$Pages+= 1; - - //show URLs for other pages - - if($Pages > 1) - { - echo ('

    '); - for ($i = 1;$i < $Pages + 1;$i++) - { - if($i == 1) - { - echo ('' . $i . ''); - } - else - { - echo ('' . $i . ''); - } - } - - echo ('


    '); - } - } - } - } - - /** - * function extracts resources from a zipfile to return or save them on disk - * - * @param filename zipfile to read data from - * @param file file within zip archive to read - * @param destination optional parameter where to save file from within the zip file - * @return success content of file from zip archive / error false - */ - - private function GetContentFromZip($Filename, $File, $Destination = '') - { - if(!file_exists($Filename))return false; - $Content = ''; - - //now using the new ZipArchive class from php 5.2 - - $Zip = new ZipArchive; - $Resource = $Zip->open(realpath($Filename)); - - if($Resource === true) - { - $FileHandle = $Zip->getStream($File); - - if(!$FileHandle)return false; - - while(!feof($FileHandle)) - { - $Content.= fread($FileHandle, 8192); - } - - fclose($FileHandle); - $Zip->close(); - } - else - { - //on 64 bit systems the zip functions can fail -> use safe_exec to extract the files - - $ReturnLines = array(); - $ReturnVal = - 1; - $ReturnLines = safe_exec('unzip -o -j -qq ' . escapeshellarg(realpath($Filename)) . ' ' . escapeshellarg($File) . ' -d ' . escapeshellarg(sys_get_temp_dir() . '/'), $ReturnVal); - - if($ReturnVal == 0) - { - $Content = file_get_contents(sys_get_temp_dir() . '/' . basename($File)); - unlink(sys_get_temp_dir() . '/' . basename($File)); - - if($Content == false)return false; - } - else - { - return false; - } - } - - //return content of file from within the zipfile or save to disk - - if($Content == '') - { - return false; - } - else - { - if($Destination == '') - { - return $Content; - } - else - { - //open file and save content - - $File = fopen($Destination, "wb"); - - if($File) - { - fwrite($File, $Content); - fclose($File); - } - else - { - return false; - } - } - } - } - - /** - * fetches the xml metafile from a zipfile and returns the parsed data - * - * @param filename zipfile containing the xml meta data - * @return success parsed xml content of zipfile / error false - */ - - private function GetXmlFromZip($Filename) - { - if(!file_exists($Filename))return false; - - //get content for xml meta data file from within the zipfile - - if($XmlContent = self::GetContentFromZip($Filename, 'APP-META.xml')) - { - //parse xml content - - $Xml = new SimpleXMLElement($XmlContent); - return $Xml; - } - else - { - return false; - } - } - - /** - * reads the content of a xml metafile from disk and returns the parsed data - * - * @param filename xmlfile to parse - * @return success parsed xml content of file / error false - */ - - private function GetXmlFromFile($Filename) - { - //read xml file from disk and return parsed data - - if(!file_exists($Filename))return false; - $XmlContent = file_get_contents($Filename); - $Xml = new SimpleXMLElement($XmlContent); - return $Xml; - } - - /** - * check whether a given package id is valid - * - * @param packageid id of package from database to check vor validity - * @param customer check if package can be used by customer and/or admin [true|false] - * @return success valid package id (id > 0 based on database layout) / error false - */ - - private function IsValidPackageId($PackageId, $Customer) - { - if(preg_match('/^[0-9]+$/', $PackageId) != 1)return false; - - if($Customer == true) - { - //customers can only see packages which are enabled - - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Status` = ' . PACKAGE_ENABLED . ' AND `ID` = ' . $this->db->escape($PackageId)); - - if($this->db->num_rows($result) > 0) - { - return $PackageId; - } - else - { - return false; - } - } - else - { - //admins can see all packages - - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `ID` = ' . $this->db->escape($PackageId)); - - if($this->db->num_rows($result) > 0) - { - return $PackageId; - } - else - { - return false; - } - } - } - - /** - * check whether a given instance id is valid - * - * @param packageid id of instance from database to check vor validity - * @return success valid instance id (id > 0 based on database layout) / error false - */ - - private function IsValidInstanceId($InstanceId, $CustomerId) - { - if(preg_match('/^[0-9]+$/', $InstanceId) != 1)return false; - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `CustomerID` = ' . $this->db->escape($CustomerId) . ' AND `ID` = ' . $this->db->escape($InstanceId)); - - if($this->db->num_rows($result) > 0) - { - return $InstanceId; - } - else - { - return false; - } - } - - /** - * save installation values fetched from the installation wizard - * - * @param packageid id of package from database - * @param customerid id of customer for who the values should be saved - * @param name name of field to save - * @param value value to save for previously given name - */ - - private function SetInstallationValue($PackageId, $CustomerId, $Name, $Value) - { - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_TEMP_SETTINGS . '` WHERE `PackageID` = ' . $this->db->escape($PackageId) . ' AND `CustomerID` = ' . $this->db->escape($CustomerId) . ' AND `Name` = "' . $this->db->escape($Name) . '"'); - - if($this->db->num_rows($result) == 0) - { - $this->db->query('INSERT INTO `' . TABLE_APS_TEMP_SETTINGS . '` (`PackageID`, `CustomerID`, `Name`, `Value`) VALUES (' . $this->db->escape($PackageId) . ', ' . $this->db->escape($CustomerId) . ', "' . $this->db->escape($Name) . '", "' . $this->db->escape($Value) . '")'); - } - else - { - $Row = $this->db->fetch_array($result); - $this->db->query('UPDATE `' . TABLE_APS_TEMP_SETTINGS . '` SET `PackageID` = ' . $this->db->escape($PackageId) . ', `CustomerID` = ' . $this->db->escape($CustomerId) . ', `Name` = "' . $this->db->escape($Name) . '", `Value` ="' . $this->db->escape($Value) . '" WHERE `ID` = ' . $this->db->escape($Row['ID'])); - } - } - - /** - * return previously saved installation values - * - * @param packageid id of package from database - * @param customerid id of customer for who the values should be read - * @param name name of field to read - * @return success value of field from database / error false - */ - - private function GetInstallationValue($PackageId, $CustomerId, $Name) - { - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_TEMP_SETTINGS . '` WHERE `PackageID` = ' . $this->db->escape($PackageId) . ' AND `CustomerID` = ' . $this->db->escape($CustomerId) . ' AND `Name` = "' . $this->db->escape($Name) . '"'); - - if($this->db->num_rows($result) == 0) - { - return false; - } - else - { - $Row = $this->db->fetch_array($result); - return $Row['Value']; - } - } - - /** - * fix a path given by the customer - * - * @param path path which could be compromised - * @return corrected path - */ - - private function MakeSecurePath($path) - { - //code based on syscp core code - - $search = Array( - '#/+#', - '#\.+#', - '#\0+#', - '#\\\\+#' - ); - $replace = Array( - '/', - '', - '', - '/' - ); - $path = preg_replace($search, $replace, $path); - - //no / at the end - - if(substr($path, strlen($path) - 1, 1) == '/')$path = substr($path, 0, strlen($path) - 1); - - //no / at beginning - - if(substr($path, 0, 1) == '/')$path = substr($path, 1); - return $path; - } - - /** - * validate the input of a customer against the xml meta descriptions - * - * @param packageid id of package from database - * @param customerid id of customer from database - * @return success/error array of errors found containing fields that were wrong - */ - - private function ValidatePackageData($PackageId, $CustomerId) - { - if(!self::IsValidPackageId($PackageId, true))return false; - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `ID` = ' . $this->db->escape($PackageId)); - $Row = $this->db->fetch_array($result); - $Xml = self::GetXmlFromFile('./packages/' . $Row['Path'] . '/APP-META.xml'); - - //return if parse of xml file has failed - - if($Xml == false)return false; - - //check all data fields of xml file against inut of customer - - $Error = array(); - foreach($Xml->settings->group as $Group) - { - foreach($Group->setting as $Setting) - { - $FieldId = strval($Setting['id']); - - if($Setting['type'] == 'string' - || $Setting['type'] == 'password') - { - if(isset($_POST[$FieldId])) - { - if(isset($Setting['min-length']) - && strlen($_POST[$FieldId]) < $Setting['min-length']) - { - if(!in_array($FieldId, $Error))$Error[] = $FieldId; - } - - if(isset($Setting['max-length']) - && strlen($_POST[$FieldId]) > $Setting['max-length']) - { - if(!in_array($FieldId, $Error))$Error[] = $FieldId; - } - - if(isset($Setting['regex']) - && !preg_match("/" . $Setting['regex'] . "/", $_POST[$FieldId])) - { - if(!in_array($FieldId, $Error))$Error[] = $FieldId; - } - - /* - elseif(isset($Setting['charset'])) - { - //CHARSET VALIDATION FOR LATER VERSIONS - } - */ - - if(!in_array($FieldId, $Error))self::SetInstallationValue($PackageId, $CustomerId, $FieldId, $_POST[$FieldId]); - } - else - { - if(!in_array($FieldId, $Error))$Error[] = $FieldId; - } - } - else - - if($Setting['type'] == 'email') - { - if(isset($_POST[$FieldId])) - { - if(!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/", $_POST[$FieldId])) - { - if(!in_array($FieldId, $Error))$Error[] = $FieldId; - } - - if(!in_array($FieldId, $Error))self::SetInstallationValue($PackageId, $CustomerId, $FieldId, $_POST[$FieldId]); - } - else - { - if(!in_array($FieldId, $Error))$Error[] = $FieldId; - } - } - elseif($Setting['type'] == 'domain-name') - { - if(isset($_POST[$FieldId])) - { - 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\.\,\?\'\\\+&%\$#\=~_\-]+))*$", $_POST[$FieldId])) - { - if(!in_array($FieldId, $Error))$Error[] = $FieldId; - } - - if(!in_array($FieldId, $Error))self::SetInstallationValue($PackageId, $CustomerId, $FieldId, $_POST[$FieldId]); - } - else - { - if(!in_array($FieldId, $Error))$Error[] = $FieldId; - } - } - elseif($Setting['type'] == 'integer') - { - if(isset($_POST[$FieldId])) - { - //check if number is in the format of float - - if(round($_POST[$FieldId]) != $_POST[$FieldId]) - { - if(!in_array($FieldId, $Error))$Error[] = $FieldId; - } - - if(!is_numeric($_POST[$FieldId])) - { - if(!in_array($FieldId, $Error))$Error[] = $FieldId; - } - - if(isset($Setting['min']) - && intval($_POST[$FieldId]) < intval($Setting['min'])) - { - if(!in_array($FieldId, $Error))$Error[] = $FieldId; - } - - if(isset($Setting['max']) - && intval($_POST[$FieldId]) > intval($Setting['max'])) - { - if(!in_array($FieldId, $Error))$Error[] = $FieldId; - } - - if(!in_array($FieldId, $Error))self::SetInstallationValue($PackageId, $CustomerId, $FieldId, intval($_POST[$FieldId])); - } - else - { - if(!in_array($FieldId, $Error))$Error[] = $FieldId; - } - } - elseif($Setting['type'] == 'float') - { - if(isset($_POST[$FieldId])) - { - if(!is_numeric($_POST[$FieldId])) - { - if(!in_array($FieldId, $Error))$Error[] = $FieldId; - } - - if(isset($Setting['min']) - && floatval($_POST[$FieldId]) < floatval($Setting['min'])) - { - if(!in_array($FieldId, $Error))$Error[] = $FieldId; - } - - if(isset($Setting['max']) - && floatval($_POST[$FieldId]) > floatval($Setting['max'])) - { - if(!in_array($FieldId, $Error))$Error[] = $FieldId; - } - - if(!in_array($FieldId, $Error))self::SetInstallationValue($PackageId, $CustomerId, $FieldId, floatval($_POST[$FieldId])); - } - else - { - if(!in_array($FieldId, $Error))$Error[] = $FieldId; - } - } - elseif($Setting['type'] == 'boolean') - { - if(isset($_POST[$FieldId]) - && $_POST[$FieldId] == 'true') - { - self::SetInstallationValue($PackageId, $CustomerId, $FieldId, 'true'); - } - else - { - self::SetInstallationValue($PackageId, $CustomerId, $FieldId, 'false'); - } - } - elseif($Setting['type'] == 'enum') - { - if(isset($_POST[$FieldId])) - { - foreach($Setting->choice as $Choice) - { - if($Choice['id'] == $_POST[$FieldId]) - { - self::SetInstallationValue($PackageId, $CustomerId, $FieldId, $_POST[$FieldId]); - break; - } - } - } - else - { - if(!in_array($FieldId, $Error))$Error[] = $FieldId; - } - } - } - } - - //database required? - - $XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db'); - - if($XmlDb->db->id) - { - if(isset($_POST['main_database_password'])) - { - if(strlen($_POST['main_database_password']) < 8) - { - if(!in_array('main_database_password', $Error))$Error[] = 'main_database_password'; - } - - if(!in_array('main_database_password', $Error))self::SetInstallationValue($PackageId, $CustomerId, 'main_database_password', $_POST['main_database_password']); - } - else - { - if(!in_array('main_database_password', $Error))$Error[] = 'main_database_password'; - } - } - - //application location - - if(isset($_POST['main_domain'])) - { - $result2 = $this->db->query('SELECT * FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `customerid` = ' . $this->db->escape($CustomerId) . ' AND `id` = ' . $this->db->escape($_POST['main_domain'])); - - if($this->db->num_rows($result2) > 0) - { - self::SetInstallationValue($PackageId, $CustomerId, 'main_domain', $_POST['main_domain']); - } - else - { - self::SetInstallationValue($PackageId, $CustomerId, 'main_domain', '-1'); - - if(!in_array('main_domain', $Error))$Error[] = 'main_domain'; - } - } - else - { - self::SetInstallationValue($PackageId, $CustomerId, 'main_domain', '-1'); - - if(!in_array('main_domain', $Error))$Error[] = 'main_domain'; - } - - if(isset($_POST['main_location'])) - { - $Temp = $_POST['main_location']; - - //call function twice for security reasons! - - $Temp = self::MakeSecurePath($Temp); - $Temp = self::MakeSecurePath($Temp); - - //previous instance check - - $InstallPath = ''; - - //find real path for selected domain - - $result3 = $this->db->query('SELECT * FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `customerid` = ' . $this->db->escape($CustomerId) . ' AND `id` = ' . $this->db->escape(self::GetInstallationValue($PackageId, $CustomerId, 'main_domain'))); - - if($this->db->num_rows($result3) > 0) - { - //build real path - - $Row = $this->db->fetch_array($result3); - $InstallPath = $Row['documentroot']; - $InstallPath.= $Temp; - $result4 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `CustomerID` = ' . $this->db->escape($CustomerId)); - - //get all instances from current customer - //thats needed because there cannot be installed two apps within the same directory - - while($Row3 = $this->db->fetch_array($result4)) - { - //get all domains linked to instances - - $result5 = $this->db->query('SELECT * FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . $this->db->escape($Row3['ID']) . ' AND `Name` = "main_domain"'); - - if($this->db->num_rows($result5) > 0) - { - $Row2 = $this->db->fetch_array($result5); - $Reserved = ''; - - //get real domain path - - $result6 = $this->db->query('SELECT * FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `customerid` = ' . $this->db->escape($CustomerId) . ' AND `id` = ' . $this->db->escape($Row2['Value'])); - - if($this->db->num_rows($result6) > 0) - { - $Row = $this->db->fetch_array($result6); - $Reserved = $Row['documentroot']; - } - - //get location under domain - - $result7 = $this->db->query('SELECT * FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . $this->db->escape($Row3['ID']) . ' AND `Name` = "main_location"'); - - if($this->db->num_rows($result7) > 0) - { - $Row = $this->db->fetch_array($result7); - $Reserved.= $Row['Value']; - } - - //check whether there is another app installed already - - if($Reserved == $InstallPath) - { - if(!in_array('main_location', $Error))$Error[] = 'main_location'; - break; - } - } - } - } - - if(!in_array('main_location', $Error))self::SetInstallationValue($PackageId, $CustomerId, 'main_location', $Temp); - } - else - { - if(!in_array('main_location', $Error))$Error[] = 'main_location'; - self::SetInstallationValue($PackageId, $CustomerId, 'main_location', ''); - } - - if($Xml->license) - { - if($Xml->license['must-accept'] - && $Xml->license['must-accept'] == 'true') - { - if(isset($_POST['license']) - && $_POST['license'] == 'true') - { - self::SetInstallationValue($PackageId, $CustomerId, 'license', 'true'); - } - else - { - self::SetInstallationValue($PackageId, $CustomerId, 'license', 'false'); - - if(!in_array('license', $Error))$Error[] = 'license'; - } - } - } - - unset($Xml); - return $Error; - } - - /** - * functions provides the frontend of the installation wizard for the customer - * - * @param packageid id of package from database - * @param wrongdata array of fields that were wrong in previous validation check - * @return error false / success none - */ - - private function ShowPackageInstaller($PackageId, $WrongData, $CustomerId) - { - global $lng, $filename, $s, $page, $action; - $Data = ''; - $Fieldname = ''; - $Fieldvalue = ''; - $Groupname = ''; - - if(!self::IsValidPackageId($PackageId, true))return false; - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `ID` = ' . $this->db->escape($PackageId)); - $Row = $this->db->fetch_array($result); - $Xml = self::GetXmlFromFile('./packages/' . $Row['Path'] . '/APP-META.xml'); - - //return if parse of xml file has failed - - if($Xml == false)return false; - - //show notifcation if customer has reached his installation limit - - if($this->userinfo['aps_packages'] != '-1' - && (int)$this->userinfo['aps_packages_used'] >= (int)$this->userinfo['aps_packages']) - { - self::InfoBox($lng['aps']['allpackagesused']); - return false; - } - - //icon for package - - $Icon = './images/default.png'; - - if($Xml->icon['path']) - { - $Icon = './packages/' . $Row['Path'] . '/' . basename($Xml->icon['path']); - } - - //show error message if some input was wrong - - $ErrorMessage = 0; - - if(count($WrongData) != 0) - { - $ErrorMessage = 1; - } - - //remove previously entered values if new installation has been triggered - - if(!isset($_POST['withinput'])) - { - $this->db->query('DELETE FROM `' . TABLE_APS_TEMP_SETTINGS . '` WHERE `CustomerID` = ' . $this->db->escape($CustomerId) . ' AND `PackageID` = ' . $this->db->escape($PackageId)); - } - - //where to install app? - - $Temp = 'http://'; - $Value = self::GetInstallationValue($PackageId, $CustomerId, 'main_location'); - - if($Value) - { - $Temp.= '/'; - } - else - { - $Temp.= '/'; - } - - if(in_array('main_domain', $WrongData)) - { - $Temp.= self::FieldError($lng['aps']['nodomains']); - } - - if(in_array('main_location', $WrongData)) - { - $Temp.= self::FieldError($lng['aps']['wrongpath']); - } - - if(!in_array('main_location', $WrongData) - && !in_array('main_domain', $WrongData))$Temp.= '
    '; - $Temp.= '' . $lng['aps']['application_location_description'] . ''; - $Groupname = $lng['aps']['basic_settings']; - $Fieldname = $lng['aps']['application_location']; - $Fieldvalue = $Temp; - eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); - - //database required? - - $XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db'); - - if($XmlDb->db->id) - { - $Temp = ''; - - if(in_array('main_database_password', $WrongData)) - { - $Temp.= self::FieldError($lng['aps']['dbpassword']); - } - - if(!in_array('main_database_password', $WrongData))$Temp.= '
    '; - $Temp.= '' . $lng['aps']['database_password_description'] . ''; - $Groupname = ''; - $Fieldname = $lng['aps']['database_password']; - $Fieldvalue = $Temp; - eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); - } - - foreach($Xml->settings->group as $Group) - { - $GroupPrinted = false; - foreach($Group->setting as $Setting) - { - $Temp = ''; - - if($Setting['type'] == 'string' - || $Setting['type'] == 'email' - || $Setting['type'] == 'integer' - || $Setting['type'] == 'float' - || $Setting['type'] == 'domain-name') - { - if(!$GroupPrinted) - { - $Groupname = $Group->name; - $GroupPrinted = true; - } - else - { - $Groupname = ''; - } - - $Value = self::GetInstallationValue($PackageId, $CustomerId, strval($Setting['id'])); - - if($Value) - { - $Temp.= ''; - } - elseif($Setting['default-value']) - { - $Temp.= ''; - } - else - { - $Temp.= ''; - } - - if(in_array($Setting['id'], $WrongData)) - { - if($Setting->{'error-message'}) - { - $Temp.= self::FieldError($Setting->{'error-message'}); - } - else - { - if($Setting['type'] == 'string') - { - $Temp.= self::FieldError($lng['aps']['error_text']); - } - elseif($Setting['type'] == 'email') - { - $Temp.= self::FieldError($lng['aps']['error_email']); - } - elseif($Setting['type'] == 'domain-name') - { - $Temp.= self::FieldError($lng['aps']['domain']); - } - elseif($Setting['type'] == 'integer') - { - $Temp.= self::FieldError($lng['aps']['error_integer']); - } - elseif($Setting['type'] == 'float') - { - $Temp.= self::FieldError($lng['aps']['error_float']); - } - } - } - } - elseif($Setting['type'] == 'password') - { - if(!$GroupPrinted) - { - $Groupname = $Group->name; - $GroupPrinted = true; - } - else - { - $Groupname = ''; - } - - $Temp.= ''; - - if(in_array($Setting['id'], $WrongData)) - { - if($Setting->{'error-message'}) - { - $Temp.= self::FieldError($Setting->{'error-message'}); - } - else - { - $Temp.= self::FieldError($lng['aps']['error_password']); - } - } - } - elseif($Setting['type'] == 'boolean') - { - if(!$GroupPrinted) - { - $Groupname = $Group->name; - $GroupPrinted = true; - } - else - { - $Groupname = ''; - } - - $Value = self::GetInstallationValue($PackageId, $CustomerId, strval($Setting['id'])); - - if($Value) - { - if($Value == 'true') - { - $Temp.= ''; - } - else - { - $Temp.= ''; - } - } - elseif($Setting['default-value'] == 'true') - { - $Temp.= ''; - } - else - { - $Temp.= ''; - } - } - elseif($Setting['type'] == 'enum') - { - if(!$GroupPrinted) - { - $Groupname = $Group->name; - $GroupPrinted = true; - } - else - { - $Groupname = ''; - } - - $Temp.= ''; - } - - //default field description - - if(isset($Setting->description)) - { - if(!in_array(strval($Setting['id']), $WrongData))$Temp.= '
    '; - $Temp.= '' . $Setting->description . ''; - } - - $Fieldname = $Setting->name; - $Fieldvalue = $Temp; - eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); - } - } - - if($Xml->license) - { - $Temp = ''; - - if($Xml->license['must-accept'] - && $Xml->license['must-accept'] == 'true') - { - if($Xml->license->text->name)$Temp.= $Xml->license->text->name . '
    '; - - if($Xml->license->text->file) - { - $Temp.= ''; - $Groupname = $lng['aps']['license']; - $Fieldname = $lng['aps']['license']; - $Fieldvalue = $Temp; - eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); - } - else - { - $Temp.= '' . $lng['aps']['error_license'] . ''; - $Groupname = $lng['aps']['license']; - $Fieldname = $lng['aps']['license']; - $Fieldvalue = $Temp; - eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); - } - - $Temp = ' ' . $lng['aps']['error_license']; - - if(in_array('license', $WrongData)) - { - $Temp.= self::FieldError($lng['aps']['error_licensenoaccept']); - } - - $Groupname = ''; - $Fieldname = $lng['aps']['license_agreement']; - $Fieldvalue = $Temp; - eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); - } - } - - eval("echo \"" . getTemplate("aps/installer") . "\";"); - unset($Xml); - } - - /** - * show informations for a package in basic or detailed view - * - * @param packageid id of package from database - * @param mode verbosity of data to view (basic|advanced) - * @return error false / success none - */ - - private function ShowPackageInfo($PackageId, $All = false) - { - global $lng, $filename, $s, $page, $action, $userinfo; - $Data = ''; - $Fieldname = ''; - $Fieldvalue = ''; - $Groupname = ''; - - if(!self::IsValidPackageId($PackageId, true))return false; - $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `ID` = ' . $this->db->escape($PackageId)); - $Row = $this->db->fetch_array($result); - $Xml = self::GetXmlFromFile('./packages/' . $Row['Path'] . '/APP-META.xml'); - - //return if parse of xml file has failed - - if($Xml == false)return false; - $Icon = './images/default.png'; - - //show icon and basic data - - if($Xml->icon['path']) - { - $Icon = './packages/' . $Row['Path'] . '/' . basename($Xml->icon['path']); - } - - $Summary = htmlspecialchars($Xml->summary); - $Fieldname = $lng['aps']['version']; - $Fieldvalue = $Xml->version . ' (Release ' . $Xml->release . ')'; - eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); - - //show website - - if($Xml->homepage) - { - $Fieldname = $lng['aps']['homepage']; - $Fieldvalue = '' . htmlspecialchars($Xml->homepage) . ''; - eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); - } - - //show size after installation - - if($Xml->{'installed-size'}) - { - $Fieldname = $lng['aps']['installed_size']; - $Fieldvalue = 'ca. ' . number_format(intval($Xml->{'installed-size'}) / (1024 * 1024), 2) . ' MB'; - eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); - } - - //show categories - - if($Xml->categories) - { - $Temp = ''; - foreach($Xml->categories->category as $Categories) - { - $Temp.= htmlspecialchars($Categories[0]) . '
    '; - } - - $Fieldname = $lng['aps']['categories']; - $Fieldvalue = $Temp; - eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); - } - - //show available languages - - if($Xml->languages) - { - $Temp = ''; - foreach($Xml->languages->language as $Languages) - { - $Temp.= $Languages[0] . ' '; - } - - $Fieldname = $lng['aps']['languages']; - $Fieldvalue = $Temp; - eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); - } - - //show more information - - if($All == true) - { - $Fieldname = $lng['aps']['long_description']; - $Fieldvalue = htmlspecialchars($Xml->description); - eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); - - //show config script language - - if($Xml->{'configuration-script-language'}) - { - $Fieldname = $lng['aps']['configscript']; - $Fieldvalue = $Xml->{'configuration-script-language'}; - eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); - } - - //show changelog - - $Temp = '
      '; - foreach($Xml->changelog->version as $Versions) - { - $Temp.= '
    • ' . $Versions['version'] . ' (Release ' . $Versions['release'] . ')'; - $Temp.= '
        '; - foreach($Versions->entry as $Entries) - { - $Temp.= '
      • ' . $Entries[0] . '
      • '; - } - - $Temp.= '
    • '; - } - - $Temp.= '
    '; - $Fieldname = $lng['aps']['changelog']; - $Fieldvalue = $Temp; - eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); - - //show license - - if($Xml->license) - { - if($Xml->license->text->file) - { - $Temp = ''; - - if($Xml->license->text->name)$Temp = $Xml->license->text->name . '
    '; - $Temp.= '
    '; - $Fieldname = $lng['aps']['license']; - $Fieldvalue = $Temp; - eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); - } - else - { - $Fieldname = $lng['aps']['license']; - $Fieldvalue = '' . $lng['aps']['linktolicense'] . ''; - eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); - } - } - - //show screenshots - - if($Xml->screenshot) - { - $Count = 0; - $Temp = ''; - foreach($Xml->screenshot as $Screenshot) - { - $Count+= 1; - $Temp.= '' . $Screenshot->description . '
    ' . $Screenshot->description . '
    '; - - if(count($Xml->screenshot) != $Count)$Temp.= '
    '; - } - - $Fieldname = $lng['aps']['screenshots']; - $Fieldvalue = $Temp; - eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); - } - } - - eval("echo \"" . getTemplate("aps/package") . "\";"); - unset($Xml); - } - - /** - * show a nice looking infobox - * - * @param message message to display in beautifull layout - */ - - private function InfoBox($Message) - { - global $lng, $filename, $s, $page, $action; - - //shows a box with informations - - eval("echo \"" . getTemplate("aps/infobox") . "\";"); - } - - /** - * returns html code for nice looking boxes to show customers wrong input - * - * @param error error to display in beautifull layout - */ - - private function FieldError($Error) - { - return '
    ' . $Error . '
    '; - } -} - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package APS + * @version $Id$ + * @todo implement charset validation + * reconfigure + * patch- and versionmanagement + * use settings/userinfo array instead a copy of this vars + * remove locked packages + * replace all html code + * add https support + * multi language support (package localization) + * zip stuff in own class + * logging + * button for remove of all failed installations + * increse database counter for customer + */ + +class ApsParser +{ + private $userinfo = array(); + private $settings = array(); + private $db = false; + + /** + * Constructor of class, setup basic variables needed by the class + * + * @param userinfo global array with the current userinfos + * @param settings global array with the current system settings + * @param db valid instance of the database class + */ + + public function __construct($userinfo, $settings, $db) + { + $this->settings = $settings; + $this->userinfo = $userinfo; + $this->db = $db; + } + + /** + * function provides instance management for admins + */ + + private function ManageInstances() + { + global $lng, $filename, $s, $page, $action; + $Question = false; + + //dont do anything if there is no instance + + if((int)$this->userinfo['customers_see_all'] == 1) + { + $Instances = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID`'); + } + else + { + $Instances = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `c`.`adminid` = ' . (int)$this->userinfo['adminid']); + } + + if($this->db->num_rows($Instances) == 0) + { + self::InfoBox($lng['aps']['noinstancesexisting']); + return; + } + + if(isset($_POST['save'])) + { + $Ids = ''; + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '`'); + + while($Row = $this->db->fetch_array($Result)) + { + //has admin clicked "yes" for question + + if(isset($_POST['answer']) + && $_POST['answer'] == $lng['panel']['yes']) + { + //instance installation stop + + if(isset($_POST['stop' . $Row['ID']]) + && $_POST['stop' . $Row['ID']] == '1') + { + //remove task + + $this->db->query('DELETE FROM `' . TABLE_APS_TASKS . '` WHERE `InstanceID` = ' . (int)$Row['ID']); + + //remove settings + + $this->db->query('DELETE FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . (int)$Row['ID']); + + //remove instance + + $this->db->query('DELETE FROM `' . TABLE_APS_INSTANCES . '` WHERE `ID` = ' . (int)$Row['ID']); + + //decrease used flag + + $this->db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `aps_packages_used` = `aps_packages_used` - 1 WHERE `customerid` = ' . (int)$Row[' CustomerID']); + } + + //instance uninstallation + + if(isset($_POST['remove' . $Row['ID']]) + && $_POST['remove' . $Row['ID']] == '1') + { + //remove installation task if it still exists + + $this->db->query('DELETE FROM `' . TABLE_APS_TASKS . '` WHERE `InstanceID` = ' . (int)$Row['ID'] . ' AND `Task` = ' . TASK_INSTALL); + + //insert task for uninstallation if it doesnt exists already + + $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_TASKS . '` WHERE `InstanceID` = ' . (int)$Row['ID'] . ' AND `Task` = ' . TASK_REMOVE); + + if($this->db->num_rows($Result2) == 0) + { + $this->db->query('INSERT INTO `' . TABLE_APS_TASKS . '` (`InstanceID`, `Task`) VALUES (' . (int)$Row['ID'] . ', ' . TASK_REMOVE . ')'); + $this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_UNINSTALL . ' WHERE `ID` = ' . (int)$Row['ID']); + $this->db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `aps_packages_used` = `aps_packages_used` - 1 WHERE `customerid` = ' . (int)$Row[' CustomerID']); + } + } + } + else + { + //backup all selected ids for yes/no question + + if(isset($_POST['stop' . $Row['ID']]) + && $_POST['stop' . $Row['ID']] == '1') + { + $Ids.= ''; + } + + if(isset($_POST['remove' . $Row['ID']]) + && $_POST['remove' . $Row['ID']] == '1') + { + $Ids.= ''; + } + } + } + + //if there are some ids, show yes/no question + + if($Ids != '' + && !isset($_POST['answer'])) + { + //show yes/no question + + $Message = $lng['question']['reallydoaction']; + eval("echo \"" . getTemplate("aps/askyesno") . "\";"); + $Question = true; + } + } + + //create table with contents based on instance status + + if($Question != true) + { + //INSTALL + + $InstancesInstall = ''; + + if((int)$this->userinfo['customers_see_all'] == 1) + { + $Result = $this->db->query('SELECT `p`.`Name`, `p`.`Version`, `p`.`Release`, `i`.`PackageID` FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` WHERE `i`.`Status` = ' . INSTANCE_INSTALL . ' GROUP BY `Version`, `Release`'); + } + else + { + $Result = $this->db->query('SELECT `p`.`Name`, `p`.`Version`, `p`.`Release`, `i`.`PackageID` FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `i`.`Status` = ' . INSTANCE_INSTALL . ' AND `c`.`adminid` = ' . (int)$this->userinfo['adminid'] . ' GROUP BY `Version`, `Release`'); + } + + while($Row = $this->db->fetch_array($Result)) + { + eval("\$InstancesInstall.=\"" . getTemplate("aps/manage_instances_package") . "\";"); + + //get instances + + if((int)$this->userinfo['customers_see_all'] == 1) + { + $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `Status` = ' . INSTANCE_INSTALL . ' AND `PackageID` = ' . $Row['PackageID']); + } + else + { + $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `i`.`Status` = ' . INSTANCE_INSTALL . ' AND `i`.`PackageID` = ' . $Row['PackageID'] . ' AND `c`.`adminid` = ' . (int)$this->userinfo['adminid']); + } + + while($Row2 = $this->db->fetch_array($Result2)) + { + //get customer name + + $Result3 = $this->db->query('SELECT * FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `customerid` = ' . $Row2['CustomerID']); + $Row3 = $this->db->fetch_array($Result3); + $Stop = makecheckbox('stop' . $Row2['ID'], '', '1'); + eval("\$InstancesInstall.=\"" . getTemplate("aps/manage_instances_install") . "\";"); + } + } + + //TASK ACTIVE + + $InstancesTaskActive = ''; + + if((int)$this->userinfo['customers_see_all'] == 1) + { + $Result = $this->db->query('SELECT `p`.`Name`, `p`.`Version`, `p`.`Release`, `i`.`PackageID` FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` WHERE `i`.`Status` = ' . INSTANCE_TASK_ACTIVE . ' GROUP BY `Version`, `Release`'); + } + else + { + $Result = $this->db->query('SELECT `p`.`Name`, `p`.`Version`, `p`.`Release`, `i`.`PackageID` FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `i`.`Status` = ' . INSTANCE_TASK_ACTIVE . ' AND `c`.`adminid` = ' . (int)$this->userinfo['adminid'] . ' GROUP BY `Version`, `Release`'); + } + + while($Row = $this->db->fetch_array($Result)) + { + eval("\$InstancesTaskActive.=\"" . getTemplate("aps/manage_instances_package") . "\";"); + + //get instances + + if((int)$this->userinfo['customers_see_all'] == 1) + { + $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `Status` = ' . INSTANCE_TASK_ACTIVE . ' AND `PackageID` = ' . $Row['PackageID']); + } + else + { + $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `i`.`Status` = ' . INSTANCE_TASK_ACTIVE . ' AND `i`.`PackageID` = ' . $Row['PackageID'] . ' AND `c`.`adminid` = ' . (int)$this->userinfo['adminid']); + } + + while($Row2 = $this->db->fetch_array($Result2)) + { + //get customer name + + $Result3 = $this->db->query('SELECT * FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `customerid` = ' . $Row2['CustomerID']); + $Row3 = $this->db->fetch_array($Result3); + eval("\$InstancesTaskActive.=\"" . getTemplate("aps/manage_instances_taskactive") . "\";"); + } + } + + //SUCCESS + + $InstancesSuccess = ''; + + if((int)$this->userinfo['customers_see_all'] == 1) + { + $Result = $this->db->query('SELECT `p`.`Name`, `p`.`Version`, `p`.`Release`, `i`.`PackageID` FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` WHERE `i`.`Status` = ' . INSTANCE_SUCCESS . ' GROUP BY `Version`, `Release`'); + } + else + { + $Result = $this->db->query('SELECT `p`.`Name`, `p`.`Version`, `p`.`Release`, `i`.`PackageID` FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `i`.`Status` = ' . INSTANCE_SUCCESS . ' AND `c`.`adminid` = ' . (int)$this->userinfo['adminid'] . ' GROUP BY `Version`, `Release`'); + } + + while($Row = $this->db->fetch_array($Result)) + { + eval("\$InstancesSuccess.=\"" . getTemplate("aps/manage_instances_package") . "\";"); + + //get instances + + if((int)$this->userinfo['customers_see_all'] == 1) + { + $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `Status` = ' . INSTANCE_SUCCESS . ' AND `PackageID` = ' . $Row['PackageID']); + } + else + { + $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `i`.`Status` = ' . INSTANCE_SUCCESS . ' AND `i`.`PackageID` = ' . $Row['PackageID'] . ' AND `c`.`adminid` = ' . (int)$this->userinfo['adminid']); + } + + while($Row2 = $this->db->fetch_array($Result2)) + { + //get customer name + + $Result3 = $this->db->query('SELECT * FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `customerid` = ' . $Row2['CustomerID']); + $Row3 = $this->db->fetch_array($Result3); + $Remove = makecheckbox('remove' . $Row2['ID'], '', '1'); + eval("\$InstancesSuccess.=\"" . getTemplate("aps/manage_instances_success") . "\";"); + } + } + + //ERROR + + $InstancesError = ''; + + if((int)$this->userinfo['customers_see_all'] == 1) + { + $Result = $this->db->query('SELECT `p`.`Name`, `p`.`Version`, `p`.`Release`, `i`.`PackageID` FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` WHERE `i`.`Status` = ' . INSTANCE_ERROR . ' GROUP BY `Version`, `Release`'); + } + else + { + $Result = $this->db->query('SELECT `p`.`Name`, `p`.`Version`, `p`.`Release`, `i`.`PackageID` FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `i`.`Status` = ' . INSTANCE_ERROR . ' AND `c`.`adminid` = ' . (int)$this->userinfo['adminid'] . ' GROUP BY `Version`, `Release`'); + } + + while($Row = $this->db->fetch_array($Result)) + { + eval("\$InstancesError.=\"" . getTemplate("aps/manage_instances_package") . "\";"); + + //get instances + + if((int)$this->userinfo['customers_see_all'] == 1) + { + $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `Status` = ' . INSTANCE_ERROR . ' AND `PackageID` = ' . $Row['PackageID']); + } + else + { + $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `i`.`Status` = ' . INSTANCE_ERROR . ' AND `i`.`PackageID` = ' . $Row['PackageID'] . ' AND `c`.`adminid` = ' . (int)$this->userinfo['adminid']); + } + + while($Row2 = $this->db->fetch_array($Result2)) + { + //get customer name + + $Result3 = $this->db->query('SELECT * FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `customerid` = ' . $Row2['CustomerID']); + $Row3 = $this->db->fetch_array($Result3); + $Remove = makecheckbox('remove' . $Row2['ID'], '', '1'); + eval("\$InstancesError.=\"" . getTemplate("aps/manage_instances_error") . "\";"); + } + } + + //UNINSTALL + + $InstancesUninstall = ''; + + if((int)$this->userinfo['customers_see_all'] == 1) + { + $Result = $this->db->query('SELECT `p`.`Name`, `p`.`Version`, `p`.`Release`, `i`.`PackageID` FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` WHERE `i`.`Status` = ' . INSTANCE_UNINSTALL . ' GROUP BY `Version`, `Release`'); + } + else + { + $Result = $this->db->query('SELECT `p`.`Name`, `p`.`Version`, `p`.`Release`, `i`.`PackageID` FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_APS_PACKAGES . '` AS `p` ON `i`.`PackageID` = `p`.`ID` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `i`.`Status` = ' . INSTANCE_UNINSTALL . ' AND `c`.`adminid` = ' . (int)$this->userinfo['adminid'] . ' GROUP BY `Version`, `Release`'); + } + + while($Row = $this->db->fetch_array($Result)) + { + eval("\$InstancesUninstall.=\"" . getTemplate("aps/manage_instances_package") . "\";"); + + //get instances + + if((int)$this->userinfo['customers_see_all'] == 1) + { + $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `Status` = ' . INSTANCE_UNINSTALL . ' AND `PackageID` = ' . $Row['PackageID']); + } + else + { + $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `i`.`Status` = ' . INSTANCE_UNINSTALL . ' AND `i`.`PackageID` = ' . $Row['PackageID'] . ' AND `c`.`adminid` = ' . (int)$this->userinfo['adminid']); + } + + while($Row2 = $this->db->fetch_array($Result2)) + { + //get customer name + + $Result3 = $this->db->query('SELECT * FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `customerid` = ' . $Row2['CustomerID']); + $Row3 = $this->db->fetch_array($Result3); + eval("\$InstancesUninstall.=\"" . getTemplate("aps/manage_instances_uninstall") . "\";"); + } + } + + //create some statistics + + $Statistics = ''; + + if((int)$this->userinfo['customers_see_all'] == 1) + { + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '`'); + $Statistics.= sprintf($lng['aps']['numerofinstances'], $this->db->num_rows($Result)); + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `Status` = ' . INSTANCE_SUCCESS); + $Statistics.= sprintf($lng['aps']['numerofinstancessuccess'], $this->db->num_rows($Result)); + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `Status` = ' . INSTANCE_ERROR); + $Statistics.= sprintf($lng['aps']['numerofinstanceserror'], $this->db->num_rows($Result)); + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `Status` IN (' . INSTANCE_INSTALL . ', ' . INSTANCE_TASK_ACTIVE . ', ' . INSTANCE_UNINSTALL . ')'); + $Statistics.= sprintf($lng['aps']['numerofinstancesaction'], $this->db->num_rows($Result)); + } + else + { + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `c`.`adminid` = ' . (int)$this->userinfo['adminid']); + $Statistics.= sprintf($lng['aps']['numerofinstances'], $this->db->num_rows($Result)); + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `c`.`adminid` = ' . (int)$this->userinfo['adminid'] . ' AND `Status` = ' . INSTANCE_SUCCESS); + $Statistics.= sprintf($lng['aps']['numerofinstancessuccess'], $this->db->num_rows($Result)); + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `c`.`adminid` = ' . (int)$this->userinfo['adminid'] . ' AND `Status` = ' . INSTANCE_ERROR); + $Statistics.= sprintf($lng['aps']['numerofinstanceserror'], $this->db->num_rows($Result)); + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `c`.`adminid` = ' . (int)$this->userinfo['adminid'] . ' AND `Status` IN (' . INSTANCE_INSTALL . ', ' . INSTANCE_TASK_ACTIVE . ', ' . INSTANCE_UNINSTALL . ')'); + $Statistics.= sprintf($lng['aps']['numerofinstancesaction'], $this->db->num_rows($Result)); + } + + eval("echo \"" . getTemplate("aps/manage_instances") . "\";"); + } + } + + /** + * unlink files recursively + * + * @param dir directory to delete recursive + */ + + protected function UnlinkRecursive($Dir) + { + if(!$DirHandle = @opendir($Dir))return; + + while(false !== ($Object = readdir($DirHandle))) + { + if($Object == '.' + || $Object == '..')continue; + + if(!@unlink($Dir . '/' . $Object)) + { + self::UnlinkRecursive($Dir . '/' . $Object); + } + } + + closedir($DirHandle); + @rmdir($Dir); + } + + /** + * function provides package management for admins + */ + + private function ManagePackages() + { + global $lng, $filename, $s, $page, $action; + $Question = false; + + if(isset($_POST['save'])) + { + if(isset($_POST['all']) + && $_POST['all'] == 'lock') + { + //lock alle packages + + $this->db->query('UPDATE `' . TABLE_APS_PACKAGES . '` SET `Status` = ' . PACKAGE_LOCKED . ' WHERE 1'); + } + elseif(isset($_POST['all']) + && $_POST['all'] == 'unlock') + { + //enable all packages + + $this->db->query('UPDATE `' . TABLE_APS_PACKAGES . '` SET `Status` = ' . PACKAGE_ENABLED . ' WHERE 1'); + } + elseif(isset($_POST['downloadallpackages'])) + { + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_TASKS . '` WHERE `Task` = ' . TASK_SYSTEM_DOWNLOAD); + + if($this->db->num_rows($Result) > 0) + { + self::InfoBox($lng['aps']['downloadtaskexists']); + } + else + { + $this->db->query('INSERT INTO `' . TABLE_APS_TASKS . '` (`Task`, `InstanceID`) VALUES (' . TASK_SYSTEM_DOWNLOAD . ', 0)'); + self::InfoBox($lng['aps']['downloadtaskinserted']); + } + } + elseif(isset($_POST['updateallpackages'])) + { + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_TASKS . '` WHERE `Task` = ' . TASK_SYSTEM_UPDATE); + + if($this->db->num_rows($Result) > 0) + { + self::InfoBox($lng['aps']['updatetaskexists']); + } + else + { + $this->db->query('INSERT INTO `' . TABLE_APS_TASKS . '` (`Task`, `InstanceID`) VALUES (' . TASK_SYSTEM_UPDATE . ', 0)'); + self::InfoBox($lng['aps']['updatetaskinserted']); + } + } + elseif(isset($_POST['enablenewest'])) + { + //lock alle packages, then find newerst package and enable it + + $this->db->query('UPDATE `' . TABLE_APS_PACKAGES . '` SET `Status` = ' . PACKAGE_LOCKED); + + //get all packages + + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` GROUP BY `Name`'); + + while($Row = $this->db->fetch_array($Result)) + { + //get newest version of package + + $NewestVersion = ''; + $NewestId = ''; + $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Name` = "' . $this->db->escape($Row['Name']) . '"'); + + while($Row2 = $this->db->fetch_array($Result2)) + { + if(version_compare($Row2['Version'] . '-' . $Row2['Release'], $NewestVersion) == 1) + { + $NewestVersion = $Row2['Version'] . '-' . $Row2['Release']; + $NewestId = $Row2['ID']; + } + } + + //enable newest version + + $this->db->query('UPDATE `' . TABLE_APS_PACKAGES . '` SET `Status` = ' . PACKAGE_ENABLED . ' WHERE `ID` = ' . $NewestId); + } + } + elseif(isset($_POST['removeunused'])) + { + //remove all packages which have no dependencies (count of package instances = 0) + + if(isset($_POST['answer']) + && $_POST['answer'] == $lng['panel']['yes']) + { + //get all packages + + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '`'); + + while($Row = $this->db->fetch_array($Result)) + { + //query how often package has been installed + + $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `PackageID` = ' . $Row['ID']); + + if($this->db->num_rows($Result2) == 0) + { + //remove package if number of package instances is 0 + + self::UnlinkRecursive('./packages/' . $Row['Path']); + $this->db->query('DELETE FROM `' . TABLE_APS_PACKAGES . '` WHERE `ID` = ' . $Row['ID']); + } + } + } + else + { + //show yes/no question + + $Message = $lng['question']['reallyremovepackages']; + $Ids = ''; + eval("echo \"" . getTemplate("aps/askyesno") . "\";"); + $Question = true; + } + } + elseif(isset($_POST['all']) + && $_POST['all'] == 'remove') + { + //remove all packages from system + + if(isset($_POST['answer']) + && $_POST['answer'] == $lng['panel']['yes']) + { + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '`'); + + //check for dependencies + + while($Row = $this->db->fetch_array($Result)) + { + //query how often package has been installed + + $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `PackageID` = ' . $Row['ID']); + + if($this->db->num_rows($Result2) == 0) + { + //remove package if number of package instances is 0 + + self::UnlinkRecursive('./packages/' . $Row['Path']); + $this->db->query('DELETE FROM `' . TABLE_APS_PACKAGES . '` WHERE `ID` = ' . $Row['ID']); + } + } + } + else + { + //show yes/no question + + $Message = $lng['question']['reallyremovepackages']; + $Ids = ''; + eval("echo \"" . getTemplate("aps/askyesno") . "\";"); + $Question = true; + } + } + else + { + //no special button or "all" function has been clicked + //continue to parse "single" options + + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '`'); + $Ids = ''; + + while($Row = $this->db->fetch_array($Result)) + { + //set new status of package (locked) + + if($Row['Status'] == PACKAGE_ENABLED + && isset($_POST['lock' . $Row['ID']])) + { + $this->db->query('UPDATE `' . TABLE_APS_PACKAGES . '` SET `Status` = ' . PACKAGE_LOCKED . ' WHERE `ID` = ' . $this->db->escape($Row['ID'])); + } + + //set new status of package (enabled) + + if($Row['Status'] == PACKAGE_LOCKED + && isset($_POST['unlock' . $Row['ID']])) + { + $this->db->query('UPDATE `' . TABLE_APS_PACKAGES . '` SET `Status` = ' . PACKAGE_ENABLED . ' WHERE `ID` = ' . $this->db->escape($Row['ID'])); + } + + //save id of package to remove for yes/no question + + if(isset($_POST['remove' . $Row['ID']])) + { + $Ids.= ''; + + //remove package if answer is yes + + if(isset($_POST['answer']) + && $_POST['answer'] == $lng['panel']['yes']) + { + self::UnlinkRecursive('./packages/' . $Row['Path']); + $this->db->query('DELETE FROM `' . TABLE_APS_PACKAGES . '` WHERE `ID` = ' . $Row['ID']); + } + } + } + + //if there are some ids to remove, show yes/no box + + if($Ids != '' + && !isset($_POST['answer'])) + { + //show yes/no question + + $Message = $lng['question']['reallyremovepackages']; + eval("echo \"" . getTemplate("aps/askyesno") . "\";"); + $Question = true; + } + } + } + + //show package overview with options + + if(!isset($_POST['save']) + || $Question == false) + { + //query all packages grouped by package name + + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` GROUP BY `Name` ORDER BY `Name` ASC'); + $Packages = ''; + + while($Row = $this->db->fetch_array($Result)) + { + eval("\$Packages.=\"" . getTemplate("aps/manage_packages_row") . "\";"); + + //get all package versions of current package + + $Result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Name` = "' . $this->db->escape($Row['Name']) . '" ORDER BY `Version` DESC, `Release` DESC'); + + while($Row2 = $this->db->fetch_array($Result2)) + { + //show package with options + + $Lock = ''; + $Unlock = ''; + + if($Row2['Status'] == PACKAGE_ENABLED) + { + $Lock = makecheckbox('lock' . $Row2['ID'], '', '1'); + } + + if($Row2['Status'] == PACKAGE_LOCKED) + { + $Unlock = makecheckbox('unlock' . $Row2['ID'], '', '1'); + } + + //query how often package has been installed + + $Result3 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `PackageID` = ' . $Row2['ID']); + $Installations = $this->db->num_rows($Result3); + + if($Installations == 0)$Remove = makecheckbox('remove' . $Row2['ID'], '', '1'); + eval("\$Packages.=\"" . getTemplate("aps/manage_packages_detail") . "\";"); + } + } + + if($this->db->num_rows($Result) == 0) + { + //no packages have been installed in system + + self::InfoBox($lng['aps']['nopackagesinsystem']); + eval("echo \"" . getTemplate("aps/manage_packages_download") . "\";"); + } + else + { + //generate some statistics + + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '`'); + $Temp = $this->db->num_rows($Result); + $Statistics = sprintf($lng['aps']['numerofpackagesinstalled'], $this->db->num_rows($Result)); + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Status` = ' . PACKAGE_ENABLED); + $Statistics.= sprintf($lng['aps']['numerofpackagesenabled'], $this->db->num_rows($Result)); + $Statistics.= sprintf($lng['aps']['numerofpackageslocked'], $Temp - $this->db->num_rows($Result)); + + if((int)$this->userinfo['customers_see_all'] == 1) + { + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '`'); + $Statistics.= sprintf($lng['aps']['numerofinstances'], $this->db->num_rows($Result)); + } + else + { + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` AS `i` INNER JOIN `' . TABLE_PANEL_CUSTOMERS . '` AS `c` ON `i`.`CustomerID` = `c`.`customerid` WHERE `c`.`adminid` = ' . (int)$this->userinfo['adminid']); + $Statistics.= sprintf($lng['aps']['numerofinstances'], $this->db->num_rows($Result)); + } + + eval("echo \"" . getTemplate("aps/manage_packages") . "\";"); + } + } + } + + /** + * function provides a upload site for new packages + */ + + private function UploadNewPackages() + { + global $lng, $filename, $s, $page, $action; + + //define how many files can be uploaded at once + + $Files = array(); + + //define how many upload fields will be shown + + for ($i = 1;$i <= (int)$this->settings['aps']['upload_fields'];$i++) + { + $Files[] = 'file' . $i; + } + + //check whether one file has been uploaded + + $FilesSet = false; + foreach($Files as $File) + { + if(isset($_FILES[$File]))$FilesSet = true; + } + + if($FilesSet == true) + { + //any file has been uploaded, now check for errors and parse the input + + foreach($Files as $File) + { + if(isset($_FILES[$File])) + { + $Errors = array(); + + //check uploaded files against some things + //check for filetype + + if(substr($_FILES[$File]['name'], -3) != 'zip' + && $_FILES[$File]['error'] == 0) + { + $Errors[] = $lng['aps']['notazipfile']; + } + + //check for filesize + + if(($_FILES[$File]['size'] > self::PhpMemorySizeToBytes(ini_get('upload_max_filesize')) && $_FILES[$File]['error'] == 0) + || $_FILES[$File]['error'] == 1) + { + $Errors[] = $lng['aps']['filetoobig']; + } + + //check is file isnt complete + + if($_FILES[$File]['error'] == 3) + { + $Errors[] = $lng['aps']['filenotcomplete']; + } + + //check for other php internal errors + + if($_FILES[$File]['error'] >= 6) + { + $Errors[] = $lng['aps']['phperror'] . (int)$_FILES[$File]['error']; + } + + //all checks are ok, try to install the package + + if(count($Errors) == 0 + && $_FILES[$File]['error'] == 0) + { + //install package in system + + if(move_uploaded_file($_FILES[$File]['tmp_name'], './temp/' . basename($_FILES[$File]['name'])) == true) + { + self::InstallNewPackage('./temp/' . basename($_FILES[$File]['name'])); + } + else + { + $Errors[] = $lng['aps']['moveproblem']; + } + } + + if(count($Errors) > 0) + { + //throw errors + + $ErrorMessage = ''; + foreach($Errors as $Error) + { + $ErrorMessage.= '
  • ' . $Error . '
  • '; + } + + self::InfoBox(sprintf($lng['aps']['uploaderrors'], htmlspecialchars($_FILES[$File]['name']), $ErrorMessage)); + } + } + } + } + + //generate upload fields + + $Output = ''; + foreach($Files as $File) + { + $Output.= '

    '; + } + + eval("echo \"" . getTemplate("aps/upload") . "\";"); + } + + /** + * function provides a frontend for customers to search packages + */ + + private function SearchPackages() + { + global $lng, $filename, $s, $page, $action; + $Error = 0; + $Ids = array(); + $ShowAll = 0; + + if(isset($_GET['keyword']) + && preg_match('/^[- _0-9a-z\.,:;]+$/i', $_GET['keyword']) != false) + { + //split all keywords + + $Elements = split('[ ,;]', trim($_GET['keyword'])); + + if(count($Elements) == 1 + && strlen($Elements[0]) == 0) + { + //no keyword given -> show all packages + + $ShowAll = 1; + } + else + { + foreach($Elements as $Key) + { + //skip empty values -> prevents that whitespaces lead to the result that all packages will be found + + if($Key == '')continue; + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Status` = ' . PACKAGE_ENABLED . ' AND (`Name` LIKE "%' . $this->db->escape($Key) . '%" OR `Path` LIKE "%' . $this->db->escape($Key) . '%" OR `Version` LIKE "%' . $this->db->escape($Key) . '%") '); + + //check if keyword got a result + + if($this->db->num_rows($result) > 0) + { + //add all package ids which match to result array + + while($Temp = $this->db->fetch_array($result)) + { + if(!in_array($Temp['ID'], $Ids))$Ids[] = $Temp['ID']; + } + } + } + + //no matches found to given keywords + + if(count($Ids) == 0) + { + $Error = 2; + } + } + } + elseif(isset($_GET['keyword']) + && strlen($_GET['keyword']) != 0) + { + //input contains illegal characters + + $Error = 1; + } + elseif(isset($_GET['keyword']) + && strlen($_GET['keyword']) == 0) + { + //nothing has been entered - show all packages + + $ShowAll = 1; + } + + //show errors + + if($Error == 1) + { + self::InfoBox($lng['aps']['nospecialchars']); + } + elseif($Error == 2) + { + self::InfoBox($lng['aps']['noitemsfound']); + } + + //show keyword only if format is ok + + $Keyword = ''; + + if(isset($_GET['keyword']) + && $Error == 0)$Keyword = htmlspecialchars($_GET['keyword']); + eval("echo \"" . getTemplate("aps/search") . "\";"); + + //show results + + if(($Error == 0 && count($Ids) > 0) + || $ShowAll == 1) + { + //run query based on search results + + if($ShowAll != 1) + { + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `ID` IN (' . $this->db->escape(implode(',', $Ids)) . ')'); + } + else + { + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Status` = ' . PACKAGE_ENABLED); + } + + //show package infos + + if($this->db->num_rows($result) > 0) + { + if($this->db->num_rows($result) == 1) + { + self::InfoBox(sprintf($lng['aps']['searchoneresult'], $this->db->num_rows($result))); + } + else + { + self::InfoBox(sprintf($lng['aps']['searchmultiresult'], $this->db->num_rows($result))); + } + + while($Row = $this->db->fetch_array($result)) + { + self::ShowPackageInfo($Row['ID']); + } + } + } + } + + /** + * function provides a frontend for customers to show the status of installed packages + * + * @param customerid id of customer from database + */ + + private function CustomerStatus($CustomerId) + { + global $lng, $filename, $s, $page, $action; + $Data = ''; + $Fieldname = ''; + $Fieldvalue = ''; + $Groupname = ''; + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `CustomerID` = ' . $this->db->escape($CustomerId)); + + //customer hasnt installed any package yet + + if($this->db->num_rows($result) == 0) + { + self::InfoBox($lng['aps']['nopackagesinstalled']); + return; + } + + while($Row = $this->db->fetch_array($result)) + { + $Data = ''; + $result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `ID` = ' . $this->db->escape($Row['PackageID'])); + $Row2 = $this->db->fetch_array($result2); + $Xml = self::GetXmlFromFile('./packages/' . $Row2['Path'] . '/APP-META.xml'); + + //skip if parse of xml has failed + + if($Xml == false)continue; + $Icon = './images/default.png'; + + //show data and status of package + + if($Xml->icon['path']) + { + $Icon = './packages/' . $Row2['Path'] . '/' . basename($Xml->icon['path']); + } + + $Summary = $Xml->summary; + $Fieldname = $lng['aps']['version']; + $Fieldvalue = $Xml->version . ' (Release ' . $Xml->release . ')'; + eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); + $Temp = ''; + + switch($Row['Status']) + { + case INSTANCE_INSTALL: + $Temp.= $lng['aps']['instance_install']; + break; + case INSTANCE_TASK_ACTIVE: + $Temp.= $lng['aps']['instance_task_active']; + break; + case INSTANCE_SUCCESS: + $Temp.= $lng['aps']['instance_success']; + break; + case INSTANCE_ERROR: + $Temp.= $lng['aps']['instance_error']; + break; + case INSTANCE_UNINSTALL: + $Temp.= $lng['aps']['instance_uninstall']; + break; + default: + $Temp.= $lng['aps']['unknown_status']; + break; + } + + $Fieldname = $lng['aps']['currentstatus']; + $Fieldvalue = $Temp; + eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); + $result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_TASKS . '` WHERE `InstanceID` = ' . $this->db->escape($Row['ID'])); + $Temp = ''; + + if($this->db->num_rows($result2) > 0) + { + while($Row2 = $this->db->fetch_array($result2)) + { + switch($Row2['Task']) + { + case TASK_INSTALL: + $Temp.= $lng['aps']['task_install'] . '
    '; + break; + case TASK_REMOVE: + $Temp.= $lng['aps']['task_remove'] . '
    '; + break; + case TASK_RECONFIGURE: + $Temp.= $lng['aps']['task_reconfigure'] . '
    '; + break; + case TASK_UPGRADE: + $Temp.= $lng['aps']['task_upgrade'] . '
    '; + break; + default: + $Temp.= $lng['aps']['unknown_status'] . '
    '; + break; + } + } + } + else + { + $Temp.= $lng['aps']['no_task']; + } + + $Fieldname = $lng['aps']['activetasks']; + $Fieldvalue = $Temp; + eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); + + //show entrypoints for application (important URLs within the application) + + if($Row['Status'] == INSTANCE_SUCCESS) + { + $Temp = ''; + + //get domain to domain id + + $result3 = $this->db->query('SELECT * FROM `' . TABLE_APS_SETTINGS . '` WHERE `Name` = "main_domain" AND `InstanceID` = ' . $this->db->escape($Row['ID'])); + $Row3 = $this->db->fetch_array($result3); + $result4 = $this->db->query('SELECT * FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `customerid` = ' . $this->db->escape($CustomerId) . ' AND `id` = ' . $this->db->escape($Row3['Value'])); + $Row3 = $this->db->fetch_array($result4); + $Domain = $Row3['domain']; + + //get sub location for domain + + $result5 = $this->db->query('SELECT * FROM `' . TABLE_APS_SETTINGS . '` WHERE `Name` = "main_location" AND `InstanceID` = ' . $this->db->escape($Row['ID'])); + $Row3 = $this->db->fetch_array($result5); + $Location = $Row3['Value']; + + //show main site link + + if($Location == '') + { + $Temp.= '' . $lng['aps']['mainsite'] . '
    '; + } + else + { + $Temp.= '' . $lng['aps']['mainsite'] . '
    '; + } + + //show other links from meta data + + if($Xml->{'entry-points'}) + { + foreach($Xml->{'entry-points'}->entry as $Entry) + { + if($Location == '') + { + $Temp.= '' . $Entry->label . '
    '; + } + else + { + $Temp.= '' . $Entry->label . '
    '; + } + } + } + + $Fieldname = $lng['aps']['applicationlinks']; + $Fieldvalue = $Temp; + eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); + } + + eval("echo \"" . getTemplate("aps/package_status") . "\";"); + unset($Xml); + } + } + + /** + * function creates a new instance of a package based on the installer data + * + * @param packageid id of package from database + * @param customerid id of customer from database + * @return success true/error false + */ + + private function CreatePackageInstance($PackageId, $CustomerId) + { + global $lng; + + if(!self::IsValidPackageId($PackageId, true))return false; + + //has user pressed F5/reload? + + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_TEMP_SETTINGS . '` WHERE `CustomerID` = ' . $this->db->escape($CustomerId)); + + if($this->db->num_rows($result) == 0) + { + self::InfoBox($lng['aps']['erroronnewinstance']); + return false; + } + + //get path to package xml file + + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `ID` = ' . $this->db->escape($PackageId)); + $Row = $this->db->fetch_array($result); + $Xml = self::GetXmlFromFile('./packages/' . $Row['Path'] . '/APP-META.xml'); + + //return if parse of xml file has failed + + if($Xml == false)return false; + + //add new instance + + $this->db->query('INSERT INTO `' . TABLE_APS_INSTANCES . '` (`CustomerID`, `PackageID`, `Status`) VALUES (' . $this->db->escape($CustomerId) . ', ' . $this->db->escape($PackageId) . ', ' . INSTANCE_INSTALL . ')'); + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `CustomerID` = ' . $this->db->escape($CustomerId) . ' AND `PackageID` = ' . $this->db->escape($PackageId) . ' AND `Status` = ' . INSTANCE_INSTALL . ' ORDER BY ID DESC'); + $Row = $this->db->fetch_array($result); + + //copy & delete temporary data + + $this->db->query('INSERT INTO `' . TABLE_APS_SETTINGS . '` (`InstanceID`, `Name`, `Value`) SELECT ' . $this->db->escape($Row['ID']) . ' AS `InstanceID`, `Name`, `Value` FROM `' . TABLE_APS_TEMP_SETTINGS . '` WHERE `CustomerID` = ' . $this->db->escape($CustomerId) . ' AND `PackageID` = ' . $this->db->escape($PackageId)); + $this->db->query('DELETE FROM `' . TABLE_APS_TEMP_SETTINGS . '` WHERE `CustomerID` = ' . $this->db->escape($CustomerId) . ' AND `PackageID` = ' . $this->db->escape($PackageId)); + + //add task for installation + + $this->db->query('INSERT INTO `' . TABLE_APS_TASKS . '` (`InstanceID`, `Task`) VALUES(' . $this->db->escape($Row['ID']) . ', ' . TASK_INSTALL . ')'); + + //update used counter for packages + + $this->db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `aps_packages_used` = `aps_packages_used` + 1 WHERE `customerid` = ' . (int)$CustomerId); + self::InfoBox(sprintf($lng['aps']['successonnewinstance'], $Xml->name)); + unset($Xml); + } + + /** + * convert human readable memory sizes into bytes + * + * @param value ini_get() formated memory size + * @return memory size in bytes + */ + + private function PhpMemorySizeToBytes($Value) + { + //convert memory formats from php.ini to a integer value in bytes + + $Value = trim($Value); + $Last = strtolower($Value{strlen($Value) - 1}); + + switch($Last) + { + case 'g': + $Value*= 1024; + case 'm': + $Value*= 1024; + case 'k': + $Value*= 1024; + } + + return $Value; + } + + /** + * convert php.ini formated strings into true and false as a string + * + * @param value value to read from php.ini (format: safe_mode or safe-mode) + * @return (true|false) as string + */ + + private function TrueFalseIniGet($Value) + { + //convert php.ini values to true and false as string + + $Value = ini_get(str_replace(array('-'), array('_'), $Value)); + + if($Value == 0 + || $Value == false + || $Value == 'off') + { + return 'false'; + } + else + { + return 'true'; + } + } + + /** + * packages can fail during the validation process. this function allows to check for exceptions + * + * @param category category as string to check + * @param item item within category to check + * @return success true (value has exception) / error false (value has no exception) + */ + + private function CheckException($Category, $Item, $Value) + { + global $settings; + + //search for element within system settings + + $Elements = explode(',', $settings['aps'][$Category . '-' . $Item]); + foreach($Elements as $Element) + { + if(strtolower($Element) == strtolower($Value))return true; + } + + return false; + } + + /** + * packages must be validated within the submappings of a filesystem structure + * + * @param parentmapping instance of parsed xml file, current mapping position + * @param url relative path for application specifying the current path within the mapping tree + * @return array with errors found, optional empty when no errors were found + */ + + private function CheckSubmappings($ParentMapping, $Url) + { + global $lng; + $Error = array(); + + //check for special PHP handler extensions + + $XmlPhpMapping = $ParentMapping->children('http://apstandard.com/ns/1/php'); + foreach($XmlPhpMapping->handler as $Handler) + { + if(isset($Handler->extension[0]) + && strval($Handler->extension[0]) != 'php') + { + $Error[] = $lng['aps']['php_misc_handler']; + } + + if(isset($Handler->disabled)) + { + $Error[] = $lng['aps']['php_misc_directoryhandler']; + } + } + + //check for special ASP.NET url handler within mappings + + $XmlAspMapping = $ParentMapping->children('http://apstandard.com/ns/1/aspnet'); + + if($XmlAspMapping->handler) + { + $Error[] = $lng['aps']['asp_net']; + } + + //check for special CGI url handlers within mappings + + $XmlCgiMapping = $ParentMapping->children('http://apstandard.com/ns/1/cgi'); + + if($XmlCgiMapping->handler) + { + $Error[] = $lng['aps']['cgi']; + } + + //resolve deeper mappings + + foreach($ParentMapping->mapping as $Mapping) + { + $Return = array(); + + //recursive check of other mappings + + if($Url == '/') + { + $Return = self::CheckSubmappings($Mapping, $Url . $Mapping['url']); + } + else + { + $Return = self::CheckSubmappings($Mapping, $Url . '/' . $Mapping['url']); + } + + //if recursive checks found errors, attach them + + if(count($Return) != 0) + { + foreach($Return as $Value) + { + if(!in_array($Value, $Error))$Error[] = $Value; + } + } + } + + return $Error; + } + + /** + * function validates a package against a lot of options and installs it if all conditions have succeeded + * + * @param filename path to zipfile to install + */ + + private function InstallNewPackage($Filename) + { + global $lng; + + if(file_exists($Filename) + && $Xml = self::GetXmlFromZip($Filename)) + { + $Error = array(); + + //check alot of stuff if package is supported + //php modules + + $XmlPhp = $Xml->requirements->children('http://apstandard.com/ns/1/php'); + + if($XmlPhp->extension) + { + $ExtensionsLoaded = get_loaded_extensions(); + foreach($XmlPhp->extension as $Extension) + { + if(!in_array($Extension, $ExtensionsLoaded) + && !self::CheckException('php', 'extension', $Extension)) + { + $Error[] = sprintf($lng['aps']['php_extension'], $Extension); + } + } + } + + //php functions + + if($XmlPhp->function) + { + foreach($XmlPhp->function as $Function) + { + if(!function_exists($Function) + && !self::CheckException('php', 'function', $Function)) + { + $Error[] = sprintf($lng['aps']['php_function'], $Function); + } + } + } + + //php values + + $PhpValues = array( + 'short-open-tag', + 'file-uploads', + 'magic-quotes-gpc', + 'register-globals', + 'allow-url-fopen', + 'safe-mode' + ); + foreach($PhpValues as $Value) + { + if($XmlPhp->{$Value}) + { + if(self::TrueFalseIniGet($Value) != $XmlPhp->{$Value} + && !self::CheckException('php', 'configuration', str_replace(array('-'), array('_'), $Value))) + { + $Error[] = sprintf($lng['aps']['php_configuration'], str_replace(array('-'), array('_'), $Value)); + } + } + } + + if($XmlPhp->{'post-max-size'}) + { + if(self::PhpMemorySizeToBytes(ini_get('post_max_size')) < intval($XmlPhp->{'post-max-size'}) + && !self::CheckException('php', 'configuration', 'post_max_size')) + { + $Error[] = $lng['aps']['php_configuration_post_max_size']; + } + } + + if($XmlPhp->{'memory-limit'}) + { + if(self::PhpMemorySizeToBytes(ini_get('memory_limit')) < intval($XmlPhp->{'memory-limit'}) + && !self::CheckException('php', 'configuration', 'memory_limit')) + { + $Error[] = $lng['aps']['php_configuration_memory_limit']; + } + } + + if($XmlPhp->{'max-execution-time'}) + { + if(ini_get('max_execution_time') < intval($XmlPhp->{'max-execution-time'}) + && !self::CheckException('php', 'configuration', 'max_execution_time')) + { + $Error[] = $lng['aps']['php_configuration_max_execution_time']; + } + } + + //php version + //must be done with xpath otherwise check not possible (XML parser problem with attributes) + + $Xml->registerXPathNamespace('phpversion', 'http://apstandard.com/ns/1/php'); + $Result = $Xml->xpath('//phpversion:version'); + + if(isset($Result[0]['min'])) + { + if(version_compare($Result[0]['min'], PHP_VERSION) == 1) + { + $Error[] = $lng['aps']['php_general_old']; + } + } + + if(isset($Result[0]['max-not-including'])) + { + if(version_compare($Result[0]['max-not-including'], PHP_VERSION) == - 1) + { + $Error[] = $lng['aps']['php_general_new']; + } + } + + //database + + $XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db'); + + if($XmlDb->db->id) + { + if($XmlDb->db->{'server-type'} != 'mysql') + { + $Error[] = $lng['aps']['db_mysql_support']; + } + + if(version_compare($XmlDb->db->{'server-min-version'}, mysql_get_server_info()) == 1) + { + $Error[] = $lng['aps']['db_mysql_version']; + } + } + + //ASP.NET + + $XmlAsp = $Xml->requirements->children('http://apstandard.com/ns/1/aspnet'); + + if($XmlAsp->handler + || $XmlAsp->permissions + || $XmlAsp->version) + { + $Error[] = $lng['aps']['asp_net']; + } + + //CGI + + $XmlCgi = $Xml->requirements->children('http://apstandard.com/ns/1/cgi'); + + if($XmlCgi->handler) + { + $Error[] = $lng['aps']['cgi']; + } + + //webserver modules + + $XmlWebserver = $Xml->requirements->children('http://apstandard.com/ns/1/apache'); + + if($XmlWebserver->{'required-module'}) + { + if(function_exists('apache_get_modules')) + { + $ModulesLoaded = apache_get_modules(); + foreach($XmlWebserver->{'required-module'} as $Module) + { + if(!in_array($Module, $ModulesLoaded) + && !self::CheckException('webserver', 'module', $Module)) + { + $Error[] = sprintf($lng['aps']['webserver_module'], $Module); + } + } + } + else + { + if(!self::CheckException('webserver', 'module', 'fcgid-any'))$Error[] = $lng['aps']['webserver_fcgid']; + } + } + + //webserver .htaccess + + if($XmlWebserver->htaccess + && !self::CheckException('webserver', 'htaccess', 'htaccess')) + { + $Error[] = $lng['aps']['webserver_htaccess']; + } + + //configuration script check + + if($Xml->{'configuration-script-language'} + && $Xml->{'configuration-script-language'} != 'php') + { + $Error[] = $lng['aps']['misc_configscript']; + } + + //validation against a charset not possible in current version + + foreach($Xml->settings->group as $Group) + { + foreach($Group->setting as $Setting) + { + if($Setting['type'] == 'string' + || $Setting['type'] == 'password') + { + if(isset($Setting['charset'])) + { + if(!in_array($lng['aps']['misc_charset'], $Error))$Error[] = $lng['aps']['misc_charset']; + } + } + } + } + + //check different errors/features in submappings + + $Return = self::CheckSubmappings($Xml->mapping, $Xml->mapping['url']); + + if(count($Return) != 0) + { + foreach($Return as $Value) + { + if(!in_array($Value, $Error))$Error[] = $Value; + } + } + + //check already installed versions + + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Name` = "' . $this->db->escape($Xml->name) . '"'); + $Newer = 0; + + if($this->db->num_rows($result) > 0) + { + while($Row = $this->db->fetch_array($result)) + { + //package is newer, install package as a update + + if(version_compare($Row['Version'] . '-' . $Row['Release'], $Xml->version . '-' . $Xml->release) == - 1) + { + $Newer = 1; + } + + //package is installed already with same version, cancel installation + + if(version_compare($Row['Version'] . '-' . $Row['Release'], $Xml->version . '-' . $Xml->release) == 0) + { + $Error[] = $lng['aps']['misc_version_already_installed']; + break; + } + + //package is older than the one which is installed already, cancel installation + + if(version_compare($Row['Version'] . '-' . $Row['Release'], $Xml->version . '-' . $Xml->release) == 1) + { + $Error[] = $lng['aps']['misc_only_newer_versions']; + break; + } + } + } + + if(count($Error) > 0) + { + //show errors + + $Output = ''; + foreach($Error as $Entry) + { + $Output.= '
  • ' . $Entry . '
  • '; + } + + self::InfoBox(sprintf($lng['aps']['erroronscan'], $Xml->name, $Output)); + return false; + } + else + { + //install package in system, all checks succeeded + + $Destination = './packages/' . basename($Filename) . '/'; + + //create package directory + + if(!file_exists($Destination))mkdir($Destination, 0777, true); + + //copy xml meta data + + self::GetContentFromZip($Filename, 'APP-META.xml', $Destination . 'APP-META.xml'); + + //copy screenshots + + if($Xml->screenshot) + { + foreach($Xml->screenshot as $Screenshot) + { + self::GetContentFromZip($Filename, $Screenshot['path'], $Destination . basename($Screenshot['path'])); + } + } + + //copy icon + + if($Xml->icon['path']) + { + self::GetContentFromZip($Filename, $Xml->icon['path'], $Destination . basename($Xml->icon['path'])); + } + + //copy license + + if($Xml->license + && $Xml->license->text->file) + { + self::GetContentFromZip($Filename, $Xml->license->text->file, $Destination . 'license.txt'); + } + + //insert package to database + + $this->db->query('INSERT INTO `' . TABLE_APS_PACKAGES . '` (`Path`, `Name`, `Version`, `Release`, `Status`) VALUES ("' . $this->db->escape(basename($Filename)) . '", "' . $this->db->escape($Xml->name) . '", "' . $this->db->escape($Xml->version) . '", ' . $this->db->escape($Xml->release) . ', ' . PACKAGE_LOCKED . ')'); + + //copy zipfile do destination + + copy($Filename, $Destination . basename($Filename)); + unlink($Filename); + + //show some feedback messages to admin + + if($Newer == 1) + { + self::InfoBox(sprintf($lng['aps']['successpackageupdate'], $Xml->name)); + } + else + { + self::InfoBox(sprintf($lng['aps']['successpackageinstall'], $Xml->name)); + } + + unset($Xml); + return true; + } + } + else + { + //file cannot be unzipped or parse of xml data has failed + + self::InfoBox(sprintf($lng['aps']['invalidzipfile'], basename($Filename))); + return false; + } + } + + /** + * main function of the class, provides all of the aps installer frontend + */ + + public function MainHandler($Action) + { + global $lng, $filename, $s, $page, $action, $Id; + + //check for basic functions, classes and permissions + + $Error = ''; + + if(!class_exists('SimpleXMLElement') + || !function_exists('zip_open')) + { + $Error.= '
  • ' . $lng['aps']['class_zip_missing'] . '
  • '; + } + + if(!is_writable('./temp/') + || !is_writable('./packages/')) + { + $Error.= '
  • ' . $lng['aps']['dir_permissions'] . '
  • '; + } + + if($Error != '') + { + //show different error to customer and admin + + if(!isset($this->userinfo['customerid'])) + { + self::InfoBox(sprintf($lng['aps']['initerror'], $Error)); + } + else + { + self::InfoBox($lng['aps']['initerror_customer']); + } + + return; + } + + $CustomerId = $this->userinfo['customerid']; + $AdminId = $this->userinfo['adminid']; + $PackagesPerSite = $this->settings['aps']['items_per_page']; + + //run different functions based on action + + if($Action == 'install') + { + //check for valid package id + + if(self::IsValidPackageId($Id, true)) + { + //installation data is given + + if(isset($_POST['withinput'])) + { + $Errors = self::ValidatePackageData($Id, $CustomerId); + + //if there are no input errors, create a new instance + + if(count($Errors) == 0) + { + self::CreatePackageInstance($Id, $CustomerId); + } + else + { + self::ShowPackageInstaller($Id, $Errors, $CustomerId); + } + } + else + { + //empty array -> no errors will be shown to customer + + $Errors = array(); + self::ShowPackageInstaller($Id, $Errors, $CustomerId); + } + } + else + { + self::InfoBox($lng['aps']['iderror']); + } + } + elseif($Action == 'remove') + { + //check for valid instance id + + if(self::IsValidInstanceId($Id, $CustomerId)) + { + //customer has clicked yes to uninstall a package + + if(isset($_POST['answer']) + && $_POST['answer'] == $lng['panel']['yes']) + { + //check if there is already an task + + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_TASKS . '` WHERE `InstanceID` = ' . $this->db->escape($Id) . ' AND `Task` = ' . TASK_REMOVE); + + if($this->db->num_rows($result) > 0) + { + self::InfoBox($lng['aps']['removetaskexisting']); + } + else + { + //remove package, no task existing + + $this->db->query('INSERT INTO `' . TABLE_APS_TASKS . '` (`InstanceID`, `Task`) VALUES (' . (int)$Id . ', ' . TASK_REMOVE . ')'); + $this->db->query('UPDATE `' . TABLE_APS_INSTANCES . '` SET `Status` = ' . INSTANCE_UNINSTALL . ' WHERE `ID` = ' . (int)$Id); + $this->db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `aps_packages_used` = `aps_packages_used` - 1 WHERE `customerid` = ' . (int)$CustomerId); + self::InfoBox($lng['aps']['packagewillberemoved']); + } + } + else + { + //show yes/no question + + $Message = $lng['question']['reallywanttoremove']; + $action_alt = 'customerstatus'; + $Ids = ''; + eval("echo \"" . getTemplate("aps/askyesno") . "\";"); + } + } + else + { + self::InfoBox($lng['aps']['iderror']); + } + } + elseif($Action == 'stopinstall') + { + //check for valid instance id + + if(self::IsValidInstanceId($Id, $CustomerId)) + { + //check if application installation runs already + + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `ID` = ' . $this->db->escape($Id)); + $Row = $this->db->fetch_array($Result); + + if($Row['Status'] == INSTANCE_TASK_ACTIVE) + { + self::InfoBox($lng['aps']['installstoperror']); + } + else + { + if(isset($_POST['answer']) + && $_POST['answer'] == $lng['panel']['yes']) + { + //remove task + + $this->db->query('DELETE FROM `' . TABLE_APS_TASKS . '` WHERE `InstanceID` = ' . $this->db->escape($Id)); + + //remove settings + + $this->db->query('DELETE FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . $this->db->escape($Id)); + + //remove instance + + $this->db->query('DELETE FROM `' . TABLE_APS_INSTANCES . '` WHERE `ID` = ' . $this->db->escape($Id)); + + //update used counter + + $this->db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `aps_packages_used` = `aps_packages_used` - 1 WHERE `customerid` = ' . (int)$CustomerId); + self::InfoBox($lng['aps']['installstopped']); + } + else + { + //show yes/no question + + $Message = $lng['question']['reallywanttostop']; + $action_alt = 'customerstatus'; + $Ids = ''; + eval("echo \"" . getTemplate("aps/askyesno") . "\";"); + } + } + } + else + { + self::InfoBox($lng['aps']['iderror']); + } + } + elseif($Action == 'reconfigure') + { + //check for valid instance id + + if(self::IsValidInstanceId($Id, $CustomerId)) + { + self::InfoBox('Reconfigure function not implemented in current version!'); + } + else + { + self::InfoBox($lng['aps']['iderror']); + } + } + elseif($Action == 'details') + { + //show advanced package infos if package id is valid + + if(self::IsValidPackageId($Id, true)) + { + self::ShowPackageInfo($Id, true); + } + else + { + self::InfoBox($lng['aps']['iderror']); + } + } + elseif($Action == 'scan' + && !isset($this->userinfo['customerid'])) + { + //find all files in temp directory + + $Files = scandir('./temp/'); + $Counter = 0; + foreach($Files as $File) + { + //skip invalid "files" + + if(substr($File, -4) != '.zip')continue; + + //install new package in system + + self::InstallNewPackage('./temp/' . $File); + $Counter+= 1; + } + + if($Counter == 0) + { + //throw error if no file was found + + self::InfoBox($lng['aps']['nopacketsforinstallation']); + } + } + elseif($Action == 'manageinstances' + && !isset($this->userinfo['customerid'])) + { + self::ManageInstances(); + } + elseif($Action == 'managepackages' + && !isset($this->userinfo['customerid'])) + { + self::ManagePackages(); + } + elseif($Action == 'upload' + && !isset($this->userinfo['customerid'])) + { + self::UploadNewPackages(); + } + elseif($Action == 'customerstatus') + { + self::CustomerStatus($CustomerId); + } + elseif($Action == 'search') + { + self::SearchPackages(); + } + elseif($Action == 'overview') + { + // show packages with paging + + if(isset($_GET['page']) + && preg_match('/^[0-9]+$/', $_GET['page']) != - 1) + { + //check if page parameter is valid + //get all packages to find out how many pages are needed + + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Status` = ' . PACKAGE_ENABLED . ' ORDER BY `Name` ASC'); + $Pages = intval($this->db->num_rows($result) / $PackagesPerSite); + + if(($this->db->num_rows($result) / $PackagesPerSite) > $Pages)$Pages+= 1; + + if($_GET['page'] >= 1 + && $_GET['page'] <= $Pages) + { + //page parameter is within available pages, now show packages for that given page + + $result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Status` = ' . PACKAGE_ENABLED . ' ORDER BY `Name` ASC LIMIT ' . $this->db->escape((intval($_GET['page']) - 1) * $PackagesPerSite) . ', ' . $this->db->escape($PackagesPerSite)); + + //show packages + + while($Row3 = $this->db->fetch_array($result2)) + { + self::ShowPackageInfo($Row3['ID']); + } + + //show URLs for other pages + + if($Pages > 1) + { + echo ('

    '); + for ($i = 1;$i < $Pages + 1;$i++) + { + if($i == $_GET['page']) + { + echo ('' . $i . ''); + } + else + { + echo ('' . $i . ''); + } + } + + echo ('


    '); + } + } + else + { + //page parameter isnt within available pages, show packages from first page + + $result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Status` = ' . PACKAGE_ENABLED . ' ORDER BY `Name` ASC LIMIT 0, ' . $this->db->escape($PackagesPerSite)); + + //show packages + + while($Row3 = $this->db->fetch_array($result2)) + { + self::ShowPackageInfo($Row3['ID']); + } + + //fetch number of packages to calculate the number of pages + + $result3 = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Status` = ' . PACKAGE_ENABLED . ' ORDER BY `Name` ASC'); + $Pages = intval($this->db->num_rows($result3) / $PackagesPerSite); + + if(($this->db->num_rows($result3) / $PackagesPerSite) > $Pages)$Pages+= 1; + + //show URLs for other pages + + if($Pages > 1) + { + echo ('

    '); + for ($i = 1;$i < $Pages + 1;$i++) + { + echo ('' . $i . ''); + } + + echo ('
    '); + } + } + } + else + { + //page parameter isnt valid, show packages from first page + + $result2 = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Status` = ' . PACKAGE_ENABLED . ' ORDER BY `Name` ASC LIMIT 0, ' . $this->db->escape($PackagesPerSite)); + + if($this->db->num_rows($result2) == 0) + { + self::InfoBox($lng['aps']['nopackagestoinstall']); + return; + } + + //show packages + + while($Row3 = $this->db->fetch_array($result2)) + { + self::ShowPackageInfo($Row3['ID']); + } + + //fetch number of packages to calculate number of pages + + $result3 = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Status` = ' . PACKAGE_ENABLED . ' ORDER BY `Name` ASC'); + $Pages = intval($this->db->num_rows($result3) / $PackagesPerSite); + + if(($this->db->num_rows($result3) / $PackagesPerSite) > $Pages)$Pages+= 1; + + //show URLs for other pages + + if($Pages > 1) + { + echo ('

    '); + for ($i = 1;$i < $Pages + 1;$i++) + { + if($i == 1) + { + echo ('' . $i . ''); + } + else + { + echo ('' . $i . ''); + } + } + + echo ('


    '); + } + } + } + } + + /** + * function extracts resources from a zipfile to return or save them on disk + * + * @param filename zipfile to read data from + * @param file file within zip archive to read + * @param destination optional parameter where to save file from within the zip file + * @return success content of file from zip archive / error false + */ + + private function GetContentFromZip($Filename, $File, $Destination = '') + { + if(!file_exists($Filename))return false; + $Content = ''; + + //now using the new ZipArchive class from php 5.2 + + $Zip = new ZipArchive; + $Resource = $Zip->open(realpath($Filename)); + + if($Resource === true) + { + $FileHandle = $Zip->getStream($File); + + if(!$FileHandle)return false; + + while(!feof($FileHandle)) + { + $Content.= fread($FileHandle, 8192); + } + + fclose($FileHandle); + $Zip->close(); + } + else + { + //on 64 bit systems the zip functions can fail -> use safe_exec to extract the files + + $ReturnLines = array(); + $ReturnVal = - 1; + $ReturnLines = safe_exec('unzip -o -j -qq ' . escapeshellarg(realpath($Filename)) . ' ' . escapeshellarg($File) . ' -d ' . escapeshellarg(sys_get_temp_dir() . '/'), $ReturnVal); + + if($ReturnVal == 0) + { + $Content = file_get_contents(sys_get_temp_dir() . '/' . basename($File)); + unlink(sys_get_temp_dir() . '/' . basename($File)); + + if($Content == false)return false; + } + else + { + return false; + } + } + + //return content of file from within the zipfile or save to disk + + if($Content == '') + { + return false; + } + else + { + if($Destination == '') + { + return $Content; + } + else + { + //open file and save content + + $File = fopen($Destination, "wb"); + + if($File) + { + fwrite($File, $Content); + fclose($File); + } + else + { + return false; + } + } + } + } + + /** + * fetches the xml metafile from a zipfile and returns the parsed data + * + * @param filename zipfile containing the xml meta data + * @return success parsed xml content of zipfile / error false + */ + + private function GetXmlFromZip($Filename) + { + if(!file_exists($Filename))return false; + + //get content for xml meta data file from within the zipfile + + if($XmlContent = self::GetContentFromZip($Filename, 'APP-META.xml')) + { + //parse xml content + + $Xml = new SimpleXMLElement($XmlContent); + return $Xml; + } + else + { + return false; + } + } + + /** + * reads the content of a xml metafile from disk and returns the parsed data + * + * @param filename xmlfile to parse + * @return success parsed xml content of file / error false + */ + + private function GetXmlFromFile($Filename) + { + //read xml file from disk and return parsed data + + if(!file_exists($Filename))return false; + $XmlContent = file_get_contents($Filename); + $Xml = new SimpleXMLElement($XmlContent); + return $Xml; + } + + /** + * check whether a given package id is valid + * + * @param packageid id of package from database to check vor validity + * @param customer check if package can be used by customer and/or admin [true|false] + * @return success valid package id (id > 0 based on database layout) / error false + */ + + private function IsValidPackageId($PackageId, $Customer) + { + if(preg_match('/^[0-9]+$/', $PackageId) != 1)return false; + + if($Customer == true) + { + //customers can only see packages which are enabled + + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Status` = ' . PACKAGE_ENABLED . ' AND `ID` = ' . $this->db->escape($PackageId)); + + if($this->db->num_rows($result) > 0) + { + return $PackageId; + } + else + { + return false; + } + } + else + { + //admins can see all packages + + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `ID` = ' . $this->db->escape($PackageId)); + + if($this->db->num_rows($result) > 0) + { + return $PackageId; + } + else + { + return false; + } + } + } + + /** + * check whether a given instance id is valid + * + * @param packageid id of instance from database to check vor validity + * @return success valid instance id (id > 0 based on database layout) / error false + */ + + private function IsValidInstanceId($InstanceId, $CustomerId) + { + if(preg_match('/^[0-9]+$/', $InstanceId) != 1)return false; + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `CustomerID` = ' . $this->db->escape($CustomerId) . ' AND `ID` = ' . $this->db->escape($InstanceId)); + + if($this->db->num_rows($result) > 0) + { + return $InstanceId; + } + else + { + return false; + } + } + + /** + * save installation values fetched from the installation wizard + * + * @param packageid id of package from database + * @param customerid id of customer for who the values should be saved + * @param name name of field to save + * @param value value to save for previously given name + */ + + private function SetInstallationValue($PackageId, $CustomerId, $Name, $Value) + { + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_TEMP_SETTINGS . '` WHERE `PackageID` = ' . $this->db->escape($PackageId) . ' AND `CustomerID` = ' . $this->db->escape($CustomerId) . ' AND `Name` = "' . $this->db->escape($Name) . '"'); + + if($this->db->num_rows($result) == 0) + { + $this->db->query('INSERT INTO `' . TABLE_APS_TEMP_SETTINGS . '` (`PackageID`, `CustomerID`, `Name`, `Value`) VALUES (' . $this->db->escape($PackageId) . ', ' . $this->db->escape($CustomerId) . ', "' . $this->db->escape($Name) . '", "' . $this->db->escape($Value) . '")'); + } + else + { + $Row = $this->db->fetch_array($result); + $this->db->query('UPDATE `' . TABLE_APS_TEMP_SETTINGS . '` SET `PackageID` = ' . $this->db->escape($PackageId) . ', `CustomerID` = ' . $this->db->escape($CustomerId) . ', `Name` = "' . $this->db->escape($Name) . '", `Value` ="' . $this->db->escape($Value) . '" WHERE `ID` = ' . $this->db->escape($Row['ID'])); + } + } + + /** + * return previously saved installation values + * + * @param packageid id of package from database + * @param customerid id of customer for who the values should be read + * @param name name of field to read + * @return success value of field from database / error false + */ + + private function GetInstallationValue($PackageId, $CustomerId, $Name) + { + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_TEMP_SETTINGS . '` WHERE `PackageID` = ' . $this->db->escape($PackageId) . ' AND `CustomerID` = ' . $this->db->escape($CustomerId) . ' AND `Name` = "' . $this->db->escape($Name) . '"'); + + if($this->db->num_rows($result) == 0) + { + return false; + } + else + { + $Row = $this->db->fetch_array($result); + return $Row['Value']; + } + } + + /** + * fix a path given by the customer + * + * @param path path which could be compromised + * @return corrected path + */ + + private function MakeSecurePath($path) + { + //code based on syscp core code + + $search = Array( + '#/+#', + '#\.+#', + '#\0+#', + '#\\\\+#' + ); + $replace = Array( + '/', + '', + '', + '/' + ); + $path = preg_replace($search, $replace, $path); + + //no / at the end + + if(substr($path, strlen($path) - 1, 1) == '/')$path = substr($path, 0, strlen($path) - 1); + + //no / at beginning + + if(substr($path, 0, 1) == '/')$path = substr($path, 1); + return $path; + } + + /** + * validate the input of a customer against the xml meta descriptions + * + * @param packageid id of package from database + * @param customerid id of customer from database + * @return success/error array of errors found containing fields that were wrong + */ + + private function ValidatePackageData($PackageId, $CustomerId) + { + if(!self::IsValidPackageId($PackageId, true))return false; + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `ID` = ' . $this->db->escape($PackageId)); + $Row = $this->db->fetch_array($result); + $Xml = self::GetXmlFromFile('./packages/' . $Row['Path'] . '/APP-META.xml'); + + //return if parse of xml file has failed + + if($Xml == false)return false; + + //check all data fields of xml file against inut of customer + + $Error = array(); + foreach($Xml->settings->group as $Group) + { + foreach($Group->setting as $Setting) + { + $FieldId = strval($Setting['id']); + + if($Setting['type'] == 'string' + || $Setting['type'] == 'password') + { + if(isset($_POST[$FieldId])) + { + if(isset($Setting['min-length']) + && strlen($_POST[$FieldId]) < $Setting['min-length']) + { + if(!in_array($FieldId, $Error))$Error[] = $FieldId; + } + + if(isset($Setting['max-length']) + && strlen($_POST[$FieldId]) > $Setting['max-length']) + { + if(!in_array($FieldId, $Error))$Error[] = $FieldId; + } + + if(isset($Setting['regex']) + && !preg_match("/" . $Setting['regex'] . "/", $_POST[$FieldId])) + { + if(!in_array($FieldId, $Error))$Error[] = $FieldId; + } + + /* + elseif(isset($Setting['charset'])) + { + //CHARSET VALIDATION FOR LATER VERSIONS + } + */ + + if(!in_array($FieldId, $Error))self::SetInstallationValue($PackageId, $CustomerId, $FieldId, $_POST[$FieldId]); + } + else + { + if(!in_array($FieldId, $Error))$Error[] = $FieldId; + } + } + else + + if($Setting['type'] == 'email') + { + if(isset($_POST[$FieldId])) + { + if(!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/", $_POST[$FieldId])) + { + if(!in_array($FieldId, $Error))$Error[] = $FieldId; + } + + if(!in_array($FieldId, $Error))self::SetInstallationValue($PackageId, $CustomerId, $FieldId, $_POST[$FieldId]); + } + else + { + if(!in_array($FieldId, $Error))$Error[] = $FieldId; + } + } + elseif($Setting['type'] == 'domain-name') + { + if(isset($_POST[$FieldId])) + { + 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\.\,\?\'\\\+&%\$#\=~_\-]+))*$", $_POST[$FieldId])) + { + if(!in_array($FieldId, $Error))$Error[] = $FieldId; + } + + if(!in_array($FieldId, $Error))self::SetInstallationValue($PackageId, $CustomerId, $FieldId, $_POST[$FieldId]); + } + else + { + if(!in_array($FieldId, $Error))$Error[] = $FieldId; + } + } + elseif($Setting['type'] == 'integer') + { + if(isset($_POST[$FieldId])) + { + //check if number is in the format of float + + if(round($_POST[$FieldId]) != $_POST[$FieldId]) + { + if(!in_array($FieldId, $Error))$Error[] = $FieldId; + } + + if(!is_numeric($_POST[$FieldId])) + { + if(!in_array($FieldId, $Error))$Error[] = $FieldId; + } + + if(isset($Setting['min']) + && intval($_POST[$FieldId]) < intval($Setting['min'])) + { + if(!in_array($FieldId, $Error))$Error[] = $FieldId; + } + + if(isset($Setting['max']) + && intval($_POST[$FieldId]) > intval($Setting['max'])) + { + if(!in_array($FieldId, $Error))$Error[] = $FieldId; + } + + if(!in_array($FieldId, $Error))self::SetInstallationValue($PackageId, $CustomerId, $FieldId, intval($_POST[$FieldId])); + } + else + { + if(!in_array($FieldId, $Error))$Error[] = $FieldId; + } + } + elseif($Setting['type'] == 'float') + { + if(isset($_POST[$FieldId])) + { + if(!is_numeric($_POST[$FieldId])) + { + if(!in_array($FieldId, $Error))$Error[] = $FieldId; + } + + if(isset($Setting['min']) + && floatval($_POST[$FieldId]) < floatval($Setting['min'])) + { + if(!in_array($FieldId, $Error))$Error[] = $FieldId; + } + + if(isset($Setting['max']) + && floatval($_POST[$FieldId]) > floatval($Setting['max'])) + { + if(!in_array($FieldId, $Error))$Error[] = $FieldId; + } + + if(!in_array($FieldId, $Error))self::SetInstallationValue($PackageId, $CustomerId, $FieldId, floatval($_POST[$FieldId])); + } + else + { + if(!in_array($FieldId, $Error))$Error[] = $FieldId; + } + } + elseif($Setting['type'] == 'boolean') + { + if(isset($_POST[$FieldId]) + && $_POST[$FieldId] == 'true') + { + self::SetInstallationValue($PackageId, $CustomerId, $FieldId, 'true'); + } + else + { + self::SetInstallationValue($PackageId, $CustomerId, $FieldId, 'false'); + } + } + elseif($Setting['type'] == 'enum') + { + if(isset($_POST[$FieldId])) + { + foreach($Setting->choice as $Choice) + { + if($Choice['id'] == $_POST[$FieldId]) + { + self::SetInstallationValue($PackageId, $CustomerId, $FieldId, $_POST[$FieldId]); + break; + } + } + } + else + { + if(!in_array($FieldId, $Error))$Error[] = $FieldId; + } + } + } + } + + //database required? + + $XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db'); + + if($XmlDb->db->id) + { + if(isset($_POST['main_database_password'])) + { + if(strlen($_POST['main_database_password']) < 8) + { + if(!in_array('main_database_password', $Error))$Error[] = 'main_database_password'; + } + + if(!in_array('main_database_password', $Error))self::SetInstallationValue($PackageId, $CustomerId, 'main_database_password', $_POST['main_database_password']); + } + else + { + if(!in_array('main_database_password', $Error))$Error[] = 'main_database_password'; + } + } + + //application location + + if(isset($_POST['main_domain'])) + { + $result2 = $this->db->query('SELECT * FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `customerid` = ' . $this->db->escape($CustomerId) . ' AND `id` = ' . $this->db->escape($_POST['main_domain'])); + + if($this->db->num_rows($result2) > 0) + { + self::SetInstallationValue($PackageId, $CustomerId, 'main_domain', $_POST['main_domain']); + } + else + { + self::SetInstallationValue($PackageId, $CustomerId, 'main_domain', '-1'); + + if(!in_array('main_domain', $Error))$Error[] = 'main_domain'; + } + } + else + { + self::SetInstallationValue($PackageId, $CustomerId, 'main_domain', '-1'); + + if(!in_array('main_domain', $Error))$Error[] = 'main_domain'; + } + + if(isset($_POST['main_location'])) + { + $Temp = $_POST['main_location']; + + //call function twice for security reasons! + + $Temp = self::MakeSecurePath($Temp); + $Temp = self::MakeSecurePath($Temp); + + //previous instance check + + $InstallPath = ''; + + //find real path for selected domain + + $result3 = $this->db->query('SELECT * FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `customerid` = ' . $this->db->escape($CustomerId) . ' AND `id` = ' . $this->db->escape(self::GetInstallationValue($PackageId, $CustomerId, 'main_domain'))); + + if($this->db->num_rows($result3) > 0) + { + //build real path + + $Row = $this->db->fetch_array($result3); + $InstallPath = $Row['documentroot']; + $InstallPath.= $Temp; + $result4 = $this->db->query('SELECT * FROM `' . TABLE_APS_INSTANCES . '` WHERE `CustomerID` = ' . $this->db->escape($CustomerId)); + + //get all instances from current customer + //thats needed because there cannot be installed two apps within the same directory + + while($Row3 = $this->db->fetch_array($result4)) + { + //get all domains linked to instances + + $result5 = $this->db->query('SELECT * FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . $this->db->escape($Row3['ID']) . ' AND `Name` = "main_domain"'); + + if($this->db->num_rows($result5) > 0) + { + $Row2 = $this->db->fetch_array($result5); + $Reserved = ''; + + //get real domain path + + $result6 = $this->db->query('SELECT * FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `customerid` = ' . $this->db->escape($CustomerId) . ' AND `id` = ' . $this->db->escape($Row2['Value'])); + + if($this->db->num_rows($result6) > 0) + { + $Row = $this->db->fetch_array($result6); + $Reserved = $Row['documentroot']; + } + + //get location under domain + + $result7 = $this->db->query('SELECT * FROM `' . TABLE_APS_SETTINGS . '` WHERE `InstanceID` = ' . $this->db->escape($Row3['ID']) . ' AND `Name` = "main_location"'); + + if($this->db->num_rows($result7) > 0) + { + $Row = $this->db->fetch_array($result7); + $Reserved.= $Row['Value']; + } + + //check whether there is another app installed already + + if($Reserved == $InstallPath) + { + if(!in_array('main_location', $Error))$Error[] = 'main_location'; + break; + } + } + } + } + + if(!in_array('main_location', $Error))self::SetInstallationValue($PackageId, $CustomerId, 'main_location', $Temp); + } + else + { + if(!in_array('main_location', $Error))$Error[] = 'main_location'; + self::SetInstallationValue($PackageId, $CustomerId, 'main_location', ''); + } + + if($Xml->license) + { + if($Xml->license['must-accept'] + && $Xml->license['must-accept'] == 'true') + { + if(isset($_POST['license']) + && $_POST['license'] == 'true') + { + self::SetInstallationValue($PackageId, $CustomerId, 'license', 'true'); + } + else + { + self::SetInstallationValue($PackageId, $CustomerId, 'license', 'false'); + + if(!in_array('license', $Error))$Error[] = 'license'; + } + } + } + + unset($Xml); + return $Error; + } + + /** + * functions provides the frontend of the installation wizard for the customer + * + * @param packageid id of package from database + * @param wrongdata array of fields that were wrong in previous validation check + * @return error false / success none + */ + + private function ShowPackageInstaller($PackageId, $WrongData, $CustomerId) + { + global $lng, $filename, $s, $page, $action; + $Data = ''; + $Fieldname = ''; + $Fieldvalue = ''; + $Groupname = ''; + + if(!self::IsValidPackageId($PackageId, true))return false; + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `ID` = ' . $this->db->escape($PackageId)); + $Row = $this->db->fetch_array($result); + $Xml = self::GetXmlFromFile('./packages/' . $Row['Path'] . '/APP-META.xml'); + + //return if parse of xml file has failed + + if($Xml == false)return false; + + //show notifcation if customer has reached his installation limit + + if($this->userinfo['aps_packages'] != '-1' + && (int)$this->userinfo['aps_packages_used'] >= (int)$this->userinfo['aps_packages']) + { + self::InfoBox($lng['aps']['allpackagesused']); + return false; + } + + //icon for package + + $Icon = './images/default.png'; + + if($Xml->icon['path']) + { + $Icon = './packages/' . $Row['Path'] . '/' . basename($Xml->icon['path']); + } + + //show error message if some input was wrong + + $ErrorMessage = 0; + + if(count($WrongData) != 0) + { + $ErrorMessage = 1; + } + + //remove previously entered values if new installation has been triggered + + if(!isset($_POST['withinput'])) + { + $this->db->query('DELETE FROM `' . TABLE_APS_TEMP_SETTINGS . '` WHERE `CustomerID` = ' . $this->db->escape($CustomerId) . ' AND `PackageID` = ' . $this->db->escape($PackageId)); + } + + //where to install app? + + $Temp = 'http://'; + $Value = self::GetInstallationValue($PackageId, $CustomerId, 'main_location'); + + if($Value) + { + $Temp.= '/'; + } + else + { + $Temp.= '/'; + } + + if(in_array('main_domain', $WrongData)) + { + $Temp.= self::FieldError($lng['aps']['nodomains']); + } + + if(in_array('main_location', $WrongData)) + { + $Temp.= self::FieldError($lng['aps']['wrongpath']); + } + + if(!in_array('main_location', $WrongData) + && !in_array('main_domain', $WrongData))$Temp.= '
    '; + $Temp.= '' . $lng['aps']['application_location_description'] . ''; + $Groupname = $lng['aps']['basic_settings']; + $Fieldname = $lng['aps']['application_location']; + $Fieldvalue = $Temp; + eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); + + //database required? + + $XmlDb = $Xml->requirements->children('http://apstandard.com/ns/1/db'); + + if($XmlDb->db->id) + { + $Temp = ''; + + if(in_array('main_database_password', $WrongData)) + { + $Temp.= self::FieldError($lng['aps']['dbpassword']); + } + + if(!in_array('main_database_password', $WrongData))$Temp.= '
    '; + $Temp.= '' . $lng['aps']['database_password_description'] . ''; + $Groupname = ''; + $Fieldname = $lng['aps']['database_password']; + $Fieldvalue = $Temp; + eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); + } + + foreach($Xml->settings->group as $Group) + { + $GroupPrinted = false; + foreach($Group->setting as $Setting) + { + $Temp = ''; + + if($Setting['type'] == 'string' + || $Setting['type'] == 'email' + || $Setting['type'] == 'integer' + || $Setting['type'] == 'float' + || $Setting['type'] == 'domain-name') + { + if(!$GroupPrinted) + { + $Groupname = $Group->name; + $GroupPrinted = true; + } + else + { + $Groupname = ''; + } + + $Value = self::GetInstallationValue($PackageId, $CustomerId, strval($Setting['id'])); + + if($Value) + { + $Temp.= ''; + } + elseif($Setting['default-value']) + { + $Temp.= ''; + } + else + { + $Temp.= ''; + } + + if(in_array($Setting['id'], $WrongData)) + { + if($Setting->{'error-message'}) + { + $Temp.= self::FieldError($Setting->{'error-message'}); + } + else + { + if($Setting['type'] == 'string') + { + $Temp.= self::FieldError($lng['aps']['error_text']); + } + elseif($Setting['type'] == 'email') + { + $Temp.= self::FieldError($lng['aps']['error_email']); + } + elseif($Setting['type'] == 'domain-name') + { + $Temp.= self::FieldError($lng['aps']['domain']); + } + elseif($Setting['type'] == 'integer') + { + $Temp.= self::FieldError($lng['aps']['error_integer']); + } + elseif($Setting['type'] == 'float') + { + $Temp.= self::FieldError($lng['aps']['error_float']); + } + } + } + } + elseif($Setting['type'] == 'password') + { + if(!$GroupPrinted) + { + $Groupname = $Group->name; + $GroupPrinted = true; + } + else + { + $Groupname = ''; + } + + $Temp.= ''; + + if(in_array($Setting['id'], $WrongData)) + { + if($Setting->{'error-message'}) + { + $Temp.= self::FieldError($Setting->{'error-message'}); + } + else + { + $Temp.= self::FieldError($lng['aps']['error_password']); + } + } + } + elseif($Setting['type'] == 'boolean') + { + if(!$GroupPrinted) + { + $Groupname = $Group->name; + $GroupPrinted = true; + } + else + { + $Groupname = ''; + } + + $Value = self::GetInstallationValue($PackageId, $CustomerId, strval($Setting['id'])); + + if($Value) + { + if($Value == 'true') + { + $Temp.= ''; + } + else + { + $Temp.= ''; + } + } + elseif($Setting['default-value'] == 'true') + { + $Temp.= ''; + } + else + { + $Temp.= ''; + } + } + elseif($Setting['type'] == 'enum') + { + if(!$GroupPrinted) + { + $Groupname = $Group->name; + $GroupPrinted = true; + } + else + { + $Groupname = ''; + } + + $Temp.= ''; + } + + //default field description + + if(isset($Setting->description)) + { + if(!in_array(strval($Setting['id']), $WrongData))$Temp.= '
    '; + $Temp.= '' . $Setting->description . ''; + } + + $Fieldname = $Setting->name; + $Fieldvalue = $Temp; + eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); + } + } + + if($Xml->license) + { + $Temp = ''; + + if($Xml->license['must-accept'] + && $Xml->license['must-accept'] == 'true') + { + if($Xml->license->text->name)$Temp.= $Xml->license->text->name . '
    '; + + if($Xml->license->text->file) + { + $Temp.= ''; + $Groupname = $lng['aps']['license']; + $Fieldname = $lng['aps']['license']; + $Fieldvalue = $Temp; + eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); + } + else + { + $Temp.= '' . $lng['aps']['error_license'] . ''; + $Groupname = $lng['aps']['license']; + $Fieldname = $lng['aps']['license']; + $Fieldvalue = $Temp; + eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); + } + + $Temp = ' ' . $lng['aps']['error_license']; + + if(in_array('license', $WrongData)) + { + $Temp.= self::FieldError($lng['aps']['error_licensenoaccept']); + } + + $Groupname = ''; + $Fieldname = $lng['aps']['license_agreement']; + $Fieldvalue = $Temp; + eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); + } + } + + eval("echo \"" . getTemplate("aps/installer") . "\";"); + unset($Xml); + } + + /** + * show informations for a package in basic or detailed view + * + * @param packageid id of package from database + * @param mode verbosity of data to view (basic|advanced) + * @return error false / success none + */ + + private function ShowPackageInfo($PackageId, $All = false) + { + global $lng, $filename, $s, $page, $action, $userinfo; + $Data = ''; + $Fieldname = ''; + $Fieldvalue = ''; + $Groupname = ''; + + if(!self::IsValidPackageId($PackageId, true))return false; + $result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `ID` = ' . $this->db->escape($PackageId)); + $Row = $this->db->fetch_array($result); + $Xml = self::GetXmlFromFile('./packages/' . $Row['Path'] . '/APP-META.xml'); + + //return if parse of xml file has failed + + if($Xml == false)return false; + $Icon = './images/default.png'; + + //show icon and basic data + + if($Xml->icon['path']) + { + $Icon = './packages/' . $Row['Path'] . '/' . basename($Xml->icon['path']); + } + + $Summary = htmlspecialchars($Xml->summary); + $Fieldname = $lng['aps']['version']; + $Fieldvalue = $Xml->version . ' (Release ' . $Xml->release . ')'; + eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); + + //show website + + if($Xml->homepage) + { + $Fieldname = $lng['aps']['homepage']; + $Fieldvalue = '' . htmlspecialchars($Xml->homepage) . ''; + eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); + } + + //show size after installation + + if($Xml->{'installed-size'}) + { + $Fieldname = $lng['aps']['installed_size']; + $Fieldvalue = 'ca. ' . number_format(intval($Xml->{'installed-size'}) / (1024 * 1024), 2) . ' MB'; + eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); + } + + //show categories + + if($Xml->categories) + { + $Temp = ''; + foreach($Xml->categories->category as $Categories) + { + $Temp.= htmlspecialchars($Categories[0]) . '
    '; + } + + $Fieldname = $lng['aps']['categories']; + $Fieldvalue = $Temp; + eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); + } + + //show available languages + + if($Xml->languages) + { + $Temp = ''; + foreach($Xml->languages->language as $Languages) + { + $Temp.= $Languages[0] . ' '; + } + + $Fieldname = $lng['aps']['languages']; + $Fieldvalue = $Temp; + eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); + } + + //show more information + + if($All == true) + { + $Fieldname = $lng['aps']['long_description']; + $Fieldvalue = htmlspecialchars($Xml->description); + eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); + + //show config script language + + if($Xml->{'configuration-script-language'}) + { + $Fieldname = $lng['aps']['configscript']; + $Fieldvalue = $Xml->{'configuration-script-language'}; + eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); + } + + //show changelog + + $Temp = '
      '; + foreach($Xml->changelog->version as $Versions) + { + $Temp.= '
    • ' . $Versions['version'] . ' (Release ' . $Versions['release'] . ')'; + $Temp.= '
        '; + foreach($Versions->entry as $Entries) + { + $Temp.= '
      • ' . $Entries[0] . '
      • '; + } + + $Temp.= '
    • '; + } + + $Temp.= '
    '; + $Fieldname = $lng['aps']['changelog']; + $Fieldvalue = $Temp; + eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); + + //show license + + if($Xml->license) + { + if($Xml->license->text->file) + { + $Temp = ''; + + if($Xml->license->text->name)$Temp = $Xml->license->text->name . '
    '; + $Temp.= '
    '; + $Fieldname = $lng['aps']['license']; + $Fieldvalue = $Temp; + eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); + } + else + { + $Fieldname = $lng['aps']['license']; + $Fieldvalue = '' . $lng['aps']['linktolicense'] . ''; + eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); + } + } + + //show screenshots + + if($Xml->screenshot) + { + $Count = 0; + $Temp = ''; + foreach($Xml->screenshot as $Screenshot) + { + $Count+= 1; + $Temp.= '' . $Screenshot->description . '
    ' . $Screenshot->description . '
    '; + + if(count($Xml->screenshot) != $Count)$Temp.= '
    '; + } + + $Fieldname = $lng['aps']['screenshots']; + $Fieldvalue = $Temp; + eval("\$Data.=\"" . getTemplate("aps/data") . "\";"); + } + } + + eval("echo \"" . getTemplate("aps/package") . "\";"); + unset($Xml); + } + + /** + * show a nice looking infobox + * + * @param message message to display in beautifull layout + */ + + private function InfoBox($Message) + { + global $lng, $filename, $s, $page, $action; + + //shows a box with informations + + eval("echo \"" . getTemplate("aps/infobox") . "\";"); + } + + /** + * returns html code for nice looking boxes to show customers wrong input + * + * @param error error to display in beautifull layout + */ + + private function FieldError($Error) + { + return '
    ' . $Error . '
    '; + } +} + ?> \ No newline at end of file diff --git a/lib/classes/aps/class.ApsUpdater.php b/lib/classes/aps/class.ApsUpdater.php index 08a07be8..f7445a78 100644 --- a/lib/classes/aps/class.ApsUpdater.php +++ b/lib/classes/aps/class.ApsUpdater.php @@ -1,272 +1,272 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package APS - * @version $Id$ - * @todo logging - * install specific packages by name - * other solution than using url_fopen - * move url for distributionserver into panel - */ - -class ApsUpdater extends ApsParser -{ - private $settings = array(); - private $db = false; - private $RequestDomain = ''; - private $RootUrl = ''; - private $RootDir = ''; - - /** - * constructor of class. setup some basic variables needed by class - * - * @param db instance of the database class from syscp - */ - - public function __construct($db) - { - $this->db = $db; - $this->RequestDomain = 'apscatalog.com'; - $this->RootUrl = '/1/'; - $this->RootDir = dirname(dirname(__FILE__)) . '/'; - } - - /** - * Main function of class which handles all around the update mechanism - */ - - public function UpdateHandler() - { - chdir($this->RootDir); - - //return if allow_url_fopen is disabled - - if(ini_get('allow_url_fopen') == '0') - { - echo ("The APS updater cronjob requires that allow_url_fopen is enabled for the PHP CLI binary!\n"); - return; - } - - //return if no task exists - - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_TASKS . '` WHERE `Task` IN (' . TASK_SYSTEM_UPDATE . ', ' . TASK_SYSTEM_DOWNLOAD . ')'); - - if($this->db->num_rows($Result) == 0) - { - return; - } - - //query first task -> updater can only do one job within a run - - $Task = $this->db->fetch_array($Result); - $this->db->query('DELETE FROM `' . TABLE_APS_TASKS . '` WHERE `Task` = ' . $Task['Task']); - - //fetch all vendors - - $Vendors = self::FetchSubUrls($this->RootUrl); - foreach($Vendors as $Vendor) - { - //fetch all applications from vendors - - $Applications = self::FetchSubUrls($this->RootUrl . $Vendor); - foreach($Applications as $Application) - { - //get newest version of package which is already installed - - $CurrentVersion = ''; - $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Name` = "' . $this->db->escape(substr($Application, 0, -1)) . '"'); - - while($Row = $this->db->fetch_array($Result)) - { - if(version_compare($Row['Version'] . '-' . $Row['Release'], $CurrentVersion) == 1) - { - $CurrentVersion = $Row['Version'] . '-' . $Row['Release']; - } - } - - if($this->db->num_rows($Result) != 0) - { - //package already installed in system, search for newer version - - if($Task['Task'] != TASK_SYSTEM_UPDATE)continue; - - //fetch different versions of application from distribution server - - $NewerVersion = ''; - $Versions = self::FetchSubUrls($this->RootUrl . $Vendor . $Application); - foreach($Versions as $Version) - { - $OnlineVersion = substr($Version, 0, -1); - - //is package newer than current version? - - if(version_compare($OnlineVersion, $CurrentVersion) == 1) - { - //is new package newer than another one found before? - - if(version_compare($OnlineVersion, $NewerVersion) == 1) - { - $NewerVersion = $OnlineVersion; - } - } - } - - if($NewerVersion != '') - { - //download package as an update - - self::DownloadPackage($this->RootUrl . $Vendor . $Application . $NewerVersion, substr($Application, 0, -1), $NewerVersion); - continue; - } - } - else - { - if($Task['Task'] != TASK_SYSTEM_DOWNLOAD)continue; - - //new packages - - $NewVersion = ''; - $Versions = self::FetchSubUrls($this->RootUrl . $Vendor . $Application); - foreach($Versions as $Version) - { - $OnlineVersion = substr($Version, 0, -1); - - //is package newer than another one found before? - - if(version_compare($OnlineVersion, $NewVersion) == 1) - { - $NewVersion = $OnlineVersion; - } - } - - if($NewVersion != '') - { - //download package as a new one - - self::DownloadPackage($this->RootUrl . $Vendor . $Application . $NewVersion, substr($Application, 0, -1), $NewVersion); - continue; - } - } - } - } - } - - /** - * download a package from the distribution server and move the downloaded file in the temporary directory - * - * @param url url to download - * @param application string identifying the application name - * @param version string identifying the application version - * @return success true/error false - */ - - private function DownloadPackage($Url, $Application, $Version) - { - $Downloads = self::FetchSubUrls($Url . '/'); - - //make url valid - - $Url = str_replace(' ', '%20', $Url); - - //get content from website url - - $Content = @file_get_contents('http://' . $this->RequestDomain . $Url . '.aps' . $Downloads[0]); - - if($Content != false) - { - //open file to write contents on disk - - $FileHandle = fopen($this->RootDir . 'temp/' . $Application . '-' . $Version . '.app.zip', 'wb'); - - if($FileHandle == true) - { - //write results to disk - - fwrite($FileHandle, $Content); - fclose($FileHandle); - - //set right permissions - - chmod($this->RootDir . 'temp/' . $Application . '-' . $Version . '.app.zip', 0664); - return true; - } - else - { - return false; - } - } - else - { - return false; - } - } - - /** - * fetch html content of distribution server and parse all information - * - * @param requestdomain domain to aps-/mirrorserver with package api - * @param url url to fetch sub links from - * @return error false/success array with relative sub links - */ - - private function FetchSubUrls($Url) - { - $Return = array(); - - //make url valid - - $Url = str_replace(' ', '%20', $Url); - - //get content from website url - - $Content = @file('http://' . $this->RequestDomain . $Url); - - if($Content != false) - { - foreach($Content as $Temp) - { - //skip empty lines - - if($Temp != "\r\n" - && $Temp != "\r" - && $Temp != "\n" - && $Temp != "") - { - //remove unwanted characters - - $Temp = trim($Temp); - - //grep URLs which match defined format - - if(preg_match("/^ (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package APS + * @version $Id$ + * @todo logging + * install specific packages by name + * other solution than using url_fopen + * move url for distributionserver into panel + */ + +class ApsUpdater extends ApsParser +{ + private $settings = array(); + private $db = false; + private $RequestDomain = ''; + private $RootUrl = ''; + private $RootDir = ''; + + /** + * constructor of class. setup some basic variables needed by class + * + * @param db instance of the database class from syscp + */ + + public function __construct($db) + { + $this->db = $db; + $this->RequestDomain = 'apscatalog.com'; + $this->RootUrl = '/1/'; + $this->RootDir = dirname(dirname(__FILE__)) . '/'; + } + + /** + * Main function of class which handles all around the update mechanism + */ + + public function UpdateHandler() + { + chdir($this->RootDir); + + //return if allow_url_fopen is disabled + + if(ini_get('allow_url_fopen') == '0') + { + echo ("The APS updater cronjob requires that allow_url_fopen is enabled for the PHP CLI binary!\n"); + return; + } + + //return if no task exists + + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_TASKS . '` WHERE `Task` IN (' . TASK_SYSTEM_UPDATE . ', ' . TASK_SYSTEM_DOWNLOAD . ')'); + + if($this->db->num_rows($Result) == 0) + { + return; + } + + //query first task -> updater can only do one job within a run + + $Task = $this->db->fetch_array($Result); + $this->db->query('DELETE FROM `' . TABLE_APS_TASKS . '` WHERE `Task` = ' . $Task['Task']); + + //fetch all vendors + + $Vendors = self::FetchSubUrls($this->RootUrl); + foreach($Vendors as $Vendor) + { + //fetch all applications from vendors + + $Applications = self::FetchSubUrls($this->RootUrl . $Vendor); + foreach($Applications as $Application) + { + //get newest version of package which is already installed + + $CurrentVersion = ''; + $Result = $this->db->query('SELECT * FROM `' . TABLE_APS_PACKAGES . '` WHERE `Name` = "' . $this->db->escape(substr($Application, 0, -1)) . '"'); + + while($Row = $this->db->fetch_array($Result)) + { + if(version_compare($Row['Version'] . '-' . $Row['Release'], $CurrentVersion) == 1) + { + $CurrentVersion = $Row['Version'] . '-' . $Row['Release']; + } + } + + if($this->db->num_rows($Result) != 0) + { + //package already installed in system, search for newer version + + if($Task['Task'] != TASK_SYSTEM_UPDATE)continue; + + //fetch different versions of application from distribution server + + $NewerVersion = ''; + $Versions = self::FetchSubUrls($this->RootUrl . $Vendor . $Application); + foreach($Versions as $Version) + { + $OnlineVersion = substr($Version, 0, -1); + + //is package newer than current version? + + if(version_compare($OnlineVersion, $CurrentVersion) == 1) + { + //is new package newer than another one found before? + + if(version_compare($OnlineVersion, $NewerVersion) == 1) + { + $NewerVersion = $OnlineVersion; + } + } + } + + if($NewerVersion != '') + { + //download package as an update + + self::DownloadPackage($this->RootUrl . $Vendor . $Application . $NewerVersion, substr($Application, 0, -1), $NewerVersion); + continue; + } + } + else + { + if($Task['Task'] != TASK_SYSTEM_DOWNLOAD)continue; + + //new packages + + $NewVersion = ''; + $Versions = self::FetchSubUrls($this->RootUrl . $Vendor . $Application); + foreach($Versions as $Version) + { + $OnlineVersion = substr($Version, 0, -1); + + //is package newer than another one found before? + + if(version_compare($OnlineVersion, $NewVersion) == 1) + { + $NewVersion = $OnlineVersion; + } + } + + if($NewVersion != '') + { + //download package as a new one + + self::DownloadPackage($this->RootUrl . $Vendor . $Application . $NewVersion, substr($Application, 0, -1), $NewVersion); + continue; + } + } + } + } + } + + /** + * download a package from the distribution server and move the downloaded file in the temporary directory + * + * @param url url to download + * @param application string identifying the application name + * @param version string identifying the application version + * @return success true/error false + */ + + private function DownloadPackage($Url, $Application, $Version) + { + $Downloads = self::FetchSubUrls($Url . '/'); + + //make url valid + + $Url = str_replace(' ', '%20', $Url); + + //get content from website url + + $Content = @file_get_contents('http://' . $this->RequestDomain . $Url . '.aps' . $Downloads[0]); + + if($Content != false) + { + //open file to write contents on disk + + $FileHandle = fopen($this->RootDir . 'temp/' . $Application . '-' . $Version . '.app.zip', 'wb'); + + if($FileHandle == true) + { + //write results to disk + + fwrite($FileHandle, $Content); + fclose($FileHandle); + + //set right permissions + + chmod($this->RootDir . 'temp/' . $Application . '-' . $Version . '.app.zip', 0664); + return true; + } + else + { + return false; + } + } + else + { + return false; + } + } + + /** + * fetch html content of distribution server and parse all information + * + * @param requestdomain domain to aps-/mirrorserver with package api + * @param url url to fetch sub links from + * @return error false/success array with relative sub links + */ + + private function FetchSubUrls($Url) + { + $Return = array(); + + //make url valid + + $Url = str_replace(' ', '%20', $Url); + + //get content from website url + + $Content = @file('http://' . $this->RequestDomain . $Url); + + if($Content != false) + { + foreach($Content as $Temp) + { + //skip empty lines + + if($Temp != "\r\n" + && $Temp != "\r" + && $Temp != "\n" + && $Temp != "") + { + //remove unwanted characters + + $Temp = trim($Temp); + + //grep URLs which match defined format + + if(preg_match("/^ \ No newline at end of file diff --git a/lib/classes/database/class.db.php b/lib/classes/database/class.db.php index 98cd49fc..f5f427fc 100644 --- a/lib/classes/database/class.db.php +++ b/lib/classes/database/class.db.php @@ -1,345 +1,345 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Classes - * @version $Id$ - */ - -/** - * Class to manage the connection to the Database - * @package Functions - */ - -class db -{ - /** - * Link ID for every connection - * @var int - */ - - var $link_id = 0; - - /** - * Query ID for every query - * @var int - */ - - var $query_id = 0; - - /** - * Errordescription, if an error occures - * @var string - */ - - var $errdesc = ''; - - /** - * Errornumber, if an error occures - * @var int - */ - - var $errno = 0; - - /** - * Servername - * @var string - */ - - var $server = ''; - - /** - * Username - * @var string - */ - - var $user = ''; - - /** - * Password - * @var string - */ - - var $password = ''; - - /** - * Database - * @var string - */ - - var $database = ''; - - /** - * Class constructor. Connects to Databaseserver and selects Database - * - * @param string Servername - * @param string Username - * @param string Password - * @param string Database - */ - - function db($server, $user, $password, $database = '') - { - // check for mysql extension - - if(!extension_loaded('mysql')) - { - $this->showerror('You should install the PHP MySQL extension!', false); - } - - $this->server = $server; - $this->user = $user; - $this->password = $password; - $this->database = $database; - $this->link_id = @mysql_connect($this->server, $this->user, $this->password); - - if(!$this->link_id) - { - //try to connect with no password an change it afterwards. only for root user - - if($this->user == 'root') - { - $this->link_id = @mysql_connect($this->server, $this->user, ''); - - if($this->link_id) - { - $this->query("SET PASSWORD = PASSWORD('" . $this->escape($this->password) . "')"); - } - else - { - $this->showerror('Establishing connection failed, exiting'); - } - } - else - { - $this->showerror('Establishing connection failed, exiting'); - } - } - - if($this->database != '') - { - if(!@mysql_select_db($this->database, $this->link_id)) - { - $this->showerror('Trying to use database ' . $this->database . ' failed, exiting'); - } - } - mysql_query("SET NAMES utf8", $this->link_id); - mysql_query("SET CHARACTER SET utf8", $this->link_id); - } - - /** - * Closes connection to Databaseserver - */ - - function close() - { - return @mysql_close($this->link_id); - } - - /** - * Escapes user input to be used in mysql queries - * - * @param string $input - * @return string escaped string - */ - - function escape($input) - { - if(is_int($input)) - { - return (int)$input; - } - elseif(is_float($input)) - { - return (float)$input; - } - else - { - return mysql_real_escape_string($input, $this->link_id); - } - } - - /** - * Query the Database - * - * @param string Querystring - * @param bool Unbuffered query? - * @return string RessourceId - */ - - function query($query_str, $unbuffered = false) - { - global $numbqueries; - - if(!$unbuffered) - { - $this->query_id = mysql_query($query_str, $this->link_id); - } - else - { - $this->query_id = mysql_unbuffered_query($query_str, $this->link_id); - } - - if(!$this->query_id) - { - $this->showerror('Invalid SQL: ' . $query_str); - } - - $numbqueries++; - - //echo $query_str.' '.$numbqueries.'
    '; - - return $this->query_id; - } - - /** - * Fetches Row from Query and returns it as array - * - * @param string RessourceId - * @param string Datatype, num or assoc - * @return array The row - */ - - function fetch_array($query_id = - 1, $datatype = 'assoc') - { - if($query_id != - 1) - { - $this->query_id = $query_id; - } - - if($datatype == 'num') - { - $datatype = MYSQL_NUM; - } - else - { - $datatype = MYSQL_ASSOC; - } - - $this->record = mysql_fetch_array($this->query_id, $datatype); - return $this->record; - } - - /** - * Query Database and fetche the first row from Query and returns it as array - * - * @param string Querystring - * @param string Datatype, num or assoc - * @return array The first row - */ - - function query_first($query_string, $datatype = 'assoc') - { - $this->query($query_string); - return $this->fetch_array($this->query_id, $datatype); - } - - /** - * Returns how many rows have been selected - * - * @param string RessourceId - * @return int Number of rows - */ - - function num_rows($query_id = - 1) - { - if($query_id != - 1) - { - $this->query_id = $query_id; - } - - return mysql_num_rows($this->query_id); - } - - /** - * Returns the auto_incremental-Value of the inserted row - * - * @return int auto_incremental-Value - */ - - function insert_id() - { - return mysql_insert_id($this->link_id); - } - - /** - * Returns the number of rows affected by last query - * - * @return int affected rows - */ - - function affected_rows() - { - return mysql_affected_rows($this->link_id); - } - - /** - * Returns errordescription and errornumber if an error occured. - * - * @return int Errornumber - */ - - function geterrdescno() - { - if($this->link_id != 0) - { - $this->errdesc = mysql_error($this->link_id); - $this->errno = mysql_errno($this->link_id); - } - else - { - // Maybe we don't have any linkid so let's try to catch at least anything - - $this->errdesc = mysql_error(); - $this->errno = mysql_errno(); - } - - return $this->errno; - } - - /** - * Dies with an errormessage - * - * @param string Errormessage - */ - - function showerror($errormsg, $mysqlActive = true) - { - global $filename; - - if($mysqlActive) - { - $this->geterrdescno(); - $errormsg.= "\n"; - $errormsg.= 'mysql error number: ' . $this->errno . "\n"; - $errormsg.= 'mysql error desc: ' . $this->errdesc . "\n"; - } - - $errormsg.= 'Time/date: ' . date('d/m/Y h:i A') . "\n"; - - if($filename != 'cronscript.php') - { - $errormsg.= 'Script: ' . htmlspecialchars(getenv('REQUEST_URI')) . "\n"; - $errormsg.= 'Referer: ' . htmlspecialchars(getenv('HTTP_REFERER')) . "\n"; - die(nl2br($errormsg)); - } - else - { - $errormsg.= 'Script: -- Cronscript --' . "\n"; - die($errormsg); - } - } -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Classes + * @version $Id$ + */ + +/** + * Class to manage the connection to the Database + * @package Functions + */ + +class db +{ + /** + * Link ID for every connection + * @var int + */ + + var $link_id = 0; + + /** + * Query ID for every query + * @var int + */ + + var $query_id = 0; + + /** + * Errordescription, if an error occures + * @var string + */ + + var $errdesc = ''; + + /** + * Errornumber, if an error occures + * @var int + */ + + var $errno = 0; + + /** + * Servername + * @var string + */ + + var $server = ''; + + /** + * Username + * @var string + */ + + var $user = ''; + + /** + * Password + * @var string + */ + + var $password = ''; + + /** + * Database + * @var string + */ + + var $database = ''; + + /** + * Class constructor. Connects to Databaseserver and selects Database + * + * @param string Servername + * @param string Username + * @param string Password + * @param string Database + */ + + function db($server, $user, $password, $database = '') + { + // check for mysql extension + + if(!extension_loaded('mysql')) + { + $this->showerror('You should install the PHP MySQL extension!', false); + } + + $this->server = $server; + $this->user = $user; + $this->password = $password; + $this->database = $database; + $this->link_id = @mysql_connect($this->server, $this->user, $this->password); + + if(!$this->link_id) + { + //try to connect with no password an change it afterwards. only for root user + + if($this->user == 'root') + { + $this->link_id = @mysql_connect($this->server, $this->user, ''); + + if($this->link_id) + { + $this->query("SET PASSWORD = PASSWORD('" . $this->escape($this->password) . "')"); + } + else + { + $this->showerror('Establishing connection failed, exiting'); + } + } + else + { + $this->showerror('Establishing connection failed, exiting'); + } + } + + if($this->database != '') + { + if(!@mysql_select_db($this->database, $this->link_id)) + { + $this->showerror('Trying to use database ' . $this->database . ' failed, exiting'); + } + } + mysql_query("SET NAMES utf8", $this->link_id); + mysql_query("SET CHARACTER SET utf8", $this->link_id); + } + + /** + * Closes connection to Databaseserver + */ + + function close() + { + return @mysql_close($this->link_id); + } + + /** + * Escapes user input to be used in mysql queries + * + * @param string $input + * @return string escaped string + */ + + function escape($input) + { + if(is_int($input)) + { + return (int)$input; + } + elseif(is_float($input)) + { + return (float)$input; + } + else + { + return mysql_real_escape_string($input, $this->link_id); + } + } + + /** + * Query the Database + * + * @param string Querystring + * @param bool Unbuffered query? + * @return string RessourceId + */ + + function query($query_str, $unbuffered = false) + { + global $numbqueries; + + if(!$unbuffered) + { + $this->query_id = mysql_query($query_str, $this->link_id); + } + else + { + $this->query_id = mysql_unbuffered_query($query_str, $this->link_id); + } + + if(!$this->query_id) + { + $this->showerror('Invalid SQL: ' . $query_str); + } + + $numbqueries++; + + //echo $query_str.' '.$numbqueries.'
    '; + + return $this->query_id; + } + + /** + * Fetches Row from Query and returns it as array + * + * @param string RessourceId + * @param string Datatype, num or assoc + * @return array The row + */ + + function fetch_array($query_id = - 1, $datatype = 'assoc') + { + if($query_id != - 1) + { + $this->query_id = $query_id; + } + + if($datatype == 'num') + { + $datatype = MYSQL_NUM; + } + else + { + $datatype = MYSQL_ASSOC; + } + + $this->record = mysql_fetch_array($this->query_id, $datatype); + return $this->record; + } + + /** + * Query Database and fetche the first row from Query and returns it as array + * + * @param string Querystring + * @param string Datatype, num or assoc + * @return array The first row + */ + + function query_first($query_string, $datatype = 'assoc') + { + $this->query($query_string); + return $this->fetch_array($this->query_id, $datatype); + } + + /** + * Returns how many rows have been selected + * + * @param string RessourceId + * @return int Number of rows + */ + + function num_rows($query_id = - 1) + { + if($query_id != - 1) + { + $this->query_id = $query_id; + } + + return mysql_num_rows($this->query_id); + } + + /** + * Returns the auto_incremental-Value of the inserted row + * + * @return int auto_incremental-Value + */ + + function insert_id() + { + return mysql_insert_id($this->link_id); + } + + /** + * Returns the number of rows affected by last query + * + * @return int affected rows + */ + + function affected_rows() + { + return mysql_affected_rows($this->link_id); + } + + /** + * Returns errordescription and errornumber if an error occured. + * + * @return int Errornumber + */ + + function geterrdescno() + { + if($this->link_id != 0) + { + $this->errdesc = mysql_error($this->link_id); + $this->errno = mysql_errno($this->link_id); + } + else + { + // Maybe we don't have any linkid so let's try to catch at least anything + + $this->errdesc = mysql_error(); + $this->errno = mysql_errno(); + } + + return $this->errno; + } + + /** + * Dies with an errormessage + * + * @param string Errormessage + */ + + function showerror($errormsg, $mysqlActive = true) + { + global $filename; + + if($mysqlActive) + { + $this->geterrdescno(); + $errormsg.= "\n"; + $errormsg.= 'mysql error number: ' . $this->errno . "\n"; + $errormsg.= 'mysql error desc: ' . $this->errdesc . "\n"; + } + + $errormsg.= 'Time/date: ' . date('d/m/Y h:i A') . "\n"; + + if($filename != 'cronscript.php') + { + $errormsg.= 'Script: ' . htmlspecialchars(getenv('REQUEST_URI')) . "\n"; + $errormsg.= 'Referer: ' . htmlspecialchars(getenv('HTTP_REFERER')) . "\n"; + die(nl2br($errormsg)); + } + else + { + $errormsg.= 'Script: -- Cronscript --' . "\n"; + die($errormsg); + } + } +} + +?> diff --git a/lib/classes/idna/class.idna_convert.php b/lib/classes/idna/class.idna_convert.php index b9b75ab8..4e753648 100644 --- a/lib/classes/idna/class.idna_convert.php +++ b/lib/classes/idna/class.idna_convert.php @@ -1,1381 +1,1381 @@ - - * @version 0.4.3 - * - */ - -class idna_convert -{ - // {{{ npdata - - /** - * Holds all relevant mapping tables, loaded from a seperate file on construct - * See RFC3454 for details - * - * @var array - * @access private - */ - - var $_np_ = array(); - - // }}} - // Internal settings, do not mess with them - - var $_punycode_prefix = 'xn--'; - var $_invalid_ucs = 0x80000000; - var $_max_ucs = 0x10FFFF; - var $_base = 36; - var $_tmin = 1; - var $_tmax = 26; - var $_skew = 38; - var $_damp = 700; - var $_initial_bias = 72; - var $_initial_n = 0x80; - var $_sbase = 0xAC00; - var $_lbase = 0x1100; - var $_vbase = 0x1161; - var $_tbase = 0x11a7; - var $_lcount = 19; - var $_vcount = 21; - var $_tcount = 28; - var $_ncount = 588; - - // _vcount * _tcount - - var $_scount = 11172; - - // _lcount * _tcount * _vcount - - var $_error = false; - - // See set_parameter() for details of how to change the following settings - // from within your script / application - - var $_api_encoding = 'utf8'; - - // Default input charset is UTF-8 - - var $_allow_overlong = false; - - // Overlong UTF-8 encodings are forbidden - - var $_strict_mode = false; - - // Behave strict or not - // The constructor - - function idna_convert($options = false) - { - $this->slast = $this->_sbase + $this->_lcount * $this->_vcount * $this->_tcount; - - if(function_exists('file_get_contents')) - { - $this->_np_ = unserialize(file_get_contents(dirname(__FILE__) . '/npdata.ser')); - } - else - { - $this->_np_ = unserialize(join('', file(dirname(__FILE__) . '/npdata.ser'))); - } - - // If parameters are given, pass these to the respective method - - if(is_array($options)) - { - return $this->set_parameter($options); - } - - return true; - } - - /** - * Sets a new option value. Available options and values: - * [encoding - Use either UTF-8, UCS4 as array or UCS4 as string as input ('utf8' for UTF-8, - * 'ucs4_string' and 'ucs4_array' respectively for UCS4); The output is always UTF-8] - * [overlong - Unicode does not allow unnecessarily long encodings of chars, - * to allow this, set this parameter to true, else to false; - * default is false.] - * [strict - true: strict mode, good for registration purposes - Causes errors - * on failures; false: loose mode, ideal for "wildlife" applications - * by silently ignoring errors and returning the original input instead - * - * @param mixed Parameter to set (string: single parameter; array of Parameter => Value pairs) - * @param string Value to use (if parameter 1 is a string) - * @return boolean true on success, false otherwise - * @access public - */ - - function set_parameter($option, $value = false) - { - if(!is_array($option)) - { - $option = array( - $option => $value - ); - } - - foreach($option as $k => $v) - { - switch($k) - { - case 'encoding': - - switch($v) - { - case 'utf8': - case 'ucs4_string': - case 'ucs4_array': - $this->_api_encoding = $v; - break; - default: - $this->_error('Set Parameter: Unknown parameter ' . $v . ' for option ' . $k); - return false; - } - - break; - case 'overlong': - $this->_allow_overlong = ($v) ? true : false; - break; - case 'strict': - $this->_strict_mode = ($v) ? true : false; - break; - default: - $this->_error('Set Parameter: Unknown option ' . $k); - return false; - } - } - - return true; - } - - /** - * Decode a given ACE domain name - * @param string Domain name (ACE string) - * [@param string Desired output encoding, see {@link set_parameter}] - * @return string Decoded Domain name (UTF-8 or UCS-4) - * @access public - */ - - function decode($input, $one_time_encoding = false) - { - // Optionally set - - if($one_time_encoding) - { - switch($one_time_encoding) - { - case 'utf8': - case 'ucs4_string': - case 'ucs4_array': - break; - default: - $this->_error('Unknown encoding ' . $one_time_encoding); - return false; - } - } - - // Make sure to drop any newline characters around - - $input = trim($input); - - // Negotiate input and try to determine, wether it is a plain string, - // an email address or something like a complete URL - - if(strpos($input, '@')) - { - // Maybe it is an email address - // No no in strict mode - - if($this->_strict_mode) - { - $this->_error('Only simple domain name parts can be handled in strict mode'); - return false; - } - - list($email_pref, $input) = explode('@', $input, 2); - $arr = explode('.', $input); - foreach($arr as $k => $v) - { - $conv = $this->_decode($v); - - if($conv)$arr[$k] = $conv; - } - - $return = $email_pref . '@' . join('.', $arr); - } - elseif(preg_match('![:\./]!', $input)) - { - // Or a complete domain name (with or without paths / parameters) - // No no in strict mode - - if($this->_strict_mode) - { - $this->_error('Only simple domain name parts can be handled in strict mode'); - return false; - } - - $parsed = parse_url($input); - - if(isset($parsed['host'])) - { - $arr = explode('.', $parsed['host']); - foreach($arr as $k => $v) - { - $conv = $this->_decode($v); - - if($conv)$arr[$k] = $conv; - } - - $parsed['host'] = join('.', $arr); - $return = (empty($parsed['scheme']) ? '' : $parsed['scheme'] . (strtolower($parsed['scheme']) == 'mailto' ? ':' : '://')) . (empty($parsed['user']) ? '' : $parsed['user'] . (empty($parsed['pass']) ? '' : ':' . $parsed['pass']) . '@') . $parsed['host'] . (empty($parsed['port']) ? '' : ':' . $parsed['port']) . $parsed['path'] . (empty($parsed['query']) ? '' : '?' . $parsed['query']) . (empty($parsed['fragment']) ? '' : '#' . $parsed['fragment']); - } - else - { - // parse_url seems to have failed, try without it - - $arr = explode('.', $input); - foreach($arr as $k => $v) - { - $conv = $this->_decode($v); - - if($conv)$arr[$k] = $conv; - } - - $return = join('.', $arr); - } - } - else - { - // Otherwise we consider it being a pure domain name string - - $return = $this->_decode($input); - } - - // The output is UTF-8 by default, other output formats need conversion here - // If one time encoding is given, use this, else the objects property - - switch(($one_time_encoding) ? $one_time_encoding : $this->_api_encoding) - { - case 'utf8': - return $return; - break; - case 'ucs4_string': - return $this->_ucs4_to_ucs4_string($this->_utf8_to_ucs4($return)); - break; - case 'ucs4_array': - return $this->_utf8_to_ucs4($return); - break; - default: - $this->_error('Unsupported output format'); - return false; - } - } - - /** - * Encode a given UTF-8 domain name - * @param string Domain name (UTF-8 or UCS-4) - * [@param string Desired input encoding, see {@link set_parameter}] - * @return string Encoded Domain name (ACE string) - * @access public - */ - - function encode($decoded, $one_time_encoding = false) - { - // Forcing conversion of input to UCS4 array - // If one time encoding is given, use this, else the objects property - - switch(($one_time_encoding) ? $one_time_encoding : $this->_api_encoding) - { - case 'utf8': - $decoded = $this->_utf8_to_ucs4($decoded); - break; - case 'ucs4_string': - $decoded = $this->_ucs4_string_to_ucs4($decoded); - case 'ucs4_array': - break; - default: - - // $this->_error('Unsupported input format: '.$this->_api_encoding); - - $this->_error('Unsupported input format'); - return false; - } - - // No input, no output, what else did you expect? - - if(empty($decoded))return ''; - - // Anchors for iteration - - $last_begin = 0; - - // Output string - - $output = ''; - foreach($decoded as $k => $v) - { - // Make sure to use just the plain dot - - switch($v) - { - case 0x3002: - case 0xFF0E: - case 0xFF61: - $decoded[$k] = 0x2E; - - // It's right, no break here - // The codepoints above have to be converted to dots anyway - // Stumbling across an anchoring character - - - case 0x2E: - case 0x2F: - case 0x3A: - case 0x3F: - case 0x40: - - // Neither email addresses nor URLs allowed in strict mode - - if($this->_strict_mode) - { - $this->_error('Neither email addresses nor URLs are allowed in strict mode.'); - return false; - } - else - { - // Skip first char - - if($k) - { - $encoded = ''; - $encoded = $this->_encode(array_slice($decoded, $last_begin, (($k) - $last_begin))); - - if($encoded) - { - $output.= $encoded; - } - else - { - $output.= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($k) - $last_begin))); - } - - $output.= chr($decoded[$k]); - } - - $last_begin = $k + 1; - } - } - } - - // Catch the rest of the string - - if($last_begin) - { - $inp_len = sizeof($decoded); - $encoded = ''; - $encoded = $this->_encode(array_slice($decoded, $last_begin, (($inp_len) - $last_begin))); - - if($encoded) - { - $output.= $encoded; - } - else - { - $output.= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($inp_len) - $last_begin))); - } - - return $output; - } - else - { - if($output = $this->_encode($decoded)) - { - return $output; - } - else - { - return $this->_ucs4_to_utf8($decoded); - } - } - } - - /** - * Use this method to get the last error ocurred - * @param void - * @return string The last error, that occured - * @access public - */ - - function get_last_error() - { - return $this->_error; - } - - /** - * The actual decoding algorithm - * @access private - */ - - function _decode($encoded) - { - // We do need to find the Punycode prefix - - if(!preg_match('!^' . preg_quote($this->_punycode_prefix, '!') . '!', $encoded)) - { - $this->_error('This is not a punycode string'); - return false; - } - - $encode_test = preg_replace('!^' . preg_quote($this->_punycode_prefix, '!') . '!', '', $encoded); - - // If nothing left after removing the prefix, it is hopeless - - if(!$encode_test) - { - $this->_error('The given encoded string was empty'); - return false; - } - - // Find last occurence of the delimiter - - $delim_pos = strrpos($encoded, '-'); - - if($delim_pos > strlen($this->_punycode_prefix)) - { - for ($k = strlen($this->_punycode_prefix);$k < $delim_pos;++$k) - { - $decoded[] = ord($encoded{$k}); - } - } - else - { - $decoded = array(); - } - - $deco_len = count($decoded); - $enco_len = strlen($encoded); - - // Wandering through the strings; init - - $is_first = true; - $bias = $this->_initial_bias; - $idx = 0; - $char = $this->_initial_n; - for ($enco_idx = ($delim_pos) ? ($delim_pos + 1) : 0;$enco_idx < $enco_len;++$deco_len) - { - for ($old_idx = $idx, $w = 1, $k = $this->_base;1;$k+= $this->_base) - { - $digit = $this->_decode_digit($encoded{$enco_idx++}); - $idx+= $digit * $w; - $t = ($k <= $bias) ? $this->_tmin : (($k >= $bias + $this->_tmax) ? $this->_tmax : ($k - $bias)); - - if($digit < $t)break; - $w = (int)($w * ($this->_base - $t)); - } - - $bias = $this->_adapt($idx - $old_idx, $deco_len + 1, $is_first); - $is_first = false; - $char+= (int)($idx / ($deco_len + 1)); - $idx%= ($deco_len + 1); - - if($deco_len > 0) - { - // Make room for the decoded char - - for ($i = $deco_len;$i > $idx;$i--) - { - $decoded[$i] = $decoded[($i - 1)]; - } - } - - $decoded[$idx++] = $char; - } - - return $this->_ucs4_to_utf8($decoded); - } - - /** - * The actual encoding algorithm - * @access private - */ - - function _encode($decoded) - { - // We cannot encode a domain name containing the Punycode prefix - - $extract = strlen($this->_punycode_prefix); - $check_pref = $this->_utf8_to_ucs4($this->_punycode_prefix); - $check_deco = array_slice($decoded, 0, $extract); - - if($check_pref == $check_deco) - { - $this->_error('This is already a punycode string'); - return false; - } - - // We will not try to encode strings consisting of basic code points only - - $encodable = false; - foreach($decoded as $k => $v) - { - if($v > 0x7a) - { - $encodable = true; - break; - } - } - - if(!$encodable) - { - $this->_error('The given string does not contain encodable chars'); - return false; - } - - // Do NAMEPREP - - $decoded = $this->_nameprep($decoded); - - if(!$decoded - || !is_array($decoded))return false; - - // NAMEPREP failed - - $deco_len = count($decoded); - - if(!$deco_len)return false; - - // Empty array - - $codecount = 0; - - // How many chars have been consumed - - $encoded = ''; - - // Copy all basic code points to output - - for ($i = 0;$i < $deco_len;++$i) - { - $test = $decoded[$i]; - - // Will match [-0-9a-zA-Z] - - if((0x2F < $test && $test < 0x40) - || (0x40 < $test && $test < 0x5B) - || (0x60 < $test && $test <= 0x7B) - || (0x2D == $test)) - { - $encoded.= chr($decoded[$i]); - $codecount++; - } - } - - if($codecount == $deco_len)return $encoded; - - // All codepoints were basic ones - // Start with the prefix; copy it to output - - $encoded = $this->_punycode_prefix . $encoded; - - // If we have basic code points in output, add an hyphen to the end - - if($codecount)$encoded.= '-'; - - // Now find and encode all non-basic code points - - $is_first = true; - $cur_code = $this->_initial_n; - $bias = $this->_initial_bias; - $delta = 0; - - while($codecount < $deco_len) - { - // Find the smallest code point >= the current code point and - // remember the last ouccrence of it in the input - - for ($i = 0, $next_code = $this->_max_ucs;$i < $deco_len;$i++) - { - if($decoded[$i] >= $cur_code - && $decoded[$i] <= $next_code) - { - $next_code = $decoded[$i]; - } - } - - $delta+= ($next_code - $cur_code) * ($codecount + 1); - $cur_code = $next_code; - - // Scan input again and encode all characters whose code point is $cur_code - - for ($i = 0;$i < $deco_len;$i++) - { - if($decoded[$i] < $cur_code) - { - $delta++; - } - elseif($decoded[$i] == $cur_code) - { - for ($q = $delta, $k = $this->_base;1;$k+= $this->_base) - { - $t = ($k <= $bias) ? $this->_tmin : (($k >= $bias + $this->_tmax) ? $this->_tmax : $k - $bias); - - if($q < $t)break; - $encoded.= $this->_encode_digit(ceil($t + (($q - $t) % ($this->_base - $t)))); - $q = (int)(($q - $t) / ($this->_base - $t)); - } - - $encoded.= $this->_encode_digit($q); - $bias = $this->_adapt($delta, $codecount + 1, $is_first); - $codecount++; - $delta = 0; - $is_first = false; - } - } - - $delta++; - $cur_code++; - } - - return $encoded; - } - - /** - * Adapt the bias according to the current code point and position - * @access private - */ - - function _adapt($delta, $npoints, $is_first) - { - $delta = (int)($is_first ? ($delta / $this->_damp) : ($delta / 2)); - $delta+= (int)($delta / $npoints); - for ($k = 0;$delta > (($this->_base - $this->_tmin) * $this->_tmax) / 2;$k+= $this->_base) - { - $delta = (int)($delta / ($this->_base - $this->_tmin)); - } - - return (int)($k + ($this->_base - $this->_tmin + 1) * $delta / ($delta + $this->_skew)); - } - - /** - * Encoding a certain digit - * @access private - */ - - function _encode_digit($d) - { - return chr($d + 22 + 75 * ($d < 26)); - } - - /** - * Decode a certain digit - * @access private - */ - - function _decode_digit($cp) - { - $cp = ord($cp); - return ($cp - 48 < 10) ? $cp - 22 : (($cp - 65 < 26) ? $cp - 65 : (($cp - 97 < 26) ? $cp - 97 : $this->_base)); - } - - /** - * Internal error handling method - * @access private - */ - - function _error($error = '') - { - $this->_error = $error; - } - - /** - * Do Nameprep according to RFC3491 and RFC3454 - * @param array Unicode Characters - * @return string Unicode Characters, Nameprep'd - * @access private - */ - - function _nameprep($input) - { - $output = array(); - $error = false; - - // - // Mapping - // Walking through the input array, performing the required steps on each of - // the input chars and putting the result into the output array - // While mapping required chars we apply the cannonical ordering - // $this->_show_hex($input); - - foreach($input as $v) - { - // Map to nothing == skip that code point - - if(in_array($v, $this->_np_['map_nothing']))continue; - - // Try to find prohibited input - - if(in_array($v, $this->_np_['prohibit']) - || in_array($v, $this->_np_['general_prohibited'])) - { - $this->_error('NAMEPREP: Prohibited input U+' . sprintf('%08X', $v)); - return false; - } - - foreach($this->_np_['prohibit_ranges'] as $range) - { - if($range[0] <= $v - && $v <= $range[1]) - { - $this->_error('NAMEPREP: Prohibited input U+' . sprintf('%08X', $v)); - return false; - } - } - - // - // Hangul syllable decomposition - - if(0xAC00 <= $v - && $v <= 0xD7AF) - { - foreach($this->_hangul_decompose($v) as $out) - { - $output[] = $out; - } - - // There's a decomposition mapping for that code point - } - elseif(isset($this->_np_['replacemaps'][$v])) - { - foreach($this->_apply_cannonical_ordering($this->_np_['replacemaps'][$v]) as $out) - { - $output[] = $out; - } - } - else - { - $output[] = $v; - } - } - - // Before applying any Combining, try to rearrange any Hangul syllables - - $output = $this->_hangul_compose($output); - - // - // Combine code points - // - - $last_class = 0; - $last_starter = 0; - $out_len = count($output); - for ($i = 0;$i < $out_len;++$i) - { - $class = $this->_get_combining_class($output[$i]); - - if((!$last_class || $last_class > $class) - && $class) - { - // Try to match - - $seq_len = $i - $last_starter; - $out = $this->_combine(array_slice($output, $last_starter, $seq_len)); - - // On match: Replace the last starter with the composed character and remove - // the now redundant non-starter(s) - - if($out) - { - $output[$last_starter] = $out; - - if(count($out) != $seq_len) - { - for ($j = $i + 1;$j < $out_len;++$j) - { - $output[$j - 1] = $output[$j]; - } - - unset($output[$out_len]); - } - - // Rewind the for loop by one, since there can be more possible compositions - - $i--; - $out_len--; - $last_class = ($i == $last_starter) ? 0 : $this->_get_combining_class($output[$i - 1]); - continue; - } - } - - if(!$class) - { - // The current class is 0 - - $last_starter = $i; - } - - $last_class = $class; - } - - return $output; - } - - /** - * Decomposes a Hangul syllable - * (see http://www.unicode.org/unicode/reports/tr15/#Hangul - * @param integer 32bit UCS4 code point - * @return array Either Hangul Syllable decomposed or original 32bit value as one value array - * @access private - */ - - function _hangul_decompose($char) - { - $sindex = $char - $this->_sbase; - - if($sindex < 0 - || $sindex >= $this->_scount) - { - return array( - $char - ); - } - - $result = array(); - $T = $this->_tbase + ($sindex % $this->_tcount); - $result[] = (int)($this->_lbase + $sindex / $this->_ncount); - $result[] = (int)$this->_vbase + (($sindex % $this->_ncount) / $this->_tcount); - - if($T != $this->_tbase)$result[] = $T; - return $result; - } - - /** - * Ccomposes a Hangul syllable - * (see http://www.unicode.org/unicode/reports/tr15/#Hangul - * @param array Decomposed UCS4 sequence - * @return array UCS4 sequence with syllables composed - * @access private - */ - - function _hangul_compose($input) - { - $inp_len = count($input); - - if(!$inp_len)return array(); - $result = array(); - $last = $input[0]; - $result[] = $last; - - // copy first char from input to output - - for ($i = 1;$i < $inp_len;++$i) - { - $char = $input[$i]; - - // Find out, wether two current characters from L and V - - $lindex = $last - $this->_lbase; - - if(0 <= $lindex - && $lindex < $this->_lcount) - { - $vindex = $char - $this->_vbase; - - if(0 <= $vindex - && $vindex < $this->_vcount) - { - // create syllable of form LV - - $last = ($this->_sbase + ($lindex * $this->_vcount + $vindex) * $this->_tcount); - $out_off = count($result) - 1; - $result[$out_off] = $last; - - // reset last - - continue; - - // discard char - } - } - - // Find out, wether two current characters are LV and T - - $sindex = $last - $this->_sbase; - - if(0 <= $sindex - && $sindex < $this->_scount - && ($sindex % $this->_tcount) == 0) - { - $tindex = $char - $this->_tbase; - - if(0 <= $tindex - && $tindex <= $this->_tcount) - { - // create syllable of form LVT - - $last+= $tindex; - $out_off = count($result) - 1; - $result[$out_off] = $last; - - // reset last - - continue; - - // discard char - } - } - - // if neither case was true, just add the character - - $last = $char; - $result[] = $char; - } - - return $result; - } - - /** - * Returns the combining class of a certain wide char - * @param integer Wide char to check (32bit integer) - * @return integer Combining class if found, else 0 - * @access private - */ - - function _get_combining_class($char) - { - return isset($this->_np_['norm_combcls'][$char]) ? $this->_np_['norm_combcls'][$char] : 0; - } - - /** - * Apllies the cannonical ordering of a decomposed UCS4 sequence - * @param array Decomposed UCS4 sequence - * @return array Ordered USC4 sequence - * @access private - */ - - function _apply_cannonical_ordering($input) - { - $swap = true; - $size = count($input); - - while($swap) - { - $swap = false; - $last = $this->_get_combining_class($input[0]); - for ($i = 0;$i < $size - 1;++$i) - { - $next = $this->_get_combining_class($input[$i + 1]); - - if($next != 0 - && $last > $next) - { - // Move item leftward until it fits - - for ($j = $i + 1;$j > 0;--$j) - { - if($this->_get_combining_class($input[$j - 1]) <= $next)break; - $t = $input[$j]; - $input[$j] = $input[$j - 1]; - $input[$j - 1] = $t; - $swap = 1; - } - - // Reentering the loop looking at the old character again - - $next = $last; - } - - $last = $next; - } - } - - return $input; - } - - /** - * Do composition of a sequence of starter and non-starter - * @param array UCS4 Decomposed sequence - * @return array Ordered USC4 sequence - * @access private - */ - - function _combine($input) - { - $inp_len = count($input); - foreach($this->_np_['replacemaps'] as $np_src => $np_target) - { - if($np_target[0] != $input[0])continue; - - if(count($np_target) != $inp_len)continue; - $hit = false; - foreach($input as $k2 => $v2) - { - if($v2 == $np_target[$k2]) - { - $hit = true; - } - else - { - $hit = false; - break; - } - } - - if($hit)return $np_src; - } - - return false; - } - - /** - * This converts an UTF-8 encoded string to its UCS-4 representation - * By talking about UCS-4 "strings" we mean arrays of 32bit integers representing - * each of the "chars". This is due to PHP not being able to handle strings with - * bit depth different from 8. This apllies to the reverse method _ucs4_to_utf8(), too. - * The following UTF-8 encodings are supported: - * bytes bits representation - * 1 7 0xxxxxxx - * 2 11 110xxxxx 10xxxxxx - * 3 16 1110xxxx 10xxxxxx 10xxxxxx - * 4 21 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - * 5 26 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx - * 6 31 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx - * Each x represents a bit that can be used to store character data. - * The five and six byte sequences are part of Annex D of ISO/IEC 10646-1:2000 - * @access private - */ - - function _utf8_to_ucs4($input) - { - $output = array(); - $out_len = 0; - $inp_len = strlen($input); - $mode = 'next'; - $test = 'none'; - for ($k = 0;$k < $inp_len;++$k) - { - $v = ord($input{$k}); - - // Extract byte from input string - - if($v < 128) - { - // We found an ASCII char - put into stirng as is - - $output[$out_len] = $v; - ++$out_len; - - if('add' == $mode) - { - $this->_error('Conversion from UTF-8 to UCS-4 failed: malformed input at byte ' . $k); - return false; - } - - continue; - } - - if('next' == $mode) - { - // Try to find the next start byte; determine the width of the Unicode char - - $start_byte = $v; - $mode = 'add'; - $test = 'range'; - - if($v >> 5 == 6) - { - // &110xxxxx 10xxxxx - - $next_byte = 0; - - // Tells, how many times subsequent bitmasks must rotate 6bits to the left - - $v = ($v - 192) << 6; - } - elseif($v >> 4 == 14) - { - // &1110xxxx 10xxxxxx 10xxxxxx - - $next_byte = 1; - $v = ($v - 224) << 12; - } - elseif($v >> 3 == 30) - { - // &11110xxx 10xxxxxx 10xxxxxx 10xxxxxx - - $next_byte = 2; - $v = ($v - 240) << 18; - } - elseif($v >> 2 == 62) - { - // &111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx - - $next_byte = 3; - $v = ($v - 248) << 24; - } - elseif($v >> 1 == 126) - { - // &1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx - - $next_byte = 4; - $v = ($v - 252) << 30; - } - else - { - $this->_error('This might be UTF-8, but I don\'t understand it at byte ' . $k); - return false; - } - - if('add' == $mode) - { - $output[$out_len] = (int)$v; - ++$out_len; - continue; - } - } - - if('add' == $mode) - { - if(!$this->_allow_overlong - && $test == 'range') - { - $test = 'none'; - - if(($v < 0xA0 && $start_byte == 0xE0) - || ($v < 0x90 && $start_byte == 0xF0) - || ($v > 0x8F && $start_byte == 0xF4)) - { - $this->_error('Bogus UTF-8 character detected (out of legal range) at byte ' . $k); - return false; - } - } - - if($v >> 6 == 2) - { - // Bit mask must be 10xxxxxx - - $v = ($v - 128) << ($next_byte * 6); - $output[($out_len - 1)]+= $v; - --$next_byte; - } - else - { - $this->_error('Conversion from UTF-8 to UCS-4 failed: malformed input at byte ' . $k); - return false; - } - - if($next_byte < 0) - { - $mode = 'next'; - } - } - } - - // for - - return $output; - } - - /** - * Convert UCS-4 string into UTF-8 string - * See _utf8_to_ucs4() for details - * @access private - */ - - function _ucs4_to_utf8($input) - { - $output = ''; - $k = 0; - foreach($input as $v) - { - ++$k; - - // $v = ord($v); - - if($v < 128) - { - // 7bit are transferred literally - - $output.= chr($v); - } - elseif($v < (1 << 11)) - { - // 2 bytes - - $output.= chr(192 + ($v >> 6)) . chr(128 + ($v & 63)); - } - elseif($v < (1 << 16)) - { - // 3 bytes - - $output.= chr(224 + ($v >> 12)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63)); - } - elseif($v < (1 << 21)) - { - // 4 bytes - - $output.= chr(240 + ($v >> 18)) . chr(128 + (($v >> 12) & 63)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63)); - } - elseif($v < (1 << 26)) - { - // 5 bytes - - $output.= chr(248 + ($v >> 24)) . chr(128 + (($v >> 18) & 63)) . chr(128 + (($v >> 12) & 63)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63)); - } - elseif($v < (1 << 31)) - { - // 6 bytes - - $output.= chr(252 + ($v >> 30)) . chr(128 + (($v >> 24) & 63)) . chr(128 + (($v >> 18) & 63)) . chr(128 + (($v >> 12) & 63)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63)); - } - else - { - $this->_error('Conversion from UCS-4 to UTF-8 failed: malformed input at byte ' . $k); - return false; - } - } - - return $output; - } - - /** - * Convert UCS-4 array into UCS-4 string - * - * @access private - */ - - function _ucs4_to_ucs4_string($input) - { - $output = ''; - - // Take array values and split output to 4 bytes per value - // The bit mask is 255, which reads &11111111 - - foreach($input as $v) - { - $output.= chr(($v >> 24) & 255) . chr(($v >> 16) & 255) . chr(($v >> 8) & 255) . chr($v & 255); - } - - return $output; - } - - /** - * Convert UCS-4 strin into UCS-4 garray - * - * @access private - */ - - function _ucs4_string_to_ucs4($input) - { - $output = array(); - $inp_len = strlen($input); - - // Input length must be dividable by 4 - - if($inp_len % 4) - { - $this->_error('Input UCS4 string is broken'); - return false; - } - - // Empty input - return empty output - - if(!$inp_len)return $output; - for ($i = 0, $out_len = - 1;$i < $inp_len;++$i) - { - // Increment output position every 4 input bytes - - if(!($i % 4)) - { - $out_len++; - $output[$out_len] = 0; - } - - $output[$out_len]+= ord($input{$i}) << (8 * (3 - ($i % 4))); - } - - return $output; - } -} - -/** - * Adapter class for aligning the API of idna_convert with that of Net_IDNA - * @author Matthias Sommerfeld - */ - -class Net_IDNA_php4 extends idna_convert -{ - /** - * Sets a new option value. Available options and values: - * [encoding - Use either UTF-8, UCS4 as array or UCS4 as string as input ('utf8' for UTF-8, - * 'ucs4_string' and 'ucs4_array' respectively for UCS4); The output is always UTF-8] - * [overlong - Unicode does not allow unnecessarily long encodings of chars, - * to allow this, set this parameter to true, else to false; - * default is false.] - * [strict - true: strict mode, good for registration purposes - Causes errors - * on failures; false: loose mode, ideal for "wildlife" applications - * by silently ignoring errors and returning the original input instead - * - * @param mixed Parameter to set (string: single parameter; array of Parameter => Value pairs) - * @param string Value to use (if parameter 1 is a string) - * @return boolean true on success, false otherwise - * @access public - */ - - function setParams($option, $param = false) - { - return $this->IC->set_parameters($option, $param); - } -} - + + * @version 0.4.3 + * + */ + +class idna_convert +{ + // {{{ npdata + + /** + * Holds all relevant mapping tables, loaded from a seperate file on construct + * See RFC3454 for details + * + * @var array + * @access private + */ + + var $_np_ = array(); + + // }}} + // Internal settings, do not mess with them + + var $_punycode_prefix = 'xn--'; + var $_invalid_ucs = 0x80000000; + var $_max_ucs = 0x10FFFF; + var $_base = 36; + var $_tmin = 1; + var $_tmax = 26; + var $_skew = 38; + var $_damp = 700; + var $_initial_bias = 72; + var $_initial_n = 0x80; + var $_sbase = 0xAC00; + var $_lbase = 0x1100; + var $_vbase = 0x1161; + var $_tbase = 0x11a7; + var $_lcount = 19; + var $_vcount = 21; + var $_tcount = 28; + var $_ncount = 588; + + // _vcount * _tcount + + var $_scount = 11172; + + // _lcount * _tcount * _vcount + + var $_error = false; + + // See set_parameter() for details of how to change the following settings + // from within your script / application + + var $_api_encoding = 'utf8'; + + // Default input charset is UTF-8 + + var $_allow_overlong = false; + + // Overlong UTF-8 encodings are forbidden + + var $_strict_mode = false; + + // Behave strict or not + // The constructor + + function idna_convert($options = false) + { + $this->slast = $this->_sbase + $this->_lcount * $this->_vcount * $this->_tcount; + + if(function_exists('file_get_contents')) + { + $this->_np_ = unserialize(file_get_contents(dirname(__FILE__) . '/npdata.ser')); + } + else + { + $this->_np_ = unserialize(join('', file(dirname(__FILE__) . '/npdata.ser'))); + } + + // If parameters are given, pass these to the respective method + + if(is_array($options)) + { + return $this->set_parameter($options); + } + + return true; + } + + /** + * Sets a new option value. Available options and values: + * [encoding - Use either UTF-8, UCS4 as array or UCS4 as string as input ('utf8' for UTF-8, + * 'ucs4_string' and 'ucs4_array' respectively for UCS4); The output is always UTF-8] + * [overlong - Unicode does not allow unnecessarily long encodings of chars, + * to allow this, set this parameter to true, else to false; + * default is false.] + * [strict - true: strict mode, good for registration purposes - Causes errors + * on failures; false: loose mode, ideal for "wildlife" applications + * by silently ignoring errors and returning the original input instead + * + * @param mixed Parameter to set (string: single parameter; array of Parameter => Value pairs) + * @param string Value to use (if parameter 1 is a string) + * @return boolean true on success, false otherwise + * @access public + */ + + function set_parameter($option, $value = false) + { + if(!is_array($option)) + { + $option = array( + $option => $value + ); + } + + foreach($option as $k => $v) + { + switch($k) + { + case 'encoding': + + switch($v) + { + case 'utf8': + case 'ucs4_string': + case 'ucs4_array': + $this->_api_encoding = $v; + break; + default: + $this->_error('Set Parameter: Unknown parameter ' . $v . ' for option ' . $k); + return false; + } + + break; + case 'overlong': + $this->_allow_overlong = ($v) ? true : false; + break; + case 'strict': + $this->_strict_mode = ($v) ? true : false; + break; + default: + $this->_error('Set Parameter: Unknown option ' . $k); + return false; + } + } + + return true; + } + + /** + * Decode a given ACE domain name + * @param string Domain name (ACE string) + * [@param string Desired output encoding, see {@link set_parameter}] + * @return string Decoded Domain name (UTF-8 or UCS-4) + * @access public + */ + + function decode($input, $one_time_encoding = false) + { + // Optionally set + + if($one_time_encoding) + { + switch($one_time_encoding) + { + case 'utf8': + case 'ucs4_string': + case 'ucs4_array': + break; + default: + $this->_error('Unknown encoding ' . $one_time_encoding); + return false; + } + } + + // Make sure to drop any newline characters around + + $input = trim($input); + + // Negotiate input and try to determine, wether it is a plain string, + // an email address or something like a complete URL + + if(strpos($input, '@')) + { + // Maybe it is an email address + // No no in strict mode + + if($this->_strict_mode) + { + $this->_error('Only simple domain name parts can be handled in strict mode'); + return false; + } + + list($email_pref, $input) = explode('@', $input, 2); + $arr = explode('.', $input); + foreach($arr as $k => $v) + { + $conv = $this->_decode($v); + + if($conv)$arr[$k] = $conv; + } + + $return = $email_pref . '@' . join('.', $arr); + } + elseif(preg_match('![:\./]!', $input)) + { + // Or a complete domain name (with or without paths / parameters) + // No no in strict mode + + if($this->_strict_mode) + { + $this->_error('Only simple domain name parts can be handled in strict mode'); + return false; + } + + $parsed = parse_url($input); + + if(isset($parsed['host'])) + { + $arr = explode('.', $parsed['host']); + foreach($arr as $k => $v) + { + $conv = $this->_decode($v); + + if($conv)$arr[$k] = $conv; + } + + $parsed['host'] = join('.', $arr); + $return = (empty($parsed['scheme']) ? '' : $parsed['scheme'] . (strtolower($parsed['scheme']) == 'mailto' ? ':' : '://')) . (empty($parsed['user']) ? '' : $parsed['user'] . (empty($parsed['pass']) ? '' : ':' . $parsed['pass']) . '@') . $parsed['host'] . (empty($parsed['port']) ? '' : ':' . $parsed['port']) . $parsed['path'] . (empty($parsed['query']) ? '' : '?' . $parsed['query']) . (empty($parsed['fragment']) ? '' : '#' . $parsed['fragment']); + } + else + { + // parse_url seems to have failed, try without it + + $arr = explode('.', $input); + foreach($arr as $k => $v) + { + $conv = $this->_decode($v); + + if($conv)$arr[$k] = $conv; + } + + $return = join('.', $arr); + } + } + else + { + // Otherwise we consider it being a pure domain name string + + $return = $this->_decode($input); + } + + // The output is UTF-8 by default, other output formats need conversion here + // If one time encoding is given, use this, else the objects property + + switch(($one_time_encoding) ? $one_time_encoding : $this->_api_encoding) + { + case 'utf8': + return $return; + break; + case 'ucs4_string': + return $this->_ucs4_to_ucs4_string($this->_utf8_to_ucs4($return)); + break; + case 'ucs4_array': + return $this->_utf8_to_ucs4($return); + break; + default: + $this->_error('Unsupported output format'); + return false; + } + } + + /** + * Encode a given UTF-8 domain name + * @param string Domain name (UTF-8 or UCS-4) + * [@param string Desired input encoding, see {@link set_parameter}] + * @return string Encoded Domain name (ACE string) + * @access public + */ + + function encode($decoded, $one_time_encoding = false) + { + // Forcing conversion of input to UCS4 array + // If one time encoding is given, use this, else the objects property + + switch(($one_time_encoding) ? $one_time_encoding : $this->_api_encoding) + { + case 'utf8': + $decoded = $this->_utf8_to_ucs4($decoded); + break; + case 'ucs4_string': + $decoded = $this->_ucs4_string_to_ucs4($decoded); + case 'ucs4_array': + break; + default: + + // $this->_error('Unsupported input format: '.$this->_api_encoding); + + $this->_error('Unsupported input format'); + return false; + } + + // No input, no output, what else did you expect? + + if(empty($decoded))return ''; + + // Anchors for iteration + + $last_begin = 0; + + // Output string + + $output = ''; + foreach($decoded as $k => $v) + { + // Make sure to use just the plain dot + + switch($v) + { + case 0x3002: + case 0xFF0E: + case 0xFF61: + $decoded[$k] = 0x2E; + + // It's right, no break here + // The codepoints above have to be converted to dots anyway + // Stumbling across an anchoring character + + + case 0x2E: + case 0x2F: + case 0x3A: + case 0x3F: + case 0x40: + + // Neither email addresses nor URLs allowed in strict mode + + if($this->_strict_mode) + { + $this->_error('Neither email addresses nor URLs are allowed in strict mode.'); + return false; + } + else + { + // Skip first char + + if($k) + { + $encoded = ''; + $encoded = $this->_encode(array_slice($decoded, $last_begin, (($k) - $last_begin))); + + if($encoded) + { + $output.= $encoded; + } + else + { + $output.= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($k) - $last_begin))); + } + + $output.= chr($decoded[$k]); + } + + $last_begin = $k + 1; + } + } + } + + // Catch the rest of the string + + if($last_begin) + { + $inp_len = sizeof($decoded); + $encoded = ''; + $encoded = $this->_encode(array_slice($decoded, $last_begin, (($inp_len) - $last_begin))); + + if($encoded) + { + $output.= $encoded; + } + else + { + $output.= $this->_ucs4_to_utf8(array_slice($decoded, $last_begin, (($inp_len) - $last_begin))); + } + + return $output; + } + else + { + if($output = $this->_encode($decoded)) + { + return $output; + } + else + { + return $this->_ucs4_to_utf8($decoded); + } + } + } + + /** + * Use this method to get the last error ocurred + * @param void + * @return string The last error, that occured + * @access public + */ + + function get_last_error() + { + return $this->_error; + } + + /** + * The actual decoding algorithm + * @access private + */ + + function _decode($encoded) + { + // We do need to find the Punycode prefix + + if(!preg_match('!^' . preg_quote($this->_punycode_prefix, '!') . '!', $encoded)) + { + $this->_error('This is not a punycode string'); + return false; + } + + $encode_test = preg_replace('!^' . preg_quote($this->_punycode_prefix, '!') . '!', '', $encoded); + + // If nothing left after removing the prefix, it is hopeless + + if(!$encode_test) + { + $this->_error('The given encoded string was empty'); + return false; + } + + // Find last occurence of the delimiter + + $delim_pos = strrpos($encoded, '-'); + + if($delim_pos > strlen($this->_punycode_prefix)) + { + for ($k = strlen($this->_punycode_prefix);$k < $delim_pos;++$k) + { + $decoded[] = ord($encoded{$k}); + } + } + else + { + $decoded = array(); + } + + $deco_len = count($decoded); + $enco_len = strlen($encoded); + + // Wandering through the strings; init + + $is_first = true; + $bias = $this->_initial_bias; + $idx = 0; + $char = $this->_initial_n; + for ($enco_idx = ($delim_pos) ? ($delim_pos + 1) : 0;$enco_idx < $enco_len;++$deco_len) + { + for ($old_idx = $idx, $w = 1, $k = $this->_base;1;$k+= $this->_base) + { + $digit = $this->_decode_digit($encoded{$enco_idx++}); + $idx+= $digit * $w; + $t = ($k <= $bias) ? $this->_tmin : (($k >= $bias + $this->_tmax) ? $this->_tmax : ($k - $bias)); + + if($digit < $t)break; + $w = (int)($w * ($this->_base - $t)); + } + + $bias = $this->_adapt($idx - $old_idx, $deco_len + 1, $is_first); + $is_first = false; + $char+= (int)($idx / ($deco_len + 1)); + $idx%= ($deco_len + 1); + + if($deco_len > 0) + { + // Make room for the decoded char + + for ($i = $deco_len;$i > $idx;$i--) + { + $decoded[$i] = $decoded[($i - 1)]; + } + } + + $decoded[$idx++] = $char; + } + + return $this->_ucs4_to_utf8($decoded); + } + + /** + * The actual encoding algorithm + * @access private + */ + + function _encode($decoded) + { + // We cannot encode a domain name containing the Punycode prefix + + $extract = strlen($this->_punycode_prefix); + $check_pref = $this->_utf8_to_ucs4($this->_punycode_prefix); + $check_deco = array_slice($decoded, 0, $extract); + + if($check_pref == $check_deco) + { + $this->_error('This is already a punycode string'); + return false; + } + + // We will not try to encode strings consisting of basic code points only + + $encodable = false; + foreach($decoded as $k => $v) + { + if($v > 0x7a) + { + $encodable = true; + break; + } + } + + if(!$encodable) + { + $this->_error('The given string does not contain encodable chars'); + return false; + } + + // Do NAMEPREP + + $decoded = $this->_nameprep($decoded); + + if(!$decoded + || !is_array($decoded))return false; + + // NAMEPREP failed + + $deco_len = count($decoded); + + if(!$deco_len)return false; + + // Empty array + + $codecount = 0; + + // How many chars have been consumed + + $encoded = ''; + + // Copy all basic code points to output + + for ($i = 0;$i < $deco_len;++$i) + { + $test = $decoded[$i]; + + // Will match [-0-9a-zA-Z] + + if((0x2F < $test && $test < 0x40) + || (0x40 < $test && $test < 0x5B) + || (0x60 < $test && $test <= 0x7B) + || (0x2D == $test)) + { + $encoded.= chr($decoded[$i]); + $codecount++; + } + } + + if($codecount == $deco_len)return $encoded; + + // All codepoints were basic ones + // Start with the prefix; copy it to output + + $encoded = $this->_punycode_prefix . $encoded; + + // If we have basic code points in output, add an hyphen to the end + + if($codecount)$encoded.= '-'; + + // Now find and encode all non-basic code points + + $is_first = true; + $cur_code = $this->_initial_n; + $bias = $this->_initial_bias; + $delta = 0; + + while($codecount < $deco_len) + { + // Find the smallest code point >= the current code point and + // remember the last ouccrence of it in the input + + for ($i = 0, $next_code = $this->_max_ucs;$i < $deco_len;$i++) + { + if($decoded[$i] >= $cur_code + && $decoded[$i] <= $next_code) + { + $next_code = $decoded[$i]; + } + } + + $delta+= ($next_code - $cur_code) * ($codecount + 1); + $cur_code = $next_code; + + // Scan input again and encode all characters whose code point is $cur_code + + for ($i = 0;$i < $deco_len;$i++) + { + if($decoded[$i] < $cur_code) + { + $delta++; + } + elseif($decoded[$i] == $cur_code) + { + for ($q = $delta, $k = $this->_base;1;$k+= $this->_base) + { + $t = ($k <= $bias) ? $this->_tmin : (($k >= $bias + $this->_tmax) ? $this->_tmax : $k - $bias); + + if($q < $t)break; + $encoded.= $this->_encode_digit(ceil($t + (($q - $t) % ($this->_base - $t)))); + $q = (int)(($q - $t) / ($this->_base - $t)); + } + + $encoded.= $this->_encode_digit($q); + $bias = $this->_adapt($delta, $codecount + 1, $is_first); + $codecount++; + $delta = 0; + $is_first = false; + } + } + + $delta++; + $cur_code++; + } + + return $encoded; + } + + /** + * Adapt the bias according to the current code point and position + * @access private + */ + + function _adapt($delta, $npoints, $is_first) + { + $delta = (int)($is_first ? ($delta / $this->_damp) : ($delta / 2)); + $delta+= (int)($delta / $npoints); + for ($k = 0;$delta > (($this->_base - $this->_tmin) * $this->_tmax) / 2;$k+= $this->_base) + { + $delta = (int)($delta / ($this->_base - $this->_tmin)); + } + + return (int)($k + ($this->_base - $this->_tmin + 1) * $delta / ($delta + $this->_skew)); + } + + /** + * Encoding a certain digit + * @access private + */ + + function _encode_digit($d) + { + return chr($d + 22 + 75 * ($d < 26)); + } + + /** + * Decode a certain digit + * @access private + */ + + function _decode_digit($cp) + { + $cp = ord($cp); + return ($cp - 48 < 10) ? $cp - 22 : (($cp - 65 < 26) ? $cp - 65 : (($cp - 97 < 26) ? $cp - 97 : $this->_base)); + } + + /** + * Internal error handling method + * @access private + */ + + function _error($error = '') + { + $this->_error = $error; + } + + /** + * Do Nameprep according to RFC3491 and RFC3454 + * @param array Unicode Characters + * @return string Unicode Characters, Nameprep'd + * @access private + */ + + function _nameprep($input) + { + $output = array(); + $error = false; + + // + // Mapping + // Walking through the input array, performing the required steps on each of + // the input chars and putting the result into the output array + // While mapping required chars we apply the cannonical ordering + // $this->_show_hex($input); + + foreach($input as $v) + { + // Map to nothing == skip that code point + + if(in_array($v, $this->_np_['map_nothing']))continue; + + // Try to find prohibited input + + if(in_array($v, $this->_np_['prohibit']) + || in_array($v, $this->_np_['general_prohibited'])) + { + $this->_error('NAMEPREP: Prohibited input U+' . sprintf('%08X', $v)); + return false; + } + + foreach($this->_np_['prohibit_ranges'] as $range) + { + if($range[0] <= $v + && $v <= $range[1]) + { + $this->_error('NAMEPREP: Prohibited input U+' . sprintf('%08X', $v)); + return false; + } + } + + // + // Hangul syllable decomposition + + if(0xAC00 <= $v + && $v <= 0xD7AF) + { + foreach($this->_hangul_decompose($v) as $out) + { + $output[] = $out; + } + + // There's a decomposition mapping for that code point + } + elseif(isset($this->_np_['replacemaps'][$v])) + { + foreach($this->_apply_cannonical_ordering($this->_np_['replacemaps'][$v]) as $out) + { + $output[] = $out; + } + } + else + { + $output[] = $v; + } + } + + // Before applying any Combining, try to rearrange any Hangul syllables + + $output = $this->_hangul_compose($output); + + // + // Combine code points + // + + $last_class = 0; + $last_starter = 0; + $out_len = count($output); + for ($i = 0;$i < $out_len;++$i) + { + $class = $this->_get_combining_class($output[$i]); + + if((!$last_class || $last_class > $class) + && $class) + { + // Try to match + + $seq_len = $i - $last_starter; + $out = $this->_combine(array_slice($output, $last_starter, $seq_len)); + + // On match: Replace the last starter with the composed character and remove + // the now redundant non-starter(s) + + if($out) + { + $output[$last_starter] = $out; + + if(count($out) != $seq_len) + { + for ($j = $i + 1;$j < $out_len;++$j) + { + $output[$j - 1] = $output[$j]; + } + + unset($output[$out_len]); + } + + // Rewind the for loop by one, since there can be more possible compositions + + $i--; + $out_len--; + $last_class = ($i == $last_starter) ? 0 : $this->_get_combining_class($output[$i - 1]); + continue; + } + } + + if(!$class) + { + // The current class is 0 + + $last_starter = $i; + } + + $last_class = $class; + } + + return $output; + } + + /** + * Decomposes a Hangul syllable + * (see http://www.unicode.org/unicode/reports/tr15/#Hangul + * @param integer 32bit UCS4 code point + * @return array Either Hangul Syllable decomposed or original 32bit value as one value array + * @access private + */ + + function _hangul_decompose($char) + { + $sindex = $char - $this->_sbase; + + if($sindex < 0 + || $sindex >= $this->_scount) + { + return array( + $char + ); + } + + $result = array(); + $T = $this->_tbase + ($sindex % $this->_tcount); + $result[] = (int)($this->_lbase + $sindex / $this->_ncount); + $result[] = (int)$this->_vbase + (($sindex % $this->_ncount) / $this->_tcount); + + if($T != $this->_tbase)$result[] = $T; + return $result; + } + + /** + * Ccomposes a Hangul syllable + * (see http://www.unicode.org/unicode/reports/tr15/#Hangul + * @param array Decomposed UCS4 sequence + * @return array UCS4 sequence with syllables composed + * @access private + */ + + function _hangul_compose($input) + { + $inp_len = count($input); + + if(!$inp_len)return array(); + $result = array(); + $last = $input[0]; + $result[] = $last; + + // copy first char from input to output + + for ($i = 1;$i < $inp_len;++$i) + { + $char = $input[$i]; + + // Find out, wether two current characters from L and V + + $lindex = $last - $this->_lbase; + + if(0 <= $lindex + && $lindex < $this->_lcount) + { + $vindex = $char - $this->_vbase; + + if(0 <= $vindex + && $vindex < $this->_vcount) + { + // create syllable of form LV + + $last = ($this->_sbase + ($lindex * $this->_vcount + $vindex) * $this->_tcount); + $out_off = count($result) - 1; + $result[$out_off] = $last; + + // reset last + + continue; + + // discard char + } + } + + // Find out, wether two current characters are LV and T + + $sindex = $last - $this->_sbase; + + if(0 <= $sindex + && $sindex < $this->_scount + && ($sindex % $this->_tcount) == 0) + { + $tindex = $char - $this->_tbase; + + if(0 <= $tindex + && $tindex <= $this->_tcount) + { + // create syllable of form LVT + + $last+= $tindex; + $out_off = count($result) - 1; + $result[$out_off] = $last; + + // reset last + + continue; + + // discard char + } + } + + // if neither case was true, just add the character + + $last = $char; + $result[] = $char; + } + + return $result; + } + + /** + * Returns the combining class of a certain wide char + * @param integer Wide char to check (32bit integer) + * @return integer Combining class if found, else 0 + * @access private + */ + + function _get_combining_class($char) + { + return isset($this->_np_['norm_combcls'][$char]) ? $this->_np_['norm_combcls'][$char] : 0; + } + + /** + * Apllies the cannonical ordering of a decomposed UCS4 sequence + * @param array Decomposed UCS4 sequence + * @return array Ordered USC4 sequence + * @access private + */ + + function _apply_cannonical_ordering($input) + { + $swap = true; + $size = count($input); + + while($swap) + { + $swap = false; + $last = $this->_get_combining_class($input[0]); + for ($i = 0;$i < $size - 1;++$i) + { + $next = $this->_get_combining_class($input[$i + 1]); + + if($next != 0 + && $last > $next) + { + // Move item leftward until it fits + + for ($j = $i + 1;$j > 0;--$j) + { + if($this->_get_combining_class($input[$j - 1]) <= $next)break; + $t = $input[$j]; + $input[$j] = $input[$j - 1]; + $input[$j - 1] = $t; + $swap = 1; + } + + // Reentering the loop looking at the old character again + + $next = $last; + } + + $last = $next; + } + } + + return $input; + } + + /** + * Do composition of a sequence of starter and non-starter + * @param array UCS4 Decomposed sequence + * @return array Ordered USC4 sequence + * @access private + */ + + function _combine($input) + { + $inp_len = count($input); + foreach($this->_np_['replacemaps'] as $np_src => $np_target) + { + if($np_target[0] != $input[0])continue; + + if(count($np_target) != $inp_len)continue; + $hit = false; + foreach($input as $k2 => $v2) + { + if($v2 == $np_target[$k2]) + { + $hit = true; + } + else + { + $hit = false; + break; + } + } + + if($hit)return $np_src; + } + + return false; + } + + /** + * This converts an UTF-8 encoded string to its UCS-4 representation + * By talking about UCS-4 "strings" we mean arrays of 32bit integers representing + * each of the "chars". This is due to PHP not being able to handle strings with + * bit depth different from 8. This apllies to the reverse method _ucs4_to_utf8(), too. + * The following UTF-8 encodings are supported: + * bytes bits representation + * 1 7 0xxxxxxx + * 2 11 110xxxxx 10xxxxxx + * 3 16 1110xxxx 10xxxxxx 10xxxxxx + * 4 21 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + * 5 26 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx + * 6 31 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx + * Each x represents a bit that can be used to store character data. + * The five and six byte sequences are part of Annex D of ISO/IEC 10646-1:2000 + * @access private + */ + + function _utf8_to_ucs4($input) + { + $output = array(); + $out_len = 0; + $inp_len = strlen($input); + $mode = 'next'; + $test = 'none'; + for ($k = 0;$k < $inp_len;++$k) + { + $v = ord($input{$k}); + + // Extract byte from input string + + if($v < 128) + { + // We found an ASCII char - put into stirng as is + + $output[$out_len] = $v; + ++$out_len; + + if('add' == $mode) + { + $this->_error('Conversion from UTF-8 to UCS-4 failed: malformed input at byte ' . $k); + return false; + } + + continue; + } + + if('next' == $mode) + { + // Try to find the next start byte; determine the width of the Unicode char + + $start_byte = $v; + $mode = 'add'; + $test = 'range'; + + if($v >> 5 == 6) + { + // &110xxxxx 10xxxxx + + $next_byte = 0; + + // Tells, how many times subsequent bitmasks must rotate 6bits to the left + + $v = ($v - 192) << 6; + } + elseif($v >> 4 == 14) + { + // &1110xxxx 10xxxxxx 10xxxxxx + + $next_byte = 1; + $v = ($v - 224) << 12; + } + elseif($v >> 3 == 30) + { + // &11110xxx 10xxxxxx 10xxxxxx 10xxxxxx + + $next_byte = 2; + $v = ($v - 240) << 18; + } + elseif($v >> 2 == 62) + { + // &111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx + + $next_byte = 3; + $v = ($v - 248) << 24; + } + elseif($v >> 1 == 126) + { + // &1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx + + $next_byte = 4; + $v = ($v - 252) << 30; + } + else + { + $this->_error('This might be UTF-8, but I don\'t understand it at byte ' . $k); + return false; + } + + if('add' == $mode) + { + $output[$out_len] = (int)$v; + ++$out_len; + continue; + } + } + + if('add' == $mode) + { + if(!$this->_allow_overlong + && $test == 'range') + { + $test = 'none'; + + if(($v < 0xA0 && $start_byte == 0xE0) + || ($v < 0x90 && $start_byte == 0xF0) + || ($v > 0x8F && $start_byte == 0xF4)) + { + $this->_error('Bogus UTF-8 character detected (out of legal range) at byte ' . $k); + return false; + } + } + + if($v >> 6 == 2) + { + // Bit mask must be 10xxxxxx + + $v = ($v - 128) << ($next_byte * 6); + $output[($out_len - 1)]+= $v; + --$next_byte; + } + else + { + $this->_error('Conversion from UTF-8 to UCS-4 failed: malformed input at byte ' . $k); + return false; + } + + if($next_byte < 0) + { + $mode = 'next'; + } + } + } + + // for + + return $output; + } + + /** + * Convert UCS-4 string into UTF-8 string + * See _utf8_to_ucs4() for details + * @access private + */ + + function _ucs4_to_utf8($input) + { + $output = ''; + $k = 0; + foreach($input as $v) + { + ++$k; + + // $v = ord($v); + + if($v < 128) + { + // 7bit are transferred literally + + $output.= chr($v); + } + elseif($v < (1 << 11)) + { + // 2 bytes + + $output.= chr(192 + ($v >> 6)) . chr(128 + ($v & 63)); + } + elseif($v < (1 << 16)) + { + // 3 bytes + + $output.= chr(224 + ($v >> 12)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63)); + } + elseif($v < (1 << 21)) + { + // 4 bytes + + $output.= chr(240 + ($v >> 18)) . chr(128 + (($v >> 12) & 63)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63)); + } + elseif($v < (1 << 26)) + { + // 5 bytes + + $output.= chr(248 + ($v >> 24)) . chr(128 + (($v >> 18) & 63)) . chr(128 + (($v >> 12) & 63)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63)); + } + elseif($v < (1 << 31)) + { + // 6 bytes + + $output.= chr(252 + ($v >> 30)) . chr(128 + (($v >> 24) & 63)) . chr(128 + (($v >> 18) & 63)) . chr(128 + (($v >> 12) & 63)) . chr(128 + (($v >> 6) & 63)) . chr(128 + ($v & 63)); + } + else + { + $this->_error('Conversion from UCS-4 to UTF-8 failed: malformed input at byte ' . $k); + return false; + } + } + + return $output; + } + + /** + * Convert UCS-4 array into UCS-4 string + * + * @access private + */ + + function _ucs4_to_ucs4_string($input) + { + $output = ''; + + // Take array values and split output to 4 bytes per value + // The bit mask is 255, which reads &11111111 + + foreach($input as $v) + { + $output.= chr(($v >> 24) & 255) . chr(($v >> 16) & 255) . chr(($v >> 8) & 255) . chr($v & 255); + } + + return $output; + } + + /** + * Convert UCS-4 strin into UCS-4 garray + * + * @access private + */ + + function _ucs4_string_to_ucs4($input) + { + $output = array(); + $inp_len = strlen($input); + + // Input length must be dividable by 4 + + if($inp_len % 4) + { + $this->_error('Input UCS4 string is broken'); + return false; + } + + // Empty input - return empty output + + if(!$inp_len)return $output; + for ($i = 0, $out_len = - 1;$i < $inp_len;++$i) + { + // Increment output position every 4 input bytes + + if(!($i % 4)) + { + $out_len++; + $output[$out_len] = 0; + } + + $output[$out_len]+= ord($input{$i}) << (8 * (3 - ($i % 4))); + } + + return $output; + } +} + +/** + * Adapter class for aligning the API of idna_convert with that of Net_IDNA + * @author Matthias Sommerfeld + */ + +class Net_IDNA_php4 extends idna_convert +{ + /** + * Sets a new option value. Available options and values: + * [encoding - Use either UTF-8, UCS4 as array or UCS4 as string as input ('utf8' for UTF-8, + * 'ucs4_string' and 'ucs4_array' respectively for UCS4); The output is always UTF-8] + * [overlong - Unicode does not allow unnecessarily long encodings of chars, + * to allow this, set this parameter to true, else to false; + * default is false.] + * [strict - true: strict mode, good for registration purposes - Causes errors + * on failures; false: loose mode, ideal for "wildlife" applications + * by silently ignoring errors and returning the original input instead + * + * @param mixed Parameter to set (string: single parameter; array of Parameter => Value pairs) + * @param string Value to use (if parameter 1 is a string) + * @return boolean true on success, false otherwise + * @access public + */ + + function setParams($option, $param = false) + { + return $this->IC->set_parameters($option, $param); + } +} + ?> \ No newline at end of file diff --git a/lib/classes/idna/class.idna_convert_wrapper.php b/lib/classes/idna/class.idna_convert_wrapper.php index 6ee9e3b6..e6ac87ca 100644 --- a/lib/classes/idna/class.idna_convert_wrapper.php +++ b/lib/classes/idna/class.idna_convert_wrapper.php @@ -1,145 +1,145 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Classes - * @version $Id$ - */ - -/** - * Class for wrapping a specific idna conversion class and offering a standard interface - * @package Functions - */ - -class idna_convert_wrapper -{ - /** - * idna converter we use - * @var object - */ - - var $idna_converter; - - /** - * Class constructor. Creates a new idna converter - */ - - function idna_convert_wrapper() - { - $this->idna_converter = new idna_convert(); - } - - /** - * Encode a domain name, a email address or a list of one of both. - * - * @param string May be either a single domain name, e single email address or a list of one - * seperated either by ',', ';' or ' '. - * - * @return string Returns either a single domain name, a single email address or a list of one of - * both seperated by the same string as the input. - */ - - function encode($to_encode) - { - return $this->_do_action('encode', $to_encode); - } - - /** - * Decode a domain name, a email address or a list of one of both. - * - * @param string May be either a single domain name, e single email address or a list of one - * seperated either by ',', ';' or ' '. - * - * @return string Returns either a single domain name, a single email address or a list of one of - * both seperated by the same string as the input. - */ - - function decode($to_decode) - { - return $this->_do_action('decode', $to_decode); - } - - /** - * Do the real de- or encoding. First checks if a list is submitted and seperates it. Afterwards sends - * each entry to the idna converter to do the converting. - * - * @param string May be either 'decode' or 'encode'. - * @param string The string to de- or endcode. - * - * @return string The input string after being processed. - */ - - function _do_action($action, $string) - { - $string = trim($string); - - if(strpos($string, ',') !== false) - { - $strings = explode(',', $string); - $sepchar = ','; - } - elseif(strpos($string, ';') !== false) - { - $strings = explode(';', $string); - $sepchar = ';'; - } - elseif(strpos($string, ' ') !== false) - { - $strings = explode(' ', $string); - $sepchar = ' '; - } - else - { - $strings = array( - $string - ); - $sepchar = ''; - } - - for ($i = 0;$i < count($strings);$i++) - { - if(strpos($strings[$i], '@') !== false) - { - $split = explode('@', $strings[$i]); - $localpart = $split[0]; - $domain = $split[1]; - $email = true; - } - else - { - $domain = $strings[$i]; - $email = false; - } - - if(strlen($domain) !== 0) - { - $domain = utf8_decode($this->idna_converter->$action(utf8_encode($domain . '.none'))); - $domain = substr($domain, 0, strlen($domain) - 5); - } - - if($email) - { - $strings[$i] = $localpart . '@' . $domain; - } - else - { - $strings[$i] = $domain; - } - } - - return implode($sepchar, $strings); - } -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Classes + * @version $Id$ + */ + +/** + * Class for wrapping a specific idna conversion class and offering a standard interface + * @package Functions + */ + +class idna_convert_wrapper +{ + /** + * idna converter we use + * @var object + */ + + var $idna_converter; + + /** + * Class constructor. Creates a new idna converter + */ + + function idna_convert_wrapper() + { + $this->idna_converter = new idna_convert(); + } + + /** + * Encode a domain name, a email address or a list of one of both. + * + * @param string May be either a single domain name, e single email address or a list of one + * seperated either by ',', ';' or ' '. + * + * @return string Returns either a single domain name, a single email address or a list of one of + * both seperated by the same string as the input. + */ + + function encode($to_encode) + { + return $this->_do_action('encode', $to_encode); + } + + /** + * Decode a domain name, a email address or a list of one of both. + * + * @param string May be either a single domain name, e single email address or a list of one + * seperated either by ',', ';' or ' '. + * + * @return string Returns either a single domain name, a single email address or a list of one of + * both seperated by the same string as the input. + */ + + function decode($to_decode) + { + return $this->_do_action('decode', $to_decode); + } + + /** + * Do the real de- or encoding. First checks if a list is submitted and seperates it. Afterwards sends + * each entry to the idna converter to do the converting. + * + * @param string May be either 'decode' or 'encode'. + * @param string The string to de- or endcode. + * + * @return string The input string after being processed. + */ + + function _do_action($action, $string) + { + $string = trim($string); + + if(strpos($string, ',') !== false) + { + $strings = explode(',', $string); + $sepchar = ','; + } + elseif(strpos($string, ';') !== false) + { + $strings = explode(';', $string); + $sepchar = ';'; + } + elseif(strpos($string, ' ') !== false) + { + $strings = explode(' ', $string); + $sepchar = ' '; + } + else + { + $strings = array( + $string + ); + $sepchar = ''; + } + + for ($i = 0;$i < count($strings);$i++) + { + if(strpos($strings[$i], '@') !== false) + { + $split = explode('@', $strings[$i]); + $localpart = $split[0]; + $domain = $split[1]; + $email = true; + } + else + { + $domain = $strings[$i]; + $email = false; + } + + if(strlen($domain) !== 0) + { + $domain = utf8_decode($this->idna_converter->$action(utf8_encode($domain . '.none'))); + $domain = substr($domain, 0, strlen($domain) - 5); + } + + if($email) + { + $strings[$i] = $localpart . '@' . $domain; + } + else + { + $strings[$i] = $domain; + } + } + + return implode($sepchar, $strings); + } +} + +?> diff --git a/lib/classes/logger/abstract.AbstractLogger.php b/lib/classes/logger/abstract.AbstractLogger.php index dfa6eb41..93daa5b1 100644 --- a/lib/classes/logger/abstract.AbstractLogger.php +++ b/lib/classes/logger/abstract.AbstractLogger.php @@ -1,100 +1,100 @@ - - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Logger - * @version $Id$ - * @link http://www.nutime.de/ - * - * Logger - Abstract-Logger-Class - */ - -/* We're using the syslog constants for all the loggers (partly implemented) - -LOG_EMERG system is unusable -LOG_ALERT action must be taken immediately -LOG_CRIT critical conditions -LOG_ERR error conditions -LOG_WARNING warning conditions -LOG_NOTICE normal, but significant, condition -LOG_INFO informational message -LOG_DEBUG debug-level message - -*/ - -abstract class AbstractLogger -{ - /** - * Settings array - * @var settings - */ - - private $settings = array(); - - /** - * Enable/Disable Logging - * @var logenabled - */ - - private $logenabled = false; - - /** - * Enable/Disable Cronjob-Logging - * @var logcronjob - */ - - private $logcronjob = false; - - /** - * Loggin-Severity - * @var severity - */ - - private $severity = 1; - - // normal - - /** - * setup the main logger - * - * @param array settings - */ - - protected function setupLogger($settings) - { - $this->settings = $settings; - $this->logenabled = $this->settings['logger']['enabled']; - $this->logcronjob = $this->settings['logger']['log_cron']; - $this->severity = $this->settings['logger']['severity']; - } - - protected function isEnabled() - { - return $this->logenabled; - } - - protected function getSeverity() - { - return $this->severity; - } - - protected function logCron() - { - return $this->logcronjob; - } - - abstract public function logAction(); -} - + + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Logger + * @version $Id$ + * @link http://www.nutime.de/ + * + * Logger - Abstract-Logger-Class + */ + +/* We're using the syslog constants for all the loggers (partly implemented) + +LOG_EMERG system is unusable +LOG_ALERT action must be taken immediately +LOG_CRIT critical conditions +LOG_ERR error conditions +LOG_WARNING warning conditions +LOG_NOTICE normal, but significant, condition +LOG_INFO informational message +LOG_DEBUG debug-level message + +*/ + +abstract class AbstractLogger +{ + /** + * Settings array + * @var settings + */ + + private $settings = array(); + + /** + * Enable/Disable Logging + * @var logenabled + */ + + private $logenabled = false; + + /** + * Enable/Disable Cronjob-Logging + * @var logcronjob + */ + + private $logcronjob = false; + + /** + * Loggin-Severity + * @var severity + */ + + private $severity = 1; + + // normal + + /** + * setup the main logger + * + * @param array settings + */ + + protected function setupLogger($settings) + { + $this->settings = $settings; + $this->logenabled = $this->settings['logger']['enabled']; + $this->logcronjob = $this->settings['logger']['log_cron']; + $this->severity = $this->settings['logger']['severity']; + } + + protected function isEnabled() + { + return $this->logenabled; + } + + protected function getSeverity() + { + return $this->severity; + } + + protected function logCron() + { + return $this->logcronjob; + } + + abstract public function logAction(); +} + ?> \ No newline at end of file diff --git a/lib/classes/logger/class.FileLogger.php b/lib/classes/logger/class.FileLogger.php index ac0671e9..a86f64ad 100644 --- a/lib/classes/logger/class.FileLogger.php +++ b/lib/classes/logger/class.FileLogger.php @@ -1,188 +1,188 @@ - - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Logger - * @version $Id$ - * @link http://www.nutime.de/ - * - * Logger - File-Logger-Class - */ - -class FileLogger extends AbstractLogger -{ - /** - * Userinfo - * @var array - */ - - private $userinfo = array(); - - /** - * Logfile - * @var logfile - */ - - private $logfile = null; - - /** - * Syslogger Objects Array - * @var loggers - */ - - static private $loggers = array(); - - /** - * Class constructor. - * - * @param array userinfo - * @param array settings - */ - - protected function __construct($userinfo, $settings) - { - parent::setupLogger($settings); - $this->userinfo = $userinfo; - $this->setLogFile($settings['logger']['logfile']); - } - - /** - * Singleton ftw ;-) - * - */ - - static public function getInstanceOf($_usernfo, $_settings) - { - if(!isset(self::$loggers[$_usernfo['loginname']])) - { - self::$loggers[$_usernfo['loginname']] = new FileLogger($_usernfo, $_settings); - } - - return self::$loggers[$_usernfo['loginname']]; - } - - public function logAction($action = USR_ACTION, $type = LOG_NOTICE, $text = null) - { - if(parent::isEnabled()) - { - if(parent::getSeverity() <= 1 - && $type == LOG_NOTICE) - { - return; - } - - $_action = 'unknown'; - - switch($action) - { - case USR_ACTION: - $_action = 'customer'; - break; - case RES_ACTION: - $_action = 'reseller'; - break; - case ADM_ACTION: - $_action = 'administrator'; - break; - case CRON_ACTION: - $_action = 'cronjob'; - break; - case LOG_ERROR: - $_action = 'internal'; - break; - default: - $_action = 'unknown'; - break; - } - - $_type = 'unknown'; - - switch($type) - { - case LOG_INFO: - $_type = 'information'; - break; - case LOG_NOTICE: - $_type = 'notice'; - break; - case LOG_WARNING: - $_type = 'warning'; - break; - case LOG_ERR: - $_type = 'error'; - break; - case LOG_CRIT: - $_type = 'critical'; - break; - default: - $_type = 'unknown'; - break; - } - - if(!isset($this->userinfo['loginname']) - || $this->userinfo['loginname'] == '') - { - $name = 'unknown'; - } - else - { - $name = " (" . $this->userinfo['loginname'] . ")"; - } - - $fp = @fopen($this->logfile, 'a'); - - if($fp !== false) - { - $now = time(); - - if($text != null - && $text != '') - { - fwrite($fp, date("d.m.Y H:i:s", $now) . " [" . $_type . "] [" . $_action . "-action" . $name . "] " . $text . "\n"); - } - else - { - fwrite($fp, date("d.m.Y H:i:s", $now) . " [" . $_type . "] [" . $_action . "-action" . $name . "] No text given!!! Check scripts!\n"); - } - - fclose($fp); - } - else - { - if($this->logfile != null - || $this->logfile != '') - { - throw new Exception("Cannot open logfile '" . $this->logfile . "' for writing!"); - } - } - } - } - - private function setLogFile($filename = null) - { - if($filename != null - && $filename != '' - && $filename != "." - && $filename != ".." - && !is_dir($filename)) - { - $this->logfile = $filename; - return true; - } - - return false; - } -} - -?> + + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Logger + * @version $Id$ + * @link http://www.nutime.de/ + * + * Logger - File-Logger-Class + */ + +class FileLogger extends AbstractLogger +{ + /** + * Userinfo + * @var array + */ + + private $userinfo = array(); + + /** + * Logfile + * @var logfile + */ + + private $logfile = null; + + /** + * Syslogger Objects Array + * @var loggers + */ + + static private $loggers = array(); + + /** + * Class constructor. + * + * @param array userinfo + * @param array settings + */ + + protected function __construct($userinfo, $settings) + { + parent::setupLogger($settings); + $this->userinfo = $userinfo; + $this->setLogFile($settings['logger']['logfile']); + } + + /** + * Singleton ftw ;-) + * + */ + + static public function getInstanceOf($_usernfo, $_settings) + { + if(!isset(self::$loggers[$_usernfo['loginname']])) + { + self::$loggers[$_usernfo['loginname']] = new FileLogger($_usernfo, $_settings); + } + + return self::$loggers[$_usernfo['loginname']]; + } + + public function logAction($action = USR_ACTION, $type = LOG_NOTICE, $text = null) + { + if(parent::isEnabled()) + { + if(parent::getSeverity() <= 1 + && $type == LOG_NOTICE) + { + return; + } + + $_action = 'unknown'; + + switch($action) + { + case USR_ACTION: + $_action = 'customer'; + break; + case RES_ACTION: + $_action = 'reseller'; + break; + case ADM_ACTION: + $_action = 'administrator'; + break; + case CRON_ACTION: + $_action = 'cronjob'; + break; + case LOG_ERROR: + $_action = 'internal'; + break; + default: + $_action = 'unknown'; + break; + } + + $_type = 'unknown'; + + switch($type) + { + case LOG_INFO: + $_type = 'information'; + break; + case LOG_NOTICE: + $_type = 'notice'; + break; + case LOG_WARNING: + $_type = 'warning'; + break; + case LOG_ERR: + $_type = 'error'; + break; + case LOG_CRIT: + $_type = 'critical'; + break; + default: + $_type = 'unknown'; + break; + } + + if(!isset($this->userinfo['loginname']) + || $this->userinfo['loginname'] == '') + { + $name = 'unknown'; + } + else + { + $name = " (" . $this->userinfo['loginname'] . ")"; + } + + $fp = @fopen($this->logfile, 'a'); + + if($fp !== false) + { + $now = time(); + + if($text != null + && $text != '') + { + fwrite($fp, date("d.m.Y H:i:s", $now) . " [" . $_type . "] [" . $_action . "-action" . $name . "] " . $text . "\n"); + } + else + { + fwrite($fp, date("d.m.Y H:i:s", $now) . " [" . $_type . "] [" . $_action . "-action" . $name . "] No text given!!! Check scripts!\n"); + } + + fclose($fp); + } + else + { + if($this->logfile != null + || $this->logfile != '') + { + throw new Exception("Cannot open logfile '" . $this->logfile . "' for writing!"); + } + } + } + } + + private function setLogFile($filename = null) + { + if($filename != null + && $filename != '' + && $filename != "." + && $filename != ".." + && !is_dir($filename)) + { + $this->logfile = $filename; + return true; + } + + return false; + } +} + +?> diff --git a/lib/classes/logger/class.FroxlorLogger.php b/lib/classes/logger/class.FroxlorLogger.php index 917710cd..a3156346 100644 --- a/lib/classes/logger/class.FroxlorLogger.php +++ b/lib/classes/logger/class.FroxlorLogger.php @@ -1,205 +1,205 @@ - - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Logger - * @version $Id$ - * @link http://www.nutime.de/ - * - * Logger - Froxlor-Base-Logger-Class - */ - -class FroxlorLogger -{ - /** - * Userinfo - * @var array - */ - - private $userinfo = array(); - - /** - * Database handler - * @var db - */ - - private $db = false; - - /** - * Settings array - * @var settings - */ - - private $settings = array(); - - /** - * LogTypes Array - * @var logtypes - */ - - static private $logtypes = null; - - /** - * Logger-Object-Array - * @var loggers - */ - - static private $loggers = null; - - /** - * Class constructor. - * - * @param array userinfo - * @param array settings - */ - - protected function __construct($userinfo, $db, $settings) - { - $this->userinfo = $userinfo; - $this->db = $db; - $this->settings = $settings; - self::$logtypes = array(); - - if(!isset($this->settings['logger']['logtypes']) - && (!isset($this->settings['logger']['logtypes']) || $this->settings['logger']['logtypes'] == '') - && isset($this->settings['logger']['enabled']) - && $this->settings['logger']['enabled']) - { - self::$logtypes[0] = 'syslog'; - self::$logtypes[1] = 'mysql'; - } - else - { - if(isset($this->settings['logger']['logtypes']) - && $this->settings['logger']['logtypes'] != '') - { - self::$logtypes = explode(',', $this->settings['logger']['logtypes']); - } - else - { - self::$logtypes = null; - } - } - } - - /** - * Singleton ftw ;-) - * - */ - - static public function getInstanceOf($_usernfo, $_db, $_settings) - { - if(!isset($_usernfo) - || $_usernfo == null) - { - $_usernfo = array(); - $_usernfo['loginname'] = 'unknown'; - } - - if(!isset(self::$loggers[$_usernfo['loginname']])) - { - self::$loggers[$_usernfo['loginname']] = new FroxlorLogger($_usernfo, $_db, $_settings); - } - - return self::$loggers[$_usernfo['loginname']]; - } - - public function logAction($action = USR_ACTION, $type = LOG_NOTICE, $text = null) - { - if(self::$logtypes == null) - { - return; - } - - if($this->settings['logger']['log_cron'] == '0' - && $action == CRON_ACTION) - { - return; - } - - foreach(self::$logtypes as $logger) - { - switch($logger) - { - case 'syslog': - $_log = SysLogger::getInstanceOf($this->userinfo, $this->settings); - break; - case 'file': - try - { - $_log = FileLogger::getInstanceOf($this->userinfo, $this->settings); - } - - catch(Exception $e) - { - if($action != CRON_ACTION) - { - standard_error('logerror', $e->getMessage()); - } - else - { - echo "Log-Error: " . $e->getMessage(); - } - } - - break; - case 'mysql': - $_log = MysqlLogger::getInstanceOf($this->userinfo, $this->settings, $this->db); - break; - default: - $_log = null; - break; - } - - if($_log != null) - { - try - { - $_log->logAction($action, $type, $text); - } - - catch(Exception $e) - { - if($action != CRON_ACTION) - { - standard_error('logerror', $e->getMessage()); - } - else - { - echo "Log-Error: " . $e->getMessage(); - } - } - } - } - } - - public function setCronLog($_cronlog = 0) - { - $_cronlog = (int)$_cronlog; - - if($_cronlog != 0 - && $_cronlog != 1) - { - $_cronlog = 0; - } - - $this->db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` - SET `value`='" . $this->db->escape($_cronlog) . "' - WHERE `settinggroup`='logger' - AND `varname`='log_cron'"); - return true; - } -} - -?> + + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Logger + * @version $Id$ + * @link http://www.nutime.de/ + * + * Logger - Froxlor-Base-Logger-Class + */ + +class FroxlorLogger +{ + /** + * Userinfo + * @var array + */ + + private $userinfo = array(); + + /** + * Database handler + * @var db + */ + + private $db = false; + + /** + * Settings array + * @var settings + */ + + private $settings = array(); + + /** + * LogTypes Array + * @var logtypes + */ + + static private $logtypes = null; + + /** + * Logger-Object-Array + * @var loggers + */ + + static private $loggers = null; + + /** + * Class constructor. + * + * @param array userinfo + * @param array settings + */ + + protected function __construct($userinfo, $db, $settings) + { + $this->userinfo = $userinfo; + $this->db = $db; + $this->settings = $settings; + self::$logtypes = array(); + + if(!isset($this->settings['logger']['logtypes']) + && (!isset($this->settings['logger']['logtypes']) || $this->settings['logger']['logtypes'] == '') + && isset($this->settings['logger']['enabled']) + && $this->settings['logger']['enabled']) + { + self::$logtypes[0] = 'syslog'; + self::$logtypes[1] = 'mysql'; + } + else + { + if(isset($this->settings['logger']['logtypes']) + && $this->settings['logger']['logtypes'] != '') + { + self::$logtypes = explode(',', $this->settings['logger']['logtypes']); + } + else + { + self::$logtypes = null; + } + } + } + + /** + * Singleton ftw ;-) + * + */ + + static public function getInstanceOf($_usernfo, $_db, $_settings) + { + if(!isset($_usernfo) + || $_usernfo == null) + { + $_usernfo = array(); + $_usernfo['loginname'] = 'unknown'; + } + + if(!isset(self::$loggers[$_usernfo['loginname']])) + { + self::$loggers[$_usernfo['loginname']] = new FroxlorLogger($_usernfo, $_db, $_settings); + } + + return self::$loggers[$_usernfo['loginname']]; + } + + public function logAction($action = USR_ACTION, $type = LOG_NOTICE, $text = null) + { + if(self::$logtypes == null) + { + return; + } + + if($this->settings['logger']['log_cron'] == '0' + && $action == CRON_ACTION) + { + return; + } + + foreach(self::$logtypes as $logger) + { + switch($logger) + { + case 'syslog': + $_log = SysLogger::getInstanceOf($this->userinfo, $this->settings); + break; + case 'file': + try + { + $_log = FileLogger::getInstanceOf($this->userinfo, $this->settings); + } + + catch(Exception $e) + { + if($action != CRON_ACTION) + { + standard_error('logerror', $e->getMessage()); + } + else + { + echo "Log-Error: " . $e->getMessage(); + } + } + + break; + case 'mysql': + $_log = MysqlLogger::getInstanceOf($this->userinfo, $this->settings, $this->db); + break; + default: + $_log = null; + break; + } + + if($_log != null) + { + try + { + $_log->logAction($action, $type, $text); + } + + catch(Exception $e) + { + if($action != CRON_ACTION) + { + standard_error('logerror', $e->getMessage()); + } + else + { + echo "Log-Error: " . $e->getMessage(); + } + } + } + } + } + + public function setCronLog($_cronlog = 0) + { + $_cronlog = (int)$_cronlog; + + if($_cronlog != 0 + && $_cronlog != 1) + { + $_cronlog = 0; + } + + $this->db->query("UPDATE `" . TABLE_PANEL_SETTINGS . "` + SET `value`='" . $this->db->escape($_cronlog) . "' + WHERE `settinggroup`='logger' + AND `varname`='log_cron'"); + return true; + } +} + +?> diff --git a/lib/classes/logger/class.MysqlLogger.php b/lib/classes/logger/class.MysqlLogger.php index aa83b182..e68d3a3d 100644 --- a/lib/classes/logger/class.MysqlLogger.php +++ b/lib/classes/logger/class.MysqlLogger.php @@ -1,113 +1,113 @@ - - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Logger - * @version $Id$ - * @link http://www.nutime.de/ - * - * Logger - MySQL-Logger-Class - */ - -class MysqlLogger extends AbstractLogger -{ - /** - * Userinfo - * @var array - */ - - private $userinfo = array(); - - /** - * Database handler - * @var db - */ - - private $db = false; - - /** - * Syslogger Objects Array - * @var loggers - */ - - static private $loggers = array(); - - /** - * Class constructor. - * - * @param array userinfo - * @param array settings - * @param resource database - */ - - protected function __construct($userinfo, $settings, $db) - { - parent::setupLogger($settings); - $this->userinfo = $userinfo; - $this->db = $db; - } - - /** - * Singleton ftw ;-) - * - */ - - static public function getInstanceOf($_usernfo, $_settings, $_db) - { - if(!isset(self::$loggers[$_usernfo['loginname']])) - { - self::$loggers[$_usernfo['loginname']] = new MysqlLogger($_usernfo, $_settings, $_db); - } - - return self::$loggers[$_usernfo['loginname']]; - } - - public function logAction($action = USR_ACTION, $type = LOG_NOTICE, $text = null) - { - if(parent::isEnabled()) - { - if(parent::getSeverity() <= 1 - && $type == LOG_NOTICE) - { - return; - } - - if(!isset($this->userinfo['loginname']) - || $this->userinfo['loginname'] == '') - { - $name = 'unknown'; - } - else - { - $name = " (" . $this->userinfo['loginname'] . ")"; - } - - $now = time(); - - if($text != null - && $text != '') - { - $this->db->query("INSERT INTO `panel_syslog` (`type`, `date`, `action`, `user`, `text`) - VALUES ('" . (int)$type . "', '" . $now . "', '" . (int)$action . "', '" . $this->db->escape($name) . "', '" . $this->db->escape($text) . "')"); - } - else - { - $this->db->query("INSERT INTO `panel_syslog` (`type`, `date`, `action`, `userid`, `text`) - VALUES ('" . (int)$type . "', '" . $now . "', '" . (int)$action . "', '" . $this->db->escape($name) . "', 'No text given!!! Check scripts!')"); - } - } - } -} - -?> + + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Logger + * @version $Id$ + * @link http://www.nutime.de/ + * + * Logger - MySQL-Logger-Class + */ + +class MysqlLogger extends AbstractLogger +{ + /** + * Userinfo + * @var array + */ + + private $userinfo = array(); + + /** + * Database handler + * @var db + */ + + private $db = false; + + /** + * Syslogger Objects Array + * @var loggers + */ + + static private $loggers = array(); + + /** + * Class constructor. + * + * @param array userinfo + * @param array settings + * @param resource database + */ + + protected function __construct($userinfo, $settings, $db) + { + parent::setupLogger($settings); + $this->userinfo = $userinfo; + $this->db = $db; + } + + /** + * Singleton ftw ;-) + * + */ + + static public function getInstanceOf($_usernfo, $_settings, $_db) + { + if(!isset(self::$loggers[$_usernfo['loginname']])) + { + self::$loggers[$_usernfo['loginname']] = new MysqlLogger($_usernfo, $_settings, $_db); + } + + return self::$loggers[$_usernfo['loginname']]; + } + + public function logAction($action = USR_ACTION, $type = LOG_NOTICE, $text = null) + { + if(parent::isEnabled()) + { + if(parent::getSeverity() <= 1 + && $type == LOG_NOTICE) + { + return; + } + + if(!isset($this->userinfo['loginname']) + || $this->userinfo['loginname'] == '') + { + $name = 'unknown'; + } + else + { + $name = " (" . $this->userinfo['loginname'] . ")"; + } + + $now = time(); + + if($text != null + && $text != '') + { + $this->db->query("INSERT INTO `panel_syslog` (`type`, `date`, `action`, `user`, `text`) + VALUES ('" . (int)$type . "', '" . $now . "', '" . (int)$action . "', '" . $this->db->escape($name) . "', '" . $this->db->escape($text) . "')"); + } + else + { + $this->db->query("INSERT INTO `panel_syslog` (`type`, `date`, `action`, `userid`, `text`) + VALUES ('" . (int)$type . "', '" . $now . "', '" . (int)$action . "', '" . $this->db->escape($name) . "', 'No text given!!! Check scripts!')"); + } + } + } +} + +?> diff --git a/lib/classes/logger/class.SysLogger.php b/lib/classes/logger/class.SysLogger.php index b2cadb3f..ec0307f7 100644 --- a/lib/classes/logger/class.SysLogger.php +++ b/lib/classes/logger/class.SysLogger.php @@ -1,128 +1,128 @@ - - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Logger - * @version $Id$ - * @link http://www.nutime.de/ - * - * Logger - SysLog-Logger-Class - */ - -class SysLogger extends AbstractLogger -{ - /** - * Userinfo - * @var array - */ - - private $userinfo = array(); - - /** - * Syslogger Objects Array - * @var loggers - */ - - static private $loggers = array(); - - /** - * Class constructor. - * - * @param array userinfo - * @param array settings - */ - - protected function __construct($userinfo, $settings) - { - parent::setupLogger($settings); - $this->userinfo = $userinfo; - } - - /** - * Singleton ftw ;-) - * - */ - - static public function getInstanceOf($_usernfo, $_settings) - { - if(!isset(self::$loggers[$_usernfo['loginname']])) - { - self::$loggers[$_usernfo['loginname']] = new SysLogger($_usernfo, $_settings); - } - - return self::$loggers[$_usernfo['loginname']]; - } - - public function logAction($action = USR_ACTION, $type = LOG_NOTICE, $text = null) - { - if(parent::isEnabled()) - { - if(parent::getSeverity() <= 1 - && $type == LOG_NOTICE) - { - return; - } - - $_action = 'unknown'; - - switch($action) - { - case USR_ACTION: - $_action = 'customer'; - break; - case RES_ACTION: - $_action = 'reseller'; - break; - case ADM_ACTION: - $_action = 'administrator'; - break; - case CRON_ACTION: - $_action = 'cronjob'; - break; - case LOG_ERROR: - $_action = 'internal'; - break; - default: - $_action = 'unknown'; - break; - } - - if(!isset($this->userinfo['loginname']) - || $this->userinfo['loginname'] == '') - { - $name = 'unknown'; - } - else - { - $name = " (" . $this->userinfo['loginname'] . ")"; - } - - openlog("Froxlor", LOG_NDELAY, LOG_USER); - - if($text != null - && $text != '') - { - syslog((int)$type, "[" . ucfirst($_action) . " Action" . $name . "] " . $text); - } - else - { - syslog((int)$type, "[" . ucfirst($_action) . " Action" . $name . "] No text given!!! Check scripts!"); - } - - closelog(); - } - } -} - -?> + + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Logger + * @version $Id$ + * @link http://www.nutime.de/ + * + * Logger - SysLog-Logger-Class + */ + +class SysLogger extends AbstractLogger +{ + /** + * Userinfo + * @var array + */ + + private $userinfo = array(); + + /** + * Syslogger Objects Array + * @var loggers + */ + + static private $loggers = array(); + + /** + * Class constructor. + * + * @param array userinfo + * @param array settings + */ + + protected function __construct($userinfo, $settings) + { + parent::setupLogger($settings); + $this->userinfo = $userinfo; + } + + /** + * Singleton ftw ;-) + * + */ + + static public function getInstanceOf($_usernfo, $_settings) + { + if(!isset(self::$loggers[$_usernfo['loginname']])) + { + self::$loggers[$_usernfo['loginname']] = new SysLogger($_usernfo, $_settings); + } + + return self::$loggers[$_usernfo['loginname']]; + } + + public function logAction($action = USR_ACTION, $type = LOG_NOTICE, $text = null) + { + if(parent::isEnabled()) + { + if(parent::getSeverity() <= 1 + && $type == LOG_NOTICE) + { + return; + } + + $_action = 'unknown'; + + switch($action) + { + case USR_ACTION: + $_action = 'customer'; + break; + case RES_ACTION: + $_action = 'reseller'; + break; + case ADM_ACTION: + $_action = 'administrator'; + break; + case CRON_ACTION: + $_action = 'cronjob'; + break; + case LOG_ERROR: + $_action = 'internal'; + break; + default: + $_action = 'unknown'; + break; + } + + if(!isset($this->userinfo['loginname']) + || $this->userinfo['loginname'] == '') + { + $name = 'unknown'; + } + else + { + $name = " (" . $this->userinfo['loginname'] . ")"; + } + + openlog("Froxlor", LOG_NDELAY, LOG_USER); + + if($text != null + && $text != '') + { + syslog((int)$type, "[" . ucfirst($_action) . " Action" . $name . "] " . $text); + } + else + { + syslog((int)$type, "[" . ucfirst($_action) . " Action" . $name . "] No text given!!! Check scripts!"); + } + + closelog(); + } + } +} + +?> diff --git a/lib/classes/output/class.paging.php b/lib/classes/output/class.paging.php index cdae9b03..c3180a26 100644 --- a/lib/classes/output/class.paging.php +++ b/lib/classes/output/class.paging.php @@ -1,520 +1,520 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Classes - * @version $Id$ - */ - -/** - * Class to manage paging system - * @package Functions - */ - -class paging -{ - /** - * Userinfo - * @var array - */ - - var $userinfo = array(); - - /** - * Database handler - * @var db - */ - - var $db = false; - - /** - * MySQL-Table - * @var string - */ - - var $table = ''; - - /** - * Fields with description which should be selectable - * @var array - */ - - var $fields = array(); - - /** - * Entries per page - * @var int - */ - - var $entriesperpage = 0; - - /** - * Number of entries of table - * @var int - */ - - var $entries = 0; - - /** - * Sortorder, asc or desc - * @var string - */ - - var $sortorder = 'asc'; - - /** - * Sortfield - * @var string - */ - - var $sortfield = ''; - - /** - * Searchfield - * @var string - */ - - var $searchfield = ''; - - /** - * Searchtext - * @var string - */ - - var $searchtext = ''; - - /** - * Pagenumber - * @var int - */ - - var $pageno = 0; - - /** - * Switch natsorting on/off - * @var bool - */ - - var $natSorting = false; - - /** - * Class constructor. Loads settings from request or from userdata and saves them to session. - * - * @param array userinfo - * @param string Name of Table - * @param array Fields, in format array( 'fieldname_in_mysql' => 'field_caption' ) - * @param int entries per page - * @param bool Switch natsorting on/off (global, affects all calls of sort) - */ - - function paging($userinfo, $db, $table, $fields, $entriesperpage, $natSorting = false) - { - $this->userinfo = $userinfo; - - if(!is_array($this->userinfo['lastpaging'])) - { - $this->userinfo['lastpaging'] = unserialize($this->userinfo['lastpaging']); - } - - $this->db = $db; - $this->table = $table; - $this->fields = $fields; - $this->entriesperpage = $entriesperpage; - $this->natSorting = $natSorting; - $checklastpaging = (isset($this->userinfo['lastpaging']['table']) && $this->userinfo['lastpaging']['table'] == $this->table); - $this->userinfo['lastpaging']['table'] = $this->table; - - if(isset($_REQUEST['sortorder']) - && (strtolower($_REQUEST['sortorder']) == 'desc' || strtolower($_REQUEST['sortorder']) == 'asc')) - { - $this->sortorder = strtolower($_REQUEST['sortorder']); - } - else - { - if($checklastpaging - && isset($this->userinfo['lastpaging']['sortorder']) - && (strtolower($this->userinfo['lastpaging']['sortorder']) == 'desc' || strtolower($this->userinfo['lastpaging']['sortorder']) == 'asc')) - { - $this->sortorder = strtolower($this->userinfo['lastpaging']['sortorder']); - } - else - { - $this->sortorder = 'asc'; - } - } - - $this->userinfo['lastpaging']['sortorder'] = $this->sortorder; - - if(isset($_REQUEST['sortfield']) - && isset($fields[$_REQUEST['sortfield']])) - { - $this->sortfield = $_REQUEST['sortfield']; - } - else - { - if($checklastpaging - && isset($this->userinfo['lastpaging']['sortfield']) - && isset($fields[$this->userinfo['lastpaging']['sortfield']])) - { - $this->sortfield = $this->userinfo['lastpaging']['sortfield']; - } - else - { - $fieldnames = array_keys($fields); - $this->sortfield = $fieldnames[0]; - } - } - - $this->userinfo['lastpaging']['sortfield'] = $this->sortfield; - - if(isset($_REQUEST['searchfield']) - && isset($fields[$_REQUEST['searchfield']])) - { - $this->searchfield = $_REQUEST['searchfield']; - } - else - { - if($checklastpaging - && isset($this->userinfo['lastpaging']['searchfield']) - && isset($fields[$this->userinfo['lastpaging']['searchfield']])) - { - $this->searchfield = $this->userinfo['lastpaging']['searchfield']; - } - else - { - $fieldnames = array_keys($fields); - $this->searchfield = $fieldnames[0]; - } - } - - $this->userinfo['lastpaging']['searchfield'] = $this->searchfield; - - if(isset($_REQUEST['searchtext']) - && (preg_match("/^[@0-9a-zA-ZöüäÖÜÄß\-\*\.]+$/", $_REQUEST['searchtext']) || $_REQUEST['searchtext'] === '')) - { - $this->searchtext = $_REQUEST['searchtext']; - } - else - { - if($checklastpaging - && isset($this->userinfo['lastpaging']['searchtext']) - && preg_match("/^[@0-9a-zA-ZöüäÖÜÄß\-\*\.]+$/", $this->userinfo['lastpaging']['searchtext'])) - { - $this->searchtext = $this->userinfo['lastpaging']['searchtext']; - } - else - { - $this->searchtext = ''; - } - } - - $this->userinfo['lastpaging']['searchtext'] = $this->searchtext; - - if(isset($_REQUEST['pageno']) - && intval($_REQUEST['pageno']) != 0) - { - $this->pageno = intval($_REQUEST['pageno']); - } - else - { - if($checklastpaging - && isset($this->userinfo['lastpaging']['pageno']) - && intval($this->userinfo['lastpaging']['pageno']) != 0) - { - $this->pageno = intval($this->userinfo['lastpaging']['pageno']); - } - else - { - $this->pageno = 1; - } - } - - $this->userinfo['lastpaging']['pageno'] = $this->pageno; - $query = 'UPDATE `' . TABLE_PANEL_SESSIONS . '` SET `lastpaging`="' . $this->db->escape(serialize($this->userinfo['lastpaging'])) . '" WHERE `hash`="' . $this->db->escape($userinfo['hash']) . '" AND `userid` = "' . $this->db->escape($userinfo['userid']) . '" AND `ipaddress` = "' . $this->db->escape($userinfo['ipaddress']) . '" AND `useragent` = "' . $this->db->escape($userinfo['useragent']) . '" AND `adminsession` = "' . $this->db->escape($userinfo['adminsession']) . '" '; - $this->db->query($query); - } - - /** - * Sets number of entries and adjusts pageno if the number of entries doesn't correspond to the pageno. - * - * @param int entries - */ - - function setEntries($entries) - { - $this->entries = $entries; - - if(($this->pageno - 1) * $this->entriesperpage > $this->entries) - { - $this->pageno = 1; - } - - return true; - } - - /** - * Checks if a row should be displayed or not, used in loops - * - * @param int number of row - * @return bool to display or not to display, that's the question - */ - - function checkDisplay($count) - { - $begin = (intval($this->pageno) - 1) * intval($this->entriesperpage); - $end = (intval($this->pageno) * intval($this->entriesperpage)); - return (($count >= $begin && $count < $end) || $this->entriesperpage == 0); - } - - /** - * Returns condition code for sql query - * - * @param bool should returned condition code start with WHERE (false) or AND (true)? - * @return string the condition code - */ - - function getSqlWhere($append = false) - { - if($this->searchtext != '') - { - if($append == true) - { - $condition = ' AND '; - } - else - { - $condition = ' WHERE '; - } - - $searchfield = explode('.', $this->searchfield); - foreach($searchfield as $id => $field) - { - if(substr($field, -1, 1) != '`') - { - $field.= '`'; - } - - if($field{0} != '`') - { - $field = '`' . $field; - } - - $searchfield[$id] = $field; - } - - $searchfield = implode('.', $searchfield); - $searchtext = str_replace('*', '%', $this->searchtext); - $condition.= $searchfield . ' LIKE "' . $this->db->escape($searchtext) . '" '; - } - else - { - $condition = ''; - } - - return $condition; - } - - /** - * Returns "order by"-code for sql query - * - * @param bool Switch natsorting on/off (local, affects just this call) - * @return string the "order by"-code - */ - - function getSqlOrderBy($natSorting = null) - { - $sortfield = explode('.', $this->sortfield); - foreach($sortfield as $id => $field) - { - if(substr($field, -1, 1) != '`') - { - $field.= '`'; - } - - if($field{0} != '`') - { - $field = '`' . $field; - } - - $sortfield[$id] = $field; - } - - $sortfield = implode('.', $sortfield); - $sortorder = strtoupper($this->sortorder); - - if($natSorting == true - || ($natSorting === null && $this->natSorting == true)) - { - // Acts similar to php's natsort(), found in one comment at http://my.opera.com/cpr/blog/show.dml/160556 - - $sortcode = 'ORDER BY CONCAT( IF( ASCII( LEFT( ' . $sortfield . ', 1 ) ) > 57, LEFT( ' . $sortfield . ', 1 ), \'0\' ), IF( ASCII( RIGHT( ' . $sortfield . ', 1 ) ) > 57, LPAD( ' . $sortfield . ', 255, \'0\' ), LPAD( CONCAT( ' . $sortfield . ', \'-\' ), 255, \'0\' ) ) ) ' . $sortorder; - } - else - { - $sortcode = 'ORDER BY ' . $sortfield . ' ' . $sortorder; - } - - return $sortcode; - } - - /** - * Currently not used - * - * @return string always empty - */ - - function getSqlLimit() - { - /** - * currently not in use - */ - - return ''; - } - - /** - * Returns html code for sorting field - * - * @param array Language array - * @return string the html sortcode - */ - - function getHtmlSortCode($lng, $break = false) - { - $sortcode = '' . ($break ? '
    ' : ' ') . ' '; - return $sortcode; - } - - /** - * Returns html code for sorting arrows - * - * @param string URL to use as base for links - * @param string If set, only this field will be returned - * @return mixed An array or a string (if field is set) of html code of arrows - */ - - function getHtmlArrowCode($baseurl, $field = '') - { - if($field != '' - && isset($this->fields[$field])) - { - $arrowcode = '
    '; - } - else - { - $arrowcode = array(); - foreach($this->fields as $fieldname => $fieldcaption) - { - $arrowcode[$fieldname] = ''; - } - } - - return $arrowcode; - } - - /** - * Returns html code for searching field - * - * @param array Language array - * @return string the html searchcode - */ - - function getHtmlSearchCode($lng) - { - $sortcode = $lng['panel']['search'] . ':   '; - return $sortcode; - } - - /** - * Returns html code for paging - * - * @param string URL to use as base for links - * @return string the html pagingcode - */ - - function getHtmlPagingCode($baseurl) - { - if($this->entriesperpage == 0) - { - return ''; - } - else - { - $pages = intval($this->entries / $this->entriesperpage); - } - - if($this->entries % $this->entriesperpage != 0) - { - $pages++; - } - - if($pages > 1) - { - $start = $this->pageno - 4; - - if($start < 1) - { - $start = 1; - } - - $stop = $this->pageno + 4; - - if($stop > $pages) - { - $stop = $pages; - } - - $pagingcode = '« < '; - for ($i = $start;$i <= $stop;$i++) - { - if($i != $this->pageno) - { - $pagingcode.= ' ' . $i . ' '; - } - else - { - $pagingcode.= ' ' . $i . ' '; - } - } - - $pagingcode.= ' > »'; - } - else - { - $pagingcode = ''; - } - - return $pagingcode; - } -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Classes + * @version $Id$ + */ + +/** + * Class to manage paging system + * @package Functions + */ + +class paging +{ + /** + * Userinfo + * @var array + */ + + var $userinfo = array(); + + /** + * Database handler + * @var db + */ + + var $db = false; + + /** + * MySQL-Table + * @var string + */ + + var $table = ''; + + /** + * Fields with description which should be selectable + * @var array + */ + + var $fields = array(); + + /** + * Entries per page + * @var int + */ + + var $entriesperpage = 0; + + /** + * Number of entries of table + * @var int + */ + + var $entries = 0; + + /** + * Sortorder, asc or desc + * @var string + */ + + var $sortorder = 'asc'; + + /** + * Sortfield + * @var string + */ + + var $sortfield = ''; + + /** + * Searchfield + * @var string + */ + + var $searchfield = ''; + + /** + * Searchtext + * @var string + */ + + var $searchtext = ''; + + /** + * Pagenumber + * @var int + */ + + var $pageno = 0; + + /** + * Switch natsorting on/off + * @var bool + */ + + var $natSorting = false; + + /** + * Class constructor. Loads settings from request or from userdata and saves them to session. + * + * @param array userinfo + * @param string Name of Table + * @param array Fields, in format array( 'fieldname_in_mysql' => 'field_caption' ) + * @param int entries per page + * @param bool Switch natsorting on/off (global, affects all calls of sort) + */ + + function paging($userinfo, $db, $table, $fields, $entriesperpage, $natSorting = false) + { + $this->userinfo = $userinfo; + + if(!is_array($this->userinfo['lastpaging'])) + { + $this->userinfo['lastpaging'] = unserialize($this->userinfo['lastpaging']); + } + + $this->db = $db; + $this->table = $table; + $this->fields = $fields; + $this->entriesperpage = $entriesperpage; + $this->natSorting = $natSorting; + $checklastpaging = (isset($this->userinfo['lastpaging']['table']) && $this->userinfo['lastpaging']['table'] == $this->table); + $this->userinfo['lastpaging']['table'] = $this->table; + + if(isset($_REQUEST['sortorder']) + && (strtolower($_REQUEST['sortorder']) == 'desc' || strtolower($_REQUEST['sortorder']) == 'asc')) + { + $this->sortorder = strtolower($_REQUEST['sortorder']); + } + else + { + if($checklastpaging + && isset($this->userinfo['lastpaging']['sortorder']) + && (strtolower($this->userinfo['lastpaging']['sortorder']) == 'desc' || strtolower($this->userinfo['lastpaging']['sortorder']) == 'asc')) + { + $this->sortorder = strtolower($this->userinfo['lastpaging']['sortorder']); + } + else + { + $this->sortorder = 'asc'; + } + } + + $this->userinfo['lastpaging']['sortorder'] = $this->sortorder; + + if(isset($_REQUEST['sortfield']) + && isset($fields[$_REQUEST['sortfield']])) + { + $this->sortfield = $_REQUEST['sortfield']; + } + else + { + if($checklastpaging + && isset($this->userinfo['lastpaging']['sortfield']) + && isset($fields[$this->userinfo['lastpaging']['sortfield']])) + { + $this->sortfield = $this->userinfo['lastpaging']['sortfield']; + } + else + { + $fieldnames = array_keys($fields); + $this->sortfield = $fieldnames[0]; + } + } + + $this->userinfo['lastpaging']['sortfield'] = $this->sortfield; + + if(isset($_REQUEST['searchfield']) + && isset($fields[$_REQUEST['searchfield']])) + { + $this->searchfield = $_REQUEST['searchfield']; + } + else + { + if($checklastpaging + && isset($this->userinfo['lastpaging']['searchfield']) + && isset($fields[$this->userinfo['lastpaging']['searchfield']])) + { + $this->searchfield = $this->userinfo['lastpaging']['searchfield']; + } + else + { + $fieldnames = array_keys($fields); + $this->searchfield = $fieldnames[0]; + } + } + + $this->userinfo['lastpaging']['searchfield'] = $this->searchfield; + + if(isset($_REQUEST['searchtext']) + && (preg_match("/^[@0-9a-zA-ZöüäÖÜÄß\-\*\.]+$/", $_REQUEST['searchtext']) || $_REQUEST['searchtext'] === '')) + { + $this->searchtext = $_REQUEST['searchtext']; + } + else + { + if($checklastpaging + && isset($this->userinfo['lastpaging']['searchtext']) + && preg_match("/^[@0-9a-zA-ZöüäÖÜÄß\-\*\.]+$/", $this->userinfo['lastpaging']['searchtext'])) + { + $this->searchtext = $this->userinfo['lastpaging']['searchtext']; + } + else + { + $this->searchtext = ''; + } + } + + $this->userinfo['lastpaging']['searchtext'] = $this->searchtext; + + if(isset($_REQUEST['pageno']) + && intval($_REQUEST['pageno']) != 0) + { + $this->pageno = intval($_REQUEST['pageno']); + } + else + { + if($checklastpaging + && isset($this->userinfo['lastpaging']['pageno']) + && intval($this->userinfo['lastpaging']['pageno']) != 0) + { + $this->pageno = intval($this->userinfo['lastpaging']['pageno']); + } + else + { + $this->pageno = 1; + } + } + + $this->userinfo['lastpaging']['pageno'] = $this->pageno; + $query = 'UPDATE `' . TABLE_PANEL_SESSIONS . '` SET `lastpaging`="' . $this->db->escape(serialize($this->userinfo['lastpaging'])) . '" WHERE `hash`="' . $this->db->escape($userinfo['hash']) . '" AND `userid` = "' . $this->db->escape($userinfo['userid']) . '" AND `ipaddress` = "' . $this->db->escape($userinfo['ipaddress']) . '" AND `useragent` = "' . $this->db->escape($userinfo['useragent']) . '" AND `adminsession` = "' . $this->db->escape($userinfo['adminsession']) . '" '; + $this->db->query($query); + } + + /** + * Sets number of entries and adjusts pageno if the number of entries doesn't correspond to the pageno. + * + * @param int entries + */ + + function setEntries($entries) + { + $this->entries = $entries; + + if(($this->pageno - 1) * $this->entriesperpage > $this->entries) + { + $this->pageno = 1; + } + + return true; + } + + /** + * Checks if a row should be displayed or not, used in loops + * + * @param int number of row + * @return bool to display or not to display, that's the question + */ + + function checkDisplay($count) + { + $begin = (intval($this->pageno) - 1) * intval($this->entriesperpage); + $end = (intval($this->pageno) * intval($this->entriesperpage)); + return (($count >= $begin && $count < $end) || $this->entriesperpage == 0); + } + + /** + * Returns condition code for sql query + * + * @param bool should returned condition code start with WHERE (false) or AND (true)? + * @return string the condition code + */ + + function getSqlWhere($append = false) + { + if($this->searchtext != '') + { + if($append == true) + { + $condition = ' AND '; + } + else + { + $condition = ' WHERE '; + } + + $searchfield = explode('.', $this->searchfield); + foreach($searchfield as $id => $field) + { + if(substr($field, -1, 1) != '`') + { + $field.= '`'; + } + + if($field{0} != '`') + { + $field = '`' . $field; + } + + $searchfield[$id] = $field; + } + + $searchfield = implode('.', $searchfield); + $searchtext = str_replace('*', '%', $this->searchtext); + $condition.= $searchfield . ' LIKE "' . $this->db->escape($searchtext) . '" '; + } + else + { + $condition = ''; + } + + return $condition; + } + + /** + * Returns "order by"-code for sql query + * + * @param bool Switch natsorting on/off (local, affects just this call) + * @return string the "order by"-code + */ + + function getSqlOrderBy($natSorting = null) + { + $sortfield = explode('.', $this->sortfield); + foreach($sortfield as $id => $field) + { + if(substr($field, -1, 1) != '`') + { + $field.= '`'; + } + + if($field{0} != '`') + { + $field = '`' . $field; + } + + $sortfield[$id] = $field; + } + + $sortfield = implode('.', $sortfield); + $sortorder = strtoupper($this->sortorder); + + if($natSorting == true + || ($natSorting === null && $this->natSorting == true)) + { + // Acts similar to php's natsort(), found in one comment at http://my.opera.com/cpr/blog/show.dml/160556 + + $sortcode = 'ORDER BY CONCAT( IF( ASCII( LEFT( ' . $sortfield . ', 1 ) ) > 57, LEFT( ' . $sortfield . ', 1 ), \'0\' ), IF( ASCII( RIGHT( ' . $sortfield . ', 1 ) ) > 57, LPAD( ' . $sortfield . ', 255, \'0\' ), LPAD( CONCAT( ' . $sortfield . ', \'-\' ), 255, \'0\' ) ) ) ' . $sortorder; + } + else + { + $sortcode = 'ORDER BY ' . $sortfield . ' ' . $sortorder; + } + + return $sortcode; + } + + /** + * Currently not used + * + * @return string always empty + */ + + function getSqlLimit() + { + /** + * currently not in use + */ + + return ''; + } + + /** + * Returns html code for sorting field + * + * @param array Language array + * @return string the html sortcode + */ + + function getHtmlSortCode($lng, $break = false) + { + $sortcode = '' . ($break ? '
    ' : ' ') . ' '; + return $sortcode; + } + + /** + * Returns html code for sorting arrows + * + * @param string URL to use as base for links + * @param string If set, only this field will be returned + * @return mixed An array or a string (if field is set) of html code of arrows + */ + + function getHtmlArrowCode($baseurl, $field = '') + { + if($field != '' + && isset($this->fields[$field])) + { + $arrowcode = ''; + } + else + { + $arrowcode = array(); + foreach($this->fields as $fieldname => $fieldcaption) + { + $arrowcode[$fieldname] = ''; + } + } + + return $arrowcode; + } + + /** + * Returns html code for searching field + * + * @param array Language array + * @return string the html searchcode + */ + + function getHtmlSearchCode($lng) + { + $sortcode = $lng['panel']['search'] . ':   '; + return $sortcode; + } + + /** + * Returns html code for paging + * + * @param string URL to use as base for links + * @return string the html pagingcode + */ + + function getHtmlPagingCode($baseurl) + { + if($this->entriesperpage == 0) + { + return ''; + } + else + { + $pages = intval($this->entries / $this->entriesperpage); + } + + if($this->entries % $this->entriesperpage != 0) + { + $pages++; + } + + if($pages > 1) + { + $start = $this->pageno - 4; + + if($start < 1) + { + $start = 1; + } + + $stop = $this->pageno + 4; + + if($stop > $pages) + { + $stop = $pages; + } + + $pagingcode = '« < '; + for ($i = $start;$i <= $stop;$i++) + { + if($i != $this->pageno) + { + $pagingcode.= ' ' . $i . ' '; + } + else + { + $pagingcode.= ' ' . $i . ' '; + } + } + + $pagingcode.= ' > »'; + } + else + { + $pagingcode = ''; + } + + return $pagingcode; + } +} + +?> diff --git a/lib/classes/phpmailer/class.PHPMailer.php b/lib/classes/phpmailer/class.PHPMailer.php index be88ce5e..00a6cde6 100644 --- a/lib/classes/phpmailer/class.PHPMailer.php +++ b/lib/classes/phpmailer/class.PHPMailer.php @@ -1,2084 +1,2084 @@ -ContentType = 'text/html'; - } - else - { - $this->ContentType = 'text/plain'; - } - } - - /** - * Sets Mailer to send message using SMTP. - * @return void - */ - - function IsSMTP() - { - $this->Mailer = 'smtp'; - } - - /** - * Sets Mailer to send message using PHP mail() function. - * @return void - */ - - function IsMail() - { - $this->Mailer = 'mail'; - } - - /** - * Sets Mailer to send message using the $Sendmail program. - * @return void - */ - - function IsSendmail() - { - $this->Mailer = 'sendmail'; - } - - /** - * Sets Mailer to send message using the qmail MTA. - * @return void - */ - - function IsQmail() - { - $this->Sendmail = '/var/qmail/bin/sendmail'; - $this->Mailer = 'sendmail'; - } - - ///////////////////////////////////////////////// - // METHODS, RECIPIENTS - ///////////////////////////////////////////////// - - /** - * Adds a "To" address. - * @param string $address - * @param string $name - * @return void - */ - - function AddAddress($address, $name = '') - { - $cur = count($this->to); - $this->to[$cur][0] = trim($address); - $this->to[$cur][1] = $name; - } - - /** - * Adds a "Cc" address. Note: this function works - * with the SMTP mailer on win32, not with the "mail" - * mailer. - * @param string $address - * @param string $name - * @return void - */ - - function AddCC($address, $name = '') - { - $cur = count($this->cc); - $this->cc[$cur][0] = trim($address); - $this->cc[$cur][1] = $name; - } - - /** - * Adds a "Bcc" address. Note: this function works - * with the SMTP mailer on win32, not with the "mail" - * mailer. - * @param string $address - * @param string $name - * @return void - */ - - function AddBCC($address, $name = '') - { - $cur = count($this->bcc); - $this->bcc[$cur][0] = trim($address); - $this->bcc[$cur][1] = $name; - } - - /** - * Adds a "Reply-to" address. - * @param string $address - * @param string $name - * @return void - */ - - function AddReplyTo($address, $name = '') - { - $cur = count($this->ReplyTo); - $this->ReplyTo[$cur][0] = trim($address); - $this->ReplyTo[$cur][1] = $name; - } - - ///////////////////////////////////////////////// - // METHODS, MAIL SENDING - ///////////////////////////////////////////////// - - /** - * Creates message and assigns Mailer. If the message is - * not sent successfully then it returns false. Use the ErrorInfo - * variable to view description of the error. - * @return bool - */ - - function Send() - { - $header = ''; - $body = ''; - $result = true; - - if((count($this->to) + count($this->cc) + count($this->bcc)) < 1) - { - $this->SetError($this->Lang('provide_address')); - return false; - } - - /* Set whether the message is multipart/alternative */ - - if(!empty($this->AltBody)) - { - $this->ContentType = 'multipart/alternative'; - } - - $this->error_count = 0; - - // reset errors - - $this->SetMessageType(); - $header.= $this->CreateHeader(); - $body = $this->CreateBody(); - - if($body == '') - { - return false; - } - - /* Choose the mailer */ - - switch($this->Mailer) - { - case 'sendmail': - $result = $this->SendmailSend($header, $body); - break; - case 'smtp': - $result = $this->SmtpSend($header, $body); - break; - case 'mail': - $result = $this->MailSend($header, $body); - break; - default: - $result = $this->MailSend($header, $body); - break; - - //$this->SetError($this->Mailer . $this->Lang('mailer_not_supported')); - //$result = false; - //break; - } - - return $result; -} - -/** - * Sends mail using the $Sendmail program. - * @access private - * @return bool - */ - -function SendmailSend($header, $body) -{ - if($this->Sender != '') - { - $sendmail = sprintf("%s -oi -f %s -t", escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender)); - } - else - { - $sendmail = sprintf("%s -oi -t", escapeshellcmd($this->Sendmail)); - } - - if(!@$mail = popen($sendmail, 'w')) - { - $this->SetError($this->Lang('execute') . $this->Sendmail); - return false; - } - - fputs($mail, $header); - fputs($mail, $body); - $result = pclose($mail) >> 8 & 0xFF; - - if($result != 0) - { - $this->SetError($this->Lang('execute') . $this->Sendmail); - return false; - } - - return true; -} - -/** - * Sends mail using the PHP mail() function. - * @access private - * @return bool - */ - -function MailSend($header, $body) -{ - $to = ''; - for ($i = 0;$i < count($this->to);$i++) - { - if($i != 0) - { - $to.= ', '; - } - - $to.= $this->AddrFormat($this->to[$i]); - } - - $toArr = split(',', $to); - - if($this->Sender != '' - && strlen(ini_get('safe_mode')) < 1) - { - $old_from = ini_get('sendmail_from'); - ini_set('sendmail_from', $this->Sender); - $params = sprintf("-oi -f %s", $this->Sender); - - if($this->SingleTo === true - && count($toArr) > 1) - { - foreach($toArr as $key => $val) - { - $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); - } - } - else - { - $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); - } - } - else - { - if($this->SingleTo === true - && count($toArr) > 1) - { - foreach($toArr as $key => $val) - { - $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); - } - } - else - { - $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header); - } - } - - if(isset($old_from)) - { - ini_set('sendmail_from', $old_from); - } - - if(!$rt) - { - $this->SetError($this->Lang('instantiate')); - return false; - } - - return true; -} - -/** - * Sends mail via SMTP using PhpSMTP (Author: - * Chris Ryan). Returns bool. Returns false if there is a - * bad MAIL FROM, RCPT, or DATA input. - * @access private - * @return bool - */ - -function SmtpSend($header, $body) -{ - include_once ($this->PluginDir . 'class.smtp.php'); - $error = ''; - $bad_rcpt = array(); - - if(!$this->SmtpConnect()) - { - return false; - } - - $smtp_from = ($this->Sender == '') ? $this->From : $this->Sender; - - if(!$this->smtp->Mail($smtp_from)) - { - $error = $this->Lang('from_failed') . $smtp_from; - $this->SetError($error); - $this->smtp->Reset(); - return false; - } - - /* Attempt to send attach all recipients */ - - for ($i = 0;$i < count($this->to);$i++) - { - if(!$this->smtp->Recipient($this->to[$i][0])) - { - $bad_rcpt[] = $this->to[$i][0]; - } - } - - for ($i = 0;$i < count($this->cc);$i++) - { - if(!$this->smtp->Recipient($this->cc[$i][0])) - { - $bad_rcpt[] = $this->cc[$i][0]; - } - } - - for ($i = 0;$i < count($this->bcc);$i++) - { - if(!$this->smtp->Recipient($this->bcc[$i][0])) - { - $bad_rcpt[] = $this->bcc[$i][0]; - } - } - - if(count($bad_rcpt) > 0) - { - // Create error message - - for ($i = 0;$i < count($bad_rcpt);$i++) - { - if($i != 0) - { - $error.= ', '; - } - - $error.= $bad_rcpt[$i]; - } - - $error = $this->Lang('recipients_failed') . $error; - $this->SetError($error); - $this->smtp->Reset(); - return false; - } - - if(!$this->smtp->Data($header . $body)) - { - $this->SetError($this->Lang('data_not_accepted')); - $this->smtp->Reset(); - return false; - } - - if($this->SMTPKeepAlive == true) - { - $this->smtp->Reset(); - } - else - { - $this->SmtpClose(); - } - - return true; -} - -/** - * Initiates a connection to an SMTP server. Returns false if the - * operation failed. - * @access private - * @return bool - */ - -function SmtpConnect() -{ - if($this->smtp == NULL) - { - $this->smtp = new SMTP(); - } - - $this->smtp->do_debug = $this->SMTPDebug; - $hosts = explode(';', $this->Host); - $index = 0; - $connection = ($this->smtp->Connected()); - - /* Retry while there is no connection */ - - while($index < count($hosts) - && $connection == false) - { - $hostinfo = array(); - - if(eregi('^(.+):([0-9]+)$', $hosts[$index], $hostinfo)) - { - $host = $hostinfo[1]; - $port = $hostinfo[2]; - } - else - { - $host = $hosts[$index]; - $port = $this->Port; - } - - if($this->smtp->Connect(((!empty($this->SMTPSecure)) ? $this->SMTPSecure . '://' : '') . $host, $port, $this->Timeout)) - { - if($this->Helo != '') - { - $this->smtp->Hello($this->Helo); - } - else - { - $this->smtp->Hello($this->ServerHostname()); - } - - $connection = true; - - if($this->SMTPAuth) - { - if(!$this->smtp->Authenticate($this->Username, $this->Password)) - { - $this->SetError($this->Lang('authenticate')); - $this->smtp->Reset(); - $connection = false; - } - } - } - - $index++; - } - - if(!$connection) - { - $this->SetError($this->Lang('connect_host')); - } - - return $connection; -} - -/** - * Closes the active SMTP session if one exists. - * @return void - */ - -function SmtpClose() -{ - if($this->smtp != NULL) - { - if($this->smtp->Connected()) - { - $this->smtp->Quit(); - $this->smtp->Close(); - } - } -} - -/** - * Sets the language for all class error messages. Returns false - * if it cannot load the language file. The default language type - * is English. - * @param string $lang_type Type of language (e.g. Portuguese: "br") - * @param string $lang_path Path to the language file directory - * @access public - * @return bool - */ - -function SetLanguage($lang_type, $lang_path = 'lng/') -{ - if(file_exists($lang_path . 'phpmailer.lang-' . $lang_type . '.php')) - { - include ($lang_path . 'phpmailer.lang-' . $lang_type . '.php'); - } - elseif(file_exists($lang_path . 'phpmailer.lang-en.php')) - { - include ($lang_path . 'phpmailer.lang-en.php'); - } - else - { - $this->SetError('Could not load language file'); - return false; - } - - $this->language = $PHPMAILER_LANG; - return true; -} - -///////////////////////////////////////////////// -// METHODS, MESSAGE CREATION -///////////////////////////////////////////////// - -/** - * Creates recipient headers. - * @access private - * @return string - */ - -function AddrAppend($type, $addr) -{ - $addr_str = $type . ': '; - $addr_str.= $this->AddrFormat($addr[0]); - - if(count($addr) > 1) - { - for ($i = 1;$i < count($addr);$i++) - { - $addr_str.= ', ' . $this->AddrFormat($addr[$i]); - } - } - - $addr_str.= $this->LE; - return $addr_str; -} - -/** - * Formats an address correctly. - * @access private - * @return string - */ - -function AddrFormat($addr) -{ - if(empty($addr[1])) - { - $formatted = $this->SecureHeader($addr[0]); - } - else - { - $formatted = $this->EncodeHeader($this->SecureHeader($addr[1]), 'phrase') . " <" . $this->SecureHeader($addr[0]) . ">"; - } - - return $formatted; -} - -/** - * Wraps message for use with mailers that do not - * automatically perform wrapping and for quoted-printable. - * Original written by philippe. - * @access private - * @return string - */ - -function WrapText($message, $length, $qp_mode = false) -{ - $soft_break = ($qp_mode) ? sprintf(" =%s", $this->LE) : $this->LE; - $message = $this->FixEOL($message); - - if(substr($message, -1) == $this->LE) - { - $message = substr($message, 0, -1); - } - - $line = explode($this->LE, $message); - $message = ''; - for ($i = 0;$i < count($line);$i++) - { - $line_part = explode(' ', $line[$i]); - $buf = ''; - for ($e = 0;$e < count($line_part);$e++) - { - $word = $line_part[$e]; - - if($qp_mode - and (strlen($word) > $length)) - { - $space_left = $length - strlen($buf) - 1; - - if($e != 0) - { - if($space_left > 20) - { - $len = $space_left; - - if(substr($word, $len - 1, 1) == '=') - { - $len--; - } - elseif(substr($word, $len - 2, 1) == '=') - { - $len-= 2; - } - - $part = substr($word, 0, $len); - $word = substr($word, $len); - $buf.= ' ' . $part; - $message.= $buf . sprintf("=%s", $this->LE); - } - else - { - $message.= $buf . $soft_break; - } - - $buf = ''; - } - - while(strlen($word) > 0) - { - $len = $length; - - if(substr($word, $len - 1, 1) == '=') - { - $len--; - } - elseif(substr($word, $len - 2, 1) == '=') - { - $len-= 2; - } - - $part = substr($word, 0, $len); - $word = substr($word, $len); - - if(strlen($word) > 0) - { - $message.= $part . sprintf("=%s", $this->LE); - } - else - { - $buf = $part; - } - } - } - else - { - $buf_o = $buf; - $buf.= ($e == 0) ? $word : (' ' . $word); - - if(strlen($buf) > $length - and $buf_o != '') - { - $message.= $buf_o . $soft_break; - $buf = $word; - } - } - } - - $message.= $buf . $this->LE; - } - - return $message; -} - -/** - * Set the body wrapping. - * @access private - * @return void - */ - -function SetWordWrap() -{ - if($this->WordWrap < 1) - { - return; - } - - switch($this->message_type) - { - case 'alt': - - /* fall through */ - case 'alt_attachments': - $this->AltBody = $this->WrapText($this->AltBody, $this->WordWrap); - break; - default: - $this->Body = $this->WrapText($this->Body, $this->WordWrap); - break; - } -} - -/** - * Assembles message header. - * @access private - * @return string - */ - -function CreateHeader() -{ - $result = ''; - - /* Set the boundaries */ - - $uniq_id = md5(uniqid(time())); - $this->boundary[1] = 'b1_' . $uniq_id; - $this->boundary[2] = 'b2_' . $uniq_id; - $result.= $this->HeaderLine('Date', $this->RFCDate()); - - if($this->Sender == '') - { - $result.= $this->HeaderLine('Return-Path', trim($this->From)); - } - else - { - $result.= $this->HeaderLine('Return-Path', trim($this->Sender)); - } - - /* To be created automatically by mail() */ - - if($this->Mailer != 'mail') - { - if(count($this->to) > 0) - { - $result.= $this->AddrAppend('To', $this->to); - } - elseif(count($this->cc) == 0) - { - $result.= $this->HeaderLine('To', 'undisclosed-recipients:;'); - } - - if(count($this->cc) > 0) - { - $result.= $this->AddrAppend('Cc', $this->cc); - } - } - - $from = array(); - $from[0][0] = trim($this->From); - $from[0][1] = $this->FromName; - $result.= $this->AddrAppend('From', $from); - - /* sendmail and mail() extract Cc from the header before sending */ - - if((($this->Mailer == 'sendmail') || ($this->Mailer == 'mail')) - && (count($this->cc) > 0)) - { - $result.= $this->AddrAppend('Cc', $this->cc); - } - - /* sendmail and mail() extract Bcc from the header before sending */ - - if((($this->Mailer == 'sendmail') || ($this->Mailer == 'mail')) - && (count($this->bcc) > 0)) - { - $result.= $this->AddrAppend('Bcc', $this->bcc); - } - - if(count($this->ReplyTo) > 0) - { - $result.= $this->AddrAppend('Reply-to', $this->ReplyTo); - } - - /* mail() sets the subject itself */ - - if($this->Mailer != 'mail') - { - $result.= $this->HeaderLine('Subject', $this->EncodeHeader($this->SecureHeader($this->Subject))); - } - - $result.= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE); - $result.= $this->HeaderLine('X-Priority', $this->Priority); - $result.= $this->HeaderLine('X-Mailer', 'PHPMailer (phpmailer.sourceforge.net) [version ' . $this->Version . ']'); - - if($this->ConfirmReadingTo != '') - { - $result.= $this->HeaderLine('Disposition-Notification-To', '<' . trim($this->ConfirmReadingTo) . '>'); - } - - // Add custom headers - - for ($index = 0;$index < count($this->CustomHeader);$index++) - { - $result.= $this->HeaderLine(trim($this->CustomHeader[$index][0]), $this->EncodeHeader(trim($this->CustomHeader[$index][1]))); - } - - $result.= $this->HeaderLine('MIME-Version', '1.0'); - - switch($this->message_type) - { - case 'plain': - $result.= $this->HeaderLine('Content-Transfer-Encoding', $this->Encoding); - $result.= sprintf("Content-Type: %s; charset=\"%s\"", $this->ContentType, $this->CharSet); - break; - case 'attachments': - - /* fall through */ - case 'alt_attachments': - - if($this->InlineImageExists()) - { - $result.= sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s", 'multipart/related', $this->LE, $this->LE, $this->boundary[1], $this->LE); - } - else - { - $result.= $this->HeaderLine('Content-Type', 'multipart/mixed;'); - $result.= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); - } - - break; - case 'alt': - $result.= $this->HeaderLine('Content-Type', 'multipart/alternative;'); - $result.= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); - break; - } - - if($this->Mailer != 'mail') - { - $result.= $this->LE . $this->LE; - } - - return $result; -} - -/** - * Assembles the message body. Returns an empty string on failure. - * @access private - * @return string - */ - -function CreateBody() -{ - $result = ''; - $this->SetWordWrap(); - - switch($this->message_type) - { - case 'alt': - $result.= $this->GetBoundary($this->boundary[1], '', 'text/plain', ''); - $result.= $this->EncodeString($this->AltBody, $this->Encoding); - $result.= $this->LE . $this->LE; - $result.= $this->GetBoundary($this->boundary[1], '', 'text/html', ''); - $result.= $this->EncodeString($this->Body, $this->Encoding); - $result.= $this->LE . $this->LE; - $result.= $this->EndBoundary($this->boundary[1]); - break; - case 'plain': - $result.= $this->EncodeString($this->Body, $this->Encoding); - break; - case 'attachments': - $result.= $this->GetBoundary($this->boundary[1], '', '', ''); - $result.= $this->EncodeString($this->Body, $this->Encoding); - $result.= $this->LE; - $result.= $this->AttachAll(); - break; - case 'alt_attachments': - $result.= sprintf("--%s%s", $this->boundary[1], $this->LE); - $result.= sprintf("Content-Type: %s;%s" . "\tboundary=\"%s\"%s", 'multipart/alternative', $this->LE, $this->boundary[2], $this->LE . $this->LE); - $result.= $this->GetBoundary($this->boundary[2], '', 'text/plain', '') . $this->LE; - - // Create text body - - $result.= $this->EncodeString($this->AltBody, $this->Encoding); - $result.= $this->LE . $this->LE; - $result.= $this->GetBoundary($this->boundary[2], '', 'text/html', '') . $this->LE; - - // Create the HTML body - - $result.= $this->EncodeString($this->Body, $this->Encoding); - $result.= $this->LE . $this->LE; - $result.= $this->EndBoundary($this->boundary[2]); - $result.= $this->AttachAll(); - break; - } - - if($this->IsError()) - { - $result = ''; - } - - return $result; -} - -/** - * Returns the start of a message boundary. - * @access private - */ - -function GetBoundary($boundary, $charSet, $contentType, $encoding) -{ - $result = ''; - - if($charSet == '') - { - $charSet = $this->CharSet; - } - - if($contentType == '') - { - $contentType = $this->ContentType; - } - - if($encoding == '') - { - $encoding = $this->Encoding; - } - - $result.= $this->TextLine('--' . $boundary); - $result.= sprintf("Content-Type: %s; charset = \"%s\"", $contentType, $charSet); - $result.= $this->LE; - $result.= $this->HeaderLine('Content-Transfer-Encoding', $encoding); - $result.= $this->LE; - return $result; -} - -/** - * Returns the end of a message boundary. - * @access private - */ - -function EndBoundary($boundary) -{ - return $this->LE . '--' . $boundary . '--' . $this->LE; -} - -/** - * Sets the message type. - * @access private - * @return void - */ - -function SetMessageType() -{ - if(count($this->attachment) < 1 - && strlen($this->AltBody) < 1) - { - $this->message_type = 'plain'; - } - else - { - if(count($this->attachment) > 0) - { - $this->message_type = 'attachments'; - } - - if(strlen($this->AltBody) > 0 - && count($this->attachment) < 1) - { - $this->message_type = 'alt'; - } - - if(strlen($this->AltBody) > 0 - && count($this->attachment) > 0) - { - $this->message_type = 'alt_attachments'; - } - } -} - -/* Returns a formatted header line. - * @access private - * @return string - */function HeaderLine($name, $value) -{ - return $name . ': ' . $value . $this->LE; -} - -/** - * Returns a formatted mail line. - * @access private - * @return string - */ - -function TextLine($value) -{ - return $value . $this->LE; -} - -///////////////////////////////////////////////// -// CLASS METHODS, ATTACHMENTS -///////////////////////////////////////////////// - -/** - * Adds an attachment from a path on the filesystem. - * Returns false if the file could not be found - * or accessed. - * @param string $path Path to the attachment. - * @param string $name Overrides the attachment name. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File extension (MIME) type. - * @return bool - */ - -function AddAttachment($path, $name = '', $encoding = 'base64', $type = 'application/octet-stream') -{ - if(!@is_file($path)) - { - $this->SetError($this->Lang('file_access') . $path); - return false; - } - - $filename = basename($path); - - if($name == '') - { - $name = $filename; - } - - $cur = count($this->attachment); - $this->attachment[$cur][0] = $path; - $this->attachment[$cur][1] = $filename; - $this->attachment[$cur][2] = $name; - $this->attachment[$cur][3] = $encoding; - $this->attachment[$cur][4] = $type; - $this->attachment[$cur][5] = false; - - // isStringAttachment - - $this->attachment[$cur][6] = 'attachment'; - $this->attachment[$cur][7] = 0; - return true; -} - -/** - * Attaches all fs, string, and binary attachments to the message. - * Returns an empty string on failure. - * @access private - * @return string - */ - -function AttachAll() -{ - /* Return text of body */ - - $mime = array(); - - /* Add all attachments */ - - for ($i = 0;$i < count($this->attachment);$i++) - { - /* Check for string attachment */ - - $bString = $this->attachment[$i][5]; - - if($bString) - { - $string = $this->attachment[$i][0]; - } - else - { - $path = $this->attachment[$i][0]; - } - - $filename = $this->attachment[$i][1]; - $name = $this->attachment[$i][2]; - $encoding = $this->attachment[$i][3]; - $type = $this->attachment[$i][4]; - $disposition = $this->attachment[$i][6]; - $cid = $this->attachment[$i][7]; - $mime[] = sprintf("--%s%s", $this->boundary[1], $this->LE); - $mime[] = sprintf("Content-Type: %s; name=\"%s\"%s", $type, $name, $this->LE); - $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $encoding, $this->LE); - - if($disposition == 'inline') - { - $mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE); - } - - $mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s", $disposition, $name, $this->LE . $this->LE); - - /* Encode as string attachment */ - - if($bString) - { - $mime[] = $this->EncodeString($string, $encoding); - - if($this->IsError()) - { - return ''; - } - - $mime[] = $this->LE . $this->LE; - } - else - { - $mime[] = $this->EncodeFile($path, $encoding); - - if($this->IsError()) - { - return ''; - } - - $mime[] = $this->LE . $this->LE; - } - } - - $mime[] = sprintf("--%s--%s", $this->boundary[1], $this->LE); - return join('', $mime); -} - -/** - * Encodes attachment in requested format. Returns an - * empty string on failure. - * @access private - * @return string - */ - -function EncodeFile($path, $encoding = 'base64') -{ - if(!@$fd = fopen($path, 'rb')) - { - $this->SetError($this->Lang('file_open') . $path); - return ''; - } - - $magic_quotes = get_magic_quotes_runtime(); - set_magic_quotes_runtime(0); - $file_buffer = fread($fd, filesize($path)); - $file_buffer = $this->EncodeString($file_buffer, $encoding); - fclose($fd); - set_magic_quotes_runtime($magic_quotes); - return $file_buffer; -} - -/** - * Encodes string to requested format. Returns an - * empty string on failure. - * @access private - * @return string - */ - -function EncodeString($str, $encoding = 'base64') -{ - $encoded = ''; - - switch(strtolower($encoding)) - { - case 'base64': - - /* chunk_split is found in PHP >= 3.0.6 */ - - $encoded = chunk_split(base64_encode($str), 76, $this->LE); - break; - case '7bit': - case '8bit': - $encoded = $this->FixEOL($str); - - if(substr($encoded, -(strlen($this->LE))) != $this->LE)$encoded.= $this->LE; - break; - case 'binary': - $encoded = $str; - break; - case 'quoted-printable': - $encoded = $this->EncodeQP($str); - break; - default: - $this->SetError($this->Lang('encoding') . $encoding); - break; - } - - return $encoded; -} - -/** - * Encode a header string to best of Q, B, quoted or none. - * @access private - * @return string - */ - -function EncodeHeader($str, $position = 'text') -{ - $x = 0; - - switch(strtolower($position)) - { - case 'phrase': - - if(!preg_match('/[\200-\377]/', $str)) - { - /* Can't use addslashes as we don't know what value has magic_quotes_sybase. */ - - $encoded = addcslashes($str, "\0..\37\177\\\""); - - if(($str == $encoded) - && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) - { - return ($encoded); - } - else - { - return ("\"$encoded\""); - } - } - - $x = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches); - break; - case 'comment': - $x = preg_match_all('/[()"]/', $str, $matches); - - /* Fall-through */ - case 'text': - default: - $x+= preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); - break; - } - - if($x == 0) - { - return ($str); - } - - $maxlen = 75 - 7 - strlen($this->CharSet); - - /* Try to select the encoding which should produce the shortest output */ - - if(strlen($str) / 3 < $x) - { - $encoding = 'B'; - $encoded = base64_encode($str); - $maxlen-= $maxlen % 4; - $encoded = trim(chunk_split($encoded, $maxlen, "\n")); - } - else - { - $encoding = 'Q'; - $encoded = $this->EncodeQ($str, $position); - $encoded = $this->WrapText($encoded, $maxlen, true); - $encoded = str_replace('=' . $this->LE, "\n", trim($encoded)); - } - - $encoded = preg_replace('/^(.*)$/m', " =?" . $this->CharSet . "?$encoding?\\1?=", $encoded); - $encoded = trim(str_replace("\n", $this->LE, $encoded)); - return $encoded; -} - -/** - * Encode string to quoted-printable. - * @access public - * @param string $string the text to encode - * @param integer $line_max Number of chars allowed on a line before wrapping - * @return string - */ - -public function EncodeQP($string, $line_max = 74) -{ - $fp = fopen('php://temp/', 'r+'); - $string = preg_replace('/\r\n?/', $this->LE, $string); - - //Normalise line breaks - - $params = array( - 'line-length' => $line_max, - 'line-break-chars' => $this->LE - ); - stream_filter_append($fp, 'convert.quoted-printable-encode', STREAM_FILTER_READ, $params); - fputs($fp, $string); - rewind($fp); - $out = stream_get_contents($fp); - $out = preg_replace('/^\./m', '=2E', $out); - - //Encode . if it is first char on a line - - fclose($fp); - return $out; -} - -/** - * Encode string to q encoding. - * @access private - * @return string - */ - -function EncodeQ($str, $position = 'text') -{ - /* There should not be any EOL in the string */ - - $encoded = preg_replace("[\r\n]", '', $str); - - switch(strtolower($position)) - { - case 'phrase': - $encoded = preg_replace("/([^A-Za-z0-9!*+\/ -])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded); - break; - case 'comment': - $encoded = preg_replace("/([\(\)\"])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded); - case 'text': - default: - - /* Replace every high ascii, control =, ? and _ characters */ - - $encoded = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e', "'='.sprintf('%02X', ord('\\1'))", $encoded); - break; - } - - /* Replace every spaces to _ (more readable than =20) */ - - $encoded = str_replace(' ', '_', $encoded); - return $encoded; -} - -/** - * Adds a string or binary attachment (non-filesystem) to the list. - * This method can be used to attach ascii or binary data, - * such as a BLOB record from a database. - * @param string $string String attachment data. - * @param string $filename Name of the attachment. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File extension (MIME) type. - * @return void - */ - -function AddStringAttachment($string, $filename, $encoding = 'base64', $type = 'application/octet-stream') -{ - /* Append to $attachment array */ - - $cur = count($this->attachment); - $this->attachment[$cur][0] = $string; - $this->attachment[$cur][1] = $filename; - $this->attachment[$cur][2] = $filename; - $this->attachment[$cur][3] = $encoding; - $this->attachment[$cur][4] = $type; - $this->attachment[$cur][5] = true; - - // isString - - $this->attachment[$cur][6] = 'attachment'; - $this->attachment[$cur][7] = 0; -} - -/** - * Adds an embedded attachment. This can include images, sounds, and - * just about any other document. Make sure to set the $type to an - * image type. For JPEG images use "image/jpeg" and for GIF images - * use "image/gif". - * @param string $path Path to the attachment. - * @param string $cid Content ID of the attachment. Use this to identify - * the Id for accessing the image in an HTML form. - * @param string $name Overrides the attachment name. - * @param string $encoding File encoding (see $Encoding). - * @param string $type File extension (MIME) type. - * @return bool - */ - -function AddEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream') -{ - if(!@is_file($path)) - { - $this->SetError($this->Lang('file_access') . $path); - return false; - } - - $filename = basename($path); - - if($name == '') - { - $name = $filename; - } - - /* Append to $attachment array */ - - $cur = count($this->attachment); - $this->attachment[$cur][0] = $path; - $this->attachment[$cur][1] = $filename; - $this->attachment[$cur][2] = $name; - $this->attachment[$cur][3] = $encoding; - $this->attachment[$cur][4] = $type; - $this->attachment[$cur][5] = false; - $this->attachment[$cur][6] = 'inline'; - $this->attachment[$cur][7] = $cid; - return true; -} - -/** - * Returns true if an inline attachment is present. - * @access private - * @return bool - */ - -function InlineImageExists() -{ - $result = false; - for ($i = 0;$i < count($this->attachment);$i++) - { - if($this->attachment[$i][6] == 'inline') - { - $result = true; - break; - } - } - - return $result; -} - -///////////////////////////////////////////////// -// CLASS METHODS, MESSAGE RESET -///////////////////////////////////////////////// - -/** - * Clears all recipients assigned in the TO array. Returns void. - * @return void - */ - -function ClearAddresses() -{ - $this->to = array(); -} - -/** - * Clears all recipients assigned in the CC array. Returns void. - * @return void - */ - -function ClearCCs() -{ - $this->cc = array(); -} - -/** - * Clears all recipients assigned in the BCC array. Returns void. - * @return void - */ - -function ClearBCCs() -{ - $this->bcc = array(); -} - -/** - * Clears all recipients assigned in the ReplyTo array. Returns void. - * @return void - */ - -function ClearReplyTos() -{ - $this->ReplyTo = array(); -} - -/** - * Clears all recipients assigned in the TO, CC and BCC - * array. Returns void. - * @return void - */ - -function ClearAllRecipients() -{ - $this->to = array(); - $this->cc = array(); - $this->bcc = array(); -} - -/** - * Clears all previously set filesystem, string, and binary - * attachments. Returns void. - * @return void - */ - -function ClearAttachments() -{ - $this->attachment = array(); -} - -/** - * Clears all custom headers. Returns void. - * @return void - */ - -function ClearCustomHeaders() -{ - $this->CustomHeader = array(); -} - -///////////////////////////////////////////////// -// CLASS METHODS, MISCELLANEOUS -///////////////////////////////////////////////// - -/** - * Adds the error message to the error container. - * Returns void. - * @access private - * @return void - */ - -private function SetError($msg) -{ - $this->error_count++; - $this->ErrorInfo = $msg; -} - -/** - * Returns the proper RFC 822 formatted date. - * @access private - * @return string - */ - -private static function RFCDate() -{ - $tz = date('Z'); - $tzs = ($tz < 0) ? '-' : '+'; - $tz = abs($tz); - $tz = (int)($tz / 3600) * 100 + ($tz % 3600) / 60; - $result = sprintf("%s %s%04d", date('D, j M Y H:i:s'), $tzs, $tz); - return $result; -} - -/** - * Returns the server hostname or 'localhost.localdomain' if unknown. - * @access private - * @return string - */ - -private function ServerHostname() -{ - if(!empty($this->Hostname)) - { - $result = $this->Hostname; - } - elseif(isset($_SERVER['SERVER_NAME'])) - { - $result = $_SERVER['SERVER_NAME']; - } - else - { - $result = "localhost.localdomain"; - } - - return $result; -} - -/** - * Returns a message in the appropriate language. - * @access private - * @return string - */ - -private function Lang($key) -{ - if(count($this->language) < 1) - { - $this->SetLanguage('en'); - - // set the default language - } - - if(isset($this->language[$key])) - { - return $this->language[$key]; - } - else - { - return 'Language string failed to load: ' . $key; - } -} - -/** - * Returns true if an error occurred. - * @return bool - */ - -function IsError() -{ - return ($this->error_count > 0); -} - -/** - * Changes every end of line from CR or LF to CRLF. - * @access private - * @return string - */ - -private function FixEOL($str) -{ - $str = str_replace("\r\n", "\n", $str); - $str = str_replace("\r", "\n", $str); - $str = str_replace("\n", $this->LE, $str); - return $str; -} - -/** - * Adds a custom header. - * @return void - */ - -function AddCustomHeader($custom_header) -{ - $this->CustomHeader[] = explode(':', $custom_header, 2); -} - -/** - * Evaluates the message and returns modifications for inline images and backgrounds - * @access public - * @return $message - */ - -function MsgHTML($message) -{ - preg_match_all("/(src|background)=\"(.*)\"/Ui", $message, $images); - - if(isset($images[2])) - { - foreach($images[2] as $i => $url) - { - $filename = basename($url); - $directory = dirname($url); - $cid = 'cid:' . md5($filename); - $fileParts = split("\.", $filename); - $ext = $fileParts[1]; - $mimeType = $this->_mime_types($ext); - $message = preg_replace("/" . $images[1][$i] . "=\"" . preg_quote($url, '/') . "\"/Ui", $images[1][$i] . "=\"" . $cid . "\"", $message); - $this->AddEmbeddedImage($url, md5($filename), $filename, 'base64', $mimeType); - } - } - - $this->IsHTML(true); - $this->Body = $message; - $textMsg = trim(strip_tags($message)); - - if(!empty($textMsg) - && empty($this->AltBody)) - { - $this->AltBody = $textMsg; - } - - if(empty($this->AltBody)) - { - $this->AltBody = 'To view this email message, open the email in with HTML compatibility!' . "\n\n"; - } -} - -/** - * Gets the mime type of the embedded or inline image - * @access private - * @return mime type of ext - */ - -function _mime_types($ext = '') -{ - $mimes = array( - 'hqx' => 'application/mac-binhex40', - 'cpt' => 'application/mac-compactpro', - 'doc' => 'application/msword', - 'bin' => 'application/macbinary', - 'dms' => 'application/octet-stream', - 'lha' => 'application/octet-stream', - 'lzh' => 'application/octet-stream', - 'exe' => 'application/octet-stream', - 'class' => 'application/octet-stream', - 'psd' => 'application/octet-stream', - 'so' => 'application/octet-stream', - 'sea' => 'application/octet-stream', - 'dll' => 'application/octet-stream', - 'oda' => 'application/oda', - 'pdf' => 'application/pdf', - 'ai' => 'application/postscript', - 'eps' => 'application/postscript', - 'ps' => 'application/postscript', - 'smi' => 'application/smil', - 'smil' => 'application/smil', - 'mif' => 'application/vnd.mif', - 'xls' => 'application/vnd.ms-excel', - 'ppt' => 'application/vnd.ms-powerpoint', - 'wbxml' => 'application/vnd.wap.wbxml', - 'wmlc' => 'application/vnd.wap.wmlc', - 'dcr' => 'application/x-director', - 'dir' => 'application/x-director', - 'dxr' => 'application/x-director', - 'dvi' => 'application/x-dvi', - 'gtar' => 'application/x-gtar', - 'php' => 'application/x-httpd-php', - 'php4' => 'application/x-httpd-php', - 'php3' => 'application/x-httpd-php', - 'phtml' => 'application/x-httpd-php', - 'phps' => 'application/x-httpd-php-source', - 'js' => 'application/x-javascript', - 'swf' => 'application/x-shockwave-flash', - 'sit' => 'application/x-stuffit', - 'tar' => 'application/x-tar', - 'tgz' => 'application/x-tar', - 'xhtml' => 'application/xhtml+xml', - 'xht' => 'application/xhtml+xml', - 'zip' => 'application/zip', - 'mid' => 'audio/midi', - 'midi' => 'audio/midi', - 'mpga' => 'audio/mpeg', - 'mp2' => 'audio/mpeg', - 'mp3' => 'audio/mpeg', - 'aif' => 'audio/x-aiff', - 'aiff' => 'audio/x-aiff', - 'aifc' => 'audio/x-aiff', - 'ram' => 'audio/x-pn-realaudio', - 'rm' => 'audio/x-pn-realaudio', - 'rpm' => 'audio/x-pn-realaudio-plugin', - 'ra' => 'audio/x-realaudio', - 'rv' => 'video/vnd.rn-realvideo', - 'wav' => 'audio/x-wav', - 'bmp' => 'image/bmp', - 'gif' => 'image/gif', - 'jpeg' => 'image/jpeg', - 'jpg' => 'image/jpeg', - 'jpe' => 'image/jpeg', - 'png' => 'image/png', - 'tiff' => 'image/tiff', - 'tif' => 'image/tiff', - 'css' => 'text/css', - 'html' => 'text/html', - 'htm' => 'text/html', - 'shtml' => 'text/html', - 'txt' => 'text/plain', - 'text' => 'text/plain', - 'log' => 'text/plain', - 'rtx' => 'text/richtext', - 'rtf' => 'text/rtf', - 'xml' => 'text/xml', - 'xsl' => 'text/xml', - 'mpeg' => 'video/mpeg', - 'mpg' => 'video/mpeg', - 'mpe' => 'video/mpeg', - 'qt' => 'video/quicktime', - 'mov' => 'video/quicktime', - 'avi' => 'video/x-msvideo', - 'movie' => 'video/x-sgi-movie', - 'doc' => 'application/msword', - 'word' => 'application/msword', - 'xl' => 'application/excel', - 'eml' => 'message/rfc822' - ); - return (!isset($mimes[strtolower($ext)])) ? 'application/x-unknown-content-type' : $mimes[strtolower($ext)]; -} - -/** - * Set (or reset) Class Objects (variables) - * - * Usage Example: - * $page->set('X-Priority', '3'); - * - * @access public - * @param string $name Parameter Name - * @param mixed $value Parameter Value - * NOTE: will not work with arrays, there are no arrays to set/reset - */ - -function set($name, $value = '') -{ - if(isset($this->$name)) - { - $this->$name = $value; - } - else - { - $this->SetError('Cannot set or reset variable ' . $name); - return false; - } -} - -/** - * Read a file from a supplied filename and return it. - * - * @access public - * @param string $filename Parameter File Name - */ - -function getFile($filename) -{ - $return = ''; - - if($fp = fopen($filename, 'rb')) - { - while(!feof($fp)) - { - $return.= fread($fp, 1024); - } - - fclose($fp); - return $return; - } - else - { - return false; - } -} - -/** - * Strips newlines to prevent header injection. - * @access private - * @param string $str String - * @return string - */ - -function SecureHeader($str) -{ - $str = trim($str); - $str = str_replace("\r", "", $str); - $str = str_replace("\n", "", $str); - return $str; -} -} - -?> +ContentType = 'text/html'; + } + else + { + $this->ContentType = 'text/plain'; + } + } + + /** + * Sets Mailer to send message using SMTP. + * @return void + */ + + function IsSMTP() + { + $this->Mailer = 'smtp'; + } + + /** + * Sets Mailer to send message using PHP mail() function. + * @return void + */ + + function IsMail() + { + $this->Mailer = 'mail'; + } + + /** + * Sets Mailer to send message using the $Sendmail program. + * @return void + */ + + function IsSendmail() + { + $this->Mailer = 'sendmail'; + } + + /** + * Sets Mailer to send message using the qmail MTA. + * @return void + */ + + function IsQmail() + { + $this->Sendmail = '/var/qmail/bin/sendmail'; + $this->Mailer = 'sendmail'; + } + + ///////////////////////////////////////////////// + // METHODS, RECIPIENTS + ///////////////////////////////////////////////// + + /** + * Adds a "To" address. + * @param string $address + * @param string $name + * @return void + */ + + function AddAddress($address, $name = '') + { + $cur = count($this->to); + $this->to[$cur][0] = trim($address); + $this->to[$cur][1] = $name; + } + + /** + * Adds a "Cc" address. Note: this function works + * with the SMTP mailer on win32, not with the "mail" + * mailer. + * @param string $address + * @param string $name + * @return void + */ + + function AddCC($address, $name = '') + { + $cur = count($this->cc); + $this->cc[$cur][0] = trim($address); + $this->cc[$cur][1] = $name; + } + + /** + * Adds a "Bcc" address. Note: this function works + * with the SMTP mailer on win32, not with the "mail" + * mailer. + * @param string $address + * @param string $name + * @return void + */ + + function AddBCC($address, $name = '') + { + $cur = count($this->bcc); + $this->bcc[$cur][0] = trim($address); + $this->bcc[$cur][1] = $name; + } + + /** + * Adds a "Reply-to" address. + * @param string $address + * @param string $name + * @return void + */ + + function AddReplyTo($address, $name = '') + { + $cur = count($this->ReplyTo); + $this->ReplyTo[$cur][0] = trim($address); + $this->ReplyTo[$cur][1] = $name; + } + + ///////////////////////////////////////////////// + // METHODS, MAIL SENDING + ///////////////////////////////////////////////// + + /** + * Creates message and assigns Mailer. If the message is + * not sent successfully then it returns false. Use the ErrorInfo + * variable to view description of the error. + * @return bool + */ + + function Send() + { + $header = ''; + $body = ''; + $result = true; + + if((count($this->to) + count($this->cc) + count($this->bcc)) < 1) + { + $this->SetError($this->Lang('provide_address')); + return false; + } + + /* Set whether the message is multipart/alternative */ + + if(!empty($this->AltBody)) + { + $this->ContentType = 'multipart/alternative'; + } + + $this->error_count = 0; + + // reset errors + + $this->SetMessageType(); + $header.= $this->CreateHeader(); + $body = $this->CreateBody(); + + if($body == '') + { + return false; + } + + /* Choose the mailer */ + + switch($this->Mailer) + { + case 'sendmail': + $result = $this->SendmailSend($header, $body); + break; + case 'smtp': + $result = $this->SmtpSend($header, $body); + break; + case 'mail': + $result = $this->MailSend($header, $body); + break; + default: + $result = $this->MailSend($header, $body); + break; + + //$this->SetError($this->Mailer . $this->Lang('mailer_not_supported')); + //$result = false; + //break; + } + + return $result; +} + +/** + * Sends mail using the $Sendmail program. + * @access private + * @return bool + */ + +function SendmailSend($header, $body) +{ + if($this->Sender != '') + { + $sendmail = sprintf("%s -oi -f %s -t", escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender)); + } + else + { + $sendmail = sprintf("%s -oi -t", escapeshellcmd($this->Sendmail)); + } + + if(!@$mail = popen($sendmail, 'w')) + { + $this->SetError($this->Lang('execute') . $this->Sendmail); + return false; + } + + fputs($mail, $header); + fputs($mail, $body); + $result = pclose($mail) >> 8 & 0xFF; + + if($result != 0) + { + $this->SetError($this->Lang('execute') . $this->Sendmail); + return false; + } + + return true; +} + +/** + * Sends mail using the PHP mail() function. + * @access private + * @return bool + */ + +function MailSend($header, $body) +{ + $to = ''; + for ($i = 0;$i < count($this->to);$i++) + { + if($i != 0) + { + $to.= ', '; + } + + $to.= $this->AddrFormat($this->to[$i]); + } + + $toArr = split(',', $to); + + if($this->Sender != '' + && strlen(ini_get('safe_mode')) < 1) + { + $old_from = ini_get('sendmail_from'); + ini_set('sendmail_from', $this->Sender); + $params = sprintf("-oi -f %s", $this->Sender); + + if($this->SingleTo === true + && count($toArr) > 1) + { + foreach($toArr as $key => $val) + { + $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); + } + } + else + { + $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); + } + } + else + { + if($this->SingleTo === true + && count($toArr) > 1) + { + foreach($toArr as $key => $val) + { + $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); + } + } + else + { + $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header); + } + } + + if(isset($old_from)) + { + ini_set('sendmail_from', $old_from); + } + + if(!$rt) + { + $this->SetError($this->Lang('instantiate')); + return false; + } + + return true; +} + +/** + * Sends mail via SMTP using PhpSMTP (Author: + * Chris Ryan). Returns bool. Returns false if there is a + * bad MAIL FROM, RCPT, or DATA input. + * @access private + * @return bool + */ + +function SmtpSend($header, $body) +{ + include_once ($this->PluginDir . 'class.smtp.php'); + $error = ''; + $bad_rcpt = array(); + + if(!$this->SmtpConnect()) + { + return false; + } + + $smtp_from = ($this->Sender == '') ? $this->From : $this->Sender; + + if(!$this->smtp->Mail($smtp_from)) + { + $error = $this->Lang('from_failed') . $smtp_from; + $this->SetError($error); + $this->smtp->Reset(); + return false; + } + + /* Attempt to send attach all recipients */ + + for ($i = 0;$i < count($this->to);$i++) + { + if(!$this->smtp->Recipient($this->to[$i][0])) + { + $bad_rcpt[] = $this->to[$i][0]; + } + } + + for ($i = 0;$i < count($this->cc);$i++) + { + if(!$this->smtp->Recipient($this->cc[$i][0])) + { + $bad_rcpt[] = $this->cc[$i][0]; + } + } + + for ($i = 0;$i < count($this->bcc);$i++) + { + if(!$this->smtp->Recipient($this->bcc[$i][0])) + { + $bad_rcpt[] = $this->bcc[$i][0]; + } + } + + if(count($bad_rcpt) > 0) + { + // Create error message + + for ($i = 0;$i < count($bad_rcpt);$i++) + { + if($i != 0) + { + $error.= ', '; + } + + $error.= $bad_rcpt[$i]; + } + + $error = $this->Lang('recipients_failed') . $error; + $this->SetError($error); + $this->smtp->Reset(); + return false; + } + + if(!$this->smtp->Data($header . $body)) + { + $this->SetError($this->Lang('data_not_accepted')); + $this->smtp->Reset(); + return false; + } + + if($this->SMTPKeepAlive == true) + { + $this->smtp->Reset(); + } + else + { + $this->SmtpClose(); + } + + return true; +} + +/** + * Initiates a connection to an SMTP server. Returns false if the + * operation failed. + * @access private + * @return bool + */ + +function SmtpConnect() +{ + if($this->smtp == NULL) + { + $this->smtp = new SMTP(); + } + + $this->smtp->do_debug = $this->SMTPDebug; + $hosts = explode(';', $this->Host); + $index = 0; + $connection = ($this->smtp->Connected()); + + /* Retry while there is no connection */ + + while($index < count($hosts) + && $connection == false) + { + $hostinfo = array(); + + if(eregi('^(.+):([0-9]+)$', $hosts[$index], $hostinfo)) + { + $host = $hostinfo[1]; + $port = $hostinfo[2]; + } + else + { + $host = $hosts[$index]; + $port = $this->Port; + } + + if($this->smtp->Connect(((!empty($this->SMTPSecure)) ? $this->SMTPSecure . '://' : '') . $host, $port, $this->Timeout)) + { + if($this->Helo != '') + { + $this->smtp->Hello($this->Helo); + } + else + { + $this->smtp->Hello($this->ServerHostname()); + } + + $connection = true; + + if($this->SMTPAuth) + { + if(!$this->smtp->Authenticate($this->Username, $this->Password)) + { + $this->SetError($this->Lang('authenticate')); + $this->smtp->Reset(); + $connection = false; + } + } + } + + $index++; + } + + if(!$connection) + { + $this->SetError($this->Lang('connect_host')); + } + + return $connection; +} + +/** + * Closes the active SMTP session if one exists. + * @return void + */ + +function SmtpClose() +{ + if($this->smtp != NULL) + { + if($this->smtp->Connected()) + { + $this->smtp->Quit(); + $this->smtp->Close(); + } + } +} + +/** + * Sets the language for all class error messages. Returns false + * if it cannot load the language file. The default language type + * is English. + * @param string $lang_type Type of language (e.g. Portuguese: "br") + * @param string $lang_path Path to the language file directory + * @access public + * @return bool + */ + +function SetLanguage($lang_type, $lang_path = 'lng/') +{ + if(file_exists($lang_path . 'phpmailer.lang-' . $lang_type . '.php')) + { + include ($lang_path . 'phpmailer.lang-' . $lang_type . '.php'); + } + elseif(file_exists($lang_path . 'phpmailer.lang-en.php')) + { + include ($lang_path . 'phpmailer.lang-en.php'); + } + else + { + $this->SetError('Could not load language file'); + return false; + } + + $this->language = $PHPMAILER_LANG; + return true; +} + +///////////////////////////////////////////////// +// METHODS, MESSAGE CREATION +///////////////////////////////////////////////// + +/** + * Creates recipient headers. + * @access private + * @return string + */ + +function AddrAppend($type, $addr) +{ + $addr_str = $type . ': '; + $addr_str.= $this->AddrFormat($addr[0]); + + if(count($addr) > 1) + { + for ($i = 1;$i < count($addr);$i++) + { + $addr_str.= ', ' . $this->AddrFormat($addr[$i]); + } + } + + $addr_str.= $this->LE; + return $addr_str; +} + +/** + * Formats an address correctly. + * @access private + * @return string + */ + +function AddrFormat($addr) +{ + if(empty($addr[1])) + { + $formatted = $this->SecureHeader($addr[0]); + } + else + { + $formatted = $this->EncodeHeader($this->SecureHeader($addr[1]), 'phrase') . " <" . $this->SecureHeader($addr[0]) . ">"; + } + + return $formatted; +} + +/** + * Wraps message for use with mailers that do not + * automatically perform wrapping and for quoted-printable. + * Original written by philippe. + * @access private + * @return string + */ + +function WrapText($message, $length, $qp_mode = false) +{ + $soft_break = ($qp_mode) ? sprintf(" =%s", $this->LE) : $this->LE; + $message = $this->FixEOL($message); + + if(substr($message, -1) == $this->LE) + { + $message = substr($message, 0, -1); + } + + $line = explode($this->LE, $message); + $message = ''; + for ($i = 0;$i < count($line);$i++) + { + $line_part = explode(' ', $line[$i]); + $buf = ''; + for ($e = 0;$e < count($line_part);$e++) + { + $word = $line_part[$e]; + + if($qp_mode + and (strlen($word) > $length)) + { + $space_left = $length - strlen($buf) - 1; + + if($e != 0) + { + if($space_left > 20) + { + $len = $space_left; + + if(substr($word, $len - 1, 1) == '=') + { + $len--; + } + elseif(substr($word, $len - 2, 1) == '=') + { + $len-= 2; + } + + $part = substr($word, 0, $len); + $word = substr($word, $len); + $buf.= ' ' . $part; + $message.= $buf . sprintf("=%s", $this->LE); + } + else + { + $message.= $buf . $soft_break; + } + + $buf = ''; + } + + while(strlen($word) > 0) + { + $len = $length; + + if(substr($word, $len - 1, 1) == '=') + { + $len--; + } + elseif(substr($word, $len - 2, 1) == '=') + { + $len-= 2; + } + + $part = substr($word, 0, $len); + $word = substr($word, $len); + + if(strlen($word) > 0) + { + $message.= $part . sprintf("=%s", $this->LE); + } + else + { + $buf = $part; + } + } + } + else + { + $buf_o = $buf; + $buf.= ($e == 0) ? $word : (' ' . $word); + + if(strlen($buf) > $length + and $buf_o != '') + { + $message.= $buf_o . $soft_break; + $buf = $word; + } + } + } + + $message.= $buf . $this->LE; + } + + return $message; +} + +/** + * Set the body wrapping. + * @access private + * @return void + */ + +function SetWordWrap() +{ + if($this->WordWrap < 1) + { + return; + } + + switch($this->message_type) + { + case 'alt': + + /* fall through */ + case 'alt_attachments': + $this->AltBody = $this->WrapText($this->AltBody, $this->WordWrap); + break; + default: + $this->Body = $this->WrapText($this->Body, $this->WordWrap); + break; + } +} + +/** + * Assembles message header. + * @access private + * @return string + */ + +function CreateHeader() +{ + $result = ''; + + /* Set the boundaries */ + + $uniq_id = md5(uniqid(time())); + $this->boundary[1] = 'b1_' . $uniq_id; + $this->boundary[2] = 'b2_' . $uniq_id; + $result.= $this->HeaderLine('Date', $this->RFCDate()); + + if($this->Sender == '') + { + $result.= $this->HeaderLine('Return-Path', trim($this->From)); + } + else + { + $result.= $this->HeaderLine('Return-Path', trim($this->Sender)); + } + + /* To be created automatically by mail() */ + + if($this->Mailer != 'mail') + { + if(count($this->to) > 0) + { + $result.= $this->AddrAppend('To', $this->to); + } + elseif(count($this->cc) == 0) + { + $result.= $this->HeaderLine('To', 'undisclosed-recipients:;'); + } + + if(count($this->cc) > 0) + { + $result.= $this->AddrAppend('Cc', $this->cc); + } + } + + $from = array(); + $from[0][0] = trim($this->From); + $from[0][1] = $this->FromName; + $result.= $this->AddrAppend('From', $from); + + /* sendmail and mail() extract Cc from the header before sending */ + + if((($this->Mailer == 'sendmail') || ($this->Mailer == 'mail')) + && (count($this->cc) > 0)) + { + $result.= $this->AddrAppend('Cc', $this->cc); + } + + /* sendmail and mail() extract Bcc from the header before sending */ + + if((($this->Mailer == 'sendmail') || ($this->Mailer == 'mail')) + && (count($this->bcc) > 0)) + { + $result.= $this->AddrAppend('Bcc', $this->bcc); + } + + if(count($this->ReplyTo) > 0) + { + $result.= $this->AddrAppend('Reply-to', $this->ReplyTo); + } + + /* mail() sets the subject itself */ + + if($this->Mailer != 'mail') + { + $result.= $this->HeaderLine('Subject', $this->EncodeHeader($this->SecureHeader($this->Subject))); + } + + $result.= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE); + $result.= $this->HeaderLine('X-Priority', $this->Priority); + $result.= $this->HeaderLine('X-Mailer', 'PHPMailer (phpmailer.sourceforge.net) [version ' . $this->Version . ']'); + + if($this->ConfirmReadingTo != '') + { + $result.= $this->HeaderLine('Disposition-Notification-To', '<' . trim($this->ConfirmReadingTo) . '>'); + } + + // Add custom headers + + for ($index = 0;$index < count($this->CustomHeader);$index++) + { + $result.= $this->HeaderLine(trim($this->CustomHeader[$index][0]), $this->EncodeHeader(trim($this->CustomHeader[$index][1]))); + } + + $result.= $this->HeaderLine('MIME-Version', '1.0'); + + switch($this->message_type) + { + case 'plain': + $result.= $this->HeaderLine('Content-Transfer-Encoding', $this->Encoding); + $result.= sprintf("Content-Type: %s; charset=\"%s\"", $this->ContentType, $this->CharSet); + break; + case 'attachments': + + /* fall through */ + case 'alt_attachments': + + if($this->InlineImageExists()) + { + $result.= sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s", 'multipart/related', $this->LE, $this->LE, $this->boundary[1], $this->LE); + } + else + { + $result.= $this->HeaderLine('Content-Type', 'multipart/mixed;'); + $result.= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); + } + + break; + case 'alt': + $result.= $this->HeaderLine('Content-Type', 'multipart/alternative;'); + $result.= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + } + + if($this->Mailer != 'mail') + { + $result.= $this->LE . $this->LE; + } + + return $result; +} + +/** + * Assembles the message body. Returns an empty string on failure. + * @access private + * @return string + */ + +function CreateBody() +{ + $result = ''; + $this->SetWordWrap(); + + switch($this->message_type) + { + case 'alt': + $result.= $this->GetBoundary($this->boundary[1], '', 'text/plain', ''); + $result.= $this->EncodeString($this->AltBody, $this->Encoding); + $result.= $this->LE . $this->LE; + $result.= $this->GetBoundary($this->boundary[1], '', 'text/html', ''); + $result.= $this->EncodeString($this->Body, $this->Encoding); + $result.= $this->LE . $this->LE; + $result.= $this->EndBoundary($this->boundary[1]); + break; + case 'plain': + $result.= $this->EncodeString($this->Body, $this->Encoding); + break; + case 'attachments': + $result.= $this->GetBoundary($this->boundary[1], '', '', ''); + $result.= $this->EncodeString($this->Body, $this->Encoding); + $result.= $this->LE; + $result.= $this->AttachAll(); + break; + case 'alt_attachments': + $result.= sprintf("--%s%s", $this->boundary[1], $this->LE); + $result.= sprintf("Content-Type: %s;%s" . "\tboundary=\"%s\"%s", 'multipart/alternative', $this->LE, $this->boundary[2], $this->LE . $this->LE); + $result.= $this->GetBoundary($this->boundary[2], '', 'text/plain', '') . $this->LE; + + // Create text body + + $result.= $this->EncodeString($this->AltBody, $this->Encoding); + $result.= $this->LE . $this->LE; + $result.= $this->GetBoundary($this->boundary[2], '', 'text/html', '') . $this->LE; + + // Create the HTML body + + $result.= $this->EncodeString($this->Body, $this->Encoding); + $result.= $this->LE . $this->LE; + $result.= $this->EndBoundary($this->boundary[2]); + $result.= $this->AttachAll(); + break; + } + + if($this->IsError()) + { + $result = ''; + } + + return $result; +} + +/** + * Returns the start of a message boundary. + * @access private + */ + +function GetBoundary($boundary, $charSet, $contentType, $encoding) +{ + $result = ''; + + if($charSet == '') + { + $charSet = $this->CharSet; + } + + if($contentType == '') + { + $contentType = $this->ContentType; + } + + if($encoding == '') + { + $encoding = $this->Encoding; + } + + $result.= $this->TextLine('--' . $boundary); + $result.= sprintf("Content-Type: %s; charset = \"%s\"", $contentType, $charSet); + $result.= $this->LE; + $result.= $this->HeaderLine('Content-Transfer-Encoding', $encoding); + $result.= $this->LE; + return $result; +} + +/** + * Returns the end of a message boundary. + * @access private + */ + +function EndBoundary($boundary) +{ + return $this->LE . '--' . $boundary . '--' . $this->LE; +} + +/** + * Sets the message type. + * @access private + * @return void + */ + +function SetMessageType() +{ + if(count($this->attachment) < 1 + && strlen($this->AltBody) < 1) + { + $this->message_type = 'plain'; + } + else + { + if(count($this->attachment) > 0) + { + $this->message_type = 'attachments'; + } + + if(strlen($this->AltBody) > 0 + && count($this->attachment) < 1) + { + $this->message_type = 'alt'; + } + + if(strlen($this->AltBody) > 0 + && count($this->attachment) > 0) + { + $this->message_type = 'alt_attachments'; + } + } +} + +/* Returns a formatted header line. + * @access private + * @return string + */function HeaderLine($name, $value) +{ + return $name . ': ' . $value . $this->LE; +} + +/** + * Returns a formatted mail line. + * @access private + * @return string + */ + +function TextLine($value) +{ + return $value . $this->LE; +} + +///////////////////////////////////////////////// +// CLASS METHODS, ATTACHMENTS +///////////////////////////////////////////////// + +/** + * Adds an attachment from a path on the filesystem. + * Returns false if the file could not be found + * or accessed. + * @param string $path Path to the attachment. + * @param string $name Overrides the attachment name. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. + * @return bool + */ + +function AddAttachment($path, $name = '', $encoding = 'base64', $type = 'application/octet-stream') +{ + if(!@is_file($path)) + { + $this->SetError($this->Lang('file_access') . $path); + return false; + } + + $filename = basename($path); + + if($name == '') + { + $name = $filename; + } + + $cur = count($this->attachment); + $this->attachment[$cur][0] = $path; + $this->attachment[$cur][1] = $filename; + $this->attachment[$cur][2] = $name; + $this->attachment[$cur][3] = $encoding; + $this->attachment[$cur][4] = $type; + $this->attachment[$cur][5] = false; + + // isStringAttachment + + $this->attachment[$cur][6] = 'attachment'; + $this->attachment[$cur][7] = 0; + return true; +} + +/** + * Attaches all fs, string, and binary attachments to the message. + * Returns an empty string on failure. + * @access private + * @return string + */ + +function AttachAll() +{ + /* Return text of body */ + + $mime = array(); + + /* Add all attachments */ + + for ($i = 0;$i < count($this->attachment);$i++) + { + /* Check for string attachment */ + + $bString = $this->attachment[$i][5]; + + if($bString) + { + $string = $this->attachment[$i][0]; + } + else + { + $path = $this->attachment[$i][0]; + } + + $filename = $this->attachment[$i][1]; + $name = $this->attachment[$i][2]; + $encoding = $this->attachment[$i][3]; + $type = $this->attachment[$i][4]; + $disposition = $this->attachment[$i][6]; + $cid = $this->attachment[$i][7]; + $mime[] = sprintf("--%s%s", $this->boundary[1], $this->LE); + $mime[] = sprintf("Content-Type: %s; name=\"%s\"%s", $type, $name, $this->LE); + $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $encoding, $this->LE); + + if($disposition == 'inline') + { + $mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE); + } + + $mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s", $disposition, $name, $this->LE . $this->LE); + + /* Encode as string attachment */ + + if($bString) + { + $mime[] = $this->EncodeString($string, $encoding); + + if($this->IsError()) + { + return ''; + } + + $mime[] = $this->LE . $this->LE; + } + else + { + $mime[] = $this->EncodeFile($path, $encoding); + + if($this->IsError()) + { + return ''; + } + + $mime[] = $this->LE . $this->LE; + } + } + + $mime[] = sprintf("--%s--%s", $this->boundary[1], $this->LE); + return join('', $mime); +} + +/** + * Encodes attachment in requested format. Returns an + * empty string on failure. + * @access private + * @return string + */ + +function EncodeFile($path, $encoding = 'base64') +{ + if(!@$fd = fopen($path, 'rb')) + { + $this->SetError($this->Lang('file_open') . $path); + return ''; + } + + $magic_quotes = get_magic_quotes_runtime(); + set_magic_quotes_runtime(0); + $file_buffer = fread($fd, filesize($path)); + $file_buffer = $this->EncodeString($file_buffer, $encoding); + fclose($fd); + set_magic_quotes_runtime($magic_quotes); + return $file_buffer; +} + +/** + * Encodes string to requested format. Returns an + * empty string on failure. + * @access private + * @return string + */ + +function EncodeString($str, $encoding = 'base64') +{ + $encoded = ''; + + switch(strtolower($encoding)) + { + case 'base64': + + /* chunk_split is found in PHP >= 3.0.6 */ + + $encoded = chunk_split(base64_encode($str), 76, $this->LE); + break; + case '7bit': + case '8bit': + $encoded = $this->FixEOL($str); + + if(substr($encoded, -(strlen($this->LE))) != $this->LE)$encoded.= $this->LE; + break; + case 'binary': + $encoded = $str; + break; + case 'quoted-printable': + $encoded = $this->EncodeQP($str); + break; + default: + $this->SetError($this->Lang('encoding') . $encoding); + break; + } + + return $encoded; +} + +/** + * Encode a header string to best of Q, B, quoted or none. + * @access private + * @return string + */ + +function EncodeHeader($str, $position = 'text') +{ + $x = 0; + + switch(strtolower($position)) + { + case 'phrase': + + if(!preg_match('/[\200-\377]/', $str)) + { + /* Can't use addslashes as we don't know what value has magic_quotes_sybase. */ + + $encoded = addcslashes($str, "\0..\37\177\\\""); + + if(($str == $encoded) + && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) + { + return ($encoded); + } + else + { + return ("\"$encoded\""); + } + } + + $x = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches); + break; + case 'comment': + $x = preg_match_all('/[()"]/', $str, $matches); + + /* Fall-through */ + case 'text': + default: + $x+= preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); + break; + } + + if($x == 0) + { + return ($str); + } + + $maxlen = 75 - 7 - strlen($this->CharSet); + + /* Try to select the encoding which should produce the shortest output */ + + if(strlen($str) / 3 < $x) + { + $encoding = 'B'; + $encoded = base64_encode($str); + $maxlen-= $maxlen % 4; + $encoded = trim(chunk_split($encoded, $maxlen, "\n")); + } + else + { + $encoding = 'Q'; + $encoded = $this->EncodeQ($str, $position); + $encoded = $this->WrapText($encoded, $maxlen, true); + $encoded = str_replace('=' . $this->LE, "\n", trim($encoded)); + } + + $encoded = preg_replace('/^(.*)$/m', " =?" . $this->CharSet . "?$encoding?\\1?=", $encoded); + $encoded = trim(str_replace("\n", $this->LE, $encoded)); + return $encoded; +} + +/** + * Encode string to quoted-printable. + * @access public + * @param string $string the text to encode + * @param integer $line_max Number of chars allowed on a line before wrapping + * @return string + */ + +public function EncodeQP($string, $line_max = 74) +{ + $fp = fopen('php://temp/', 'r+'); + $string = preg_replace('/\r\n?/', $this->LE, $string); + + //Normalise line breaks + + $params = array( + 'line-length' => $line_max, + 'line-break-chars' => $this->LE + ); + stream_filter_append($fp, 'convert.quoted-printable-encode', STREAM_FILTER_READ, $params); + fputs($fp, $string); + rewind($fp); + $out = stream_get_contents($fp); + $out = preg_replace('/^\./m', '=2E', $out); + + //Encode . if it is first char on a line + + fclose($fp); + return $out; +} + +/** + * Encode string to q encoding. + * @access private + * @return string + */ + +function EncodeQ($str, $position = 'text') +{ + /* There should not be any EOL in the string */ + + $encoded = preg_replace("[\r\n]", '', $str); + + switch(strtolower($position)) + { + case 'phrase': + $encoded = preg_replace("/([^A-Za-z0-9!*+\/ -])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded); + break; + case 'comment': + $encoded = preg_replace("/([\(\)\"])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded); + case 'text': + default: + + /* Replace every high ascii, control =, ? and _ characters */ + + $encoded = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e', "'='.sprintf('%02X', ord('\\1'))", $encoded); + break; + } + + /* Replace every spaces to _ (more readable than =20) */ + + $encoded = str_replace(' ', '_', $encoded); + return $encoded; +} + +/** + * Adds a string or binary attachment (non-filesystem) to the list. + * This method can be used to attach ascii or binary data, + * such as a BLOB record from a database. + * @param string $string String attachment data. + * @param string $filename Name of the attachment. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. + * @return void + */ + +function AddStringAttachment($string, $filename, $encoding = 'base64', $type = 'application/octet-stream') +{ + /* Append to $attachment array */ + + $cur = count($this->attachment); + $this->attachment[$cur][0] = $string; + $this->attachment[$cur][1] = $filename; + $this->attachment[$cur][2] = $filename; + $this->attachment[$cur][3] = $encoding; + $this->attachment[$cur][4] = $type; + $this->attachment[$cur][5] = true; + + // isString + + $this->attachment[$cur][6] = 'attachment'; + $this->attachment[$cur][7] = 0; +} + +/** + * Adds an embedded attachment. This can include images, sounds, and + * just about any other document. Make sure to set the $type to an + * image type. For JPEG images use "image/jpeg" and for GIF images + * use "image/gif". + * @param string $path Path to the attachment. + * @param string $cid Content ID of the attachment. Use this to identify + * the Id for accessing the image in an HTML form. + * @param string $name Overrides the attachment name. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. + * @return bool + */ + +function AddEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream') +{ + if(!@is_file($path)) + { + $this->SetError($this->Lang('file_access') . $path); + return false; + } + + $filename = basename($path); + + if($name == '') + { + $name = $filename; + } + + /* Append to $attachment array */ + + $cur = count($this->attachment); + $this->attachment[$cur][0] = $path; + $this->attachment[$cur][1] = $filename; + $this->attachment[$cur][2] = $name; + $this->attachment[$cur][3] = $encoding; + $this->attachment[$cur][4] = $type; + $this->attachment[$cur][5] = false; + $this->attachment[$cur][6] = 'inline'; + $this->attachment[$cur][7] = $cid; + return true; +} + +/** + * Returns true if an inline attachment is present. + * @access private + * @return bool + */ + +function InlineImageExists() +{ + $result = false; + for ($i = 0;$i < count($this->attachment);$i++) + { + if($this->attachment[$i][6] == 'inline') + { + $result = true; + break; + } + } + + return $result; +} + +///////////////////////////////////////////////// +// CLASS METHODS, MESSAGE RESET +///////////////////////////////////////////////// + +/** + * Clears all recipients assigned in the TO array. Returns void. + * @return void + */ + +function ClearAddresses() +{ + $this->to = array(); +} + +/** + * Clears all recipients assigned in the CC array. Returns void. + * @return void + */ + +function ClearCCs() +{ + $this->cc = array(); +} + +/** + * Clears all recipients assigned in the BCC array. Returns void. + * @return void + */ + +function ClearBCCs() +{ + $this->bcc = array(); +} + +/** + * Clears all recipients assigned in the ReplyTo array. Returns void. + * @return void + */ + +function ClearReplyTos() +{ + $this->ReplyTo = array(); +} + +/** + * Clears all recipients assigned in the TO, CC and BCC + * array. Returns void. + * @return void + */ + +function ClearAllRecipients() +{ + $this->to = array(); + $this->cc = array(); + $this->bcc = array(); +} + +/** + * Clears all previously set filesystem, string, and binary + * attachments. Returns void. + * @return void + */ + +function ClearAttachments() +{ + $this->attachment = array(); +} + +/** + * Clears all custom headers. Returns void. + * @return void + */ + +function ClearCustomHeaders() +{ + $this->CustomHeader = array(); +} + +///////////////////////////////////////////////// +// CLASS METHODS, MISCELLANEOUS +///////////////////////////////////////////////// + +/** + * Adds the error message to the error container. + * Returns void. + * @access private + * @return void + */ + +private function SetError($msg) +{ + $this->error_count++; + $this->ErrorInfo = $msg; +} + +/** + * Returns the proper RFC 822 formatted date. + * @access private + * @return string + */ + +private static function RFCDate() +{ + $tz = date('Z'); + $tzs = ($tz < 0) ? '-' : '+'; + $tz = abs($tz); + $tz = (int)($tz / 3600) * 100 + ($tz % 3600) / 60; + $result = sprintf("%s %s%04d", date('D, j M Y H:i:s'), $tzs, $tz); + return $result; +} + +/** + * Returns the server hostname or 'localhost.localdomain' if unknown. + * @access private + * @return string + */ + +private function ServerHostname() +{ + if(!empty($this->Hostname)) + { + $result = $this->Hostname; + } + elseif(isset($_SERVER['SERVER_NAME'])) + { + $result = $_SERVER['SERVER_NAME']; + } + else + { + $result = "localhost.localdomain"; + } + + return $result; +} + +/** + * Returns a message in the appropriate language. + * @access private + * @return string + */ + +private function Lang($key) +{ + if(count($this->language) < 1) + { + $this->SetLanguage('en'); + + // set the default language + } + + if(isset($this->language[$key])) + { + return $this->language[$key]; + } + else + { + return 'Language string failed to load: ' . $key; + } +} + +/** + * Returns true if an error occurred. + * @return bool + */ + +function IsError() +{ + return ($this->error_count > 0); +} + +/** + * Changes every end of line from CR or LF to CRLF. + * @access private + * @return string + */ + +private function FixEOL($str) +{ + $str = str_replace("\r\n", "\n", $str); + $str = str_replace("\r", "\n", $str); + $str = str_replace("\n", $this->LE, $str); + return $str; +} + +/** + * Adds a custom header. + * @return void + */ + +function AddCustomHeader($custom_header) +{ + $this->CustomHeader[] = explode(':', $custom_header, 2); +} + +/** + * Evaluates the message and returns modifications for inline images and backgrounds + * @access public + * @return $message + */ + +function MsgHTML($message) +{ + preg_match_all("/(src|background)=\"(.*)\"/Ui", $message, $images); + + if(isset($images[2])) + { + foreach($images[2] as $i => $url) + { + $filename = basename($url); + $directory = dirname($url); + $cid = 'cid:' . md5($filename); + $fileParts = split("\.", $filename); + $ext = $fileParts[1]; + $mimeType = $this->_mime_types($ext); + $message = preg_replace("/" . $images[1][$i] . "=\"" . preg_quote($url, '/') . "\"/Ui", $images[1][$i] . "=\"" . $cid . "\"", $message); + $this->AddEmbeddedImage($url, md5($filename), $filename, 'base64', $mimeType); + } + } + + $this->IsHTML(true); + $this->Body = $message; + $textMsg = trim(strip_tags($message)); + + if(!empty($textMsg) + && empty($this->AltBody)) + { + $this->AltBody = $textMsg; + } + + if(empty($this->AltBody)) + { + $this->AltBody = 'To view this email message, open the email in with HTML compatibility!' . "\n\n"; + } +} + +/** + * Gets the mime type of the embedded or inline image + * @access private + * @return mime type of ext + */ + +function _mime_types($ext = '') +{ + $mimes = array( + 'hqx' => 'application/mac-binhex40', + 'cpt' => 'application/mac-compactpro', + 'doc' => 'application/msword', + 'bin' => 'application/macbinary', + 'dms' => 'application/octet-stream', + 'lha' => 'application/octet-stream', + 'lzh' => 'application/octet-stream', + 'exe' => 'application/octet-stream', + 'class' => 'application/octet-stream', + 'psd' => 'application/octet-stream', + 'so' => 'application/octet-stream', + 'sea' => 'application/octet-stream', + 'dll' => 'application/octet-stream', + 'oda' => 'application/oda', + 'pdf' => 'application/pdf', + 'ai' => 'application/postscript', + 'eps' => 'application/postscript', + 'ps' => 'application/postscript', + 'smi' => 'application/smil', + 'smil' => 'application/smil', + 'mif' => 'application/vnd.mif', + 'xls' => 'application/vnd.ms-excel', + 'ppt' => 'application/vnd.ms-powerpoint', + 'wbxml' => 'application/vnd.wap.wbxml', + 'wmlc' => 'application/vnd.wap.wmlc', + 'dcr' => 'application/x-director', + 'dir' => 'application/x-director', + 'dxr' => 'application/x-director', + 'dvi' => 'application/x-dvi', + 'gtar' => 'application/x-gtar', + 'php' => 'application/x-httpd-php', + 'php4' => 'application/x-httpd-php', + 'php3' => 'application/x-httpd-php', + 'phtml' => 'application/x-httpd-php', + 'phps' => 'application/x-httpd-php-source', + 'js' => 'application/x-javascript', + 'swf' => 'application/x-shockwave-flash', + 'sit' => 'application/x-stuffit', + 'tar' => 'application/x-tar', + 'tgz' => 'application/x-tar', + 'xhtml' => 'application/xhtml+xml', + 'xht' => 'application/xhtml+xml', + 'zip' => 'application/zip', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mpga' => 'audio/mpeg', + 'mp2' => 'audio/mpeg', + 'mp3' => 'audio/mpeg', + 'aif' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'aifc' => 'audio/x-aiff', + 'ram' => 'audio/x-pn-realaudio', + 'rm' => 'audio/x-pn-realaudio', + 'rpm' => 'audio/x-pn-realaudio-plugin', + 'ra' => 'audio/x-realaudio', + 'rv' => 'video/vnd.rn-realvideo', + 'wav' => 'audio/x-wav', + 'bmp' => 'image/bmp', + 'gif' => 'image/gif', + 'jpeg' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'jpe' => 'image/jpeg', + 'png' => 'image/png', + 'tiff' => 'image/tiff', + 'tif' => 'image/tiff', + 'css' => 'text/css', + 'html' => 'text/html', + 'htm' => 'text/html', + 'shtml' => 'text/html', + 'txt' => 'text/plain', + 'text' => 'text/plain', + 'log' => 'text/plain', + 'rtx' => 'text/richtext', + 'rtf' => 'text/rtf', + 'xml' => 'text/xml', + 'xsl' => 'text/xml', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mpe' => 'video/mpeg', + 'qt' => 'video/quicktime', + 'mov' => 'video/quicktime', + 'avi' => 'video/x-msvideo', + 'movie' => 'video/x-sgi-movie', + 'doc' => 'application/msword', + 'word' => 'application/msword', + 'xl' => 'application/excel', + 'eml' => 'message/rfc822' + ); + return (!isset($mimes[strtolower($ext)])) ? 'application/x-unknown-content-type' : $mimes[strtolower($ext)]; +} + +/** + * Set (or reset) Class Objects (variables) + * + * Usage Example: + * $page->set('X-Priority', '3'); + * + * @access public + * @param string $name Parameter Name + * @param mixed $value Parameter Value + * NOTE: will not work with arrays, there are no arrays to set/reset + */ + +function set($name, $value = '') +{ + if(isset($this->$name)) + { + $this->$name = $value; + } + else + { + $this->SetError('Cannot set or reset variable ' . $name); + return false; + } +} + +/** + * Read a file from a supplied filename and return it. + * + * @access public + * @param string $filename Parameter File Name + */ + +function getFile($filename) +{ + $return = ''; + + if($fp = fopen($filename, 'rb')) + { + while(!feof($fp)) + { + $return.= fread($fp, 1024); + } + + fclose($fp); + return $return; + } + else + { + return false; + } +} + +/** + * Strips newlines to prevent header injection. + * @access private + * @param string $str String + * @return string + */ + +function SecureHeader($str) +{ + $str = trim($str); + $str = str_replace("\r", "", $str); + $str = str_replace("\n", "", $str); + return $str; +} +} + +?> diff --git a/lib/classes/phpmailer/class.SMTP.php b/lib/classes/phpmailer/class.SMTP.php index 27831cf3..cbb027e9 100644 --- a/lib/classes/phpmailer/class.SMTP.php +++ b/lib/classes/phpmailer/class.SMTP.php @@ -1,37 +1,37 @@ do_debug = 0; } - /************************************************************* - * CONNECTION FUNCTIONS * + /************************************************************* + * CONNECTION FUNCTIONS * ***********************************************************/ /** @@ -125,9 +125,9 @@ class SMTP if($this->connected()) { - /* ok we are connected! what should we do? - * for now we will just give an error saying we - * are already connected + /* ok we are connected! what should we do? + * for now we will just give an error saying we + * are already connected */ $this->error = array( @@ -180,9 +180,9 @@ class SMTP return false; } - /* sometimes the SMTP server takes a little longer to respond - * so we will give it a longer timeout for the first read - * - Windows still does not have support for this timeout function + /* sometimes the SMTP server takes a little longer to respond + * so we will give it a longer timeout for the first read + * - Windows still does not have support for this timeout function */ if(substr(PHP_OS, 0, 3) != "WIN")socket_set_timeout($this->smtp_conn, $tval, 0); @@ -340,8 +340,8 @@ class SMTP } } - /*************************************************************** - * SMTP COMMANDS * + /*************************************************************** + * SMTP COMMANDS * *************************************************************/ /** @@ -403,15 +403,15 @@ class SMTP return false; } - /* the server is ready to accept data! - * according to rfc 821 we should not send more than 1000 - * including the CRLF - * characters on a single line so we will break the data up - * into lines by \r and/or \n then if needed we will break - * each of those into smaller lines to fit within the limit. - * in addition we will be looking for lines that start with - * a period '.' and append and additional period '.' to that - * line. NOTE: this does not count towards are limit. + /* the server is ready to accept data! + * according to rfc 821 we should not send more than 1000 + * including the CRLF + * characters on a single line so we will break the data up + * into lines by \r and/or \n then if needed we will break + * each of those into smaller lines to fit within the limit. + * in addition we will be looking for lines that start with + * a period '.' and append and additional period '.' to that + * line. NOTE: this does not count towards are limit. */ // normalize the line breaks so we know the explode works @@ -419,13 +419,13 @@ class SMTP $msg_data = str_replace("\r", "\n", $msg_data); $lines = explode("\n", $msg_data); - /* we need to find a good way to determine is headers are - * in the msg_data or if it is a straight msg body - * currently I am assuming rfc 822 definitions of msg headers - * and if the first field of the first line (':' sperated) - * does not contain a space then it _should_ be a header - * and we can process all lines before a blank "" line as - * headers. + /* we need to find a good way to determine is headers are + * in the msg_data or if it is a straight msg body + * currently I am assuming rfc 822 definitions of msg headers + * and if the first field of the first line (':' sperated) + * does not contain a space then it _should_ be a header + * and we can process all lines before a blank "" line as + * headers. */ $field = substr($lines[0], 0, strpos($lines[0], ":")); @@ -467,9 +467,9 @@ class SMTP $lines_out[] = substr($line, 0, $pos); $line = substr($line, $pos + 1); - /* if we are processing headers we need to - * add a LWSP-char to the front of the new line - * rfc 822 on long msg headers + /* if we are processing headers we need to + * add a LWSP-char to the front of the new line + * rfc 822 on long msg headers */ if($in_headers) @@ -1299,8 +1299,8 @@ class SMTP return $rply; } - /******************************************************************* - * INTERNAL FUNCTIONS * + /******************************************************************* + * INTERNAL FUNCTIONS * ******************************************************************/ /** @@ -1345,4 +1345,4 @@ class SMTP } } -?> +?> diff --git a/lib/classes/ticket/class.ticket.php b/lib/classes/ticket/class.ticket.php index 12545b50..3a177c7d 100644 --- a/lib/classes/ticket/class.ticket.php +++ b/lib/classes/ticket/class.ticket.php @@ -1,688 +1,688 @@ - - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Logger - * @version $Id$ - * @link http://www.nutime.de/ - * - * Support Tickets - Tickets-Class - */ - -class ticket -{ - /** - * Userinfo - * @var array - */ - - private $userinfo = array(); - - /** - * Database handler - * @var db - */ - - private $db = false; - - /** - * Settings array - * @var settings - */ - - private $settings = array(); - - /** - * Ticket ID - * @var tid - */ - - private $tid = - 1; - - /** - * Ticket Data Array - * @var t_data - */ - - private $t_data = array(); - - /** - * Ticket-Object-Array - * @var tickets - */ - - static private $tickets = array(); - - /** - * Class constructor. - * - * @param array userinfo - * @param resource database - * @param array settings - * @param int ticket id - */ - - private function __construct($userinfo, $db, $settings, $tid = - 1) - { - $this->userinfo = $userinfo; - $this->db = $db; - $this->settings = $settings; - $this->tid = $tid; - - // initialize data array - - $this->initData(); - - // read data from database - - $this->readData(); - } - - /** - * Singleton ftw ;-) - * - * @param int ticket id - */ - - static public function getInstanceOf($_usernfo, $_db, $_settings, $_tid) - { - if(!isset(self::$tickets[$_tid])) - { - self::$tickets[$_tid] = new ticket($_usernfo, $_db, $_settings, $_tid); - } - - return self::$tickets[$_tid]; - } - - /** - * Initialize data-array - */ - - private function initData() - { - $this->Set('customer', 0, true, true); - $this->Set('admin', 1, true, true); - $this->Set('subject', '', true, true); - $this->Set('category', '0', true, true); - $this->Set('priority', '2', true, true); - $this->Set('message', '', true, true); - $this->Set('dt', 0, true, true); - $this->Set('lastchange', 0, true, true); - $this->Set('ip', '', true, true); - $this->Set('status', '0', true, true); - $this->Set('lastreplier', '0', true, true); - $this->Set('by', '0', true, true); - $this->Set('answerto', '0', true, true); - $this->Set('archived', '0', true, true); - } - - /** - * Read ticket data from database. - */ - - private function readData() - { - if(isset($this->tid) - && $this->tid != - 1) - { - $_ticket = $this->db->query_first('SELECT * FROM `' . TABLE_PANEL_TICKETS . '` WHERE `id` = "' . $this->tid . '"'); - $this->Set('customer', $_ticket['customerid'], true, false); - $this->Set('admin', $_ticket['adminid'], true, false); - $this->Set('subject', $_ticket['subject'], true, false); - $this->Set('category', $_ticket['category'], true, false); - $this->Set('priority', $_ticket['priority'], true, false); - $this->Set('message', $_ticket['message'], true, false); - $this->Set('dt', $_ticket['dt'], true, false); - $this->Set('lastchange', $_ticket['lastchange'], true, false); - $this->Set('ip', $_ticket['ip'], true, false); - $this->Set('status', $_ticket['status'], true, false); - $this->Set('lastreplier', $_ticket['lastreplier'], true, false); - $this->Set('by', $_ticket['by'], true, false); - $this->Set('answerto', $_ticket['answerto'], true, false); - $this->Set('archived', $_ticket['archived'], true, false); - } - } - - /** - * Insert data to database - */ - - public function Insert() - { - $this->db->query("INSERT INTO `" . TABLE_PANEL_TICKETS . "` - (`customerid`, - `adminid`, - `category`, - `priority`, - `subject`, - `message`, - `dt`, - `lastchange`, - `ip`, - `status`, - `lastreplier`, - `by`, - `answerto`) - VALUES - ('" . (int)$this->Get('customer') . "', - '" . (int)$this->Get('admin') . "', - '" . (int)$this->Get('category') . "', - '" . (int)$this->Get('priority') . "', - '" . $this->db->escape($this->Get('subject')) . "', - '" . $this->db->escape($this->Get('message')) . "', - '" . (int)$this->Get('dt') . "', - '" . (int)$this->Get('lastchange') . "', - '" . $this->db->escape($this->Get('ip')) . "', - '" . (int)$this->Get('status') . "', - '" . (int)$this->Get('lastreplier') . "', - '" . (int)$this->Get('by') . "', - '" . (int)$this->Get('answerto') . "');"); - $this->tid = $this->db->insert_id(); - return true; - } - - /** - * Update data in database - */ - - public function Update() - { - // Update "main" ticket - - $this->db->query('UPDATE `' . TABLE_PANEL_TICKETS . '` SET - `priority` = "' . (int)$this->Get('priority') . '", - `lastchange` = "' . (int)$this->Get('lastchange') . '", - `status` = "' . (int)$this->Get('status') . '", - `lastreplier` = "' . (int)$this->Get('lastreplier') . '" - WHERE `id` = "' . (int)$this->tid . '";'); - return true; - } - - /** - * Moves a ticket to the archive - */ - - public function Archive() - { - // Update "main" ticket - - $this->db->query('UPDATE `' . TABLE_PANEL_TICKETS . '` SET `archived` = "1" WHERE `id` = "' . (int)$this->tid . '";'); - - // Update "answers" to ticket - - $this->db->query('UPDATE `' . TABLE_PANEL_TICKETS . '` SET `archived` = "1" WHERE `answerto` = "' . (int)$this->tid . '";'); - return true; - } - - /** - * Remove ticket from database - */ - - public function Delete() - { - // Delete "main" ticket - - $this->db->query('DELETE FROM `' . TABLE_PANEL_TICKETS . '` WHERE `id` = "' . (int)$this->tid . '";'); - - // Delete "answers" to ticket" - - $this->db->query('DELETE FROM `' . TABLE_PANEL_TICKETS . '` WHERE `answerto` = "' . (int)$this->tid . '";'); - return true; - } - - /** - * Mail notifications - */ - - public function sendMail($customerid = - 1, $template_subject = null, $default_subject = null, $template_body = null, $default_body = null) - { - global $mail; - - // Some checks are to be made here in the future - - if($customerid != - 1) - { - // Get e-mail message for customer - - $usr = $this->db->query_first('SELECT `name`, `firstname`, `email` - FROM `' . TABLE_PANEL_CUSTOMERS . '` - WHERE `customerid` = "' . (int)$customerid . '"'); - $replace_arr = array( - 'FIRSTNAME' => $usr['firstname'], - 'NAME' => $usr['name'], - 'SUBJECT' => $this->Get('subject', true) - ); - } - else - { - $replace_arr = array( - 'SUBJECT' => $this->Get('subject', true) - ); - } - - $result = $this->db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` - WHERE `adminid`=\'' . (int)$this->userinfo['adminid'] . '\' - AND `language`=\'' . $this->db->escape($this->userinfo['def_language']) . '\' - AND `templategroup`=\'mails\' - AND `varname`=\'' . $template_subject . '\''); - $mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $default_subject), $replace_arr)); - $result = $this->db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` - WHERE `adminid`=\'' . (int)$this->userinfo['adminid'] . '\' - AND `language`=\'' . $this->db->escape($this->userinfo['def_language']) . '\' - AND `templategroup`=\'mails\' - AND `varname`=\'' . $template_body . '\''); - $mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $default_body), $replace_arr)); - - if($customerid != - 1) - { - $mail->From = $this->settings['ticket']['noreply_email']; - $mail->FromName = $this->settings['ticket']['noreply_name']; - $mail->Subject = $mail_subject; - $mail->Body = $mail_body; - $mail->AddAddress($usr['email'], $usr['firstname'] . ' ' . $usr['name']); - - if(!$mail->Send()) - { - standard_error(array('errorsendingmail', $usr['email'])); - } - - $mail->ClearAddresses(); - } - else - { - $admin = $this->db->query_first("SELECT `email` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$this->userinfo['adminid'] . "'"); - $mail->From = $this->settings['ticket']['noreply_email']; - $mail->FromName = $this->settings['ticket']['noreply_name']; - $mail->Subject = $mail_subject; - $mail->Body = $mail_body; - $mail->AddAddress($admin['email'], $admin['firstname'] . ' ' . $admin['name']); - - if(!$mail->Send()) - { - standard_error(array('errorsendingmail', $admin['email'])); - } - - $mail->ClearAddresses(); - } - } - - /** - * Add a support-categories - */ - - static public function addCategory($_db, $_category = null, $_admin = 1) - { - if($_category != null - && $_category != '') - { - $_db->query('INSERT INTO `' . TABLE_PANEL_TICKET_CATS . '` (`name`, `adminid`) VALUES ("' . $_db->escape($_category) . '", "' . (int)$_admin . '")'); - return true; - } - - return false; - } - - /** - * Edit a support-categories - */ - - static public function editCategory($_db, $_category = null, $_id = 0) - { - if($_category != null - && $_category != '' - && $_id != 0) - { - $_db->query('UPDATE `' . TABLE_PANEL_TICKET_CATS . '` SET `name` = "' . $_db->escape($_category) . '" - WHERE `id` = "' . (int)$_id . '"'); - return true; - } - - return false; - } - - /** - * Delete a support-categories - */ - - static public function deleteCategory($_db, $_id = 0) - { - if($_id != 0) - { - $result = $_db->query_first('SELECT COUNT(`id`) as `numtickets` FROM `' . TABLE_PANEL_TICKETS . '` - WHERE `category` = "' . (int)$_id . '"'); - - if($result['numtickets'] == "0") - { - $_db->query('DELETE FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `id` = "' . (int)$_id . '"'); - return true; - } - else - { - return false; - } - } - - return false; - } - - /** - * Return a support-category-name - */ - - static public function getCategoryName($_db, $_id = 0) - { - if($_id != 0) - { - $category = $_db->query_first('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `id` = "' . (int)$_id . '"'); - return $category['name']; - } - - return null; - } - - /** - * returns the last x archived tickets - */ - - static public function getLastArchived($_db, $_num = 10, $_admin = 1) - { - if($_num > 0) - { - $archived = array(); - $counter = 0; - $result = $_db->query('SELECT *, - (SELECT COUNT(`sub`.`id`) - FROM `' . TABLE_PANEL_TICKETS . '` `sub` - WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers` - FROM `' . TABLE_PANEL_TICKETS . '` `main` - WHERE `main`.`answerto` = "0" - AND `main`.`archived` = "1" AND `main`.`adminid` = "' . (int)$_admin . '" - ORDER BY `main`.`lastchange` DESC LIMIT 0, ' . (int)$_num); - - while($row = $_db->fetch_array($result)) - { - $archived[$counter]['id'] = $row['id']; - $archived[$counter]['customerid'] = $row['customerid']; - $archived[$counter]['adminid'] = $row['adminid']; - $archived[$counter]['lastreplier'] = $row['lastreplier']; - $archived[$counter]['ticket_answers'] = $row['ticket_answers']; - $archived[$counter]['category'] = $row['category']; - $archived[$counter]['priority'] = $row['priority']; - $archived[$counter]['subject'] = $row['subject']; - $archived[$counter]['message'] = $row['message']; - $archived[$counter]['dt'] = $row['dt']; - $archived[$counter]['lastchange'] = $row['lastchange']; - $archived[$counter]['status'] = $row['status']; - $archived[$counter]['by'] = $row['by']; - $counter++; - } - - if(isset($archived[0]['id'])) - { - return $archived; - } - else - { - return false; - } - } - } - - /** - * Returns a sql-statement to search the archive - */ - - static public function getArchiveSearchStatement($subject = NULL, $priority = NULL, $fromdate = NULL, $todate = NULL, $message = NULL, $customer = - 1, $admin = 1, $categories = NULL) - { - $query = 'SELECT `main`.*, - (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` - WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers` - FROM `' . TABLE_PANEL_TICKETS . '` `main` - WHERE `main`.`archived` = "1" AND `main`.`answerto` = "0" AND `main`.`adminid` = "' . (int)$admin . '"'; - - if($subject != NULL - && $subject != '') - { - $query.= 'AND `main`.`subject` LIKE "%' . $subject . '%" '; - } - - if($priority != NULL - && isset($priority[0]) - && $priority[0] != '') - { - if(isset($priority[1]) - && $priority[1] != '') - { - if(isset($priority[2]) - && $priority[2] != '') - { - $query.= 'AND (`main`.`priority` = "1" - OR `main`.`priority` = "2" - OR `main`.`priority` = "3") '; - } - else - { - $query.= 'AND (`main`.`priority` = "1" - OR `main`.`priority` = "2") '; - } - } - elseif(isset($priority[2]) - && $priority[2] != '') - { - $query.= 'AND (`main`.`priority` = "1" - OR `main`.`priority` = "3") '; - } - else - { - $query.= 'AND `main`.`priority` = "1" '; - } - } - elseif($priority != NULL - && isset($priority[1]) - && $priority[1] != '') - { - if(isset($priority[2]) - && $priority[2] != '') - { - $query.= 'AND (`main`.`priority` = "2" - OR `main`.`priority` = "3") '; - } - else - { - $query.= 'AND `main`.`priority` = "2" '; - } - } - elseif($priority != NULL) - { - if(isset($priority[3]) - && $priority[3] != '') - { - $query.= 'AND `main`.`priority` = "3" '; - } - } - - if($fromdate != NULL - && $fromdate > 0) - { - $query.= 'AND `main`.`lastchange` > "' . $fromdate . '" '; - } - - if($todate != NULL - && $todate > 0) - { - $query.= 'AND `main`.`lastchange` < "' . $todate . '" '; - } - - if($message != NULL - && $message != '') - { - $query.= 'AND `main`.`message` LIKE "%' . $message . '%" '; - } - - if($customer != - 1) - { - $query.= 'AND `main`.`customerid` = "' . $customer . '" '; - } - - if($categories != NULL) - { - if($categories[0] != '') - { - $query.= 'AND ('; - } - - foreach($categories as $catid) - { - if(isset($catid) - && $catid > 0) - { - $query.= '`main`.`category` = "' . $catid . '" OR '; - } - } - - if($categories[0] != '') - { - $query = substr($query, 0, strlen($query) - 3); - $query.= ') '; - } - } - - return $query; - } - - /** - * Get statustext by status-no - */ - - static public function getStatusText($_lng, $_status = 0) - { - switch($_status) - { - case 0: - return $_lng['ticket']['open']; - break; - case 1: - return $_lng['ticket']['wait_reply']; - break; - case 2: - return $_lng['ticket']['replied']; - break; - default: - return $_lng['ticket']['closed']; - break; - } - } - - /** - * Get prioritytext by priority-no - */ - - static public function getPriorityText($_lng, $_priority = 0) - { - switch($_priority) - { - case 1: - return $_lng['ticket']['high']; - break; - case 2: - return $_lng['ticket']['normal']; - break; - default: - return $_lng['ticket']['low']; - break; - } - } - - private function convertLatin1ToHtml($str) - { - $html_entities = array ( - "Ä" => "Ä", - "ä" => "ä", - "Ö" => "Ö", - "ö" => "ö", - "Ü" => "Ü", - "ü" => "ü", - "ß" => "ß" - /* - * @TODO continue this table for all the special-characters - */ - ); - - foreach ($html_entities as $key => $value) { - $str = str_replace($key, $value, $str); - } - return $str; - } - - /** - * Get a data-var - */ - - public function Get($_var = '', $_vartrusted = false) - { - if($_var != '') - { - if(!$_vartrusted) - { - $_var = htmlspecialchars($_var); - } - - if(isset($this->t_data[$_var])) - { - if(strtolower($_var) == 'message') - { - return htmlspecialchars_decode(nl2br($this->t_data[$_var])); - } - else - { - return $this->t_data[$_var]; - } - } - else - { - return null; - } - } - } - - /** - * Set a data-var - */ - - public function Set($_var = '', $_value = '', $_vartrusted = false, $_valuetrusted = false) - { - if($_var != '' - && $_value != '') - { - if(!$_vartrusted) - { - $_var = htmlspecialchars($_var); - } - - if(!$_valuetrusted) - { - $_value = htmlspecialchars($_value); - } - - if(strtolower($_var) == 'message' || strtolower($_var) == 'subject') - { - $_value = $this->convertLatin1ToHtml($_value); - } - - $this->t_data[$_var] = $_value; - } - } -} - -?> + + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Logger + * @version $Id$ + * @link http://www.nutime.de/ + * + * Support Tickets - Tickets-Class + */ + +class ticket +{ + /** + * Userinfo + * @var array + */ + + private $userinfo = array(); + + /** + * Database handler + * @var db + */ + + private $db = false; + + /** + * Settings array + * @var settings + */ + + private $settings = array(); + + /** + * Ticket ID + * @var tid + */ + + private $tid = - 1; + + /** + * Ticket Data Array + * @var t_data + */ + + private $t_data = array(); + + /** + * Ticket-Object-Array + * @var tickets + */ + + static private $tickets = array(); + + /** + * Class constructor. + * + * @param array userinfo + * @param resource database + * @param array settings + * @param int ticket id + */ + + private function __construct($userinfo, $db, $settings, $tid = - 1) + { + $this->userinfo = $userinfo; + $this->db = $db; + $this->settings = $settings; + $this->tid = $tid; + + // initialize data array + + $this->initData(); + + // read data from database + + $this->readData(); + } + + /** + * Singleton ftw ;-) + * + * @param int ticket id + */ + + static public function getInstanceOf($_usernfo, $_db, $_settings, $_tid) + { + if(!isset(self::$tickets[$_tid])) + { + self::$tickets[$_tid] = new ticket($_usernfo, $_db, $_settings, $_tid); + } + + return self::$tickets[$_tid]; + } + + /** + * Initialize data-array + */ + + private function initData() + { + $this->Set('customer', 0, true, true); + $this->Set('admin', 1, true, true); + $this->Set('subject', '', true, true); + $this->Set('category', '0', true, true); + $this->Set('priority', '2', true, true); + $this->Set('message', '', true, true); + $this->Set('dt', 0, true, true); + $this->Set('lastchange', 0, true, true); + $this->Set('ip', '', true, true); + $this->Set('status', '0', true, true); + $this->Set('lastreplier', '0', true, true); + $this->Set('by', '0', true, true); + $this->Set('answerto', '0', true, true); + $this->Set('archived', '0', true, true); + } + + /** + * Read ticket data from database. + */ + + private function readData() + { + if(isset($this->tid) + && $this->tid != - 1) + { + $_ticket = $this->db->query_first('SELECT * FROM `' . TABLE_PANEL_TICKETS . '` WHERE `id` = "' . $this->tid . '"'); + $this->Set('customer', $_ticket['customerid'], true, false); + $this->Set('admin', $_ticket['adminid'], true, false); + $this->Set('subject', $_ticket['subject'], true, false); + $this->Set('category', $_ticket['category'], true, false); + $this->Set('priority', $_ticket['priority'], true, false); + $this->Set('message', $_ticket['message'], true, false); + $this->Set('dt', $_ticket['dt'], true, false); + $this->Set('lastchange', $_ticket['lastchange'], true, false); + $this->Set('ip', $_ticket['ip'], true, false); + $this->Set('status', $_ticket['status'], true, false); + $this->Set('lastreplier', $_ticket['lastreplier'], true, false); + $this->Set('by', $_ticket['by'], true, false); + $this->Set('answerto', $_ticket['answerto'], true, false); + $this->Set('archived', $_ticket['archived'], true, false); + } + } + + /** + * Insert data to database + */ + + public function Insert() + { + $this->db->query("INSERT INTO `" . TABLE_PANEL_TICKETS . "` + (`customerid`, + `adminid`, + `category`, + `priority`, + `subject`, + `message`, + `dt`, + `lastchange`, + `ip`, + `status`, + `lastreplier`, + `by`, + `answerto`) + VALUES + ('" . (int)$this->Get('customer') . "', + '" . (int)$this->Get('admin') . "', + '" . (int)$this->Get('category') . "', + '" . (int)$this->Get('priority') . "', + '" . $this->db->escape($this->Get('subject')) . "', + '" . $this->db->escape($this->Get('message')) . "', + '" . (int)$this->Get('dt') . "', + '" . (int)$this->Get('lastchange') . "', + '" . $this->db->escape($this->Get('ip')) . "', + '" . (int)$this->Get('status') . "', + '" . (int)$this->Get('lastreplier') . "', + '" . (int)$this->Get('by') . "', + '" . (int)$this->Get('answerto') . "');"); + $this->tid = $this->db->insert_id(); + return true; + } + + /** + * Update data in database + */ + + public function Update() + { + // Update "main" ticket + + $this->db->query('UPDATE `' . TABLE_PANEL_TICKETS . '` SET + `priority` = "' . (int)$this->Get('priority') . '", + `lastchange` = "' . (int)$this->Get('lastchange') . '", + `status` = "' . (int)$this->Get('status') . '", + `lastreplier` = "' . (int)$this->Get('lastreplier') . '" + WHERE `id` = "' . (int)$this->tid . '";'); + return true; + } + + /** + * Moves a ticket to the archive + */ + + public function Archive() + { + // Update "main" ticket + + $this->db->query('UPDATE `' . TABLE_PANEL_TICKETS . '` SET `archived` = "1" WHERE `id` = "' . (int)$this->tid . '";'); + + // Update "answers" to ticket + + $this->db->query('UPDATE `' . TABLE_PANEL_TICKETS . '` SET `archived` = "1" WHERE `answerto` = "' . (int)$this->tid . '";'); + return true; + } + + /** + * Remove ticket from database + */ + + public function Delete() + { + // Delete "main" ticket + + $this->db->query('DELETE FROM `' . TABLE_PANEL_TICKETS . '` WHERE `id` = "' . (int)$this->tid . '";'); + + // Delete "answers" to ticket" + + $this->db->query('DELETE FROM `' . TABLE_PANEL_TICKETS . '` WHERE `answerto` = "' . (int)$this->tid . '";'); + return true; + } + + /** + * Mail notifications + */ + + public function sendMail($customerid = - 1, $template_subject = null, $default_subject = null, $template_body = null, $default_body = null) + { + global $mail; + + // Some checks are to be made here in the future + + if($customerid != - 1) + { + // Get e-mail message for customer + + $usr = $this->db->query_first('SELECT `name`, `firstname`, `email` + FROM `' . TABLE_PANEL_CUSTOMERS . '` + WHERE `customerid` = "' . (int)$customerid . '"'); + $replace_arr = array( + 'FIRSTNAME' => $usr['firstname'], + 'NAME' => $usr['name'], + 'SUBJECT' => $this->Get('subject', true) + ); + } + else + { + $replace_arr = array( + 'SUBJECT' => $this->Get('subject', true) + ); + } + + $result = $this->db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` + WHERE `adminid`=\'' . (int)$this->userinfo['adminid'] . '\' + AND `language`=\'' . $this->db->escape($this->userinfo['def_language']) . '\' + AND `templategroup`=\'mails\' + AND `varname`=\'' . $template_subject . '\''); + $mail_subject = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $default_subject), $replace_arr)); + $result = $this->db->query_first('SELECT `value` FROM `' . TABLE_PANEL_TEMPLATES . '` + WHERE `adminid`=\'' . (int)$this->userinfo['adminid'] . '\' + AND `language`=\'' . $this->db->escape($this->userinfo['def_language']) . '\' + AND `templategroup`=\'mails\' + AND `varname`=\'' . $template_body . '\''); + $mail_body = html_entity_decode(replace_variables((($result['value'] != '') ? $result['value'] : $default_body), $replace_arr)); + + if($customerid != - 1) + { + $mail->From = $this->settings['ticket']['noreply_email']; + $mail->FromName = $this->settings['ticket']['noreply_name']; + $mail->Subject = $mail_subject; + $mail->Body = $mail_body; + $mail->AddAddress($usr['email'], $usr['firstname'] . ' ' . $usr['name']); + + if(!$mail->Send()) + { + standard_error(array('errorsendingmail', $usr['email'])); + } + + $mail->ClearAddresses(); + } + else + { + $admin = $this->db->query_first("SELECT `email` FROM `" . TABLE_PANEL_ADMINS . "` WHERE `adminid`='" . (int)$this->userinfo['adminid'] . "'"); + $mail->From = $this->settings['ticket']['noreply_email']; + $mail->FromName = $this->settings['ticket']['noreply_name']; + $mail->Subject = $mail_subject; + $mail->Body = $mail_body; + $mail->AddAddress($admin['email'], $admin['firstname'] . ' ' . $admin['name']); + + if(!$mail->Send()) + { + standard_error(array('errorsendingmail', $admin['email'])); + } + + $mail->ClearAddresses(); + } + } + + /** + * Add a support-categories + */ + + static public function addCategory($_db, $_category = null, $_admin = 1) + { + if($_category != null + && $_category != '') + { + $_db->query('INSERT INTO `' . TABLE_PANEL_TICKET_CATS . '` (`name`, `adminid`) VALUES ("' . $_db->escape($_category) . '", "' . (int)$_admin . '")'); + return true; + } + + return false; + } + + /** + * Edit a support-categories + */ + + static public function editCategory($_db, $_category = null, $_id = 0) + { + if($_category != null + && $_category != '' + && $_id != 0) + { + $_db->query('UPDATE `' . TABLE_PANEL_TICKET_CATS . '` SET `name` = "' . $_db->escape($_category) . '" + WHERE `id` = "' . (int)$_id . '"'); + return true; + } + + return false; + } + + /** + * Delete a support-categories + */ + + static public function deleteCategory($_db, $_id = 0) + { + if($_id != 0) + { + $result = $_db->query_first('SELECT COUNT(`id`) as `numtickets` FROM `' . TABLE_PANEL_TICKETS . '` + WHERE `category` = "' . (int)$_id . '"'); + + if($result['numtickets'] == "0") + { + $_db->query('DELETE FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `id` = "' . (int)$_id . '"'); + return true; + } + else + { + return false; + } + } + + return false; + } + + /** + * Return a support-category-name + */ + + static public function getCategoryName($_db, $_id = 0) + { + if($_id != 0) + { + $category = $_db->query_first('SELECT `name` FROM `' . TABLE_PANEL_TICKET_CATS . '` WHERE `id` = "' . (int)$_id . '"'); + return $category['name']; + } + + return null; + } + + /** + * returns the last x archived tickets + */ + + static public function getLastArchived($_db, $_num = 10, $_admin = 1) + { + if($_num > 0) + { + $archived = array(); + $counter = 0; + $result = $_db->query('SELECT *, + (SELECT COUNT(`sub`.`id`) + FROM `' . TABLE_PANEL_TICKETS . '` `sub` + WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers` + FROM `' . TABLE_PANEL_TICKETS . '` `main` + WHERE `main`.`answerto` = "0" + AND `main`.`archived` = "1" AND `main`.`adminid` = "' . (int)$_admin . '" + ORDER BY `main`.`lastchange` DESC LIMIT 0, ' . (int)$_num); + + while($row = $_db->fetch_array($result)) + { + $archived[$counter]['id'] = $row['id']; + $archived[$counter]['customerid'] = $row['customerid']; + $archived[$counter]['adminid'] = $row['adminid']; + $archived[$counter]['lastreplier'] = $row['lastreplier']; + $archived[$counter]['ticket_answers'] = $row['ticket_answers']; + $archived[$counter]['category'] = $row['category']; + $archived[$counter]['priority'] = $row['priority']; + $archived[$counter]['subject'] = $row['subject']; + $archived[$counter]['message'] = $row['message']; + $archived[$counter]['dt'] = $row['dt']; + $archived[$counter]['lastchange'] = $row['lastchange']; + $archived[$counter]['status'] = $row['status']; + $archived[$counter]['by'] = $row['by']; + $counter++; + } + + if(isset($archived[0]['id'])) + { + return $archived; + } + else + { + return false; + } + } + } + + /** + * Returns a sql-statement to search the archive + */ + + static public function getArchiveSearchStatement($subject = NULL, $priority = NULL, $fromdate = NULL, $todate = NULL, $message = NULL, $customer = - 1, $admin = 1, $categories = NULL) + { + $query = 'SELECT `main`.*, + (SELECT COUNT(`sub`.`id`) FROM `' . TABLE_PANEL_TICKETS . '` `sub` + WHERE `sub`.`answerto` = `main`.`id`) as `ticket_answers` + FROM `' . TABLE_PANEL_TICKETS . '` `main` + WHERE `main`.`archived` = "1" AND `main`.`answerto` = "0" AND `main`.`adminid` = "' . (int)$admin . '"'; + + if($subject != NULL + && $subject != '') + { + $query.= 'AND `main`.`subject` LIKE "%' . $subject . '%" '; + } + + if($priority != NULL + && isset($priority[0]) + && $priority[0] != '') + { + if(isset($priority[1]) + && $priority[1] != '') + { + if(isset($priority[2]) + && $priority[2] != '') + { + $query.= 'AND (`main`.`priority` = "1" + OR `main`.`priority` = "2" + OR `main`.`priority` = "3") '; + } + else + { + $query.= 'AND (`main`.`priority` = "1" + OR `main`.`priority` = "2") '; + } + } + elseif(isset($priority[2]) + && $priority[2] != '') + { + $query.= 'AND (`main`.`priority` = "1" + OR `main`.`priority` = "3") '; + } + else + { + $query.= 'AND `main`.`priority` = "1" '; + } + } + elseif($priority != NULL + && isset($priority[1]) + && $priority[1] != '') + { + if(isset($priority[2]) + && $priority[2] != '') + { + $query.= 'AND (`main`.`priority` = "2" + OR `main`.`priority` = "3") '; + } + else + { + $query.= 'AND `main`.`priority` = "2" '; + } + } + elseif($priority != NULL) + { + if(isset($priority[3]) + && $priority[3] != '') + { + $query.= 'AND `main`.`priority` = "3" '; + } + } + + if($fromdate != NULL + && $fromdate > 0) + { + $query.= 'AND `main`.`lastchange` > "' . $fromdate . '" '; + } + + if($todate != NULL + && $todate > 0) + { + $query.= 'AND `main`.`lastchange` < "' . $todate . '" '; + } + + if($message != NULL + && $message != '') + { + $query.= 'AND `main`.`message` LIKE "%' . $message . '%" '; + } + + if($customer != - 1) + { + $query.= 'AND `main`.`customerid` = "' . $customer . '" '; + } + + if($categories != NULL) + { + if($categories[0] != '') + { + $query.= 'AND ('; + } + + foreach($categories as $catid) + { + if(isset($catid) + && $catid > 0) + { + $query.= '`main`.`category` = "' . $catid . '" OR '; + } + } + + if($categories[0] != '') + { + $query = substr($query, 0, strlen($query) - 3); + $query.= ') '; + } + } + + return $query; + } + + /** + * Get statustext by status-no + */ + + static public function getStatusText($_lng, $_status = 0) + { + switch($_status) + { + case 0: + return $_lng['ticket']['open']; + break; + case 1: + return $_lng['ticket']['wait_reply']; + break; + case 2: + return $_lng['ticket']['replied']; + break; + default: + return $_lng['ticket']['closed']; + break; + } + } + + /** + * Get prioritytext by priority-no + */ + + static public function getPriorityText($_lng, $_priority = 0) + { + switch($_priority) + { + case 1: + return $_lng['ticket']['high']; + break; + case 2: + return $_lng['ticket']['normal']; + break; + default: + return $_lng['ticket']['low']; + break; + } + } + + private function convertLatin1ToHtml($str) + { + $html_entities = array ( + "Ä" => "Ä", + "ä" => "ä", + "Ö" => "Ö", + "ö" => "ö", + "Ü" => "Ü", + "ü" => "ü", + "ß" => "ß" + /* + * @TODO continue this table for all the special-characters + */ + ); + + foreach ($html_entities as $key => $value) { + $str = str_replace($key, $value, $str); + } + return $str; + } + + /** + * Get a data-var + */ + + public function Get($_var = '', $_vartrusted = false) + { + if($_var != '') + { + if(!$_vartrusted) + { + $_var = htmlspecialchars($_var); + } + + if(isset($this->t_data[$_var])) + { + if(strtolower($_var) == 'message') + { + return htmlspecialchars_decode(nl2br($this->t_data[$_var])); + } + else + { + return $this->t_data[$_var]; + } + } + else + { + return null; + } + } + } + + /** + * Set a data-var + */ + + public function Set($_var = '', $_value = '', $_vartrusted = false, $_valuetrusted = false) + { + if($_var != '' + && $_value != '') + { + if(!$_vartrusted) + { + $_var = htmlspecialchars($_var); + } + + if(!$_valuetrusted) + { + $_value = htmlspecialchars($_value); + } + + if(strtolower($_var) == 'message' || strtolower($_var) == 'subject') + { + $_value = $this->convertLatin1ToHtml($_value); + } + + $this->t_data[$_var] = $_value; + } + } +} + +?> diff --git a/lib/configfiles/etch.inc.php b/lib/configfiles/etch.inc.php index 2a9d4244..79a61b95 100644 --- a/lib/configfiles/etch.inc.php +++ b/lib/configfiles/etch.inc.php @@ -1,284 +1,284 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Configfiles - * @version $Id$ - */ - -return Array( - 'debian_etch' => Array( - 'label' => 'Debian 4.0 (Etch)', - 'services' => Array( - 'http' => Array( - 'label' => $lng['admin']['configfiles']['http'], - 'daemons' => Array( - 'apache2' => Array( - 'label' => 'Apache 2', - 'commands' => Array( - 'mkdir -p ' . $settings['system']['documentroot_prefix'], - 'mkdir -p ' . $settings['system']['logfiles_directory'], - 'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'], - 'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'], - 'a2dismod userdir', - ), - 'restart' => Array( - '/etc/init.d/apache2 restart' - ), - ), - 'lighttpd' => Array( - 'label' => 'Lighttpd Webserver', - 'commands_1' => Array( - 'apt-get install lighttpd', - ), - 'files' => Array( - 'etc_lighttpd.conf' => '/etc/lighttpd/lighttpd.conf', - ), - 'commands_2' => Array( - $configcommand['vhost'], - $configcommand['diroptions'], - $configcommand['v_inclighty'], - $configcommand['d_inclighty'], - 'mkdir -p ' . $settings['system']['documentroot_prefix'], - 'mkdir -p ' . $settings['system']['logfiles_directory'], - 'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'], - 'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'], - ), - 'restart' => Array( - '/etc/init.d/lighttpd restart' - ) - ) - ) - ), - 'dns' => Array( - 'label' => $lng['admin']['configfiles']['dns'], - 'daemons' => Array( - 'bind' => Array( - 'label' => 'Bind9', - 'commands' => Array( - 'apt-get install bind9', - 'echo "include \"' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf\";" >> /etc/bind/named.conf', - 'touch ' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf' - ), - 'restart' => Array( - '/etc/init.d/bind9 restart' - ) - ), - 'powerdns' => Array( - 'label' => 'PowerDNS', - 'files' => Array( - 'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf', - 'etc_powerdns_pdns-froxlor.conf' => '/etc/powerdns/pdns_froxlor.conf', - ), - 'restart' => Array( - '/etc/init.d/pdns restart' - ) - ), - ) - ), - 'smtp' => Array( - 'label' => $lng['admin']['configfiles']['smtp'], - 'daemons' => Array( - 'postfix' => Array( - 'label' => 'Postfix', - 'commands' => Array( - 'apt-get install postfix postfix-mysql libsasl2 libsasl2-modules libsasl2-modules-sql', - 'mkdir -p /etc/postfix/sasl', - 'mkdir -p /var/spool/postfix/etc/pam.d', - 'mkdir -p /var/spool/postfix/var/run/mysqld', - 'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail', - 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail', - 'mkdir -p ' . $settings['system']['vmail_homedir'], - 'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'], - 'touch /etc/postfix/mysql-virtual_alias_maps.cf', - 'touch /etc/postfix/mysql-virtual_mailbox_domains.cf', - 'touch /etc/postfix/mysql-virtual_mailbox_maps.cf', - 'touch /etc/postfix/sasl/smtpd.conf', - 'chown root:root /etc/postfix/main.cf', - 'chown root:root /etc/postfix/master.cf', - 'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf', - 'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf', - 'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf', - 'chown root:root /etc/postfix/sasl/smtpd.conf', - 'chmod 0644 /etc/postfix/main.cf', - 'chmod 0644 /etc/postfix/master.cf', - 'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf', - 'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf', - 'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf', - 'chmod 0600 /etc/postfix/sasl/smtpd.conf', - ), - 'files' => Array( - 'etc_postfix_main.cf' => '/etc/postfix/main.cf', - 'etc_postfix_master.cf' => '/etc/postfix/master.cf', - 'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf', - 'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf', - 'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf', - 'etc_postfix_sasl_smtpd.conf' => '/etc/postfix/sasl/smtpd.conf' - ), - 'restart' => Array( - '/etc/init.d/postfix restart', - 'newaliases' - ) - ), - 'exim4' => Array( - 'label' => 'Exim4', - 'commands_1' => Array( - 'dpkg-reconfigure exim4-config', - '# choose "no configuration at this time" and "splitted configuration files" in the dialog' - ), - 'files' => Array( - 'etc_exim4_conf.d_acl_30_exim4-config_check_rcpt.rul' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt.rul', - 'etc_exim4_conf.d_auth_30_froxlor-config' => '/etc/exim4/conf.d/auth/30_froxlor-config', - 'etc_exim4_conf.d_main_10_froxlor-config_options' => '/etc/exim4/conf.d/main/10_froxlor-config_options', - 'etc_exim4_conf.d_router_180_froxlor-config' => '/etc/exim4/conf.d/router/180_froxlor-config', - 'etc_exim4_conf.d_transport_30_froxlor-config' => '/etc/exim4/conf.d/transport/30_froxlor-config' - ), - 'commands_2' => Array( - 'chmod o-rx /var/lib/exim4', - 'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options' - ), - 'restart' => Array( - '/etc/init.d/exim4 restart' - ) - ) - ) - ), - 'mail' => Array( - 'label' => $lng['admin']['configfiles']['mail'], - 'daemons' => Array( - 'courier' => Array( - 'label' => 'Courier', - 'commands' => Array( - 'apt-get install courier-pop courier-imap courier-authlib-mysql' - ), - 'files' => Array( - 'etc_courier_authdaemonrc' => '/etc/courier/authdaemonrc', - 'etc_courier_authmysqlrc' => '/etc/courier/authmysqlrc' - ), - 'restart' => Array( - '/etc/init.d/courier-authdaemon restart', - '/etc/init.d/courier-pop restart' - ) - ), - 'dovecot' => Array( - 'label' => 'Dovecot', - 'commands' => Array( - 'apt-get install dovecot-imapd dovecot-pop3d' - ), - 'files' => Array( - 'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf', - 'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf' - ), - 'restart' => Array( - '/etc/init.d/dovecot restart' - ) - ) - ) - ), - 'ftp' => Array( - 'label' => $lng['admin']['configfiles']['ftp'], - 'daemons' => Array( - 'proftpd' => Array( - 'label' => 'ProFTPd', - 'files' => Array( - 'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf', - 'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf' - ), - 'restart' => Array( - '/etc/init.d/proftpd restart' - ) - ), - 'pure-ftpd' => Array( - 'label' => 'Pure FTPd', - 'commands' => Array( - 'apt-get install pure-ftpd-common pure-ftpd-mysql' - ), - 'files' => Array( - 'etc_pure-ftpd_conf_MinUID' => '/etc/pure-ftpd/conf/MinUID', - 'etc_pure-ftpd_conf_MySQLConfigFile' => '/etc/pure-ftpd/conf/MySQLConfigFile', - 'etc_pure-ftpd_conf_NoAnonymous' => '/etc/pure-ftpd/conf/NoAnonymous', - 'etc_pure-ftpd_conf_MaxIdleTime' => '/etc/pure-ftpd/conf/MaxIdleTime', - 'etc_pure-ftpd_conf_ChrootEveryone' => '/etc/pure-ftpd/conf/ChrootEveryone', - 'etc_pure-ftpd_conf_PAMAuthentication' => '/etc/pure-ftpd/conf/PAMAuthentication', - 'etc_pure-ftpd_db_mysql.conf' => '/etc/pure-ftpd/db/mysql.conf', - 'etc_pure-ftpd_conf_CustomerProof' => '/etc/pure-ftpd/conf/CustomerProof', - 'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind', - 'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common' - ), - 'restart' => Array( - '/etc/init.d/pure-ftpd-mysql restart' - ) - ), - ) - ), - 'etc' => Array( - 'label' => $lng['admin']['configfiles']['etc'], - 'daemons' => Array( - 'cron' => Array( - 'label' => 'Crond (cronscript)', - 'files' => Array( - 'etc_cron.d_froxlor' => '/etc/cron.d/froxlor' - ), - 'restart' => Array( - '/etc/init.d/cron restart' - ) - ), - 'xinetd' => Array( - 'label' => 'xinet.d (froxlor updates in realtime)', - 'commands' => Array( - 'apt-get install xinetd' - ), - 'files' => Array( - 'etc_xinet.d_froxlor' => '/etc/xinetd.d/froxlor' - ), - 'restart' => Array( - '/etc/init.d/xinetd restart' - ) - ), - 'awstats' => Array( - 'label' => 'Awstats', - 'files' => Array( - ($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor', - ($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats', - ($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf') - ), - 'commands' => Array( - ($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '') - ), - 'restart' => Array( - ($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart') - ) - ), - 'libnss' => Array( - 'label' => 'libnss (system login with mysql)', - 'commands' => Array( - 'apt-get install libnss-mysql nscd', - 'chmod 600 /etc/nss-mysql.conf /etc/nss-mysql-root.conf' - ), - 'files' => Array( - 'etc_nss-mysql.conf' => '/etc/nss-mysql.conf', - 'etc_nss-mysql-root.conf' => '/etc/nss-mysql-root.conf', - 'etc_nsswitch.conf' => '/etc/nsswitch.conf', - ), - 'restart' => Array( - '/etc/init.d/nscd restart' - ) - ) - ) - ) - ) - ) -); - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Configfiles + * @version $Id$ + */ + +return Array( + 'debian_etch' => Array( + 'label' => 'Debian 4.0 (Etch)', + 'services' => Array( + 'http' => Array( + 'label' => $lng['admin']['configfiles']['http'], + 'daemons' => Array( + 'apache2' => Array( + 'label' => 'Apache 2', + 'commands' => Array( + 'mkdir -p ' . $settings['system']['documentroot_prefix'], + 'mkdir -p ' . $settings['system']['logfiles_directory'], + 'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'], + 'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'], + 'a2dismod userdir', + ), + 'restart' => Array( + '/etc/init.d/apache2 restart' + ), + ), + 'lighttpd' => Array( + 'label' => 'Lighttpd Webserver', + 'commands_1' => Array( + 'apt-get install lighttpd', + ), + 'files' => Array( + 'etc_lighttpd.conf' => '/etc/lighttpd/lighttpd.conf', + ), + 'commands_2' => Array( + $configcommand['vhost'], + $configcommand['diroptions'], + $configcommand['v_inclighty'], + $configcommand['d_inclighty'], + 'mkdir -p ' . $settings['system']['documentroot_prefix'], + 'mkdir -p ' . $settings['system']['logfiles_directory'], + 'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'], + 'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'], + ), + 'restart' => Array( + '/etc/init.d/lighttpd restart' + ) + ) + ) + ), + 'dns' => Array( + 'label' => $lng['admin']['configfiles']['dns'], + 'daemons' => Array( + 'bind' => Array( + 'label' => 'Bind9', + 'commands' => Array( + 'apt-get install bind9', + 'echo "include \"' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf\";" >> /etc/bind/named.conf', + 'touch ' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf' + ), + 'restart' => Array( + '/etc/init.d/bind9 restart' + ) + ), + 'powerdns' => Array( + 'label' => 'PowerDNS', + 'files' => Array( + 'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf', + 'etc_powerdns_pdns-froxlor.conf' => '/etc/powerdns/pdns_froxlor.conf', + ), + 'restart' => Array( + '/etc/init.d/pdns restart' + ) + ), + ) + ), + 'smtp' => Array( + 'label' => $lng['admin']['configfiles']['smtp'], + 'daemons' => Array( + 'postfix' => Array( + 'label' => 'Postfix', + 'commands' => Array( + 'apt-get install postfix postfix-mysql libsasl2 libsasl2-modules libsasl2-modules-sql', + 'mkdir -p /etc/postfix/sasl', + 'mkdir -p /var/spool/postfix/etc/pam.d', + 'mkdir -p /var/spool/postfix/var/run/mysqld', + 'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail', + 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail', + 'mkdir -p ' . $settings['system']['vmail_homedir'], + 'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'], + 'touch /etc/postfix/mysql-virtual_alias_maps.cf', + 'touch /etc/postfix/mysql-virtual_mailbox_domains.cf', + 'touch /etc/postfix/mysql-virtual_mailbox_maps.cf', + 'touch /etc/postfix/sasl/smtpd.conf', + 'chown root:root /etc/postfix/main.cf', + 'chown root:root /etc/postfix/master.cf', + 'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf', + 'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf', + 'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf', + 'chown root:root /etc/postfix/sasl/smtpd.conf', + 'chmod 0644 /etc/postfix/main.cf', + 'chmod 0644 /etc/postfix/master.cf', + 'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf', + 'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf', + 'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf', + 'chmod 0600 /etc/postfix/sasl/smtpd.conf', + ), + 'files' => Array( + 'etc_postfix_main.cf' => '/etc/postfix/main.cf', + 'etc_postfix_master.cf' => '/etc/postfix/master.cf', + 'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf', + 'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf', + 'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf', + 'etc_postfix_sasl_smtpd.conf' => '/etc/postfix/sasl/smtpd.conf' + ), + 'restart' => Array( + '/etc/init.d/postfix restart', + 'newaliases' + ) + ), + 'exim4' => Array( + 'label' => 'Exim4', + 'commands_1' => Array( + 'dpkg-reconfigure exim4-config', + '# choose "no configuration at this time" and "splitted configuration files" in the dialog' + ), + 'files' => Array( + 'etc_exim4_conf.d_acl_30_exim4-config_check_rcpt.rul' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt.rul', + 'etc_exim4_conf.d_auth_30_froxlor-config' => '/etc/exim4/conf.d/auth/30_froxlor-config', + 'etc_exim4_conf.d_main_10_froxlor-config_options' => '/etc/exim4/conf.d/main/10_froxlor-config_options', + 'etc_exim4_conf.d_router_180_froxlor-config' => '/etc/exim4/conf.d/router/180_froxlor-config', + 'etc_exim4_conf.d_transport_30_froxlor-config' => '/etc/exim4/conf.d/transport/30_froxlor-config' + ), + 'commands_2' => Array( + 'chmod o-rx /var/lib/exim4', + 'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options' + ), + 'restart' => Array( + '/etc/init.d/exim4 restart' + ) + ) + ) + ), + 'mail' => Array( + 'label' => $lng['admin']['configfiles']['mail'], + 'daemons' => Array( + 'courier' => Array( + 'label' => 'Courier', + 'commands' => Array( + 'apt-get install courier-pop courier-imap courier-authlib-mysql' + ), + 'files' => Array( + 'etc_courier_authdaemonrc' => '/etc/courier/authdaemonrc', + 'etc_courier_authmysqlrc' => '/etc/courier/authmysqlrc' + ), + 'restart' => Array( + '/etc/init.d/courier-authdaemon restart', + '/etc/init.d/courier-pop restart' + ) + ), + 'dovecot' => Array( + 'label' => 'Dovecot', + 'commands' => Array( + 'apt-get install dovecot-imapd dovecot-pop3d' + ), + 'files' => Array( + 'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf', + 'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf' + ), + 'restart' => Array( + '/etc/init.d/dovecot restart' + ) + ) + ) + ), + 'ftp' => Array( + 'label' => $lng['admin']['configfiles']['ftp'], + 'daemons' => Array( + 'proftpd' => Array( + 'label' => 'ProFTPd', + 'files' => Array( + 'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf', + 'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf' + ), + 'restart' => Array( + '/etc/init.d/proftpd restart' + ) + ), + 'pure-ftpd' => Array( + 'label' => 'Pure FTPd', + 'commands' => Array( + 'apt-get install pure-ftpd-common pure-ftpd-mysql' + ), + 'files' => Array( + 'etc_pure-ftpd_conf_MinUID' => '/etc/pure-ftpd/conf/MinUID', + 'etc_pure-ftpd_conf_MySQLConfigFile' => '/etc/pure-ftpd/conf/MySQLConfigFile', + 'etc_pure-ftpd_conf_NoAnonymous' => '/etc/pure-ftpd/conf/NoAnonymous', + 'etc_pure-ftpd_conf_MaxIdleTime' => '/etc/pure-ftpd/conf/MaxIdleTime', + 'etc_pure-ftpd_conf_ChrootEveryone' => '/etc/pure-ftpd/conf/ChrootEveryone', + 'etc_pure-ftpd_conf_PAMAuthentication' => '/etc/pure-ftpd/conf/PAMAuthentication', + 'etc_pure-ftpd_db_mysql.conf' => '/etc/pure-ftpd/db/mysql.conf', + 'etc_pure-ftpd_conf_CustomerProof' => '/etc/pure-ftpd/conf/CustomerProof', + 'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind', + 'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common' + ), + 'restart' => Array( + '/etc/init.d/pure-ftpd-mysql restart' + ) + ), + ) + ), + 'etc' => Array( + 'label' => $lng['admin']['configfiles']['etc'], + 'daemons' => Array( + 'cron' => Array( + 'label' => 'Crond (cronscript)', + 'files' => Array( + 'etc_cron.d_froxlor' => '/etc/cron.d/froxlor' + ), + 'restart' => Array( + '/etc/init.d/cron restart' + ) + ), + 'xinetd' => Array( + 'label' => 'xinet.d (froxlor updates in realtime)', + 'commands' => Array( + 'apt-get install xinetd' + ), + 'files' => Array( + 'etc_xinet.d_froxlor' => '/etc/xinetd.d/froxlor' + ), + 'restart' => Array( + '/etc/init.d/xinetd restart' + ) + ), + 'awstats' => Array( + 'label' => 'Awstats', + 'files' => Array( + ($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor', + ($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats', + ($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf') + ), + 'commands' => Array( + ($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '') + ), + 'restart' => Array( + ($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart') + ) + ), + 'libnss' => Array( + 'label' => 'libnss (system login with mysql)', + 'commands' => Array( + 'apt-get install libnss-mysql nscd', + 'chmod 600 /etc/nss-mysql.conf /etc/nss-mysql-root.conf' + ), + 'files' => Array( + 'etc_nss-mysql.conf' => '/etc/nss-mysql.conf', + 'etc_nss-mysql-root.conf' => '/etc/nss-mysql-root.conf', + 'etc_nsswitch.conf' => '/etc/nsswitch.conf', + ), + 'restart' => Array( + '/etc/init.d/nscd restart' + ) + ) + ) + ) + ) + ) +); + +?> diff --git a/lib/configfiles/gentoo.inc.php b/lib/configfiles/gentoo.inc.php index c2037f8b..5a563826 100644 --- a/lib/configfiles/gentoo.inc.php +++ b/lib/configfiles/gentoo.inc.php @@ -1,301 +1,301 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Configfiles - * @version $Id$ - */ - -return Array( - 'gentoo' => Array( - 'label' => 'Gentoo', - 'services' => Array( - 'http' => Array( - 'label' => $lng['admin']['configfiles']['http'], - 'daemons' => Array( - 'apache2' => Array( - 'label' => 'Apache2 Webserver', - 'commands' => Array( - 'touch ' . $settings['system']['apacheconf_vhost'], - 'chown root:0 ' . $settings['system']['apacheconf_vhost'], - 'chmod 0600 ' . $settings['system']['apacheconf_vhost'], - 'touch ' . $settings['system']['apacheconf_diroptions'], - 'chown root:0 ' . $settings['system']['apacheconf_diroptions'], - 'chmod 0600 ' . $settings['system']['apacheconf_diroptions'], - 'mkdir -p ' . $settings['system']['documentroot_prefix'], - 'mkdir -p ' . $settings['system']['logfiles_directory'], - 'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'], - 'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'], - ), - 'restart' => Array( - 'rc-update add apache2 default', - '/etc/init.d/apache2 restart' - ) - ), - 'lighttpd' => Array( - 'label' => 'Lighttpd Webserver', - 'files' => Array( - 'etc_lighttpd.conf' => '/etc/lighttpd/lighttpd.conf' - ), - 'commands' => Array( - $configcommand['vhost'], - $configcommand['diroptions'], - $configcommand['v_inclighty'], - $configcommand['d_inclighty'], - 'mkdir -p ' . $settings['system']['documentroot_prefix'], - 'mkdir -p ' . $settings['system']['logfiles_directory'] - ), - 'restart' => Array( - 'rc-update add lighttpd default', - '/etc/init.d/lighttpd restart' - ) - ) - ) - ), - 'dns' => Array( - 'label' => $lng['admin']['configfiles']['dns'], - 'daemons' => Array( - 'bind' => Array( - 'label' => 'Bind9 Nameserver', - 'files' => Array( - 'etc_bind_default.zone' => '/etc/bind/default.zone' - ), - 'commands' => Array( - 'echo "include \"' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf\";" >> /etc/bind/named.conf', - 'touch ' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf', - 'chown root:0 ' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf', - 'chmod 0600 ' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf' - ), - 'restart' => Array( - 'rc-update add named default', - '/etc/init.d/named restart' - ) - ), - ) - ), - 'smtp' => Array( - 'label' => $lng['admin']['configfiles']['smtp'], - 'daemons' => Array( - 'postfix' => Array( - 'label' => 'Postfix', - 'commands_1' => Array( - 'mkdir -p ' . $settings['system']['vmail_homedir'], - 'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'], - 'chmod 0750 ' . $settings['system']['vmail_homedir'], - 'mv /etc/postfix/main.cf /etc/postfix/main.cf.gentoo', - 'touch /etc/postfix/main.cf', - 'touch /etc/postfix/master.cf', - 'touch /etc/postfix/mysql-virtual_alias_maps.cf', - 'touch /etc/postfix/mysql-virtual_mailbox_domains.cf', - 'touch /etc/postfix/mysql-virtual_mailbox_maps.cf', - 'touch /etc/sasl2/smtpd.conf', - 'chown root:root /etc/postfix/main.cf', - 'chown root:root /etc/postfix/master.cf', - 'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf', - 'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf', - 'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf', - 'chown root:root /etc/sasl2/smtpd.conf', - 'chmod 0644 /etc/postfix/main.cf', - 'chmod 0644 /etc/postfix/master.cf', - 'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf', - 'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf', - 'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf', - 'chmod 0600 /etc/sasl2/smtpd.conf', - ), - 'files' => Array( - 'etc_postfix_main.cf' => '/etc/postfix/main.cf', - 'etc_postfix_master.cf' => '/etc/postfix/master.cf', - 'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf', - 'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf', - 'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf', - 'etc_sasl2_smtpd.conf' => '/etc/sasl2/smtpd.conf' - ), - 'restart' => Array( - 'rc-update add postfix default', - '/etc/init.d/postfix restart' - ) - ), - 'dkim' => Array( - 'label' => 'DomainKey filter', - 'commands_1' => Array( - 'mkdir -p /etc/postfix/dkim' - ), - 'files' => Array( - 'dkim-filter.conf' => '/etc/postfix/dkim/dkim-filter.conf' - ), - 'commands_2' => Array( - 'chgrp postfix /etc/postfix/dkim/dkim-filter.conf', - 'echo "smtpd_milters = inet:localhost:8891\n -milter_macro_daemon_name = SIGNING\n -milter_default_action = accept\n" >> /etc/postfix/main.cf' - ), - 'restart' => Array( - '/etc/init.d/dkim-filter restart' - ) - ) - ) - ), - 'mail' => Array( - 'label' => $lng['admin']['configfiles']['mail'], - 'daemons' => Array( - 'courier' => Array( - 'label' => 'Courier-IMAP (POP3/IMAP)', - 'files' => Array( - 'etc_courier_authlib_authdaemonrc' => '/etc/courier/authlib/authdaemonrc', - 'etc_courier_authlib_authmysqlrc' => '/etc/courier/authlib/authmysqlrc', - 'etc_courier-imap_pop3d' => '/etc/courier-imap/pop3d', - 'etc_courier-imap_imapd' => '/etc/courier-imap/imapd', - 'etc_courier-imap_pop3d-ssl' => '/etc/courier-imap/pop3d-ssl', - 'etc_courier-imap_imapd-ssl' => '/etc/courier-imap/imapd-ssl' - ), - 'commands' => Array( - 'rm /etc/courier/authlib/authdaemonrc', - 'rm /etc/courier/authlib/authmysqlrc', - 'rm /etc/courier-imap/pop3d', - 'rm /etc/courier-imap/imapd', - 'rm /etc/courier-imap/pop3d-ssl', - 'rm /etc/courier-imap/imapd-ssl', - 'touch /etc/courier/authlib/authdaemonrc', - 'touch /etc/courier/authlib/authmysqlrc', - 'touch /etc/courier-imap/pop3d', - 'touch /etc/courier-imap/imapd', - 'touch /etc/courier-imap/pop3d-ssl', - 'touch /etc/courier-imap/imapd-ssl', - 'chown root:0 /etc/courier/authlib/authdaemonrc', - 'chown root:0 /etc/courier/authlib/authmysqlrc', - 'chown root:0 /etc/courier-imap/pop3d', - 'chown root:0 /etc/courier-imap/imapd', - 'chown root:0 /etc/courier-imap/pop3d-ssl', - 'chown root:0 /etc/courier-imap/imapd-ssl', - 'chmod 0600 /etc/courier/authlib/authdaemonrc', - 'chmod 0600 /etc/courier/authlib/authmysqlrc', - 'chmod 0600 /etc/courier-imap/pop3d', - 'chmod 0600 /etc/courier-imap/imapd', - 'chmod 0600 /etc/courier-imap/pop3d-ssl', - 'chmod 0600 /etc/courier-imap/imapd-ssl' - ), - 'restart' => Array( - 'rc-update add courier-authlib default', - 'rc-update add courier-pop3d default', - 'rc-update add courier-imapd default', - '/etc/init.d/courier-authlib restart', - '/etc/init.d/courier-pop3d restart', - '/etc/init.d/courier-imapd restart' - ) - ), - 'dovecot' => Array( - 'label' => 'Dovecot', - 'commands_1' => Array( - 'mv dovecot.conf dovecot.conf.gentoo', - 'mv dovecot-sql.conf dovecot-sql.conf.gentoo', - 'touch dovecot.conf', - 'touch dovecot-sql.conf', - ), - 'files' => Array( - 'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf', - 'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf' - ), - 'restart' => Array( - '/etc/init.d/dovecot restart' - ) - ) - ) - ), - 'ftp' => Array( - 'label' => $lng['admin']['configfiles']['ftp'], - 'daemons' => Array( - 'proftpd' => Array( - 'label' => 'ProFTPd', - 'files' => Array( - 'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf' - ), - 'commands' => Array( - 'touch /etc/proftpd/proftpd.conf', - 'chown root:0 /etc/proftpd/proftpd.conf', - 'chmod 0600 /etc/proftpd/proftpd.conf' - ), - 'restart' => Array( - 'rc-update add proftpd default', - '/etc/init.d/proftpd restart' - ) - ), - ) - ), - 'etc' => Array( - 'label' => $lng['admin']['configfiles']['etc'], - 'daemons' => Array( - 'cron' => Array( - 'label' => 'Crond (cronscript)', - 'files' => Array( - 'etc_cron.d_froxlor' => '/etc/cron.d/froxlor' - ), - 'commands' => Array( - 'touch /etc/cron.d/froxlor', - 'chown root:0 /etc/cron.d/froxlor', - 'chmod 0640 /etc/cron.d/froxlor', - ), - 'restart' => Array( - 'rc-update add vixie-cron default', - '/etc/init.d/vixie-cron restart' - ) - ), - 'xinetd' => Array( - 'label' => 'xinet.d (froxlor updates in realtime)', - 'commands' => Array( - 'emerge -av xinetd' - ), - 'files' => Array( - 'etc_xinet.d_froxlor' => '/etc/xinetd.d/froxlor' - ), - 'restart' => Array( - '/etc/init.d/xinetd restart' - ) - ), - 'awstats' => Array( - 'label' => 'Awstats', - 'files' => Array( - ($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor', - ($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats', - ($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf') - ), - 'commands' => Array( - ($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '') - ), - 'restart' => Array( - ($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart') - ) - ), - 'libnss' => Array( - 'label' => 'libnss (system login with mysql)', - 'files' => Array( - 'etc_libnss-mysql.cfg' => '/etc/libnss-mysql.cfg', - 'etc_libnss-mysql-root.cfg' => '/etc/libnss-mysql-root.cfg', - 'etc_nsswitch.conf' => '/etc/nsswitch.conf', - ), - 'commands' => Array( - 'emerge -av libnss-mysql', - 'chmod 600 /etc/libnss-mysql.cfg /etc/libnss-mysql-root.cfg' - ), - 'restart' => Array( - 'rc-update add nscd default', - '/etc/init.d/nscd restart' - ) - ) - ) - ) - ) - ) -); - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Configfiles + * @version $Id$ + */ + +return Array( + 'gentoo' => Array( + 'label' => 'Gentoo', + 'services' => Array( + 'http' => Array( + 'label' => $lng['admin']['configfiles']['http'], + 'daemons' => Array( + 'apache2' => Array( + 'label' => 'Apache2 Webserver', + 'commands' => Array( + 'touch ' . $settings['system']['apacheconf_vhost'], + 'chown root:0 ' . $settings['system']['apacheconf_vhost'], + 'chmod 0600 ' . $settings['system']['apacheconf_vhost'], + 'touch ' . $settings['system']['apacheconf_diroptions'], + 'chown root:0 ' . $settings['system']['apacheconf_diroptions'], + 'chmod 0600 ' . $settings['system']['apacheconf_diroptions'], + 'mkdir -p ' . $settings['system']['documentroot_prefix'], + 'mkdir -p ' . $settings['system']['logfiles_directory'], + 'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'], + 'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'], + ), + 'restart' => Array( + 'rc-update add apache2 default', + '/etc/init.d/apache2 restart' + ) + ), + 'lighttpd' => Array( + 'label' => 'Lighttpd Webserver', + 'files' => Array( + 'etc_lighttpd.conf' => '/etc/lighttpd/lighttpd.conf' + ), + 'commands' => Array( + $configcommand['vhost'], + $configcommand['diroptions'], + $configcommand['v_inclighty'], + $configcommand['d_inclighty'], + 'mkdir -p ' . $settings['system']['documentroot_prefix'], + 'mkdir -p ' . $settings['system']['logfiles_directory'] + ), + 'restart' => Array( + 'rc-update add lighttpd default', + '/etc/init.d/lighttpd restart' + ) + ) + ) + ), + 'dns' => Array( + 'label' => $lng['admin']['configfiles']['dns'], + 'daemons' => Array( + 'bind' => Array( + 'label' => 'Bind9 Nameserver', + 'files' => Array( + 'etc_bind_default.zone' => '/etc/bind/default.zone' + ), + 'commands' => Array( + 'echo "include \"' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf\";" >> /etc/bind/named.conf', + 'touch ' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf', + 'chown root:0 ' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf', + 'chmod 0600 ' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf' + ), + 'restart' => Array( + 'rc-update add named default', + '/etc/init.d/named restart' + ) + ), + ) + ), + 'smtp' => Array( + 'label' => $lng['admin']['configfiles']['smtp'], + 'daemons' => Array( + 'postfix' => Array( + 'label' => 'Postfix', + 'commands_1' => Array( + 'mkdir -p ' . $settings['system']['vmail_homedir'], + 'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'], + 'chmod 0750 ' . $settings['system']['vmail_homedir'], + 'mv /etc/postfix/main.cf /etc/postfix/main.cf.gentoo', + 'touch /etc/postfix/main.cf', + 'touch /etc/postfix/master.cf', + 'touch /etc/postfix/mysql-virtual_alias_maps.cf', + 'touch /etc/postfix/mysql-virtual_mailbox_domains.cf', + 'touch /etc/postfix/mysql-virtual_mailbox_maps.cf', + 'touch /etc/sasl2/smtpd.conf', + 'chown root:root /etc/postfix/main.cf', + 'chown root:root /etc/postfix/master.cf', + 'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf', + 'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf', + 'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf', + 'chown root:root /etc/sasl2/smtpd.conf', + 'chmod 0644 /etc/postfix/main.cf', + 'chmod 0644 /etc/postfix/master.cf', + 'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf', + 'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf', + 'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf', + 'chmod 0600 /etc/sasl2/smtpd.conf', + ), + 'files' => Array( + 'etc_postfix_main.cf' => '/etc/postfix/main.cf', + 'etc_postfix_master.cf' => '/etc/postfix/master.cf', + 'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf', + 'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf', + 'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf', + 'etc_sasl2_smtpd.conf' => '/etc/sasl2/smtpd.conf' + ), + 'restart' => Array( + 'rc-update add postfix default', + '/etc/init.d/postfix restart' + ) + ), + 'dkim' => Array( + 'label' => 'DomainKey filter', + 'commands_1' => Array( + 'mkdir -p /etc/postfix/dkim' + ), + 'files' => Array( + 'dkim-filter.conf' => '/etc/postfix/dkim/dkim-filter.conf' + ), + 'commands_2' => Array( + 'chgrp postfix /etc/postfix/dkim/dkim-filter.conf', + 'echo "smtpd_milters = inet:localhost:8891\n +milter_macro_daemon_name = SIGNING\n +milter_default_action = accept\n" >> /etc/postfix/main.cf' + ), + 'restart' => Array( + '/etc/init.d/dkim-filter restart' + ) + ) + ) + ), + 'mail' => Array( + 'label' => $lng['admin']['configfiles']['mail'], + 'daemons' => Array( + 'courier' => Array( + 'label' => 'Courier-IMAP (POP3/IMAP)', + 'files' => Array( + 'etc_courier_authlib_authdaemonrc' => '/etc/courier/authlib/authdaemonrc', + 'etc_courier_authlib_authmysqlrc' => '/etc/courier/authlib/authmysqlrc', + 'etc_courier-imap_pop3d' => '/etc/courier-imap/pop3d', + 'etc_courier-imap_imapd' => '/etc/courier-imap/imapd', + 'etc_courier-imap_pop3d-ssl' => '/etc/courier-imap/pop3d-ssl', + 'etc_courier-imap_imapd-ssl' => '/etc/courier-imap/imapd-ssl' + ), + 'commands' => Array( + 'rm /etc/courier/authlib/authdaemonrc', + 'rm /etc/courier/authlib/authmysqlrc', + 'rm /etc/courier-imap/pop3d', + 'rm /etc/courier-imap/imapd', + 'rm /etc/courier-imap/pop3d-ssl', + 'rm /etc/courier-imap/imapd-ssl', + 'touch /etc/courier/authlib/authdaemonrc', + 'touch /etc/courier/authlib/authmysqlrc', + 'touch /etc/courier-imap/pop3d', + 'touch /etc/courier-imap/imapd', + 'touch /etc/courier-imap/pop3d-ssl', + 'touch /etc/courier-imap/imapd-ssl', + 'chown root:0 /etc/courier/authlib/authdaemonrc', + 'chown root:0 /etc/courier/authlib/authmysqlrc', + 'chown root:0 /etc/courier-imap/pop3d', + 'chown root:0 /etc/courier-imap/imapd', + 'chown root:0 /etc/courier-imap/pop3d-ssl', + 'chown root:0 /etc/courier-imap/imapd-ssl', + 'chmod 0600 /etc/courier/authlib/authdaemonrc', + 'chmod 0600 /etc/courier/authlib/authmysqlrc', + 'chmod 0600 /etc/courier-imap/pop3d', + 'chmod 0600 /etc/courier-imap/imapd', + 'chmod 0600 /etc/courier-imap/pop3d-ssl', + 'chmod 0600 /etc/courier-imap/imapd-ssl' + ), + 'restart' => Array( + 'rc-update add courier-authlib default', + 'rc-update add courier-pop3d default', + 'rc-update add courier-imapd default', + '/etc/init.d/courier-authlib restart', + '/etc/init.d/courier-pop3d restart', + '/etc/init.d/courier-imapd restart' + ) + ), + 'dovecot' => Array( + 'label' => 'Dovecot', + 'commands_1' => Array( + 'mv dovecot.conf dovecot.conf.gentoo', + 'mv dovecot-sql.conf dovecot-sql.conf.gentoo', + 'touch dovecot.conf', + 'touch dovecot-sql.conf', + ), + 'files' => Array( + 'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf', + 'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf' + ), + 'restart' => Array( + '/etc/init.d/dovecot restart' + ) + ) + ) + ), + 'ftp' => Array( + 'label' => $lng['admin']['configfiles']['ftp'], + 'daemons' => Array( + 'proftpd' => Array( + 'label' => 'ProFTPd', + 'files' => Array( + 'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf' + ), + 'commands' => Array( + 'touch /etc/proftpd/proftpd.conf', + 'chown root:0 /etc/proftpd/proftpd.conf', + 'chmod 0600 /etc/proftpd/proftpd.conf' + ), + 'restart' => Array( + 'rc-update add proftpd default', + '/etc/init.d/proftpd restart' + ) + ), + ) + ), + 'etc' => Array( + 'label' => $lng['admin']['configfiles']['etc'], + 'daemons' => Array( + 'cron' => Array( + 'label' => 'Crond (cronscript)', + 'files' => Array( + 'etc_cron.d_froxlor' => '/etc/cron.d/froxlor' + ), + 'commands' => Array( + 'touch /etc/cron.d/froxlor', + 'chown root:0 /etc/cron.d/froxlor', + 'chmod 0640 /etc/cron.d/froxlor', + ), + 'restart' => Array( + 'rc-update add vixie-cron default', + '/etc/init.d/vixie-cron restart' + ) + ), + 'xinetd' => Array( + 'label' => 'xinet.d (froxlor updates in realtime)', + 'commands' => Array( + 'emerge -av xinetd' + ), + 'files' => Array( + 'etc_xinet.d_froxlor' => '/etc/xinetd.d/froxlor' + ), + 'restart' => Array( + '/etc/init.d/xinetd restart' + ) + ), + 'awstats' => Array( + 'label' => 'Awstats', + 'files' => Array( + ($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor', + ($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats', + ($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf') + ), + 'commands' => Array( + ($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '') + ), + 'restart' => Array( + ($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart') + ) + ), + 'libnss' => Array( + 'label' => 'libnss (system login with mysql)', + 'files' => Array( + 'etc_libnss-mysql.cfg' => '/etc/libnss-mysql.cfg', + 'etc_libnss-mysql-root.cfg' => '/etc/libnss-mysql-root.cfg', + 'etc_nsswitch.conf' => '/etc/nsswitch.conf', + ), + 'commands' => Array( + 'emerge -av libnss-mysql', + 'chmod 600 /etc/libnss-mysql.cfg /etc/libnss-mysql-root.cfg' + ), + 'restart' => Array( + 'rc-update add nscd default', + '/etc/init.d/nscd restart' + ) + ) + ) + ) + ) + ) +); + +?> diff --git a/lib/configfiles/hardy.inc.php b/lib/configfiles/hardy.inc.php index 6ddd5ced..dc718649 100644 --- a/lib/configfiles/hardy.inc.php +++ b/lib/configfiles/hardy.inc.php @@ -1,278 +1,278 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Configfiles - * @version $Id$ - */ - -return Array( - 'ubuntu_hardy' => Array( - 'label' => 'Ubuntu 8.04 (Hardy)', - 'services' => Array( - 'http' => Array( - 'label' => $lng['admin']['configfiles']['http'], - 'daemons' => Array( - 'apache2' => Array( - 'label' => 'Apache 2', - 'commands' => Array( - 'mkdir -p ' . $settings['system']['documentroot_prefix'], - 'mkdir -p ' . $settings['system']['logfiles_directory'], - 'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'], - 'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'], - 'a2dismod userdir', - ), - 'restart' => Array( - '/etc/init.d/apache2 restart' - ) - ), - 'lighttpd' => Array( - 'label' => 'Lighttpd Webserver', - 'commands_1' => Array( - 'apt-get install lighttpd', - ), - 'files' => Array( - 'etc_lighttpd.conf' => '/etc/lighttpd/lighttpd.conf', - ), - 'commands_2' => Array( - $configcommand['vhost'], - $configcommand['diroptions'], - $configcommand['v_inclighty'], - $configcommand['d_inclighty'], - 'mkdir -p ' . $settings['system']['documentroot_prefix'], - 'mkdir -p ' . $settings['system']['logfiles_directory'], - 'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'], - 'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'], - ), - 'restart' => Array( - '/etc/init.d/lighttpd restart' - ) - ) - ) - ), - 'dns' => Array( - 'label' => $lng['admin']['configfiles']['dns'], - 'daemons' => Array( - 'bind' => Array( - 'label' => 'Bind9', - 'commands' => Array( - 'echo "include \"' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf\";" >> /etc/bind/named.conf', - 'touch ' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf' - ), - 'restart' => Array( - '/etc/init.d/bind9 restart' - ) - ), - 'powerdns' => Array( - 'label' => 'PowerDNS', - 'files' => Array( - 'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf', - 'etc_powerdns_pdns-froxlor.conf' => '/etc/powerdns/pdns_froxlor.conf', - ), - 'restart' => Array( - '/etc/init.d/pdns restart' - ) - ), - ) - ), - 'smtp' => Array( - 'label' => $lng['admin']['configfiles']['smtp'], - 'daemons' => Array( - 'postfix' => Array( - 'label' => 'Postfix', - 'commands_1' => Array( - 'mkdir -p /etc/postfix/sasl', - 'mkdir -p /var/spool/postfix/etc/pam.d', - 'mkdir -p /var/spool/postfix/var/run/mysqld', - 'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail', - 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail', - 'mkdir -p ' . $settings['system']['vmail_homedir'], - 'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'], - 'mv /etc/postfix/main.cf /etc/postfix/main.cf.ubuntu', - 'touch /etc/postfix/main.cf', - 'touch /etc/postfix/mysql-virtual_alias_maps.cf', - 'touch /etc/postfix/mysql-virtual_mailbox_domains.cf', - 'touch /etc/postfix/mysql-virtual_mailbox_maps.cf', - 'touch /etc/postfix/sasl/smtpd.conf', - 'chown root:root /etc/postfix/main.cf', - 'chown root:root /etc/postfix/master.cf', - 'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf', - 'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf', - 'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf', - 'chown root:root /etc/postfix/sasl/smtpd.conf', - 'chmod 0644 /etc/postfix/main.cf', - 'chmod 0644 /etc/postfix/master.cf', - 'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf', - 'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf', - 'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf', - 'chmod 0600 /etc/postfix/sasl/smtpd.conf', - ), - 'files' => Array( - 'etc_postfix_main.cf' => '/etc/postfix/main.cf', - 'etc_postfix_master.cf' => '/etc/postfix/master.cf', - 'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf', - 'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf', - 'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf', - 'etc_postfix_sasl_smtpd.conf' => '/etc/postfix/sasl/smtpd.conf' - ), - 'restart' => Array( - '/etc/init.d/postfix restart', - 'newaliases' - ) - ), - 'exim4' => Array( - 'label' => 'Exim4', - 'commands_1' => Array( - 'dpkg-reconfigure exim4-config', - '# choose "no configuration at this time" and "splitted configuration files" in the dialog' - ), - 'files' => Array( - 'etc_exim4_conf.d_acl_30_exim4-config_check_rcpt.rul' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt.rul', - 'etc_exim4_conf.d_auth_30_froxlor-config' => '/etc/exim4/conf.d/auth/30_froxlor-config', - 'etc_exim4_conf.d_main_10_froxlor-config_options' => '/etc/exim4/conf.d/main/10_froxlor-config_options', - 'etc_exim4_conf.d_router_180_froxlor-config' => '/etc/exim4/conf.d/router/180_froxlor-config', - 'etc_exim4_conf.d_transport_30_froxlor-config' => '/etc/exim4/conf.d/transport/30_froxlor-config' - ), - 'commands_2' => Array( - 'chmod o-rx /var/lib/exim4', - 'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options' - ), - 'restart' => Array( - '/etc/init.d/exim4 restart' - ) - ) - ) - ), - 'mail' => Array( - 'label' => $lng['admin']['configfiles']['mail'], - 'daemons' => Array( - 'courier' => Array( - 'label' => 'Courier', - 'files' => Array( - 'etc_courier_authdaemonrc' => '/etc/courier/authdaemonrc', - 'etc_courier_authmysqlrc' => '/etc/courier/authmysqlrc' - ), - 'restart' => Array( - '/etc/init.d/courier-authdaemon restart', - '/etc/init.d/courier-pop restart' - ) - ), - 'dovecot' => Array( - 'label' => 'Dovecot', - 'commands' => Array( - '/etc/init.d/dovecot stop', - ), - 'files' => Array( - 'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf', - 'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf' - ), - 'restart' => Array( - '/etc/init.d/dovecot restart' - ) - ) - ) - ), - 'ftp' => Array( - 'label' => $lng['admin']['configfiles']['ftp'], - 'daemons' => Array( - 'proftpd' => Array( - 'label' => 'ProFTPd', - 'files' => Array( - 'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf', - 'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf' - ), - 'restart' => Array( - '/etc/init.d/proftpd restart' - ) - ), - 'pure-ftpd' => Array( - 'label' => 'Pure FTPd', - 'files' => Array( - 'etc_pure-ftpd_conf_MinUID' => '/etc/pure-ftpd/conf/MinUID', - 'etc_pure-ftpd_conf_MySQLConfigFile' => '/etc/pure-ftpd/conf/MySQLConfigFile', - 'etc_pure-ftpd_conf_NoAnonymous' => '/etc/pure-ftpd/conf/NoAnonymous', - 'etc_pure-ftpd_conf_MaxIdleTime' => '/etc/pure-ftpd/conf/MaxIdleTime', - 'etc_pure-ftpd_conf_ChrootEveryone' => '/etc/pure-ftpd/conf/ChrootEveryone', - 'etc_pure-ftpd_conf_PAMAuthentication' => '/etc/pure-ftpd/conf/PAMAuthentication', - 'etc_pure-ftpd_db_mysql.conf' => '/etc/pure-ftpd/db/mysql.conf', - 'etc_pure-ftpd_conf_CustomerProof' => '/etc/pure-ftpd/conf/CustomerProof', - 'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind', - 'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common' - ), - 'restart' => Array( - '/etc/init.d/pure-ftpd-mysql restart' - ) - ), - ) - ), - 'etc' => Array( - 'label' => $lng['admin']['configfiles']['etc'], - 'daemons' => Array( - 'cron' => Array( - 'label' => 'Crond (cronscript)', - 'files' => Array( - 'etc_cron.d_froxlor' => '/etc/cron.d/froxlor' - ), - 'restart' => Array( - '/etc/init.d/cron restart' - ) - ), - 'xinetd' => Array( - 'label' => 'xinet.d (froxlor updates in realtime)', - 'commands' => Array( - 'apt-get install xinetd' - ), - 'files' => Array( - 'etc_xinet.d_froxlor' => '/etc/xinetd.d/froxlor' - ), - 'restart' => Array( - '/etc/init.d/xinetd restart' - ) - ), - 'awstats' => Array( - 'label' => 'Awstats', - 'files' => Array( - ($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor', - ($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats', - ($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf') - ), - 'commands' => Array( - ($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '') - ), - 'restart' => Array( - ($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart') - ) - ), - 'libnss' => Array( - 'label' => 'libnss (system login with mysql)', - 'commands' => Array( - 'apt-get install libnss-mysql nscd', - 'chmod 600 /etc/nss-mysql.conf /etc/nss-mysql-root.conf' - ), - 'files' => Array( - 'etc_nss-mysql.conf' => '/etc/nss-mysql.conf', - 'etc_nss-mysql-root.conf' => '/etc/nss-mysql-root.conf', - 'etc_nsswitch.conf' => '/etc/nsswitch.conf', - ), - 'restart' => Array( - '/etc/init.d/nscd restart' - ) - ) - ) - ) - ) - ) -); - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Configfiles + * @version $Id$ + */ + +return Array( + 'ubuntu_hardy' => Array( + 'label' => 'Ubuntu 8.04 (Hardy)', + 'services' => Array( + 'http' => Array( + 'label' => $lng['admin']['configfiles']['http'], + 'daemons' => Array( + 'apache2' => Array( + 'label' => 'Apache 2', + 'commands' => Array( + 'mkdir -p ' . $settings['system']['documentroot_prefix'], + 'mkdir -p ' . $settings['system']['logfiles_directory'], + 'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'], + 'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'], + 'a2dismod userdir', + ), + 'restart' => Array( + '/etc/init.d/apache2 restart' + ) + ), + 'lighttpd' => Array( + 'label' => 'Lighttpd Webserver', + 'commands_1' => Array( + 'apt-get install lighttpd', + ), + 'files' => Array( + 'etc_lighttpd.conf' => '/etc/lighttpd/lighttpd.conf', + ), + 'commands_2' => Array( + $configcommand['vhost'], + $configcommand['diroptions'], + $configcommand['v_inclighty'], + $configcommand['d_inclighty'], + 'mkdir -p ' . $settings['system']['documentroot_prefix'], + 'mkdir -p ' . $settings['system']['logfiles_directory'], + 'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'], + 'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'], + ), + 'restart' => Array( + '/etc/init.d/lighttpd restart' + ) + ) + ) + ), + 'dns' => Array( + 'label' => $lng['admin']['configfiles']['dns'], + 'daemons' => Array( + 'bind' => Array( + 'label' => 'Bind9', + 'commands' => Array( + 'echo "include \"' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf\";" >> /etc/bind/named.conf', + 'touch ' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf' + ), + 'restart' => Array( + '/etc/init.d/bind9 restart' + ) + ), + 'powerdns' => Array( + 'label' => 'PowerDNS', + 'files' => Array( + 'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf', + 'etc_powerdns_pdns-froxlor.conf' => '/etc/powerdns/pdns_froxlor.conf', + ), + 'restart' => Array( + '/etc/init.d/pdns restart' + ) + ), + ) + ), + 'smtp' => Array( + 'label' => $lng['admin']['configfiles']['smtp'], + 'daemons' => Array( + 'postfix' => Array( + 'label' => 'Postfix', + 'commands_1' => Array( + 'mkdir -p /etc/postfix/sasl', + 'mkdir -p /var/spool/postfix/etc/pam.d', + 'mkdir -p /var/spool/postfix/var/run/mysqld', + 'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail', + 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail', + 'mkdir -p ' . $settings['system']['vmail_homedir'], + 'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'], + 'mv /etc/postfix/main.cf /etc/postfix/main.cf.ubuntu', + 'touch /etc/postfix/main.cf', + 'touch /etc/postfix/mysql-virtual_alias_maps.cf', + 'touch /etc/postfix/mysql-virtual_mailbox_domains.cf', + 'touch /etc/postfix/mysql-virtual_mailbox_maps.cf', + 'touch /etc/postfix/sasl/smtpd.conf', + 'chown root:root /etc/postfix/main.cf', + 'chown root:root /etc/postfix/master.cf', + 'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf', + 'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf', + 'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf', + 'chown root:root /etc/postfix/sasl/smtpd.conf', + 'chmod 0644 /etc/postfix/main.cf', + 'chmod 0644 /etc/postfix/master.cf', + 'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf', + 'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf', + 'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf', + 'chmod 0600 /etc/postfix/sasl/smtpd.conf', + ), + 'files' => Array( + 'etc_postfix_main.cf' => '/etc/postfix/main.cf', + 'etc_postfix_master.cf' => '/etc/postfix/master.cf', + 'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf', + 'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf', + 'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf', + 'etc_postfix_sasl_smtpd.conf' => '/etc/postfix/sasl/smtpd.conf' + ), + 'restart' => Array( + '/etc/init.d/postfix restart', + 'newaliases' + ) + ), + 'exim4' => Array( + 'label' => 'Exim4', + 'commands_1' => Array( + 'dpkg-reconfigure exim4-config', + '# choose "no configuration at this time" and "splitted configuration files" in the dialog' + ), + 'files' => Array( + 'etc_exim4_conf.d_acl_30_exim4-config_check_rcpt.rul' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt.rul', + 'etc_exim4_conf.d_auth_30_froxlor-config' => '/etc/exim4/conf.d/auth/30_froxlor-config', + 'etc_exim4_conf.d_main_10_froxlor-config_options' => '/etc/exim4/conf.d/main/10_froxlor-config_options', + 'etc_exim4_conf.d_router_180_froxlor-config' => '/etc/exim4/conf.d/router/180_froxlor-config', + 'etc_exim4_conf.d_transport_30_froxlor-config' => '/etc/exim4/conf.d/transport/30_froxlor-config' + ), + 'commands_2' => Array( + 'chmod o-rx /var/lib/exim4', + 'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options' + ), + 'restart' => Array( + '/etc/init.d/exim4 restart' + ) + ) + ) + ), + 'mail' => Array( + 'label' => $lng['admin']['configfiles']['mail'], + 'daemons' => Array( + 'courier' => Array( + 'label' => 'Courier', + 'files' => Array( + 'etc_courier_authdaemonrc' => '/etc/courier/authdaemonrc', + 'etc_courier_authmysqlrc' => '/etc/courier/authmysqlrc' + ), + 'restart' => Array( + '/etc/init.d/courier-authdaemon restart', + '/etc/init.d/courier-pop restart' + ) + ), + 'dovecot' => Array( + 'label' => 'Dovecot', + 'commands' => Array( + '/etc/init.d/dovecot stop', + ), + 'files' => Array( + 'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf', + 'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf' + ), + 'restart' => Array( + '/etc/init.d/dovecot restart' + ) + ) + ) + ), + 'ftp' => Array( + 'label' => $lng['admin']['configfiles']['ftp'], + 'daemons' => Array( + 'proftpd' => Array( + 'label' => 'ProFTPd', + 'files' => Array( + 'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf', + 'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf' + ), + 'restart' => Array( + '/etc/init.d/proftpd restart' + ) + ), + 'pure-ftpd' => Array( + 'label' => 'Pure FTPd', + 'files' => Array( + 'etc_pure-ftpd_conf_MinUID' => '/etc/pure-ftpd/conf/MinUID', + 'etc_pure-ftpd_conf_MySQLConfigFile' => '/etc/pure-ftpd/conf/MySQLConfigFile', + 'etc_pure-ftpd_conf_NoAnonymous' => '/etc/pure-ftpd/conf/NoAnonymous', + 'etc_pure-ftpd_conf_MaxIdleTime' => '/etc/pure-ftpd/conf/MaxIdleTime', + 'etc_pure-ftpd_conf_ChrootEveryone' => '/etc/pure-ftpd/conf/ChrootEveryone', + 'etc_pure-ftpd_conf_PAMAuthentication' => '/etc/pure-ftpd/conf/PAMAuthentication', + 'etc_pure-ftpd_db_mysql.conf' => '/etc/pure-ftpd/db/mysql.conf', + 'etc_pure-ftpd_conf_CustomerProof' => '/etc/pure-ftpd/conf/CustomerProof', + 'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind', + 'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common' + ), + 'restart' => Array( + '/etc/init.d/pure-ftpd-mysql restart' + ) + ), + ) + ), + 'etc' => Array( + 'label' => $lng['admin']['configfiles']['etc'], + 'daemons' => Array( + 'cron' => Array( + 'label' => 'Crond (cronscript)', + 'files' => Array( + 'etc_cron.d_froxlor' => '/etc/cron.d/froxlor' + ), + 'restart' => Array( + '/etc/init.d/cron restart' + ) + ), + 'xinetd' => Array( + 'label' => 'xinet.d (froxlor updates in realtime)', + 'commands' => Array( + 'apt-get install xinetd' + ), + 'files' => Array( + 'etc_xinet.d_froxlor' => '/etc/xinetd.d/froxlor' + ), + 'restart' => Array( + '/etc/init.d/xinetd restart' + ) + ), + 'awstats' => Array( + 'label' => 'Awstats', + 'files' => Array( + ($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor', + ($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats', + ($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf') + ), + 'commands' => Array( + ($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '') + ), + 'restart' => Array( + ($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart') + ) + ), + 'libnss' => Array( + 'label' => 'libnss (system login with mysql)', + 'commands' => Array( + 'apt-get install libnss-mysql nscd', + 'chmod 600 /etc/nss-mysql.conf /etc/nss-mysql-root.conf' + ), + 'files' => Array( + 'etc_nss-mysql.conf' => '/etc/nss-mysql.conf', + 'etc_nss-mysql-root.conf' => '/etc/nss-mysql-root.conf', + 'etc_nsswitch.conf' => '/etc/nsswitch.conf', + ), + 'restart' => Array( + '/etc/init.d/nscd restart' + ) + ) + ) + ) + ) + ) +); + +?> diff --git a/lib/configfiles/lenny.inc.php b/lib/configfiles/lenny.inc.php index 8cf9e957..c7b74ed2 100644 --- a/lib/configfiles/lenny.inc.php +++ b/lib/configfiles/lenny.inc.php @@ -1,285 +1,285 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Configfiles - * @version $Id$ - */ - -return Array( - 'debian_lenny' => Array( - 'label' => 'Debian 5.0 (Lenny)', - 'services' => Array( - 'http' => Array( - 'label' => $lng['admin']['configfiles']['http'], - 'daemons' => Array( - 'apache2' => Array( - 'label' => 'Apache 2', - 'commands' => Array( - 'mkdir -p ' . $settings['system']['documentroot_prefix'], - 'mkdir -p ' . $settings['system']['logfiles_directory'], - 'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'], - 'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'], - 'a2dismod userdir', - ), - 'restart' => Array( - '/etc/init.d/apache2 restart' - ), - ), - 'lighttpd' => Array( - 'label' => 'Lighttpd Webserver', - 'commands_1' => Array( - 'apt-get install lighttpd', - ), - 'files' => Array( - 'etc_lighttpd.conf' => '/etc/lighttpd/lighttpd.conf', - ), - 'commands_2' => Array( - $configcommand['vhost'], - $configcommand['diroptions'], - $configcommand['v_inclighty'], - $configcommand['d_inclighty'], - 'mkdir -p ' . $settings['system']['documentroot_prefix'], - 'mkdir -p ' . $settings['system']['logfiles_directory'], - 'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'], - 'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'], - ), - 'restart' => Array( - '/etc/init.d/lighttpd restart' - ) - ) - ) - ), - 'dns' => Array( - 'label' => $lng['admin']['configfiles']['dns'], - 'daemons' => Array( - 'bind' => Array( - 'label' => 'Bind9', - 'commands' => Array( - 'apt-get install bind9', - 'echo "include \"' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf\";" >> /etc/bind/named.conf', - 'touch ' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf' - ), - 'restart' => Array( - '/etc/init.d/bind9 restart' - ) - ), - 'powerdns' => Array( - 'label' => 'PowerDNS', - 'files' => Array( - 'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf', - 'etc_powerdns_pdns-froxlor.conf' => '/etc/powerdns/pdns_froxlor.conf', - ), - 'restart' => Array( - '/etc/init.d/pdns restart' - ) - ), - ) - ), - 'smtp' => Array( - 'label' => $lng['admin']['configfiles']['smtp'], - 'daemons' => Array( - 'postfix' => Array( - 'label' => 'Postfix', - 'commands' => Array( - 'apt-get install postfix postfix-mysql libsasl2 libsasl2-modules libsasl2-modules-sql', - 'mkdir -p /etc/postfix/sasl', - 'mkdir -p /var/spool/postfix/etc/pam.d', - 'mkdir -p /var/spool/postfix/var/run/mysqld', - 'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail', - 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail', - 'mkdir -p ' . $settings['system']['vmail_homedir'], - 'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'], - 'touch /etc/postfix/mysql-virtual_alias_maps.cf', - 'touch /etc/postfix/mysql-virtual_mailbox_domains.cf', - 'touch /etc/postfix/mysql-virtual_mailbox_maps.cf', - 'touch /etc/postfix/sasl/smtpd.conf', - 'chown root:root /etc/postfix/main.cf', - 'chown root:root /etc/postfix/master.cf', - 'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf', - 'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf', - 'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf', - 'chown root:root /etc/postfix/sasl/smtpd.conf', - 'chmod 0644 /etc/postfix/main.cf', - 'chmod 0644 /etc/postfix/master.cf', - 'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf', - 'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf', - 'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf', - 'chmod 0600 /etc/postfix/sasl/smtpd.conf', - ), - 'files' => Array( - 'etc_postfix_main.cf' => '/etc/postfix/main.cf', - 'etc_postfix_master.cf' => '/etc/postfix/master.cf', - 'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf', - 'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf', - 'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf', - 'etc_postfix_sasl_smtpd.conf' => '/etc/postfix/sasl/smtpd.conf' - ), - 'restart' => Array( - '/etc/init.d/postfix restart', - 'newaliases' - ) - ), - 'exim4' => Array( - 'label' => 'Exim4', - 'commands_1' => Array( - 'dpkg-reconfigure exim4-config', - '# choose "no configuration at this time" and "splitted configuration files" in the dialog' - ), - 'files' => Array( - 'etc_exim4_conf.d_acl_30_exim4-config_check_rcpt.rul' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt.rul', - 'etc_exim4_conf.d_auth_30_froxlor-config' => '/etc/exim4/conf.d/auth/30_froxlor-config', - 'etc_exim4_conf.d_main_10_froxlor-config_options' => '/etc/exim4/conf.d/main/10_froxlor-config_options', - 'etc_exim4_conf.d_router_180_froxlor-config' => '/etc/exim4/conf.d/router/180_froxlor-config', - 'etc_exim4_conf.d_transport_30_froxlor-config' => '/etc/exim4/conf.d/transport/30_froxlor-config' - ), - 'commands_2' => Array( - 'chmod o-rx /var/lib/exim4', - 'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options' - ), - 'restart' => Array( - '/etc/init.d/exim4 restart' - ) - ) - ) - ), - 'mail' => Array( - 'label' => $lng['admin']['configfiles']['mail'], - 'daemons' => Array( - 'courier' => Array( - 'label' => 'Courier', - 'commands' => Array( - 'apt-get install courier-pop courier-imap courier-authlib-mysql' - ), - 'files' => Array( - 'etc_courier_authdaemonrc' => '/etc/courier/authdaemonrc', - 'etc_courier_authmysqlrc' => '/etc/courier/authmysqlrc' - ), - 'restart' => Array( - '/etc/init.d/courier-authdaemon restart', - '/etc/init.d/courier-pop restart' - ) - ), - 'dovecot' => Array( - 'label' => 'Dovecot', - 'commands' => Array( - 'apt-get install dovecot-imapd dovecot-pop3d' - ), - 'files' => Array( - 'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf', - 'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf' - ), - 'restart' => Array( - '/etc/init.d/dovecot restart' - ) - ) - ) - ), - 'ftp' => Array( - 'label' => $lng['admin']['configfiles']['ftp'], - 'daemons' => Array( - 'proftpd' => Array( - 'label' => 'ProFTPd', - 'files' => Array( - 'etc_proftpd_sql.conf' => '/etc/proftpd/sql.conf', - 'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf', - 'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf' - ), - 'restart' => Array( - '/etc/init.d/proftpd restart' - ) - ), - 'pure-ftpd' => Array( - 'label' => 'Pure FTPd', - 'commands' => Array( - 'apt-get install pure-ftpd-common pure-ftpd-mysql' - ), - 'files' => Array( - 'etc_pure-ftpd_conf_MinUID' => '/etc/pure-ftpd/conf/MinUID', - 'etc_pure-ftpd_conf_MySQLConfigFile' => '/etc/pure-ftpd/conf/MySQLConfigFile', - 'etc_pure-ftpd_conf_NoAnonymous' => '/etc/pure-ftpd/conf/NoAnonymous', - 'etc_pure-ftpd_conf_MaxIdleTime' => '/etc/pure-ftpd/conf/MaxIdleTime', - 'etc_pure-ftpd_conf_ChrootEveryone' => '/etc/pure-ftpd/conf/ChrootEveryone', - 'etc_pure-ftpd_conf_PAMAuthentication' => '/etc/pure-ftpd/conf/PAMAuthentication', - 'etc_pure-ftpd_db_mysql.conf' => '/etc/pure-ftpd/db/mysql.conf', - 'etc_pure-ftpd_conf_CustomerProof' => '/etc/pure-ftpd/conf/CustomerProof', - 'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind', - 'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common' - ), - 'restart' => Array( - '/etc/init.d/pure-ftpd-mysql restart' - ) - ), - ) - ), - 'etc' => Array( - 'label' => $lng['admin']['configfiles']['etc'], - 'daemons' => Array( - 'cron' => Array( - 'label' => 'Crond (cronscript)', - 'files' => Array( - 'etc_cron.d_froxlor' => '/etc/cron.d/froxlor' - ), - 'restart' => Array( - '/etc/init.d/cron restart' - ) - ), - 'xinetd' => Array( - 'label' => 'xinet.d (froxlor updates in realtime)', - 'commands' => Array( - 'apt-get install xinetd' - ), - 'files' => Array( - 'etc_xinet.d_froxlor' => '/etc/xinetd.d/froxlor' - ), - 'restart' => Array( - '/etc/init.d/xinetd restart' - ) - ), - 'awstats' => Array( - 'label' => 'Awstats', - 'files' => Array( - ($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor', - ($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats', - ($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf') - ), - 'commands' => Array( - ($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '') - ), - 'restart' => Array( - ($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart') - ) - ), - 'libnss' => Array( - 'label' => 'libnss (system login with mysql)', - 'commands' => Array( - 'apt-get install libnss-mysql nscd', - 'chmod 600 /etc/nss-mysql.conf /etc/nss-mysql-root.conf' - ), - 'files' => Array( - 'etc_nss-mysql.conf' => '/etc/nss-mysql.conf', - 'etc_nss-mysql-root.conf' => '/etc/nss-mysql-root.conf', - 'etc_nsswitch.conf' => '/etc/nsswitch.conf', - ), - 'restart' => Array( - '/etc/init.d/nscd restart' - ) - ) - ) - ) - ) - ) -); - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Configfiles + * @version $Id$ + */ + +return Array( + 'debian_lenny' => Array( + 'label' => 'Debian 5.0 (Lenny)', + 'services' => Array( + 'http' => Array( + 'label' => $lng['admin']['configfiles']['http'], + 'daemons' => Array( + 'apache2' => Array( + 'label' => 'Apache 2', + 'commands' => Array( + 'mkdir -p ' . $settings['system']['documentroot_prefix'], + 'mkdir -p ' . $settings['system']['logfiles_directory'], + 'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'], + 'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'], + 'a2dismod userdir', + ), + 'restart' => Array( + '/etc/init.d/apache2 restart' + ), + ), + 'lighttpd' => Array( + 'label' => 'Lighttpd Webserver', + 'commands_1' => Array( + 'apt-get install lighttpd', + ), + 'files' => Array( + 'etc_lighttpd.conf' => '/etc/lighttpd/lighttpd.conf', + ), + 'commands_2' => Array( + $configcommand['vhost'], + $configcommand['diroptions'], + $configcommand['v_inclighty'], + $configcommand['d_inclighty'], + 'mkdir -p ' . $settings['system']['documentroot_prefix'], + 'mkdir -p ' . $settings['system']['logfiles_directory'], + 'mkdir -p ' . $settings['system']['mod_fcgid_tmpdir'], + 'chmod 1777 ' . $settings['system']['mod_fcgid_tmpdir'], + ), + 'restart' => Array( + '/etc/init.d/lighttpd restart' + ) + ) + ) + ), + 'dns' => Array( + 'label' => $lng['admin']['configfiles']['dns'], + 'daemons' => Array( + 'bind' => Array( + 'label' => 'Bind9', + 'commands' => Array( + 'apt-get install bind9', + 'echo "include \"' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf\";" >> /etc/bind/named.conf', + 'touch ' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf' + ), + 'restart' => Array( + '/etc/init.d/bind9 restart' + ) + ), + 'powerdns' => Array( + 'label' => 'PowerDNS', + 'files' => Array( + 'etc_powerdns_pdns.conf' => '/etc/powerdns/pdns.conf', + 'etc_powerdns_pdns-froxlor.conf' => '/etc/powerdns/pdns_froxlor.conf', + ), + 'restart' => Array( + '/etc/init.d/pdns restart' + ) + ), + ) + ), + 'smtp' => Array( + 'label' => $lng['admin']['configfiles']['smtp'], + 'daemons' => Array( + 'postfix' => Array( + 'label' => 'Postfix', + 'commands' => Array( + 'apt-get install postfix postfix-mysql libsasl2 libsasl2-modules libsasl2-modules-sql', + 'mkdir -p /etc/postfix/sasl', + 'mkdir -p /var/spool/postfix/etc/pam.d', + 'mkdir -p /var/spool/postfix/var/run/mysqld', + 'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail', + 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail', + 'mkdir -p ' . $settings['system']['vmail_homedir'], + 'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'], + 'touch /etc/postfix/mysql-virtual_alias_maps.cf', + 'touch /etc/postfix/mysql-virtual_mailbox_domains.cf', + 'touch /etc/postfix/mysql-virtual_mailbox_maps.cf', + 'touch /etc/postfix/sasl/smtpd.conf', + 'chown root:root /etc/postfix/main.cf', + 'chown root:root /etc/postfix/master.cf', + 'chown root:postfix /etc/postfix/mysql-virtual_alias_maps.cf', + 'chown root:postfix /etc/postfix/mysql-virtual_mailbox_domains.cf', + 'chown root:postfix /etc/postfix/mysql-virtual_mailbox_maps.cf', + 'chown root:root /etc/postfix/sasl/smtpd.conf', + 'chmod 0644 /etc/postfix/main.cf', + 'chmod 0644 /etc/postfix/master.cf', + 'chmod 0640 /etc/postfix/mysql-virtual_alias_maps.cf', + 'chmod 0640 /etc/postfix/mysql-virtual_mailbox_domains.cf', + 'chmod 0640 /etc/postfix/mysql-virtual_mailbox_maps.cf', + 'chmod 0600 /etc/postfix/sasl/smtpd.conf', + ), + 'files' => Array( + 'etc_postfix_main.cf' => '/etc/postfix/main.cf', + 'etc_postfix_master.cf' => '/etc/postfix/master.cf', + 'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf', + 'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf', + 'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf', + 'etc_postfix_sasl_smtpd.conf' => '/etc/postfix/sasl/smtpd.conf' + ), + 'restart' => Array( + '/etc/init.d/postfix restart', + 'newaliases' + ) + ), + 'exim4' => Array( + 'label' => 'Exim4', + 'commands_1' => Array( + 'dpkg-reconfigure exim4-config', + '# choose "no configuration at this time" and "splitted configuration files" in the dialog' + ), + 'files' => Array( + 'etc_exim4_conf.d_acl_30_exim4-config_check_rcpt.rul' => '/etc/exim4/conf.d/acl/30_exim4-config_check_rcpt.rul', + 'etc_exim4_conf.d_auth_30_froxlor-config' => '/etc/exim4/conf.d/auth/30_froxlor-config', + 'etc_exim4_conf.d_main_10_froxlor-config_options' => '/etc/exim4/conf.d/main/10_froxlor-config_options', + 'etc_exim4_conf.d_router_180_froxlor-config' => '/etc/exim4/conf.d/router/180_froxlor-config', + 'etc_exim4_conf.d_transport_30_froxlor-config' => '/etc/exim4/conf.d/transport/30_froxlor-config' + ), + 'commands_2' => Array( + 'chmod o-rx /var/lib/exim4', + 'chmod o-rx /etc/exim4/conf.d/main/10_froxlor-config_options' + ), + 'restart' => Array( + '/etc/init.d/exim4 restart' + ) + ) + ) + ), + 'mail' => Array( + 'label' => $lng['admin']['configfiles']['mail'], + 'daemons' => Array( + 'courier' => Array( + 'label' => 'Courier', + 'commands' => Array( + 'apt-get install courier-pop courier-imap courier-authlib-mysql' + ), + 'files' => Array( + 'etc_courier_authdaemonrc' => '/etc/courier/authdaemonrc', + 'etc_courier_authmysqlrc' => '/etc/courier/authmysqlrc' + ), + 'restart' => Array( + '/etc/init.d/courier-authdaemon restart', + '/etc/init.d/courier-pop restart' + ) + ), + 'dovecot' => Array( + 'label' => 'Dovecot', + 'commands' => Array( + 'apt-get install dovecot-imapd dovecot-pop3d' + ), + 'files' => Array( + 'etc_dovecot_dovecot.conf' => '/etc/dovecot/dovecot.conf', + 'etc_dovecot_dovecot-sql.conf' => '/etc/dovecot/dovecot-sql.conf' + ), + 'restart' => Array( + '/etc/init.d/dovecot restart' + ) + ) + ) + ), + 'ftp' => Array( + 'label' => $lng['admin']['configfiles']['ftp'], + 'daemons' => Array( + 'proftpd' => Array( + 'label' => 'ProFTPd', + 'files' => Array( + 'etc_proftpd_sql.conf' => '/etc/proftpd/sql.conf', + 'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf', + 'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf' + ), + 'restart' => Array( + '/etc/init.d/proftpd restart' + ) + ), + 'pure-ftpd' => Array( + 'label' => 'Pure FTPd', + 'commands' => Array( + 'apt-get install pure-ftpd-common pure-ftpd-mysql' + ), + 'files' => Array( + 'etc_pure-ftpd_conf_MinUID' => '/etc/pure-ftpd/conf/MinUID', + 'etc_pure-ftpd_conf_MySQLConfigFile' => '/etc/pure-ftpd/conf/MySQLConfigFile', + 'etc_pure-ftpd_conf_NoAnonymous' => '/etc/pure-ftpd/conf/NoAnonymous', + 'etc_pure-ftpd_conf_MaxIdleTime' => '/etc/pure-ftpd/conf/MaxIdleTime', + 'etc_pure-ftpd_conf_ChrootEveryone' => '/etc/pure-ftpd/conf/ChrootEveryone', + 'etc_pure-ftpd_conf_PAMAuthentication' => '/etc/pure-ftpd/conf/PAMAuthentication', + 'etc_pure-ftpd_db_mysql.conf' => '/etc/pure-ftpd/db/mysql.conf', + 'etc_pure-ftpd_conf_CustomerProof' => '/etc/pure-ftpd/conf/CustomerProof', + 'etc_pure-ftpd_conf_Bind' => '/etc/pure-ftpd/conf/Bind', + 'etc_default_pure-ftpd-common' => '/etc/default/pure-ftpd-common' + ), + 'restart' => Array( + '/etc/init.d/pure-ftpd-mysql restart' + ) + ), + ) + ), + 'etc' => Array( + 'label' => $lng['admin']['configfiles']['etc'], + 'daemons' => Array( + 'cron' => Array( + 'label' => 'Crond (cronscript)', + 'files' => Array( + 'etc_cron.d_froxlor' => '/etc/cron.d/froxlor' + ), + 'restart' => Array( + '/etc/init.d/cron restart' + ) + ), + 'xinetd' => Array( + 'label' => 'xinet.d (froxlor updates in realtime)', + 'commands' => Array( + 'apt-get install xinetd' + ), + 'files' => Array( + 'etc_xinet.d_froxlor' => '/etc/xinetd.d/froxlor' + ), + 'restart' => Array( + '/etc/init.d/xinetd restart' + ) + ), + 'awstats' => Array( + 'label' => 'Awstats', + 'files' => Array( + ($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor', + ($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats', + ($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf') + ), + 'commands' => Array( + ($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '') + ), + 'restart' => Array( + ($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart') + ) + ), + 'libnss' => Array( + 'label' => 'libnss (system login with mysql)', + 'commands' => Array( + 'apt-get install libnss-mysql nscd', + 'chmod 600 /etc/nss-mysql.conf /etc/nss-mysql-root.conf' + ), + 'files' => Array( + 'etc_nss-mysql.conf' => '/etc/nss-mysql.conf', + 'etc_nss-mysql-root.conf' => '/etc/nss-mysql-root.conf', + 'etc_nsswitch.conf' => '/etc/nsswitch.conf', + ), + 'restart' => Array( + '/etc/init.d/nscd restart' + ) + ) + ) + ) + ) + ) +); + +?> diff --git a/lib/configfiles/suse10.inc.php b/lib/configfiles/suse10.inc.php index b0ff0f42..ee650511 100644 --- a/lib/configfiles/suse10.inc.php +++ b/lib/configfiles/suse10.inc.php @@ -1,157 +1,157 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Configfiles - * @version $Id$ - */ - -return Array( - 'suse_linux_10_0' => Array( - 'label' => 'SUSE Linux 10.0', - 'services' => Array( - 'http' => Array( - 'label' => $lng['admin']['configfiles']['http'], - 'daemons' => Array( - 'apache' => Array( - 'label' => 'Apache', - 'commands' => Array( - $configcommand['vhost'], - $configcommand['diroptions'], - $configcommand['include'], - 'mkdir -p ' . $settings['system']['documentroot_prefix'], - 'mkdir -p ' . $settings['system']['logfiles_directory'] - ), - 'restart' => Array( - '/etc/init.d/apache2 restart' - ) - ), - ) - ), - 'dns' => Array( - 'label' => $lng['admin']['configfiles']['dns'], - 'daemons' => Array( - 'bind' => Array( - 'label' => 'Bind9', - 'commands' => Array( - 'echo "include \"' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf\";" >> /etc/named.conf', - 'touch ' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf' - ), - 'restart' => Array( - '/etc/init.d/named restart' - ) - ), - ) - ), - 'smtp' => Array( - 'label' => $lng['admin']['configfiles']['smtp'], - 'daemons' => Array( - 'postfix' => Array( - 'label' => 'Postfix', - 'files' => Array( - 'etc_postfix_main.cf' => '/etc/postfix/main.cf', - 'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf', - 'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf', - 'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf', - 'usr_lib_sasl2_smtpd.conf' => '/usr/lib/sasl2/smtpd.conf' - ), - 'commands' => Array( - 'mkdir -p /var/spool/postfix/etc/pam.d', - 'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail', - 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail', - 'mkdir -p ' . $settings['system']['vmail_homedir'], - 'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'], - 'touch /etc/postfix/mysql-virtual_alias_maps.cf', - 'touch /etc/postfix/mysql-virtual_mailbox_domains.cf', - 'touch /etc/postfix/mysql-virtual_mailbox_maps.cf', - 'touch /usr/lib/sasl2/smtpd.conf', - 'chmod 660 /etc/postfix/mysql-virtual_alias_maps.cf', - 'chmod 660 /etc/postfix/mysql-virtual_mailbox_domains.cf', - 'chmod 660 /etc/postfix/mysql-virtual_mailbox_maps.cf', - 'chmod 660 /usr/lib/sasl2/smtpd.conf', - 'chgrp postfix /etc/postfix/mysql-virtual_alias_maps.cf', - 'chgrp postfix /etc/postfix/mysql-virtual_mailbox_domains.cf', - 'chgrp postfix /etc/postfix/mysql-virtual_mailbox_maps.cf', - 'chgrp postfix /usr/lib/sasl2/smtpd.conf' - ), - 'restart' => Array( - '/etc/init.d/postfix restart' - ) - ) - ) - ), - 'mail' => Array( - 'label' => $lng['admin']['configfiles']['mail'], - 'daemons' => Array( - 'courier' => Array( - 'label' => 'Courier', - 'files' => Array( - 'etc_authlib_authdaemonrc' => '/etc/authlib/authdaemonrc', - 'etc_authlib_authmysqlrc' => '/etc/authlib/authmysqlrc' - ), - 'restart' => Array( - '/etc/init.d/courier-authdaemon restart', - '/etc/init.d/courier-pop restart' - ) - ), - ) - ), - 'ftp' => Array( - 'label' => $lng['admin']['configfiles']['ftp'], - 'daemons' => Array( - 'proftpd' => Array( - 'label' => 'ProFTPd', - 'files' => Array( - 'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf', - 'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf' - ), - 'restart' => Array( - '/etc/init.d/proftpd restart' - ) - ), - ) - ), - 'etc' => Array( - 'label' => $lng['admin']['configfiles']['etc'], - 'daemons' => Array( - 'cron' => Array( - 'label' => 'Crond (cronscript)', - 'files' => Array( - 'etc_cron.d_froxlor' => '/etc/cron.d/froxlor' - ), - 'restart' => Array( - '/etc/init.d/cron restart' - ) - ), - 'awstats' => Array( - 'label' => 'Awstats', - 'files' => Array( - ($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor', - ($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats', - ($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf') - ), - 'commands' => Array( - ($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '') - ), - 'restart' => Array( - ($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart') - ) - ) - ) - ) - ) - ) -); - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Configfiles + * @version $Id$ + */ + +return Array( + 'suse_linux_10_0' => Array( + 'label' => 'SUSE Linux 10.0', + 'services' => Array( + 'http' => Array( + 'label' => $lng['admin']['configfiles']['http'], + 'daemons' => Array( + 'apache' => Array( + 'label' => 'Apache', + 'commands' => Array( + $configcommand['vhost'], + $configcommand['diroptions'], + $configcommand['include'], + 'mkdir -p ' . $settings['system']['documentroot_prefix'], + 'mkdir -p ' . $settings['system']['logfiles_directory'] + ), + 'restart' => Array( + '/etc/init.d/apache2 restart' + ) + ), + ) + ), + 'dns' => Array( + 'label' => $lng['admin']['configfiles']['dns'], + 'daemons' => Array( + 'bind' => Array( + 'label' => 'Bind9', + 'commands' => Array( + 'echo "include \"' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf\";" >> /etc/named.conf', + 'touch ' . $settings['system']['bindconf_directory'] . 'syscp_bind.conf' + ), + 'restart' => Array( + '/etc/init.d/named restart' + ) + ), + ) + ), + 'smtp' => Array( + 'label' => $lng['admin']['configfiles']['smtp'], + 'daemons' => Array( + 'postfix' => Array( + 'label' => 'Postfix', + 'files' => Array( + 'etc_postfix_main.cf' => '/etc/postfix/main.cf', + 'etc_postfix_mysql-virtual_alias_maps.cf' => '/etc/postfix/mysql-virtual_alias_maps.cf', + 'etc_postfix_mysql-virtual_mailbox_domains.cf' => '/etc/postfix/mysql-virtual_mailbox_domains.cf', + 'etc_postfix_mysql-virtual_mailbox_maps.cf' => '/etc/postfix/mysql-virtual_mailbox_maps.cf', + 'usr_lib_sasl2_smtpd.conf' => '/usr/lib/sasl2/smtpd.conf' + ), + 'commands' => Array( + 'mkdir -p /var/spool/postfix/etc/pam.d', + 'groupadd -g ' . $settings['system']['vmail_gid'] . ' vmail', + 'useradd -u ' . $settings['system']['vmail_uid'] . ' -g vmail vmail', + 'mkdir -p ' . $settings['system']['vmail_homedir'], + 'chown -R vmail:vmail ' . $settings['system']['vmail_homedir'], + 'touch /etc/postfix/mysql-virtual_alias_maps.cf', + 'touch /etc/postfix/mysql-virtual_mailbox_domains.cf', + 'touch /etc/postfix/mysql-virtual_mailbox_maps.cf', + 'touch /usr/lib/sasl2/smtpd.conf', + 'chmod 660 /etc/postfix/mysql-virtual_alias_maps.cf', + 'chmod 660 /etc/postfix/mysql-virtual_mailbox_domains.cf', + 'chmod 660 /etc/postfix/mysql-virtual_mailbox_maps.cf', + 'chmod 660 /usr/lib/sasl2/smtpd.conf', + 'chgrp postfix /etc/postfix/mysql-virtual_alias_maps.cf', + 'chgrp postfix /etc/postfix/mysql-virtual_mailbox_domains.cf', + 'chgrp postfix /etc/postfix/mysql-virtual_mailbox_maps.cf', + 'chgrp postfix /usr/lib/sasl2/smtpd.conf' + ), + 'restart' => Array( + '/etc/init.d/postfix restart' + ) + ) + ) + ), + 'mail' => Array( + 'label' => $lng['admin']['configfiles']['mail'], + 'daemons' => Array( + 'courier' => Array( + 'label' => 'Courier', + 'files' => Array( + 'etc_authlib_authdaemonrc' => '/etc/authlib/authdaemonrc', + 'etc_authlib_authmysqlrc' => '/etc/authlib/authmysqlrc' + ), + 'restart' => Array( + '/etc/init.d/courier-authdaemon restart', + '/etc/init.d/courier-pop restart' + ) + ), + ) + ), + 'ftp' => Array( + 'label' => $lng['admin']['configfiles']['ftp'], + 'daemons' => Array( + 'proftpd' => Array( + 'label' => 'ProFTPd', + 'files' => Array( + 'etc_proftpd_modules.conf' => '/etc/proftpd/modules.conf', + 'etc_proftpd_proftpd.conf' => '/etc/proftpd/proftpd.conf' + ), + 'restart' => Array( + '/etc/init.d/proftpd restart' + ) + ), + ) + ), + 'etc' => Array( + 'label' => $lng['admin']['configfiles']['etc'], + 'daemons' => Array( + 'cron' => Array( + 'label' => 'Crond (cronscript)', + 'files' => Array( + 'etc_cron.d_froxlor' => '/etc/cron.d/froxlor' + ), + 'restart' => Array( + '/etc/init.d/cron restart' + ) + ), + 'awstats' => Array( + 'label' => 'Awstats', + 'files' => Array( + ($settings['system']['mod_log_sql'] == 1 ? 'etc_awstats_awstats.model_log_sql.conf.froxlor' : 'etc_awstats_awstats.model.conf.froxlor') => '/etc/awstats/awstats.model.conf.froxlor', + ($settings['system']['mod_log_sql'] == 1 ? 'etc_cron.d_awstats_log_sql' : 'etc_cron.d_awstats') => '/etc/cron.d/awstats', + ($settings['system']['webserver'] == 'lighttpd' ? 'etc_lighttpd_froxlor-awstats.conf' : 'etc_apache_vhosts_05_awstats.conf') => ($settings['system']['webserver'] == 'lighttpd' ? '/etc/lighttpd/froxlor-awstats.conf' : '/etc/apache2/sites-enabled/05_awstats.conf') + ), + 'commands' => Array( + ($settings['system']['webserver'] == 'lighttpd' ? 'echo "include \"froxlor-awstats.conf\"" >> /etc/lighttpd/lighttpd.conf' : '') + ), + 'restart' => Array( + ($settings['system']['webserver'] == 'lighttpd' ? '/etc/init.d/lighttpd restart' : '/etc/init.d/apache2 restart') + ) + ) + ) + ) + ) + ) +); + +?> diff --git a/lib/configfiles_index.inc.php b/lib/configfiles_index.inc.php index 940b3632..4ee236ad 100644 --- a/lib/configfiles_index.inc.php +++ b/lib/configfiles_index.inc.php @@ -1,50 +1,50 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Lib - * @version $Id$ - */ - -$configcommand = array(); - -if(isConfigDir($settings['system']['apacheconf_vhost'])) -{ - $configcommand['vhost'] = 'mkdir -p ' . $settings['system']['apacheconf_vhost']; - $configcommand['include'] = 'echo -e "\\nInclude ' . makeCorrectDir($settings['system']['apacheconf_vhost']) . '*.conf" >> ' . makeCorrectFile(makeCorrectDir($settings['system']['apacheconf_vhost']) . '/httpd.conf'); - $configcommand['v_inclighty'] = 'echo -e \'\\ninclude_shell "find ' . makeCorrectDir($settings['system']['apacheconf_vhost']) . ' -maxdepth 1 -name \'*.conf\' -exec cat {} \;"\' >> /etc/lighttpd/lighttpd.conf'; -} -else -{ - $configcommand['vhost'] = 'touch ' . $settings['system']['apacheconf_vhost']; - $configcommand['include'] = 'echo -e "\\nInclude ' . $settings['system']['apacheconf_vhost'] . '" >> ' . makeCorrectFile(dirname($settings['system']['apacheconf_vhost']) . '/httpd.conf'); - $configcommand['v_inclighty'] = 'echo -e \'\\ninclude "' . $settings['system']['apacheconf_vhost'] . '"\' >> /etc/lighttpd/lighttpd.conf'; -} - -if(isConfigDir($settings['system']['apacheconf_diroptions'])) -{ - $configcommand['diroptions'] = 'mkdir -p ' . $settings['system']['apacheconf_diroptions']; - $configcommand['d_inclighty'] = 'echo -e \'\\ninclude_shell "find ' . makeCorrectDir($settings['system']['apacheconf_diroptions']) . ' -maxdepth 1 -name \'*.conf\' -exec cat {} \;"\' >> /etc/lighttpd/lighttpd.conf'; -} -else -{ - $configcommand['diroptions'] = 'touch ' . $settings['system']['apacheconf_diroptions']; - $configcommand['d_inclighty'] = 'echo -e \'\\ninclude "' . $settings['system']['apacheconf_diroptions'] . '"\' >> /etc/lighttpd/lighttpd.conf'; -} - -$cfgPath = 'lib/configfiles/'; -$configfiles = Array(); -$configfiles = array_merge(include $cfgPath . 'lenny.inc.php', include $cfgPath . 'etch.inc.php', include $cfgPath . 'hardy.inc.php', include $cfgPath . 'gentoo.inc.php', include $cfgPath . 'suse10.inc.php'); - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Lib + * @version $Id$ + */ + +$configcommand = array(); + +if(isConfigDir($settings['system']['apacheconf_vhost'])) +{ + $configcommand['vhost'] = 'mkdir -p ' . $settings['system']['apacheconf_vhost']; + $configcommand['include'] = 'echo -e "\\nInclude ' . makeCorrectDir($settings['system']['apacheconf_vhost']) . '*.conf" >> ' . makeCorrectFile(makeCorrectDir($settings['system']['apacheconf_vhost']) . '/httpd.conf'); + $configcommand['v_inclighty'] = 'echo -e \'\\ninclude_shell "find ' . makeCorrectDir($settings['system']['apacheconf_vhost']) . ' -maxdepth 1 -name \'*.conf\' -exec cat {} \;"\' >> /etc/lighttpd/lighttpd.conf'; +} +else +{ + $configcommand['vhost'] = 'touch ' . $settings['system']['apacheconf_vhost']; + $configcommand['include'] = 'echo -e "\\nInclude ' . $settings['system']['apacheconf_vhost'] . '" >> ' . makeCorrectFile(dirname($settings['system']['apacheconf_vhost']) . '/httpd.conf'); + $configcommand['v_inclighty'] = 'echo -e \'\\ninclude "' . $settings['system']['apacheconf_vhost'] . '"\' >> /etc/lighttpd/lighttpd.conf'; +} + +if(isConfigDir($settings['system']['apacheconf_diroptions'])) +{ + $configcommand['diroptions'] = 'mkdir -p ' . $settings['system']['apacheconf_diroptions']; + $configcommand['d_inclighty'] = 'echo -e \'\\ninclude_shell "find ' . makeCorrectDir($settings['system']['apacheconf_diroptions']) . ' -maxdepth 1 -name \'*.conf\' -exec cat {} \;"\' >> /etc/lighttpd/lighttpd.conf'; +} +else +{ + $configcommand['diroptions'] = 'touch ' . $settings['system']['apacheconf_diroptions']; + $configcommand['d_inclighty'] = 'echo -e \'\\ninclude "' . $settings['system']['apacheconf_diroptions'] . '"\' >> /etc/lighttpd/lighttpd.conf'; +} + +$cfgPath = 'lib/configfiles/'; +$configfiles = Array(); +$configfiles = array_merge(include $cfgPath . 'lenny.inc.php', include $cfgPath . 'etch.inc.php', include $cfgPath . 'hardy.inc.php', include $cfgPath . 'gentoo.inc.php', include $cfgPath . 'suse10.inc.php'); + ?> \ No newline at end of file diff --git a/lib/cron_init.php b/lib/cron_init.php index 246f1793..929f4181 100644 --- a/lib/cron_init.php +++ b/lib/cron_init.php @@ -1,193 +1,193 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Cron - * @version $Id$ - */ - -if(@php_sapi_name() != 'cli' - && @php_sapi_name() != 'cgi' - && @php_sapi_name() != 'cgi-fcgi') -{ - die('This script will only work in the shell.'); -} - -$lockdir = '/var/run/'; -$lockFilename = 'froxlor_' . basename($_SERVER['PHP_SELF'], '.php') . '.lock-'; -$lockfName = $lockFilename . getmypid(); -$lockfile = $lockdir . $lockfName; - -// guess the froxlor installation path -// normally you should not need to modify this script anymore, if your -// froxlor installation isn't in /var/www/froxlor - -$pathtophpfiles = dirname(dirname(__FILE__)); - -// should the froxlor installation guessing not work correctly, -// uncomment the following line, and put your path in there! -//$pathtophpfiles = '/var/www/froxlor/'; -// create and open the lockfile! - -$keepLockFile = false; -$debugHandler = fopen($lockfile, 'w'); -fwrite($debugHandler, 'Setting Lockfile to ' . $lockfile . "\n"); -fwrite($debugHandler, 'Setting Froxlor installation path to ' . $pathtophpfiles . "\n"); - -// open the lockfile directory and scan for existing lockfiles - -$lockDirHandle = opendir($lockdir); - -while($fName = readdir($lockDirHandle)) -{ - if($lockFilename == substr($fName, 0, strlen($lockFilename)) - && $lockfName != $fName) - { - // Check if last run jailed out with an exception - - $croncontent = file($lockdir . $fName); - $lastline = $croncontent[(count($croncontent) - 1)]; - - if($lastline == '=== Keep lockfile because of exception ===') - { - fclose($debugHandler); - unlink($lockfile); - die('Last cron jailed out with an exception. Exiting...' . "\n" . 'Take a look into the contents of ' . $lockdir . $fName . '* for more information!' . "\n"); - } - - // Check if cron is running or has died. - - $check_pid = substr(strstr($fName, "-"), 1); - system("kill -CHLD " . $check_pid . " 1> /dev/null 2> /dev/null", $check_pid_return); - - if($check_pid_return == 1) - { - // Result: Existing lockfile/pid isnt running - // Most likely it has died - // - // Action: Remove it and continue - // - - fwrite($debugHandler, 'Previous cronjob didn\'t exit clean. PID: ' . $check_pid . "\n"); - fwrite($debugHandler, 'Removing lockfile: ' . $lockdir . $fName . "\n"); - unlink($lockdir . $fName); - } - else - { - // Result: A Cronscript with this pid - // is still running - // Action: remove my own Lock and die - // - // close the current lockfile - - fclose($debugHandler); - - // ... and delete it - - unlink($lockfile); - die('There is already a Cronjob in progress. Exiting...' . "\n" . 'Take a look into the contents of ' . $lockdir . $lockFilename . '* for more information!' . "\n"); - } - } -} - -/** - * Includes the Usersettings eg. MySQL-Username/Passwort etc. - */ - -require ($pathtophpfiles . '/lib/userdata.inc.php'); -fwrite($debugHandler, 'Userdatas included' . "\n"); - -// Legacy sql-root-information -if(isset($sql['root_user']) && isset($sql['root_password']) && (!isset($sql_root) || !is_array($sql_root))) -{ - $sql_root = array(0 => array('caption' => 'Default', 'host' => $sql['host'], 'user' => $sql['root_user'], 'password' => $sql['root_password'])); - unset($sql['root_user']); - unset($sql['root_password']); -} - -/** - * Includes the Functions - */ - -require ($pathtophpfiles . '/lib/functions.php'); - -/** - * Includes the MySQL-Tabledefinitions etc. - */ - -require ($pathtophpfiles . '/lib/tables.inc.php'); -fwrite($debugHandler, 'Table definitions included' . "\n"); - -/** - * Includes the MySQL-Connection-Class - */ - -fwrite($debugHandler, 'Database Class has been loaded' . "\n"); -$db = new db($sql['host'], $sql['user'], $sql['password'], $sql['db']); - -if($db->link_id == 0) -{ - /** - * Do not proceed further if no database connection could be established - */ - - fclose($debugHandler); - unlink($lockfile); - die('Froxlor can\'t connect to mysqlserver. Please check userdata.inc.php! Exiting...'); -} - -fwrite($debugHandler, 'Database-connection established' . "\n"); -unset($sql); -unset($db->password); -$result = $db->query("SELECT `settingid`, `settinggroup`, `varname`, `value` FROM `" . TABLE_PANEL_SETTINGS . "`"); - -while($row = $db->fetch_array($result)) -{ - $settings[$row['settinggroup']][$row['varname']] = $row['value']; -} - -unset($row); -unset($result); -fwrite($debugHandler, 'Froxlor Settings has been loaded from the database' . "\n"); - -if(!isset($settings['panel']['version']) - || $settings['panel']['version'] != $version) -{ - /** - * Do not proceed further if the Database version is not the same as the script version - */ - - fclose($debugHandler); - unlink($lockfile); - die('Version of File doesnt match Version of Database. Exiting...'); -} - -fwrite($debugHandler, 'Froxlor Version and Database Version are correct' . "\n"); - -$cronscriptDebug = ($settings['system']['debug_cron'] == '1') ? true : false; - -/** - * Create a new idna converter - */ - -$idna_convert = new idna_convert_wrapper(); - -/** - * Initialize logging - */ - -$cronlog = FroxlorLogger::getInstanceOf(array('loginname' => 'cronjob'), $db, $settings); -fwrite($debugHandler, 'Logger has been included' . "\n"); - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Cron + * @version $Id$ + */ + +if(@php_sapi_name() != 'cli' + && @php_sapi_name() != 'cgi' + && @php_sapi_name() != 'cgi-fcgi') +{ + die('This script will only work in the shell.'); +} + +$lockdir = '/var/run/'; +$lockFilename = 'froxlor_' . basename($_SERVER['PHP_SELF'], '.php') . '.lock-'; +$lockfName = $lockFilename . getmypid(); +$lockfile = $lockdir . $lockfName; + +// guess the froxlor installation path +// normally you should not need to modify this script anymore, if your +// froxlor installation isn't in /var/www/froxlor + +$pathtophpfiles = dirname(dirname(__FILE__)); + +// should the froxlor installation guessing not work correctly, +// uncomment the following line, and put your path in there! +//$pathtophpfiles = '/var/www/froxlor/'; +// create and open the lockfile! + +$keepLockFile = false; +$debugHandler = fopen($lockfile, 'w'); +fwrite($debugHandler, 'Setting Lockfile to ' . $lockfile . "\n"); +fwrite($debugHandler, 'Setting Froxlor installation path to ' . $pathtophpfiles . "\n"); + +// open the lockfile directory and scan for existing lockfiles + +$lockDirHandle = opendir($lockdir); + +while($fName = readdir($lockDirHandle)) +{ + if($lockFilename == substr($fName, 0, strlen($lockFilename)) + && $lockfName != $fName) + { + // Check if last run jailed out with an exception + + $croncontent = file($lockdir . $fName); + $lastline = $croncontent[(count($croncontent) - 1)]; + + if($lastline == '=== Keep lockfile because of exception ===') + { + fclose($debugHandler); + unlink($lockfile); + die('Last cron jailed out with an exception. Exiting...' . "\n" . 'Take a look into the contents of ' . $lockdir . $fName . '* for more information!' . "\n"); + } + + // Check if cron is running or has died. + + $check_pid = substr(strstr($fName, "-"), 1); + system("kill -CHLD " . $check_pid . " 1> /dev/null 2> /dev/null", $check_pid_return); + + if($check_pid_return == 1) + { + // Result: Existing lockfile/pid isnt running + // Most likely it has died + // + // Action: Remove it and continue + // + + fwrite($debugHandler, 'Previous cronjob didn\'t exit clean. PID: ' . $check_pid . "\n"); + fwrite($debugHandler, 'Removing lockfile: ' . $lockdir . $fName . "\n"); + unlink($lockdir . $fName); + } + else + { + // Result: A Cronscript with this pid + // is still running + // Action: remove my own Lock and die + // + // close the current lockfile + + fclose($debugHandler); + + // ... and delete it + + unlink($lockfile); + die('There is already a Cronjob in progress. Exiting...' . "\n" . 'Take a look into the contents of ' . $lockdir . $lockFilename . '* for more information!' . "\n"); + } + } +} + +/** + * Includes the Usersettings eg. MySQL-Username/Passwort etc. + */ + +require ($pathtophpfiles . '/lib/userdata.inc.php'); +fwrite($debugHandler, 'Userdatas included' . "\n"); + +// Legacy sql-root-information +if(isset($sql['root_user']) && isset($sql['root_password']) && (!isset($sql_root) || !is_array($sql_root))) +{ + $sql_root = array(0 => array('caption' => 'Default', 'host' => $sql['host'], 'user' => $sql['root_user'], 'password' => $sql['root_password'])); + unset($sql['root_user']); + unset($sql['root_password']); +} + +/** + * Includes the Functions + */ + +require ($pathtophpfiles . '/lib/functions.php'); + +/** + * Includes the MySQL-Tabledefinitions etc. + */ + +require ($pathtophpfiles . '/lib/tables.inc.php'); +fwrite($debugHandler, 'Table definitions included' . "\n"); + +/** + * Includes the MySQL-Connection-Class + */ + +fwrite($debugHandler, 'Database Class has been loaded' . "\n"); +$db = new db($sql['host'], $sql['user'], $sql['password'], $sql['db']); + +if($db->link_id == 0) +{ + /** + * Do not proceed further if no database connection could be established + */ + + fclose($debugHandler); + unlink($lockfile); + die('Froxlor can\'t connect to mysqlserver. Please check userdata.inc.php! Exiting...'); +} + +fwrite($debugHandler, 'Database-connection established' . "\n"); +unset($sql); +unset($db->password); +$result = $db->query("SELECT `settingid`, `settinggroup`, `varname`, `value` FROM `" . TABLE_PANEL_SETTINGS . "`"); + +while($row = $db->fetch_array($result)) +{ + $settings[$row['settinggroup']][$row['varname']] = $row['value']; +} + +unset($row); +unset($result); +fwrite($debugHandler, 'Froxlor Settings has been loaded from the database' . "\n"); + +if(!isset($settings['panel']['version']) + || $settings['panel']['version'] != $version) +{ + /** + * Do not proceed further if the Database version is not the same as the script version + */ + + fclose($debugHandler); + unlink($lockfile); + die('Version of File doesnt match Version of Database. Exiting...'); +} + +fwrite($debugHandler, 'Froxlor Version and Database Version are correct' . "\n"); + +$cronscriptDebug = ($settings['system']['debug_cron'] == '1') ? true : false; + +/** + * Create a new idna converter + */ + +$idna_convert = new idna_convert_wrapper(); + +/** + * Initialize logging + */ + +$cronlog = FroxlorLogger::getInstanceOf(array('loginname' => 'cronjob'), $db, $settings); +fwrite($debugHandler, 'Logger has been included' . "\n"); + +?> diff --git a/lib/cron_shutdown.php b/lib/cron_shutdown.php index 2caaefca..00ddf5ab 100644 --- a/lib/cron_shutdown.php +++ b/lib/cron_shutdown.php @@ -1,47 +1,47 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Cron - * @version $Id$ - */ - -if($settings['logger']['log_cron'] == '1') -{ - $cronlog->setCronLog(0); - fwrite($debugHandler, 'Logging for cron has been shutdown' . "\n"); -} - -$db->close(); -fwrite($debugHandler, 'Closing database connection' . "\n"); - -if(isset($db_root)) -{ - $db_root->close(); - fwrite($debugHandler, 'Closing database rootconnection' . "\n"); -} - -if($keepLockFile === true) -{ - fwrite($debugHandler, '=== Keep lockfile because of exception ==='); -} - -fclose($debugHandler); - -if($keepLockFile === false - && $cronscriptDebug === false) -{ - unlink($lockfile); -} - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Cron + * @version $Id$ + */ + +if($settings['logger']['log_cron'] == '1') +{ + $cronlog->setCronLog(0); + fwrite($debugHandler, 'Logging for cron has been shutdown' . "\n"); +} + +$db->close(); +fwrite($debugHandler, 'Closing database connection' . "\n"); + +if(isset($db_root)) +{ + $db_root->close(); + fwrite($debugHandler, 'Closing database rootconnection' . "\n"); +} + +if($keepLockFile === true) +{ + fwrite($debugHandler, '=== Keep lockfile because of exception ==='); +} + +fclose($debugHandler); + +if($keepLockFile === false + && $cronscriptDebug === false) +{ + unlink($lockfile); +} + diff --git a/lib/functions.php b/lib/functions.php index 54cb1ea0..717cccf0 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -1,78 +1,78 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -$libdirname = dirname(__FILE__); - -includeFunctions($libdirname . '/functions/'); - -function includeFunctions($dirname) -{ - $dirhandle = opendir($dirname); - while(false !== ($filename = readdir($dirhandle))) - { - if($filename != '.' && $filename != '..' && $filename != '') - { - if((substr($filename, 0, 9) == 'function.' || substr($filename, 0, 9) == 'constant.') && substr($filename, -4 ) == '.php') - { - include($dirname . $filename); - } - - if(is_dir($dirname . $filename)) - { - includeFunctions($dirname . $filename . '/'); - } - } - } - closedir($dirhandle); -} - -function __autoload($classname) -{ - global $libdirname; - findIncludeClass($libdirname . '/classes/', $classname); -} - -function findIncludeClass($dirname, $classname) -{ - $dirhandle = opendir($dirname); - while(false !== ($filename = readdir($dirhandle))) - { - if($filename != '.' && $filename != '..' && $filename != '') - { - if($filename == 'class.' . $classname . '.php' || $filename == 'abstract.' . $classname . '.php') - { - include($dirname . $filename); - return; - } - - if(is_dir($dirname . $filename)) - { - findIncludeClass($dirname . $filename . '/', $classname); - } - } - } - closedir($dirhandle); -} - - -function exportDetails($fielddata, $newfieldvalue) -{ - print_r($newfieldvalue); -} - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +$libdirname = dirname(__FILE__); + +includeFunctions($libdirname . '/functions/'); + +function includeFunctions($dirname) +{ + $dirhandle = opendir($dirname); + while(false !== ($filename = readdir($dirhandle))) + { + if($filename != '.' && $filename != '..' && $filename != '') + { + if((substr($filename, 0, 9) == 'function.' || substr($filename, 0, 9) == 'constant.') && substr($filename, -4 ) == '.php') + { + include($dirname . $filename); + } + + if(is_dir($dirname . $filename)) + { + includeFunctions($dirname . $filename . '/'); + } + } + } + closedir($dirhandle); +} + +function __autoload($classname) +{ + global $libdirname; + findIncludeClass($libdirname . '/classes/', $classname); +} + +function findIncludeClass($dirname, $classname) +{ + $dirhandle = opendir($dirname); + while(false !== ($filename = readdir($dirhandle))) + { + if($filename != '.' && $filename != '..' && $filename != '') + { + if($filename == 'class.' . $classname . '.php' || $filename == 'abstract.' . $classname . '.php') + { + include($dirname . $filename); + return; + } + + if(is_dir($dirname . $filename)) + { + findIncludeClass($dirname . $filename . '/', $classname); + } + } + } + closedir($dirhandle); +} + + +function exportDetails($fielddata, $newfieldvalue) +{ + print_r($newfieldvalue); +} + diff --git a/lib/functions/aps/function.storeSettingApsPhpExtensions.php b/lib/functions/aps/function.storeSettingApsPhpExtensions.php index 4cda8cf2..46be367c 100644 --- a/lib/functions/aps/function.storeSettingApsPhpExtensions.php +++ b/lib/functions/aps/function.storeSettingApsPhpExtensions.php @@ -1,44 +1,44 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function storeSettingApsPhpExtensions($fieldname, $fielddata, $newfieldvalue) -{ - $returnvalue = storeSettingField($fieldname, $fielddata, $newfieldvalue); - - if($returnvalue !== false && is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] == 'aps' && isset($fielddata['varname']) && $fielddata['varname'] == 'php-extension') - { - $newfieldvalue_array = explode(',', $newfieldvalue); - - if(in_array('mcrypt', $newfieldvalue_array)) - { - $functions = 'mcrypt_encrypt,mcrypt_decrypt'; - } - else - { - $functions = ''; - } - - if($functions != getSetting('aps', 'php-function')) - { - saveSetting('aps', 'php-function', $functions); - } - } - - return $returnvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function storeSettingApsPhpExtensions($fieldname, $fielddata, $newfieldvalue) +{ + $returnvalue = storeSettingField($fieldname, $fielddata, $newfieldvalue); + + if($returnvalue !== false && is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] == 'aps' && isset($fielddata['varname']) && $fielddata['varname'] == 'php-extension') + { + $newfieldvalue_array = explode(',', $newfieldvalue); + + if(in_array('mcrypt', $newfieldvalue_array)) + { + $functions = 'mcrypt_encrypt,mcrypt_decrypt'; + } + else + { + $functions = ''; + } + + if($functions != getSetting('aps', 'php-function')) + { + saveSetting('aps', 'php-function', $functions); + } + } + + return $returnvalue; +} diff --git a/lib/functions/aps/function.storeSettingApsWebserverModules.php b/lib/functions/aps/function.storeSettingApsWebserverModules.php index 4bae3c97..bdac654a 100644 --- a/lib/functions/aps/function.storeSettingApsWebserverModules.php +++ b/lib/functions/aps/function.storeSettingApsWebserverModules.php @@ -1,48 +1,48 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function storeSettingApsWebserverModules($fieldname, $fielddata, $newfieldvalue) -{ - if(is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] == 'aps' && isset($fielddata['varname']) && $fielddata['varname'] == 'webserver-module') - { - $newfieldvalue_array = explode(',', $newfieldvalue); - - if(in_array('mod_rewrite', $newfieldvalue_array)) - { - // Don't have to guess if we have to remove the leading comma as mod_rewrite is set anyways when we're here... - $newfieldvalue .= ',mod_rewrite.c'; - } - - if(in_array('htaccess', $newfieldvalue_array)) - { - $htaccess = 'htaccess'; - } - else - { - $htaccess = ''; - } - - if($htaccess != getSetting('aps', 'webserver-htaccess')) - { - saveSetting('aps', 'webserver-htaccess', $htaccess); - } - } - - return storeSettingField($fieldname, $fielddata, $newfieldvalue); -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function storeSettingApsWebserverModules($fieldname, $fielddata, $newfieldvalue) +{ + if(is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] == 'aps' && isset($fielddata['varname']) && $fielddata['varname'] == 'webserver-module') + { + $newfieldvalue_array = explode(',', $newfieldvalue); + + if(in_array('mod_rewrite', $newfieldvalue_array)) + { + // Don't have to guess if we have to remove the leading comma as mod_rewrite is set anyways when we're here... + $newfieldvalue .= ',mod_rewrite.c'; + } + + if(in_array('htaccess', $newfieldvalue_array)) + { + $htaccess = 'htaccess'; + } + else + { + $htaccess = ''; + } + + if($htaccess != getSetting('aps', 'webserver-htaccess')) + { + saveSetting('aps', 'webserver-htaccess', $htaccess); + } + } + + return storeSettingField($fieldname, $fielddata, $newfieldvalue); +} diff --git a/lib/functions/aps/function.sys_get_temp_dir.php b/lib/functions/aps/function.sys_get_temp_dir.php index 0aaef9f4..eff47e6a 100644 --- a/lib/functions/aps/function.sys_get_temp_dir.php +++ b/lib/functions/aps/function.sys_get_temp_dir.php @@ -1,66 +1,66 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -if(!function_exists('sys_get_temp_dir')) -{ - /** - * function will return the temporary directory where we can write data - * function exists as a fallback for php versions lower than 5.2.1 - * source copied from php.net - * - * @author Sven Skrabal - */ - - function sys_get_temp_dir() - { - // Try to get from environment variable - - if(!empty($_ENV['TMP'])) - { - return realpath($_ENV['TMP']); - } - elseif(!empty($_ENV['TMPDIR'])) - { - return realpath($_ENV['TMPDIR']); - } - elseif(!empty($_ENV['TEMP'])) - { - return realpath($_ENV['TEMP']); - } - else - { - // Detect by creating a temporary file - // Try to use system's temporary directory - // as random name shouldn't exist - - $temp_file = tempnam(md5(uniqid(rand(), true)), ''); - - if($temp_file) - { - $temp_dir = realpath(dirname($temp_file)); - unlink($temp_file); - return $temp_dir; - } - else - { - return false; - } - } - } -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +if(!function_exists('sys_get_temp_dir')) +{ + /** + * function will return the temporary directory where we can write data + * function exists as a fallback for php versions lower than 5.2.1 + * source copied from php.net + * + * @author Sven Skrabal + */ + + function sys_get_temp_dir() + { + // Try to get from environment variable + + if(!empty($_ENV['TMP'])) + { + return realpath($_ENV['TMP']); + } + elseif(!empty($_ENV['TMPDIR'])) + { + return realpath($_ENV['TMPDIR']); + } + elseif(!empty($_ENV['TEMP'])) + { + return realpath($_ENV['TEMP']); + } + else + { + // Detect by creating a temporary file + // Try to use system's temporary directory + // as random name shouldn't exist + + $temp_file = tempnam(md5(uniqid(rand(), true)), ''); + + if($temp_file) + { + $temp_dir = realpath(dirname($temp_file)); + unlink($temp_file); + return $temp_dir; + } + else + { + return false; + } + } + } +} diff --git a/lib/functions/database/function.correctMysqlUsers.php b/lib/functions/database/function.correctMysqlUsers.php index 8f13b2f5..3e3b05bc 100644 --- a/lib/functions/database/function.correctMysqlUsers.php +++ b/lib/functions/database/function.correctMysqlUsers.php @@ -1,91 +1,91 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function correctMysqlUsers($mysql_access_host_array) -{ - global $db, $settings, $sql, $sql_root; - - foreach($sql_root as $mysql_server => $mysql_server_details) - { - $db_root = new db($mysql_server_details['host'], $mysql_server_details['user'], $mysql_server_details['password'], ''); - unset($db_root->password); - - $users = array(); - $users_result = $db_root->query('SELECT * FROM `mysql`.`user`'); - - while($users_row = $db_root->fetch_array($users_result)) - { - if(!isset($users[$users_row['User']]) - || !is_array($users[$users_row['User']])) - { - $users[$users_row['User']] = array( - 'password' => $users_row['Password'], - 'hosts' => array() - ); - } - - $users[$users_row['User']]['hosts'][] = $users_row['Host']; - } - - $databases = array( - $sql['db'] - ); - $databases_result = $db->query('SELECT * FROM `' . TABLE_PANEL_DATABASES . '` WHERE `dbserver` = \'' . $mysql_server . '\''); - - while($databases_row = $db->fetch_array($databases_result)) - { - $databases[] = $databases_row['databasename']; - } - - foreach($databases as $username) - { - if(isset($users[$username]) - && is_array($users[$username]) - && isset($users[$username]['hosts']) - && is_array($users[$username]['hosts'])) - { - $password = $users[$username]['password']; - foreach($mysql_access_host_array as $mysql_access_host) - { - $mysql_access_host = trim($mysql_access_host); - - if(!in_array($mysql_access_host, $users[$username]['hosts'])) - { - $db_root->query('GRANT ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($username)) . '`.* TO `' . $db_root->escape($username) . '`@`' . $db_root->escape($mysql_access_host) . '` IDENTIFIED BY \'password\''); - $db_root->query('SET PASSWORD FOR `' . $db_root->escape($username) . '`@`' . $db_root->escape($mysql_access_host) . '` = \'' . $db_root->escape($password) . '\''); - } - } - - foreach($users[$username]['hosts'] as $mysql_access_host) - { - if(!in_array($mysql_access_host, $mysql_access_host_array)) - { - $db_root->query('REVOKE ALL PRIVILEGES ON * . * FROM `' . $db_root->escape($username) . '`@`' . $db_root->escape($mysql_access_host) . '`'); - $db_root->query('REVOKE ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($username)) . '` . * FROM `' . $db_root->escape($username) . '`@`' . $db_root->escape($mysql_access_host) . '`'); - $db_root->query('DELETE FROM `mysql`.`user` WHERE `User` = "' . $db_root->escape($username) . '" AND `Host` = "' . $db_root->escape($mysql_access_host) . '"'); - } - } - } - } - - $db_root->query('FLUSH PRIVILEGES'); - $db_root->close(); - unset($db_root); - } -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function correctMysqlUsers($mysql_access_host_array) +{ + global $db, $settings, $sql, $sql_root; + + foreach($sql_root as $mysql_server => $mysql_server_details) + { + $db_root = new db($mysql_server_details['host'], $mysql_server_details['user'], $mysql_server_details['password'], ''); + unset($db_root->password); + + $users = array(); + $users_result = $db_root->query('SELECT * FROM `mysql`.`user`'); + + while($users_row = $db_root->fetch_array($users_result)) + { + if(!isset($users[$users_row['User']]) + || !is_array($users[$users_row['User']])) + { + $users[$users_row['User']] = array( + 'password' => $users_row['Password'], + 'hosts' => array() + ); + } + + $users[$users_row['User']]['hosts'][] = $users_row['Host']; + } + + $databases = array( + $sql['db'] + ); + $databases_result = $db->query('SELECT * FROM `' . TABLE_PANEL_DATABASES . '` WHERE `dbserver` = \'' . $mysql_server . '\''); + + while($databases_row = $db->fetch_array($databases_result)) + { + $databases[] = $databases_row['databasename']; + } + + foreach($databases as $username) + { + if(isset($users[$username]) + && is_array($users[$username]) + && isset($users[$username]['hosts']) + && is_array($users[$username]['hosts'])) + { + $password = $users[$username]['password']; + foreach($mysql_access_host_array as $mysql_access_host) + { + $mysql_access_host = trim($mysql_access_host); + + if(!in_array($mysql_access_host, $users[$username]['hosts'])) + { + $db_root->query('GRANT ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($username)) . '`.* TO `' . $db_root->escape($username) . '`@`' . $db_root->escape($mysql_access_host) . '` IDENTIFIED BY \'password\''); + $db_root->query('SET PASSWORD FOR `' . $db_root->escape($username) . '`@`' . $db_root->escape($mysql_access_host) . '` = \'' . $db_root->escape($password) . '\''); + } + } + + foreach($users[$username]['hosts'] as $mysql_access_host) + { + if(!in_array($mysql_access_host, $mysql_access_host_array)) + { + $db_root->query('REVOKE ALL PRIVILEGES ON * . * FROM `' . $db_root->escape($username) . '`@`' . $db_root->escape($mysql_access_host) . '`'); + $db_root->query('REVOKE ALL PRIVILEGES ON `' . str_replace('_', '\_', $db_root->escape($username)) . '` . * FROM `' . $db_root->escape($username) . '`@`' . $db_root->escape($mysql_access_host) . '`'); + $db_root->query('DELETE FROM `mysql`.`user` WHERE `User` = "' . $db_root->escape($username) . '" AND `Host` = "' . $db_root->escape($mysql_access_host) . '"'); + } + } + } + } + + $db_root->query('FLUSH PRIVILEGES'); + $db_root->close(); + unset($db_root); + } +} diff --git a/lib/functions/database/function.getTables.php b/lib/functions/database/function.getTables.php index edf47128..7f621e6f 100644 --- a/lib/functions/database/function.getTables.php +++ b/lib/functions/database/function.getTables.php @@ -1,122 +1,122 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Returns an array with all tables with keys which are in the currently selected database - * - * @param db A valid DB-object - * @return array Array with tables and keys - * - * @author Florian Lippert - */ - -function getTables(&$db) -{ - // This variable is our return-value - - $tables = array(); - - // The fieldname in the associative array which we get by fetch_array() - - $tablefieldname = 'Tables_in_' . $db->database; - - // Query for a list of tables in the currently selected database - - $tables_result = $db->query('SHOW TABLES'); - - while($tables_row = $db->fetch_array($tables_result)) - { - // Extract tablename - - $tablename = $tables_row[$tablefieldname]; - - // Create sub-array with key tablename - - $tables[$tablename] = array(); - - // Query for a list of indexes of the currently selected table - - $keys_result = $db->query('SHOW INDEX FROM ' . $tablename); - - while($keys_row = $db->fetch_array($keys_result)) - { - // Extract keyname - - $keyname = $keys_row['Key_name']; - - // If there is aleady a key in our tablename-sub-array with has the same name as our key - // OR if the sequence is not one - // then we have more then index-columns for our keyname - - if((isset($tables[$tablename][$keyname]) && $tables[$tablename][$keyname] != '') - || $keys_row['Seq_in_index'] != '1') - { - // If there is no keyname in the tablename-sub-array set ... - - if(!isset($tables[$tablename][$keyname])) - { - // ... then create one - - $tables[$tablename][$keyname] = array(); - } - - // If the keyname-sub-array isn't an array ... - - elseif (!is_array($tables[$tablename][$keyname])) - { - // temporary move columname - - $tmpkeyvalue = $tables[$tablename][$keyname]; - - // unset keyname-key - - unset($tables[$tablename][$keyname]); - - // create new array for keyname-key - - $tables[$tablename][$keyname] = array(); - - // keyindex will be 1 by default, if seq is also 1 we'd better use 0 (this case shouldn't ever occur) - - $keyindex = ($keys_row['Seq_in_index'] == '1') ? '0' : '1'; - - // then move back our tmp columname from above - - $tables[$tablename][$keyname][$keyindex] = $tmpkeyvalue; - - // end unset the variable afterwards - - unset($tmpkeyvalue); - } - - // set columname - - $tables[$tablename][$keyname][$keys_row['Seq_in_index']] = $keys_row['Column_name']; - } - else - { - // set columname - - $tables[$tablename][$keyname] = $keys_row['Column_name']; - } - } - } - - return $tables; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Returns an array with all tables with keys which are in the currently selected database + * + * @param db A valid DB-object + * @return array Array with tables and keys + * + * @author Florian Lippert + */ + +function getTables(&$db) +{ + // This variable is our return-value + + $tables = array(); + + // The fieldname in the associative array which we get by fetch_array() + + $tablefieldname = 'Tables_in_' . $db->database; + + // Query for a list of tables in the currently selected database + + $tables_result = $db->query('SHOW TABLES'); + + while($tables_row = $db->fetch_array($tables_result)) + { + // Extract tablename + + $tablename = $tables_row[$tablefieldname]; + + // Create sub-array with key tablename + + $tables[$tablename] = array(); + + // Query for a list of indexes of the currently selected table + + $keys_result = $db->query('SHOW INDEX FROM ' . $tablename); + + while($keys_row = $db->fetch_array($keys_result)) + { + // Extract keyname + + $keyname = $keys_row['Key_name']; + + // If there is aleady a key in our tablename-sub-array with has the same name as our key + // OR if the sequence is not one + // then we have more then index-columns for our keyname + + if((isset($tables[$tablename][$keyname]) && $tables[$tablename][$keyname] != '') + || $keys_row['Seq_in_index'] != '1') + { + // If there is no keyname in the tablename-sub-array set ... + + if(!isset($tables[$tablename][$keyname])) + { + // ... then create one + + $tables[$tablename][$keyname] = array(); + } + + // If the keyname-sub-array isn't an array ... + + elseif (!is_array($tables[$tablename][$keyname])) + { + // temporary move columname + + $tmpkeyvalue = $tables[$tablename][$keyname]; + + // unset keyname-key + + unset($tables[$tablename][$keyname]); + + // create new array for keyname-key + + $tables[$tablename][$keyname] = array(); + + // keyindex will be 1 by default, if seq is also 1 we'd better use 0 (this case shouldn't ever occur) + + $keyindex = ($keys_row['Seq_in_index'] == '1') ? '0' : '1'; + + // then move back our tmp columname from above + + $tables[$tablename][$keyname][$keyindex] = $tmpkeyvalue; + + // end unset the variable afterwards + + unset($tmpkeyvalue); + } + + // set columname + + $tables[$tablename][$keyname][$keys_row['Seq_in_index']] = $keys_row['Column_name']; + } + else + { + // set columname + + $tables[$tablename][$keyname] = $keys_row['Column_name']; + } + } + } + + return $tables; +} diff --git a/lib/functions/database/function.remove_remarks.php b/lib/functions/database/function.remove_remarks.php index 89eaf91b..d801cc7f 100644 --- a/lib/functions/database/function.remove_remarks.php +++ b/lib/functions/database/function.remove_remarks.php @@ -1,55 +1,55 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -// -// remove_remarks will strip the sql comment lines out of an uploaded sql file -// The whole function has been taken from the phpbb installer, copyright by the phpbb team, phpbb in summer 2004. -// - -function remove_remarks($sql) -{ - $lines = explode("\n", $sql); - - // try to keep mem. use down - - $sql = ""; - $linecount = count($lines); - $output = ""; - for ($i = 0;$i < $linecount;$i++) - { - if(($i != ($linecount - 1)) - || (strlen($lines[$i]) > 0)) - { - if(substr($lines[$i], 0, 1) != "#") - { - $output.= $lines[$i] . "\n"; - } - else - { - $output.= "\n"; - } - - // Trading a bit of speed for lower mem. use here. - - $lines[$i] = ""; - } - } - - return $output; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +// +// remove_remarks will strip the sql comment lines out of an uploaded sql file +// The whole function has been taken from the phpbb installer, copyright by the phpbb team, phpbb in summer 2004. +// + +function remove_remarks($sql) +{ + $lines = explode("\n", $sql); + + // try to keep mem. use down + + $sql = ""; + $linecount = count($lines); + $output = ""; + for ($i = 0;$i < $linecount;$i++) + { + if(($i != ($linecount - 1)) + || (strlen($lines[$i]) > 0)) + { + if(substr($lines[$i], 0, 1) != "#") + { + $output.= $lines[$i] . "\n"; + } + else + { + $output.= "\n"; + } + + // Trading a bit of speed for lower mem. use here. + + $lines[$i] = ""; + } + } + + return $output; +} diff --git a/lib/functions/database/function.split_sql_file.php b/lib/functions/database/function.split_sql_file.php index 826966dc..4798d8f8 100644 --- a/lib/functions/database/function.split_sql_file.php +++ b/lib/functions/database/function.split_sql_file.php @@ -1,140 +1,140 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -// -// split_sql_file will split an uploaded sql file into single sql statements. -// Note: expects trim() to have already been run on $sql -// The whole function has been taken from the phpbb installer, copyright by the phpbb team, phpbb in summer 2004. -// - -function split_sql_file($sql, $delimiter) -{ - // Split up our string into "possible" SQL statements. - - $tokens = explode($delimiter, $sql); - - // try to save mem. - - $sql = ""; - $output = array(); - - // we don't actually care about the matches preg gives us. - - $matches = array(); - - // this is faster than calling count($oktens) every time thru the loop. - - $token_count = count($tokens); - for ($i = 0;$i < $token_count;$i++) - { - // Don't wanna add an empty string as the last thing in the array. - - if(($i != ($token_count - 1)) - || (strlen($tokens[$i] > 0))) - { - // This is the total number of single quotes in the token. - - $total_quotes = preg_match_all("/'/", $tokens[$i], $matches); - - // Counts single quotes that are preceded by an odd number of backslashes, - // which means they're escaped quotes. - - $escaped_quotes = preg_match_all("/(? (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +// +// split_sql_file will split an uploaded sql file into single sql statements. +// Note: expects trim() to have already been run on $sql +// The whole function has been taken from the phpbb installer, copyright by the phpbb team, phpbb in summer 2004. +// + +function split_sql_file($sql, $delimiter) +{ + // Split up our string into "possible" SQL statements. + + $tokens = explode($delimiter, $sql); + + // try to save mem. + + $sql = ""; + $output = array(); + + // we don't actually care about the matches preg gives us. + + $matches = array(); + + // this is faster than calling count($oktens) every time thru the loop. + + $token_count = count($tokens); + for ($i = 0;$i < $token_count;$i++) + { + // Don't wanna add an empty string as the last thing in the array. + + if(($i != ($token_count - 1)) + || (strlen($tokens[$i] > 0))) + { + // This is the total number of single quotes in the token. + + $total_quotes = preg_match_all("/'/", $tokens[$i], $matches); + + // Counts single quotes that are preceded by an odd number of backslashes, + // which means they're escaped quotes. + + $escaped_quotes = preg_match_all("/(? (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Returns an array of found directories - * - * This function checks every found directory if they match either $uid or $gid, if they do - * the found directory is valid. It uses recursive function calls to find subdirectories. Due - * to the recursive behauviour this function may consume much memory. - * - * @param string path The path to start searching in - * @param integer uid The uid which must match the found directories - * @param integer gid The gid which must match the found direcotries - * @param array _fileList recursive transport array !for internal use only! - * @return array Array of found valid pathes - * - * @author Martin Burchert - * @author Manuel Bernhardt - */ - -function findDirs($path, $uid, $gid) -{ - $list = array( - $path - ); - $_fileList = array(); - - while(sizeof($list) > 0) - { - $path = array_pop($list); - $path = makeCorrectDir($path); - - if(!is_readable($path)) - { - return $_fileList; - } - - $dh = opendir($path); - - if($dh === false) - { - /* - * this should never be called because we checked - * 'is_readable' before...but we never know what might happen - */ - standard_error('cannotreaddir', $path); - return null; - } - else - { - while(false !== ($file = @readdir($dh))) - { - if($file == '.' - && (fileowner($path . '/' . $file) == $uid || filegroup($path . '/' . $file) == $gid)) - { - $_fileList[] = makeCorrectDir($path); - } - - if(is_dir($path . '/' . $file) - && $file != '..' - && $file != '.') - { - array_push($list, $path . '/' . $file); - } - } - - @closedir($dh); - } - } - - return $_fileList; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Returns an array of found directories + * + * This function checks every found directory if they match either $uid or $gid, if they do + * the found directory is valid. It uses recursive function calls to find subdirectories. Due + * to the recursive behauviour this function may consume much memory. + * + * @param string path The path to start searching in + * @param integer uid The uid which must match the found directories + * @param integer gid The gid which must match the found direcotries + * @param array _fileList recursive transport array !for internal use only! + * @return array Array of found valid pathes + * + * @author Martin Burchert + * @author Manuel Bernhardt + */ + +function findDirs($path, $uid, $gid) +{ + $list = array( + $path + ); + $_fileList = array(); + + while(sizeof($list) > 0) + { + $path = array_pop($list); + $path = makeCorrectDir($path); + + if(!is_readable($path)) + { + return $_fileList; + } + + $dh = opendir($path); + + if($dh === false) + { + /* + * this should never be called because we checked + * 'is_readable' before...but we never know what might happen + */ + standard_error('cannotreaddir', $path); + return null; + } + else + { + while(false !== ($file = @readdir($dh))) + { + if($file == '.' + && (fileowner($path . '/' . $file) == $uid || filegroup($path . '/' . $file) == $gid)) + { + $_fileList[] = makeCorrectDir($path); + } + + if(is_dir($path . '/' . $file) + && $file != '..' + && $file != '.') + { + array_push($list, $path . '/' . $file); + } + } + + @closedir($dh); + } + } + + return $_fileList; +} diff --git a/lib/functions/filedir/function.isConfigDir.php b/lib/functions/filedir/function.isConfigDir.php index 127f4c6f..aeb58960 100644 --- a/lib/functions/filedir/function.isConfigDir.php +++ b/lib/functions/filedir/function.isConfigDir.php @@ -1,56 +1,56 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Checks if a given directory is valid for multiple configurations - * or should rather be used as a single file - * - * @param string The dir - * @return bool true if usable as dir, false otherwise - * - * @author Florian Lippert - */ - -function isConfigDir($dir) -{ - if(file_exists($dir)) - { - if(is_dir($dir)) - { - $returnval = true; - } - else - { - $returnval = false; - } - } - else - { - if(substr($dir, -1) == '/') - { - $returnval = true; - } - else - { - $returnval = false; - } - } - - return $returnval; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Checks if a given directory is valid for multiple configurations + * or should rather be used as a single file + * + * @param string The dir + * @return bool true if usable as dir, false otherwise + * + * @author Florian Lippert + */ + +function isConfigDir($dir) +{ + if(file_exists($dir)) + { + if(is_dir($dir)) + { + $returnval = true; + } + else + { + $returnval = false; + } + } + else + { + if(substr($dir, -1) == '/') + { + $returnval = true; + } + else + { + $returnval = false; + } + } + + return $returnval; +} diff --git a/lib/functions/filedir/function.makeCorrectDir.php b/lib/functions/filedir/function.makeCorrectDir.php index 07e297a7..fe46e147 100644 --- a/lib/functions/filedir/function.makeCorrectDir.php +++ b/lib/functions/filedir/function.makeCorrectDir.php @@ -1,42 +1,42 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Function which returns a correct dirname, means to add slashes at the beginning and at the end if there weren't some - * - * @param string The dirname - * @return string The corrected dirname - * @author Florian Lippert - */ - -function makeCorrectDir($dir) -{ - if(substr($dir, -1, 1) != '/') - { - $dir.= '/'; - } - - if(substr($dir, 0, 1) != '/') - { - $dir = '/' . $dir; - } - - $dir = makeSecurePath($dir); - return $dir; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Function which returns a correct dirname, means to add slashes at the beginning and at the end if there weren't some + * + * @param string The dirname + * @return string The corrected dirname + * @author Florian Lippert + */ + +function makeCorrectDir($dir) +{ + if(substr($dir, -1, 1) != '/') + { + $dir.= '/'; + } + + if(substr($dir, 0, 1) != '/') + { + $dir = '/' . $dir; + } + + $dir = makeSecurePath($dir); + return $dir; +} diff --git a/lib/functions/filedir/function.makeCorrectFile.php b/lib/functions/filedir/function.makeCorrectFile.php index 286d4bf9..752439aa 100644 --- a/lib/functions/filedir/function.makeCorrectFile.php +++ b/lib/functions/filedir/function.makeCorrectFile.php @@ -1,39 +1,39 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Function which returns a correct filename, means to add a slash at the beginning if there wasn't one - * - * @param string filename the filename - * @return string the corrected filename - * @author Florian Lippert - * @author Michael Russ - * @author Martin Burchert - */ - -function makeCorrectFile($filename) -{ - if(substr($filename, 0, 1) != '/') - { - $filename = '/' . $filename; - } - - $filename = makeSecurePath($filename); - return $filename; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Function which returns a correct filename, means to add a slash at the beginning if there wasn't one + * + * @param string filename the filename + * @return string the corrected filename + * @author Florian Lippert + * @author Michael Russ + * @author Martin Burchert + */ + +function makeCorrectFile($filename) +{ + if(substr($filename, 0, 1) != '/') + { + $filename = '/' . $filename; + } + + $filename = makeSecurePath($filename); + return $filename; +} diff --git a/lib/functions/filedir/function.makePathfield.php b/lib/functions/filedir/function.makePathfield.php index 84b24b8e..071250b6 100644 --- a/lib/functions/filedir/function.makePathfield.php +++ b/lib/functions/filedir/function.makePathfield.php @@ -1,79 +1,79 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Returns a valid html tag for the choosen $fieldType for pathes - * - * @param string path The path to start searching in - * @param integer uid The uid which must match the found directories - * @param integer gid The gid which must match the found direcotries - * @param string fieldType Either "Manual" or "Dropdown" - * @return string The html tag for the choosen $fieldType - * - * @author Martin Burchert - * @author Manuel Bernhardt - */ - -function makePathfield($path, $uid, $gid, $fieldType, $value = '') -{ - global $lng; - $value = str_replace($path, '', $value); - $field = ''; - - if($fieldType == 'Manual') - { - $field = ''; - } - elseif($fieldType == 'Dropdown') - { - $dirList = findDirs($path, $uid, $gid); - - natcasesort($dirList); - - if(sizeof($dirList) > 0) - { - if(sizeof(dirList) <= 100) - { - $field = ''; - } - else - { - $field = $lng['panel']['toomanydirs']; - $field.= ''; - } - } - else - { - $field = $lng['panel']['dirsmissing']; - $field.= ''; - } - } - - return $field; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Returns a valid html tag for the choosen $fieldType for pathes + * + * @param string path The path to start searching in + * @param integer uid The uid which must match the found directories + * @param integer gid The gid which must match the found direcotries + * @param string fieldType Either "Manual" or "Dropdown" + * @return string The html tag for the choosen $fieldType + * + * @author Martin Burchert + * @author Manuel Bernhardt + */ + +function makePathfield($path, $uid, $gid, $fieldType, $value = '') +{ + global $lng; + $value = str_replace($path, '', $value); + $field = ''; + + if($fieldType == 'Manual') + { + $field = ''; + } + elseif($fieldType == 'Dropdown') + { + $dirList = findDirs($path, $uid, $gid); + + natcasesort($dirList); + + if(sizeof($dirList) > 0) + { + if(sizeof(dirList) <= 100) + { + $field = ''; + } + else + { + $field = $lng['panel']['toomanydirs']; + $field.= ''; + } + } + else + { + $field = $lng['panel']['dirsmissing']; + $field.= ''; + } + } + + return $field; +} diff --git a/lib/functions/filedir/function.makeSecurePath.php b/lib/functions/filedir/function.makeSecurePath.php index 0ee59e78..9a6b740c 100644 --- a/lib/functions/filedir/function.makeSecurePath.php +++ b/lib/functions/filedir/function.makeSecurePath.php @@ -1,42 +1,42 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Function which returns a secure path, means to remove all multiple dots and slashes - * - * @param string The path - * @return string The corrected path - * @author Florian Lippert - */ - -function makeSecurePath($path) -{ - $search = Array( - '#/+#', - '#\.+#', - '#\0+#' - ); - $replace = Array( - '/', - '.', - '' - ); - $path = preg_replace($search, $replace, $path); - return $path; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Function which returns a secure path, means to remove all multiple dots and slashes + * + * @param string The path + * @return string The corrected path + * @author Florian Lippert + */ + +function makeSecurePath($path) +{ + $search = Array( + '#/+#', + '#\.+#', + '#\0+#' + ); + $replace = Array( + '/', + '.', + '' + ); + $path = preg_replace($search, $replace, $path); + return $path; +} diff --git a/lib/functions/filedir/function.mkDirWithCorrectOwnership.php b/lib/functions/filedir/function.mkDirWithCorrectOwnership.php index 380d87e8..2d80a714 100644 --- a/lib/functions/filedir/function.mkDirWithCorrectOwnership.php +++ b/lib/functions/filedir/function.mkDirWithCorrectOwnership.php @@ -1,86 +1,86 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Creates a directory below a users homedir and sets all directories, - * which had to be created below with correct Owner/Group - * (Copied from cron_tasks.php:rev1189 as we'll need this more often in future) - * - * @param string The homedir of the user - * @param string The dir which should be created - * @param int The uid of the user - * @param int The gid of the user - * @return bool true if everything went okay, false if something went wrong - * - * @author Florian Lippert - * @author Martin Burchert - */ - -function mkDirWithCorrectOwnership($homeDir, $dirToCreate, $uid, $gid) -{ - $returncode = true; - - if($homeDir != '' - && $dirToCreate != '') - { - $homeDir = makeCorrectDir($homeDir); - $dirToCreate = makeCorrectDir($dirToCreate); - - if(substr($dirToCreate, 0, strlen($homeDir)) == $homeDir) - { - $subdir = substr($dirToCreate, strlen($homeDir)); - } - else - { - $subdir = $dirToCreate; - } - - $subdir = makeCorrectDir($subdir); - $subdirlen = strlen($subdir); - $subdirs = array(); - array_push($subdirs, $dirToCreate); - $offset = 0; - - while($offset < $subdirlen) - { - $offset = strpos($subdir, '/', $offset); - $subdirelem = substr($subdir, 0, $offset); - $offset++; - array_push($subdirs, makeCorrectDir($homeDir . $subdirelem)); - } - - $subdirs = array_unique($subdirs); - sort($subdirs); - foreach($subdirs as $sdir) - { - if(!is_dir($sdir)) - { - $sdir = makeCorrectDir($sdir); - safe_exec('mkdir -p ' . escapeshellarg($sdir)); - safe_exec('chown -R ' . (int)$uid . ':' . (int)$gid . ' ' . escapeshellarg($sdir)); - } - } - } - else - { - $returncode = false; - } - - return $returncode; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Creates a directory below a users homedir and sets all directories, + * which had to be created below with correct Owner/Group + * (Copied from cron_tasks.php:rev1189 as we'll need this more often in future) + * + * @param string The homedir of the user + * @param string The dir which should be created + * @param int The uid of the user + * @param int The gid of the user + * @return bool true if everything went okay, false if something went wrong + * + * @author Florian Lippert + * @author Martin Burchert + */ + +function mkDirWithCorrectOwnership($homeDir, $dirToCreate, $uid, $gid) +{ + $returncode = true; + + if($homeDir != '' + && $dirToCreate != '') + { + $homeDir = makeCorrectDir($homeDir); + $dirToCreate = makeCorrectDir($dirToCreate); + + if(substr($dirToCreate, 0, strlen($homeDir)) == $homeDir) + { + $subdir = substr($dirToCreate, strlen($homeDir)); + } + else + { + $subdir = $dirToCreate; + } + + $subdir = makeCorrectDir($subdir); + $subdirlen = strlen($subdir); + $subdirs = array(); + array_push($subdirs, $dirToCreate); + $offset = 0; + + while($offset < $subdirlen) + { + $offset = strpos($subdir, '/', $offset); + $subdirelem = substr($subdir, 0, $offset); + $offset++; + array_push($subdirs, makeCorrectDir($homeDir . $subdirelem)); + } + + $subdirs = array_unique($subdirs); + sort($subdirs); + foreach($subdirs as $sdir) + { + if(!is_dir($sdir)) + { + $sdir = makeCorrectDir($sdir); + safe_exec('mkdir -p ' . escapeshellarg($sdir)); + safe_exec('chown -R ' . (int)$uid . ':' . (int)$gid . ' ' . escapeshellarg($sdir)); + } + } + } + else + { + $returncode = false; + } + + return $returncode; +} diff --git a/lib/functions/filedir/function.safe_exec.php b/lib/functions/filedir/function.safe_exec.php index 7c2484ab..28b9c6c1 100644 --- a/lib/functions/filedir/function.safe_exec.php +++ b/lib/functions/filedir/function.safe_exec.php @@ -1,117 +1,117 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Wrapper around the exec command. - * - * @author Martin Burchert - * @version 1.2 - * @param string exec_string String to be executed - * @return string The result of the exec() - * - * History: - * 1.0 : Initial Version - * 1.1 : Added |,&,>,<,`,*,$,~,? as security breaks. - * 1.2 : Removed * as security break - */ - -function safe_exec($exec_string, &$return_value = false) -{ - global $settings; - - // - // define allowed system commands - // - - $allowed_commands = array( - 'touch', - 'chown', - 'mkdir', - 'webalizer', - 'cp', - 'du', - 'chmod', - 'chattr', - $settings['system']['apachereload_command'], - $settings['system']['bindreload_command'], - $settings['dkim']['dkimrestart_command'], - $settings['system']['awstats_updateall_command'], - 'openssl', - 'unzip', - 'php', - 'rm' - ); - - // - // check for ; in execute command - // - - if((stristr($exec_string, ';')) - or (stristr($exec_string, '|')) - or (stristr($exec_string, '&')) - or (stristr($exec_string, '>')) - or (stristr($exec_string, '<')) - or (stristr($exec_string, '`')) - or (stristr($exec_string, '$')) - or (stristr($exec_string, '~')) - or (stristr($exec_string, '?'))) - { - die('SECURITY CHECK FAILED!' . "\n" . 'The execute string "' . htmlspecialchars($exec_string) . '" is a possible security risk!' . "\n" . 'Please check your whole server for security problems by hand!' . "\n"); - } - - // - // check if command is allowed here - // - - $ok = false; - foreach($allowed_commands as $allowed_command) - { - if(strpos($exec_string, $allowed_command) == 0 - && (strlen($exec_string) === ($allowed_command_pos = strlen($allowed_command)) || substr($exec_string, $allowed_command_pos, 1) === ' ')) - { - $ok = true; - } - } - - if(!$ok) - { - die('SECURITY CHECK FAILED!' . "\n" . 'Your command "' . htmlspecialchars($exec_string) . '" is not allowed!' . "\n" . 'Please check your whole server for security problems by hand!' . "\n"); - } - - // - // execute the command and return output - // - // --- martin @ 08.08.2005 ------------------------------------------------------- - // fixing usage of uninitialised variable - - $return = ''; - - // ------------------------------------------------------------------------------- - - if($return_value == false) - { - exec($exec_string, $return); - } - else - { - exec($exec_string, $return, $return_value); - } - - return $return; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Wrapper around the exec command. + * + * @author Martin Burchert + * @version 1.2 + * @param string exec_string String to be executed + * @return string The result of the exec() + * + * History: + * 1.0 : Initial Version + * 1.1 : Added |,&,>,<,`,*,$,~,? as security breaks. + * 1.2 : Removed * as security break + */ + +function safe_exec($exec_string, &$return_value = false) +{ + global $settings; + + // + // define allowed system commands + // + + $allowed_commands = array( + 'touch', + 'chown', + 'mkdir', + 'webalizer', + 'cp', + 'du', + 'chmod', + 'chattr', + $settings['system']['apachereload_command'], + $settings['system']['bindreload_command'], + $settings['dkim']['dkimrestart_command'], + $settings['system']['awstats_updateall_command'], + 'openssl', + 'unzip', + 'php', + 'rm' + ); + + // + // check for ; in execute command + // + + if((stristr($exec_string, ';')) + or (stristr($exec_string, '|')) + or (stristr($exec_string, '&')) + or (stristr($exec_string, '>')) + or (stristr($exec_string, '<')) + or (stristr($exec_string, '`')) + or (stristr($exec_string, '$')) + or (stristr($exec_string, '~')) + or (stristr($exec_string, '?'))) + { + die('SECURITY CHECK FAILED!' . "\n" . 'The execute string "' . htmlspecialchars($exec_string) . '" is a possible security risk!' . "\n" . 'Please check your whole server for security problems by hand!' . "\n"); + } + + // + // check if command is allowed here + // + + $ok = false; + foreach($allowed_commands as $allowed_command) + { + if(strpos($exec_string, $allowed_command) == 0 + && (strlen($exec_string) === ($allowed_command_pos = strlen($allowed_command)) || substr($exec_string, $allowed_command_pos, 1) === ' ')) + { + $ok = true; + } + } + + if(!$ok) + { + die('SECURITY CHECK FAILED!' . "\n" . 'Your command "' . htmlspecialchars($exec_string) . '" is not allowed!' . "\n" . 'Please check your whole server for security problems by hand!' . "\n"); + } + + // + // execute the command and return output + // + // --- martin @ 08.08.2005 ------------------------------------------------------- + // fixing usage of uninitialised variable + + $return = ''; + + // ------------------------------------------------------------------------------- + + if($return_value == false) + { + exec($exec_string, $return); + } + else + { + exec($exec_string, $return, $return_value); + } + + return $return; +} diff --git a/lib/functions/formfields/bool/function.getFormFieldDataBool.php b/lib/functions/formfields/bool/function.getFormFieldDataBool.php index 9284fc08..73b435b8 100644 --- a/lib/functions/formfields/bool/function.getFormFieldDataBool.php +++ b/lib/functions/formfields/bool/function.getFormFieldDataBool.php @@ -1,32 +1,32 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getFormFieldDataBool($fieldname, $fielddata, $input) -{ - if(isset($input[$fieldname]) && ($input[$fieldname] === '1' || $input[$fieldname] === 1 || $input[$fieldname] === true || strtolower($input[$fieldname]) === 'yes' || strtolower($input[$fieldname]) === 'ja')) - { - $newfieldvalue = '1'; - } - else - { - $newfieldvalue = '0'; - } - - return $newfieldvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getFormFieldDataBool($fieldname, $fielddata, $input) +{ + if(isset($input[$fieldname]) && ($input[$fieldname] === '1' || $input[$fieldname] === 1 || $input[$fieldname] === true || strtolower($input[$fieldname]) === 'yes' || strtolower($input[$fieldname]) === 'ja')) + { + $newfieldvalue = '1'; + } + else + { + $newfieldvalue = '0'; + } + + return $newfieldvalue; +} diff --git a/lib/functions/formfields/bool/function.getFormFieldOutputBool.php b/lib/functions/formfields/bool/function.getFormFieldOutputBool.php index a35d1fb1..1ede10e2 100644 --- a/lib/functions/formfields/bool/function.getFormFieldOutputBool.php +++ b/lib/functions/formfields/bool/function.getFormFieldOutputBool.php @@ -1,26 +1,26 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getFormFieldOutputBool($fieldname, $fielddata) -{ - $label = $fielddata['label']; - $boolswitch = makeYesNo($fieldname, '1', '0', $fielddata['value']); - eval("\$returnvalue = \"" . getTemplate("formfields/bool", true) . "\";"); - return $returnvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getFormFieldOutputBool($fieldname, $fielddata) +{ + $label = $fielddata['label']; + $boolswitch = makeYesNo($fieldname, '1', '0', $fielddata['value']); + eval("\$returnvalue = \"" . getTemplate("formfields/bool", true) . "\";"); + return $returnvalue; +} diff --git a/lib/functions/formfields/bool/function.validateFormFieldBool.php b/lib/functions/formfields/bool/function.validateFormFieldBool.php index c97a4317..1ec76094 100644 --- a/lib/functions/formfields/bool/function.validateFormFieldBool.php +++ b/lib/functions/formfields/bool/function.validateFormFieldBool.php @@ -1,30 +1,30 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function validateFormFieldBool($fieldname, $fielddata, $newfieldvalue) -{ - if($newfieldvalue === '1' || $newfieldvalue === 1 || $newfieldvalue === true || strtolower($newfieldvalue) === 'yes' || strtolower($newfieldvalue) === 'ja' || $newfieldvalue === '0' || $newfieldvalue === 0 || $newfieldvalue === false || strtolower($newfieldvalue) === 'no' || strtolower($newfieldvalue) === 'nein' || strtolower($newfieldvalue) === '') - { - return true; - } - else - { - return 'noboolean'; - } -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function validateFormFieldBool($fieldname, $fielddata, $newfieldvalue) +{ + if($newfieldvalue === '1' || $newfieldvalue === 1 || $newfieldvalue === true || strtolower($newfieldvalue) === 'yes' || strtolower($newfieldvalue) === 'ja' || $newfieldvalue === '0' || $newfieldvalue === 0 || $newfieldvalue === false || strtolower($newfieldvalue) === 'no' || strtolower($newfieldvalue) === 'nein' || strtolower($newfieldvalue) === '') + { + return true; + } + else + { + return 'noboolean'; + } +} diff --git a/lib/functions/formfields/constant.formfields.php b/lib/functions/formfields/constant.formfields.php index 7d6eaab3..04356f55 100644 --- a/lib/functions/formfields/constant.formfields.php +++ b/lib/functions/formfields/constant.formfields.php @@ -1,25 +1,25 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -if(!defined('FORMFIELDS_PLAUSIBILITY_CHECK_OK')) - define('FORMFIELDS_PLAUSIBILITY_CHECK_OK', 0); -if(!defined('FORMFIELDS_PLAUSIBILITY_CHECK_ERROR')) - define('FORMFIELDS_PLAUSIBILITY_CHECK_ERROR', 1); -if(!defined('FORMFIELDS_PLAUSIBILITY_CHECK_QUESTION')) - define('FORMFIELDS_PLAUSIBILITY_CHECK_QUESTION', 2); + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +if(!defined('FORMFIELDS_PLAUSIBILITY_CHECK_OK')) + define('FORMFIELDS_PLAUSIBILITY_CHECK_OK', 0); +if(!defined('FORMFIELDS_PLAUSIBILITY_CHECK_ERROR')) + define('FORMFIELDS_PLAUSIBILITY_CHECK_ERROR', 1); +if(!defined('FORMFIELDS_PLAUSIBILITY_CHECK_QUESTION')) + define('FORMFIELDS_PLAUSIBILITY_CHECK_QUESTION', 2); diff --git a/lib/functions/formfields/date/function.getFormFieldOutputDate.php b/lib/functions/formfields/date/function.getFormFieldOutputDate.php index da861bc2..4ab23d32 100644 --- a/lib/functions/formfields/date/function.getFormFieldOutputDate.php +++ b/lib/functions/formfields/date/function.getFormFieldOutputDate.php @@ -1,28 +1,28 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getFormFieldOutputDate($fieldname, $fielddata) -{ - if(isset($fielddata['date_timestamp']) && $fielddata['date_timestamp'] === true) - { - $fielddata['value'] = date('Y-m-d', $fielddata['value']); - } - - return getFormFieldOutputString($fieldname, $fielddata); -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getFormFieldOutputDate($fieldname, $fielddata) +{ + if(isset($fielddata['date_timestamp']) && $fielddata['date_timestamp'] === true) + { + $fielddata['value'] = date('Y-m-d', $fielddata['value']); + } + + return getFormFieldOutputString($fieldname, $fielddata); +} diff --git a/lib/functions/formfields/date/function.manipulateFormFieldDataDate.php b/lib/functions/formfields/date/function.manipulateFormFieldDataDate.php index d5492069..13b73acd 100644 --- a/lib/functions/formfields/date/function.manipulateFormFieldDataDate.php +++ b/lib/functions/formfields/date/function.manipulateFormFieldDataDate.php @@ -1,28 +1,28 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function manipulateFormFieldDataDate($fieldname, $fielddata, $newfieldvalue) -{ - if(isset($fielddata['date_timestamp']) && $fielddata['date_timestamp'] === true) - { - $newfieldvalue = strtotime($newfieldvalue); - } - - return $newfieldvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function manipulateFormFieldDataDate($fieldname, $fielddata, $newfieldvalue) +{ + if(isset($fielddata['date_timestamp']) && $fielddata['date_timestamp'] === true) + { + $newfieldvalue = strtotime($newfieldvalue); + } + + return $newfieldvalue; +} diff --git a/lib/functions/formfields/date/function.validateFormFieldDate.php b/lib/functions/formfields/date/function.validateFormFieldDate.php index 4e7cbde4..a41fa3ef 100644 --- a/lib/functions/formfields/date/function.validateFormFieldDate.php +++ b/lib/functions/formfields/date/function.validateFormFieldDate.php @@ -1,32 +1,32 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function validateFormFieldDate($fieldname, $fielddata, $newfieldvalue) -{ - if($newfieldvalue == '0000-00-00' || preg_match('/^(19|20)\d\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/', $newfieldvalue)) - { - $returnvalue = true; - } - else - { - $returnvalue = false; - } - - return $returnvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function validateFormFieldDate($fieldname, $fielddata, $newfieldvalue) +{ + if($newfieldvalue == '0000-00-00' || preg_match('/^(19|20)\d\d[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/', $newfieldvalue)) + { + $returnvalue = true; + } + else + { + $returnvalue = false; + } + + return $returnvalue; +} diff --git a/lib/functions/formfields/function.buildForm.php b/lib/functions/formfields/function.buildForm.php index 425c82e6..b6d05cfa 100644 --- a/lib/functions/formfields/function.buildForm.php +++ b/lib/functions/formfields/function.buildForm.php @@ -1,52 +1,52 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function buildForm($form) -{ - $fields = ''; - - if(validateFormDefinition($form)) - { - foreach($form['groups'] as $groupname => $groupdetails) - { - if(isset($groupdetails['title']) && $groupdetails['title'] != '') - { - $fields .= getFormGroupOutput($groupname, $groupdetails); - } - - if(validateFieldDefinition($groupdetails)) - { - // Prefetch form fields - foreach($groupdetails['fields'] as $fieldname => $fielddetails) - { - $groupdetails['fields'][$fieldname] = array_merge_prefix($fielddetails, $fielddetails['type'], prefetchFormFieldData($fieldname, $fielddetails)); - $form['groups'][$groupname]['fields'][$fieldname] = $groupdetails['fields'][$fieldname]; - } - - // Collect form field output - foreach($groupdetails['fields'] as $fieldname => $fielddetails) - { - $fields .= getFormFieldOutput($fieldname, $fielddetails); - } - } - } - } - - return $fields; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function buildForm($form) +{ + $fields = ''; + + if(validateFormDefinition($form)) + { + foreach($form['groups'] as $groupname => $groupdetails) + { + if(isset($groupdetails['title']) && $groupdetails['title'] != '') + { + $fields .= getFormGroupOutput($groupname, $groupdetails); + } + + if(validateFieldDefinition($groupdetails)) + { + // Prefetch form fields + foreach($groupdetails['fields'] as $fieldname => $fielddetails) + { + $groupdetails['fields'][$fieldname] = array_merge_prefix($fielddetails, $fielddetails['type'], prefetchFormFieldData($fieldname, $fielddetails)); + $form['groups'][$groupname]['fields'][$fieldname] = $groupdetails['fields'][$fieldname]; + } + + // Collect form field output + foreach($groupdetails['fields'] as $fieldname => $fielddetails) + { + $fields .= getFormFieldOutput($fieldname, $fielddetails); + } + } + } + } + + return $fields; +} diff --git a/lib/functions/formfields/function.checkPlausibilityFormField.php b/lib/functions/formfields/function.checkPlausibilityFormField.php index db5aa361..7542a13a 100644 --- a/lib/functions/formfields/function.checkPlausibilityFormField.php +++ b/lib/functions/formfields/function.checkPlausibilityFormField.php @@ -1,32 +1,32 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function checkPlausibilityFormField($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues) -{ - $returnvalue = ''; - if(is_array($fielddata) && isset($fielddata['plausibility_check_method']) && $fielddata['plausibility_check_method'] != '' && function_exists($fielddata['plausibility_check_method'])) - { - $returnvalue = call_user_func($fielddata['plausibility_check_method'], $fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues); - } - else - { - $returnvalue = false; - } - return $returnvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function checkPlausibilityFormField($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues) +{ + $returnvalue = ''; + if(is_array($fielddata) && isset($fielddata['plausibility_check_method']) && $fielddata['plausibility_check_method'] != '' && function_exists($fielddata['plausibility_check_method'])) + { + $returnvalue = call_user_func($fielddata['plausibility_check_method'], $fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues); + } + else + { + $returnvalue = false; + } + return $returnvalue; +} diff --git a/lib/functions/formfields/function.getFormFieldData.php b/lib/functions/formfields/function.getFormFieldData.php index 2aced7a8..919f07a0 100644 --- a/lib/functions/formfields/function.getFormFieldData.php +++ b/lib/functions/formfields/function.getFormFieldData.php @@ -1,43 +1,43 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getFormFieldData($fieldname, $fielddata, $input) -{ - if(is_array($fielddata) && isset($fielddata['type']) && $fielddata['type'] != '' && function_exists('getFormFieldData' . ucfirst($fielddata['type']))) - { - $newfieldvalue = call_user_func('getFormFieldData' . ucfirst($fielddata['type']), $fieldname, $fielddata, &$input); - } - else - { - if(isset($input[$fieldname])) - { - $newfieldvalue = $input[$fieldname]; - } - elseif(isset($fielddata['default'])) - { - $newfieldvalue = $fielddata['default']; - } - else - { - $newfieldvalue = false; - } - } - - return $newfieldvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getFormFieldData($fieldname, $fielddata, $input) +{ + if(is_array($fielddata) && isset($fielddata['type']) && $fielddata['type'] != '' && function_exists('getFormFieldData' . ucfirst($fielddata['type']))) + { + $newfieldvalue = call_user_func('getFormFieldData' . ucfirst($fielddata['type']), $fieldname, $fielddata, &$input); + } + else + { + if(isset($input[$fieldname])) + { + $newfieldvalue = $input[$fieldname]; + } + elseif(isset($fielddata['default'])) + { + $newfieldvalue = $fielddata['default']; + } + else + { + $newfieldvalue = false; + } + } + + return $newfieldvalue; +} diff --git a/lib/functions/formfields/function.getFormFieldOutput.php b/lib/functions/formfields/function.getFormFieldOutput.php index 1f79587e..25288e28 100644 --- a/lib/functions/formfields/function.getFormFieldOutput.php +++ b/lib/functions/formfields/function.getFormFieldOutput.php @@ -1,50 +1,50 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getFormFieldOutput($fieldname, $fielddata) -{ - $returnvalue = ''; - if(is_array($fielddata) && isset($fielddata['type']) && $fielddata['type'] != '' && function_exists('getFormFieldOutput' . ucfirst($fielddata['type']))) - { - if(isset($fielddata['label']) && is_array($fielddata['label'])) - { - if(isset($fielddata['label']['title']) && isset($fielddata['label']['description'])) - { - $fielddata['label'] = '' . $fielddata['label']['title'] . '
    ' . $fielddata['label']['description']; - } - else - { - $fielddata['label'] = implode(' ', $fielddata['label']); - } - } - if(!isset($fielddata['value'])) - { - if(isset($fielddata['default'])) - { - $fielddata['value'] = $fielddata['default']; - } - else - { - $fielddata['value'] = null; - } - } - $returnvalue = call_user_func('getFormFieldOutput' . ucfirst($fielddata['type']), $fieldname, $fielddata); - } - return $returnvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getFormFieldOutput($fieldname, $fielddata) +{ + $returnvalue = ''; + if(is_array($fielddata) && isset($fielddata['type']) && $fielddata['type'] != '' && function_exists('getFormFieldOutput' . ucfirst($fielddata['type']))) + { + if(isset($fielddata['label']) && is_array($fielddata['label'])) + { + if(isset($fielddata['label']['title']) && isset($fielddata['label']['description'])) + { + $fielddata['label'] = '' . $fielddata['label']['title'] . '
    ' . $fielddata['label']['description']; + } + else + { + $fielddata['label'] = implode(' ', $fielddata['label']); + } + } + if(!isset($fielddata['value'])) + { + if(isset($fielddata['default'])) + { + $fielddata['value'] = $fielddata['default']; + } + else + { + $fielddata['value'] = null; + } + } + $returnvalue = call_user_func('getFormFieldOutput' . ucfirst($fielddata['type']), $fieldname, $fielddata); + } + return $returnvalue; +} diff --git a/lib/functions/formfields/function.getFormGroupOutput.php b/lib/functions/formfields/function.getFormGroupOutput.php index bd816455..c3efc573 100644 --- a/lib/functions/formfields/function.getFormGroupOutput.php +++ b/lib/functions/formfields/function.getFormGroupOutput.php @@ -1,25 +1,25 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getFormGroupOutput($groupname, $groupdetails) -{ - global $lng; - eval("\$group = \"" . getTemplate("settings/settings_group") . "\";"); - return $group; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getFormGroupOutput($groupname, $groupdetails) +{ + global $lng; + eval("\$group = \"" . getTemplate("settings/settings_group") . "\";"); + return $group; +} diff --git a/lib/functions/formfields/function.manipulateFormFieldData.php b/lib/functions/formfields/function.manipulateFormFieldData.php index 387d537c..a957e348 100644 --- a/lib/functions/formfields/function.manipulateFormFieldData.php +++ b/lib/functions/formfields/function.manipulateFormFieldData.php @@ -1,28 +1,28 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function manipulateFormFieldData($fieldname, $fielddata, $newfieldvalue) -{ - if(is_array($fielddata) && isset($fielddata['type']) && $fielddata['type'] != '' && function_exists('manipulateFormFieldData' . ucfirst($fielddata['type']))) - { - $newfieldvalue = call_user_func('manipulateFormFieldData' . ucfirst($fielddata['type']), $fieldname, $fielddata, $newfieldvalue); - } - - return $newfieldvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function manipulateFormFieldData($fieldname, $fielddata, $newfieldvalue) +{ + if(is_array($fielddata) && isset($fielddata['type']) && $fielddata['type'] != '' && function_exists('manipulateFormFieldData' . ucfirst($fielddata['type']))) + { + $newfieldvalue = call_user_func('manipulateFormFieldData' . ucfirst($fielddata['type']), $fieldname, $fielddata, $newfieldvalue); + } + + return $newfieldvalue; +} diff --git a/lib/functions/formfields/function.prefetchFormFieldData.php b/lib/functions/formfields/function.prefetchFormFieldData.php index 5b1c6852..0412ff49 100644 --- a/lib/functions/formfields/function.prefetchFormFieldData.php +++ b/lib/functions/formfields/function.prefetchFormFieldData.php @@ -1,28 +1,28 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function prefetchFormFieldData($fieldname, $fielddata) -{ - $returnvalue = array(); - if(is_array($fielddata) && isset($fielddata['type']) && $fielddata['type'] != '' && function_exists('prefetchFormFieldData' . ucfirst($fielddata['type']))) - { - $returnvalue = call_user_func('prefetchFormFieldData' . ucfirst($fielddata['type']), $fieldname, $fielddata); - } - return $returnvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function prefetchFormFieldData($fieldname, $fielddata) +{ + $returnvalue = array(); + if(is_array($fielddata) && isset($fielddata['type']) && $fielddata['type'] != '' && function_exists('prefetchFormFieldData' . ucfirst($fielddata['type']))) + { + $returnvalue = call_user_func('prefetchFormFieldData' . ucfirst($fielddata['type']), $fieldname, $fielddata); + } + return $returnvalue; +} diff --git a/lib/functions/formfields/function.processForm.php b/lib/functions/formfields/function.processForm.php index ebeec289..d28cd5f5 100644 --- a/lib/functions/formfields/function.processForm.php +++ b/lib/functions/formfields/function.processForm.php @@ -1,145 +1,145 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function processForm($form, $input, $url_params = array()) -{ - if(validateFormDefinition($form)) - { - $submitted_fields = array(); - $changed_fields = array(); - $saved_fields = array(); - - foreach($form['groups'] as $groupname => $groupdetails) - { - if(validateFieldDefinition($groupdetails)) - { - // Prefetch form fields - foreach($groupdetails['fields'] as $fieldname => $fielddetails) - { - $groupdetails['fields'][$fieldname] = array_merge_prefix($fielddetails, $fielddetails['type'], prefetchFormFieldData($fieldname, $fielddetails)); - $form['groups'][$groupname]['fields'][$fieldname] = $groupdetails['fields'][$fieldname]; - } - } - } - - foreach($form['groups'] as $groupname => $groupdetails) - { - if(validateFieldDefinition($groupdetails)) - { - // Validate fields - foreach($groupdetails['fields'] as $fieldname => $fielddetails) - { - $newfieldvalue = getFormFieldData($fieldname, $fielddetails, &$input); - - if($newfieldvalue != $fielddetails['value']) - { - if(($error = validateFormField($fieldname, $fielddetails, $newfieldvalue)) !== true) - { - standard_error($error, $fieldname); - } - else - { - $changed_fields[$fieldname] = $newfieldvalue; - } - } - - $submitted_fields[$fieldname] = $newfieldvalue; - } - } - } - - foreach($form['groups'] as $groupname => $groupdetails) - { - if(validateFieldDefinition($groupdetails)) - { - // Check fields for plausibility - foreach($groupdetails['fields'] as $fieldname => $fielddetails) - { - if(($plausibility_check = checkPlausibilityFormField($fieldname, $fielddetails, $submitted_fields[$fieldname], $submitted_fields)) !== false) - { - if(is_array($plausibility_check) && isset($plausibility_check[0])) - { - if($plausibility_check[0] == FORMFIELDS_PLAUSIBILITY_CHECK_OK) - { - // Nothing to do here, everything's okay - } - elseif($plausibility_check[0] == FORMFIELDS_PLAUSIBILITY_CHECK_ERROR) - { - unset($plausibility_check[0]); - $error = $plausibility_check[1]; - unset($plausibility_check[1]); - $targetname = implode(' ', $plausibility_check); - standard_error($error, $targetname); - } - elseif($plausibility_check[0] == FORMFIELDS_PLAUSIBILITY_CHECK_QUESTION) - { - unset($plausibility_check[0]); - $question = $plausibility_check[1]; - unset($plausibility_check[1]); - $targetname = implode(' ', $plausibility_check); - if(!isset($input[$question])) - { - if(is_array($url_params) && isset($url_params['filename'])) - { - $filename = $url_params['filename']; - unset($url_params['filename']); - } - else - { - $filename = ''; - } - ask_yesno($question, $filename, array_merge($url_params, $submitted_fields, array($question => $question)), $targetname); - } - } - else - { - standard_error('plausibilitychecknotunderstood'); - } - } - } - } - } - } - - foreach($form['groups'] as $groupname => $groupdetails) - { - if(validateFieldDefinition($groupdetails)) - { - // Save fields - foreach($groupdetails['fields'] as $fieldname => $fielddetails) - { - if(isset($changed_fields[$fieldname])) - { - if(($saved_field = saveFormField($fieldname, $fielddetails, manipulateFormFieldData($fieldname, $fielddetails, $changed_fields[$fieldname]))) !== false) - { - $saved_fields = array_merge($saved_fields, $saved_field); - } - else - { - standard_error('errorwhensaving', $fieldname); - } - } - } - } - } - - // Save form - return saveForm($form, $saved_fields); - } -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function processForm($form, $input, $url_params = array()) +{ + if(validateFormDefinition($form)) + { + $submitted_fields = array(); + $changed_fields = array(); + $saved_fields = array(); + + foreach($form['groups'] as $groupname => $groupdetails) + { + if(validateFieldDefinition($groupdetails)) + { + // Prefetch form fields + foreach($groupdetails['fields'] as $fieldname => $fielddetails) + { + $groupdetails['fields'][$fieldname] = array_merge_prefix($fielddetails, $fielddetails['type'], prefetchFormFieldData($fieldname, $fielddetails)); + $form['groups'][$groupname]['fields'][$fieldname] = $groupdetails['fields'][$fieldname]; + } + } + } + + foreach($form['groups'] as $groupname => $groupdetails) + { + if(validateFieldDefinition($groupdetails)) + { + // Validate fields + foreach($groupdetails['fields'] as $fieldname => $fielddetails) + { + $newfieldvalue = getFormFieldData($fieldname, $fielddetails, &$input); + + if($newfieldvalue != $fielddetails['value']) + { + if(($error = validateFormField($fieldname, $fielddetails, $newfieldvalue)) !== true) + { + standard_error($error, $fieldname); + } + else + { + $changed_fields[$fieldname] = $newfieldvalue; + } + } + + $submitted_fields[$fieldname] = $newfieldvalue; + } + } + } + + foreach($form['groups'] as $groupname => $groupdetails) + { + if(validateFieldDefinition($groupdetails)) + { + // Check fields for plausibility + foreach($groupdetails['fields'] as $fieldname => $fielddetails) + { + if(($plausibility_check = checkPlausibilityFormField($fieldname, $fielddetails, $submitted_fields[$fieldname], $submitted_fields)) !== false) + { + if(is_array($plausibility_check) && isset($plausibility_check[0])) + { + if($plausibility_check[0] == FORMFIELDS_PLAUSIBILITY_CHECK_OK) + { + // Nothing to do here, everything's okay + } + elseif($plausibility_check[0] == FORMFIELDS_PLAUSIBILITY_CHECK_ERROR) + { + unset($plausibility_check[0]); + $error = $plausibility_check[1]; + unset($plausibility_check[1]); + $targetname = implode(' ', $plausibility_check); + standard_error($error, $targetname); + } + elseif($plausibility_check[0] == FORMFIELDS_PLAUSIBILITY_CHECK_QUESTION) + { + unset($plausibility_check[0]); + $question = $plausibility_check[1]; + unset($plausibility_check[1]); + $targetname = implode(' ', $plausibility_check); + if(!isset($input[$question])) + { + if(is_array($url_params) && isset($url_params['filename'])) + { + $filename = $url_params['filename']; + unset($url_params['filename']); + } + else + { + $filename = ''; + } + ask_yesno($question, $filename, array_merge($url_params, $submitted_fields, array($question => $question)), $targetname); + } + } + else + { + standard_error('plausibilitychecknotunderstood'); + } + } + } + } + } + } + + foreach($form['groups'] as $groupname => $groupdetails) + { + if(validateFieldDefinition($groupdetails)) + { + // Save fields + foreach($groupdetails['fields'] as $fieldname => $fielddetails) + { + if(isset($changed_fields[$fieldname])) + { + if(($saved_field = saveFormField($fieldname, $fielddetails, manipulateFormFieldData($fieldname, $fielddetails, $changed_fields[$fieldname]))) !== false) + { + $saved_fields = array_merge($saved_fields, $saved_field); + } + else + { + standard_error('errorwhensaving', $fieldname); + } + } + } + } + } + + // Save form + return saveForm($form, $saved_fields); + } +} diff --git a/lib/functions/formfields/function.returnField.php b/lib/functions/formfields/function.returnField.php index c9a5abde..1353ae5b 100644 --- a/lib/functions/formfields/function.returnField.php +++ b/lib/functions/formfields/function.returnField.php @@ -1,23 +1,23 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function returnField($fieldname, $fielddata, $newfieldvalue) -{ - return array($fieldname => $newfieldvalue); -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function returnField($fieldname, $fielddata, $newfieldvalue) +{ + return array($fieldname => $newfieldvalue); +} diff --git a/lib/functions/formfields/function.saveForm.php b/lib/functions/formfields/function.saveForm.php index 213220cf..a5ad292d 100644 --- a/lib/functions/formfields/function.saveForm.php +++ b/lib/functions/formfields/function.saveForm.php @@ -1,36 +1,36 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function saveForm($fielddata, $newfieldvalue) -{ - $returnvalue = ''; - if(is_array($fielddata) && isset($fielddata['save_method']) && $fielddata['save_method'] != '' && function_exists($fielddata['save_method'])) - { - $returnvalue = call_user_func($fielddata['save_method'], $fielddata, $newfieldvalue); - } - elseif(is_array($fielddata) && !isset($fielddata['save_method'])) - { - $returnvalue = true; - } - else - { - $returnvalue = false; - } - return $returnvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function saveForm($fielddata, $newfieldvalue) +{ + $returnvalue = ''; + if(is_array($fielddata) && isset($fielddata['save_method']) && $fielddata['save_method'] != '' && function_exists($fielddata['save_method'])) + { + $returnvalue = call_user_func($fielddata['save_method'], $fielddata, $newfieldvalue); + } + elseif(is_array($fielddata) && !isset($fielddata['save_method'])) + { + $returnvalue = true; + } + else + { + $returnvalue = false; + } + return $returnvalue; +} diff --git a/lib/functions/formfields/function.saveFormField.php b/lib/functions/formfields/function.saveFormField.php index 37be74df..79886b0b 100644 --- a/lib/functions/formfields/function.saveFormField.php +++ b/lib/functions/formfields/function.saveFormField.php @@ -1,36 +1,36 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function saveFormField($fieldname, $fielddata, $newfieldvalue) -{ - $returnvalue = ''; - if(is_array($fielddata) && isset($fielddata['save_method']) && $fielddata['save_method'] != '' && function_exists($fielddata['save_method'])) - { - $returnvalue = call_user_func($fielddata['save_method'], $fieldname, $fielddata, $newfieldvalue); - } - elseif(is_array($fielddata) && !isset($fielddata['save_method'])) - { - $returnvalue = array(); - } - else - { - $returnvalue = false; - } - return $returnvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function saveFormField($fieldname, $fielddata, $newfieldvalue) +{ + $returnvalue = ''; + if(is_array($fielddata) && isset($fielddata['save_method']) && $fielddata['save_method'] != '' && function_exists($fielddata['save_method'])) + { + $returnvalue = call_user_func($fielddata['save_method'], $fieldname, $fielddata, $newfieldvalue); + } + elseif(is_array($fielddata) && !isset($fielddata['save_method'])) + { + $returnvalue = array(); + } + else + { + $returnvalue = false; + } + return $returnvalue; +} diff --git a/lib/functions/formfields/function.validateFieldDefinition.php b/lib/functions/formfields/function.validateFieldDefinition.php index dc49949e..bddc2d33 100644 --- a/lib/functions/formfields/function.validateFieldDefinition.php +++ b/lib/functions/formfields/function.validateFieldDefinition.php @@ -1,30 +1,30 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function validateFieldDefinition($field) -{ - $returnvalue = false; - - if(is_array($field) && !empty($field) && isset($field['fields']) && is_array($field['fields']) && !empty($field['fields'])) - { - $returnvalue = true; - } - - return $returnvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function validateFieldDefinition($field) +{ + $returnvalue = false; + + if(is_array($field) && !empty($field) && isset($field['fields']) && is_array($field['fields']) && !empty($field['fields'])) + { + $returnvalue = true; + } + + return $returnvalue; +} diff --git a/lib/functions/formfields/function.validateFormDefinition.php b/lib/functions/formfields/function.validateFormDefinition.php index 75a8e0f8..3a002a6d 100644 --- a/lib/functions/formfields/function.validateFormDefinition.php +++ b/lib/functions/formfields/function.validateFormDefinition.php @@ -1,30 +1,30 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function validateFormDefinition($form) -{ - $returnvalue = false; - - if(is_array($form) && !empty($form) && isset($form['groups']) && is_array($form['groups']) && !empty($form['groups'])) - { - $returnvalue = true; - } - - return $returnvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function validateFormDefinition($form) +{ + $returnvalue = false; + + if(is_array($form) && !empty($form) && isset($form['groups']) && is_array($form['groups']) && !empty($form['groups'])) + { + $returnvalue = true; + } + + return $returnvalue; +} diff --git a/lib/functions/formfields/function.validateFormField.php b/lib/functions/formfields/function.validateFormField.php index 235ed34e..282500fd 100644 --- a/lib/functions/formfields/function.validateFormField.php +++ b/lib/functions/formfields/function.validateFormField.php @@ -1,32 +1,32 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function validateFormField($fieldname, $fielddata, $newfieldvalue) -{ - $returnvalue = ''; - if(is_array($fielddata) && isset($fielddata['type']) && $fielddata['type'] != '' && function_exists('validateFormField' . ucfirst($fielddata['type']))) - { - $returnvalue = call_user_func('validateFormField' . ucfirst($fielddata['type']), $fieldname, $fielddata, $newfieldvalue); - } - else - { - $returnvalue = 'validation method not found'; - } - return $returnvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function validateFormField($fieldname, $fielddata, $newfieldvalue) +{ + $returnvalue = ''; + if(is_array($fielddata) && isset($fielddata['type']) && $fielddata['type'] != '' && function_exists('validateFormField' . ucfirst($fielddata['type']))) + { + $returnvalue = call_user_func('validateFormField' . ucfirst($fielddata['type']), $fieldname, $fielddata, $newfieldvalue); + } + else + { + $returnvalue = 'validation method not found'; + } + return $returnvalue; +} diff --git a/lib/functions/formfields/hidden/function.getFormFieldOutputHidden.php b/lib/functions/formfields/hidden/function.getFormFieldOutputHidden.php index 4e2999bf..3f7163c7 100644 --- a/lib/functions/formfields/hidden/function.getFormFieldOutputHidden.php +++ b/lib/functions/formfields/hidden/function.getFormFieldOutputHidden.php @@ -1,32 +1,32 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getFormFieldOutputHidden($fieldname, $fielddata) -{ - $returnvalue = ''; - - if(isset($fielddata['label']) && $fielddata['label'] != '') - { - $label = $fielddata['label']; - $value = htmlentities($fielddata['value']); - eval("\$returnvalue .= \"" . getTemplate("formfields/hidden", true) . "\";"); - } - - return $returnvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getFormFieldOutputHidden($fieldname, $fielddata) +{ + $returnvalue = ''; + + if(isset($fielddata['label']) && $fielddata['label'] != '') + { + $label = $fielddata['label']; + $value = htmlentities($fielddata['value']); + eval("\$returnvalue .= \"" . getTemplate("formfields/hidden", true) . "\";"); + } + + return $returnvalue; +} diff --git a/lib/functions/formfields/hidden/function.validateFormFieldHidden.php b/lib/functions/formfields/hidden/function.validateFormFieldHidden.php index 699c4a6e..82ba8631 100644 --- a/lib/functions/formfields/hidden/function.validateFormFieldHidden.php +++ b/lib/functions/formfields/hidden/function.validateFormFieldHidden.php @@ -1,31 +1,31 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function validateFormFieldHidden($fieldname, $fielddata, $newfieldvalue) -{ - if($newfieldvalue === $fielddata['value']) - { - return true; - } - else - { - // TODO: Throw some error that actually makes sense - false would just throw unknown error - return false; - } -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function validateFormFieldHidden($fieldname, $fielddata, $newfieldvalue) +{ + if($newfieldvalue === $fielddata['value']) + { + return true; + } + else + { + // TODO: Throw some error that actually makes sense - false would just throw unknown error + return false; + } +} diff --git a/lib/functions/formfields/int/function.getFormFieldDataInt.php b/lib/functions/formfields/int/function.getFormFieldDataInt.php index 5165e932..156f72a9 100644 --- a/lib/functions/formfields/int/function.getFormFieldDataInt.php +++ b/lib/functions/formfields/int/function.getFormFieldDataInt.php @@ -1,32 +1,32 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getFormFieldDataInt($fieldname, $fielddata, $input) -{ - if(isset($input[$fieldname])) - { - $newfieldvalue = (int)$input[$fieldname]; - } - else - { - $newfieldvalue = (int)$fielddata['default']; - } - - return $newfieldvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getFormFieldDataInt($fieldname, $fielddata, $input) +{ + if(isset($input[$fieldname])) + { + $newfieldvalue = (int)$input[$fieldname]; + } + else + { + $newfieldvalue = (int)$fielddata['default']; + } + + return $newfieldvalue; +} diff --git a/lib/functions/formfields/int/function.getFormFieldOutputInt.php b/lib/functions/formfields/int/function.getFormFieldOutputInt.php index d9f9976f..2e4bb239 100644 --- a/lib/functions/formfields/int/function.getFormFieldOutputInt.php +++ b/lib/functions/formfields/int/function.getFormFieldOutputInt.php @@ -1,23 +1,23 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getFormFieldOutputInt($fieldname, $fielddata) -{ - return getFormFieldOutputString($fieldname, $fielddata); -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getFormFieldOutputInt($fieldname, $fielddata) +{ + return getFormFieldOutputString($fieldname, $fielddata); +} diff --git a/lib/functions/formfields/int/function.validateFormFieldInt.php b/lib/functions/formfields/int/function.validateFormFieldInt.php index 14d572a0..41466664 100644 --- a/lib/functions/formfields/int/function.validateFormFieldInt.php +++ b/lib/functions/formfields/int/function.validateFormFieldInt.php @@ -1,33 +1,33 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function validateFormFieldInt($fieldname, $fielddata, $newfieldvalue) -{ - if(isset($fielddata['int_min']) && (int)$newfieldvalue < (int)$fielddata['int_min']) - { - return('intvaluetoolow'); - } - - if(isset($fielddata['int_max']) && (int)$newfieldvalue > (int)$fielddata['int_max']) - { - return('intvaluetoohigh'); - } - - return true; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function validateFormFieldInt($fieldname, $fielddata, $newfieldvalue) +{ + if(isset($fielddata['int_min']) && (int)$newfieldvalue < (int)$fielddata['int_min']) + { + return('intvaluetoolow'); + } + + if(isset($fielddata['int_max']) && (int)$newfieldvalue > (int)$fielddata['int_max']) + { + return('intvaluetoohigh'); + } + + return true; +} diff --git a/lib/functions/formfields/label/function.getFormFieldOutputLabel.php b/lib/functions/formfields/label/function.getFormFieldOutputLabel.php index aea4583b..c3d88833 100644 --- a/lib/functions/formfields/label/function.getFormFieldOutputLabel.php +++ b/lib/functions/formfields/label/function.getFormFieldOutputLabel.php @@ -1,25 +1,25 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getFormFieldOutputLabel($fieldname, $fielddata) -{ - $label = $fielddata['label']; - eval("\$returnvalue = \"" . getTemplate("formfields/label", true) . "\";"); - return $returnvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getFormFieldOutputLabel($fieldname, $fielddata) +{ + $label = $fielddata['label']; + eval("\$returnvalue = \"" . getTemplate("formfields/label", true) . "\";"); + return $returnvalue; +} diff --git a/lib/functions/formfields/label/function.validateFormFieldLabel.php b/lib/functions/formfields/label/function.validateFormFieldLabel.php index fa0f501f..047fc46d 100644 --- a/lib/functions/formfields/label/function.validateFormFieldLabel.php +++ b/lib/functions/formfields/label/function.validateFormFieldLabel.php @@ -1,26 +1,26 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function validateFormFieldLabel($fieldname, $fielddata, $newfieldvalue) -{ - // Return false, in case we happen to have that field in our $input array, so someone doesn't get the chance to save crap to our database - // TODO: Throw some error that actually makes sense - false would just throw unknown error - - return false; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function validateFormFieldLabel($fieldname, $fielddata, $newfieldvalue) +{ + // Return false, in case we happen to have that field in our $input array, so someone doesn't get the chance to save crap to our database + // TODO: Throw some error that actually makes sense - false would just throw unknown error + + return false; +} diff --git a/lib/functions/formfields/option/function.getFormFieldDataOption.php b/lib/functions/formfields/option/function.getFormFieldDataOption.php index c68bd827..c08109ea 100644 --- a/lib/functions/formfields/option/function.getFormFieldDataOption.php +++ b/lib/functions/formfields/option/function.getFormFieldDataOption.php @@ -1,37 +1,37 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getFormFieldDataOption($fieldname, $fielddata, $input) -{ - if(isset($input[$fieldname])) - { - $newfieldvalue = $input[$fieldname]; - } - else - { - $newfieldvalue = $fielddata['default']; - } - - if(is_array($newfieldvalue)) - { - $newfieldvalue = implode(',', $newfieldvalue); - } - - return $newfieldvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getFormFieldDataOption($fieldname, $fielddata, $input) +{ + if(isset($input[$fieldname])) + { + $newfieldvalue = $input[$fieldname]; + } + else + { + $newfieldvalue = $fielddata['default']; + } + + if(is_array($newfieldvalue)) + { + $newfieldvalue = implode(',', $newfieldvalue); + } + + return $newfieldvalue; +} diff --git a/lib/functions/formfields/option/function.getFormFieldOutputOption.php b/lib/functions/formfields/option/function.getFormFieldOutputOption.php index 442c5e71..b17e8670 100644 --- a/lib/functions/formfields/option/function.getFormFieldOutputOption.php +++ b/lib/functions/formfields/option/function.getFormFieldOutputOption.php @@ -1,47 +1,47 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getFormFieldOutputOption($fieldname, $fielddata) -{ - $returnvalue = ''; - - if(isset($fielddata['option_options']) && is_array($fielddata['option_options']) && !empty($fielddata['option_options'])) - { - if(isset($fielddata['option_mode']) && $fielddata['option_mode'] == 'multiple') - { - $multiple = true; - $fielddata['value'] = explode(',', $fielddata['value']); - } - else - { - $multiple = false; - } - - $label = $fielddata['label']; - $options_array = $fielddata['option_options']; - $options = ''; - foreach($options_array as $value => $title) - { - $options .= makeoption($title, $value, $fielddata['value']); - } - eval("\$returnvalue = \"" . getTemplate("formfields/option", true) . "\";"); - } - - return $returnvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getFormFieldOutputOption($fieldname, $fielddata) +{ + $returnvalue = ''; + + if(isset($fielddata['option_options']) && is_array($fielddata['option_options']) && !empty($fielddata['option_options'])) + { + if(isset($fielddata['option_mode']) && $fielddata['option_mode'] == 'multiple') + { + $multiple = true; + $fielddata['value'] = explode(',', $fielddata['value']); + } + else + { + $multiple = false; + } + + $label = $fielddata['label']; + $options_array = $fielddata['option_options']; + $options = ''; + foreach($options_array as $value => $title) + { + $options .= makeoption($title, $value, $fielddata['value']); + } + eval("\$returnvalue = \"" . getTemplate("formfields/option", true) . "\";"); + } + + return $returnvalue; +} diff --git a/lib/functions/formfields/option/function.prefetchFormFieldDataOption.php b/lib/functions/formfields/option/function.prefetchFormFieldDataOption.php index 571c2967..6f684a62 100644 --- a/lib/functions/formfields/option/function.prefetchFormFieldDataOption.php +++ b/lib/functions/formfields/option/function.prefetchFormFieldDataOption.php @@ -1,30 +1,30 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function prefetchFormFieldDataOption($fieldname, $fielddata) -{ - $returnvalue = array(); - - if((!isset($fielddata['option_options']) || !is_array($fielddata['option_options']) || empty($fielddata['option_options'])) && (isset($fielddata['option_options_method']) && function_exists($fielddata['option_options_method']))) - { - $returnvalue['options'] = call_user_func($fielddata['option_options_method']); - } - - return $returnvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function prefetchFormFieldDataOption($fieldname, $fielddata) +{ + $returnvalue = array(); + + if((!isset($fielddata['option_options']) || !is_array($fielddata['option_options']) || empty($fielddata['option_options'])) && (isset($fielddata['option_options_method']) && function_exists($fielddata['option_options_method']))) + { + $returnvalue['options'] = call_user_func($fielddata['option_options_method']); + } + + return $returnvalue; +} diff --git a/lib/functions/formfields/option/function.validateFormFieldOption.php b/lib/functions/formfields/option/function.validateFormFieldOption.php index 8a34a0bf..4d87397b 100644 --- a/lib/functions/formfields/option/function.validateFormFieldOption.php +++ b/lib/functions/formfields/option/function.validateFormFieldOption.php @@ -1,45 +1,45 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function validateFormFieldOption($fieldname, $fielddata, $newfieldvalue) -{ - $returnvalue = true; - - if(isset($fielddata['option_mode']) && $fielddata['option_mode'] == 'multiple') - { - $options = explode(',', $newfieldvalue); - foreach($options as $option) - { - $returnvalue = ($returnvalue && isset($fielddata['option_options'][$option])); - } - } - else - { - $returnvalue = isset($fielddata['option_options'][$newfieldvalue]); - } - - if($returnvalue === true) - { - return true; - } - else - { - return 'not in option'; - } -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function validateFormFieldOption($fieldname, $fielddata, $newfieldvalue) +{ + $returnvalue = true; + + if(isset($fielddata['option_mode']) && $fielddata['option_mode'] == 'multiple') + { + $options = explode(',', $newfieldvalue); + foreach($options as $option) + { + $returnvalue = ($returnvalue && isset($fielddata['option_options'][$option])); + } + } + else + { + $returnvalue = isset($fielddata['option_options'][$newfieldvalue]); + } + + if($returnvalue === true) + { + return true; + } + else + { + return 'not in option'; + } +} diff --git a/lib/functions/formfields/string/function.getFormFieldOutputString.php b/lib/functions/formfields/string/function.getFormFieldOutputString.php index cefd6d43..22425bde 100644 --- a/lib/functions/formfields/string/function.getFormFieldOutputString.php +++ b/lib/functions/formfields/string/function.getFormFieldOutputString.php @@ -1,26 +1,26 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getFormFieldOutputString($fieldname, $fielddata) -{ - $label = $fielddata['label']; - $value = htmlentities($fielddata['value']); - eval("\$returnvalue = \"" . getTemplate("formfields/string", true) . "\";"); - return $returnvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getFormFieldOutputString($fieldname, $fielddata) +{ + $label = $fielddata['label']; + $value = htmlentities($fielddata['value']); + eval("\$returnvalue = \"" . getTemplate("formfields/string", true) . "\";"); + return $returnvalue; +} diff --git a/lib/functions/formfields/string/function.validateFormFieldString.php b/lib/functions/formfields/string/function.validateFormFieldString.php index 9519639b..958f5091 100644 --- a/lib/functions/formfields/string/function.validateFormFieldString.php +++ b/lib/functions/formfields/string/function.validateFormFieldString.php @@ -1,101 +1,101 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function validateFormFieldString($fieldname, $fielddata, $newfieldvalue) -{ - if(isset($fielddata['string_delimiter']) && $fielddata['string_delimiter'] != '') - { - $newfieldvalues = explode($fielddata['string_delimiter'], $newfieldvalue); - unset($fielddata['string_delimiter']); - - $returnvalue = true; - foreach($newfieldvalues as $single_newfieldvalue) - { - $single_returnvalue = validateFormFieldString($fieldname, $fielddata, $single_newfieldvalue); - if($single_returnvalue !== true) - { - $returnvalue = $single_returnvalue; - break; - } - } - } - else - { - $returnvalue = false; - - if(isset($fielddata['string_type']) && $fielddata['string_type'] == 'mail') - { - $returnvalue = (filter_var($newfieldvalue, FILTER_VALIDATE_EMAIL) == $newfieldvalue); - } - elseif(isset($fielddata['string_type']) && $fielddata['string_type'] == 'url') - { - $returnvalue = validateUrl($newfieldvalue); - } - elseif(isset($fielddata['string_type']) && $fielddata['string_type'] == 'dir') - { - $returnvalue = ($newfieldvalue == makeCorrectDir($newfieldvalue)); - } - elseif(isset($fielddata['string_type']) && $fielddata['string_type'] == 'file') - { - $returnvalue = ($newfieldvalue == makeCorrectFile($newfieldvalue)); - } - elseif(isset($fielddata['string_type']) && $fielddata['string_type'] == 'filedir') - { - $returnvalue = (($newfieldvalue == makeCorrectDir($newfieldvalue)) || ($newfieldvalue == makeCorrectFile($newfieldvalue))); - } - elseif(preg_match('/^[^\r\n\t\f\0]*$/D', $newfieldvalue)) - { - $returnvalue = true; - } - - if(isset($fielddata['string_regexp']) && $fielddata['string_regexp'] != '') - { - if(preg_match($fielddata['string_regexp'], $newfieldvalue)) - { - $returnvalue = true; - } - else - { - $returnvalue = false; - } - } - - if(isset($fielddata['string_emptyallowed']) && $fielddata['string_emptyallowed'] === true && $newfieldvalue === '') - { - $returnvalue = true; - } - elseif(isset($fielddata['string_emptyallowed']) && $fielddata['string_emptyallowed'] === false && $newfieldvalue === '') - { - $returnvalue = 'stringmustntbeempty'; - } - } - - if($returnvalue === true) - { - return true; - } - elseif($returnvalue === false) - { - return 'stringformaterror'; - } - else - { - return $returnvalue; - } -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function validateFormFieldString($fieldname, $fielddata, $newfieldvalue) +{ + if(isset($fielddata['string_delimiter']) && $fielddata['string_delimiter'] != '') + { + $newfieldvalues = explode($fielddata['string_delimiter'], $newfieldvalue); + unset($fielddata['string_delimiter']); + + $returnvalue = true; + foreach($newfieldvalues as $single_newfieldvalue) + { + $single_returnvalue = validateFormFieldString($fieldname, $fielddata, $single_newfieldvalue); + if($single_returnvalue !== true) + { + $returnvalue = $single_returnvalue; + break; + } + } + } + else + { + $returnvalue = false; + + if(isset($fielddata['string_type']) && $fielddata['string_type'] == 'mail') + { + $returnvalue = (filter_var($newfieldvalue, FILTER_VALIDATE_EMAIL) == $newfieldvalue); + } + elseif(isset($fielddata['string_type']) && $fielddata['string_type'] == 'url') + { + $returnvalue = validateUrl($newfieldvalue); + } + elseif(isset($fielddata['string_type']) && $fielddata['string_type'] == 'dir') + { + $returnvalue = ($newfieldvalue == makeCorrectDir($newfieldvalue)); + } + elseif(isset($fielddata['string_type']) && $fielddata['string_type'] == 'file') + { + $returnvalue = ($newfieldvalue == makeCorrectFile($newfieldvalue)); + } + elseif(isset($fielddata['string_type']) && $fielddata['string_type'] == 'filedir') + { + $returnvalue = (($newfieldvalue == makeCorrectDir($newfieldvalue)) || ($newfieldvalue == makeCorrectFile($newfieldvalue))); + } + elseif(preg_match('/^[^\r\n\t\f\0]*$/D', $newfieldvalue)) + { + $returnvalue = true; + } + + if(isset($fielddata['string_regexp']) && $fielddata['string_regexp'] != '') + { + if(preg_match($fielddata['string_regexp'], $newfieldvalue)) + { + $returnvalue = true; + } + else + { + $returnvalue = false; + } + } + + if(isset($fielddata['string_emptyallowed']) && $fielddata['string_emptyallowed'] === true && $newfieldvalue === '') + { + $returnvalue = true; + } + elseif(isset($fielddata['string_emptyallowed']) && $fielddata['string_emptyallowed'] === false && $newfieldvalue === '') + { + $returnvalue = 'stringmustntbeempty'; + } + } + + if($returnvalue === true) + { + return true; + } + elseif($returnvalue === false) + { + return 'stringformaterror'; + } + else + { + return $returnvalue; + } +} diff --git a/lib/functions/formfields/text/function.getFormFieldOutputText.php b/lib/functions/formfields/text/function.getFormFieldOutputText.php index 3409487f..d1e5a99d 100644 --- a/lib/functions/formfields/text/function.getFormFieldOutputText.php +++ b/lib/functions/formfields/text/function.getFormFieldOutputText.php @@ -1,26 +1,26 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getFormFieldOutputText($fieldname, $fielddata) -{ - $label = $fielddata['label']; - $value = htmlentities($fielddata['value']); - eval("\$returnvalue = \"" . getTemplate("formfields/text", true) . "\";"); - return $returnvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getFormFieldOutputText($fieldname, $fielddata) +{ + $label = $fielddata['label']; + $value = htmlentities($fielddata['value']); + eval("\$returnvalue = \"" . getTemplate("formfields/text", true) . "\";"); + return $returnvalue; +} diff --git a/lib/functions/formfields/text/function.validateFormFieldText.php b/lib/functions/formfields/text/function.validateFormFieldText.php index f77648e8..6b694245 100644 --- a/lib/functions/formfields/text/function.validateFormFieldText.php +++ b/lib/functions/formfields/text/function.validateFormFieldText.php @@ -1,30 +1,30 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function validateFormFieldText($fieldname, $fielddata, $newfieldvalue) -{ - $returnvalue = 'stringformaterror'; - - if(preg_match('/^[^\0]*$/', $newfieldvalue)) - { - $returnvalue = true; - } - - return $returnvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function validateFormFieldText($fieldname, $fielddata, $newfieldvalue) +{ + $returnvalue = 'stringformaterror'; + + if(preg_match('/^[^\0]*$/', $newfieldvalue)) + { + $returnvalue = true; + } + + return $returnvalue; +} diff --git a/lib/functions/froxlor/function.createAWStatsConf.php b/lib/functions/froxlor/function.createAWStatsConf.php index a761c1ce..fdf3dfcf 100644 --- a/lib/functions/froxlor/function.createAWStatsConf.php +++ b/lib/functions/froxlor/function.createAWStatsConf.php @@ -1,99 +1,99 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Create or modify the AWStats configuration file for the given domain. - * Modified by Berend Dekens to allow custom configurations. - * - * @param logFile - * @param siteDomain - * @param hostAliases - * @return - * @author Michael Duergner - * @author Berend Dekens - */ - -function createAWStatsConf($logFile, $siteDomain, $hostAliases) -{ - global $pathtophpfiles; - - // Generation header - - $header = "## GENERATED BY SYSCP\n"; - $header2 = "## Do not remove the line above! This tells Froxlor to update this configuration\n## If you wish to manually change this configuration file, remove the first line to make sure Froxlor won't rebuild this file\n## Generated for domain {SITE_DOMAIN} on " . date('l dS \of F Y h:i:s A') . "\n"; - - // These are the variables we will replace - - $regex = array( - '/\{LOG_FILE\}/', - '/\{SITE_DOMAIN\}/', - '/\{HOST_ALIASES\}/' - ); - $replace = array( - $logFile, - $siteDomain, - $hostAliases - ); - - // File names - - $domain_file = '/etc/awstats/awstats.' . $siteDomain . '.conf'; - $model_file = '/etc/awstats/awstats.model.conf.froxlor'; - - // Test if the file exists - - if(file_exists($domain_file)) - { - // Check for the generated header - if this is a manual modification we won't update - - $awstats_domain_conf = fopen($domain_file, 'r'); - - if(fgets($awstats_domain_conf, strlen($header)) != $header) - { - fclose($awstats_domain_conf); - return; - } - - // Close the file - - fclose($awstats_domain_conf); - } - - $awstats_domain_conf = fopen($domain_file, 'w'); - $awstats_model_conf = fopen($model_file, 'r'); - - // Write the header - - fwrite($awstats_domain_conf, $header); - fwrite($awstats_domain_conf, preg_replace($regex, $replace, $header2)); - - // Write the configuration file - - while(($line = fgets($awstats_model_conf, 4096)) !== false) - { - if(!preg_match('/^#/', $line) - && trim($line) != '') - { - fwrite($awstats_domain_conf, preg_replace($regex, $replace, $line)); - } - } - - fclose($awstats_domain_conf); - fclose($awstats_model_conf); -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Create or modify the AWStats configuration file for the given domain. + * Modified by Berend Dekens to allow custom configurations. + * + * @param logFile + * @param siteDomain + * @param hostAliases + * @return + * @author Michael Duergner + * @author Berend Dekens + */ + +function createAWStatsConf($logFile, $siteDomain, $hostAliases) +{ + global $pathtophpfiles; + + // Generation header + + $header = "## GENERATED BY SYSCP\n"; + $header2 = "## Do not remove the line above! This tells Froxlor to update this configuration\n## If you wish to manually change this configuration file, remove the first line to make sure Froxlor won't rebuild this file\n## Generated for domain {SITE_DOMAIN} on " . date('l dS \of F Y h:i:s A') . "\n"; + + // These are the variables we will replace + + $regex = array( + '/\{LOG_FILE\}/', + '/\{SITE_DOMAIN\}/', + '/\{HOST_ALIASES\}/' + ); + $replace = array( + $logFile, + $siteDomain, + $hostAliases + ); + + // File names + + $domain_file = '/etc/awstats/awstats.' . $siteDomain . '.conf'; + $model_file = '/etc/awstats/awstats.model.conf.froxlor'; + + // Test if the file exists + + if(file_exists($domain_file)) + { + // Check for the generated header - if this is a manual modification we won't update + + $awstats_domain_conf = fopen($domain_file, 'r'); + + if(fgets($awstats_domain_conf, strlen($header)) != $header) + { + fclose($awstats_domain_conf); + return; + } + + // Close the file + + fclose($awstats_domain_conf); + } + + $awstats_domain_conf = fopen($domain_file, 'w'); + $awstats_model_conf = fopen($model_file, 'r'); + + // Write the header + + fwrite($awstats_domain_conf, $header); + fwrite($awstats_domain_conf, preg_replace($regex, $replace, $header2)); + + // Write the configuration file + + while(($line = fgets($awstats_model_conf, 4096)) !== false) + { + if(!preg_match('/^#/', $line) + && trim($line) != '') + { + fwrite($awstats_domain_conf, preg_replace($regex, $replace, $line)); + } + } + + fclose($awstats_domain_conf); + fclose($awstats_model_conf); +} diff --git a/lib/functions/froxlor/function.createAWStatsVhost.php b/lib/functions/froxlor/function.createAWStatsVhost.php index d63ca83d..be2873f1 100644 --- a/lib/functions/froxlor/function.createAWStatsVhost.php +++ b/lib/functions/froxlor/function.createAWStatsVhost.php @@ -1,47 +1,47 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * This function generates the VHost configuration for AWStats - * This will enable the /awstats url and enable security on these folders - * @param siteDomain Name of the domain we want stats for - * @return String with configuration for use in vhost file - * @author Berend Dekens - */ - -function createAWStatsVhost($siteDomain, $settings = null) -{ - if($settings['system']['mod_fcgid'] != '1') - { - $vhosts_file = ' # AWStats statistics' . "\n"; - $vhosts_file.= ' RewriteEngine On' . "\n"; - $vhosts_file.= ' RewriteRule ^/awstats(/.*)?$ /awstats/awstats.pl?config=' . $siteDomain . ' [L,PT]' . "\n"; - $vhosts_file.= ' RewriteRule ^/awstats.pl(.*)$ /awstats/awstats.pl$1 [QSA,L,PT]' . "\n"; - } - else - { - $vhosts_file = ' ' . "\n"; - $vhosts_file.= ' RewriteEngine On' . "\n"; - $vhosts_file.= ' RewriteRule awstats.pl(.*)$ http://' . $settings['system']['hostname'] . '/cgi-bin/awstats.pl$1 [R,P]' . "\n"; - $vhosts_file.= ' RewriteRule awstats$ http://' . $settings['system']['hostname'] . '/cgi-bin/awstats.pl?config=' . $siteDomain . ' [R,P]' . "\n"; - $vhosts_file.= ' ' . "\n"; - } - - return $vhosts_file; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * This function generates the VHost configuration for AWStats + * This will enable the /awstats url and enable security on these folders + * @param siteDomain Name of the domain we want stats for + * @return String with configuration for use in vhost file + * @author Berend Dekens + */ + +function createAWStatsVhost($siteDomain, $settings = null) +{ + if($settings['system']['mod_fcgid'] != '1') + { + $vhosts_file = ' # AWStats statistics' . "\n"; + $vhosts_file.= ' RewriteEngine On' . "\n"; + $vhosts_file.= ' RewriteRule ^/awstats(/.*)?$ /awstats/awstats.pl?config=' . $siteDomain . ' [L,PT]' . "\n"; + $vhosts_file.= ' RewriteRule ^/awstats.pl(.*)$ /awstats/awstats.pl$1 [QSA,L,PT]' . "\n"; + } + else + { + $vhosts_file = ' ' . "\n"; + $vhosts_file.= ' RewriteEngine On' . "\n"; + $vhosts_file.= ' RewriteRule awstats.pl(.*)$ http://' . $settings['system']['hostname'] . '/cgi-bin/awstats.pl$1 [R,P]' . "\n"; + $vhosts_file.= ' RewriteRule awstats$ http://' . $settings['system']['hostname'] . '/cgi-bin/awstats.pl?config=' . $siteDomain . ' [R,P]' . "\n"; + $vhosts_file.= ' ' . "\n"; + } + + return $vhosts_file; +} diff --git a/lib/functions/froxlor/function.getAdmins.php b/lib/functions/froxlor/function.getAdmins.php index d20c220b..0b8e2b89 100644 --- a/lib/functions/froxlor/function.getAdmins.php +++ b/lib/functions/froxlor/function.getAdmins.php @@ -1,49 +1,49 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getAdmins($limit_resource = '') -{ - global $db; - - $additional_conditions = ''; - $additional_conditions_array = array(); - if(getSessionUserDetail('customers_see_all') != true) - { - $additional_conditions_array[] = '`adminid` = \'' . (int)getSessionUserDetail('adminid') . '\''; - } - if($limit_resource != '') - { - $additional_conditions_array[] = '(`' . $limit_resource . '_used` < `' . $limit_resource . '` OR `' . $limit_resource . '` = \'-1\')'; - } - if(!empty($additional_conditions_array)) - { - $additional_conditions = ' WHERE ' . implode(' AND ', $additional_conditions_array) . ' '; - } - - $query = 'SELECT `adminid`, `loginname`, `name`, `firstname`, `company` FROM `' . TABLE_PANEL_ADMINS . '` ' . $additional_conditions . ' ORDER BY `name` ASC'; - $result = $db->query($query); - $admins_array = array(); - - while($row = $db->fetch_array($result)) - { - $admins_array[$row['adminid']] = getCorrectFullUserDetails($row) . ' (' . $row['loginname'] . ')'; - } - - return $admins_array; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getAdmins($limit_resource = '') +{ + global $db; + + $additional_conditions = ''; + $additional_conditions_array = array(); + if(getSessionUserDetail('customers_see_all') != true) + { + $additional_conditions_array[] = '`adminid` = \'' . (int)getSessionUserDetail('adminid') . '\''; + } + if($limit_resource != '') + { + $additional_conditions_array[] = '(`' . $limit_resource . '_used` < `' . $limit_resource . '` OR `' . $limit_resource . '` = \'-1\')'; + } + if(!empty($additional_conditions_array)) + { + $additional_conditions = ' WHERE ' . implode(' AND ', $additional_conditions_array) . ' '; + } + + $query = 'SELECT `adminid`, `loginname`, `name`, `firstname`, `company` FROM `' . TABLE_PANEL_ADMINS . '` ' . $additional_conditions . ' ORDER BY `name` ASC'; + $result = $db->query($query); + $admins_array = array(); + + while($row = $db->fetch_array($result)) + { + $admins_array[$row['adminid']] = getCorrectFullUserDetails($row) . ' (' . $row['loginname'] . ')'; + } + + return $admins_array; +} diff --git a/lib/functions/froxlor/function.getCustomerDetail.php b/lib/functions/froxlor/function.getCustomerDetail.php index e6a54e29..6dd94e9a 100644 --- a/lib/functions/froxlor/function.getCustomerDetail.php +++ b/lib/functions/froxlor/function.getCustomerDetail.php @@ -1,35 +1,35 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getCustomerDetail($customerid, $varname) -{ - global $db; - - $query = 'SELECT `' . $db->escape($varname) . '` FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `customerid` = \'' . (int)$customerid . '\''; - $customer = $db->query_first($query); - - if(isset($customer[$varname])) - { - return $customer[$varname]; - } - else - { - return false; - } -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getCustomerDetail($customerid, $varname) +{ + global $db; + + $query = 'SELECT `' . $db->escape($varname) . '` FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `customerid` = \'' . (int)$customerid . '\''; + $customer = $db->query_first($query); + + if(isset($customer[$varname])) + { + return $customer[$varname]; + } + else + { + return false; + } +} diff --git a/lib/functions/froxlor/function.getCustomers.php b/lib/functions/froxlor/function.getCustomers.php index 85122688..fdf098c2 100644 --- a/lib/functions/froxlor/function.getCustomers.php +++ b/lib/functions/froxlor/function.getCustomers.php @@ -1,49 +1,49 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getCustomers($limit_resource = '') -{ - global $db; - - $additional_conditions = ''; - $additional_conditions_array = array(); - if(getSessionUserDetail('customers_see_all') != true) - { - $additional_conditions_array[] = '`adminid` = \'' . (int)getSessionUserDetail('adminid') . '\''; - } - if($limit_resource != '') - { - $additional_conditions_array[] = '(`' . $limit_resource . '_used` < `' . $limit_resource . '` OR `' . $limit_resource . '` = \'-1\')'; - } - if(!empty($additional_conditions_array)) - { - $additional_conditions = ' WHERE ' . implode(' AND ', $additional_conditions_array) . ' '; - } - - $query = 'SELECT `customerid`, `loginname`, `name`, `firstname`, `company` FROM `' . TABLE_PANEL_CUSTOMERS . '` ' . $additional_conditions . ' ORDER BY `name` ASC'; - $result = $db->query($query); - $customers_array = array(); - - while($row = $db->fetch_array($result)) - { - $customers_array[$row['customerid']] = getCorrectFullUserDetails($row) . ' (' . $row['loginname'] . ')'; - } - - return $customers_array; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getCustomers($limit_resource = '') +{ + global $db; + + $additional_conditions = ''; + $additional_conditions_array = array(); + if(getSessionUserDetail('customers_see_all') != true) + { + $additional_conditions_array[] = '`adminid` = \'' . (int)getSessionUserDetail('adminid') . '\''; + } + if($limit_resource != '') + { + $additional_conditions_array[] = '(`' . $limit_resource . '_used` < `' . $limit_resource . '` OR `' . $limit_resource . '` = \'-1\')'; + } + if(!empty($additional_conditions_array)) + { + $additional_conditions = ' WHERE ' . implode(' AND ', $additional_conditions_array) . ' '; + } + + $query = 'SELECT `customerid`, `loginname`, `name`, `firstname`, `company` FROM `' . TABLE_PANEL_CUSTOMERS . '` ' . $additional_conditions . ' ORDER BY `name` ASC'; + $result = $db->query($query); + $customers_array = array(); + + while($row = $db->fetch_array($result)) + { + $customers_array[$row['customerid']] = getCorrectFullUserDetails($row) . ' (' . $row['loginname'] . ')'; + } + + return $customers_array; +} diff --git a/lib/functions/froxlor/function.getIntervalOptions.php b/lib/functions/froxlor/function.getIntervalOptions.php index c1e42280..06c61739 100644 --- a/lib/functions/froxlor/function.getIntervalOptions.php +++ b/lib/functions/froxlor/function.getIntervalOptions.php @@ -12,7 +12,7 @@ * @author Froxlor team (2010-) * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @package Functions - * @version $Id: $ + * @version $Id$ */ function getIntervalOptions() diff --git a/lib/functions/froxlor/function.getIpAddresses.php b/lib/functions/froxlor/function.getIpAddresses.php index c1d27fe5..4fb59934 100644 --- a/lib/functions/froxlor/function.getIpAddresses.php +++ b/lib/functions/froxlor/function.getIpAddresses.php @@ -1,43 +1,43 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getIpAddresses() -{ - global $db; - - $query = 'SELECT `id`, `ip`, `port` FROM `' . TABLE_PANEL_IPSANDPORTS . '` ORDER BY `ip` ASC, `port` ASC'; - $result = $db->query($query); - $system_ipaddress_array = array(); - - while($row = $db->fetch_array($result)) - { - if(!isset($system_ipaddress_array[$row['ip']]) - && !in_array($row['ip'], $system_ipaddress_array)) - { - if(filter_var($row['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) - { - $row['ip'] = '[' . $row['ip'] . ']'; - } - - $system_ipaddress_array[$row['ip']] = $row['ip']; - } - } - - return $system_ipaddress_array; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getIpAddresses() +{ + global $db; + + $query = 'SELECT `id`, `ip`, `port` FROM `' . TABLE_PANEL_IPSANDPORTS . '` ORDER BY `ip` ASC, `port` ASC'; + $result = $db->query($query); + $system_ipaddress_array = array(); + + while($row = $db->fetch_array($result)) + { + if(!isset($system_ipaddress_array[$row['ip']]) + && !in_array($row['ip'], $system_ipaddress_array)) + { + if(filter_var($row['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) + { + $row['ip'] = '[' . $row['ip'] . ']'; + } + + $system_ipaddress_array[$row['ip']] = $row['ip']; + } + } + + return $system_ipaddress_array; +} diff --git a/lib/functions/froxlor/function.getIpPortCombinations.php b/lib/functions/froxlor/function.getIpPortCombinations.php index 1b261074..aabe9e36 100644 --- a/lib/functions/froxlor/function.getIpPortCombinations.php +++ b/lib/functions/froxlor/function.getIpPortCombinations.php @@ -1,56 +1,56 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getIpPortCombinations($ssl = null) -{ - global $db; - - $additional_conditions = ''; - $additional_conditions_array = array(); - if(getSessionUserDetail('ip') != '-1') - { - $admin_ip = $db->query_first('SELECT `id`, `ip`, `port` FROM `' . TABLE_PANEL_IPSANDPORTS . '` WHERE `id` = \'' . (int)getSessionUserDetail('ip') . '\' ORDER BY `ip`, `port` ASC'); - $additional_conditions_array[] = '`ip` = \'' . $admin_ip['ip'] . '\''; - unset($admin_ip); - } - if($ssl !== null) - { - $additional_conditions_array[] = '`ssl` = \'' . ( $ssl === true ? '1' : '0' ) . '\''; - } - if(!empty($additional_conditions_array)) - { - $additional_conditions = ' WHERE ' . implode(' AND ', $additional_conditions_array) . ' '; - } - - $query = 'SELECT `id`, `ip`, `port` FROM `' . TABLE_PANEL_IPSANDPORTS . '` ' . $additional_conditions . ' ORDER BY `ip` ASC, `port` ASC'; - $result = $db->query($query); - $system_ipaddress_array = array(); - - while($row = $db->fetch_array($result)) - { - if(filter_var($row['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) - { - $row['ip'] = '[' . $row['ip'] . ']'; - } - - $system_ipaddress_array[$row['id']] = $row['ip'] . ':' . $row['port']; - } - - return $system_ipaddress_array; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getIpPortCombinations($ssl = null) +{ + global $db; + + $additional_conditions = ''; + $additional_conditions_array = array(); + if(getSessionUserDetail('ip') != '-1') + { + $admin_ip = $db->query_first('SELECT `id`, `ip`, `port` FROM `' . TABLE_PANEL_IPSANDPORTS . '` WHERE `id` = \'' . (int)getSessionUserDetail('ip') . '\' ORDER BY `ip`, `port` ASC'); + $additional_conditions_array[] = '`ip` = \'' . $admin_ip['ip'] . '\''; + unset($admin_ip); + } + if($ssl !== null) + { + $additional_conditions_array[] = '`ssl` = \'' . ( $ssl === true ? '1' : '0' ) . '\''; + } + if(!empty($additional_conditions_array)) + { + $additional_conditions = ' WHERE ' . implode(' AND ', $additional_conditions_array) . ' '; + } + + $query = 'SELECT `id`, `ip`, `port` FROM `' . TABLE_PANEL_IPSANDPORTS . '` ' . $additional_conditions . ' ORDER BY `ip` ASC, `port` ASC'; + $result = $db->query($query); + $system_ipaddress_array = array(); + + while($row = $db->fetch_array($result)) + { + if(filter_var($row['ip'], FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)) + { + $row['ip'] = '[' . $row['ip'] . ']'; + } + + $system_ipaddress_array[$row['id']] = $row['ip'] . ':' . $row['port']; + } + + return $system_ipaddress_array; +} diff --git a/lib/functions/froxlor/function.getLanguages.php b/lib/functions/froxlor/function.getLanguages.php index be14549d..bb24a182 100644 --- a/lib/functions/froxlor/function.getLanguages.php +++ b/lib/functions/froxlor/function.getLanguages.php @@ -1,38 +1,38 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getLanguages() -{ - global $db; - - $query = 'SELECT * FROM `' . TABLE_PANEL_LANGUAGE . '` '; - $result = $db->query($query); - $languages_array = array(); - - while($row = $db->fetch_array($result)) - { - if(!isset($languages_array[$row['language']]) - && !in_array($row['language'], $languages_array)) - { - $languages_array[$row['language']] = html_entity_decode($row['language']); - } - } - - return $languages_array; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getLanguages() +{ + global $db; + + $query = 'SELECT * FROM `' . TABLE_PANEL_LANGUAGE . '` '; + $result = $db->query($query); + $languages_array = array(); + + while($row = $db->fetch_array($result)) + { + if(!isset($languages_array[$row['language']]) + && !in_array($row['language'], $languages_array)) + { + $languages_array[$row['language']] = html_entity_decode($row['language']); + } + } + + return $languages_array; +} diff --git a/lib/functions/froxlor/function.getNextCronjobs.php b/lib/functions/froxlor/function.getNextCronjobs.php index 54ed2f47..dfb2e3ae 100644 --- a/lib/functions/froxlor/function.getNextCronjobs.php +++ b/lib/functions/froxlor/function.getNextCronjobs.php @@ -12,7 +12,7 @@ * @author Froxlor team (2010-) * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @package Functions - * @version $Id: $ + * @version $Id$ */ /* diff --git a/lib/functions/froxlor/function.getSessionUserDetail.php b/lib/functions/froxlor/function.getSessionUserDetail.php index 6f543df7..8f3d2c12 100644 --- a/lib/functions/froxlor/function.getSessionUserDetail.php +++ b/lib/functions/froxlor/function.getSessionUserDetail.php @@ -1,32 +1,32 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getSessionUserDetail($varname) -{ - global $userinfo; - - if(isset($userinfo[$varname])) - { - return $userinfo[$varname]; - } - else - { - return false; - } -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getSessionUserDetail($varname) +{ + global $userinfo; + + if(isset($userinfo[$varname])) + { + return $userinfo[$varname]; + } + else + { + return false; + } +} diff --git a/lib/functions/froxlor/function.includeCronjobs.php b/lib/functions/froxlor/function.includeCronjobs.php index 698c6ec9..cdd74e99 100644 --- a/lib/functions/froxlor/function.includeCronjobs.php +++ b/lib/functions/froxlor/function.includeCronjobs.php @@ -12,7 +12,7 @@ * @author Froxlor team (2010-) * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @package Functions - * @version $Id: $ + * @version $Id$ */ function includeCronjobs($debugHandler, $pathtophpfiles) diff --git a/lib/functions/froxlor/function.inserttask.php b/lib/functions/froxlor/function.inserttask.php index 69604fd6..595b11bc 100644 --- a/lib/functions/froxlor/function.inserttask.php +++ b/lib/functions/froxlor/function.inserttask.php @@ -1,104 +1,104 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Inserts a task into the PANEL_TASKS-Table - * - * @param int Type of task - * @param string Parameter 1 - * @param string Parameter 2 - * @param string Parameter 3 - * @author Florian Lippert - */ - -function inserttask($type, $param1 = '', $param2 = '', $param3 = '') -{ - global $db, $settings; - - if($type == '1' - || $type == '3' - || $type == '4' - || $type == '5') - { - $db->query('DELETE FROM `' . TABLE_PANEL_TASKS . '` WHERE `type`="' . $type . '"'); - $db->query('INSERT INTO `' . TABLE_PANEL_TASKS . '` (`type`) VALUES ("' . $type . '")'); - $doupdate = true; - } - elseif($type == '2' - && $param1 != '' - && $param2 != '' - && $param3 != '') - { - $data = Array(); - $data['loginname'] = $param1; - $data['uid'] = $param2; - $data['gid'] = $param3; - $data = serialize($data); - $db->query('INSERT INTO `' . TABLE_PANEL_TASKS . '` (`type`, `data`) VALUES ("2", "' . $db->escape($data) . '")'); - $doupdate = true; - } - elseif($type == '6' - && $param1 != '') - { - $data = Array(); - $data['loginname'] = $param1; - $data = serialize($data); - $db->query('INSERT INTO `' . TABLE_PANEL_TASKS . '` (`type`, `data`) VALUES ("6", "' . $db->escape($data) . '")'); - $doupdate = true; - } - - if($doupdate === true - && (int)$settings['system']['realtime_port'] !== 0) - { - $timeout = 15; - $socket = @socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); - - if($socket !== false) - { - // create the request packet - $packet = chr(0) . chr(1) . 'RUN' . chr(0); - // UDP is connectionless, so we just send on it. - @socket_sendto($socket, $packet, strlen($packet), 0x100, '127.0.0.1', (int)$settings['system']['realtime_port']); - - /* - * this is for TCP-Connections - * - $time = time(); - - while(!@socket_connect($socket, '127.0.0.1', (int)$settings['system']['realtime_port'])) - { - $err = socket_last_error($socket); - - if($err == 115 - || $err == 114) - { - if((time() - $time) >= $timeout) - { - break; - } - - sleep(1); - continue; - } - } - */ - @socket_close($socket); - } - } -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Inserts a task into the PANEL_TASKS-Table + * + * @param int Type of task + * @param string Parameter 1 + * @param string Parameter 2 + * @param string Parameter 3 + * @author Florian Lippert + */ + +function inserttask($type, $param1 = '', $param2 = '', $param3 = '') +{ + global $db, $settings; + + if($type == '1' + || $type == '3' + || $type == '4' + || $type == '5') + { + $db->query('DELETE FROM `' . TABLE_PANEL_TASKS . '` WHERE `type`="' . $type . '"'); + $db->query('INSERT INTO `' . TABLE_PANEL_TASKS . '` (`type`) VALUES ("' . $type . '")'); + $doupdate = true; + } + elseif($type == '2' + && $param1 != '' + && $param2 != '' + && $param3 != '') + { + $data = Array(); + $data['loginname'] = $param1; + $data['uid'] = $param2; + $data['gid'] = $param3; + $data = serialize($data); + $db->query('INSERT INTO `' . TABLE_PANEL_TASKS . '` (`type`, `data`) VALUES ("2", "' . $db->escape($data) . '")'); + $doupdate = true; + } + elseif($type == '6' + && $param1 != '') + { + $data = Array(); + $data['loginname'] = $param1; + $data = serialize($data); + $db->query('INSERT INTO `' . TABLE_PANEL_TASKS . '` (`type`, `data`) VALUES ("6", "' . $db->escape($data) . '")'); + $doupdate = true; + } + + if($doupdate === true + && (int)$settings['system']['realtime_port'] !== 0) + { + $timeout = 15; + $socket = @socket_create(AF_INET, SOCK_DGRAM, SOL_UDP); + + if($socket !== false) + { + // create the request packet + $packet = chr(0) . chr(1) . 'RUN' . chr(0); + // UDP is connectionless, so we just send on it. + @socket_sendto($socket, $packet, strlen($packet), 0x100, '127.0.0.1', (int)$settings['system']['realtime_port']); + + /* + * this is for TCP-Connections + * + $time = time(); + + while(!@socket_connect($socket, '127.0.0.1', (int)$settings['system']['realtime_port'])) + { + $err = socket_last_error($socket); + + if($err == 115 + || $err == 114) + { + if((time() - $time) >= $timeout) + { + break; + } + + sleep(1); + continue; + } + } + */ + @socket_close($socket); + } + } +} diff --git a/lib/functions/froxlor/function.loadConfigArrayDir.php b/lib/functions/froxlor/function.loadConfigArrayDir.php index a8bdea16..e554b9c3 100644 --- a/lib/functions/froxlor/function.loadConfigArrayDir.php +++ b/lib/functions/froxlor/function.loadConfigArrayDir.php @@ -1,48 +1,48 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function loadConfigArrayDir($data_dirname) -{ - // Workaround until we use gettext - global $lng; - - $data = array(); - - if(is_dir($data_dirname)) - { - $data_files = array(); - $data_dirhandle = opendir($data_dirname); - while(false !== ($data_filename = readdir($data_dirhandle))) - { - if($data_filename != '.' && $data_filename != '..' && $data_filename != '' && substr($data_filename, -4 ) == '.php') - { - $data_files[] = $data_dirname . $data_filename; - } - } - - sort($data_files); - - foreach($data_files as $data_filename) - { - $data = array_merge_recursive($data, include($data_filename)); - } - } - - return $data; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function loadConfigArrayDir($data_dirname) +{ + // Workaround until we use gettext + global $lng; + + $data = array(); + + if(is_dir($data_dirname)) + { + $data_files = array(); + $data_dirhandle = opendir($data_dirname); + while(false !== ($data_filename = readdir($data_dirhandle))) + { + if($data_filename != '.' && $data_filename != '..' && $data_filename != '' && substr($data_filename, -4 ) == '.php') + { + $data_files[] = $data_dirname . $data_filename; + } + } + + sort($data_files); + + foreach($data_files as $data_filename) + { + $data = array_merge_recursive($data, include($data_filename)); + } + } + + return $data; +} diff --git a/lib/functions/froxlor/function.openRootDB.php b/lib/functions/froxlor/function.openRootDB.php index 1245ad2b..42d89a7e 100644 --- a/lib/functions/froxlor/function.openRootDB.php +++ b/lib/functions/froxlor/function.openRootDB.php @@ -12,7 +12,7 @@ * @author Froxlor team (2010-) * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @package Functions - * @version $Id: $ + * @version $Id$ */ /* diff --git a/lib/functions/froxlor/function.updateCounters.php b/lib/functions/froxlor/function.updateCounters.php index 9e888471..ae4fb0bf 100644 --- a/lib/functions/froxlor/function.updateCounters.php +++ b/lib/functions/froxlor/function.updateCounters.php @@ -1,286 +1,286 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Function which updates all counters of used ressources in panel_admins and panel_customers - * @param bool Set to true to get an array with debug information - * @return array Contains debug information if parameter 'returndebuginfo' is set to true - * - * @author Florian Lippert - */ - -function updateCounters($returndebuginfo = false) -{ - global $db; - $returnval = array(); - - if($returndebuginfo === true) - { - $returnval = array( - 'admins' => array(), - 'customers' => array() - ); - } - - $admin_resources = array(); - - // Customers - - $customers = $db->query('SELECT * FROM `' . TABLE_PANEL_CUSTOMERS . '` ORDER BY `customerid`'); - - while($customer = $db->fetch_array($customers)) - { - if(!isset($admin_resources[$customer['adminid']])) - { - $admin_resources[$customer['adminid']] = Array(); - } - - if(!isset($admin_resources[$customer['adminid']]['diskspace_used'])) - { - $admin_resources[$customer['adminid']]['diskspace_used'] = 0; - } - - if(($customer['diskspace'] / 1024) != '-1') - { - $admin_resources[$customer['adminid']]['diskspace_used']+= intval_ressource($customer['diskspace']); - } - - if(!isset($admin_resources[$customer['adminid']]['traffic_used'])) - { - $admin_resources[$customer['adminid']]['traffic_used'] = 0; - } - - $admin_resources[$customer['adminid']]['traffic_used']+= $customer['traffic_used']; - - if(!isset($admin_resources[$customer['adminid']]['mysqls_used'])) - { - $admin_resources[$customer['adminid']]['mysqls_used'] = 0; - } - - if($customer['mysqls'] != '-1') - { - $admin_resources[$customer['adminid']]['mysqls_used']+= intval_ressource($customer['mysqls']); - } - - if(!isset($admin_resources[$customer['adminid']]['ftps_used'])) - { - $admin_resources[$customer['adminid']]['ftps_used'] = 0; - } - - if($customer['ftps'] != '-1') - { - $admin_resources[$customer['adminid']]['ftps_used']+= intval_ressource($customer['ftps']); - } - - if(!isset($admin_resources[$customer['adminid']]['tickets_used'])) - { - $admin_resources[$customer['adminid']]['tickets_used'] = 0; - } - - if($customer['tickets'] != '-1') - { - $admin_resources[$customer['adminid']]['tickets_used']+= intval_ressource($customer['tickets']); - } - - if(!isset($admin_resources[$customer['adminid']]['emails_used'])) - { - $admin_resources[$customer['adminid']]['emails_used'] = 0; - } - - if($customer['emails'] != '-1') - { - $admin_resources[$customer['adminid']]['emails_used']+= intval_ressource($customer['emails']); - } - - if(!isset($admin_resources[$customer['adminid']]['email_accounts_used'])) - { - $admin_resources[$customer['adminid']]['email_accounts_used'] = 0; - } - - if($customer['email_accounts'] != '-1') - { - $admin_resources[$customer['adminid']]['email_accounts_used']+= intval_ressource($customer['email_accounts']); - } - - if(!isset($admin_resources[$customer['adminid']]['email_forwarders_used'])) - { - $admin_resources[$customer['adminid']]['email_forwarders_used'] = 0; - } - - if($customer['email_forwarders'] != '-1') - { - $admin_resources[$customer['adminid']]['email_forwarders_used']+= intval_ressource($customer['email_forwarders']); - } - - if(!isset($admin_resources[$customer['adminid']]['email_quota_used'])) - { - $admin_resources[$customer['adminid']]['email_quota_used'] = 0; - } - - if($customer['email_quota'] != '-1') - { - $admin_resources[$customer['adminid']]['email_quota_used']+= intval_ressource($customer['email_quota']); - } - - if(!isset($admin_resources[$customer['adminid']]['subdomains_used'])) - { - $admin_resources[$customer['adminid']]['subdomains_used'] = 0; - } - - if($customer['subdomains'] != '-1') - { - $admin_resources[$customer['adminid']]['subdomains_used']+= intval_ressource($customer['subdomains']); - } - - $customer_mysqls = $db->query_first('SELECT COUNT(*) AS `number_mysqls` FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid` = "' . (int)$customer['customerid'] . '"'); - $customer['mysqls_used_new'] = (int)$customer_mysqls['number_mysqls']; - $customer_emails = $db->query_first('SELECT COUNT(*) AS `number_emails` FROM `' . TABLE_MAIL_VIRTUAL . '` WHERE `customerid` = "' . (int)$customer['customerid'] . '"'); - $customer['emails_used_new'] = (int)$customer_emails['number_emails']; - $customer_emails_result = $db->query('SELECT `email`, `email_full`, `destination`, `popaccountid` AS `number_email_forwarders` FROM `' . TABLE_MAIL_VIRTUAL . '` WHERE `customerid` = "' . (int)$customer['customerid'] . '" '); - $customer_email_forwarders = 0; - $customer_email_accounts = 0; - - while($customer_emails_row = $db->fetch_array($customer_emails_result)) - { - if($customer_emails_row['destination'] != '') - { - $customer_emails_row['destination'] = explode(' ', makeCorrectDestination($customer_emails_row['destination'])); - $customer_email_forwarders+= count($customer_emails_row['destination']); - - if(in_array($customer_emails_row['email_full'], $customer_emails_row['destination'])) - { - $customer_email_forwarders-= 1; - $customer_email_accounts++; - } - } - } - - $customer['email_accounts_used_new'] = $customer_email_accounts; - $customer['email_forwarders_used_new'] = $customer_email_forwarders; - $customer_ftps = $db->query_first('SELECT COUNT(*) AS `number_ftps` FROM `' . TABLE_FTP_USERS . '` WHERE `customerid` = "' . (int)$customer['customerid'] . '"'); - $customer['ftps_used_new'] = ((int)$customer_ftps['number_ftps'] - 1); - $customer_tickets = $db->query_first('SELECT COUNT(*) AS `number_tickets` FROM `' . TABLE_PANEL_TICKETS . '` WHERE `answerto` = "0" AND `customerid` = "' . (int)$customer['customerid'] . '"'); - $customer['tickets_used_new'] = (int)$customer_tickets['number_tickets']; - $customer_subdomains = $db->query_first('SELECT COUNT(*) AS `number_subdomains` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `customerid` = "' . (int)$customer['customerid'] . '" AND `parentdomainid` <> "0"'); - $customer['subdomains_used_new'] = (int)$customer_subdomains['number_subdomains']; - $customer_email_quota = $db->query_first('SELECT SUM(`quota`) AS `email_quota` FROM `' . TABLE_MAIL_USERS . '` WHERE `customerid` = "' . (int)$customer['customerid'] . '"'); - $customer['email_quota_used_new'] = (int)$customer_email_quota['email_quota']; - $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used` = "' . (int)$customer['mysqls_used_new'] . '", `emails_used` = "' . (int)$customer['emails_used_new'] . '", `email_accounts_used` = "' . (int)$customer['email_accounts_used_new'] . '", `email_forwarders_used` = "' . (int)$customer['email_forwarders_used_new'] . '", `email_quota_used` = "' . (int)$customer['email_quota_used_new'] . '", `ftps_used` = "' . (int)$customer['ftps_used_new'] . '", `tickets_used` = "' . (int)$customer['tickets_used_new'] . '", `subdomains_used` = "' . (int)$customer['subdomains_used_new'] . '" WHERE `customerid` = "' . (int)$customer['customerid'] . '"'); - - if($returndebuginfo === true) - { - $returnval['customers'][$customer['customerid']] = $customer; - } - } - - // Admins - - $admins = $db->query('SELECT * FROM `' . TABLE_PANEL_ADMINS . '` ORDER BY `adminid`'); - - while($admin = $db->fetch_array($admins)) - { - $admin_customers = $db->query_first('SELECT COUNT(*) AS `number_customers` FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `adminid` = "' . (int)$admin['adminid'] . '"'); - $admin['customers_used_new'] = $admin_customers['number_customers']; - $admin_domains = $db->query_first('SELECT COUNT(*) AS `number_domains` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `adminid` = "' . (int)$admin['adminid'] . '" AND `isemaildomain` = "1"'); - $admin['domains_used_new'] = $admin_domains['number_domains']; - - if(!isset($admin_resources[$admin['adminid']])) - { - $admin_resources[$admin['adminid']] = Array(); - } - - if(!isset($admin_resources[$admin['adminid']]['diskspace_used'])) - { - $admin_resources[$admin['adminid']]['diskspace_used'] = 0; - } - - $admin['diskspace_used_new'] = $admin_resources[$admin['adminid']]['diskspace_used']; - - if(!isset($admin_resources[$admin['adminid']]['traffic_used'])) - { - $admin_resources[$admin['adminid']]['traffic_used'] = 0; - } - - $admin['traffic_used_new'] = $admin_resources[$admin['adminid']]['traffic_used']; - - if(!isset($admin_resources[$admin['adminid']]['mysqls_used'])) - { - $admin_resources[$admin['adminid']]['mysqls_used'] = 0; - } - - $admin['mysqls_used_new'] = $admin_resources[$admin['adminid']]['mysqls_used']; - - if(!isset($admin_resources[$admin['adminid']]['ftps_used'])) - { - $admin_resources[$admin['adminid']]['ftps_used'] = 0; - } - - $admin['ftps_used_new'] = $admin_resources[$admin['adminid']]['ftps_used']; - - if(!isset($admin_resources[$admin['adminid']]['emails_used'])) - { - $admin_resources[$admin['adminid']]['emails_used'] = 0; - } - - $admin['emails_used_new'] = $admin_resources[$admin['adminid']]['emails_used']; - - if(!isset($admin_resources[$admin['adminid']]['email_accounts_used'])) - { - $admin_resources[$admin['adminid']]['email_accounts_used'] = 0; - } - - $admin['email_accounts_used_new'] = $admin_resources[$admin['adminid']]['email_accounts_used']; - - if(!isset($admin_resources[$admin['adminid']]['tickets_used'])) - { - $admin_resources[$admin['adminid']]['tickets_used'] = 0; - } - - $admin['tickets_used_new'] = $admin_resources[$admin['adminid']]['tickets_used']; - - if(!isset($admin_resources[$admin['adminid']]['email_forwarders_used'])) - { - $admin_resources[$admin['adminid']]['email_forwarders_used'] = 0; - } - - $admin['email_forwarders_used_new'] = $admin_resources[$admin['adminid']]['email_forwarders_used']; - - if(!isset($admin_resources[$admin['adminid']]['email_quota_used'])) - { - $admin_resources[$admin['adminid']]['email_quota_used'] = 0; - } - - $admin['email_quota_used_new'] = $admin_resources[$admin['adminid']]['email_quota_used']; - - if(!isset($admin_resources[$admin['adminid']]['subdomains_used'])) - { - $admin_resources[$admin['adminid']]['subdomains_used'] = 0; - } - - $admin['subdomains_used_new'] = $admin_resources[$admin['adminid']]['subdomains_used']; - $db->query('UPDATE `' . TABLE_PANEL_ADMINS . '` SET `customers_used` = "' . (int)$admin['customers_used_new'] . '", `domains_used` = "' . (int)$admin['domains_used_new'] . '", `diskspace_used` = "' . (int)$admin['diskspace_used_new'] . '", `mysqls_used` = "' . (int)$admin['mysqls_used_new'] . '", `emails_used` = "' . (int)$admin['emails_used_new'] . '", `email_accounts_used` = "' . (int)$admin['email_accounts_used_new'] . '", `email_forwarders_used` = "' . (int)$admin['email_forwarders_used_new'] . '", `email_quota_used` = "' . (int)$admin['email_quota_used_new'] . '", `ftps_used` = "' . (int)$admin['ftps_used_new'] . '", `tickets_used` = "' . (int)$admin['tickets_used_new'] . '", `subdomains_used` = "' . (int)$admin['subdomains_used_new'] . '", `traffic_used` = "' . (int)$admin['traffic_used_new'] . '" WHERE `adminid` = "' . (int)$admin['adminid'] . '"'); - - if($returndebuginfo === true) - { - $returnval['admins'][$admin['adminid']] = $admin; - } - } - - return $returnval; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Function which updates all counters of used ressources in panel_admins and panel_customers + * @param bool Set to true to get an array with debug information + * @return array Contains debug information if parameter 'returndebuginfo' is set to true + * + * @author Florian Lippert + */ + +function updateCounters($returndebuginfo = false) +{ + global $db; + $returnval = array(); + + if($returndebuginfo === true) + { + $returnval = array( + 'admins' => array(), + 'customers' => array() + ); + } + + $admin_resources = array(); + + // Customers + + $customers = $db->query('SELECT * FROM `' . TABLE_PANEL_CUSTOMERS . '` ORDER BY `customerid`'); + + while($customer = $db->fetch_array($customers)) + { + if(!isset($admin_resources[$customer['adminid']])) + { + $admin_resources[$customer['adminid']] = Array(); + } + + if(!isset($admin_resources[$customer['adminid']]['diskspace_used'])) + { + $admin_resources[$customer['adminid']]['diskspace_used'] = 0; + } + + if(($customer['diskspace'] / 1024) != '-1') + { + $admin_resources[$customer['adminid']]['diskspace_used']+= intval_ressource($customer['diskspace']); + } + + if(!isset($admin_resources[$customer['adminid']]['traffic_used'])) + { + $admin_resources[$customer['adminid']]['traffic_used'] = 0; + } + + $admin_resources[$customer['adminid']]['traffic_used']+= $customer['traffic_used']; + + if(!isset($admin_resources[$customer['adminid']]['mysqls_used'])) + { + $admin_resources[$customer['adminid']]['mysqls_used'] = 0; + } + + if($customer['mysqls'] != '-1') + { + $admin_resources[$customer['adminid']]['mysqls_used']+= intval_ressource($customer['mysqls']); + } + + if(!isset($admin_resources[$customer['adminid']]['ftps_used'])) + { + $admin_resources[$customer['adminid']]['ftps_used'] = 0; + } + + if($customer['ftps'] != '-1') + { + $admin_resources[$customer['adminid']]['ftps_used']+= intval_ressource($customer['ftps']); + } + + if(!isset($admin_resources[$customer['adminid']]['tickets_used'])) + { + $admin_resources[$customer['adminid']]['tickets_used'] = 0; + } + + if($customer['tickets'] != '-1') + { + $admin_resources[$customer['adminid']]['tickets_used']+= intval_ressource($customer['tickets']); + } + + if(!isset($admin_resources[$customer['adminid']]['emails_used'])) + { + $admin_resources[$customer['adminid']]['emails_used'] = 0; + } + + if($customer['emails'] != '-1') + { + $admin_resources[$customer['adminid']]['emails_used']+= intval_ressource($customer['emails']); + } + + if(!isset($admin_resources[$customer['adminid']]['email_accounts_used'])) + { + $admin_resources[$customer['adminid']]['email_accounts_used'] = 0; + } + + if($customer['email_accounts'] != '-1') + { + $admin_resources[$customer['adminid']]['email_accounts_used']+= intval_ressource($customer['email_accounts']); + } + + if(!isset($admin_resources[$customer['adminid']]['email_forwarders_used'])) + { + $admin_resources[$customer['adminid']]['email_forwarders_used'] = 0; + } + + if($customer['email_forwarders'] != '-1') + { + $admin_resources[$customer['adminid']]['email_forwarders_used']+= intval_ressource($customer['email_forwarders']); + } + + if(!isset($admin_resources[$customer['adminid']]['email_quota_used'])) + { + $admin_resources[$customer['adminid']]['email_quota_used'] = 0; + } + + if($customer['email_quota'] != '-1') + { + $admin_resources[$customer['adminid']]['email_quota_used']+= intval_ressource($customer['email_quota']); + } + + if(!isset($admin_resources[$customer['adminid']]['subdomains_used'])) + { + $admin_resources[$customer['adminid']]['subdomains_used'] = 0; + } + + if($customer['subdomains'] != '-1') + { + $admin_resources[$customer['adminid']]['subdomains_used']+= intval_ressource($customer['subdomains']); + } + + $customer_mysqls = $db->query_first('SELECT COUNT(*) AS `number_mysqls` FROM `' . TABLE_PANEL_DATABASES . '` WHERE `customerid` = "' . (int)$customer['customerid'] . '"'); + $customer['mysqls_used_new'] = (int)$customer_mysqls['number_mysqls']; + $customer_emails = $db->query_first('SELECT COUNT(*) AS `number_emails` FROM `' . TABLE_MAIL_VIRTUAL . '` WHERE `customerid` = "' . (int)$customer['customerid'] . '"'); + $customer['emails_used_new'] = (int)$customer_emails['number_emails']; + $customer_emails_result = $db->query('SELECT `email`, `email_full`, `destination`, `popaccountid` AS `number_email_forwarders` FROM `' . TABLE_MAIL_VIRTUAL . '` WHERE `customerid` = "' . (int)$customer['customerid'] . '" '); + $customer_email_forwarders = 0; + $customer_email_accounts = 0; + + while($customer_emails_row = $db->fetch_array($customer_emails_result)) + { + if($customer_emails_row['destination'] != '') + { + $customer_emails_row['destination'] = explode(' ', makeCorrectDestination($customer_emails_row['destination'])); + $customer_email_forwarders+= count($customer_emails_row['destination']); + + if(in_array($customer_emails_row['email_full'], $customer_emails_row['destination'])) + { + $customer_email_forwarders-= 1; + $customer_email_accounts++; + } + } + } + + $customer['email_accounts_used_new'] = $customer_email_accounts; + $customer['email_forwarders_used_new'] = $customer_email_forwarders; + $customer_ftps = $db->query_first('SELECT COUNT(*) AS `number_ftps` FROM `' . TABLE_FTP_USERS . '` WHERE `customerid` = "' . (int)$customer['customerid'] . '"'); + $customer['ftps_used_new'] = ((int)$customer_ftps['number_ftps'] - 1); + $customer_tickets = $db->query_first('SELECT COUNT(*) AS `number_tickets` FROM `' . TABLE_PANEL_TICKETS . '` WHERE `answerto` = "0" AND `customerid` = "' . (int)$customer['customerid'] . '"'); + $customer['tickets_used_new'] = (int)$customer_tickets['number_tickets']; + $customer_subdomains = $db->query_first('SELECT COUNT(*) AS `number_subdomains` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `customerid` = "' . (int)$customer['customerid'] . '" AND `parentdomainid` <> "0"'); + $customer['subdomains_used_new'] = (int)$customer_subdomains['number_subdomains']; + $customer_email_quota = $db->query_first('SELECT SUM(`quota`) AS `email_quota` FROM `' . TABLE_MAIL_USERS . '` WHERE `customerid` = "' . (int)$customer['customerid'] . '"'); + $customer['email_quota_used_new'] = (int)$customer_email_quota['email_quota']; + $db->query('UPDATE `' . TABLE_PANEL_CUSTOMERS . '` SET `mysqls_used` = "' . (int)$customer['mysqls_used_new'] . '", `emails_used` = "' . (int)$customer['emails_used_new'] . '", `email_accounts_used` = "' . (int)$customer['email_accounts_used_new'] . '", `email_forwarders_used` = "' . (int)$customer['email_forwarders_used_new'] . '", `email_quota_used` = "' . (int)$customer['email_quota_used_new'] . '", `ftps_used` = "' . (int)$customer['ftps_used_new'] . '", `tickets_used` = "' . (int)$customer['tickets_used_new'] . '", `subdomains_used` = "' . (int)$customer['subdomains_used_new'] . '" WHERE `customerid` = "' . (int)$customer['customerid'] . '"'); + + if($returndebuginfo === true) + { + $returnval['customers'][$customer['customerid']] = $customer; + } + } + + // Admins + + $admins = $db->query('SELECT * FROM `' . TABLE_PANEL_ADMINS . '` ORDER BY `adminid`'); + + while($admin = $db->fetch_array($admins)) + { + $admin_customers = $db->query_first('SELECT COUNT(*) AS `number_customers` FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `adminid` = "' . (int)$admin['adminid'] . '"'); + $admin['customers_used_new'] = $admin_customers['number_customers']; + $admin_domains = $db->query_first('SELECT COUNT(*) AS `number_domains` FROM `' . TABLE_PANEL_DOMAINS . '` WHERE `adminid` = "' . (int)$admin['adminid'] . '" AND `isemaildomain` = "1"'); + $admin['domains_used_new'] = $admin_domains['number_domains']; + + if(!isset($admin_resources[$admin['adminid']])) + { + $admin_resources[$admin['adminid']] = Array(); + } + + if(!isset($admin_resources[$admin['adminid']]['diskspace_used'])) + { + $admin_resources[$admin['adminid']]['diskspace_used'] = 0; + } + + $admin['diskspace_used_new'] = $admin_resources[$admin['adminid']]['diskspace_used']; + + if(!isset($admin_resources[$admin['adminid']]['traffic_used'])) + { + $admin_resources[$admin['adminid']]['traffic_used'] = 0; + } + + $admin['traffic_used_new'] = $admin_resources[$admin['adminid']]['traffic_used']; + + if(!isset($admin_resources[$admin['adminid']]['mysqls_used'])) + { + $admin_resources[$admin['adminid']]['mysqls_used'] = 0; + } + + $admin['mysqls_used_new'] = $admin_resources[$admin['adminid']]['mysqls_used']; + + if(!isset($admin_resources[$admin['adminid']]['ftps_used'])) + { + $admin_resources[$admin['adminid']]['ftps_used'] = 0; + } + + $admin['ftps_used_new'] = $admin_resources[$admin['adminid']]['ftps_used']; + + if(!isset($admin_resources[$admin['adminid']]['emails_used'])) + { + $admin_resources[$admin['adminid']]['emails_used'] = 0; + } + + $admin['emails_used_new'] = $admin_resources[$admin['adminid']]['emails_used']; + + if(!isset($admin_resources[$admin['adminid']]['email_accounts_used'])) + { + $admin_resources[$admin['adminid']]['email_accounts_used'] = 0; + } + + $admin['email_accounts_used_new'] = $admin_resources[$admin['adminid']]['email_accounts_used']; + + if(!isset($admin_resources[$admin['adminid']]['tickets_used'])) + { + $admin_resources[$admin['adminid']]['tickets_used'] = 0; + } + + $admin['tickets_used_new'] = $admin_resources[$admin['adminid']]['tickets_used']; + + if(!isset($admin_resources[$admin['adminid']]['email_forwarders_used'])) + { + $admin_resources[$admin['adminid']]['email_forwarders_used'] = 0; + } + + $admin['email_forwarders_used_new'] = $admin_resources[$admin['adminid']]['email_forwarders_used']; + + if(!isset($admin_resources[$admin['adminid']]['email_quota_used'])) + { + $admin_resources[$admin['adminid']]['email_quota_used'] = 0; + } + + $admin['email_quota_used_new'] = $admin_resources[$admin['adminid']]['email_quota_used']; + + if(!isset($admin_resources[$admin['adminid']]['subdomains_used'])) + { + $admin_resources[$admin['adminid']]['subdomains_used'] = 0; + } + + $admin['subdomains_used_new'] = $admin_resources[$admin['adminid']]['subdomains_used']; + $db->query('UPDATE `' . TABLE_PANEL_ADMINS . '` SET `customers_used` = "' . (int)$admin['customers_used_new'] . '", `domains_used` = "' . (int)$admin['domains_used_new'] . '", `diskspace_used` = "' . (int)$admin['diskspace_used_new'] . '", `mysqls_used` = "' . (int)$admin['mysqls_used_new'] . '", `emails_used` = "' . (int)$admin['emails_used_new'] . '", `email_accounts_used` = "' . (int)$admin['email_accounts_used_new'] . '", `email_forwarders_used` = "' . (int)$admin['email_forwarders_used_new'] . '", `email_quota_used` = "' . (int)$admin['email_quota_used_new'] . '", `ftps_used` = "' . (int)$admin['ftps_used_new'] . '", `tickets_used` = "' . (int)$admin['tickets_used_new'] . '", `subdomains_used` = "' . (int)$admin['subdomains_used_new'] . '", `traffic_used` = "' . (int)$admin['traffic_used_new'] . '" WHERE `adminid` = "' . (int)$admin['adminid'] . '"'); + + if($returndebuginfo === true) + { + $returnval['admins'][$admin['adminid']] = $admin; + } + } + + return $returnval; +} diff --git a/lib/functions/froxlor/function.updateFunctions.php b/lib/functions/froxlor/function.updateFunctions.php index 5642112b..c14d9b92 100644 --- a/lib/functions/froxlor/function.updateFunctions.php +++ b/lib/functions/froxlor/function.updateFunctions.php @@ -12,7 +12,7 @@ * @author Froxlor team (2010-) * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @package Functions - * @version $Id: $ + * @version $Id$ */ /* diff --git a/lib/functions/logger/constant.logger.php b/lib/functions/logger/constant.logger.php index 4c6f17e1..05c52f58 100644 --- a/lib/functions/logger/constant.logger.php +++ b/lib/functions/logger/constant.logger.php @@ -1,29 +1,29 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -if(!defined('USR_ACTION')) - define('USR_ACTION', '10'); -if(!defined('RES_ACTION')) - define('RES_ACTION', '20'); -if(!defined('ADM_ACTION')) - define('ADM_ACTION', '30'); -if(!defined('CRON_ACTION')) - define('CRON_ACTION', '40'); -if(!defined('LOG_ERROR')) - define('LOG_ERROR', '99'); + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +if(!defined('USR_ACTION')) + define('USR_ACTION', '10'); +if(!defined('RES_ACTION')) + define('RES_ACTION', '20'); +if(!defined('ADM_ACTION')) + define('ADM_ACTION', '30'); +if(!defined('CRON_ACTION')) + define('CRON_ACTION', '40'); +if(!defined('LOG_ERROR')) + define('LOG_ERROR', '99'); diff --git a/lib/functions/output/function.ask_yesno.php b/lib/functions/output/function.ask_yesno.php index 3b38a1fd..35c3bbaf 100644 --- a/lib/functions/output/function.ask_yesno.php +++ b/lib/functions/output/function.ask_yesno.php @@ -1,99 +1,99 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Prints Question on screen - * - * @param string The question - * @param string File which will be called with POST if user clicks yes - * @param array Values which will be given to $yesfile. Format: array(variable1=>value1, variable2=>value2, variable3=>value3) - * @param string Name of the target eg Domain or eMail address etc. - * @author Florian Lippert - */ - -function ask_yesno($text, $yesfile, $params = array(), $targetname = '') -{ - global $userinfo, $db, $s, $header, $footer, $lng; - - /* - // For compatibility reasons (if $params contains a string like "field1=value1;field2=value2") this will convert it into a usable array - if(!is_array($params)) - { - $params_tmp=explode(';',$params); - unset($params); - $params=array(); - while(list(,$param_tmp)=each($params_tmp)) - { - $param_tmp=explode('=',$param_tmp); - $params[$param_tmp[0]]=$param_tmp[1]; - } - } -*/ - - $hiddenparams = ''; - - if(is_array($params)) - { - foreach($params as $field => $value) - { - $hiddenparams.= '' . "\n"; - } - } - - if(isset($lng['question'][$text])) - { - $text = $lng['question'][$text]; - } - - $text = strtr($text, array('%s' => $targetname)); - eval("echo \"" . getTemplate('misc/question_yesno', '1') . "\";"); - exit; -} - -function ask_yesno_withcheckbox($text, $chk_text, $yesfile, $params = array(), $targetname = '') -{ - global $userinfo, $db, $s, $header, $footer, $lng; - - $hiddenparams = ''; - - if(is_array($params)) - { - foreach($params as $field => $value) - { - $hiddenparams.= '' . "\n"; - } - } - - if(isset($lng['question'][$text])) - { - $text = $lng['question'][$text]; - } - - if(isset($lng['question'][$chk_text])) - { - $chk_text = $lng['question'][$chk_text]; - } - - $checkbox = makecheckbox('delete_userfiles', $chk_text, '1', false, '0', true, true); - - $text = strtr($text, array('%s' => $targetname)); - eval("echo \"" . getTemplate('misc/question_yesno_checkbox', '1') . "\";"); - exit; -} - + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Prints Question on screen + * + * @param string The question + * @param string File which will be called with POST if user clicks yes + * @param array Values which will be given to $yesfile. Format: array(variable1=>value1, variable2=>value2, variable3=>value3) + * @param string Name of the target eg Domain or eMail address etc. + * @author Florian Lippert + */ + +function ask_yesno($text, $yesfile, $params = array(), $targetname = '') +{ + global $userinfo, $db, $s, $header, $footer, $lng; + + /* + // For compatibility reasons (if $params contains a string like "field1=value1;field2=value2") this will convert it into a usable array + if(!is_array($params)) + { + $params_tmp=explode(';',$params); + unset($params); + $params=array(); + while(list(,$param_tmp)=each($params_tmp)) + { + $param_tmp=explode('=',$param_tmp); + $params[$param_tmp[0]]=$param_tmp[1]; + } + } +*/ + + $hiddenparams = ''; + + if(is_array($params)) + { + foreach($params as $field => $value) + { + $hiddenparams.= '' . "\n"; + } + } + + if(isset($lng['question'][$text])) + { + $text = $lng['question'][$text]; + } + + $text = strtr($text, array('%s' => $targetname)); + eval("echo \"" . getTemplate('misc/question_yesno', '1') . "\";"); + exit; +} + +function ask_yesno_withcheckbox($text, $chk_text, $yesfile, $params = array(), $targetname = '') +{ + global $userinfo, $db, $s, $header, $footer, $lng; + + $hiddenparams = ''; + + if(is_array($params)) + { + foreach($params as $field => $value) + { + $hiddenparams.= '' . "\n"; + } + } + + if(isset($lng['question'][$text])) + { + $text = $lng['question'][$text]; + } + + if(isset($lng['question'][$chk_text])) + { + $chk_text = $lng['question'][$chk_text]; + } + + $checkbox = makecheckbox('delete_userfiles', $chk_text, '1', false, '0', true, true); + + $text = strtr($text, array('%s' => $targetname)); + eval("echo \"" . getTemplate('misc/question_yesno_checkbox', '1') . "\";"); + exit; +} + diff --git a/lib/functions/output/function.buildNavigation.php b/lib/functions/output/function.buildNavigation.php index 8cf2b9f6..1f43fdaf 100644 --- a/lib/functions/output/function.buildNavigation.php +++ b/lib/functions/output/function.buildNavigation.php @@ -1,122 +1,122 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Build Navigation Sidebar - * @param array navigation data - * @param array userinfo the userinfo of the user - * @return string the content of the navigation bar - * - * @author Florian Lippert - */ - -function buildNavigation($navigation, $userinfo) -{ - $returnvalue = ''; - - foreach($navigation as $box) - { - if((!isset($box['show_element']) || $box['show_element'] === true) && - (!isset($box['required_resources']) || $box['required_resources'] == '' || (isset($userinfo[$box['required_resources']]) && ((int)$userinfo[$box['required_resources']] > 0 || $userinfo[$box['required_resources']] == '-1')))) - { - $navigation_links = ''; - foreach($box['elements'] as $element_id => $element) - { - if((!isset($element['show_element']) || $element['show_element'] === true) && - (!isset($element['required_resources']) || $element['required_resources'] == '' || (isset($userinfo[$element['required_resources']]) && ((int)$userinfo[$element['required_resources']] > 0 || $userinfo[$element['required_resources']] == '-1')))) - { - if(isset($element['url']) && trim($element['url']) != '') - { - // append sid only to local - - if(!preg_match('/^https?\:\/\//', $element['url']) - && (isset($userinfo['hash']) && $userinfo['hash'] != '')) - { - // generate sid with ? oder & - - if(strpos($element['url'], '?') !== false) - { - $element['url'].= '&s=' . $userinfo['hash']; - } - else - { - $element['url'].= '?s=' . $userinfo['hash']; - } - } - - $target = ''; - - if(isset($element['new_window']) && $element['new_window'] == true) - { - $target = ' target="_blank"'; - } - - $completeLink = '' . $element['label'] . ''; - } - else - { - $completeLink = $element['label']; - } - - eval("\$navigation_links .= \"" . getTemplate("navigation_link", 1) . "\";"); - } - } - - if($navigation_links != '') - { - if(isset($box['url']) && trim($box['url']) != '') - { - // append sid only to local - - if(!preg_match('/^https?\:\/\//', $box['url']) - && (isset($userinfo['hash']) && $userinfo['hash'] != '')) - { - // generate sid with ? oder & - - if(strpos($box['url'], '?') !== false) - { - $box['url'].= '&s=' . $userinfo['hash']; - } - else - { - $box['url'].= '?s=' . $userinfo['hash']; - } - } - - $target = ''; - - if(isset($box['new_window']) && $box['new_window'] == true) - { - $target = ' target="_blank"'; - } - - $completeLink = '' . $box['label'] . ''; - } - else - { - $completeLink = $box['label']; - } - - eval("\$returnvalue .= \"" . getTemplate("navigation_element", 1) . "\";"); - } - } - } - - return $returnvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Build Navigation Sidebar + * @param array navigation data + * @param array userinfo the userinfo of the user + * @return string the content of the navigation bar + * + * @author Florian Lippert + */ + +function buildNavigation($navigation, $userinfo) +{ + $returnvalue = ''; + + foreach($navigation as $box) + { + if((!isset($box['show_element']) || $box['show_element'] === true) && + (!isset($box['required_resources']) || $box['required_resources'] == '' || (isset($userinfo[$box['required_resources']]) && ((int)$userinfo[$box['required_resources']] > 0 || $userinfo[$box['required_resources']] == '-1')))) + { + $navigation_links = ''; + foreach($box['elements'] as $element_id => $element) + { + if((!isset($element['show_element']) || $element['show_element'] === true) && + (!isset($element['required_resources']) || $element['required_resources'] == '' || (isset($userinfo[$element['required_resources']]) && ((int)$userinfo[$element['required_resources']] > 0 || $userinfo[$element['required_resources']] == '-1')))) + { + if(isset($element['url']) && trim($element['url']) != '') + { + // append sid only to local + + if(!preg_match('/^https?\:\/\//', $element['url']) + && (isset($userinfo['hash']) && $userinfo['hash'] != '')) + { + // generate sid with ? oder & + + if(strpos($element['url'], '?') !== false) + { + $element['url'].= '&s=' . $userinfo['hash']; + } + else + { + $element['url'].= '?s=' . $userinfo['hash']; + } + } + + $target = ''; + + if(isset($element['new_window']) && $element['new_window'] == true) + { + $target = ' target="_blank"'; + } + + $completeLink = '' . $element['label'] . ''; + } + else + { + $completeLink = $element['label']; + } + + eval("\$navigation_links .= \"" . getTemplate("navigation_link", 1) . "\";"); + } + } + + if($navigation_links != '') + { + if(isset($box['url']) && trim($box['url']) != '') + { + // append sid only to local + + if(!preg_match('/^https?\:\/\//', $box['url']) + && (isset($userinfo['hash']) && $userinfo['hash'] != '')) + { + // generate sid with ? oder & + + if(strpos($box['url'], '?') !== false) + { + $box['url'].= '&s=' . $userinfo['hash']; + } + else + { + $box['url'].= '?s=' . $userinfo['hash']; + } + } + + $target = ''; + + if(isset($box['new_window']) && $box['new_window'] == true) + { + $target = ' target="_blank"'; + } + + $completeLink = '' . $box['label'] . ''; + } + else + { + $completeLink = $box['label']; + } + + eval("\$returnvalue .= \"" . getTemplate("navigation_element", 1) . "\";"); + } + } + } + + return $returnvalue; +} diff --git a/lib/functions/output/function.getCorrectFullUserDetails.php b/lib/functions/output/function.getCorrectFullUserDetails.php index 4c768244..03ad4082 100644 --- a/lib/functions/output/function.getCorrectFullUserDetails.php +++ b/lib/functions/output/function.getCorrectFullUserDetails.php @@ -1,54 +1,54 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Returns full style user details "Name, Firstname | Company" - * - * @param array An array with keys firstname, name and company - * @return string The full details - * - * @author Florian Lippert - */ - -function getCorrectFullUserDetails($userinfo) -{ - $returnval = ''; - - if(isset($userinfo['firstname']) && isset($userinfo['name']) && isset($userinfo['company'])) - { - if($userinfo['company'] == '') - { - $returnval = $userinfo['name'] . ', ' . $userinfo['firstname']; - } - else - { - if($userinfo['name'] != '' - && $userinfo['firstname'] != '') - { - $returnval = $userinfo['name'] . ', ' . $userinfo['firstname'] . ' | ' . $userinfo['company']; - } - else - { - $returnval = $userinfo['company']; - } - } - } - - return $returnval; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Returns full style user details "Name, Firstname | Company" + * + * @param array An array with keys firstname, name and company + * @return string The full details + * + * @author Florian Lippert + */ + +function getCorrectFullUserDetails($userinfo) +{ + $returnval = ''; + + if(isset($userinfo['firstname']) && isset($userinfo['name']) && isset($userinfo['company'])) + { + if($userinfo['company'] == '') + { + $returnval = $userinfo['name'] . ', ' . $userinfo['firstname']; + } + else + { + if($userinfo['name'] != '' + && $userinfo['firstname'] != '') + { + $returnval = $userinfo['name'] . ', ' . $userinfo['firstname'] . ' | ' . $userinfo['company']; + } + else + { + $returnval = $userinfo['company']; + } + } + } + + return $returnval; +} diff --git a/lib/functions/output/function.getCorrectUserSalutation.php b/lib/functions/output/function.getCorrectUserSalutation.php index 10a2cd69..6a8c2401 100644 --- a/lib/functions/output/function.getCorrectUserSalutation.php +++ b/lib/functions/output/function.getCorrectUserSalutation.php @@ -1,48 +1,48 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Returns correct user salutation, either "Firstname Name" or "Company" - * - * @param array An array with keys firstname, name and company - * @return string The correct salutation - * - * @author Florian Lippert - */ - -function getCorrectUserSalutation($userinfo) -{ - $returnval = ''; - - if(isset($userinfo['firstname']) && isset($userinfo['name']) && isset($userinfo['company'])) - { - // Always prefer firstname name - - if($userinfo['company'] != '' && $userinfo['name'] == '' && $userinfo['firstname'] == '') - { - $returnval = $userinfo['company']; - } - else - { - $returnval = $userinfo['firstname'] . ' ' . $userinfo['name']; - } - } - - return $returnval; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Returns correct user salutation, either "Firstname Name" or "Company" + * + * @param array An array with keys firstname, name and company + * @return string The correct salutation + * + * @author Florian Lippert + */ + +function getCorrectUserSalutation($userinfo) +{ + $returnval = ''; + + if(isset($userinfo['firstname']) && isset($userinfo['name']) && isset($userinfo['company'])) + { + // Always prefer firstname name + + if($userinfo['company'] != '' && $userinfo['name'] == '' && $userinfo['firstname'] == '') + { + $returnval = $userinfo['company']; + } + else + { + $returnval = $userinfo['firstname'] . ' ' . $userinfo['name']; + } + } + + return $returnval; +} diff --git a/lib/functions/output/function.getTemplate.php b/lib/functions/output/function.getTemplate.php index 690912b7..fbcbd23c 100644 --- a/lib/functions/output/function.getTemplate.php +++ b/lib/functions/output/function.getTemplate.php @@ -1,63 +1,63 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Get template from filesystem - * - * @param string Templatename - * @param string noarea If area should be used to get template - * @return string The Template - * @author Florian Lippert - */ - -function getTemplate($template, $noarea = 0) -{ - global $templatecache; - - if($noarea != 1) - { - $template = AREA . '/' . $template; - } - - if(!isset($templatecache[$template])) - { - $filename = './templates/' . $template . '.tpl'; - - if(file_exists($filename) - && is_readable($filename)) - { - $templatefile = addcslashes(file_get_contents($filename), '"\\'); - - // loop through template more than once in case we have an "if"-statement in another one - - while(preg_match('/(.*)(<\/if>|(.*)<\/if>)/Uis', $templatefile)) - { - $templatefile = preg_replace('/(.*)(<\/if>|(.*)<\/if>)/Uis', '".( ($1) ? ("$2") : ("$4") )."', $templatefile); - } - } - else - { - $templatefile = 'TEMPLATE NOT FOUND: ' . $filename; - } - - $templatecache[$template] = $templatefile; - } - - return $templatecache[$template]; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Get template from filesystem + * + * @param string Templatename + * @param string noarea If area should be used to get template + * @return string The Template + * @author Florian Lippert + */ + +function getTemplate($template, $noarea = 0) +{ + global $templatecache; + + if($noarea != 1) + { + $template = AREA . '/' . $template; + } + + if(!isset($templatecache[$template])) + { + $filename = './templates/' . $template . '.tpl'; + + if(file_exists($filename) + && is_readable($filename)) + { + $templatefile = addcslashes(file_get_contents($filename), '"\\'); + + // loop through template more than once in case we have an "if"-statement in another one + + while(preg_match('/(.*)(<\/if>|(.*)<\/if>)/Uis', $templatefile)) + { + $templatefile = preg_replace('/(.*)(<\/if>|(.*)<\/if>)/Uis', '".( ($1) ? ("$2") : ("$4") )."', $templatefile); + } + } + else + { + $templatefile = 'TEMPLATE NOT FOUND: ' . $filename; + } + + $templatecache[$template] = $templatefile; + } + + return $templatecache[$template]; +} diff --git a/lib/functions/output/function.makecheckbox.php b/lib/functions/output/function.makecheckbox.php index 32afebed..f6e506fc 100644 --- a/lib/functions/output/function.makecheckbox.php +++ b/lib/functions/output/function.makecheckbox.php @@ -1,64 +1,64 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Return HTML Code for a checkbox - * - * @param string The fieldname - * @param string The captions - * @param string The Value which will be returned - * @param bool Add a
    at the end of the checkbox - * @param string Values which will be selected by default - * @param bool Whether the title may contain html or not - * @param bool Whether the value may contain html or not - * @return string HTML Code - * @author Michael Kaufmann - */ - -function makecheckbox($name, $title, $value, $break = false, $selvalue = NULL, $title_trusted = false, $value_trusted = false) -{ - if($selvalue !== NULL - && $value == $selvalue) - { - $checked = 'checked="checked"'; - } - else - { - $checked = ''; - } - - if(!$title_trusted) - { - $title = htmlspecialchars($title); - } - - if(!$value_trusted) - { - $value = htmlspecialchars($value); - } - - $checkbox = ' ' . $title; - - if($break) - { - $checkbox.= '
    '; - } - - return $checkbox; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Return HTML Code for a checkbox + * + * @param string The fieldname + * @param string The captions + * @param string The Value which will be returned + * @param bool Add a
    at the end of the checkbox + * @param string Values which will be selected by default + * @param bool Whether the title may contain html or not + * @param bool Whether the value may contain html or not + * @return string HTML Code + * @author Michael Kaufmann + */ + +function makecheckbox($name, $title, $value, $break = false, $selvalue = NULL, $title_trusted = false, $value_trusted = false) +{ + if($selvalue !== NULL + && $value == $selvalue) + { + $checked = 'checked="checked"'; + } + else + { + $checked = ''; + } + + if(!$title_trusted) + { + $title = htmlspecialchars($title); + } + + if(!$value_trusted) + { + $value = htmlspecialchars($value); + } + + $checkbox = ' ' . $title; + + if($break) + { + $checkbox.= '
    '; + } + + return $checkbox; +} diff --git a/lib/functions/output/function.makeoption.php b/lib/functions/output/function.makeoption.php index 9823c9d3..36ee2330 100644 --- a/lib/functions/output/function.makeoption.php +++ b/lib/functions/output/function.makeoption.php @@ -1,56 +1,56 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Return HTML Code for an option within a + * + * @param string The caption + * @param string The Value which will be returned + * @param string Values which will be selected by default. + * @param bool Whether the title may contain html or not + * @param bool Whether the value may contain html or not + * @return string HTML Code + * @author Florian Lippert + */ + +function makeoption($title, $value, $selvalue = NULL, $title_trusted = false, $value_trusted = false) +{ + if($selvalue !== NULL + && ((is_array($selvalue) && in_array($value, $selvalue)) || $value == $selvalue)) + { + $selected = 'selected="selected"'; + } + else + { + $selected = ''; + } + + if(!$title_trusted) + { + $title = htmlspecialchars($title); + } + + if(!$value_trusted) + { + $value = htmlspecialchars($value); + } + + $option = ''; + return $option; +} diff --git a/lib/functions/output/function.makeyesno.php b/lib/functions/output/function.makeyesno.php index ca0e239d..1835ab51 100644 --- a/lib/functions/output/function.makeyesno.php +++ b/lib/functions/output/function.makeyesno.php @@ -1,35 +1,35 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Returns HTML Code for two radio buttons with two choices: yes and no - * - * @param string Name of HTML-Variable - * @param string Value which will be returned if user chooses yes - * @param string Value which will be returned if user chooses no - * @param string Value which is chosen by default - * @return string HTML Code - * @author Florian Lippert - */ - -function makeyesno($name, $yesvalue, $novalue = '', $yesselected = '') -{ - global $lng; - return ''; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Returns HTML Code for two radio buttons with two choices: yes and no + * + * @param string Name of HTML-Variable + * @param string Value which will be returned if user chooses yes + * @param string Value which will be returned if user chooses no + * @param string Value which is chosen by default + * @return string HTML Code + * @author Florian Lippert + */ + +function makeyesno($name, $yesvalue, $novalue = '', $yesselected = '') +{ + global $lng; + return ''; +} diff --git a/lib/functions/output/function.redirectTo.php b/lib/functions/output/function.redirectTo.php index a64118cd..38f73811 100644 --- a/lib/functions/output/function.redirectTo.php +++ b/lib/functions/output/function.redirectTo.php @@ -1,92 +1,92 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Sends an header ( 'Location ...' ) to the browser. - * - * @param string Destination - * @param array Get-Variables - * @param boolean if the target we are creating for a redirect - * should be a relative or an absolute url - * - * @return boolean false if params is not an array - * - * @author Florian Lippert - * @author Martin Burchert - * - * @changes martin@2005-01-29 - * - added isRelative parameter - * - speed up the url generation - * - fixed bug #91 - */ - -function redirectTo($destination, $get_variables = array(), $isRelative = false) -{ - $params = array(); - - if(is_array($get_variables)) - { - foreach($get_variables as $key => $value) - { - $params[] = urlencode($key) . '=' . urlencode($value); - } - - $params = '?' . implode($params, '&'); - - if($isRelative) - { - $protocol = ''; - $host = ''; - $path = './'; - } - else - { - if(isset($_SERVER['HTTPS']) - && strtolower($_SERVER['HTTPS']) == 'on') - { - $protocol = 'https://'; - } - else - { - $protocol = 'http://'; - } - - $host = $_SERVER['HTTP_HOST']; - - if(dirname($_SERVER['PHP_SELF']) == '/') - { - $path = '/'; - } - else - { - $path = dirname($_SERVER['PHP_SELF']) . '/'; - } - } - - header('Location: ' . $protocol . $host . $path . $destination . $params); - exit; - } - elseif($get_variables == null) - { - header('Location: ' . $destination); - exit; - } - - return false; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Sends an header ( 'Location ...' ) to the browser. + * + * @param string Destination + * @param array Get-Variables + * @param boolean if the target we are creating for a redirect + * should be a relative or an absolute url + * + * @return boolean false if params is not an array + * + * @author Florian Lippert + * @author Martin Burchert + * + * @changes martin@2005-01-29 + * - added isRelative parameter + * - speed up the url generation + * - fixed bug #91 + */ + +function redirectTo($destination, $get_variables = array(), $isRelative = false) +{ + $params = array(); + + if(is_array($get_variables)) + { + foreach($get_variables as $key => $value) + { + $params[] = urlencode($key) . '=' . urlencode($value); + } + + $params = '?' . implode($params, '&'); + + if($isRelative) + { + $protocol = ''; + $host = ''; + $path = './'; + } + else + { + if(isset($_SERVER['HTTPS']) + && strtolower($_SERVER['HTTPS']) == 'on') + { + $protocol = 'https://'; + } + else + { + $protocol = 'http://'; + } + + $host = $_SERVER['HTTP_HOST']; + + if(dirname($_SERVER['PHP_SELF']) == '/') + { + $path = '/'; + } + else + { + $path = dirname($_SERVER['PHP_SELF']) . '/'; + } + } + + header('Location: ' . $protocol . $host . $path . $destination . $params); + exit; + } + elseif($get_variables == null) + { + header('Location: ' . $destination); + exit; + } + + return false; +} diff --git a/lib/functions/output/function.standard_error.php b/lib/functions/output/function.standard_error.php index 56bb67f9..56b5fda0 100644 --- a/lib/functions/output/function.standard_error.php +++ b/lib/functions/output/function.standard_error.php @@ -1,67 +1,67 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Prints one ore more errormessages on screen - * - * @param array Errormessages - * @param string A %s in the errormessage will be replaced by this string. - * @author Florian Lippert - * @author Ron Brand - */ - -function standard_error($errors = '', $replacer = '') -{ - global $db, $userinfo, $s, $header, $footer, $lng; - $replacer = htmlentities($replacer); - - if(!is_array($errors)) - { - $errors = array( - $errors - ); - } - - $error = ''; - foreach($errors as $single_error) - { - if(isset($lng['error'][$single_error])) - { - $single_error = $lng['error'][$single_error]; - $single_error = strtr($single_error, array('%s' => $replacer)); - } - else - { - $error = 'Unknown Error (' . $single_error . '): ' . $replacer; - break; - } - - if(empty($error)) - { - $error = $single_error; - } - else - { - $error.= ' ' . $single_error; - } - } - - eval("echo \"" . getTemplate('misc/error', '1') . "\";"); - exit; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Prints one ore more errormessages on screen + * + * @param array Errormessages + * @param string A %s in the errormessage will be replaced by this string. + * @author Florian Lippert + * @author Ron Brand + */ + +function standard_error($errors = '', $replacer = '') +{ + global $db, $userinfo, $s, $header, $footer, $lng; + $replacer = htmlentities($replacer); + + if(!is_array($errors)) + { + $errors = array( + $errors + ); + } + + $error = ''; + foreach($errors as $single_error) + { + if(isset($lng['error'][$single_error])) + { + $single_error = $lng['error'][$single_error]; + $single_error = strtr($single_error, array('%s' => $replacer)); + } + else + { + $error = 'Unknown Error (' . $single_error . '): ' . $replacer; + break; + } + + if(empty($error)) + { + $error = $single_error; + } + else + { + $error.= ' ' . $single_error; + } + } + + eval("echo \"" . getTemplate('misc/error', '1') . "\";"); + exit; +} diff --git a/lib/functions/output/function.standard_success.php b/lib/functions/output/function.standard_success.php index 64837f32..d552a957 100644 --- a/lib/functions/output/function.standard_success.php +++ b/lib/functions/output/function.standard_success.php @@ -1,57 +1,57 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Prints one ore more errormessages on screen - * - * @param array Errormessages - * @param string A %s in the errormessage will be replaced by this string. - * @author Florian Lippert - */ - -function standard_success($success_message = '', $replacer = '', $params = array()) -{ - global $s, $header, $footer, $lng; - - if(isset($lng['success'][$success_message])) - { - $success_message = strtr($lng['success'][$success_message], array('%s' => htmlentities($replacer))); - } - - if(is_array($params) && isset($params['filename'])) - { - $redirect_url = $params['filename'] . '?s=' . $s; - unset($params['filename']); - - foreach($params as $varname => $value) - { - if($value != '') - { - $redirect_url .= '&' . $varname . '=' . $value; - } - } - } - else - { - $redirect_url = ''; - } - - eval("echo \"" . getTemplate('misc/success', '1') . "\";"); - exit; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Prints one ore more errormessages on screen + * + * @param array Errormessages + * @param string A %s in the errormessage will be replaced by this string. + * @author Florian Lippert + */ + +function standard_success($success_message = '', $replacer = '', $params = array()) +{ + global $s, $header, $footer, $lng; + + if(isset($lng['success'][$success_message])) + { + $success_message = strtr($lng['success'][$success_message], array('%s' => htmlentities($replacer))); + } + + if(is_array($params) && isset($params['filename'])) + { + $redirect_url = $params['filename'] . '?s=' . $s; + unset($params['filename']); + + foreach($params as $varname => $value) + { + if($value != '') + { + $redirect_url .= '&' . $varname . '=' . $value; + } + } + } + else + { + $redirect_url = ''; + } + + eval("echo \"" . getTemplate('misc/success', '1') . "\";"); + exit; +} diff --git a/lib/functions/phphelpers/function.array_merge_prefix.php b/lib/functions/phphelpers/function.array_merge_prefix.php index 11ef865e..8b736947 100644 --- a/lib/functions/phphelpers/function.array_merge_prefix.php +++ b/lib/functions/phphelpers/function.array_merge_prefix.php @@ -1,43 +1,43 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function array_merge_prefix($array1, $key_prefix, $array2) -{ - if(is_array($array1) && is_array($array2)) - { - if($key_prefix != '') - { - foreach($array2 as $key => $value) - { - $array1[$key_prefix . '_' . $key] = $value; - unset($array2[$key]); - } - unset($array2); - return $array1; - } - else - { - return array_merge($array1, $array2); - } - } - else - { - return $array1; - } -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function array_merge_prefix($array1, $key_prefix, $array2) +{ + if(is_array($array1) && is_array($array2)) + { + if($key_prefix != '') + { + foreach($array2 as $key => $value) + { + $array1[$key_prefix . '_' . $key] = $value; + unset($array2[$key]); + } + unset($array2); + return $array1; + } + else + { + return array_merge($array1, $array2); + } + } + else + { + return $array1; + } +} diff --git a/lib/functions/phphelpers/function.array_trim.php b/lib/functions/phphelpers/function.array_trim.php index c1d935f6..328dd353 100644 --- a/lib/functions/phphelpers/function.array_trim.php +++ b/lib/functions/phphelpers/function.array_trim.php @@ -1,46 +1,46 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Returns Array, whose elements have been checked whether thay are empty or not - * - * @param array The array to trim - * @return array The trim'med array - * @author Florian Lippert - */ - -function array_trim($source) -{ - $returnval = array(); - - if(is_array($source)) - { - while(list($var, $val) = each($source)) - { - if($val != ' ' - && $val != '')$returnval[$var] = $val; - } - } - else - { - $returnval = $source; - } - - return $returnval; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Returns Array, whose elements have been checked whether thay are empty or not + * + * @param array The array to trim + * @return array The trim'med array + * @author Florian Lippert + */ + +function array_trim($source) +{ + $returnval = array(); + + if(is_array($source)) + { + while(list($var, $val) = each($source)) + { + if($val != ' ' + && $val != '')$returnval[$var] = $val; + } + } + else + { + $returnval = $source; + } + + return $returnval; +} diff --git a/lib/functions/phphelpers/function.doubleval_ressource.php b/lib/functions/phphelpers/function.doubleval_ressource.php index bfe6c5b7..bd9014a7 100644 --- a/lib/functions/phphelpers/function.doubleval_ressource.php +++ b/lib/functions/phphelpers/function.doubleval_ressource.php @@ -1,40 +1,40 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Returns a double of the given value which isn't negative. - * Returns -1 if the given value was -1. - * - * @param any The value - * @return double The positive value - * @author Florian Lippert - */ - -function doubleval_ressource($the_value) -{ - $the_value = doubleval($the_value); - - if($the_value < 0 - && $the_value != '-1') - { - $the_value*= - 1; - } - - return $the_value; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Returns a double of the given value which isn't negative. + * Returns -1 if the given value was -1. + * + * @param any The value + * @return double The positive value + * @author Florian Lippert + */ + +function doubleval_ressource($the_value) +{ + $the_value = doubleval($the_value); + + if($the_value < 0 + && $the_value != '-1') + { + $the_value*= - 1; + } + + return $the_value; +} diff --git a/lib/functions/phphelpers/function.html_entity_decode_array.php b/lib/functions/phphelpers/function.html_entity_decode_array.php index 901a036f..c2fd7dc8 100644 --- a/lib/functions/phphelpers/function.html_entity_decode_array.php +++ b/lib/functions/phphelpers/function.html_entity_decode_array.php @@ -1,69 +1,69 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Wrapper around html_entity_decode to handle arrays, with the advantage that you - * can select which fields should be handled by htmlentities and with advantage, - * that you can eliminate all html entities by setting complete=true - * - * @param array The subject array - * @param string The fields which should be checked for, separated by spaces - * @param bool Select true to use html_entity_decode_complete instead of html_entity_decode - * @param int See php documentation about this - * @param string See php documentation about this - * @return array The array with html_entity_decode'd strings - * @author Florian Lippert - */ - -function html_entity_decode_array($subject, $fields = '', $complete = false, $quote_style = ENT_COMPAT, $charset = 'ISO-8859-1') -{ - if(is_array($subject)) - { - if(!is_array($fields)) - { - $fields = array_trim(explode(' ', $fields)); - } - - foreach($subject as $field => $value) - { - if((!is_array($fields) || empty($fields)) - || (is_array($fields) && !empty($fields) && in_array($field, $fields))) - { - /** - * Just call ourselve to manage multi-dimensional arrays - */ - - $subject[$field] = html_entity_decode_array($subject[$field], $fields, $complete, $quote_style, $charset); - } - } - } - else - { - if($complete == true) - { - $subject = html_entity_decode_complete($subject, $quote_style, $charset); - } - else - { - $subject = html_entity_decode($subject, $quote_style, $charset); - } - } - - return $subject; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Wrapper around html_entity_decode to handle arrays, with the advantage that you + * can select which fields should be handled by htmlentities and with advantage, + * that you can eliminate all html entities by setting complete=true + * + * @param array The subject array + * @param string The fields which should be checked for, separated by spaces + * @param bool Select true to use html_entity_decode_complete instead of html_entity_decode + * @param int See php documentation about this + * @param string See php documentation about this + * @return array The array with html_entity_decode'd strings + * @author Florian Lippert + */ + +function html_entity_decode_array($subject, $fields = '', $complete = false, $quote_style = ENT_COMPAT, $charset = 'ISO-8859-1') +{ + if(is_array($subject)) + { + if(!is_array($fields)) + { + $fields = array_trim(explode(' ', $fields)); + } + + foreach($subject as $field => $value) + { + if((!is_array($fields) || empty($fields)) + || (is_array($fields) && !empty($fields) && in_array($field, $fields))) + { + /** + * Just call ourselve to manage multi-dimensional arrays + */ + + $subject[$field] = html_entity_decode_array($subject[$field], $fields, $complete, $quote_style, $charset); + } + } + } + else + { + if($complete == true) + { + $subject = html_entity_decode_complete($subject, $quote_style, $charset); + } + else + { + $subject = html_entity_decode($subject, $quote_style, $charset); + } + } + + return $subject; +} diff --git a/lib/functions/phphelpers/function.html_entity_decode_complete.php b/lib/functions/phphelpers/function.html_entity_decode_complete.php index 07b7c09a..a979734a 100644 --- a/lib/functions/phphelpers/function.html_entity_decode_complete.php +++ b/lib/functions/phphelpers/function.html_entity_decode_complete.php @@ -1,36 +1,36 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Calls html_entity_decode in a loop until the result doesn't differ from original anymore - * - * @param string The string in which the html entities should be eliminated. - * @return string The cleaned string - * @author Florian Lippert - */ - -function html_entity_decode_complete($string) -{ - while($string != html_entity_decode($string)) - { - $string = html_entity_decode($string); - } - - return $string; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Calls html_entity_decode in a loop until the result doesn't differ from original anymore + * + * @param string The string in which the html entities should be eliminated. + * @return string The cleaned string + * @author Florian Lippert + */ + +function html_entity_decode_complete($string) +{ + while($string != html_entity_decode($string)) + { + $string = html_entity_decode($string); + } + + return $string; +} diff --git a/lib/functions/phphelpers/function.htmlentities_array.php b/lib/functions/phphelpers/function.htmlentities_array.php index 511b9b15..fa38d661 100644 --- a/lib/functions/phphelpers/function.htmlentities_array.php +++ b/lib/functions/phphelpers/function.htmlentities_array.php @@ -1,60 +1,60 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Wrapper around htmlentities to handle arrays, with the advantage that you - * can select which fields should be handled by htmlentities - * - * @param array The subject array - * @param string The fields which should be checked for, separated by spaces - * @param int See php documentation about this - * @param string See php documentation about this - * @return array The array with htmlentitie'd strings - * @author Florian Lippert - */ - -function htmlentities_array($subject, $fields = '', $quote_style = ENT_COMPAT, $charset = 'ISO-8859-1') -{ - if(is_array($subject)) - { - if(!is_array($fields)) - { - $fields = array_trim(explode(' ', $fields)); - } - - foreach($subject as $field => $value) - { - if((!is_array($fields) || empty($fields)) - || (is_array($fields) && !empty($fields) && in_array($field, $fields))) - { - /** - * Just call ourselve to manage multi-dimensional arrays - */ - - $subject[$field] = htmlentities_array($subject[$field], $fields, $quote_style, $charset); - } - } - } - else - { - $subject = htmlentities($subject, $quote_style, $charset); - } - - return $subject; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Wrapper around htmlentities to handle arrays, with the advantage that you + * can select which fields should be handled by htmlentities + * + * @param array The subject array + * @param string The fields which should be checked for, separated by spaces + * @param int See php documentation about this + * @param string See php documentation about this + * @return array The array with htmlentitie'd strings + * @author Florian Lippert + */ + +function htmlentities_array($subject, $fields = '', $quote_style = ENT_COMPAT, $charset = 'ISO-8859-1') +{ + if(is_array($subject)) + { + if(!is_array($fields)) + { + $fields = array_trim(explode(' ', $fields)); + } + + foreach($subject as $field => $value) + { + if((!is_array($fields) || empty($fields)) + || (is_array($fields) && !empty($fields) && in_array($field, $fields))) + { + /** + * Just call ourselve to manage multi-dimensional arrays + */ + + $subject[$field] = htmlentities_array($subject[$field], $fields, $quote_style, $charset); + } + } + } + else + { + $subject = htmlentities($subject, $quote_style, $charset); + } + + return $subject; +} diff --git a/lib/functions/phphelpers/function.intval_ressource.php b/lib/functions/phphelpers/function.intval_ressource.php index b1aa3ae2..f213963a 100644 --- a/lib/functions/phphelpers/function.intval_ressource.php +++ b/lib/functions/phphelpers/function.intval_ressource.php @@ -1,40 +1,40 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Returns an integer of the given value which isn't negative. - * Returns -1 if the given value was -1. - * - * @param any The value - * @return int The positive value - * @author Florian Lippert - */ - -function intval_ressource($the_value) -{ - $the_value = intval($the_value); - - if($the_value < 0 - && $the_value != '-1') - { - $the_value*= - 1; - } - - return $the_value; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Returns an integer of the given value which isn't negative. + * Returns -1 if the given value was -1. + * + * @param any The value + * @return int The positive value + * @author Florian Lippert + */ + +function intval_ressource($the_value) +{ + $the_value = intval($the_value); + + if($the_value < 0 + && $the_value != '-1') + { + $the_value*= - 1; + } + + return $the_value; +} diff --git a/lib/functions/phphelpers/function.replace_variables.php b/lib/functions/phphelpers/function.replace_variables.php index 2f0bcedb..98d04ddd 100644 --- a/lib/functions/phphelpers/function.replace_variables.php +++ b/lib/functions/phphelpers/function.replace_variables.php @@ -1,58 +1,58 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Replaces all occurences of variables defined in the second argument - * in the first argument with their values. - * - * @param string The string that should be searched for variables - * @param array The array containing the variables with their values - * @return string The submitted string with the variables replaced. - * @author Michael Duergner - */ - -function replace_variables($text, $vars) -{ - $pattern = "/\{([a-zA-Z0-9\-_]+)\}/"; - - // --- martin @ 08.08.2005 ------------------------------------------------------- - // fixing usage of uninitialised variable - - $matches = array(); - - // ------------------------------------------------------------------------------- - - if(count($vars) > 0 - && preg_match_all($pattern, $text, $matches)) - { - for ($i = 0;$i < count($matches[1]);$i++) - { - $current = $matches[1][$i]; - - if(isset($vars[$current])) - { - $var = $vars[$current]; - $text = str_replace("{" . $current . "}", $var, $text); - } - } - } - - $text = str_replace('\n', "\n", $text); - return $text; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Replaces all occurences of variables defined in the second argument + * in the first argument with their values. + * + * @param string The string that should be searched for variables + * @param array The array containing the variables with their values + * @return string The submitted string with the variables replaced. + * @author Michael Duergner + */ + +function replace_variables($text, $vars) +{ + $pattern = "/\{([a-zA-Z0-9\-_]+)\}/"; + + // --- martin @ 08.08.2005 ------------------------------------------------------- + // fixing usage of uninitialised variable + + $matches = array(); + + // ------------------------------------------------------------------------------- + + if(count($vars) > 0 + && preg_match_all($pattern, $text, $matches)) + { + for ($i = 0;$i < count($matches[1]);$i++) + { + $current = $matches[1][$i]; + + if(isset($vars[$current])) + { + $var = $vars[$current]; + $text = str_replace("{" . $current . "}", $var, $text); + } + } + } + + $text = str_replace('\n', "\n", $text); + return $text; +} diff --git a/lib/functions/phphelpers/function.str_replace_array.php b/lib/functions/phphelpers/function.str_replace_array.php index cff4c54a..320b51a6 100644 --- a/lib/functions/phphelpers/function.str_replace_array.php +++ b/lib/functions/phphelpers/function.str_replace_array.php @@ -1,52 +1,52 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Replaces Strings in an array, with the advantage that you - * can select which fields should be str_replace'd - * - * @param mixed String or array of strings to search for - * @param mixed String or array to replace with - * @param array The subject array - * @param string The fields which should be checked for, separated by spaces - * @return array The str_replace'd array - * @author Florian Lippert - */ - -function str_replace_array($search, $replace, $subject, $fields = '') -{ - if(is_array($subject)) - { - $fields = array_trim(explode(' ', $fields)); - foreach($subject as $field => $value) - { - if((!is_array($fields) || empty($fields)) - || (is_array($fields) && !empty($fields) && in_array($field, $fields))) - { - $subject[$field] = str_replace($search, $replace, $subject[$field]); - } - } - } - else - { - $subject = str_replace($search, $replace, $subject); - } - - return $subject; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Replaces Strings in an array, with the advantage that you + * can select which fields should be str_replace'd + * + * @param mixed String or array of strings to search for + * @param mixed String or array to replace with + * @param array The subject array + * @param string The fields which should be checked for, separated by spaces + * @return array The str_replace'd array + * @author Florian Lippert + */ + +function str_replace_array($search, $replace, $subject, $fields = '') +{ + if(is_array($subject)) + { + $fields = array_trim(explode(' ', $fields)); + foreach($subject as $field => $value) + { + if((!is_array($fields) || empty($fields)) + || (is_array($fields) && !empty($fields) && in_array($field, $fields))) + { + $subject[$field] = str_replace($search, $replace, $subject[$field]); + } + } + } + else + { + $subject = str_replace($search, $replace, $subject); + } + + return $subject; +} diff --git a/lib/functions/phphelpers/function.stripslashes_array.php b/lib/functions/phphelpers/function.stripslashes_array.php index eb1f7d75..39f8c9ec 100644 --- a/lib/functions/phphelpers/function.stripslashes_array.php +++ b/lib/functions/phphelpers/function.stripslashes_array.php @@ -1,69 +1,69 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Wrapper around stripslashes to handle arrays, with the advantage that you - * can select which fields should be handled by htmlentities and with advantage, - * that you can eliminate all slashes by setting complete=true - * - * @param array The subject array - * @param int See php documentation about this - * @param string See php documentation about this - * @param string The fields which should be checked for, separated by spaces - * @param bool Select true to use stripslashes_complete instead of stripslashes - * @return array The array with stripslashe'd strings - * @author Florian Lippert - */ - -function stripslashes_array($subject, $fields = '', $complete = false) -{ - if(is_array($subject)) - { - if(!is_array($fields)) - { - $fields = array_trim(explode(' ', $fields)); - } - - foreach($subject as $field => $value) - { - if((!is_array($fields) || empty($fields)) - || (is_array($fields) && !empty($fields) && in_array($field, $fields))) - { - /** - * Just call ourselve to manage multi-dimensional arrays - */ - - $subject[$field] = stripslashes_array($subject[$field], $fields, $complete); - } - } - } - else - { - if($complete == true) - { - $subject = stripslashes_complete($subject); - } - else - { - $subject = stripslashes($subject); - } - } - - return $subject; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Wrapper around stripslashes to handle arrays, with the advantage that you + * can select which fields should be handled by htmlentities and with advantage, + * that you can eliminate all slashes by setting complete=true + * + * @param array The subject array + * @param int See php documentation about this + * @param string See php documentation about this + * @param string The fields which should be checked for, separated by spaces + * @param bool Select true to use stripslashes_complete instead of stripslashes + * @return array The array with stripslashe'd strings + * @author Florian Lippert + */ + +function stripslashes_array($subject, $fields = '', $complete = false) +{ + if(is_array($subject)) + { + if(!is_array($fields)) + { + $fields = array_trim(explode(' ', $fields)); + } + + foreach($subject as $field => $value) + { + if((!is_array($fields) || empty($fields)) + || (is_array($fields) && !empty($fields) && in_array($field, $fields))) + { + /** + * Just call ourselve to manage multi-dimensional arrays + */ + + $subject[$field] = stripslashes_array($subject[$field], $fields, $complete); + } + } + } + else + { + if($complete == true) + { + $subject = stripslashes_complete($subject); + } + else + { + $subject = stripslashes($subject); + } + } + + return $subject; +} diff --git a/lib/functions/phphelpers/function.stripslashes_complete.php b/lib/functions/phphelpers/function.stripslashes_complete.php index 424ec9fa..c3cfc003 100644 --- a/lib/functions/phphelpers/function.stripslashes_complete.php +++ b/lib/functions/phphelpers/function.stripslashes_complete.php @@ -1,36 +1,36 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Calls stripslashes in a loop until the result doesn't differ from original anymore - * - * @param string The string in which the slashes should be eliminated. - * @return string The cleaned string - * @author Florian Lippert - */ - -function stripslashes_complete($string) -{ - while($string != stripslashes($string)) - { - $string = stripslashes($string); - } - - return $string; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Calls stripslashes in a loop until the result doesn't differ from original anymore + * + * @param string The string in which the slashes should be eliminated. + * @return string The cleaned string + * @author Florian Lippert + */ + +function stripslashes_complete($string) +{ + while($string != stripslashes($string)) + { + $string = stripslashes($string); + } + + return $string; +} diff --git a/lib/functions/settings/function.getSetting.php b/lib/functions/settings/function.getSetting.php index 13aebd0c..5add7551 100644 --- a/lib/functions/settings/function.getSetting.php +++ b/lib/functions/settings/function.getSetting.php @@ -1,33 +1,33 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function getSetting($settinggroup, $varname) -{ - global $settings; - if(isset($settings[$settinggroup]) && is_array($settings[$settinggroup]) && isset($settings[$settinggroup][$varname])) - { - return $settings[$settinggroup][$varname]; - } - else - { - return false; - } -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function getSetting($settinggroup, $varname) +{ + global $settings; + if(isset($settings[$settinggroup]) && is_array($settings[$settinggroup]) && isset($settings[$settinggroup][$varname])) + { + return $settings[$settinggroup][$varname]; + } + else + { + return false; + } +} + +?> diff --git a/lib/functions/settings/function.loadSettings.php b/lib/functions/settings/function.loadSettings.php index 13392c58..b3276681 100644 --- a/lib/functions/settings/function.loadSettings.php +++ b/lib/functions/settings/function.loadSettings.php @@ -1,60 +1,60 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function loadSettings($settings_data, $db) -{ - $settings = array(); - - if(is_array($settings_data) && isset($settings_data['groups']) && is_array($settings_data['groups'])) - { - foreach($settings_data['groups'] as $settings_part => $settings_part_details) - { - if(is_array($settings_part_details) && isset($settings_part_details['fields']) && is_array($settings_part_details['fields'])) - { - foreach($settings_part_details['fields'] as $field_name => $field_details) - { - if(isset($field_details['settinggroup']) && isset($field_details['varname']) && isset($field_details['default'])) - { - $row = $db->query_first('SELECT `settinggroup`, `varname`, `value` FROM `' . TABLE_PANEL_SETTINGS . '` WHERE `settinggroup` = \'' . $db->escape($field_details['settinggroup']) . '\' AND `varname` = \'' . $db->escape($field_details['varname']) . '\' '); - if(!empty($row)) - { - $varvalue = $row['value']; - } - else - { - $varvalue = $field_details['default']; - } - - $settings[$field_details['settinggroup']][$field_details['varname']] = $varvalue; - } - else - { - $varvalue = false; - } - - $settings_data['groups'][$settings_part]['fields'][$field_name]['value'] = $varvalue; - } - } - } - } - - return $settings; -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function loadSettings($settings_data, $db) +{ + $settings = array(); + + if(is_array($settings_data) && isset($settings_data['groups']) && is_array($settings_data['groups'])) + { + foreach($settings_data['groups'] as $settings_part => $settings_part_details) + { + if(is_array($settings_part_details) && isset($settings_part_details['fields']) && is_array($settings_part_details['fields'])) + { + foreach($settings_part_details['fields'] as $field_name => $field_details) + { + if(isset($field_details['settinggroup']) && isset($field_details['varname']) && isset($field_details['default'])) + { + $row = $db->query_first('SELECT `settinggroup`, `varname`, `value` FROM `' . TABLE_PANEL_SETTINGS . '` WHERE `settinggroup` = \'' . $db->escape($field_details['settinggroup']) . '\' AND `varname` = \'' . $db->escape($field_details['varname']) . '\' '); + if(!empty($row)) + { + $varvalue = $row['value']; + } + else + { + $varvalue = $field_details['default']; + } + + $settings[$field_details['settinggroup']][$field_details['varname']] = $varvalue; + } + else + { + $varvalue = false; + } + + $settings_data['groups'][$settings_part]['fields'][$field_name]['value'] = $varvalue; + } + } + } + } + + return $settings; +} + +?> diff --git a/lib/functions/settings/function.saveSetting.php b/lib/functions/settings/function.saveSetting.php index b53933f3..57290599 100644 --- a/lib/functions/settings/function.saveSetting.php +++ b/lib/functions/settings/function.saveSetting.php @@ -1,27 +1,27 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function saveSetting($settinggroup, $varname, $newvalue) -{ - global $db; - $query = 'UPDATE `' . TABLE_PANEL_SETTINGS . '` SET `value` = \'' . $db->escape($newvalue) . '\' WHERE `settinggroup` = \'' . $db->escape($settinggroup) . '\' AND `varname`=\'' . $db->escape($varname) . '\''; - return $db->query($query); -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function saveSetting($settinggroup, $varname, $newvalue) +{ + global $db; + $query = 'UPDATE `' . TABLE_PANEL_SETTINGS . '` SET `value` = \'' . $db->escape($newvalue) . '\' WHERE `settinggroup` = \'' . $db->escape($settinggroup) . '\' AND `varname`=\'' . $db->escape($varname) . '\''; + return $db->query($query); +} + +?> diff --git a/lib/functions/settings/function.storeSettingDefaultIp.php b/lib/functions/settings/function.storeSettingDefaultIp.php index 9afc6713..1680789e 100644 --- a/lib/functions/settings/function.storeSettingDefaultIp.php +++ b/lib/functions/settings/function.storeSettingDefaultIp.php @@ -1,47 +1,47 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function storeSettingDefaultIp($fieldname, $fielddata, $newfieldvalue) -{ - $returnvalue = storeSettingField($fieldname, $fielddata, $newfieldvalue); - - if($returnvalue !== false && is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] == 'system' && isset($fielddata['varname']) && $fielddata['varname'] == 'defaultip') - { - global $db; - - $customerstddomains_result = $db->query('SELECT `standardsubdomain` FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `standardsubdomain` <> \'0\''); - $ids = array(); - - while($customerstddomains_row = $db->fetch_array($customerstddomains_result)) - { - $ids[] = (int)$customerstddomains_row['standardsubdomain']; - } - - if(count($ids) > 0) - { - $db->query('UPDATE `' . TABLE_PANEL_DOMAINS . '` SET `ipandport`=\'' . (int)$newfieldvalue . '\' WHERE `id` IN (\'' . implode('\',\'', $ids) . '\') AND `ipandport` = \'' . $db->escape(getSetting('system', 'defaultip')) . '\''); - } - - inserttask('1'); - } - - return $returnvalue; -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function storeSettingDefaultIp($fieldname, $fielddata, $newfieldvalue) +{ + $returnvalue = storeSettingField($fieldname, $fielddata, $newfieldvalue); + + if($returnvalue !== false && is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] == 'system' && isset($fielddata['varname']) && $fielddata['varname'] == 'defaultip') + { + global $db; + + $customerstddomains_result = $db->query('SELECT `standardsubdomain` FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `standardsubdomain` <> \'0\''); + $ids = array(); + + while($customerstddomains_row = $db->fetch_array($customerstddomains_result)) + { + $ids[] = (int)$customerstddomains_row['standardsubdomain']; + } + + if(count($ids) > 0) + { + $db->query('UPDATE `' . TABLE_PANEL_DOMAINS . '` SET `ipandport`=\'' . (int)$newfieldvalue . '\' WHERE `id` IN (\'' . implode('\',\'', $ids) . '\') AND `ipandport` = \'' . $db->escape(getSetting('system', 'defaultip')) . '\''); + } + + inserttask('1'); + } + + return $returnvalue; +} + +?> diff --git a/lib/functions/settings/function.storeSettingField.php b/lib/functions/settings/function.storeSettingField.php index de3a821c..1b1ba590 100644 --- a/lib/functions/settings/function.storeSettingField.php +++ b/lib/functions/settings/function.storeSettingField.php @@ -1,59 +1,59 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function storeSettingField($fieldname, $fielddata, $newfieldvalue) -{ - if(is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] != '' && isset($fielddata['varname']) && $fielddata['varname'] != '') - { - if(saveSetting($fielddata['settinggroup'], $fielddata['varname'], $newfieldvalue) != false) - { - return array($fielddata['settinggroup'] . '.' . $fielddata['varname'] => $newfieldvalue); - } - else - { - return false; - } - } - else - { - return false; - } -} - -function storeSettingFieldInsertBindTask($fieldname, $fielddata, $newfieldvalue) -{ - if(is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] != '' && isset($fielddata['varname']) && $fielddata['varname'] != '') - { - if(saveSetting($fielddata['settinggroup'], $fielddata['varname'], $newfieldvalue) != false) - { - inserttask('4'); - return array($fielddata['settinggroup'] . '.' . $fielddata['varname'] => $newfieldvalue); - } - else - { - return false; - } - } - else - { - return false; - } -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function storeSettingField($fieldname, $fielddata, $newfieldvalue) +{ + if(is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] != '' && isset($fielddata['varname']) && $fielddata['varname'] != '') + { + if(saveSetting($fielddata['settinggroup'], $fielddata['varname'], $newfieldvalue) != false) + { + return array($fielddata['settinggroup'] . '.' . $fielddata['varname'] => $newfieldvalue); + } + else + { + return false; + } + } + else + { + return false; + } +} + +function storeSettingFieldInsertBindTask($fieldname, $fielddata, $newfieldvalue) +{ + if(is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] != '' && isset($fielddata['varname']) && $fielddata['varname'] != '') + { + if(saveSetting($fielddata['settinggroup'], $fielddata['varname'], $newfieldvalue) != false) + { + inserttask('4'); + return array($fielddata['settinggroup'] . '.' . $fielddata['varname'] => $newfieldvalue); + } + else + { + return false; + } + } + else + { + return false; + } +} + +?> diff --git a/lib/functions/settings/function.storeSettingHostname.php b/lib/functions/settings/function.storeSettingHostname.php index 45e2f0a5..d338caf3 100644 --- a/lib/functions/settings/function.storeSettingHostname.php +++ b/lib/functions/settings/function.storeSettingHostname.php @@ -1,47 +1,47 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function storeSettingHostname($fieldname, $fielddata, $newfieldvalue) -{ - $returnvalue = storeSettingField($fieldname, $fielddata, $newfieldvalue); - - if($returnvalue !== false && is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] == 'system' && isset($fielddata['varname']) && $fielddata['varname'] == 'hostname') - { - global $db, $idna_convert; - $newfieldvalue = $idna_convert->encode($newfieldvalue); - - $customerstddomains_result = $db->query('SELECT `standardsubdomain` FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `standardsubdomain` <> \'0\''); - $ids = array(); - - while($customerstddomains_row = $db->fetch_array($customerstddomains_result)) - { - $ids[] = (int)$customerstddomains_row['standardsubdomain']; - } - - if(count($ids) > 0) - { - $db->query('UPDATE `' . TABLE_PANEL_DOMAINS . '` SET `domain` = REPLACE(`domain`, \'' . $db->escape(getSetting('system', 'hostname')) . '\', \'' . $db->escape($newfieldvalue) . '\') WHERE `id` IN (\'' . implode('\',\'', $ids) . '\')'); - inserttask('1'); - } - } - - return $returnvalue; -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function storeSettingHostname($fieldname, $fielddata, $newfieldvalue) +{ + $returnvalue = storeSettingField($fieldname, $fielddata, $newfieldvalue); + + if($returnvalue !== false && is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] == 'system' && isset($fielddata['varname']) && $fielddata['varname'] == 'hostname') + { + global $db, $idna_convert; + $newfieldvalue = $idna_convert->encode($newfieldvalue); + + $customerstddomains_result = $db->query('SELECT `standardsubdomain` FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `standardsubdomain` <> \'0\''); + $ids = array(); + + while($customerstddomains_row = $db->fetch_array($customerstddomains_result)) + { + $ids[] = (int)$customerstddomains_row['standardsubdomain']; + } + + if(count($ids) > 0) + { + $db->query('UPDATE `' . TABLE_PANEL_DOMAINS . '` SET `domain` = REPLACE(`domain`, \'' . $db->escape(getSetting('system', 'hostname')) . '\', \'' . $db->escape($newfieldvalue) . '\') WHERE `id` IN (\'' . implode('\',\'', $ids) . '\')'); + inserttask('1'); + } + } + + return $returnvalue; +} + +?> diff --git a/lib/functions/settings/function.storeSettingIpAddress.php b/lib/functions/settings/function.storeSettingIpAddress.php index f83d27ca..5bec530e 100644 --- a/lib/functions/settings/function.storeSettingIpAddress.php +++ b/lib/functions/settings/function.storeSettingIpAddress.php @@ -1,37 +1,37 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function storeSettingIpAddress($fieldname, $fielddata, $newfieldvalue) -{ - $returnvalue = storeSettingField($fieldname, $fielddata, $newfieldvalue); - - if($returnvalue !== false && is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] == 'system' && isset($fielddata['varname']) && $fielddata['varname'] == 'ipaddress') - { - $mysql_access_host_array = array_map('trim', explode(',', getSetting('system', 'mysql_access_host'))); - $mysql_access_host_array[] = $newfieldvalue; - $mysql_access_host_array = array_unique(array_trim($mysql_access_host_array)); - $mysql_access_host = implode(',', $mysql_access_host_array); - correctMysqlUsers($mysql_access_host_array); - saveSetting('system', 'mysql_access_host', $mysql_access_host); - } - - return $returnvalue; -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function storeSettingIpAddress($fieldname, $fielddata, $newfieldvalue) +{ + $returnvalue = storeSettingField($fieldname, $fielddata, $newfieldvalue); + + if($returnvalue !== false && is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] == 'system' && isset($fielddata['varname']) && $fielddata['varname'] == 'ipaddress') + { + $mysql_access_host_array = array_map('trim', explode(',', getSetting('system', 'mysql_access_host'))); + $mysql_access_host_array[] = $newfieldvalue; + $mysql_access_host_array = array_unique(array_trim($mysql_access_host_array)); + $mysql_access_host = implode(',', $mysql_access_host_array); + correctMysqlUsers($mysql_access_host_array); + saveSetting('system', 'mysql_access_host', $mysql_access_host); + } + + return $returnvalue; +} + +?> diff --git a/lib/functions/settings/function.storeSettingMysqlAccessHost.php b/lib/functions/settings/function.storeSettingMysqlAccessHost.php index c1632aa0..b7749b6e 100644 --- a/lib/functions/settings/function.storeSettingMysqlAccessHost.php +++ b/lib/functions/settings/function.storeSettingMysqlAccessHost.php @@ -1,48 +1,48 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function storeSettingMysqlAccessHost($fieldname, $fielddata, $newfieldvalue) -{ - $returnvalue = storeSettingField($fieldname, $fielddata, $newfieldvalue); - - if($returnvalue !== false && is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] == 'system' && isset($fielddata['varname']) && $fielddata['varname'] == 'mysql_access_host') - { - $mysql_access_host_array = array_map('trim', explode(',', $newfieldvalue)); - - if(in_array('127.0.0.1', $mysql_access_host_array) - && !in_array('localhost', $mysql_access_host_array)) - { - $mysql_access_host_array[] = 'localhost'; - } - - if(!in_array('127.0.0.1', $mysql_access_host_array) - && in_array('localhost', $mysql_access_host_array)) - { - $mysql_access_host_array[] = '127.0.0.1'; - } - - $mysql_access_host_array = array_unique(array_trim($mysql_access_host_array)); - $newfieldvalue = implode(',', $mysql_access_host_array); - correctMysqlUsers($mysql_access_host_array); - } - - return $returnvalue; -} - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function storeSettingMysqlAccessHost($fieldname, $fielddata, $newfieldvalue) +{ + $returnvalue = storeSettingField($fieldname, $fielddata, $newfieldvalue); + + if($returnvalue !== false && is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] == 'system' && isset($fielddata['varname']) && $fielddata['varname'] == 'mysql_access_host') + { + $mysql_access_host_array = array_map('trim', explode(',', $newfieldvalue)); + + if(in_array('127.0.0.1', $mysql_access_host_array) + && !in_array('localhost', $mysql_access_host_array)) + { + $mysql_access_host_array[] = 'localhost'; + } + + if(!in_array('127.0.0.1', $mysql_access_host_array) + && in_array('localhost', $mysql_access_host_array)) + { + $mysql_access_host_array[] = '127.0.0.1'; + } + + $mysql_access_host_array = array_unique(array_trim($mysql_access_host_array)); + $newfieldvalue = implode(',', $mysql_access_host_array); + correctMysqlUsers($mysql_access_host_array); + } + + return $returnvalue; +} + +?> diff --git a/lib/functions/system/function.checklastguid.php b/lib/functions/system/function.checklastguid.php index 02dc703b..d221f519 100644 --- a/lib/functions/system/function.checklastguid.php +++ b/lib/functions/system/function.checklastguid.php @@ -12,7 +12,7 @@ * @author Froxlor team (2010-) * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @package Language - * @version $Id: 185.spf.php 106 2010-01-25 10:06:34Z d00p $ + * @version $Id$ */ /* diff --git a/lib/functions/validate/function.buildValidMailFrom.php b/lib/functions/validate/function.buildValidMailFrom.php index 89000de0..cb9b8a30 100644 --- a/lib/functions/validate/function.buildValidMailFrom.php +++ b/lib/functions/validate/function.buildValidMailFrom.php @@ -1,33 +1,33 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Create a valid from/to - mailheader (remove carriage-returns) - * - * @param string The name of the recipient - * @param string The mailaddress - * @return string A valid header-entry - * @author Florian Aders - */ - -function buildValidMailFrom($name, $mailaddress) -{ - $mailfrom = str_replace(array("\r", "\n"), '', $name) . ' <' . str_replace(array("\r", "\n"), '', $mailaddress) . '>'; - return $mailfrom; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Create a valid from/to - mailheader (remove carriage-returns) + * + * @param string The name of the recipient + * @param string The mailaddress + * @return string A valid header-entry + * @author Florian Aders + */ + +function buildValidMailFrom($name, $mailaddress) +{ + $mailfrom = str_replace(array("\r", "\n"), '', $name) . ' <' . str_replace(array("\r", "\n"), '', $mailaddress) . '>'; + return $mailfrom; +} diff --git a/lib/functions/validate/function.checkMysqlAccessHost.php b/lib/functions/validate/function.checkMysqlAccessHost.php index afb42d13..fce35199 100644 --- a/lib/functions/validate/function.checkMysqlAccessHost.php +++ b/lib/functions/validate/function.checkMysqlAccessHost.php @@ -1,35 +1,35 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function checkMysqlAccessHost($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues) -{ - $mysql_access_host_array = array_map('trim', explode(',', $newfieldvalue)); - - foreach($mysql_access_host_array as $host_entry) - { - if(validate_ip($host_entry, true) == false - && validateDomain($host_entry) == false - && $host_entry != '%') - { - return array(FORMFIELDS_PLAUSIBILITY_CHECK_ERROR, 'invalidmysqlhost', $host_entry); - } - } - - return array(FORMFIELDS_PLAUSIBILITY_CHECK_OK); -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function checkMysqlAccessHost($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues) +{ + $mysql_access_host_array = array_map('trim', explode(',', $newfieldvalue)); + + foreach($mysql_access_host_array as $host_entry) + { + if(validate_ip($host_entry, true) == false + && validateDomain($host_entry) == false + && $host_entry != '%') + { + return array(FORMFIELDS_PLAUSIBILITY_CHECK_ERROR, 'invalidmysqlhost', $host_entry); + } + } + + return array(FORMFIELDS_PLAUSIBILITY_CHECK_OK); +} diff --git a/lib/functions/validate/function.checkUsername.php b/lib/functions/validate/function.checkUsername.php index 60440363..4eca1641 100644 --- a/lib/functions/validate/function.checkUsername.php +++ b/lib/functions/validate/function.checkUsername.php @@ -1,37 +1,37 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -function checkUsername($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues) -{ - global $settings; - if(!isset($allnewfieldvalues['customer_mysqlprefix'])) - { - $allnewfieldvalues['customer_mysqlprefix'] = $settings['customer']['mysqlprefix']; - } - $returnvalue = array(); - if(validateUsername($newfieldvalue, $settings['panel']['unix_names'], 14 - strlen($allnewfieldvalues['customer_mysqlprefix'])) === true) - { - $returnvalue = array(FORMFIELDS_PLAUSIBILITY_CHECK_OK); - } - else - { - $returnvalue = array(FORMFIELDS_PLAUSIBILITY_CHECK_ERROR, 'accountprefixiswrong'); - } - return $returnvalue; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +function checkUsername($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues) +{ + global $settings; + if(!isset($allnewfieldvalues['customer_mysqlprefix'])) + { + $allnewfieldvalues['customer_mysqlprefix'] = $settings['customer']['mysqlprefix']; + } + $returnvalue = array(); + if(validateUsername($newfieldvalue, $settings['panel']['unix_names'], 14 - strlen($allnewfieldvalues['customer_mysqlprefix'])) === true) + { + $returnvalue = array(FORMFIELDS_PLAUSIBILITY_CHECK_OK); + } + else + { + $returnvalue = array(FORMFIELDS_PLAUSIBILITY_CHECK_ERROR, 'accountprefixiswrong'); + } + return $returnvalue; +} diff --git a/lib/functions/validate/function.makeCorrectDestination.php b/lib/functions/validate/function.makeCorrectDestination.php index 34b3e110..e056730b 100644 --- a/lib/functions/validate/function.makeCorrectDestination.php +++ b/lib/functions/validate/function.makeCorrectDestination.php @@ -1,45 +1,45 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Function which returns a correct destination for Postfix Virtual Table - * - * @param string The destinations - * @return string the corrected destinations - * @author Florian Lippert - */ - -function makeCorrectDestination($destination) -{ - $search = '/ +/'; - $replace = ' '; - $destination = preg_replace($search, $replace, $destination); - - if(substr($destination, 0, 1) == ' ') - { - $destination = substr($destination, 1); - } - - if(substr($destination, -1, 1) == ' ') - { - $destination = substr($destination, 0, strlen($destination) - 1); - } - - return $destination; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Function which returns a correct destination for Postfix Virtual Table + * + * @param string The destinations + * @return string the corrected destinations + * @author Florian Lippert + */ + +function makeCorrectDestination($destination) +{ + $search = '/ +/'; + $replace = ' '; + $destination = preg_replace($search, $replace, $destination); + + if(substr($destination, 0, 1) == ' ') + { + $destination = substr($destination, 1); + } + + if(substr($destination, -1, 1) == ' ') + { + $destination = substr($destination, 0, strlen($destination) - 1); + } + + return $destination; +} diff --git a/lib/functions/validate/function.validate.php b/lib/functions/validate/function.validate.php index 23c1cdbf..648e46d5 100644 --- a/lib/functions/validate/function.validate.php +++ b/lib/functions/validate/function.validate.php @@ -1,85 +1,85 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Validates the given string by matching against the pattern, prints an error on failure and exits - * - * @param string $str the string to be tested (user input) - * @param string the $fieldname to be used in error messages - * @param string $pattern the regular expression to be used for testing - * @param string language id for the error - * @return string the clean string - * - * If the default pattern is used and the string does not match, we try to replace the - * 'bad' values and log the action. - * - */ - -function validate($str, $fieldname, $pattern = '', $lng = '', $emptydefault = array()) -{ - global $log; - - if(!is_array($emptydefault)) - { - $emptydefault_array = array( - $emptydefault - ); - unset($emptydefault); - $emptydefault = $emptydefault_array; - unset($emptydefault_array); - } - - // Check if the $str is one of the values which represent the default for an 'empty' value - - if(is_array($emptydefault) - && !empty($emptydefault) - && in_array($str, $emptydefault) - && isset($emptydefault[0])) - { - return $emptydefault[0]; - } - - if($pattern == '') - { - $pattern = '/^[^\r\n\t\f\0]*$/D'; - - if(!preg_match($pattern, $str)) - { - // Allows letters a-z, digits, space (\\040), hyphen (\\-), underscore (\\_) and backslash (\\\\), - // everything else is removed from the string. - - $allowed = "/[^a-z0-9\\040\\.\\-\\_\\\\]/i"; - preg_replace($allowed, "", $str); - $log->logAction(null, LOG_WARNING, "cleaned bad formatted string (" . $str . ")"); - } - } - - if(preg_match($pattern, $str)) - { - return $str; - } - - if($lng == '') - { - $lng = 'stringformaterror'; - } - - standard_error($lng, $fieldname); - exit; -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Validates the given string by matching against the pattern, prints an error on failure and exits + * + * @param string $str the string to be tested (user input) + * @param string the $fieldname to be used in error messages + * @param string $pattern the regular expression to be used for testing + * @param string language id for the error + * @return string the clean string + * + * If the default pattern is used and the string does not match, we try to replace the + * 'bad' values and log the action. + * + */ + +function validate($str, $fieldname, $pattern = '', $lng = '', $emptydefault = array()) +{ + global $log; + + if(!is_array($emptydefault)) + { + $emptydefault_array = array( + $emptydefault + ); + unset($emptydefault); + $emptydefault = $emptydefault_array; + unset($emptydefault_array); + } + + // Check if the $str is one of the values which represent the default for an 'empty' value + + if(is_array($emptydefault) + && !empty($emptydefault) + && in_array($str, $emptydefault) + && isset($emptydefault[0])) + { + return $emptydefault[0]; + } + + if($pattern == '') + { + $pattern = '/^[^\r\n\t\f\0]*$/D'; + + if(!preg_match($pattern, $str)) + { + // Allows letters a-z, digits, space (\\040), hyphen (\\-), underscore (\\_) and backslash (\\\\), + // everything else is removed from the string. + + $allowed = "/[^a-z0-9\\040\\.\\-\\_\\\\]/i"; + preg_replace($allowed, "", $str); + $log->logAction(null, LOG_WARNING, "cleaned bad formatted string (" . $str . ")"); + } + } + + if(preg_match($pattern, $str)) + { + return $str; + } + + if($lng == '') + { + $lng = 'stringformaterror'; + } + + standard_error($lng, $fieldname); + exit; +} diff --git a/lib/functions/validate/function.validateDomain.php b/lib/functions/validate/function.validateDomain.php index 0c493db1..e981827d 100644 --- a/lib/functions/validate/function.validateDomain.php +++ b/lib/functions/validate/function.validateDomain.php @@ -1,48 +1,48 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Check if the submitted string is a valid domainname, i.e. - * it consists only of the following characters ([a-z0-9][a-z0-9\-]+\.)+[a-z]{2,4} - * - * @param string The domainname which should be checked. - * @return boolean True if the domain is valid, false otherwise - * @author Florian Lippert - * @author Michael Duergner - * - */ - -function validateDomain($domainname) -{ - // we add http:// because this makes a domain valid for the filter; - - $domainname_tmp = 'http://' . $domainname; - - // If FILTER_VALIDATE_URL is good, but FILTER_VALIDATE_URL with FILTER_FLAG_PATH_REQUIRED or FILTER_FLAG_QUERY_REQUIRED is also good, it isn't just a domain. - // This is a ugly hack, maybe a good regex would be better? - - if(filter_var($domainname_tmp, FILTER_VALIDATE_URL) !== false && filter_var($domainname_tmp, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED) === false && filter_var($domainname_tmp, FILTER_VALIDATE_URL, FILTER_FLAG_QUERY_REQUIRED) === false) - { - return $domainname; - } - else - { - return false; - } -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Check if the submitted string is a valid domainname, i.e. + * it consists only of the following characters ([a-z0-9][a-z0-9\-]+\.)+[a-z]{2,4} + * + * @param string The domainname which should be checked. + * @return boolean True if the domain is valid, false otherwise + * @author Florian Lippert + * @author Michael Duergner + * + */ + +function validateDomain($domainname) +{ + // we add http:// because this makes a domain valid for the filter; + + $domainname_tmp = 'http://' . $domainname; + + // If FILTER_VALIDATE_URL is good, but FILTER_VALIDATE_URL with FILTER_FLAG_PATH_REQUIRED or FILTER_FLAG_QUERY_REQUIRED is also good, it isn't just a domain. + // This is a ugly hack, maybe a good regex would be better? + + if(filter_var($domainname_tmp, FILTER_VALIDATE_URL) !== false && filter_var($domainname_tmp, FILTER_VALIDATE_URL, FILTER_FLAG_PATH_REQUIRED) === false && filter_var($domainname_tmp, FILTER_VALIDATE_URL, FILTER_FLAG_QUERY_REQUIRED) === false) + { + return $domainname; + } + else + { + return false; + } +} diff --git a/lib/functions/validate/function.validateEmail.php b/lib/functions/validate/function.validateEmail.php index 3772b036..5a4be92b 100644 --- a/lib/functions/validate/function.validateEmail.php +++ b/lib/functions/validate/function.validateEmail.php @@ -1,34 +1,34 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Returns if an emailaddress is in correct format or not - * - * @param string The email address to check - * @return bool Correct or not - * @author Florian Lippert - * - * @changes Backported regex from SysCP 1.3 (lib/classes/Syscp/Handler/Validation.class.php) - */ - -function validateEmail($email) -{ - $email = strtolower($email); - return filter_var($email, FILTER_VALIDATE_EMAIL); -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Returns if an emailaddress is in correct format or not + * + * @param string The email address to check + * @return bool Correct or not + * @author Florian Lippert + * + * @changes Backported regex from SysCP 1.3 (lib/classes/Syscp/Handler/Validation.class.php) + */ + +function validateEmail($email) +{ + $email = strtolower($email); + return filter_var($email, FILTER_VALIDATE_EMAIL); +} diff --git a/lib/functions/validate/function.validateSqlInterval.php b/lib/functions/validate/function.validateSqlInterval.php index 193788bd..4060dc24 100644 --- a/lib/functions/validate/function.validateSqlInterval.php +++ b/lib/functions/validate/function.validateSqlInterval.php @@ -12,7 +12,7 @@ * @author Froxlor team (2010-) * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @package Functions - * @version $Id: $ + * @version $Id$ */ function validateSqlInterval($interval = null) diff --git a/lib/functions/validate/function.validateUrl.php b/lib/functions/validate/function.validateUrl.php index 21ce48c2..a7438102 100644 --- a/lib/functions/validate/function.validateUrl.php +++ b/lib/functions/validate/function.validateUrl.php @@ -1,72 +1,72 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Returns whether a URL is in a correct format or not - * - * @param string URL to be tested - * @return bool - * @author Christian Hoffmann - * - */ - -function validateUrl($url) -{ - if(strtolower(substr($url, 0, 7)) != "http://" - && strtolower(substr($url, 0, 8)) != "https://") - { - $url = 'http://' . $url; - } - - if(filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED) !== false) - { - return true; - } - else - { - if(strtolower(substr($url, 0, 7)) == "http://" - || strtolower(substr($url, 0, 8)) == "https://") - { - if(strtolower(substr($url, 0, 7)) == "http://") - { - $ip = strtolower(substr($url, 7)); - } - - if(strtolower(substr($url, 0, 8)) == "https://") - { - $ip = strtolower(substr($url, 8)); - } - - $ip = substr($ip, 0, strpos($ip, '/')); - - if(validate_ip($ip, true) !== false) - { - return true; - } - else - { - return false; - } - } - else - { - return false; - } - } -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Returns whether a URL is in a correct format or not + * + * @param string URL to be tested + * @return bool + * @author Christian Hoffmann + * + */ + +function validateUrl($url) +{ + if(strtolower(substr($url, 0, 7)) != "http://" + && strtolower(substr($url, 0, 8)) != "https://") + { + $url = 'http://' . $url; + } + + if(filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED) !== false) + { + return true; + } + else + { + if(strtolower(substr($url, 0, 7)) == "http://" + || strtolower(substr($url, 0, 8)) == "https://") + { + if(strtolower(substr($url, 0, 7)) == "http://") + { + $ip = strtolower(substr($url, 7)); + } + + if(strtolower(substr($url, 0, 8)) == "https://") + { + $ip = strtolower(substr($url, 8)); + } + + $ip = substr($ip, 0, strpos($ip, '/')); + + if(validate_ip($ip, true) !== false) + { + return true; + } + else + { + return false; + } + } + else + { + return false; + } + } +} diff --git a/lib/functions/validate/function.validateUsername.php b/lib/functions/validate/function.validateUsername.php index 1bf81855..b79828e1 100644 --- a/lib/functions/validate/function.validateUsername.php +++ b/lib/functions/validate/function.validateUsername.php @@ -1,47 +1,47 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Returns if an username is in correct format or not. - * - * @param string The username to check - * @return bool Correct or not - * @author Michael Duergner - * - * @changes Backported regex from SysCP 1.3 (lib/classes/Syscp/Handler/Validation.class.php) - */ - -function validateUsername($username, $unix_names = 1, $mysql_max = '') -{ - if($unix_names == 0) - { - if(strpos($username, '--') === false) - { - return (preg_match('/^[a-z][a-z0-9\-_]{1,' . (int)($mysql_max - 1) . '}[a-z0-9]{1}$/Di', $username) != false); - } - else - { - return false; - } - } - else - { - return (preg_match('/^[a-z][a-z0-9]{1,' . $mysql_max . '}$/Di', $username) != false); - } -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Returns if an username is in correct format or not. + * + * @param string The username to check + * @return bool Correct or not + * @author Michael Duergner + * + * @changes Backported regex from SysCP 1.3 (lib/classes/Syscp/Handler/Validation.class.php) + */ + +function validateUsername($username, $unix_names = 1, $mysql_max = '') +{ + if($unix_names == 0) + { + if(strpos($username, '--') === false) + { + return (preg_match('/^[a-z][a-z0-9\-_]{1,' . (int)($mysql_max - 1) . '}[a-z0-9]{1}$/Di', $username) != false); + } + else + { + return false; + } + } + else + { + return (preg_match('/^[a-z][a-z0-9]{1,' . $mysql_max . '}$/Di', $username) != false); + } +} diff --git a/lib/functions/validate/function.validate_ip.php b/lib/functions/validate/function.validate_ip.php index 0abab11a..79fe880b 100644 --- a/lib/functions/validate/function.validate_ip.php +++ b/lib/functions/validate/function.validate_ip.php @@ -1,46 +1,46 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Functions - * @version $Id$ - */ - -/** - * Checks whether it is a valid ip - * - * @return mixed ip address on success, standard_error on failure - */ - -function validate_ip($ip, $return_bool = false, $lng = 'invalidip') -{ - if(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) === FALSE - && filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) === FALSE - && filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE) === FALSE) - { - if($return_bool) - { - return false; - } - else - { - standard_error($lng, $ip); - exit; - } - } - else - { - return $ip; - } -} + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Functions + * @version $Id$ + */ + +/** + * Checks whether it is a valid ip + * + * @return mixed ip address on success, standard_error on failure + */ + +function validate_ip($ip, $return_bool = false, $lng = 'invalidip') +{ + if(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) === FALSE + && filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) === FALSE + && filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_RES_RANGE) === FALSE) + { + if($return_bool) + { + return false; + } + else + { + standard_error($lng, $ip); + exit; + } + } + else + { + return $ip; + } +} diff --git a/lib/init.php b/lib/init.php index 3f9bdd98..c02d31fe 100644 --- a/lib/init.php +++ b/lib/init.php @@ -1,371 +1,371 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package System - * @version $Id$ - */ - -// prevent Froxlor pages from being cached - -header("Cache-Control: no-cache, must-revalidate"); -header("Pragma: no-cache"); -header("Content-type: text/html; charset=utf-8"); - -// ensure that default timezone is set -if(function_exists("date_default_timezone_set") && function_exists("date_default_timezone_get")) -{ - @date_default_timezone_set(@date_default_timezone_get()); -} - -/** - * Register Globals Security Fix - * - unsetting every variable registered in $_REQUEST and as variable itself - */ - -foreach($_REQUEST as $key => $value) -{ - if(isset($$key)) - { - unset($$key); - } -} - -unset($_); -unset($value); -unset($key); -$filename = basename($_SERVER['PHP_SELF']); - -if(!file_exists('./lib/userdata.inc.php')) -{ - die('You have to configure Froxlor first!'); -} - -if(!is_readable('./lib/userdata.inc.php')) -{ - die('You have to make the file "./lib/userdata.inc.php" readable for the http-process!'); -} - -/** - * Includes the Usersettings eg. MySQL-Username/Passwort etc. - */ - -require ('./lib/userdata.inc.php'); - -if(!isset($sql) - || !is_array($sql)) -{ - $config_hint = file_get_contents('./templates/misc/configurehint.tpl'); - die($config_hint); -} - -// Legacy sql-root-information -if(isset($sql['root_user']) && isset($sql['root_password']) && (!isset($sql_root) || !is_array($sql_root))) -{ - $sql_root = array(0 => array('caption' => 'Default', 'host' => $sql['host'], 'user' => $sql['root_user'], 'password' => $sql['root_password'])); - unset($sql['root_user']); - unset($sql['root_password']); -} - -/** - * Includes the Functions - */ - -require ('./lib/functions.php'); - -/** - * Includes the MySQL-Tabledefinitions etc. - */ - -require ('./lib/tables.inc.php'); - -/** - * Includes the MySQL-Connection-Class - */ - -$db = new db($sql['host'], $sql['user'], $sql['password'], $sql['db']); -unset($sql['password']); -unset($db->password); - -// we will try to unset most of the $sql information if they are not needed -// by the calling script. - -if(!isset($need_db_sql_data) || $need_db_sql_data !== true) -{ - unset($sql); - $sql = array(); -} - -if(!isset($need_root_db_sql_data) || $need_root_db_sql_data !== true) -{ - unset($sql_root); - $sql_root = array(); -} - -/** - * Create a new idna converter - */ - -$idna_convert = new idna_convert_wrapper(); - -/** - * Reverse magic_quotes_gpc=on to have clean GPC data again - */ - -if(get_magic_quotes_gpc()) -{ - $in = array(&$_GET, &$_POST, &$_COOKIE); - - while(list($k, $v) = each($in)) - { - foreach($v as $key => $val) - { - if(!is_array($val)) - { - $in[$k][$key] = stripslashes($val); - continue; - } - - $in[] = & $in[$k][$key]; - } - } - - unset($in); -} - -/** - * Selects settings from MySQL-Table - */ - -$settings_data = loadConfigArrayDir('./actions/admin/settings/'); -$settings = loadSettings(&$settings_data, &$db); - -/** - * SESSION MANAGEMENT - */ - -$remote_addr = $_SERVER['REMOTE_ADDR']; -$http_user_agent = $_SERVER['HTTP_USER_AGENT']; -unset($userinfo); -unset($userid); -unset($customerid); -unset($adminid); -unset($s); - -if(isset($_POST['s'])) -{ - $s = $_POST['s']; - $nosession = 0; -} -elseif(isset($_GET['s'])) -{ - $s = $_GET['s']; - $nosession = 0; -} -else -{ - $s = ''; - $nosession = 1; -} - -$timediff = time() - $settings['session']['sessiontimeout']; -$db->query('DELETE FROM `' . TABLE_PANEL_SESSIONS . '` WHERE `lastactivity` < "' . (int)$timediff . '"'); -$userinfo = Array(); - -if(isset($s) - && $s != "" - && $nosession != 1) -{ - $query = 'SELECT `s`.*, `u`.* FROM `' . TABLE_PANEL_SESSIONS . '` `s` LEFT JOIN `'; - - if(AREA == 'admin') - { - $query.= TABLE_PANEL_ADMINS . '` `u` ON (`s`.`userid` = `u`.`adminid`)'; - $adminsession = '1'; - } - else - { - $query.= TABLE_PANEL_CUSTOMERS . '` `u` ON (`s`.`userid` = `u`.`customerid`)'; - $adminsession = '0'; - } - - $query.= 'WHERE `s`.`hash`="' . $db->escape($s) . '" AND `s`.`ipaddress`="' . $db->escape($remote_addr) . '" AND `s`.`useragent`="' . $db->escape($http_user_agent) . '" AND `s`.`lastactivity` > "' . (int)$timediff . '" AND `s`.`adminsession` = "' . $db->escape($adminsession) . '"'; - $userinfo = $db->query_first($query); - - if((($userinfo['adminsession'] == '1' && AREA == 'admin' && isset($userinfo['adminid'])) || ($userinfo['adminsession'] == '0' && (AREA == 'customer' || AREA == 'login') && isset($userinfo['customerid']))) - && (!isset($userinfo['deactivated']) || $userinfo['deactivated'] != '1')) - { - $userinfo['newformtoken'] = strtolower(md5(uniqid(microtime(), 1))); - $query = 'UPDATE `' . TABLE_PANEL_SESSIONS . '` SET `lastactivity`="' . time() . '", `formtoken`="' . $userinfo['newformtoken'] . '" WHERE `hash`="' . $db->escape($s) . '" AND `adminsession` = "' . $db->escape($adminsession) . '"'; - $db->query($query); - $nosession = 0; - } - else - { - $nosession = 1; - } -} -else -{ - $nosession = 1; -} - -/** - * Language Managament - */ - -$langs = array(); -$languages = array(); - -// query the whole table - -$query = 'SELECT * FROM `' . TABLE_PANEL_LANGUAGE . '` '; -$result = $db->query($query); - -// presort languages - -while($row = $db->fetch_array($result)) -{ - $langs[$row['language']][] = $row; -} - -// buildup $languages for the login screen - -foreach($langs as $key => $value) -{ - $languages[$key] = $key; -} - -if(!isset($userinfo['def_language']) - || !isset($languages[$userinfo['def_language']])) -{ - if(isset($_GET['language']) - && isset($languages[$_GET['language']])) - { - $language = $_GET['language']; - } - else - { - $language = $settings['panel']['standardlanguage']; - } -} -else -{ - $language = $userinfo['def_language']; -} - -// include every english language file we can get - -foreach($langs['English'] as $key => $value) -{ - include_once makeSecurePath($value['file']); -} - -// now include the selected language if its not english - -if($language != 'English') -{ - foreach($langs[$language] as $key => $value) - { - include_once makeSecurePath($value['file']); - } -} - -/** - * Redirects to index.php (login page) if no session exists - */ - -if($nosession == 1 - && AREA != 'login') -{ - unset($userinfo); - redirectTo('index.php'); - exit; -} - -/** - * Initialize Template Engine - */ - -$templatecache = array(); - -/** - * Logic moved out of lng-file - */ - -if(isset($userinfo['loginname']) - && $userinfo['loginname'] != '') -{ - $lng['menue']['main']['username'].= $userinfo['loginname']; - - /** - * Initialize logging - */ - - $log = FroxlorLogger::getInstanceOf($userinfo, $db, $settings); -} - -/** - * Fills variables for navigation, header and footer - */ - -if(AREA == 'admin' || AREA == 'customer') -{ - $navigation_data = loadConfigArrayDir('./lib/navigation/'); - $navigation = buildNavigation($navigation_data[AREA], $userinfo); - unset($navigation_data); -} - -eval("\$header = \"" . getTemplate('header', '1') . "\";"); -eval("\$footer = \"" . getTemplate('footer', '1') . "\";"); - -if(isset($_POST['action'])) -{ - $action = $_POST['action']; -} -elseif(isset($_GET['action'])) -{ - $action = $_GET['action']; -} -else -{ - $action = ''; -} - -if(isset($_POST['page'])) -{ - $page = $_POST['page']; -} -elseif(isset($_GET['page'])) -{ - $page = $_GET['page']; -} -else -{ - $page = ''; -} - -if($page == '') -{ - $page = 'overview'; -} - -/** - * Initialize the mailingsystem - */ - -$mail = new PHPMailer(); -$mail->From = $settings['panel']['adminmail']; - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package System + * @version $Id$ + */ + +// prevent Froxlor pages from being cached + +header("Cache-Control: no-cache, must-revalidate"); +header("Pragma: no-cache"); +header("Content-type: text/html; charset=utf-8"); + +// ensure that default timezone is set +if(function_exists("date_default_timezone_set") && function_exists("date_default_timezone_get")) +{ + @date_default_timezone_set(@date_default_timezone_get()); +} + +/** + * Register Globals Security Fix + * - unsetting every variable registered in $_REQUEST and as variable itself + */ + +foreach($_REQUEST as $key => $value) +{ + if(isset($$key)) + { + unset($$key); + } +} + +unset($_); +unset($value); +unset($key); +$filename = basename($_SERVER['PHP_SELF']); + +if(!file_exists('./lib/userdata.inc.php')) +{ + die('You have to configure Froxlor first!'); +} + +if(!is_readable('./lib/userdata.inc.php')) +{ + die('You have to make the file "./lib/userdata.inc.php" readable for the http-process!'); +} + +/** + * Includes the Usersettings eg. MySQL-Username/Passwort etc. + */ + +require ('./lib/userdata.inc.php'); + +if(!isset($sql) + || !is_array($sql)) +{ + $config_hint = file_get_contents('./templates/misc/configurehint.tpl'); + die($config_hint); +} + +// Legacy sql-root-information +if(isset($sql['root_user']) && isset($sql['root_password']) && (!isset($sql_root) || !is_array($sql_root))) +{ + $sql_root = array(0 => array('caption' => 'Default', 'host' => $sql['host'], 'user' => $sql['root_user'], 'password' => $sql['root_password'])); + unset($sql['root_user']); + unset($sql['root_password']); +} + +/** + * Includes the Functions + */ + +require ('./lib/functions.php'); + +/** + * Includes the MySQL-Tabledefinitions etc. + */ + +require ('./lib/tables.inc.php'); + +/** + * Includes the MySQL-Connection-Class + */ + +$db = new db($sql['host'], $sql['user'], $sql['password'], $sql['db']); +unset($sql['password']); +unset($db->password); + +// we will try to unset most of the $sql information if they are not needed +// by the calling script. + +if(!isset($need_db_sql_data) || $need_db_sql_data !== true) +{ + unset($sql); + $sql = array(); +} + +if(!isset($need_root_db_sql_data) || $need_root_db_sql_data !== true) +{ + unset($sql_root); + $sql_root = array(); +} + +/** + * Create a new idna converter + */ + +$idna_convert = new idna_convert_wrapper(); + +/** + * Reverse magic_quotes_gpc=on to have clean GPC data again + */ + +if(get_magic_quotes_gpc()) +{ + $in = array(&$_GET, &$_POST, &$_COOKIE); + + while(list($k, $v) = each($in)) + { + foreach($v as $key => $val) + { + if(!is_array($val)) + { + $in[$k][$key] = stripslashes($val); + continue; + } + + $in[] = & $in[$k][$key]; + } + } + + unset($in); +} + +/** + * Selects settings from MySQL-Table + */ + +$settings_data = loadConfigArrayDir('./actions/admin/settings/'); +$settings = loadSettings(&$settings_data, &$db); + +/** + * SESSION MANAGEMENT + */ + +$remote_addr = $_SERVER['REMOTE_ADDR']; +$http_user_agent = $_SERVER['HTTP_USER_AGENT']; +unset($userinfo); +unset($userid); +unset($customerid); +unset($adminid); +unset($s); + +if(isset($_POST['s'])) +{ + $s = $_POST['s']; + $nosession = 0; +} +elseif(isset($_GET['s'])) +{ + $s = $_GET['s']; + $nosession = 0; +} +else +{ + $s = ''; + $nosession = 1; +} + +$timediff = time() - $settings['session']['sessiontimeout']; +$db->query('DELETE FROM `' . TABLE_PANEL_SESSIONS . '` WHERE `lastactivity` < "' . (int)$timediff . '"'); +$userinfo = Array(); + +if(isset($s) + && $s != "" + && $nosession != 1) +{ + $query = 'SELECT `s`.*, `u`.* FROM `' . TABLE_PANEL_SESSIONS . '` `s` LEFT JOIN `'; + + if(AREA == 'admin') + { + $query.= TABLE_PANEL_ADMINS . '` `u` ON (`s`.`userid` = `u`.`adminid`)'; + $adminsession = '1'; + } + else + { + $query.= TABLE_PANEL_CUSTOMERS . '` `u` ON (`s`.`userid` = `u`.`customerid`)'; + $adminsession = '0'; + } + + $query.= 'WHERE `s`.`hash`="' . $db->escape($s) . '" AND `s`.`ipaddress`="' . $db->escape($remote_addr) . '" AND `s`.`useragent`="' . $db->escape($http_user_agent) . '" AND `s`.`lastactivity` > "' . (int)$timediff . '" AND `s`.`adminsession` = "' . $db->escape($adminsession) . '"'; + $userinfo = $db->query_first($query); + + if((($userinfo['adminsession'] == '1' && AREA == 'admin' && isset($userinfo['adminid'])) || ($userinfo['adminsession'] == '0' && (AREA == 'customer' || AREA == 'login') && isset($userinfo['customerid']))) + && (!isset($userinfo['deactivated']) || $userinfo['deactivated'] != '1')) + { + $userinfo['newformtoken'] = strtolower(md5(uniqid(microtime(), 1))); + $query = 'UPDATE `' . TABLE_PANEL_SESSIONS . '` SET `lastactivity`="' . time() . '", `formtoken`="' . $userinfo['newformtoken'] . '" WHERE `hash`="' . $db->escape($s) . '" AND `adminsession` = "' . $db->escape($adminsession) . '"'; + $db->query($query); + $nosession = 0; + } + else + { + $nosession = 1; + } +} +else +{ + $nosession = 1; +} + +/** + * Language Managament + */ + +$langs = array(); +$languages = array(); + +// query the whole table + +$query = 'SELECT * FROM `' . TABLE_PANEL_LANGUAGE . '` '; +$result = $db->query($query); + +// presort languages + +while($row = $db->fetch_array($result)) +{ + $langs[$row['language']][] = $row; +} + +// buildup $languages for the login screen + +foreach($langs as $key => $value) +{ + $languages[$key] = $key; +} + +if(!isset($userinfo['def_language']) + || !isset($languages[$userinfo['def_language']])) +{ + if(isset($_GET['language']) + && isset($languages[$_GET['language']])) + { + $language = $_GET['language']; + } + else + { + $language = $settings['panel']['standardlanguage']; + } +} +else +{ + $language = $userinfo['def_language']; +} + +// include every english language file we can get + +foreach($langs['English'] as $key => $value) +{ + include_once makeSecurePath($value['file']); +} + +// now include the selected language if its not english + +if($language != 'English') +{ + foreach($langs[$language] as $key => $value) + { + include_once makeSecurePath($value['file']); + } +} + +/** + * Redirects to index.php (login page) if no session exists + */ + +if($nosession == 1 + && AREA != 'login') +{ + unset($userinfo); + redirectTo('index.php'); + exit; +} + +/** + * Initialize Template Engine + */ + +$templatecache = array(); + +/** + * Logic moved out of lng-file + */ + +if(isset($userinfo['loginname']) + && $userinfo['loginname'] != '') +{ + $lng['menue']['main']['username'].= $userinfo['loginname']; + + /** + * Initialize logging + */ + + $log = FroxlorLogger::getInstanceOf($userinfo, $db, $settings); +} + +/** + * Fills variables for navigation, header and footer + */ + +if(AREA == 'admin' || AREA == 'customer') +{ + $navigation_data = loadConfigArrayDir('./lib/navigation/'); + $navigation = buildNavigation($navigation_data[AREA], $userinfo); + unset($navigation_data); +} + +eval("\$header = \"" . getTemplate('header', '1') . "\";"); +eval("\$footer = \"" . getTemplate('footer', '1') . "\";"); + +if(isset($_POST['action'])) +{ + $action = $_POST['action']; +} +elseif(isset($_GET['action'])) +{ + $action = $_GET['action']; +} +else +{ + $action = ''; +} + +if(isset($_POST['page'])) +{ + $page = $_POST['page']; +} +elseif(isset($_GET['page'])) +{ + $page = $_GET['page']; +} +else +{ + $page = ''; +} + +if($page == '') +{ + $page = 'overview'; +} + +/** + * Initialize the mailingsystem + */ + +$mail = new PHPMailer(); +$mail->From = $settings['panel']['adminmail']; + +?> diff --git a/lib/navigation/00.froxlor.main.php b/lib/navigation/00.froxlor.main.php index 7e04a9c6..7f02892c 100644 --- a/lib/navigation/00.froxlor.main.php +++ b/lib/navigation/00.froxlor.main.php @@ -1,241 +1,241 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Navigation - * @version $Id$ - */ - -return array ( - 'customer' => array ( - 'index' => array ( - 'url' => 'customer_index.php', - 'label' => $lng['menue']['main']['main'], - 'elements' => array ( - array ( - 'label' => $lng['menue']['main']['username'], - ), - array ( - 'url' => 'customer_index.php?page=change_password', - 'label' => $lng['menue']['main']['changepassword'], - ), - array ( - 'url' => 'customer_index.php?page=change_language', - 'label' => $lng['menue']['main']['changelanguage'], - ), - array ( - 'url' => 'customer_index.php?action=logout', - 'label' => $lng['login']['logout'], - ), - ), - ), - 'email' => array ( - 'url' => 'customer_email.php', - 'label' => $lng['menue']['email']['email'], - 'elements' => array ( - array ( - 'url' => 'customer_email.php?page=emails', - 'label' => $lng['menue']['email']['emails'], - 'required_resources' => 'emails', - ), - array ( - 'url' => 'customer_email.php?page=emails&action=add', - 'label' => $lng['emails']['emails_add'], - 'required_resources' => 'emails', - ), - array ( - 'url' => 'customer_autoresponder.php', - 'label' => $lng['menue']['email']['autoresponder'], - 'required_resources' => 'emails', - 'show_element' => ( getSetting('autoresponder', 'autoresponder_active') == true ), - ), - array ( - 'url' => getSetting('panel', 'webmail_url'), - 'new_window' => true, - 'label' => $lng['menue']['email']['webmail'], - 'required_resources' => 'emails_used', - 'show_element' => ( getSetting('panel', 'webmail_url') != '' ), - ), - ), - ), - 'mysql' => array ( - 'url' => 'customer_mysql.php', - 'label' => $lng['menue']['mysql']['mysql'], - 'elements' => array ( - array ( - 'url' => 'customer_mysql.php?page=mysqls', - 'label' => $lng['menue']['mysql']['databases'], - 'required_resources' => 'mysqls', - ), - array ( - 'url' => getSetting('panel', 'phpmyadmin_url'), - 'new_window' => true, - 'label' => $lng['menue']['mysql']['phpmyadmin'], - 'required_resources' => 'mysqls_used', - 'show_element' => ( getSetting('panel', 'phpmyadmin_url') != '' ), - ), - ), - ), - 'domains' => array ( - 'url' => 'customer_domains.php', - 'label' => $lng['menue']['domains']['domains'], - 'elements' => array ( - array ( - 'url' => 'customer_domains.php?page=domains', - 'label' => $lng['menue']['domains']['settings'], - ), - ), - ), - 'ftp' => array ( - 'url' => 'customer_ftp.php', - 'label' => $lng['menue']['ftp']['ftp'], - 'elements' => array ( - array ( - 'url' => 'customer_ftp.php?page=accounts', - 'label' => $lng['menue']['ftp']['accounts'], - ), - array ( - 'url' => getSetting('panel', 'webftp_url'), - 'new_window' => true, - 'label' => $lng['menue']['ftp']['webftp'], - 'show_element' => ( getSetting('panel', 'webftp_url') != '' ), - ), - ), - ), - 'extras' => array ( - 'url' => 'customer_extras.php', - 'label' => $lng['menue']['extras']['extras'], - 'elements' => array ( - array ( - 'url' => 'customer_extras.php?page=htpasswds', - 'label' => $lng['menue']['extras']['directoryprotection'], - ), - array ( - 'url' => 'customer_extras.php?page=htaccess', - 'label' => $lng['menue']['extras']['pathoptions'], - ), - ), - ), - 'traffic' => array ( - 'url' => 'customer_traffic.php', - 'label' => $lng['menue']['traffic']['traffic'], - 'elements' => array ( - array ( - 'url' => 'customer_traffic.php?page=current', - 'label' => $lng['menue']['traffic']['current'], - ), - ), - ), - ), - 'admin' => array ( - 'index' => array ( - 'url' => 'admin_index.php', - 'label' => $lng['admin']['overview'], - 'elements' => array ( - array ( - 'label' => $lng['menue']['main']['username'], - ), - array ( - 'url' => 'admin_index.php?page=change_password', - 'label' => $lng['menue']['main']['changepassword'], - ), - array ( - 'url' => 'admin_index.php?page=change_language', - 'label' => $lng['menue']['main']['changelanguage'], - ), - array ( - 'url' => 'admin_index.php?action=logout', - 'label' => $lng['login']['logout'], - ), - ), - ), - 'resources' => array ( - 'label' => $lng['admin']['resources'], - 'required_resources' => 'customers', - 'elements' => array ( - array ( - 'url' => 'admin_customers.php?page=customers', - 'label' => $lng['admin']['customers'], - 'required_resources' => 'customers', - ), - array ( - 'url' => 'admin_domains.php?page=domains', - 'label' => $lng['admin']['domains'], - 'required_resources' => 'domains', - ), - array ( - 'url' => 'admin_admins.php?page=admins', - 'label' => $lng['admin']['admins'], - 'required_resources' => 'change_serversettings', - ), - ), - ), - 'server' => array ( - 'label' => $lng['admin']['server'], - 'required_resources' => 'change_serversettings', - 'elements' => array ( - array ( - 'url' => 'admin_configfiles.php?page=configfiles', - 'label' => $lng['admin']['configfiles']['serverconfiguration'], - 'required_resources' => 'change_serversettings', - ), - array ( - 'url' => 'admin_settings.php?page=settings', - 'label' => $lng['admin']['serversettings'], - 'required_resources' => 'change_serversettings', - ), - array ( - 'url' => 'admin_ipsandports.php?page=ipsandports', - 'label' => $lng['admin']['ipsandports']['ipsandports'], - 'required_resources' => 'change_serversettings', - ), - array ( - 'url' => 'admin_settings.php?page=rebuildconfigs', - 'label' => $lng['admin']['rebuildconf'], - 'required_resources' => 'change_serversettings', - ), - array ( - 'url' => 'admin_settings.php?page=updatecounters', - 'label' => $lng['admin']['updatecounters'], - 'required_resources' => 'change_serversettings', - ), - array ( - 'url' => 'admin_phpsettings.php?page=overview', - 'label' => $lng['menue']['phpsettings']['maintitle'], - 'show_element' => ( getSetting('system', 'mod_fcgid') == true ), - ), - ), - ), - 'misc' => array ( - 'label' => $lng['admin']['misc'], - 'elements' => array ( - array ( - 'url' => 'admin_templates.php?page=email', - 'label' => $lng['admin']['templates']['email'], - ), - array ( - 'url' => 'admin_logger.php?page=log', - 'label' => $lng['menue']['logger']['logger'], - 'required_resources' => 'change_serversettings', - 'show_element' => ( getSetting('logger', 'enabled') == true ), - ), - array ( - 'url' => 'admin_message.php?page=message', - 'label' => $lng['admin']['message'], - ), - ), - ), - ), -); + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Navigation + * @version $Id$ + */ + +return array ( + 'customer' => array ( + 'index' => array ( + 'url' => 'customer_index.php', + 'label' => $lng['menue']['main']['main'], + 'elements' => array ( + array ( + 'label' => $lng['menue']['main']['username'], + ), + array ( + 'url' => 'customer_index.php?page=change_password', + 'label' => $lng['menue']['main']['changepassword'], + ), + array ( + 'url' => 'customer_index.php?page=change_language', + 'label' => $lng['menue']['main']['changelanguage'], + ), + array ( + 'url' => 'customer_index.php?action=logout', + 'label' => $lng['login']['logout'], + ), + ), + ), + 'email' => array ( + 'url' => 'customer_email.php', + 'label' => $lng['menue']['email']['email'], + 'elements' => array ( + array ( + 'url' => 'customer_email.php?page=emails', + 'label' => $lng['menue']['email']['emails'], + 'required_resources' => 'emails', + ), + array ( + 'url' => 'customer_email.php?page=emails&action=add', + 'label' => $lng['emails']['emails_add'], + 'required_resources' => 'emails', + ), + array ( + 'url' => 'customer_autoresponder.php', + 'label' => $lng['menue']['email']['autoresponder'], + 'required_resources' => 'emails', + 'show_element' => ( getSetting('autoresponder', 'autoresponder_active') == true ), + ), + array ( + 'url' => getSetting('panel', 'webmail_url'), + 'new_window' => true, + 'label' => $lng['menue']['email']['webmail'], + 'required_resources' => 'emails_used', + 'show_element' => ( getSetting('panel', 'webmail_url') != '' ), + ), + ), + ), + 'mysql' => array ( + 'url' => 'customer_mysql.php', + 'label' => $lng['menue']['mysql']['mysql'], + 'elements' => array ( + array ( + 'url' => 'customer_mysql.php?page=mysqls', + 'label' => $lng['menue']['mysql']['databases'], + 'required_resources' => 'mysqls', + ), + array ( + 'url' => getSetting('panel', 'phpmyadmin_url'), + 'new_window' => true, + 'label' => $lng['menue']['mysql']['phpmyadmin'], + 'required_resources' => 'mysqls_used', + 'show_element' => ( getSetting('panel', 'phpmyadmin_url') != '' ), + ), + ), + ), + 'domains' => array ( + 'url' => 'customer_domains.php', + 'label' => $lng['menue']['domains']['domains'], + 'elements' => array ( + array ( + 'url' => 'customer_domains.php?page=domains', + 'label' => $lng['menue']['domains']['settings'], + ), + ), + ), + 'ftp' => array ( + 'url' => 'customer_ftp.php', + 'label' => $lng['menue']['ftp']['ftp'], + 'elements' => array ( + array ( + 'url' => 'customer_ftp.php?page=accounts', + 'label' => $lng['menue']['ftp']['accounts'], + ), + array ( + 'url' => getSetting('panel', 'webftp_url'), + 'new_window' => true, + 'label' => $lng['menue']['ftp']['webftp'], + 'show_element' => ( getSetting('panel', 'webftp_url') != '' ), + ), + ), + ), + 'extras' => array ( + 'url' => 'customer_extras.php', + 'label' => $lng['menue']['extras']['extras'], + 'elements' => array ( + array ( + 'url' => 'customer_extras.php?page=htpasswds', + 'label' => $lng['menue']['extras']['directoryprotection'], + ), + array ( + 'url' => 'customer_extras.php?page=htaccess', + 'label' => $lng['menue']['extras']['pathoptions'], + ), + ), + ), + 'traffic' => array ( + 'url' => 'customer_traffic.php', + 'label' => $lng['menue']['traffic']['traffic'], + 'elements' => array ( + array ( + 'url' => 'customer_traffic.php?page=current', + 'label' => $lng['menue']['traffic']['current'], + ), + ), + ), + ), + 'admin' => array ( + 'index' => array ( + 'url' => 'admin_index.php', + 'label' => $lng['admin']['overview'], + 'elements' => array ( + array ( + 'label' => $lng['menue']['main']['username'], + ), + array ( + 'url' => 'admin_index.php?page=change_password', + 'label' => $lng['menue']['main']['changepassword'], + ), + array ( + 'url' => 'admin_index.php?page=change_language', + 'label' => $lng['menue']['main']['changelanguage'], + ), + array ( + 'url' => 'admin_index.php?action=logout', + 'label' => $lng['login']['logout'], + ), + ), + ), + 'resources' => array ( + 'label' => $lng['admin']['resources'], + 'required_resources' => 'customers', + 'elements' => array ( + array ( + 'url' => 'admin_customers.php?page=customers', + 'label' => $lng['admin']['customers'], + 'required_resources' => 'customers', + ), + array ( + 'url' => 'admin_domains.php?page=domains', + 'label' => $lng['admin']['domains'], + 'required_resources' => 'domains', + ), + array ( + 'url' => 'admin_admins.php?page=admins', + 'label' => $lng['admin']['admins'], + 'required_resources' => 'change_serversettings', + ), + ), + ), + 'server' => array ( + 'label' => $lng['admin']['server'], + 'required_resources' => 'change_serversettings', + 'elements' => array ( + array ( + 'url' => 'admin_configfiles.php?page=configfiles', + 'label' => $lng['admin']['configfiles']['serverconfiguration'], + 'required_resources' => 'change_serversettings', + ), + array ( + 'url' => 'admin_settings.php?page=settings', + 'label' => $lng['admin']['serversettings'], + 'required_resources' => 'change_serversettings', + ), + array ( + 'url' => 'admin_ipsandports.php?page=ipsandports', + 'label' => $lng['admin']['ipsandports']['ipsandports'], + 'required_resources' => 'change_serversettings', + ), + array ( + 'url' => 'admin_settings.php?page=rebuildconfigs', + 'label' => $lng['admin']['rebuildconf'], + 'required_resources' => 'change_serversettings', + ), + array ( + 'url' => 'admin_settings.php?page=updatecounters', + 'label' => $lng['admin']['updatecounters'], + 'required_resources' => 'change_serversettings', + ), + array ( + 'url' => 'admin_phpsettings.php?page=overview', + 'label' => $lng['menue']['phpsettings']['maintitle'], + 'show_element' => ( getSetting('system', 'mod_fcgid') == true ), + ), + ), + ), + 'misc' => array ( + 'label' => $lng['admin']['misc'], + 'elements' => array ( + array ( + 'url' => 'admin_templates.php?page=email', + 'label' => $lng['admin']['templates']['email'], + ), + array ( + 'url' => 'admin_logger.php?page=log', + 'label' => $lng['menue']['logger']['logger'], + 'required_resources' => 'change_serversettings', + 'show_element' => ( getSetting('logger', 'enabled') == true ), + ), + array ( + 'url' => 'admin_message.php?page=message', + 'label' => $lng['admin']['message'], + ), + ), + ), + ), +); ?> \ No newline at end of file diff --git a/lib/navigation/10.tickets.php b/lib/navigation/10.tickets.php index dd4915d8..dffdd6b3 100644 --- a/lib/navigation/10.tickets.php +++ b/lib/navigation/10.tickets.php @@ -1,55 +1,55 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Navigation - * @version $Id$ - */ - -return array ( - 'customer' => array ( - 'tickets' => array ( - 'url' => 'customer_tickets.php', - 'label' => $lng['menue']['ticket']['ticket'], - 'show_element' => ( getSetting('ticket', 'enabled') == true ), - 'elements' => array ( - array ( - 'url' => 'customer_tickets.php?page=tickets', - 'label' => $lng['menue']['ticket']['ticket'], - ), - ), - ), - ), - 'admin' => array ( - 'tickets' => array ( - 'label' => $lng['admin']['ticketsystem'], - 'show_element' => ( getSetting('ticket', 'enabled') == true ), - 'elements' => array ( - array ( - 'url' => 'admin_tickets.php?page=tickets', - 'label' => $lng['menue']['ticket']['ticket'], - ), - array ( - 'url' => 'admin_tickets.php?page=archive', - 'label' => $lng['menue']['ticket']['archive'], - ), - array ( - 'url' => 'admin_tickets.php?page=categories', - 'label' => $lng['menue']['ticket']['categories'], - ), - ), - ), - ), -); + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Navigation + * @version $Id$ + */ + +return array ( + 'customer' => array ( + 'tickets' => array ( + 'url' => 'customer_tickets.php', + 'label' => $lng['menue']['ticket']['ticket'], + 'show_element' => ( getSetting('ticket', 'enabled') == true ), + 'elements' => array ( + array ( + 'url' => 'customer_tickets.php?page=tickets', + 'label' => $lng['menue']['ticket']['ticket'], + ), + ), + ), + ), + 'admin' => array ( + 'tickets' => array ( + 'label' => $lng['admin']['ticketsystem'], + 'show_element' => ( getSetting('ticket', 'enabled') == true ), + 'elements' => array ( + array ( + 'url' => 'admin_tickets.php?page=tickets', + 'label' => $lng['menue']['ticket']['ticket'], + ), + array ( + 'url' => 'admin_tickets.php?page=archive', + 'label' => $lng['menue']['ticket']['archive'], + ), + array ( + 'url' => 'admin_tickets.php?page=categories', + 'label' => $lng['menue']['ticket']['categories'], + ), + ), + ), + ), +); ?> \ No newline at end of file diff --git a/lib/navigation/20.aps.installer.php b/lib/navigation/20.aps.installer.php index ad12ab48..d309a931 100644 --- a/lib/navigation/20.aps.installer.php +++ b/lib/navigation/20.aps.installer.php @@ -1,68 +1,68 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Navigation - * @version $Id$ - */ - -return array ( - 'customer' => array ( - 'aps' => array ( - 'label' => $lng['customer']['aps'], - 'required_resources' => 'phpenabled', - 'show_element' => ( getSetting('aps', 'aps_active') == true ), - 'elements' => array ( - array ( - 'url' => 'customer_aps.php?action=overview', - 'label' => $lng['aps']['overview'], - ), - array ( - 'url' => 'customer_aps.php?action=customerstatus', - 'label' => $lng['aps']['status'], - ), - array ( - 'url' => 'customer_aps.php?action=search', - 'label' => $lng['aps']['search'], - ), - ), - ), - ), - 'admin' => array ( - 'aps' => array ( - 'label' => $lng['admin']['aps'], - 'required_resources' => 'can_manage_aps_packages', - 'show_element' => ( getSetting('aps', 'aps_active') == true ), - 'elements' => array ( - array ( - 'url' => 'admin_aps.php?action=upload', - 'label' => $lng['aps']['upload'], - ), - array ( - 'url' => 'admin_aps.php?action=scan', - 'label' => $lng['aps']['scan'], - ), - array ( - 'url' => 'admin_aps.php?action=managepackages', - 'label' => $lng['aps']['managepackages'], - ), - array ( - 'url' => 'admin_aps.php?action=manageinstances', - 'label' => $lng['aps']['manageinstances'], - ), - ), - ), - ), -); + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Navigation + * @version $Id$ + */ + +return array ( + 'customer' => array ( + 'aps' => array ( + 'label' => $lng['customer']['aps'], + 'required_resources' => 'phpenabled', + 'show_element' => ( getSetting('aps', 'aps_active') == true ), + 'elements' => array ( + array ( + 'url' => 'customer_aps.php?action=overview', + 'label' => $lng['aps']['overview'], + ), + array ( + 'url' => 'customer_aps.php?action=customerstatus', + 'label' => $lng['aps']['status'], + ), + array ( + 'url' => 'customer_aps.php?action=search', + 'label' => $lng['aps']['search'], + ), + ), + ), + ), + 'admin' => array ( + 'aps' => array ( + 'label' => $lng['admin']['aps'], + 'required_resources' => 'can_manage_aps_packages', + 'show_element' => ( getSetting('aps', 'aps_active') == true ), + 'elements' => array ( + array ( + 'url' => 'admin_aps.php?action=upload', + 'label' => $lng['aps']['upload'], + ), + array ( + 'url' => 'admin_aps.php?action=scan', + 'label' => $lng['aps']['scan'], + ), + array ( + 'url' => 'admin_aps.php?action=managepackages', + 'label' => $lng['aps']['managepackages'], + ), + array ( + 'url' => 'admin_aps.php?action=manageinstances', + 'label' => $lng['aps']['manageinstances'], + ), + ), + ), + ), +); ?> \ No newline at end of file diff --git a/lib/tables.inc.php b/lib/tables.inc.php index 44ff12a3..c1acde75 100644 --- a/lib/tables.inc.php +++ b/lib/tables.inc.php @@ -1,74 +1,74 @@ - (2003-2009) - * @author Froxlor team (2010-) - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package System - * @version $Id$ - */ - -define('TABLE_FTP_GROUPS', 'ftp_groups'); -define('TABLE_FTP_USERS', 'ftp_users'); -define('TABLE_MAIL_USERS', 'mail_users'); -define('TABLE_MAIL_VIRTUAL', 'mail_virtual'); -define('TABLE_PANEL_ADMINS', 'panel_admins'); -define('TABLE_PANEL_CUSTOMERS', 'panel_customers'); -define('TABLE_PANEL_DATABASES', 'panel_databases'); -define('TABLE_PANEL_DOMAINS', 'panel_domains'); -define('TABLE_PANEL_HTACCESS', 'panel_htaccess'); -define('TABLE_PANEL_HTPASSWDS', 'panel_htpasswds'); -define('TABLE_PANEL_SESSIONS', 'panel_sessions'); -define('TABLE_PANEL_SETTINGS', 'panel_settings'); -define('TABLE_PANEL_TASKS', 'panel_tasks'); -define('TABLE_PANEL_TEMPLATES', 'panel_templates'); -define('TABLE_PANEL_TRAFFIC', 'panel_traffic'); -define('TABLE_PANEL_TRAFFIC_ADMINS', 'panel_traffic_admins'); -define('TABLE_PANEL_DISKSPACE', 'panel_diskspace'); -define('TABLE_PANEL_DISKSPACE_ADMINS', 'panel_diskspace_admins'); -define('TABLE_PANEL_LANGUAGE', 'panel_languages'); -define('TABLE_PANEL_CRONSCRIPT', 'panel_cronscript'); -define('TABLE_PANEL_IPSANDPORTS', 'panel_ipsandports'); -define('TABLE_PANEL_TICKETS', 'panel_tickets'); -define('TABLE_PANEL_TICKET_CATS', 'panel_ticket_categories'); -define('TABLE_PANEL_LOG', 'panel_syslog'); -define('TABLE_MAIL_AUTORESPONDER', 'mail_autoresponder'); -define('TABLE_PANEL_PHPCONFIGS', 'panel_phpconfigs'); -define('TABLE_APS_PACKAGES', 'aps_packages'); -define('TABLE_APS_INSTANCES', 'aps_instances'); -define('TABLE_APS_SETTINGS', 'aps_settings'); -define('TABLE_APS_TASKS', 'aps_tasks'); -define('TABLE_APS_TEMP_SETTINGS', 'aps_temp_settings'); -define('TABLE_PANEL_CRONRUNS', 'cronjobs_run'); - -// APS constants - -define('TASK_INSTALL', 1); -define('TASK_REMOVE', 2); -define('TASK_RECONFIGURE', 3); -define('TASK_UPGRADE', 4); -define('TASK_SYSTEM_UPDATE', 5); -define('TASK_SYSTEM_DOWNLOAD', 6); -define('INSTANCE_INSTALL', 1); -define('INSTANCE_TASK_ACTIVE', 2); -define('INSTANCE_SUCCESS', 3); -define('INSTANCE_ERROR', 4); -define('INSTANCE_UNINSTALL', 5); -define('PACKAGE_LOCKED', 1); -define('PACKAGE_ENABLED', 2); - -// VERSION INFO - -$version = '0.9-r4'; -$dbversion = '2'; - -?> + (2003-2009) + * @author Froxlor team (2010-) + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package System + * @version $Id$ + */ + +define('TABLE_FTP_GROUPS', 'ftp_groups'); +define('TABLE_FTP_USERS', 'ftp_users'); +define('TABLE_MAIL_USERS', 'mail_users'); +define('TABLE_MAIL_VIRTUAL', 'mail_virtual'); +define('TABLE_PANEL_ADMINS', 'panel_admins'); +define('TABLE_PANEL_CUSTOMERS', 'panel_customers'); +define('TABLE_PANEL_DATABASES', 'panel_databases'); +define('TABLE_PANEL_DOMAINS', 'panel_domains'); +define('TABLE_PANEL_HTACCESS', 'panel_htaccess'); +define('TABLE_PANEL_HTPASSWDS', 'panel_htpasswds'); +define('TABLE_PANEL_SESSIONS', 'panel_sessions'); +define('TABLE_PANEL_SETTINGS', 'panel_settings'); +define('TABLE_PANEL_TASKS', 'panel_tasks'); +define('TABLE_PANEL_TEMPLATES', 'panel_templates'); +define('TABLE_PANEL_TRAFFIC', 'panel_traffic'); +define('TABLE_PANEL_TRAFFIC_ADMINS', 'panel_traffic_admins'); +define('TABLE_PANEL_DISKSPACE', 'panel_diskspace'); +define('TABLE_PANEL_DISKSPACE_ADMINS', 'panel_diskspace_admins'); +define('TABLE_PANEL_LANGUAGE', 'panel_languages'); +define('TABLE_PANEL_CRONSCRIPT', 'panel_cronscript'); +define('TABLE_PANEL_IPSANDPORTS', 'panel_ipsandports'); +define('TABLE_PANEL_TICKETS', 'panel_tickets'); +define('TABLE_PANEL_TICKET_CATS', 'panel_ticket_categories'); +define('TABLE_PANEL_LOG', 'panel_syslog'); +define('TABLE_MAIL_AUTORESPONDER', 'mail_autoresponder'); +define('TABLE_PANEL_PHPCONFIGS', 'panel_phpconfigs'); +define('TABLE_APS_PACKAGES', 'aps_packages'); +define('TABLE_APS_INSTANCES', 'aps_instances'); +define('TABLE_APS_SETTINGS', 'aps_settings'); +define('TABLE_APS_TASKS', 'aps_tasks'); +define('TABLE_APS_TEMP_SETTINGS', 'aps_temp_settings'); +define('TABLE_PANEL_CRONRUNS', 'cronjobs_run'); + +// APS constants + +define('TASK_INSTALL', 1); +define('TASK_REMOVE', 2); +define('TASK_RECONFIGURE', 3); +define('TASK_UPGRADE', 4); +define('TASK_SYSTEM_UPDATE', 5); +define('TASK_SYSTEM_DOWNLOAD', 6); +define('INSTANCE_INSTALL', 1); +define('INSTANCE_TASK_ACTIVE', 2); +define('INSTANCE_SUCCESS', 3); +define('INSTANCE_ERROR', 4); +define('INSTANCE_UNINSTALL', 5); +define('PACKAGE_LOCKED', 1); +define('PACKAGE_ENABLED', 2); + +// VERSION INFO + +$version = '0.9-r4'; +$dbversion = '2'; + +?> diff --git a/lng/catalan.lng.php b/lng/catalan.lng.php index e2163a7a..050a30ca 100644 --- a/lng/catalan.lng.php +++ b/lng/catalan.lng.php @@ -1,396 +1,396 @@ -El sistema necessitarà una mica de temps per aplicar els nous canvis un cop efectuats.'; -$lng['domains']['domainsettings'] = 'Opcions de domini'; -$lng['domains']['domainname'] = 'Nom del domini'; -$lng['domains']['subdomain_add'] = 'Crear subdomini'; -$lng['domains']['subdomain_edit'] = 'Editar (sub)domini'; -$lng['domains']['wildcarddomain'] = 'Crear un domini comodí? (wildcarddomain)'; -$lng['domains']['aliasdomain'] = 'Sobrenom per a aquest domini'; -$lng['domains']['noaliasdomain'] = 'No hi ha sobrenom del domini'; - -/** - * eMails - */ - -$lng['emails']['description'] = 'Des d\'aquí pots modificar les adreces de correu, crear-ne de noves o esborrar les que hi ha.
    Pensa que després de crear la adreça de correu, has de crear o bé un COMPTE o bé un REDIRECCIONADOR, sense una de les dues coses la adreça és inútil.

    Per baixar-te el correu en el teu client de correu (Outlook, Thunderbird, ...) utilitza la següent informació: (La informació en cursiva ha de ser substituida per la que correspongui al compte de correu en questió!)
    Servidor de correu entrant o sortint: el teu domini
    Nom dusuari: (usuari@exemple.com) (ATENCIÓ: És imprescindible posar la adreça sencera en el camp de l\'usuari, en cas contrari no funcionaria)
    Clau: la clau del compte de correu'; -$lng['emails']['emailaddress'] = 'adreces d\'email'; -$lng['emails']['emails_add'] = 'Crear adreça d\'email'; -$lng['emails']['emails_edit'] = 'Editar adreces d\'email'; -$lng['emails']['catchall'] = 'Compte comodí'; -$lng['emails']['iscatchall'] = 'Definir els Comptes comodí?'; -$lng['emails']['account'] = 'Compte'; -$lng['emails']['account_add'] = 'Crear compte'; -$lng['emails']['account_delete'] = 'Esborrar compte'; -$lng['emails']['from'] = 'Origen'; -$lng['emails']['to'] = 'Destí'; -$lng['emails']['forwarders'] = 'Redireccions'; -$lng['emails']['forwarder_add'] = 'Crear redirecció'; - -/** - * FTP - */ - -$lng['ftp']['description'] = 'Aquí pots crear els teus comptes FTP.
    Els canis s\'aplicaran a l\'instant.'; -$lng['ftp']['account_add'] = 'Crear compte'; - -/** - * MySQL - */ - -$lng['mysql']['description'] = 'Pendent de traduir
    Here you can create and change your MySQL-Databases.
    The changes are made instantly and the database can be used immediately.
    At the menu on the left side you find the tool phpMyAdmin with which you can easily administer your database.

    To use your databases in your own php-scripts use the following settings: (The data in italics have to be changed into the equivalents you typed in!)
    Hostname:
    Username: Databasename
    Password: the password you\'ve chosen
    Database: Databasename'; -$lng['mysql']['databasename'] = 'nom d\'usuari/base de dades'; -$lng['mysql']['databasedescription'] = 'descripció de la base de dades'; -$lng['mysql']['database_create'] = 'Crear base de dades'; - -/** - * Extras - */ - -$lng['extras']['description'] = 'Aquí pots controlar alguns extres, com protecció de directoris.
    El sistema requereix una mica de temps en aplicar els canvis un cop fets.'; -$lng['extras']['directoryprotection_add'] = 'Afegir protecció de directori'; -$lng['extras']['view_directory'] = 'mostra el contingut del directori'; -$lng['extras']['pathoptions_add'] = 'afegir opcions de la ruta (PATH)'; -$lng['extras']['directory_browsing'] = 'navegar pel contingut del directori'; -$lng['extras']['pathoptions_edit'] = 'editar opcions de la ruta (PATH)'; -$lng['extras']['error404path'] = '404'; -$lng['extras']['error403path'] = '403'; -$lng['extras']['error500path'] = '500'; -$lng['extras']['error401path'] = '401'; -$lng['extras']['errordocument404path'] = 'Ruta a ErrorDocument 404'; -$lng['extras']['errordocument403path'] = 'Ruta a ErrorDocument 403'; -$lng['extras']['errordocument500path'] = 'Ruta a ErrorDocument 500'; -$lng['extras']['errordocument401path'] = 'Ruta a ErrorDocument 401'; - -/** - * Errors - */ - -$lng['error']['error'] = 'Error'; -$lng['error']['directorymustexist'] = 'El directori que has escrit no existeix. Si us plau, crea\'l per FTP.'; -$lng['error']['filemustexist'] = 'El fitxer ha d\'existir.'; -$lng['error']['allresourcesused'] = 'Ja has gastat tots els teus recursos!'; -$lng['error']['domains_cantdeletemaindomain'] = 'No pots esborrar aquest domini perquè està sent usat en una adreça d\'email.'; -$lng['error']['domains_canteditdomain'] = 'No pots editar aquests dominis. Han estat bloquejats per l\'administrador'; -$lng['error']['domains_cantdeletedomainwithemail'] = 'No pots esborrar aquest domini perquè està sent usat per una direcció de correu. Has d\'esborrar abans la direcció de correu'; -$lng['error']['firstdeleteallsubdomains'] = 'No pots esborrar tots els subdominis si no tens un domini comodí (Wildcarddomain).'; -$lng['error']['youhavealreadyacatchallforthisdomain'] = 'Ja tens un compte comodí'; -$lng['error']['ftp_cantdeletemainaccount'] = 'No pots esborrar el compte principal FTP'; -$lng['error']['login'] = 'El nom d\'usuari o la Clau són incorrectes. Sisplau torna-ho a intentar!'; -$lng['error']['login_blocked'] = 'Aquest compte ha estat suspès a causa de massa intents fraudulents d\'identificació.
    Si us plau, torna a provar-ho en ' . $settings['login']['deactivatetime'] . ' segons.'; -$lng['error']['notallreqfieldsorerrors'] = 'No has omplert tots els camps o algun camp és incorrecte.'; -$lng['error']['oldpasswordnotcorrect'] = 'La clau antiga no és la correcta.'; -$lng['error']['youcantallocatemorethanyouhave'] = 'No pots ocupar més espai del que tens assignat!'; -$lng['error']['mustbeurl'] = 'No has escrit una URL correcte'; -$lng['error']['invalidpath'] = 'No has escrit una URL vàlida (potser hi ha algun problema en el llistat de directoris)'; -$lng['error']['stringisempty'] = 'Camp de text buit'; -$lng['error']['stringiswrong'] = 'Contingut erroni en el camp de text'; -$lng['error']['myloginname'] = '\'' . $lng['login']['username'] . '\''; -$lng['error']['mypassword'] = '\'' . $lng['login']['password'] . '\''; -$lng['error']['oldpassword'] = '\'' . $lng['changepassword']['old_password'] . '\''; -$lng['error']['newpassword'] = '\'' . $lng['changepassword']['new_password'] . '\''; -$lng['error']['newpasswordconfirm'] = '\'' . $lng['changepassword']['new_password_confirm'] . '\''; -$lng['error']['newpasswordconfirmerror'] = 'La nova clau no coincideix amb la confirmació'; -$lng['error']['myname'] = '\'' . $lng['customer']['name'] . '\''; -$lng['error']['myfirstname'] = '\'' . $lng['customer']['firstname'] . '\''; -$lng['error']['emailadd'] = '\'' . $lng['customer']['email'] . '\''; -$lng['error']['mydomain'] = '\'Domini\''; -$lng['error']['mydocumentroot'] = '\'Arrel dels documents\''; -$lng['error']['loginnameexists'] = 'Ja existeix l\'usuari %s'; -$lng['error']['emailiswrong'] = 'L\'adreça de correu %s conté caràcters invàlids o està incompleta'; -$lng['error']['loginnameiswrong'] = 'El nom d\'usuari %s conté no és vàlid'; -$lng['error']['userpathcombinationdupe'] = 'La combinació d\'usuari i Ruta escollida ja existeix'; -$lng['error']['patherror'] = 'Error! Has d\'introduir una ruta'; -$lng['error']['errordocpathdupe'] = 'Aquesta opció per la ruta %s ja existeix'; -$lng['error']['adduserfirst'] = 'Abans has de crear un client'; -$lng['error']['domainalreadyexists'] = 'El domini %s ja està assignat a un client'; -$lng['error']['nolanguageselect'] = 'Has de sel·leccionar un idioma.'; -$lng['error']['nosubjectcreate'] = 'Has de definir l\'assumpte per aquesta plantilla de correu.'; -$lng['error']['nomailbodycreate'] = 'Has de definir el cos del missatge per aquesta plantilla de correu.'; -$lng['error']['templatenotfound'] = 'No s\'ha trobat la plantilla.'; -$lng['error']['alltemplatesdefined'] = 'No pots definir noves plantilles. Tots els idiomes estan suportats.'; -$lng['error']['wwwnotallowed'] = 'www no és un subdomini permès.'; -$lng['error']['subdomainiswrong'] = 'El subdomini %s conté caràcters invàlids.'; -$lng['error']['domaincantbeempty'] = 'El domini no pot ser un camp buit.'; -$lng['error']['domainexistalready'] = 'Ja existeix el domini %s.'; -$lng['error']['domainisaliasorothercustomer'] = 'El sobrenom de domini escollit ja existeix, o pertany a un altre client.'; -$lng['error']['emailexistalready'] = 'Ja existeix l\'adreça %s.'; -$lng['error']['maindomainnonexist'] = 'El domini %s no existeix.'; -$lng['error']['destinationnonexist'] = 'Si us plau crea la redirecció a \'Destí\'.'; -$lng['error']['destinationalreadyexistasmail'] = 'La redirecció a %s ja existeix com un compte de correu.'; -$lng['error']['destinationalreadyexist'] = 'Ja hi ha una redirecció a %s .'; -$lng['error']['destinationiswrong'] = 'La redirecció %s conté caràcters invàlids o és incompleta.'; -$lng['error']['domainname'] = $lng['domains']['domainname']; - -/** - * Questions - */ - -$lng['question']['question'] = 'Preguntes de seguretat..'; -$lng['question']['admin_customer_reallydelete'] = 'Estas segur que vols esborrar el client %s? Aquesta acció és irreversible!'; -$lng['question']['admin_domain_reallydelete'] = 'Segur que vols esborrar el domini %s?'; -$lng['question']['admin_domain_reallydisablesecuritysetting'] = 'Segur que vols desactivar aquesta opció de seguretat? (OpenBasedir and/or SafeMode)?'; -$lng['question']['admin_admin_reallydelete'] = 'Segur que vols esborrar l\'administrador %s? Tots els seus clients aniran a parar a l\'administrador principal.'; -$lng['question']['admin_template_reallydelete'] = 'Segur que vols esborrar aquesta plantilla \'%s\'?'; -$lng['question']['domains_reallydelete'] = 'Segur que vols esborrar el domini %s?'; -$lng['question']['email_reallydelete'] = 'Segur que vols esborrar la adreça %s?'; -$lng['question']['email_reallydelete_account'] = 'Segur que vols esborrar el compte %s?'; -$lng['question']['email_reallydelete_forwarder'] = 'Segur que vols esborrar la redirecció %s?'; -$lng['question']['extras_reallydelete'] = 'Segur que vols esborrar la direcció de directori de %s?'; -$lng['question']['extras_reallydelete_pathoptions'] = 'Segur que vols eliminar les opcions de ruta (PATH) de %s?'; -$lng['question']['ftp_reallydelete'] = 'Segur que vols esborrar el compte FTP %s?'; -$lng['question']['mysql_reallydelete'] = 'Segur que vols eliminar la base de dades %s? Aquesta acció és irreversible!'; -$lng['question']['admin_configs_reallyrebuild'] = 'Segur que vols regenerar les configuracions dels servidors apache i bind?'; - -/** - * Mails - */ - -$lng['mails']['pop_success']['mailbody'] = 'Hola,\n\nel teu compte d\'email $destination\ns\'ha creat satisfactoriament.\n\nAixň és un missatge creat automàticament, si us plau uno responguis. Gràcies.'; -$lng['mails']['pop_success']['subject'] = 'Compte de correu creat satisfactoriament'; -$lng['mails']['createcustomer']['mailbody'] = 'Hola {FIRSTNAME} {NAME},\n\n aquí te la seva informació:\n\nNom d\'usuari: $loginname\nClau: $password\n\n Gràcies per tot, disfruta del teu compte'; -$lng['mails']['createcustomer']['subject'] = 'Informació del compte'; - -/** - * Admin - */ - -$lng['admin']['overview'] = 'Resum'; -$lng['admin']['ressourcedetails'] = 'Recursos utilitzats'; -$lng['admin']['systemdetails'] = 'Detalls del sistema'; -$lng['admin']['froxlordetails'] = 'Detalls de Froxlor'; -$lng['admin']['installedversion'] = 'Versió'; -$lng['admin']['latestversion'] = 'Última versió'; -$lng['admin']['lookfornewversion']['clickhere'] = 'cerca a internet'; -$lng['admin']['lookfornewversion']['error'] = 'Error carregant'; -$lng['admin']['resources'] = 'Personal'; -$lng['admin']['customer'] = 'Client'; -$lng['admin']['customers'] = 'Clients'; -$lng['admin']['customer_add'] = 'Crear client'; -$lng['admin']['customer_edit'] = 'Editar client'; -$lng['admin']['domains'] = 'Dominis'; -$lng['admin']['domain_add'] = 'Crear domini'; -$lng['admin']['domain_edit'] = 'Editar domini'; -$lng['admin']['subdomainforemail'] = 'Subdomini com a subdomini de correu'; -$lng['admin']['admin'] = 'Administrador'; -$lng['admin']['admins'] = 'Administradors'; -$lng['admin']['admin_add'] = 'Crear administrador'; -$lng['admin']['admin_edit'] = 'Editar administrador'; -$lng['admin']['customers_see_all'] = 'Pot veure tots els clients?'; -$lng['admin']['domains_see_all'] = 'Pot veure tots els dominis?'; -$lng['admin']['change_serversettings'] = 'Pot canviar configuracions del servidor?'; -$lng['admin']['server'] = 'Servidor'; -$lng['admin']['serversettings'] = 'Opcions del servidor'; -$lng['admin']['rebuildconf'] = 'Regenerar fitxers de configuració'; -$lng['admin']['stdsubdomain'] = 'Subdomini estàndar'; -$lng['admin']['stdsubdomain_add'] = 'Crear subdomini estàndar'; -$lng['admin']['deactivated'] = 'Desactivat'; -$lng['admin']['deactivated_user'] = 'Desactivar Usuari'; -$lng['admin']['sendpassword'] = 'Enviar Clau'; -$lng['admin']['ownvhostsettings'] = 'Opcions dels vhost propis'; -$lng['admin']['configfiles']['serverconfiguration'] = 'Configuracions del servidor'; -$lng['admin']['configfiles']['files'] = 'Fitxers de configuració: Si us plau, canvia els continguts fitxers o crea\'ls
    amb el cotingut que surt a continuació si no existeixen.
    Nota: El Mysql-password no ha estat modificat per questions de seguretat.
    Canvia "MYSQL_PASSWORD" per la clau que desitgi'; -$lng['admin']['configfiles']['commands'] = 'Comandaments: Executa\'ls en una consola.'; -$lng['admin']['configfiles']['restart'] = 'Restart: Executa els següents comandaments en la consola per carregar la nova configuració.'; -$lng['admin']['templates']['templates'] = 'Plantilles'; -$lng['admin']['templates']['template_add'] = 'Afegir plantilla'; -$lng['admin']['templates']['template_edit'] = 'Editar plantilla'; -$lng['admin']['templates']['action'] = 'Acció'; -$lng['admin']['templates']['email'] = 'E-Mail'; -$lng['admin']['templates']['subject'] = 'Assumpte'; -$lng['admin']['templates']['mailbody'] = 'Cos del missatge'; -$lng['admin']['templates']['createcustomer'] = 'Missatge de benvinguda a nous clients'; -$lng['admin']['templates']['pop_success'] = 'Missatge de benvinguda a les noves comptes de correu'; -$lng['admin']['templates']['template_replace_vars'] = 'Variables per substituir a la plantilla:'; -$lng['admin']['templates']['FIRSTNAME'] = 'Substituit pel cognom del client.'; -$lng['admin']['templates']['NAME'] = 'Substituit pel nom del client.'; -$lng['admin']['templates']['USERNAME'] = 'Reemplaçat pel nom d\'usuari'; -$lng['admin']['templates']['PASSWORD'] = 'Reemplaçat per la contrassenya.'; -$lng['admin']['templates']['EMAIL'] = 'Reemplaçat per l\'adreça de correu'; - -/** - * Serversettings - */ - -$lng['serversettings']['session_timeout']['title'] = 'Sessió Timeout'; -$lng['serversettings']['session_timeout']['description'] = 'Quant triga un usuari en esdevenir inactiu (segons)?'; -$lng['serversettings']['accountprefix']['title'] = 'Prefix del client'; -$lng['serversettings']['accountprefix']['description'] = 'Quin prefix han de tenir els clients?'; -$lng['serversettings']['mysqlprefix']['title'] = 'Prefix SQL'; -$lng['serversettings']['mysqlprefix']['description'] = 'Quin prefix han de tenir els comptes SQL?'; -$lng['serversettings']['ftpprefix']['title'] = 'Prefix FTP'; -$lng['serversettings']['ftpprefix']['description'] = 'Quin prefix han de tenir els comptes FTP?'; -$lng['serversettings']['documentroot_prefix']['title'] = 'Directori principal'; -$lng['serversettings']['documentroot_prefix']['description'] = 'On es desen els documents?'; -$lng['serversettings']['logfiles_directory']['title'] = 'Directori de logs'; -$lng['serversettings']['logfiles_directory']['description'] = 'On es desen els fitxers de registre (log)?'; -$lng['serversettings']['ipaddress']['title'] = 'Adreça IP'; -$lng['serversettings']['ipaddress']['description'] = 'Quina és la adreça IP del servidor?'; -$lng['serversettings']['hostname']['title'] = 'Hostname'; -$lng['serversettings']['hostname']['description'] = 'Quin és el hostname del servidor?'; -$lng['serversettings']['apachereload_command']['title'] = 'Comanda de reinici d\'Apache'; -$lng['serversettings']['apachereload_command']['description'] = 'Quina és la comanda per reiniciar Apache?'; -$lng['serversettings']['bindconf_directory']['title'] = 'Directori de configuració de Bind'; -$lng['serversettings']['bindconf_directory']['description'] = 'On són els fitxers de configuració de Bind?'; -$lng['serversettings']['bindreload_command']['title'] = 'Comanda de reinici de Bind'; -$lng['serversettings']['bindreload_command']['description'] = 'Quina és la comanda per reiniciar Bind?'; -$lng['serversettings']['binddefaultzone']['title'] = 'Zona predeterminada de Bind'; -$lng['serversettings']['binddefaultzone']['description'] = 'Quina és la zona per defecte de Bind?'; -$lng['serversettings']['vmail_uid']['title'] = 'UID de les adreces de correu'; -$lng['serversettings']['vmail_uid']['description'] = 'Quina User ID han de tenir les adreces de correu?'; -$lng['serversettings']['vmail_gid']['title'] = 'GID de les adreces de correu'; -$lng['serversettings']['vmail_gid']['description'] = 'Quina Group ID han de tenir les adreces de correu?'; -$lng['serversettings']['vmail_homedir']['title'] = 'Directori dels correus'; -$lng['serversettings']['vmail_homedir']['description'] = 'Quin és el directori on es desaran tots els missatges de correu?'; -$lng['serversettings']['adminmail']['title'] = 'Remitent'; -$lng['serversettings']['adminmail']['description'] = 'Quin és el remitent dels missatges del Froxlor?'; -$lng['serversettings']['phpmyadmin_url']['title'] = 'Adreça de phpMyAdmin'; -$lng['serversettings']['phpmyadmin_url']['description'] = 'Quina és la URL del phpMyAdmin? (ha de començar amb http://)'; -$lng['serversettings']['webmail_url']['title'] = 'Adreça de WebMail'; -$lng['serversettings']['webmail_url']['description'] = 'Quina és la URL del WebMail? (ha de començar amb http://)'; -$lng['serversettings']['webftp_url']['title'] = 'Adreça de WebFTP'; -$lng['serversettings']['webftp_url']['description'] = 'Quina és la URL del WebFTP? (ha de començar amb http://)'; -$lng['serversettings']['language']['description'] = 'Quin és l\'idioma per defecte?'; -$lng['serversettings']['maxloginattempts']['title'] = 'Intents de logueix màxims'; -$lng['serversettings']['maxloginattempts']['description'] = 'Número de vegades que pots intentar identificar-te abans de que la compta es desactivi.'; -$lng['serversettings']['deactivatetime']['title'] = 'Temps de desactivacio'; -$lng['serversettings']['deactivatetime']['description'] = 'Segons que la compta estarà inactiva quan s\'ha produit un seguit d\'intents frustrats d\'identificació.'; -$lng['serversettings']['pathedit']['title'] = 'Tipus d\'entrada de ruta'; -$lng['serversettings']['pathedit']['description'] = 'Vols que la ruta sigui escrita en una casella de text o en un menú desplegable?'; - -/** - * ADDED BETWEEN 1.2.12 and 1.2.13 - */ - -$lng['admin']['cronlastrun'] = 'Última volta'; -$lng['serversettings']['paging']['title'] = 'Entrades per pàgina'; -$lng['serversettings']['paging']['description'] = 'Entrades per pàgina? (0 = sense paginar)'; -$lng['error']['ipstillhasdomains'] = 'La combinació IP/Port que vols esborrar té dominis assignats. Si us plau, reassigna els dominis a una altra IP/Port abans d\'esborrar.'; -$lng['error']['cantdeletedefaultip'] = 'No pots esborrar la combinació IP/Port per defecte del resseller, si us plau, assigna una nova combinació IP/Port al resseller abans d\'esborrar.'; -$lng['error']['cantdeletesystemip'] = 'No pots esborrar la IP del sistema, abans crea una nova combinació IP/Port pel sistema.'; -$lng['error']['myipaddress'] = '\'IP\''; -$lng['error']['myport'] = '\'Port\''; -$lng['error']['myipdefault'] = 'Has de sel·leccionar una combinació IP/Port per defecte.'; -$lng['error']['myipnotdouble'] = 'Aquesta combinació IP/Port ja existeix.'; -$lng['question']['admin_ip_reallydelete'] = 'Segur que vols esborrar la IP %s?'; -$lng['admin']['ipsandports']['ipsandports'] = 'IPs i Ports'; -$lng['admin']['ipsandports']['add'] = 'Afegir IP/Port'; -$lng['admin']['ipsandports']['edit'] = 'Editar IP/Port'; -$lng['admin']['ipsandports']['ipandport'] = 'IP/Port'; -$lng['admin']['ipsandports']['ip'] = 'IP'; -$lng['admin']['ipsandports']['port'] = 'Port'; - -?> +El sistema necessitarà una mica de temps per aplicar els nous canvis un cop efectuats.'; +$lng['domains']['domainsettings'] = 'Opcions de domini'; +$lng['domains']['domainname'] = 'Nom del domini'; +$lng['domains']['subdomain_add'] = 'Crear subdomini'; +$lng['domains']['subdomain_edit'] = 'Editar (sub)domini'; +$lng['domains']['wildcarddomain'] = 'Crear un domini comodí? (wildcarddomain)'; +$lng['domains']['aliasdomain'] = 'Sobrenom per a aquest domini'; +$lng['domains']['noaliasdomain'] = 'No hi ha sobrenom del domini'; + +/** + * eMails + */ + +$lng['emails']['description'] = 'Des d\'aquí pots modificar les adreces de correu, crear-ne de noves o esborrar les que hi ha.
    Pensa que després de crear la adreça de correu, has de crear o bé un COMPTE o bé un REDIRECCIONADOR, sense una de les dues coses la adreça és inútil.

    Per baixar-te el correu en el teu client de correu (Outlook, Thunderbird, ...) utilitza la següent informació: (La informació en cursiva ha de ser substituida per la que correspongui al compte de correu en questió!)
    Servidor de correu entrant o sortint: el teu domini
    Nom dusuari: (usuari@exemple.com) (ATENCIÓ: És imprescindible posar la adreça sencera en el camp de l\'usuari, en cas contrari no funcionaria)
    Clau: la clau del compte de correu'; +$lng['emails']['emailaddress'] = 'adreces d\'email'; +$lng['emails']['emails_add'] = 'Crear adreça d\'email'; +$lng['emails']['emails_edit'] = 'Editar adreces d\'email'; +$lng['emails']['catchall'] = 'Compte comodí'; +$lng['emails']['iscatchall'] = 'Definir els Comptes comodí?'; +$lng['emails']['account'] = 'Compte'; +$lng['emails']['account_add'] = 'Crear compte'; +$lng['emails']['account_delete'] = 'Esborrar compte'; +$lng['emails']['from'] = 'Origen'; +$lng['emails']['to'] = 'Destí'; +$lng['emails']['forwarders'] = 'Redireccions'; +$lng['emails']['forwarder_add'] = 'Crear redirecció'; + +/** + * FTP + */ + +$lng['ftp']['description'] = 'Aquí pots crear els teus comptes FTP.
    Els canis s\'aplicaran a l\'instant.'; +$lng['ftp']['account_add'] = 'Crear compte'; + +/** + * MySQL + */ + +$lng['mysql']['description'] = 'Pendent de traduir
    Here you can create and change your MySQL-Databases.
    The changes are made instantly and the database can be used immediately.
    At the menu on the left side you find the tool phpMyAdmin with which you can easily administer your database.

    To use your databases in your own php-scripts use the following settings: (The data in italics have to be changed into the equivalents you typed in!)
    Hostname:
    Username: Databasename
    Password: the password you\'ve chosen
    Database: Databasename'; +$lng['mysql']['databasename'] = 'nom d\'usuari/base de dades'; +$lng['mysql']['databasedescription'] = 'descripció de la base de dades'; +$lng['mysql']['database_create'] = 'Crear base de dades'; + +/** + * Extras + */ + +$lng['extras']['description'] = 'Aquí pots controlar alguns extres, com protecció de directoris.
    El sistema requereix una mica de temps en aplicar els canvis un cop fets.'; +$lng['extras']['directoryprotection_add'] = 'Afegir protecció de directori'; +$lng['extras']['view_directory'] = 'mostra el contingut del directori'; +$lng['extras']['pathoptions_add'] = 'afegir opcions de la ruta (PATH)'; +$lng['extras']['directory_browsing'] = 'navegar pel contingut del directori'; +$lng['extras']['pathoptions_edit'] = 'editar opcions de la ruta (PATH)'; +$lng['extras']['error404path'] = '404'; +$lng['extras']['error403path'] = '403'; +$lng['extras']['error500path'] = '500'; +$lng['extras']['error401path'] = '401'; +$lng['extras']['errordocument404path'] = 'Ruta a ErrorDocument 404'; +$lng['extras']['errordocument403path'] = 'Ruta a ErrorDocument 403'; +$lng['extras']['errordocument500path'] = 'Ruta a ErrorDocument 500'; +$lng['extras']['errordocument401path'] = 'Ruta a ErrorDocument 401'; + +/** + * Errors + */ + +$lng['error']['error'] = 'Error'; +$lng['error']['directorymustexist'] = 'El directori que has escrit no existeix. Si us plau, crea\'l per FTP.'; +$lng['error']['filemustexist'] = 'El fitxer ha d\'existir.'; +$lng['error']['allresourcesused'] = 'Ja has gastat tots els teus recursos!'; +$lng['error']['domains_cantdeletemaindomain'] = 'No pots esborrar aquest domini perquè està sent usat en una adreça d\'email.'; +$lng['error']['domains_canteditdomain'] = 'No pots editar aquests dominis. Han estat bloquejats per l\'administrador'; +$lng['error']['domains_cantdeletedomainwithemail'] = 'No pots esborrar aquest domini perquè està sent usat per una direcció de correu. Has d\'esborrar abans la direcció de correu'; +$lng['error']['firstdeleteallsubdomains'] = 'No pots esborrar tots els subdominis si no tens un domini comodí (Wildcarddomain).'; +$lng['error']['youhavealreadyacatchallforthisdomain'] = 'Ja tens un compte comodí'; +$lng['error']['ftp_cantdeletemainaccount'] = 'No pots esborrar el compte principal FTP'; +$lng['error']['login'] = 'El nom d\'usuari o la Clau són incorrectes. Sisplau torna-ho a intentar!'; +$lng['error']['login_blocked'] = 'Aquest compte ha estat suspès a causa de massa intents fraudulents d\'identificació.
    Si us plau, torna a provar-ho en ' . $settings['login']['deactivatetime'] . ' segons.'; +$lng['error']['notallreqfieldsorerrors'] = 'No has omplert tots els camps o algun camp és incorrecte.'; +$lng['error']['oldpasswordnotcorrect'] = 'La clau antiga no és la correcta.'; +$lng['error']['youcantallocatemorethanyouhave'] = 'No pots ocupar més espai del que tens assignat!'; +$lng['error']['mustbeurl'] = 'No has escrit una URL correcte'; +$lng['error']['invalidpath'] = 'No has escrit una URL vàlida (potser hi ha algun problema en el llistat de directoris)'; +$lng['error']['stringisempty'] = 'Camp de text buit'; +$lng['error']['stringiswrong'] = 'Contingut erroni en el camp de text'; +$lng['error']['myloginname'] = '\'' . $lng['login']['username'] . '\''; +$lng['error']['mypassword'] = '\'' . $lng['login']['password'] . '\''; +$lng['error']['oldpassword'] = '\'' . $lng['changepassword']['old_password'] . '\''; +$lng['error']['newpassword'] = '\'' . $lng['changepassword']['new_password'] . '\''; +$lng['error']['newpasswordconfirm'] = '\'' . $lng['changepassword']['new_password_confirm'] . '\''; +$lng['error']['newpasswordconfirmerror'] = 'La nova clau no coincideix amb la confirmació'; +$lng['error']['myname'] = '\'' . $lng['customer']['name'] . '\''; +$lng['error']['myfirstname'] = '\'' . $lng['customer']['firstname'] . '\''; +$lng['error']['emailadd'] = '\'' . $lng['customer']['email'] . '\''; +$lng['error']['mydomain'] = '\'Domini\''; +$lng['error']['mydocumentroot'] = '\'Arrel dels documents\''; +$lng['error']['loginnameexists'] = 'Ja existeix l\'usuari %s'; +$lng['error']['emailiswrong'] = 'L\'adreça de correu %s conté caràcters invàlids o està incompleta'; +$lng['error']['loginnameiswrong'] = 'El nom d\'usuari %s conté no és vàlid'; +$lng['error']['userpathcombinationdupe'] = 'La combinació d\'usuari i Ruta escollida ja existeix'; +$lng['error']['patherror'] = 'Error! Has d\'introduir una ruta'; +$lng['error']['errordocpathdupe'] = 'Aquesta opció per la ruta %s ja existeix'; +$lng['error']['adduserfirst'] = 'Abans has de crear un client'; +$lng['error']['domainalreadyexists'] = 'El domini %s ja està assignat a un client'; +$lng['error']['nolanguageselect'] = 'Has de sel·leccionar un idioma.'; +$lng['error']['nosubjectcreate'] = 'Has de definir l\'assumpte per aquesta plantilla de correu.'; +$lng['error']['nomailbodycreate'] = 'Has de definir el cos del missatge per aquesta plantilla de correu.'; +$lng['error']['templatenotfound'] = 'No s\'ha trobat la plantilla.'; +$lng['error']['alltemplatesdefined'] = 'No pots definir noves plantilles. Tots els idiomes estan suportats.'; +$lng['error']['wwwnotallowed'] = 'www no és un subdomini permès.'; +$lng['error']['subdomainiswrong'] = 'El subdomini %s conté caràcters invàlids.'; +$lng['error']['domaincantbeempty'] = 'El domini no pot ser un camp buit.'; +$lng['error']['domainexistalready'] = 'Ja existeix el domini %s.'; +$lng['error']['domainisaliasorothercustomer'] = 'El sobrenom de domini escollit ja existeix, o pertany a un altre client.'; +$lng['error']['emailexistalready'] = 'Ja existeix l\'adreça %s.'; +$lng['error']['maindomainnonexist'] = 'El domini %s no existeix.'; +$lng['error']['destinationnonexist'] = 'Si us plau crea la redirecció a \'Destí\'.'; +$lng['error']['destinationalreadyexistasmail'] = 'La redirecció a %s ja existeix com un compte de correu.'; +$lng['error']['destinationalreadyexist'] = 'Ja hi ha una redirecció a %s .'; +$lng['error']['destinationiswrong'] = 'La redirecció %s conté caràcters invàlids o és incompleta.'; +$lng['error']['domainname'] = $lng['domains']['domainname']; + +/** + * Questions + */ + +$lng['question']['question'] = 'Preguntes de seguretat..'; +$lng['question']['admin_customer_reallydelete'] = 'Estas segur que vols esborrar el client %s? Aquesta acció és irreversible!'; +$lng['question']['admin_domain_reallydelete'] = 'Segur que vols esborrar el domini %s?'; +$lng['question']['admin_domain_reallydisablesecuritysetting'] = 'Segur que vols desactivar aquesta opció de seguretat? (OpenBasedir and/or SafeMode)?'; +$lng['question']['admin_admin_reallydelete'] = 'Segur que vols esborrar l\'administrador %s? Tots els seus clients aniran a parar a l\'administrador principal.'; +$lng['question']['admin_template_reallydelete'] = 'Segur que vols esborrar aquesta plantilla \'%s\'?'; +$lng['question']['domains_reallydelete'] = 'Segur que vols esborrar el domini %s?'; +$lng['question']['email_reallydelete'] = 'Segur que vols esborrar la adreça %s?'; +$lng['question']['email_reallydelete_account'] = 'Segur que vols esborrar el compte %s?'; +$lng['question']['email_reallydelete_forwarder'] = 'Segur que vols esborrar la redirecció %s?'; +$lng['question']['extras_reallydelete'] = 'Segur que vols esborrar la direcció de directori de %s?'; +$lng['question']['extras_reallydelete_pathoptions'] = 'Segur que vols eliminar les opcions de ruta (PATH) de %s?'; +$lng['question']['ftp_reallydelete'] = 'Segur que vols esborrar el compte FTP %s?'; +$lng['question']['mysql_reallydelete'] = 'Segur que vols eliminar la base de dades %s? Aquesta acció és irreversible!'; +$lng['question']['admin_configs_reallyrebuild'] = 'Segur que vols regenerar les configuracions dels servidors apache i bind?'; + +/** + * Mails + */ + +$lng['mails']['pop_success']['mailbody'] = 'Hola,\n\nel teu compte d\'email $destination\ns\'ha creat satisfactoriament.\n\nAixň és un missatge creat automàticament, si us plau uno responguis. Gràcies.'; +$lng['mails']['pop_success']['subject'] = 'Compte de correu creat satisfactoriament'; +$lng['mails']['createcustomer']['mailbody'] = 'Hola {FIRSTNAME} {NAME},\n\n aquí te la seva informació:\n\nNom d\'usuari: $loginname\nClau: $password\n\n Gràcies per tot, disfruta del teu compte'; +$lng['mails']['createcustomer']['subject'] = 'Informació del compte'; + +/** + * Admin + */ + +$lng['admin']['overview'] = 'Resum'; +$lng['admin']['ressourcedetails'] = 'Recursos utilitzats'; +$lng['admin']['systemdetails'] = 'Detalls del sistema'; +$lng['admin']['froxlordetails'] = 'Detalls de Froxlor'; +$lng['admin']['installedversion'] = 'Versió'; +$lng['admin']['latestversion'] = 'Última versió'; +$lng['admin']['lookfornewversion']['clickhere'] = 'cerca a internet'; +$lng['admin']['lookfornewversion']['error'] = 'Error carregant'; +$lng['admin']['resources'] = 'Personal'; +$lng['admin']['customer'] = 'Client'; +$lng['admin']['customers'] = 'Clients'; +$lng['admin']['customer_add'] = 'Crear client'; +$lng['admin']['customer_edit'] = 'Editar client'; +$lng['admin']['domains'] = 'Dominis'; +$lng['admin']['domain_add'] = 'Crear domini'; +$lng['admin']['domain_edit'] = 'Editar domini'; +$lng['admin']['subdomainforemail'] = 'Subdomini com a subdomini de correu'; +$lng['admin']['admin'] = 'Administrador'; +$lng['admin']['admins'] = 'Administradors'; +$lng['admin']['admin_add'] = 'Crear administrador'; +$lng['admin']['admin_edit'] = 'Editar administrador'; +$lng['admin']['customers_see_all'] = 'Pot veure tots els clients?'; +$lng['admin']['domains_see_all'] = 'Pot veure tots els dominis?'; +$lng['admin']['change_serversettings'] = 'Pot canviar configuracions del servidor?'; +$lng['admin']['server'] = 'Servidor'; +$lng['admin']['serversettings'] = 'Opcions del servidor'; +$lng['admin']['rebuildconf'] = 'Regenerar fitxers de configuració'; +$lng['admin']['stdsubdomain'] = 'Subdomini estàndar'; +$lng['admin']['stdsubdomain_add'] = 'Crear subdomini estàndar'; +$lng['admin']['deactivated'] = 'Desactivat'; +$lng['admin']['deactivated_user'] = 'Desactivar Usuari'; +$lng['admin']['sendpassword'] = 'Enviar Clau'; +$lng['admin']['ownvhostsettings'] = 'Opcions dels vhost propis'; +$lng['admin']['configfiles']['serverconfiguration'] = 'Configuracions del servidor'; +$lng['admin']['configfiles']['files'] = 'Fitxers de configuració: Si us plau, canvia els continguts fitxers o crea\'ls
    amb el cotingut que surt a continuació si no existeixen.
    Nota: El Mysql-password no ha estat modificat per questions de seguretat.
    Canvia "MYSQL_PASSWORD" per la clau que desitgi'; +$lng['admin']['configfiles']['commands'] = 'Comandaments: Executa\'ls en una consola.'; +$lng['admin']['configfiles']['restart'] = 'Restart: Executa els següents comandaments en la consola per carregar la nova configuració.'; +$lng['admin']['templates']['templates'] = 'Plantilles'; +$lng['admin']['templates']['template_add'] = 'Afegir plantilla'; +$lng['admin']['templates']['template_edit'] = 'Editar plantilla'; +$lng['admin']['templates']['action'] = 'Acció'; +$lng['admin']['templates']['email'] = 'E-Mail'; +$lng['admin']['templates']['subject'] = 'Assumpte'; +$lng['admin']['templates']['mailbody'] = 'Cos del missatge'; +$lng['admin']['templates']['createcustomer'] = 'Missatge de benvinguda a nous clients'; +$lng['admin']['templates']['pop_success'] = 'Missatge de benvinguda a les noves comptes de correu'; +$lng['admin']['templates']['template_replace_vars'] = 'Variables per substituir a la plantilla:'; +$lng['admin']['templates']['FIRSTNAME'] = 'Substituit pel cognom del client.'; +$lng['admin']['templates']['NAME'] = 'Substituit pel nom del client.'; +$lng['admin']['templates']['USERNAME'] = 'Reemplaçat pel nom d\'usuari'; +$lng['admin']['templates']['PASSWORD'] = 'Reemplaçat per la contrassenya.'; +$lng['admin']['templates']['EMAIL'] = 'Reemplaçat per l\'adreça de correu'; + +/** + * Serversettings + */ + +$lng['serversettings']['session_timeout']['title'] = 'Sessió Timeout'; +$lng['serversettings']['session_timeout']['description'] = 'Quant triga un usuari en esdevenir inactiu (segons)?'; +$lng['serversettings']['accountprefix']['title'] = 'Prefix del client'; +$lng['serversettings']['accountprefix']['description'] = 'Quin prefix han de tenir els clients?'; +$lng['serversettings']['mysqlprefix']['title'] = 'Prefix SQL'; +$lng['serversettings']['mysqlprefix']['description'] = 'Quin prefix han de tenir els comptes SQL?'; +$lng['serversettings']['ftpprefix']['title'] = 'Prefix FTP'; +$lng['serversettings']['ftpprefix']['description'] = 'Quin prefix han de tenir els comptes FTP?'; +$lng['serversettings']['documentroot_prefix']['title'] = 'Directori principal'; +$lng['serversettings']['documentroot_prefix']['description'] = 'On es desen els documents?'; +$lng['serversettings']['logfiles_directory']['title'] = 'Directori de logs'; +$lng['serversettings']['logfiles_directory']['description'] = 'On es desen els fitxers de registre (log)?'; +$lng['serversettings']['ipaddress']['title'] = 'Adreça IP'; +$lng['serversettings']['ipaddress']['description'] = 'Quina és la adreça IP del servidor?'; +$lng['serversettings']['hostname']['title'] = 'Hostname'; +$lng['serversettings']['hostname']['description'] = 'Quin és el hostname del servidor?'; +$lng['serversettings']['apachereload_command']['title'] = 'Comanda de reinici d\'Apache'; +$lng['serversettings']['apachereload_command']['description'] = 'Quina és la comanda per reiniciar Apache?'; +$lng['serversettings']['bindconf_directory']['title'] = 'Directori de configuració de Bind'; +$lng['serversettings']['bindconf_directory']['description'] = 'On són els fitxers de configuració de Bind?'; +$lng['serversettings']['bindreload_command']['title'] = 'Comanda de reinici de Bind'; +$lng['serversettings']['bindreload_command']['description'] = 'Quina és la comanda per reiniciar Bind?'; +$lng['serversettings']['binddefaultzone']['title'] = 'Zona predeterminada de Bind'; +$lng['serversettings']['binddefaultzone']['description'] = 'Quina és la zona per defecte de Bind?'; +$lng['serversettings']['vmail_uid']['title'] = 'UID de les adreces de correu'; +$lng['serversettings']['vmail_uid']['description'] = 'Quina User ID han de tenir les adreces de correu?'; +$lng['serversettings']['vmail_gid']['title'] = 'GID de les adreces de correu'; +$lng['serversettings']['vmail_gid']['description'] = 'Quina Group ID han de tenir les adreces de correu?'; +$lng['serversettings']['vmail_homedir']['title'] = 'Directori dels correus'; +$lng['serversettings']['vmail_homedir']['description'] = 'Quin és el directori on es desaran tots els missatges de correu?'; +$lng['serversettings']['adminmail']['title'] = 'Remitent'; +$lng['serversettings']['adminmail']['description'] = 'Quin és el remitent dels missatges del Froxlor?'; +$lng['serversettings']['phpmyadmin_url']['title'] = 'Adreça de phpMyAdmin'; +$lng['serversettings']['phpmyadmin_url']['description'] = 'Quina és la URL del phpMyAdmin? (ha de començar amb http://)'; +$lng['serversettings']['webmail_url']['title'] = 'Adreça de WebMail'; +$lng['serversettings']['webmail_url']['description'] = 'Quina és la URL del WebMail? (ha de començar amb http://)'; +$lng['serversettings']['webftp_url']['title'] = 'Adreça de WebFTP'; +$lng['serversettings']['webftp_url']['description'] = 'Quina és la URL del WebFTP? (ha de començar amb http://)'; +$lng['serversettings']['language']['description'] = 'Quin és l\'idioma per defecte?'; +$lng['serversettings']['maxloginattempts']['title'] = 'Intents de logueix màxims'; +$lng['serversettings']['maxloginattempts']['description'] = 'Número de vegades que pots intentar identificar-te abans de que la compta es desactivi.'; +$lng['serversettings']['deactivatetime']['title'] = 'Temps de desactivacio'; +$lng['serversettings']['deactivatetime']['description'] = 'Segons que la compta estarà inactiva quan s\'ha produit un seguit d\'intents frustrats d\'identificació.'; +$lng['serversettings']['pathedit']['title'] = 'Tipus d\'entrada de ruta'; +$lng['serversettings']['pathedit']['description'] = 'Vols que la ruta sigui escrita en una casella de text o en un menú desplegable?'; + +/** + * ADDED BETWEEN 1.2.12 and 1.2.13 + */ + +$lng['admin']['cronlastrun'] = 'Última volta'; +$lng['serversettings']['paging']['title'] = 'Entrades per pàgina'; +$lng['serversettings']['paging']['description'] = 'Entrades per pàgina? (0 = sense paginar)'; +$lng['error']['ipstillhasdomains'] = 'La combinació IP/Port que vols esborrar té dominis assignats. Si us plau, reassigna els dominis a una altra IP/Port abans d\'esborrar.'; +$lng['error']['cantdeletedefaultip'] = 'No pots esborrar la combinació IP/Port per defecte del resseller, si us plau, assigna una nova combinació IP/Port al resseller abans d\'esborrar.'; +$lng['error']['cantdeletesystemip'] = 'No pots esborrar la IP del sistema, abans crea una nova combinació IP/Port pel sistema.'; +$lng['error']['myipaddress'] = '\'IP\''; +$lng['error']['myport'] = '\'Port\''; +$lng['error']['myipdefault'] = 'Has de sel·leccionar una combinació IP/Port per defecte.'; +$lng['error']['myipnotdouble'] = 'Aquesta combinació IP/Port ja existeix.'; +$lng['question']['admin_ip_reallydelete'] = 'Segur que vols esborrar la IP %s?'; +$lng['admin']['ipsandports']['ipsandports'] = 'IPs i Ports'; +$lng['admin']['ipsandports']['add'] = 'Afegir IP/Port'; +$lng['admin']['ipsandports']['edit'] = 'Editar IP/Port'; +$lng['admin']['ipsandports']['ipandport'] = 'IP/Port'; +$lng['admin']['ipsandports']['ip'] = 'IP'; +$lng['admin']['ipsandports']['port'] = 'Port'; + +?> diff --git a/lng/danish.lng.php b/lng/danish.lng.php index 58e969dc..3e102fdf 100644 --- a/lng/danish.lng.php +++ b/lng/danish.lng.php @@ -1,453 +1,453 @@ -Det tager et stykke tid for ændringer at blive opdateret i systemet.'; -$lng['domains']['domainsettings'] = 'Domæne indstillinger'; -$lng['domains']['domainname'] = 'Domæne navn'; -$lng['domains']['subdomain_add'] = 'Opræt suddomæne'; -$lng['domains']['subdomain_edit'] = 'Editer (sub)domæne'; -$lng['domains']['wildcarddomain'] = 'Opret som wildcarddomæne?'; -$lng['domains']['aliasdomain'] = 'Domæne alias'; -$lng['domains']['noaliasdomain'] = 'Intet domæne alias'; - -/** - * eMails - */ - -$lng['emails']['description'] = 'Her kan du oprette og ændre eMail adresser og kontoer.
    eMail modtages af de adresser du opretter. For at kunne hente eMail skal du oprette en konto til adressen, dette gøres ved at vælge "opret konto" efter du har oprettet eMail adressen.
    Dit email program skal konfigureres som følger: (Teksk i italisk skrift skal erstattes med de data du taster ind)
    Hostname: Domænenavn
    Bruger: Konto navn / eMail adresse
    Kodeord: kodeordet du har valgt'; -$lng['emails']['emailaddress'] = 'eMail-adresse'; -$lng['emails']['emails_add'] = 'Opret eMail-adresse'; -$lng['emails']['emails_edit'] = 'Editer eMail-adresse'; -$lng['emails']['catchall'] = 'Fang-Alt'; -$lng['emails']['iscatchall'] = 'Brug som "Fang-Alt" adresse?'; -$lng['emails']['account'] = 'Konto'; -$lng['emails']['account_add'] = 'Opret konto'; -$lng['emails']['account_delete'] = 'Slet konto'; -$lng['emails']['from'] = 'Kilde'; -$lng['emails']['to'] = 'Til'; -$lng['emails']['forwarders'] = 'Videresendere'; -$lng['emails']['forwarder_add'] = 'Opret videresender'; - -/** - * FTP - */ - -$lng['ftp']['description'] = 'Her kan du oprette og ændre dine FTP kontoer.
    ændringer bliver gennemført øjeblikeligt, og kontoerne kan straks tages i brug.'; -$lng['ftp']['account_add'] = 'Opret konto'; - -/** - * MySQL - */ - -$lng['mysql']['databasename'] = 'bruger/database navn'; -$lng['mysql']['databasedescription'] = 'database beskrivelse'; -$lng['mysql']['database_create'] = 'Opret database'; - -/** - * Extras - */ - -$lng['extras']['description'] = 'Her kan du udføre ekstra indstillinger, for eksempel kodeords beskyttelse af mapper.
    Det tager et stykke tid for ændringer at blive opdateret i systemet.'; -$lng['extras']['directoryprotection_add'] = 'Tilføj mappe beskyttelse'; -$lng['extras']['view_directory'] = 'vis mappe indhold'; -$lng['extras']['pathoptions_add'] = 'tilføj regler for sti'; -$lng['extras']['directory_browsing'] = 'vis mappe indhold?'; -$lng['extras']['pathoptions_edit'] = 'ændre regler for sti'; -$lng['extras']['error404path'] = '404'; -$lng['extras']['error403path'] = '403'; -$lng['extras']['error500path'] = '500'; -$lng['extras']['error401path'] = '401'; -$lng['extras']['errordocument404path'] = 'URL til ErrorDocument 404'; -$lng['extras']['errordocument403path'] = 'URL til ErrorDocument 403'; -$lng['extras']['errordocument500path'] = 'URL til ErrorDocument 500'; -$lng['extras']['errordocument401path'] = 'URL til ErrorDocument 401'; - -/** - * Errors - */ - -$lng['error']['error'] = 'Fejl'; -$lng['error']['directorymustexist'] = 'Mappen %s eksisterer ikke. Du skal oprette den via din FTP-klient.'; -$lng['error']['filemustexist'] = 'Filen %s skal være oprettet.'; -$lng['error']['allresourcesused'] = 'Du har brugt dine tilladte ressourcer.'; -$lng['error']['domains_cantdeletemaindomain'] = 'Du kan ikke slette et eMail-domæne.'; -$lng['error']['domains_canteditdomain'] = 'Du kan ikke lave ændringer i dette domæne, da det er blevet låst af administratoren.'; -$lng['error']['domains_cantdeletedomainwithemail'] = 'Du kan ikke slette et domæne med tilknyttede eMail-adresser. Slet alle email adresser først.'; -$lng['error']['firstdeleteallsubdomains'] = 'Du skal først slette alle sub-domæner for du kan oprette et wildcarddomæne.'; -$lng['error']['youhavealreadyacatchallforthisdomain'] = 'Du har allerede valgt en Fang-Alt adresse for dette domæne.'; -$lng['error']['ftp_cantdeletemainaccount'] = 'Du kan ikke slette din primære FTP konto.'; -$lng['error']['login'] = 'Den indtastede bruger/kode er ikke korrekt. Forsøg venligst igen.'; -$lng['error']['login_blocked'] = 'Denne konto er blevet midlertidigt lukket grundet for mange fejlagtige logind forsøg.
    Forsøg venligst igen om ' . $settings['login']['deactivatetime'] . ' sekunder.'; -$lng['error']['notallreqfieldsorerrors'] = 'Alle krævede felter er ikke udfyldt, eller der er fejl i en eller flere af udfyldningerne.'; -$lng['error']['oldpasswordnotcorrect'] = 'Det gamle kodeord er ikke indtastet korrekt.'; -$lng['error']['youcantallocatemorethanyouhave'] = 'Du kan ikke tildele flere ressourcer end du er blevet bevilliget.'; -$lng['error']['mustbeurl'] = 'Din indtastning er ikke en gyldig URL (f.eks. http://eksempel.com/fejl404.htm)'; -$lng['error']['invalidpath'] = 'Du har valgt en ikke gyldig url (måske et problem med mappe list?)'; -$lng['error']['stringisempty'] = 'Manglende intasting i feltet'; -$lng['error']['stringiswrong'] = 'Forkert indtastning i feltet'; -$lng['error']['myloginname'] = '\'' . $lng['login']['username'] . '\''; -$lng['error']['mypassword'] = '\'' . $lng['login']['password'] . '\''; -$lng['error']['oldpassword'] = '\'' . $lng['changepassword']['old_password'] . '\''; -$lng['error']['newpassword'] = '\'' . $lng['changepassword']['new_password'] . '\''; -$lng['error']['newpasswordconfirm'] = '\'' . $lng['changepassword']['new_password_confirm'] . '\''; -$lng['error']['newpasswordconfirmerror'] = 'Det nye kodeord og kontrol indtastning stemmer ikke overens'; -$lng['error']['myname'] = '\'' . $lng['customer']['name'] . '\''; -$lng['error']['myfirstname'] = '\'' . $lng['customer']['firstname'] . '\''; -$lng['error']['emailadd'] = '\'' . $lng['customer']['email'] . '\''; -$lng['error']['mydomain'] = '\'Domæne\''; -$lng['error']['mydocumentroot'] = '\'Mapperod\''; -$lng['error']['loginnameexists'] = 'Brugernavnet %s eksisterer allerede'; -$lng['error']['emailiswrong'] = 'eMail-Adressen %s indeholder ugyldige tegn eller er ikke komplet'; -$lng['error']['loginnameiswrong'] = 'Brugernavnet %s indeholder ugyldige tegn'; -$lng['error']['userpathcombinationdupe'] = 'Kombinationen af brugernavn og sti findes allerede.'; -$lng['error']['patherror'] = 'Fejl! Sti kan ikke være tom'; -$lng['error']['errordocpathdupe'] = 'Indstillinger for stien %s eksisterer allerede'; -$lng['error']['adduserfirst'] = 'Opret venligst en kunde først'; -$lng['error']['domainalreadyexists'] = 'Domænet %s er allerede delligeret til en kunde'; -$lng['error']['nolanguageselect'] = 'Ingen sprog er valgt.'; -$lng['error']['nosubjectcreate'] = 'Du skal angive en overskrift for denne eMail skabelon.'; -$lng['error']['nomailbodycreate'] = 'Du skal skrive et indhold til denne eMail skabelon.'; -$lng['error']['templatenotfound'] = 'Skabelon blev ikke fundet.'; -$lng['error']['alltemplatesdefined'] = 'Du kan ikke oprette flere skabeloner da alle sprog allerede er understøttet.'; -$lng['error']['wwwnotallowed'] = 'www er ikke tilladt som sub-domæne.'; -$lng['error']['subdomainiswrong'] = 'Sub-domænet %s indeholder ugyldige tegn.'; -$lng['error']['domaincantbeempty'] = 'The domain-name can not be empty.'; -$lng['error']['domainexistalready'] = 'Domænet %s eksisterer allerede.'; -$lng['error']['domainisaliasorothercustomer'] = 'Det valgte alias-domæne er enten selv et alias domæne, eller tilhører en anden kunde.'; -$lng['error']['emailexistalready'] = 'eMail-Adressen %s eksisterer allerede.'; -$lng['error']['maindomainnonexist'] = 'Hoved-domænet %s eksisterer ikke.'; -$lng['error']['destinationnonexist'] = 'Opret venligst videresenderen i feltet.'; -$lng['error']['destinationalreadyexistasmail'] = 'Videresenderen til %s eksisterer allerede som en aktiv eMail-adresse.'; -$lng['error']['destinationalreadyexist'] = 'Der er allerede angivet en videresender til %s .'; -$lng['error']['destinationiswrong'] = 'Videresenderen %s indeholder ugyldige tegn eller er ikke komplet.'; -$lng['error']['domainname'] = $lng['domains']['domainname']; - -/** - * Questions - */ - -$lng['question']['question'] = 'Sikkerhedsspørgsmål'; -$lng['question']['admin_customer_reallydelete'] = 'Er du sikker på du vil slette kunden %s? Dette kan ikke fortrydes!'; -$lng['question']['admin_domain_reallydelete'] = 'Er du sikker på du vil slette domænet %s?'; -$lng['question']['admin_domain_reallydisablesecuritysetting'] = 'Er du sikker på du vil deaktivere disse sikkerheds indstillinger (OpenBasedir og/eller SafeMode)?'; -$lng['question']['admin_admin_reallydelete'] = 'Er du sikker på du vil slette administrator %s? Alle kunder og domæner som hører hertil vil blive allokeret til øverste adminstartor.'; -$lng['question']['admin_template_reallydelete'] = 'Er du sikker på du vil slette skabelonen \'%s*\'?'; -$lng['question']['domains_reallydelete'] = 'Er du sikker på du vil slette domænet %s?'; -$lng['question']['email_reallydelete'] = 'Er du sikker på du vil slette eMail-adressen %s?'; -$lng['question']['email_reallydelete_account'] = 'Er du sikker på du vil slette eMail-account fra %s?'; -$lng['question']['email_reallydelete_forwarder'] = 'Er du sikker på du vil slette videresenderen %s?'; -$lng['question']['extras_reallydelete'] = 'Er du sikker på du vil slette mappe beskyttelse for %s?'; -$lng['question']['extras_reallydelete_pathoptions'] = 'Er du sikker på du vil slette regler for stien %s?'; -$lng['question']['ftp_reallydelete'] = 'Er du sikker på du vil slette FTP kontoen %s?'; -$lng['question']['mysql_reallydelete'] = 'Er du sikker på du vil slette databasen %s? Dette kan ikke fortrydes!'; -$lng['question']['admin_configs_reallyrebuild'] = 'Er du sikker på du vil genbygge dine apache og bind konfigurations filer?'; - -/** - * Mails - */ - -$lng['mails']['pop_success']['mailbody'] = 'Hej,\n\ndin eMail konto {EMAIL}\ner blevet oprettet.\n\nDette er en automatisk genereret\neMail, svar er ikke nødvendig!\n\nHilsen, Froxlor-Teamet'; -$lng['mails']['pop_success']['subject'] = 'eMail konto er blevet oprettet'; -$lng['mails']['createcustomer']['mailbody'] = 'Hej {FIRSTNAME} {NAME},\n\ndette er information til din konto:\n\nBruger: {USERNAME}\nKodeord: {PASSWORD}\n\nHilsen, Froxlor-Teamet'; -$lng['mails']['createcustomer']['subject'] = 'Konto information'; - -/** - * Admin - */ - -$lng['admin']['overview'] = 'Oversigt'; -$lng['admin']['ressourcedetails'] = 'Brugte ressourcer'; -$lng['admin']['systemdetails'] = 'System Detaljer'; -$lng['admin']['froxlordetails'] = 'Froxlor Detaljer'; -$lng['admin']['installedversion'] = 'Installeret Version'; -$lng['admin']['latestversion'] = 'Seneste Version'; -$lng['admin']['lookfornewversion']['clickhere'] = 'søg via webservice'; -$lng['admin']['lookfornewversion']['error'] = 'Fejl under læsning'; -$lng['admin']['resources'] = 'Ressourcer'; -$lng['admin']['customer'] = 'Kunde'; -$lng['admin']['customers'] = 'Kunder'; -$lng['admin']['customer_add'] = 'Opret kunde'; -$lng['admin']['customer_edit'] = 'Editer kunde'; -$lng['admin']['domains'] = 'Domæner'; -$lng['admin']['domain_add'] = 'Opret domæne'; -$lng['admin']['domain_edit'] = 'Editer domæne'; -$lng['admin']['subdomainforemail'] = 'Subdomæner som eMaildomæner'; -$lng['admin']['admin'] = 'Admin'; -$lng['admin']['admins'] = 'Admins'; -$lng['admin']['admin_add'] = 'Opret administrator'; -$lng['admin']['admin_edit'] = 'Editer administrator'; -$lng['admin']['customers_see_all'] = 'Kan se alle kunder?'; -$lng['admin']['domains_see_all'] = 'Kan se alle domæner?'; -$lng['admin']['change_serversettings'] = 'Kan ændre server indstillinger?'; -$lng['admin']['server'] = 'Server'; -$lng['admin']['serversettings'] = 'Indstillinger'; -$lng['admin']['rebuildconf'] = 'Genbyg konfigurations filer'; -$lng['admin']['stdsubdomain'] = 'Standart subdomæne'; -$lng['admin']['stdsubdomain_add'] = 'Opret standart subdomæne'; -$lng['admin']['deactivated'] = 'Deaktiveret'; -$lng['admin']['deactivated_user'] = 'Deaktiver Bruger'; -$lng['admin']['sendpassword'] = 'Send kodeord'; -$lng['admin']['ownvhostsettings'] = 'Egne vHost-indstillinger'; -$lng['admin']['configfiles']['serverconfiguration'] = 'Konfiguration'; -$lng['admin']['configfiles']['files'] = 'Konfigurationsfiler: Lav venligst ændringerne i de følgende filer eller opret
    dem med dette indhold hvis de ikke eksisterer.
    Bemærk: MySQL Kodeordet er ikke blevet ændre af sikkerhedsgrunde.
    Udskift venligst "MYSQL_PASSWORD" manuelt. Hvis du har glemt dit MySQL kodeord
    er det at finde i "lib/userdata.inc.php".'; -$lng['admin']['configfiles']['commands'] = 'Kommandoer: Udfør disse kommandoer i shell\'et.'; -$lng['admin']['configfiles']['restart'] = 'Genstart: Udfør disse kommandoer i shell\'et for at aktivere den nye konfiguration.'; -$lng['admin']['templates']['templates'] = 'Skabeloner'; -$lng['admin']['templates']['template_add'] = 'Tilføj skabelon'; -$lng['admin']['templates']['template_edit'] = 'Editer skabelon'; -$lng['admin']['templates']['action'] = 'Handling'; -$lng['admin']['templates']['email'] = 'E-Mail'; -$lng['admin']['templates']['subject'] = 'Emne'; -$lng['admin']['templates']['mailbody'] = 'Mail indhold'; -$lng['admin']['templates']['createcustomer'] = 'Velkomst mail for nye kunder'; -$lng['admin']['templates']['pop_success'] = 'Velkomst mail for nye email kontoer'; -$lng['admin']['templates']['template_replace_vars'] = 'Variabler der udskiftes i skabelonen:'; -$lng['admin']['templates']['FIRSTNAME'] = 'Udskiftes med kundes navn.'; -$lng['admin']['templates']['NAME'] = 'Udskiftes med kundes efternavn.'; -$lng['admin']['templates']['USERNAME'] = 'Udskiftes med kundes konto brugernavn.'; -$lng['admin']['templates']['PASSWORD'] = 'Udskiftes med kundes konto kodeord.'; -$lng['admin']['templates']['EMAIL'] = 'Udskiftes med adressen af POP3/IMAP kontoen.'; - -/** - * Serversettings - */ - -$lng['serversettings']['session_timeout']['title'] = 'Sæssion Timeout'; -$lng['serversettings']['session_timeout']['description'] = 'Hvor længe skal en bruger være inaktiv før sæssionen bliver ugyldig (i sekunder)?'; -$lng['serversettings']['accountprefix']['title'] = 'Kundepræfiks'; -$lng['serversettings']['accountprefix']['description'] = 'Hvilket præfiks skal kunde kontoer have?'; -$lng['serversettings']['mysqlprefix']['title'] = 'SQL Præfiks'; -$lng['serversettings']['mysqlprefix']['description'] = 'Hvilket præfiks skal MySQL databaser have?'; -$lng['serversettings']['ftpprefix']['title'] = 'FTP Præfiks'; -$lng['serversettings']['ftpprefix']['description'] = 'Hvilket præfiks skal FTP kontoer have?'; -$lng['serversettings']['documentroot_prefix']['title'] = 'Dokument mappe'; -$lng['serversettings']['documentroot_prefix']['description'] = 'Hvor skal data opbevares?'; -$lng['serversettings']['logfiles_directory']['title'] = 'Logfilmappe'; -$lng['serversettings']['logfiles_directory']['description'] = 'Hvor skal alle logfilerne opbevares?'; -$lng['serversettings']['ipaddress']['title'] = 'IP-Adresse'; -$lng['serversettings']['ipaddress']['description'] = 'Hvad er denne servers IP-adresse?'; -$lng['serversettings']['hostname']['title'] = 'Hostname'; -$lng['serversettings']['hostname']['description'] = 'Hvad er denne servers hostname?'; -$lng['serversettings']['apachereload_command']['title'] = 'Apache genstart kommando'; -$lng['serversettings']['apachereload_command']['description'] = 'Hvad er kommandoen til at genstarte apache?'; -$lng['serversettings']['bindconf_directory']['title'] = 'Bind konfigurations mappe'; -$lng['serversettings']['bindconf_directory']['description'] = 'Hvor er bind\'s konfigurationsfiler?'; -$lng['serversettings']['bindreload_command']['title'] = 'Bind genstart kommando'; -$lng['serversettings']['bindreload_command']['description'] = 'Hvad er kommandoen til at genstarte bind?'; -$lng['serversettings']['binddefaultzone']['title'] = 'Bind default zone'; -$lng['serversettings']['binddefaultzone']['description'] = 'Hvad er navnet på default zone?'; -$lng['serversettings']['vmail_uid']['title'] = 'Mails-Uid'; -$lng['serversettings']['vmail_uid']['description'] = 'Hvilket UserID skal mails bruge?'; -$lng['serversettings']['vmail_gid']['title'] = 'Mails-Gid'; -$lng['serversettings']['vmail_gid']['description'] = 'Hvilket GroupID skal mails bruge?'; -$lng['serversettings']['vmail_homedir']['title'] = 'Mails-Homedir'; -$lng['serversettings']['vmail_homedir']['description'] = 'Hvor skal alle mails opbevares?'; -$lng['serversettings']['adminmail']['title'] = 'Afsender'; -$lng['serversettings']['adminmail']['description'] = 'Hvilken adresse skal eMails sendt fra kontrol panelet være?'; -$lng['serversettings']['phpmyadmin_url']['title'] = 'phpMyAdmin URL'; -$lng['serversettings']['phpmyadmin_url']['description'] = 'Hvad er URL\'en til phpMyAdmin? (skal starte med http://)'; -$lng['serversettings']['webmail_url']['title'] = 'WebMail URL'; -$lng['serversettings']['webmail_url']['description'] = 'Hvad er URL\'en til WebMail? (skal starte med http://)'; -$lng['serversettings']['webftp_url']['title'] = 'WebFTP URL'; -$lng['serversettings']['webftp_url']['description'] = 'Hvad er URL\'en til WebFTP? (skal starte med http://)'; -$lng['serversettings']['language']['description'] = 'Hvilket sprog er standart på din server?'; -$lng['serversettings']['maxloginattempts']['title'] = 'Maksimum log ind forsøg'; -$lng['serversettings']['maxloginattempts']['description'] = 'Maksimum log ind forsøg hvorefter kontoen bliver spærret.'; -$lng['serversettings']['deactivatetime']['title'] = 'Spærrings periode'; -$lng['serversettings']['deactivatetime']['description'] = 'Tid i sekunder en konto skal forblive spærret.'; -$lng['serversettings']['pathedit']['title'] = 'Sti valg type'; -$lng['serversettings']['pathedit']['description'] = 'SKal sti vælges via et indtastningfelt eller en dropdown menu?'; - -/** - * CHANGED BETWEEN 1.2.12 and 1.2.13 - */ - -$lng['mysql']['description'] = 'Her kan du oprette og editere dine MySQL-Databaser.
    ændringerne er øjeblikkelige og databaserne kan bruges med det samme.
    I menuen til venstre finder du værktøjet phpMyAdmin hvilket kan bruges til nemt at administrere din(e) database(r).

    For at gøre brug af databaser i dine egne php-scripts skal de følgende indstillinger bruges: (Teksk i italisk skrift skal erstattes med de data du taster ind)
    Vært:
    Bruger: Databasenavn
    Kodeord: kodeordet du har valgt
    Database: Databasenavn'; - -/** - * ADDED BETWEEN 1.2.12 and 1.2.13 - */ - -$lng['admin']['cronlastrun'] = 'Sidste Cron'; -$lng['serversettings']['paging']['title'] = 'Genstande per side'; -$lng['serversettings']['paging']['description'] = 'Hvor mange genstande skal vises per side? (0 = brug ikke side inddeling)'; -$lng['error']['ipstillhasdomains'] = 'IP/Port kombinationen du vil slette har stadig domæner tilknyttet. Overfør disse domæner til en anden IP/Port kombination for at slette denne.'; -$lng['error']['cantdeletedefaultip'] = 'Du kan ikke slette standart IP/Port kombinationen for sælgere. Opret venligst en anden IP/Port kombination som standart først.'; -$lng['error']['cantdeletesystemip'] = 'Du kan ikke slette den sidste system IP. Opret en ny IP/Port først eller lav denne om.'; -$lng['error']['myipaddress'] = '\'IP\''; -$lng['error']['myport'] = '\'Port\''; -$lng['error']['myipdefault'] = 'Do skal vælge en IP/Port kombination som skal bruges som standart.'; -$lng['error']['myipnotdouble'] = 'Denne IP/Port kombination eksisterer allerede.'; -$lng['question']['admin_ip_reallydelete'] = 'Er du sikker på du vil slette IP-adressen %s?'; -$lng['admin']['ipsandports']['ipsandports'] = 'IP\'er og Porte'; -$lng['admin']['ipsandports']['add'] = 'Tilføj IP/Port'; -$lng['admin']['ipsandports']['edit'] = 'Editer IP/Port'; -$lng['admin']['ipsandports']['ipandport'] = 'IP/Port'; -$lng['admin']['ipsandports']['ip'] = 'IP'; -$lng['admin']['ipsandports']['port'] = 'Port'; - -// ADDED IN 1.2.13-rc3 - -$lng['error']['cantchangesystemip'] = 'Du kan ikke ændre den sidste system IP. Opret endten en ny IP/Port kombination til system IP\'en eller skift system IP\'en.'; -$lng['question']['admin_domain_reallydocrootoutofcustomerroot'] = 'Er du sikker på du vil ændre mappe roden for dette domæne til en sti som ikke er i kundes mappe?'; - -// ADDED IN 1.2.14-rc1 - -$lng['admin']['memorylimitdisabled'] = 'Deaktiveret'; -$lng['error']['loginnameissystemaccount'] = 'Du kan ikke oprette konto\'er hvis navn minder om system kontoer. Forsøg venligst med et andet navn.'; -$lng['domain']['openbasedirpath'] = 'OpenBasedir-sti'; -$lng['domain']['docroot'] = 'Sti fra feltet ovenfor'; -$lng['domain']['homedir'] = 'Hjemme mappe'; -$lng['admin']['valuemandatory'] = 'Denne værdi er obligatorisk'; -$lng['admin']['valuemandatorycompany'] = 'Enten "Navn", "Efternavn" eller "Firma" skal være udfyldt'; -$lng['menue']['main']['username'] = 'Logget ind som: '; -$lng['panel']['urloverridespath'] = 'URL (Tilsidesætter sti)'; -$lng['panel']['pathorurl'] = 'Sti eller URL'; -$lng['error']['sessiontimeoutiswrong'] = '"Session Timeout" må kun bestå af tal.'; -$lng['error']['maxloginattemptsiswrong'] = '"Max Login Attempts" må kun bestå af tal.'; -$lng['error']['deactivatetimiswrong'] = '"Deactivate Time" må kun bestå af tal.'; -$lng['error']['accountprefixiswrong'] = '&quopt;Kundepræfiks" er ikke korrekt.'; -$lng['error']['mysqlprefixiswrong'] = '"SQL Præfiks" er ikke korrekt.'; -$lng['error']['ftpprefixiswrong'] = '"FTP Præfiks" er ikke korrekt.'; -$lng['error']['ipiswrong'] = '"IP-Adresse" er ikke en gyldig IP adresse'; -$lng['error']['vmailuidiswrong'] = '"Mails-uid" er ikke korrekt. UID skal bestå af tal.'; -$lng['error']['vmailgidiswrong'] = '"Mails-gid" er ikke korrekt. GID skal bestå af tal.'; -$lng['error']['adminmailiswrong'] = '"Afsender-adresse" er ikke en gyldig eMail adresse.'; -$lng['error']['pagingiswrong'] = '"Genstande per side" må kun bestå af tal.'; -$lng['error']['phpmyadminiswrong'] = 'phpMyAdmin linket er ikke gyldigt.'; -$lng['error']['webmailiswrong'] = 'WebMail linket er ikke gyldigt.'; -$lng['error']['webftpiswrong'] = 'WebFTP linket er ikke gyldigt.'; -$lng['domains']['hasaliasdomains'] = 'Har aliasdomæne(r)'; -$lng['serversettings']['defaultip']['title'] = 'Standart IP/Port'; -$lng['serversettings']['defaultip']['description'] = 'Hvilket IP/Port kombination skal bruges som standart?'; -$lng['domains']['statstics'] = 'Forbrugs statestik'; -$lng['panel']['ascending'] = 'kronologisk'; -$lng['panel']['decending'] = 'omvendt kronologisk'; -$lng['panel']['search'] = 'Søg'; -$lng['panel']['used'] = 'brugt'; -$lng['error']['stringformaterror'] = 'Den indtastede værdi i feltet "%s" er ugyldig'; - -// ADDED IN 1.2.15-svn1 - -$lng['admin']['serversoftware'] = 'Serversoftware'; -$lng['admin']['phpversion'] = 'PHP-Version'; -$lng['admin']['phpmemorylimit'] = 'PHP Hukommelses Græse'; -$lng['admin']['mysqlserverversion'] = 'MySQL Server Version'; -$lng['admin']['mysqlclientversion'] = 'MySQL Klient Version'; -$lng['admin']['webserverinterface'] = 'Webserver Brugerflade'; - -?> +Det tager et stykke tid for ændringer at blive opdateret i systemet.'; +$lng['domains']['domainsettings'] = 'Domæne indstillinger'; +$lng['domains']['domainname'] = 'Domæne navn'; +$lng['domains']['subdomain_add'] = 'Opræt suddomæne'; +$lng['domains']['subdomain_edit'] = 'Editer (sub)domæne'; +$lng['domains']['wildcarddomain'] = 'Opret som wildcarddomæne?'; +$lng['domains']['aliasdomain'] = 'Domæne alias'; +$lng['domains']['noaliasdomain'] = 'Intet domæne alias'; + +/** + * eMails + */ + +$lng['emails']['description'] = 'Her kan du oprette og ændre eMail adresser og kontoer.
    eMail modtages af de adresser du opretter. For at kunne hente eMail skal du oprette en konto til adressen, dette gøres ved at vælge "opret konto" efter du har oprettet eMail adressen.
    Dit email program skal konfigureres som følger: (Teksk i italisk skrift skal erstattes med de data du taster ind)
    Hostname: Domænenavn
    Bruger: Konto navn / eMail adresse
    Kodeord: kodeordet du har valgt'; +$lng['emails']['emailaddress'] = 'eMail-adresse'; +$lng['emails']['emails_add'] = 'Opret eMail-adresse'; +$lng['emails']['emails_edit'] = 'Editer eMail-adresse'; +$lng['emails']['catchall'] = 'Fang-Alt'; +$lng['emails']['iscatchall'] = 'Brug som "Fang-Alt" adresse?'; +$lng['emails']['account'] = 'Konto'; +$lng['emails']['account_add'] = 'Opret konto'; +$lng['emails']['account_delete'] = 'Slet konto'; +$lng['emails']['from'] = 'Kilde'; +$lng['emails']['to'] = 'Til'; +$lng['emails']['forwarders'] = 'Videresendere'; +$lng['emails']['forwarder_add'] = 'Opret videresender'; + +/** + * FTP + */ + +$lng['ftp']['description'] = 'Her kan du oprette og ændre dine FTP kontoer.
    ændringer bliver gennemført øjeblikeligt, og kontoerne kan straks tages i brug.'; +$lng['ftp']['account_add'] = 'Opret konto'; + +/** + * MySQL + */ + +$lng['mysql']['databasename'] = 'bruger/database navn'; +$lng['mysql']['databasedescription'] = 'database beskrivelse'; +$lng['mysql']['database_create'] = 'Opret database'; + +/** + * Extras + */ + +$lng['extras']['description'] = 'Her kan du udføre ekstra indstillinger, for eksempel kodeords beskyttelse af mapper.
    Det tager et stykke tid for ændringer at blive opdateret i systemet.'; +$lng['extras']['directoryprotection_add'] = 'Tilføj mappe beskyttelse'; +$lng['extras']['view_directory'] = 'vis mappe indhold'; +$lng['extras']['pathoptions_add'] = 'tilføj regler for sti'; +$lng['extras']['directory_browsing'] = 'vis mappe indhold?'; +$lng['extras']['pathoptions_edit'] = 'ændre regler for sti'; +$lng['extras']['error404path'] = '404'; +$lng['extras']['error403path'] = '403'; +$lng['extras']['error500path'] = '500'; +$lng['extras']['error401path'] = '401'; +$lng['extras']['errordocument404path'] = 'URL til ErrorDocument 404'; +$lng['extras']['errordocument403path'] = 'URL til ErrorDocument 403'; +$lng['extras']['errordocument500path'] = 'URL til ErrorDocument 500'; +$lng['extras']['errordocument401path'] = 'URL til ErrorDocument 401'; + +/** + * Errors + */ + +$lng['error']['error'] = 'Fejl'; +$lng['error']['directorymustexist'] = 'Mappen %s eksisterer ikke. Du skal oprette den via din FTP-klient.'; +$lng['error']['filemustexist'] = 'Filen %s skal være oprettet.'; +$lng['error']['allresourcesused'] = 'Du har brugt dine tilladte ressourcer.'; +$lng['error']['domains_cantdeletemaindomain'] = 'Du kan ikke slette et eMail-domæne.'; +$lng['error']['domains_canteditdomain'] = 'Du kan ikke lave ændringer i dette domæne, da det er blevet låst af administratoren.'; +$lng['error']['domains_cantdeletedomainwithemail'] = 'Du kan ikke slette et domæne med tilknyttede eMail-adresser. Slet alle email adresser først.'; +$lng['error']['firstdeleteallsubdomains'] = 'Du skal først slette alle sub-domæner for du kan oprette et wildcarddomæne.'; +$lng['error']['youhavealreadyacatchallforthisdomain'] = 'Du har allerede valgt en Fang-Alt adresse for dette domæne.'; +$lng['error']['ftp_cantdeletemainaccount'] = 'Du kan ikke slette din primære FTP konto.'; +$lng['error']['login'] = 'Den indtastede bruger/kode er ikke korrekt. Forsøg venligst igen.'; +$lng['error']['login_blocked'] = 'Denne konto er blevet midlertidigt lukket grundet for mange fejlagtige logind forsøg.
    Forsøg venligst igen om ' . $settings['login']['deactivatetime'] . ' sekunder.'; +$lng['error']['notallreqfieldsorerrors'] = 'Alle krævede felter er ikke udfyldt, eller der er fejl i en eller flere af udfyldningerne.'; +$lng['error']['oldpasswordnotcorrect'] = 'Det gamle kodeord er ikke indtastet korrekt.'; +$lng['error']['youcantallocatemorethanyouhave'] = 'Du kan ikke tildele flere ressourcer end du er blevet bevilliget.'; +$lng['error']['mustbeurl'] = 'Din indtastning er ikke en gyldig URL (f.eks. http://eksempel.com/fejl404.htm)'; +$lng['error']['invalidpath'] = 'Du har valgt en ikke gyldig url (måske et problem med mappe list?)'; +$lng['error']['stringisempty'] = 'Manglende intasting i feltet'; +$lng['error']['stringiswrong'] = 'Forkert indtastning i feltet'; +$lng['error']['myloginname'] = '\'' . $lng['login']['username'] . '\''; +$lng['error']['mypassword'] = '\'' . $lng['login']['password'] . '\''; +$lng['error']['oldpassword'] = '\'' . $lng['changepassword']['old_password'] . '\''; +$lng['error']['newpassword'] = '\'' . $lng['changepassword']['new_password'] . '\''; +$lng['error']['newpasswordconfirm'] = '\'' . $lng['changepassword']['new_password_confirm'] . '\''; +$lng['error']['newpasswordconfirmerror'] = 'Det nye kodeord og kontrol indtastning stemmer ikke overens'; +$lng['error']['myname'] = '\'' . $lng['customer']['name'] . '\''; +$lng['error']['myfirstname'] = '\'' . $lng['customer']['firstname'] . '\''; +$lng['error']['emailadd'] = '\'' . $lng['customer']['email'] . '\''; +$lng['error']['mydomain'] = '\'Domæne\''; +$lng['error']['mydocumentroot'] = '\'Mapperod\''; +$lng['error']['loginnameexists'] = 'Brugernavnet %s eksisterer allerede'; +$lng['error']['emailiswrong'] = 'eMail-Adressen %s indeholder ugyldige tegn eller er ikke komplet'; +$lng['error']['loginnameiswrong'] = 'Brugernavnet %s indeholder ugyldige tegn'; +$lng['error']['userpathcombinationdupe'] = 'Kombinationen af brugernavn og sti findes allerede.'; +$lng['error']['patherror'] = 'Fejl! Sti kan ikke være tom'; +$lng['error']['errordocpathdupe'] = 'Indstillinger for stien %s eksisterer allerede'; +$lng['error']['adduserfirst'] = 'Opret venligst en kunde først'; +$lng['error']['domainalreadyexists'] = 'Domænet %s er allerede delligeret til en kunde'; +$lng['error']['nolanguageselect'] = 'Ingen sprog er valgt.'; +$lng['error']['nosubjectcreate'] = 'Du skal angive en overskrift for denne eMail skabelon.'; +$lng['error']['nomailbodycreate'] = 'Du skal skrive et indhold til denne eMail skabelon.'; +$lng['error']['templatenotfound'] = 'Skabelon blev ikke fundet.'; +$lng['error']['alltemplatesdefined'] = 'Du kan ikke oprette flere skabeloner da alle sprog allerede er understøttet.'; +$lng['error']['wwwnotallowed'] = 'www er ikke tilladt som sub-domæne.'; +$lng['error']['subdomainiswrong'] = 'Sub-domænet %s indeholder ugyldige tegn.'; +$lng['error']['domaincantbeempty'] = 'The domain-name can not be empty.'; +$lng['error']['domainexistalready'] = 'Domænet %s eksisterer allerede.'; +$lng['error']['domainisaliasorothercustomer'] = 'Det valgte alias-domæne er enten selv et alias domæne, eller tilhører en anden kunde.'; +$lng['error']['emailexistalready'] = 'eMail-Adressen %s eksisterer allerede.'; +$lng['error']['maindomainnonexist'] = 'Hoved-domænet %s eksisterer ikke.'; +$lng['error']['destinationnonexist'] = 'Opret venligst videresenderen i feltet.'; +$lng['error']['destinationalreadyexistasmail'] = 'Videresenderen til %s eksisterer allerede som en aktiv eMail-adresse.'; +$lng['error']['destinationalreadyexist'] = 'Der er allerede angivet en videresender til %s .'; +$lng['error']['destinationiswrong'] = 'Videresenderen %s indeholder ugyldige tegn eller er ikke komplet.'; +$lng['error']['domainname'] = $lng['domains']['domainname']; + +/** + * Questions + */ + +$lng['question']['question'] = 'Sikkerhedsspørgsmål'; +$lng['question']['admin_customer_reallydelete'] = 'Er du sikker på du vil slette kunden %s? Dette kan ikke fortrydes!'; +$lng['question']['admin_domain_reallydelete'] = 'Er du sikker på du vil slette domænet %s?'; +$lng['question']['admin_domain_reallydisablesecuritysetting'] = 'Er du sikker på du vil deaktivere disse sikkerheds indstillinger (OpenBasedir og/eller SafeMode)?'; +$lng['question']['admin_admin_reallydelete'] = 'Er du sikker på du vil slette administrator %s? Alle kunder og domæner som hører hertil vil blive allokeret til øverste adminstartor.'; +$lng['question']['admin_template_reallydelete'] = 'Er du sikker på du vil slette skabelonen \'%s*\'?'; +$lng['question']['domains_reallydelete'] = 'Er du sikker på du vil slette domænet %s?'; +$lng['question']['email_reallydelete'] = 'Er du sikker på du vil slette eMail-adressen %s?'; +$lng['question']['email_reallydelete_account'] = 'Er du sikker på du vil slette eMail-account fra %s?'; +$lng['question']['email_reallydelete_forwarder'] = 'Er du sikker på du vil slette videresenderen %s?'; +$lng['question']['extras_reallydelete'] = 'Er du sikker på du vil slette mappe beskyttelse for %s?'; +$lng['question']['extras_reallydelete_pathoptions'] = 'Er du sikker på du vil slette regler for stien %s?'; +$lng['question']['ftp_reallydelete'] = 'Er du sikker på du vil slette FTP kontoen %s?'; +$lng['question']['mysql_reallydelete'] = 'Er du sikker på du vil slette databasen %s? Dette kan ikke fortrydes!'; +$lng['question']['admin_configs_reallyrebuild'] = 'Er du sikker på du vil genbygge dine apache og bind konfigurations filer?'; + +/** + * Mails + */ + +$lng['mails']['pop_success']['mailbody'] = 'Hej,\n\ndin eMail konto {EMAIL}\ner blevet oprettet.\n\nDette er en automatisk genereret\neMail, svar er ikke nødvendig!\n\nHilsen, Froxlor-Teamet'; +$lng['mails']['pop_success']['subject'] = 'eMail konto er blevet oprettet'; +$lng['mails']['createcustomer']['mailbody'] = 'Hej {FIRSTNAME} {NAME},\n\ndette er information til din konto:\n\nBruger: {USERNAME}\nKodeord: {PASSWORD}\n\nHilsen, Froxlor-Teamet'; +$lng['mails']['createcustomer']['subject'] = 'Konto information'; + +/** + * Admin + */ + +$lng['admin']['overview'] = 'Oversigt'; +$lng['admin']['ressourcedetails'] = 'Brugte ressourcer'; +$lng['admin']['systemdetails'] = 'System Detaljer'; +$lng['admin']['froxlordetails'] = 'Froxlor Detaljer'; +$lng['admin']['installedversion'] = 'Installeret Version'; +$lng['admin']['latestversion'] = 'Seneste Version'; +$lng['admin']['lookfornewversion']['clickhere'] = 'søg via webservice'; +$lng['admin']['lookfornewversion']['error'] = 'Fejl under læsning'; +$lng['admin']['resources'] = 'Ressourcer'; +$lng['admin']['customer'] = 'Kunde'; +$lng['admin']['customers'] = 'Kunder'; +$lng['admin']['customer_add'] = 'Opret kunde'; +$lng['admin']['customer_edit'] = 'Editer kunde'; +$lng['admin']['domains'] = 'Domæner'; +$lng['admin']['domain_add'] = 'Opret domæne'; +$lng['admin']['domain_edit'] = 'Editer domæne'; +$lng['admin']['subdomainforemail'] = 'Subdomæner som eMaildomæner'; +$lng['admin']['admin'] = 'Admin'; +$lng['admin']['admins'] = 'Admins'; +$lng['admin']['admin_add'] = 'Opret administrator'; +$lng['admin']['admin_edit'] = 'Editer administrator'; +$lng['admin']['customers_see_all'] = 'Kan se alle kunder?'; +$lng['admin']['domains_see_all'] = 'Kan se alle domæner?'; +$lng['admin']['change_serversettings'] = 'Kan ændre server indstillinger?'; +$lng['admin']['server'] = 'Server'; +$lng['admin']['serversettings'] = 'Indstillinger'; +$lng['admin']['rebuildconf'] = 'Genbyg konfigurations filer'; +$lng['admin']['stdsubdomain'] = 'Standart subdomæne'; +$lng['admin']['stdsubdomain_add'] = 'Opret standart subdomæne'; +$lng['admin']['deactivated'] = 'Deaktiveret'; +$lng['admin']['deactivated_user'] = 'Deaktiver Bruger'; +$lng['admin']['sendpassword'] = 'Send kodeord'; +$lng['admin']['ownvhostsettings'] = 'Egne vHost-indstillinger'; +$lng['admin']['configfiles']['serverconfiguration'] = 'Konfiguration'; +$lng['admin']['configfiles']['files'] = 'Konfigurationsfiler: Lav venligst ændringerne i de følgende filer eller opret
    dem med dette indhold hvis de ikke eksisterer.
    Bemærk: MySQL Kodeordet er ikke blevet ændre af sikkerhedsgrunde.
    Udskift venligst "MYSQL_PASSWORD" manuelt. Hvis du har glemt dit MySQL kodeord
    er det at finde i "lib/userdata.inc.php".'; +$lng['admin']['configfiles']['commands'] = 'Kommandoer: Udfør disse kommandoer i shell\'et.'; +$lng['admin']['configfiles']['restart'] = 'Genstart: Udfør disse kommandoer i shell\'et for at aktivere den nye konfiguration.'; +$lng['admin']['templates']['templates'] = 'Skabeloner'; +$lng['admin']['templates']['template_add'] = 'Tilføj skabelon'; +$lng['admin']['templates']['template_edit'] = 'Editer skabelon'; +$lng['admin']['templates']['action'] = 'Handling'; +$lng['admin']['templates']['email'] = 'E-Mail'; +$lng['admin']['templates']['subject'] = 'Emne'; +$lng['admin']['templates']['mailbody'] = 'Mail indhold'; +$lng['admin']['templates']['createcustomer'] = 'Velkomst mail for nye kunder'; +$lng['admin']['templates']['pop_success'] = 'Velkomst mail for nye email kontoer'; +$lng['admin']['templates']['template_replace_vars'] = 'Variabler der udskiftes i skabelonen:'; +$lng['admin']['templates']['FIRSTNAME'] = 'Udskiftes med kundes navn.'; +$lng['admin']['templates']['NAME'] = 'Udskiftes med kundes efternavn.'; +$lng['admin']['templates']['USERNAME'] = 'Udskiftes med kundes konto brugernavn.'; +$lng['admin']['templates']['PASSWORD'] = 'Udskiftes med kundes konto kodeord.'; +$lng['admin']['templates']['EMAIL'] = 'Udskiftes med adressen af POP3/IMAP kontoen.'; + +/** + * Serversettings + */ + +$lng['serversettings']['session_timeout']['title'] = 'Sæssion Timeout'; +$lng['serversettings']['session_timeout']['description'] = 'Hvor længe skal en bruger være inaktiv før sæssionen bliver ugyldig (i sekunder)?'; +$lng['serversettings']['accountprefix']['title'] = 'Kundepræfiks'; +$lng['serversettings']['accountprefix']['description'] = 'Hvilket præfiks skal kunde kontoer have?'; +$lng['serversettings']['mysqlprefix']['title'] = 'SQL Præfiks'; +$lng['serversettings']['mysqlprefix']['description'] = 'Hvilket præfiks skal MySQL databaser have?'; +$lng['serversettings']['ftpprefix']['title'] = 'FTP Præfiks'; +$lng['serversettings']['ftpprefix']['description'] = 'Hvilket præfiks skal FTP kontoer have?'; +$lng['serversettings']['documentroot_prefix']['title'] = 'Dokument mappe'; +$lng['serversettings']['documentroot_prefix']['description'] = 'Hvor skal data opbevares?'; +$lng['serversettings']['logfiles_directory']['title'] = 'Logfilmappe'; +$lng['serversettings']['logfiles_directory']['description'] = 'Hvor skal alle logfilerne opbevares?'; +$lng['serversettings']['ipaddress']['title'] = 'IP-Adresse'; +$lng['serversettings']['ipaddress']['description'] = 'Hvad er denne servers IP-adresse?'; +$lng['serversettings']['hostname']['title'] = 'Hostname'; +$lng['serversettings']['hostname']['description'] = 'Hvad er denne servers hostname?'; +$lng['serversettings']['apachereload_command']['title'] = 'Apache genstart kommando'; +$lng['serversettings']['apachereload_command']['description'] = 'Hvad er kommandoen til at genstarte apache?'; +$lng['serversettings']['bindconf_directory']['title'] = 'Bind konfigurations mappe'; +$lng['serversettings']['bindconf_directory']['description'] = 'Hvor er bind\'s konfigurationsfiler?'; +$lng['serversettings']['bindreload_command']['title'] = 'Bind genstart kommando'; +$lng['serversettings']['bindreload_command']['description'] = 'Hvad er kommandoen til at genstarte bind?'; +$lng['serversettings']['binddefaultzone']['title'] = 'Bind default zone'; +$lng['serversettings']['binddefaultzone']['description'] = 'Hvad er navnet på default zone?'; +$lng['serversettings']['vmail_uid']['title'] = 'Mails-Uid'; +$lng['serversettings']['vmail_uid']['description'] = 'Hvilket UserID skal mails bruge?'; +$lng['serversettings']['vmail_gid']['title'] = 'Mails-Gid'; +$lng['serversettings']['vmail_gid']['description'] = 'Hvilket GroupID skal mails bruge?'; +$lng['serversettings']['vmail_homedir']['title'] = 'Mails-Homedir'; +$lng['serversettings']['vmail_homedir']['description'] = 'Hvor skal alle mails opbevares?'; +$lng['serversettings']['adminmail']['title'] = 'Afsender'; +$lng['serversettings']['adminmail']['description'] = 'Hvilken adresse skal eMails sendt fra kontrol panelet være?'; +$lng['serversettings']['phpmyadmin_url']['title'] = 'phpMyAdmin URL'; +$lng['serversettings']['phpmyadmin_url']['description'] = 'Hvad er URL\'en til phpMyAdmin? (skal starte med http://)'; +$lng['serversettings']['webmail_url']['title'] = 'WebMail URL'; +$lng['serversettings']['webmail_url']['description'] = 'Hvad er URL\'en til WebMail? (skal starte med http://)'; +$lng['serversettings']['webftp_url']['title'] = 'WebFTP URL'; +$lng['serversettings']['webftp_url']['description'] = 'Hvad er URL\'en til WebFTP? (skal starte med http://)'; +$lng['serversettings']['language']['description'] = 'Hvilket sprog er standart på din server?'; +$lng['serversettings']['maxloginattempts']['title'] = 'Maksimum log ind forsøg'; +$lng['serversettings']['maxloginattempts']['description'] = 'Maksimum log ind forsøg hvorefter kontoen bliver spærret.'; +$lng['serversettings']['deactivatetime']['title'] = 'Spærrings periode'; +$lng['serversettings']['deactivatetime']['description'] = 'Tid i sekunder en konto skal forblive spærret.'; +$lng['serversettings']['pathedit']['title'] = 'Sti valg type'; +$lng['serversettings']['pathedit']['description'] = 'SKal sti vælges via et indtastningfelt eller en dropdown menu?'; + +/** + * CHANGED BETWEEN 1.2.12 and 1.2.13 + */ + +$lng['mysql']['description'] = 'Her kan du oprette og editere dine MySQL-Databaser.
    ændringerne er øjeblikkelige og databaserne kan bruges med det samme.
    I menuen til venstre finder du værktøjet phpMyAdmin hvilket kan bruges til nemt at administrere din(e) database(r).

    For at gøre brug af databaser i dine egne php-scripts skal de følgende indstillinger bruges: (Teksk i italisk skrift skal erstattes med de data du taster ind)
    Vært:
    Bruger: Databasenavn
    Kodeord: kodeordet du har valgt
    Database: Databasenavn'; + +/** + * ADDED BETWEEN 1.2.12 and 1.2.13 + */ + +$lng['admin']['cronlastrun'] = 'Sidste Cron'; +$lng['serversettings']['paging']['title'] = 'Genstande per side'; +$lng['serversettings']['paging']['description'] = 'Hvor mange genstande skal vises per side? (0 = brug ikke side inddeling)'; +$lng['error']['ipstillhasdomains'] = 'IP/Port kombinationen du vil slette har stadig domæner tilknyttet. Overfør disse domæner til en anden IP/Port kombination for at slette denne.'; +$lng['error']['cantdeletedefaultip'] = 'Du kan ikke slette standart IP/Port kombinationen for sælgere. Opret venligst en anden IP/Port kombination som standart først.'; +$lng['error']['cantdeletesystemip'] = 'Du kan ikke slette den sidste system IP. Opret en ny IP/Port først eller lav denne om.'; +$lng['error']['myipaddress'] = '\'IP\''; +$lng['error']['myport'] = '\'Port\''; +$lng['error']['myipdefault'] = 'Do skal vælge en IP/Port kombination som skal bruges som standart.'; +$lng['error']['myipnotdouble'] = 'Denne IP/Port kombination eksisterer allerede.'; +$lng['question']['admin_ip_reallydelete'] = 'Er du sikker på du vil slette IP-adressen %s?'; +$lng['admin']['ipsandports']['ipsandports'] = 'IP\'er og Porte'; +$lng['admin']['ipsandports']['add'] = 'Tilføj IP/Port'; +$lng['admin']['ipsandports']['edit'] = 'Editer IP/Port'; +$lng['admin']['ipsandports']['ipandport'] = 'IP/Port'; +$lng['admin']['ipsandports']['ip'] = 'IP'; +$lng['admin']['ipsandports']['port'] = 'Port'; + +// ADDED IN 1.2.13-rc3 + +$lng['error']['cantchangesystemip'] = 'Du kan ikke ændre den sidste system IP. Opret endten en ny IP/Port kombination til system IP\'en eller skift system IP\'en.'; +$lng['question']['admin_domain_reallydocrootoutofcustomerroot'] = 'Er du sikker på du vil ændre mappe roden for dette domæne til en sti som ikke er i kundes mappe?'; + +// ADDED IN 1.2.14-rc1 + +$lng['admin']['memorylimitdisabled'] = 'Deaktiveret'; +$lng['error']['loginnameissystemaccount'] = 'Du kan ikke oprette konto\'er hvis navn minder om system kontoer. Forsøg venligst med et andet navn.'; +$lng['domain']['openbasedirpath'] = 'OpenBasedir-sti'; +$lng['domain']['docroot'] = 'Sti fra feltet ovenfor'; +$lng['domain']['homedir'] = 'Hjemme mappe'; +$lng['admin']['valuemandatory'] = 'Denne værdi er obligatorisk'; +$lng['admin']['valuemandatorycompany'] = 'Enten "Navn", "Efternavn" eller "Firma" skal være udfyldt'; +$lng['menue']['main']['username'] = 'Logget ind som: '; +$lng['panel']['urloverridespath'] = 'URL (Tilsidesætter sti)'; +$lng['panel']['pathorurl'] = 'Sti eller URL'; +$lng['error']['sessiontimeoutiswrong'] = '"Session Timeout" må kun bestå af tal.'; +$lng['error']['maxloginattemptsiswrong'] = '"Max Login Attempts" må kun bestå af tal.'; +$lng['error']['deactivatetimiswrong'] = '"Deactivate Time" må kun bestå af tal.'; +$lng['error']['accountprefixiswrong'] = '&quopt;Kundepræfiks" er ikke korrekt.'; +$lng['error']['mysqlprefixiswrong'] = '"SQL Præfiks" er ikke korrekt.'; +$lng['error']['ftpprefixiswrong'] = '"FTP Præfiks" er ikke korrekt.'; +$lng['error']['ipiswrong'] = '"IP-Adresse" er ikke en gyldig IP adresse'; +$lng['error']['vmailuidiswrong'] = '"Mails-uid" er ikke korrekt. UID skal bestå af tal.'; +$lng['error']['vmailgidiswrong'] = '"Mails-gid" er ikke korrekt. GID skal bestå af tal.'; +$lng['error']['adminmailiswrong'] = '"Afsender-adresse" er ikke en gyldig eMail adresse.'; +$lng['error']['pagingiswrong'] = '"Genstande per side" må kun bestå af tal.'; +$lng['error']['phpmyadminiswrong'] = 'phpMyAdmin linket er ikke gyldigt.'; +$lng['error']['webmailiswrong'] = 'WebMail linket er ikke gyldigt.'; +$lng['error']['webftpiswrong'] = 'WebFTP linket er ikke gyldigt.'; +$lng['domains']['hasaliasdomains'] = 'Har aliasdomæne(r)'; +$lng['serversettings']['defaultip']['title'] = 'Standart IP/Port'; +$lng['serversettings']['defaultip']['description'] = 'Hvilket IP/Port kombination skal bruges som standart?'; +$lng['domains']['statstics'] = 'Forbrugs statestik'; +$lng['panel']['ascending'] = 'kronologisk'; +$lng['panel']['decending'] = 'omvendt kronologisk'; +$lng['panel']['search'] = 'Søg'; +$lng['panel']['used'] = 'brugt'; +$lng['error']['stringformaterror'] = 'Den indtastede værdi i feltet "%s" er ugyldig'; + +// ADDED IN 1.2.15-svn1 + +$lng['admin']['serversoftware'] = 'Serversoftware'; +$lng['admin']['phpversion'] = 'PHP-Version'; +$lng['admin']['phpmemorylimit'] = 'PHP Hukommelses Græse'; +$lng['admin']['mysqlserverversion'] = 'MySQL Server Version'; +$lng['admin']['mysqlclientversion'] = 'MySQL Klient Version'; +$lng['admin']['webserverinterface'] = 'Webserver Brugerflade'; + +?> diff --git a/lng/dutch.lng.php b/lng/dutch.lng.php index d1d65928..b402e253 100644 --- a/lng/dutch.lng.php +++ b/lng/dutch.lng.php @@ -1,465 +1,465 @@ - - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Language - * @version $Id$ - */ - -/** - * Global - */ - -$lng['translator'] = 'Sander Klein'; -$lng['panel']['edit'] = 'bewerken'; -$lng['panel']['delete'] = 'verwijderen'; -$lng['panel']['create'] = 'nieuw'; -$lng['panel']['save'] = 'opslaan'; -$lng['panel']['yes'] = 'ja'; -$lng['panel']['no'] = 'nee'; -$lng['panel']['emptyfornochanges'] = 'leeg laten voor huidige instelling'; -$lng['panel']['emptyfordefault'] = 'leeg laten voor de standaard instellingen'; -$lng['panel']['path'] = 'Pad'; -$lng['panel']['toggle'] = 'In- of uitschalen'; -$lng['panel']['next'] = 'volgende'; -$lng['panel']['dirsmissing'] = 'Kan de map niet lezen of vinden!'; - -/** - * Login - */ - -$lng['login']['username'] = 'Gebruikersnaam'; -$lng['login']['password'] = 'Wachtwoord'; -$lng['login']['language'] = 'Taal'; -$lng['login']['login'] = 'Inloggen'; -$lng['login']['logout'] = 'Uitloggen'; -$lng['login']['profile_lng'] = 'Profiel taal'; - -/** - * Customer - */ - -$lng['customer']['documentroot'] = 'Home directory'; -$lng['customer']['name'] = 'Naam'; -$lng['customer']['firstname'] = 'Voornaam'; -$lng['customer']['company'] = 'Bedrijfsnaam'; -$lng['customer']['street'] = 'Straat'; -$lng['customer']['zipcode'] = 'Postcode'; -$lng['customer']['city'] = 'Plaats'; -$lng['customer']['phone'] = 'Telefoonnummer'; -$lng['customer']['fax'] = 'Faxnummer'; -$lng['customer']['email'] = 'Email'; -$lng['customer']['customernumber'] = 'Klant ID'; -$lng['customer']['diskspace'] = 'Webruimte (MB)'; -$lng['customer']['traffic'] = 'Verkeer (GB)'; -$lng['customer']['mysqls'] = 'MySQL-Databases'; -$lng['customer']['emails'] = 'E-mail-Adressen'; -$lng['customer']['accounts'] = 'E-mail-Accounts'; -$lng['customer']['forwarders'] = 'E-mail-Forwarders'; -$lng['customer']['ftps'] = 'FTP-Accounts'; -$lng['customer']['subdomains'] = 'Sub-Domein(en)'; -$lng['customer']['domains'] = 'Domein(en)'; -$lng['customer']['unlimited'] = 'onbeperkt'; - -/** - * Customermenue - */ - -$lng['menue']['main']['main'] = 'Main'; -$lng['menue']['main']['changepassword'] = 'Wijzig wachtwoord'; -$lng['menue']['main']['changelanguage'] = 'Wijzig taal'; -$lng['menue']['email']['email'] = 'E-mail'; -$lng['menue']['email']['emails'] = 'Adressen'; -$lng['menue']['email']['webmail'] = 'WebMail'; -$lng['menue']['mysql']['mysql'] = 'MySQL'; -$lng['menue']['mysql']['databases'] = 'Databases'; -$lng['menue']['mysql']['phpmyadmin'] = 'phpMyAdmin'; -$lng['menue']['domains']['domains'] = 'Domeinen'; -$lng['menue']['domains']['settings'] = 'Instellingen'; -$lng['menue']['ftp']['ftp'] = 'FTP'; -$lng['menue']['ftp']['accounts'] = 'Accounts'; -$lng['menue']['ftp']['webftp'] = 'WebFTP'; -$lng['menue']['extras']['extras'] = 'Extras'; -$lng['menue']['extras']['directoryprotection'] = 'Map beveiliging'; -$lng['menue']['extras']['pathoptions'] = 'pad opties'; - -/** - * Index - */ - -$lng['index']['customerdetails'] = 'Klant Details'; -$lng['index']['accountdetails'] = 'Account Details'; - -/** - * Change Password - */ - -$lng['changepassword']['old_password'] = 'Oud wachtwoord'; -$lng['changepassword']['new_password'] = 'Nieuw wachtwoord'; -$lng['changepassword']['new_password_confirm'] = 'Nieuw wacthwoord (bevestigen)'; -$lng['changepassword']['new_password_ifnotempty'] = 'Nieuw wachtwoord (leeg = niet veranderen)'; -$lng['changepassword']['also_change_ftp'] = ' wijzig ook het wachtwoord van het hoofd FTP account'; - -/** - * Domains - */ - -$lng['domains']['description'] = 'Hier kunt u nieuwe (sub-) domeinen maken en de paden aanpassen.
    Het systeem heeft een paar minuten nodig om de wijzigingen door te voeren na iedere varandering.'; -$lng['domains']['domainsettings'] = 'Domein instellingen'; -$lng['domains']['domainname'] = 'Domeinnaam'; -$lng['domains']['subdomain_add'] = 'Maak subdomein'; -$lng['domains']['subdomain_edit'] = 'Bewerk (sub)domein'; -$lng['domains']['wildcarddomain'] = 'Maak als wildcarddomein?'; -$lng['domains']['aliasdomain'] = 'Alias voor domein'; -$lng['domains']['noaliasdomain'] = 'Geen alias domein'; - -/** - * E-mails - */ - -$lng['emails']['description'] = 'Hier kunt u e-mail adressen maken en wijzigen.
    Een aacount is net als een brievenbus voor uw huis. Als iemand u mail stuurd word dit op uw account bezorgt.

    Om uw emails te downloaden moet u het volgende installen in uw mail programma: (De schuigedrukte gegevens moeten gewijzigd worden in hetgeen dat u ingegeven heeft!)
    Servernaam: Domeinnaam
    Gebruikersnaam: Account naam / e-mail adres
    Wachtwoord: het door u ingegeven wachtwoord'; -$lng['emails']['emailaddress'] = 'E-mail adres'; -$lng['emails']['emails_add'] = 'Maak nieuw e-mail adres'; -$lng['emails']['emails_edit'] = 'Bewerk e-mail-adres'; -$lng['emails']['catchall'] = 'Catchall'; -$lng['emails']['iscatchall'] = 'Definieer als catchall-adres?'; -$lng['emails']['account'] = 'Account'; -$lng['emails']['account_add'] = 'Maak nieuw account'; -$lng['emails']['account_delete'] = 'Verwijder account'; -$lng['emails']['from'] = 'Van'; -$lng['emails']['to'] = 'Aan'; -$lng['emails']['forwarders'] = 'Forwarders'; -$lng['emails']['forwarder_add'] = 'Maak forwarder'; - -/** - * FTP - */ - -$lng['ftp']['description'] = 'Hier kunt u nieuwe FTP accounts maken of bestaande accounts wijzigen.
    De wijzigingen worden direct doorgevoerd en het account kan direct gebruikt worden.'; -$lng['ftp']['account_add'] = 'Maak nieuw account'; - -/** - * MySQL - */ - -$lng['mysql']['databasename'] = 'gebruiker/database naam'; -$lng['mysql']['databasedescription'] = 'database omschrijving'; -$lng['mysql']['database_create'] = 'Maak database'; - -/** - * Extras - */ - -$lng['extras']['description'] = 'Hier kunt u wat extra instellingen doen zoals map beveiliging.
    Het systeem heeft enkele minuten nodig om elke wijziging door te voeren.'; -$lng['extras']['directoryprotection_add'] = 'Map beveiliging toevoegen'; -$lng['extras']['view_directory'] = 'map inhoud laten zien'; -$lng['extras']['pathoptions_add'] = 'Pad opties toevoegen'; -$lng['extras']['directory_browsing'] = 'map inhoud browsen'; -$lng['extras']['pathoptions_edit'] = 'Pad opties bewerken'; -$lng['extras']['error404path'] = '404'; -$lng['extras']['error403path'] = '403'; -$lng['extras']['error500path'] = '500'; -$lng['extras']['error401path'] = '401'; -$lng['extras']['errordocument404path'] = 'URL naar Foutdocument 404'; -$lng['extras']['errordocument403path'] = 'URL naar Foutdocument 403'; -$lng['extras']['errordocument500path'] = 'URL naar Foutdocument 500'; -$lng['extras']['errordocument401path'] = 'URL naar Foutducument 401'; - -/** - * Errors - */ - -$lng['error']['error'] = 'Fout'; -$lng['error']['directorymustexist'] = 'De map %s bestaat niet. Maak hem eerst aan met uw FTP client.'; -$lng['error']['filemustexist'] = 'Het bestand %s bestaat niet.'; -$lng['error']['allresourcesused'] = 'U heeft al uw resources al gebruikt.'; -$lng['error']['domains_cantdeletemaindomain'] = 'U kunt een domein dat gebruikt word als email-domein niet verwijderen.'; -$lng['error']['domains_canteditdomain'] = 'U kunt dit domein niet aanpassen. Dit is door de admin onbruikbaar gemaakt.'; -$lng['error']['domains_cantdeletedomainwithemail'] = 'U kunt een domein dat gebruikt word als email-domein niet verwijderen. Verwijder eerst alle e-mail adressen.'; -$lng['error']['firstdeleteallsubdomains'] = 'U moet eerst alle subdomeinen verwijderen voor u een wildcard domein kunt maken.'; -$lng['error']['youhavealreadyacatchallforthisdomain'] = 'U heeft al een catchall voor dit domein aangemaakt.'; -$lng['error']['ftp_cantdeletemainaccount'] = 'U kunt uw hoofd FTP account niet verwijderen'; -$lng['error']['login'] = 'De door u ingegeven gebruikersnaam en wacthwoord zijn verkeerd. Probeer opnieuw!'; -$lng['error']['login_blocked'] = 'Dit account is inactief vanwege teveel login fouten.
    Probeer het nog eens over ' . $settings['login']['deactivatetime'] . ' seconden.'; -$lng['error']['notallreqfieldsorerrors'] = 'U heeft niet alle velden goed, of helemaal niet ingevuld.'; -$lng['error']['oldpasswordnotcorrect'] = 'Het oude wachtwoord is niet correct.'; -$lng['error']['youcantallocatemorethanyouhave'] = 'U kunt niet meer resources gebruiken dan dat u bezit.'; -$lng['error']['mustbeurl'] = 'U heeft geen goed of compleet URL ingegeven (bijv. http://eenserver.com/error404.htm)'; -$lng['error']['invalidpath'] = 'U heeft geen goed URL ingegeven (misschien een probleem met dirlisting?)'; -$lng['error']['stringisempty'] = 'Geen waarde in invoerveld'; -$lng['error']['stringiswrong'] = 'Verkeerde waarde in invoerveld'; -$lng['error']['myloginname'] = '\'' . $lng['login']['username'] . '\''; -$lng['error']['mypassword'] = '\'' . $lng['login']['password'] . '\''; -$lng['error']['oldpassword'] = '\'' . $lng['changepassword']['old_password'] . '\''; -$lng['error']['newpassword'] = '\'' . $lng['changepassword']['new_password'] . '\''; -$lng['error']['newpasswordconfirm'] = '\'' . $lng['changepassword']['new_password_confirm'] . '\''; -$lng['error']['newpasswordconfirmerror'] = 'Het nieuwe wacthwoord en de bevestiging zijn niet gelijk'; -$lng['error']['myname'] = '\'' . $lng['customer']['name'] . '\''; -$lng['error']['myfirstname'] = '\'' . $lng['customer']['firstname'] . '\''; -$lng['error']['emailadd'] = '\'' . $lng['customer']['email'] . '\''; -$lng['error']['mydomain'] = '\'Domain\''; -$lng['error']['mydocumentroot'] = '\'Documentroot\''; -$lng['error']['loginnameexists'] = 'Loginnaam %s bestaat al'; -$lng['error']['emailiswrong'] = 'E-mail Adres %s bevat illegale karakters of is niet compleet'; -$lng['error']['loginnameiswrong'] = 'Loginnaame %s bevat illegale karakters'; -$lng['error']['userpathcombinationdupe'] = 'Combinatie van Gebruikersnaam en Pad bestaat reeds'; -$lng['error']['patherror'] = 'Generale Fout! pad kan niet leeg zijn'; -$lng['error']['errordocpathdupe'] = 'Optie voor pad %s bestaat reeds'; -$lng['error']['adduserfirst'] = 'Maak klant eerst aan, aub'; -$lng['error']['domainalreadyexists'] = 'Het domein %s is al aan een klant toegewezen'; -$lng['error']['nolanguageselect'] = 'Geen taal geselecteerd.'; -$lng['error']['nosubjectcreate'] = 'U moet een onderwerp ingeven voor dit e-mail sjabloon.'; -$lng['error']['nomailbodycreate'] = 'U moet een tekst ingeven voor dit e-mail sjabloon.'; -$lng['error']['templatenotfound'] = 'Sjabloon niet gevonden.'; -$lng['error']['alltemplatesdefined'] = 'U kunt niet meer sjablonen definieeren, alle talen worden al ondersteund.'; -$lng['error']['wwwnotallowed'] = 'www is niet toegestaan voor subdomeinen.'; -$lng['error']['subdomainiswrong'] = 'Het subdomein %s bevat illegale karakters.'; -$lng['error']['domaincantbeempty'] = 'De domeinnaam kan niet leeg zijn.'; -$lng['error']['domainexistalready'] = 'Het domein %s bestaads reeds.'; -$lng['error']['domainisaliasorothercustomer'] = 'Het geselecteerde alias domein verwijsd naar zichzelf of is van een andere gebruiker.'; -$lng['error']['emailexistalready'] = 'Het e-mail adres %s bestaat reeds.'; -$lng['error']['maindomainnonexist'] = 'Het hoofd-domein %s bestaat niet.'; -$lng['error']['destinationnonexist'] = 'Maak uw forwarder in het veld \'Destination\' alstublieft.'; -$lng['error']['destinationalreadyexistasmail'] = 'De forwarder naar %s bestaat reeds als actief e-mail adres.'; -$lng['error']['destinationalreadyexist'] = 'U heeft al een forwarder die verwijst naar %s .'; -$lng['error']['destinationiswrong'] = 'De forwarder naar %s bevat illegale karakter(s) of is niet compleet.'; -$lng['error']['domainname'] = $lng['domains']['domainname']; - -/** - * Questions - */ - -$lng['question']['question'] = 'Beveiligings vraag'; -$lng['question']['admin_customer_reallydelete'] = 'Weet u zeker dat u de klant %s wilt verwijderen? Dit kan niet ongedaan worden gemaakt!'; -$lng['question']['admin_domain_reallydelete'] = 'Weet u zeker dat u het domein %s wilt verwijderen?'; -$lng['question']['admin_domain_reallydisablesecuritysetting'] = 'Weet u echt heel zeker dat deze beveiligings instellingen wilt deactiveren (OpenBasedir en/of SafeMode)?'; -$lng['question']['admin_admin_reallydelete'] = 'Weet u zeker dat u de admin %s verwijderen wilt? Iedere klant en domein zal worden toegewezen aan de hoofd administrator.'; -$lng['question']['admin_template_reallydelete'] = 'Weet u zeker dat u het sjabloon \'%s\' verwijderen wilt?'; -$lng['question']['domains_reallydelete'] = 'Weet u zeker dat u het domein %s verwijderen wilt?'; -$lng['question']['email_reallydelete'] = 'Weet u zeker dat u het e-mail adres %s verwijderen wilt?'; -$lng['question']['email_reallydelete_account'] = 'Weet u zeker dat het e-mail account van %s verwijderen wilt?'; -$lng['question']['email_reallydelete_forwarder'] = 'Weet u zeker dat u de forwarder %s verwijderen wilt?'; -$lng['question']['extras_reallydelete'] = 'Weet u zeker dat u de map beveiliging voor de map %s verwijderen wilt?'; -$lng['question']['extras_reallydelete_pathoptions'] = 'Weet u zeker dat u de pad-opties voor %s verwijderen wilt?'; -$lng['question']['ftp_reallydelete'] = 'Weet u zeker dat u het FTP account %s verwijderen wilt?'; -$lng['question']['mysql_reallydelete'] = 'Weet u zeker dat u de database %s verwijderen wilt? Dit kan niet ongedaan gemaakt worden!'; -$lng['question']['admin_configs_reallyrebuild'] = 'Weet u zeker dat u de configuratie bestanden voor Apache en Bind opnieuw wilt opbouwen?'; - -/** - * Mails - */ - -$lng['mails']['pop_success']['mailbody'] = 'Hallo,\n\nUw mail account {EMAIL}\nis succesvol aangemaakt.\n\nDit is een automatisch verstuurde\ne-mail, beantwoord deze niet AUB!\n\nMet vriendelijke groet, het Froxlor-Team'; -$lng['mails']['pop_success']['subject'] = 'Mail account succesvol aangemaakt'; -$lng['mails']['createcustomer']['mailbody'] = 'Hallo {FIRSTNAME} {NAME},\n\nhierbij uw account informatie:\n\nGebruikersnaam: {USERNAME}\nWachtwoord: {PASSWORD}\n\nMet vriendelijke groet,\nhet Froxlor-Team'; -$lng['mails']['createcustomer']['subject'] = 'Account informatie'; - -/** - * Admin - */ - -$lng['admin']['overview'] = 'Overzicht'; -$lng['admin']['ressourcedetails'] = 'Gebruikte resources'; -$lng['admin']['systemdetails'] = 'Systeem Details'; -$lng['admin']['froxlordetails'] = 'Froxlor Details'; -$lng['admin']['installedversion'] = 'Geinstalleerde Versie'; -$lng['admin']['latestversion'] = 'Laatste Versie'; -$lng['admin']['lookfornewversion']['clickhere'] = 'zoeken via webservice'; -$lng['admin']['lookfornewversion']['error'] = 'Fout tijdens lezen'; -$lng['admin']['resources'] = 'Resources'; -$lng['admin']['customer'] = 'Klant'; -$lng['admin']['customers'] = 'Klanten'; -$lng['admin']['customer_add'] = 'Maak klant'; -$lng['admin']['customer_edit'] = 'Bewerk klant'; -$lng['admin']['domains'] = 'Domeinen'; -$lng['admin']['domain_add'] = 'Maak domein'; -$lng['admin']['domain_edit'] = 'Bewerk domein'; -$lng['admin']['subdomainforemail'] = 'Subdomein als emaildomein'; -$lng['admin']['admin'] = 'Beheerder'; -$lng['admin']['admins'] = 'Beheerders'; -$lng['admin']['admin_add'] = 'Maak beheerder'; -$lng['admin']['admin_edit'] = 'Bewerk beheerder'; -$lng['admin']['customers_see_all'] = 'Kan alle klanten zien?'; -$lng['admin']['domains_see_all'] = 'Kan alle domeinen zien?'; -$lng['admin']['change_serversettings'] = 'Kan server instellingen aanpassen?'; -$lng['admin']['server'] = 'Server'; -$lng['admin']['serversettings'] = 'Instellingen'; -$lng['admin']['rebuildconf'] = 'Configuratie bestanden opnieuw aanmaken'; -$lng['admin']['stdsubdomain'] = 'Standaard subdomein'; -$lng['admin']['stdsubdomain_add'] = 'Maak standard subdomein'; -$lng['admin']['deactivated'] = 'Gedeactieveerd'; -$lng['admin']['deactivated_user'] = 'Gebruiker deactiveren'; -$lng['admin']['sendpassword'] = 'Verstuur wachtwoord'; -$lng['admin']['ownvhostsettings'] = 'Eigen vHost-Instellingen'; -$lng['admin']['configfiles']['serverconfiguration'] = 'Configuratie'; -$lng['admin']['configfiles']['files'] = 'Configuratiebestanden: Wijzig de volgende bestanden of maak ze aan met
    de volgende inhoud als u dit nog niet gedaan heeft.
    Let Op: Het MySQL-wachtwoord is niet aangepast vanwege beveiligings overwegingen.
    Vervang "MYSQL_PASSWORD" zelf. Als u uw MYSQl wachtwoord vergeten bent
    kunt u het terugvinden in "lib/userdata.inc.php".'; -$lng['admin']['configfiles']['commands'] = 'Commando\'s: Start de volgende commando\'s in een shell.'; -$lng['admin']['configfiles']['restart'] = 'Herstarten: Start de volgende commando\'s in een shell zodat de configuratie opnieuw geladen wordt.'; -$lng['admin']['templates']['templates'] = 'Sjablonen'; -$lng['admin']['templates']['template_add'] = 'Maak sjabloon'; -$lng['admin']['templates']['template_edit'] = 'Bewerk sjabloon'; -$lng['admin']['templates']['action'] = 'Actie'; -$lng['admin']['templates']['email'] = 'E-Mail'; -$lng['admin']['templates']['subject'] = 'Onderwerp'; -$lng['admin']['templates']['mailbody'] = 'Mail inhoud'; -$lng['admin']['templates']['createcustomer'] = 'Welkomst bericht voor nieuwe klanten'; -$lng['admin']['templates']['pop_success'] = 'Welkomst bericht voor e-mail nieuw account'; -$lng['admin']['templates']['template_replace_vars'] = 'Variabelen die aangepast worden in het sjabloon:'; -$lng['admin']['templates']['FIRSTNAME'] = 'Vervangen door de voornaam van de klant.'; -$lng['admin']['templates']['NAME'] = 'Vervangen door de naam van de klant.'; -$lng['admin']['templates']['USERNAME'] = 'Vervangen door de gebruikersnaam van de klant.'; -$lng['admin']['templates']['PASSWORD'] = 'Vervangen door het wachtwoord van de klant.'; -$lng['admin']['templates']['EMAIL'] = 'Vervangen door het adres van het POP3/IMAP account.'; - -/** - * Serversettings - */ - -$lng['serversettings']['session_timeout']['title'] = 'Sessie Timeout'; -$lng['serversettings']['session_timeout']['description'] = 'Hoe lang moet een gebruiker inactief zijn voor dat de sessie ongeldig wordt (seconden)?'; -$lng['serversettings']['accountprefix']['title'] = 'Klant Voorvoegsel'; -$lng['serversettings']['accountprefix']['description'] = 'Welk voorvoegsel moet een klant account hebben?'; -$lng['serversettings']['mysqlprefix']['title'] = 'SQL Voorvoegsel'; -$lng['serversettings']['mysqlprefix']['description'] = 'Welk voorvoegsel moet een mysql account hebben?'; -$lng['serversettings']['ftpprefix']['title'] = 'FTP Voorvoegsel'; -$lng['serversettings']['ftpprefix']['description'] = 'Welk voorvoegsel moet een FTP account hebben?'; -$lng['serversettings']['documentroot_prefix']['title'] = 'Document map'; -$lng['serversettings']['documentroot_prefix']['description'] = 'Waar zullen alle gegeven opgeslagen worden?'; -$lng['serversettings']['logfiles_directory']['title'] = 'Logfiles map'; -$lng['serversettings']['logfiles_directory']['description'] = 'Waar zullen alle log-file opgeslagen worden?'; -$lng['serversettings']['ipaddress']['title'] = 'IP-Adres'; -$lng['serversettings']['ipaddress']['description'] = 'Wat is het IP-adres van deze server?'; -$lng['serversettings']['hostname']['title'] = 'Hostnaam'; -$lng['serversettings']['hostname']['description'] = 'Wat is de hostnaam van deze server?'; -$lng['serversettings']['apachereload_command']['title'] = 'Apache reload commando'; -$lng['serversettings']['apachereload_command']['description'] = 'Wat is het commando op apache te herladen?'; -$lng['serversettings']['bindconf_directory']['title'] = 'Bind configuratie map'; -$lng['serversettings']['bindconf_directory']['description'] = 'Waar staan de bind configuratie bestanden?'; -$lng['serversettings']['bindreload_command']['title'] = 'Bind reload commando'; -$lng['serversettings']['bindreload_command']['description'] = 'Wat is het command om bind te herladen?'; -$lng['serversettings']['binddefaultzone']['title'] = 'Bind default zone'; -$lng['serversettings']['binddefaultzone']['description'] = 'Wat is de naam van de default zone?'; -$lng['serversettings']['vmail_uid']['title'] = 'Mails-Uid'; -$lng['serversettings']['vmail_uid']['description'] = 'Welk UserID moeten de e-mails hebben?'; -$lng['serversettings']['vmail_gid']['title'] = 'Mails-Gid'; -$lng['serversettings']['vmail_gid']['description'] = 'Welke GroupID moeten e-mails hebben?'; -$lng['serversettings']['vmail_homedir']['title'] = 'Mails-Homedir'; -$lng['serversettings']['vmail_homedir']['description'] = 'Waar moeten alle e-mail opgeslagen worden?'; -$lng['serversettings']['adminmail']['title'] = 'Afzender'; -$lng['serversettings']['adminmail']['description'] = 'Wat is de afzender voor e-mail verstuurd vanuit het Panel?'; -$lng['serversettings']['phpmyadmin_url']['title'] = 'phpMyAdmin URL'; -$lng['serversettings']['phpmyadmin_url']['description'] = 'Wat is de URL die verwijst naar phpMyAdmin? (moet beginnen met http://)'; -$lng['serversettings']['webmail_url']['title'] = 'WebMail URL'; -$lng['serversettings']['webmail_url']['description'] = 'Wat is de URL die verwijst naar WebMail? (moet beginnen met http://)'; -$lng['serversettings']['webftp_url']['title'] = 'WebFTP URL'; -$lng['serversettings']['webftp_url']['description'] = 'Wat is de URL die verwijst naar WebFTP? (moet beginnen met http://)'; -$lng['serversettings']['language']['description'] = 'Wat is uw standaard server taal?'; -$lng['serversettings']['maxloginattempts']['title'] = 'Maximaal aantal inlog pogingen'; -$lng['serversettings']['maxloginattempts']['description'] = 'Maximaam aantal inlog pogingen voor het account gedeactiveerd wordt.'; -$lng['serversettings']['deactivatetime']['title'] = 'Deactivatie Tijd'; -$lng['serversettings']['deactivatetime']['description'] = 'Tijd (in seconden) dat een account gedeactiveerd word na te veel inlogpogingen.'; -$lng['serversettings']['pathedit']['title'] = 'Manier van Pad ingeven'; -$lng['serversettings']['pathedit']['description'] = 'Moet het pad geselecteerd worden met een \'dropdown\' menu of met een invoerveld?'; - -/** - * CHANGED BETWEEN 1.2.12 and 1.2.13 - */ - -$lng['mysql']['description'] = 'Hier kunt u MySQL-Databases maken en wijzigen.
    De wijzigingen worden direct gemaakt en de database kan direkt gebruikt worden.
    In het menu dat links staat vind u de tool phpMyAdmin welke u kunt gebruiken om uw database makkelijk te beheren.

    Om gebruikt te maken van uw database in uw eigen php programmas kunt u de volgende instellingen gebruiken: (De gegeven in italics moeten aangepast worden in wat u ingevoerd heeft!)
    Hostnaam:
    Gebruikersnaam: Databasenaam
    Wachtwoord: het wachtwoord dat u gekozen heeft
    Database: Databasenaam'; - -/** - * ADDED BETWEEN 1.2.12 and 1.2.13 - */ - -$lng['admin']['cronlastrun'] = 'Laatste Cron-run'; -$lng['serversettings']['paging']['title'] = 'Vermeldingen per pagina'; -$lng['serversettings']['paging']['description'] = 'Hoeveel vermeldingen er getoond moeten worden per pagina? (0 = alles laten zien)'; -$lng['error']['ipstillhasdomains'] = 'De IP/Port combinatie die u verwijderen wilt heeft nog domeinen toegewezen, wijs deze opnieuw to aan andere IP/Poort combinaties voordat u deze IP/Poort combinatie verwijderd.'; -$lng['error']['cantdeletedefaultip'] = 'U kunt de standaard reseller IP/Poort combinatie niet verwijderen, maak eerst een andere IP/Port combinatie standaard voor reseller voor dat u deze IP/Port combinatie verwijderd.'; -$lng['error']['cantdeletesystemip'] = 'U kunt het laatste IP/Poort combinatie van het systeem niet verwijderen, maak eerste een andere IP/Port combinatie aan voor het systeem of wijzig het ipadres van het systeem.'; -$lng['error']['myipaddress'] = '\'IP\''; -$lng['error']['myport'] = '\'Poort\''; -$lng['error']['myipdefault'] = 'U moet een IP/Poort combinatie selecteren die standaard moet worden.'; -$lng['error']['myipnotdouble'] = 'Deze IP/Poort combinatie bestaat reeds.'; -$lng['question']['admin_ip_reallydelete'] = 'Weet u zeker dat u het IP adres %s verwijderen wilt?'; -$lng['admin']['ipsandports']['ipsandports'] = 'IP-adressen en Poorten'; -$lng['admin']['ipsandports']['add'] = 'Maak IP/Poort'; -$lng['admin']['ipsandports']['edit'] = 'Bewerk IP/Poort'; -$lng['admin']['ipsandports']['ipandport'] = 'IP/Poort'; -$lng['admin']['ipsandports']['ip'] = 'IP'; -$lng['admin']['ipsandports']['port'] = 'Poort'; - -// ADDED IN 1.2.13-rc3 - -$lng['error']['cantchangesystemip'] = 'U kunt het laatste system IP niet wijzigen, maak eerst een nieuwe IP/Poort cominatie aan of wijzig het ip-adres van het systeem.'; -$lng['question']['admin_domain_reallydocrootoutofcustomerroot'] = 'Weet u zeker dat u de document root voor dit domein niet in de klant-root van de klant wil hebben?'; - -// ADDED IN 1.2.14-rc1 - -$lng['admin']['memorylimitdisabled'] = 'Gedeactiveerd'; -$lng['domain']['openbasedirpath'] = 'OpenBasedir-pad'; -$lng['domain']['docroot'] = 'Pad van bovenstaand veld'; -$lng['domain']['homedir'] = 'Home directory'; -$lng['admin']['valuemandatory'] = 'Deze waarde is verplicht'; -$lng['admin']['valuemandatorycompany'] = 'De waarde "naam" en "voornaam" of "bedrijf" moet ingevoerd worden'; -$lng['menue']['main']['username'] = 'Ingelogged als: '; -$lng['panel']['urloverridespath'] = 'URL (Vervangd path)'; -$lng['panel']['pathorurl'] = 'Pad of URL'; -$lng['error']['sessiontimeoutiswrong'] = 'Alleen nummerieke "Session Timeout" zijn toegestaan.'; -$lng['error']['maxloginattemptsiswrong'] = 'Alleen nummerieke "Maximaal aantal inlogpogingen" zijn toegestaan.'; -$lng['error']['deactivatetimiswrong'] = 'Allee nummerieke "Deactivatie Tijd" zijn toegestaan.'; -$lng['error']['accountprefixiswrong'] = 'Het "Klan voorvoegsel" is verkeerd.'; -$lng['error']['mysqlprefixiswrong'] = 'Het "SQL voorvoegsel" is verkeerd.'; -$lng['error']['ftpprefixiswrong'] = 'Het "FTP voorvoegsel" is verkeerd.'; -$lng['error']['ipiswrong'] = 'Het "IP-Adres" is verkeerd. Alleen een geldig ip-adres is toegestaan.'; -$lng['error']['vmailuidiswrong'] = 'Het "Mails-uid" is verkeerd. Alleen een nummeriek UID is toegestaan.'; -$lng['error']['vmailgidiswrong'] = 'Het "Mails-gid" is verkeerd. Alleen een nummeriek GID is toegestaan.'; -$lng['error']['adminmailiswrong'] = 'Het "Afzender-adres" is verkeerd. Alleen geldige e-mail adressen zijn toegestaan.'; -$lng['error']['pagingiswrong'] = 'Het aantal "Vermeldingen per pagina" is verkeerd. Alleen nummerieke karakters zijn toegestaan.'; -$lng['error']['phpmyadminiswrong'] = 'De phpMyAdmin-link is niet een geldige link.'; -$lng['error']['webmailiswrong'] = 'De WebMail-link is niet een geldige link.'; -$lng['error']['webftpiswrong'] = 'De WebFTP-link is niet een geldige link.'; -$lng['domains']['hasaliasdomains'] = 'Heeft alias domein(en)'; -$lng['serversettings']['defaultip']['title'] = 'Standaard IP/Poort'; -$lng['serversettings']['defaultip']['description'] = 'Wat is de standaard IP/Poort combinatie?'; -$lng['domains']['statstics'] = 'Gebruiks Statistieken'; -$lng['panel']['ascending'] = 'oplopend'; -$lng['panel']['decending'] = 'aflopend'; -$lng['panel']['search'] = 'Zoeken'; -$lng['panel']['used'] = 'gebruikt'; - -// ADDED IN 1.2.14-rc3 - -$lng['panel']['translator'] = 'Vertaler'; - -// ADDED IN 1.2.14-rc4 - -$lng['error']['stringformaterror'] = 'De waarde voor het veld "%s" is niet in het verwachte formaat.'; - -// ADDED IN 1.2.15-rc1 - -$lng['admin']['serversoftware'] = 'Serversoftware'; -$lng['admin']['phpversion'] = 'PHP-Versie'; -$lng['admin']['phpmemorylimit'] = 'PHP-Geheugen-Limiet'; -$lng['admin']['mysqlserverversion'] = 'MySQL Server Versie'; -$lng['admin']['mysqlclientversion'] = 'MySQL Client Versie'; -$lng['admin']['webserverinterface'] = 'Webserver Interface'; -$lng['domains']['isassigneddomain'] = 'Is toegewezen domein'; -$lng['serversettings']['phpappendopenbasedir']['title'] = 'Pad wat toegevoegd word aan OpenBasedir'; -$lng['serversettings']['phpappendopenbasedir']['description'] = 'Deze paden (gescheiden door dubbele punten) zullen worden toegevoegd aan het OpenBasedir-statement in iedere vhost-container.'; - -// CHANGED IN 1.2.15-rc1 - -$lng['error']['loginnameissystemaccount'] = 'U kunt geen accounts aanmaken die gelijk zijn aan systeem accounts (bijvoorbeeld beginnend met "%s"). Kies een andere accountnaam AUB.'; - -?> + + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Language + * @version $Id$ + */ + +/** + * Global + */ + +$lng['translator'] = 'Sander Klein'; +$lng['panel']['edit'] = 'bewerken'; +$lng['panel']['delete'] = 'verwijderen'; +$lng['panel']['create'] = 'nieuw'; +$lng['panel']['save'] = 'opslaan'; +$lng['panel']['yes'] = 'ja'; +$lng['panel']['no'] = 'nee'; +$lng['panel']['emptyfornochanges'] = 'leeg laten voor huidige instelling'; +$lng['panel']['emptyfordefault'] = 'leeg laten voor de standaard instellingen'; +$lng['panel']['path'] = 'Pad'; +$lng['panel']['toggle'] = 'In- of uitschalen'; +$lng['panel']['next'] = 'volgende'; +$lng['panel']['dirsmissing'] = 'Kan de map niet lezen of vinden!'; + +/** + * Login + */ + +$lng['login']['username'] = 'Gebruikersnaam'; +$lng['login']['password'] = 'Wachtwoord'; +$lng['login']['language'] = 'Taal'; +$lng['login']['login'] = 'Inloggen'; +$lng['login']['logout'] = 'Uitloggen'; +$lng['login']['profile_lng'] = 'Profiel taal'; + +/** + * Customer + */ + +$lng['customer']['documentroot'] = 'Home directory'; +$lng['customer']['name'] = 'Naam'; +$lng['customer']['firstname'] = 'Voornaam'; +$lng['customer']['company'] = 'Bedrijfsnaam'; +$lng['customer']['street'] = 'Straat'; +$lng['customer']['zipcode'] = 'Postcode'; +$lng['customer']['city'] = 'Plaats'; +$lng['customer']['phone'] = 'Telefoonnummer'; +$lng['customer']['fax'] = 'Faxnummer'; +$lng['customer']['email'] = 'Email'; +$lng['customer']['customernumber'] = 'Klant ID'; +$lng['customer']['diskspace'] = 'Webruimte (MB)'; +$lng['customer']['traffic'] = 'Verkeer (GB)'; +$lng['customer']['mysqls'] = 'MySQL-Databases'; +$lng['customer']['emails'] = 'E-mail-Adressen'; +$lng['customer']['accounts'] = 'E-mail-Accounts'; +$lng['customer']['forwarders'] = 'E-mail-Forwarders'; +$lng['customer']['ftps'] = 'FTP-Accounts'; +$lng['customer']['subdomains'] = 'Sub-Domein(en)'; +$lng['customer']['domains'] = 'Domein(en)'; +$lng['customer']['unlimited'] = 'onbeperkt'; + +/** + * Customermenue + */ + +$lng['menue']['main']['main'] = 'Main'; +$lng['menue']['main']['changepassword'] = 'Wijzig wachtwoord'; +$lng['menue']['main']['changelanguage'] = 'Wijzig taal'; +$lng['menue']['email']['email'] = 'E-mail'; +$lng['menue']['email']['emails'] = 'Adressen'; +$lng['menue']['email']['webmail'] = 'WebMail'; +$lng['menue']['mysql']['mysql'] = 'MySQL'; +$lng['menue']['mysql']['databases'] = 'Databases'; +$lng['menue']['mysql']['phpmyadmin'] = 'phpMyAdmin'; +$lng['menue']['domains']['domains'] = 'Domeinen'; +$lng['menue']['domains']['settings'] = 'Instellingen'; +$lng['menue']['ftp']['ftp'] = 'FTP'; +$lng['menue']['ftp']['accounts'] = 'Accounts'; +$lng['menue']['ftp']['webftp'] = 'WebFTP'; +$lng['menue']['extras']['extras'] = 'Extras'; +$lng['menue']['extras']['directoryprotection'] = 'Map beveiliging'; +$lng['menue']['extras']['pathoptions'] = 'pad opties'; + +/** + * Index + */ + +$lng['index']['customerdetails'] = 'Klant Details'; +$lng['index']['accountdetails'] = 'Account Details'; + +/** + * Change Password + */ + +$lng['changepassword']['old_password'] = 'Oud wachtwoord'; +$lng['changepassword']['new_password'] = 'Nieuw wachtwoord'; +$lng['changepassword']['new_password_confirm'] = 'Nieuw wacthwoord (bevestigen)'; +$lng['changepassword']['new_password_ifnotempty'] = 'Nieuw wachtwoord (leeg = niet veranderen)'; +$lng['changepassword']['also_change_ftp'] = ' wijzig ook het wachtwoord van het hoofd FTP account'; + +/** + * Domains + */ + +$lng['domains']['description'] = 'Hier kunt u nieuwe (sub-) domeinen maken en de paden aanpassen.
    Het systeem heeft een paar minuten nodig om de wijzigingen door te voeren na iedere varandering.'; +$lng['domains']['domainsettings'] = 'Domein instellingen'; +$lng['domains']['domainname'] = 'Domeinnaam'; +$lng['domains']['subdomain_add'] = 'Maak subdomein'; +$lng['domains']['subdomain_edit'] = 'Bewerk (sub)domein'; +$lng['domains']['wildcarddomain'] = 'Maak als wildcarddomein?'; +$lng['domains']['aliasdomain'] = 'Alias voor domein'; +$lng['domains']['noaliasdomain'] = 'Geen alias domein'; + +/** + * E-mails + */ + +$lng['emails']['description'] = 'Hier kunt u e-mail adressen maken en wijzigen.
    Een aacount is net als een brievenbus voor uw huis. Als iemand u mail stuurd word dit op uw account bezorgt.

    Om uw emails te downloaden moet u het volgende installen in uw mail programma: (De schuigedrukte gegevens moeten gewijzigd worden in hetgeen dat u ingegeven heeft!)
    Servernaam: Domeinnaam
    Gebruikersnaam: Account naam / e-mail adres
    Wachtwoord: het door u ingegeven wachtwoord'; +$lng['emails']['emailaddress'] = 'E-mail adres'; +$lng['emails']['emails_add'] = 'Maak nieuw e-mail adres'; +$lng['emails']['emails_edit'] = 'Bewerk e-mail-adres'; +$lng['emails']['catchall'] = 'Catchall'; +$lng['emails']['iscatchall'] = 'Definieer als catchall-adres?'; +$lng['emails']['account'] = 'Account'; +$lng['emails']['account_add'] = 'Maak nieuw account'; +$lng['emails']['account_delete'] = 'Verwijder account'; +$lng['emails']['from'] = 'Van'; +$lng['emails']['to'] = 'Aan'; +$lng['emails']['forwarders'] = 'Forwarders'; +$lng['emails']['forwarder_add'] = 'Maak forwarder'; + +/** + * FTP + */ + +$lng['ftp']['description'] = 'Hier kunt u nieuwe FTP accounts maken of bestaande accounts wijzigen.
    De wijzigingen worden direct doorgevoerd en het account kan direct gebruikt worden.'; +$lng['ftp']['account_add'] = 'Maak nieuw account'; + +/** + * MySQL + */ + +$lng['mysql']['databasename'] = 'gebruiker/database naam'; +$lng['mysql']['databasedescription'] = 'database omschrijving'; +$lng['mysql']['database_create'] = 'Maak database'; + +/** + * Extras + */ + +$lng['extras']['description'] = 'Hier kunt u wat extra instellingen doen zoals map beveiliging.
    Het systeem heeft enkele minuten nodig om elke wijziging door te voeren.'; +$lng['extras']['directoryprotection_add'] = 'Map beveiliging toevoegen'; +$lng['extras']['view_directory'] = 'map inhoud laten zien'; +$lng['extras']['pathoptions_add'] = 'Pad opties toevoegen'; +$lng['extras']['directory_browsing'] = 'map inhoud browsen'; +$lng['extras']['pathoptions_edit'] = 'Pad opties bewerken'; +$lng['extras']['error404path'] = '404'; +$lng['extras']['error403path'] = '403'; +$lng['extras']['error500path'] = '500'; +$lng['extras']['error401path'] = '401'; +$lng['extras']['errordocument404path'] = 'URL naar Foutdocument 404'; +$lng['extras']['errordocument403path'] = 'URL naar Foutdocument 403'; +$lng['extras']['errordocument500path'] = 'URL naar Foutdocument 500'; +$lng['extras']['errordocument401path'] = 'URL naar Foutducument 401'; + +/** + * Errors + */ + +$lng['error']['error'] = 'Fout'; +$lng['error']['directorymustexist'] = 'De map %s bestaat niet. Maak hem eerst aan met uw FTP client.'; +$lng['error']['filemustexist'] = 'Het bestand %s bestaat niet.'; +$lng['error']['allresourcesused'] = 'U heeft al uw resources al gebruikt.'; +$lng['error']['domains_cantdeletemaindomain'] = 'U kunt een domein dat gebruikt word als email-domein niet verwijderen.'; +$lng['error']['domains_canteditdomain'] = 'U kunt dit domein niet aanpassen. Dit is door de admin onbruikbaar gemaakt.'; +$lng['error']['domains_cantdeletedomainwithemail'] = 'U kunt een domein dat gebruikt word als email-domein niet verwijderen. Verwijder eerst alle e-mail adressen.'; +$lng['error']['firstdeleteallsubdomains'] = 'U moet eerst alle subdomeinen verwijderen voor u een wildcard domein kunt maken.'; +$lng['error']['youhavealreadyacatchallforthisdomain'] = 'U heeft al een catchall voor dit domein aangemaakt.'; +$lng['error']['ftp_cantdeletemainaccount'] = 'U kunt uw hoofd FTP account niet verwijderen'; +$lng['error']['login'] = 'De door u ingegeven gebruikersnaam en wacthwoord zijn verkeerd. Probeer opnieuw!'; +$lng['error']['login_blocked'] = 'Dit account is inactief vanwege teveel login fouten.
    Probeer het nog eens over ' . $settings['login']['deactivatetime'] . ' seconden.'; +$lng['error']['notallreqfieldsorerrors'] = 'U heeft niet alle velden goed, of helemaal niet ingevuld.'; +$lng['error']['oldpasswordnotcorrect'] = 'Het oude wachtwoord is niet correct.'; +$lng['error']['youcantallocatemorethanyouhave'] = 'U kunt niet meer resources gebruiken dan dat u bezit.'; +$lng['error']['mustbeurl'] = 'U heeft geen goed of compleet URL ingegeven (bijv. http://eenserver.com/error404.htm)'; +$lng['error']['invalidpath'] = 'U heeft geen goed URL ingegeven (misschien een probleem met dirlisting?)'; +$lng['error']['stringisempty'] = 'Geen waarde in invoerveld'; +$lng['error']['stringiswrong'] = 'Verkeerde waarde in invoerveld'; +$lng['error']['myloginname'] = '\'' . $lng['login']['username'] . '\''; +$lng['error']['mypassword'] = '\'' . $lng['login']['password'] . '\''; +$lng['error']['oldpassword'] = '\'' . $lng['changepassword']['old_password'] . '\''; +$lng['error']['newpassword'] = '\'' . $lng['changepassword']['new_password'] . '\''; +$lng['error']['newpasswordconfirm'] = '\'' . $lng['changepassword']['new_password_confirm'] . '\''; +$lng['error']['newpasswordconfirmerror'] = 'Het nieuwe wacthwoord en de bevestiging zijn niet gelijk'; +$lng['error']['myname'] = '\'' . $lng['customer']['name'] . '\''; +$lng['error']['myfirstname'] = '\'' . $lng['customer']['firstname'] . '\''; +$lng['error']['emailadd'] = '\'' . $lng['customer']['email'] . '\''; +$lng['error']['mydomain'] = '\'Domain\''; +$lng['error']['mydocumentroot'] = '\'Documentroot\''; +$lng['error']['loginnameexists'] = 'Loginnaam %s bestaat al'; +$lng['error']['emailiswrong'] = 'E-mail Adres %s bevat illegale karakters of is niet compleet'; +$lng['error']['loginnameiswrong'] = 'Loginnaame %s bevat illegale karakters'; +$lng['error']['userpathcombinationdupe'] = 'Combinatie van Gebruikersnaam en Pad bestaat reeds'; +$lng['error']['patherror'] = 'Generale Fout! pad kan niet leeg zijn'; +$lng['error']['errordocpathdupe'] = 'Optie voor pad %s bestaat reeds'; +$lng['error']['adduserfirst'] = 'Maak klant eerst aan, aub'; +$lng['error']['domainalreadyexists'] = 'Het domein %s is al aan een klant toegewezen'; +$lng['error']['nolanguageselect'] = 'Geen taal geselecteerd.'; +$lng['error']['nosubjectcreate'] = 'U moet een onderwerp ingeven voor dit e-mail sjabloon.'; +$lng['error']['nomailbodycreate'] = 'U moet een tekst ingeven voor dit e-mail sjabloon.'; +$lng['error']['templatenotfound'] = 'Sjabloon niet gevonden.'; +$lng['error']['alltemplatesdefined'] = 'U kunt niet meer sjablonen definieeren, alle talen worden al ondersteund.'; +$lng['error']['wwwnotallowed'] = 'www is niet toegestaan voor subdomeinen.'; +$lng['error']['subdomainiswrong'] = 'Het subdomein %s bevat illegale karakters.'; +$lng['error']['domaincantbeempty'] = 'De domeinnaam kan niet leeg zijn.'; +$lng['error']['domainexistalready'] = 'Het domein %s bestaads reeds.'; +$lng['error']['domainisaliasorothercustomer'] = 'Het geselecteerde alias domein verwijsd naar zichzelf of is van een andere gebruiker.'; +$lng['error']['emailexistalready'] = 'Het e-mail adres %s bestaat reeds.'; +$lng['error']['maindomainnonexist'] = 'Het hoofd-domein %s bestaat niet.'; +$lng['error']['destinationnonexist'] = 'Maak uw forwarder in het veld \'Destination\' alstublieft.'; +$lng['error']['destinationalreadyexistasmail'] = 'De forwarder naar %s bestaat reeds als actief e-mail adres.'; +$lng['error']['destinationalreadyexist'] = 'U heeft al een forwarder die verwijst naar %s .'; +$lng['error']['destinationiswrong'] = 'De forwarder naar %s bevat illegale karakter(s) of is niet compleet.'; +$lng['error']['domainname'] = $lng['domains']['domainname']; + +/** + * Questions + */ + +$lng['question']['question'] = 'Beveiligings vraag'; +$lng['question']['admin_customer_reallydelete'] = 'Weet u zeker dat u de klant %s wilt verwijderen? Dit kan niet ongedaan worden gemaakt!'; +$lng['question']['admin_domain_reallydelete'] = 'Weet u zeker dat u het domein %s wilt verwijderen?'; +$lng['question']['admin_domain_reallydisablesecuritysetting'] = 'Weet u echt heel zeker dat deze beveiligings instellingen wilt deactiveren (OpenBasedir en/of SafeMode)?'; +$lng['question']['admin_admin_reallydelete'] = 'Weet u zeker dat u de admin %s verwijderen wilt? Iedere klant en domein zal worden toegewezen aan de hoofd administrator.'; +$lng['question']['admin_template_reallydelete'] = 'Weet u zeker dat u het sjabloon \'%s\' verwijderen wilt?'; +$lng['question']['domains_reallydelete'] = 'Weet u zeker dat u het domein %s verwijderen wilt?'; +$lng['question']['email_reallydelete'] = 'Weet u zeker dat u het e-mail adres %s verwijderen wilt?'; +$lng['question']['email_reallydelete_account'] = 'Weet u zeker dat het e-mail account van %s verwijderen wilt?'; +$lng['question']['email_reallydelete_forwarder'] = 'Weet u zeker dat u de forwarder %s verwijderen wilt?'; +$lng['question']['extras_reallydelete'] = 'Weet u zeker dat u de map beveiliging voor de map %s verwijderen wilt?'; +$lng['question']['extras_reallydelete_pathoptions'] = 'Weet u zeker dat u de pad-opties voor %s verwijderen wilt?'; +$lng['question']['ftp_reallydelete'] = 'Weet u zeker dat u het FTP account %s verwijderen wilt?'; +$lng['question']['mysql_reallydelete'] = 'Weet u zeker dat u de database %s verwijderen wilt? Dit kan niet ongedaan gemaakt worden!'; +$lng['question']['admin_configs_reallyrebuild'] = 'Weet u zeker dat u de configuratie bestanden voor Apache en Bind opnieuw wilt opbouwen?'; + +/** + * Mails + */ + +$lng['mails']['pop_success']['mailbody'] = 'Hallo,\n\nUw mail account {EMAIL}\nis succesvol aangemaakt.\n\nDit is een automatisch verstuurde\ne-mail, beantwoord deze niet AUB!\n\nMet vriendelijke groet, het Froxlor-Team'; +$lng['mails']['pop_success']['subject'] = 'Mail account succesvol aangemaakt'; +$lng['mails']['createcustomer']['mailbody'] = 'Hallo {FIRSTNAME} {NAME},\n\nhierbij uw account informatie:\n\nGebruikersnaam: {USERNAME}\nWachtwoord: {PASSWORD}\n\nMet vriendelijke groet,\nhet Froxlor-Team'; +$lng['mails']['createcustomer']['subject'] = 'Account informatie'; + +/** + * Admin + */ + +$lng['admin']['overview'] = 'Overzicht'; +$lng['admin']['ressourcedetails'] = 'Gebruikte resources'; +$lng['admin']['systemdetails'] = 'Systeem Details'; +$lng['admin']['froxlordetails'] = 'Froxlor Details'; +$lng['admin']['installedversion'] = 'Geinstalleerde Versie'; +$lng['admin']['latestversion'] = 'Laatste Versie'; +$lng['admin']['lookfornewversion']['clickhere'] = 'zoeken via webservice'; +$lng['admin']['lookfornewversion']['error'] = 'Fout tijdens lezen'; +$lng['admin']['resources'] = 'Resources'; +$lng['admin']['customer'] = 'Klant'; +$lng['admin']['customers'] = 'Klanten'; +$lng['admin']['customer_add'] = 'Maak klant'; +$lng['admin']['customer_edit'] = 'Bewerk klant'; +$lng['admin']['domains'] = 'Domeinen'; +$lng['admin']['domain_add'] = 'Maak domein'; +$lng['admin']['domain_edit'] = 'Bewerk domein'; +$lng['admin']['subdomainforemail'] = 'Subdomein als emaildomein'; +$lng['admin']['admin'] = 'Beheerder'; +$lng['admin']['admins'] = 'Beheerders'; +$lng['admin']['admin_add'] = 'Maak beheerder'; +$lng['admin']['admin_edit'] = 'Bewerk beheerder'; +$lng['admin']['customers_see_all'] = 'Kan alle klanten zien?'; +$lng['admin']['domains_see_all'] = 'Kan alle domeinen zien?'; +$lng['admin']['change_serversettings'] = 'Kan server instellingen aanpassen?'; +$lng['admin']['server'] = 'Server'; +$lng['admin']['serversettings'] = 'Instellingen'; +$lng['admin']['rebuildconf'] = 'Configuratie bestanden opnieuw aanmaken'; +$lng['admin']['stdsubdomain'] = 'Standaard subdomein'; +$lng['admin']['stdsubdomain_add'] = 'Maak standard subdomein'; +$lng['admin']['deactivated'] = 'Gedeactieveerd'; +$lng['admin']['deactivated_user'] = 'Gebruiker deactiveren'; +$lng['admin']['sendpassword'] = 'Verstuur wachtwoord'; +$lng['admin']['ownvhostsettings'] = 'Eigen vHost-Instellingen'; +$lng['admin']['configfiles']['serverconfiguration'] = 'Configuratie'; +$lng['admin']['configfiles']['files'] = 'Configuratiebestanden: Wijzig de volgende bestanden of maak ze aan met
    de volgende inhoud als u dit nog niet gedaan heeft.
    Let Op: Het MySQL-wachtwoord is niet aangepast vanwege beveiligings overwegingen.
    Vervang "MYSQL_PASSWORD" zelf. Als u uw MYSQl wachtwoord vergeten bent
    kunt u het terugvinden in "lib/userdata.inc.php".'; +$lng['admin']['configfiles']['commands'] = 'Commando\'s: Start de volgende commando\'s in een shell.'; +$lng['admin']['configfiles']['restart'] = 'Herstarten: Start de volgende commando\'s in een shell zodat de configuratie opnieuw geladen wordt.'; +$lng['admin']['templates']['templates'] = 'Sjablonen'; +$lng['admin']['templates']['template_add'] = 'Maak sjabloon'; +$lng['admin']['templates']['template_edit'] = 'Bewerk sjabloon'; +$lng['admin']['templates']['action'] = 'Actie'; +$lng['admin']['templates']['email'] = 'E-Mail'; +$lng['admin']['templates']['subject'] = 'Onderwerp'; +$lng['admin']['templates']['mailbody'] = 'Mail inhoud'; +$lng['admin']['templates']['createcustomer'] = 'Welkomst bericht voor nieuwe klanten'; +$lng['admin']['templates']['pop_success'] = 'Welkomst bericht voor e-mail nieuw account'; +$lng['admin']['templates']['template_replace_vars'] = 'Variabelen die aangepast worden in het sjabloon:'; +$lng['admin']['templates']['FIRSTNAME'] = 'Vervangen door de voornaam van de klant.'; +$lng['admin']['templates']['NAME'] = 'Vervangen door de naam van de klant.'; +$lng['admin']['templates']['USERNAME'] = 'Vervangen door de gebruikersnaam van de klant.'; +$lng['admin']['templates']['PASSWORD'] = 'Vervangen door het wachtwoord van de klant.'; +$lng['admin']['templates']['EMAIL'] = 'Vervangen door het adres van het POP3/IMAP account.'; + +/** + * Serversettings + */ + +$lng['serversettings']['session_timeout']['title'] = 'Sessie Timeout'; +$lng['serversettings']['session_timeout']['description'] = 'Hoe lang moet een gebruiker inactief zijn voor dat de sessie ongeldig wordt (seconden)?'; +$lng['serversettings']['accountprefix']['title'] = 'Klant Voorvoegsel'; +$lng['serversettings']['accountprefix']['description'] = 'Welk voorvoegsel moet een klant account hebben?'; +$lng['serversettings']['mysqlprefix']['title'] = 'SQL Voorvoegsel'; +$lng['serversettings']['mysqlprefix']['description'] = 'Welk voorvoegsel moet een mysql account hebben?'; +$lng['serversettings']['ftpprefix']['title'] = 'FTP Voorvoegsel'; +$lng['serversettings']['ftpprefix']['description'] = 'Welk voorvoegsel moet een FTP account hebben?'; +$lng['serversettings']['documentroot_prefix']['title'] = 'Document map'; +$lng['serversettings']['documentroot_prefix']['description'] = 'Waar zullen alle gegeven opgeslagen worden?'; +$lng['serversettings']['logfiles_directory']['title'] = 'Logfiles map'; +$lng['serversettings']['logfiles_directory']['description'] = 'Waar zullen alle log-file opgeslagen worden?'; +$lng['serversettings']['ipaddress']['title'] = 'IP-Adres'; +$lng['serversettings']['ipaddress']['description'] = 'Wat is het IP-adres van deze server?'; +$lng['serversettings']['hostname']['title'] = 'Hostnaam'; +$lng['serversettings']['hostname']['description'] = 'Wat is de hostnaam van deze server?'; +$lng['serversettings']['apachereload_command']['title'] = 'Apache reload commando'; +$lng['serversettings']['apachereload_command']['description'] = 'Wat is het commando op apache te herladen?'; +$lng['serversettings']['bindconf_directory']['title'] = 'Bind configuratie map'; +$lng['serversettings']['bindconf_directory']['description'] = 'Waar staan de bind configuratie bestanden?'; +$lng['serversettings']['bindreload_command']['title'] = 'Bind reload commando'; +$lng['serversettings']['bindreload_command']['description'] = 'Wat is het command om bind te herladen?'; +$lng['serversettings']['binddefaultzone']['title'] = 'Bind default zone'; +$lng['serversettings']['binddefaultzone']['description'] = 'Wat is de naam van de default zone?'; +$lng['serversettings']['vmail_uid']['title'] = 'Mails-Uid'; +$lng['serversettings']['vmail_uid']['description'] = 'Welk UserID moeten de e-mails hebben?'; +$lng['serversettings']['vmail_gid']['title'] = 'Mails-Gid'; +$lng['serversettings']['vmail_gid']['description'] = 'Welke GroupID moeten e-mails hebben?'; +$lng['serversettings']['vmail_homedir']['title'] = 'Mails-Homedir'; +$lng['serversettings']['vmail_homedir']['description'] = 'Waar moeten alle e-mail opgeslagen worden?'; +$lng['serversettings']['adminmail']['title'] = 'Afzender'; +$lng['serversettings']['adminmail']['description'] = 'Wat is de afzender voor e-mail verstuurd vanuit het Panel?'; +$lng['serversettings']['phpmyadmin_url']['title'] = 'phpMyAdmin URL'; +$lng['serversettings']['phpmyadmin_url']['description'] = 'Wat is de URL die verwijst naar phpMyAdmin? (moet beginnen met http://)'; +$lng['serversettings']['webmail_url']['title'] = 'WebMail URL'; +$lng['serversettings']['webmail_url']['description'] = 'Wat is de URL die verwijst naar WebMail? (moet beginnen met http://)'; +$lng['serversettings']['webftp_url']['title'] = 'WebFTP URL'; +$lng['serversettings']['webftp_url']['description'] = 'Wat is de URL die verwijst naar WebFTP? (moet beginnen met http://)'; +$lng['serversettings']['language']['description'] = 'Wat is uw standaard server taal?'; +$lng['serversettings']['maxloginattempts']['title'] = 'Maximaal aantal inlog pogingen'; +$lng['serversettings']['maxloginattempts']['description'] = 'Maximaam aantal inlog pogingen voor het account gedeactiveerd wordt.'; +$lng['serversettings']['deactivatetime']['title'] = 'Deactivatie Tijd'; +$lng['serversettings']['deactivatetime']['description'] = 'Tijd (in seconden) dat een account gedeactiveerd word na te veel inlogpogingen.'; +$lng['serversettings']['pathedit']['title'] = 'Manier van Pad ingeven'; +$lng['serversettings']['pathedit']['description'] = 'Moet het pad geselecteerd worden met een \'dropdown\' menu of met een invoerveld?'; + +/** + * CHANGED BETWEEN 1.2.12 and 1.2.13 + */ + +$lng['mysql']['description'] = 'Hier kunt u MySQL-Databases maken en wijzigen.
    De wijzigingen worden direct gemaakt en de database kan direkt gebruikt worden.
    In het menu dat links staat vind u de tool phpMyAdmin welke u kunt gebruiken om uw database makkelijk te beheren.

    Om gebruikt te maken van uw database in uw eigen php programmas kunt u de volgende instellingen gebruiken: (De gegeven in italics moeten aangepast worden in wat u ingevoerd heeft!)
    Hostnaam:
    Gebruikersnaam: Databasenaam
    Wachtwoord: het wachtwoord dat u gekozen heeft
    Database: Databasenaam'; + +/** + * ADDED BETWEEN 1.2.12 and 1.2.13 + */ + +$lng['admin']['cronlastrun'] = 'Laatste Cron-run'; +$lng['serversettings']['paging']['title'] = 'Vermeldingen per pagina'; +$lng['serversettings']['paging']['description'] = 'Hoeveel vermeldingen er getoond moeten worden per pagina? (0 = alles laten zien)'; +$lng['error']['ipstillhasdomains'] = 'De IP/Port combinatie die u verwijderen wilt heeft nog domeinen toegewezen, wijs deze opnieuw to aan andere IP/Poort combinaties voordat u deze IP/Poort combinatie verwijderd.'; +$lng['error']['cantdeletedefaultip'] = 'U kunt de standaard reseller IP/Poort combinatie niet verwijderen, maak eerst een andere IP/Port combinatie standaard voor reseller voor dat u deze IP/Port combinatie verwijderd.'; +$lng['error']['cantdeletesystemip'] = 'U kunt het laatste IP/Poort combinatie van het systeem niet verwijderen, maak eerste een andere IP/Port combinatie aan voor het systeem of wijzig het ipadres van het systeem.'; +$lng['error']['myipaddress'] = '\'IP\''; +$lng['error']['myport'] = '\'Poort\''; +$lng['error']['myipdefault'] = 'U moet een IP/Poort combinatie selecteren die standaard moet worden.'; +$lng['error']['myipnotdouble'] = 'Deze IP/Poort combinatie bestaat reeds.'; +$lng['question']['admin_ip_reallydelete'] = 'Weet u zeker dat u het IP adres %s verwijderen wilt?'; +$lng['admin']['ipsandports']['ipsandports'] = 'IP-adressen en Poorten'; +$lng['admin']['ipsandports']['add'] = 'Maak IP/Poort'; +$lng['admin']['ipsandports']['edit'] = 'Bewerk IP/Poort'; +$lng['admin']['ipsandports']['ipandport'] = 'IP/Poort'; +$lng['admin']['ipsandports']['ip'] = 'IP'; +$lng['admin']['ipsandports']['port'] = 'Poort'; + +// ADDED IN 1.2.13-rc3 + +$lng['error']['cantchangesystemip'] = 'U kunt het laatste system IP niet wijzigen, maak eerst een nieuwe IP/Poort cominatie aan of wijzig het ip-adres van het systeem.'; +$lng['question']['admin_domain_reallydocrootoutofcustomerroot'] = 'Weet u zeker dat u de document root voor dit domein niet in de klant-root van de klant wil hebben?'; + +// ADDED IN 1.2.14-rc1 + +$lng['admin']['memorylimitdisabled'] = 'Gedeactiveerd'; +$lng['domain']['openbasedirpath'] = 'OpenBasedir-pad'; +$lng['domain']['docroot'] = 'Pad van bovenstaand veld'; +$lng['domain']['homedir'] = 'Home directory'; +$lng['admin']['valuemandatory'] = 'Deze waarde is verplicht'; +$lng['admin']['valuemandatorycompany'] = 'De waarde "naam" en "voornaam" of "bedrijf" moet ingevoerd worden'; +$lng['menue']['main']['username'] = 'Ingelogged als: '; +$lng['panel']['urloverridespath'] = 'URL (Vervangd path)'; +$lng['panel']['pathorurl'] = 'Pad of URL'; +$lng['error']['sessiontimeoutiswrong'] = 'Alleen nummerieke "Session Timeout" zijn toegestaan.'; +$lng['error']['maxloginattemptsiswrong'] = 'Alleen nummerieke "Maximaal aantal inlogpogingen" zijn toegestaan.'; +$lng['error']['deactivatetimiswrong'] = 'Allee nummerieke "Deactivatie Tijd" zijn toegestaan.'; +$lng['error']['accountprefixiswrong'] = 'Het "Klan voorvoegsel" is verkeerd.'; +$lng['error']['mysqlprefixiswrong'] = 'Het "SQL voorvoegsel" is verkeerd.'; +$lng['error']['ftpprefixiswrong'] = 'Het "FTP voorvoegsel" is verkeerd.'; +$lng['error']['ipiswrong'] = 'Het "IP-Adres" is verkeerd. Alleen een geldig ip-adres is toegestaan.'; +$lng['error']['vmailuidiswrong'] = 'Het "Mails-uid" is verkeerd. Alleen een nummeriek UID is toegestaan.'; +$lng['error']['vmailgidiswrong'] = 'Het "Mails-gid" is verkeerd. Alleen een nummeriek GID is toegestaan.'; +$lng['error']['adminmailiswrong'] = 'Het "Afzender-adres" is verkeerd. Alleen geldige e-mail adressen zijn toegestaan.'; +$lng['error']['pagingiswrong'] = 'Het aantal "Vermeldingen per pagina" is verkeerd. Alleen nummerieke karakters zijn toegestaan.'; +$lng['error']['phpmyadminiswrong'] = 'De phpMyAdmin-link is niet een geldige link.'; +$lng['error']['webmailiswrong'] = 'De WebMail-link is niet een geldige link.'; +$lng['error']['webftpiswrong'] = 'De WebFTP-link is niet een geldige link.'; +$lng['domains']['hasaliasdomains'] = 'Heeft alias domein(en)'; +$lng['serversettings']['defaultip']['title'] = 'Standaard IP/Poort'; +$lng['serversettings']['defaultip']['description'] = 'Wat is de standaard IP/Poort combinatie?'; +$lng['domains']['statstics'] = 'Gebruiks Statistieken'; +$lng['panel']['ascending'] = 'oplopend'; +$lng['panel']['decending'] = 'aflopend'; +$lng['panel']['search'] = 'Zoeken'; +$lng['panel']['used'] = 'gebruikt'; + +// ADDED IN 1.2.14-rc3 + +$lng['panel']['translator'] = 'Vertaler'; + +// ADDED IN 1.2.14-rc4 + +$lng['error']['stringformaterror'] = 'De waarde voor het veld "%s" is niet in het verwachte formaat.'; + +// ADDED IN 1.2.15-rc1 + +$lng['admin']['serversoftware'] = 'Serversoftware'; +$lng['admin']['phpversion'] = 'PHP-Versie'; +$lng['admin']['phpmemorylimit'] = 'PHP-Geheugen-Limiet'; +$lng['admin']['mysqlserverversion'] = 'MySQL Server Versie'; +$lng['admin']['mysqlclientversion'] = 'MySQL Client Versie'; +$lng['admin']['webserverinterface'] = 'Webserver Interface'; +$lng['domains']['isassigneddomain'] = 'Is toegewezen domein'; +$lng['serversettings']['phpappendopenbasedir']['title'] = 'Pad wat toegevoegd word aan OpenBasedir'; +$lng['serversettings']['phpappendopenbasedir']['description'] = 'Deze paden (gescheiden door dubbele punten) zullen worden toegevoegd aan het OpenBasedir-statement in iedere vhost-container.'; + +// CHANGED IN 1.2.15-rc1 + +$lng['error']['loginnameissystemaccount'] = 'U kunt geen accounts aanmaken die gelijk zijn aan systeem accounts (bijvoorbeeld beginnend met "%s"). Kies een andere accountnaam AUB.'; + +?> diff --git a/lng/french.lng.php b/lng/french.lng.php index ef608ef7..a1129623 100644 --- a/lng/french.lng.php +++ b/lng/french.lng.php @@ -1,1105 +1,1105 @@ - - * @author Aldo Reset - * @author Romain MARIADASSOU - * @author Froxlor Team - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Language - * @version $Id$ - */ - -/** - * Some importants rules of typograhie in french : - * These signs << ! ? : " & >> must be be preceded by white space - * -> We can make the white space like that : <<   >> - * -> so the white space is still committed to the previous letter and punctuation mark as follows. - * These signs << . ; , ' >> should be glued to the previous letter - * These signs << / | = >> would be preceded and followed with a white as mush as possible, it is much clear from reading. - */ - -/** - * Global - */ - -$lng['translator'] = 'Tim Zielosko, Aldo Reset, Romain MARIADASSOU'; -$lng['panel']['edit'] = 'Modifier'; -$lng['panel']['delete'] = 'Supprimer'; -$lng['panel']['create'] = 'Ajouter'; -$lng['panel']['save'] = 'Sauvegarder'; -$lng['panel']['yes'] = 'Oui'; -$lng['panel']['no'] = 'Non'; -$lng['panel']['emptyfornochanges'] = 'Laissez vide pour ne pas modifier'; -$lng['panel']['emptyfordefault'] = 'Laissez vide pour l\'option standard'; -$lng['panel']['path'] = 'Dossier'; -$lng['panel']['toggle'] = 'Activer / Désactiver'; -$lng['panel']['next'] = 'continuer'; -$lng['panel']['dirsmissing'] = 'Dossiers non disponibles ou illisibles'; - -/** - * Login - */ - -$lng['login']['username'] = 'Identifiant'; -$lng['login']['password'] = 'Mot de passe'; -$lng['login']['language'] = 'Langue'; -$lng['login']['login'] = 'Se connecter'; -$lng['login']['logout'] = 'Se déconnecter'; -$lng['login']['profile_lng'] = 'Langue du profil'; - -/** - * Customer - */ - -$lng['customer']['documentroot'] = 'Chemin'; -$lng['customer']['name'] = 'Nom'; -$lng['customer']['firstname'] = 'Prénom'; -$lng['customer']['company'] = 'Entreprise'; -$lng['customer']['street'] = 'Rue'; -$lng['customer']['zipcode'] = 'Code postal'; -$lng['customer']['city'] = 'Ville'; -$lng['customer']['phone'] = 'Téléphone'; -$lng['customer']['fax'] = 'Fax'; -$lng['customer']['email'] = 'E-mail'; -$lng['customer']['customernumber'] = 'Numéro du client'; -$lng['customer']['diskspace'] = 'Espace Web (Mo)'; -$lng['customer']['traffic'] = 'Trafic (Go)'; -$lng['customer']['mysqls'] = 'Base(s) de données MySQL'; -$lng['customer']['emails'] = 'Adresse(s) e-mail'; -$lng['customer']['accounts'] = 'Accčs e-mail'; -$lng['customer']['forwarders'] = 'Transfert(s) e-mail'; -$lng['customer']['ftps'] = 'Accčs FTP'; -$lng['customer']['subdomains'] = 'Sous-domaine(s)'; -$lng['customer']['domains'] = 'Domaine(s)'; -$lng['customer']['unlimited'] = 'illimité'; - -/** - * Customermenue - */ - -$lng['menue']['main']['main'] = 'Général'; -$lng['menue']['main']['changepassword'] = 'Changer de mot de passe'; -$lng['menue']['main']['changelanguage'] = 'Changer de langue'; -$lng['menue']['email']['email'] = 'E-mail'; -$lng['menue']['email']['emails'] = 'Adresse(s) e-mail(s)'; -$lng['menue']['email']['webmail'] = 'Webmail'; -$lng['menue']['mysql']['mysql'] = 'MySQL'; -$lng['menue']['mysql']['databases'] = 'Bases de données'; -$lng['menue']['mysql']['phpmyadmin'] = 'phpMyAdmin'; -$lng['menue']['domains']['domains'] = 'Domaines'; -$lng['menue']['domains']['settings'] = 'Paramčtres des sites'; -$lng['menue']['ftp']['ftp'] = 'FTP'; -$lng['menue']['ftp']['accounts'] = 'Comptes d\'accčs FTP'; -$lng['menue']['ftp']['webftp'] = 'WebFTP'; -$lng['menue']['extras']['extras'] = 'Extras'; -$lng['menue']['extras']['directoryprotection'] = 'Protection des dossiers'; -$lng['menue']['extras']['pathoptions'] = 'Options des dossiers'; - -/** - * Index - */ - -$lng['index']['customerdetails'] = 'Informations personnelles'; -$lng['index']['accountdetails'] = 'Informations du compte'; - -/** - * Change Password - */ - -$lng['changepassword']['old_password'] = 'Ancien mot de passe'; -$lng['changepassword']['new_password'] = 'Nouveau mot de passe'; -$lng['changepassword']['new_password_confirm'] = 'Nouveau mot de passe (confirmation)'; -$lng['changepassword']['new_password_ifnotempty'] = 'Nouveau mot de passe (Veuillez laisser vide pour ne pas changer)'; -$lng['changepassword']['also_change_ftp'] = 'Changer aussi le mot de passe du compte FTP principal ?'; - -/** - * Domains - */ - -$lng['domains']['description'] = 'Ici, vous pouvez ajouter des sites et domaines et changer leurs doosiers.
    Il vous faudra patienter quelques minutes aprčs chaque changement pour que la configuration soit activée.'; -$lng['domains']['domainsettings'] = 'Configuration des Domaines'; -$lng['domains']['domainname'] = 'Nom du Domaine'; -$lng['domains']['subdomain_add'] = 'Ajouter un sous-domaine'; -$lng['domains']['subdomain_edit'] = 'Changer un sous-domaine'; -$lng['domains']['wildcarddomain'] = 'Domaine générique (Wilcard) ?'; -$lng['domains']['aliasdomain'] = 'Alias pour le domaine'; -$lng['domains']['noaliasdomain'] = 'Domaine sans alias'; - -/** - * E-mails - */ - -$lng['emails']['description'] = 'Ici, vous pouvez ajouter vos boîtes e-mails.

    Les informations pour configurer votre logiciel e-mail sont les suivantes :

    Nom du serveur : votre-domaine.com
    Identifiant : l\'adresse e-mail
    Mot de passe : le mot de passe que vous avez choisi'; -$lng['emails']['emailaddress'] = 'Adresse'; -$lng['emails']['emails_add'] = 'Ajouter une adresse e-mail'; -$lng['emails']['emails_edit'] = 'Changer une adresse e-mail'; -$lng['emails']['catchall'] = 'Catchall'; -$lng['emails']['iscatchall'] = 'Définir comme adresse "catchall" ?'; -$lng['emails']['account'] = 'Accčs'; -$lng['emails']['account_add'] = 'Ajouter un accčs'; -$lng['emails']['account_delete'] = 'Supprimer l\'accčs'; -$lng['emails']['from'] = 'de'; -$lng['emails']['to'] = 'ŕ'; -$lng['emails']['forwarders'] = 'Réexpédition'; -$lng['emails']['forwarder_add'] = 'Ajouter un renvoi'; - -/** - * FTP - */ - -$lng['ftp']['description'] = 'Ici, vous pouvez ajouter des accčs FTP supplémentaires.
    Les changements, ainsi que l\'accčs, sont immédiatement opérationnels.'; -$lng['ftp']['account_add'] = 'Ajouter un accčs'; - -/** - * MySQL - */ - -$lng['mysql']['databasename'] = 'Nom de la base de données'; -$lng['mysql']['databasedescription'] = 'Description de la base de données'; -$lng['mysql']['database_create'] = 'Ajouter une base de données'; - -/** - * Extras - */ - -$lng['extras']['description'] = 'Ici, vous pouvez ajouter des extras, comme par exemple, la protection de dossiers du site.
    Il vous faudra patienter quelques minutes aprčs chaque changement pour que la configuration soit activée.'; -$lng['extras']['directoryprotection_add'] = 'Ajouter une protection de dossier'; -$lng['extras']['view_directory'] = 'Aperçu du dossier'; -$lng['extras']['pathoptions_add'] = 'Ajouter des options sur le dossier'; -$lng['extras']['directory_browsing'] = 'Afficher le contenu des dossiers'; -$lng['extras']['pathoptions_edit'] = 'Modifier les options de dossier'; -$lng['extras']['error404path'] = '404'; -$lng['extras']['error403path'] = '403'; -$lng['extras']['error500path'] = '500'; -$lng['extras']['error401path'] = '401'; -$lng['extras']['errordocument404path'] = 'Emplacement du document "Erreur 404"'; -$lng['extras']['errordocument403path'] = 'Emplacement du document "Erreur 403"'; -$lng['extras']['errordocument500path'] = 'Emplacement du document "Erreur 500"'; -$lng['extras']['errordocument401path'] = 'Emplacement du document "Erreur 401"'; - -/** - * Errors - */ - -$lng['error']['error'] = 'Erreur'; -$lng['error']['directorymustexist'] = 'Le dossier que vous avez choisi n\'existe pas. Veuillez ajouter le dossier avec votre client FTP.'; -$lng['error']['filemustexist'] = 'Le fichier que vous avez sélectionné n\'existe pas.'; -$lng['error']['allresourcesused'] = 'Vous avez déjŕ utilisé toutes les ressources.'; -$lng['error']['domains_cantdeletemaindomain'] = 'Vous ne pouvez pas supprimer un domaine qui est utilisé pour des adresses e-mails.'; -$lng['error']['domains_canteditdomain'] = 'Vous n\'avez pas le droit de configurer ce domaine.'; -$lng['error']['domains_cantdeletedomainwithemail'] = 'Vous ne pouvez pas supprimer un domaine qui est utilisé pour des e-mails. Vous devez d\'abord supprimer toutes les adresses e-mails qu\'il contient.'; -$lng['error']['firstdeleteallsubdomains'] = 'Il faut d\'abord supprimer tous les sous-domaines avant d\'ajouter un domaine "wildcard".'; -$lng['error']['youhavealreadyacatchallforthisdomain'] = 'Vous avez déjŕ défini une adresse "catchall" pour ce domaine.'; -$lng['error']['ftp_cantdeletemainaccount'] = 'Vous ne pouvez pas supprimer votre accčs principal.'; -$lng['error']['login'] = 'Identifiant / mot de passe invalide.'; -$lng['error']['login_blocked'] = 'Cet identifiant a été bloqué ŕ cause de nombreuses tentatives de connexions invalides.
    Veuillez réessayer dans ' . $settings['login']['deactivatetime'] . ' secondes.'; -$lng['error']['notallreqfieldsorerrors'] = 'Vous n\'avez pas rempli toutes les cases obligatoires ou vous les avez remplis avec des informations invalides.'; -$lng['error']['oldpasswordnotcorrect'] = 'L\'ancien mot de passe n\'est pas correct.'; -$lng['error']['youcantallocatemorethanyouhave'] = 'Vous ne pouvez pas distribuer plus de ressources qu\'il n\'en reste.'; -$lng['error']['mustbeurl'] = 'Vous n\'avez pas entré une adresse URL valide.'; -$lng['error']['invalidpath'] = 'Vous n\'avez pas choisi une adresse URL valide (probablement ŕ cause de problčmes avec le listing de dossiers ?)'; -$lng['error']['stringisempty'] = 'Entrée manquante'; -$lng['error']['stringiswrong'] = 'Entrée invalide'; -$lng['error']['myloginname'] = '"' . $lng['login']['username'] . '"'; -$lng['error']['mypassword'] = '"' . $lng['login']['password'] . '"'; -$lng['error']['oldpassword'] = '"' . $lng['changepassword']['old_password'] . '"'; -$lng['error']['newpassword'] = '"' . $lng['changepassword']['new_password'] . '"'; -$lng['error']['newpasswordconfirm'] = '"' . $lng['changepassword']['new_password_confirm'] . '"'; -$lng['error']['newpasswordconfirmerror'] = 'Le nouveau mot de passe et sa confirmation ne sont pas identiques pas.'; -$lng['error']['myname'] = '"' . $lng['customer']['name'] . '"'; -$lng['error']['myfirstname'] = '"' . $lng['customer']['firstname'] . '"'; -$lng['error']['emailadd'] = '"' . $lng['customer']['email'] . '"'; -$lng['error']['mydomain'] = '"domaine"'; -$lng['error']['mydocumentroot'] = '"Documentroot"'; -$lng['error']['loginnameexists'] = 'L\'identifiant "%s" existe déjŕ.'; -$lng['error']['emailiswrong'] = 'L\'adresse "%s" contient des signes invalides ou est incomplčte.'; -$lng['error']['loginnameiswrong'] = 'L\'identifiant "%s" contient des signes invalides.'; -$lng['error']['userpathcombinationdupe'] = 'Cette combinaison d\'identifiant et de dossier existe déjŕ.'; -$lng['error']['patherror'] = 'Erreur générale ! Le dossier ne doit pas ętre vide.'; -$lng['error']['errordocpathdupe'] = 'Il y a déjŕ une option concernant le dossier "%s".'; -$lng['error']['adduserfirst'] = 'Vous devez d\'abord ajouter un.'; -$lng['error']['domainalreadyexists'] = 'Le domaine "%s" existe déjŕ.'; -$lng['error']['nolanguageselect'] = 'Aucune langue choisis.'; -$lng['error']['nosubjectcreate'] = 'Il faut entrer un sujet.'; -$lng['error']['nomailbodycreate'] = 'Il faut entrer un corps de texte.'; -$lng['error']['templatenotfound'] = 'Aucun modčle trouvé.'; -$lng['error']['alltemplatesdefined'] = 'Vous avez déjŕ appliqué des modčles pour toutes les langues.'; -$lng['error']['wwwnotallowed'] = 'Un sous-domaine ne peut pas s\'appeler www.'; -$lng['error']['subdomainiswrong'] = 'Le sous-domaine "%s" contient des signes invalides.'; -$lng['error']['domaincantbeempty'] = 'Le nom de domaine ne doit pas ętre vide.'; -$lng['error']['domainexistalready'] = 'Le domaine "%s" existe déjŕ.'; -$lng['error']['domainisaliasorothercustomer'] = 'L\'alias du domaine choisi est soit un alias existant d\'un autre client ou soit fait référence ŕ lui męme.'; -$lng['error']['emailexistalready'] = 'L\'adresse "%s" existe déjŕ.'; -$lng['error']['maindomainnonexist'] = 'Le domaine "%s" n\'existe pas.'; -$lng['error']['destinationnonexist'] = 'Veuillez écrire votre adresse de renvoi ŕ l\'emplacement "ŕ".'; -$lng['error']['destinationalreadyexistasmail'] = 'Le renvoi vers l\'adresse "%s" existe déjŕ comme adresse active.'; -$lng['error']['destinationalreadyexist'] = 'Il existe déjŕ une réexpédition vers l\'adresse "%s".'; -$lng['error']['destinationiswrong'] = 'L\'adresse "%s" contient des signes invalides ou est incomplčte.'; -$lng['error']['domainname'] = $lng['domains']['domainname']; -$lng['error']['youcantdeletechangemainadmin'] = 'Pour des raisons de sécurité, il n\'est pas possible de supprimer ou modifier l\'administrateur principal.'; -$lng['error']['loginnameissystemaccount'] = 'Vous ne pouvez pas créer un compte identique au compte systčme, veuillez réessayer avec un autre nom.'; - -/** - * Questions - */ - -$lng['question']['question'] = 'Question de sécurité'; -$lng['question']['admin_customer_reallydelete'] = 'Etes-vous sűr de vouloir supprimer le compte "%s" ?
    ATTENTION ! Toutes ses informations seront supprimées ! Une fois fait, il vous appartiendra de supprimer manuellement tous les dossiers du compte sur le systčme de fichiers.'; -$lng['question']['admin_domain_reallyenablemailsystemhostname'] = 'Etes-vous sűr de vouloir activé le serveur de nom en tant que serveur de mails ?'; -$lng['question']['admin_domain_reallydelete'] = 'Etes-vous sűr de vouloir supprimer le domaine "%s" ?'; -$lng['question']['admin_domain_reallydisablesecuritysetting'] = 'Etes-vous sűr de vouloir désactiver les modes de sécurité suivants : OpenBasedir et / oů SafeMode ?'; -$lng['question']['admin_admin_reallydelete'] = 'Etes-vous sűr de vouloir supprimer l\'administrateur "%s" ?
    Tous ses comptes seront affectés ŕ l\'administrateur principal.'; -$lng['question']['admin_template_reallydelete'] = 'Etes-vous sűr de vouloir supprimer le modčle "%s" ?'; -$lng['question']['domains_reallydelete'] = 'Etes-vous sűr de vouloir supprimer le domaine "%s" ?'; -$lng['question']['email_reallydelete'] = 'Etes-vous sűr de vouloir supprimer l\'adresse e-mail "%s" ? '; -$lng['question']['email_reallydelete_account'] = 'Etes-vous sűr de vouloir supprimer l\'accčs e-mail "%s" ?'; -$lng['question']['email_reallydelete_forwarder'] = 'Etes-vous sűr de vouloir supprimer le renvoi vers "%s" ?'; -$lng['question']['extras_reallydelete'] = 'Etes-vous sűr de vouloir supprimer la protection du dossier "%s" ?'; -$lng['question']['extras_reallydelete_pathoptions'] = 'Etes-vous sűr de vouloir supprimer les options du dossier "%s" ?'; -$lng['question']['ftp_reallydelete'] = 'Etes-vous sűr de vouloir supprimer l\'accčs ftp "%s" ?'; -$lng['question']['mysql_reallydelete'] = 'Etes-vous sűr de vouloir supprimer la base de données "%s" ?
    ATTENTION : Toutes les données seront perdues ŕ jamais !'; -$lng['question']['admin_configs_reallyrebuild'] = 'Etes-vous sűr de vouloir régénérer les fichiers de configuration Apache et Bind ?'; - -/** - * Mails - */ - -$lng['mails']['pop_success']['mailbody'] = 'Bonjour,\n\nvotre accčs POP3 / IMAP {EMAIL}\na été créé avec succčs.\n\nCeci est un e-mail généré automatiquement, veuillez ne pas répondre ŕ ce message.\n\nCordialement,\nL\'équipe Froxlor\nhttp://www.froxlor.org'; -$lng['mails']['pop_success']['subject'] = 'Accčs POP3 / IMAP créé'; -$lng['mails']['createcustomer']['mailbody'] = 'Bonjour {FIRSTNAME} {NAME},\n\nVous trouverez ci-dessous vos informations d\'accčs au panel d\'administration :\n\nAdresse d\'administration : http://demo.froxlor.org\n\nIdentifiant : {USERNAME}\nMot de passe : {PASSWORD}\n\nCordialement,\nL\'équipe Froxlor\nhttp://www.froxlor.org\n'; -$lng['mails']['createcustomer']['subject'] = 'Froxlor : Informations pour votre accčs au panel d\'administration'; - -/** - * Admin - */ - -$lng['admin']['overview'] = 'Sommaire'; -$lng['admin']['ressourcedetails'] = 'Ressources utilisées'; -$lng['admin']['systemdetails'] = 'Informations du systčme'; -$lng['admin']['froxlordetails'] = 'Informations de Froxlor'; -$lng['admin']['installedversion'] = 'Version installée'; -$lng['admin']['latestversion'] = 'Derničre version en date'; -$lng['admin']['lookfornewversion']['clickhere'] = 'Vérifier par internet'; -$lng['admin']['lookfornewversion']['error'] = 'Erreur pour vérifier la derničre version'; -$lng['admin']['resources'] = 'Ressources'; -$lng['admin']['customer'] = 'Compte'; -$lng['admin']['customers'] = 'Comptes'; -$lng['admin']['customer_add'] = 'Ajouter un compte'; -$lng['admin']['customer_edit'] = 'Modifier un compte'; -$lng['admin']['domains'] = 'Domaines'; -$lng['admin']['domain_add'] = 'Ajouter un domaine'; -$lng['admin']['domain_edit'] = 'Modifier le domaine'; -$lng['admin']['subdomainforemail'] = 'Sous-domaines comme domaine e-mail'; -$lng['admin']['admin'] = 'Administrateur'; -$lng['admin']['admins'] = 'Administrateurs'; -$lng['admin']['admin_add'] = 'Ajouter un administrateur'; -$lng['admin']['admin_edit'] = 'Modifier un administrateur'; -$lng['admin']['customers_see_all'] = 'Peut voir tous les comptes ?'; -$lng['admin']['domains_see_all'] = 'Peut voir tous les Domaines ?'; -$lng['admin']['change_serversettings'] = 'Peut modifier la configuration du serveur ?'; -$lng['admin']['server'] = 'Serveur'; -$lng['admin']['serversettings'] = 'Paramčtres'; -$lng['admin']['rebuildconf'] = 'Régénérer la configuration'; -$lng['admin']['stdsubdomain'] = 'Sous-domaine type'; -$lng['admin']['stdsubdomain_add'] = 'Ajouter un sous-domaine type'; -$lng['admin']['phpenabled'] = 'PHP activé'; -$lng['admin']['deactivated'] = 'Désactiver'; -$lng['admin']['deactivated_user'] = 'Désactiver l\'utilisateur'; -$lng['admin']['sendpassword'] = 'Envoyer le mot de passe'; -$lng['admin']['ownvhostsettings'] = 'Configuration spéciale du vHost'; -$lng['admin']['configfiles']['serverconfiguration'] = 'Exemple de configuration'; -$lng['admin']['configfiles']['files'] = 'Fichiers de configuration : Veuillez créer ou modifier les fichiers suivants avec le contenu ci-dessous.

    IMPORTANT : Le mot de passe MySQL n\'est pas donné dans les informations ci-dessous
    pour des raisons de sécurité. Veuillez donc remplacer les "MYSQL_PASSWORD"
    manuellement avec le mot de passe correspondant. En cas d\'oubli, vous pouvez le retrouver dans
    le fichier "lib/userdata.inc.php".'; -$lng['admin']['configfiles']['commands'] = 'Commandes : Veuillez exécuter les commandes ci-dessous dans le shell.'; -$lng['admin']['configfiles']['restart'] = 'Redémarrage : Veuillez exécuter les commandes ci-dessous pour
    prendre en compte les changements.'; -$lng['admin']['templates']['templates'] = 'Modčles'; -$lng['admin']['templates']['template_add'] = 'Ajouter un modčle'; -$lng['admin']['templates']['template_edit'] = 'Modifier un modčle'; -$lng['admin']['templates']['action'] = 'Action'; -$lng['admin']['templates']['email'] = 'E-mail'; -$lng['admin']['templates']['subject'] = 'Référence'; -$lng['admin']['templates']['mailbody'] = 'Texte de l\'e-mail'; -$lng['admin']['templates']['createcustomer'] = 'E-mail de bienvenue pour les nouveaux clients'; -$lng['admin']['templates']['pop_success'] = 'E-mail de bienvenue pour les nouveaux accčs e-mail'; -$lng['admin']['templates']['template_replace_vars'] = 'Les variables qui seront remplacées dans le template :'; -$lng['admin']['templates']['FIRSTNAME'] = 'Sera remplacé par le prénom.'; -$lng['admin']['templates']['NAME'] = 'Sera remplacé par le nom.'; -$lng['admin']['templates']['USERNAME'] = 'Sera remplacé par le login.'; -$lng['admin']['templates']['PASSWORD'] = 'Sera remplacé par le mot de passe du client.'; -$lng['admin']['templates']['EMAIL'] = 'Sera remplacé par l\'accčs e-mail.'; - -/** - * Serversettings - */ - -$lng['serversettings']['session_timeout']['title'] = 'Durée d\'inactivité maximale'; -$lng['serversettings']['session_timeout']['description'] = 'Combien de secondes d\'inactivité avant qu\'une session ne se ferme ?'; -$lng['serversettings']['accountprefix']['title'] = 'Préfix des comptes'; -$lng['serversettings']['accountprefix']['description'] = 'Quel préfix doivent avoir les comptes ?'; -$lng['serversettings']['mysqlprefix']['title'] = 'Préfix SQL'; -$lng['serversettings']['mysqlprefix']['description'] = 'Quel préfix doivent avoir les bases de données ?'; -$lng['serversettings']['ftpprefix']['title'] = 'Préfix FTP'; -$lng['serversettings']['ftpprefix']['description'] = 'Quel préfix doivent avoir les accčs FTP ?'; -$lng['serversettings']['documentroot_prefix']['title'] = 'Dossier de stockage'; -$lng['serversettings']['documentroot_prefix']['description'] = 'Oů doivent ętre stockés tous les dossiers et fichiers des différents comptes ?'; -$lng['serversettings']['logfiles_directory']['title'] = 'Dossier des fichiers de log'; -$lng['serversettings']['logfiles_directory']['description'] = 'Oů doivent ętre stockés les archives des logs d\'accčs du serveur Web ?'; -$lng['serversettings']['ipaddress']['title'] = 'Adresse IP'; -$lng['serversettings']['ipaddress']['description'] = 'Quelle est l\'adresse IP du serveur ?'; -$lng['serversettings']['hostname']['title'] = 'Nom d\'hôte'; -$lng['serversettings']['hostname']['description'] = 'Quel est le nom d\'hôte (hostname) du serveur ?'; -$lng['serversettings']['apachereload_command']['title'] = 'Commande de rechargement d\'Apache'; -$lng['serversettings']['apachereload_command']['description'] = 'Quelle est la commande pour recharger / redémarrer Apache ?'; -$lng['serversettings']['apacheconf_filename']['title'] = 'Nom du fichier de configuration Apache'; -$lng['serversettings']['apacheconf_filename']['description'] = 'Dans quel fichier souhaitez-vous enregistrer la configuration Apache ?'; -$lng['serversettings']['bindconf_directory']['title'] = 'Emplacement du dossier de configuration de Bind / Named'; -$lng['serversettings']['bindconf_directory']['description'] = 'Oů doit ętre stocké la configuration de Bind / Named ?'; -$lng['serversettings']['bindreload_command']['title'] = 'Commande de rechargement de Bind / Named'; -$lng['serversettings']['bindreload_command']['description'] = 'Quelle est la commande pour recharger / redémarrer Bind / Named ?'; -$lng['serversettings']['binddefaultzone']['title'] = 'Nom du fichier de zone par défaut Bind / Named'; -$lng['serversettings']['binddefaultzone']['description'] = 'Quel est le nom du fichier de zone par défaut pour Bind / Named ?'; -$lng['serversettings']['vmail_uid']['title'] = 'UID des e-mails'; -$lng['serversettings']['vmail_uid']['description'] = 'Quel UID doivent avoir les e-mails ?'; -$lng['serversettings']['vmail_gid']['title'] = 'GID des e-mails'; -$lng['serversettings']['vmail_gid']['description'] = 'Quel GID doivent avoir les e-mails ?'; -$lng['serversettings']['vmail_homedir']['title'] = 'Emplacement des e-mails'; -$lng['serversettings']['vmail_homedir']['description'] = 'Dans quel dossier doivent ętre stocker les e-mails ?'; -$lng['serversettings']['adminmail']['title'] = 'Adresse e-mail de l\'administrateur'; -$lng['serversettings']['adminmail']['description'] = 'Quelle est l\'adresse e-mail par défaut des e-mails envoyés par Froxlor ?'; -$lng['serversettings']['phpmyadmin_url']['title'] = 'Adresse URL de phpMyAdmin'; -$lng['serversettings']['phpmyadmin_url']['description'] = 'A quelle adresse se trouve phpMyAdmin ?'; -$lng['serversettings']['webmail_url']['title'] = 'Adresse URL du WebMail'; -$lng['serversettings']['webmail_url']['description'] = 'A quelle adresse se trouve le WebMail ?'; -$lng['serversettings']['webftp_url']['title'] = 'Adresse URL du WebFTP'; -$lng['serversettings']['webftp_url']['description'] = 'A quelle adresse se trouve le WebFTP ?'; -$lng['serversettings']['language']['description'] = 'Quelle langue est la langue par défaut ?'; -$lng['serversettings']['maxloginattempts']['title'] = 'Nombre d\'essais maximum avant désactivation'; -$lng['serversettings']['maxloginattempts']['description'] = 'Nombre de tentatives maximum avant la désactivation de l\'accčs.'; -$lng['serversettings']['deactivatetime']['title'] = 'Durée de la désactivation'; -$lng['serversettings']['deactivatetime']['description'] = 'Durée (en secondes) pendant laquelle l\'accčs sera désactivé.'; -$lng['serversettings']['pathedit']['title'] = 'Mode de sélection des dossiers'; -$lng['serversettings']['pathedit']['description'] = 'Choisir un dossier par une liste déroulante ou l\'entrer manuellement ?'; -$lng['serversettings']['nameservers']['title'] = 'Serveurs de nom «Nameservers»'; -$lng['serversettings']['nameservers']['description'] = 'Une liste séparée par des virgules contenant les noms d\'hôtes de tous les serveurs de noms. Le premier dans la liste sera le serveur primaire.'; -$lng['serversettings']['mxservers']['title'] = 'Serveurs de messagerie «MX»'; -$lng['serversettings']['mxservers']['description'] = 'Une liste séparée par des virgules contenant les serveurs de messagerie avec leur poid : un nombre et le nom d\'hôte séparé par un espace; par exemple : "10 mx.exemple.com".'; - -/** - * CHANGED BETWEEN 1.2.12 and 1.2.13 - */ - -$lng['mysql']['description'] = 'Ici, vous pouvez ajouter et effacer des bases de données MySQL.
    Les changements, ainsi que les bases de données, sont immédiatement opérationnels.
    Dans le menu, vous trouverez un lien vers phpMyAdmin, avec lequel vous pouvez gérer vos bases de données.

    L\'accčs aux bases de données depuis les scripts PHP fonctionne comme suit : (Il faut remplacer les valeurs en italique par vos informations !)

    $connexion = mysql_connect(\'localhost\', \'Votre identifiant\', \'Votre mot de passe\');
    mysql_select_db(\'Le nom de la base de données\', $connexion);'; - -/** - * ADDED BETWEEN 1.2.12 and 1.2.13 - */ - -$lng['admin']['cronlastrun'] = 'Derničre tâche "cron"'; -$lng['serversettings']['paging']['title'] = 'Nombre de résultats par page'; -$lng['serversettings']['paging']['description'] = 'Nombre de résultats par page ? (0 = Désactive la pagination)'; -$lng['error']['ipstillhasdomains'] = 'La combinaison IP / port est encore utilisée, veuillez réassigner le ou les domaines existant(s) avec cette adresse IP / port concerné(s) ŕ une autre combinaison IP / port avant de supprimer celle-ci.'; -$lng['error']['cantdeletedefaultip'] = 'Vous ne pouvez pas supprimer cette combinaison IP / Port, veuillez d\'abord attribuer une autre combinaison IP / Port par défaut ŕ ce revendeur avant de supprimer celle-ci.'; -$lng['error']['cantdeletesystemip'] = 'Vous ne pouvez pas créer, modifier ou supprimer l\'IP du systčme.'; -$lng['error']['myipaddress'] = '"IP"'; -$lng['error']['myport'] = '"Port"'; -$lng['error']['myipdefault'] = 'Choissez une combinaison IP / port par défaut.'; -$lng['error']['myipnotdouble'] = 'Cette combinaison existe déjŕ.'; -$lng['question']['admin_ip_reallydelete'] = 'Etes-vous sűr de vouloir supprimer l\'adresse IP "%s" ?'; -$lng['admin']['ipsandports']['ipsandports'] = 'IPs et ports'; -$lng['admin']['ipsandports']['add'] = 'Ajouter une IP / port'; -$lng['admin']['ipsandports']['edit'] = 'Modifier une IP / port'; -$lng['admin']['ipsandports']['ipandport'] = 'IP / Port'; -$lng['admin']['ipsandports']['ip'] = 'IP'; -$lng['admin']['ipsandports']['port'] = 'Port'; - -// ADDED IN 1.2.13-rc3 - -$lng['error']['cantchangesystemip'] = 'Vous ne pouvez pas modifier l\'adresse IP du systčme, ni en ajouter de nouvelle.'; -$lng['question']['admin_domain_reallydocrootoutofcustomerroot'] = 'Etes-vous sűr de vouloir différencier la racine principale de ce domaine de la racine principale du client ?'; - -// ADDED IN 1.2.14-rc1 - -$lng['admin']['memorylimitdisabled'] = 'Désactivé'; -$lng['domain']['openbasedirpath'] = 'Dossier "OpenBasedir"'; -$lng['domain']['docroot'] = 'Identique au dossier ci-dessus'; -$lng['domain']['homedir'] = 'Dossier Principal'; -$lng['admin']['valuemandatory'] = 'Cette valeur est obligatoire'; -$lng['admin']['valuemandatorycompany'] = 'Vous devez indiquer au moins l\'une des 3 valeurs suivantes : "nom" ou "prénom" ou "entreprise"'; -$lng['menue']['main']['username'] = 'Utilisateur : '; -$lng['panel']['urloverridespath'] = 'URL (supplante la valeur dossier)'; -$lng['panel']['pathorurl'] = 'Dossier ou URL'; -$lng['error']['sessiontimeoutiswrong'] = 'Seule une valeur numérique pour le temps d\'inactivité est autorisée.'; -$lng['error']['maxloginattemptsiswrong'] = 'Seule une valeur numérique pour "nombre maximum de tentative de connexion" est autorisée.'; -$lng['error']['deactivatetimiswrong'] = 'Seule une valeur numérique pour la durée de désactivation est autorisée.'; -$lng['error']['accountprefixiswrong'] = 'Le "Préfixe client" n\'est pas valide.'; -$lng['error']['mysqlprefixiswrong'] = 'Le "Préfixe SQL" n\'est pas valide.'; -$lng['error']['ftpprefixiswrong'] = 'Le "Préfixe FTP" n\'est pas valide.'; -$lng['error']['ipiswrong'] = 'L\'"Adresse IP" n\'est pas valide.'; -$lng['error']['vmailuidiswrong'] = 'L\'"UID e-mail" est incorrect. Seul un UID numérique est autorisé.'; -$lng['error']['vmailgidiswrong'] = 'Le "GID e-mail" est incorrect. Seul un GID numérique est autorisé.'; -$lng['error']['adminmailiswrong'] = 'L\'adresse e-mail de l\'administrateur est incorrect. Seulement une adresse e-mail valide est autorisé.'; -$lng['error']['pagingiswrong'] = 'La valeur "Nombre de résultats page" est incorrecte. Seul une valeur numérique est autorisée.'; -$lng['error']['phpmyadminiswrong'] = 'Le lien pour phpMyAdmin n\'est pas valide.'; -$lng['error']['webmailiswrong'] = 'Le lien pour le WebMail n\'est pas valide.'; -$lng['error']['webftpiswrong'] = 'Le lien pour le WebFTP n\'est pas valide.'; -$lng['domains']['hasaliasdomains'] = 'Le domaine possčde un ou des alias.'; -$lng['domains']['istopleveldomain'] = 'Est le nom de domaine principal'; -$lng['serversettings']['defaultip']['title'] = 'IP / Port par défaut'; -$lng['serversettings']['defaultip']['description'] = 'Quel est l\'IP / Port par défaut ?'; -$lng['domains']['statstics'] = 'Fréquentation'; -$lng['panel']['ascending'] = 'ascendant'; -$lng['panel']['decending'] = 'descendant'; -$lng['panel']['search'] = 'Rechercher'; -$lng['panel']['used'] = 'utilisé'; - -// ADDED IN 1.2.14-rc3 - -$lng['panel']['translator'] = 'Traducteur(s)'; - -// ADDED IN 1.2.14-rc4 - -$lng['error']['stringformaterror'] = 'La valeur pour "%s" n\'est pas dans un format reconnu.'; - -// ADDED IN 1.2.15-rc1 - -$lng['admin']['serversoftware'] = 'Logiciel Serveur'; -$lng['admin']['phpversion'] = 'Version de PHP'; -$lng['admin']['phpmemorylimit'] = 'Limite mémoire de PHP'; -$lng['admin']['mysqlserverversion'] = 'Version du serveur MySQL'; -$lng['admin']['mysqlclientversion'] = 'Version du client MySQL'; -$lng['admin']['webserverinterface'] = 'Interface Web'; -$lng['domains']['isassigneddomain'] = 'Le domaine est attribué'; -$lng['serversettings']['phpappendopenbasedir']['title'] = 'Dossier(s) de l\'OpenBasedir'; -$lng['serversettings']['phpappendopenbasedir']['description'] = 'Liste de dossiers séparée par des virgules qui sera ajouté ŕ la variable "OpenBasedir" des conteneurs vHosts.'; - -// CHANGED IN 1.2.15-rc1 - -$lng['error']['loginnameissystemaccount'] = 'Vous ne pouvez pas créer de compte ressemblant aux comptes systčme (ex : "%s"). Veuillez entrer un autre nom de compte.'; -$lng['error']['youcantdeleteyourself'] = 'Vous ne pouvez pas supprimer votre propre compte pour des raisons évidente de sécurité ...'; -$lng['error']['youcanteditallfieldsofyourself'] = 'Note : Vous ne pouvez pas éditer tous les champs de votre propre compte pour des raisons de sécurité.'; - -// ADDED IN 1.2.16-svn1 - -$lng['serversettings']['natsorting']['title'] = 'Utiliser un tri naturel dans les différentes vues'; -$lng['serversettings']['natsorting']['description'] = 'Trier les listes comme web1 -> web2 -> etc ... -> web11 au lieu de web1 -> web11 -> web2.'; - -// ADDED IN 1.2.16-svn2 - -$lng['serversettings']['deactivateddocroot']['title'] = 'Dossier "DocumentRoot" pour les utilisateurs désactivés'; -$lng['serversettings']['deactivateddocroot']['description'] = 'Quand un utilisateur est désactivé, ce dossier sera utilisé comme dossier racine pour le serveur Web. Laissez vide pour ne pas créer de vHost et ne rien afficher du tout lorsque l\'utilisateur est désactivé.'; - -// ADDED IN 1.2.16-svn4 - -$lng['panel']['reset'] = 'Ignorer les changements'; -$lng['admin']['accountsettings'] = 'Paramčtres du compte'; -$lng['admin']['panelsettings'] = 'Paramčtres du panel'; -$lng['admin']['systemsettings'] = 'Paramčtres du systčme'; -$lng['admin']['webserversettings'] = 'Paramčtres du serveur Web'; -$lng['admin']['mailserversettings'] = 'Paramčtres du serveur de Mail'; -$lng['admin']['nameserversettings'] = 'Paramčtres du serveur de Noms'; -$lng['admin']['updatecounters'] = 'Recalculer les ressources utilisées'; -$lng['question']['admin_counters_reallyupdate'] = 'Etes-vous sűr de vouloir recalculer les ressources utilisées ?'; -$lng['panel']['pathDescription'] = 'Si le dossier n\'existe pas, il sera créé automatiquement.'; - -// ADDED IN 1.2.16-svn6 - -$lng['mails']['trafficninetypercent']['mailbody'] = 'Bonjour {FIRSTNAME} {NAME},\n\nVous utilisez {TRAFFICUSED} Mo sur {TRAFFIC} Mo de votre quota de trafic.\nCe dernier est ŕ plus de 90%.\n\nCordialement,\nL\'équipe Froxlor.'; -$lng['mails']['trafficninetypercent']['subject'] = 'Limite de trafic bientôt atteinte.'; -$lng['admin']['templates']['trafficninetypercent'] = 'E-mail de notification pour les utilisateurs, lorsque leur taux de trafic atteint plus de 90%.'; -$lng['admin']['templates']['TRAFFIC'] = 'Sera remplacé par le taux de trafic qui a été attribué ŕ l\'utilisateur.'; -$lng['admin']['templates']['TRAFFICUSED'] = 'Sera remplacé par le taux de trafic qui a été consommé par l\'utilisateur.'; - -// ADDED IN 1.2.16-svn7 - -$lng['admin']['subcanemaildomain']['never'] = 'Jamais'; -$lng['admin']['subcanemaildomain']['choosableno'] = 'A choisir, par défaut : non'; -$lng['admin']['subcanemaildomain']['choosableyes'] = 'A choisir, par défaut : oui'; -$lng['admin']['subcanemaildomain']['always'] = 'Toujours'; -$lng['changepassword']['also_change_webalizer'] = 'Changer aussi le mot de passe des statistiques Webalizer ?'; - -// ADDED IN 1.2.16-svn8 - -$lng['serversettings']['mailpwcleartext']['title'] = 'Sauvegarder aussi les mots de passe des comptes e-mails de façon décrypter dans la base de données'; -$lng['serversettings']['mailpwcleartext']['description'] = 'Si cela est ŕ Oui, tous les mots de passe seront aussi sauvegarder de façon décrypter dans la table mail_users (en texte clair pour toutes personnes qui auraient accčs ŕ la base de données). Activer cette option, uniquement si vous en avez vraiment besoin !'; -$lng['serversettings']['mailpwcleartext']['removelink'] = 'Cliquez ici pour retirer tous les mots de passe en texte clair de la base de données.'; -$lng['question']['admin_cleartextmailpws_reallywipe'] = 'Etes-vous sűr de vouloir retirer tous les mots de passe en clairs des comptes e-mails de la table mail_users ? Cette action ne peut ętre annulée !'; -$lng['admin']['configfiles']['overview'] = 'Aperçu'; -$lng['admin']['configfiles']['wizard'] = 'Assistant'; -$lng['admin']['configfiles']['distribution'] = 'Distribution'; -$lng['admin']['configfiles']['service'] = 'Service'; -$lng['admin']['configfiles']['daemon'] = 'Démon'; -$lng['admin']['configfiles']['http'] = 'Serveur Web (HTTP)'; -$lng['admin']['configfiles']['dns'] = 'Serveur de Noms (DNS)'; -$lng['admin']['configfiles']['mail'] = 'Serveur de Mails (IMAP/POP3)'; -$lng['admin']['configfiles']['smtp'] = 'Serveur de Mails (SMTP)'; -$lng['admin']['configfiles']['ftp'] = 'Serveur FTP'; -$lng['admin']['configfiles']['etc'] = 'Autres (Systčme)'; -$lng['admin']['configfiles']['choosedistribution'] = '-- Choisissez une distribution --'; -$lng['admin']['configfiles']['chooseservice'] = '-- Choisissez un service --'; -$lng['admin']['configfiles']['choosedaemon'] = '-- Choisissez un démon --'; -$lng['admin']['trafficlastrun'] = 'Dernier calcul du trafic'; - -// ADDED IN 1.2.16-svn10 - -$lng['serversettings']['ftpdomain']['title'] = 'Comptes FTP @domaine'; -$lng['serversettings']['ftpdomain']['description'] = 'Les utilisateurs peuvent-ils créer des comptes FTP de la forme utilisateur@domaine.com ?'; -$lng['panel']['back'] = 'Retour'; - -// ADDED IN 1.2.16-svn12 - -$lng['serversettings']['mod_log_sql']['title'] = 'Sauvegarder temporairement les logs dans la base de données'; -$lng['serversettings']['mod_log_sql']['description'] = 'Utiliser mod_log_sql pour sauvegarder temporairement les requętes Web.
    Cela ŕ besoin d\'une configuration spécifique d\'Apache !'; -$lng['serversettings']['mod_fcgid']['title'] = 'Utiliser PHP par mod_fcgid / suexec'; -$lng['serversettings']['mod_fcgid']['description'] = 'Utiliser mod_fcgid / suexec / libnss_mysql pour lancer PHP avec le compte correspondant ŕ l\'utilisateur ?
    Cela ŕ besoin d\'une configuration spécifique d\'Apache !'; -$lng['serversettings']['sendalternativemail']['title'] = 'Utiliser une adresse e-mail alternative'; -$lng['serversettings']['sendalternativemail']['description'] = 'Envoyer le mot de passe du compte e-mail ŕ une adresse différents pour la création du compte e-mail ?'; -$lng['emails']['alternative_emailaddress'] = 'Adresse e-mail alternative'; -$lng['mails']['pop_success_alternative']['mailbody'] = 'Bonjour,\n\nVotre compte e-mail {EMAIL} a été correctement créé.\n\nVotre mot de passe est : {PASSWORD}.\n\nCeci est un message généré automatiquemenent, veuillez ne pas répondre ŕ cet e-mail car il ne serait ętre consulter.\n\nCordialement,\nL\'équipe Froxlor.'; -$lng['mails']['pop_success_alternative']['subject'] = 'Compte e-mail correctement créé'; -$lng['admin']['templates']['pop_success_alternative'] = 'Message de bienvenue envoyé ŕ l\'adresse e-mail alternative pour les nouveaux comptes e-mails'; -$lng['admin']['templates']['EMAIL_PASSWORD'] = 'Remplacer par le mot de passe du compte POP3 / IMAP.'; - -// ADDED IN 1.2.16-svn13 - -$lng['error']['documentrootexists'] = 'Le dossier "%s" existe déjŕ pour cet utilisateur. Veuillez le supprimer / déplacer avant de réessayer l\'ajout de cet utilisateur.'; - -// ADDED IN 1.2.16-svn14 - -$lng['serversettings']['apacheconf_vhost']['title'] = 'Dossier / fichier de configuration des vHosts pour Apache'; -$lng['serversettings']['apacheconf_vhost']['description'] = 'Oů doit ętre stocké le fichier de configuration des vHosts ? Vous pouvez soit entrer le nom d\'un fichier (tous les vHosts dans un seul fichier), soit le nom d\'un dossier (chacun des vHosts dans un fichier séparé du dossier).'; -$lng['serversettings']['apacheconf_diroptions']['title'] = 'Fichier / dossier de configuration des options des dossiers pour Apache'; -$lng['serversettings']['apacheconf_diroptions']['description'] = 'Oů doit ętre stocké le fichier de configuration des options de dossiers ? Vous pouvez soit entrer le nom d\'un fichier (toutes les options des dossiers dans un seul fichier), soit le nom d\'un dossier (chacune des options de dossier dans un fichier séparé du dossier).'; -$lng['serversettings']['apacheconf_htpasswddir']['title'] = 'Dossier du fichier htpasswd pour Apache'; -$lng['serversettings']['apacheconf_htpasswddir']['description'] = 'Oů doit ętre stocké le fichier de configuration de protection des dossiers "htpasswd" pour Apache ?'; - -// ADDED IN 1.2.16-svn15 - -$lng['error']['formtokencompromised'] = 'La requęte semble compromise. Pour des raisons de sécurité, vous avez été déconnecté.'; -$lng['serversettings']['mysql_access_host']['title'] = 'Hôtes de connexion MySQL'; -$lng['serversettings']['mysql_access_host']['description'] = 'Une liste séparée par des virgules contenant la liste des hôtes depuis lesquels les utilisateurs sont autorisés ŕ se connecter au serveur MySQL.'; - -// ADDED IN 1.2.18-svn1 - -$lng['admin']['ipsandports']['create_listen_statement'] = 'Déclaration des ports d\'écoute'; -$lng['admin']['ipsandports']['create_namevirtualhost_statement'] = 'Déclaration des hôtes virtuels "NameVirtualHost"'; -$lng['admin']['ipsandports']['create_vhostcontainer'] = 'Déclaration des conteneurs virtuels "vHost"'; -$lng['admin']['ipsandports']['create_vhostcontainer_servername_statement'] = 'Déclaration des noms d\'hôtes "ServerName" dans les conteneurs virtuels "vHost"'; - -// ADDED IN 1.2.18-svn2 - -$lng['admin']['webalizersettings'] = 'Paramčtres pour Webalizer'; -$lng['admin']['webalizer']['normal'] = 'Normal'; -$lng['admin']['webalizer']['quiet'] = 'Silencieux'; -$lng['admin']['webalizer']['veryquiet'] = 'Aucune sortie'; -$lng['serversettings']['webalizer_quiet']['title'] = 'Sortie Webalizer'; -$lng['serversettings']['webalizer_quiet']['description'] = 'Verbosité du programme Webalizer'; - -// ADDED IN 1.2.18-svn3 - -$lng['ticket']['admin_email'] = 'root@localhost'; -$lng['ticket']['noreply_email'] = 'billets@froxlor'; -$lng['admin']['ticketsystem'] = 'Systčme de billets'; -$lng['menue']['ticket']['ticket'] = 'Billets de support'; -$lng['menue']['ticket']['categories'] = 'Catégories de support'; -$lng['menue']['ticket']['archive'] = 'Archives de billets'; -$lng['ticket']['description'] = 'Entrez une description !'; -$lng['ticket']['ticket_new'] = 'Ouvrir un nouveau billet'; -$lng['ticket']['ticket_reply'] = 'Réponse au billet'; -$lng['ticket']['ticket_reopen'] = 'Réouvrir le billet'; -$lng['ticket']['ticket_newcateory'] = 'Créer une nouvelle catégorie'; -$lng['ticket']['ticket_editcateory'] = 'Editer la catégorie'; -$lng['ticket']['ticket_view'] = 'Voir l\'historique du billet'; -$lng['ticket']['ticketcount'] = 'Billets'; -$lng['ticket']['ticket_answers'] = 'Réponses'; -$lng['ticket']['lastchange'] = 'Derničre action'; -$lng['ticket']['subject'] = 'Sujet'; -$lng['ticket']['status'] = 'Etat'; -$lng['ticket']['lastreplier'] = 'Derničre réponse de'; -$lng['ticket']['priority'] = 'Priorité'; -$lng['ticket']['low'] = 'Basse'; -$lng['ticket']['normal'] = 'Normale'; -$lng['ticket']['high'] = 'Haute'; -$lng['ticket']['unf_low'] = 'Basse'; -$lng['ticket']['unf_normal'] = 'Normale'; -$lng['ticket']['unf_high'] = 'Haute'; -$lng['ticket']['lastchange'] = 'Dernier changement'; -$lng['ticket']['lastchange_from'] = 'Depuis (jj.mm.aaaa)'; -$lng['ticket']['lastchange_to'] = 'Jusqu\'au (jj.mm.aaaa)'; -$lng['ticket']['category'] = 'Catégorie'; -$lng['ticket']['no_cat'] = 'Aucune'; -$lng['ticket']['message'] = 'Message'; -$lng['ticket']['show'] = 'Voir'; -$lng['ticket']['answer'] = 'Répondre'; -$lng['ticket']['close'] = 'Fermer'; -$lng['ticket']['reopen'] = 'Réouvrir'; -$lng['ticket']['archive'] = 'Archive'; -$lng['ticket']['ticket_delete'] = 'Effacer le billet'; -$lng['ticket']['lastarchived'] = 'Billets récemment archivés'; -$lng['ticket']['archivedtime'] = 'Archivé'; -$lng['ticket']['open'] = 'Ouvert'; -$lng['ticket']['wait_reply'] = 'Attente d\'une réponse'; -$lng['ticket']['replied'] = 'Répondu'; -$lng['ticket']['closed'] = 'Fermé'; -$lng['ticket']['staff'] = 'L\'équipe'; -$lng['ticket']['customer'] = 'Client'; -$lng['ticket']['old_tickets'] = 'Messages du billet'; -$lng['ticket']['search'] = 'Rechercher dans les archives'; -$lng['ticket']['nocustomer'] = 'Aucun choix'; -$lng['ticket']['archivesearch'] = 'Résultat de la recherche dans les archives'; -$lng['ticket']['noresults'] = 'Aucun billet trouvé'; -$lng['ticket']['notmorethanxopentickets'] = 'Pour éviter les abus, vous ne pouvez avoir plus de %s billets ouverts'; -$lng['ticket']['supportstatus'] = 'Etat du support'; -$lng['ticket']['supportavailable'] = 'Nos équipes de support sont disponibles et prętes ŕ vous assister.'; -$lng['ticket']['supportnotavailable'] = 'Nos équipes de support ne sont actuellement pas disponibles.'; -$lng['admin']['templates']['ticket'] = 'E-mail de notification pour les billets de support'; -$lng['admin']['templates']['SUBJECT'] = 'Sera remplacé par le sujet du billet de support.'; -$lng['admin']['templates']['new_ticket_for_customer'] = 'Informe le client que le billet a été envoyé'; -$lng['admin']['templates']['new_ticket_by_customer'] = 'Notifie l\'administrateur qu\'un nouveau billet a été ouvert par un client'; -$lng['admin']['templates']['new_reply_ticket_by_customer'] = 'Notifie l\'administrateur d\'une réponse du client au billet'; -$lng['admin']['templates']['new_ticket_by_staff'] = 'Informe le client qu\'un billet a été ouvert par l\'équipe de support'; -$lng['admin']['templates']['new_reply_ticket_by_staff'] = 'Informe le client d\'une réponse de l\'équipe de support au billet'; -$lng['mails']['new_ticket_for_customer']['mailbody'] = 'Bonjour {FIRSTNAME} {NAME},\n\nVotre demande de billet de support ayant comme sujet "{SUBJECT}" a été envoyé.\n\nVous receverez une notification lorsque votre billet aura une réponse.\n\nMerci,\nL\'équipe Froxlor.'; -$lng['mails']['new_ticket_for_customer']['subject'] = 'Votre billet de support a été envoyé'; -$lng['mails']['new_ticket_by_customer']['mailbody'] = 'Bonjour administrateur,\n\nUn nouveau billet de support ayant comme sujet "{SUBJECT}" a été ouvert.\n\nVeuillez vous connecter pour consulter le billet.\n\nMerci,\nl\'équipe Froxlor.'; -$lng['mails']['new_ticket_by_customer']['subject'] = 'Nouveau billet de support soumis'; -$lng['mails']['new_reply_ticket_by_customer']['mailbody'] = 'Bonjour administrateur,\n\nLe billet de support "{SUBJECT}" a reçu une réponse de la part du client.\n\nVeuillez vous connecter pour consulter le billet.\n\nMerci,\nL\'équipe Froxlor.'; -$lng['mails']['new_reply_ticket_by_customer']['subject'] = 'Nouvelle réponse au billet de support'; -$lng['mails']['new_ticket_by_staff']['mailbody'] = 'Bonjour {FIRSTNAME} {NAME},\n\nUn billet de support ayant comme sujet "{SUBJECT}" a été ouvert pour vous par notre équipe.\n\nVeuillez vous connecter pour consulter le billet.\n\nMerci,\nL\'équipe Froxlor.'; -$lng['mails']['new_ticket_by_staff']['subject'] = 'Nouvelle demande de support soumise'; -$lng['mails']['new_reply_ticket_by_staff']['mailbody'] = 'Bonjour {FIRSTNAME} {NAME},\n\nLe billet de support ayant comme sujet "{SUBJECT}" a reçu une réponse par notre équipe.\n\nVeuillez vous connecter pour consulter le billet.\n\nMerci,\nL\équipe Froxlor.'; -$lng['mails']['new_reply_ticket_by_staff']['subject'] = 'Nouvelle réponse au billet de support'; -$lng['question']['ticket_reallyclose'] = 'Etes-vous sűr de vouloir clôturer le billet "%s" ?'; -$lng['question']['ticket_reallydelete'] = 'Etes-vous sűr de vouloir supprimer le billet "%s" ?'; -$lng['question']['ticket_reallydeletecat'] = 'Etes-vous sűr de vouloir supprimer la catégorie "%s" ?'; -$lng['question']['ticket_reallyarchive'] = 'Etes-vous sűr de vouloir archiver le billet "%s" ?'; -$lng['error']['mysubject'] = '"' . $lng['ticket']['subject'] . '"'; -$lng['error']['mymessage'] = '"' . $lng['ticket']['message'] . '"'; -$lng['error']['mycategory'] = '"' . $lng['ticket']['category'] . '"'; -$lng['error']['nomoreticketsavailable'] = 'Vous n\'avez plus de billets de disponibles. Veuillez contacter votre administrateur.'; -$lng['error']['nocustomerforticket'] = 'Ne peut créer de billet sans client'; -$lng['error']['categoryhastickets'] = 'La catégorie possčde des billets.
    Veuillez d\'abord supprimer tous les billets de cette catégorie.'; -$lng['error']['notmorethanxopentickets'] = $lng['ticket']['notmorethanxopentickets']; -$lng['admin']['ticketsettings'] = 'Paramčtres des billets de support'; -$lng['admin']['archivelastrun'] = 'Derniers billets archivés'; -$lng['serversettings']['ticket']['noreply_email']['title'] = 'Adresse e-mail de non réponse'; -$lng['serversettings']['ticket']['noreply_email']['description'] = 'L\'adresse e-mail de l\'expéditeur de notification pour les billets de support, quelque chose du type no-reply@domaine.com'; -$lng['serversettings']['ticket']['worktime_begin']['title'] = 'Début du support (hh:mm)'; -$lng['serversettings']['ticket']['worktime_begin']['description'] = 'Horaire de début du support'; -$lng['serversettings']['ticket']['worktime_end']['title'] = 'Fin du support (hh:mm)'; -$lng['serversettings']['ticket']['worktime_end']['description'] = 'Horaire de fin du support'; -$lng['serversettings']['ticket']['worktime_sat'] = 'Support disponible le samedi ?'; -$lng['serversettings']['ticket']['worktime_sun'] = 'Support disponible le dimanche ?'; -$lng['serversettings']['ticket']['worktime_all']['title'] = 'Aucune limite horaire pour le support'; -$lng['serversettings']['ticket']['worktime_all']['description'] = 'Si "Oui", les options pour le début et la fin du support seront écrasés.'; -$lng['serversettings']['ticket']['archiving_days'] = 'Aprčs combien de jours un billet fermé sera automatiquement archivé ?'; -$lng['customer']['tickets'] = 'Billet de support'; - -// ADDED IN 1.2.18-svn4 - -$lng['admin']['domain_nocustomeraddingavailable'] = 'Il n\'est acutellement pas possible d\'ajouter de domaines. Vous devez d\'abord ajouter un client.'; -$lng['serversettings']['ticket']['enable'] = 'Activer le systčme de billets'; -$lng['serversettings']['ticket']['concurrentlyopen'] = 'Combien de billets peuvent ętre ouverts au męme moment ?'; -$lng['error']['norepymailiswrong'] = 'L\'adresse de "non réponse" n\'est pas bonne. Une adresse e-mail valide doit ętre entrée.'; -$lng['error']['tadminmailiswrong'] = 'L\'adresse de "l\'administrateur de billets" n\'est pas bonne. Une adresse e-mail valide doit ętre entrée.'; -$lng['ticket']['awaitingticketreply'] = 'Vous avez %s billet(s) de support non répondu(s).'; - -// ADDED IN 1.2.18-svn5 - -$lng['serversettings']['ticket']['noreply_name'] = 'Nom de l\'expéditeur e-mail des billets'; - -// ADDED IN 1.2.19-svn1 - -$lng['serversettings']['mod_fcgid']['configdir']['title'] = 'Dossier de configuration FCGI'; -$lng['serversettings']['mod_fcgid']['configdir']['description'] = 'Oů doivent ętre stockés les fichiers de configuration pour FCGI ?'; -$lng['serversettings']['mod_fcgid']['tmpdir']['title'] = 'Dossier temporaire pour FCGI'; - -// ADDED IN 1.2.19-svn3 - -$lng['serversettings']['ticket']['reset_cycle']['title'] = 'Intervalle de réinitialisation des billets utilisés'; -$lng['serversettings']['ticket']['reset_cycle']['description'] = 'Remettre le compteur de billets ŕ 0 dans le temps imparti'; -$lng['admin']['tickets']['daily'] = 'Journaličre'; -$lng['admin']['tickets']['weekly'] = 'Hebdomadaire'; -$lng['admin']['tickets']['monthly'] = 'Mensuelle'; -$lng['admin']['tickets']['yearly'] = 'Annuelle'; -$lng['error']['ticketresetcycleiswrong'] = 'L\'intervalle de réinitialisation doit ętre "journaličre", "hebdomadaire", "mensuelle" ou "annuelle".'; - -// ADDED IN 1.2.19-svn4 - -$lng['menue']['traffic']['traffic'] = 'Trafic'; -$lng['menue']['traffic']['current'] = 'Mois actuel'; -$lng['traffic']['month'] = 'Mois'; -$lng['traffic']['day'] = 'Jour'; -$lng['traffic']['months'][1] = 'Janvier'; -$lng['traffic']['months'][2] = 'Février'; -$lng['traffic']['months'][3] = 'Mars'; -$lng['traffic']['months'][4] = 'Avril'; -$lng['traffic']['months'][5] = 'Mai'; -$lng['traffic']['months'][6] = 'Juin'; -$lng['traffic']['months'][7] = 'Juillet'; -$lng['traffic']['months'][8] = 'Aoűt'; -$lng['traffic']['months'][9] = 'Septembre'; -$lng['traffic']['months'][10] = 'Octobre'; -$lng['traffic']['months'][11] = 'Novembre'; -$lng['traffic']['months'][12] = 'Décembre'; -$lng['traffic']['mb'] = 'Trafic (Mo)'; -$lng['traffic']['distribution'] = 'FTP | HTTP | E-mail'; -$lng['traffic']['sumhttp'] = 'Trafic HTTP total entrant'; -$lng['traffic']['sumftp'] = 'Trafic FTP total entrant'; -$lng['traffic']['summail'] = 'Trafic E-mail total entrant'; - -// ADDED IN 1.2.19-svn4.5 - -$lng['serversettings']['no_robots']['title'] = 'Permettre aux robots des moteurs de recherche d\'indexer l\'installation de Froxlor'; - -// ADDED IN 1.2.19-svn6 - -$lng['admin']['loggersettings'] = 'Paramčtres des logs'; -$lng['serversettings']['logger']['enable'] = 'Activer / Désactiver les logs'; -$lng['serversettings']['logger']['severity'] = 'Niveau de log'; -$lng['admin']['logger']['normal'] = 'normal'; -$lng['admin']['logger']['paranoid'] = 'paranoďaque'; -$lng['serversettings']['logger']['types']['title'] = 'Type(s) de log'; -$lng['serversettings']['logger']['types']['description'] = 'Spécifiez les types de log séparés par des virgules.
    Les types de log disponible sont : syslog, file, mysql'; -$lng['serversettings']['logger']['logfile'] = 'Nom du fichier de log, dossier + nom du fichier'; -$lng['error']['logerror'] = 'Erreur log : %s'; -$lng['serversettings']['logger']['logcron'] = 'Loguer les travaux de cron (lancer une fois)'; -$lng['question']['logger_reallytruncate'] = 'Etes-vous sűr de vouloir vider la table "%s" ?'; -$lng['admin']['loggersystem'] = 'Log systčme'; -$lng['menue']['logger']['logger'] = 'Log systčme'; -$lng['logger']['date'] = 'Date'; -$lng['logger']['type'] = 'Type'; -$lng['logger']['action'] = 'Action'; -$lng['logger']['user'] = 'Utilisateur'; -$lng['logger']['truncate'] = 'Vider les logs'; - -// ADDED IN 1.2.19-svn7 - -$lng['serversettings']['ssl']['use_ssl'] = 'Utiliser SSL ?'; -$lng['serversettings']['ssl']['ssl_cert_file'] = 'Oů est situé le fichier de certificat ?'; -$lng['serversettings']['ssl']['openssl_cnf'] = 'Paramčtres par défaut pour créer le certificat'; -$lng['panel']['reseller'] = 'revendeur'; -$lng['panel']['admin'] = 'administrateur'; -$lng['panel']['customer'] = 'client(s)'; -$lng['error']['nomessagetosend'] = 'Vous n\'avez pas entré de message.'; -$lng['error']['noreceipientsgiven'] = 'Vous n\'avez pas spécifier de destinataire'; -$lng['admin']['emaildomain'] = 'Domaine e-mail'; -$lng['admin']['email_only'] = 'Seulement des e-mails ?'; -$lng['admin']['wwwserveralias'] = 'Ajouter un "www." ŕ l\'alias du serveur "ServerAlias"'; -$lng['admin']['ipsandports']['enable_ssl'] = 'Est-ce un port SSL ?'; -$lng['admin']['ipsandports']['ssl_cert_file'] = 'Emplacement du certificat SSL'; -$lng['panel']['send'] = 'envoyé'; -$lng['admin']['subject'] = 'Sujet'; -$lng['admin']['receipient'] = 'Destinataire'; -$lng['admin']['message'] = 'Ecrire un message'; -$lng['admin']['text'] = 'Message'; -$lng['menu']['message'] = 'Messages'; -$lng['error']['errorsendingmail'] = 'Echec d\'envoi du message ŕ "%s"'; -$lng['error']['cannotreaddir'] = 'Impossible de lire dossier "%s"'; -$lng['message']['success'] = 'Le message a été envoyé aux destinataires "%s"'; -$lng['message']['noreceipients'] = 'Aucun e-mail n\'a été envoyé car il n\'existe aucun destinataire dans la base de données'; -$lng['admin']['sslsettings'] = 'Paramčtres SSL'; -$lng['cronjobs']['notyetrun'] = 'Pas encore lancé'; -$lng['install']['servername_should_be_fqdn'] = 'Le nom du serveur doit ętre un nom FQDN, pas une adresse IP'; -$lng['serversettings']['default_vhostconf']['title'] = 'Paramčtres par défaut pour les vHosts'; -$lng['emails']['quota'] = 'Quota'; -$lng['emails']['quota_type']['byte'] = 'octet(s)'; -$lng['emails']['quota_type']['kilobyte'] = 'Ko'; -$lng['emails']['quota_type']['megabyte'] = 'Mo'; -$lng['emails']['quota_type']['gigabyte'] = 'Go'; -$lng['emails']['noquota'] = 'Pas de quota'; -$lng['emails']['updatequota'] = 'Mise ŕ jour'; -$lng['serversettings']['mail_quota']['title'] = 'Quota de la boîte aux lettres'; -$lng['serversettings']['mail_quota']['description'] = 'Quota par défaut pour toutes nouvelles boîtes aux lettres créées.'; -$lng['serversettings']['mail_quota_enabled']['title'] = 'Utiliser les quotas de boîtes aux lettres pour les clients'; -$lng['serversettings']['mail_quota_enabled']['description'] = 'Activez cette option pour utiliser les quotas sur les boîtes aux lettres. Par défaut, cette option est ŕ Non car cela requiert une configuration spécifique.'; -$lng['serversettings']['mail_quota_enabled']['removelink'] = 'Cliquez ici pour retirer tous les quotas de tous les comptes e-mails.'; -$lng['question']['admin_quotas_reallywipe'] = 'Etes-vous sűr de vouloir retirer tous les quotas de la table mail_users ? Cette action ne peut ętre annulée !'; -$lng['error']['vmailquotawrong'] = 'La taille du quota doit ętre entre 1 et 999'; -$lng['customer']['email_quota'] = 'Quota e-mail'; -$lng['customer']['email_imap'] = 'E-mail IMAP'; -$lng['customer']['email_pop3'] = 'E-mail POP3'; -$lng['customer']['mail_quota'] = 'Quota e-mail'; -$lng['error']['invalidip'] = 'Adresse IP invalide : %s'; -$lng['serversettings']['decimal_places'] = 'Nombre de décimales ŕ afficher pour le trafic / espace web'; - -// ADDED IN 1.2.19-svn8 - -$lng['admin']['dkimsettings'] = 'Paramčtres DKIM'; -$lng['dkim']['dkim_prefix']['title'] = 'Prefix DKIM'; -$lng['dkim']['dkim_prefix']['description'] = 'Veuillez entrer l\'emplacement des fichiers RSA pour DKIM ainsi que l\'emplacement du fichier de configuration pour le plugin Milter'; -$lng['dkim']['dkim_domains']['title'] = 'Nom du fichier DKIM'; -$lng['dkim']['dkim_domains']['description'] = 'Nom du fichier des paramčtres DKIM pour les domaines tel que entré dans la configuration de DKIM-milter'; -$lng['dkim']['dkim_dkimkeys']['title'] = 'Nom du fichier des clefs DKIM'; -$lng['dkim']['dkim_dkimkeys']['description'] = 'Nom du fichier des paramčtres des clefs DKIM tel que entré dans la configuration de DKIM-milter'; -$lng['dkim']['dkimrestart_command']['title'] = 'Commande de redémarrage de DKIM-milter'; -$lng['dkim']['dkimrestart_command']['description'] = 'Veuillez entrer la commande de redémarrage du service DKIM-milter'; - -// ADDED IN 1.2.19-svn9 - -$lng['admin']['caneditphpsettings'] = 'Peut changer les paramčtres PHP du domaine ?'; - -// ADDED IN 1.2.19-svn12 - -$lng['admin']['allips'] = 'Toutes les adresses IP'; -$lng['panel']['nosslipsavailable'] = 'Il n\'y a actuellement aucune combinaison IP / Port configurer pour SSL'; -$lng['ticket']['by'] = 'de '; -$lng['dkim']['use_dkim']['title'] = 'Activer le support DKIM ?'; -$lng['dkim']['use_dkim']['description'] = 'Voulez-vous utiliser le systčme DKIM (DomainKeys Identified Mail) ?'; -$lng['error']['invalidmysqlhost'] = 'Adresse hôte MySQL invalide : "%s"'; -$lng['error']['cannotuseawstatsandwebalizeratonetime'] = 'Vous ne pouvez pas activer AWStats et Webalizer en męme temps. Veuillez n\'en choisir qu\'un seul.'; -$lng['serversettings']['webalizer_enabled'] = 'Activer les statistiques Webalizer'; -$lng['serversettings']['awstats_enabled'] = 'Activer les statistiques AWStats'; -$lng['admin']['awstatssettings'] = 'Paramčtres Awstats'; -$lng['serversettings']['awstats_domain_file']['title'] = 'Dossier domaines pour AWStats'; -$lng['serversettings']['awstats_model_file']['title'] = 'Fichier modčle pour AWStats'; - -// ADDED IN 1.2.19-svn16 - -$lng['admin']['domain_dns_settings'] = 'Paramčtres DNS'; -$lng['dns']['destinationip'] = 'IP du domaine'; -$lng['dns']['standardip'] = 'IP standard du serveur'; -$lng['dns']['a_record'] = 'Enregistrement de type "A" (IPv6 optionnel)'; -$lng['dns']['cname_record'] = 'Enregistrement CNAME'; -$lng['dns']['mxrecords'] = 'Définition des enregistrements MX'; -$lng['dns']['standardmx'] = 'Enregistrements MX standard du serveur'; -$lng['dns']['mxconfig'] = 'Enregistrements MX personnalisé'; -$lng['dns']['priority10'] = 'Priorité 10'; -$lng['dns']['priority20'] = 'Priorité 20'; -$lng['dns']['txtrecords'] = 'Définir des enregistrement TXT'; -$lng['dns']['txtexample'] = 'Exemple (pour SPF) :
    v=spf1 ip4:xxx.xxx.xx.0/23 -all'; -$lng['serversettings']['selfdns']['title'] = 'Paramčtres manuel des DNS du domaine'; -$lng['serversettings']['selfdnscustomer']['title'] = 'Permettre aux clients de modifier les paramčtes DNS du domaine'; -$lng['admin']['activated'] = 'Activé'; -$lng['admin']['statisticsettings'] = 'Paramčtres des statistiques'; -$lng['admin']['or'] = 'ou'; - -// ADDED IN 1.2.19-svn17 - -$lng['serversettings']['unix_names']['title'] = 'Utiliser des noms d\'utilisateurs compatible UNIX'; -$lng['serversettings']['unix_names']['description'] = 'Vous permet d\'utiliser les - et _ dans les noms d\'utilisateurs si l\'option est ŕ Non'; -$lng['error']['cannotwritetologfile'] = 'Ne peut ouvrir le fichier de log %s en écriture'; -$lng['admin']['sysload'] = 'Charge du systčme'; -$lng['admin']['noloadavailable'] = 'Non disponible'; -$lng['admin']['nouptimeavailable'] = 'Non disponible'; -$lng['panel']['backtooverview'] = 'Retour ŕ l\'aperçu'; -$lng['admin']['nosubject'] = '(Aucun sujet)'; -$lng['admin']['configfiles']['statistics'] = 'Statistiques'; -$lng['login']['forgotpwd'] = 'Mot de passe oublié ?'; -$lng['login']['presend'] = 'Réinitialiser le mot de passe'; -$lng['login']['email'] = 'Adresse e-mail'; -$lng['login']['remind'] = 'Réinitialiser mon mot de passe'; -$lng['login']['usernotfound'] = 'Erreur : utilisateur inconnu !'; -$lng['pwdreminder']['subject'] = 'Froxlor - réinitialisation du mot de passe'; -$lng['pwdreminder']['body'] = 'Bonjour %s,\n\nVotre mot de passe pour Froxlor a été réinitialiser !\nLe nouveau mot de passe est : %p\n\nCordialement,\nL\'équipe Froxlor.'; -$lng['pwdreminder']['success'] = 'Mot de passe correctement réinitialiser.
    Vous devriez recevoir un e-mail avec votre nouveau mot de passe d\'ici quelques minutes.'; - -// ADDED IN 1.2.19-svn18 - -$lng['serversettings']['allow_password_reset']['title'] = 'Permettre aux clients de réinitialiser leurs mots de passe'; -$lng['pwdreminder']['notallowed'] = 'La réinitialisation des mots de passe est désactivée.'; - -// ADDED IN 1.2.19-svn20 - -$lng['serversettings']['awstats_path']['title'] = 'Dossier CGI-BIN de AWStats'; -$lng['serversettings']['awstats_path']['description'] = 'exemple : /var/www/cgi-bin/'; -$lng['serversettings']['awstats_updateall_command']['title'] = 'Emplacement de "awstats_updateall.pl"'; -$lng['serversettings']['awstats_updateall_command']['description'] = 'exemple : /usr/share/awstats/tools/awstats_updateall.pl'; - -// ADDED IN 1.2.19-svn21 - -$lng['customer']['title'] = 'Titre'; -$lng['customer']['country'] = 'Pays'; -$lng['panel']['dateformat'] = 'YYYY-MM-DD'; -$lng['panel']['dateformat_function'] = 'Y-m-d'; - -// Y = Year, m = Month, d = Day - -$lng['panel']['timeformat_function'] = 'H:i:s'; - -// H = Hour, i = Minute, s = Second - -$lng['panel']['default'] = 'Par défaut'; -$lng['panel']['never'] = 'Jamais'; -$lng['panel']['active'] = 'Actif'; -$lng['panel']['please_choose'] = 'Veuillez choisir'; -$lng['panel']['intervalfee_type']['y'] = 'Années'; -$lng['panel']['intervalfee_type']['m'] = 'Mois'; -$lng['panel']['intervalfee_type']['d'] = 'Jours'; -$lng['panel']['intervalfee_type_one']['y'] = 'Année'; -$lng['panel']['intervalfee_type_one']['m'] = 'Mois'; -$lng['panel']['intervalfee_type_one']['d'] = 'Jour'; -$lng['panel']['service_still_active'] = 'Le service est toujours actif'; -$lng['panel']['allow_modifications'] = 'Permettre les modifications'; -$lng['domains']['add_date'] = 'Ajouter ŕ Froxlor'; -$lng['domains']['registration_date'] = 'Ajouter ŕ l\'enregistrement'; -$lng['domains']['topleveldomain'] = 'Domaine de premier niveau'; -$lng['admin']['accountdata'] = 'Informations du compte'; -$lng['admin']['contactdata'] = 'Informations du contact'; -$lng['admin']['servicedata'] = 'Informations du service'; -$lng['admin']['billingdata'] = 'Informations de facturation'; -$lng['admin']['invoicedata'] = 'Informations de la facture'; -$lng['admin']['customer_categories_once'] = 'Inclure des frais d\'installation pour les clients'; -$lng['admin']['customer_categories_period'] = 'Inclure des frais périodiques aux clients'; -$lng['customer']['taxid'] = 'Numéro d\'identification de la taxe'; -$lng['customer']['calc_tax'] = 'Calculer le montant des taxes'; -$lng['customer']['create_contract'] = 'Créer le contrat'; -$lng['customer']['contract_date'] = 'Date du contrat'; -$lng['customer']['contract_number'] = 'Description / Numéro du contrat'; -$lng['customer']['additional_service_description'] = 'Description additionnelle pour le service'; -$lng['customer']['contract_details'] = 'Détails du contrat'; -$lng['customer']['included_domains'] = 'Domaines inclus'; -$lng['customer']['additional_traffic'] = 'Trafic additionnel'; -$lng['customer']['additional_diskspace'] = 'Espace Web additionnel'; -$lng['customer']['term_of_payment'] = 'Délai de paiement'; -$lng['customer']['payment_every'] = 'Paiement tous les / toutes les'; -$lng['customer']['payment_method'] = 'Moyen de paiement'; -$lng['customer']['payment_methods'][CONST_BILLING_PAYMENTMETHOD_BANKTRANSFER] = 'Virement bancaire'; -$lng['customer']['payment_methods'][CONST_BILLING_PAYMENTMETHOD_DEBITCARD] = 'Carte de crédit'; -$lng['customer']['bankaccount_holder'] = 'Titulaire du compte'; -$lng['customer']['bankaccount_number'] = 'Numéro de compte'; -$lng['customer']['bankaccount_blz'] = 'Numéro de la banque'; -$lng['customer']['bankaccount_bank'] = 'Nom de la banque'; -$lng['service']['quantity'] = 'Quantité'; -$lng['service']['interval_fee'] = 'Intervalle de taxation'; -$lng['service']['interval_length'] = 'Longueur de l\'intervalle'; -$lng['service']['interval_payment'] = 'Intervalle de paiement'; -$lng['service']['interval_payment_prepaid'] = 'Prépayé / avant paiement'; -$lng['service']['interval_payment_postpaid'] = 'Post payé / aprčs paiement'; -$lng['service']['setup_fee'] = 'Montant des frais d\'installation'; -$lng['service']['active'] = 'Service activé'; -$lng['service']['start_date'] = 'Activé depuis'; -$lng['service']['end_date'] = 'Inactif depuis'; -$lng['service']['lastinvoiced_date'] = 'Derničre facture'; -$lng['service']['valid_from'] = 'Valide du'; -$lng['service']['valid_to'] = 'Valide jusqu\'au'; -$lng['invoice']['invoicenumbertemplate'] = 'H-{year}/{number}'; -$lng['invoice']['sender'] = ''; -$lng['invoice']['invoice'] = 'Facture'; -$lng['invoice']['cancellation'] = 'Annuler la facture'; -$lng['invoice']['reminder'] = 'Rappel'; -$lng['invoice']['preview'] = 'Pré-visualiser'; -$lng['invoice']['dateheader'] = 'Fait ŕ %s'; -$lng['invoice']['number'] = 'Facture numéro'; -$lng['invoice']['contract_number'] = 'Numéro de contrat'; -$lng['invoice']['contract_details'] = 'Détails du contrat'; -$lng['invoice']['contract_details_template'] = 'Contrat d\'hébergement Web %s contenant un espace de %s Mo, ' . chr(128) . 'pour un prix de %s par Go supplémentaires, %s Go de trafic, ' . chr(128) . 'pour un prix de %s par Go supplémentaire; inclus les noms de domaines de %s tous les %s %s'; -$lng['invoice']['period'] = 'Période de facturation'; -$lng['invoice']['header'][0] = 'Point de vente'; -$lng['invoice']['header'][1] = 'Description'; -$lng['invoice']['header'][2] = 'Intervalle'; -$lng['invoice']['header'][3] = 'Net [' . chr(128) . ']'; -$lng['invoice']['header'][4] = 'Taxe [' . chr(128) . ']'; -$lng['invoice']['header'][5] = '%'; -$lng['invoice']['header'][6] = 'Total [' . chr(128) . ']'; -$lng['invoice']['subtotal'] = 'Sous-total'; -$lng['invoice']['tax'] = 'Taxe (%s%%)'; -$lng['invoice']['credit_note'] = 'Note de crédit'; -$lng['invoice']['total'] = 'Total'; -$lng['invoice']['payment_methods'][0] = 'Le montant de la facture ŕ payer dans un délai de %s jours. ' . "\n" . 'N\'ayant pas encore reçu de rčglement ŕ ce jour, nous vous prions de vouloir effectuer votre rčglement par virement bancaire sur notre compte ŕ créditer. Si vous souhaitez opter pour le prélčvement automatique, veuillez remplir le formulaire et nous le renvoyer par courrier postal.'; -$lng['invoice']['payment_methods'][1] = 'Le montant de la facture est de %s ŕ notre crédit dans un délai de %s, sur notre compte numéro %s, %s recouvrées par prélčvement'; -$lng['invoice']['tax_text']['line'] = 'T.V.A. %s : %s' . "\n"; -$lng['invoice']['tax_text']['client'] = 'du client'; -$lng['invoice']['state'] = 'état'; -$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_INVOICED] = 'facturé'; -$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_SENT] = 'envoyé'; -$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_PAID] = 'payé'; -$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_CANCELLED_NO_REINVOICE] = 'annulé (par de refacturation)'; -$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_CANCELLED_REINVOICE_WITHOUT_CREDIT_NOTE] = 'annulé (refacturation sans note de crédit)'; -$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_CANCELLED_REINVOICE_WITH_CREDIT_NOTE] = 'annulé (refacturation avec note de crédit)'; -$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_CANCELLED_REINVOICED] = 'annulé (re-facturé)'; -$lng['invoice']['state_change'] = 'dernier changement d\'état'; -$lng['invoice']['change_state'] = 'changer l\'état de la facture'; -$lng['invoice']['total_fee'] = 'sans taxe'; -$lng['invoice']['total_fee_taxed'] = 'Total'; -$lng['invoice']['fix'] = 'Correction de la facture'; -$lng['invoice']['pdf'] = 'Créer un PDF'; -$lng['invoice']['create_reminder'] = 'Créer un rappel'; -$lng['invoice']['changelog'] = 'Historique des changements'; -$lng['invoice']['deleted_line'] = 'La ligne a été supprimée.'; -$lng['invoice']['original_value'] = 'Valeur initiale'; -$lng['invoice']['page_footer'] = 'page %s sur %s'; -$lng['billing']['billing'] = 'Facturation'; -$lng['billing']['invoices'] = 'Factures'; -$lng['billing']['invoices_admin'] = 'Factures (Administrateurs)'; -$lng['billing']['openinvoices'] = 'Factures ouvertes'; -$lng['billing']['openinvoices_admin'] = 'Factures ouvertes (Administrateurs)'; -$lng['billing']['cacheinvoicefees'] = 'Mettre ŕ jour la liste / les tarifs'; -$lng['billing']['invoice'] = 'Facture'; -$lng['billing']['invoice_date'] = 'Date de facture'; -$lng['billing']['invoice_fee'] = 'Frais de facture'; -$lng['billing']['preview'] = 'Pré-visualiser'; -$lng['billing']['caption'] = 'Légende'; -$lng['billing']['number'] = 'Facture numéro'; -$lng['billing']['caption_setup'] = 'Légende pour les frais d\'installation'; -$lng['billing']['caption_interval'] = 'Légende pour les frais de gestion interne'; -$lng['billing']['template'] = 'Modčle'; -$lng['billing']['interval'] = 'Intervalle'; -$lng['billing']['other'] = 'Autres services'; -$lng['billing']['other_add'] = 'Ajouter d\'autres services'; -$lng['billing']['other_edit'] = 'Modifier les autres services'; -$lng['billing']['taxclassesnrates'] = 'Classifications et montants des taxes'; -$lng['billing']['taxclass'] = 'Classification de la taxe'; -$lng['billing']['taxrate'] = 'Taux de taxe'; -$lng['billing']['taxrate_add'] = 'Ajouter un taux de taxe'; -$lng['billing']['taxrate_edit'] = 'Modifier un taux de taxe'; -$lng['billing']['domains_templates'] = 'Modčle de domaine'; -$lng['billing']['domains_templates_add'] = 'Ajouter un modčle de domaine'; -$lng['billing']['domains_templates_edit'] = 'Modifier un modčle de domaine'; -$lng['billing']['other_templates'] = 'Autres modčles de services'; -$lng['billing']['other_templates_add'] = 'Ajouter d\'autres modčles de services'; -$lng['billing']['other_templates_edit'] = 'Modifier les autres modčles de services'; -$lng['billing']['categories']['hosting_caption'] = 'Hébergement'; -$lng['billing']['categories']['hosting_rowcaption_setup'] = 'Contrat d\'hébergement - Frais d\'installation'; -$lng['billing']['categories']['hosting_rowcaption_interval'] = 'Contrat d\'hébergement'; -$lng['billing']['categories']['hosting_rowcaption_setup_withloginname'] = 'Contrat d\'hébergement ({loginname}) - Frais d\'installation'; -$lng['billing']['categories']['hosting_rowcaption_interval_withloginname'] = 'Contrat d\'hébergement ({loginname})'; -$lng['billing']['categories']['domains_caption'] = 'Domaines'; -$lng['billing']['categories']['domains_rowcaption_setup'] = 'Domaine {domain} - Frais d\'installation'; -$lng['billing']['categories']['domains_rowcaption_interval'] = 'Domaine {domain}'; -$lng['billing']['categories']['traffic_caption'] = 'Trafic'; -$lng['billing']['categories']['traffic_rowcaption_setup'] = $lng['billing']['categories']['traffic_rowcaption_interval'] = 'Trafic utilisé : {traffic_total}/{traffic_included} Go'; -$lng['billing']['categories']['traffic_rowcaption_setup_unlimited'] = $lng['billing']['categories']['traffic_rowcaption_interval_unlimited'] = 'Trafic utilisé : {traffic_total}/' . $lng['customer']['unlimited'] . ' Go'; -$lng['billing']['categories']['other_caption'] = 'Autre'; -$lng['billing']['categories']['other_rowcaption_setup'] = $lng['billing']['categories']['other_rowcaption_interval'] = 'Autre'; -$lng['billing']['categories']['diskspace_caption'] = 'Espace Web'; -$lng['billing']['categories']['diskspace_rowcaption_setup'] = $lng['billing']['categories']['diskspace_rowcaption_interval'] = 'Espace Web utilisé : {diskspace_total}/{diskspace_included} Go'; -$lng['billing']['categories']['diskspace_rowcaption_setup_unlimited'] = $lng['billing']['categories']['diskspace_rowcaption_interval_unlimited'] = 'Espace Web utilisé : {diskspace_total}/' . $lng['customer']['unlimited'] . ' Go'; -$lng['question']['billing_invoice_row_reallydelete'] = 'Etes-vous sűr de vouloir supprimer cette ligne de facturation ?'; -$lng['question']['billing_invoice_row_reallyreset'] = 'Etes-vous sűr de vouloir ignorer tous les changements effectués ŕ cette facture ?'; -$lng['question']['billing_invoice_row_reallyreset_key'] = 'Etes-vous sűr de vouloir ignorer tous les changements effectués ŕ cette ligne ?'; -$lng['question']['billing_domains_template_reallydelete'] = 'Etes-vous sűr de vouloir supprimer le modčle pour "%s" ?'; -$lng['question']['billing_other_template_reallydelete'] = 'Etes-vous sűr de vouloir supprimer le modčle pour "%s" ?'; -$lng['question']['billing_other_service_reallydelete'] = 'Etes-vous sűr de vouloir supprimer ce service ?'; -$lng['question']['billing_taxrate_reallydelete'] = 'Etes-vous sűr de vouloir supprimer ce taux de taxe ?'; - -// ADDED IN 1.2.19-svn22 - -$lng['serversettings']['allow_password_reset']['description'] = 'Les clients peuvent réinitialiser leurs mots de passe et il sera envoyé ŕ leurs propres adresses e-mails'; -$lng['serversettings']['allow_password_reset_admin']['title'] = 'Permettre la réinitialisation des mots de passe par les administrateurs'; -$lng['serversettings']['allow_password_reset_admin']['description'] = 'Les administrateurs / revendeurs peuvent réinitialiser leurs mots de passe et il sera envoyé ŕ leurs propres adresses e-mails'; - -// ADDED IN 1.2.19-svn23 - -$lng['admin']['edit_billingdata'] = 'Peut modifier les informations de facturation ?'; -$lng['error']['service_still_active'] = 'Le service est toujours actif.'; - -// ADDED IN 1.2.19-svn23 - -$lng['admin']['billingsettings'] = 'Paramčtres de facturation'; -$lng['serversettings']['billing']['activate_billing']['title'] = 'Activer la facturation'; -$lng['serversettings']['billing']['activate_billing']['description'] = 'Ici, vous pouvez activer / désactiver le systčme global de facturation.'; -$lng['serversettings']['billing']['highlight_inactive']['title'] = 'Mettre en surbrillance les factures impayées'; -$lng['serversettings']['billing']['highlight_inactive']['description'] = 'Est-ce les factures impayées doivent ętre mises en surbrillance ?'; -$lng['serversettings']['billing']['invoicenumber_count']['title'] = 'Numéro de facture actuel'; -$lng['serversettings']['billing']['invoicenumber_count']['description'] = 'Est un numéro de facture fixe. Lors de tous changements, vous serez amené ŕ en discuter avec votre comptable.'; - -?> + + * @author Aldo Reset + * @author Romain MARIADASSOU + * @author Froxlor Team + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Language + * @version $Id$ + */ + +/** + * Some importants rules of typograhie in french : + * These signs << ! ? : " & >> must be be preceded by white space + * -> We can make the white space like that : <<   >> + * -> so the white space is still committed to the previous letter and punctuation mark as follows. + * These signs << . ; , ' >> should be glued to the previous letter + * These signs << / | = >> would be preceded and followed with a white as mush as possible, it is much clear from reading. + */ + +/** + * Global + */ + +$lng['translator'] = 'Tim Zielosko, Aldo Reset, Romain MARIADASSOU'; +$lng['panel']['edit'] = 'Modifier'; +$lng['panel']['delete'] = 'Supprimer'; +$lng['panel']['create'] = 'Ajouter'; +$lng['panel']['save'] = 'Sauvegarder'; +$lng['panel']['yes'] = 'Oui'; +$lng['panel']['no'] = 'Non'; +$lng['panel']['emptyfornochanges'] = 'Laissez vide pour ne pas modifier'; +$lng['panel']['emptyfordefault'] = 'Laissez vide pour l\'option standard'; +$lng['panel']['path'] = 'Dossier'; +$lng['panel']['toggle'] = 'Activer / Désactiver'; +$lng['panel']['next'] = 'continuer'; +$lng['panel']['dirsmissing'] = 'Dossiers non disponibles ou illisibles'; + +/** + * Login + */ + +$lng['login']['username'] = 'Identifiant'; +$lng['login']['password'] = 'Mot de passe'; +$lng['login']['language'] = 'Langue'; +$lng['login']['login'] = 'Se connecter'; +$lng['login']['logout'] = 'Se déconnecter'; +$lng['login']['profile_lng'] = 'Langue du profil'; + +/** + * Customer + */ + +$lng['customer']['documentroot'] = 'Chemin'; +$lng['customer']['name'] = 'Nom'; +$lng['customer']['firstname'] = 'Prénom'; +$lng['customer']['company'] = 'Entreprise'; +$lng['customer']['street'] = 'Rue'; +$lng['customer']['zipcode'] = 'Code postal'; +$lng['customer']['city'] = 'Ville'; +$lng['customer']['phone'] = 'Téléphone'; +$lng['customer']['fax'] = 'Fax'; +$lng['customer']['email'] = 'E-mail'; +$lng['customer']['customernumber'] = 'Numéro du client'; +$lng['customer']['diskspace'] = 'Espace Web (Mo)'; +$lng['customer']['traffic'] = 'Trafic (Go)'; +$lng['customer']['mysqls'] = 'Base(s) de données MySQL'; +$lng['customer']['emails'] = 'Adresse(s) e-mail'; +$lng['customer']['accounts'] = 'Accčs e-mail'; +$lng['customer']['forwarders'] = 'Transfert(s) e-mail'; +$lng['customer']['ftps'] = 'Accčs FTP'; +$lng['customer']['subdomains'] = 'Sous-domaine(s)'; +$lng['customer']['domains'] = 'Domaine(s)'; +$lng['customer']['unlimited'] = 'illimité'; + +/** + * Customermenue + */ + +$lng['menue']['main']['main'] = 'Général'; +$lng['menue']['main']['changepassword'] = 'Changer de mot de passe'; +$lng['menue']['main']['changelanguage'] = 'Changer de langue'; +$lng['menue']['email']['email'] = 'E-mail'; +$lng['menue']['email']['emails'] = 'Adresse(s) e-mail(s)'; +$lng['menue']['email']['webmail'] = 'Webmail'; +$lng['menue']['mysql']['mysql'] = 'MySQL'; +$lng['menue']['mysql']['databases'] = 'Bases de données'; +$lng['menue']['mysql']['phpmyadmin'] = 'phpMyAdmin'; +$lng['menue']['domains']['domains'] = 'Domaines'; +$lng['menue']['domains']['settings'] = 'Paramčtres des sites'; +$lng['menue']['ftp']['ftp'] = 'FTP'; +$lng['menue']['ftp']['accounts'] = 'Comptes d\'accčs FTP'; +$lng['menue']['ftp']['webftp'] = 'WebFTP'; +$lng['menue']['extras']['extras'] = 'Extras'; +$lng['menue']['extras']['directoryprotection'] = 'Protection des dossiers'; +$lng['menue']['extras']['pathoptions'] = 'Options des dossiers'; + +/** + * Index + */ + +$lng['index']['customerdetails'] = 'Informations personnelles'; +$lng['index']['accountdetails'] = 'Informations du compte'; + +/** + * Change Password + */ + +$lng['changepassword']['old_password'] = 'Ancien mot de passe'; +$lng['changepassword']['new_password'] = 'Nouveau mot de passe'; +$lng['changepassword']['new_password_confirm'] = 'Nouveau mot de passe (confirmation)'; +$lng['changepassword']['new_password_ifnotempty'] = 'Nouveau mot de passe (Veuillez laisser vide pour ne pas changer)'; +$lng['changepassword']['also_change_ftp'] = 'Changer aussi le mot de passe du compte FTP principal ?'; + +/** + * Domains + */ + +$lng['domains']['description'] = 'Ici, vous pouvez ajouter des sites et domaines et changer leurs doosiers.
    Il vous faudra patienter quelques minutes aprčs chaque changement pour que la configuration soit activée.'; +$lng['domains']['domainsettings'] = 'Configuration des Domaines'; +$lng['domains']['domainname'] = 'Nom du Domaine'; +$lng['domains']['subdomain_add'] = 'Ajouter un sous-domaine'; +$lng['domains']['subdomain_edit'] = 'Changer un sous-domaine'; +$lng['domains']['wildcarddomain'] = 'Domaine générique (Wilcard) ?'; +$lng['domains']['aliasdomain'] = 'Alias pour le domaine'; +$lng['domains']['noaliasdomain'] = 'Domaine sans alias'; + +/** + * E-mails + */ + +$lng['emails']['description'] = 'Ici, vous pouvez ajouter vos boîtes e-mails.

    Les informations pour configurer votre logiciel e-mail sont les suivantes :

    Nom du serveur : votre-domaine.com
    Identifiant : l\'adresse e-mail
    Mot de passe : le mot de passe que vous avez choisi'; +$lng['emails']['emailaddress'] = 'Adresse'; +$lng['emails']['emails_add'] = 'Ajouter une adresse e-mail'; +$lng['emails']['emails_edit'] = 'Changer une adresse e-mail'; +$lng['emails']['catchall'] = 'Catchall'; +$lng['emails']['iscatchall'] = 'Définir comme adresse "catchall" ?'; +$lng['emails']['account'] = 'Accčs'; +$lng['emails']['account_add'] = 'Ajouter un accčs'; +$lng['emails']['account_delete'] = 'Supprimer l\'accčs'; +$lng['emails']['from'] = 'de'; +$lng['emails']['to'] = 'ŕ'; +$lng['emails']['forwarders'] = 'Réexpédition'; +$lng['emails']['forwarder_add'] = 'Ajouter un renvoi'; + +/** + * FTP + */ + +$lng['ftp']['description'] = 'Ici, vous pouvez ajouter des accčs FTP supplémentaires.
    Les changements, ainsi que l\'accčs, sont immédiatement opérationnels.'; +$lng['ftp']['account_add'] = 'Ajouter un accčs'; + +/** + * MySQL + */ + +$lng['mysql']['databasename'] = 'Nom de la base de données'; +$lng['mysql']['databasedescription'] = 'Description de la base de données'; +$lng['mysql']['database_create'] = 'Ajouter une base de données'; + +/** + * Extras + */ + +$lng['extras']['description'] = 'Ici, vous pouvez ajouter des extras, comme par exemple, la protection de dossiers du site.
    Il vous faudra patienter quelques minutes aprčs chaque changement pour que la configuration soit activée.'; +$lng['extras']['directoryprotection_add'] = 'Ajouter une protection de dossier'; +$lng['extras']['view_directory'] = 'Aperçu du dossier'; +$lng['extras']['pathoptions_add'] = 'Ajouter des options sur le dossier'; +$lng['extras']['directory_browsing'] = 'Afficher le contenu des dossiers'; +$lng['extras']['pathoptions_edit'] = 'Modifier les options de dossier'; +$lng['extras']['error404path'] = '404'; +$lng['extras']['error403path'] = '403'; +$lng['extras']['error500path'] = '500'; +$lng['extras']['error401path'] = '401'; +$lng['extras']['errordocument404path'] = 'Emplacement du document "Erreur 404"'; +$lng['extras']['errordocument403path'] = 'Emplacement du document "Erreur 403"'; +$lng['extras']['errordocument500path'] = 'Emplacement du document "Erreur 500"'; +$lng['extras']['errordocument401path'] = 'Emplacement du document "Erreur 401"'; + +/** + * Errors + */ + +$lng['error']['error'] = 'Erreur'; +$lng['error']['directorymustexist'] = 'Le dossier que vous avez choisi n\'existe pas. Veuillez ajouter le dossier avec votre client FTP.'; +$lng['error']['filemustexist'] = 'Le fichier que vous avez sélectionné n\'existe pas.'; +$lng['error']['allresourcesused'] = 'Vous avez déjŕ utilisé toutes les ressources.'; +$lng['error']['domains_cantdeletemaindomain'] = 'Vous ne pouvez pas supprimer un domaine qui est utilisé pour des adresses e-mails.'; +$lng['error']['domains_canteditdomain'] = 'Vous n\'avez pas le droit de configurer ce domaine.'; +$lng['error']['domains_cantdeletedomainwithemail'] = 'Vous ne pouvez pas supprimer un domaine qui est utilisé pour des e-mails. Vous devez d\'abord supprimer toutes les adresses e-mails qu\'il contient.'; +$lng['error']['firstdeleteallsubdomains'] = 'Il faut d\'abord supprimer tous les sous-domaines avant d\'ajouter un domaine "wildcard".'; +$lng['error']['youhavealreadyacatchallforthisdomain'] = 'Vous avez déjŕ défini une adresse "catchall" pour ce domaine.'; +$lng['error']['ftp_cantdeletemainaccount'] = 'Vous ne pouvez pas supprimer votre accčs principal.'; +$lng['error']['login'] = 'Identifiant / mot de passe invalide.'; +$lng['error']['login_blocked'] = 'Cet identifiant a été bloqué ŕ cause de nombreuses tentatives de connexions invalides.
    Veuillez réessayer dans ' . $settings['login']['deactivatetime'] . ' secondes.'; +$lng['error']['notallreqfieldsorerrors'] = 'Vous n\'avez pas rempli toutes les cases obligatoires ou vous les avez remplis avec des informations invalides.'; +$lng['error']['oldpasswordnotcorrect'] = 'L\'ancien mot de passe n\'est pas correct.'; +$lng['error']['youcantallocatemorethanyouhave'] = 'Vous ne pouvez pas distribuer plus de ressources qu\'il n\'en reste.'; +$lng['error']['mustbeurl'] = 'Vous n\'avez pas entré une adresse URL valide.'; +$lng['error']['invalidpath'] = 'Vous n\'avez pas choisi une adresse URL valide (probablement ŕ cause de problčmes avec le listing de dossiers ?)'; +$lng['error']['stringisempty'] = 'Entrée manquante'; +$lng['error']['stringiswrong'] = 'Entrée invalide'; +$lng['error']['myloginname'] = '"' . $lng['login']['username'] . '"'; +$lng['error']['mypassword'] = '"' . $lng['login']['password'] . '"'; +$lng['error']['oldpassword'] = '"' . $lng['changepassword']['old_password'] . '"'; +$lng['error']['newpassword'] = '"' . $lng['changepassword']['new_password'] . '"'; +$lng['error']['newpasswordconfirm'] = '"' . $lng['changepassword']['new_password_confirm'] . '"'; +$lng['error']['newpasswordconfirmerror'] = 'Le nouveau mot de passe et sa confirmation ne sont pas identiques pas.'; +$lng['error']['myname'] = '"' . $lng['customer']['name'] . '"'; +$lng['error']['myfirstname'] = '"' . $lng['customer']['firstname'] . '"'; +$lng['error']['emailadd'] = '"' . $lng['customer']['email'] . '"'; +$lng['error']['mydomain'] = '"domaine"'; +$lng['error']['mydocumentroot'] = '"Documentroot"'; +$lng['error']['loginnameexists'] = 'L\'identifiant "%s" existe déjŕ.'; +$lng['error']['emailiswrong'] = 'L\'adresse "%s" contient des signes invalides ou est incomplčte.'; +$lng['error']['loginnameiswrong'] = 'L\'identifiant "%s" contient des signes invalides.'; +$lng['error']['userpathcombinationdupe'] = 'Cette combinaison d\'identifiant et de dossier existe déjŕ.'; +$lng['error']['patherror'] = 'Erreur générale ! Le dossier ne doit pas ętre vide.'; +$lng['error']['errordocpathdupe'] = 'Il y a déjŕ une option concernant le dossier "%s".'; +$lng['error']['adduserfirst'] = 'Vous devez d\'abord ajouter un.'; +$lng['error']['domainalreadyexists'] = 'Le domaine "%s" existe déjŕ.'; +$lng['error']['nolanguageselect'] = 'Aucune langue choisis.'; +$lng['error']['nosubjectcreate'] = 'Il faut entrer un sujet.'; +$lng['error']['nomailbodycreate'] = 'Il faut entrer un corps de texte.'; +$lng['error']['templatenotfound'] = 'Aucun modčle trouvé.'; +$lng['error']['alltemplatesdefined'] = 'Vous avez déjŕ appliqué des modčles pour toutes les langues.'; +$lng['error']['wwwnotallowed'] = 'Un sous-domaine ne peut pas s\'appeler www.'; +$lng['error']['subdomainiswrong'] = 'Le sous-domaine "%s" contient des signes invalides.'; +$lng['error']['domaincantbeempty'] = 'Le nom de domaine ne doit pas ętre vide.'; +$lng['error']['domainexistalready'] = 'Le domaine "%s" existe déjŕ.'; +$lng['error']['domainisaliasorothercustomer'] = 'L\'alias du domaine choisi est soit un alias existant d\'un autre client ou soit fait référence ŕ lui męme.'; +$lng['error']['emailexistalready'] = 'L\'adresse "%s" existe déjŕ.'; +$lng['error']['maindomainnonexist'] = 'Le domaine "%s" n\'existe pas.'; +$lng['error']['destinationnonexist'] = 'Veuillez écrire votre adresse de renvoi ŕ l\'emplacement "ŕ".'; +$lng['error']['destinationalreadyexistasmail'] = 'Le renvoi vers l\'adresse "%s" existe déjŕ comme adresse active.'; +$lng['error']['destinationalreadyexist'] = 'Il existe déjŕ une réexpédition vers l\'adresse "%s".'; +$lng['error']['destinationiswrong'] = 'L\'adresse "%s" contient des signes invalides ou est incomplčte.'; +$lng['error']['domainname'] = $lng['domains']['domainname']; +$lng['error']['youcantdeletechangemainadmin'] = 'Pour des raisons de sécurité, il n\'est pas possible de supprimer ou modifier l\'administrateur principal.'; +$lng['error']['loginnameissystemaccount'] = 'Vous ne pouvez pas créer un compte identique au compte systčme, veuillez réessayer avec un autre nom.'; + +/** + * Questions + */ + +$lng['question']['question'] = 'Question de sécurité'; +$lng['question']['admin_customer_reallydelete'] = 'Etes-vous sűr de vouloir supprimer le compte "%s" ?
    ATTENTION ! Toutes ses informations seront supprimées ! Une fois fait, il vous appartiendra de supprimer manuellement tous les dossiers du compte sur le systčme de fichiers.'; +$lng['question']['admin_domain_reallyenablemailsystemhostname'] = 'Etes-vous sűr de vouloir activé le serveur de nom en tant que serveur de mails ?'; +$lng['question']['admin_domain_reallydelete'] = 'Etes-vous sűr de vouloir supprimer le domaine "%s" ?'; +$lng['question']['admin_domain_reallydisablesecuritysetting'] = 'Etes-vous sűr de vouloir désactiver les modes de sécurité suivants : OpenBasedir et / oů SafeMode ?'; +$lng['question']['admin_admin_reallydelete'] = 'Etes-vous sűr de vouloir supprimer l\'administrateur "%s" ?
    Tous ses comptes seront affectés ŕ l\'administrateur principal.'; +$lng['question']['admin_template_reallydelete'] = 'Etes-vous sűr de vouloir supprimer le modčle "%s" ?'; +$lng['question']['domains_reallydelete'] = 'Etes-vous sűr de vouloir supprimer le domaine "%s" ?'; +$lng['question']['email_reallydelete'] = 'Etes-vous sűr de vouloir supprimer l\'adresse e-mail "%s" ? '; +$lng['question']['email_reallydelete_account'] = 'Etes-vous sűr de vouloir supprimer l\'accčs e-mail "%s" ?'; +$lng['question']['email_reallydelete_forwarder'] = 'Etes-vous sűr de vouloir supprimer le renvoi vers "%s" ?'; +$lng['question']['extras_reallydelete'] = 'Etes-vous sűr de vouloir supprimer la protection du dossier "%s" ?'; +$lng['question']['extras_reallydelete_pathoptions'] = 'Etes-vous sűr de vouloir supprimer les options du dossier "%s" ?'; +$lng['question']['ftp_reallydelete'] = 'Etes-vous sűr de vouloir supprimer l\'accčs ftp "%s" ?'; +$lng['question']['mysql_reallydelete'] = 'Etes-vous sűr de vouloir supprimer la base de données "%s" ?
    ATTENTION : Toutes les données seront perdues ŕ jamais !'; +$lng['question']['admin_configs_reallyrebuild'] = 'Etes-vous sűr de vouloir régénérer les fichiers de configuration Apache et Bind ?'; + +/** + * Mails + */ + +$lng['mails']['pop_success']['mailbody'] = 'Bonjour,\n\nvotre accčs POP3 / IMAP {EMAIL}\na été créé avec succčs.\n\nCeci est un e-mail généré automatiquement, veuillez ne pas répondre ŕ ce message.\n\nCordialement,\nL\'équipe Froxlor\nhttp://www.froxlor.org'; +$lng['mails']['pop_success']['subject'] = 'Accčs POP3 / IMAP créé'; +$lng['mails']['createcustomer']['mailbody'] = 'Bonjour {FIRSTNAME} {NAME},\n\nVous trouverez ci-dessous vos informations d\'accčs au panel d\'administration :\n\nAdresse d\'administration : http://demo.froxlor.org\n\nIdentifiant : {USERNAME}\nMot de passe : {PASSWORD}\n\nCordialement,\nL\'équipe Froxlor\nhttp://www.froxlor.org\n'; +$lng['mails']['createcustomer']['subject'] = 'Froxlor : Informations pour votre accčs au panel d\'administration'; + +/** + * Admin + */ + +$lng['admin']['overview'] = 'Sommaire'; +$lng['admin']['ressourcedetails'] = 'Ressources utilisées'; +$lng['admin']['systemdetails'] = 'Informations du systčme'; +$lng['admin']['froxlordetails'] = 'Informations de Froxlor'; +$lng['admin']['installedversion'] = 'Version installée'; +$lng['admin']['latestversion'] = 'Derničre version en date'; +$lng['admin']['lookfornewversion']['clickhere'] = 'Vérifier par internet'; +$lng['admin']['lookfornewversion']['error'] = 'Erreur pour vérifier la derničre version'; +$lng['admin']['resources'] = 'Ressources'; +$lng['admin']['customer'] = 'Compte'; +$lng['admin']['customers'] = 'Comptes'; +$lng['admin']['customer_add'] = 'Ajouter un compte'; +$lng['admin']['customer_edit'] = 'Modifier un compte'; +$lng['admin']['domains'] = 'Domaines'; +$lng['admin']['domain_add'] = 'Ajouter un domaine'; +$lng['admin']['domain_edit'] = 'Modifier le domaine'; +$lng['admin']['subdomainforemail'] = 'Sous-domaines comme domaine e-mail'; +$lng['admin']['admin'] = 'Administrateur'; +$lng['admin']['admins'] = 'Administrateurs'; +$lng['admin']['admin_add'] = 'Ajouter un administrateur'; +$lng['admin']['admin_edit'] = 'Modifier un administrateur'; +$lng['admin']['customers_see_all'] = 'Peut voir tous les comptes ?'; +$lng['admin']['domains_see_all'] = 'Peut voir tous les Domaines ?'; +$lng['admin']['change_serversettings'] = 'Peut modifier la configuration du serveur ?'; +$lng['admin']['server'] = 'Serveur'; +$lng['admin']['serversettings'] = 'Paramčtres'; +$lng['admin']['rebuildconf'] = 'Régénérer la configuration'; +$lng['admin']['stdsubdomain'] = 'Sous-domaine type'; +$lng['admin']['stdsubdomain_add'] = 'Ajouter un sous-domaine type'; +$lng['admin']['phpenabled'] = 'PHP activé'; +$lng['admin']['deactivated'] = 'Désactiver'; +$lng['admin']['deactivated_user'] = 'Désactiver l\'utilisateur'; +$lng['admin']['sendpassword'] = 'Envoyer le mot de passe'; +$lng['admin']['ownvhostsettings'] = 'Configuration spéciale du vHost'; +$lng['admin']['configfiles']['serverconfiguration'] = 'Exemple de configuration'; +$lng['admin']['configfiles']['files'] = 'Fichiers de configuration : Veuillez créer ou modifier les fichiers suivants avec le contenu ci-dessous.

    IMPORTANT : Le mot de passe MySQL n\'est pas donné dans les informations ci-dessous
    pour des raisons de sécurité. Veuillez donc remplacer les "MYSQL_PASSWORD"
    manuellement avec le mot de passe correspondant. En cas d\'oubli, vous pouvez le retrouver dans
    le fichier "lib/userdata.inc.php".'; +$lng['admin']['configfiles']['commands'] = 'Commandes : Veuillez exécuter les commandes ci-dessous dans le shell.'; +$lng['admin']['configfiles']['restart'] = 'Redémarrage : Veuillez exécuter les commandes ci-dessous pour
    prendre en compte les changements.'; +$lng['admin']['templates']['templates'] = 'Modčles'; +$lng['admin']['templates']['template_add'] = 'Ajouter un modčle'; +$lng['admin']['templates']['template_edit'] = 'Modifier un modčle'; +$lng['admin']['templates']['action'] = 'Action'; +$lng['admin']['templates']['email'] = 'E-mail'; +$lng['admin']['templates']['subject'] = 'Référence'; +$lng['admin']['templates']['mailbody'] = 'Texte de l\'e-mail'; +$lng['admin']['templates']['createcustomer'] = 'E-mail de bienvenue pour les nouveaux clients'; +$lng['admin']['templates']['pop_success'] = 'E-mail de bienvenue pour les nouveaux accčs e-mail'; +$lng['admin']['templates']['template_replace_vars'] = 'Les variables qui seront remplacées dans le template :'; +$lng['admin']['templates']['FIRSTNAME'] = 'Sera remplacé par le prénom.'; +$lng['admin']['templates']['NAME'] = 'Sera remplacé par le nom.'; +$lng['admin']['templates']['USERNAME'] = 'Sera remplacé par le login.'; +$lng['admin']['templates']['PASSWORD'] = 'Sera remplacé par le mot de passe du client.'; +$lng['admin']['templates']['EMAIL'] = 'Sera remplacé par l\'accčs e-mail.'; + +/** + * Serversettings + */ + +$lng['serversettings']['session_timeout']['title'] = 'Durée d\'inactivité maximale'; +$lng['serversettings']['session_timeout']['description'] = 'Combien de secondes d\'inactivité avant qu\'une session ne se ferme ?'; +$lng['serversettings']['accountprefix']['title'] = 'Préfix des comptes'; +$lng['serversettings']['accountprefix']['description'] = 'Quel préfix doivent avoir les comptes ?'; +$lng['serversettings']['mysqlprefix']['title'] = 'Préfix SQL'; +$lng['serversettings']['mysqlprefix']['description'] = 'Quel préfix doivent avoir les bases de données ?'; +$lng['serversettings']['ftpprefix']['title'] = 'Préfix FTP'; +$lng['serversettings']['ftpprefix']['description'] = 'Quel préfix doivent avoir les accčs FTP ?'; +$lng['serversettings']['documentroot_prefix']['title'] = 'Dossier de stockage'; +$lng['serversettings']['documentroot_prefix']['description'] = 'Oů doivent ętre stockés tous les dossiers et fichiers des différents comptes ?'; +$lng['serversettings']['logfiles_directory']['title'] = 'Dossier des fichiers de log'; +$lng['serversettings']['logfiles_directory']['description'] = 'Oů doivent ętre stockés les archives des logs d\'accčs du serveur Web ?'; +$lng['serversettings']['ipaddress']['title'] = 'Adresse IP'; +$lng['serversettings']['ipaddress']['description'] = 'Quelle est l\'adresse IP du serveur ?'; +$lng['serversettings']['hostname']['title'] = 'Nom d\'hôte'; +$lng['serversettings']['hostname']['description'] = 'Quel est le nom d\'hôte (hostname) du serveur ?'; +$lng['serversettings']['apachereload_command']['title'] = 'Commande de rechargement d\'Apache'; +$lng['serversettings']['apachereload_command']['description'] = 'Quelle est la commande pour recharger / redémarrer Apache ?'; +$lng['serversettings']['apacheconf_filename']['title'] = 'Nom du fichier de configuration Apache'; +$lng['serversettings']['apacheconf_filename']['description'] = 'Dans quel fichier souhaitez-vous enregistrer la configuration Apache ?'; +$lng['serversettings']['bindconf_directory']['title'] = 'Emplacement du dossier de configuration de Bind / Named'; +$lng['serversettings']['bindconf_directory']['description'] = 'Oů doit ętre stocké la configuration de Bind / Named ?'; +$lng['serversettings']['bindreload_command']['title'] = 'Commande de rechargement de Bind / Named'; +$lng['serversettings']['bindreload_command']['description'] = 'Quelle est la commande pour recharger / redémarrer Bind / Named ?'; +$lng['serversettings']['binddefaultzone']['title'] = 'Nom du fichier de zone par défaut Bind / Named'; +$lng['serversettings']['binddefaultzone']['description'] = 'Quel est le nom du fichier de zone par défaut pour Bind / Named ?'; +$lng['serversettings']['vmail_uid']['title'] = 'UID des e-mails'; +$lng['serversettings']['vmail_uid']['description'] = 'Quel UID doivent avoir les e-mails ?'; +$lng['serversettings']['vmail_gid']['title'] = 'GID des e-mails'; +$lng['serversettings']['vmail_gid']['description'] = 'Quel GID doivent avoir les e-mails ?'; +$lng['serversettings']['vmail_homedir']['title'] = 'Emplacement des e-mails'; +$lng['serversettings']['vmail_homedir']['description'] = 'Dans quel dossier doivent ętre stocker les e-mails ?'; +$lng['serversettings']['adminmail']['title'] = 'Adresse e-mail de l\'administrateur'; +$lng['serversettings']['adminmail']['description'] = 'Quelle est l\'adresse e-mail par défaut des e-mails envoyés par Froxlor ?'; +$lng['serversettings']['phpmyadmin_url']['title'] = 'Adresse URL de phpMyAdmin'; +$lng['serversettings']['phpmyadmin_url']['description'] = 'A quelle adresse se trouve phpMyAdmin ?'; +$lng['serversettings']['webmail_url']['title'] = 'Adresse URL du WebMail'; +$lng['serversettings']['webmail_url']['description'] = 'A quelle adresse se trouve le WebMail ?'; +$lng['serversettings']['webftp_url']['title'] = 'Adresse URL du WebFTP'; +$lng['serversettings']['webftp_url']['description'] = 'A quelle adresse se trouve le WebFTP ?'; +$lng['serversettings']['language']['description'] = 'Quelle langue est la langue par défaut ?'; +$lng['serversettings']['maxloginattempts']['title'] = 'Nombre d\'essais maximum avant désactivation'; +$lng['serversettings']['maxloginattempts']['description'] = 'Nombre de tentatives maximum avant la désactivation de l\'accčs.'; +$lng['serversettings']['deactivatetime']['title'] = 'Durée de la désactivation'; +$lng['serversettings']['deactivatetime']['description'] = 'Durée (en secondes) pendant laquelle l\'accčs sera désactivé.'; +$lng['serversettings']['pathedit']['title'] = 'Mode de sélection des dossiers'; +$lng['serversettings']['pathedit']['description'] = 'Choisir un dossier par une liste déroulante ou l\'entrer manuellement ?'; +$lng['serversettings']['nameservers']['title'] = 'Serveurs de nom «Nameservers»'; +$lng['serversettings']['nameservers']['description'] = 'Une liste séparée par des virgules contenant les noms d\'hôtes de tous les serveurs de noms. Le premier dans la liste sera le serveur primaire.'; +$lng['serversettings']['mxservers']['title'] = 'Serveurs de messagerie «MX»'; +$lng['serversettings']['mxservers']['description'] = 'Une liste séparée par des virgules contenant les serveurs de messagerie avec leur poid : un nombre et le nom d\'hôte séparé par un espace; par exemple : "10 mx.exemple.com".'; + +/** + * CHANGED BETWEEN 1.2.12 and 1.2.13 + */ + +$lng['mysql']['description'] = 'Ici, vous pouvez ajouter et effacer des bases de données MySQL.
    Les changements, ainsi que les bases de données, sont immédiatement opérationnels.
    Dans le menu, vous trouverez un lien vers phpMyAdmin, avec lequel vous pouvez gérer vos bases de données.

    L\'accčs aux bases de données depuis les scripts PHP fonctionne comme suit : (Il faut remplacer les valeurs en italique par vos informations !)

    $connexion = mysql_connect(\'localhost\', \'Votre identifiant\', \'Votre mot de passe\');
    mysql_select_db(\'Le nom de la base de données\', $connexion);'; + +/** + * ADDED BETWEEN 1.2.12 and 1.2.13 + */ + +$lng['admin']['cronlastrun'] = 'Derničre tâche "cron"'; +$lng['serversettings']['paging']['title'] = 'Nombre de résultats par page'; +$lng['serversettings']['paging']['description'] = 'Nombre de résultats par page ? (0 = Désactive la pagination)'; +$lng['error']['ipstillhasdomains'] = 'La combinaison IP / port est encore utilisée, veuillez réassigner le ou les domaines existant(s) avec cette adresse IP / port concerné(s) ŕ une autre combinaison IP / port avant de supprimer celle-ci.'; +$lng['error']['cantdeletedefaultip'] = 'Vous ne pouvez pas supprimer cette combinaison IP / Port, veuillez d\'abord attribuer une autre combinaison IP / Port par défaut ŕ ce revendeur avant de supprimer celle-ci.'; +$lng['error']['cantdeletesystemip'] = 'Vous ne pouvez pas créer, modifier ou supprimer l\'IP du systčme.'; +$lng['error']['myipaddress'] = '"IP"'; +$lng['error']['myport'] = '"Port"'; +$lng['error']['myipdefault'] = 'Choissez une combinaison IP / port par défaut.'; +$lng['error']['myipnotdouble'] = 'Cette combinaison existe déjŕ.'; +$lng['question']['admin_ip_reallydelete'] = 'Etes-vous sűr de vouloir supprimer l\'adresse IP "%s" ?'; +$lng['admin']['ipsandports']['ipsandports'] = 'IPs et ports'; +$lng['admin']['ipsandports']['add'] = 'Ajouter une IP / port'; +$lng['admin']['ipsandports']['edit'] = 'Modifier une IP / port'; +$lng['admin']['ipsandports']['ipandport'] = 'IP / Port'; +$lng['admin']['ipsandports']['ip'] = 'IP'; +$lng['admin']['ipsandports']['port'] = 'Port'; + +// ADDED IN 1.2.13-rc3 + +$lng['error']['cantchangesystemip'] = 'Vous ne pouvez pas modifier l\'adresse IP du systčme, ni en ajouter de nouvelle.'; +$lng['question']['admin_domain_reallydocrootoutofcustomerroot'] = 'Etes-vous sűr de vouloir différencier la racine principale de ce domaine de la racine principale du client ?'; + +// ADDED IN 1.2.14-rc1 + +$lng['admin']['memorylimitdisabled'] = 'Désactivé'; +$lng['domain']['openbasedirpath'] = 'Dossier "OpenBasedir"'; +$lng['domain']['docroot'] = 'Identique au dossier ci-dessus'; +$lng['domain']['homedir'] = 'Dossier Principal'; +$lng['admin']['valuemandatory'] = 'Cette valeur est obligatoire'; +$lng['admin']['valuemandatorycompany'] = 'Vous devez indiquer au moins l\'une des 3 valeurs suivantes : "nom" ou "prénom" ou "entreprise"'; +$lng['menue']['main']['username'] = 'Utilisateur : '; +$lng['panel']['urloverridespath'] = 'URL (supplante la valeur dossier)'; +$lng['panel']['pathorurl'] = 'Dossier ou URL'; +$lng['error']['sessiontimeoutiswrong'] = 'Seule une valeur numérique pour le temps d\'inactivité est autorisée.'; +$lng['error']['maxloginattemptsiswrong'] = 'Seule une valeur numérique pour "nombre maximum de tentative de connexion" est autorisée.'; +$lng['error']['deactivatetimiswrong'] = 'Seule une valeur numérique pour la durée de désactivation est autorisée.'; +$lng['error']['accountprefixiswrong'] = 'Le "Préfixe client" n\'est pas valide.'; +$lng['error']['mysqlprefixiswrong'] = 'Le "Préfixe SQL" n\'est pas valide.'; +$lng['error']['ftpprefixiswrong'] = 'Le "Préfixe FTP" n\'est pas valide.'; +$lng['error']['ipiswrong'] = 'L\'"Adresse IP" n\'est pas valide.'; +$lng['error']['vmailuidiswrong'] = 'L\'"UID e-mail" est incorrect. Seul un UID numérique est autorisé.'; +$lng['error']['vmailgidiswrong'] = 'Le "GID e-mail" est incorrect. Seul un GID numérique est autorisé.'; +$lng['error']['adminmailiswrong'] = 'L\'adresse e-mail de l\'administrateur est incorrect. Seulement une adresse e-mail valide est autorisé.'; +$lng['error']['pagingiswrong'] = 'La valeur "Nombre de résultats page" est incorrecte. Seul une valeur numérique est autorisée.'; +$lng['error']['phpmyadminiswrong'] = 'Le lien pour phpMyAdmin n\'est pas valide.'; +$lng['error']['webmailiswrong'] = 'Le lien pour le WebMail n\'est pas valide.'; +$lng['error']['webftpiswrong'] = 'Le lien pour le WebFTP n\'est pas valide.'; +$lng['domains']['hasaliasdomains'] = 'Le domaine possčde un ou des alias.'; +$lng['domains']['istopleveldomain'] = 'Est le nom de domaine principal'; +$lng['serversettings']['defaultip']['title'] = 'IP / Port par défaut'; +$lng['serversettings']['defaultip']['description'] = 'Quel est l\'IP / Port par défaut ?'; +$lng['domains']['statstics'] = 'Fréquentation'; +$lng['panel']['ascending'] = 'ascendant'; +$lng['panel']['decending'] = 'descendant'; +$lng['panel']['search'] = 'Rechercher'; +$lng['panel']['used'] = 'utilisé'; + +// ADDED IN 1.2.14-rc3 + +$lng['panel']['translator'] = 'Traducteur(s)'; + +// ADDED IN 1.2.14-rc4 + +$lng['error']['stringformaterror'] = 'La valeur pour "%s" n\'est pas dans un format reconnu.'; + +// ADDED IN 1.2.15-rc1 + +$lng['admin']['serversoftware'] = 'Logiciel Serveur'; +$lng['admin']['phpversion'] = 'Version de PHP'; +$lng['admin']['phpmemorylimit'] = 'Limite mémoire de PHP'; +$lng['admin']['mysqlserverversion'] = 'Version du serveur MySQL'; +$lng['admin']['mysqlclientversion'] = 'Version du client MySQL'; +$lng['admin']['webserverinterface'] = 'Interface Web'; +$lng['domains']['isassigneddomain'] = 'Le domaine est attribué'; +$lng['serversettings']['phpappendopenbasedir']['title'] = 'Dossier(s) de l\'OpenBasedir'; +$lng['serversettings']['phpappendopenbasedir']['description'] = 'Liste de dossiers séparée par des virgules qui sera ajouté ŕ la variable "OpenBasedir" des conteneurs vHosts.'; + +// CHANGED IN 1.2.15-rc1 + +$lng['error']['loginnameissystemaccount'] = 'Vous ne pouvez pas créer de compte ressemblant aux comptes systčme (ex : "%s"). Veuillez entrer un autre nom de compte.'; +$lng['error']['youcantdeleteyourself'] = 'Vous ne pouvez pas supprimer votre propre compte pour des raisons évidente de sécurité ...'; +$lng['error']['youcanteditallfieldsofyourself'] = 'Note : Vous ne pouvez pas éditer tous les champs de votre propre compte pour des raisons de sécurité.'; + +// ADDED IN 1.2.16-svn1 + +$lng['serversettings']['natsorting']['title'] = 'Utiliser un tri naturel dans les différentes vues'; +$lng['serversettings']['natsorting']['description'] = 'Trier les listes comme web1 -> web2 -> etc ... -> web11 au lieu de web1 -> web11 -> web2.'; + +// ADDED IN 1.2.16-svn2 + +$lng['serversettings']['deactivateddocroot']['title'] = 'Dossier "DocumentRoot" pour les utilisateurs désactivés'; +$lng['serversettings']['deactivateddocroot']['description'] = 'Quand un utilisateur est désactivé, ce dossier sera utilisé comme dossier racine pour le serveur Web. Laissez vide pour ne pas créer de vHost et ne rien afficher du tout lorsque l\'utilisateur est désactivé.'; + +// ADDED IN 1.2.16-svn4 + +$lng['panel']['reset'] = 'Ignorer les changements'; +$lng['admin']['accountsettings'] = 'Paramčtres du compte'; +$lng['admin']['panelsettings'] = 'Paramčtres du panel'; +$lng['admin']['systemsettings'] = 'Paramčtres du systčme'; +$lng['admin']['webserversettings'] = 'Paramčtres du serveur Web'; +$lng['admin']['mailserversettings'] = 'Paramčtres du serveur de Mail'; +$lng['admin']['nameserversettings'] = 'Paramčtres du serveur de Noms'; +$lng['admin']['updatecounters'] = 'Recalculer les ressources utilisées'; +$lng['question']['admin_counters_reallyupdate'] = 'Etes-vous sűr de vouloir recalculer les ressources utilisées ?'; +$lng['panel']['pathDescription'] = 'Si le dossier n\'existe pas, il sera créé automatiquement.'; + +// ADDED IN 1.2.16-svn6 + +$lng['mails']['trafficninetypercent']['mailbody'] = 'Bonjour {FIRSTNAME} {NAME},\n\nVous utilisez {TRAFFICUSED} Mo sur {TRAFFIC} Mo de votre quota de trafic.\nCe dernier est ŕ plus de 90%.\n\nCordialement,\nL\'équipe Froxlor.'; +$lng['mails']['trafficninetypercent']['subject'] = 'Limite de trafic bientôt atteinte.'; +$lng['admin']['templates']['trafficninetypercent'] = 'E-mail de notification pour les utilisateurs, lorsque leur taux de trafic atteint plus de 90%.'; +$lng['admin']['templates']['TRAFFIC'] = 'Sera remplacé par le taux de trafic qui a été attribué ŕ l\'utilisateur.'; +$lng['admin']['templates']['TRAFFICUSED'] = 'Sera remplacé par le taux de trafic qui a été consommé par l\'utilisateur.'; + +// ADDED IN 1.2.16-svn7 + +$lng['admin']['subcanemaildomain']['never'] = 'Jamais'; +$lng['admin']['subcanemaildomain']['choosableno'] = 'A choisir, par défaut : non'; +$lng['admin']['subcanemaildomain']['choosableyes'] = 'A choisir, par défaut : oui'; +$lng['admin']['subcanemaildomain']['always'] = 'Toujours'; +$lng['changepassword']['also_change_webalizer'] = 'Changer aussi le mot de passe des statistiques Webalizer ?'; + +// ADDED IN 1.2.16-svn8 + +$lng['serversettings']['mailpwcleartext']['title'] = 'Sauvegarder aussi les mots de passe des comptes e-mails de façon décrypter dans la base de données'; +$lng['serversettings']['mailpwcleartext']['description'] = 'Si cela est ŕ Oui, tous les mots de passe seront aussi sauvegarder de façon décrypter dans la table mail_users (en texte clair pour toutes personnes qui auraient accčs ŕ la base de données). Activer cette option, uniquement si vous en avez vraiment besoin !'; +$lng['serversettings']['mailpwcleartext']['removelink'] = 'Cliquez ici pour retirer tous les mots de passe en texte clair de la base de données.'; +$lng['question']['admin_cleartextmailpws_reallywipe'] = 'Etes-vous sűr de vouloir retirer tous les mots de passe en clairs des comptes e-mails de la table mail_users ? Cette action ne peut ętre annulée !'; +$lng['admin']['configfiles']['overview'] = 'Aperçu'; +$lng['admin']['configfiles']['wizard'] = 'Assistant'; +$lng['admin']['configfiles']['distribution'] = 'Distribution'; +$lng['admin']['configfiles']['service'] = 'Service'; +$lng['admin']['configfiles']['daemon'] = 'Démon'; +$lng['admin']['configfiles']['http'] = 'Serveur Web (HTTP)'; +$lng['admin']['configfiles']['dns'] = 'Serveur de Noms (DNS)'; +$lng['admin']['configfiles']['mail'] = 'Serveur de Mails (IMAP/POP3)'; +$lng['admin']['configfiles']['smtp'] = 'Serveur de Mails (SMTP)'; +$lng['admin']['configfiles']['ftp'] = 'Serveur FTP'; +$lng['admin']['configfiles']['etc'] = 'Autres (Systčme)'; +$lng['admin']['configfiles']['choosedistribution'] = '-- Choisissez une distribution --'; +$lng['admin']['configfiles']['chooseservice'] = '-- Choisissez un service --'; +$lng['admin']['configfiles']['choosedaemon'] = '-- Choisissez un démon --'; +$lng['admin']['trafficlastrun'] = 'Dernier calcul du trafic'; + +// ADDED IN 1.2.16-svn10 + +$lng['serversettings']['ftpdomain']['title'] = 'Comptes FTP @domaine'; +$lng['serversettings']['ftpdomain']['description'] = 'Les utilisateurs peuvent-ils créer des comptes FTP de la forme utilisateur@domaine.com ?'; +$lng['panel']['back'] = 'Retour'; + +// ADDED IN 1.2.16-svn12 + +$lng['serversettings']['mod_log_sql']['title'] = 'Sauvegarder temporairement les logs dans la base de données'; +$lng['serversettings']['mod_log_sql']['description'] = 'Utiliser mod_log_sql pour sauvegarder temporairement les requętes Web.
    Cela ŕ besoin d\'une configuration spécifique d\'Apache !'; +$lng['serversettings']['mod_fcgid']['title'] = 'Utiliser PHP par mod_fcgid / suexec'; +$lng['serversettings']['mod_fcgid']['description'] = 'Utiliser mod_fcgid / suexec / libnss_mysql pour lancer PHP avec le compte correspondant ŕ l\'utilisateur ?
    Cela ŕ besoin d\'une configuration spécifique d\'Apache !'; +$lng['serversettings']['sendalternativemail']['title'] = 'Utiliser une adresse e-mail alternative'; +$lng['serversettings']['sendalternativemail']['description'] = 'Envoyer le mot de passe du compte e-mail ŕ une adresse différents pour la création du compte e-mail ?'; +$lng['emails']['alternative_emailaddress'] = 'Adresse e-mail alternative'; +$lng['mails']['pop_success_alternative']['mailbody'] = 'Bonjour,\n\nVotre compte e-mail {EMAIL} a été correctement créé.\n\nVotre mot de passe est : {PASSWORD}.\n\nCeci est un message généré automatiquemenent, veuillez ne pas répondre ŕ cet e-mail car il ne serait ętre consulter.\n\nCordialement,\nL\'équipe Froxlor.'; +$lng['mails']['pop_success_alternative']['subject'] = 'Compte e-mail correctement créé'; +$lng['admin']['templates']['pop_success_alternative'] = 'Message de bienvenue envoyé ŕ l\'adresse e-mail alternative pour les nouveaux comptes e-mails'; +$lng['admin']['templates']['EMAIL_PASSWORD'] = 'Remplacer par le mot de passe du compte POP3 / IMAP.'; + +// ADDED IN 1.2.16-svn13 + +$lng['error']['documentrootexists'] = 'Le dossier "%s" existe déjŕ pour cet utilisateur. Veuillez le supprimer / déplacer avant de réessayer l\'ajout de cet utilisateur.'; + +// ADDED IN 1.2.16-svn14 + +$lng['serversettings']['apacheconf_vhost']['title'] = 'Dossier / fichier de configuration des vHosts pour Apache'; +$lng['serversettings']['apacheconf_vhost']['description'] = 'Oů doit ętre stocké le fichier de configuration des vHosts ? Vous pouvez soit entrer le nom d\'un fichier (tous les vHosts dans un seul fichier), soit le nom d\'un dossier (chacun des vHosts dans un fichier séparé du dossier).'; +$lng['serversettings']['apacheconf_diroptions']['title'] = 'Fichier / dossier de configuration des options des dossiers pour Apache'; +$lng['serversettings']['apacheconf_diroptions']['description'] = 'Oů doit ętre stocké le fichier de configuration des options de dossiers ? Vous pouvez soit entrer le nom d\'un fichier (toutes les options des dossiers dans un seul fichier), soit le nom d\'un dossier (chacune des options de dossier dans un fichier séparé du dossier).'; +$lng['serversettings']['apacheconf_htpasswddir']['title'] = 'Dossier du fichier htpasswd pour Apache'; +$lng['serversettings']['apacheconf_htpasswddir']['description'] = 'Oů doit ętre stocké le fichier de configuration de protection des dossiers "htpasswd" pour Apache ?'; + +// ADDED IN 1.2.16-svn15 + +$lng['error']['formtokencompromised'] = 'La requęte semble compromise. Pour des raisons de sécurité, vous avez été déconnecté.'; +$lng['serversettings']['mysql_access_host']['title'] = 'Hôtes de connexion MySQL'; +$lng['serversettings']['mysql_access_host']['description'] = 'Une liste séparée par des virgules contenant la liste des hôtes depuis lesquels les utilisateurs sont autorisés ŕ se connecter au serveur MySQL.'; + +// ADDED IN 1.2.18-svn1 + +$lng['admin']['ipsandports']['create_listen_statement'] = 'Déclaration des ports d\'écoute'; +$lng['admin']['ipsandports']['create_namevirtualhost_statement'] = 'Déclaration des hôtes virtuels "NameVirtualHost"'; +$lng['admin']['ipsandports']['create_vhostcontainer'] = 'Déclaration des conteneurs virtuels "vHost"'; +$lng['admin']['ipsandports']['create_vhostcontainer_servername_statement'] = 'Déclaration des noms d\'hôtes "ServerName" dans les conteneurs virtuels "vHost"'; + +// ADDED IN 1.2.18-svn2 + +$lng['admin']['webalizersettings'] = 'Paramčtres pour Webalizer'; +$lng['admin']['webalizer']['normal'] = 'Normal'; +$lng['admin']['webalizer']['quiet'] = 'Silencieux'; +$lng['admin']['webalizer']['veryquiet'] = 'Aucune sortie'; +$lng['serversettings']['webalizer_quiet']['title'] = 'Sortie Webalizer'; +$lng['serversettings']['webalizer_quiet']['description'] = 'Verbosité du programme Webalizer'; + +// ADDED IN 1.2.18-svn3 + +$lng['ticket']['admin_email'] = 'root@localhost'; +$lng['ticket']['noreply_email'] = 'billets@froxlor'; +$lng['admin']['ticketsystem'] = 'Systčme de billets'; +$lng['menue']['ticket']['ticket'] = 'Billets de support'; +$lng['menue']['ticket']['categories'] = 'Catégories de support'; +$lng['menue']['ticket']['archive'] = 'Archives de billets'; +$lng['ticket']['description'] = 'Entrez une description !'; +$lng['ticket']['ticket_new'] = 'Ouvrir un nouveau billet'; +$lng['ticket']['ticket_reply'] = 'Réponse au billet'; +$lng['ticket']['ticket_reopen'] = 'Réouvrir le billet'; +$lng['ticket']['ticket_newcateory'] = 'Créer une nouvelle catégorie'; +$lng['ticket']['ticket_editcateory'] = 'Editer la catégorie'; +$lng['ticket']['ticket_view'] = 'Voir l\'historique du billet'; +$lng['ticket']['ticketcount'] = 'Billets'; +$lng['ticket']['ticket_answers'] = 'Réponses'; +$lng['ticket']['lastchange'] = 'Derničre action'; +$lng['ticket']['subject'] = 'Sujet'; +$lng['ticket']['status'] = 'Etat'; +$lng['ticket']['lastreplier'] = 'Derničre réponse de'; +$lng['ticket']['priority'] = 'Priorité'; +$lng['ticket']['low'] = 'Basse'; +$lng['ticket']['normal'] = 'Normale'; +$lng['ticket']['high'] = 'Haute'; +$lng['ticket']['unf_low'] = 'Basse'; +$lng['ticket']['unf_normal'] = 'Normale'; +$lng['ticket']['unf_high'] = 'Haute'; +$lng['ticket']['lastchange'] = 'Dernier changement'; +$lng['ticket']['lastchange_from'] = 'Depuis (jj.mm.aaaa)'; +$lng['ticket']['lastchange_to'] = 'Jusqu\'au (jj.mm.aaaa)'; +$lng['ticket']['category'] = 'Catégorie'; +$lng['ticket']['no_cat'] = 'Aucune'; +$lng['ticket']['message'] = 'Message'; +$lng['ticket']['show'] = 'Voir'; +$lng['ticket']['answer'] = 'Répondre'; +$lng['ticket']['close'] = 'Fermer'; +$lng['ticket']['reopen'] = 'Réouvrir'; +$lng['ticket']['archive'] = 'Archive'; +$lng['ticket']['ticket_delete'] = 'Effacer le billet'; +$lng['ticket']['lastarchived'] = 'Billets récemment archivés'; +$lng['ticket']['archivedtime'] = 'Archivé'; +$lng['ticket']['open'] = 'Ouvert'; +$lng['ticket']['wait_reply'] = 'Attente d\'une réponse'; +$lng['ticket']['replied'] = 'Répondu'; +$lng['ticket']['closed'] = 'Fermé'; +$lng['ticket']['staff'] = 'L\'équipe'; +$lng['ticket']['customer'] = 'Client'; +$lng['ticket']['old_tickets'] = 'Messages du billet'; +$lng['ticket']['search'] = 'Rechercher dans les archives'; +$lng['ticket']['nocustomer'] = 'Aucun choix'; +$lng['ticket']['archivesearch'] = 'Résultat de la recherche dans les archives'; +$lng['ticket']['noresults'] = 'Aucun billet trouvé'; +$lng['ticket']['notmorethanxopentickets'] = 'Pour éviter les abus, vous ne pouvez avoir plus de %s billets ouverts'; +$lng['ticket']['supportstatus'] = 'Etat du support'; +$lng['ticket']['supportavailable'] = 'Nos équipes de support sont disponibles et prętes ŕ vous assister.'; +$lng['ticket']['supportnotavailable'] = 'Nos équipes de support ne sont actuellement pas disponibles.'; +$lng['admin']['templates']['ticket'] = 'E-mail de notification pour les billets de support'; +$lng['admin']['templates']['SUBJECT'] = 'Sera remplacé par le sujet du billet de support.'; +$lng['admin']['templates']['new_ticket_for_customer'] = 'Informe le client que le billet a été envoyé'; +$lng['admin']['templates']['new_ticket_by_customer'] = 'Notifie l\'administrateur qu\'un nouveau billet a été ouvert par un client'; +$lng['admin']['templates']['new_reply_ticket_by_customer'] = 'Notifie l\'administrateur d\'une réponse du client au billet'; +$lng['admin']['templates']['new_ticket_by_staff'] = 'Informe le client qu\'un billet a été ouvert par l\'équipe de support'; +$lng['admin']['templates']['new_reply_ticket_by_staff'] = 'Informe le client d\'une réponse de l\'équipe de support au billet'; +$lng['mails']['new_ticket_for_customer']['mailbody'] = 'Bonjour {FIRSTNAME} {NAME},\n\nVotre demande de billet de support ayant comme sujet "{SUBJECT}" a été envoyé.\n\nVous receverez une notification lorsque votre billet aura une réponse.\n\nMerci,\nL\'équipe Froxlor.'; +$lng['mails']['new_ticket_for_customer']['subject'] = 'Votre billet de support a été envoyé'; +$lng['mails']['new_ticket_by_customer']['mailbody'] = 'Bonjour administrateur,\n\nUn nouveau billet de support ayant comme sujet "{SUBJECT}" a été ouvert.\n\nVeuillez vous connecter pour consulter le billet.\n\nMerci,\nl\'équipe Froxlor.'; +$lng['mails']['new_ticket_by_customer']['subject'] = 'Nouveau billet de support soumis'; +$lng['mails']['new_reply_ticket_by_customer']['mailbody'] = 'Bonjour administrateur,\n\nLe billet de support "{SUBJECT}" a reçu une réponse de la part du client.\n\nVeuillez vous connecter pour consulter le billet.\n\nMerci,\nL\'équipe Froxlor.'; +$lng['mails']['new_reply_ticket_by_customer']['subject'] = 'Nouvelle réponse au billet de support'; +$lng['mails']['new_ticket_by_staff']['mailbody'] = 'Bonjour {FIRSTNAME} {NAME},\n\nUn billet de support ayant comme sujet "{SUBJECT}" a été ouvert pour vous par notre équipe.\n\nVeuillez vous connecter pour consulter le billet.\n\nMerci,\nL\'équipe Froxlor.'; +$lng['mails']['new_ticket_by_staff']['subject'] = 'Nouvelle demande de support soumise'; +$lng['mails']['new_reply_ticket_by_staff']['mailbody'] = 'Bonjour {FIRSTNAME} {NAME},\n\nLe billet de support ayant comme sujet "{SUBJECT}" a reçu une réponse par notre équipe.\n\nVeuillez vous connecter pour consulter le billet.\n\nMerci,\nL\équipe Froxlor.'; +$lng['mails']['new_reply_ticket_by_staff']['subject'] = 'Nouvelle réponse au billet de support'; +$lng['question']['ticket_reallyclose'] = 'Etes-vous sűr de vouloir clôturer le billet "%s" ?'; +$lng['question']['ticket_reallydelete'] = 'Etes-vous sűr de vouloir supprimer le billet "%s" ?'; +$lng['question']['ticket_reallydeletecat'] = 'Etes-vous sűr de vouloir supprimer la catégorie "%s" ?'; +$lng['question']['ticket_reallyarchive'] = 'Etes-vous sűr de vouloir archiver le billet "%s" ?'; +$lng['error']['mysubject'] = '"' . $lng['ticket']['subject'] . '"'; +$lng['error']['mymessage'] = '"' . $lng['ticket']['message'] . '"'; +$lng['error']['mycategory'] = '"' . $lng['ticket']['category'] . '"'; +$lng['error']['nomoreticketsavailable'] = 'Vous n\'avez plus de billets de disponibles. Veuillez contacter votre administrateur.'; +$lng['error']['nocustomerforticket'] = 'Ne peut créer de billet sans client'; +$lng['error']['categoryhastickets'] = 'La catégorie possčde des billets.
    Veuillez d\'abord supprimer tous les billets de cette catégorie.'; +$lng['error']['notmorethanxopentickets'] = $lng['ticket']['notmorethanxopentickets']; +$lng['admin']['ticketsettings'] = 'Paramčtres des billets de support'; +$lng['admin']['archivelastrun'] = 'Derniers billets archivés'; +$lng['serversettings']['ticket']['noreply_email']['title'] = 'Adresse e-mail de non réponse'; +$lng['serversettings']['ticket']['noreply_email']['description'] = 'L\'adresse e-mail de l\'expéditeur de notification pour les billets de support, quelque chose du type no-reply@domaine.com'; +$lng['serversettings']['ticket']['worktime_begin']['title'] = 'Début du support (hh:mm)'; +$lng['serversettings']['ticket']['worktime_begin']['description'] = 'Horaire de début du support'; +$lng['serversettings']['ticket']['worktime_end']['title'] = 'Fin du support (hh:mm)'; +$lng['serversettings']['ticket']['worktime_end']['description'] = 'Horaire de fin du support'; +$lng['serversettings']['ticket']['worktime_sat'] = 'Support disponible le samedi ?'; +$lng['serversettings']['ticket']['worktime_sun'] = 'Support disponible le dimanche ?'; +$lng['serversettings']['ticket']['worktime_all']['title'] = 'Aucune limite horaire pour le support'; +$lng['serversettings']['ticket']['worktime_all']['description'] = 'Si "Oui", les options pour le début et la fin du support seront écrasés.'; +$lng['serversettings']['ticket']['archiving_days'] = 'Aprčs combien de jours un billet fermé sera automatiquement archivé ?'; +$lng['customer']['tickets'] = 'Billet de support'; + +// ADDED IN 1.2.18-svn4 + +$lng['admin']['domain_nocustomeraddingavailable'] = 'Il n\'est acutellement pas possible d\'ajouter de domaines. Vous devez d\'abord ajouter un client.'; +$lng['serversettings']['ticket']['enable'] = 'Activer le systčme de billets'; +$lng['serversettings']['ticket']['concurrentlyopen'] = 'Combien de billets peuvent ętre ouverts au męme moment ?'; +$lng['error']['norepymailiswrong'] = 'L\'adresse de "non réponse" n\'est pas bonne. Une adresse e-mail valide doit ętre entrée.'; +$lng['error']['tadminmailiswrong'] = 'L\'adresse de "l\'administrateur de billets" n\'est pas bonne. Une adresse e-mail valide doit ętre entrée.'; +$lng['ticket']['awaitingticketreply'] = 'Vous avez %s billet(s) de support non répondu(s).'; + +// ADDED IN 1.2.18-svn5 + +$lng['serversettings']['ticket']['noreply_name'] = 'Nom de l\'expéditeur e-mail des billets'; + +// ADDED IN 1.2.19-svn1 + +$lng['serversettings']['mod_fcgid']['configdir']['title'] = 'Dossier de configuration FCGI'; +$lng['serversettings']['mod_fcgid']['configdir']['description'] = 'Oů doivent ętre stockés les fichiers de configuration pour FCGI ?'; +$lng['serversettings']['mod_fcgid']['tmpdir']['title'] = 'Dossier temporaire pour FCGI'; + +// ADDED IN 1.2.19-svn3 + +$lng['serversettings']['ticket']['reset_cycle']['title'] = 'Intervalle de réinitialisation des billets utilisés'; +$lng['serversettings']['ticket']['reset_cycle']['description'] = 'Remettre le compteur de billets ŕ 0 dans le temps imparti'; +$lng['admin']['tickets']['daily'] = 'Journaličre'; +$lng['admin']['tickets']['weekly'] = 'Hebdomadaire'; +$lng['admin']['tickets']['monthly'] = 'Mensuelle'; +$lng['admin']['tickets']['yearly'] = 'Annuelle'; +$lng['error']['ticketresetcycleiswrong'] = 'L\'intervalle de réinitialisation doit ętre "journaličre", "hebdomadaire", "mensuelle" ou "annuelle".'; + +// ADDED IN 1.2.19-svn4 + +$lng['menue']['traffic']['traffic'] = 'Trafic'; +$lng['menue']['traffic']['current'] = 'Mois actuel'; +$lng['traffic']['month'] = 'Mois'; +$lng['traffic']['day'] = 'Jour'; +$lng['traffic']['months'][1] = 'Janvier'; +$lng['traffic']['months'][2] = 'Février'; +$lng['traffic']['months'][3] = 'Mars'; +$lng['traffic']['months'][4] = 'Avril'; +$lng['traffic']['months'][5] = 'Mai'; +$lng['traffic']['months'][6] = 'Juin'; +$lng['traffic']['months'][7] = 'Juillet'; +$lng['traffic']['months'][8] = 'Aoűt'; +$lng['traffic']['months'][9] = 'Septembre'; +$lng['traffic']['months'][10] = 'Octobre'; +$lng['traffic']['months'][11] = 'Novembre'; +$lng['traffic']['months'][12] = 'Décembre'; +$lng['traffic']['mb'] = 'Trafic (Mo)'; +$lng['traffic']['distribution'] = 'FTP | HTTP | E-mail'; +$lng['traffic']['sumhttp'] = 'Trafic HTTP total entrant'; +$lng['traffic']['sumftp'] = 'Trafic FTP total entrant'; +$lng['traffic']['summail'] = 'Trafic E-mail total entrant'; + +// ADDED IN 1.2.19-svn4.5 + +$lng['serversettings']['no_robots']['title'] = 'Permettre aux robots des moteurs de recherche d\'indexer l\'installation de Froxlor'; + +// ADDED IN 1.2.19-svn6 + +$lng['admin']['loggersettings'] = 'Paramčtres des logs'; +$lng['serversettings']['logger']['enable'] = 'Activer / Désactiver les logs'; +$lng['serversettings']['logger']['severity'] = 'Niveau de log'; +$lng['admin']['logger']['normal'] = 'normal'; +$lng['admin']['logger']['paranoid'] = 'paranoďaque'; +$lng['serversettings']['logger']['types']['title'] = 'Type(s) de log'; +$lng['serversettings']['logger']['types']['description'] = 'Spécifiez les types de log séparés par des virgules.
    Les types de log disponible sont : syslog, file, mysql'; +$lng['serversettings']['logger']['logfile'] = 'Nom du fichier de log, dossier + nom du fichier'; +$lng['error']['logerror'] = 'Erreur log : %s'; +$lng['serversettings']['logger']['logcron'] = 'Loguer les travaux de cron (lancer une fois)'; +$lng['question']['logger_reallytruncate'] = 'Etes-vous sűr de vouloir vider la table "%s" ?'; +$lng['admin']['loggersystem'] = 'Log systčme'; +$lng['menue']['logger']['logger'] = 'Log systčme'; +$lng['logger']['date'] = 'Date'; +$lng['logger']['type'] = 'Type'; +$lng['logger']['action'] = 'Action'; +$lng['logger']['user'] = 'Utilisateur'; +$lng['logger']['truncate'] = 'Vider les logs'; + +// ADDED IN 1.2.19-svn7 + +$lng['serversettings']['ssl']['use_ssl'] = 'Utiliser SSL ?'; +$lng['serversettings']['ssl']['ssl_cert_file'] = 'Oů est situé le fichier de certificat ?'; +$lng['serversettings']['ssl']['openssl_cnf'] = 'Paramčtres par défaut pour créer le certificat'; +$lng['panel']['reseller'] = 'revendeur'; +$lng['panel']['admin'] = 'administrateur'; +$lng['panel']['customer'] = 'client(s)'; +$lng['error']['nomessagetosend'] = 'Vous n\'avez pas entré de message.'; +$lng['error']['noreceipientsgiven'] = 'Vous n\'avez pas spécifier de destinataire'; +$lng['admin']['emaildomain'] = 'Domaine e-mail'; +$lng['admin']['email_only'] = 'Seulement des e-mails ?'; +$lng['admin']['wwwserveralias'] = 'Ajouter un "www." ŕ l\'alias du serveur "ServerAlias"'; +$lng['admin']['ipsandports']['enable_ssl'] = 'Est-ce un port SSL ?'; +$lng['admin']['ipsandports']['ssl_cert_file'] = 'Emplacement du certificat SSL'; +$lng['panel']['send'] = 'envoyé'; +$lng['admin']['subject'] = 'Sujet'; +$lng['admin']['receipient'] = 'Destinataire'; +$lng['admin']['message'] = 'Ecrire un message'; +$lng['admin']['text'] = 'Message'; +$lng['menu']['message'] = 'Messages'; +$lng['error']['errorsendingmail'] = 'Echec d\'envoi du message ŕ "%s"'; +$lng['error']['cannotreaddir'] = 'Impossible de lire dossier "%s"'; +$lng['message']['success'] = 'Le message a été envoyé aux destinataires "%s"'; +$lng['message']['noreceipients'] = 'Aucun e-mail n\'a été envoyé car il n\'existe aucun destinataire dans la base de données'; +$lng['admin']['sslsettings'] = 'Paramčtres SSL'; +$lng['cronjobs']['notyetrun'] = 'Pas encore lancé'; +$lng['install']['servername_should_be_fqdn'] = 'Le nom du serveur doit ętre un nom FQDN, pas une adresse IP'; +$lng['serversettings']['default_vhostconf']['title'] = 'Paramčtres par défaut pour les vHosts'; +$lng['emails']['quota'] = 'Quota'; +$lng['emails']['quota_type']['byte'] = 'octet(s)'; +$lng['emails']['quota_type']['kilobyte'] = 'Ko'; +$lng['emails']['quota_type']['megabyte'] = 'Mo'; +$lng['emails']['quota_type']['gigabyte'] = 'Go'; +$lng['emails']['noquota'] = 'Pas de quota'; +$lng['emails']['updatequota'] = 'Mise ŕ jour'; +$lng['serversettings']['mail_quota']['title'] = 'Quota de la boîte aux lettres'; +$lng['serversettings']['mail_quota']['description'] = 'Quota par défaut pour toutes nouvelles boîtes aux lettres créées.'; +$lng['serversettings']['mail_quota_enabled']['title'] = 'Utiliser les quotas de boîtes aux lettres pour les clients'; +$lng['serversettings']['mail_quota_enabled']['description'] = 'Activez cette option pour utiliser les quotas sur les boîtes aux lettres. Par défaut, cette option est ŕ Non car cela requiert une configuration spécifique.'; +$lng['serversettings']['mail_quota_enabled']['removelink'] = 'Cliquez ici pour retirer tous les quotas de tous les comptes e-mails.'; +$lng['question']['admin_quotas_reallywipe'] = 'Etes-vous sűr de vouloir retirer tous les quotas de la table mail_users ? Cette action ne peut ętre annulée !'; +$lng['error']['vmailquotawrong'] = 'La taille du quota doit ętre entre 1 et 999'; +$lng['customer']['email_quota'] = 'Quota e-mail'; +$lng['customer']['email_imap'] = 'E-mail IMAP'; +$lng['customer']['email_pop3'] = 'E-mail POP3'; +$lng['customer']['mail_quota'] = 'Quota e-mail'; +$lng['error']['invalidip'] = 'Adresse IP invalide : %s'; +$lng['serversettings']['decimal_places'] = 'Nombre de décimales ŕ afficher pour le trafic / espace web'; + +// ADDED IN 1.2.19-svn8 + +$lng['admin']['dkimsettings'] = 'Paramčtres DKIM'; +$lng['dkim']['dkim_prefix']['title'] = 'Prefix DKIM'; +$lng['dkim']['dkim_prefix']['description'] = 'Veuillez entrer l\'emplacement des fichiers RSA pour DKIM ainsi que l\'emplacement du fichier de configuration pour le plugin Milter'; +$lng['dkim']['dkim_domains']['title'] = 'Nom du fichier DKIM'; +$lng['dkim']['dkim_domains']['description'] = 'Nom du fichier des paramčtres DKIM pour les domaines tel que entré dans la configuration de DKIM-milter'; +$lng['dkim']['dkim_dkimkeys']['title'] = 'Nom du fichier des clefs DKIM'; +$lng['dkim']['dkim_dkimkeys']['description'] = 'Nom du fichier des paramčtres des clefs DKIM tel que entré dans la configuration de DKIM-milter'; +$lng['dkim']['dkimrestart_command']['title'] = 'Commande de redémarrage de DKIM-milter'; +$lng['dkim']['dkimrestart_command']['description'] = 'Veuillez entrer la commande de redémarrage du service DKIM-milter'; + +// ADDED IN 1.2.19-svn9 + +$lng['admin']['caneditphpsettings'] = 'Peut changer les paramčtres PHP du domaine ?'; + +// ADDED IN 1.2.19-svn12 + +$lng['admin']['allips'] = 'Toutes les adresses IP'; +$lng['panel']['nosslipsavailable'] = 'Il n\'y a actuellement aucune combinaison IP / Port configurer pour SSL'; +$lng['ticket']['by'] = 'de '; +$lng['dkim']['use_dkim']['title'] = 'Activer le support DKIM ?'; +$lng['dkim']['use_dkim']['description'] = 'Voulez-vous utiliser le systčme DKIM (DomainKeys Identified Mail) ?'; +$lng['error']['invalidmysqlhost'] = 'Adresse hôte MySQL invalide : "%s"'; +$lng['error']['cannotuseawstatsandwebalizeratonetime'] = 'Vous ne pouvez pas activer AWStats et Webalizer en męme temps. Veuillez n\'en choisir qu\'un seul.'; +$lng['serversettings']['webalizer_enabled'] = 'Activer les statistiques Webalizer'; +$lng['serversettings']['awstats_enabled'] = 'Activer les statistiques AWStats'; +$lng['admin']['awstatssettings'] = 'Paramčtres Awstats'; +$lng['serversettings']['awstats_domain_file']['title'] = 'Dossier domaines pour AWStats'; +$lng['serversettings']['awstats_model_file']['title'] = 'Fichier modčle pour AWStats'; + +// ADDED IN 1.2.19-svn16 + +$lng['admin']['domain_dns_settings'] = 'Paramčtres DNS'; +$lng['dns']['destinationip'] = 'IP du domaine'; +$lng['dns']['standardip'] = 'IP standard du serveur'; +$lng['dns']['a_record'] = 'Enregistrement de type "A" (IPv6 optionnel)'; +$lng['dns']['cname_record'] = 'Enregistrement CNAME'; +$lng['dns']['mxrecords'] = 'Définition des enregistrements MX'; +$lng['dns']['standardmx'] = 'Enregistrements MX standard du serveur'; +$lng['dns']['mxconfig'] = 'Enregistrements MX personnalisé'; +$lng['dns']['priority10'] = 'Priorité 10'; +$lng['dns']['priority20'] = 'Priorité 20'; +$lng['dns']['txtrecords'] = 'Définir des enregistrement TXT'; +$lng['dns']['txtexample'] = 'Exemple (pour SPF) :
    v=spf1 ip4:xxx.xxx.xx.0/23 -all'; +$lng['serversettings']['selfdns']['title'] = 'Paramčtres manuel des DNS du domaine'; +$lng['serversettings']['selfdnscustomer']['title'] = 'Permettre aux clients de modifier les paramčtes DNS du domaine'; +$lng['admin']['activated'] = 'Activé'; +$lng['admin']['statisticsettings'] = 'Paramčtres des statistiques'; +$lng['admin']['or'] = 'ou'; + +// ADDED IN 1.2.19-svn17 + +$lng['serversettings']['unix_names']['title'] = 'Utiliser des noms d\'utilisateurs compatible UNIX'; +$lng['serversettings']['unix_names']['description'] = 'Vous permet d\'utiliser les - et _ dans les noms d\'utilisateurs si l\'option est ŕ Non'; +$lng['error']['cannotwritetologfile'] = 'Ne peut ouvrir le fichier de log %s en écriture'; +$lng['admin']['sysload'] = 'Charge du systčme'; +$lng['admin']['noloadavailable'] = 'Non disponible'; +$lng['admin']['nouptimeavailable'] = 'Non disponible'; +$lng['panel']['backtooverview'] = 'Retour ŕ l\'aperçu'; +$lng['admin']['nosubject'] = '(Aucun sujet)'; +$lng['admin']['configfiles']['statistics'] = 'Statistiques'; +$lng['login']['forgotpwd'] = 'Mot de passe oublié ?'; +$lng['login']['presend'] = 'Réinitialiser le mot de passe'; +$lng['login']['email'] = 'Adresse e-mail'; +$lng['login']['remind'] = 'Réinitialiser mon mot de passe'; +$lng['login']['usernotfound'] = 'Erreur : utilisateur inconnu !'; +$lng['pwdreminder']['subject'] = 'Froxlor - réinitialisation du mot de passe'; +$lng['pwdreminder']['body'] = 'Bonjour %s,\n\nVotre mot de passe pour Froxlor a été réinitialiser !\nLe nouveau mot de passe est : %p\n\nCordialement,\nL\'équipe Froxlor.'; +$lng['pwdreminder']['success'] = 'Mot de passe correctement réinitialiser.
    Vous devriez recevoir un e-mail avec votre nouveau mot de passe d\'ici quelques minutes.'; + +// ADDED IN 1.2.19-svn18 + +$lng['serversettings']['allow_password_reset']['title'] = 'Permettre aux clients de réinitialiser leurs mots de passe'; +$lng['pwdreminder']['notallowed'] = 'La réinitialisation des mots de passe est désactivée.'; + +// ADDED IN 1.2.19-svn20 + +$lng['serversettings']['awstats_path']['title'] = 'Dossier CGI-BIN de AWStats'; +$lng['serversettings']['awstats_path']['description'] = 'exemple : /var/www/cgi-bin/'; +$lng['serversettings']['awstats_updateall_command']['title'] = 'Emplacement de "awstats_updateall.pl"'; +$lng['serversettings']['awstats_updateall_command']['description'] = 'exemple : /usr/share/awstats/tools/awstats_updateall.pl'; + +// ADDED IN 1.2.19-svn21 + +$lng['customer']['title'] = 'Titre'; +$lng['customer']['country'] = 'Pays'; +$lng['panel']['dateformat'] = 'YYYY-MM-DD'; +$lng['panel']['dateformat_function'] = 'Y-m-d'; + +// Y = Year, m = Month, d = Day + +$lng['panel']['timeformat_function'] = 'H:i:s'; + +// H = Hour, i = Minute, s = Second + +$lng['panel']['default'] = 'Par défaut'; +$lng['panel']['never'] = 'Jamais'; +$lng['panel']['active'] = 'Actif'; +$lng['panel']['please_choose'] = 'Veuillez choisir'; +$lng['panel']['intervalfee_type']['y'] = 'Années'; +$lng['panel']['intervalfee_type']['m'] = 'Mois'; +$lng['panel']['intervalfee_type']['d'] = 'Jours'; +$lng['panel']['intervalfee_type_one']['y'] = 'Année'; +$lng['panel']['intervalfee_type_one']['m'] = 'Mois'; +$lng['panel']['intervalfee_type_one']['d'] = 'Jour'; +$lng['panel']['service_still_active'] = 'Le service est toujours actif'; +$lng['panel']['allow_modifications'] = 'Permettre les modifications'; +$lng['domains']['add_date'] = 'Ajouter ŕ Froxlor'; +$lng['domains']['registration_date'] = 'Ajouter ŕ l\'enregistrement'; +$lng['domains']['topleveldomain'] = 'Domaine de premier niveau'; +$lng['admin']['accountdata'] = 'Informations du compte'; +$lng['admin']['contactdata'] = 'Informations du contact'; +$lng['admin']['servicedata'] = 'Informations du service'; +$lng['admin']['billingdata'] = 'Informations de facturation'; +$lng['admin']['invoicedata'] = 'Informations de la facture'; +$lng['admin']['customer_categories_once'] = 'Inclure des frais d\'installation pour les clients'; +$lng['admin']['customer_categories_period'] = 'Inclure des frais périodiques aux clients'; +$lng['customer']['taxid'] = 'Numéro d\'identification de la taxe'; +$lng['customer']['calc_tax'] = 'Calculer le montant des taxes'; +$lng['customer']['create_contract'] = 'Créer le contrat'; +$lng['customer']['contract_date'] = 'Date du contrat'; +$lng['customer']['contract_number'] = 'Description / Numéro du contrat'; +$lng['customer']['additional_service_description'] = 'Description additionnelle pour le service'; +$lng['customer']['contract_details'] = 'Détails du contrat'; +$lng['customer']['included_domains'] = 'Domaines inclus'; +$lng['customer']['additional_traffic'] = 'Trafic additionnel'; +$lng['customer']['additional_diskspace'] = 'Espace Web additionnel'; +$lng['customer']['term_of_payment'] = 'Délai de paiement'; +$lng['customer']['payment_every'] = 'Paiement tous les / toutes les'; +$lng['customer']['payment_method'] = 'Moyen de paiement'; +$lng['customer']['payment_methods'][CONST_BILLING_PAYMENTMETHOD_BANKTRANSFER] = 'Virement bancaire'; +$lng['customer']['payment_methods'][CONST_BILLING_PAYMENTMETHOD_DEBITCARD] = 'Carte de crédit'; +$lng['customer']['bankaccount_holder'] = 'Titulaire du compte'; +$lng['customer']['bankaccount_number'] = 'Numéro de compte'; +$lng['customer']['bankaccount_blz'] = 'Numéro de la banque'; +$lng['customer']['bankaccount_bank'] = 'Nom de la banque'; +$lng['service']['quantity'] = 'Quantité'; +$lng['service']['interval_fee'] = 'Intervalle de taxation'; +$lng['service']['interval_length'] = 'Longueur de l\'intervalle'; +$lng['service']['interval_payment'] = 'Intervalle de paiement'; +$lng['service']['interval_payment_prepaid'] = 'Prépayé / avant paiement'; +$lng['service']['interval_payment_postpaid'] = 'Post payé / aprčs paiement'; +$lng['service']['setup_fee'] = 'Montant des frais d\'installation'; +$lng['service']['active'] = 'Service activé'; +$lng['service']['start_date'] = 'Activé depuis'; +$lng['service']['end_date'] = 'Inactif depuis'; +$lng['service']['lastinvoiced_date'] = 'Derničre facture'; +$lng['service']['valid_from'] = 'Valide du'; +$lng['service']['valid_to'] = 'Valide jusqu\'au'; +$lng['invoice']['invoicenumbertemplate'] = 'H-{year}/{number}'; +$lng['invoice']['sender'] = ''; +$lng['invoice']['invoice'] = 'Facture'; +$lng['invoice']['cancellation'] = 'Annuler la facture'; +$lng['invoice']['reminder'] = 'Rappel'; +$lng['invoice']['preview'] = 'Pré-visualiser'; +$lng['invoice']['dateheader'] = 'Fait ŕ %s'; +$lng['invoice']['number'] = 'Facture numéro'; +$lng['invoice']['contract_number'] = 'Numéro de contrat'; +$lng['invoice']['contract_details'] = 'Détails du contrat'; +$lng['invoice']['contract_details_template'] = 'Contrat d\'hébergement Web %s contenant un espace de %s Mo, ' . chr(128) . 'pour un prix de %s par Go supplémentaires, %s Go de trafic, ' . chr(128) . 'pour un prix de %s par Go supplémentaire; inclus les noms de domaines de %s tous les %s %s'; +$lng['invoice']['period'] = 'Période de facturation'; +$lng['invoice']['header'][0] = 'Point de vente'; +$lng['invoice']['header'][1] = 'Description'; +$lng['invoice']['header'][2] = 'Intervalle'; +$lng['invoice']['header'][3] = 'Net [' . chr(128) . ']'; +$lng['invoice']['header'][4] = 'Taxe [' . chr(128) . ']'; +$lng['invoice']['header'][5] = '%'; +$lng['invoice']['header'][6] = 'Total [' . chr(128) . ']'; +$lng['invoice']['subtotal'] = 'Sous-total'; +$lng['invoice']['tax'] = 'Taxe (%s%%)'; +$lng['invoice']['credit_note'] = 'Note de crédit'; +$lng['invoice']['total'] = 'Total'; +$lng['invoice']['payment_methods'][0] = 'Le montant de la facture ŕ payer dans un délai de %s jours. ' . "\n" . 'N\'ayant pas encore reçu de rčglement ŕ ce jour, nous vous prions de vouloir effectuer votre rčglement par virement bancaire sur notre compte ŕ créditer. Si vous souhaitez opter pour le prélčvement automatique, veuillez remplir le formulaire et nous le renvoyer par courrier postal.'; +$lng['invoice']['payment_methods'][1] = 'Le montant de la facture est de %s ŕ notre crédit dans un délai de %s, sur notre compte numéro %s, %s recouvrées par prélčvement'; +$lng['invoice']['tax_text']['line'] = 'T.V.A. %s : %s' . "\n"; +$lng['invoice']['tax_text']['client'] = 'du client'; +$lng['invoice']['state'] = 'état'; +$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_INVOICED] = 'facturé'; +$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_SENT] = 'envoyé'; +$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_PAID] = 'payé'; +$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_CANCELLED_NO_REINVOICE] = 'annulé (par de refacturation)'; +$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_CANCELLED_REINVOICE_WITHOUT_CREDIT_NOTE] = 'annulé (refacturation sans note de crédit)'; +$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_CANCELLED_REINVOICE_WITH_CREDIT_NOTE] = 'annulé (refacturation avec note de crédit)'; +$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_CANCELLED_REINVOICED] = 'annulé (re-facturé)'; +$lng['invoice']['state_change'] = 'dernier changement d\'état'; +$lng['invoice']['change_state'] = 'changer l\'état de la facture'; +$lng['invoice']['total_fee'] = 'sans taxe'; +$lng['invoice']['total_fee_taxed'] = 'Total'; +$lng['invoice']['fix'] = 'Correction de la facture'; +$lng['invoice']['pdf'] = 'Créer un PDF'; +$lng['invoice']['create_reminder'] = 'Créer un rappel'; +$lng['invoice']['changelog'] = 'Historique des changements'; +$lng['invoice']['deleted_line'] = 'La ligne a été supprimée.'; +$lng['invoice']['original_value'] = 'Valeur initiale'; +$lng['invoice']['page_footer'] = 'page %s sur %s'; +$lng['billing']['billing'] = 'Facturation'; +$lng['billing']['invoices'] = 'Factures'; +$lng['billing']['invoices_admin'] = 'Factures (Administrateurs)'; +$lng['billing']['openinvoices'] = 'Factures ouvertes'; +$lng['billing']['openinvoices_admin'] = 'Factures ouvertes (Administrateurs)'; +$lng['billing']['cacheinvoicefees'] = 'Mettre ŕ jour la liste / les tarifs'; +$lng['billing']['invoice'] = 'Facture'; +$lng['billing']['invoice_date'] = 'Date de facture'; +$lng['billing']['invoice_fee'] = 'Frais de facture'; +$lng['billing']['preview'] = 'Pré-visualiser'; +$lng['billing']['caption'] = 'Légende'; +$lng['billing']['number'] = 'Facture numéro'; +$lng['billing']['caption_setup'] = 'Légende pour les frais d\'installation'; +$lng['billing']['caption_interval'] = 'Légende pour les frais de gestion interne'; +$lng['billing']['template'] = 'Modčle'; +$lng['billing']['interval'] = 'Intervalle'; +$lng['billing']['other'] = 'Autres services'; +$lng['billing']['other_add'] = 'Ajouter d\'autres services'; +$lng['billing']['other_edit'] = 'Modifier les autres services'; +$lng['billing']['taxclassesnrates'] = 'Classifications et montants des taxes'; +$lng['billing']['taxclass'] = 'Classification de la taxe'; +$lng['billing']['taxrate'] = 'Taux de taxe'; +$lng['billing']['taxrate_add'] = 'Ajouter un taux de taxe'; +$lng['billing']['taxrate_edit'] = 'Modifier un taux de taxe'; +$lng['billing']['domains_templates'] = 'Modčle de domaine'; +$lng['billing']['domains_templates_add'] = 'Ajouter un modčle de domaine'; +$lng['billing']['domains_templates_edit'] = 'Modifier un modčle de domaine'; +$lng['billing']['other_templates'] = 'Autres modčles de services'; +$lng['billing']['other_templates_add'] = 'Ajouter d\'autres modčles de services'; +$lng['billing']['other_templates_edit'] = 'Modifier les autres modčles de services'; +$lng['billing']['categories']['hosting_caption'] = 'Hébergement'; +$lng['billing']['categories']['hosting_rowcaption_setup'] = 'Contrat d\'hébergement - Frais d\'installation'; +$lng['billing']['categories']['hosting_rowcaption_interval'] = 'Contrat d\'hébergement'; +$lng['billing']['categories']['hosting_rowcaption_setup_withloginname'] = 'Contrat d\'hébergement ({loginname}) - Frais d\'installation'; +$lng['billing']['categories']['hosting_rowcaption_interval_withloginname'] = 'Contrat d\'hébergement ({loginname})'; +$lng['billing']['categories']['domains_caption'] = 'Domaines'; +$lng['billing']['categories']['domains_rowcaption_setup'] = 'Domaine {domain} - Frais d\'installation'; +$lng['billing']['categories']['domains_rowcaption_interval'] = 'Domaine {domain}'; +$lng['billing']['categories']['traffic_caption'] = 'Trafic'; +$lng['billing']['categories']['traffic_rowcaption_setup'] = $lng['billing']['categories']['traffic_rowcaption_interval'] = 'Trafic utilisé : {traffic_total}/{traffic_included} Go'; +$lng['billing']['categories']['traffic_rowcaption_setup_unlimited'] = $lng['billing']['categories']['traffic_rowcaption_interval_unlimited'] = 'Trafic utilisé : {traffic_total}/' . $lng['customer']['unlimited'] . ' Go'; +$lng['billing']['categories']['other_caption'] = 'Autre'; +$lng['billing']['categories']['other_rowcaption_setup'] = $lng['billing']['categories']['other_rowcaption_interval'] = 'Autre'; +$lng['billing']['categories']['diskspace_caption'] = 'Espace Web'; +$lng['billing']['categories']['diskspace_rowcaption_setup'] = $lng['billing']['categories']['diskspace_rowcaption_interval'] = 'Espace Web utilisé : {diskspace_total}/{diskspace_included} Go'; +$lng['billing']['categories']['diskspace_rowcaption_setup_unlimited'] = $lng['billing']['categories']['diskspace_rowcaption_interval_unlimited'] = 'Espace Web utilisé : {diskspace_total}/' . $lng['customer']['unlimited'] . ' Go'; +$lng['question']['billing_invoice_row_reallydelete'] = 'Etes-vous sűr de vouloir supprimer cette ligne de facturation ?'; +$lng['question']['billing_invoice_row_reallyreset'] = 'Etes-vous sűr de vouloir ignorer tous les changements effectués ŕ cette facture ?'; +$lng['question']['billing_invoice_row_reallyreset_key'] = 'Etes-vous sűr de vouloir ignorer tous les changements effectués ŕ cette ligne ?'; +$lng['question']['billing_domains_template_reallydelete'] = 'Etes-vous sűr de vouloir supprimer le modčle pour "%s" ?'; +$lng['question']['billing_other_template_reallydelete'] = 'Etes-vous sűr de vouloir supprimer le modčle pour "%s" ?'; +$lng['question']['billing_other_service_reallydelete'] = 'Etes-vous sűr de vouloir supprimer ce service ?'; +$lng['question']['billing_taxrate_reallydelete'] = 'Etes-vous sűr de vouloir supprimer ce taux de taxe ?'; + +// ADDED IN 1.2.19-svn22 + +$lng['serversettings']['allow_password_reset']['description'] = 'Les clients peuvent réinitialiser leurs mots de passe et il sera envoyé ŕ leurs propres adresses e-mails'; +$lng['serversettings']['allow_password_reset_admin']['title'] = 'Permettre la réinitialisation des mots de passe par les administrateurs'; +$lng['serversettings']['allow_password_reset_admin']['description'] = 'Les administrateurs / revendeurs peuvent réinitialiser leurs mots de passe et il sera envoyé ŕ leurs propres adresses e-mails'; + +// ADDED IN 1.2.19-svn23 + +$lng['admin']['edit_billingdata'] = 'Peut modifier les informations de facturation ?'; +$lng['error']['service_still_active'] = 'Le service est toujours actif.'; + +// ADDED IN 1.2.19-svn23 + +$lng['admin']['billingsettings'] = 'Paramčtres de facturation'; +$lng['serversettings']['billing']['activate_billing']['title'] = 'Activer la facturation'; +$lng['serversettings']['billing']['activate_billing']['description'] = 'Ici, vous pouvez activer / désactiver le systčme global de facturation.'; +$lng['serversettings']['billing']['highlight_inactive']['title'] = 'Mettre en surbrillance les factures impayées'; +$lng['serversettings']['billing']['highlight_inactive']['description'] = 'Est-ce les factures impayées doivent ętre mises en surbrillance ?'; +$lng['serversettings']['billing']['invoicenumber_count']['title'] = 'Numéro de facture actuel'; +$lng['serversettings']['billing']['invoicenumber_count']['description'] = 'Est un numéro de facture fixe. Lors de tous changements, vous serez amené ŕ en discuter avec votre comptable.'; + +?> diff --git a/lng/italian.lng.php b/lng/italian.lng.php index 00d77044..e79b5627 100644 --- a/lng/italian.lng.php +++ b/lng/italian.lng.php @@ -1,447 +1,447 @@ - - * @author Luca Longinotti - * @author Froxlor Team - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Language - * @version $Id$ - */ - -/** - * Global - */ - -$lng['translator'] = 'Luca Longinotti & Luca Piona'; -$lng['panel']['edit'] = 'Modifica'; -$lng['panel']['delete'] = 'Cancella'; -$lng['panel']['create'] = 'Crea'; -$lng['panel']['save'] = 'Salva'; -$lng['panel']['yes'] = 'Si'; -$lng['panel']['no'] = 'No'; -$lng['panel']['emptyfornochanges'] = 'lasciare vuoto se non si vuole cambiare'; -$lng['panel']['emptyfordefault'] = 'lasciare vuoto per l\'impostazione di default'; -$lng['panel']['path'] = 'Percorso'; -$lng['panel']['toggle'] = 'Cambia'; -$lng['panel']['next'] = 'Prossimo'; -$lng['panel']['dirsmissing'] = 'Impossibile trovare o leggere la directory!'; - -/** - * Login - */ - -$lng['login']['username'] = 'Nome Utente'; -$lng['login']['password'] = 'Password'; -$lng['login']['language'] = 'Lingua'; -$lng['login']['login'] = 'Login'; -$lng['login']['logout'] = 'Logout'; -$lng['login']['profile_lng'] = 'Scegli la lingua'; - -/** - * Customer - */ - -$lng['customer']['documentroot'] = 'Cartella Principale'; -$lng['customer']['name'] = 'Cognome'; -$lng['customer']['firstname'] = 'Nome'; -$lng['customer']['company'] = 'Ditta'; -$lng['customer']['street'] = 'Via'; -$lng['customer']['zipcode'] = 'CAP'; -$lng['customer']['city'] = 'Cittŕ'; -$lng['customer']['phone'] = 'Telefono'; -$lng['customer']['fax'] = 'Fax'; -$lng['customer']['email'] = 'Email'; -$lng['customer']['customernumber'] = 'ID Cliente'; -$lng['customer']['diskspace'] = 'Spazio Web (MB)'; -$lng['customer']['traffic'] = 'Traffico (GB)'; -$lng['customer']['mysqls'] = 'Database MySQL'; -$lng['customer']['emails'] = 'Indirizzi Email'; -$lng['customer']['accounts'] = 'Account Email'; -$lng['customer']['forwarders'] = 'Reindirizzamenti Email'; -$lng['customer']['ftps'] = 'Account FTP'; -$lng['customer']['subdomains'] = 'Sottodomini'; -$lng['customer']['domains'] = 'Domini'; -$lng['customer']['unlimited'] = 'illimitati'; - -/** - * Customermenue - */ - -$lng['menue']['main']['main'] = 'Principale'; -$lng['menue']['main']['changepassword'] = 'Cambia la password'; -$lng['menue']['main']['changelanguage'] = 'Cambia la lingua'; -$lng['menue']['email']['email'] = 'Email'; -$lng['menue']['email']['emails'] = 'Indirizzi'; -$lng['menue']['email']['webmail'] = 'WebMail'; -$lng['menue']['mysql']['mysql'] = 'MySQL'; -$lng['menue']['mysql']['databases'] = 'Database'; -$lng['menue']['mysql']['phpmyadmin'] = 'phpMyAdmin'; -$lng['menue']['domains']['domains'] = 'Domini'; -$lng['menue']['domains']['settings'] = 'Opzioni'; -$lng['menue']['ftp']['ftp'] = 'FTP'; -$lng['menue']['ftp']['accounts'] = 'Account'; -$lng['menue']['ftp']['webftp'] = 'WebFTP'; -$lng['menue']['extras']['extras'] = 'Extra'; -$lng['menue']['extras']['directoryprotection'] = 'Cartelle Protette'; -$lng['menue']['extras']['pathoptions'] = 'Opzioni Cartelle'; - -/** - * Index - */ - -$lng['index']['customerdetails'] = 'Dettagli Cliente'; -$lng['index']['accountdetails'] = 'Dettagli Account'; - -/** - * Change Password - */ - -$lng['changepassword']['old_password'] = 'Vecchia password'; -$lng['changepassword']['new_password'] = 'Nuova password'; -$lng['changepassword']['new_password_confirm'] = 'Nuova password (verifica)'; -$lng['changepassword']['new_password_ifnotempty'] = 'Nuova password (vuota = non cambia)'; -$lng['changepassword']['also_change_ftp'] = ' cambia la password dell\'account FTP principale?'; - -/** - * Domains - */ - -$lng['domains']['description'] = 'Qui puoi creare (sotto)domini e cambiare il loro percorso.
    Il sistema, dopo ogni cambiamento, necessita di un po\' di tempo per applicare le nuove impostazioni.'; -$lng['domains']['domainsettings'] = 'Opzioni del dominio'; -$lng['domains']['domainname'] = 'Nome del dominio'; -$lng['domains']['subdomain_add'] = 'Crea sottodominio'; -$lng['domains']['subdomain_edit'] = 'Modifica il (sotto)dominio'; -$lng['domains']['wildcarddomain'] = 'Crea una wildcarddomain?'; -$lng['domains']['aliasdomain'] = 'Alias per questo dominio'; -$lng['domains']['noaliasdomain'] = 'Nessun alias per il dominio'; - -/** - * eMails - */ - -$lng['emails']['description'] = 'Qui puoi creare e cambiare i tuoi indirizzi Email.
    Un account č come la bucalettere davanti a casa tua. Se qualcuno ti manda un\'Email, essa sarŕ recapitata all\'interno del tuo account.

    Per scaricare le tue Email usa le seguenti impostazioni nel tuo programma di posta elettronica: (I dati scritti in corsivo vanno cambiati con i tuoi!)
    Hostname: Nome del dominio
    Username: Nome dell\'account / Indirizzo Email
    Password: La password scelta'; -$lng['emails']['emailaddress'] = 'Indirizzo Email'; -$lng['emails']['emails_add'] = 'Crea indirizzo Email'; -$lng['emails']['emails_edit'] = 'Modifica indirizzo Email'; -$lng['emails']['catchall'] = 'Catch-all'; -$lng['emails']['iscatchall'] = 'Definisci come indirizzo catch-all?'; -$lng['emails']['account'] = 'Account'; -$lng['emails']['account_add'] = 'Crea account'; -$lng['emails']['account_delete'] = 'Cancella account'; -$lng['emails']['from'] = 'Da'; -$lng['emails']['to'] = 'Per'; -$lng['emails']['forwarders'] = 'Reindirizzamenti'; -$lng['emails']['forwarder_add'] = 'Crea reindirizzamento'; - -/** - * FTP - */ - -$lng['ftp']['description'] = 'Qui puoi creare e modificare i tuoi account FTP.
    I cambiamenti sono effettuati in tempo reale e gli account si possono usare immediatamente.'; -$lng['ftp']['account_add'] = 'Crea account'; - -/** - * MySQL - */ - -$lng['mysql']['description'] = 'Qui puoi creare e modificare i tuoi database MySQL.
    I cambiamenti sono effettuati in tempo reale e i databases si possono usare immediatamente.
    Nel menů di sinistra trovi il tool phpMyAdmin con il quale potrai comodamente amministrare i tuoi databases attraverso il tuo web-browser.

    Per utilizzare i database nei vostri script PHP, utilizzate le seguenti impostazioni: (I dati scritti in corsivo vanno cambiati con i tuoi!)
    Hostname:
    Username: L\'username scelto
    Password: La password scelta per quell\'username
    Database: Nome del database'; -$lng['mysql']['databasename'] = 'Nome database'; -$lng['mysql']['databasedescription'] = 'Descrizione database'; -$lng['mysql']['database_create'] = 'Crea database'; - -/** - * Extras - */ - -$lng['extras']['description'] = 'Qui puoi aggiungere alcune opzioni extra, per esempio impostare delle cartelle protette.
    Il sistema, dopo ogni cambiamento, necessita di un po\' di tempo per applicare le nuove impostazioni.'; -$lng['extras']['directoryprotection_add'] = 'Aggiungi protezione cartella'; -$lng['extras']['view_directory'] = 'Mostra protezione cartella'; -$lng['extras']['pathoptions_add'] = 'Aggiungi opzioni cartella'; -$lng['extras']['directory_browsing'] = 'Visualizza file e cartelle'; -$lng['extras']['pathoptions_edit'] = 'Modifica opzioni cartella'; -$lng['extras']['error404path'] = '404'; -$lng['extras']['error403path'] = '403'; -$lng['extras']['error500path'] = '500'; -$lng['extras']['error401path'] = '401'; -$lng['extras']['errordocument404path'] = 'URL to ErrorDocument 404'; -$lng['extras']['errordocument403path'] = 'URL to ErrorDocument 403'; -$lng['extras']['errordocument500path'] = 'URL to ErrorDocument 500'; -$lng['extras']['errordocument401path'] = 'URL to ErrorDocument 401'; - -/** - * Errors - */ - -$lng['error']['error'] = 'Errore'; -$lng['error']['directorymustexist'] = 'La cartella %s deve esistere. Per favore creala tramite il tuo client FTP.'; -$lng['error']['filemustexist'] = 'Il file %s deve esistere.'; -$lng['error']['allresourcesused'] = 'Hai giŕ usato tutte le tue risorse.'; -$lng['error']['domains_cantdeletemaindomain'] = 'Non puoi cancellare un dominio usato come dominio Email.'; -$lng['error']['domains_canteditdomain'] = 'Non puoi modificare questo dominio. La funzione č stata disabilitata dall\'admin.'; -$lng['error']['domains_cantdeletedomainwithemail'] = 'Non puoi cancellare un dominio usato come dominio Email. Cancella prima tutti gli indirizzi Email che lo utilizzano.'; -$lng['error']['firstdeleteallsubdomains'] = 'Prima di creare un dominio wildcard, cancella tutti i sottodomini presenti per quel dominio.'; -$lng['error']['youhavealreadyacatchallforthisdomain'] = 'Hai giŕ definito un catchall per questo dominio.'; -$lng['error']['ftp_cantdeletemainaccount'] = 'Non puoi cancellare il tuo account FTP principale.'; -$lng['error']['login'] = 'Il nome utente o la password da te immessi sono incorretti. Per favore riprova!'; -$lng['error']['login_blocked'] = 'Questo account č stato sospeso per i troppi tentativi di login falliti.
    Riprovi tra ' . $settings['login']['deactivatetime'] . ' secondi.'; -$lng['error']['notallreqfieldsorerrors'] = 'Alcuni campi sono stati lasciati vuoti o sono stati riempiti incorrettamente.'; -$lng['error']['oldpasswordnotcorrect'] = 'La vecchia password non č corretta.'; -$lng['error']['youcantallocatemorethanyouhave'] = 'Non puoi assegnare piů risorse di quante ne possieda tu stesso.'; -$lng['error']['mustbeurl'] = 'Non hai inserito un\'indirizzo valido o completo (per es. http://qualchedominio.com/errore404.htm).'; -$lng['error']['invalidpath'] = 'Non hai scelto un\'indirizzo valido.'; -$lng['error']['stringisempty'] = 'Manca il dato nel campo.'; -$lng['error']['stringiswrong'] = 'Dato incorretto.'; -$lng['error']['myloginname'] = '\'' . $lng['login']['username'] . '\''; -$lng['error']['mypassword'] = '\'' . $lng['login']['password'] . '\''; -$lng['error']['oldpassword'] = '\'' . $lng['changepassword']['old_password'] . '\''; -$lng['error']['newpassword'] = '\'' . $lng['changepassword']['new_password'] . '\''; -$lng['error']['newpasswordconfirm'] = '\'' . $lng['changepassword']['new_password_confirm'] . '\''; -$lng['error']['newpasswordconfirmerror'] = 'La nuova password non corrisponde a quella vecchia.'; -$lng['error']['myname'] = '\'' . $lng['customer']['name'] . '\''; -$lng['error']['myfirstname'] = '\'' . $lng['customer']['firstname'] . '\''; -$lng['error']['emailadd'] = '\'' . $lng['customer']['email'] . '\''; -$lng['error']['mydomain'] = '\'Dominio\''; -$lng['error']['mydocumentroot'] = '\'Documentroot\''; -$lng['error']['loginnameexists'] = 'Il login %s esiste giŕ.'; -$lng['error']['emailiswrong'] = 'L\'indirizzo Email %s contiene caratteri invalidi o č incompleto.'; -$lng['error']['loginnameiswrong'] = 'Il login %s contiene caratteri invalidi.'; -$lng['error']['userpathcombinationdupe'] = 'La combinazione tra nome utente e percorso esiste giŕ.'; -$lng['error']['patherror'] = 'Errore! Il percorso non puň essere vuoto.'; -$lng['error']['errordocpathdupe'] = 'Le opzioni per la cartella %s esistono giŕ.'; -$lng['error']['adduserfirst'] = 'Per favore crea prima un utente ...'; -$lng['error']['domainalreadyexists'] = 'Il dominio %s č giŕ assegnato ad un cliente.'; -$lng['error']['nolanguageselect'] = 'Nessuna lingua selezionata.'; -$lng['error']['nosubjectcreate'] = 'Devi definire un titolo per questo template Email.'; -$lng['error']['nomailbodycreate'] = 'Devi definiro un testo per questo template Email.'; -$lng['error']['templatenotfound'] = 'Il template non č stato trovato.'; -$lng['error']['alltemplatesdefined'] = 'Non puoi definire altri template, tutte le lingue sono giŕ definite.'; -$lng['error']['wwwnotallowed'] = 'www non č ammesso come sottodominio.'; -$lng['error']['subdomainiswrong'] = 'Il sottodominio %s contiene caratteri invalidi.'; -$lng['error']['domaincantbeempty'] = 'Il nome dominio non puň essere vuoto.'; -$lng['error']['domainexistalready'] = 'Il dominio %s esiste giŕ.'; -$lng['error']['domainisaliasorothercustomer'] = 'Il dominio alias selezionato č a sua volta un dominio alias o appartiene ad un altro cliente.'; -$lng['error']['emailexistalready'] = 'L\'indirizzo Email %s esiste giŕ.'; -$lng['error']['maindomainnonexist'] = 'Il dominio principale %s non esiste.'; -$lng['error']['destinationnonexist'] = 'Per favore crea il tuo reindirizzamento nel campo \'Destinazione\'.'; -$lng['error']['destinationalreadyexistasmail'] = 'Il reindirizzamento a %s esiste giŕ come indirizzo Email attivo.'; -$lng['error']['destinationalreadyexist'] = 'Hai giŕ definito un reindirizzamento per %s .'; -$lng['error']['destinationiswrong'] = 'Il reindirizzamento %s contiene caratteri invalidi o č incompleto.'; -$lng['error']['domainname'] = $lng['domains']['domainname']; - -/** - * Questions - */ - -$lng['question']['question'] = 'Domanda di sicurezza'; -$lng['question']['admin_customer_reallydelete'] = 'Sei sicuro di voler cancellare il cliente %s? Quest\'azione non potrŕ essere annullata!'; -$lng['question']['admin_domain_reallydelete'] = 'Sei sicuro di voler cancellare il dominio %s?'; -$lng['question']['admin_domain_reallydisablesecuritysetting'] = 'Sei sicuro di voler disattivare queste opzioni di sicurezza (OpenBasedir e/o SafeMode)?'; -$lng['question']['admin_admin_reallydelete'] = 'Sei sicuro di voler cancellare l\'admin %s? Tutti i clienti e i domini saranno affidati all\'amministratore principale.'; -$lng['question']['admin_template_reallydelete'] = 'Sei sicuro di voler cancellare il template \'%s\'?'; -$lng['question']['domains_reallydelete'] = 'Sei sicuro di voler cancellare il dominio %s?'; -$lng['question']['email_reallydelete'] = 'Sei sicuro di voler cancellare l\'indirizzo Email %s?'; -$lng['question']['email_reallydelete_account'] = 'Sei sicuro di voler cancellare l\'account Email di %s?'; -$lng['question']['email_reallydelete_forwarder'] = 'Sei sicuro di voler cancellare il reindirizzamento a %s?'; -$lng['question']['extras_reallydelete'] = 'Sei sicuro di voler cancellare la protezione per la cartella %s?'; -$lng['question']['extras_reallydelete_pathoptions'] = 'Sei sicuro di voler cancellare le opzioni cartella per %s?'; -$lng['question']['ftp_reallydelete'] = 'Sei sicuro di voler cancellare l\'account FTP %s?'; -$lng['question']['mysql_reallydelete'] = 'Sei sicuro di voler cancellare il database %s? Quest\'azione non potrŕ essere annullata!'; -$lng['question']['admin_configs_reallyrebuild'] = 'Sei sicuro di voler rigenerare i file di configurazione per Apache e Bind?'; - -/** - * Mails - */ - -$lng['mails']['pop_success']['mailbody'] = 'Salve,\n\nil tuo indirizzo Email {EMAIL}\nč stato configurato con successo.\n\nQuesta č un\'Email creata automaticamente,\n per favore non rispondere!\n\nCordiali saluti, Froxlor-Team.'; -$lng['mails']['pop_success']['subject'] = 'Indirizzo Email configurato con successo'; -$lng['mails']['createcustomer']['mailbody'] = 'Salve {FIRSTNAME} {NAME},\n\nqueste sono le informazioni per il tuo account:\n\nNome Utente: {USERNAME}\nPassword: {PASSWORD}\n\nGrazie,\nFroxlor-Team.'; -$lng['mails']['createcustomer']['subject'] = 'Informazioni account'; - -/** - * Admin - */ - -$lng['admin']['overview'] = 'Visione d\'insieme'; -$lng['admin']['ressourcedetails'] = 'Risorse utilizzate'; -$lng['admin']['systemdetails'] = 'Dettagli sistema'; -$lng['admin']['froxlordetails'] = 'Dettagli Froxlor'; -$lng['admin']['installedversion'] = 'Versione installata'; -$lng['admin']['latestversion'] = 'Ultima versione disponibile'; -$lng['admin']['lookfornewversion']['clickhere'] = 'Cerca sul web'; -$lng['admin']['lookfornewversion']['error'] = 'Errore durante la lettura'; -$lng['admin']['resources'] = 'Risorse'; -$lng['admin']['customer'] = 'Cliente'; -$lng['admin']['customers'] = 'Clienti'; -$lng['admin']['customer_add'] = 'Crea cliente'; -$lng['admin']['customer_edit'] = 'Modifica cliente'; -$lng['admin']['domains'] = 'Domini'; -$lng['admin']['domain_add'] = 'Crea dominio'; -$lng['admin']['domain_edit'] = 'Modifica dominio'; -$lng['admin']['subdomainforemail'] = 'Sottodominio utilizzabile come dominio Email'; -$lng['admin']['admin'] = 'Admin'; -$lng['admin']['admins'] = 'Admin'; -$lng['admin']['admin_add'] = 'Crea admin'; -$lng['admin']['admin_edit'] = 'Modifica admin'; -$lng['admin']['customers_see_all'] = 'Puň vedere tutti i clienti?'; -$lng['admin']['domains_see_all'] = 'Puň vedere tutti i domini?'; -$lng['admin']['change_serversettings'] = 'Puň cambiare le impostazioni del server?'; -$lng['admin']['server'] = 'Server'; -$lng['admin']['serversettings'] = 'Opzioni'; -$lng['admin']['rebuildconf'] = 'Rigenera file di configurazione'; -$lng['admin']['stdsubdomain'] = 'Sottodominio standard'; -$lng['admin']['stdsubdomain_add'] = 'Crea sottodominio standard'; -$lng['admin']['deactivated'] = 'Disattiva'; -$lng['admin']['deactivated_user'] = 'Disattiva utente'; -$lng['admin']['sendpassword'] = 'Invia password'; -$lng['admin']['ownvhostsettings'] = 'Impostazioni vHost speciali'; -$lng['admin']['configfiles']['serverconfiguration'] = 'Configurazione servizi'; -$lng['admin']['configfiles']['files'] = 'File di configurazione: Per favore cambia questi file o creali
    se non esistono, con il seguente contenuto.
    NOTA: La password di MySQL non č stata rimpiazzata per ragioni di sicurezza.
    Per favore rimpiazza "MYSQL_PASSWORD" con la password MySQL dell\'utente Froxlor. Se hai dimenticato la password per MySQL
    la trovi in "lib/userdata.inc.php".'; -$lng['admin']['configfiles']['commands'] = 'Comandi: Per favore esegui i seguenti comandi in una shell.'; -$lng['admin']['configfiles']['restart'] = 'Ricarica: Per favore esegui i seguenti comandi (in ordine) in una shell per ricaricare la configurazione.'; -$lng['admin']['templates']['templates'] = 'Template'; -$lng['admin']['templates']['template_add'] = 'Aggiungi template'; -$lng['admin']['templates']['template_edit'] = 'Modifica template'; -$lng['admin']['templates']['action'] = 'Azione'; -$lng['admin']['templates']['email'] = 'Email'; -$lng['admin']['templates']['subject'] = 'Soggetto:'; -$lng['admin']['templates']['mailbody'] = 'Testo dell\'Email'; -$lng['admin']['templates']['createcustomer'] = 'Email di benvenuto per i nuovi clienti'; -$lng['admin']['templates']['pop_success'] = 'Benevenuto per ogni nuovo account Email'; -$lng['admin']['templates']['template_replace_vars'] = 'Variabili da cambiare nel template:'; -$lng['admin']['templates']['FIRSTNAME'] = 'Rimpiazzato con il nome del cliente.'; -$lng['admin']['templates']['NAME'] = 'Rimpiazzato con il cognome del cliente.'; -$lng['admin']['templates']['USERNAME'] = 'Rimpiazzato con il nome utente dell\'account.'; -$lng['admin']['templates']['PASSWORD'] = 'Rimpiazzato con la password dell\'account.'; -$lng['admin']['templates']['EMAIL'] = 'Rimapiazzato con l\'indirizzo dell\'account.'; - -/** - * Serversettings - */ - -$lng['serversettings']['session_timeout']['title'] = 'Timeout della sessione'; -$lng['serversettings']['session_timeout']['description'] = 'Quanto tempo un utente deve rimanere inattivo prima che la sessione diventi invalida (secondi)?'; -$lng['serversettings']['accountprefix']['title'] = 'Prefisso Cliente'; -$lng['serversettings']['accountprefix']['description'] = 'Che prefisso dovrebbero avere gli account dei clienti?'; -$lng['serversettings']['mysqlprefix']['title'] = 'Prefisso SQL'; -$lng['serversettings']['mysqlprefix']['description'] = 'Che prefisso dovrebbero avere i database SQL?'; -$lng['serversettings']['ftpprefix']['title'] = 'Prefisso FTP'; -$lng['serversettings']['ftpprefix']['description'] = 'Che prefisso dovrebbero avere gli account FTP?'; -$lng['serversettings']['documentroot_prefix']['title'] = 'Cartella dati web'; -$lng['serversettings']['documentroot_prefix']['description'] = 'Dove devono essere immagazzinati tutti i dati web?'; -$lng['serversettings']['logfiles_directory']['title'] = 'Cartella logfiles'; -$lng['serversettings']['logfiles_directory']['description'] = 'Dove devono essere immagazzinati tutti i log?'; -$lng['serversettings']['ipaddress']['title'] = 'Indirizzo IP'; -$lng['serversettings']['ipaddress']['description'] = 'Qual\'č l\'indirizzo IP di questo server?'; -$lng['serversettings']['hostname']['title'] = 'Hostname'; -$lng['serversettings']['hostname']['description'] = 'QUal\'č l\'hostname di questo server?'; -$lng['serversettings']['apachereload_command']['title'] = 'Comando riavvio Apache'; -$lng['serversettings']['apachereload_command']['description'] = 'Qual\'č il comando per riavviare Apache?'; -$lng['serversettings']['bindconf_directory']['title'] = 'Cartella configurazione Bind'; -$lng['serversettings']['bindconf_directory']['description'] = 'Dove sono i file di configurazione per Bind?'; -$lng['serversettings']['bindreload_command']['title'] = 'Comando riavvio Bind'; -$lng['serversettings']['bindreload_command']['description'] = 'Qual\'č il comando per riavviare Bind?'; -$lng['serversettings']['binddefaultzone']['title'] = 'Zona di default Bind'; -$lng['serversettings']['binddefaultzone']['description'] = 'Qual\'č il nome della zona di default Bind?'; -$lng['serversettings']['vmail_uid']['title'] = 'UID Email'; -$lng['serversettings']['vmail_uid']['description'] = 'Che UserID dovrebbe avere l\'utente che gestisce le Email?'; -$lng['serversettings']['vmail_gid']['title'] = 'GID Email'; -$lng['serversettings']['vmail_gid']['description'] = 'Che GroupID dovrebbe avere l\'utente che gestisce le Email?'; -$lng['serversettings']['vmail_homedir']['title'] = 'Cartella Email'; -$lng['serversettings']['vmail_homedir']['description'] = 'Dove devono essere immagazzinate tutte le Email?'; -$lng['serversettings']['adminmail']['title'] = 'Mittente'; -$lng['serversettings']['adminmail']['description'] = 'Qual\'č l\'indirizzo del mittente delle Email provenienti dal pannello?'; -$lng['serversettings']['phpmyadmin_url']['title'] = 'URL phpMyAdmin'; -$lng['serversettings']['phpmyadmin_url']['description'] = 'Qual\'č l\'URL di phpMyAdmin? (deve cominciare per http://)'; -$lng['serversettings']['webmail_url']['title'] = 'URL WebMail'; -$lng['serversettings']['webmail_url']['description'] = 'Qual\'č l\'URL della WebMail? (deve cominciare per http://)'; -$lng['serversettings']['webftp_url']['title'] = 'URL WebFTP'; -$lng['serversettings']['webftp_url']['description'] = 'Qual\'č l\'URL del WebFTP? (deve cominciare per http://)'; -$lng['serversettings']['language']['description'] = 'Qual\'č la lingua standard del tuo server?'; -$lng['serversettings']['maxloginattempts']['title'] = 'Numero massimo tentativi login'; -$lng['serversettings']['maxloginattempts']['description'] = 'Numero massimo di tentativi di login prima che l\'account sia disattivato.'; -$lng['serversettings']['deactivatetime']['title'] = 'Durata disattivamento'; -$lng['serversettings']['deactivatetime']['description'] = 'Tempo (sec.) di disattivazione dell\'account dopo troppi tentativi di login.'; -$lng['serversettings']['pathedit']['title'] = 'Modalitŕ di scelta percorsi/cartelle'; -$lng['serversettings']['pathedit']['description'] = 'Un percorso/cartella andrŕ scelto attraverso un menu a tendina o inserendolo a mano?'; - -/** - * New strings - */ - -$lng['admin']['cronlastrun'] = 'Ultimo Cronjob'; -$lng['serversettings']['paging']['title'] = 'Elementi da visualizzare per pagina'; -$lng['serversettings']['paging']['description'] = 'Quanti elementi dovrebbero essere visualizzati su una pagina? (0 = disattiva impaginazione)'; -$lng['error']['ipstillhasdomains'] = 'La combinazione IP/Porta che vuoi eliminare ha ancora dei domini assegnati, per favore riassegna questi domini ad altre combinazioni IP/Porta prima di eliminare questa.'; -$lng['error']['cantdeletedefaultip'] = 'Non puoi eliminare la combinazione IP/Porta default dei rivenditori, per favore imposta un\'altra combinazione IP/Porta come default dei rivenditori prima di eliminare questa.'; -$lng['error']['cantdeletesystemip'] = 'Non puoi eliminare l\'ultima IP di sistema, crea un\'altra combinazione IP/Porta per l\'IP di sistema o cambia l\'IP di sistema.'; -$lng['error']['myipaddress'] = '\'IP\''; -$lng['error']['myport'] = '\'Porta\''; -$lng['error']['myipdefault'] = 'Devi selezionare una combinazione IP/Porta che diventerŕ default.'; -$lng['error']['myipnotdouble'] = 'Questa combinazione IP/Porta esiste giŕ.'; -$lng['question']['admin_ip_reallydelete'] = 'Vuoi veramente eliminare l\'indirizzo IP %s?'; -$lng['admin']['ipsandports']['ipsandports'] = 'IP e Porte'; -$lng['admin']['ipsandports']['add'] = 'Aggiungi IP/Porta'; -$lng['admin']['ipsandports']['edit'] = 'Modifica IP/Porta'; -$lng['admin']['ipsandports']['ipandport'] = 'IP/Porta'; -$lng['admin']['ipsandports']['ip'] = 'IP'; -$lng['admin']['ipsandports']['port'] = 'Porta'; -$lng['error']['cantchangesystemip'] = 'Non puoi cambiare l\'ultima IP di sistema, crea un\'altra combinazione IP/Porta per l\'IP di sistema o cambia l\'IP di sistema.'; -$lng['question']['admin_domain_reallydocrootoutofcustomerroot'] = 'Sei sicuro di volere la cartella base dei dati web di questo dominio al di fuori della cartella base del cliente?'; -$lng['admin']['memorylimitdisabled'] = 'Disabilitato'; -$lng['error']['loginnameissystemaccount'] = 'Non puoi creare account con nomi simili agli account di sistema. Per favore cambia il nome dell\'account.'; -$lng['domain']['openbasedirpath'] = 'Percorso OpenBasedir'; -$lng['domain']['docroot'] = 'Percorso del campo sopra'; -$lng['domain']['homedir'] = 'Cartella Home'; -$lng['admin']['valuemandatory'] = 'Questo valore č obbligatorio'; -$lng['admin']['valuemandatorycompany'] = 'O i campi "nome" e "cognome" O il capo "compagnia" devono essere riempiti'; -$lng['menue']['main']['username'] = 'Connesso come utente: '; -$lng['panel']['urloverridespath'] = 'URL (sovrascrive il percorso)'; -$lng['panel']['pathorurl'] = 'Percorso o URL'; -$lng['error']['sessiontimeoutiswrong'] = '"Timeout Sessione" deve essere un numero.'; -$lng['error']['maxloginattemptsiswrong'] = '"Numero Massimo Tentativi Login" deve essere un numero.'; -$lng['error']['deactivatetimiswrong'] = '"Durata Disattivamento" deve essere un numero.'; -$lng['error']['accountprefixiswrong'] = '&quopt;Prefisso Utente" incorretto.'; -$lng['error']['mysqlprefixiswrong'] = '&quopt;Prefisso SQL" incorretto.'; -$lng['error']['ftpprefixiswrong'] = '&quopt;Prefisso FTP" incorretto.'; -$lng['error']['ipiswrong'] = '"Indirizzo IP" incorretto. Č permesso solo un indirizzo IP valido.'; -$lng['error']['vmailuidiswrong'] = '"UID Email" incorretto. Č permessa solo una UID numerica.'; -$lng['error']['vmailgidiswrong'] = '"GID Email" incorretto. Č permessa solo una GID numerica.'; -$lng['error']['adminmailiswrong'] = '"Mittente" incorretto. Č permesso solo un indirizzo Email valido.'; -$lng['error']['pagingiswrong'] = 'Valore degli "Elementi da visualizzare per pagina" incorretto. Sono permessi solo numeri.'; -$lng['error']['phpmyadminiswrong'] = 'Il link a phpMyAdmin č invalido.'; -$lng['error']['webmailiswrong'] = 'Il link alla WebMail č invalido.'; -$lng['error']['webftpiswrong'] = 'Il link al WebFTP č invalido.'; -$lng['domains']['hasaliasdomains'] = 'Ha domini alias'; -$lng['serversettings']['defaultip']['title'] = 'IP/Porta default'; -$lng['serversettings']['defaultip']['description'] = 'Qual\'č la combinazione IP/Porta default?'; -$lng['domains']['statstics'] = 'Statistiche d\'utilizzo'; -$lng['panel']['ascending'] = 'ascendente'; -$lng['panel']['decending'] = 'discendente'; -$lng['panel']['search'] = 'Cerca'; -$lng['panel']['used'] = 'utilizzato'; -$lng['panel']['translator'] = 'Traduttore'; -$lng['error']['stringformaterror'] = 'Il valore per il campo "%s" non č nel formato atteso.'; - -// Translated by marone42@googlemail.com on 03/15/2007 (see https://trac.froxlor.org/ticket/126#comment:21) - -$lng['admin']['serversoftware'] = 'Serversoftware'; -$lng['admin']['phpversion'] = 'Versione PHP'; -$lng['admin']['phpmemorylimit'] = 'PHP-Memory-Limit'; -$lng['admin']['mysqlserverversion'] = 'Versione MySQL Server'; -$lng['admin']['mysqlclientversion'] = 'Version MySQL Client'; -$lng['admin']['webserverinterface'] = 'Interfaccia Webserver'; -$lng['domains']['isassigneddomain'] = 'È dominio assegnato'; -$lng['serversettings']['phpappendopenbasedir']['title'] = 'Percoso da aggiungere a OpenBasedir'; -$lng['serversettings']['phpappendopenbasedir']['description'] = 'Questi percorsi (separati da colonne) verranno aggiunti allo statement OpenBasedir in ognuno vhost-container.'; - -?> + + * @author Luca Longinotti + * @author Froxlor Team + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Language + * @version $Id$ + */ + +/** + * Global + */ + +$lng['translator'] = 'Luca Longinotti & Luca Piona'; +$lng['panel']['edit'] = 'Modifica'; +$lng['panel']['delete'] = 'Cancella'; +$lng['panel']['create'] = 'Crea'; +$lng['panel']['save'] = 'Salva'; +$lng['panel']['yes'] = 'Si'; +$lng['panel']['no'] = 'No'; +$lng['panel']['emptyfornochanges'] = 'lasciare vuoto se non si vuole cambiare'; +$lng['panel']['emptyfordefault'] = 'lasciare vuoto per l\'impostazione di default'; +$lng['panel']['path'] = 'Percorso'; +$lng['panel']['toggle'] = 'Cambia'; +$lng['panel']['next'] = 'Prossimo'; +$lng['panel']['dirsmissing'] = 'Impossibile trovare o leggere la directory!'; + +/** + * Login + */ + +$lng['login']['username'] = 'Nome Utente'; +$lng['login']['password'] = 'Password'; +$lng['login']['language'] = 'Lingua'; +$lng['login']['login'] = 'Login'; +$lng['login']['logout'] = 'Logout'; +$lng['login']['profile_lng'] = 'Scegli la lingua'; + +/** + * Customer + */ + +$lng['customer']['documentroot'] = 'Cartella Principale'; +$lng['customer']['name'] = 'Cognome'; +$lng['customer']['firstname'] = 'Nome'; +$lng['customer']['company'] = 'Ditta'; +$lng['customer']['street'] = 'Via'; +$lng['customer']['zipcode'] = 'CAP'; +$lng['customer']['city'] = 'Cittŕ'; +$lng['customer']['phone'] = 'Telefono'; +$lng['customer']['fax'] = 'Fax'; +$lng['customer']['email'] = 'Email'; +$lng['customer']['customernumber'] = 'ID Cliente'; +$lng['customer']['diskspace'] = 'Spazio Web (MB)'; +$lng['customer']['traffic'] = 'Traffico (GB)'; +$lng['customer']['mysqls'] = 'Database MySQL'; +$lng['customer']['emails'] = 'Indirizzi Email'; +$lng['customer']['accounts'] = 'Account Email'; +$lng['customer']['forwarders'] = 'Reindirizzamenti Email'; +$lng['customer']['ftps'] = 'Account FTP'; +$lng['customer']['subdomains'] = 'Sottodomini'; +$lng['customer']['domains'] = 'Domini'; +$lng['customer']['unlimited'] = 'illimitati'; + +/** + * Customermenue + */ + +$lng['menue']['main']['main'] = 'Principale'; +$lng['menue']['main']['changepassword'] = 'Cambia la password'; +$lng['menue']['main']['changelanguage'] = 'Cambia la lingua'; +$lng['menue']['email']['email'] = 'Email'; +$lng['menue']['email']['emails'] = 'Indirizzi'; +$lng['menue']['email']['webmail'] = 'WebMail'; +$lng['menue']['mysql']['mysql'] = 'MySQL'; +$lng['menue']['mysql']['databases'] = 'Database'; +$lng['menue']['mysql']['phpmyadmin'] = 'phpMyAdmin'; +$lng['menue']['domains']['domains'] = 'Domini'; +$lng['menue']['domains']['settings'] = 'Opzioni'; +$lng['menue']['ftp']['ftp'] = 'FTP'; +$lng['menue']['ftp']['accounts'] = 'Account'; +$lng['menue']['ftp']['webftp'] = 'WebFTP'; +$lng['menue']['extras']['extras'] = 'Extra'; +$lng['menue']['extras']['directoryprotection'] = 'Cartelle Protette'; +$lng['menue']['extras']['pathoptions'] = 'Opzioni Cartelle'; + +/** + * Index + */ + +$lng['index']['customerdetails'] = 'Dettagli Cliente'; +$lng['index']['accountdetails'] = 'Dettagli Account'; + +/** + * Change Password + */ + +$lng['changepassword']['old_password'] = 'Vecchia password'; +$lng['changepassword']['new_password'] = 'Nuova password'; +$lng['changepassword']['new_password_confirm'] = 'Nuova password (verifica)'; +$lng['changepassword']['new_password_ifnotempty'] = 'Nuova password (vuota = non cambia)'; +$lng['changepassword']['also_change_ftp'] = ' cambia la password dell\'account FTP principale?'; + +/** + * Domains + */ + +$lng['domains']['description'] = 'Qui puoi creare (sotto)domini e cambiare il loro percorso.
    Il sistema, dopo ogni cambiamento, necessita di un po\' di tempo per applicare le nuove impostazioni.'; +$lng['domains']['domainsettings'] = 'Opzioni del dominio'; +$lng['domains']['domainname'] = 'Nome del dominio'; +$lng['domains']['subdomain_add'] = 'Crea sottodominio'; +$lng['domains']['subdomain_edit'] = 'Modifica il (sotto)dominio'; +$lng['domains']['wildcarddomain'] = 'Crea una wildcarddomain?'; +$lng['domains']['aliasdomain'] = 'Alias per questo dominio'; +$lng['domains']['noaliasdomain'] = 'Nessun alias per il dominio'; + +/** + * eMails + */ + +$lng['emails']['description'] = 'Qui puoi creare e cambiare i tuoi indirizzi Email.
    Un account č come la bucalettere davanti a casa tua. Se qualcuno ti manda un\'Email, essa sarŕ recapitata all\'interno del tuo account.

    Per scaricare le tue Email usa le seguenti impostazioni nel tuo programma di posta elettronica: (I dati scritti in corsivo vanno cambiati con i tuoi!)
    Hostname: Nome del dominio
    Username: Nome dell\'account / Indirizzo Email
    Password: La password scelta'; +$lng['emails']['emailaddress'] = 'Indirizzo Email'; +$lng['emails']['emails_add'] = 'Crea indirizzo Email'; +$lng['emails']['emails_edit'] = 'Modifica indirizzo Email'; +$lng['emails']['catchall'] = 'Catch-all'; +$lng['emails']['iscatchall'] = 'Definisci come indirizzo catch-all?'; +$lng['emails']['account'] = 'Account'; +$lng['emails']['account_add'] = 'Crea account'; +$lng['emails']['account_delete'] = 'Cancella account'; +$lng['emails']['from'] = 'Da'; +$lng['emails']['to'] = 'Per'; +$lng['emails']['forwarders'] = 'Reindirizzamenti'; +$lng['emails']['forwarder_add'] = 'Crea reindirizzamento'; + +/** + * FTP + */ + +$lng['ftp']['description'] = 'Qui puoi creare e modificare i tuoi account FTP.
    I cambiamenti sono effettuati in tempo reale e gli account si possono usare immediatamente.'; +$lng['ftp']['account_add'] = 'Crea account'; + +/** + * MySQL + */ + +$lng['mysql']['description'] = 'Qui puoi creare e modificare i tuoi database MySQL.
    I cambiamenti sono effettuati in tempo reale e i databases si possono usare immediatamente.
    Nel menů di sinistra trovi il tool phpMyAdmin con il quale potrai comodamente amministrare i tuoi databases attraverso il tuo web-browser.

    Per utilizzare i database nei vostri script PHP, utilizzate le seguenti impostazioni: (I dati scritti in corsivo vanno cambiati con i tuoi!)
    Hostname:
    Username: L\'username scelto
    Password: La password scelta per quell\'username
    Database: Nome del database'; +$lng['mysql']['databasename'] = 'Nome database'; +$lng['mysql']['databasedescription'] = 'Descrizione database'; +$lng['mysql']['database_create'] = 'Crea database'; + +/** + * Extras + */ + +$lng['extras']['description'] = 'Qui puoi aggiungere alcune opzioni extra, per esempio impostare delle cartelle protette.
    Il sistema, dopo ogni cambiamento, necessita di un po\' di tempo per applicare le nuove impostazioni.'; +$lng['extras']['directoryprotection_add'] = 'Aggiungi protezione cartella'; +$lng['extras']['view_directory'] = 'Mostra protezione cartella'; +$lng['extras']['pathoptions_add'] = 'Aggiungi opzioni cartella'; +$lng['extras']['directory_browsing'] = 'Visualizza file e cartelle'; +$lng['extras']['pathoptions_edit'] = 'Modifica opzioni cartella'; +$lng['extras']['error404path'] = '404'; +$lng['extras']['error403path'] = '403'; +$lng['extras']['error500path'] = '500'; +$lng['extras']['error401path'] = '401'; +$lng['extras']['errordocument404path'] = 'URL to ErrorDocument 404'; +$lng['extras']['errordocument403path'] = 'URL to ErrorDocument 403'; +$lng['extras']['errordocument500path'] = 'URL to ErrorDocument 500'; +$lng['extras']['errordocument401path'] = 'URL to ErrorDocument 401'; + +/** + * Errors + */ + +$lng['error']['error'] = 'Errore'; +$lng['error']['directorymustexist'] = 'La cartella %s deve esistere. Per favore creala tramite il tuo client FTP.'; +$lng['error']['filemustexist'] = 'Il file %s deve esistere.'; +$lng['error']['allresourcesused'] = 'Hai giŕ usato tutte le tue risorse.'; +$lng['error']['domains_cantdeletemaindomain'] = 'Non puoi cancellare un dominio usato come dominio Email.'; +$lng['error']['domains_canteditdomain'] = 'Non puoi modificare questo dominio. La funzione č stata disabilitata dall\'admin.'; +$lng['error']['domains_cantdeletedomainwithemail'] = 'Non puoi cancellare un dominio usato come dominio Email. Cancella prima tutti gli indirizzi Email che lo utilizzano.'; +$lng['error']['firstdeleteallsubdomains'] = 'Prima di creare un dominio wildcard, cancella tutti i sottodomini presenti per quel dominio.'; +$lng['error']['youhavealreadyacatchallforthisdomain'] = 'Hai giŕ definito un catchall per questo dominio.'; +$lng['error']['ftp_cantdeletemainaccount'] = 'Non puoi cancellare il tuo account FTP principale.'; +$lng['error']['login'] = 'Il nome utente o la password da te immessi sono incorretti. Per favore riprova!'; +$lng['error']['login_blocked'] = 'Questo account č stato sospeso per i troppi tentativi di login falliti.
    Riprovi tra ' . $settings['login']['deactivatetime'] . ' secondi.'; +$lng['error']['notallreqfieldsorerrors'] = 'Alcuni campi sono stati lasciati vuoti o sono stati riempiti incorrettamente.'; +$lng['error']['oldpasswordnotcorrect'] = 'La vecchia password non č corretta.'; +$lng['error']['youcantallocatemorethanyouhave'] = 'Non puoi assegnare piů risorse di quante ne possieda tu stesso.'; +$lng['error']['mustbeurl'] = 'Non hai inserito un\'indirizzo valido o completo (per es. http://qualchedominio.com/errore404.htm).'; +$lng['error']['invalidpath'] = 'Non hai scelto un\'indirizzo valido.'; +$lng['error']['stringisempty'] = 'Manca il dato nel campo.'; +$lng['error']['stringiswrong'] = 'Dato incorretto.'; +$lng['error']['myloginname'] = '\'' . $lng['login']['username'] . '\''; +$lng['error']['mypassword'] = '\'' . $lng['login']['password'] . '\''; +$lng['error']['oldpassword'] = '\'' . $lng['changepassword']['old_password'] . '\''; +$lng['error']['newpassword'] = '\'' . $lng['changepassword']['new_password'] . '\''; +$lng['error']['newpasswordconfirm'] = '\'' . $lng['changepassword']['new_password_confirm'] . '\''; +$lng['error']['newpasswordconfirmerror'] = 'La nuova password non corrisponde a quella vecchia.'; +$lng['error']['myname'] = '\'' . $lng['customer']['name'] . '\''; +$lng['error']['myfirstname'] = '\'' . $lng['customer']['firstname'] . '\''; +$lng['error']['emailadd'] = '\'' . $lng['customer']['email'] . '\''; +$lng['error']['mydomain'] = '\'Dominio\''; +$lng['error']['mydocumentroot'] = '\'Documentroot\''; +$lng['error']['loginnameexists'] = 'Il login %s esiste giŕ.'; +$lng['error']['emailiswrong'] = 'L\'indirizzo Email %s contiene caratteri invalidi o č incompleto.'; +$lng['error']['loginnameiswrong'] = 'Il login %s contiene caratteri invalidi.'; +$lng['error']['userpathcombinationdupe'] = 'La combinazione tra nome utente e percorso esiste giŕ.'; +$lng['error']['patherror'] = 'Errore! Il percorso non puň essere vuoto.'; +$lng['error']['errordocpathdupe'] = 'Le opzioni per la cartella %s esistono giŕ.'; +$lng['error']['adduserfirst'] = 'Per favore crea prima un utente ...'; +$lng['error']['domainalreadyexists'] = 'Il dominio %s č giŕ assegnato ad un cliente.'; +$lng['error']['nolanguageselect'] = 'Nessuna lingua selezionata.'; +$lng['error']['nosubjectcreate'] = 'Devi definire un titolo per questo template Email.'; +$lng['error']['nomailbodycreate'] = 'Devi definiro un testo per questo template Email.'; +$lng['error']['templatenotfound'] = 'Il template non č stato trovato.'; +$lng['error']['alltemplatesdefined'] = 'Non puoi definire altri template, tutte le lingue sono giŕ definite.'; +$lng['error']['wwwnotallowed'] = 'www non č ammesso come sottodominio.'; +$lng['error']['subdomainiswrong'] = 'Il sottodominio %s contiene caratteri invalidi.'; +$lng['error']['domaincantbeempty'] = 'Il nome dominio non puň essere vuoto.'; +$lng['error']['domainexistalready'] = 'Il dominio %s esiste giŕ.'; +$lng['error']['domainisaliasorothercustomer'] = 'Il dominio alias selezionato č a sua volta un dominio alias o appartiene ad un altro cliente.'; +$lng['error']['emailexistalready'] = 'L\'indirizzo Email %s esiste giŕ.'; +$lng['error']['maindomainnonexist'] = 'Il dominio principale %s non esiste.'; +$lng['error']['destinationnonexist'] = 'Per favore crea il tuo reindirizzamento nel campo \'Destinazione\'.'; +$lng['error']['destinationalreadyexistasmail'] = 'Il reindirizzamento a %s esiste giŕ come indirizzo Email attivo.'; +$lng['error']['destinationalreadyexist'] = 'Hai giŕ definito un reindirizzamento per %s .'; +$lng['error']['destinationiswrong'] = 'Il reindirizzamento %s contiene caratteri invalidi o č incompleto.'; +$lng['error']['domainname'] = $lng['domains']['domainname']; + +/** + * Questions + */ + +$lng['question']['question'] = 'Domanda di sicurezza'; +$lng['question']['admin_customer_reallydelete'] = 'Sei sicuro di voler cancellare il cliente %s? Quest\'azione non potrŕ essere annullata!'; +$lng['question']['admin_domain_reallydelete'] = 'Sei sicuro di voler cancellare il dominio %s?'; +$lng['question']['admin_domain_reallydisablesecuritysetting'] = 'Sei sicuro di voler disattivare queste opzioni di sicurezza (OpenBasedir e/o SafeMode)?'; +$lng['question']['admin_admin_reallydelete'] = 'Sei sicuro di voler cancellare l\'admin %s? Tutti i clienti e i domini saranno affidati all\'amministratore principale.'; +$lng['question']['admin_template_reallydelete'] = 'Sei sicuro di voler cancellare il template \'%s\'?'; +$lng['question']['domains_reallydelete'] = 'Sei sicuro di voler cancellare il dominio %s?'; +$lng['question']['email_reallydelete'] = 'Sei sicuro di voler cancellare l\'indirizzo Email %s?'; +$lng['question']['email_reallydelete_account'] = 'Sei sicuro di voler cancellare l\'account Email di %s?'; +$lng['question']['email_reallydelete_forwarder'] = 'Sei sicuro di voler cancellare il reindirizzamento a %s?'; +$lng['question']['extras_reallydelete'] = 'Sei sicuro di voler cancellare la protezione per la cartella %s?'; +$lng['question']['extras_reallydelete_pathoptions'] = 'Sei sicuro di voler cancellare le opzioni cartella per %s?'; +$lng['question']['ftp_reallydelete'] = 'Sei sicuro di voler cancellare l\'account FTP %s?'; +$lng['question']['mysql_reallydelete'] = 'Sei sicuro di voler cancellare il database %s? Quest\'azione non potrŕ essere annullata!'; +$lng['question']['admin_configs_reallyrebuild'] = 'Sei sicuro di voler rigenerare i file di configurazione per Apache e Bind?'; + +/** + * Mails + */ + +$lng['mails']['pop_success']['mailbody'] = 'Salve,\n\nil tuo indirizzo Email {EMAIL}\nč stato configurato con successo.\n\nQuesta č un\'Email creata automaticamente,\n per favore non rispondere!\n\nCordiali saluti, Froxlor-Team.'; +$lng['mails']['pop_success']['subject'] = 'Indirizzo Email configurato con successo'; +$lng['mails']['createcustomer']['mailbody'] = 'Salve {FIRSTNAME} {NAME},\n\nqueste sono le informazioni per il tuo account:\n\nNome Utente: {USERNAME}\nPassword: {PASSWORD}\n\nGrazie,\nFroxlor-Team.'; +$lng['mails']['createcustomer']['subject'] = 'Informazioni account'; + +/** + * Admin + */ + +$lng['admin']['overview'] = 'Visione d\'insieme'; +$lng['admin']['ressourcedetails'] = 'Risorse utilizzate'; +$lng['admin']['systemdetails'] = 'Dettagli sistema'; +$lng['admin']['froxlordetails'] = 'Dettagli Froxlor'; +$lng['admin']['installedversion'] = 'Versione installata'; +$lng['admin']['latestversion'] = 'Ultima versione disponibile'; +$lng['admin']['lookfornewversion']['clickhere'] = 'Cerca sul web'; +$lng['admin']['lookfornewversion']['error'] = 'Errore durante la lettura'; +$lng['admin']['resources'] = 'Risorse'; +$lng['admin']['customer'] = 'Cliente'; +$lng['admin']['customers'] = 'Clienti'; +$lng['admin']['customer_add'] = 'Crea cliente'; +$lng['admin']['customer_edit'] = 'Modifica cliente'; +$lng['admin']['domains'] = 'Domini'; +$lng['admin']['domain_add'] = 'Crea dominio'; +$lng['admin']['domain_edit'] = 'Modifica dominio'; +$lng['admin']['subdomainforemail'] = 'Sottodominio utilizzabile come dominio Email'; +$lng['admin']['admin'] = 'Admin'; +$lng['admin']['admins'] = 'Admin'; +$lng['admin']['admin_add'] = 'Crea admin'; +$lng['admin']['admin_edit'] = 'Modifica admin'; +$lng['admin']['customers_see_all'] = 'Puň vedere tutti i clienti?'; +$lng['admin']['domains_see_all'] = 'Puň vedere tutti i domini?'; +$lng['admin']['change_serversettings'] = 'Puň cambiare le impostazioni del server?'; +$lng['admin']['server'] = 'Server'; +$lng['admin']['serversettings'] = 'Opzioni'; +$lng['admin']['rebuildconf'] = 'Rigenera file di configurazione'; +$lng['admin']['stdsubdomain'] = 'Sottodominio standard'; +$lng['admin']['stdsubdomain_add'] = 'Crea sottodominio standard'; +$lng['admin']['deactivated'] = 'Disattiva'; +$lng['admin']['deactivated_user'] = 'Disattiva utente'; +$lng['admin']['sendpassword'] = 'Invia password'; +$lng['admin']['ownvhostsettings'] = 'Impostazioni vHost speciali'; +$lng['admin']['configfiles']['serverconfiguration'] = 'Configurazione servizi'; +$lng['admin']['configfiles']['files'] = 'File di configurazione: Per favore cambia questi file o creali
    se non esistono, con il seguente contenuto.
    NOTA: La password di MySQL non č stata rimpiazzata per ragioni di sicurezza.
    Per favore rimpiazza "MYSQL_PASSWORD" con la password MySQL dell\'utente Froxlor. Se hai dimenticato la password per MySQL
    la trovi in "lib/userdata.inc.php".'; +$lng['admin']['configfiles']['commands'] = 'Comandi: Per favore esegui i seguenti comandi in una shell.'; +$lng['admin']['configfiles']['restart'] = 'Ricarica: Per favore esegui i seguenti comandi (in ordine) in una shell per ricaricare la configurazione.'; +$lng['admin']['templates']['templates'] = 'Template'; +$lng['admin']['templates']['template_add'] = 'Aggiungi template'; +$lng['admin']['templates']['template_edit'] = 'Modifica template'; +$lng['admin']['templates']['action'] = 'Azione'; +$lng['admin']['templates']['email'] = 'Email'; +$lng['admin']['templates']['subject'] = 'Soggetto:'; +$lng['admin']['templates']['mailbody'] = 'Testo dell\'Email'; +$lng['admin']['templates']['createcustomer'] = 'Email di benvenuto per i nuovi clienti'; +$lng['admin']['templates']['pop_success'] = 'Benevenuto per ogni nuovo account Email'; +$lng['admin']['templates']['template_replace_vars'] = 'Variabili da cambiare nel template:'; +$lng['admin']['templates']['FIRSTNAME'] = 'Rimpiazzato con il nome del cliente.'; +$lng['admin']['templates']['NAME'] = 'Rimpiazzato con il cognome del cliente.'; +$lng['admin']['templates']['USERNAME'] = 'Rimpiazzato con il nome utente dell\'account.'; +$lng['admin']['templates']['PASSWORD'] = 'Rimpiazzato con la password dell\'account.'; +$lng['admin']['templates']['EMAIL'] = 'Rimapiazzato con l\'indirizzo dell\'account.'; + +/** + * Serversettings + */ + +$lng['serversettings']['session_timeout']['title'] = 'Timeout della sessione'; +$lng['serversettings']['session_timeout']['description'] = 'Quanto tempo un utente deve rimanere inattivo prima che la sessione diventi invalida (secondi)?'; +$lng['serversettings']['accountprefix']['title'] = 'Prefisso Cliente'; +$lng['serversettings']['accountprefix']['description'] = 'Che prefisso dovrebbero avere gli account dei clienti?'; +$lng['serversettings']['mysqlprefix']['title'] = 'Prefisso SQL'; +$lng['serversettings']['mysqlprefix']['description'] = 'Che prefisso dovrebbero avere i database SQL?'; +$lng['serversettings']['ftpprefix']['title'] = 'Prefisso FTP'; +$lng['serversettings']['ftpprefix']['description'] = 'Che prefisso dovrebbero avere gli account FTP?'; +$lng['serversettings']['documentroot_prefix']['title'] = 'Cartella dati web'; +$lng['serversettings']['documentroot_prefix']['description'] = 'Dove devono essere immagazzinati tutti i dati web?'; +$lng['serversettings']['logfiles_directory']['title'] = 'Cartella logfiles'; +$lng['serversettings']['logfiles_directory']['description'] = 'Dove devono essere immagazzinati tutti i log?'; +$lng['serversettings']['ipaddress']['title'] = 'Indirizzo IP'; +$lng['serversettings']['ipaddress']['description'] = 'Qual\'č l\'indirizzo IP di questo server?'; +$lng['serversettings']['hostname']['title'] = 'Hostname'; +$lng['serversettings']['hostname']['description'] = 'QUal\'č l\'hostname di questo server?'; +$lng['serversettings']['apachereload_command']['title'] = 'Comando riavvio Apache'; +$lng['serversettings']['apachereload_command']['description'] = 'Qual\'č il comando per riavviare Apache?'; +$lng['serversettings']['bindconf_directory']['title'] = 'Cartella configurazione Bind'; +$lng['serversettings']['bindconf_directory']['description'] = 'Dove sono i file di configurazione per Bind?'; +$lng['serversettings']['bindreload_command']['title'] = 'Comando riavvio Bind'; +$lng['serversettings']['bindreload_command']['description'] = 'Qual\'č il comando per riavviare Bind?'; +$lng['serversettings']['binddefaultzone']['title'] = 'Zona di default Bind'; +$lng['serversettings']['binddefaultzone']['description'] = 'Qual\'č il nome della zona di default Bind?'; +$lng['serversettings']['vmail_uid']['title'] = 'UID Email'; +$lng['serversettings']['vmail_uid']['description'] = 'Che UserID dovrebbe avere l\'utente che gestisce le Email?'; +$lng['serversettings']['vmail_gid']['title'] = 'GID Email'; +$lng['serversettings']['vmail_gid']['description'] = 'Che GroupID dovrebbe avere l\'utente che gestisce le Email?'; +$lng['serversettings']['vmail_homedir']['title'] = 'Cartella Email'; +$lng['serversettings']['vmail_homedir']['description'] = 'Dove devono essere immagazzinate tutte le Email?'; +$lng['serversettings']['adminmail']['title'] = 'Mittente'; +$lng['serversettings']['adminmail']['description'] = 'Qual\'č l\'indirizzo del mittente delle Email provenienti dal pannello?'; +$lng['serversettings']['phpmyadmin_url']['title'] = 'URL phpMyAdmin'; +$lng['serversettings']['phpmyadmin_url']['description'] = 'Qual\'č l\'URL di phpMyAdmin? (deve cominciare per http://)'; +$lng['serversettings']['webmail_url']['title'] = 'URL WebMail'; +$lng['serversettings']['webmail_url']['description'] = 'Qual\'č l\'URL della WebMail? (deve cominciare per http://)'; +$lng['serversettings']['webftp_url']['title'] = 'URL WebFTP'; +$lng['serversettings']['webftp_url']['description'] = 'Qual\'č l\'URL del WebFTP? (deve cominciare per http://)'; +$lng['serversettings']['language']['description'] = 'Qual\'č la lingua standard del tuo server?'; +$lng['serversettings']['maxloginattempts']['title'] = 'Numero massimo tentativi login'; +$lng['serversettings']['maxloginattempts']['description'] = 'Numero massimo di tentativi di login prima che l\'account sia disattivato.'; +$lng['serversettings']['deactivatetime']['title'] = 'Durata disattivamento'; +$lng['serversettings']['deactivatetime']['description'] = 'Tempo (sec.) di disattivazione dell\'account dopo troppi tentativi di login.'; +$lng['serversettings']['pathedit']['title'] = 'Modalitŕ di scelta percorsi/cartelle'; +$lng['serversettings']['pathedit']['description'] = 'Un percorso/cartella andrŕ scelto attraverso un menu a tendina o inserendolo a mano?'; + +/** + * New strings + */ + +$lng['admin']['cronlastrun'] = 'Ultimo Cronjob'; +$lng['serversettings']['paging']['title'] = 'Elementi da visualizzare per pagina'; +$lng['serversettings']['paging']['description'] = 'Quanti elementi dovrebbero essere visualizzati su una pagina? (0 = disattiva impaginazione)'; +$lng['error']['ipstillhasdomains'] = 'La combinazione IP/Porta che vuoi eliminare ha ancora dei domini assegnati, per favore riassegna questi domini ad altre combinazioni IP/Porta prima di eliminare questa.'; +$lng['error']['cantdeletedefaultip'] = 'Non puoi eliminare la combinazione IP/Porta default dei rivenditori, per favore imposta un\'altra combinazione IP/Porta come default dei rivenditori prima di eliminare questa.'; +$lng['error']['cantdeletesystemip'] = 'Non puoi eliminare l\'ultima IP di sistema, crea un\'altra combinazione IP/Porta per l\'IP di sistema o cambia l\'IP di sistema.'; +$lng['error']['myipaddress'] = '\'IP\''; +$lng['error']['myport'] = '\'Porta\''; +$lng['error']['myipdefault'] = 'Devi selezionare una combinazione IP/Porta che diventerŕ default.'; +$lng['error']['myipnotdouble'] = 'Questa combinazione IP/Porta esiste giŕ.'; +$lng['question']['admin_ip_reallydelete'] = 'Vuoi veramente eliminare l\'indirizzo IP %s?'; +$lng['admin']['ipsandports']['ipsandports'] = 'IP e Porte'; +$lng['admin']['ipsandports']['add'] = 'Aggiungi IP/Porta'; +$lng['admin']['ipsandports']['edit'] = 'Modifica IP/Porta'; +$lng['admin']['ipsandports']['ipandport'] = 'IP/Porta'; +$lng['admin']['ipsandports']['ip'] = 'IP'; +$lng['admin']['ipsandports']['port'] = 'Porta'; +$lng['error']['cantchangesystemip'] = 'Non puoi cambiare l\'ultima IP di sistema, crea un\'altra combinazione IP/Porta per l\'IP di sistema o cambia l\'IP di sistema.'; +$lng['question']['admin_domain_reallydocrootoutofcustomerroot'] = 'Sei sicuro di volere la cartella base dei dati web di questo dominio al di fuori della cartella base del cliente?'; +$lng['admin']['memorylimitdisabled'] = 'Disabilitato'; +$lng['error']['loginnameissystemaccount'] = 'Non puoi creare account con nomi simili agli account di sistema. Per favore cambia il nome dell\'account.'; +$lng['domain']['openbasedirpath'] = 'Percorso OpenBasedir'; +$lng['domain']['docroot'] = 'Percorso del campo sopra'; +$lng['domain']['homedir'] = 'Cartella Home'; +$lng['admin']['valuemandatory'] = 'Questo valore č obbligatorio'; +$lng['admin']['valuemandatorycompany'] = 'O i campi "nome" e "cognome" O il capo "compagnia" devono essere riempiti'; +$lng['menue']['main']['username'] = 'Connesso come utente: '; +$lng['panel']['urloverridespath'] = 'URL (sovrascrive il percorso)'; +$lng['panel']['pathorurl'] = 'Percorso o URL'; +$lng['error']['sessiontimeoutiswrong'] = '"Timeout Sessione" deve essere un numero.'; +$lng['error']['maxloginattemptsiswrong'] = '"Numero Massimo Tentativi Login" deve essere un numero.'; +$lng['error']['deactivatetimiswrong'] = '"Durata Disattivamento" deve essere un numero.'; +$lng['error']['accountprefixiswrong'] = '&quopt;Prefisso Utente" incorretto.'; +$lng['error']['mysqlprefixiswrong'] = '&quopt;Prefisso SQL" incorretto.'; +$lng['error']['ftpprefixiswrong'] = '&quopt;Prefisso FTP" incorretto.'; +$lng['error']['ipiswrong'] = '"Indirizzo IP" incorretto. Č permesso solo un indirizzo IP valido.'; +$lng['error']['vmailuidiswrong'] = '"UID Email" incorretto. Č permessa solo una UID numerica.'; +$lng['error']['vmailgidiswrong'] = '"GID Email" incorretto. Č permessa solo una GID numerica.'; +$lng['error']['adminmailiswrong'] = '"Mittente" incorretto. Č permesso solo un indirizzo Email valido.'; +$lng['error']['pagingiswrong'] = 'Valore degli "Elementi da visualizzare per pagina" incorretto. Sono permessi solo numeri.'; +$lng['error']['phpmyadminiswrong'] = 'Il link a phpMyAdmin č invalido.'; +$lng['error']['webmailiswrong'] = 'Il link alla WebMail č invalido.'; +$lng['error']['webftpiswrong'] = 'Il link al WebFTP č invalido.'; +$lng['domains']['hasaliasdomains'] = 'Ha domini alias'; +$lng['serversettings']['defaultip']['title'] = 'IP/Porta default'; +$lng['serversettings']['defaultip']['description'] = 'Qual\'č la combinazione IP/Porta default?'; +$lng['domains']['statstics'] = 'Statistiche d\'utilizzo'; +$lng['panel']['ascending'] = 'ascendente'; +$lng['panel']['decending'] = 'discendente'; +$lng['panel']['search'] = 'Cerca'; +$lng['panel']['used'] = 'utilizzato'; +$lng['panel']['translator'] = 'Traduttore'; +$lng['error']['stringformaterror'] = 'Il valore per il campo "%s" non č nel formato atteso.'; + +// Translated by marone42@googlemail.com on 03/15/2007 (see https://trac.froxlor.org/ticket/126#comment:21) + +$lng['admin']['serversoftware'] = 'Serversoftware'; +$lng['admin']['phpversion'] = 'Versione PHP'; +$lng['admin']['phpmemorylimit'] = 'PHP-Memory-Limit'; +$lng['admin']['mysqlserverversion'] = 'Versione MySQL Server'; +$lng['admin']['mysqlclientversion'] = 'Version MySQL Client'; +$lng['admin']['webserverinterface'] = 'Interfaccia Webserver'; +$lng['domains']['isassigneddomain'] = 'È dominio assegnato'; +$lng['serversettings']['phpappendopenbasedir']['title'] = 'Percoso da aggiungere a OpenBasedir'; +$lng['serversettings']['phpappendopenbasedir']['description'] = 'Questi percorsi (separati da colonne) verranno aggiunti allo statement OpenBasedir in ognuno vhost-container.'; + +?> diff --git a/lng/phpmailer.lang-en.php b/lng/phpmailer.lang-en.php index 9acb468e..4543d637 100644 --- a/lng/phpmailer.lang-en.php +++ b/lng/phpmailer.lang-en.php @@ -19,4 +19,4 @@ $PHPMAILER_LANG["file_access"] = 'Could not access file: '; $PHPMAILER_LANG["file_open"] = 'File Error: Could not open file: '; $PHPMAILER_LANG["encoding"] = 'Unknown encoding: '; -?> +?> diff --git a/lng/portugues.lng.php b/lng/portugues.lng.php index 5491e74b..75c73ca0 100644 --- a/lng/portugues.lng.php +++ b/lng/portugues.lng.php @@ -1,1217 +1,1217 @@ - - * @author Thiago Goncalves de Castro - * @author Rafael Andrade - * @author Froxlor Team - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Language - * @version $Id$ - */ - -/** - * Global - */ - -$lng['translator'] = 'Ricardo Luiz Costa, Rafael Andrade, Thiago Goncalves de Castro'; -$lng['panel']['edit'] = 'Editar'; -$lng['panel']['delete'] = 'Deletar'; -$lng['panel']['create'] = 'Criar'; -$lng['panel']['save'] = 'Salvar'; -$lng['panel']['yes'] = 'Sim'; -$lng['panel']['no'] = 'Não'; -$lng['panel']['emptyfornochanges'] = 'Sair sem salvar'; -$lng['panel']['emptyfordefault'] = 'Restaurar padrão'; -$lng['panel']['path'] = 'Caminho'; -$lng['panel']['toggle'] = 'Toggle'; -$lng['panel']['next'] = 'Próximo'; -$lng['panel']['dirsmissing'] = 'Directório não disponível ou ilegível'; - -/** - * Login - */ - -$lng['login']['username'] = 'Usuário'; -$lng['login']['password'] = 'Senha'; -$lng['login']['language'] = 'Idioma'; -$lng['login']['login'] = 'Login'; -$lng['login']['logout'] = 'Sair'; -$lng['login']['profile_lng'] = 'Idioma padrão'; - -/** - * Customer - */ - -$lng['customer']['documentroot'] = 'Diretorio home'; -$lng['customer']['name'] = 'Sobrenome'; -$lng['customer']['firstname'] = 'Primeiro nome'; -$lng['customer']['company'] = 'Empresa'; -$lng['customer']['street'] = 'Endereço'; -$lng['customer']['zipcode'] = 'Cep'; -$lng['customer']['city'] = 'Cidade'; -$lng['customer']['phone'] = 'Telefone'; -$lng['customer']['fax'] = 'Fax'; -$lng['customer']['email'] = 'E-mail'; -$lng['customer']['customernumber'] = 'Cliente ID'; -$lng['customer']['diskspace'] = 'Espaço de disco (MB)'; -$lng['customer']['traffic'] = 'Tráfego (GB)'; -$lng['customer']['mysqls'] = 'Bancos de dados-MySQL'; -$lng['customer']['emails'] = 'Endereços de e-mail'; -$lng['customer']['accounts'] = 'Contas de e-mail'; -$lng['customer']['forwarders'] = 'Redirecionamentos de e-mail'; -$lng['customer']['ftps'] = 'Contas de FTP'; -$lng['customer']['subdomains'] = 'Sub-Dominio(s)'; -$lng['customer']['domains'] = 'Dominio(s)'; -$lng['customer']['unlimited'] = 'ilimitados'; - -/** - * Customermenue - */ - -$lng['menue']['main']['main'] = 'Principal'; -$lng['menue']['main']['changepassword'] = 'Trocar senha'; -$lng['menue']['main']['changelanguage'] = 'Trocar idioma'; -$lng['menue']['email']['email'] = 'e-mail'; -$lng['menue']['email']['emails'] = 'Endereços'; -$lng['menue']['email']['webmail'] = 'WebMail'; -$lng['menue']['mysql']['mysql'] = 'MySQL'; -$lng['menue']['mysql']['databases'] = 'Banco de dados'; -$lng['menue']['mysql']['phpmyadmin'] = 'phpMyAdmin'; -$lng['menue']['domains']['domains'] = 'Dominios'; -$lng['menue']['domains']['settings'] = 'Configurações'; -$lng['menue']['ftp']['ftp'] = 'FTP'; -$lng['menue']['ftp']['accounts'] = 'Contas'; -$lng['menue']['ftp']['webftp'] = 'WebFTP'; -$lng['menue']['extras']['extras'] = 'Extras'; -$lng['menue']['extras']['directoryprotection'] = 'Diretorio protegido'; -$lng['menue']['extras']['pathoptions'] = 'opções de caminhos'; - -/** - * Index - */ - -$lng['index']['customerdetails'] = 'Detalhes dos Clientes'; -$lng['index']['accountdetails'] = 'Detalhes das Contas'; - -/** - * Change Password - */ - -$lng['changepassword']['old_password'] = 'Senha atual'; -$lng['changepassword']['new_password'] = 'Nova senha'; -$lng['changepassword']['new_password_confirm'] = 'Repita a nova senha'; -$lng['changepassword']['new_password_ifnotempty'] = 'Nova senha (em branco = não alterar)'; -$lng['changepassword']['also_change_ftp'] = ' trocar tambem a senha da conta principal de FTP'; - -/** - * Domains - */ - -$lng['domains']['description'] = 'Aqui voce pode criar(sub-)dominios e alterar seu destino.
    O sistema irá levar algum tempo para aplicar as novas configurações depois de salvas.'; -$lng['domains']['domainsettings'] = 'Configurar Dominio'; -$lng['domains']['domainname'] = 'Nome do dominio'; -$lng['domains']['subdomain_add'] = 'Criar Sub-dominio'; -$lng['domains']['subdomain_edit'] = 'Editar (sub)dominio'; -$lng['domains']['wildcarddomain'] = 'Criar um wildcarddomain?'; -$lng['domains']['aliasdomain'] = 'Aliás para o dominio'; -$lng['domains']['noaliasdomain'] = 'Não dominio do aliás'; - -/** - * eMails - */ - -$lng['emails']['description'] = 'Aqui voce pode criar e alterer seus e-mails.
    Uma conta é como uma caixa de correio na frente de sua casa. Quando alguem envia para voce um e-mail, ele é colocado nesta conta.

    Para baixar seus e-mails use as seguintes configurações no seu propraga de e-mails favorito: (Os dados em italico devem ser substituidos pelo equivalente da conta que voce criou!)
    Hostname: Nome de seu dominio
    Usuário: Nome da conta / Endereço de e-mail
    Senha: a senha que voce escolheu'; -$lng['emails']['emailaddress'] = 'Endereços de e-mail'; -$lng['emails']['emails_add'] = 'Criar e-mail'; -$lng['emails']['emails_edit'] = 'Editar e-mail'; -$lng['emails']['catchall'] = 'Pega tudo'; -$lng['emails']['iscatchall'] = 'Definir como endereço pega tudo?'; -$lng['emails']['account'] = 'Conta'; -$lng['emails']['account_add'] = 'Criar conta'; -$lng['emails']['account_delete'] = 'Excluir conta'; -$lng['emails']['from'] = 'Origem'; -$lng['emails']['to'] = 'Destino'; -$lng['emails']['forwarders'] = 'Redirecionamentos'; -$lng['emails']['forwarder_add'] = 'Criar redirecionamento'; - -/** - * FTP - */ - -$lng['ftp']['description'] = 'Aqui voce pode criar e alterar suas contas de FTP.
    As alterações são instantâneas e podem ser utilizadas imediatamente depois de salvas.'; -$lng['ftp']['account_add'] = 'Criar conta'; - -/** - * MySQL - */ - -$lng['mysql']['description'] = 'Aqui voce pode criar e alterar seus bancos de dados MySQL.
    As alterações são instantâneas e podem ser utilizadas imediatamente depois de salvas.
    No menu do lado esquerdo voce pode encontrar a ferramenta phpMyAdmin e com ela facilmente administrar seus bancos de dados.

    Para usar seu banco de dados com scripts em PHP use as seguintes configurações: (Os dados em italico devem ser substituidos pelo equivalente do banco de dados que voce criou!)
    Hostname:
    Usuario: Nome do banco de dadose
    Senha: a senha que voce escolheu
    Banco de dados: Nome do banco de dados'; -$lng['mysql']['databasename'] = 'Usuario / Nome do banco de dados'; -$lng['mysql']['databasedescription'] = 'Descrição do banco de dados'; -$lng['mysql']['database_create'] = 'Criar banco de dados'; - -/** - * Extras - */ - -$lng['extras']['description'] = 'Aqui voce pode adicoionar alguns recursos extras, como por exemplo um diretório protegido.
    O sistema ira precisar de algum tempo para aplicar suas alterações depois de salvas.'; -$lng['extras']['directoryprotection_add'] = 'Adicionar diretório pretogido'; -$lng['extras']['view_directory'] = 'Mostrar conteúdo do diretório'; -$lng['extras']['pathoptions_add'] = 'Adicionar opções de caminho'; -$lng['extras']['directory_browsing'] = 'Pesquizar conteúdo de diretório'; -$lng['extras']['pathoptions_edit'] = 'Esitar opções de caminhos'; -$lng['extras']['error404path'] = '404'; -$lng['extras']['error403path'] = '403'; -$lng['extras']['error500path'] = '500'; -$lng['extras']['error401path'] = '401'; -$lng['extras']['errordocument404path'] = 'URL para página de erro 404'; -$lng['extras']['errordocument403path'] = 'URL para página de erro 403'; -$lng['extras']['errordocument500path'] = 'URL para página de erro 500'; -$lng['extras']['errordocument401path'] = 'URL para página de erro 401'; - -/** - * Errors - */ - -$lng['error']['error'] = 'Erro'; -$lng['error']['directorymustexist'] = 'O diretório %s deve existir. Por favor crie ele primeiro com seu programa de FTP.'; -$lng['error']['filemustexist'] = 'O arquivo %s deve existir.'; -$lng['error']['allresourcesused'] = 'Voce já usou todos os seus recursos.'; -$lng['error']['domains_cantdeletemaindomain'] = 'Voce não pode deletar um dominio que esta sendo usado como email-domain.'; -$lng['error']['domains_canteditdomain'] = 'Voce não pode editar este dominio. Ele foi desabilitado pelo administrador.'; -$lng['error']['domains_cantdeletedomainwithemail'] = 'Voce não pode deletar um dominio que é usado como email-domain. Delete todos as contas de e-mail primeiro.'; -$lng['error']['firstdeleteallsubdomains'] = 'Voce deve deletar todos subdominios antes de poder criar um wildcard domain.'; -$lng['error']['youhavealreadyacatchallforthisdomain'] = 'Voce já definiu uma conta pega tudo para este dominio.'; -$lng['error']['ftp_cantdeletemainaccount'] = 'Voce não pode deletar a conta principal de FTP'; -$lng['error']['login'] = 'O usuário ou senha digitados, não estão corretos. Por favor tente novamente!'; -$lng['error']['login_blocked'] = 'Esta conta está suspensa por exceder as tentativas de login permitidas.
    Por favor tente novamente em ' . $settings['login']['deactivatetime'] . ' segundos.'; -$lng['error']['notallreqfieldsorerrors'] = 'Voce não preencheu todos os campos ou preencheu algum campo incorretamente.'; -$lng['error']['oldpasswordnotcorrect'] = 'A senha antiga não confere.'; -$lng['error']['youcantallocatemorethanyouhave'] = 'Voce não pode alocar mais recursos do que voce mesmo possui.'; -$lng['error']['mustbeurl'] = 'Voce não digitou uma URL válida (ex. http://seudominio.com/erro404.htm)'; -$lng['error']['invalidpath'] = 'Optou por um URL não válido (eventuais problemas na lista do directório)'; -$lng['error']['stringisempty'] = 'Faltando informação no campo'; -$lng['error']['stringiswrong'] = 'Erro na informação do campo'; -$lng['error']['myloginname'] = '\'' . $lng['login']['username'] . '\''; -$lng['error']['mypassword'] = '\'' . $lng['login']['password'] . '\''; -$lng['error']['oldpassword'] = '\'' . $lng['changepassword']['old_password'] . '\''; -$lng['error']['newpassword'] = '\'' . $lng['changepassword']['new_password'] . '\''; -$lng['error']['newpasswordconfirm'] = '\'' . $lng['changepassword']['new_password_confirm'] . '\''; -$lng['error']['newpasswordconfirmerror'] = 'A nova senha e a confirmação não conferem'; -$lng['error']['myname'] = '\'' . $lng['customer']['name'] . '\''; -$lng['error']['myfirstname'] = '\'' . $lng['customer']['firstname'] . '\''; -$lng['error']['emailadd'] = '\'' . $lng['customer']['email'] . '\''; -$lng['error']['mydomain'] = '\'Dominio\''; -$lng['error']['mydocumentroot'] = '\'Documento principal\''; -$lng['error']['loginnameexists'] = 'Login %s já existe'; -$lng['error']['emailiswrong'] = 'E-mail %s contem caracteres inválidos ou está incompleto'; -$lng['error']['loginnameiswrong'] = 'Login %s contem caracteres inválidos'; -$lng['error']['userpathcombinationdupe'] = 'Usuario e caminho já existem'; -$lng['error']['patherror'] = 'Erro geral! o caminho năo pode ficar em branco'; -$lng['error']['errordocpathdupe'] = 'Opçăo de caminho %s já existe'; -$lng['error']['adduserfirst'] = 'Por favor crie um cliente primeiro'; -$lng['error']['domainalreadyexists'] = 'O dominio %s já está apontado para outro cliente'; -$lng['error']['nolanguageselect'] = 'Nenhum idioma selecionado.'; -$lng['error']['nosubjectcreate'] = 'Voce deve definir um nome para este e-mail template.'; -$lng['error']['nomailbodycreate'] = 'Voce deve definir o texto para este e-mail template.'; -$lng['error']['templatenotfound'] = 'Template não encontrado.'; -$lng['error']['alltemplatesdefined'] = 'Voce não pode definir mais templates, todos idiomas já suportados.'; -$lng['error']['wwwnotallowed'] = 'www não é permitido como nome de subdominio.'; -$lng['error']['subdomainiswrong'] = 'O subdominio %s contém caracteres inválidos.'; -$lng['error']['domaincantbeempty'] = 'O nome do dominio não pode estar vazio.'; -$lng['error']['domainexistalready'] = 'O dominio %s já existe.'; -$lng['error']['domainisaliasorothercustomer'] = 'O domínio-alias escolhido é ele próprio um domínio-alias ou este pertence a um outro cliente.'; -$lng['error']['emailexistalready'] = 'O E-mail %s já existe.'; -$lng['error']['maindomainnonexist'] = 'O dominio principal %s não existe.'; -$lng['error']['destinationnonexist'] = 'Por favor crie seu redirecionamento no campo \'Destino\'.'; -$lng['error']['destinationalreadyexistasmail'] = 'O redirecionamento %s já existe como uma conta de e-mail.'; -$lng['error']['destinationalreadyexist'] = 'Voce já definiu um redirecionamento para %s .'; -$lng['error']['destinationiswrong'] = 'O redirecionamento %s contem caracteres inválidos ou incompletos.'; -$lng['error']['domainname'] = $lng['domains']['domainname']; - -/** - * Questions - */ - -$lng['question']['question'] = 'Pergunta de segurança'; -$lng['question']['admin_customer_reallydelete'] = 'Voce realmente deseja deletar o cliente %s? Este comando não poderá ser cancelado!'; -$lng['question']['admin_domain_reallydelete'] = 'Voce realmente deseja deletar o dominio %s?'; -$lng['question']['admin_domain_reallydisablesecuritysetting'] = 'Voce realmente deseja desativar estas configurações de segurança (OpenBasedir e/ou SafeMode)?'; -$lng['question']['admin_admin_reallydelete'] = 'Voce realmente deseja deletar o administrador %s? Todos clientes e dominios serão realocados para o administrador principal.'; -$lng['question']['admin_template_reallydelete'] = 'Voce realmente deseja deletar o template \'%s\'?'; -$lng['question']['domains_reallydelete'] = 'Voce realmente deseja deletar o dominio %s?'; -$lng['question']['email_reallydelete'] = 'Voce realmente deseja deletar o e-mail %s?'; -$lng['question']['email_reallydelete_account'] = 'Voce realmente deseja deletar a conta de e-mail %s?'; -$lng['question']['email_reallydelete_forwarder'] = 'Voce realmente deseja deletar o redirecionamento %s?'; -$lng['question']['extras_reallydelete'] = 'Voce realmente deseja deletar a proteção do diretório %s?'; -$lng['question']['extras_reallydelete_pathoptions'] = 'Voce realmente deseja deletar o caminho %s?'; -$lng['question']['ftp_reallydelete'] = 'Voce realmente deseja deletar a conta de FTP %s?'; -$lng['question']['mysql_reallydelete'] = 'Voce realmente deseja deletar o banco de dados %s? Este comando não poderá ser cancelado!'; -$lng['question']['admin_configs_reallyrebuild'] = 'Está certo que quer deixar reconfigurar os ficheiros de configuração de Apache e Bind?'; - -/** - * Mails - */ - -$lng['mails']['pop_success']['mailbody'] = 'Olá,\n\n sua conta de e-mail {EMAIL}\n foi criada com sucesso.\n\nEsta é uma mensagem automática\neMail, por favor não responda!\n\nAtenciosamente, Equipe de desenvolvimento do Froxlor'; -$lng['mails']['pop_success']['subject'] = 'Conta de e-mail criada com sucesso!'; -$lng['mails']['createcustomer']['mailbody'] = 'Olá {FIRSTNAME} {NAME},\n\nseguem os detalhes de sua nova conta de e-mail:\n\nUsuario: {USERNAME}\nSenha: {PASSWORD}\n\nObrigado,\nEquipe de desenvolvimento do Froxlor'; -$lng['mails']['createcustomer']['subject'] = 'Informações da conta'; - -/** - * Admin - */ - -$lng['admin']['overview'] = 'Visão geral'; -$lng['admin']['ressourcedetails'] = 'Recursos usados'; -$lng['admin']['systemdetails'] = 'Detalhes do sistema'; -$lng['admin']['froxlordetails'] = 'Detalhes do Froxlor'; -$lng['admin']['installedversion'] = 'Versão instalada'; -$lng['admin']['latestversion'] = 'Ultima Versão'; -$lng['admin']['lookfornewversion']['clickhere'] = 'procurar pela internet'; -$lng['admin']['lookfornewversion']['error'] = 'Erro de leitura'; -$lng['admin']['resources'] = 'Recursos'; -$lng['admin']['customer'] = 'Cliente'; -$lng['admin']['customers'] = 'Clientes'; -$lng['admin']['customer_add'] = 'Criar cliente'; -$lng['admin']['customer_edit'] = 'Editar cliente'; -$lng['admin']['domains'] = 'Dominios'; -$lng['admin']['domain_add'] = 'Criar dominio'; -$lng['admin']['domain_edit'] = 'Editar dominio'; -$lng['admin']['subdomainforemail'] = 'Subdominio como "emaildomains"'; -$lng['admin']['admin'] = 'Administrador'; -$lng['admin']['admins'] = 'Administradores'; -$lng['admin']['admin_add'] = 'Criar administrador'; -$lng['admin']['admin_edit'] = 'Editar administrador'; -$lng['admin']['customers_see_all'] = 'Mostrar todos os clientes'; -$lng['admin']['domains_see_all'] = 'Mostrar todos os dominios'; -$lng['admin']['change_serversettings'] = 'Alterar configuraççes do servidor?'; -$lng['admin']['server'] = 'Servidor'; -$lng['admin']['serversettings'] = 'Configuraççes'; -$lng['admin']['rebuildconf'] = 'Escrever de novo os configs'; -$lng['admin']['stdsubdomain'] = 'Subdominio padrão'; -$lng['admin']['stdsubdomain_add'] = 'Criar Subdominio padrão'; -$lng['admin']['deactivated'] = 'Desativado'; -$lng['admin']['deactivated_user'] = 'Desativar usuário'; -$lng['admin']['sendpassword'] = 'Enviar senha'; -$lng['admin']['ownvhostsettings'] = 'Own vHost-Settings'; -$lng['admin']['configfiles']['serverconfiguration'] = 'Configurações'; -$lng['admin']['configfiles']['files'] = 'Configfiles: Por favor altere os seguintes arquivos ou crie eles com
    o seguinte conteúdo se ele não existir.
    Por favor observe: A senha do MySQL năo foi alterada por razões de segurança.
    Por favor substitua "MYSQL_PASSWORD" por uma sua. Se voce esqueceu a senha do MySQL
    voce pode verificar em "lib/userdata.inc.php".'; -$lng['admin']['configfiles']['commands'] = 'Commands: Por favor execute as seguintes comandos no shell.'; -$lng['admin']['configfiles']['restart'] = 'Restart: Por favor execute as seguintes comandos no shell para carregar aas novas configurações.'; -$lng['admin']['templates']['templates'] = 'Templates'; -$lng['admin']['templates']['template_add'] = 'Adicionar template'; -$lng['admin']['templates']['template_edit'] = 'Editar template'; -$lng['admin']['templates']['action'] = 'Ação'; -$lng['admin']['templates']['email'] = 'E-Mail'; -$lng['admin']['templates']['subject'] = 'Assunto'; -$lng['admin']['templates']['mailbody'] = 'Mensagem'; -$lng['admin']['templates']['createcustomer'] = 'E-mail de boas-vindas para novos clientes'; -$lng['admin']['templates']['pop_success'] = 'E-mail de boas-vindas para nova conta de e-mail'; -$lng['admin']['templates']['template_replace_vars'] = 'Variaveis para serem substituidas no template:'; -$lng['admin']['templates']['FIRSTNAME'] = 'Altere para o primeiro nome do cliente.'; -$lng['admin']['templates']['NAME'] = 'Altere para o nome do cliente.'; -$lng['admin']['templates']['USERNAME'] = 'Altere para nome da conta do cliente.'; -$lng['admin']['templates']['PASSWORD'] = 'Altere com a senha da conta do cliente.'; -$lng['admin']['templates']['EMAIL'] = 'Altere com os dados do servidor POP3/IMAP.'; - -/** - * Serversettings - */ - -$lng['serversettings']['session_timeout']['title'] = 'Tempo esgotado'; -$lng['serversettings']['session_timeout']['description'] = 'Quanto tempo o usuario deve estar inativo para ser desconectado (segundos)?'; -$lng['serversettings']['accountprefix']['title'] = 'Prefixo do cliente'; -$lng['serversettings']['accountprefix']['description'] = 'Qual o prefixo "customeraccounts" deve ter?'; -$lng['serversettings']['mysqlprefix']['title'] = 'SQL Prefixo'; -$lng['serversettings']['mysqlprefix']['description'] = 'Qual prefixo as contas mysql devem ter?'; -$lng['serversettings']['ftpprefix']['title'] = 'FTP Prefixo'; -$lng['serversettings']['ftpprefix']['description'] = 'Qual prefixo as contas de FTP devem ter?'; -$lng['serversettings']['documentroot_prefix']['title'] = 'Diretório de documentação'; -$lng['serversettings']['documentroot_prefix']['description'] = 'Aonde os documentos dever ser gravados?'; -$lng['serversettings']['logfiles_directory']['title'] = 'Diretório de LOG'; -$lng['serversettings']['logfiles_directory']['description'] = 'Aonde os arquivos de log dever ser gravados?'; -$lng['serversettings']['ipaddress']['title'] = 'Endereços de IP'; -$lng['serversettings']['ipaddress']['description'] = 'Quais os Endereços IP deste servidor?'; -$lng['serversettings']['hostname']['title'] = 'Hostname'; -$lng['serversettings']['hostname']['description'] = 'Qual o Hostname deste servidor?'; -$lng['serversettings']['apachereload_command']['title'] = 'Comando de reiniciar o Apache'; -$lng['serversettings']['apachereload_command']['description'] = 'Qual o comando para reiniciar o apache?'; -$lng['serversettings']['bindconf_directory']['title'] = 'Diretório de configuração do Bind'; -$lng['serversettings']['bindconf_directory']['description'] = 'Aonde estão os arquivos de configuração do bind?'; -$lng['serversettings']['bindreload_command']['title'] = 'Comando de reiniciar o Bind'; -$lng['serversettings']['bindreload_command']['description'] = 'Qual o comando para reiniciar o bind?'; -$lng['serversettings']['binddefaultzone']['title'] = 'Bind default zone'; -$lng['serversettings']['binddefaultzone']['description'] = 'Qual o nome da default zone?'; -$lng['serversettings']['vmail_uid']['title'] = 'Mails-Uid'; -$lng['serversettings']['vmail_uid']['description'] = 'Qual UserID os e-mails devem ter?'; -$lng['serversettings']['vmail_gid']['title'] = 'Mails-Gid'; -$lng['serversettings']['vmail_gid']['description'] = 'Qual GroupID os e-mails devem ter?'; -$lng['serversettings']['vmail_homedir']['title'] = 'Mails-Homedir'; -$lng['serversettings']['vmail_homedir']['description'] = 'Aonde os e-mails devem ser gravados?'; -$lng['serversettings']['adminmail']['title'] = 'Remetente'; -$lng['serversettings']['adminmail']['description'] = 'Qual o remetente dos e-mails enviados pelo painel?'; -$lng['serversettings']['phpmyadmin_url']['title'] = 'phpMyAdmin URL'; -$lng['serversettings']['phpmyadmin_url']['description'] = 'Qual a URL do phpMyAdmin? (deve iniciar com http://)'; -$lng['serversettings']['webmail_url']['title'] = 'WebMail URL'; -$lng['serversettings']['webmail_url']['description'] = 'Qual a URL do WebMail? (deve iniciar com http://)'; -$lng['serversettings']['webftp_url']['title'] = 'WebFTP URL'; -$lng['serversettings']['webftp_url']['description'] = 'Qual a URL do WebFTP? (deve iniciar com http://)'; -$lng['serversettings']['language']['description'] = 'Qual o idioma padrão do servidor?'; -$lng['serversettings']['maxloginattempts']['title'] = 'Tentativas maximas de Login'; -$lng['serversettings']['maxloginattempts']['description'] = 'Tentativas maximas de Login para a conta ser desativada.'; -$lng['serversettings']['deactivatetime']['title'] = 'Tempo que a conta deve permanecer desativada'; -$lng['serversettings']['deactivatetime']['description'] = 'Tempo (sec.) qua a conta permanece desativada depois de muitas tentativas de login.'; -$lng['serversettings']['pathedit']['title'] = 'File-Método de entrada'; -$lng['serversettings']['pathedit']['description'] = 'A escolha do file tem que ser feita através do Dropdown-Menu ou pode ser feita manualmente?'; - -/** - * ADDED BETWEEN 1.2.12 and 1.2.13 - */ - -$lng['admin']['cronlastrun'] = 'Ultimo Agendamento'; -$lng['serversettings']['paging']['title'] = 'Entradas por pagina'; -$lng['serversettings']['paging']['description'] = 'Quantas entradas devem ser mostradas por pagina? (0 = desabilitar paginas)'; -$lng['error']['ipstillhasdomains'] = 'O IP/Porta que voce quer deletar ainda possui dominios associados e eles, por favor altere o IP/Porta destes dominios antes de deletá-los.'; -$lng['error']['cantdeletedefaultip'] = 'Voce não pode deletar o IP/Porta padrão do revendedor, por favor defina outro IP/Porta como padrão antes deletar o IP/Porta desejado'; -$lng['error']['cantdeletesystemip'] = 'Voce não pode deletar o IP do sistema, nem criar uma nova combinação IP/Porta para o sistema ou trocar o IP do sistema.'; -$lng['error']['myipaddress'] = '\'IP\''; -$lng['error']['myport'] = '\'Porta\''; -$lng['error']['myipdefault'] = 'Voce precisa selecionar o IP/Porta que será padrão.'; -$lng['error']['myipnotdouble'] = 'Esta combinação IP/Porta já existe.'; -$lng['question']['admin_ip_reallydelete'] = 'Voce realmente deseja deletar este endereço IP?'; -$lng['admin']['ipsandports']['ipsandports'] = 'IPs e Portas'; -$lng['admin']['ipsandports']['add'] = 'Adicionar IP/Porta'; -$lng['admin']['ipsandports']['edit'] = 'Editar IP/Porta'; -$lng['admin']['ipsandports']['ipandport'] = 'IP/Porta'; -$lng['admin']['ipsandports']['ip'] = 'IP'; -$lng['admin']['ipsandports']['port'] = 'Porta'; -$lng['error']['cantchangesystemip'] = 'Você não pode mudar o último sistema IP, para criar uma outra combinação nova de IP/Port para o sistema IP ou para mudar o sistema IP'; -$lng['question']['admin_domain_reallydocrootoutofcustomerroot'] = 'É você certo, você quer a raiz do original para este domínio, não estando dentro do customerroot do cliente?'; -$lng['error']['loginnameissystemaccount'] = 'Você não pode criar os clientes que são similares aos systemaccounts. Incorpore por favor um outro accountname.'; -$lng['domain']['docroot'] = 'trajeto da linha acima de'; -$lng['domain']['homedir'] = 'diretório da casa'; -$lng['admin']['valuemandatory'] = 'Este valor é imperativo.'; -$lng['admin']['valuemandatorycompany'] = 'Qualquer um "nome" e "nome" o "companhia" deve ser enchido.'; -$lng['admin']['phpenabled'] = 'PHP Habilitado'; -$lng['admin']['webserver'] = 'Servidor Web'; -$lng['serversettings']['nameservers']['title'] = 'Servidores DNS'; -$lng['serversettings']['mxservers']['title'] = 'Servidores de Email'; -$lng['serversettings']['mxservers']['description'] = 'Uma lista separada por vírgulas que contém o numero de prioridade e o hostname separados por um espaço (por exemplo: \'mx.example.com 10 \'), contendo os servidores mx.'; -$lng['error']['admin_domain_emailsystemhostname'] = 'Desculpe. Você não pode usar o hostname do servidor como domínio de email'; -$lng['admin']['memorylimitdisabled'] = 'Desabilitado'; -$lng['domain']['openbasedirpath'] = 'Caminho do OpenBaseDir'; -$lng['menue']['main']['username'] = 'Logado como'; -$lng['panel']['urloverridespath'] = 'URL (Caminho Completo)'; -$lng['panel']['pathorurl'] = 'Caminho ou URL'; -$lng['error']['sessiontimeoutiswrong'] = 'Apenas numeros "Timeout da sessão" permitido.'; -$lng['error']['maxloginattemptsiswrong'] = 'Apenas numero "Tentativa maxima de Login" permitido.'; -$lng['error']['deactivatetimiswrong'] = 'Apenas numero "Desativar Tempo" permitido.'; -$lng['error']['accountprefixiswrong'] = 'O "Prefixo" está errado.'; -$lng['error']['mysqlprefixiswrong'] = 'O "Prefixo SQL" está errado.'; -$lng['error']['ftpprefixiswrong'] = 'O "Prefixo FTP" está errado.'; -$lng['error']['ipiswrong'] = 'O "Endereço-IP" está errado. Apenas um Endereço-IP válido é permitido.'; -$lng['error']['vmailuidiswrong'] = 'O "UID do E-mail" Está errado. Só é permitido um número de ID.'; -$lng['error']['vmailgidiswrong'] = 'O "GID do E-mail" Está errado. Só é permitido um número de ID.'; -$lng['error']['adminmailiswrong'] = 'O "Endereço de Envio" está errado. Apenas um endereço de e-mail válido é permitido.'; -$lng['error']['pagingiswrong'] = 'O "Entradas por páginas"-value está errado. Somente caracteres númericos são permitidos.'; -$lng['error']['phpmyadminiswrong'] = 'O caminho para o phpMyAmin não é válido'; -$lng['error']['webmailiswrong'] = 'O caminho para o Webmail não é válido'; -$lng['error']['webftpiswrong'] = 'O caminho para o WebFTP não é válido'; -$lng['domains']['hasaliasdomains'] = 'Possui alinhas de domínio(s)'; -$lng['serversettings']['defaultip']['title'] = 'IP/Porta Padrão'; -$lng['serversettings']['defaultip']['description'] = 'Qual é a IP/Porta Padrão?'; -$lng['domains']['statstics'] = 'Estatísticas de Uso'; -$lng['panel']['ascending'] = 'Crescente'; -$lng['panel']['decending'] = 'Decrescente'; -$lng['panel']['search'] = 'Procurar'; -$lng['panel']['used'] = 'Usado'; -$lng['panel']['translator'] = 'Tradutor'; -$lng['error']['stringformaterror'] = 'O valor par ao campo "%s" não esta no formato correto.'; -$lng['admin']['serversoftware'] = 'Servidor de Software'; -$lng['admin']['phpversion'] = 'Versão do PHP'; -$lng['admin']['phpmemorylimit'] = 'Memória Limite do PHP'; -$lng['admin']['mysqlserverversion'] = 'Versão do MySQL Server'; -$lng['admin']['mysqlclientversion'] = 'Versão do MySQL Client'; -$lng['admin']['webserverinterface'] = 'Interface do Servidor Web'; -$lng['domains']['isassigneddomain'] = 'É um domínio assinado'; -$lng['serversettings']['phpappendopenbasedir']['title'] = 'Caminho para adicionar OpenBasedir'; -$lng['serversettings']['phpappendopenbasedir']['description'] = 'Estes caminhos (separados por dois pontos) serão acrescentados ao OpenBasedir em cada vhost.'; -$lng['error']['youcantdeleteyourself'] = 'Você não pode apagar você mesmo por motivos de segurança'; -$lng['error']['youcanteditallfieldsofyourself'] = 'Nota: Você não pode editar todos os campos de sua própria conta por motivos de segurança'; -$lng['serversettings']['natsorting']['title'] = 'Usar classificação natural na visualização'; -$lng['serversettings']['natsorting']['description'] = 'Ordenar listas como: web1 -> web2 -> web11 ao invéz de web1 -> web11 -> web2.'; -$lng['serversettings']['deactivateddocroot']['title'] = 'Docroots desativado para usuários'; -$lng['serversettings']['deactivateddocroot']['description'] = 'Quando um usuário estiver desativado, esse caminho é usado como seu docroot. Deixe em branco para não criar um vhost a todos.'; -$lng['panel']['reset'] = 'Descartar Mudanças'; -$lng['admin']['accountsettings'] = 'Configurações de Conta'; -$lng['admin']['panelsettings'] = 'Painel de Controle'; -$lng['admin']['systemsettings'] = 'Configurações do Sistema'; -$lng['admin']['webserversettings'] = 'Configurações do WebServer'; -$lng['admin']['mailserversettings'] = 'Configurações do Servidor de Email'; -$lng['admin']['nameserversettings'] = 'Configurações dos Servidores de Nomes'; -$lng['admin']['updatecounters'] = 'Recalcular utilização de recursos'; -$lng['question']['admin_counters_reallyupdate'] = 'Voce deseja recalcular os recursos utilizados?'; -$lng['panel']['pathDescription'] = 'Se o diretório não existir, será criado automaticamente'; -$lng['mails']['trafficninetypercent']['mailbody'] = 'Querido {NAME},\n\nVocê usou {TRAFFICUSED} MB do seu disponível {TRAFFIC} MB de tráfego.\nisto é mais que 90%.\n\nHonestamente, Equipe Froxlor'; -$lng['mails']['trafficninetypercent']['subject'] = 'Atingindo o seu limite de tráfego'; -$lng['admin']['templates']['trafficninetypercent'] = 'Email de notificação para clientes quando atingirem 90% do uso do tráfego'; -$lng['admin']['templates']['TRAFFIC'] = 'Substituído com o tráfego, o que foi atribuído ao cliente.'; -$lng['admin']['templates']['TRAFFICUSED'] = 'Substituído com o tráfego, que foi esgotado pela cliente.'; -$lng['admin']['subcanemaildomain']['never'] = 'Nunca'; -$lng['admin']['subcanemaildomain']['choosableno'] = 'Escolhe, default não'; -$lng['admin']['subcanemaildomain']['choosableyes'] = 'Escolher, default sim'; -$lng['admin']['subcanemaildomain']['always'] = 'Sempre'; -$lng['changepassword']['also_change_webalizer'] = 'Troca a senha das estatísticas do webalizer'; -$lng['serversettings']['mailpwcleartext']['title'] = 'Salva as senhas de usuários sempre criptografia no banco de dados'; -$lng['serversettings']['mailpwcleartext']['description'] = 'Se você selecionar sim, todas as senhas serão guardadas descriptografadas (Poderá ser lido por todos com acesso ao banco de dados ) na tabela mail_users-table. Somente ative essa opção se você realmente precise!'; -$lng['serversettings']['mailpwcleartext']['removelink'] = 'Clique aqui para limpar todas as senhas não criptografadas da tabela
    Você realmente deseja limpar todas as senhas não encriptadas a partir da tabela mail_users? Isto não pode ser revertido!'; -$lng['admin']['configfiles']['overview'] = 'Visão Geral'; -$lng['admin']['configfiles']['wizard'] = 'Assistente'; -$lng['admin']['configfiles']['distribution'] = 'Distribuição'; -$lng['admin']['configfiles']['service'] = 'Serviço'; -$lng['admin']['configfiles']['daemon'] = 'Daemon'; -$lng['admin']['configfiles']['http'] = 'Servidor Web (HTTP)'; -$lng['admin']['configfiles']['dns'] = 'Servidor de Nomes (DNS)'; -$lng['admin']['configfiles']['mail'] = 'Servidor de Emails (POP3/IMAP)'; -$lng['admin']['configfiles']['smtp'] = 'Servidor de Emails (SMTP)'; -$lng['admin']['configfiles']['ftp'] = 'Servidor FTP'; -$lng['admin']['configfiles']['etc'] = 'Outros (Sistema)'; -$lng['admin']['configfiles']['choosedistribution'] = 'Escolha uma distribuição'; -$lng['admin']['configfiles']['chooseservice'] = 'Escolha um serviço'; -$lng['admin']['configfiles']['choosedaemon'] = 'Escolha um daemon'; -$lng['admin']['trafficlastrun'] = 'Cálculo do Último Tráfego'; -$lng['serversettings']['ftpdomain']['title'] = 'Contas FTP @domínio'; -$lng['serversettings']['ftpdomain']['description'] = 'Clientes podem criar contas de FTP user@domíniodocliente?'; -$lng['panel']['back'] = 'Volta'; -$lng['serversettings']['mod_log_sql']['title'] = 'Temporariamente salva os logs no banco de dados'; -$lng['serversettings']['mod_fcgid']['title'] = 'Incluir PHP via mod_fcgid/suexec'; -$lng['serversettings']['mod_fcgid']['description'] = 'Use mod_fcgid/suexec/libnss_mysql to run PHP with the corresponding useraccount.
    This needs a special Apache configuration. All following options are only valid if the module is enabled.'; -$lng['serversettings']['sendalternativemail']['title'] = 'Utilize endereço de e-mail alternativo'; -$lng['serversettings']['sendalternativemail']['description'] = 'Enviar e-mail a senha para um endereço diferente durante uma criação de conta de e-mail'; -$lng['emails']['alternative_emailaddress'] = 'Endereço de E-mail alternativo'; -$lng['mails']['pop_success_alternative']['mailbody'] = 'Oi,\n\nSua conta de email {EMAIL}\nfoi configurada corretamente.\nSua senha é{PASSWORD}.\n\nEmail criado automaticamente\n, Por favor não responda!\n\nCumprimentos, Equipe Froxlor.'; -$lng['mails']['pop_success_alternative']['subject'] = 'Conta de email criada com sucesso'; -$lng['admin']['templates']['pop_success_alternative'] = 'Bem-vindo para novas contas e-mail enviado ao endereço alternativo'; -$lng['admin']['templates']['EMAIL_PASSWORD'] = 'Substituído a senha da conta POP3/IMAP.'; -$lng['error']['documentrootexists'] = 'O Diretório "%s" já existe para este usuario. Por favor remova-o e depois tente novamente.'; -$lng['serversettings']['apacheconf_vhost']['title'] = 'Arquivo/Diretório de configurações do Apache Vhost'; -$lng['serversettings']['apacheconf_vhost']['description'] = 'Onde as configuração de Vhost devem ser guardadas? Você pode especificar um arquivo (todos os vhosts em um arquivo) ou diretório (cada vhost com seu próprio arquivo) aqui.'; -$lng['serversettings']['apacheconf_diroptions']['title'] = 'Configuração de diretório do Apache Arquivo/Nome do Diretório.'; -$lng['serversettings']['apacheconf_diroptions']['description'] = 'Quando as opções de configuração de diretório deve ser armazenada? Você poderia especificar um arquivo (todas as opções em um arquivo) ou diretório ( cada opção no seu próprio arquivo).'; -$lng['serversettings']['apacheconf_htpasswddir']['title'] = 'Apache htpasswd dirname'; -$lng['serversettings']['apacheconf_htpasswddir']['description'] = 'Onde deve ser o diretório de arquivos htpasswd?'; -$lng['error']['formtokencompromised'] = 'O Pedido parece estar correto. Por motivos de segurança você está desconectado.'; -$lng['serversettings']['mysql_access_host']['title'] = 'Hosts de Acesso MySQL'; -$lng['serversettings']['mysql_access_host']['description'] = 'Uma lista separada por vírgulas de hosts a partir do qual os utilizadores devem ter a possibilidade de conectar-se ao MySQL-Server.'; -$lng['admin']['ipsandports']['create_listen_statement'] = 'Criar instrução de escuta'; -$lng['admin']['ipsandports']['create_namevirtualhost_statement'] = 'Criar instrução de NameVirtualHost'; -$lng['admin']['ipsandports']['create_vhostcontainer'] = 'Criar vHost-Container'; -$lng['admin']['ipsandports']['create_vhostcontainer_servername_statement'] = 'Criar instrução de ServerName no vHost-Container'; -$lng['admin']['webalizersettings'] = 'Configurações do Webalizer'; -$lng['admin']['webalizer']['normal'] = 'Normal'; -$lng['admin']['webalizer']['quiet'] = 'Quieto'; -$lng['admin']['webalizer']['veryquiet'] = 'Sem Saída'; -$lng['serversettings']['webalizer_quiet']['title'] = 'Saida do Webalizer'; -$lng['serversettings']['webalizer_quiet']['description'] = 'Modo verbose do webalizer'; -$lng['ticket']['admin_email'] = 'root@localhost'; -$lng['ticket']['noreply_email'] = 'tickets@froxlor'; -$lng['admin']['ticketsystem'] = 'Tickets de Suporte'; -$lng['menue']['ticket']['ticket'] = 'Tickets'; -$lng['menue']['ticket']['categories'] = 'Cotegorias de Suporte'; -$lng['menue']['ticket']['archive'] = 'Arquivo de Tickets'; -$lng['ticket']['description'] = 'Aqui você pode fazer perguntas ao administrador responsável'; -$lng['ticket']['ticket_new'] = 'Abrir um novo ticket'; -$lng['ticket']['ticket_reply'] = 'Responder um ticket'; -$lng['ticket']['ticket_reopen'] = 'Re-abrir um ticket'; -$lng['ticket']['ticket_newcateory'] = 'Recriar uma categoria'; -$lng['ticket']['ticket_editcateory'] = 'Editar uma categoria'; -$lng['ticket']['ticket_view'] = 'Ver Ticket'; -$lng['ticket']['ticketcount'] = 'Tickets'; -$lng['ticket']['ticket_answers'] = 'Respostas'; -$lng['ticket']['lastchange'] = 'Última troca'; -$lng['ticket']['subject'] = 'Assunto'; -$lng['ticket']['status'] = 'Status'; -$lng['ticket']['lastreplier'] = 'Último que respondeu'; -$lng['ticket']['priority'] = 'Prioridade'; -$lng['ticket']['low'] = 'Baixa'; -$lng['ticket']['normal'] = 'Normal'; -$lng['ticket']['high'] = 'Alta'; -$lng['ticket']['unf_low'] = 'Baixa'; -$lng['ticket']['unf_normal'] = 'Normal'; -$lng['ticket']['unf_high'] = 'Alta'; -$lng['ticket']['lastchange_from'] = 'De data (dd.mm.aaaa)'; -$lng['ticket']['lastchange_to'] = 'Até data (dd.mm.aaaa)'; -$lng['ticket']['category'] = 'Categoria'; -$lng['ticket']['no_cat'] = 'Nenhuma'; -$lng['ticket']['message'] = 'Mensagem'; -$lng['ticket']['show'] = 'Visualizar'; -$lng['ticket']['answer'] = 'Responder um ticket'; -$lng['ticket']['close'] = 'Fechar'; -$lng['ticket']['reopen'] = 'Re-abrir'; -$lng['ticket']['archive'] = 'Arquivo'; -$lng['ticket']['ticket_delete'] = 'Deletar Ticket'; -$lng['ticket']['lastarchived'] = 'Tickets recém arquivados'; -$lng['ticket']['archivedtime'] = 'Arquivado'; -$lng['ticket']['open'] = 'Aberto'; -$lng['ticket']['wait_reply'] = 'Esperando resposta'; -$lng['ticket']['replied'] = 'Respondido'; -$lng['ticket']['closed'] = 'Fechado'; -$lng['ticket']['staff'] = 'Equipe'; -$lng['ticket']['customer'] = 'Cliente'; -$lng['ticket']['old_tickets'] = 'Ticket de mensagens'; -$lng['ticket']['search'] = 'Procurar arquivo'; -$lng['ticket']['nocustomer'] = 'Sem escolha'; -$lng['ticket']['archivesearch'] = 'Arquivar resultados de busca'; -$lng['ticket']['noresults'] = 'Nenhum ticket encontrado'; -$lng['ticket']['notmorethanxopentickets'] = 'Devido a proteção anti-spam não se pode ter mais de %s bilhetes abertos'; -$lng['ticket']['supportstatus'] = 'Status de Suporte'; -$lng['ticket']['supportavailable'] = 'Nossos engenheiros de suporte estão disponíveis e prontos a ajudar.'; -$lng['ticket']['supportnotavailable'] = 'Nossos engenheiros de suporte não estão actualmente disponíveis'; -$lng['admin']['templates']['ticket'] = 'Emails de notificação para tickets de suporte'; -$lng['admin']['templates']['SUBJECT'] = 'Substituído por um assunto de ticket de suporte'; -$lng['admin']['templates']['new_ticket_for_customer'] = 'Informação do Cliente de que de que o Ticket foi gerado.'; -$lng['admin']['templates']['new_ticket_by_customer'] = 'Notificação do Admin para um ticket aberto por um cliente'; -$lng['admin']['templates']['new_reply_ticket_by_customer'] = 'Notificação do Admin para um ticket respondido por um cliente'; -$lng['admin']['templates']['new_ticket_by_staff'] = 'Notificação de cliente para um ticket aberto pela administração'; -$lng['admin']['templates']['new_reply_ticket_by_staff'] = 'Notificação do cliente para um ticket respondido pela administração'; -$lng['mails']['new_ticket_for_customer']['subject'] = 'Seu ticket de Suporte foi Enviado'; -$lng['mails']['new_ticket_by_customer']['subject'] = 'Novo pedido de Suporte'; -$lng['mails']['new_reply_ticket_by_customer']['mailbody'] = 'Oi admin,\n\no ticket de suporte "{SUBJECT}" foi respondido para o cliente.\n\nPor favor logue para abrir o ticket.\n\Obrigado,\nequipe Froxlor'; -$lng['mails']['new_reply_ticket_by_customer']['subject'] = 'Nova resposta para um ticket de supote'; -$lng['mails']['new_ticket_by_staff']['subject'] = 'Novo ticket enviado'; -$lng['mails']['new_reply_ticket_by_staff']['mailbody'] = 'Oi {FIRSTNAME} {NAME},\n\o ticket de suporte com o assunto "{SUBJECT}" foi respondido pelos seus administradores.\n\nPor favor logue para abrir esse ticket.\n\nObrigado,\nequipe Froxlor'; -$lng['mails']['new_reply_ticket_by_staff']['subject'] = 'Nova resposta para um ticket de supote'; -$lng['question']['ticket_reallyclose'] = 'Você deseja fechar o ticket"%s"?'; -$lng['question']['ticket_reallydelete'] = 'Você deseja apagar o ticket"%s"?'; -$lng['question']['ticket_reallydeletecat'] = 'Você deseja deletar a categoria "%s"?'; -$lng['question']['ticket_reallyarchive'] = 'Você deseja mover o ticket "%s" para o arquivo?'; -$lng['error']['mysubject'] = '\'' . $lng['ticket']['subject'] . '\''; -$lng['error']['mymessage'] = '\'' . $lng['ticket']['message'] . '\''; -$lng['error']['mycategory'] = '\'' . $lng['ticket']['category'] . '\''; -$lng['error']['nomoreticketsavailable'] = 'Você já utilizou todos seus tickets disponíveis. Por favor contacte seu administrador'; -$lng['error']['nocustomerforticket'] = 'Não pode criar Tickets sem Clientes'; -$lng['error']['categoryhastickets'] = 'A categoria ainda tem tikets na mesma.
    Por favor elimine os bilhetes para eliminar a categoria'; -$lng['error']['notmorethanxopentickets'] = $lng['ticket']['notmorethanxopentickets']; -$lng['admin']['ticketsettings'] = 'Configurações de Ticket de Suporte'; -$lng['admin']['archivelastrun'] = 'Último arquivamento de ticket'; -$lng['serversettings']['ticket']['noreply_email']['title'] = 'Não responder endereço de email'; -$lng['serversettings']['ticket']['noreply_email']['description'] = 'O endereço de envio para tickets de suporte, normalmente é no-reply@domain.com'; -$lng['serversettings']['ticket']['worktime_begin']['title'] = 'Iniciado tempo de suporte (hh:mm)'; -$lng['serversettings']['ticket']['worktime_begin']['description'] = 'Início quando o suporte estiver disponível'; -$lng['serversettings']['ticket']['worktime_end']['title'] = 'Fim do tempo de suporte (hh:mm)'; -$lng['serversettings']['ticket']['worktime_end']['description'] = 'Fim do tempo quando o suporte estiver disponível'; -$lng['serversettings']['ticket']['worktime_sat'] = 'Suporte disponível nos sábados?'; -$lng['serversettings']['ticket']['worktime_sun'] = 'Suporte disponível nos domingos?'; -$lng['serversettings']['ticket']['worktime_all']['title'] = 'Sem tempo limite para suporte'; -$lng['serversettings']['ticket']['worktime_all']['description'] = 'Se "Sim" para opção para iniciar e finalizar vai ser substituída'; -$lng['serversettings']['ticket']['archiving_days'] = 'Depois de quantoas dias tickets fechado são arquivados?'; -$lng['customer']['tickets'] = 'Tickets de Suporte'; -$lng['admin']['domain_nocustomeraddingavailable'] = 'Não adicionar um domínio corretamente. Você primeiro precisa adicionar um cliente.'; -$lng['serversettings']['ticket']['enable'] = 'Ativar tickets de sistema'; -$lng['serversettings']['ticket']['concurrentlyopen'] = 'Quantos tickes poderam ser abertos ao mesmo tempo?'; -$lng['error']['norepymailiswrong'] = 'O "Endereço (Noreply)" está errado. Somente um endereço válido é aceito.'; -$lng['error']['tadminmailiswrong'] = 'O "Endereço de admin " está errado. Somente um endereço válido é aceito.'; -$lng['ticket']['awaitingticketreply'] = 'Você tem %s tickes de suporte não respondido(s)'; -$lng['serversettings']['ticket']['noreply_name'] = 'E-mail do remetente do Ticket'; -$lng['serversettings']['mod_fcgid']['configdir']['title'] = 'Diretório de configuração'; -$lng['serversettings']['mod_fcgid']['configdir']['description'] = 'Aonde todos os arquivos de configuração do fcgid vão ser guardados? Se você não utiliza um binário compilado, está é uma situação normal, deve estar dentro de /var/www/'; -$lng['serversettings']['mod_fcgid']['tmpdir']['title'] = 'Diretório Temporário'; -$lng['serversettings']['ticket']['reset_cycle']['title'] = 'Resetar ciclo de tickers usados'; -$lng['serversettings']['ticket']['reset_cycle']['description'] = 'Resetar tickets usados por clientes'; -$lng['admin']['tickets']['daily'] = 'Diariamente'; -$lng['admin']['tickets']['weekly'] = 'Semanalmente'; -$lng['admin']['tickets']['monthly'] = 'Mensalmente'; -$lng['admin']['tickets']['yearly'] = 'Anualmente'; -$lng['error']['ticketresetcycleiswrong'] = 'O ciclo de resetes de ticket pode ser "diário", "semanal", "mensal" or "anual".'; -$lng['menue']['traffic']['traffic'] = 'Tráfego'; -$lng['menue']['traffic']['current'] = 'Mês corrente'; -$lng['traffic']['month'] = "Mês"; -$lng['traffic']['day'] = "Diariamente"; -$lng['traffic']['months'][1] = "Janeiro"; -$lng['traffic']['months'][2] = "Fevereiro"; -$lng['traffic']['months'][3] = "Março"; -$lng['traffic']['months'][4] = "Abril"; -$lng['traffic']['months'][5] = "Maio"; -$lng['traffic']['months'][6] = "Junho"; -$lng['traffic']['months'][7] = "Julho"; -$lng['traffic']['months'][8] = "Agosto"; -$lng['traffic']['months'][9] = "Setembro"; -$lng['traffic']['months'][10] = "Outubro"; -$lng['traffic']['months'][11] = "Novembro"; -$lng['traffic']['months'][12] = "Dezembro"; -$lng['traffic']['mb'] = "Tráfego (MB)"; -$lng['traffic']['distribution'] = 'FTP | HTTP | E-Mail'; -$lng['traffic']['sumhttp'] = 'Resumo Tráfego de HTTP em'; -$lng['traffic']['sumftp'] = 'Resumo Tráfego de FTP em'; -$lng['traffic']['summail'] = 'Resumo Tráfego de HTTP em'; -$lng['serversettings']['no_robots']['title'] = 'Aceitar robĂ´s de procura na index de seuFroxlor'; -$lng['admin']['loggersettings'] = 'Configurações de Logs'; -$lng['serversettings']['logger']['enable'] = 'Habilitar/Desabilitar Logs'; -$lng['serversettings']['logger']['severity'] = 'Nível de Logs'; -$lng['admin']['logger']['normal'] = 'normal'; -$lng['admin']['logger']['paranoid'] = 'paranóico'; -$lng['serversettings']['logger']['types']['title'] = 'Tipos de Log(s)'; -$lng['serversettings']['logger']['types']['description'] = 'Especificar tipos de logs separados por vírgula.
    Tipos de lógs disponíveis: syslog, file, mysql'; -$lng['serversettings']['logger']['logfile'] = 'Caminho do Arquivo de Log incluindo nome de arquivo'; -$lng['error']['logerror'] = 'Log-Erro: %s'; -$lng['serversettings']['logger']['logcron'] = 'Logar tarefas do cron'; -$lng['question']['logger_reallytruncate'] = 'Você realmente deseja dividir a tabela "%s"?'; -$lng['admin']['loggersystem'] = 'Systema-Logging'; -$lng['menue']['logger']['logger'] = 'Systema-Logging'; -$lng['logger']['date'] = 'Data'; -$lng['logger']['type'] = 'Tipo'; -$lng['logger']['action'] = 'Ação'; -$lng['logger']['user'] = 'Usuário'; -$lng['logger']['truncate'] = 'Log Vazio'; -$lng['serversettings']['ssl']['use_ssl'] = 'Usar SSL'; -$lng['serversettings']['ssl']['ssl_cert_file'] = 'Aonde estão localizados os certificados'; -$lng['serversettings']['ssl']['openssl_cnf'] = 'Padrão para criar o arquivo de certificado'; -$lng['panel']['reseller'] = 'Revenda'; -$lng['panel']['admin'] = 'Administrador'; -$lng['panel']['customer'] = 'Cliente(s)'; -$lng['error']['nomessagetosend'] = 'Você não entrou com uma mensagem'; -$lng['error']['noreceipientsgiven'] = 'Você não especificou um destinatário'; -$lng['admin']['emaildomain'] = 'Domínio de Email'; -$lng['admin']['email_only'] = 'Somente Email?'; -$lng['admin']['wwwserveralias'] = 'Adicionar um "www." ServerAlias'; -$lng['admin']['ipsandports']['enable_ssl'] = 'Esta é uma porta SSL?'; -$lng['admin']['ipsandports']['ssl_cert_file'] = 'Caminho para o certificado SSL'; -$lng['panel']['send'] = 'Enviar'; -$lng['admin']['subject'] = 'Assunto'; -$lng['admin']['receipient'] = 'Destinatário'; -$lng['admin']['message'] = 'Escrever uma mensagem'; -$lng['admin']['text'] = 'Mensagem'; -$lng['menu']['message'] = 'Mensagens'; -$lng['error']['errorsendingmail'] = 'A mensagem para "%s" falhou'; -$lng['error']['cannotreaddir'] = 'Não é possível ler o diretório "%s"'; -$lng['message']['success'] = 'Mensagens enviadas para %s destinatários com sucesso'; -$lng['message']['noreceipients'] = 'Email não enviado porque não tem destinatário no banco de dados'; -$lng['admin']['sslsettings'] = 'Configuração de SSL'; -$lng['cronjobs']['notyetrun'] = 'Ainda não está rodando'; -$lng['install']['servername_should_be_fqdn'] = 'O nome do servidor deve ser a FQDN e não um endereço de IP'; -$lng['serversettings']['default_vhostconf']['title'] = 'Configuração de Vhost padrão'; -$lng['serversettings']['default_vhostconf']['description'] = 'O conteúdo deste campo será incluído a cada novo vhost criado. Atenção: O código será checado para algum erro. Se contiver erros, o apache pode não iniciar mais'; -$lng['emails']['quota'] = 'Quota'; -$lng['emails']['noquota'] = 'Sem quota'; -$lng['emails']['updatequota'] = 'Atualizar'; -$lng['serversettings']['mail_quota']['title'] = 'Quota de Email'; -$lng['serversettings']['mail_quota']['description'] = 'Quota default para novas caixas criadas'; -$lng['serversettings']['mail_quota_enabled']['title'] = 'Usar quota para clientes'; -$lng['serversettings']['mail_quota_enabled']['description'] = 'Ative para usar cotas em caixas de email. Padrão é Não visto que requer uma configuração especial.'; -$lng['serversettings']['mail_quota_enabled']['removelink'] = 'Clique aqui para limpar todas as quotas para as contas de email.'; -$lng['question']['admin_quotas_reallywipe'] = 'Você realmente deseja limpar todas as quotas na tabela mail_users? Isto não pode ser revertido'; -$lng['error']['vmailquotawrong'] = 'A tamanho da quota deve ser entre 1 e 999'; -$lng['customer']['email_quota'] = 'E-mail Quota'; -$lng['customer']['email_imap'] = 'E-mail IMAP'; -$lng['customer']['email_pop3'] = 'E-mail POP3'; -$lng['customer']['mail_quota'] = 'Quota de Email'; -$lng['error']['invalidip'] = 'Endereço de IP Inválido: %s'; -$lng['serversettings']['decimal_places'] = 'Número de casas decimais no tráfego / espaço de paginas web'; -$lng['admin']['dkimsettings'] = 'Configurações de Chave de Domínios'; -$lng['dkim']['dkim_prefix']['title'] = 'Prefixo'; -$lng['dkim']['dkim_prefix']['description'] = 'Por favor, especifique o caminho para o os arquivos DKIM RSA, bem como para os arquivos de configuração para o plugin Milter'; -$lng['dkim']['dkim_domains']['title'] = 'Nome de arquivo de domínios'; -$lng['dkim']['dkim_domains']['description'] = 'Nome do Arquivo dos Domínios do DKIM, parâmetro especificado na configuração do dkim-Milter'; -$lng['dkim']['dkim_dkimkeys']['title'] = 'Nome de arquivo de chaves'; -$lng['dkim']['dkim_dkimkeys']['description'] = 'Nome do ArquivoDKIM KeyList do parâmetro especificado na configuração dkim-Milter'; -$lng['dkim']['dkimrestart_command']['title'] = 'Comando para reiniciar o Milter'; -$lng['dkim']['dkimrestart_command']['description'] = 'Por favor especifique um comando para reiniciar o DKIM Milter'; -$lng['admin']['caneditphpsettings'] = 'Pode alterar as configurações PHP relacionadas com o domínio?'; -$lng['admin']['allips'] = 'Todos os IPs'; -$lng['panel']['nosslipsavailable'] = 'Não existem atualmente IP SSL / Porta para este servidor.'; -$lng['ticket']['by'] = 'Por'; -$lng['dkim']['use_dkim']['title'] = 'Ativar suporte para DKIM?'; -$lng['dkim']['use_dkim']['description'] = 'Você deseja usar o sistema de chaves de domínio (DKIM) ?'; -$lng['error']['invalidmysqlhost'] = 'Endereço de servidor MySQL inválido: %s'; -$lng['error']['cannotuseawstatsandwebalizeratonetime'] = 'Você não pode ativar Webalizer e Awstats ao mesmo tempo, por favor, escolha uma delas'; -$lng['serversettings']['webalizer_enabled'] = 'Ativar estatísticas webalizer'; -$lng['serversettings']['awstats_enabled'] = 'Ativar estatísticas awstats'; -$lng['admin']['awstatssettings'] = 'Configurações Awtats'; -$lng['serversettings']['awstats_domain_file']['title'] = 'Awstats diretório de arquivos do dominio'; -$lng['serversettings']['awstats_model_file']['title'] = 'Modelo de arquivo Awstats'; -$lng['admin']['domain_dns_settings'] = 'Configurações de DNS'; -$lng['dns']['destinationip'] = 'Domínio IP'; -$lng['dns']['standardip'] = 'IP padrão do servidor'; -$lng['dns']['a_record'] = 'Gravar-A(Opcional IPV6)'; -$lng['dns']['cname_record'] = 'Gravar-CNAME'; -$lng['dns']['mxrecords'] = 'Definir entradas MX'; -$lng['dns']['standardmx'] = 'Servidor MX padrão'; -$lng['dns']['mxconfig'] = 'Registros MX personalizados'; -$lng['dns']['priority10'] = 'Prioridade 10'; -$lng['dns']['priority20'] = 'Prioridade 20'; -$lng['dns']['txtrecords'] = 'Difinir entradas TXT'; -$lng['dns']['txtexample'] = 'Exemplo (Entrada-SPF):
    v=spf1 ip4:xxx.xxx.xx.0/23 -all'; -$lng['serversettings']['selfdns']['title'] = 'Configurações DNS-Domiio personalizadas'; -$lng['serversettings']['selfdnscustomer']['title'] = 'Aceita clientes para editar configurações de DNS'; -$lng['admin']['activated'] = 'Ativado'; -$lng['admin']['statisticsettings'] = 'Configurações de Estatísticas'; -$lng['admin']['or'] = 'ou'; -$lng['serversettings']['unix_names']['title'] = 'Usar nomes compatíveis com UNIX'; -$lng['serversettings']['unix_names']['description'] = 'Aceita voce usar - and _ em nomes de usuários se Noestiver marcado'; -$lng['error']['cannotwritetologfile'] = 'Não pode abrir arquivo de log %s para escrita'; -$lng['admin']['sysload'] = 'Carga do Sistema'; -$lng['admin']['noloadavailable'] = 'Não disponível'; -$lng['admin']['nouptimeavailable'] = 'Não disponível'; -$lng['panel']['backtooverview'] = 'Voltar para Visão Geral'; -$lng['admin']['nosubject'] = '(Sem Assunto)'; -$lng['admin']['configfiles']['statistics'] = 'Estatísticas'; -$lng['login']['forgotpwd'] = 'Perdeu sua senha?'; -$lng['login']['presend'] = 'Resetar senha'; -$lng['login']['email'] = 'Endereço de E-mail'; -$lng['login']['remind'] = 'Resetar minha senha'; -$lng['login']['usernotfound'] = 'Úsuario não encontrado'; -$lng['pwdreminder']['subject'] = 'Froxlor - Reset de Senha'; -$lng['pwdreminder']['body'] = 'Oi %s,\n\nsua senha do Froxlor foi resetada!\nA nova senha é: %p\n\nObrigado,\nequipe Froxlor'; -$lng['pwdreminder']['success'] = 'Redefinição de senha com sucesso.
    Você agora deve receber um e-mail com sua nova senha.'; -$lng['serversettings']['allow_password_reset']['title'] = 'Aceita reset de senha por clientes'; -$lng['pwdreminder']['notallowed'] = 'Reset de senhas está desativado'; -$lng['serversettings']['awstats_path']['title'] = 'Caminho para pasta awstats cgi-bin'; -$lng['serversettings']['awstats_path']['description'] = 'Exemplo: /usr/share/webapps/awstats/6.1/webroot/cgi-bin/'; -$lng['serversettings']['awstats_updateall_command']['title'] = 'Caminho para "awstats_updateall.pl"'; -$lng['serversettings']['awstats_updateall_command']['description'] = 'Exemplo: /usr/bin/awstats_updateall.pl'; -$lng['customer']['title'] = 'Título'; -$lng['customer']['country'] = 'País'; -$lng['panel']['dateformat'] = 'AAAA-MM-DD'; -$lng['panel']['dateformat_function'] = 'A-m-d'; -$lng['panel']['timeformat_function'] = 'H:i:S'; -$lng['panel']['default'] = 'Padrão'; -$lng['panel']['never'] = 'Nunca'; -$lng['panel']['active'] = 'Ativo'; -$lng['panel']['please_choose'] = 'Por favor escolha'; -$lng['panel']['intervalfee_type']['y'] = 'Anos'; -$lng['panel']['intervalfee_type']['m'] = 'Meses'; -$lng['panel']['intervalfee_type']['d'] = 'Dias'; -$lng['panel']['intervalfee_type_one']['y'] = 'Ano'; -$lng['panel']['intervalfee_type_one']['m'] = 'Mes'; -$lng['panel']['intervalfee_type_one']['d'] = 'Dia'; -$lng['panel']['service_still_active'] = 'Serviço ainda ativo'; -$lng['panel']['allow_modifications'] = 'Aceita alteraçoes'; -$lng['domains']['add_date'] = 'Adicionado no Froxlor'; -$lng['domains']['registration_date'] = 'Adicionado no Registro'; -$lng['domains']['topleveldomain'] = 'Top-Level-Domain'; -$lng['admin']['accountdata'] = 'Data da Conta'; -$lng['admin']['contactdata'] = 'Data de Contato'; -$lng['admin']['servicedata'] = 'Data de Serviço'; -$lng['admin']['billingdata'] = 'Data de Faturamento'; -$lng['admin']['invoicedata'] = 'Data da Fatura'; -$lng['customer']['taxid'] = 'ID de Taxa'; -$lng['customer']['calc_tax'] = 'Calcular Taxa'; -$lng['customer']['create_contract'] = 'Criar contrato'; -$lng['customer']['contract_date'] = 'Data de contrato'; -$lng['customer']['contract_number'] = 'Descrição/Número de contrato'; -$lng['customer']['additional_service_description'] = 'Descrição adicional de serviço'; -$lng['customer']['contract_details'] = 'Detalhes do contrato'; -$lng['customer']['included_domains'] = 'Domínios Incluídos'; -$lng['customer']['additional_traffic'] = 'Tráfego Adicional'; -$lng['customer']['additional_diskspace'] = 'Espaco Web Adicional'; -$lng['customer']['term_of_payment'] = 'Termo de Pagamento (dias)'; -$lng['customer']['payment_every'] = 'Pagamento todo'; -$lng['customer']['payment_method'] = 'Método de Pagamento'; -$lng['admin']['customer_categories_once'] = 'Incluir configurações de taxas de clientes'; -$lng['admin']['customer_categories_period'] = 'Incluir intervalo de tavas de clientes'; -$lng['customer']['bankaccount_holder'] = 'Proprietário da conta'; -$lng['customer']['bankaccount_number'] = 'Número da conta'; -$lng['customer']['bankaccount_blz'] = 'Número da agência'; -$lng['customer']['bankaccount_bank'] = 'Nome do banco'; -$lng['service']['quantity'] = 'Quantidade'; -$lng['service']['interval_fee'] = 'Pausa de TAXA'; -$lng['service']['interval_length'] = 'Pausa de Tempo'; -$lng['service']['interval_payment'] = 'Pausa de Pagamento'; -$lng['service']['interval_payment_prepaid'] = 'Pré Pago'; -$lng['service']['interval_payment_postpaid'] = 'Pós Pago'; -$lng['service']['setup_fee'] = 'Configurar Taxa'; -$lng['service']['active'] = 'Ativa Serviço'; -$lng['service']['start_date'] = 'Activado desde'; -$lng['service']['end_date'] = 'Inativo desde'; -$lng['service']['lastinvoiced_date'] = 'Última fatura'; -$lng['service']['valid_from'] = 'Válido de'; -$lng['service']['valid_to'] = 'Válido para'; -$lng['invoice']['invoicenumbertemplate'] = 'H-{ano}/{número}'; -$lng['invoice']['sender'] = ''; -$lng['invoice']['invoice'] = 'Fatura'; -$lng['invoice']['cancellation'] = 'Fatura Cancelada'; -$lng['invoice']['reminder'] = 'Relembrar'; -$lng['invoice']['preview'] = 'Visualizar'; -$lng['invoice']['dateheader'] = 'Cidade, %s'; -$lng['invoice']['number'] = 'Número de fatura'; -$lng['invoice']['contract_number'] = 'Número de contrato'; -$lng['invoice']['contract_details'] = 'Detalhes de contrato'; -$lng['invoice']['contract_details_template'] = 'pacotes de hosting de acordo com o contrato de %s com %s MB espaço web, %s ' . chr(128) . ' por %s GB de espaço adicional, %s GB tráfego, %s ' . chr(128) . ' por %s GB espaço adicional; %s domínios incluidos; pagamento por intervalo %s %s.'; -$lng['invoice']['period'] = 'Período de faturamento'; -$lng['invoice']['header'][0] = 'Pos'; -$lng['invoice']['header'][1] = 'Descrição'; -$lng['invoice']['header'][2] = 'Período'; -$lng['invoice']['header'][3] = 'Net [' . chr(128) . ']'; -$lng['invoice']['header'][4] = 'Tax [' . chr(128) . ']'; -$lng['invoice']['header'][5] = '%'; -$lng['invoice']['header'][6] = 'Total [' . chr(128) . ']'; -$lng['invoice']['subtotal'] = 'Subtotal'; -$lng['invoice']['tax'] = 'Taxa (%s%%)'; -$lng['invoice']['credit_note'] = 'Nota de crédito'; -$lng['invoice']['total'] = 'Total'; -$lng['invoice']['payment_methods'][0] = 'Rechnungsbetrag zahlbar innerhalb von %s Tagen.' . "\n" . 'Da uns noch keine Lastschrift-Einzugsermächtigung von Ihnen vorliegt, bitten wir Sie die Rechnung per Überweisung auf unser Konto zu begleichen. Falls auch Sie am Lastschriftverfahren teilnehmen möchten, füllen Sie bitte das angefügte Formular aus und senden Sie es per Post an uns zurück.'; -$lng['invoice']['payment_methods'][1] = 'The invoiceamount will be charged in the next days of your account at %s, Customernumer %s, Bank Code %s via direct debit.'; -$lng['invoice']['tax_text']['line'] = 'VAT-IdNr. %s: %s' . "\n"; -$lng['invoice']['tax_text']['client'] = 'do cliente'; -$lng['invoice']['state'] = 'Estado'; -$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_INVOICED] = 'Faturado'; -$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_SENT] = 'Enviado'; -$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_PAID] = 'Pago'; -$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_CANCELLED_NO_REINVOICE] = 'Cancelado (Sem Refaturar)'; -$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_CANCELLED_REINVOICE_WITHOUT_CREDIT_NOTE] = 'Cancelado (Refaturado, sem notas de crédito)'; -$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_CANCELLED_REINVOICE_WITH_CREDIT_NOTE] = 'Cancelado (Refaturado, com notas de crédito)'; -$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_CANCELLED_REINVOICED] = 'Cancelado (Fefaturado)'; -$lng['invoice']['state_change'] = 'Último Estado Alterado'; -$lng['invoice']['change_state'] = 'Trocar estado de fatura'; -$lng['invoice']['total_fee'] = 'w/o tax'; -$lng['invoice']['total_fee_taxed'] = 'Total'; -$lng['invoice']['fix'] = 'Corrigir Fatura'; -$lng['invoice']['pdf'] = 'Criar PDF'; -$lng['invoice']['create_reminder'] = 'Criar lembrete'; -$lng['invoice']['changelog'] = 'Log de alterações'; -$lng['invoice']['deleted_line'] = 'A linha foi apagada'; -$lng['invoice']['original_value'] = 'Valor Original'; -$lng['invoice']['page_footer'] = 'Página %s de %s'; -$lng['billing']['billing'] = 'Faturamento'; -$lng['billing']['invoices'] = 'Faturas'; -$lng['billing']['invoices_admin'] = 'Faturas (Admins)'; -$lng['billing']['openinvoices'] = 'Faturas Abertas'; -$lng['billing']['openinvoices_admin'] = 'Faturas Abertas (Admins)'; -$lng['billing']['cacheinvoicefees'] = 'Atualizar lista'; -$lng['billing']['invoice'] = 'Faturas'; -$lng['billing']['invoice_date'] = 'Data de fatura'; -$lng['billing']['invoice_fee'] = 'Pagamento de fatura'; -$lng['billing']['preview'] = 'Visualizar'; -$lng['billing']['caption'] = 'Título'; -$lng['billing']['number'] = 'Número de Fatura'; -$lng['billing']['caption_setup'] = 'Título para taxa'; -$lng['billing']['caption_interval'] = 'Título para intervalo de taxa'; -$lng['billing']['template'] = 'Modelo'; -$lng['billing']['interval'] = 'Intervalo'; -$lng['billing']['other'] = 'Outros Serviços'; -$lng['billing']['other_add'] = 'Adicionar Outro Serviço'; -$lng['billing']['other_edit'] = 'Editar Outro Serviço'; -$lng['billing']['taxclassesnrates'] = 'Classes e Níveis de taxa'; -$lng['billing']['taxclass'] = 'Classe de Taxa'; -$lng['billing']['taxrate'] = 'Nivel de Taxa'; -$lng['billing']['taxrate_add'] = 'Adicionar Taxa'; -$lng['billing']['taxrate_edit'] = 'Editar Taxa'; -$lng['billing']['domains_templates'] = 'Modelos de Domínios'; -$lng['billing']['domains_templates_add'] = 'Adicionar modelo de domínio'; -$lng['billing']['domains_templates_edit'] = 'Editar modelo de domínio'; -$lng['billing']['other_templates'] = 'Outros modelos de serviços'; -$lng['billing']['other_templates_add'] = 'Adicionar outro modelo de serviço'; -$lng['billing']['other_templates_edit'] = 'Editar outro modelo de serviço'; -$lng['billing']['categories']['hosting_caption'] = 'Hospedagem'; -$lng['billing']['categories']['hosting_rowcaption_setup'] = 'Contrato de Hospedagem - Configurar Pagamento'; -$lng['billing']['categories']['hosting_rowcaption_interval'] = 'Contrato de Hospedagem'; -$lng['billing']['categories']['hosting_rowcaption_setup_withloginname'] = 'Contrato de Hospedagem ({loginname}) - Configuração de Taxa'; -$lng['billing']['categories']['hosting_rowcaption_interval_withloginname'] = 'Contrato de Hospedagem ({loginname})'; -$lng['billing']['categories']['domains_caption'] = 'Domínios'; -$lng['billing']['categories']['domains_rowcaption_setup'] = 'Domínio {domain} - Configuração de Taxa'; -$lng['billing']['categories']['domains_rowcaption_interval'] = 'Domínio {domain}'; -$lng['billing']['categories']['traffic_caption'] = 'Tráfego'; -$lng['billing']['categories']['traffic_rowcaption_setup'] = $lng['billing']['categories']['traffic_rowcaption_interval'] = 'Tráfego Usado: {traffic_total}/{traffic_included} GB'; -$lng['billing']['categories']['traffic_rowcaption_setup_unlimited'] = $lng['billing']['categories']['traffic_rowcaption_interval_unlimited'] = 'Tráfego Usado: {traffic_total}/' . $lng['customer']['unlimited'] . ' GB'; -$lng['billing']['categories']['other_caption'] = 'Outro'; -$lng['billing']['categories']['other_rowcaption_setup'] = $lng['billing']['categories']['other_rowcaption_interval'] = 'Outro'; -$lng['billing']['categories']['diskspace_caption'] = 'Espaço Web'; -$lng['billing']['categories']['diskspace_rowcaption_interval'] = 'Espaço WEB usado: {diskspace_total}/{diskspace_included} GB'; -$lng['billing']['categories']['diskspace_rowcaption_interval_unlimited'] = 'Espaço Web usado: {diskspace_total}/' . $lng['customer']['unlimited'] . ' GB'; -$lng['question']['billing_invoice_row_reallydelete'] = 'Você realmente deseja excluir este item da fatura?'; -$lng['question']['billing_invoice_row_reallyreset'] = 'Você realmente deseja cancelar todas as modificações feitas nesta fatura?'; -$lng['question']['billing_invoice_row_reallyreset_key'] = 'Você realmente deseja desfazer as alterações feitas nesta linha?'; -$lng['question']['billing_domains_template_reallydelete'] = 'Voce deseja deletar o template %s'; -$lng['question']['billing_other_template_reallydelete'] = 'Voce deseja deletar o template %s'; -$lng['question']['billing_other_service_reallydelete'] = 'Voce deseja deletar este serviço?'; -$lng['question']['billing_taxrate_reallydelete'] = 'Você realmente deseja excluir esta taxrate?'; -$lng['serversettings']['allow_password_reset']['description'] = 'Os clientes podem redefinir sua senha e serão enviadas para seu endereço de e-mail'; -$lng['serversettings']['allow_password_reset_admin']['title'] = 'Ativa reset de senhas pelos administradores'; -$lng['serversettings']['allow_password_reset_admin']['description'] = 'Admins / Revendedor pode redefinir sua senha e a nova senha será enviada para seu endereço de e-mail'; -$lng['admin']['edit_billingdata'] = 'Pode editar data de faturamento'; -$lng['error']['service_still_active'] = 'Serviço continua ativo.'; -$lng['admin']['billingsettings'] = 'Configurações de faturamento'; -$lng['serversettings']['billing']['activate_billing']['title'] = 'Ativar faturamento'; -$lng['serversettings']['billing']['activate_billing']['description'] = 'Aqui você pode ativar / desativar o sistema de faturamento a nível global.'; -$lng['serversettings']['billing']['highlight_inactive']['title'] = 'Inativos destaque de faturamentos'; -$lng['serversettings']['billing']['highlight_inactive']['description'] = 'Caso as linhas, cujo faturamento não estiver ativo, será destacada?'; -$lng['serversettings']['billing']['invoicenumber_count']['title'] = 'Numero da Fatura Atual'; -$lng['serversettings']['billing']['invoicenumber_count']['description'] = 'Este é o número fixo de faturas. Mudanças podem resultar em problemas com o contador de faturas.'; -$lng['emails']['quota_type']['byte'] = 'B'; -$lng['emails']['quota_type']['kilobyte'] = 'KB'; -$lng['emails']['quota_type']['megabyte'] = 'MB'; -$lng['emails']['quota_type']['gigabyte'] = 'GB'; -$lng['emails']['quota_type']['terabyte'] = 'TB'; -$lng['emails']['quota_type']['petabyte'] = 'PB'; -$lng['panel']['not_supported'] = 'Não suportado em:'; -$lng['menue']['email']['autoresponder'] = 'Auto-Responder'; -$lng['autoresponder']['active'] = 'Ativar'; -$lng['autoresponder']['autoresponder_add'] = 'Adicionar Auto-Responder'; -$lng['autoresponder']['autoresponder_edit'] = 'Edita Auto-Responder'; -$lng['autoresponder']['autoresponder_new'] = 'Criar novo Auto-Responder'; -$lng['autoresponder']['subject'] = 'Assunto'; -$lng['autoresponder']['message'] = 'Mensagem'; -$lng['autoresponder']['account'] = 'Aconta'; -$lng['autoresponder']['sender'] = 'Remetente'; -$lng['question']['autoresponderdelete'] = 'Você deseja apagar o auto-responder?'; -$lng['error']['noemailaccount'] = 'Pode haver duas razões pelas quais você não pode criar uma nova resposta automática: Você precisará de pelo menos um e-mail para criar um novo utilitário de resposta automática. Em segundo lugar, pode ser possível que todas as contas já tenham uma resposta automática configuradas'; -$lng['error']['missingfields'] = 'Nem todos os campos necessários estavam no campo.'; -$lng['error']['accountnotexisting'] = 'Esta conta não existe.'; -$lng['error']['autoresponderalreadyexists'] = 'Já existe um auto-responder configurado para esta conta.'; -$lng['error']['invalidautoresponder'] = 'Esta determinada está inválida.'; -$lng['serversettings']['autoresponder_active']['title'] = 'Usar módulo de auto-responder'; -$lng['serversettings']['autoresponder_active']['description'] = 'Você deseja utilizar o módulo do auto-responder? Uma tarefa extra no cron deve ser configurada.'; -$lng['invoice']['active'] = 'Fatura ativa'; -$lng['admin']['security_settings'] = 'Opções de Segurança'; -$lng['admin']['know_what_youre_doing'] = 'Somente altere, se você sabe o que está fazendo'; -$lng['admin']['show_version_login']['title'] = 'Mostrar versão do Froxlor no login'; -$lng['admin']['show_version_login']['description'] = 'Mostar a versão do Froxlor no rodapé da página de login'; -$lng['admin']['show_version_footer']['title'] = 'Mostar versão do Froxlor no rodapé'; -$lng['admin']['show_version_footer']['description'] = 'Mostar a versão do Froxlor no rodapé do resto das páginas'; -$lng['admin']['froxlor_graphic']['title'] = 'Cabeçalho gráfico do Froxlor'; -$lng['admin']['froxlor_graphic']['description'] = 'Quais gráficos devem aparece no topor'; -$lng['menue']['phpsettings']['maintitle'] = 'Configurações do PHP'; -$lng['admin']['phpsettings']['title'] = 'Configurações do PHP'; -$lng['admin']['phpsettings']['description'] = 'Descrição'; -$lng['admin']['phpsettings']['actions'] = 'Ações'; -$lng['admin']['phpsettings']['activedomains'] = 'Em uso pelo(s) domínio(s)'; -$lng['admin']['phpsettings']['notused'] = 'Configuração não está em uso'; -$lng['admin']['misc'] = 'Variados'; -$lng['admin']['phpsettings']['editsettings'] = 'Alterar Configuração do PHP'; -$lng['admin']['phpsettings']['addsettings'] = 'Criar novas configurações do PHP'; -$lng['admin']['phpsettings']['viewsettings'] = 'Visualizar Configuração do PHP'; -$lng['admin']['phpsettings']['phpinisettings'] = 'Configurações do php.ini'; -$lng['error']['nopermissionsorinvalidid'] = 'Você não tem permissões suficientes para alterar essa configuração ou um ID inválido foi dado.'; -$lng['panel']['view'] = 'Visualizar'; -$lng['question']['phpsetting_reallydelete'] = 'Você realmente deseja apagar esta configuração? Todos os domínios que atualmente utilizam esta configuração serão alterada para a configuração padrão.'; -$lng['admin']['phpsettings']['addnew'] = 'Criar novas configurações'; -$lng['error']['phpsettingidwrong'] = 'Não existe uma configuração de PHP para este ID'; -$lng['error']['descriptioninvalid'] = 'A descrição é muito curta, muito longa ou contem carácters ilegais'; -$lng['error']['info'] = 'Iinformações'; -$lng['admin']['phpconfig']['template_replace_vars'] = 'As variáveis que serão substituídas nas Configurações'; -$lng['admin']['phpconfig']['safe_mode'] = 'Vai ser substituído pelas configurações seguras deste domínios.'; -$lng['admin']['phpconfig']['pear_dir'] = 'Serão substituídos com a definição global para o diretório pear.'; -$lng['admin']['phpconfig']['open_basedir'] = 'Serão substituídos com a definição do domínio open_basedir.'; -$lng['admin']['phpconfig']['tmp_dir'] = 'Substituído com o diretório temporário do domínio.'; -$lng['admin']['phpconfig']['open_basedir_global'] = 'Serão substituídos com o valor global do caminho que será anexado ao open_basedir.'; -$lng['admin']['phpconfig']['customer_email'] = 'Serão substituídos com o endereço de e-mail do cliente que é dono desse domínio.'; -$lng['admin']['phpconfig']['admin_email'] = 'Serão substituídos por e-mail do administrador quem possui esse domínio.'; -$lng['admin']['phpconfig']['domain'] = 'Serão substituídos com o domínio.'; -$lng['admin']['phpconfig']['customer'] = 'Será substituída pelo nome do login do cliente que é dono desse domínio.'; -$lng['admin']['phpconfig']['admin'] = 'Será substituída pelo nome de login do administrador que possui esse domínio.'; -$lng['login']['backtologin'] = 'Voltar ao Login'; -$lng['serversettings']['mod_fcgid']['starter']['title'] = 'Processos por domínio'; -$lng['serversettings']['mod_fcgid']['starter']['description'] = 'Quantos processos devem ser iniciadas / permitidas por domínio? O valor 0 é recomendado. O PHP irá então gerir a quantidade de processos.'; -$lng['serversettings']['mod_fcgid']['wrapper']['title'] = 'Wrapper in Vhosts'; -$lng['serversettings']['mod_fcgid']['wrapper']['description'] = 'Como os wrapper vão ser incluídos nos vhosts'; -$lng['serversettings']['mod_fcgid']['tmpdir']['description'] = 'Aonde os arquivos temporários devem ser guardados'; -$lng['serversettings']['mod_fcgid']['peardir']['title'] = 'Diretórios globais do PEAR'; -$lng['serversettings']['mod_fcgid']['peardir']['description'] = 'Diretórios globais do PEAR que deverão ser substituídos em cada configuração php.ini? Diferentes diretórios devem ser separados por dois pontos.'; -$lng['admin']['templates']['index_html'] = 'Indice de arquivo recém-criado no diretório de cliente'; -$lng['admin']['templates']['SERVERNAME'] = 'Substitua pelo nome do servidor.'; -$lng['admin']['templates']['CUSTOMER'] = 'Substitua pelo login do cliente.'; -$lng['admin']['templates']['ADMIN'] = 'Substitua pelo login do admin.'; -$lng['admin']['templates']['CUSTOMER_EMAIL'] = 'Substitua pelo endereço de email do cliente.'; -$lng['admin']['templates']['ADMIN_EMAIL'] = 'Substitua pelo endereço de email do administrador.'; -$lng['admin']['templates']['filetemplates'] = 'Modelo de Arquivo'; -$lng['admin']['templates']['filecontent'] = 'Conteúdo do Arquivo'; -$lng['error']['filecontentnotset'] = 'O arquivo não pode ser vazio'; -$lng['serversettings']['index_file_extension']['description'] = 'Qual extensão deve ser utilizada para o índice no arquivo recém-criado no diretório do cliente? Esta extensão será utilizado, se você ou um de seus administradores criou o seu próprio índice no arquivo modelo.'; -$lng['serversettings']['index_file_extension']['title'] = 'Extensão do arquivo recém-criado no Índice do diretório do cliente.'; -$lng['error']['index_file_extension'] = 'A extensão do índice do arquivo deve ficar entre 1 e 6 caracteres. A prorrogação só pode conter caracteres como az, AZ e 0-9'; -$lng['admin']['expert_settings'] = 'Configurações Avançadas'; -$lng['admin']['mod_fcgid_starter']['title'] = 'Processos PHP para este domínio (vazio para usar valor padrão)'; -$lng['admin']['aps'] = 'APS Instalado'; -$lng['customer']['aps'] = 'Instalador do APS'; -$lng['aps']['scan'] = 'Procurar por novos pacotes'; -$lng['aps']['upload'] = 'Atualizar novos pacotes'; -$lng['aps']['managepackages'] = 'Gerenciar Pacotes'; -$lng['aps']['manageinstances'] = 'Gerenciar Estâncias'; -$lng['aps']['overview'] = 'Resumo de Pacote'; -$lng['aps']['status'] = 'Meus Pacotes'; -$lng['aps']['search'] = 'Procurar por Pacotes'; -$lng['aps']['upload_description'] = 'Por favor seleciona o instalador APS (zipfiles) para istalar no sistema'; -$lng['aps']['search_description'] = 'Nome, Descrição, Palavra Chave, Versão'; -$lng['aps']['detail'] = 'Mais informação'; -$lng['aps']['install'] = 'Pacote de Instalação'; -$lng['aps']['data'] = 'Data'; -$lng['aps']['version'] = 'Versão'; -$lng['aps']['homepage'] = 'Homepage'; -$lng['aps']['installed_size'] = 'Tamanho após instalação'; -$lng['aps']['categories'] = 'Categorias'; -$lng['aps']['languages'] = 'Línguas'; -$lng['aps']['long_description'] = 'Descrição Longa'; -$lng['aps']['configscript'] = 'Configuração de Script'; -$lng['aps']['changelog'] = 'Log de Alterações'; -$lng['aps']['license'] = 'Licença'; -$lng['aps']['license_link'] = 'Caminho para Licença'; -$lng['aps']['screenshots'] = 'Screenshots'; -$lng['aps']['back'] = 'Voltar para Visão Geral'; -$lng['aps']['install_wizard'] = 'Assistente de Instalação'; -$lng['aps']['wizard_error'] = 'Yocê preencheu com dados inválidos. Por favor corrija você mesmo para continuar a instalação'; -$lng['aps']['basic_settings'] = 'Configurações Básicas'; -$lng['aps']['application_location'] = 'Local de Instalação'; -$lng['aps']['application_location_description'] = 'Local aonde a aplicação vai ser instalada'; -$lng['aps']['no_domains'] = 'Domínios não encontrados'; -$lng['aps']['database_password'] = 'Senha de Banco de Dados'; -$lng['aps']['database_password_description'] = 'Senha que deve ser utilizada para novos bancos de dados'; -$lng['aps']['license_agreement'] = 'Contrato'; -$lng['aps']['cancel_install'] = 'Cancelar Instalação'; -$lng['aps']['notazipfile'] = 'O arquivo de upload não é um arquivo .zip'; -$lng['aps']['filetoobig'] = 'O arquivo é muito grande'; -$lng['aps']['filenotcomplete'] = 'O arquivo não foi enviado corretamente'; -$lng['aps']['phperror'] = 'Ocorreu um erro interno no PHP. O código de erro é #'; -$lng['aps']['moveproblem'] = 'O script falhou em fazer o upload dos arquivos para diretório de destino. Por favor tenha certeza de que as permissões estão setadas corretamente.'; -$lng['aps']['uploaderrors'] = 'Erros de Arquivo %s
      %s
    '; -$lng['aps']['nospecialchars'] = 'Sarácters especiais não são aceitos nos termos de pesquisa'; -$lng['aps']['noitemsfound'] = 'Nenhum pacote foi encontrado'; -$lng['aps']['nopackagesinstalled'] = 'Você não tem nenhum pacote instalado.'; -$lng['aps']['instance_install'] = 'Pendência de Instalação de Pacote'; -$lng['aps']['instance_task_active'] = 'Instalação está em execução neste momento'; -$lng['aps']['instance_success'] = 'Pacote está instalado corretamente'; -$lng['aps']['instance_error'] = 'Pacote não está instalado corretamente, erros ocorreram durante a instalação'; -$lng['aps']['instance_uninstall'] = 'Pendência de Desinstalação de Pacotes'; -$lng['aps']['unknown_status'] = 'Erro, valor desconhecido'; -$lng['aps']['currentstatus'] = 'Status Atual'; -$lng['aps']['activetasks'] = 'Status de Tarejas'; -$lng['aps']['task_install'] = 'Instalação pendente'; -$lng['aps']['task_remove'] = 'Desinstação pendente'; -$lng['aps']['task_reconfigure'] = 'Reconfiguração Pendente'; -$lng['aps']['task_upgrade'] = 'Atualizar pendência'; -$lng['aps']['no_task'] = 'Sem tarefas pendentes'; -$lng['aps']['applicationlinks'] = 'Links de Aplicações'; -$lng['aps']['mainsite'] = 'Site Principal'; -$lng['aps']['uninstall'] = 'Desinstalar Pacote'; -$lng['aps']['reconfigure'] = 'Alterar configurações'; -$lng['aps']['erroronnewinstance'] = 'Este pacote não pode ser instalado.

    Por favor volte a visualização de pacotes e comece uma nova instalação.'; -$lng['aps']['successonnewinstance'] = '%s vai ser instalado agora.

    Volte para "Meus Pacotes" e espere a instalação acabar. Isto pode demorar alguns minutos.'; -$lng['aps']['php_misc_handler'] = 'PHP - Não tem suporte para outras extensões além de .php .'; -$lng['aps']['php_misc_directoryhandler'] = 'PHP - Não tem suporte para diretórios.'; -$lng['aps']['asp_net'] = 'ASP.NET - Pacote não suportado'; -$lng['aps']['cgi'] = 'CGI - Pacote não suportado'; -$lng['aps']['php_extension'] = 'Extensão PHP "%s" missing'; -$lng['aps']['php_function'] = 'Função PHP "%s" missing'; -$lng['aps']['php_configuration'] = 'Configuração de PHP atual "%s" não suportado pelo pacote'; -$lng['aps']['php_configuration_post_max_size'] = 'Configuração do PHP - "post_max_size" valor muito baixo'; -$lng['aps']['php_configuration_memory_limit'] = 'Configuração do PHP - "memory_limit" valor muito baixo'; -$lng['aps']['php_configuration_max_execution_time'] = 'Configuração do PHP - "max_execution_time" valor muito baixo'; -$lng['aps']['php_general_old'] = 'PHP - Geral - Versão do PHP Muito Antiga'; -$lng['aps']['php_general_new'] = 'PHP - Geral - Versão do PHP Muito Nova'; -$lng['aps']['db_mysql_support'] = 'Base de Dados - Este pacote precisa outra base de dados do que MySQL'; -$lng['aps']['db_mysql_version'] = 'Base de Dados - Servidor MySQL é muito antigo'; -$lng['aps']['webserver_module'] = 'Servidor Web - Módulo "%s" não encontrado'; -$lng['aps']['misc_configscript'] = 'Misc - A linguagem de configuração do script não é suportadaützt.'; -$lng['aps']['misc_version_already_installed'] = 'A mesma versão do pacote já está instalada.'; -$lng['aps']['misc_version_already_installed'] = 'Mesma versão de pacote instalado.'; -$lng['aps']['misc_only_newer_versions'] = 'Por razões de segurança somente pacotes instalados podem ser reinstalados e atualizados.'; -$lng['aps']['erroronscan'] = 'Erros para %s
      %s
    '; -$lng['aps']['invalidzipfile'] = 'Erros para %s
    • Este não é um pacote valido de APS compactado!
    '; -$lng['aps']['successpackageupdate'] = '%s Pacote atualizado com sucesso'; -$lng['aps']['successpackageinstall'] = '%s Novo pacote instalado com sucesso'; -$lng['aps']['class_zip_missing'] = 'SimpleXML Class, funções exec ou funções ZIP podem estar perdidas ou desabilitadas! Para futuras informações sobre este problema procure no manual sobre este módulo'; -$lng['aps']['dir_permissions'] = 'O PHP/Servidor Web tem que estar apto em escrever nos diretórios /var/www/froxlor/temp/ e /var/www/froxlor/packages/'; -$lng['aps']['initerror'] = 'Foi encontrado erros neste módulo:
      %s
    Corrija o problema, ou o módulo não poderá ser usado!'; -$lng['aps']['iderror'] = 'ID incorretamente especificado'; -$lng['aps']['nopacketsforinstallation'] = 'Nenhum para para instalar'; -$lng['aps']['nopackagestoinstall'] = 'Nenhum pacote para visualizar ou instalar'; -$lng['aps']['nodomains'] = 'Seleciona um domínio da lisa. Se não tiver nenhum, o pacote não pode ser instalado'; -$lng['aps']['wrongpath'] = 'Either this path contains invalid characters or there is another application installed already.'; -$lng['aps']['dbpassword'] = 'Especifique uma senha com um mínimo de 8 carácters'; -$lng['aps']['error_text'] = 'Especifique um texto sem carácters especiais'; -$lng['aps']['error_email'] = 'Especifique um endereço de e-mail válido'; -$lng['aps']['error_domain'] = 'Especifique uma URL válida como http://www.exemplo.com/'; -$lng['aps']['error_integer'] = 'Especifique um valor númerico (Formato-Integer)'; -$lng['aps']['error_float'] = 'Especifique um valor númerico (Formato-Float)'; -$lng['aps']['error_password'] = 'Especifique uma senha'; -$lng['aps']['error_license'] = 'Yes, I have the license and will abide by its terms.'; -$lng['aps']['error_licensenoaccept'] = 'Você deve aceitar a licença de instalação desta aplicação'; -$lng['aps']['stopinstall'] = 'Cancelar Instalação'; -$lng['aps']['installstopped'] = 'A instalação deste pacote foi cancelada com sucesso'; -$lng['aps']['installstoperror'] = 'A instalação não pode ser abortada porque a instalação já foi iniciada. Se você deseja remover o pacote, primeiro esperer instalar, depois remova-o em "Meus Pacotes".'; -$lng['aps']['waitfortask'] = 'Não tem opções para selecionar. Espere o final de todas as tarefas para terminar'; -$lng['aps']['removetaskexisting'] = 'Existe uma tarefa para desinstação.

    Por favor volte para "Meus Pacotes" e espere terminar.'; -$lng['aps']['packagewillberemoved'] = 'O pacote vai ser desinstalado agora.

    Por favor volte para "Meus Pacotes" e espere terminar.'; -$lng['question']['reallywanttoremove'] = 'Você realmente deseja desinstalar este pacote?

    Todo conteúdo de banco de dados e arquivo irá ser apagado. Tenha certeza que você tem o backup para uso futuro!

    '; -$lng['aps']['searchoneresult'] = '%s pacote achado'; -$lng['aps']['searchmultiresult'] = '%s pacotes achados'; -$lng['question']['reallywanttostop'] = 'Você deseja cancelar a instalação deste pacote?'; -$lng['aps']['packagenameandversion'] = 'Nome do Pacote & Versão'; -$lng['aps']['package_locked'] = 'Destrava'; -$lng['aps']['package_enabled'] = 'Trava'; -$lng['aps']['lock'] = 'Trava'; -$lng['aps']['unlock'] = 'Destrava'; -$lng['aps']['remove'] = 'Remover'; -$lng['aps']['allpackages'] = 'Todos os pacotes'; -$lng['question']['reallyremovepackages'] = 'Do you really want to delete this packages?

    Packages with dependencies can only be remove if the corresponding Instances have been removed!

    '; -$lng['aps']['nopackagesinsystem'] = 'There were no packages installed in the system which could be managed.'; -$lng['aps']['packagenameandstatus'] = 'Nome do Pacote & Status'; -$lng['aps']['activate_aps']['title'] = 'A\'tiva instalados APS'; -$lng['aps']['activate_aps']['description'] = 'Aqui o instalador do APS pode ser ativado ou desativado globalmente'; -$lng['aps']['packages_per_page']['title'] = 'Pacotes por página'; -$lng['aps']['packages_per_page']['description'] = 'Quantos pacotes devem aparecer por página para os clientes '; -$lng['aps']['upload_fields']['title'] = 'Upload de campos por página'; -$lng['aps']['upload_fields']['description'] = 'Quantos campos devem aparecer por página para a instalação de novos pacotes no sistema?'; -$lng['aps']['exceptions']['title'] = 'Exceção para validação de pacote'; -$lng['aps']['exceptions']['description'] = 'Some packages need special configuration parameters or modules. The Installer cannot always determine if this options/extensions are available. For this reason you can now define exceptions that packages can be installed in the system. Do only select options which match your real configuration setup. For further information about this problem look into the handbook for this module.'; -$lng['aps']['settings_php_extensions'] = 'Extensões do PHP'; -$lng['aps']['settings_php_configuration'] = 'Configuração do PHP'; -$lng['aps']['settings_webserver_modules'] = 'Módulos do Webserver'; -$lng['aps']['settings_webserver_misc'] = 'Servidor Web Variados'; -$lng['aps']['specialoptions'] = 'Opções Especiais'; -$lng['aps']['removeunused'] = 'Remover pacotes não usados'; -$lng['aps']['enablenewest'] = 'Ativa nova versão de pacote, tranca outras'; -$lng['aps']['installations'] = 'Instalações'; -$lng['aps']['statistics'] = 'Estatísticas'; -$lng['aps']['numerofpackagesinstalled'] = '%s pacotes instalados'; -$lng['aps']['numerofpackagesenabled'] = '%s pacotes ativos'; -$lng['aps']['numerofpackageslocked'] = '%s Pacotes Trancados'; -$lng['aps']['numerofinstances'] = '%s Instalação de todos
    '; -$lng['question']['reallydoaction'] = 'Do you really want to execute the selected actions?

    Data which can be lost by continuing, cannot be restored later.

    '; -$lng['aps']['linktolicense'] = 'Caminho para Licença'; -$lng['aps']['initerror_customer'] = 'Existe um problema com esta extensão do Froxlor. Contate seu administrador para maiores informações.'; -$lng['aps']['numerofinstancessuccess'] = '%s instalações executadas'; -$lng['aps']['numerofinstanceserror'] = '%s instalações falhadas'; -$lng['aps']['numerofinstancesaction'] = '%s planejou instalações/desinstalações'; -$lng['aps']['downloadallpackages'] = 'Fazer download de todos os pacotes da distribuição do servidor'; -$lng['aps']['updateallpackages'] = 'Atualizar todos os pacote pela distribuição do servidor'; -$lng['aps']['downloadtaskexists'] = 'Existe downloads em andamento. Por favor espere terminar.'; -$lng['aps']['downloadtaskinserted'] = 'Uma tarefa de download de fotos os pacotes foi criada. Esta tarefa pode demorar alguns minutos.'; -$lng['aps']['updatetaskexists'] = 'Existe uma atualização em andamento. Por favor espere esta atualização terminar.'; -$lng['aps']['updatetaskinserted'] = 'Uma tarefa para a atualização de todos os pacotes foi criado. Esta tarefa pode demorar alguns minutos.'; -$lng['aps']['canmanagepackages'] = 'Pode gerenciar pacotes APS'; -$lng['aps']['numberofapspackages'] = 'Quantia de instalações APS'; -$lng['aps']['allpackagesused'] = 'Erro

    Você já atingiu o número máximo de instalação de apliçações APS'; -$lng['aps']['noinstancesexisting'] = 'Não existem estâncias para administrar.'; -$lng['error']['customerdoesntexist'] = 'O cliente que você escolheu não existe'; -$lng['error']['admindoesntexist'] = 'O administrador que você escolheu não existe'; -$lng['serversettings']['system_realtime_port']['title'] = 'Porta para Froxlor em tempo real'; -$lng['serversettings']['system_realtime_port']['description'] = 'Froxlor connects to this port at localhost everytime a new cron task is scheduled. If value is 0 (zero), this feature ist deactivated.
    See also: Make Froxlor work in realtime (Froxlor Wiki)'; -$lng['serversettings']['session_allow_multiple_login']['title'] = 'AAtiva login múltiplo'; -$lng['serversettings']['session_allow_multiple_login']['description'] = 'Se ativado um usuário pode ter múltiplos logins'; -$lng['serversettings']['panel_allow_domain_change_admin']['title'] = 'Ativa mover domínios entre admins'; -$lng['serversettings']['panel_allow_domain_change_admin']['description'] = 'If activated you can change the admin of a domain at domainsettings.
    Attention: If a customer isn\'t assigned to the same admin as the domain, the admin can see every other domain of that customer!'; -$lng['serversettings']['panel_allow_domain_change_customer']['title'] = 'Ativa mover domínios entre clientes'; -$lng['serversettings']['panel_allow_domain_change_customer']['description'] = 'Se ativado você pode trocar o cliente de um domínio para administração de outro.
    Attention: Froxlor não troca nenhum caminho. Isto pode fazer com que domínios parem de funcionar'; -$lng['domains']['associated_with_domain'] = 'Associado'; -$lng['domains']['aliasdomains'] = 'Encaminhamento de domínios'; -$lng['error']['ipportdoesntexist'] = 'A combinação de IP/Porta que você escolheu não existe'; -$lng['admin']['phpserversettings'] = 'Configuração do PHP'; -$lng['admin']['phpsettings']['binary'] = 'Binário do PHP'; -$lng['admin']['phpsettings']['file_extensions'] = 'Extensões de arquivos'; -$lng['admin']['phpsettings']['file_extensions_note'] = '(Sem pontos, separados por espaços)'; -$lng['admin']['mod_fcgid_maxrequests']['title'] = 'Máximo de requisições php para este domínio (vazio para valor default)'; -$lng['serversettings']['mod_fcgid']['maxrequests']['title'] = 'Máximo de solicitações por Domínio'; -$lng['serversettings']['mod_fcgid']['maxrequests']['description'] = 'Quantas solicitações serão aceitas por domínio?'; - -?> + + * @author Thiago Goncalves de Castro + * @author Rafael Andrade + * @author Froxlor Team + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Language + * @version $Id$ + */ + +/** + * Global + */ + +$lng['translator'] = 'Ricardo Luiz Costa, Rafael Andrade, Thiago Goncalves de Castro'; +$lng['panel']['edit'] = 'Editar'; +$lng['panel']['delete'] = 'Deletar'; +$lng['panel']['create'] = 'Criar'; +$lng['panel']['save'] = 'Salvar'; +$lng['panel']['yes'] = 'Sim'; +$lng['panel']['no'] = 'Não'; +$lng['panel']['emptyfornochanges'] = 'Sair sem salvar'; +$lng['panel']['emptyfordefault'] = 'Restaurar padrão'; +$lng['panel']['path'] = 'Caminho'; +$lng['panel']['toggle'] = 'Toggle'; +$lng['panel']['next'] = 'Próximo'; +$lng['panel']['dirsmissing'] = 'Directório não disponível ou ilegível'; + +/** + * Login + */ + +$lng['login']['username'] = 'Usuário'; +$lng['login']['password'] = 'Senha'; +$lng['login']['language'] = 'Idioma'; +$lng['login']['login'] = 'Login'; +$lng['login']['logout'] = 'Sair'; +$lng['login']['profile_lng'] = 'Idioma padrão'; + +/** + * Customer + */ + +$lng['customer']['documentroot'] = 'Diretorio home'; +$lng['customer']['name'] = 'Sobrenome'; +$lng['customer']['firstname'] = 'Primeiro nome'; +$lng['customer']['company'] = 'Empresa'; +$lng['customer']['street'] = 'Endereço'; +$lng['customer']['zipcode'] = 'Cep'; +$lng['customer']['city'] = 'Cidade'; +$lng['customer']['phone'] = 'Telefone'; +$lng['customer']['fax'] = 'Fax'; +$lng['customer']['email'] = 'E-mail'; +$lng['customer']['customernumber'] = 'Cliente ID'; +$lng['customer']['diskspace'] = 'Espaço de disco (MB)'; +$lng['customer']['traffic'] = 'Tráfego (GB)'; +$lng['customer']['mysqls'] = 'Bancos de dados-MySQL'; +$lng['customer']['emails'] = 'Endereços de e-mail'; +$lng['customer']['accounts'] = 'Contas de e-mail'; +$lng['customer']['forwarders'] = 'Redirecionamentos de e-mail'; +$lng['customer']['ftps'] = 'Contas de FTP'; +$lng['customer']['subdomains'] = 'Sub-Dominio(s)'; +$lng['customer']['domains'] = 'Dominio(s)'; +$lng['customer']['unlimited'] = 'ilimitados'; + +/** + * Customermenue + */ + +$lng['menue']['main']['main'] = 'Principal'; +$lng['menue']['main']['changepassword'] = 'Trocar senha'; +$lng['menue']['main']['changelanguage'] = 'Trocar idioma'; +$lng['menue']['email']['email'] = 'e-mail'; +$lng['menue']['email']['emails'] = 'Endereços'; +$lng['menue']['email']['webmail'] = 'WebMail'; +$lng['menue']['mysql']['mysql'] = 'MySQL'; +$lng['menue']['mysql']['databases'] = 'Banco de dados'; +$lng['menue']['mysql']['phpmyadmin'] = 'phpMyAdmin'; +$lng['menue']['domains']['domains'] = 'Dominios'; +$lng['menue']['domains']['settings'] = 'Configurações'; +$lng['menue']['ftp']['ftp'] = 'FTP'; +$lng['menue']['ftp']['accounts'] = 'Contas'; +$lng['menue']['ftp']['webftp'] = 'WebFTP'; +$lng['menue']['extras']['extras'] = 'Extras'; +$lng['menue']['extras']['directoryprotection'] = 'Diretorio protegido'; +$lng['menue']['extras']['pathoptions'] = 'opções de caminhos'; + +/** + * Index + */ + +$lng['index']['customerdetails'] = 'Detalhes dos Clientes'; +$lng['index']['accountdetails'] = 'Detalhes das Contas'; + +/** + * Change Password + */ + +$lng['changepassword']['old_password'] = 'Senha atual'; +$lng['changepassword']['new_password'] = 'Nova senha'; +$lng['changepassword']['new_password_confirm'] = 'Repita a nova senha'; +$lng['changepassword']['new_password_ifnotempty'] = 'Nova senha (em branco = não alterar)'; +$lng['changepassword']['also_change_ftp'] = ' trocar tambem a senha da conta principal de FTP'; + +/** + * Domains + */ + +$lng['domains']['description'] = 'Aqui voce pode criar(sub-)dominios e alterar seu destino.
    O sistema irá levar algum tempo para aplicar as novas configurações depois de salvas.'; +$lng['domains']['domainsettings'] = 'Configurar Dominio'; +$lng['domains']['domainname'] = 'Nome do dominio'; +$lng['domains']['subdomain_add'] = 'Criar Sub-dominio'; +$lng['domains']['subdomain_edit'] = 'Editar (sub)dominio'; +$lng['domains']['wildcarddomain'] = 'Criar um wildcarddomain?'; +$lng['domains']['aliasdomain'] = 'Aliás para o dominio'; +$lng['domains']['noaliasdomain'] = 'Não dominio do aliás'; + +/** + * eMails + */ + +$lng['emails']['description'] = 'Aqui voce pode criar e alterer seus e-mails.
    Uma conta é como uma caixa de correio na frente de sua casa. Quando alguem envia para voce um e-mail, ele é colocado nesta conta.

    Para baixar seus e-mails use as seguintes configurações no seu propraga de e-mails favorito: (Os dados em italico devem ser substituidos pelo equivalente da conta que voce criou!)
    Hostname: Nome de seu dominio
    Usuário: Nome da conta / Endereço de e-mail
    Senha: a senha que voce escolheu'; +$lng['emails']['emailaddress'] = 'Endereços de e-mail'; +$lng['emails']['emails_add'] = 'Criar e-mail'; +$lng['emails']['emails_edit'] = 'Editar e-mail'; +$lng['emails']['catchall'] = 'Pega tudo'; +$lng['emails']['iscatchall'] = 'Definir como endereço pega tudo?'; +$lng['emails']['account'] = 'Conta'; +$lng['emails']['account_add'] = 'Criar conta'; +$lng['emails']['account_delete'] = 'Excluir conta'; +$lng['emails']['from'] = 'Origem'; +$lng['emails']['to'] = 'Destino'; +$lng['emails']['forwarders'] = 'Redirecionamentos'; +$lng['emails']['forwarder_add'] = 'Criar redirecionamento'; + +/** + * FTP + */ + +$lng['ftp']['description'] = 'Aqui voce pode criar e alterar suas contas de FTP.
    As alterações são instantâneas e podem ser utilizadas imediatamente depois de salvas.'; +$lng['ftp']['account_add'] = 'Criar conta'; + +/** + * MySQL + */ + +$lng['mysql']['description'] = 'Aqui voce pode criar e alterar seus bancos de dados MySQL.
    As alterações são instantâneas e podem ser utilizadas imediatamente depois de salvas.
    No menu do lado esquerdo voce pode encontrar a ferramenta phpMyAdmin e com ela facilmente administrar seus bancos de dados.

    Para usar seu banco de dados com scripts em PHP use as seguintes configurações: (Os dados em italico devem ser substituidos pelo equivalente do banco de dados que voce criou!)
    Hostname:
    Usuario: Nome do banco de dadose
    Senha: a senha que voce escolheu
    Banco de dados: Nome do banco de dados'; +$lng['mysql']['databasename'] = 'Usuario / Nome do banco de dados'; +$lng['mysql']['databasedescription'] = 'Descrição do banco de dados'; +$lng['mysql']['database_create'] = 'Criar banco de dados'; + +/** + * Extras + */ + +$lng['extras']['description'] = 'Aqui voce pode adicoionar alguns recursos extras, como por exemplo um diretório protegido.
    O sistema ira precisar de algum tempo para aplicar suas alterações depois de salvas.'; +$lng['extras']['directoryprotection_add'] = 'Adicionar diretório pretogido'; +$lng['extras']['view_directory'] = 'Mostrar conteúdo do diretório'; +$lng['extras']['pathoptions_add'] = 'Adicionar opções de caminho'; +$lng['extras']['directory_browsing'] = 'Pesquizar conteúdo de diretório'; +$lng['extras']['pathoptions_edit'] = 'Esitar opções de caminhos'; +$lng['extras']['error404path'] = '404'; +$lng['extras']['error403path'] = '403'; +$lng['extras']['error500path'] = '500'; +$lng['extras']['error401path'] = '401'; +$lng['extras']['errordocument404path'] = 'URL para página de erro 404'; +$lng['extras']['errordocument403path'] = 'URL para página de erro 403'; +$lng['extras']['errordocument500path'] = 'URL para página de erro 500'; +$lng['extras']['errordocument401path'] = 'URL para página de erro 401'; + +/** + * Errors + */ + +$lng['error']['error'] = 'Erro'; +$lng['error']['directorymustexist'] = 'O diretório %s deve existir. Por favor crie ele primeiro com seu programa de FTP.'; +$lng['error']['filemustexist'] = 'O arquivo %s deve existir.'; +$lng['error']['allresourcesused'] = 'Voce já usou todos os seus recursos.'; +$lng['error']['domains_cantdeletemaindomain'] = 'Voce não pode deletar um dominio que esta sendo usado como email-domain.'; +$lng['error']['domains_canteditdomain'] = 'Voce não pode editar este dominio. Ele foi desabilitado pelo administrador.'; +$lng['error']['domains_cantdeletedomainwithemail'] = 'Voce não pode deletar um dominio que é usado como email-domain. Delete todos as contas de e-mail primeiro.'; +$lng['error']['firstdeleteallsubdomains'] = 'Voce deve deletar todos subdominios antes de poder criar um wildcard domain.'; +$lng['error']['youhavealreadyacatchallforthisdomain'] = 'Voce já definiu uma conta pega tudo para este dominio.'; +$lng['error']['ftp_cantdeletemainaccount'] = 'Voce não pode deletar a conta principal de FTP'; +$lng['error']['login'] = 'O usuário ou senha digitados, não estão corretos. Por favor tente novamente!'; +$lng['error']['login_blocked'] = 'Esta conta está suspensa por exceder as tentativas de login permitidas.
    Por favor tente novamente em ' . $settings['login']['deactivatetime'] . ' segundos.'; +$lng['error']['notallreqfieldsorerrors'] = 'Voce não preencheu todos os campos ou preencheu algum campo incorretamente.'; +$lng['error']['oldpasswordnotcorrect'] = 'A senha antiga não confere.'; +$lng['error']['youcantallocatemorethanyouhave'] = 'Voce não pode alocar mais recursos do que voce mesmo possui.'; +$lng['error']['mustbeurl'] = 'Voce não digitou uma URL válida (ex. http://seudominio.com/erro404.htm)'; +$lng['error']['invalidpath'] = 'Optou por um URL não válido (eventuais problemas na lista do directório)'; +$lng['error']['stringisempty'] = 'Faltando informação no campo'; +$lng['error']['stringiswrong'] = 'Erro na informação do campo'; +$lng['error']['myloginname'] = '\'' . $lng['login']['username'] . '\''; +$lng['error']['mypassword'] = '\'' . $lng['login']['password'] . '\''; +$lng['error']['oldpassword'] = '\'' . $lng['changepassword']['old_password'] . '\''; +$lng['error']['newpassword'] = '\'' . $lng['changepassword']['new_password'] . '\''; +$lng['error']['newpasswordconfirm'] = '\'' . $lng['changepassword']['new_password_confirm'] . '\''; +$lng['error']['newpasswordconfirmerror'] = 'A nova senha e a confirmação não conferem'; +$lng['error']['myname'] = '\'' . $lng['customer']['name'] . '\''; +$lng['error']['myfirstname'] = '\'' . $lng['customer']['firstname'] . '\''; +$lng['error']['emailadd'] = '\'' . $lng['customer']['email'] . '\''; +$lng['error']['mydomain'] = '\'Dominio\''; +$lng['error']['mydocumentroot'] = '\'Documento principal\''; +$lng['error']['loginnameexists'] = 'Login %s já existe'; +$lng['error']['emailiswrong'] = 'E-mail %s contem caracteres inválidos ou está incompleto'; +$lng['error']['loginnameiswrong'] = 'Login %s contem caracteres inválidos'; +$lng['error']['userpathcombinationdupe'] = 'Usuario e caminho já existem'; +$lng['error']['patherror'] = 'Erro geral! o caminho năo pode ficar em branco'; +$lng['error']['errordocpathdupe'] = 'Opçăo de caminho %s já existe'; +$lng['error']['adduserfirst'] = 'Por favor crie um cliente primeiro'; +$lng['error']['domainalreadyexists'] = 'O dominio %s já está apontado para outro cliente'; +$lng['error']['nolanguageselect'] = 'Nenhum idioma selecionado.'; +$lng['error']['nosubjectcreate'] = 'Voce deve definir um nome para este e-mail template.'; +$lng['error']['nomailbodycreate'] = 'Voce deve definir o texto para este e-mail template.'; +$lng['error']['templatenotfound'] = 'Template não encontrado.'; +$lng['error']['alltemplatesdefined'] = 'Voce não pode definir mais templates, todos idiomas já suportados.'; +$lng['error']['wwwnotallowed'] = 'www não é permitido como nome de subdominio.'; +$lng['error']['subdomainiswrong'] = 'O subdominio %s contém caracteres inválidos.'; +$lng['error']['domaincantbeempty'] = 'O nome do dominio não pode estar vazio.'; +$lng['error']['domainexistalready'] = 'O dominio %s já existe.'; +$lng['error']['domainisaliasorothercustomer'] = 'O domínio-alias escolhido é ele próprio um domínio-alias ou este pertence a um outro cliente.'; +$lng['error']['emailexistalready'] = 'O E-mail %s já existe.'; +$lng['error']['maindomainnonexist'] = 'O dominio principal %s não existe.'; +$lng['error']['destinationnonexist'] = 'Por favor crie seu redirecionamento no campo \'Destino\'.'; +$lng['error']['destinationalreadyexistasmail'] = 'O redirecionamento %s já existe como uma conta de e-mail.'; +$lng['error']['destinationalreadyexist'] = 'Voce já definiu um redirecionamento para %s .'; +$lng['error']['destinationiswrong'] = 'O redirecionamento %s contem caracteres inválidos ou incompletos.'; +$lng['error']['domainname'] = $lng['domains']['domainname']; + +/** + * Questions + */ + +$lng['question']['question'] = 'Pergunta de segurança'; +$lng['question']['admin_customer_reallydelete'] = 'Voce realmente deseja deletar o cliente %s? Este comando não poderá ser cancelado!'; +$lng['question']['admin_domain_reallydelete'] = 'Voce realmente deseja deletar o dominio %s?'; +$lng['question']['admin_domain_reallydisablesecuritysetting'] = 'Voce realmente deseja desativar estas configurações de segurança (OpenBasedir e/ou SafeMode)?'; +$lng['question']['admin_admin_reallydelete'] = 'Voce realmente deseja deletar o administrador %s? Todos clientes e dominios serão realocados para o administrador principal.'; +$lng['question']['admin_template_reallydelete'] = 'Voce realmente deseja deletar o template \'%s\'?'; +$lng['question']['domains_reallydelete'] = 'Voce realmente deseja deletar o dominio %s?'; +$lng['question']['email_reallydelete'] = 'Voce realmente deseja deletar o e-mail %s?'; +$lng['question']['email_reallydelete_account'] = 'Voce realmente deseja deletar a conta de e-mail %s?'; +$lng['question']['email_reallydelete_forwarder'] = 'Voce realmente deseja deletar o redirecionamento %s?'; +$lng['question']['extras_reallydelete'] = 'Voce realmente deseja deletar a proteção do diretório %s?'; +$lng['question']['extras_reallydelete_pathoptions'] = 'Voce realmente deseja deletar o caminho %s?'; +$lng['question']['ftp_reallydelete'] = 'Voce realmente deseja deletar a conta de FTP %s?'; +$lng['question']['mysql_reallydelete'] = 'Voce realmente deseja deletar o banco de dados %s? Este comando não poderá ser cancelado!'; +$lng['question']['admin_configs_reallyrebuild'] = 'Está certo que quer deixar reconfigurar os ficheiros de configuração de Apache e Bind?'; + +/** + * Mails + */ + +$lng['mails']['pop_success']['mailbody'] = 'Olá,\n\n sua conta de e-mail {EMAIL}\n foi criada com sucesso.\n\nEsta é uma mensagem automática\neMail, por favor não responda!\n\nAtenciosamente, Equipe de desenvolvimento do Froxlor'; +$lng['mails']['pop_success']['subject'] = 'Conta de e-mail criada com sucesso!'; +$lng['mails']['createcustomer']['mailbody'] = 'Olá {FIRSTNAME} {NAME},\n\nseguem os detalhes de sua nova conta de e-mail:\n\nUsuario: {USERNAME}\nSenha: {PASSWORD}\n\nObrigado,\nEquipe de desenvolvimento do Froxlor'; +$lng['mails']['createcustomer']['subject'] = 'Informações da conta'; + +/** + * Admin + */ + +$lng['admin']['overview'] = 'Visão geral'; +$lng['admin']['ressourcedetails'] = 'Recursos usados'; +$lng['admin']['systemdetails'] = 'Detalhes do sistema'; +$lng['admin']['froxlordetails'] = 'Detalhes do Froxlor'; +$lng['admin']['installedversion'] = 'Versão instalada'; +$lng['admin']['latestversion'] = 'Ultima Versão'; +$lng['admin']['lookfornewversion']['clickhere'] = 'procurar pela internet'; +$lng['admin']['lookfornewversion']['error'] = 'Erro de leitura'; +$lng['admin']['resources'] = 'Recursos'; +$lng['admin']['customer'] = 'Cliente'; +$lng['admin']['customers'] = 'Clientes'; +$lng['admin']['customer_add'] = 'Criar cliente'; +$lng['admin']['customer_edit'] = 'Editar cliente'; +$lng['admin']['domains'] = 'Dominios'; +$lng['admin']['domain_add'] = 'Criar dominio'; +$lng['admin']['domain_edit'] = 'Editar dominio'; +$lng['admin']['subdomainforemail'] = 'Subdominio como "emaildomains"'; +$lng['admin']['admin'] = 'Administrador'; +$lng['admin']['admins'] = 'Administradores'; +$lng['admin']['admin_add'] = 'Criar administrador'; +$lng['admin']['admin_edit'] = 'Editar administrador'; +$lng['admin']['customers_see_all'] = 'Mostrar todos os clientes'; +$lng['admin']['domains_see_all'] = 'Mostrar todos os dominios'; +$lng['admin']['change_serversettings'] = 'Alterar configuraççes do servidor?'; +$lng['admin']['server'] = 'Servidor'; +$lng['admin']['serversettings'] = 'Configuraççes'; +$lng['admin']['rebuildconf'] = 'Escrever de novo os configs'; +$lng['admin']['stdsubdomain'] = 'Subdominio padrão'; +$lng['admin']['stdsubdomain_add'] = 'Criar Subdominio padrão'; +$lng['admin']['deactivated'] = 'Desativado'; +$lng['admin']['deactivated_user'] = 'Desativar usuário'; +$lng['admin']['sendpassword'] = 'Enviar senha'; +$lng['admin']['ownvhostsettings'] = 'Own vHost-Settings'; +$lng['admin']['configfiles']['serverconfiguration'] = 'Configurações'; +$lng['admin']['configfiles']['files'] = 'Configfiles: Por favor altere os seguintes arquivos ou crie eles com
    o seguinte conteúdo se ele não existir.
    Por favor observe: A senha do MySQL năo foi alterada por razões de segurança.
    Por favor substitua "MYSQL_PASSWORD" por uma sua. Se voce esqueceu a senha do MySQL
    voce pode verificar em "lib/userdata.inc.php".'; +$lng['admin']['configfiles']['commands'] = 'Commands: Por favor execute as seguintes comandos no shell.'; +$lng['admin']['configfiles']['restart'] = 'Restart: Por favor execute as seguintes comandos no shell para carregar aas novas configurações.'; +$lng['admin']['templates']['templates'] = 'Templates'; +$lng['admin']['templates']['template_add'] = 'Adicionar template'; +$lng['admin']['templates']['template_edit'] = 'Editar template'; +$lng['admin']['templates']['action'] = 'Ação'; +$lng['admin']['templates']['email'] = 'E-Mail'; +$lng['admin']['templates']['subject'] = 'Assunto'; +$lng['admin']['templates']['mailbody'] = 'Mensagem'; +$lng['admin']['templates']['createcustomer'] = 'E-mail de boas-vindas para novos clientes'; +$lng['admin']['templates']['pop_success'] = 'E-mail de boas-vindas para nova conta de e-mail'; +$lng['admin']['templates']['template_replace_vars'] = 'Variaveis para serem substituidas no template:'; +$lng['admin']['templates']['FIRSTNAME'] = 'Altere para o primeiro nome do cliente.'; +$lng['admin']['templates']['NAME'] = 'Altere para o nome do cliente.'; +$lng['admin']['templates']['USERNAME'] = 'Altere para nome da conta do cliente.'; +$lng['admin']['templates']['PASSWORD'] = 'Altere com a senha da conta do cliente.'; +$lng['admin']['templates']['EMAIL'] = 'Altere com os dados do servidor POP3/IMAP.'; + +/** + * Serversettings + */ + +$lng['serversettings']['session_timeout']['title'] = 'Tempo esgotado'; +$lng['serversettings']['session_timeout']['description'] = 'Quanto tempo o usuario deve estar inativo para ser desconectado (segundos)?'; +$lng['serversettings']['accountprefix']['title'] = 'Prefixo do cliente'; +$lng['serversettings']['accountprefix']['description'] = 'Qual o prefixo "customeraccounts" deve ter?'; +$lng['serversettings']['mysqlprefix']['title'] = 'SQL Prefixo'; +$lng['serversettings']['mysqlprefix']['description'] = 'Qual prefixo as contas mysql devem ter?'; +$lng['serversettings']['ftpprefix']['title'] = 'FTP Prefixo'; +$lng['serversettings']['ftpprefix']['description'] = 'Qual prefixo as contas de FTP devem ter?'; +$lng['serversettings']['documentroot_prefix']['title'] = 'Diretório de documentação'; +$lng['serversettings']['documentroot_prefix']['description'] = 'Aonde os documentos dever ser gravados?'; +$lng['serversettings']['logfiles_directory']['title'] = 'Diretório de LOG'; +$lng['serversettings']['logfiles_directory']['description'] = 'Aonde os arquivos de log dever ser gravados?'; +$lng['serversettings']['ipaddress']['title'] = 'Endereços de IP'; +$lng['serversettings']['ipaddress']['description'] = 'Quais os Endereços IP deste servidor?'; +$lng['serversettings']['hostname']['title'] = 'Hostname'; +$lng['serversettings']['hostname']['description'] = 'Qual o Hostname deste servidor?'; +$lng['serversettings']['apachereload_command']['title'] = 'Comando de reiniciar o Apache'; +$lng['serversettings']['apachereload_command']['description'] = 'Qual o comando para reiniciar o apache?'; +$lng['serversettings']['bindconf_directory']['title'] = 'Diretório de configuração do Bind'; +$lng['serversettings']['bindconf_directory']['description'] = 'Aonde estão os arquivos de configuração do bind?'; +$lng['serversettings']['bindreload_command']['title'] = 'Comando de reiniciar o Bind'; +$lng['serversettings']['bindreload_command']['description'] = 'Qual o comando para reiniciar o bind?'; +$lng['serversettings']['binddefaultzone']['title'] = 'Bind default zone'; +$lng['serversettings']['binddefaultzone']['description'] = 'Qual o nome da default zone?'; +$lng['serversettings']['vmail_uid']['title'] = 'Mails-Uid'; +$lng['serversettings']['vmail_uid']['description'] = 'Qual UserID os e-mails devem ter?'; +$lng['serversettings']['vmail_gid']['title'] = 'Mails-Gid'; +$lng['serversettings']['vmail_gid']['description'] = 'Qual GroupID os e-mails devem ter?'; +$lng['serversettings']['vmail_homedir']['title'] = 'Mails-Homedir'; +$lng['serversettings']['vmail_homedir']['description'] = 'Aonde os e-mails devem ser gravados?'; +$lng['serversettings']['adminmail']['title'] = 'Remetente'; +$lng['serversettings']['adminmail']['description'] = 'Qual o remetente dos e-mails enviados pelo painel?'; +$lng['serversettings']['phpmyadmin_url']['title'] = 'phpMyAdmin URL'; +$lng['serversettings']['phpmyadmin_url']['description'] = 'Qual a URL do phpMyAdmin? (deve iniciar com http://)'; +$lng['serversettings']['webmail_url']['title'] = 'WebMail URL'; +$lng['serversettings']['webmail_url']['description'] = 'Qual a URL do WebMail? (deve iniciar com http://)'; +$lng['serversettings']['webftp_url']['title'] = 'WebFTP URL'; +$lng['serversettings']['webftp_url']['description'] = 'Qual a URL do WebFTP? (deve iniciar com http://)'; +$lng['serversettings']['language']['description'] = 'Qual o idioma padrão do servidor?'; +$lng['serversettings']['maxloginattempts']['title'] = 'Tentativas maximas de Login'; +$lng['serversettings']['maxloginattempts']['description'] = 'Tentativas maximas de Login para a conta ser desativada.'; +$lng['serversettings']['deactivatetime']['title'] = 'Tempo que a conta deve permanecer desativada'; +$lng['serversettings']['deactivatetime']['description'] = 'Tempo (sec.) qua a conta permanece desativada depois de muitas tentativas de login.'; +$lng['serversettings']['pathedit']['title'] = 'File-Método de entrada'; +$lng['serversettings']['pathedit']['description'] = 'A escolha do file tem que ser feita através do Dropdown-Menu ou pode ser feita manualmente?'; + +/** + * ADDED BETWEEN 1.2.12 and 1.2.13 + */ + +$lng['admin']['cronlastrun'] = 'Ultimo Agendamento'; +$lng['serversettings']['paging']['title'] = 'Entradas por pagina'; +$lng['serversettings']['paging']['description'] = 'Quantas entradas devem ser mostradas por pagina? (0 = desabilitar paginas)'; +$lng['error']['ipstillhasdomains'] = 'O IP/Porta que voce quer deletar ainda possui dominios associados e eles, por favor altere o IP/Porta destes dominios antes de deletá-los.'; +$lng['error']['cantdeletedefaultip'] = 'Voce não pode deletar o IP/Porta padrão do revendedor, por favor defina outro IP/Porta como padrão antes deletar o IP/Porta desejado'; +$lng['error']['cantdeletesystemip'] = 'Voce não pode deletar o IP do sistema, nem criar uma nova combinação IP/Porta para o sistema ou trocar o IP do sistema.'; +$lng['error']['myipaddress'] = '\'IP\''; +$lng['error']['myport'] = '\'Porta\''; +$lng['error']['myipdefault'] = 'Voce precisa selecionar o IP/Porta que será padrão.'; +$lng['error']['myipnotdouble'] = 'Esta combinação IP/Porta já existe.'; +$lng['question']['admin_ip_reallydelete'] = 'Voce realmente deseja deletar este endereço IP?'; +$lng['admin']['ipsandports']['ipsandports'] = 'IPs e Portas'; +$lng['admin']['ipsandports']['add'] = 'Adicionar IP/Porta'; +$lng['admin']['ipsandports']['edit'] = 'Editar IP/Porta'; +$lng['admin']['ipsandports']['ipandport'] = 'IP/Porta'; +$lng['admin']['ipsandports']['ip'] = 'IP'; +$lng['admin']['ipsandports']['port'] = 'Porta'; +$lng['error']['cantchangesystemip'] = 'Você não pode mudar o último sistema IP, para criar uma outra combinação nova de IP/Port para o sistema IP ou para mudar o sistema IP'; +$lng['question']['admin_domain_reallydocrootoutofcustomerroot'] = 'É você certo, você quer a raiz do original para este domínio, não estando dentro do customerroot do cliente?'; +$lng['error']['loginnameissystemaccount'] = 'Você não pode criar os clientes que são similares aos systemaccounts. Incorpore por favor um outro accountname.'; +$lng['domain']['docroot'] = 'trajeto da linha acima de'; +$lng['domain']['homedir'] = 'diretório da casa'; +$lng['admin']['valuemandatory'] = 'Este valor é imperativo.'; +$lng['admin']['valuemandatorycompany'] = 'Qualquer um "nome" e "nome" o "companhia" deve ser enchido.'; +$lng['admin']['phpenabled'] = 'PHP Habilitado'; +$lng['admin']['webserver'] = 'Servidor Web'; +$lng['serversettings']['nameservers']['title'] = 'Servidores DNS'; +$lng['serversettings']['mxservers']['title'] = 'Servidores de Email'; +$lng['serversettings']['mxservers']['description'] = 'Uma lista separada por vírgulas que contém o numero de prioridade e o hostname separados por um espaço (por exemplo: \'mx.example.com 10 \'), contendo os servidores mx.'; +$lng['error']['admin_domain_emailsystemhostname'] = 'Desculpe. Você não pode usar o hostname do servidor como domínio de email'; +$lng['admin']['memorylimitdisabled'] = 'Desabilitado'; +$lng['domain']['openbasedirpath'] = 'Caminho do OpenBaseDir'; +$lng['menue']['main']['username'] = 'Logado como'; +$lng['panel']['urloverridespath'] = 'URL (Caminho Completo)'; +$lng['panel']['pathorurl'] = 'Caminho ou URL'; +$lng['error']['sessiontimeoutiswrong'] = 'Apenas numeros "Timeout da sessão" permitido.'; +$lng['error']['maxloginattemptsiswrong'] = 'Apenas numero "Tentativa maxima de Login" permitido.'; +$lng['error']['deactivatetimiswrong'] = 'Apenas numero "Desativar Tempo" permitido.'; +$lng['error']['accountprefixiswrong'] = 'O "Prefixo" está errado.'; +$lng['error']['mysqlprefixiswrong'] = 'O "Prefixo SQL" está errado.'; +$lng['error']['ftpprefixiswrong'] = 'O "Prefixo FTP" está errado.'; +$lng['error']['ipiswrong'] = 'O "Endereço-IP" está errado. Apenas um Endereço-IP válido é permitido.'; +$lng['error']['vmailuidiswrong'] = 'O "UID do E-mail" Está errado. Só é permitido um número de ID.'; +$lng['error']['vmailgidiswrong'] = 'O "GID do E-mail" Está errado. Só é permitido um número de ID.'; +$lng['error']['adminmailiswrong'] = 'O "Endereço de Envio" está errado. Apenas um endereço de e-mail válido é permitido.'; +$lng['error']['pagingiswrong'] = 'O "Entradas por páginas"-value está errado. Somente caracteres númericos são permitidos.'; +$lng['error']['phpmyadminiswrong'] = 'O caminho para o phpMyAmin não é válido'; +$lng['error']['webmailiswrong'] = 'O caminho para o Webmail não é válido'; +$lng['error']['webftpiswrong'] = 'O caminho para o WebFTP não é válido'; +$lng['domains']['hasaliasdomains'] = 'Possui alinhas de domínio(s)'; +$lng['serversettings']['defaultip']['title'] = 'IP/Porta Padrão'; +$lng['serversettings']['defaultip']['description'] = 'Qual é a IP/Porta Padrão?'; +$lng['domains']['statstics'] = 'Estatísticas de Uso'; +$lng['panel']['ascending'] = 'Crescente'; +$lng['panel']['decending'] = 'Decrescente'; +$lng['panel']['search'] = 'Procurar'; +$lng['panel']['used'] = 'Usado'; +$lng['panel']['translator'] = 'Tradutor'; +$lng['error']['stringformaterror'] = 'O valor par ao campo "%s" não esta no formato correto.'; +$lng['admin']['serversoftware'] = 'Servidor de Software'; +$lng['admin']['phpversion'] = 'Versão do PHP'; +$lng['admin']['phpmemorylimit'] = 'Memória Limite do PHP'; +$lng['admin']['mysqlserverversion'] = 'Versão do MySQL Server'; +$lng['admin']['mysqlclientversion'] = 'Versão do MySQL Client'; +$lng['admin']['webserverinterface'] = 'Interface do Servidor Web'; +$lng['domains']['isassigneddomain'] = 'É um domínio assinado'; +$lng['serversettings']['phpappendopenbasedir']['title'] = 'Caminho para adicionar OpenBasedir'; +$lng['serversettings']['phpappendopenbasedir']['description'] = 'Estes caminhos (separados por dois pontos) serão acrescentados ao OpenBasedir em cada vhost.'; +$lng['error']['youcantdeleteyourself'] = 'Você não pode apagar você mesmo por motivos de segurança'; +$lng['error']['youcanteditallfieldsofyourself'] = 'Nota: Você não pode editar todos os campos de sua própria conta por motivos de segurança'; +$lng['serversettings']['natsorting']['title'] = 'Usar classificação natural na visualização'; +$lng['serversettings']['natsorting']['description'] = 'Ordenar listas como: web1 -> web2 -> web11 ao invéz de web1 -> web11 -> web2.'; +$lng['serversettings']['deactivateddocroot']['title'] = 'Docroots desativado para usuários'; +$lng['serversettings']['deactivateddocroot']['description'] = 'Quando um usuário estiver desativado, esse caminho é usado como seu docroot. Deixe em branco para não criar um vhost a todos.'; +$lng['panel']['reset'] = 'Descartar Mudanças'; +$lng['admin']['accountsettings'] = 'Configurações de Conta'; +$lng['admin']['panelsettings'] = 'Painel de Controle'; +$lng['admin']['systemsettings'] = 'Configurações do Sistema'; +$lng['admin']['webserversettings'] = 'Configurações do WebServer'; +$lng['admin']['mailserversettings'] = 'Configurações do Servidor de Email'; +$lng['admin']['nameserversettings'] = 'Configurações dos Servidores de Nomes'; +$lng['admin']['updatecounters'] = 'Recalcular utilização de recursos'; +$lng['question']['admin_counters_reallyupdate'] = 'Voce deseja recalcular os recursos utilizados?'; +$lng['panel']['pathDescription'] = 'Se o diretório não existir, será criado automaticamente'; +$lng['mails']['trafficninetypercent']['mailbody'] = 'Querido {NAME},\n\nVocê usou {TRAFFICUSED} MB do seu disponível {TRAFFIC} MB de tráfego.\nisto é mais que 90%.\n\nHonestamente, Equipe Froxlor'; +$lng['mails']['trafficninetypercent']['subject'] = 'Atingindo o seu limite de tráfego'; +$lng['admin']['templates']['trafficninetypercent'] = 'Email de notificação para clientes quando atingirem 90% do uso do tráfego'; +$lng['admin']['templates']['TRAFFIC'] = 'Substituído com o tráfego, o que foi atribuído ao cliente.'; +$lng['admin']['templates']['TRAFFICUSED'] = 'Substituído com o tráfego, que foi esgotado pela cliente.'; +$lng['admin']['subcanemaildomain']['never'] = 'Nunca'; +$lng['admin']['subcanemaildomain']['choosableno'] = 'Escolhe, default não'; +$lng['admin']['subcanemaildomain']['choosableyes'] = 'Escolher, default sim'; +$lng['admin']['subcanemaildomain']['always'] = 'Sempre'; +$lng['changepassword']['also_change_webalizer'] = 'Troca a senha das estatísticas do webalizer'; +$lng['serversettings']['mailpwcleartext']['title'] = 'Salva as senhas de usuários sempre criptografia no banco de dados'; +$lng['serversettings']['mailpwcleartext']['description'] = 'Se você selecionar sim, todas as senhas serão guardadas descriptografadas (Poderá ser lido por todos com acesso ao banco de dados ) na tabela mail_users-table. Somente ative essa opção se você realmente precise!'; +$lng['serversettings']['mailpwcleartext']['removelink'] = 'Clique aqui para limpar todas as senhas não criptografadas da tabela
    Você realmente deseja limpar todas as senhas não encriptadas a partir da tabela mail_users? Isto não pode ser revertido!'; +$lng['admin']['configfiles']['overview'] = 'Visão Geral'; +$lng['admin']['configfiles']['wizard'] = 'Assistente'; +$lng['admin']['configfiles']['distribution'] = 'Distribuição'; +$lng['admin']['configfiles']['service'] = 'Serviço'; +$lng['admin']['configfiles']['daemon'] = 'Daemon'; +$lng['admin']['configfiles']['http'] = 'Servidor Web (HTTP)'; +$lng['admin']['configfiles']['dns'] = 'Servidor de Nomes (DNS)'; +$lng['admin']['configfiles']['mail'] = 'Servidor de Emails (POP3/IMAP)'; +$lng['admin']['configfiles']['smtp'] = 'Servidor de Emails (SMTP)'; +$lng['admin']['configfiles']['ftp'] = 'Servidor FTP'; +$lng['admin']['configfiles']['etc'] = 'Outros (Sistema)'; +$lng['admin']['configfiles']['choosedistribution'] = 'Escolha uma distribuição'; +$lng['admin']['configfiles']['chooseservice'] = 'Escolha um serviço'; +$lng['admin']['configfiles']['choosedaemon'] = 'Escolha um daemon'; +$lng['admin']['trafficlastrun'] = 'Cálculo do Último Tráfego'; +$lng['serversettings']['ftpdomain']['title'] = 'Contas FTP @domínio'; +$lng['serversettings']['ftpdomain']['description'] = 'Clientes podem criar contas de FTP user@domíniodocliente?'; +$lng['panel']['back'] = 'Volta'; +$lng['serversettings']['mod_log_sql']['title'] = 'Temporariamente salva os logs no banco de dados'; +$lng['serversettings']['mod_fcgid']['title'] = 'Incluir PHP via mod_fcgid/suexec'; +$lng['serversettings']['mod_fcgid']['description'] = 'Use mod_fcgid/suexec/libnss_mysql to run PHP with the corresponding useraccount.
    This needs a special Apache configuration. All following options are only valid if the module is enabled.'; +$lng['serversettings']['sendalternativemail']['title'] = 'Utilize endereço de e-mail alternativo'; +$lng['serversettings']['sendalternativemail']['description'] = 'Enviar e-mail a senha para um endereço diferente durante uma criação de conta de e-mail'; +$lng['emails']['alternative_emailaddress'] = 'Endereço de E-mail alternativo'; +$lng['mails']['pop_success_alternative']['mailbody'] = 'Oi,\n\nSua conta de email {EMAIL}\nfoi configurada corretamente.\nSua senha é{PASSWORD}.\n\nEmail criado automaticamente\n, Por favor não responda!\n\nCumprimentos, Equipe Froxlor.'; +$lng['mails']['pop_success_alternative']['subject'] = 'Conta de email criada com sucesso'; +$lng['admin']['templates']['pop_success_alternative'] = 'Bem-vindo para novas contas e-mail enviado ao endereço alternativo'; +$lng['admin']['templates']['EMAIL_PASSWORD'] = 'Substituído a senha da conta POP3/IMAP.'; +$lng['error']['documentrootexists'] = 'O Diretório "%s" já existe para este usuario. Por favor remova-o e depois tente novamente.'; +$lng['serversettings']['apacheconf_vhost']['title'] = 'Arquivo/Diretório de configurações do Apache Vhost'; +$lng['serversettings']['apacheconf_vhost']['description'] = 'Onde as configuração de Vhost devem ser guardadas? Você pode especificar um arquivo (todos os vhosts em um arquivo) ou diretório (cada vhost com seu próprio arquivo) aqui.'; +$lng['serversettings']['apacheconf_diroptions']['title'] = 'Configuração de diretório do Apache Arquivo/Nome do Diretório.'; +$lng['serversettings']['apacheconf_diroptions']['description'] = 'Quando as opções de configuração de diretório deve ser armazenada? Você poderia especificar um arquivo (todas as opções em um arquivo) ou diretório ( cada opção no seu próprio arquivo).'; +$lng['serversettings']['apacheconf_htpasswddir']['title'] = 'Apache htpasswd dirname'; +$lng['serversettings']['apacheconf_htpasswddir']['description'] = 'Onde deve ser o diretório de arquivos htpasswd?'; +$lng['error']['formtokencompromised'] = 'O Pedido parece estar correto. Por motivos de segurança você está desconectado.'; +$lng['serversettings']['mysql_access_host']['title'] = 'Hosts de Acesso MySQL'; +$lng['serversettings']['mysql_access_host']['description'] = 'Uma lista separada por vírgulas de hosts a partir do qual os utilizadores devem ter a possibilidade de conectar-se ao MySQL-Server.'; +$lng['admin']['ipsandports']['create_listen_statement'] = 'Criar instrução de escuta'; +$lng['admin']['ipsandports']['create_namevirtualhost_statement'] = 'Criar instrução de NameVirtualHost'; +$lng['admin']['ipsandports']['create_vhostcontainer'] = 'Criar vHost-Container'; +$lng['admin']['ipsandports']['create_vhostcontainer_servername_statement'] = 'Criar instrução de ServerName no vHost-Container'; +$lng['admin']['webalizersettings'] = 'Configurações do Webalizer'; +$lng['admin']['webalizer']['normal'] = 'Normal'; +$lng['admin']['webalizer']['quiet'] = 'Quieto'; +$lng['admin']['webalizer']['veryquiet'] = 'Sem Saída'; +$lng['serversettings']['webalizer_quiet']['title'] = 'Saida do Webalizer'; +$lng['serversettings']['webalizer_quiet']['description'] = 'Modo verbose do webalizer'; +$lng['ticket']['admin_email'] = 'root@localhost'; +$lng['ticket']['noreply_email'] = 'tickets@froxlor'; +$lng['admin']['ticketsystem'] = 'Tickets de Suporte'; +$lng['menue']['ticket']['ticket'] = 'Tickets'; +$lng['menue']['ticket']['categories'] = 'Cotegorias de Suporte'; +$lng['menue']['ticket']['archive'] = 'Arquivo de Tickets'; +$lng['ticket']['description'] = 'Aqui você pode fazer perguntas ao administrador responsável'; +$lng['ticket']['ticket_new'] = 'Abrir um novo ticket'; +$lng['ticket']['ticket_reply'] = 'Responder um ticket'; +$lng['ticket']['ticket_reopen'] = 'Re-abrir um ticket'; +$lng['ticket']['ticket_newcateory'] = 'Recriar uma categoria'; +$lng['ticket']['ticket_editcateory'] = 'Editar uma categoria'; +$lng['ticket']['ticket_view'] = 'Ver Ticket'; +$lng['ticket']['ticketcount'] = 'Tickets'; +$lng['ticket']['ticket_answers'] = 'Respostas'; +$lng['ticket']['lastchange'] = 'Última troca'; +$lng['ticket']['subject'] = 'Assunto'; +$lng['ticket']['status'] = 'Status'; +$lng['ticket']['lastreplier'] = 'Último que respondeu'; +$lng['ticket']['priority'] = 'Prioridade'; +$lng['ticket']['low'] = 'Baixa'; +$lng['ticket']['normal'] = 'Normal'; +$lng['ticket']['high'] = 'Alta'; +$lng['ticket']['unf_low'] = 'Baixa'; +$lng['ticket']['unf_normal'] = 'Normal'; +$lng['ticket']['unf_high'] = 'Alta'; +$lng['ticket']['lastchange_from'] = 'De data (dd.mm.aaaa)'; +$lng['ticket']['lastchange_to'] = 'Até data (dd.mm.aaaa)'; +$lng['ticket']['category'] = 'Categoria'; +$lng['ticket']['no_cat'] = 'Nenhuma'; +$lng['ticket']['message'] = 'Mensagem'; +$lng['ticket']['show'] = 'Visualizar'; +$lng['ticket']['answer'] = 'Responder um ticket'; +$lng['ticket']['close'] = 'Fechar'; +$lng['ticket']['reopen'] = 'Re-abrir'; +$lng['ticket']['archive'] = 'Arquivo'; +$lng['ticket']['ticket_delete'] = 'Deletar Ticket'; +$lng['ticket']['lastarchived'] = 'Tickets recém arquivados'; +$lng['ticket']['archivedtime'] = 'Arquivado'; +$lng['ticket']['open'] = 'Aberto'; +$lng['ticket']['wait_reply'] = 'Esperando resposta'; +$lng['ticket']['replied'] = 'Respondido'; +$lng['ticket']['closed'] = 'Fechado'; +$lng['ticket']['staff'] = 'Equipe'; +$lng['ticket']['customer'] = 'Cliente'; +$lng['ticket']['old_tickets'] = 'Ticket de mensagens'; +$lng['ticket']['search'] = 'Procurar arquivo'; +$lng['ticket']['nocustomer'] = 'Sem escolha'; +$lng['ticket']['archivesearch'] = 'Arquivar resultados de busca'; +$lng['ticket']['noresults'] = 'Nenhum ticket encontrado'; +$lng['ticket']['notmorethanxopentickets'] = 'Devido a proteção anti-spam não se pode ter mais de %s bilhetes abertos'; +$lng['ticket']['supportstatus'] = 'Status de Suporte'; +$lng['ticket']['supportavailable'] = 'Nossos engenheiros de suporte estão disponíveis e prontos a ajudar.'; +$lng['ticket']['supportnotavailable'] = 'Nossos engenheiros de suporte não estão actualmente disponíveis'; +$lng['admin']['templates']['ticket'] = 'Emails de notificação para tickets de suporte'; +$lng['admin']['templates']['SUBJECT'] = 'Substituído por um assunto de ticket de suporte'; +$lng['admin']['templates']['new_ticket_for_customer'] = 'Informação do Cliente de que de que o Ticket foi gerado.'; +$lng['admin']['templates']['new_ticket_by_customer'] = 'Notificação do Admin para um ticket aberto por um cliente'; +$lng['admin']['templates']['new_reply_ticket_by_customer'] = 'Notificação do Admin para um ticket respondido por um cliente'; +$lng['admin']['templates']['new_ticket_by_staff'] = 'Notificação de cliente para um ticket aberto pela administração'; +$lng['admin']['templates']['new_reply_ticket_by_staff'] = 'Notificação do cliente para um ticket respondido pela administração'; +$lng['mails']['new_ticket_for_customer']['subject'] = 'Seu ticket de Suporte foi Enviado'; +$lng['mails']['new_ticket_by_customer']['subject'] = 'Novo pedido de Suporte'; +$lng['mails']['new_reply_ticket_by_customer']['mailbody'] = 'Oi admin,\n\no ticket de suporte "{SUBJECT}" foi respondido para o cliente.\n\nPor favor logue para abrir o ticket.\n\Obrigado,\nequipe Froxlor'; +$lng['mails']['new_reply_ticket_by_customer']['subject'] = 'Nova resposta para um ticket de supote'; +$lng['mails']['new_ticket_by_staff']['subject'] = 'Novo ticket enviado'; +$lng['mails']['new_reply_ticket_by_staff']['mailbody'] = 'Oi {FIRSTNAME} {NAME},\n\o ticket de suporte com o assunto "{SUBJECT}" foi respondido pelos seus administradores.\n\nPor favor logue para abrir esse ticket.\n\nObrigado,\nequipe Froxlor'; +$lng['mails']['new_reply_ticket_by_staff']['subject'] = 'Nova resposta para um ticket de supote'; +$lng['question']['ticket_reallyclose'] = 'Você deseja fechar o ticket"%s"?'; +$lng['question']['ticket_reallydelete'] = 'Você deseja apagar o ticket"%s"?'; +$lng['question']['ticket_reallydeletecat'] = 'Você deseja deletar a categoria "%s"?'; +$lng['question']['ticket_reallyarchive'] = 'Você deseja mover o ticket "%s" para o arquivo?'; +$lng['error']['mysubject'] = '\'' . $lng['ticket']['subject'] . '\''; +$lng['error']['mymessage'] = '\'' . $lng['ticket']['message'] . '\''; +$lng['error']['mycategory'] = '\'' . $lng['ticket']['category'] . '\''; +$lng['error']['nomoreticketsavailable'] = 'Você já utilizou todos seus tickets disponíveis. Por favor contacte seu administrador'; +$lng['error']['nocustomerforticket'] = 'Não pode criar Tickets sem Clientes'; +$lng['error']['categoryhastickets'] = 'A categoria ainda tem tikets na mesma.
    Por favor elimine os bilhetes para eliminar a categoria'; +$lng['error']['notmorethanxopentickets'] = $lng['ticket']['notmorethanxopentickets']; +$lng['admin']['ticketsettings'] = 'Configurações de Ticket de Suporte'; +$lng['admin']['archivelastrun'] = 'Último arquivamento de ticket'; +$lng['serversettings']['ticket']['noreply_email']['title'] = 'Não responder endereço de email'; +$lng['serversettings']['ticket']['noreply_email']['description'] = 'O endereço de envio para tickets de suporte, normalmente é no-reply@domain.com'; +$lng['serversettings']['ticket']['worktime_begin']['title'] = 'Iniciado tempo de suporte (hh:mm)'; +$lng['serversettings']['ticket']['worktime_begin']['description'] = 'Início quando o suporte estiver disponível'; +$lng['serversettings']['ticket']['worktime_end']['title'] = 'Fim do tempo de suporte (hh:mm)'; +$lng['serversettings']['ticket']['worktime_end']['description'] = 'Fim do tempo quando o suporte estiver disponível'; +$lng['serversettings']['ticket']['worktime_sat'] = 'Suporte disponível nos sábados?'; +$lng['serversettings']['ticket']['worktime_sun'] = 'Suporte disponível nos domingos?'; +$lng['serversettings']['ticket']['worktime_all']['title'] = 'Sem tempo limite para suporte'; +$lng['serversettings']['ticket']['worktime_all']['description'] = 'Se "Sim" para opção para iniciar e finalizar vai ser substituída'; +$lng['serversettings']['ticket']['archiving_days'] = 'Depois de quantoas dias tickets fechado são arquivados?'; +$lng['customer']['tickets'] = 'Tickets de Suporte'; +$lng['admin']['domain_nocustomeraddingavailable'] = 'Não adicionar um domínio corretamente. Você primeiro precisa adicionar um cliente.'; +$lng['serversettings']['ticket']['enable'] = 'Ativar tickets de sistema'; +$lng['serversettings']['ticket']['concurrentlyopen'] = 'Quantos tickes poderam ser abertos ao mesmo tempo?'; +$lng['error']['norepymailiswrong'] = 'O "Endereço (Noreply)" está errado. Somente um endereço válido é aceito.'; +$lng['error']['tadminmailiswrong'] = 'O "Endereço de admin " está errado. Somente um endereço válido é aceito.'; +$lng['ticket']['awaitingticketreply'] = 'Você tem %s tickes de suporte não respondido(s)'; +$lng['serversettings']['ticket']['noreply_name'] = 'E-mail do remetente do Ticket'; +$lng['serversettings']['mod_fcgid']['configdir']['title'] = 'Diretório de configuração'; +$lng['serversettings']['mod_fcgid']['configdir']['description'] = 'Aonde todos os arquivos de configuração do fcgid vão ser guardados? Se você não utiliza um binário compilado, está é uma situação normal, deve estar dentro de /var/www/'; +$lng['serversettings']['mod_fcgid']['tmpdir']['title'] = 'Diretório Temporário'; +$lng['serversettings']['ticket']['reset_cycle']['title'] = 'Resetar ciclo de tickers usados'; +$lng['serversettings']['ticket']['reset_cycle']['description'] = 'Resetar tickets usados por clientes'; +$lng['admin']['tickets']['daily'] = 'Diariamente'; +$lng['admin']['tickets']['weekly'] = 'Semanalmente'; +$lng['admin']['tickets']['monthly'] = 'Mensalmente'; +$lng['admin']['tickets']['yearly'] = 'Anualmente'; +$lng['error']['ticketresetcycleiswrong'] = 'O ciclo de resetes de ticket pode ser "diário", "semanal", "mensal" or "anual".'; +$lng['menue']['traffic']['traffic'] = 'Tráfego'; +$lng['menue']['traffic']['current'] = 'Mês corrente'; +$lng['traffic']['month'] = "Mês"; +$lng['traffic']['day'] = "Diariamente"; +$lng['traffic']['months'][1] = "Janeiro"; +$lng['traffic']['months'][2] = "Fevereiro"; +$lng['traffic']['months'][3] = "Março"; +$lng['traffic']['months'][4] = "Abril"; +$lng['traffic']['months'][5] = "Maio"; +$lng['traffic']['months'][6] = "Junho"; +$lng['traffic']['months'][7] = "Julho"; +$lng['traffic']['months'][8] = "Agosto"; +$lng['traffic']['months'][9] = "Setembro"; +$lng['traffic']['months'][10] = "Outubro"; +$lng['traffic']['months'][11] = "Novembro"; +$lng['traffic']['months'][12] = "Dezembro"; +$lng['traffic']['mb'] = "Tráfego (MB)"; +$lng['traffic']['distribution'] = 'FTP | HTTP | E-Mail'; +$lng['traffic']['sumhttp'] = 'Resumo Tráfego de HTTP em'; +$lng['traffic']['sumftp'] = 'Resumo Tráfego de FTP em'; +$lng['traffic']['summail'] = 'Resumo Tráfego de HTTP em'; +$lng['serversettings']['no_robots']['title'] = 'Aceitar robĂ´s de procura na index de seuFroxlor'; +$lng['admin']['loggersettings'] = 'Configurações de Logs'; +$lng['serversettings']['logger']['enable'] = 'Habilitar/Desabilitar Logs'; +$lng['serversettings']['logger']['severity'] = 'Nível de Logs'; +$lng['admin']['logger']['normal'] = 'normal'; +$lng['admin']['logger']['paranoid'] = 'paranóico'; +$lng['serversettings']['logger']['types']['title'] = 'Tipos de Log(s)'; +$lng['serversettings']['logger']['types']['description'] = 'Especificar tipos de logs separados por vírgula.
    Tipos de lógs disponíveis: syslog, file, mysql'; +$lng['serversettings']['logger']['logfile'] = 'Caminho do Arquivo de Log incluindo nome de arquivo'; +$lng['error']['logerror'] = 'Log-Erro: %s'; +$lng['serversettings']['logger']['logcron'] = 'Logar tarefas do cron'; +$lng['question']['logger_reallytruncate'] = 'Você realmente deseja dividir a tabela "%s"?'; +$lng['admin']['loggersystem'] = 'Systema-Logging'; +$lng['menue']['logger']['logger'] = 'Systema-Logging'; +$lng['logger']['date'] = 'Data'; +$lng['logger']['type'] = 'Tipo'; +$lng['logger']['action'] = 'Ação'; +$lng['logger']['user'] = 'Usuário'; +$lng['logger']['truncate'] = 'Log Vazio'; +$lng['serversettings']['ssl']['use_ssl'] = 'Usar SSL'; +$lng['serversettings']['ssl']['ssl_cert_file'] = 'Aonde estão localizados os certificados'; +$lng['serversettings']['ssl']['openssl_cnf'] = 'Padrão para criar o arquivo de certificado'; +$lng['panel']['reseller'] = 'Revenda'; +$lng['panel']['admin'] = 'Administrador'; +$lng['panel']['customer'] = 'Cliente(s)'; +$lng['error']['nomessagetosend'] = 'Você não entrou com uma mensagem'; +$lng['error']['noreceipientsgiven'] = 'Você não especificou um destinatário'; +$lng['admin']['emaildomain'] = 'Domínio de Email'; +$lng['admin']['email_only'] = 'Somente Email?'; +$lng['admin']['wwwserveralias'] = 'Adicionar um "www." ServerAlias'; +$lng['admin']['ipsandports']['enable_ssl'] = 'Esta é uma porta SSL?'; +$lng['admin']['ipsandports']['ssl_cert_file'] = 'Caminho para o certificado SSL'; +$lng['panel']['send'] = 'Enviar'; +$lng['admin']['subject'] = 'Assunto'; +$lng['admin']['receipient'] = 'Destinatário'; +$lng['admin']['message'] = 'Escrever uma mensagem'; +$lng['admin']['text'] = 'Mensagem'; +$lng['menu']['message'] = 'Mensagens'; +$lng['error']['errorsendingmail'] = 'A mensagem para "%s" falhou'; +$lng['error']['cannotreaddir'] = 'Não é possível ler o diretório "%s"'; +$lng['message']['success'] = 'Mensagens enviadas para %s destinatários com sucesso'; +$lng['message']['noreceipients'] = 'Email não enviado porque não tem destinatário no banco de dados'; +$lng['admin']['sslsettings'] = 'Configuração de SSL'; +$lng['cronjobs']['notyetrun'] = 'Ainda não está rodando'; +$lng['install']['servername_should_be_fqdn'] = 'O nome do servidor deve ser a FQDN e não um endereço de IP'; +$lng['serversettings']['default_vhostconf']['title'] = 'Configuração de Vhost padrão'; +$lng['serversettings']['default_vhostconf']['description'] = 'O conteúdo deste campo será incluído a cada novo vhost criado. Atenção: O código será checado para algum erro. Se contiver erros, o apache pode não iniciar mais'; +$lng['emails']['quota'] = 'Quota'; +$lng['emails']['noquota'] = 'Sem quota'; +$lng['emails']['updatequota'] = 'Atualizar'; +$lng['serversettings']['mail_quota']['title'] = 'Quota de Email'; +$lng['serversettings']['mail_quota']['description'] = 'Quota default para novas caixas criadas'; +$lng['serversettings']['mail_quota_enabled']['title'] = 'Usar quota para clientes'; +$lng['serversettings']['mail_quota_enabled']['description'] = 'Ative para usar cotas em caixas de email. Padrão é Não visto que requer uma configuração especial.'; +$lng['serversettings']['mail_quota_enabled']['removelink'] = 'Clique aqui para limpar todas as quotas para as contas de email.'; +$lng['question']['admin_quotas_reallywipe'] = 'Você realmente deseja limpar todas as quotas na tabela mail_users? Isto não pode ser revertido'; +$lng['error']['vmailquotawrong'] = 'A tamanho da quota deve ser entre 1 e 999'; +$lng['customer']['email_quota'] = 'E-mail Quota'; +$lng['customer']['email_imap'] = 'E-mail IMAP'; +$lng['customer']['email_pop3'] = 'E-mail POP3'; +$lng['customer']['mail_quota'] = 'Quota de Email'; +$lng['error']['invalidip'] = 'Endereço de IP Inválido: %s'; +$lng['serversettings']['decimal_places'] = 'Número de casas decimais no tráfego / espaço de paginas web'; +$lng['admin']['dkimsettings'] = 'Configurações de Chave de Domínios'; +$lng['dkim']['dkim_prefix']['title'] = 'Prefixo'; +$lng['dkim']['dkim_prefix']['description'] = 'Por favor, especifique o caminho para o os arquivos DKIM RSA, bem como para os arquivos de configuração para o plugin Milter'; +$lng['dkim']['dkim_domains']['title'] = 'Nome de arquivo de domínios'; +$lng['dkim']['dkim_domains']['description'] = 'Nome do Arquivo dos Domínios do DKIM, parâmetro especificado na configuração do dkim-Milter'; +$lng['dkim']['dkim_dkimkeys']['title'] = 'Nome de arquivo de chaves'; +$lng['dkim']['dkim_dkimkeys']['description'] = 'Nome do ArquivoDKIM KeyList do parâmetro especificado na configuração dkim-Milter'; +$lng['dkim']['dkimrestart_command']['title'] = 'Comando para reiniciar o Milter'; +$lng['dkim']['dkimrestart_command']['description'] = 'Por favor especifique um comando para reiniciar o DKIM Milter'; +$lng['admin']['caneditphpsettings'] = 'Pode alterar as configurações PHP relacionadas com o domínio?'; +$lng['admin']['allips'] = 'Todos os IPs'; +$lng['panel']['nosslipsavailable'] = 'Não existem atualmente IP SSL / Porta para este servidor.'; +$lng['ticket']['by'] = 'Por'; +$lng['dkim']['use_dkim']['title'] = 'Ativar suporte para DKIM?'; +$lng['dkim']['use_dkim']['description'] = 'Você deseja usar o sistema de chaves de domínio (DKIM) ?'; +$lng['error']['invalidmysqlhost'] = 'Endereço de servidor MySQL inválido: %s'; +$lng['error']['cannotuseawstatsandwebalizeratonetime'] = 'Você não pode ativar Webalizer e Awstats ao mesmo tempo, por favor, escolha uma delas'; +$lng['serversettings']['webalizer_enabled'] = 'Ativar estatísticas webalizer'; +$lng['serversettings']['awstats_enabled'] = 'Ativar estatísticas awstats'; +$lng['admin']['awstatssettings'] = 'Configurações Awtats'; +$lng['serversettings']['awstats_domain_file']['title'] = 'Awstats diretório de arquivos do dominio'; +$lng['serversettings']['awstats_model_file']['title'] = 'Modelo de arquivo Awstats'; +$lng['admin']['domain_dns_settings'] = 'Configurações de DNS'; +$lng['dns']['destinationip'] = 'Domínio IP'; +$lng['dns']['standardip'] = 'IP padrão do servidor'; +$lng['dns']['a_record'] = 'Gravar-A(Opcional IPV6)'; +$lng['dns']['cname_record'] = 'Gravar-CNAME'; +$lng['dns']['mxrecords'] = 'Definir entradas MX'; +$lng['dns']['standardmx'] = 'Servidor MX padrão'; +$lng['dns']['mxconfig'] = 'Registros MX personalizados'; +$lng['dns']['priority10'] = 'Prioridade 10'; +$lng['dns']['priority20'] = 'Prioridade 20'; +$lng['dns']['txtrecords'] = 'Difinir entradas TXT'; +$lng['dns']['txtexample'] = 'Exemplo (Entrada-SPF):
    v=spf1 ip4:xxx.xxx.xx.0/23 -all'; +$lng['serversettings']['selfdns']['title'] = 'Configurações DNS-Domiio personalizadas'; +$lng['serversettings']['selfdnscustomer']['title'] = 'Aceita clientes para editar configurações de DNS'; +$lng['admin']['activated'] = 'Ativado'; +$lng['admin']['statisticsettings'] = 'Configurações de Estatísticas'; +$lng['admin']['or'] = 'ou'; +$lng['serversettings']['unix_names']['title'] = 'Usar nomes compatíveis com UNIX'; +$lng['serversettings']['unix_names']['description'] = 'Aceita voce usar - and _ em nomes de usuários se Noestiver marcado'; +$lng['error']['cannotwritetologfile'] = 'Não pode abrir arquivo de log %s para escrita'; +$lng['admin']['sysload'] = 'Carga do Sistema'; +$lng['admin']['noloadavailable'] = 'Não disponível'; +$lng['admin']['nouptimeavailable'] = 'Não disponível'; +$lng['panel']['backtooverview'] = 'Voltar para Visão Geral'; +$lng['admin']['nosubject'] = '(Sem Assunto)'; +$lng['admin']['configfiles']['statistics'] = 'Estatísticas'; +$lng['login']['forgotpwd'] = 'Perdeu sua senha?'; +$lng['login']['presend'] = 'Resetar senha'; +$lng['login']['email'] = 'Endereço de E-mail'; +$lng['login']['remind'] = 'Resetar minha senha'; +$lng['login']['usernotfound'] = 'Úsuario não encontrado'; +$lng['pwdreminder']['subject'] = 'Froxlor - Reset de Senha'; +$lng['pwdreminder']['body'] = 'Oi %s,\n\nsua senha do Froxlor foi resetada!\nA nova senha é: %p\n\nObrigado,\nequipe Froxlor'; +$lng['pwdreminder']['success'] = 'Redefinição de senha com sucesso.
    Você agora deve receber um e-mail com sua nova senha.'; +$lng['serversettings']['allow_password_reset']['title'] = 'Aceita reset de senha por clientes'; +$lng['pwdreminder']['notallowed'] = 'Reset de senhas está desativado'; +$lng['serversettings']['awstats_path']['title'] = 'Caminho para pasta awstats cgi-bin'; +$lng['serversettings']['awstats_path']['description'] = 'Exemplo: /usr/share/webapps/awstats/6.1/webroot/cgi-bin/'; +$lng['serversettings']['awstats_updateall_command']['title'] = 'Caminho para "awstats_updateall.pl"'; +$lng['serversettings']['awstats_updateall_command']['description'] = 'Exemplo: /usr/bin/awstats_updateall.pl'; +$lng['customer']['title'] = 'Título'; +$lng['customer']['country'] = 'País'; +$lng['panel']['dateformat'] = 'AAAA-MM-DD'; +$lng['panel']['dateformat_function'] = 'A-m-d'; +$lng['panel']['timeformat_function'] = 'H:i:S'; +$lng['panel']['default'] = 'Padrão'; +$lng['panel']['never'] = 'Nunca'; +$lng['panel']['active'] = 'Ativo'; +$lng['panel']['please_choose'] = 'Por favor escolha'; +$lng['panel']['intervalfee_type']['y'] = 'Anos'; +$lng['panel']['intervalfee_type']['m'] = 'Meses'; +$lng['panel']['intervalfee_type']['d'] = 'Dias'; +$lng['panel']['intervalfee_type_one']['y'] = 'Ano'; +$lng['panel']['intervalfee_type_one']['m'] = 'Mes'; +$lng['panel']['intervalfee_type_one']['d'] = 'Dia'; +$lng['panel']['service_still_active'] = 'Serviço ainda ativo'; +$lng['panel']['allow_modifications'] = 'Aceita alteraçoes'; +$lng['domains']['add_date'] = 'Adicionado no Froxlor'; +$lng['domains']['registration_date'] = 'Adicionado no Registro'; +$lng['domains']['topleveldomain'] = 'Top-Level-Domain'; +$lng['admin']['accountdata'] = 'Data da Conta'; +$lng['admin']['contactdata'] = 'Data de Contato'; +$lng['admin']['servicedata'] = 'Data de Serviço'; +$lng['admin']['billingdata'] = 'Data de Faturamento'; +$lng['admin']['invoicedata'] = 'Data da Fatura'; +$lng['customer']['taxid'] = 'ID de Taxa'; +$lng['customer']['calc_tax'] = 'Calcular Taxa'; +$lng['customer']['create_contract'] = 'Criar contrato'; +$lng['customer']['contract_date'] = 'Data de contrato'; +$lng['customer']['contract_number'] = 'Descrição/Número de contrato'; +$lng['customer']['additional_service_description'] = 'Descrição adicional de serviço'; +$lng['customer']['contract_details'] = 'Detalhes do contrato'; +$lng['customer']['included_domains'] = 'Domínios Incluídos'; +$lng['customer']['additional_traffic'] = 'Tráfego Adicional'; +$lng['customer']['additional_diskspace'] = 'Espaco Web Adicional'; +$lng['customer']['term_of_payment'] = 'Termo de Pagamento (dias)'; +$lng['customer']['payment_every'] = 'Pagamento todo'; +$lng['customer']['payment_method'] = 'Método de Pagamento'; +$lng['admin']['customer_categories_once'] = 'Incluir configurações de taxas de clientes'; +$lng['admin']['customer_categories_period'] = 'Incluir intervalo de tavas de clientes'; +$lng['customer']['bankaccount_holder'] = 'Proprietário da conta'; +$lng['customer']['bankaccount_number'] = 'Número da conta'; +$lng['customer']['bankaccount_blz'] = 'Número da agência'; +$lng['customer']['bankaccount_bank'] = 'Nome do banco'; +$lng['service']['quantity'] = 'Quantidade'; +$lng['service']['interval_fee'] = 'Pausa de TAXA'; +$lng['service']['interval_length'] = 'Pausa de Tempo'; +$lng['service']['interval_payment'] = 'Pausa de Pagamento'; +$lng['service']['interval_payment_prepaid'] = 'Pré Pago'; +$lng['service']['interval_payment_postpaid'] = 'Pós Pago'; +$lng['service']['setup_fee'] = 'Configurar Taxa'; +$lng['service']['active'] = 'Ativa Serviço'; +$lng['service']['start_date'] = 'Activado desde'; +$lng['service']['end_date'] = 'Inativo desde'; +$lng['service']['lastinvoiced_date'] = 'Última fatura'; +$lng['service']['valid_from'] = 'Válido de'; +$lng['service']['valid_to'] = 'Válido para'; +$lng['invoice']['invoicenumbertemplate'] = 'H-{ano}/{número}'; +$lng['invoice']['sender'] = ''; +$lng['invoice']['invoice'] = 'Fatura'; +$lng['invoice']['cancellation'] = 'Fatura Cancelada'; +$lng['invoice']['reminder'] = 'Relembrar'; +$lng['invoice']['preview'] = 'Visualizar'; +$lng['invoice']['dateheader'] = 'Cidade, %s'; +$lng['invoice']['number'] = 'Número de fatura'; +$lng['invoice']['contract_number'] = 'Número de contrato'; +$lng['invoice']['contract_details'] = 'Detalhes de contrato'; +$lng['invoice']['contract_details_template'] = 'pacotes de hosting de acordo com o contrato de %s com %s MB espaço web, %s ' . chr(128) . ' por %s GB de espaço adicional, %s GB tráfego, %s ' . chr(128) . ' por %s GB espaço adicional; %s domínios incluidos; pagamento por intervalo %s %s.'; +$lng['invoice']['period'] = 'Período de faturamento'; +$lng['invoice']['header'][0] = 'Pos'; +$lng['invoice']['header'][1] = 'Descrição'; +$lng['invoice']['header'][2] = 'Período'; +$lng['invoice']['header'][3] = 'Net [' . chr(128) . ']'; +$lng['invoice']['header'][4] = 'Tax [' . chr(128) . ']'; +$lng['invoice']['header'][5] = '%'; +$lng['invoice']['header'][6] = 'Total [' . chr(128) . ']'; +$lng['invoice']['subtotal'] = 'Subtotal'; +$lng['invoice']['tax'] = 'Taxa (%s%%)'; +$lng['invoice']['credit_note'] = 'Nota de crédito'; +$lng['invoice']['total'] = 'Total'; +$lng['invoice']['payment_methods'][0] = 'Rechnungsbetrag zahlbar innerhalb von %s Tagen.' . "\n" . 'Da uns noch keine Lastschrift-Einzugsermächtigung von Ihnen vorliegt, bitten wir Sie die Rechnung per Überweisung auf unser Konto zu begleichen. Falls auch Sie am Lastschriftverfahren teilnehmen möchten, füllen Sie bitte das angefügte Formular aus und senden Sie es per Post an uns zurück.'; +$lng['invoice']['payment_methods'][1] = 'The invoiceamount will be charged in the next days of your account at %s, Customernumer %s, Bank Code %s via direct debit.'; +$lng['invoice']['tax_text']['line'] = 'VAT-IdNr. %s: %s' . "\n"; +$lng['invoice']['tax_text']['client'] = 'do cliente'; +$lng['invoice']['state'] = 'Estado'; +$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_INVOICED] = 'Faturado'; +$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_SENT] = 'Enviado'; +$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_PAID] = 'Pago'; +$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_CANCELLED_NO_REINVOICE] = 'Cancelado (Sem Refaturar)'; +$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_CANCELLED_REINVOICE_WITHOUT_CREDIT_NOTE] = 'Cancelado (Refaturado, sem notas de crédito)'; +$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_CANCELLED_REINVOICE_WITH_CREDIT_NOTE] = 'Cancelado (Refaturado, com notas de crédito)'; +$lng['invoice']['states'][CONST_BILLING_INVOICESTATE_CANCELLED_REINVOICED] = 'Cancelado (Fefaturado)'; +$lng['invoice']['state_change'] = 'Último Estado Alterado'; +$lng['invoice']['change_state'] = 'Trocar estado de fatura'; +$lng['invoice']['total_fee'] = 'w/o tax'; +$lng['invoice']['total_fee_taxed'] = 'Total'; +$lng['invoice']['fix'] = 'Corrigir Fatura'; +$lng['invoice']['pdf'] = 'Criar PDF'; +$lng['invoice']['create_reminder'] = 'Criar lembrete'; +$lng['invoice']['changelog'] = 'Log de alterações'; +$lng['invoice']['deleted_line'] = 'A linha foi apagada'; +$lng['invoice']['original_value'] = 'Valor Original'; +$lng['invoice']['page_footer'] = 'Página %s de %s'; +$lng['billing']['billing'] = 'Faturamento'; +$lng['billing']['invoices'] = 'Faturas'; +$lng['billing']['invoices_admin'] = 'Faturas (Admins)'; +$lng['billing']['openinvoices'] = 'Faturas Abertas'; +$lng['billing']['openinvoices_admin'] = 'Faturas Abertas (Admins)'; +$lng['billing']['cacheinvoicefees'] = 'Atualizar lista'; +$lng['billing']['invoice'] = 'Faturas'; +$lng['billing']['invoice_date'] = 'Data de fatura'; +$lng['billing']['invoice_fee'] = 'Pagamento de fatura'; +$lng['billing']['preview'] = 'Visualizar'; +$lng['billing']['caption'] = 'Título'; +$lng['billing']['number'] = 'Número de Fatura'; +$lng['billing']['caption_setup'] = 'Título para taxa'; +$lng['billing']['caption_interval'] = 'Título para intervalo de taxa'; +$lng['billing']['template'] = 'Modelo'; +$lng['billing']['interval'] = 'Intervalo'; +$lng['billing']['other'] = 'Outros Serviços'; +$lng['billing']['other_add'] = 'Adicionar Outro Serviço'; +$lng['billing']['other_edit'] = 'Editar Outro Serviço'; +$lng['billing']['taxclassesnrates'] = 'Classes e Níveis de taxa'; +$lng['billing']['taxclass'] = 'Classe de Taxa'; +$lng['billing']['taxrate'] = 'Nivel de Taxa'; +$lng['billing']['taxrate_add'] = 'Adicionar Taxa'; +$lng['billing']['taxrate_edit'] = 'Editar Taxa'; +$lng['billing']['domains_templates'] = 'Modelos de Domínios'; +$lng['billing']['domains_templates_add'] = 'Adicionar modelo de domínio'; +$lng['billing']['domains_templates_edit'] = 'Editar modelo de domínio'; +$lng['billing']['other_templates'] = 'Outros modelos de serviços'; +$lng['billing']['other_templates_add'] = 'Adicionar outro modelo de serviço'; +$lng['billing']['other_templates_edit'] = 'Editar outro modelo de serviço'; +$lng['billing']['categories']['hosting_caption'] = 'Hospedagem'; +$lng['billing']['categories']['hosting_rowcaption_setup'] = 'Contrato de Hospedagem - Configurar Pagamento'; +$lng['billing']['categories']['hosting_rowcaption_interval'] = 'Contrato de Hospedagem'; +$lng['billing']['categories']['hosting_rowcaption_setup_withloginname'] = 'Contrato de Hospedagem ({loginname}) - Configuração de Taxa'; +$lng['billing']['categories']['hosting_rowcaption_interval_withloginname'] = 'Contrato de Hospedagem ({loginname})'; +$lng['billing']['categories']['domains_caption'] = 'Domínios'; +$lng['billing']['categories']['domains_rowcaption_setup'] = 'Domínio {domain} - Configuração de Taxa'; +$lng['billing']['categories']['domains_rowcaption_interval'] = 'Domínio {domain}'; +$lng['billing']['categories']['traffic_caption'] = 'Tráfego'; +$lng['billing']['categories']['traffic_rowcaption_setup'] = $lng['billing']['categories']['traffic_rowcaption_interval'] = 'Tráfego Usado: {traffic_total}/{traffic_included} GB'; +$lng['billing']['categories']['traffic_rowcaption_setup_unlimited'] = $lng['billing']['categories']['traffic_rowcaption_interval_unlimited'] = 'Tráfego Usado: {traffic_total}/' . $lng['customer']['unlimited'] . ' GB'; +$lng['billing']['categories']['other_caption'] = 'Outro'; +$lng['billing']['categories']['other_rowcaption_setup'] = $lng['billing']['categories']['other_rowcaption_interval'] = 'Outro'; +$lng['billing']['categories']['diskspace_caption'] = 'Espaço Web'; +$lng['billing']['categories']['diskspace_rowcaption_interval'] = 'Espaço WEB usado: {diskspace_total}/{diskspace_included} GB'; +$lng['billing']['categories']['diskspace_rowcaption_interval_unlimited'] = 'Espaço Web usado: {diskspace_total}/' . $lng['customer']['unlimited'] . ' GB'; +$lng['question']['billing_invoice_row_reallydelete'] = 'Você realmente deseja excluir este item da fatura?'; +$lng['question']['billing_invoice_row_reallyreset'] = 'Você realmente deseja cancelar todas as modificações feitas nesta fatura?'; +$lng['question']['billing_invoice_row_reallyreset_key'] = 'Você realmente deseja desfazer as alterações feitas nesta linha?'; +$lng['question']['billing_domains_template_reallydelete'] = 'Voce deseja deletar o template %s'; +$lng['question']['billing_other_template_reallydelete'] = 'Voce deseja deletar o template %s'; +$lng['question']['billing_other_service_reallydelete'] = 'Voce deseja deletar este serviço?'; +$lng['question']['billing_taxrate_reallydelete'] = 'Você realmente deseja excluir esta taxrate?'; +$lng['serversettings']['allow_password_reset']['description'] = 'Os clientes podem redefinir sua senha e serão enviadas para seu endereço de e-mail'; +$lng['serversettings']['allow_password_reset_admin']['title'] = 'Ativa reset de senhas pelos administradores'; +$lng['serversettings']['allow_password_reset_admin']['description'] = 'Admins / Revendedor pode redefinir sua senha e a nova senha será enviada para seu endereço de e-mail'; +$lng['admin']['edit_billingdata'] = 'Pode editar data de faturamento'; +$lng['error']['service_still_active'] = 'Serviço continua ativo.'; +$lng['admin']['billingsettings'] = 'Configurações de faturamento'; +$lng['serversettings']['billing']['activate_billing']['title'] = 'Ativar faturamento'; +$lng['serversettings']['billing']['activate_billing']['description'] = 'Aqui você pode ativar / desativar o sistema de faturamento a nível global.'; +$lng['serversettings']['billing']['highlight_inactive']['title'] = 'Inativos destaque de faturamentos'; +$lng['serversettings']['billing']['highlight_inactive']['description'] = 'Caso as linhas, cujo faturamento não estiver ativo, será destacada?'; +$lng['serversettings']['billing']['invoicenumber_count']['title'] = 'Numero da Fatura Atual'; +$lng['serversettings']['billing']['invoicenumber_count']['description'] = 'Este é o número fixo de faturas. Mudanças podem resultar em problemas com o contador de faturas.'; +$lng['emails']['quota_type']['byte'] = 'B'; +$lng['emails']['quota_type']['kilobyte'] = 'KB'; +$lng['emails']['quota_type']['megabyte'] = 'MB'; +$lng['emails']['quota_type']['gigabyte'] = 'GB'; +$lng['emails']['quota_type']['terabyte'] = 'TB'; +$lng['emails']['quota_type']['petabyte'] = 'PB'; +$lng['panel']['not_supported'] = 'Não suportado em:'; +$lng['menue']['email']['autoresponder'] = 'Auto-Responder'; +$lng['autoresponder']['active'] = 'Ativar'; +$lng['autoresponder']['autoresponder_add'] = 'Adicionar Auto-Responder'; +$lng['autoresponder']['autoresponder_edit'] = 'Edita Auto-Responder'; +$lng['autoresponder']['autoresponder_new'] = 'Criar novo Auto-Responder'; +$lng['autoresponder']['subject'] = 'Assunto'; +$lng['autoresponder']['message'] = 'Mensagem'; +$lng['autoresponder']['account'] = 'Aconta'; +$lng['autoresponder']['sender'] = 'Remetente'; +$lng['question']['autoresponderdelete'] = 'Você deseja apagar o auto-responder?'; +$lng['error']['noemailaccount'] = 'Pode haver duas razões pelas quais você não pode criar uma nova resposta automática: Você precisará de pelo menos um e-mail para criar um novo utilitário de resposta automática. Em segundo lugar, pode ser possível que todas as contas já tenham uma resposta automática configuradas'; +$lng['error']['missingfields'] = 'Nem todos os campos necessários estavam no campo.'; +$lng['error']['accountnotexisting'] = 'Esta conta não existe.'; +$lng['error']['autoresponderalreadyexists'] = 'Já existe um auto-responder configurado para esta conta.'; +$lng['error']['invalidautoresponder'] = 'Esta determinada está inválida.'; +$lng['serversettings']['autoresponder_active']['title'] = 'Usar módulo de auto-responder'; +$lng['serversettings']['autoresponder_active']['description'] = 'Você deseja utilizar o módulo do auto-responder? Uma tarefa extra no cron deve ser configurada.'; +$lng['invoice']['active'] = 'Fatura ativa'; +$lng['admin']['security_settings'] = 'Opções de Segurança'; +$lng['admin']['know_what_youre_doing'] = 'Somente altere, se você sabe o que está fazendo'; +$lng['admin']['show_version_login']['title'] = 'Mostrar versão do Froxlor no login'; +$lng['admin']['show_version_login']['description'] = 'Mostar a versão do Froxlor no rodapé da página de login'; +$lng['admin']['show_version_footer']['title'] = 'Mostar versão do Froxlor no rodapé'; +$lng['admin']['show_version_footer']['description'] = 'Mostar a versão do Froxlor no rodapé do resto das páginas'; +$lng['admin']['froxlor_graphic']['title'] = 'Cabeçalho gráfico do Froxlor'; +$lng['admin']['froxlor_graphic']['description'] = 'Quais gráficos devem aparece no topor'; +$lng['menue']['phpsettings']['maintitle'] = 'Configurações do PHP'; +$lng['admin']['phpsettings']['title'] = 'Configurações do PHP'; +$lng['admin']['phpsettings']['description'] = 'Descrição'; +$lng['admin']['phpsettings']['actions'] = 'Ações'; +$lng['admin']['phpsettings']['activedomains'] = 'Em uso pelo(s) domínio(s)'; +$lng['admin']['phpsettings']['notused'] = 'Configuração não está em uso'; +$lng['admin']['misc'] = 'Variados'; +$lng['admin']['phpsettings']['editsettings'] = 'Alterar Configuração do PHP'; +$lng['admin']['phpsettings']['addsettings'] = 'Criar novas configurações do PHP'; +$lng['admin']['phpsettings']['viewsettings'] = 'Visualizar Configuração do PHP'; +$lng['admin']['phpsettings']['phpinisettings'] = 'Configurações do php.ini'; +$lng['error']['nopermissionsorinvalidid'] = 'Você não tem permissões suficientes para alterar essa configuração ou um ID inválido foi dado.'; +$lng['panel']['view'] = 'Visualizar'; +$lng['question']['phpsetting_reallydelete'] = 'Você realmente deseja apagar esta configuração? Todos os domínios que atualmente utilizam esta configuração serão alterada para a configuração padrão.'; +$lng['admin']['phpsettings']['addnew'] = 'Criar novas configurações'; +$lng['error']['phpsettingidwrong'] = 'Não existe uma configuração de PHP para este ID'; +$lng['error']['descriptioninvalid'] = 'A descrição é muito curta, muito longa ou contem carácters ilegais'; +$lng['error']['info'] = 'Iinformações'; +$lng['admin']['phpconfig']['template_replace_vars'] = 'As variáveis que serão substituídas nas Configurações'; +$lng['admin']['phpconfig']['safe_mode'] = 'Vai ser substituído pelas configurações seguras deste domínios.'; +$lng['admin']['phpconfig']['pear_dir'] = 'Serão substituídos com a definição global para o diretório pear.'; +$lng['admin']['phpconfig']['open_basedir'] = 'Serão substituídos com a definição do domínio open_basedir.'; +$lng['admin']['phpconfig']['tmp_dir'] = 'Substituído com o diretório temporário do domínio.'; +$lng['admin']['phpconfig']['open_basedir_global'] = 'Serão substituídos com o valor global do caminho que será anexado ao open_basedir.'; +$lng['admin']['phpconfig']['customer_email'] = 'Serão substituídos com o endereço de e-mail do cliente que é dono desse domínio.'; +$lng['admin']['phpconfig']['admin_email'] = 'Serão substituídos por e-mail do administrador quem possui esse domínio.'; +$lng['admin']['phpconfig']['domain'] = 'Serão substituídos com o domínio.'; +$lng['admin']['phpconfig']['customer'] = 'Será substituída pelo nome do login do cliente que é dono desse domínio.'; +$lng['admin']['phpconfig']['admin'] = 'Será substituída pelo nome de login do administrador que possui esse domínio.'; +$lng['login']['backtologin'] = 'Voltar ao Login'; +$lng['serversettings']['mod_fcgid']['starter']['title'] = 'Processos por domínio'; +$lng['serversettings']['mod_fcgid']['starter']['description'] = 'Quantos processos devem ser iniciadas / permitidas por domínio? O valor 0 é recomendado. O PHP irá então gerir a quantidade de processos.'; +$lng['serversettings']['mod_fcgid']['wrapper']['title'] = 'Wrapper in Vhosts'; +$lng['serversettings']['mod_fcgid']['wrapper']['description'] = 'Como os wrapper vão ser incluídos nos vhosts'; +$lng['serversettings']['mod_fcgid']['tmpdir']['description'] = 'Aonde os arquivos temporários devem ser guardados'; +$lng['serversettings']['mod_fcgid']['peardir']['title'] = 'Diretórios globais do PEAR'; +$lng['serversettings']['mod_fcgid']['peardir']['description'] = 'Diretórios globais do PEAR que deverão ser substituídos em cada configuração php.ini? Diferentes diretórios devem ser separados por dois pontos.'; +$lng['admin']['templates']['index_html'] = 'Indice de arquivo recém-criado no diretório de cliente'; +$lng['admin']['templates']['SERVERNAME'] = 'Substitua pelo nome do servidor.'; +$lng['admin']['templates']['CUSTOMER'] = 'Substitua pelo login do cliente.'; +$lng['admin']['templates']['ADMIN'] = 'Substitua pelo login do admin.'; +$lng['admin']['templates']['CUSTOMER_EMAIL'] = 'Substitua pelo endereço de email do cliente.'; +$lng['admin']['templates']['ADMIN_EMAIL'] = 'Substitua pelo endereço de email do administrador.'; +$lng['admin']['templates']['filetemplates'] = 'Modelo de Arquivo'; +$lng['admin']['templates']['filecontent'] = 'Conteúdo do Arquivo'; +$lng['error']['filecontentnotset'] = 'O arquivo não pode ser vazio'; +$lng['serversettings']['index_file_extension']['description'] = 'Qual extensão deve ser utilizada para o índice no arquivo recém-criado no diretório do cliente? Esta extensão será utilizado, se você ou um de seus administradores criou o seu próprio índice no arquivo modelo.'; +$lng['serversettings']['index_file_extension']['title'] = 'Extensão do arquivo recém-criado no Índice do diretório do cliente.'; +$lng['error']['index_file_extension'] = 'A extensão do índice do arquivo deve ficar entre 1 e 6 caracteres. A prorrogação só pode conter caracteres como az, AZ e 0-9'; +$lng['admin']['expert_settings'] = 'Configurações Avançadas'; +$lng['admin']['mod_fcgid_starter']['title'] = 'Processos PHP para este domínio (vazio para usar valor padrão)'; +$lng['admin']['aps'] = 'APS Instalado'; +$lng['customer']['aps'] = 'Instalador do APS'; +$lng['aps']['scan'] = 'Procurar por novos pacotes'; +$lng['aps']['upload'] = 'Atualizar novos pacotes'; +$lng['aps']['managepackages'] = 'Gerenciar Pacotes'; +$lng['aps']['manageinstances'] = 'Gerenciar Estâncias'; +$lng['aps']['overview'] = 'Resumo de Pacote'; +$lng['aps']['status'] = 'Meus Pacotes'; +$lng['aps']['search'] = 'Procurar por Pacotes'; +$lng['aps']['upload_description'] = 'Por favor seleciona o instalador APS (zipfiles) para istalar no sistema'; +$lng['aps']['search_description'] = 'Nome, Descrição, Palavra Chave, Versão'; +$lng['aps']['detail'] = 'Mais informação'; +$lng['aps']['install'] = 'Pacote de Instalação'; +$lng['aps']['data'] = 'Data'; +$lng['aps']['version'] = 'Versão'; +$lng['aps']['homepage'] = 'Homepage'; +$lng['aps']['installed_size'] = 'Tamanho após instalação'; +$lng['aps']['categories'] = 'Categorias'; +$lng['aps']['languages'] = 'Línguas'; +$lng['aps']['long_description'] = 'Descrição Longa'; +$lng['aps']['configscript'] = 'Configuração de Script'; +$lng['aps']['changelog'] = 'Log de Alterações'; +$lng['aps']['license'] = 'Licença'; +$lng['aps']['license_link'] = 'Caminho para Licença'; +$lng['aps']['screenshots'] = 'Screenshots'; +$lng['aps']['back'] = 'Voltar para Visão Geral'; +$lng['aps']['install_wizard'] = 'Assistente de Instalação'; +$lng['aps']['wizard_error'] = 'Yocê preencheu com dados inválidos. Por favor corrija você mesmo para continuar a instalação'; +$lng['aps']['basic_settings'] = 'Configurações Básicas'; +$lng['aps']['application_location'] = 'Local de Instalação'; +$lng['aps']['application_location_description'] = 'Local aonde a aplicação vai ser instalada'; +$lng['aps']['no_domains'] = 'Domínios não encontrados'; +$lng['aps']['database_password'] = 'Senha de Banco de Dados'; +$lng['aps']['database_password_description'] = 'Senha que deve ser utilizada para novos bancos de dados'; +$lng['aps']['license_agreement'] = 'Contrato'; +$lng['aps']['cancel_install'] = 'Cancelar Instalação'; +$lng['aps']['notazipfile'] = 'O arquivo de upload não é um arquivo .zip'; +$lng['aps']['filetoobig'] = 'O arquivo é muito grande'; +$lng['aps']['filenotcomplete'] = 'O arquivo não foi enviado corretamente'; +$lng['aps']['phperror'] = 'Ocorreu um erro interno no PHP. O código de erro é #'; +$lng['aps']['moveproblem'] = 'O script falhou em fazer o upload dos arquivos para diretório de destino. Por favor tenha certeza de que as permissões estão setadas corretamente.'; +$lng['aps']['uploaderrors'] = 'Erros de Arquivo %s
      %s
    '; +$lng['aps']['nospecialchars'] = 'Sarácters especiais não são aceitos nos termos de pesquisa'; +$lng['aps']['noitemsfound'] = 'Nenhum pacote foi encontrado'; +$lng['aps']['nopackagesinstalled'] = 'Você não tem nenhum pacote instalado.'; +$lng['aps']['instance_install'] = 'Pendência de Instalação de Pacote'; +$lng['aps']['instance_task_active'] = 'Instalação está em execução neste momento'; +$lng['aps']['instance_success'] = 'Pacote está instalado corretamente'; +$lng['aps']['instance_error'] = 'Pacote não está instalado corretamente, erros ocorreram durante a instalação'; +$lng['aps']['instance_uninstall'] = 'Pendência de Desinstalação de Pacotes'; +$lng['aps']['unknown_status'] = 'Erro, valor desconhecido'; +$lng['aps']['currentstatus'] = 'Status Atual'; +$lng['aps']['activetasks'] = 'Status de Tarejas'; +$lng['aps']['task_install'] = 'Instalação pendente'; +$lng['aps']['task_remove'] = 'Desinstação pendente'; +$lng['aps']['task_reconfigure'] = 'Reconfiguração Pendente'; +$lng['aps']['task_upgrade'] = 'Atualizar pendência'; +$lng['aps']['no_task'] = 'Sem tarefas pendentes'; +$lng['aps']['applicationlinks'] = 'Links de Aplicações'; +$lng['aps']['mainsite'] = 'Site Principal'; +$lng['aps']['uninstall'] = 'Desinstalar Pacote'; +$lng['aps']['reconfigure'] = 'Alterar configurações'; +$lng['aps']['erroronnewinstance'] = 'Este pacote não pode ser instalado.

    Por favor volte a visualização de pacotes e comece uma nova instalação.'; +$lng['aps']['successonnewinstance'] = '%s vai ser instalado agora.

    Volte para "Meus Pacotes" e espere a instalação acabar. Isto pode demorar alguns minutos.'; +$lng['aps']['php_misc_handler'] = 'PHP - Não tem suporte para outras extensões além de .php .'; +$lng['aps']['php_misc_directoryhandler'] = 'PHP - Não tem suporte para diretórios.'; +$lng['aps']['asp_net'] = 'ASP.NET - Pacote não suportado'; +$lng['aps']['cgi'] = 'CGI - Pacote não suportado'; +$lng['aps']['php_extension'] = 'Extensão PHP "%s" missing'; +$lng['aps']['php_function'] = 'Função PHP "%s" missing'; +$lng['aps']['php_configuration'] = 'Configuração de PHP atual "%s" não suportado pelo pacote'; +$lng['aps']['php_configuration_post_max_size'] = 'Configuração do PHP - "post_max_size" valor muito baixo'; +$lng['aps']['php_configuration_memory_limit'] = 'Configuração do PHP - "memory_limit" valor muito baixo'; +$lng['aps']['php_configuration_max_execution_time'] = 'Configuração do PHP - "max_execution_time" valor muito baixo'; +$lng['aps']['php_general_old'] = 'PHP - Geral - Versão do PHP Muito Antiga'; +$lng['aps']['php_general_new'] = 'PHP - Geral - Versão do PHP Muito Nova'; +$lng['aps']['db_mysql_support'] = 'Base de Dados - Este pacote precisa outra base de dados do que MySQL'; +$lng['aps']['db_mysql_version'] = 'Base de Dados - Servidor MySQL é muito antigo'; +$lng['aps']['webserver_module'] = 'Servidor Web - Módulo "%s" não encontrado'; +$lng['aps']['misc_configscript'] = 'Misc - A linguagem de configuração do script não é suportadaützt.'; +$lng['aps']['misc_version_already_installed'] = 'A mesma versão do pacote já está instalada.'; +$lng['aps']['misc_version_already_installed'] = 'Mesma versão de pacote instalado.'; +$lng['aps']['misc_only_newer_versions'] = 'Por razões de segurança somente pacotes instalados podem ser reinstalados e atualizados.'; +$lng['aps']['erroronscan'] = 'Erros para %s
      %s
    '; +$lng['aps']['invalidzipfile'] = 'Erros para %s
    • Este não é um pacote valido de APS compactado!
    '; +$lng['aps']['successpackageupdate'] = '%s Pacote atualizado com sucesso'; +$lng['aps']['successpackageinstall'] = '%s Novo pacote instalado com sucesso'; +$lng['aps']['class_zip_missing'] = 'SimpleXML Class, funções exec ou funções ZIP podem estar perdidas ou desabilitadas! Para futuras informações sobre este problema procure no manual sobre este módulo'; +$lng['aps']['dir_permissions'] = 'O PHP/Servidor Web tem que estar apto em escrever nos diretórios /var/www/froxlor/temp/ e /var/www/froxlor/packages/'; +$lng['aps']['initerror'] = 'Foi encontrado erros neste módulo:
      %s
    Corrija o problema, ou o módulo não poderá ser usado!'; +$lng['aps']['iderror'] = 'ID incorretamente especificado'; +$lng['aps']['nopacketsforinstallation'] = 'Nenhum para para instalar'; +$lng['aps']['nopackagestoinstall'] = 'Nenhum pacote para visualizar ou instalar'; +$lng['aps']['nodomains'] = 'Seleciona um domínio da lisa. Se não tiver nenhum, o pacote não pode ser instalado'; +$lng['aps']['wrongpath'] = 'Either this path contains invalid characters or there is another application installed already.'; +$lng['aps']['dbpassword'] = 'Especifique uma senha com um mínimo de 8 carácters'; +$lng['aps']['error_text'] = 'Especifique um texto sem carácters especiais'; +$lng['aps']['error_email'] = 'Especifique um endereço de e-mail válido'; +$lng['aps']['error_domain'] = 'Especifique uma URL válida como http://www.exemplo.com/'; +$lng['aps']['error_integer'] = 'Especifique um valor númerico (Formato-Integer)'; +$lng['aps']['error_float'] = 'Especifique um valor númerico (Formato-Float)'; +$lng['aps']['error_password'] = 'Especifique uma senha'; +$lng['aps']['error_license'] = 'Yes, I have the license and will abide by its terms.'; +$lng['aps']['error_licensenoaccept'] = 'Você deve aceitar a licença de instalação desta aplicação'; +$lng['aps']['stopinstall'] = 'Cancelar Instalação'; +$lng['aps']['installstopped'] = 'A instalação deste pacote foi cancelada com sucesso'; +$lng['aps']['installstoperror'] = 'A instalação não pode ser abortada porque a instalação já foi iniciada. Se você deseja remover o pacote, primeiro esperer instalar, depois remova-o em "Meus Pacotes".'; +$lng['aps']['waitfortask'] = 'Não tem opções para selecionar. Espere o final de todas as tarefas para terminar'; +$lng['aps']['removetaskexisting'] = 'Existe uma tarefa para desinstação.

    Por favor volte para "Meus Pacotes" e espere terminar.'; +$lng['aps']['packagewillberemoved'] = 'O pacote vai ser desinstalado agora.

    Por favor volte para "Meus Pacotes" e espere terminar.'; +$lng['question']['reallywanttoremove'] = 'Você realmente deseja desinstalar este pacote?

    Todo conteúdo de banco de dados e arquivo irá ser apagado. Tenha certeza que você tem o backup para uso futuro!

    '; +$lng['aps']['searchoneresult'] = '%s pacote achado'; +$lng['aps']['searchmultiresult'] = '%s pacotes achados'; +$lng['question']['reallywanttostop'] = 'Você deseja cancelar a instalação deste pacote?'; +$lng['aps']['packagenameandversion'] = 'Nome do Pacote & Versão'; +$lng['aps']['package_locked'] = 'Destrava'; +$lng['aps']['package_enabled'] = 'Trava'; +$lng['aps']['lock'] = 'Trava'; +$lng['aps']['unlock'] = 'Destrava'; +$lng['aps']['remove'] = 'Remover'; +$lng['aps']['allpackages'] = 'Todos os pacotes'; +$lng['question']['reallyremovepackages'] = 'Do you really want to delete this packages?

    Packages with dependencies can only be remove if the corresponding Instances have been removed!

    '; +$lng['aps']['nopackagesinsystem'] = 'There were no packages installed in the system which could be managed.'; +$lng['aps']['packagenameandstatus'] = 'Nome do Pacote & Status'; +$lng['aps']['activate_aps']['title'] = 'A\'tiva instalados APS'; +$lng['aps']['activate_aps']['description'] = 'Aqui o instalador do APS pode ser ativado ou desativado globalmente'; +$lng['aps']['packages_per_page']['title'] = 'Pacotes por página'; +$lng['aps']['packages_per_page']['description'] = 'Quantos pacotes devem aparecer por página para os clientes '; +$lng['aps']['upload_fields']['title'] = 'Upload de campos por página'; +$lng['aps']['upload_fields']['description'] = 'Quantos campos devem aparecer por página para a instalação de novos pacotes no sistema?'; +$lng['aps']['exceptions']['title'] = 'Exceção para validação de pacote'; +$lng['aps']['exceptions']['description'] = 'Some packages need special configuration parameters or modules. The Installer cannot always determine if this options/extensions are available. For this reason you can now define exceptions that packages can be installed in the system. Do only select options which match your real configuration setup. For further information about this problem look into the handbook for this module.'; +$lng['aps']['settings_php_extensions'] = 'Extensões do PHP'; +$lng['aps']['settings_php_configuration'] = 'Configuração do PHP'; +$lng['aps']['settings_webserver_modules'] = 'Módulos do Webserver'; +$lng['aps']['settings_webserver_misc'] = 'Servidor Web Variados'; +$lng['aps']['specialoptions'] = 'Opções Especiais'; +$lng['aps']['removeunused'] = 'Remover pacotes não usados'; +$lng['aps']['enablenewest'] = 'Ativa nova versão de pacote, tranca outras'; +$lng['aps']['installations'] = 'Instalações'; +$lng['aps']['statistics'] = 'Estatísticas'; +$lng['aps']['numerofpackagesinstalled'] = '%s pacotes instalados'; +$lng['aps']['numerofpackagesenabled'] = '%s pacotes ativos'; +$lng['aps']['numerofpackageslocked'] = '%s Pacotes Trancados'; +$lng['aps']['numerofinstances'] = '%s Instalação de todos
    '; +$lng['question']['reallydoaction'] = 'Do you really want to execute the selected actions?

    Data which can be lost by continuing, cannot be restored later.

    '; +$lng['aps']['linktolicense'] = 'Caminho para Licença'; +$lng['aps']['initerror_customer'] = 'Existe um problema com esta extensão do Froxlor. Contate seu administrador para maiores informações.'; +$lng['aps']['numerofinstancessuccess'] = '%s instalações executadas'; +$lng['aps']['numerofinstanceserror'] = '%s instalações falhadas'; +$lng['aps']['numerofinstancesaction'] = '%s planejou instalações/desinstalações'; +$lng['aps']['downloadallpackages'] = 'Fazer download de todos os pacotes da distribuição do servidor'; +$lng['aps']['updateallpackages'] = 'Atualizar todos os pacote pela distribuição do servidor'; +$lng['aps']['downloadtaskexists'] = 'Existe downloads em andamento. Por favor espere terminar.'; +$lng['aps']['downloadtaskinserted'] = 'Uma tarefa de download de fotos os pacotes foi criada. Esta tarefa pode demorar alguns minutos.'; +$lng['aps']['updatetaskexists'] = 'Existe uma atualização em andamento. Por favor espere esta atualização terminar.'; +$lng['aps']['updatetaskinserted'] = 'Uma tarefa para a atualização de todos os pacotes foi criado. Esta tarefa pode demorar alguns minutos.'; +$lng['aps']['canmanagepackages'] = 'Pode gerenciar pacotes APS'; +$lng['aps']['numberofapspackages'] = 'Quantia de instalações APS'; +$lng['aps']['allpackagesused'] = 'Erro

    Você já atingiu o número máximo de instalação de apliçações APS'; +$lng['aps']['noinstancesexisting'] = 'Não existem estâncias para administrar.'; +$lng['error']['customerdoesntexist'] = 'O cliente que você escolheu não existe'; +$lng['error']['admindoesntexist'] = 'O administrador que você escolheu não existe'; +$lng['serversettings']['system_realtime_port']['title'] = 'Porta para Froxlor em tempo real'; +$lng['serversettings']['system_realtime_port']['description'] = 'Froxlor connects to this port at localhost everytime a new cron task is scheduled. If value is 0 (zero), this feature ist deactivated.
    See also: Make Froxlor work in realtime (Froxlor Wiki)'; +$lng['serversettings']['session_allow_multiple_login']['title'] = 'AAtiva login múltiplo'; +$lng['serversettings']['session_allow_multiple_login']['description'] = 'Se ativado um usuário pode ter múltiplos logins'; +$lng['serversettings']['panel_allow_domain_change_admin']['title'] = 'Ativa mover domínios entre admins'; +$lng['serversettings']['panel_allow_domain_change_admin']['description'] = 'If activated you can change the admin of a domain at domainsettings.
    Attention: If a customer isn\'t assigned to the same admin as the domain, the admin can see every other domain of that customer!'; +$lng['serversettings']['panel_allow_domain_change_customer']['title'] = 'Ativa mover domínios entre clientes'; +$lng['serversettings']['panel_allow_domain_change_customer']['description'] = 'Se ativado você pode trocar o cliente de um domínio para administração de outro.
    Attention: Froxlor não troca nenhum caminho. Isto pode fazer com que domínios parem de funcionar'; +$lng['domains']['associated_with_domain'] = 'Associado'; +$lng['domains']['aliasdomains'] = 'Encaminhamento de domínios'; +$lng['error']['ipportdoesntexist'] = 'A combinação de IP/Porta que você escolheu não existe'; +$lng['admin']['phpserversettings'] = 'Configuração do PHP'; +$lng['admin']['phpsettings']['binary'] = 'Binário do PHP'; +$lng['admin']['phpsettings']['file_extensions'] = 'Extensões de arquivos'; +$lng['admin']['phpsettings']['file_extensions_note'] = '(Sem pontos, separados por espaços)'; +$lng['admin']['mod_fcgid_maxrequests']['title'] = 'Máximo de requisições php para este domínio (vazio para valor default)'; +$lng['serversettings']['mod_fcgid']['maxrequests']['title'] = 'Máximo de solicitações por Domínio'; +$lng['serversettings']['mod_fcgid']['maxrequests']['description'] = 'Quantas solicitações serão aceitas por domínio?'; + +?> diff --git a/lng/russian.lng.php b/lng/russian.lng.php index 661b5d42..46a87718 100644 --- a/lng/russian.lng.php +++ b/lng/russian.lng.php @@ -1,1406 +1,1406 @@ - - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Language - * @version $Id$ - */ - -/** - * Global - */ - -$lng['translator'] = 'Konstantin Samofejew (Константин Самофеев)'; -$lng['panel']['edit'] = 'редактировать'; - -// bearbeiten - -$lng['panel']['delete'] = 'удалить'; - -// loeschen - -$lng['panel']['create'] = 'создать'; - -// anlegen - -$lng['panel']['save'] = 'Сохранить'; - -// Speichern - -$lng['panel']['yes'] = 'Да'; - -// Ja - -$lng['panel']['no'] = 'Нет'; - -// Nein - -$lng['panel']['emptyfornochanges'] = 'оставить пустым, если без изменений'; - -// leer fuer keine Aenderung - -$lng['panel']['emptyfordefault'] = 'оставить пустым для стандартного значения'; - -// leer fuer Standardeinstellung - -$lng['panel']['path'] = 'Путь'; - -// Pfad - -$lng['panel']['toggle'] = 'Переключить'; - -// Umschalten - -$lng['panel']['next'] = 'дальше'; - -// weiter - -$lng['panel']['dirsmissing'] = 'Каталоги (директории) не существуют или не читаемы'; - -// Verzeichnisse nicht verfuegbar oder lesbar - -/** - * Login - */ - -$lng['login']['username'] = 'Пользователь'; - -// Benutzername - -$lng['login']['password'] = 'Пароль'; - -// Passwort - -$lng['login']['language'] = 'Язык'; - -// Sprache - -$lng['login']['login'] = 'Войти'; - -// Anmelden - -$lng['login']['logout'] = 'Выйти'; - -// Abmelden - -$lng['login']['profile_lng'] = 'Язык профиля'; - -// Profilsprache - -/** - * Customer - */ - -$lng['customer']['documentroot'] = 'Домашний каталог (директория)'; - -// Heimverzeichnis - -$lng['customer']['name'] = 'Фамилия'; - -// Name - -$lng['customer']['firstname'] = 'Имя'; - -// Vorname - -$lng['customer']['company'] = 'Фирма'; - -// Firma - -$lng['customer']['street'] = 'Улица, дом, квартира'; - -// Strasse, Haus, App. - -$lng['customer']['zipcode'] = 'Почтовый индекс'; - -// PLZ - -$lng['customer']['city'] = 'Город'; - -// Ort - -$lng['customer']['phone'] = 'Телефон'; - -// Telephon - -$lng['customer']['fax'] = 'Факс'; - -// Fax - -$lng['customer']['email'] = 'eMail'; - -// eMail - -$lng['customer']['customernumber'] = 'Номер клиента'; - -// KundenNummer - -$lng['customer']['diskspace'] = 'Объём под Web (MB)'; - -// Webspace (MB) - -$lng['customer']['traffic'] = 'Трафик (GB)'; - -// Traffic (GB) - -$lng['customer']['mysqls'] = 'Базы данных MySQL'; - -// MySQL-Datenbanken - -$lng['customer']['emails'] = 'Адреса eMail'; - -// eMail-Adressen - -$lng['customer']['accounts'] = 'Аккаунты eMail'; - -// eMail-Konten - -$lng['customer']['forwarders'] = 'Пересылки eMail (forwarder)'; - -// eMail-Weiterleitungen - -$lng['customer']['ftps'] = 'Аккаунты FTP'; - -// FTP-Accounts - -$lng['customer']['subdomains'] = 'Поддомены'; - -// Sub-Domain(s) - -$lng['customer']['domains'] = 'Домены'; - -// Domain(s) - -$lng['customer']['unlimited'] = 'без ограничений'; - -// unendlich - -/** - * Customermenue - */ - -$lng['menue']['main']['main'] = 'Общие настройки'; - -// Allgemein - -$lng['menue']['main']['changepassword'] = 'Изменить пароль'; - -// Passwort aendern - -$lng['menue']['main']['changelanguage'] = 'Изменить язык'; - -// Sprache aendern - -$lng['menue']['email']['email'] = 'eMail'; - -// eMail - -$lng['menue']['email']['emails'] = 'Адреса'; - -// Adressen - -$lng['menue']['email']['webmail'] = 'WebMail'; - -// WebMail - -$lng['menue']['mysql']['mysql'] = 'MySQL'; - -// MySQL - -$lng['menue']['mysql']['databases'] = 'Базы данных'; - -// Datenbanken - -$lng['menue']['mysql']['phpmyadmin'] = 'phpMyAdmin'; - -// phpMyAdmin - -$lng['menue']['domains']['domains'] = 'Домены'; - -// Domains - -$lng['menue']['domains']['settings'] = 'Настройки'; - -// Einstellungen - -$lng['menue']['ftp']['ftp'] = 'FTP'; - -// FTP - -$lng['menue']['ftp']['accounts'] = 'Аккаунты'; - -// Accounts - -$lng['menue']['ftp']['webftp'] = 'WebFTP'; - -// WebFTP - -$lng['menue']['extras']['extras'] = 'Разное'; - -// Extras - -$lng['menue']['extras']['directoryprotection'] = 'Защита каталогов (директорий)'; - -// Verzeichnisschutz - -$lng['menue']['extras']['pathoptions'] = 'Настройки путей'; - -// Pfadoptionen - -/** - * Index - */ - -$lng['index']['customerdetails'] = 'Данные клиентов'; - -// Kundendaten - -$lng['index']['accountdetails'] = 'Данные аккаунтов'; - -// Accountdaten - -/** - * Change Password - */ - -$lng['changepassword']['old_password'] = 'Старый пароль'; - -// Altes Passwort - -$lng['changepassword']['new_password'] = 'Новый пароль'; - -// Neues Passwort - -$lng['changepassword']['new_password_confirm'] = 'Новый пароль (повторить)'; - -// Neues Passwort (bestaetigen) - -$lng['changepassword']['new_password_ifnotempty'] = 'Новый пароль (оставить пустым, чтобы не менять)'; - -// Neues Passwort (leer = nicht aendern) - -$lng['changepassword']['also_change_ftp'] = ' Также изменить пароль и для основного аккаунта FTP'; - -// Auch Passwort vom Haupt-FTP-Zugang aendern - -/** - * Domains - */ - -$lng['domains']['description'] = 'Здесь Вы можете создавать поддомены и менять пути к ним.
    После каждого изменения системе необходимо немного времени, чтобы загрузить обновлённые настройки.'; - -// Hier koennen Sie (Sub-)Domains erstellen und deren Pfade aendern.
    Nach jeder Aenderung braucht das System etwas Zeit um die Konfiguration neu einzulesen. - -$lng['domains']['domainsettings'] = 'Настройки домена'; - -// Domaineinstellungen - -$lng['domains']['domainname'] = 'Имя домена'; - -// Domainname - -$lng['domains']['subdomain_add'] = 'Создать поддомен'; - -// Subdomain anlegen - -$lng['domains']['subdomain_edit'] = 'Обработать (под)домен'; - -// (Sub-)Domain bearbeiten - -$lng['domains']['wildcarddomain'] = 'Занести как уайлдкард-домен? (Wildcard)'; - -// Als Wildcarddomain eintragen? - -$lng['domains']['aliasdomain'] = 'Алиас для домена'; - -// Alias fuer Domain - -$lng['domains']['noaliasdomain'] = 'Не алиас-домен'; - -// Keine Aliasdomain - -/** - * eMails - */ - -$lng['emails']['description'] = 'Здесь Вы можете настроить Ваши email-адреса.
    Аккаунт - это как обычный почтовый ящик. Если Вам кто-то напишет электронное письмо (email), оно попадёт в этот ящик.

    Данные для Вашей почтовй программы: (Текст с наклоном замените на Ваши данные!)
    Сервер: имя домена
    Имя пользователя: имя аккаунта или email-адрес
    Пароль: выбранный Вами пароль'; - -// Hier koennen Sie Ihre eMail Adressen einrichten.
    Ein Konto ist wie Ihr Briefkasten vor der Haustuere. Wenn jemand eine email an Sie schreibt, dann wird diese in dieses Konto gelegt.

    Die Zugangsdaten von Ihrem Mailprogramm sind wie folgt: (Die Angaben in kursiver Schrift sind durch die jeweiligen Eintraege zu ersetzen!)
    Hostname: Domainname
    Benutzername: Kontoname / eMail-Adresse
    Passwort: das gewaehlte Passwort - -$lng['emails']['emailaddress'] = 'eMail-адрес'; - -// eMail-Adresse - -$lng['emails']['emails_add'] = 'создать eMail-адрес'; - -// eMail-Adresse anlegen - -$lng['emails']['emails_edit'] = 'изменить eMail-адрес'; - -//eMail-Adresse aendern - -$lng['emails']['catchall'] = 'С функцией "лови всё" (catchall)'; - -// Catchall - -$lng['emails']['iscatchall'] = 'Сделать catchall-адресом?'; - -// Als catchall-Adresse definieren? - -$lng['emails']['account'] = 'Аккаунт'; - -// Konto - -$lng['emails']['account_add'] = 'Создать аккаунт'; - -// Konto anlegen - -$lng['emails']['account_delete'] = 'Удалить аккаунт'; - -// Konto loeschen - -$lng['emails']['from'] = 'От'; - -// Von - -$lng['emails']['to'] = 'Куда'; - -// Nach - -$lng['emails']['forwarders'] = 'Пересылка'; - -// Weiterleitungen - -$lng['emails']['forwarder_add'] = 'Добавить пересылку'; - -// Weiterleitung hinzufuegen - -/** - * FTP - */ - -$lng['ftp']['description'] = 'Здесь Вы можете создать дополнительные FTP-аккаунты.
    FTP-аккаунты активны сразу после сохранения изменений.'; - -// Hier koennen Sie zusaetzliche FTP-Accounts einrichten.
    Die Aenderungen sind sofort wirksam und die FTP-Accounts sofort benutzbar. - -$lng['ftp']['account_add'] = 'Создать аккаунт'; - -// Account anlegen - -/** - * MySQL - */ - -$lng['mysql']['databasename'] = 'Имя пользователя / базы данных'; - -// Benutzer-/Datenbankname - -$lng['mysql']['databasedescription'] = 'Описание базы данных'; - -// Datenbankbezeichnung - -$lng['mysql']['database_create'] = 'Создать базу данных'; - -// Datenbank anlegen - -/** - * Extras - */ - -$lng['extras']['description'] = 'Здесь Вы можете сделать дополнительные настройки, например защиту каталога (директории).
    После каждого изменения системе необходимо немного времени, чтобы загрузить обновлённые настройки.'; - -// Hier koennen Sie zusaetzliche Extras einrichten, wie zum Beispiel Verzeichnisschutz.
    Die Aenderungen sind erst nach einer bestimmten Zeit wirksam. - -$lng['extras']['directoryprotection_add'] = 'Создать защиту каталога'; - -// Verzeichnisschutz anlegen - -$lng['extras']['view_directory'] = 'Показать каталог'; - -// Verzeichnis anzeigen - -$lng['extras']['pathoptions_add'] = 'Добавить настройки пути'; - -// Pfadoptionen hinzufuegen - -$lng['extras']['directory_browsing'] = 'Показать содержимое каталога'; - -// Verzeichnisinhalt anzeigen - -$lng['extras']['pathoptions_edit'] = 'Изменить настройки пути'; -$lng['extras']['error404path'] = '404'; - -// 404 - -$lng['extras']['error403path'] = '403'; - -// 403 - -$lng['extras']['error500path'] = '500'; - -// 500 - -$lng['extras']['error401path'] = '401'; - -// 401 - -$lng['extras']['errordocument404path'] = 'URL к документу ошибки 404'; - -// URL zum Fehlerdokument 404 - -$lng['extras']['errordocument403path'] = 'URL к документу ошибки 403'; - -// URL zum Fehlerdokument 403 - -$lng['extras']['errordocument500path'] = 'URL к документу ошибки 500'; - -// URL zum Fehlerdokument 500 - -$lng['extras']['errordocument401path'] = 'URL к документу ошибки 401'; - -// URL zum Fehlerdokument 401 - -/** - * Errors - */ - -$lng['error']['error'] = 'Сообщение о ошибке'; - -// Fehlermeldung - -$lng['error']['directorymustexist'] = 'Файл %s должен существовать.'; - -// Das Verzeichnis %s muss existieren. Legen Sie es bitte mit Ihrem FTP-Programm an. - -$lng['error']['filemustexist'] = 'Файл %s должен существовать.'; - -// Die Datei %s muss existieren. - -$lng['error']['allresourcesused'] = 'Вы уже израсходовали все ресурсы, находящиеся в Вашем распоряжении.'; - -// Sie haben bereits alle Ihnen zur Verfuegung stehenden Ressourcen verbraucht. - -$lng['error']['domains_cantdeletemaindomain'] = 'Вы не можете удалить домен, занесённый как eMail-домен.'; - -// Sie koennen keine Domain, die als eMail-Domain verwendet wird loeschen. - -$lng['error']['domains_canteditdomain'] = 'Обработка этого домена запрещена админом.'; - -// Sie koennen diese Domain nicht bearbeiten. Dies wurde durch den Admin verweigert - -$lng['error']['domains_cantdeletedomainwithemail'] = 'Вы не можете удалить домен, который ещё используется как eMail-домен. Удалите сначала все eMail-адреса этого домена.'; - -// Sie koennen keine Domain loeschen die noch als eMail-Domain verwendet wird. Loeschen Sie zuerst alle eMail-Adressen dieser Domain. - -$lng['error']['firstdeleteallsubdomains'] = 'Прежде чем создать уайлдкард-домен (wildcard), Вам необходимо удалить все поддомены.'; - -// Sie muessen erst alle Subdomains loeschen, bevor Sie eine Wildcarddomain anlegen koennen. - -$lng['error']['youhavealreadyacatchallforthisdomain'] = 'Вы уже прописали один адрес как "лови всё" (catchall) для этого домена.'; - -// Sie haben bereits eine Adresse als Catchall fuer diese Domain definiert. - -$lng['error']['ftp_cantdeletemainaccount'] = 'Вы не можете удалить Ваш основной аккаунт.'; - -// Sie koennen Ihren Hauptaccount nicht loeschen. - -$lng['error']['login'] = 'Указанные имя пользователя или пароль не верны.'; - -// Der angegebene Benutzername/Passwort ist falsch. - -$lng['error']['login_blocked'] = 'Из-за многочисленных ошибочных попыток логина аккаунт временно закрыт.
    Пожалуйста попробуйте через ' . $settings['login']['deactivatetime'] . ' секунд ещё раз.'; - -// Dieser Account wurde aufgrund zu vieler Fehlversuche vorruebergehend geschlossen.
    Bitte versuchen Sie es in '.$settings['login']['deactivatetime'].' Sekunden erneut. - -$lng['error']['notallreqfieldsorerrors'] = 'Вы заполнили не все поля или минимум одно поле неправильно.'; - -// Sie haben nicht alle Felder oder ein Feld mit fehlerhaften Angaben ausgefuellt. - -$lng['error']['oldpasswordnotcorrect'] = 'Старый пароль не верен.'; - -// Das alte Passwort ist nicht korrekt. - -$lng['error']['youcantallocatemorethanyouhave'] = 'Вы не можете раздавать больше ресурсов, чем у Вас ещё есть.'; - -// Sie koennen nicht mehr Ressourcen verteilen als Sie noch frei haben. - -$lng['error']['mustbeurl'] = 'Вы должны указать полный адрес URL (например http://something.com/error404.htm)'; - -// Sie muessen eine vollstaendige URL angeben (z.B. http://irgendwas.de/error404.htm) - -$lng['error']['invalidpath'] = 'Вы указали не действительный адрес URL.'; - -// Sie haben keine gueltige URL ausgewaehlt (Evtl. Probleme beim Verzeichnislisting?) - -$lng['error']['stringisempty'] = 'Отсутствующие данные в поле'; - -// Fehlende Eingabe im Feld - -$lng['error']['stringiswrong'] = 'Неправильные данные в поле'; - -// Falsche Eingabe im Feld - -$lng['error']['myloginname'] = '\'' . $lng['login']['username'] . '\''; -$lng['error']['mypassword'] = '\'' . $lng['login']['password'] . '\''; -$lng['error']['oldpassword'] = '\'' . $lng['changepassword']['old_password'] . '\''; -$lng['error']['newpassword'] = '\'' . $lng['changepassword']['new_password'] . '\''; -$lng['error']['newpasswordconfirm'] = '\'' . $lng['changepassword']['new_password_confirm'] . '\''; -$lng['error']['newpasswordconfirmerror'] = 'Новый пароль и повторённый новый пароль отличаются.'; - -// Das neue Passwort und die Bestaetigung sind nicht identisch. - -$lng['error']['myname'] = '\'' . $lng['customer']['name'] . '\''; -$lng['error']['myfirstname'] = '\'' . $lng['customer']['firstname'] . '\''; -$lng['error']['emailadd'] = '\'' . $lng['customer']['email'] . '\''; -$lng['error']['mydomain'] = '\'Домен\''; - -// \'Domain\' - -$lng['error']['mydocumentroot'] = '\'Корень документа\''; - -// \'Documentroot\' - -$lng['error']['loginnameexists'] = 'Имя %s уже существует.'; - -// Login-Name %s existiert bereits. - -$lng['error']['emailiswrong'] = 'eMail-адрес %s содержит запрещённые символы или является не полным.'; - -// eMail-Adresse %s beinhaltet ungueltige Zeichen oder ist nicht vollstaendig. - -$lng['error']['loginnameiswrong'] = 'Имя %s содержит запрещённые символы.'; - -// Login-Name %s beinhaltet ungueltige Zeichen. - -$lng['error']['userpathcombinationdupe'] = 'Комбинация из имени пользователя и пути уже существует.'; - -// Kombination aus Benutzername und Pfad existiert bereits. - -$lng['error']['patherror'] = 'Общая ошибка! Путь не может быть пустым.'; - -// allgemeiner Fehler! Pfad darf nicht leer sein. - -$lng['error']['errordocpathdupe'] = 'Настройка для пути %s уже существует.'; - -// Option fuer Pfad %s existiert bereits. - -$lng['error']['adduserfirst'] = 'Сначала необходимо создать клиента.'; - -// Sie muessen zuerst einen Kunden anlegen. - -$lng['error']['domainalreadyexists'] = 'Домен %s уже в распоряжении другого клиента.'; - -// Die Domain %s wurde bereits einem Kunden zugeordnet. - -$lng['error']['nolanguageselect'] = 'Язык не выбран.'; - -// Keine Sprache ausgewaehlt. - -$lng['error']['nosubjectcreate'] = 'Вам нужно указать тему.'; - -// Sie muessen einen Betreff angeben. - -$lng['error']['nomailbodycreate'] = 'Вам нужно набрать текст сообщения.'; - -// Sie muessen einen Mail-Text eingeben. - -$lng['error']['templatenotfound'] = 'Шаблон не найден.'; - -// Template wurde nicht gefunden. - -$lng['error']['alltemplatesdefined'] = 'Вы не можете создавать шаблоны, потому-что во всех языках шаблоны уже существуют.'; - -// Sie koennen keine weiteren Templates anlegen, da bereits alle Sprachen mit Templates versorgt sind. - -$lng['error']['wwwnotallowed'] = 'Ваш поддомен не может носить имя www.'; - -// Ihre Subdomain darf nicht www heissen. - -$lng['error']['subdomainiswrong'] = 'Поддомен %s содержит недействительные символы.'; - -// Die Subdomain %s beinhaltet ungueltige Zeichen. - -$lng['error']['domaincantbeempty'] = 'Имя домена не может быть пустым.'; - -// Der Domain-Name darf nicht leer sein. - -$lng['error']['domainexistalready'] = 'Домен %s уже существует.'; - -// Die Domain %s existiert bereits. - -$lng['error']['domainisaliasorothercustomer'] = 'Выбранный алиас-домен или сам является алиас-доменом, или принадлежит другому клиенту.'; - -// Die ausgewaehlte Aliasdomain ist entweder selber eine Aliasdomain oder gehoet zu einem anderen Kunden. - -$lng['error']['emailexistalready'] = 'eMail-адрес %s уже существует.'; - -// Die eMail-Adresse %s existiert bereits. - -$lng['error']['maindomainnonexist'] = 'Основной домен %s не существует.'; - -// Die Haupt-Domain %s existiert nicht. - -$lng['error']['destinationnonexist'] = 'Занесите адрес для пересылки в поле \'Куда\'.'; - -// Bitte geben Sie Ihre Weiterleitungsadresse im Feld \'Nach\' ein. - -$lng['error']['destinationalreadyexistasmail'] = 'Пересылка на %s уже существует как активный eMail-адрес.'; - -// Die Weiterleitung zu %s exisitiert bereits als aktive eMail-Adresse. - -$lng['error']['destinationalreadyexist'] = 'Пересылка на %s уже существует.'; - -// Es gibt bereits eine Weiterleitung nach %s . - -$lng['error']['destinationiswrong'] = 'Адрес для пересылки %s содержит недействительные символы или является неполным.'; - -// Die Weiterleitungsadresse-Adresse %s beinhaltet ungueltige Zeichen oder ist nicht vollstaendig. - -$lng['error']['domainname'] = $lng['domains']['domainname']; - -/** - * Questions - */ - -$lng['question']['question'] = 'Вопрос о выполнении'; - -// Sicherheitsabfrage - -$lng['question']['admin_customer_reallydelete'] = 'Вы уверены, что хотите удалить клиента %s?
    ВНИМАНИЕ! Удалённые данные не смогут быть позже восстановлены! После этого шага Вам ещё будет необходимо от руки удалить данные из файловой системы.'; - -// Wollen Sie den Kunden %s wirklich loeschen?
    ACHTUNG! Alle Daten gehen unwiederruflich verloren! Nach dem Vorgang muessen Sie die Daten aus dem Dateisystem noch manuell entfernen. - -$lng['question']['admin_domain_reallydelete'] = 'Вы уверены, что хотите удалить домен %s?'; - -// Wollen Sie die Domain %s wirklich loeschen? - -$lng['question']['admin_domain_reallydisablesecuritysetting'] = 'Вы уверены, что хотите отключить эти важные для безопасности настройки (OpenBasedir и/или SafeMode)?'; - -// ollen Sie diese wichtigen Sicherheitseinstellungen (OpenBasedir und/oder SafeMode) wirklich deaktivieren? - -$lng['question']['admin_admin_reallydelete'] = 'Вы уверены, что хотите удалить админа %s?
    Все клиенты и домены будут переданы главному админу.'; - -// Wollen Sie den Admin %s wirklich loeschen?
    Alle Kunden und Domains werden dem Hauptadmin zugeteilt. - -$lng['question']['admin_template_reallydelete'] = 'Вы уверены, что хотите удалить шаблон %s?'; - -// Wollen Sie die Vorlage \'%s\' wirklich loeschen? - -$lng['question']['domains_reallydelete'] = 'Вы уверены, что хотите удалить домен %s?'; - -// Wollen Sie die Domain %s wirklich loeschen? - -$lng['question']['email_reallydelete'] = 'Вы уверены, что хотите удалить eMail-адрес %s?'; - -// Wollen Sie die eMail-Adresse %s wirklich loeschen? - -$lng['question']['email_reallydelete_account'] = 'Вы уверены, что хотите удалить аккаунт %s?'; - -// Wollen Sie das Konto von %s wirklich loeschen? - -$lng['question']['email_reallydelete_forwarder'] = 'Вы уверены, что хотите удалить пересылку %s?'; - -// Wollen Sie die Weiterleitung %s wirklich loeschen? - -$lng['question']['extras_reallydelete'] = 'Вы уверены, что хотите удалить защиту каталога (директории) для %s?'; - -// Wollen Sie den Verzeichnisschutz fuer %s wirklich loeschen? - -$lng['question']['extras_reallydelete_pathoptions'] = 'Вы уверены, что хотите удалить настройки для пути %s?'; - -// Wollen Sie die Optionen fuer den Pfad %s wirklich loeschen? - -$lng['question']['ftp_reallydelete'] = 'Вы уверены, что хотите удалить FTP-аккаунт %s?'; - -// Wollen Sie den FTP-Account %s wirklich loeschen? - -$lng['question']['mysql_reallydelete'] = 'Вы уверены, что хотите удалить базу данных %s?
    ВНИМАНИЕ! Все данные будут безвозвратно потеряны!'; - -// Wollen Sie die Datenbank %s wirklich loeschen?
    ACHTUNG! Alle Daten gehen unwiederruflich verloren! - -$lng['question']['admin_configs_reallyrebuild'] = 'Вы уверены, что хотите заново создать Ваши файлы настройки для Apache и Bind?'; - -// Wollen Sie wirklich Ihre Apache und Bind Konfigurationsdateien neu erstellen lassen? - -/** - * Mails - */ - -$lng['mails']['pop_success']['mailbody'] = 'Здравствуйте!\n\nВаш eMail-аккаунт {USERNAME}\nготов к пользованию.\n\nЭто автоматически созданное сообщение,\nпожалуйста не отвечайте на него.\n\nАдминистрация'; - -// Hallo,\n\nihr eMail-Konto {USERNAME}\nwurde erfolgreich eingerichtet.\n\nDies ist eine automatisch generierte\neMail, bitte antworten Sie nicht auf\ndiese Mitteilung.\n\nIhr Froxlor-Team - -$lng['mails']['pop_success']['subject'] = 'eMail-аккаунт готов к пользованию'; - -// eMail-Konto erfolgreich eingerichtet - -$lng['mails']['createcustomer']['mailbody'] = 'Здравствуйте, {FIRSTNAME} {NAME}!\n\nДанные Вашего аккаунта:\n\nИмя пользователя: {USERNAME}\nПароль: {PASSWORD}\n\nЭто автоматически созданное сообщение,\nпожалуйста не отвечайте на него.\n\nС уважением,\nАдминистрация'; - -// Hallo {FIRSTNAME} {NAME},\n\nhier ihre Accountinformationen:\n\nBenutzername: {USERNAME}\nPassword: {PASSWORD}\n\nVielen Dank,\nIhr Froxlor-Team - -$lng['mails']['createcustomer']['subject'] = 'Данные к аккаунту'; - -// Accountinformationen - -/** - * Admin - */ - -$lng['admin']['overview'] = 'Обзор'; - -// uebersicht - -$lng['admin']['ressourcedetails'] = 'Использованные ресурсы'; - -// Verbrauchte Ressourcen - -$lng['admin']['systemdetails'] = 'Подробности системы'; - -// Systemdetails - -$lng['admin']['froxlordetails'] = 'Подробности Froxlor'; - -// Froxlor-Details - -$lng['admin']['installedversion'] = 'Установленная версия'; - -// Installierte Version - -$lng['admin']['latestversion'] = 'Последняя версия'; - -// Neueste Version - -$lng['admin']['lookfornewversion']['clickhere'] = 'Запросить через веб-сервис'; - -// per Webservice abfragen - -$lng['admin']['lookfornewversion']['error'] = 'Ошибка при запросе'; - -// Fehler beim Auslesen - -$lng['admin']['resources'] = 'Ресурсы'; - -// Ressourcen - -$lng['admin']['customer'] = 'Клиент'; - -// Kunde - -$lng['admin']['customers'] = 'Клиенты'; - -// Kunden - -$lng['admin']['customer_add'] = 'Добавить клиента'; - -// Kunden anlegen - -$lng['admin']['customer_edit'] = 'Изменить данные клиента'; - -// Kunden bearbeiten - -$lng['admin']['domains'] = 'Домены'; - -// Domains - -$lng['admin']['domain_add'] = 'Добавить домен'; - -// Domain anlegen - -$lng['admin']['domain_edit'] = 'Изменить домен'; - -// Domain bearbeiten - -$lng['admin']['subdomainforemail'] = 'Поддомены в качестве eMail-доменов'; - -// Subdomains als E-Mail-Domains - -$lng['admin']['admin'] = 'Админ'; - -// Admin - -$lng['admin']['admins'] = 'Админы'; - -// Admins - -$lng['admin']['admin_add'] = 'Добавить админа'; - -// Admin anlegen - -$lng['admin']['admin_edit'] = 'Изменить данные админа'; - -// Admin bearbeiten - -$lng['admin']['customers_see_all'] = 'Может видеть всех клиентов?'; - -// Kann alle Kunden sehen? - -$lng['admin']['domains_see_all'] = 'Может видеть все домены?'; - -// Kann alle Domains sehen? - -$lng['admin']['change_serversettings'] = 'Может менять настройки сервера?'; - -// Kann Servereinstellungen bearbeiten? - -$lng['admin']['server'] = 'Сервер'; - -// Server - -$lng['admin']['serversettings'] = 'Настройки сервера'; - -// Einstellungen - -$lng['admin']['rebuildconf'] = 'Заново создать настройки'; - -// Configs neuschreiben - -$lng['admin']['stdsubdomain'] = 'Поддомен по умолчанию'; - -// Standardsubdomain - -$lng['admin']['stdsubdomain_add'] = 'Добавить поддомен по умолчанию'; - -// Standardsubdomain anlegen - -$lng['admin']['deactivated'] = 'Доступ закрыт'; - -// Gesperrt - -$lng['admin']['deactivated_user'] = 'Закрыть доступ пользователю'; - -// Benutzer sperren - -$lng['admin']['sendpassword'] = 'Послать пароль'; - -// Passwort zusenden - -$lng['admin']['ownvhostsettings'] = 'Собственные vHost-настройки'; - -// Eigene vHost-Einstellungen - -$lng['admin']['configfiles']['serverconfiguration'] = 'Настройки служб'; - -// Konfiguration - -$lng['admin']['configfiles']['files'] = 'Файлы настроек: Пожалуйста измените соответствующие файлы настроек
    или добавьте новые, если они не существуют, со следующим содержимым.
    Обратите внимание: MySQL-пароль не был заменён из соображений безопасности.
    Пожалуйста замените вручную "MYSQL_PASSWORD" на соответствующий пароль.
    Если Вы его не помните, посмотрите в файле "lib/userdata.inc.php".'; - -// Konfigurationsdateien: Bitte aendern Sie die entsprechenden Konfigurationsdateien
    oder legen sie mit dem folgenden Inhalt neu an, falls sie nicht existieren.
    Bitte beachten Sie: Das MySQL-Passwort wurde aus Sicherheitsgruenden nicht ersetzt.
    Bitte ersetzen Sie "MYSQL_PASSWORD" manuell durch das entsprechende Passwort.
    Falls Sie es vergessen haben sollten, finden Sie es in der Datei "lib/userdata.inc.php". - -$lng['admin']['configfiles']['commands'] = 'Команды: Пожалуйста выполните следующие команды в shell.'; - -// Kommandos: Bitte fuehren Sie die folgenden Kommandos in einer Shell aus. - -$lng['admin']['configfiles']['restart'] = 'Перезагрузка: Пожалуйста выполните следующие команды в shell для
    перезагрузки файлов настроек.'; - -// Neustart: Bitte fuehren Sie die folgenden Kommandos zum Neuladen
    der Konfigurationsdateuen in einer Shell aus. - -$lng['admin']['templates']['templates'] = 'Шаблоны'; - -// Vorlagen - -$lng['admin']['templates']['template_add'] = 'Добавить шаблон'; - -// Vorlage hinzufuegen - -$lng['admin']['templates']['template_edit'] = 'Изменить шаблон'; - -// Vorlage bearbeiten - -$lng['admin']['templates']['action'] = 'Операция'; - -// Aktion - -$lng['admin']['templates']['email'] = 'E-Mail'; - -// E-Mail - -$lng['admin']['templates']['subject'] = 'Тема'; - -// Betreff - -$lng['admin']['templates']['mailbody'] = 'Текст сообщения'; - -// Mailtext - -$lng['admin']['templates']['createcustomer'] = 'Приветствие нового клиента'; - -// Willkommensmail fuer neue Kunden - -$lng['admin']['templates']['pop_success'] = 'Приветствие для новых eMail-аккаунтов'; - -// Willkommensmail fuer neue E-Mail Konten - -$lng['admin']['templates']['template_replace_vars'] = 'Переменные, которые будут заменены в шаблонах:'; - -// Variablen die in den Vorlagen ersetzt werden: - -$lng['admin']['templates']['FIRSTNAME'] = 'Будет заменено именем клиента.'; - -// Wird mit dem Vornamen des Kunden ersetzt. - -$lng['admin']['templates']['NAME'] = 'Будет заменено фамилией клиента.'; - -// Wird mit dem Namen des Kunden ersetzt. - -$lng['admin']['templates']['USERNAME'] = 'Будет заменено именем пользователя нового аккаунта.'; - -// Wird mit dem Benutzernamen des neuen Kundenaccounts ersetzt. - -$lng['admin']['templates']['PASSWORD'] = 'Будет заменено паролем нового аккаунта.'; - -// Wird mit dem Passwort des neuen Kundenaccounts ersetzt. - -$lng['admin']['templates']['EMAIL'] = 'Будет заменено адресом нового POP3/IMAP-аккаунта.'; - -// Wird mit der Adresse des neuen POP3/IMAP Kontos ersetzt. - -/** - * Serversettings - */ - -$lng['serversettings']['session_timeout']['title'] = 'Срок действия сессии'; - -// Session Timeout - -$lng['serversettings']['session_timeout']['description'] = 'Как долго пользовать должен быть не активен, чтобы сессия стала недействительной? (в секундах)'; - -// Wie lange muss ein Benutzer inaktiv sein, damit die Session ungueltig wird? (Sekunden) - -$lng['serversettings']['accountprefix']['title'] = 'Приставка клиента'; - -// Kundenprefix - -$lng['serversettings']['accountprefix']['description'] = 'Какая приставка должна быть у аккаунтов клиентов?'; - -// Welchen Prefix sollen die Kundenaccounts haben? - -$lng['serversettings']['mysqlprefix']['title'] = 'Приставка для SQL'; - -// SQL-Prefix - -$lng['serversettings']['mysqlprefix']['description'] = 'Какая приставка должна быть у MySQL-аккаунтов?'; - -// Welchen Prefix sollen die MySQL-Accounts haben? - -$lng['serversettings']['ftpprefix']['title'] = 'Приставка для FTP'; - -// FTP-Prefix - -$lng['serversettings']['ftpprefix']['description'] = 'Какая приставка должна быть у FTP-аккаунтов?'; - -// Welchen Prefix sollen die FTP-Accounts haben? - -$lng['serversettings']['documentroot_prefix']['title'] = 'Каталог (директория) для документов'; - -// Documentdirectory - -$lng['serversettings']['documentroot_prefix']['description'] = 'Куда помещать данные клиентов?'; - -// Wo sollen alle Kunden liegen? - -$lng['serversettings']['logfiles_directory']['title'] = 'Каталог (директория) для протоколов'; - -//Logfilesdirectory - -$lng['serversettings']['logfiles_directory']['description'] = 'Куда помещать все протоколы (лог-файлы)?'; - -// Wo sollen alle Logfiles liegen? - -$lng['serversettings']['ipaddress']['title'] = 'IP-адрес'; - -// IP-Adresse - -$lng['serversettings']['ipaddress']['description'] = 'Какой у сервера адрес IP?'; - -// Welche IP-Adresse hat der Server? - -$lng['serversettings']['hostname']['title'] = 'Имя хоста'; - -// Hostname - -$lng['serversettings']['hostname']['description'] = 'Какое у сервера имя хоста (hostname)?'; - -// Welchen Hostname hat der Server? - -$lng['serversettings']['apachereload_command']['title'] = 'Команда для перезагрузки Apache'; - -// Apache-Reload-Command - -$lng['serversettings']['apachereload_command']['description'] = 'Как называется скрипт для перезагрузки Apache?'; - -// Wie heisst das Skript zum reloaden des Apache? - -$lng['serversettings']['bindconf_directory']['title'] = 'Каталог (директория) для настрек Bind'; - -// Bind-Config-Directory - -$lng['serversettings']['bindconf_directory']['description'] = 'Где находятся файлы настроек Bind?'; - -// Wo liegen die Bind-Konfigdateien? - -$lng['serversettings']['bindreload_command']['title'] = 'Команда для перезагрузки Bind'; - -// Bind-Reload-Command - -$lng['serversettings']['bindreload_command']['description'] = 'Как называется скрипт для перезагрузки Bind?'; - -// Wie heisst das Skript zum reloaden des Bind? - -$lng['serversettings']['binddefaultzone']['title'] = 'Зона по умолчанию для Bind'; - -// Bind-Default-Zone - -$lng['serversettings']['binddefaultzone']['description'] = 'Как называется стандартная зона для всех доменов?'; - -// Wie heisst die Default-Zone fuer alle Domains? - -$lng['serversettings']['vmail_uid']['title'] = 'Mail-Uid'; - -// Mails-Uid - -$lng['serversettings']['vmail_uid']['description'] = 'Какую UID должна использовать почтовая служба?'; - -// Welche UID sollen die Mails haben? - -$lng['serversettings']['vmail_gid']['title'] = 'Mail-Gid'; - -// Mails-Gid - -$lng['serversettings']['vmail_gid']['description'] = 'Какую GID должна использовать почтовая служба?'; - -// Welche GID sollen die Mails haben? - -$lng['serversettings']['vmail_homedir']['title'] = 'Каталог почтовой службы'; - -// Mails-Homedir - -$lng['serversettings']['vmail_homedir']['description'] = 'Где должна храниться электронная почта (eMail)?'; - -// Wo sollen die Mails liegen? - -$lng['serversettings']['adminmail']['title'] = 'Адрес отправителя'; - -// Absenderadresse - -$lng['serversettings']['adminmail']['description'] = 'Каким должен быть адрес отправителя для писем от системы?'; - -// Wie ist die Absenderadresse fuer eMails aus dem Panel? - -$lng['serversettings']['phpmyadmin_url']['title'] = 'phpMyAdmin-URL'; - -// phpMyAdmin-URL - -$lng['serversettings']['phpmyadmin_url']['description'] = 'Где находится phpMyAdmin? (начинается с http://)'; - -// Wo liegt der phpMyAdmin? (muss mit http:// beginnen) - -$lng['serversettings']['webmail_url']['title'] = 'WebMail-URL'; - -// WebMail-URL - -$lng['serversettings']['webmail_url']['description'] = 'Где находится WebMail? (начинается с http://)'; - -// Wo liegt das WebMail? (muss mit http:// beginnen) - -$lng['serversettings']['webftp_url']['title'] = 'WebFTP-URL'; - -// WebFTP-URL - -$lng['serversettings']['webftp_url']['description'] = 'Где находится WebFTP? (начинается с http://)'; - -// Wo liegt das WebFTP? (muss mit http:// beginnen) - -$lng['serversettings']['language']['description'] = 'Какой язык является языком по умолчанию?'; - -// Welche Sprache ist ihre Standardsprache? - -$lng['serversettings']['maxloginattempts']['title'] = 'Макс. попыток входа'; - -// Max Loginversuche - -$lng['serversettings']['maxloginattempts']['description'] = 'Максимальное количество попыток входа до отключения аккаунта.'; - -// Maximale Anzahl an Loginversuchen bis der Account deaktiviert wird. - -$lng['serversettings']['deactivatetime']['title'] = 'Время отключения'; - -// Laenge der Deaktivierung - -$lng['serversettings']['deactivatetime']['description'] = 'Время (в сек.), на которое отключается аккаунт.'; - -// Zeitraum (in sek.) fuer den der Account deaktiviert ist. - -$lng['serversettings']['pathedit']['title'] = 'Способ ввода пути'; - -// Pfad-Eingabemethode - -$lng['serversettings']['pathedit']['description'] = 'Выбирать путь в меню, или набирать вручную?'; - -// Soll ein Pfad via Dropdown-Menue ausgewaehlt oder manuell eingegeben werden koennen. - -/** - * CHANGED BETWEEN 1.2.12 and 1.2.13 - */ - -$lng['mysql']['description'] = 'Здесь вы можете создавать и удалять базы данных MySQL.
    Базы данных готовы к пользованию сразу после сохранения изменений.
    В меню Вы найдёте ссылку на phpMyAdmin, которым вы можете обрабатывать базы данных.

    Данные для доступа из скриптов PHP: (Текст с наклоном замените соответствующими записями!)
    Имя хоста:
    Имя пользователя: имя базы данных
    Пароль: выбранный пароль
    База данных: Имя базы данных'; - -// Hier koennen Sie MySQL-Datenbanken anlegen und loeschen.
    Die aenderungen werden sofort wirksam und die Datenbanken sofort benutzbar.
    Im Menue finden Sie einen Link zum phpMyAdmin, mit dem Sie Ihre Datenbankeninhalte einfach bearbeiten koennen.

    Die Zugangsdaten von php-Skripten sind wie folgt: (Die Angaben in kursiver Schrift sind durch die jeweiligen Eintraege zu ersetzen!)
    Hostname:
    Benutzername: Datenbankname
    Passwort: das gewaehlte Passwort
    Datenbank: Datenbankname - -/** - * ADDED BETWEEN 1.2.12 and 1.2.13 - */ - -$lng['admin']['cronlastrun'] = 'Последний крон (cron)'; - -// Last Cron - -$lng['serversettings']['paging']['title'] = 'Кол-во записей на страницу'; - -// Eintraege pro Seite - -$lng['serversettings']['paging']['description'] = 'Сколько записей показывать на одной странице? (0 = отключить разбивание на страницы)'; - -// Wieviele Eintraege sollen auf einer Seite gezeigt werden? (0 = Paging deaktivieren) - -$lng['error']['ipstillhasdomains'] = 'Комбинация IP и порта, которую вы хотите удалить, ещё прописана для минимум одного домена. Пожалуйста измените у доменов комбинацию IP и порта на другую, чтобы можно было удалить эту.'; - -// Die IP/Port Kombination, die Sie loeschen wollen ist noch bei einer oder mehreren Domains eingetragen. Bitte aendern sie die Domains vorher auf eine andere IP/Port Kombination um diese loeschen zu koennen. - -$lng['error']['cantdeletedefaultip'] = 'Вы не можете удалить стандартную для посредников комбинацию IP и порта. Пожулуйста установите другую комбинацию IP и порта как "по умолчанию", чтобы можно было удалить эту..'; - -// Sie koennen die Standard IP/Port Kombination fuer Reseller nicht loeschen. Bitte setzen Sie eine andere IP/Port Kombination als Standard um diese loeschen zu koennen. - -$lng['error']['cantdeletesystemip'] = 'Вы не можете удалить последний адрес IP в системе. Создайте новую комбинацию IP и порта для системного IP или измените IP системы.'; - -// Sie koennen die letzte System IP nicht loeschen. Entweder legen Sie eine neue IP/Port Kombination als Systemeinstellung an oder aendern die System IP. - -$lng['error']['myipaddress'] = '\'IP\''; -$lng['error']['myport'] = '\'порт\''; - -// \'Port\' - -$lng['error']['myipdefault'] = 'Вам необходимо быврать комбинацию IP и порта, которая станет стандартной комбинацией по умолчанию.'; - -// Sie muessen eine IP/Port Kombination auswaehlen, die den Standard defninieren soll. - -$lng['error']['myipnotdouble'] = 'Эта комбинация IP и порта уже существует.'; - -// Diese Kombination aus IP und Post existiert bereits. - -$lng['question']['admin_ip_reallydelete'] = 'Вы уверены, что хотите удалить IP %s?'; - -// Wollen Sie wirklich die IP %s loeschen? - -$lng['admin']['ipsandports']['ipsandports'] = 'IP-адреса и порты'; - -// IPs und Ports - -$lng['admin']['ipsandports']['add'] = 'Добавить комбинацию IP/порт'; - -// IP/Port hinzufuegen - -$lng['admin']['ipsandports']['edit'] = 'Редактировать комбинацию IP/порт'; - -// IP/Port bearbeiten - -$lng['admin']['ipsandports']['ipandport'] = 'IP/порт'; - -// IP/Port - -$lng['admin']['ipsandports']['ip'] = 'IP'; - -// IP - -$lng['admin']['ipsandports']['port'] = 'Порт'; - -// Port - -/** - * ADDED BETWEEN 1.2.13 and 1.2.14 - */ - -$lng['panel']['translator'] = 'Переводчик'; - -// Uebersetzer - -$lng['error']['cantchangesystemip'] = 'Вы не можете удалить последний системный адрес IP. Создайте новую комбинацию IP/порт в качестве системного адреса IP или измените существующий системный адрес IP.'; - -// Sie koennen die letzte System IP nicht loeschen. Entweder legen Sie noch eine neue IP/Port Kombination als Systemeinstellung an oder aendern die System IP. - -$lng['question']['admin_domain_reallydocrootoutofcustomerroot'] = 'Вы уверены, что DocumentRoot этого домена должен находиться вне домашнего каталога (директории) клиента?'; - -// Sind Sie sicher, dass der DocumentRoot dieser Domain ausserhalb des Heimatverzeichnisses des Kunden liegen soll? - -$lng['admin']['memorylimitdisabled'] = 'Отключено'; - -// Deaktiviert - -$lng['error']['loginnameissystemaccount'] = 'Вы не можете создать аккаунт, похожий на системный. Выберите пожалуйста другое имя для аккаунта.'; - -// Sie können keinen Account anlegen, welcher wie ein Systemaccount aussieht. Bitte wählen Sie einen anderen Accountnamen. - -$lng['domain']['openbasedirpath'] = 'Путь OpenBasedir'; - -// OpenBasedir-Pfad - -$lng['domain']['docroot'] = 'Выше указанный путь'; - -// Oben eingegebener Pfad - -$lng['domain']['homedir'] = 'Домашний каталог'; - -// Heimverzeichnis - -$lng['admin']['valuemandatory'] = 'Это поле обязательно для заполнения'; - -// Dieses Feld muss ausgefuellt werden - -$lng['admin']['valuemandatorycompany'] = 'Необходимо заполнить поля "Фамилия" и "Имя" или "Фирма"'; - -// Entweder "Name" und "Vorname" oder "Firma" muss ausgefuellt werden - -$lng['menue']['main']['username'] = 'В системе как: '; - -// Angemeldet als: - -$lng['panel']['urloverridespath'] = 'URL (переписывет путь)'; - -// URL (ueberschreibt Pfad) - -$lng['panel']['pathorurl'] = 'Путь или URL'; - -// Pfad oder URL - -$lng['error']['sessiontimeoutiswrong'] = '"Срок действия сессии" должно являться числовым значением.'; - -// "Session-Timeout" muss ein numerischer Wert sein. - -$lng['error']['maxloginattemptsiswrong'] = '"Макс. попыток входа" должно являться числовым значением.'; - -// "Maximale Loginversuche" muss ein numerischer Wert sein. - -$lng['error']['deactivatetimiswrong'] = '"Время отключения" должно являться числовым значением.'; - -// "Laenge der Deaktivierung" muss numerisch sein. - -$lng['error']['accountprefixiswrong'] = 'Неправильная "приставка клиента".'; - -// Das "Kundenprefix" ist falsch. - -$lng['error']['mysqlprefixiswrong'] = 'Неправильная "Приставка для SQL".'; - -// Das "SQL-Prefix" ist falsch. - -$lng['error']['ftpprefixiswrong'] = 'Неправильная "Приставка для FTP".'; - -// Das "FTP-Prefix" ist falsch. - -$lng['error']['ipiswrong'] = 'Неправильный "IP-адрес". Разрешён только действительный адрес IP.'; - -// Die "IP-Adresse" ist falsch. Es ist nur eine gueltige IP-Adresse erlaubt. - -$lng['error']['vmailuidiswrong'] = '"Mails-UID" должно являться числовым значением.'; - -// Die "Mails-UID" ist falsch. Nur eine numerische UID ist erlaubt. - -$lng['error']['vmailgidiswrong'] = 'Die "Mails-GID" должно являться числовым значением.'; - -// Die "Mails-GID" ist falsch. Nur eine numerische GID ist erlaubt. - -$lng['error']['adminmailiswrong'] = 'Неправильный "Адрес отправителя". Разрешён только действительный E-Mail-адрес'; - -// Die "Absenderadresse" ist fehlerhaft. Es ist nur eine gueltige E-Mail-Adresse erlaubt - -$lng['error']['pagingiswrong'] = 'Настройка "Кол-во записей на страницу" должна иметь числовое значение.'; - -// Die "Eintraege pro Seite"-Einstellung ist falsch. Nur numerische Zeichen sind erlaubt. - -$lng['error']['phpmyadminiswrong'] = '"phpMyAdmin-URL" не является действительным URL.'; - -// Die "phpMyAdmin-URL" ist keine gültige URL. - -$lng['error']['webmailiswrong'] = '"WebMail-URL" не является действительным URL.'; - -// Die "WebMail-URL" ist keine gueltige URL. - -$lng['error']['webftpiswrong'] = '"WebFTP-URL" не является действительным URL.'; - -// Die "WebFTP-URL" ist keine gueltige URL. - -$lng['domains']['hasaliasdomains'] = 'Имеет alias-домен(ы)'; - -// Hat Aliasdomain(s) - -$lng['serversettings']['defaultip']['title'] = 'IP/порт по умолчанию'; - -// Standard IP/Port - -$lng['serversettings']['defaultip']['description'] = 'Какая комбинация IP/порт должна быть использована по умолчанию?'; - -// Welche IP/Port-Kombination soll standardmaessig verwendet werden? - -$lng['domains']['statstics'] = 'Статистика'; - -// Statistiken - -$lng['panel']['ascending'] = 'по возрастанию'; - -// aufsteigend - -$lng['panel']['decending'] = 'по убыванию'; - -// absteigend - -$lng['panel']['search'] = 'Поиск'; - -// Suche - -$lng['panel']['used'] = 'в пользовании'; - -// benutzt - -$lng['error']['stringformaterror'] = 'Значение поля "%s" не соответствует ожидаемому формату.'; - -// Der Wert des Feldes "%s" ist nicht im erwarteten Format. - -/** - * ADDED BETWEEN 1.2.14 and 1.2.15 - */ - -$lng['admin']['serversoftware'] = 'Программное обеспечение сервера'; - -// Serversoftware - -$lng['admin']['phpversion'] = 'Версия PHP'; - -// PHP-Version - -$lng['admin']['phpmemorylimit'] = 'Ограничение памяти для PHP'; - -// PHP-Memory-Limit - -$lng['admin']['mysqlserverversion'] = 'Версия сервера MySQL'; - -// MySQL Server Version - -$lng['admin']['mysqlclientversion'] = 'Версия клиента MySQL'; - -// MySQL Client Version - -$lng['admin']['webserverinterface'] = 'Интерфейс вебсервера'; - -// Webserver Interface - - - -?> + + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Language + * @version $Id$ + */ + +/** + * Global + */ + +$lng['translator'] = 'Konstantin Samofejew (Константин Самофеев)'; +$lng['panel']['edit'] = 'редактировать'; + +// bearbeiten + +$lng['panel']['delete'] = 'удалить'; + +// loeschen + +$lng['panel']['create'] = 'создать'; + +// anlegen + +$lng['panel']['save'] = 'Сохранить'; + +// Speichern + +$lng['panel']['yes'] = 'Да'; + +// Ja + +$lng['panel']['no'] = 'Нет'; + +// Nein + +$lng['panel']['emptyfornochanges'] = 'оставить пустым, если без изменений'; + +// leer fuer keine Aenderung + +$lng['panel']['emptyfordefault'] = 'оставить пустым для стандартного значения'; + +// leer fuer Standardeinstellung + +$lng['panel']['path'] = 'Путь'; + +// Pfad + +$lng['panel']['toggle'] = 'Переключить'; + +// Umschalten + +$lng['panel']['next'] = 'дальше'; + +// weiter + +$lng['panel']['dirsmissing'] = 'Каталоги (директории) не существуют или не читаемы'; + +// Verzeichnisse nicht verfuegbar oder lesbar + +/** + * Login + */ + +$lng['login']['username'] = 'Пользователь'; + +// Benutzername + +$lng['login']['password'] = 'Пароль'; + +// Passwort + +$lng['login']['language'] = 'Язык'; + +// Sprache + +$lng['login']['login'] = 'Войти'; + +// Anmelden + +$lng['login']['logout'] = 'Выйти'; + +// Abmelden + +$lng['login']['profile_lng'] = 'Язык профиля'; + +// Profilsprache + +/** + * Customer + */ + +$lng['customer']['documentroot'] = 'Домашний каталог (директория)'; + +// Heimverzeichnis + +$lng['customer']['name'] = 'Фамилия'; + +// Name + +$lng['customer']['firstname'] = 'Имя'; + +// Vorname + +$lng['customer']['company'] = 'Фирма'; + +// Firma + +$lng['customer']['street'] = 'Улица, дом, квартира'; + +// Strasse, Haus, App. + +$lng['customer']['zipcode'] = 'Почтовый индекс'; + +// PLZ + +$lng['customer']['city'] = 'Город'; + +// Ort + +$lng['customer']['phone'] = 'Телефон'; + +// Telephon + +$lng['customer']['fax'] = 'Факс'; + +// Fax + +$lng['customer']['email'] = 'eMail'; + +// eMail + +$lng['customer']['customernumber'] = 'Номер клиента'; + +// KundenNummer + +$lng['customer']['diskspace'] = 'Объём под Web (MB)'; + +// Webspace (MB) + +$lng['customer']['traffic'] = 'Трафик (GB)'; + +// Traffic (GB) + +$lng['customer']['mysqls'] = 'Базы данных MySQL'; + +// MySQL-Datenbanken + +$lng['customer']['emails'] = 'Адреса eMail'; + +// eMail-Adressen + +$lng['customer']['accounts'] = 'Аккаунты eMail'; + +// eMail-Konten + +$lng['customer']['forwarders'] = 'Пересылки eMail (forwarder)'; + +// eMail-Weiterleitungen + +$lng['customer']['ftps'] = 'Аккаунты FTP'; + +// FTP-Accounts + +$lng['customer']['subdomains'] = 'Поддомены'; + +// Sub-Domain(s) + +$lng['customer']['domains'] = 'Домены'; + +// Domain(s) + +$lng['customer']['unlimited'] = 'без ограничений'; + +// unendlich + +/** + * Customermenue + */ + +$lng['menue']['main']['main'] = 'Общие настройки'; + +// Allgemein + +$lng['menue']['main']['changepassword'] = 'Изменить пароль'; + +// Passwort aendern + +$lng['menue']['main']['changelanguage'] = 'Изменить язык'; + +// Sprache aendern + +$lng['menue']['email']['email'] = 'eMail'; + +// eMail + +$lng['menue']['email']['emails'] = 'Адреса'; + +// Adressen + +$lng['menue']['email']['webmail'] = 'WebMail'; + +// WebMail + +$lng['menue']['mysql']['mysql'] = 'MySQL'; + +// MySQL + +$lng['menue']['mysql']['databases'] = 'Базы данных'; + +// Datenbanken + +$lng['menue']['mysql']['phpmyadmin'] = 'phpMyAdmin'; + +// phpMyAdmin + +$lng['menue']['domains']['domains'] = 'Домены'; + +// Domains + +$lng['menue']['domains']['settings'] = 'Настройки'; + +// Einstellungen + +$lng['menue']['ftp']['ftp'] = 'FTP'; + +// FTP + +$lng['menue']['ftp']['accounts'] = 'Аккаунты'; + +// Accounts + +$lng['menue']['ftp']['webftp'] = 'WebFTP'; + +// WebFTP + +$lng['menue']['extras']['extras'] = 'Разное'; + +// Extras + +$lng['menue']['extras']['directoryprotection'] = 'Защита каталогов (директорий)'; + +// Verzeichnisschutz + +$lng['menue']['extras']['pathoptions'] = 'Настройки путей'; + +// Pfadoptionen + +/** + * Index + */ + +$lng['index']['customerdetails'] = 'Данные клиентов'; + +// Kundendaten + +$lng['index']['accountdetails'] = 'Данные аккаунтов'; + +// Accountdaten + +/** + * Change Password + */ + +$lng['changepassword']['old_password'] = 'Старый пароль'; + +// Altes Passwort + +$lng['changepassword']['new_password'] = 'Новый пароль'; + +// Neues Passwort + +$lng['changepassword']['new_password_confirm'] = 'Новый пароль (повторить)'; + +// Neues Passwort (bestaetigen) + +$lng['changepassword']['new_password_ifnotempty'] = 'Новый пароль (оставить пустым, чтобы не менять)'; + +// Neues Passwort (leer = nicht aendern) + +$lng['changepassword']['also_change_ftp'] = ' Также изменить пароль и для основного аккаунта FTP'; + +// Auch Passwort vom Haupt-FTP-Zugang aendern + +/** + * Domains + */ + +$lng['domains']['description'] = 'Здесь Вы можете создавать поддомены и менять пути к ним.
    После каждого изменения системе необходимо немного времени, чтобы загрузить обновлённые настройки.'; + +// Hier koennen Sie (Sub-)Domains erstellen und deren Pfade aendern.
    Nach jeder Aenderung braucht das System etwas Zeit um die Konfiguration neu einzulesen. + +$lng['domains']['domainsettings'] = 'Настройки домена'; + +// Domaineinstellungen + +$lng['domains']['domainname'] = 'Имя домена'; + +// Domainname + +$lng['domains']['subdomain_add'] = 'Создать поддомен'; + +// Subdomain anlegen + +$lng['domains']['subdomain_edit'] = 'Обработать (под)домен'; + +// (Sub-)Domain bearbeiten + +$lng['domains']['wildcarddomain'] = 'Занести как уайлдкард-домен? (Wildcard)'; + +// Als Wildcarddomain eintragen? + +$lng['domains']['aliasdomain'] = 'Алиас для домена'; + +// Alias fuer Domain + +$lng['domains']['noaliasdomain'] = 'Не алиас-домен'; + +// Keine Aliasdomain + +/** + * eMails + */ + +$lng['emails']['description'] = 'Здесь Вы можете настроить Ваши email-адреса.
    Аккаунт - это как обычный почтовый ящик. Если Вам кто-то напишет электронное письмо (email), оно попадёт в этот ящик.

    Данные для Вашей почтовй программы: (Текст с наклоном замените на Ваши данные!)
    Сервер: имя домена
    Имя пользователя: имя аккаунта или email-адрес
    Пароль: выбранный Вами пароль'; + +// Hier koennen Sie Ihre eMail Adressen einrichten.
    Ein Konto ist wie Ihr Briefkasten vor der Haustuere. Wenn jemand eine email an Sie schreibt, dann wird diese in dieses Konto gelegt.

    Die Zugangsdaten von Ihrem Mailprogramm sind wie folgt: (Die Angaben in kursiver Schrift sind durch die jeweiligen Eintraege zu ersetzen!)
    Hostname: Domainname
    Benutzername: Kontoname / eMail-Adresse
    Passwort: das gewaehlte Passwort + +$lng['emails']['emailaddress'] = 'eMail-адрес'; + +// eMail-Adresse + +$lng['emails']['emails_add'] = 'создать eMail-адрес'; + +// eMail-Adresse anlegen + +$lng['emails']['emails_edit'] = 'изменить eMail-адрес'; + +//eMail-Adresse aendern + +$lng['emails']['catchall'] = 'С функцией "лови всё" (catchall)'; + +// Catchall + +$lng['emails']['iscatchall'] = 'Сделать catchall-адресом?'; + +// Als catchall-Adresse definieren? + +$lng['emails']['account'] = 'Аккаунт'; + +// Konto + +$lng['emails']['account_add'] = 'Создать аккаунт'; + +// Konto anlegen + +$lng['emails']['account_delete'] = 'Удалить аккаунт'; + +// Konto loeschen + +$lng['emails']['from'] = 'От'; + +// Von + +$lng['emails']['to'] = 'Куда'; + +// Nach + +$lng['emails']['forwarders'] = 'Пересылка'; + +// Weiterleitungen + +$lng['emails']['forwarder_add'] = 'Добавить пересылку'; + +// Weiterleitung hinzufuegen + +/** + * FTP + */ + +$lng['ftp']['description'] = 'Здесь Вы можете создать дополнительные FTP-аккаунты.
    FTP-аккаунты активны сразу после сохранения изменений.'; + +// Hier koennen Sie zusaetzliche FTP-Accounts einrichten.
    Die Aenderungen sind sofort wirksam und die FTP-Accounts sofort benutzbar. + +$lng['ftp']['account_add'] = 'Создать аккаунт'; + +// Account anlegen + +/** + * MySQL + */ + +$lng['mysql']['databasename'] = 'Имя пользователя / базы данных'; + +// Benutzer-/Datenbankname + +$lng['mysql']['databasedescription'] = 'Описание базы данных'; + +// Datenbankbezeichnung + +$lng['mysql']['database_create'] = 'Создать базу данных'; + +// Datenbank anlegen + +/** + * Extras + */ + +$lng['extras']['description'] = 'Здесь Вы можете сделать дополнительные настройки, например защиту каталога (директории).
    После каждого изменения системе необходимо немного времени, чтобы загрузить обновлённые настройки.'; + +// Hier koennen Sie zusaetzliche Extras einrichten, wie zum Beispiel Verzeichnisschutz.
    Die Aenderungen sind erst nach einer bestimmten Zeit wirksam. + +$lng['extras']['directoryprotection_add'] = 'Создать защиту каталога'; + +// Verzeichnisschutz anlegen + +$lng['extras']['view_directory'] = 'Показать каталог'; + +// Verzeichnis anzeigen + +$lng['extras']['pathoptions_add'] = 'Добавить настройки пути'; + +// Pfadoptionen hinzufuegen + +$lng['extras']['directory_browsing'] = 'Показать содержимое каталога'; + +// Verzeichnisinhalt anzeigen + +$lng['extras']['pathoptions_edit'] = 'Изменить настройки пути'; +$lng['extras']['error404path'] = '404'; + +// 404 + +$lng['extras']['error403path'] = '403'; + +// 403 + +$lng['extras']['error500path'] = '500'; + +// 500 + +$lng['extras']['error401path'] = '401'; + +// 401 + +$lng['extras']['errordocument404path'] = 'URL к документу ошибки 404'; + +// URL zum Fehlerdokument 404 + +$lng['extras']['errordocument403path'] = 'URL к документу ошибки 403'; + +// URL zum Fehlerdokument 403 + +$lng['extras']['errordocument500path'] = 'URL к документу ошибки 500'; + +// URL zum Fehlerdokument 500 + +$lng['extras']['errordocument401path'] = 'URL к документу ошибки 401'; + +// URL zum Fehlerdokument 401 + +/** + * Errors + */ + +$lng['error']['error'] = 'Сообщение о ошибке'; + +// Fehlermeldung + +$lng['error']['directorymustexist'] = 'Файл %s должен существовать.'; + +// Das Verzeichnis %s muss existieren. Legen Sie es bitte mit Ihrem FTP-Programm an. + +$lng['error']['filemustexist'] = 'Файл %s должен существовать.'; + +// Die Datei %s muss existieren. + +$lng['error']['allresourcesused'] = 'Вы уже израсходовали все ресурсы, находящиеся в Вашем распоряжении.'; + +// Sie haben bereits alle Ihnen zur Verfuegung stehenden Ressourcen verbraucht. + +$lng['error']['domains_cantdeletemaindomain'] = 'Вы не можете удалить домен, занесённый как eMail-домен.'; + +// Sie koennen keine Domain, die als eMail-Domain verwendet wird loeschen. + +$lng['error']['domains_canteditdomain'] = 'Обработка этого домена запрещена админом.'; + +// Sie koennen diese Domain nicht bearbeiten. Dies wurde durch den Admin verweigert + +$lng['error']['domains_cantdeletedomainwithemail'] = 'Вы не можете удалить домен, который ещё используется как eMail-домен. Удалите сначала все eMail-адреса этого домена.'; + +// Sie koennen keine Domain loeschen die noch als eMail-Domain verwendet wird. Loeschen Sie zuerst alle eMail-Adressen dieser Domain. + +$lng['error']['firstdeleteallsubdomains'] = 'Прежде чем создать уайлдкард-домен (wildcard), Вам необходимо удалить все поддомены.'; + +// Sie muessen erst alle Subdomains loeschen, bevor Sie eine Wildcarddomain anlegen koennen. + +$lng['error']['youhavealreadyacatchallforthisdomain'] = 'Вы уже прописали один адрес как "лови всё" (catchall) для этого домена.'; + +// Sie haben bereits eine Adresse als Catchall fuer diese Domain definiert. + +$lng['error']['ftp_cantdeletemainaccount'] = 'Вы не можете удалить Ваш основной аккаунт.'; + +// Sie koennen Ihren Hauptaccount nicht loeschen. + +$lng['error']['login'] = 'Указанные имя пользователя или пароль не верны.'; + +// Der angegebene Benutzername/Passwort ist falsch. + +$lng['error']['login_blocked'] = 'Из-за многочисленных ошибочных попыток логина аккаунт временно закрыт.
    Пожалуйста попробуйте через ' . $settings['login']['deactivatetime'] . ' секунд ещё раз.'; + +// Dieser Account wurde aufgrund zu vieler Fehlversuche vorruebergehend geschlossen.
    Bitte versuchen Sie es in '.$settings['login']['deactivatetime'].' Sekunden erneut. + +$lng['error']['notallreqfieldsorerrors'] = 'Вы заполнили не все поля или минимум одно поле неправильно.'; + +// Sie haben nicht alle Felder oder ein Feld mit fehlerhaften Angaben ausgefuellt. + +$lng['error']['oldpasswordnotcorrect'] = 'Старый пароль не верен.'; + +// Das alte Passwort ist nicht korrekt. + +$lng['error']['youcantallocatemorethanyouhave'] = 'Вы не можете раздавать больше ресурсов, чем у Вас ещё есть.'; + +// Sie koennen nicht mehr Ressourcen verteilen als Sie noch frei haben. + +$lng['error']['mustbeurl'] = 'Вы должны указать полный адрес URL (например http://something.com/error404.htm)'; + +// Sie muessen eine vollstaendige URL angeben (z.B. http://irgendwas.de/error404.htm) + +$lng['error']['invalidpath'] = 'Вы указали не действительный адрес URL.'; + +// Sie haben keine gueltige URL ausgewaehlt (Evtl. Probleme beim Verzeichnislisting?) + +$lng['error']['stringisempty'] = 'Отсутствующие данные в поле'; + +// Fehlende Eingabe im Feld + +$lng['error']['stringiswrong'] = 'Неправильные данные в поле'; + +// Falsche Eingabe im Feld + +$lng['error']['myloginname'] = '\'' . $lng['login']['username'] . '\''; +$lng['error']['mypassword'] = '\'' . $lng['login']['password'] . '\''; +$lng['error']['oldpassword'] = '\'' . $lng['changepassword']['old_password'] . '\''; +$lng['error']['newpassword'] = '\'' . $lng['changepassword']['new_password'] . '\''; +$lng['error']['newpasswordconfirm'] = '\'' . $lng['changepassword']['new_password_confirm'] . '\''; +$lng['error']['newpasswordconfirmerror'] = 'Новый пароль и повторённый новый пароль отличаются.'; + +// Das neue Passwort und die Bestaetigung sind nicht identisch. + +$lng['error']['myname'] = '\'' . $lng['customer']['name'] . '\''; +$lng['error']['myfirstname'] = '\'' . $lng['customer']['firstname'] . '\''; +$lng['error']['emailadd'] = '\'' . $lng['customer']['email'] . '\''; +$lng['error']['mydomain'] = '\'Домен\''; + +// \'Domain\' + +$lng['error']['mydocumentroot'] = '\'Корень документа\''; + +// \'Documentroot\' + +$lng['error']['loginnameexists'] = 'Имя %s уже существует.'; + +// Login-Name %s existiert bereits. + +$lng['error']['emailiswrong'] = 'eMail-адрес %s содержит запрещённые символы или является не полным.'; + +// eMail-Adresse %s beinhaltet ungueltige Zeichen oder ist nicht vollstaendig. + +$lng['error']['loginnameiswrong'] = 'Имя %s содержит запрещённые символы.'; + +// Login-Name %s beinhaltet ungueltige Zeichen. + +$lng['error']['userpathcombinationdupe'] = 'Комбинация из имени пользователя и пути уже существует.'; + +// Kombination aus Benutzername und Pfad existiert bereits. + +$lng['error']['patherror'] = 'Общая ошибка! Путь не может быть пустым.'; + +// allgemeiner Fehler! Pfad darf nicht leer sein. + +$lng['error']['errordocpathdupe'] = 'Настройка для пути %s уже существует.'; + +// Option fuer Pfad %s existiert bereits. + +$lng['error']['adduserfirst'] = 'Сначала необходимо создать клиента.'; + +// Sie muessen zuerst einen Kunden anlegen. + +$lng['error']['domainalreadyexists'] = 'Домен %s уже в распоряжении другого клиента.'; + +// Die Domain %s wurde bereits einem Kunden zugeordnet. + +$lng['error']['nolanguageselect'] = 'Язык не выбран.'; + +// Keine Sprache ausgewaehlt. + +$lng['error']['nosubjectcreate'] = 'Вам нужно указать тему.'; + +// Sie muessen einen Betreff angeben. + +$lng['error']['nomailbodycreate'] = 'Вам нужно набрать текст сообщения.'; + +// Sie muessen einen Mail-Text eingeben. + +$lng['error']['templatenotfound'] = 'Шаблон не найден.'; + +// Template wurde nicht gefunden. + +$lng['error']['alltemplatesdefined'] = 'Вы не можете создавать шаблоны, потому-что во всех языках шаблоны уже существуют.'; + +// Sie koennen keine weiteren Templates anlegen, da bereits alle Sprachen mit Templates versorgt sind. + +$lng['error']['wwwnotallowed'] = 'Ваш поддомен не может носить имя www.'; + +// Ihre Subdomain darf nicht www heissen. + +$lng['error']['subdomainiswrong'] = 'Поддомен %s содержит недействительные символы.'; + +// Die Subdomain %s beinhaltet ungueltige Zeichen. + +$lng['error']['domaincantbeempty'] = 'Имя домена не может быть пустым.'; + +// Der Domain-Name darf nicht leer sein. + +$lng['error']['domainexistalready'] = 'Домен %s уже существует.'; + +// Die Domain %s existiert bereits. + +$lng['error']['domainisaliasorothercustomer'] = 'Выбранный алиас-домен или сам является алиас-доменом, или принадлежит другому клиенту.'; + +// Die ausgewaehlte Aliasdomain ist entweder selber eine Aliasdomain oder gehoet zu einem anderen Kunden. + +$lng['error']['emailexistalready'] = 'eMail-адрес %s уже существует.'; + +// Die eMail-Adresse %s existiert bereits. + +$lng['error']['maindomainnonexist'] = 'Основной домен %s не существует.'; + +// Die Haupt-Domain %s existiert nicht. + +$lng['error']['destinationnonexist'] = 'Занесите адрес для пересылки в поле \'Куда\'.'; + +// Bitte geben Sie Ihre Weiterleitungsadresse im Feld \'Nach\' ein. + +$lng['error']['destinationalreadyexistasmail'] = 'Пересылка на %s уже существует как активный eMail-адрес.'; + +// Die Weiterleitung zu %s exisitiert bereits als aktive eMail-Adresse. + +$lng['error']['destinationalreadyexist'] = 'Пересылка на %s уже существует.'; + +// Es gibt bereits eine Weiterleitung nach %s . + +$lng['error']['destinationiswrong'] = 'Адрес для пересылки %s содержит недействительные символы или является неполным.'; + +// Die Weiterleitungsadresse-Adresse %s beinhaltet ungueltige Zeichen oder ist nicht vollstaendig. + +$lng['error']['domainname'] = $lng['domains']['domainname']; + +/** + * Questions + */ + +$lng['question']['question'] = 'Вопрос о выполнении'; + +// Sicherheitsabfrage + +$lng['question']['admin_customer_reallydelete'] = 'Вы уверены, что хотите удалить клиента %s?
    ВНИМАНИЕ! Удалённые данные не смогут быть позже восстановлены! После этого шага Вам ещё будет необходимо от руки удалить данные из файловой системы.'; + +// Wollen Sie den Kunden %s wirklich loeschen?
    ACHTUNG! Alle Daten gehen unwiederruflich verloren! Nach dem Vorgang muessen Sie die Daten aus dem Dateisystem noch manuell entfernen. + +$lng['question']['admin_domain_reallydelete'] = 'Вы уверены, что хотите удалить домен %s?'; + +// Wollen Sie die Domain %s wirklich loeschen? + +$lng['question']['admin_domain_reallydisablesecuritysetting'] = 'Вы уверены, что хотите отключить эти важные для безопасности настройки (OpenBasedir и/или SafeMode)?'; + +// ollen Sie diese wichtigen Sicherheitseinstellungen (OpenBasedir und/oder SafeMode) wirklich deaktivieren? + +$lng['question']['admin_admin_reallydelete'] = 'Вы уверены, что хотите удалить админа %s?
    Все клиенты и домены будут переданы главному админу.'; + +// Wollen Sie den Admin %s wirklich loeschen?
    Alle Kunden und Domains werden dem Hauptadmin zugeteilt. + +$lng['question']['admin_template_reallydelete'] = 'Вы уверены, что хотите удалить шаблон %s?'; + +// Wollen Sie die Vorlage \'%s\' wirklich loeschen? + +$lng['question']['domains_reallydelete'] = 'Вы уверены, что хотите удалить домен %s?'; + +// Wollen Sie die Domain %s wirklich loeschen? + +$lng['question']['email_reallydelete'] = 'Вы уверены, что хотите удалить eMail-адрес %s?'; + +// Wollen Sie die eMail-Adresse %s wirklich loeschen? + +$lng['question']['email_reallydelete_account'] = 'Вы уверены, что хотите удалить аккаунт %s?'; + +// Wollen Sie das Konto von %s wirklich loeschen? + +$lng['question']['email_reallydelete_forwarder'] = 'Вы уверены, что хотите удалить пересылку %s?'; + +// Wollen Sie die Weiterleitung %s wirklich loeschen? + +$lng['question']['extras_reallydelete'] = 'Вы уверены, что хотите удалить защиту каталога (директории) для %s?'; + +// Wollen Sie den Verzeichnisschutz fuer %s wirklich loeschen? + +$lng['question']['extras_reallydelete_pathoptions'] = 'Вы уверены, что хотите удалить настройки для пути %s?'; + +// Wollen Sie die Optionen fuer den Pfad %s wirklich loeschen? + +$lng['question']['ftp_reallydelete'] = 'Вы уверены, что хотите удалить FTP-аккаунт %s?'; + +// Wollen Sie den FTP-Account %s wirklich loeschen? + +$lng['question']['mysql_reallydelete'] = 'Вы уверены, что хотите удалить базу данных %s?
    ВНИМАНИЕ! Все данные будут безвозвратно потеряны!'; + +// Wollen Sie die Datenbank %s wirklich loeschen?
    ACHTUNG! Alle Daten gehen unwiederruflich verloren! + +$lng['question']['admin_configs_reallyrebuild'] = 'Вы уверены, что хотите заново создать Ваши файлы настройки для Apache и Bind?'; + +// Wollen Sie wirklich Ihre Apache und Bind Konfigurationsdateien neu erstellen lassen? + +/** + * Mails + */ + +$lng['mails']['pop_success']['mailbody'] = 'Здравствуйте!\n\nВаш eMail-аккаунт {USERNAME}\nготов к пользованию.\n\nЭто автоматически созданное сообщение,\nпожалуйста не отвечайте на него.\n\nАдминистрация'; + +// Hallo,\n\nihr eMail-Konto {USERNAME}\nwurde erfolgreich eingerichtet.\n\nDies ist eine automatisch generierte\neMail, bitte antworten Sie nicht auf\ndiese Mitteilung.\n\nIhr Froxlor-Team + +$lng['mails']['pop_success']['subject'] = 'eMail-аккаунт готов к пользованию'; + +// eMail-Konto erfolgreich eingerichtet + +$lng['mails']['createcustomer']['mailbody'] = 'Здравствуйте, {FIRSTNAME} {NAME}!\n\nДанные Вашего аккаунта:\n\nИмя пользователя: {USERNAME}\nПароль: {PASSWORD}\n\nЭто автоматически созданное сообщение,\nпожалуйста не отвечайте на него.\n\nС уважением,\nАдминистрация'; + +// Hallo {FIRSTNAME} {NAME},\n\nhier ihre Accountinformationen:\n\nBenutzername: {USERNAME}\nPassword: {PASSWORD}\n\nVielen Dank,\nIhr Froxlor-Team + +$lng['mails']['createcustomer']['subject'] = 'Данные к аккаунту'; + +// Accountinformationen + +/** + * Admin + */ + +$lng['admin']['overview'] = 'Обзор'; + +// uebersicht + +$lng['admin']['ressourcedetails'] = 'Использованные ресурсы'; + +// Verbrauchte Ressourcen + +$lng['admin']['systemdetails'] = 'Подробности системы'; + +// Systemdetails + +$lng['admin']['froxlordetails'] = 'Подробности Froxlor'; + +// Froxlor-Details + +$lng['admin']['installedversion'] = 'Установленная версия'; + +// Installierte Version + +$lng['admin']['latestversion'] = 'Последняя версия'; + +// Neueste Version + +$lng['admin']['lookfornewversion']['clickhere'] = 'Запросить через веб-сервис'; + +// per Webservice abfragen + +$lng['admin']['lookfornewversion']['error'] = 'Ошибка при запросе'; + +// Fehler beim Auslesen + +$lng['admin']['resources'] = 'Ресурсы'; + +// Ressourcen + +$lng['admin']['customer'] = 'Клиент'; + +// Kunde + +$lng['admin']['customers'] = 'Клиенты'; + +// Kunden + +$lng['admin']['customer_add'] = 'Добавить клиента'; + +// Kunden anlegen + +$lng['admin']['customer_edit'] = 'Изменить данные клиента'; + +// Kunden bearbeiten + +$lng['admin']['domains'] = 'Домены'; + +// Domains + +$lng['admin']['domain_add'] = 'Добавить домен'; + +// Domain anlegen + +$lng['admin']['domain_edit'] = 'Изменить домен'; + +// Domain bearbeiten + +$lng['admin']['subdomainforemail'] = 'Поддомены в качестве eMail-доменов'; + +// Subdomains als E-Mail-Domains + +$lng['admin']['admin'] = 'Админ'; + +// Admin + +$lng['admin']['admins'] = 'Админы'; + +// Admins + +$lng['admin']['admin_add'] = 'Добавить админа'; + +// Admin anlegen + +$lng['admin']['admin_edit'] = 'Изменить данные админа'; + +// Admin bearbeiten + +$lng['admin']['customers_see_all'] = 'Может видеть всех клиентов?'; + +// Kann alle Kunden sehen? + +$lng['admin']['domains_see_all'] = 'Может видеть все домены?'; + +// Kann alle Domains sehen? + +$lng['admin']['change_serversettings'] = 'Может менять настройки сервера?'; + +// Kann Servereinstellungen bearbeiten? + +$lng['admin']['server'] = 'Сервер'; + +// Server + +$lng['admin']['serversettings'] = 'Настройки сервера'; + +// Einstellungen + +$lng['admin']['rebuildconf'] = 'Заново создать настройки'; + +// Configs neuschreiben + +$lng['admin']['stdsubdomain'] = 'Поддомен по умолчанию'; + +// Standardsubdomain + +$lng['admin']['stdsubdomain_add'] = 'Добавить поддомен по умолчанию'; + +// Standardsubdomain anlegen + +$lng['admin']['deactivated'] = 'Доступ закрыт'; + +// Gesperrt + +$lng['admin']['deactivated_user'] = 'Закрыть доступ пользователю'; + +// Benutzer sperren + +$lng['admin']['sendpassword'] = 'Послать пароль'; + +// Passwort zusenden + +$lng['admin']['ownvhostsettings'] = 'Собственные vHost-настройки'; + +// Eigene vHost-Einstellungen + +$lng['admin']['configfiles']['serverconfiguration'] = 'Настройки служб'; + +// Konfiguration + +$lng['admin']['configfiles']['files'] = 'Файлы настроек: Пожалуйста измените соответствующие файлы настроек
    или добавьте новые, если они не существуют, со следующим содержимым.
    Обратите внимание: MySQL-пароль не был заменён из соображений безопасности.
    Пожалуйста замените вручную "MYSQL_PASSWORD" на соответствующий пароль.
    Если Вы его не помните, посмотрите в файле "lib/userdata.inc.php".'; + +// Konfigurationsdateien: Bitte aendern Sie die entsprechenden Konfigurationsdateien
    oder legen sie mit dem folgenden Inhalt neu an, falls sie nicht existieren.
    Bitte beachten Sie: Das MySQL-Passwort wurde aus Sicherheitsgruenden nicht ersetzt.
    Bitte ersetzen Sie "MYSQL_PASSWORD" manuell durch das entsprechende Passwort.
    Falls Sie es vergessen haben sollten, finden Sie es in der Datei "lib/userdata.inc.php". + +$lng['admin']['configfiles']['commands'] = 'Команды: Пожалуйста выполните следующие команды в shell.'; + +// Kommandos: Bitte fuehren Sie die folgenden Kommandos in einer Shell aus. + +$lng['admin']['configfiles']['restart'] = 'Перезагрузка: Пожалуйста выполните следующие команды в shell для
    перезагрузки файлов настроек.'; + +// Neustart: Bitte fuehren Sie die folgenden Kommandos zum Neuladen
    der Konfigurationsdateuen in einer Shell aus. + +$lng['admin']['templates']['templates'] = 'Шаблоны'; + +// Vorlagen + +$lng['admin']['templates']['template_add'] = 'Добавить шаблон'; + +// Vorlage hinzufuegen + +$lng['admin']['templates']['template_edit'] = 'Изменить шаблон'; + +// Vorlage bearbeiten + +$lng['admin']['templates']['action'] = 'Операция'; + +// Aktion + +$lng['admin']['templates']['email'] = 'E-Mail'; + +// E-Mail + +$lng['admin']['templates']['subject'] = 'Тема'; + +// Betreff + +$lng['admin']['templates']['mailbody'] = 'Текст сообщения'; + +// Mailtext + +$lng['admin']['templates']['createcustomer'] = 'Приветствие нового клиента'; + +// Willkommensmail fuer neue Kunden + +$lng['admin']['templates']['pop_success'] = 'Приветствие для новых eMail-аккаунтов'; + +// Willkommensmail fuer neue E-Mail Konten + +$lng['admin']['templates']['template_replace_vars'] = 'Переменные, которые будут заменены в шаблонах:'; + +// Variablen die in den Vorlagen ersetzt werden: + +$lng['admin']['templates']['FIRSTNAME'] = 'Будет заменено именем клиента.'; + +// Wird mit dem Vornamen des Kunden ersetzt. + +$lng['admin']['templates']['NAME'] = 'Будет заменено фамилией клиента.'; + +// Wird mit dem Namen des Kunden ersetzt. + +$lng['admin']['templates']['USERNAME'] = 'Будет заменено именем пользователя нового аккаунта.'; + +// Wird mit dem Benutzernamen des neuen Kundenaccounts ersetzt. + +$lng['admin']['templates']['PASSWORD'] = 'Будет заменено паролем нового аккаунта.'; + +// Wird mit dem Passwort des neuen Kundenaccounts ersetzt. + +$lng['admin']['templates']['EMAIL'] = 'Будет заменено адресом нового POP3/IMAP-аккаунта.'; + +// Wird mit der Adresse des neuen POP3/IMAP Kontos ersetzt. + +/** + * Serversettings + */ + +$lng['serversettings']['session_timeout']['title'] = 'Срок действия сессии'; + +// Session Timeout + +$lng['serversettings']['session_timeout']['description'] = 'Как долго пользовать должен быть не активен, чтобы сессия стала недействительной? (в секундах)'; + +// Wie lange muss ein Benutzer inaktiv sein, damit die Session ungueltig wird? (Sekunden) + +$lng['serversettings']['accountprefix']['title'] = 'Приставка клиента'; + +// Kundenprefix + +$lng['serversettings']['accountprefix']['description'] = 'Какая приставка должна быть у аккаунтов клиентов?'; + +// Welchen Prefix sollen die Kundenaccounts haben? + +$lng['serversettings']['mysqlprefix']['title'] = 'Приставка для SQL'; + +// SQL-Prefix + +$lng['serversettings']['mysqlprefix']['description'] = 'Какая приставка должна быть у MySQL-аккаунтов?'; + +// Welchen Prefix sollen die MySQL-Accounts haben? + +$lng['serversettings']['ftpprefix']['title'] = 'Приставка для FTP'; + +// FTP-Prefix + +$lng['serversettings']['ftpprefix']['description'] = 'Какая приставка должна быть у FTP-аккаунтов?'; + +// Welchen Prefix sollen die FTP-Accounts haben? + +$lng['serversettings']['documentroot_prefix']['title'] = 'Каталог (директория) для документов'; + +// Documentdirectory + +$lng['serversettings']['documentroot_prefix']['description'] = 'Куда помещать данные клиентов?'; + +// Wo sollen alle Kunden liegen? + +$lng['serversettings']['logfiles_directory']['title'] = 'Каталог (директория) для протоколов'; + +//Logfilesdirectory + +$lng['serversettings']['logfiles_directory']['description'] = 'Куда помещать все протоколы (лог-файлы)?'; + +// Wo sollen alle Logfiles liegen? + +$lng['serversettings']['ipaddress']['title'] = 'IP-адрес'; + +// IP-Adresse + +$lng['serversettings']['ipaddress']['description'] = 'Какой у сервера адрес IP?'; + +// Welche IP-Adresse hat der Server? + +$lng['serversettings']['hostname']['title'] = 'Имя хоста'; + +// Hostname + +$lng['serversettings']['hostname']['description'] = 'Какое у сервера имя хоста (hostname)?'; + +// Welchen Hostname hat der Server? + +$lng['serversettings']['apachereload_command']['title'] = 'Команда для перезагрузки Apache'; + +// Apache-Reload-Command + +$lng['serversettings']['apachereload_command']['description'] = 'Как называется скрипт для перезагрузки Apache?'; + +// Wie heisst das Skript zum reloaden des Apache? + +$lng['serversettings']['bindconf_directory']['title'] = 'Каталог (директория) для настрек Bind'; + +// Bind-Config-Directory + +$lng['serversettings']['bindconf_directory']['description'] = 'Где находятся файлы настроек Bind?'; + +// Wo liegen die Bind-Konfigdateien? + +$lng['serversettings']['bindreload_command']['title'] = 'Команда для перезагрузки Bind'; + +// Bind-Reload-Command + +$lng['serversettings']['bindreload_command']['description'] = 'Как называется скрипт для перезагрузки Bind?'; + +// Wie heisst das Skript zum reloaden des Bind? + +$lng['serversettings']['binddefaultzone']['title'] = 'Зона по умолчанию для Bind'; + +// Bind-Default-Zone + +$lng['serversettings']['binddefaultzone']['description'] = 'Как называется стандартная зона для всех доменов?'; + +// Wie heisst die Default-Zone fuer alle Domains? + +$lng['serversettings']['vmail_uid']['title'] = 'Mail-Uid'; + +// Mails-Uid + +$lng['serversettings']['vmail_uid']['description'] = 'Какую UID должна использовать почтовая служба?'; + +// Welche UID sollen die Mails haben? + +$lng['serversettings']['vmail_gid']['title'] = 'Mail-Gid'; + +// Mails-Gid + +$lng['serversettings']['vmail_gid']['description'] = 'Какую GID должна использовать почтовая служба?'; + +// Welche GID sollen die Mails haben? + +$lng['serversettings']['vmail_homedir']['title'] = 'Каталог почтовой службы'; + +// Mails-Homedir + +$lng['serversettings']['vmail_homedir']['description'] = 'Где должна храниться электронная почта (eMail)?'; + +// Wo sollen die Mails liegen? + +$lng['serversettings']['adminmail']['title'] = 'Адрес отправителя'; + +// Absenderadresse + +$lng['serversettings']['adminmail']['description'] = 'Каким должен быть адрес отправителя для писем от системы?'; + +// Wie ist die Absenderadresse fuer eMails aus dem Panel? + +$lng['serversettings']['phpmyadmin_url']['title'] = 'phpMyAdmin-URL'; + +// phpMyAdmin-URL + +$lng['serversettings']['phpmyadmin_url']['description'] = 'Где находится phpMyAdmin? (начинается с http://)'; + +// Wo liegt der phpMyAdmin? (muss mit http:// beginnen) + +$lng['serversettings']['webmail_url']['title'] = 'WebMail-URL'; + +// WebMail-URL + +$lng['serversettings']['webmail_url']['description'] = 'Где находится WebMail? (начинается с http://)'; + +// Wo liegt das WebMail? (muss mit http:// beginnen) + +$lng['serversettings']['webftp_url']['title'] = 'WebFTP-URL'; + +// WebFTP-URL + +$lng['serversettings']['webftp_url']['description'] = 'Где находится WebFTP? (начинается с http://)'; + +// Wo liegt das WebFTP? (muss mit http:// beginnen) + +$lng['serversettings']['language']['description'] = 'Какой язык является языком по умолчанию?'; + +// Welche Sprache ist ihre Standardsprache? + +$lng['serversettings']['maxloginattempts']['title'] = 'Макс. попыток входа'; + +// Max Loginversuche + +$lng['serversettings']['maxloginattempts']['description'] = 'Максимальное количество попыток входа до отключения аккаунта.'; + +// Maximale Anzahl an Loginversuchen bis der Account deaktiviert wird. + +$lng['serversettings']['deactivatetime']['title'] = 'Время отключения'; + +// Laenge der Deaktivierung + +$lng['serversettings']['deactivatetime']['description'] = 'Время (в сек.), на которое отключается аккаунт.'; + +// Zeitraum (in sek.) fuer den der Account deaktiviert ist. + +$lng['serversettings']['pathedit']['title'] = 'Способ ввода пути'; + +// Pfad-Eingabemethode + +$lng['serversettings']['pathedit']['description'] = 'Выбирать путь в меню, или набирать вручную?'; + +// Soll ein Pfad via Dropdown-Menue ausgewaehlt oder manuell eingegeben werden koennen. + +/** + * CHANGED BETWEEN 1.2.12 and 1.2.13 + */ + +$lng['mysql']['description'] = 'Здесь вы можете создавать и удалять базы данных MySQL.
    Базы данных готовы к пользованию сразу после сохранения изменений.
    В меню Вы найдёте ссылку на phpMyAdmin, которым вы можете обрабатывать базы данных.

    Данные для доступа из скриптов PHP: (Текст с наклоном замените соответствующими записями!)
    Имя хоста:
    Имя пользователя: имя базы данных
    Пароль: выбранный пароль
    База данных: Имя базы данных'; + +// Hier koennen Sie MySQL-Datenbanken anlegen und loeschen.
    Die aenderungen werden sofort wirksam und die Datenbanken sofort benutzbar.
    Im Menue finden Sie einen Link zum phpMyAdmin, mit dem Sie Ihre Datenbankeninhalte einfach bearbeiten koennen.

    Die Zugangsdaten von php-Skripten sind wie folgt: (Die Angaben in kursiver Schrift sind durch die jeweiligen Eintraege zu ersetzen!)
    Hostname:
    Benutzername: Datenbankname
    Passwort: das gewaehlte Passwort
    Datenbank: Datenbankname + +/** + * ADDED BETWEEN 1.2.12 and 1.2.13 + */ + +$lng['admin']['cronlastrun'] = 'Последний крон (cron)'; + +// Last Cron + +$lng['serversettings']['paging']['title'] = 'Кол-во записей на страницу'; + +// Eintraege pro Seite + +$lng['serversettings']['paging']['description'] = 'Сколько записей показывать на одной странице? (0 = отключить разбивание на страницы)'; + +// Wieviele Eintraege sollen auf einer Seite gezeigt werden? (0 = Paging deaktivieren) + +$lng['error']['ipstillhasdomains'] = 'Комбинация IP и порта, которую вы хотите удалить, ещё прописана для минимум одного домена. Пожалуйста измените у доменов комбинацию IP и порта на другую, чтобы можно было удалить эту.'; + +// Die IP/Port Kombination, die Sie loeschen wollen ist noch bei einer oder mehreren Domains eingetragen. Bitte aendern sie die Domains vorher auf eine andere IP/Port Kombination um diese loeschen zu koennen. + +$lng['error']['cantdeletedefaultip'] = 'Вы не можете удалить стандартную для посредников комбинацию IP и порта. Пожулуйста установите другую комбинацию IP и порта как "по умолчанию", чтобы можно было удалить эту..'; + +// Sie koennen die Standard IP/Port Kombination fuer Reseller nicht loeschen. Bitte setzen Sie eine andere IP/Port Kombination als Standard um diese loeschen zu koennen. + +$lng['error']['cantdeletesystemip'] = 'Вы не можете удалить последний адрес IP в системе. Создайте новую комбинацию IP и порта для системного IP или измените IP системы.'; + +// Sie koennen die letzte System IP nicht loeschen. Entweder legen Sie eine neue IP/Port Kombination als Systemeinstellung an oder aendern die System IP. + +$lng['error']['myipaddress'] = '\'IP\''; +$lng['error']['myport'] = '\'порт\''; + +// \'Port\' + +$lng['error']['myipdefault'] = 'Вам необходимо быврать комбинацию IP и порта, которая станет стандартной комбинацией по умолчанию.'; + +// Sie muessen eine IP/Port Kombination auswaehlen, die den Standard defninieren soll. + +$lng['error']['myipnotdouble'] = 'Эта комбинация IP и порта уже существует.'; + +// Diese Kombination aus IP und Post existiert bereits. + +$lng['question']['admin_ip_reallydelete'] = 'Вы уверены, что хотите удалить IP %s?'; + +// Wollen Sie wirklich die IP %s loeschen? + +$lng['admin']['ipsandports']['ipsandports'] = 'IP-адреса и порты'; + +// IPs und Ports + +$lng['admin']['ipsandports']['add'] = 'Добавить комбинацию IP/порт'; + +// IP/Port hinzufuegen + +$lng['admin']['ipsandports']['edit'] = 'Редактировать комбинацию IP/порт'; + +// IP/Port bearbeiten + +$lng['admin']['ipsandports']['ipandport'] = 'IP/порт'; + +// IP/Port + +$lng['admin']['ipsandports']['ip'] = 'IP'; + +// IP + +$lng['admin']['ipsandports']['port'] = 'Порт'; + +// Port + +/** + * ADDED BETWEEN 1.2.13 and 1.2.14 + */ + +$lng['panel']['translator'] = 'Переводчик'; + +// Uebersetzer + +$lng['error']['cantchangesystemip'] = 'Вы не можете удалить последний системный адрес IP. Создайте новую комбинацию IP/порт в качестве системного адреса IP или измените существующий системный адрес IP.'; + +// Sie koennen die letzte System IP nicht loeschen. Entweder legen Sie noch eine neue IP/Port Kombination als Systemeinstellung an oder aendern die System IP. + +$lng['question']['admin_domain_reallydocrootoutofcustomerroot'] = 'Вы уверены, что DocumentRoot этого домена должен находиться вне домашнего каталога (директории) клиента?'; + +// Sind Sie sicher, dass der DocumentRoot dieser Domain ausserhalb des Heimatverzeichnisses des Kunden liegen soll? + +$lng['admin']['memorylimitdisabled'] = 'Отключено'; + +// Deaktiviert + +$lng['error']['loginnameissystemaccount'] = 'Вы не можете создать аккаунт, похожий на системный. Выберите пожалуйста другое имя для аккаунта.'; + +// Sie können keinen Account anlegen, welcher wie ein Systemaccount aussieht. Bitte wählen Sie einen anderen Accountnamen. + +$lng['domain']['openbasedirpath'] = 'Путь OpenBasedir'; + +// OpenBasedir-Pfad + +$lng['domain']['docroot'] = 'Выше указанный путь'; + +// Oben eingegebener Pfad + +$lng['domain']['homedir'] = 'Домашний каталог'; + +// Heimverzeichnis + +$lng['admin']['valuemandatory'] = 'Это поле обязательно для заполнения'; + +// Dieses Feld muss ausgefuellt werden + +$lng['admin']['valuemandatorycompany'] = 'Необходимо заполнить поля "Фамилия" и "Имя" или "Фирма"'; + +// Entweder "Name" und "Vorname" oder "Firma" muss ausgefuellt werden + +$lng['menue']['main']['username'] = 'В системе как: '; + +// Angemeldet als: + +$lng['panel']['urloverridespath'] = 'URL (переписывет путь)'; + +// URL (ueberschreibt Pfad) + +$lng['panel']['pathorurl'] = 'Путь или URL'; + +// Pfad oder URL + +$lng['error']['sessiontimeoutiswrong'] = '"Срок действия сессии" должно являться числовым значением.'; + +// "Session-Timeout" muss ein numerischer Wert sein. + +$lng['error']['maxloginattemptsiswrong'] = '"Макс. попыток входа" должно являться числовым значением.'; + +// "Maximale Loginversuche" muss ein numerischer Wert sein. + +$lng['error']['deactivatetimiswrong'] = '"Время отключения" должно являться числовым значением.'; + +// "Laenge der Deaktivierung" muss numerisch sein. + +$lng['error']['accountprefixiswrong'] = 'Неправильная "приставка клиента".'; + +// Das "Kundenprefix" ist falsch. + +$lng['error']['mysqlprefixiswrong'] = 'Неправильная "Приставка для SQL".'; + +// Das "SQL-Prefix" ist falsch. + +$lng['error']['ftpprefixiswrong'] = 'Неправильная "Приставка для FTP".'; + +// Das "FTP-Prefix" ist falsch. + +$lng['error']['ipiswrong'] = 'Неправильный "IP-адрес". Разрешён только действительный адрес IP.'; + +// Die "IP-Adresse" ist falsch. Es ist nur eine gueltige IP-Adresse erlaubt. + +$lng['error']['vmailuidiswrong'] = '"Mails-UID" должно являться числовым значением.'; + +// Die "Mails-UID" ist falsch. Nur eine numerische UID ist erlaubt. + +$lng['error']['vmailgidiswrong'] = 'Die "Mails-GID" должно являться числовым значением.'; + +// Die "Mails-GID" ist falsch. Nur eine numerische GID ist erlaubt. + +$lng['error']['adminmailiswrong'] = 'Неправильный "Адрес отправителя". Разрешён только действительный E-Mail-адрес'; + +// Die "Absenderadresse" ist fehlerhaft. Es ist nur eine gueltige E-Mail-Adresse erlaubt + +$lng['error']['pagingiswrong'] = 'Настройка "Кол-во записей на страницу" должна иметь числовое значение.'; + +// Die "Eintraege pro Seite"-Einstellung ist falsch. Nur numerische Zeichen sind erlaubt. + +$lng['error']['phpmyadminiswrong'] = '"phpMyAdmin-URL" не является действительным URL.'; + +// Die "phpMyAdmin-URL" ist keine gültige URL. + +$lng['error']['webmailiswrong'] = '"WebMail-URL" не является действительным URL.'; + +// Die "WebMail-URL" ist keine gueltige URL. + +$lng['error']['webftpiswrong'] = '"WebFTP-URL" не является действительным URL.'; + +// Die "WebFTP-URL" ist keine gueltige URL. + +$lng['domains']['hasaliasdomains'] = 'Имеет alias-домен(ы)'; + +// Hat Aliasdomain(s) + +$lng['serversettings']['defaultip']['title'] = 'IP/порт по умолчанию'; + +// Standard IP/Port + +$lng['serversettings']['defaultip']['description'] = 'Какая комбинация IP/порт должна быть использована по умолчанию?'; + +// Welche IP/Port-Kombination soll standardmaessig verwendet werden? + +$lng['domains']['statstics'] = 'Статистика'; + +// Statistiken + +$lng['panel']['ascending'] = 'по возрастанию'; + +// aufsteigend + +$lng['panel']['decending'] = 'по убыванию'; + +// absteigend + +$lng['panel']['search'] = 'Поиск'; + +// Suche + +$lng['panel']['used'] = 'в пользовании'; + +// benutzt + +$lng['error']['stringformaterror'] = 'Значение поля "%s" не соответствует ожидаемому формату.'; + +// Der Wert des Feldes "%s" ist nicht im erwarteten Format. + +/** + * ADDED BETWEEN 1.2.14 and 1.2.15 + */ + +$lng['admin']['serversoftware'] = 'Программное обеспечение сервера'; + +// Serversoftware + +$lng['admin']['phpversion'] = 'Версия PHP'; + +// PHP-Version + +$lng['admin']['phpmemorylimit'] = 'Ограничение памяти для PHP'; + +// PHP-Memory-Limit + +$lng['admin']['mysqlserverversion'] = 'Версия сервера MySQL'; + +// MySQL Server Version + +$lng['admin']['mysqlclientversion'] = 'Версия клиента MySQL'; + +// MySQL Client Version + +$lng['admin']['webserverinterface'] = 'Интерфейс вебсервера'; + +// Webserver Interface + + + +?> diff --git a/lng/slovak.lng.php b/lng/slovak.lng.php index f3c267ba..0f18ee8f 100644 --- a/lng/slovak.lng.php +++ b/lng/slovak.lng.php @@ -1,465 +1,465 @@ - - * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt - * @package Language - * @version $Id$ - */ - -/** - * Global - */ - -$lng['translator'] = 'Drakeman'; -$lng['panel']['edit'] = 'Upraviť'; -$lng['panel']['delete'] = 'Zmazať'; -$lng['panel']['create'] = 'Vytvoriť'; -$lng['panel']['save'] = 'Uložiť'; -$lng['panel']['yes'] = 'Áno'; -$lng['panel']['no'] = 'Nie'; -$lng['panel']['emptyfornochanges'] = 'Ak políčko nevyplníte, ostane bez zmien'; -$lng['panel']['emptyfordefault'] = 'Ak políčko nevyplníte, ostane nastavené ako predvolené'; -$lng['panel']['path'] = 'Cesta'; -$lng['panel']['toggle'] = 'Prepnúť'; -$lng['panel']['next'] = 'Ďalšie'; -$lng['panel']['dirsmissing'] = 'Nepodarilo sa nájsť uvedený adresár!'; - -/** - * Login - */ - -$lng['login']['username'] = 'Užívateľské meno'; -$lng['login']['password'] = 'Heslo'; -$lng['login']['language'] = 'Jazyk'; -$lng['login']['login'] = 'Prihlásiť'; -$lng['login']['logout'] = 'Odlásiť'; -$lng['login']['profile_lng'] = 'Jazyk profilu'; - -/** - * Customer - */ - -$lng['customer']['documentroot'] = 'Domovský adresár (root)'; -$lng['customer']['name'] = 'Priezvisko'; -$lng['customer']['firstname'] = 'Meno'; -$lng['customer']['company'] = 'Spoločnosť'; -$lng['customer']['street'] = 'Ulica'; -$lng['customer']['zipcode'] = 'PSČ'; -$lng['customer']['city'] = 'Mesto'; -$lng['customer']['phone'] = 'Tel.'; -$lng['customer']['fax'] = 'Fax'; -$lng['customer']['email'] = 'E-mail'; -$lng['customer']['customernumber'] = 'ID klienta'; -$lng['customer']['diskspace'] = 'Diskový priestor (MB)'; -$lng['customer']['traffic'] = 'Traffic/prenos (GB)'; -$lng['customer']['mysqls'] = 'MySQL-Databázy'; -$lng['customer']['emails'] = 'E-mailové adresy'; -$lng['customer']['accounts'] = 'E-mailové účty'; -$lng['customer']['forwarders'] = 'E-mailové presmerovania'; -$lng['customer']['ftps'] = 'FTP-účty'; -$lng['customer']['subdomains'] = 'SubDoména(y)'; -$lng['customer']['domains'] = 'Doména(y)'; -$lng['customer']['unlimited'] = 'Neobmedzené'; - -/** - * Customermenue - */ - -$lng['menue']['main']['main'] = 'Hlavné menu'; -$lng['menue']['main']['changepassword'] = 'Zmeniť heslo'; -$lng['menue']['main']['changelanguage'] = 'Zmeniť jazyk'; -$lng['menue']['email']['email'] = 'E-mail'; -$lng['menue']['email']['emails'] = 'Adresy'; -$lng['menue']['email']['webmail'] = 'WebMail'; -$lng['menue']['mysql']['mysql'] = 'MySQL'; -$lng['menue']['mysql']['databases'] = 'Databázy'; -$lng['menue']['mysql']['phpmyadmin'] = 'phpMyAdmin'; -$lng['menue']['domains']['domains'] = 'Domény'; -$lng['menue']['domains']['settings'] = 'Nastavenia'; -$lng['menue']['ftp']['ftp'] = 'FTP'; -$lng['menue']['ftp']['accounts'] = 'Účty'; -$lng['menue']['ftp']['webftp'] = 'WebFTP'; -$lng['menue']['extras']['extras'] = 'Špeciálne'; -$lng['menue']['extras']['directoryprotection'] = 'Ochrana adresárov'; -$lng['menue']['extras']['pathoptions'] = 'Možnosti cesty'; - -/** - * Index - */ - -$lng['index']['customerdetails'] = 'Detaily klienta'; -$lng['index']['accountdetails'] = 'Detaily účtu'; - -/** - * Change Password - */ - -$lng['changepassword']['old_password'] = 'Staré heslo'; -$lng['changepassword']['new_password'] = 'Nové heslo'; -$lng['changepassword']['new_password_confirm'] = 'Potvrďte nové heslo'; -$lng['changepassword']['new_password_ifnotempty'] = 'Nové heslo (prázdne = bez zmeny)'; -$lng['changepassword']['also_change_ftp'] = ' Tiež zmeniť heslo FTP účtu'; - -/** - * Domains - */ - -$lng['domains']['description'] = 'Tu môžete nastaviť a vytvoriť subdomény a zmeniť ich cestu k adresáru, kde majú smerovať.
    Systém bude potrebovať niekoľko málo minút na uskutočnenie zmien (približne 5 min).'; -$lng['domains']['domainsettings'] = 'Nastavenia domény'; -$lng['domains']['domainname'] = 'Názov domény'; -$lng['domains']['subdomain_add'] = 'Vytvoriť subdoménu'; -$lng['domains']['subdomain_edit'] = 'Upraviť subdoménu'; -$lng['domains']['wildcarddomain'] = 'Vytvoriť doménu ako wildcarddomain
    (všetky subdomény smerujú do root adresára hlavnej domény)?'; -$lng['domains']['aliasdomain'] = 'Alias pre doménu'; -$lng['domains']['noaliasdomain'] = 'Žiaden alias pre doménu'; - -/** - * E-mails - */ - -$lng['emails']['description'] = 'Tu môžete vytvoriť a zmeniť Vaše E-mailové adresy.
    E-mail účet je ako Vaša poštová schránka v dome. Ak Vám niekto pošle E-mail, bude vložený do Vášho účtu.

    Pre stiahnutie Vaších E-mailov použite do Vášho mailového programu nasledujúce nastavenia: (Informácie označené lomeným písmom, musia byť zmenené na Vaše prístupové údaje!)
    Názov hosta: Názov domény
    Užívateľské meno: Názov účtu / E-mailová adresa
    Heslo: heslo, ktoré ste si zvolili'; -$lng['emails']['emailaddress'] = 'E-mailová adresa'; -$lng['emails']['emails_add'] = 'Vytvoriť E-mailovú adresu'; -$lng['emails']['emails_edit'] = 'Upraviť E-mailovú adresu'; -$lng['emails']['catchall'] = 'Doménový kôš'; -$lng['emails']['iscatchall'] = 'Definovať ako doménový kôš?'; -$lng['emails']['account'] = 'Účet'; -$lng['emails']['account_add'] = 'Vytvoriť účet'; -$lng['emails']['account_delete'] = 'Vymazať účet'; -$lng['emails']['from'] = 'Zdroj'; -$lng['emails']['to'] = 'Cieľ'; -$lng['emails']['forwarders'] = 'Presmerovania'; -$lng['emails']['forwarder_add'] = 'Vytvoriť presmerovanie'; - -/** - * FTP - */ - -$lng['ftp']['description'] = 'Tu môžete vytvoriť a zmeniť Vaše FTP účty.
    Zmeny sú okamžité a účty môžete používať ihneď.'; -$lng['ftp']['account_add'] = 'Vytvoriť FTP účet'; - -/** - * MySQL - */ - -$lng['mysql']['databasename'] = 'Užívateľ/Názov databázy'; -$lng['mysql']['databasedescription'] = 'Popis databázy'; -$lng['mysql']['database_create'] = 'Vytvoriť databázu'; - -/** - * Extras - */ - -$lng['extras']['description'] = 'Tu môžete pridávať ďaľšie doplnky, napríklad ochranu súborov.
    Systém bude potrebovať niekoľko málo minút na uskutočnenie zmien (približne 5 min).'; -$lng['extras']['directoryprotection_add'] = 'Pridať ochranu adresára'; -$lng['extras']['view_directory'] = 'Zobraziť obsah adresára'; -$lng['extras']['pathoptions_add'] = 'Pridať možnosti cesty'; -$lng['extras']['directory_browsing'] = 'Prezeranie obsahu adresáru'; -$lng['extras']['pathoptions_edit'] = 'Upraviť možnosti cesty'; -$lng['extras']['error404path'] = '404'; -$lng['extras']['error403path'] = '403'; -$lng['extras']['error500path'] = '500'; -$lng['extras']['error401path'] = '401'; -$lng['extras']['errordocument404path'] = 'URL pre Chybový Dokument 404'; -$lng['extras']['errordocument403path'] = 'URL pre Chybový Dokument 403'; -$lng['extras']['errordocument500path'] = 'URL pre Chybový Dokument 500'; -$lng['extras']['errordocument401path'] = 'URL pre Chybový Dokument 401'; - -/** - * Errors - */ - -$lng['error']['error'] = 'Chyba'; -$lng['error']['directorymustexist'] = 'Adresár %s musí existovať. Prosím, vytvorte ho použitím FTP klienta.'; -$lng['error']['filemustexist'] = 'Súbor %s musí existovať.'; -$lng['error']['allresourcesused'] = 'Už ste použili všetky Vaše zdroje (možnosti).'; -$lng['error']['domains_cantdeletemaindomain'] = 'Nemôžete vymazať doménu, ktorá sa používa ako E-mailová doména.'; -$lng['error']['domains_canteditdomain'] = 'Nemôžete upraviť túto doménu. Bola zablokovaná admininistrátorom.'; -$lng['error']['domains_cantdeletedomainwithemail'] = 'Nemôžete vymazať doménu, ktorá sa používa ako E-mailová doména. Najskôr zmažte všetky E-mailové adresy.'; -$lng['error']['firstdeleteallsubdomains'] = 'Pred vytvorením wildcard domény najskôr musíte vymazať všetky subdomény.'; -$lng['error']['youhavealreadyacatchallforthisdomain'] = 'Pre túto doménu ste už doménový kôš nadefinovali.'; -$lng['error']['ftp_cantdeletemainaccount'] = 'Nemôžete vymazať Váš hlavný FTP účet'; -$lng['error']['login'] = 'Užívateľské meno alebo heslo, ktoré ste zadali je nesprávne. Prosím, skúste znovu!'; -$lng['error']['login_blocked'] = 'Tento účet bol suspendovaný z dôvodu veľkého množsta chybových prihlasení.
    Prosím, skúste znovu za ' . $settings['login']['deactivatetime'] . ' sekúnd.'; -$lng['error']['notallreqfieldsorerrors'] = 'Nevyplnili ste všetky polia, alebo sú niektoré nesprávne.'; -$lng['error']['oldpasswordnotcorrect'] = 'Stará heslo nie je správne.'; -$lng['error']['youcantallocatemorethanyouhave'] = 'Nemôžete vymedziť viac prostiedkov ako sú povolené pre Vás.'; -$lng['error']['mustbeurl'] = 'Nezadali ste správu alebo kompletnú URL (napr. http://vasa_domena.tlk/error404.htm)'; -$lng['error']['invalidpath'] = 'Nevybrali ste správu URL (možno je problém so zoznamom adresárov)'; -$lng['error']['stringisempty'] = 'Chýbajúce vstupné pole'; -$lng['error']['stringiswrong'] = 'Nesprávne vstupné pole'; -$lng['error']['myloginname'] = '\'' . $lng['login']['username'] . '\''; -$lng['error']['mypassword'] = '\'' . $lng['login']['password'] . '\''; -$lng['error']['oldpassword'] = '\'' . $lng['changepassword']['old_password'] . '\''; -$lng['error']['newpassword'] = '\'' . $lng['changepassword']['new_password'] . '\''; -$lng['error']['newpasswordconfirm'] = '\'' . $lng['changepassword']['new_password_confirm'] . '\''; -$lng['error']['newpasswordconfirmerror'] = 'Nové a potvrdzujúce heslo sa nezhodujú'; -$lng['error']['myname'] = '\'' . $lng['customer']['name'] . '\''; -$lng['error']['myfirstname'] = '\'' . $lng['customer']['firstname'] . '\''; -$lng['error']['emailadd'] = '\'' . $lng['customer']['email'] . '\''; -$lng['error']['mydomain'] = '\'Domain\''; -$lng['error']['mydocumentroot'] = '\'Documentroot\''; -$lng['error']['loginnameexists'] = 'Prihlasovacie meno %s už existuje'; -$lng['error']['emailiswrong'] = 'E-mailová adresa obsahuje %s obsahuje neplatné znaky, alebo je nekompletná'; -$lng['error']['loginnameiswrong'] = 'Prihlasovacie meno %s obsahuje neplatné znaky'; -$lng['error']['userpathcombinationdupe'] = 'Kombinácia užívateľského mena a cesty už existuje'; -$lng['error']['patherror'] = 'Všeobecná chyba! Cesta nemôže byť prázdna'; -$lng['error']['errordocpathdupe'] = 'Možnosť pre cestu %s už existuje'; -$lng['error']['adduserfirst'] = 'Prosím, najskor vytvorte užívateľa'; -$lng['error']['domainalreadyexists'] = 'Doména %s je už priradená užívateľovi'; -$lng['error']['nolanguageselect'] = 'Nebol vybraný jazyk.'; -$lng['error']['nosubjectcreate'] = 'Pre túto E-mailovú šablónu musíte zadefinovať tému.'; -$lng['error']['nomailbodycreate'] = 'Pre túto E-mailovú šablónu musíte zadefinovať text E-mailu.'; -$lng['error']['templatenotfound'] = 'Šablóna nebola nájdená.'; -$lng['error']['alltemplatesdefined'] = 'Nemôžete definovať viac šablón. Všetky jazyky sú už podporované.'; -$lng['error']['wwwnotallowed'] = 'www nie je povolené pre subdomény.'; -$lng['error']['subdomainiswrong'] = 'Subdoména obsahuje %s neplatné znaky.'; -$lng['error']['domaincantbeempty'] = 'Názov domény nemôže byť prázdny.'; -$lng['error']['domainexistalready'] = 'Doména %s už existuje.'; -$lng['error']['domainisaliasorothercustomer'] = 'Zvolený alias domény je buď sám doménový alias alebo patrí inému klientovi.'; -$lng['error']['emailexistalready'] = 'E-maolová adresa %s už existuje.'; -$lng['error']['maindomainnonexist'] = 'Hlavná doména %s neexistuje.'; -$lng['error']['destinationnonexist'] = 'Prosím, vytvorte Vaše presmerovanie v poličku \'Cieľ\'.'; -$lng['error']['destinationalreadyexistasmail'] = 'Presmerovanie na %s už existuje s aktívnou E-mail adresou.'; -$lng['error']['destinationalreadyexist'] = 'Už ste definovali presmerovanie na %s .'; -$lng['error']['destinationiswrong'] = 'Presmerovanie %s obsahuje neplatný(é) znak(y) alebo je nekompletné.'; -$lng['error']['domainname'] = $lng['domains']['domainname']; - -/** - * Questions - */ - -$lng['question']['question'] = 'Otázky bezpečnosti'; -$lng['question']['admin_customer_reallydelete'] = 'Naozaj chcete zmazať klienta %s? Nemožno vrátiť späť!'; -$lng['question']['admin_domain_reallydelete'] = 'Naozaj chcete zmazať doménu %s?'; -$lng['question']['admin_domain_reallydisablesecuritysetting'] = 'Naozaj chcete deaktivovať tieto bezbečnostné nastavenias (OpenBasedir a/alebo SafeMode)?'; -$lng['question']['admin_admin_reallydelete'] = 'Naozaj chcete zmazať admina %s? Každý klient a doména bude preradená hlavnému administrátorovi.'; -$lng['question']['admin_template_reallydelete'] = 'Naozaj chcete zmazať šablónu \'%s\'?'; -$lng['question']['domains_reallydelete'] = 'Naozaj chcete zmazať doménu %s?'; -$lng['question']['email_reallydelete'] = 'Naozaj chcete zmazať E-mailovú adresu %s?'; -$lng['question']['email_reallydelete_account'] = 'Naozaj chcete zmazať E-mailový účet %s?'; -$lng['question']['email_reallydelete_forwarder'] = 'Naozaj chcete zmazať presmerovanie %s?'; -$lng['question']['extras_reallydelete'] = 'Naozaj chcete zmazať ochranu adresára pre %s?'; -$lng['question']['extras_reallydelete_pathoptions'] = 'Naozaj chcete zmazať cestu možností pre %s?'; -$lng['question']['ftp_reallydelete'] = 'Naozaj chcete zmazať FTP účet %s?'; -$lng['question']['mysql_reallydelete'] = 'Naozaj chcete zmazať databázu %s? Nemožno vrátiť späť!'; -$lng['question']['admin_configs_reallyrebuild'] = 'Naozaj chcete pretvoriť Vaše apache a bind (DNS) konfikuračné súbory?'; - -/** - * Mails - */ - -$lng['mails']['pop_success']['mailbody'] = 'Dobrý deň,\n\nVáš E-mail účet {EMAIL}\nbol úspešne založený.\n\nToto je automaticky generovaný E-mail.\n Prosím, neodpovedajte naň!\n\nS pozdravom, Vaš webhostingový partner Iga s.r.o.'; -$lng['mails']['pop_success']['subject'] = 'E-mailový účet bol úspešne založený'; -$lng['mails']['createcustomer']['mailbody'] = 'Dobrý deň {FIRSTNAME} {NAME},\n\ntu sú Vaše informácie o účte:\n\nPrihlasovacie meno: {USERNAME}\nHeslo: {PASSWORD}\n\nĎakujeme,\n Iga s.r.o'; -$lng['mails']['createcustomer']['subject'] = 'Informácie o účte'; - -/** - * Admin - */ - -$lng['admin']['overview'] = 'Prehľad'; -$lng['admin']['ressourcedetails'] = 'Použité prostriedky'; -$lng['admin']['systemdetails'] = 'Systémové údaje'; -$lng['admin']['froxlordetails'] = 'Froxlor údaje'; -$lng['admin']['installedversion'] = 'Inštalovaná verzia'; -$lng['admin']['latestversion'] = 'Najnovšia verzia'; -$lng['admin']['lookfornewversion']['clickhere'] = 'Vyhľadávať pomocou webovej složby'; -$lng['admin']['lookfornewversion']['error'] = 'Chyba počas čítania'; -$lng['admin']['resources'] = 'Prostriedky'; -$lng['admin']['customer'] = 'Klient'; -$lng['admin']['customers'] = 'Klienti'; -$lng['admin']['customer_add'] = 'Vytvoriť klienta'; -$lng['admin']['customer_edit'] = 'Upraviť klienta'; -$lng['admin']['domains'] = 'Domény'; -$lng['admin']['domain_add'] = 'Vytvoriť doménu'; -$lng['admin']['domain_edit'] = 'Upraviť doménu'; -$lng['admin']['subdomainforemail'] = 'Subdomény ako E-mailové domény'; -$lng['admin']['admin'] = 'Administrátor'; -$lng['admin']['admins'] = 'Administrátori'; -$lng['admin']['admin_add'] = 'Vytvoriť administrátora'; -$lng['admin']['admin_edit'] = 'Upraviť administrátora'; -$lng['admin']['customers_see_all'] = 'Môže vidieť všetkých klientov?'; -$lng['admin']['domains_see_all'] = 'Môže vidieť všetky domény?'; -$lng['admin']['change_serversettings'] = 'Môže meniť nastavenia servra?'; -$lng['admin']['server'] = 'Server'; -$lng['admin']['serversettings'] = 'Nastavenia'; -$lng['admin']['rebuildconf'] = 'Pretvoriť konfikuračné súbory'; -$lng['admin']['stdsubdomain'] = 'Štandardné subdomény'; -$lng['admin']['stdsubdomain_add'] = 'Vytvoriť štandardnú subdoménu'; -$lng['admin']['deactivated'] = 'Deaktivové'; -$lng['admin']['deactivated_user'] = 'Dektivovať užívateľa'; -$lng['admin']['sendpassword'] = 'Zaslať heslo'; -$lng['admin']['ownvhostsettings'] = 'Vlastné vHost-Nastavenia'; -$lng['admin']['configfiles']['serverconfiguration'] = 'Nastavenia'; -$lng['admin']['configfiles']['files'] = 'Konfiguračné súbory: Prosím, zmeňte nasledovné súbory alebo ak neexistujú,
    vytvorte v nich nasledujúci obsah.
    Všimnite si: MySQL heslo nemôže byť z bezpečnostných dôvodov zmenené.
    Prosím nahraďte "MYSQL_PASSWORD" Vaším vlastným. Ak ste zabudli Vaše MySQL heslo,
    nájdete ho v "lib/userdata.inc.php".'; -$lng['admin']['configfiles']['commands'] = 'Príkazy: Prosím vykonajte nasledovné príkazy v príkazovom riadku.'; -$lng['admin']['configfiles']['restart'] = 'Reštart: Prosím vykonajte následovné príkazy v príkazovom riadku v presnom poradí, aby sa načítali nové nastavenia.'; -$lng['admin']['templates']['templates'] = 'Šablóny'; -$lng['admin']['templates']['template_add'] = 'Pridať šablónu'; -$lng['admin']['templates']['template_edit'] = 'Upraviť šablónu'; -$lng['admin']['templates']['action'] = 'Akcia'; -$lng['admin']['templates']['email'] = 'E-Mail'; -$lng['admin']['templates']['subject'] = 'Predmet'; -$lng['admin']['templates']['mailbody'] = 'Telo správy'; -$lng['admin']['templates']['createcustomer'] = 'Uvítací E-mail pre nového klienta'; -$lng['admin']['templates']['pop_success'] = 'Uvítací E-mail pre novť E-mailový účet'; -$lng['admin']['templates']['template_replace_vars'] = 'Premenné nahradzované v šablónach:'; -$lng['admin']['templates']['FIRSTNAME'] = 'Nahradiť krstným menom klienta.'; -$lng['admin']['templates']['NAME'] = 'Nahradiť menom klienta.'; -$lng['admin']['templates']['USERNAME'] = 'Nahradiť menom účtu klienta.'; -$lng['admin']['templates']['PASSWORD'] = 'Nahradiť heslom účtu klienta.'; -$lng['admin']['templates']['EMAIL'] = 'Nahradiť adresou POP3/IMAP účtu.'; - -/** - * Serversettings - */ - -$lng['serversettings']['session_timeout']['title'] = 'Časový limit sedenia'; -$lng['serversettings']['session_timeout']['description'] = 'Ako dlho má byť užívateľ neaktívny predtým, ako sa pripojenie stane neplatným (v sekundách)?'; -$lng['serversettings']['accountprefix']['title'] = 'Prefix klienta'; -$lng['serversettings']['accountprefix']['description'] = 'Aký prefix môžu mať klientské účty?'; -$lng['serversettings']['mysqlprefix']['title'] = 'SQL Prefix'; -$lng['serversettings']['mysqlprefix']['description'] = 'Aký prefix majú mať mySQL účty?'; -$lng['serversettings']['ftpprefix']['title'] = 'FTP Prefix'; -$lng['serversettings']['ftpprefix']['description'] = 'Aký prefix majú mať FTP účty?'; -$lng['serversettings']['documentroot_prefix']['title'] = 'Adresár dokumentov'; -$lng['serversettings']['documentroot_prefix']['description'] = 'Kde majú byť ukladané všetky dáta?'; -$lng['serversettings']['logfiles_directory']['title'] = 'Adresár súborov s logmi'; -$lng['serversettings']['logfiles_directory']['description'] = 'Kde majú byť ukladané všetky log súbory?'; -$lng['serversettings']['ipaddress']['title'] = 'IP-Addresy'; -$lng['serversettings']['ipaddress']['description'] = 'Aká je IP adresa tohto servera?'; -$lng['serversettings']['hostname']['title'] = 'Názov hosta'; -$lng['serversettings']['hostname']['description'] = 'Aký je názov hosta tohto servera?'; -$lng['serversettings']['apachereload_command']['title'] = 'Príkaz na pretvorenie (reload) Apache'; -$lng['serversettings']['apachereload_command']['description'] = 'Aký je príkaz na pretvorenie (reload) Apache?'; -$lng['serversettings']['bindconf_directory']['title'] = 'Adresár konfigurácie bind (DNS)'; -$lng['serversettings']['bindconf_directory']['description'] = 'Kde sa nachádzajú konfiguračné súbory pre bind (DNS)?'; -$lng['serversettings']['bindreload_command']['title'] = 'Príkaz na pretvorenie (reload) bind'; -$lng['serversettings']['bindreload_command']['description'] = 'Aký je príkaz na pretvorenie (reload) bind (DNS)?'; -$lng['serversettings']['binddefaultzone']['title'] = 'Predvolená zóna bind (DNS)'; -$lng['serversettings']['binddefaultzone']['description'] = 'Aký je názov predvolenej zóny?'; -$lng['serversettings']['vmail_uid']['title'] = 'Uid E-mailov (Mails-Uid)'; -$lng['serversettings']['vmail_uid']['description'] = 'Ktoré ID užívateľa môžu mať E-mail?'; -$lng['serversettings']['vmail_gid']['title'] = 'Mails-Gid'; -$lng['serversettings']['vmail_gid']['description'] = 'Ktoré ID skupiny môžu mať E-mail?'; -$lng['serversettings']['vmail_homedir']['title'] = 'Domovský adresár pre E-maily'; -$lng['serversettings']['vmail_homedir']['description'] = 'Kde majú byť ukladané všetky E-maily?'; -$lng['serversettings']['adminmail']['title'] = 'Odosielateľ'; -$lng['serversettings']['adminmail']['description'] = 'Aká je adresa odosielateľa pre E-maily odoslané z panela?'; -$lng['serversettings']['phpmyadmin_url']['title'] = 'URL pre phpMyAdmin'; -$lng['serversettings']['phpmyadmin_url']['description'] = 'Aká je URL pre phpMyAdmin? (musí začínať s http://)'; -$lng['serversettings']['webmail_url']['title'] = 'URL pre WebMail'; -$lng['serversettings']['webmail_url']['description'] = 'Aká je URL pre WebMail? (musí začínať s http://)'; -$lng['serversettings']['webftp_url']['title'] = 'URL pre WebFTP'; -$lng['serversettings']['webftp_url']['description'] = 'Aká je URL WebFTP? (musí začínať s http://)'; -$lng['serversettings']['language']['description'] = 'Aký je štandardný jazyk servera?'; -$lng['serversettings']['maxloginattempts']['title'] = 'Maximálny počet pokusov o prihlásenia'; -$lng['serversettings']['maxloginattempts']['description'] = 'Maximálny počet pokusov o prihlásenia po ktorých bude účet deaktivovaný.'; -$lng['serversettings']['deactivatetime']['title'] = 'Dátum/čas deaktivácie'; -$lng['serversettings']['deactivatetime']['description'] = 'Čas v sekundách, za ktorý sa účet deaktivuje po množstve pokusov o prihlásenie.'; -$lng['serversettings']['pathedit']['title'] = 'Zadajte názov vstupu'; -$lng['serversettings']['pathedit']['description'] = 'Môže byť cest zvolená z vyskakovacieho menu alebo zadaná do pola?'; - -/** - * CHANGED BETWEEN 1.2.12 and 1.2.13 - */ - -$lng['mysql']['description'] = 'Tu môžete vytvárať a meniť Vaše MySQL databázy.
    Zmeny sú okamžité a účty môžete používať ihneď.
    Na ľavej strane sa nachádza menu, v ktorom je nástroj phpMyAdmin, cez ktorý môžete rýchlo a jednoducho spravovať Vaše databázy.

    Pre použitie Vaších databáz vo Vaších PHP skriptoch použite nasledujúce nastavenia: (Informácie označené lomeným písmom, musia byť zmenené na Vaše prístupové údaje!)
    Názov hosta: localhost
    Užívateľské meno: Názov_databázy
    Heslo: heslo, ktoré ste si zvolili
    Databáza: Názov_databázy'; - -/** - * ADDED BETWEEN 1.2.12 and 1.2.13 - */ - -$lng['admin']['cronlastrun'] = 'Posledný Cron'; -$lng['serversettings']['paging']['title'] = 'Záznamov na stránku'; -$lng['serversettings']['paging']['description'] = 'Koľko záznamov bude zobrazených na jednej stránke? (0 = zakázané stránkovanie)'; -$lng['error']['ipstillhasdomains'] = 'IP/Port kombinácia ktorú chcete zmazať má stále priradené domenény. Pred zmazaním tejto IP/Port kombinácie prosím znovu priraďte tieto k ostatným IP/Port kombináciam.'; -$lng['error']['cantdeletedefaultip'] = 'Nemôžete zmazať predvolenú reseller IP/Port kombináciu. Pred zmazaním tejto IP/Port kombinácie prosím vytvorte inú predvolenú IP/Port kombináciu pre resellerov.'; -$lng['error']['cantdeletesystemip'] = 'Nemôžete zmazať poslednú IP systému, ani vytvoriť ďaľšiu novú IP/Port kombináciu pre IP systém alebo zmeniť systémovú IP.'; -$lng['error']['myipaddress'] = '\'IP\''; -$lng['error']['myport'] = '\'Port\''; -$lng['error']['myipdefault'] = 'Musíte vybrať kombináciu IP/Port ktorá sa stane predvolenou.'; -$lng['error']['myipnotdouble'] = 'Táto kombinácia IP/Port už existuje.'; -$lng['question']['admin_ip_reallydelete'] = 'Naozaj chcete zmazať IP adresu %s?'; -$lng['admin']['ipsandports']['ipsandports'] = 'IP a Port(y)'; -$lng['admin']['ipsandports']['add'] = 'Pridať IP/Port'; -$lng['admin']['ipsandports']['edit'] = 'Upraviťt IP/Port'; -$lng['admin']['ipsandports']['ipandport'] = 'IP/Port'; -$lng['admin']['ipsandports']['ip'] = 'IP'; -$lng['admin']['ipsandports']['port'] = 'Port'; - -// ADDED IN 1.2.13-rc3 - -$lng['error']['cantchangesystemip'] = 'Nemôžete zmeniť poslednú IP systému, ani vytvoriť ďaľšiu novú IP/Port kombináciu pre IP systém alebo zmeniť systémovú IP.'; -$lng['question']['admin_domain_reallydocrootoutofcustomerroot'] = 'Are you sure, you want the document root for this domain, not being within the customerroot of the customer?'; - -// ADDED IN 1.2.14-rc1 - -$lng['admin']['memorylimitdisabled'] = 'Zakázaný'; -$lng['domain']['openbasedirpath'] = 'OpenBasedir cesta'; -$lng['domain']['docroot'] = 'Cesta z pola vyššie'; -$lng['domain']['homedir'] = 'Domovský adresár'; -$lng['admin']['valuemandatory'] = 'Táto hodnota je povinná'; -$lng['admin']['valuemandatorycompany'] = 'Oboje "meno" a "priezvisko" alebo "spoločnosť" musia byť vyplnené'; -$lng['menue']['main']['username'] = 'Prihlásený ako: '; -$lng['panel']['urloverridespath'] = 'URL (nadradená cesta)'; -$lng['panel']['pathorurl'] = 'Cesta alebo URL'; -$lng['error']['sessiontimeoutiswrong'] = 'Je povolený len číselný "časový limit sedenia".'; -$lng['error']['maxloginattemptsiswrong'] = 'Je povolený len číselný "maximálny počet prihlásení".'; -$lng['error']['deactivatetimiswrong'] = 'Je povolený len číselný "čas deaktivácie".'; -$lng['error']['accountprefixiswrong'] = '"Prefix klienta" je nesprávny.'; -$lng['error']['mysqlprefixiswrong'] = '"SQL prefix" je nesprávny.'; -$lng['error']['ftpprefixiswrong'] = '"FTP prefix" je nesprávny.'; -$lng['error']['ipiswrong'] = '"IP-Adresa" je nesprávna. Je povolená len platná IP-adresa.'; -$lng['error']['vmailuidiswrong'] = '"Mails-uid" je nesprávne. Je povolené len číselné UID.'; -$lng['error']['vmailgidiswrong'] = '"Mails-gid" je nesprávne. Je povolené len číselné GID.'; -$lng['error']['adminmailiswrong'] = '"Adresa odosielateľa" je nesprávna. Je povolená len platná E-mail-adresa.'; -$lng['error']['pagingiswrong'] = 'Hodnota "záznamov na stránku" je neplatná. Sú povolené len číselné znaky.'; -$lng['error']['phpmyadminiswrong'] = 'phpMyAdmin odkaz nie je platným odkazov.'; -$lng['error']['webmailiswrong'] = 'WebMail odkaz nie je platým odkazom.'; -$lng['error']['webftpiswrong'] = 'WebFTP odkaz nie je platým odkazom.'; -$lng['domains']['hasaliasdomains'] = 'Má alias domény(én)'; -$lng['serversettings']['defaultip']['title'] = 'Predvolený IP/Port'; -$lng['serversettings']['defaultip']['description'] = 'Čo je predvolená IP/Port kombinácia?'; -$lng['domains']['statstics'] = 'Použiť štatistiky'; -$lng['panel']['ascending'] = 'Vzostupne'; -$lng['panel']['decending'] = 'Zostupne'; -$lng['panel']['search'] = 'Vyhľadať'; -$lng['panel']['used'] = 'použité'; - -// ADDED IN 1.2.14-rc3 - -$lng['panel']['translator'] = 'Prekladač'; - -// ADDED IN 1.2.14-rc4 - -$lng['error']['stringformaterror'] = 'Hodnota pre pole "%s" nie je v očakávanom formáte.'; - -// ADDED IN 1.2.15-rc1 - -$lng['admin']['serversoftware'] = 'Server software'; -$lng['admin']['phpversion'] = 'PHP verzia'; -$lng['admin']['phpmemorylimit'] = 'PHP Memory Limit'; -$lng['admin']['mysqlserverversion'] = 'MySQL Server verzia'; -$lng['admin']['mysqlclientversion'] = 'MySQL Client verzia'; -$lng['admin']['webserverinterface'] = 'Webserver rozhranie'; -$lng['domains']['isassigneddomain'] = 'Je priradenou doménou'; -$lng['serversettings']['phpappendopenbasedir']['title'] = 'Cesty na pripojenie k OpenBasedir'; -$lng['serversettings']['phpappendopenbasedir']['description'] = 'Tieto cesty (oddelené dvojbodkou) budú pridané do OpenBasedir príkazu (statement) v každom vhost-zázobníku (container).'; - -// CHANGED IN 1.2.15-rc1 - -$lng['error']['loginnameissystemaccount'] = 'Nemôžete vytvoriť účet, ktorý je podobný systémovému účtu (napríklad začnite s "%s"). Prosím, zadajte iný názov účtu.'; - -?> + + * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt + * @package Language + * @version $Id$ + */ + +/** + * Global + */ + +$lng['translator'] = 'Drakeman'; +$lng['panel']['edit'] = 'Upraviť'; +$lng['panel']['delete'] = 'Zmazať'; +$lng['panel']['create'] = 'Vytvoriť'; +$lng['panel']['save'] = 'Uložiť'; +$lng['panel']['yes'] = 'Áno'; +$lng['panel']['no'] = 'Nie'; +$lng['panel']['emptyfornochanges'] = 'Ak políčko nevyplníte, ostane bez zmien'; +$lng['panel']['emptyfordefault'] = 'Ak políčko nevyplníte, ostane nastavené ako predvolené'; +$lng['panel']['path'] = 'Cesta'; +$lng['panel']['toggle'] = 'Prepnúť'; +$lng['panel']['next'] = 'Ďalšie'; +$lng['panel']['dirsmissing'] = 'Nepodarilo sa nájsť uvedený adresár!'; + +/** + * Login + */ + +$lng['login']['username'] = 'Užívateľské meno'; +$lng['login']['password'] = 'Heslo'; +$lng['login']['language'] = 'Jazyk'; +$lng['login']['login'] = 'Prihlásiť'; +$lng['login']['logout'] = 'Odlásiť'; +$lng['login']['profile_lng'] = 'Jazyk profilu'; + +/** + * Customer + */ + +$lng['customer']['documentroot'] = 'Domovský adresár (root)'; +$lng['customer']['name'] = 'Priezvisko'; +$lng['customer']['firstname'] = 'Meno'; +$lng['customer']['company'] = 'Spoločnosť'; +$lng['customer']['street'] = 'Ulica'; +$lng['customer']['zipcode'] = 'PSČ'; +$lng['customer']['city'] = 'Mesto'; +$lng['customer']['phone'] = 'Tel.'; +$lng['customer']['fax'] = 'Fax'; +$lng['customer']['email'] = 'E-mail'; +$lng['customer']['customernumber'] = 'ID klienta'; +$lng['customer']['diskspace'] = 'Diskový priestor (MB)'; +$lng['customer']['traffic'] = 'Traffic/prenos (GB)'; +$lng['customer']['mysqls'] = 'MySQL-Databázy'; +$lng['customer']['emails'] = 'E-mailové adresy'; +$lng['customer']['accounts'] = 'E-mailové účty'; +$lng['customer']['forwarders'] = 'E-mailové presmerovania'; +$lng['customer']['ftps'] = 'FTP-účty'; +$lng['customer']['subdomains'] = 'SubDoména(y)'; +$lng['customer']['domains'] = 'Doména(y)'; +$lng['customer']['unlimited'] = 'Neobmedzené'; + +/** + * Customermenue + */ + +$lng['menue']['main']['main'] = 'Hlavné menu'; +$lng['menue']['main']['changepassword'] = 'Zmeniť heslo'; +$lng['menue']['main']['changelanguage'] = 'Zmeniť jazyk'; +$lng['menue']['email']['email'] = 'E-mail'; +$lng['menue']['email']['emails'] = 'Adresy'; +$lng['menue']['email']['webmail'] = 'WebMail'; +$lng['menue']['mysql']['mysql'] = 'MySQL'; +$lng['menue']['mysql']['databases'] = 'Databázy'; +$lng['menue']['mysql']['phpmyadmin'] = 'phpMyAdmin'; +$lng['menue']['domains']['domains'] = 'Domény'; +$lng['menue']['domains']['settings'] = 'Nastavenia'; +$lng['menue']['ftp']['ftp'] = 'FTP'; +$lng['menue']['ftp']['accounts'] = 'Účty'; +$lng['menue']['ftp']['webftp'] = 'WebFTP'; +$lng['menue']['extras']['extras'] = 'Špeciálne'; +$lng['menue']['extras']['directoryprotection'] = 'Ochrana adresárov'; +$lng['menue']['extras']['pathoptions'] = 'Možnosti cesty'; + +/** + * Index + */ + +$lng['index']['customerdetails'] = 'Detaily klienta'; +$lng['index']['accountdetails'] = 'Detaily účtu'; + +/** + * Change Password + */ + +$lng['changepassword']['old_password'] = 'Staré heslo'; +$lng['changepassword']['new_password'] = 'Nové heslo'; +$lng['changepassword']['new_password_confirm'] = 'Potvrďte nové heslo'; +$lng['changepassword']['new_password_ifnotempty'] = 'Nové heslo (prázdne = bez zmeny)'; +$lng['changepassword']['also_change_ftp'] = ' Tiež zmeniť heslo FTP účtu'; + +/** + * Domains + */ + +$lng['domains']['description'] = 'Tu môžete nastaviť a vytvoriť subdomény a zmeniť ich cestu k adresáru, kde majú smerovať.
    Systém bude potrebovať niekoľko málo minút na uskutočnenie zmien (približne 5 min).'; +$lng['domains']['domainsettings'] = 'Nastavenia domény'; +$lng['domains']['domainname'] = 'Názov domény'; +$lng['domains']['subdomain_add'] = 'Vytvoriť subdoménu'; +$lng['domains']['subdomain_edit'] = 'Upraviť subdoménu'; +$lng['domains']['wildcarddomain'] = 'Vytvoriť doménu ako wildcarddomain
    (všetky subdomény smerujú do root adresára hlavnej domény)?'; +$lng['domains']['aliasdomain'] = 'Alias pre doménu'; +$lng['domains']['noaliasdomain'] = 'Žiaden alias pre doménu'; + +/** + * E-mails + */ + +$lng['emails']['description'] = 'Tu môžete vytvoriť a zmeniť Vaše E-mailové adresy.
    E-mail účet je ako Vaša poštová schránka v dome. Ak Vám niekto pošle E-mail, bude vložený do Vášho účtu.

    Pre stiahnutie Vaších E-mailov použite do Vášho mailového programu nasledujúce nastavenia: (Informácie označené lomeným písmom, musia byť zmenené na Vaše prístupové údaje!)
    Názov hosta: Názov domény
    Užívateľské meno: Názov účtu / E-mailová adresa
    Heslo: heslo, ktoré ste si zvolili'; +$lng['emails']['emailaddress'] = 'E-mailová adresa'; +$lng['emails']['emails_add'] = 'Vytvoriť E-mailovú adresu'; +$lng['emails']['emails_edit'] = 'Upraviť E-mailovú adresu'; +$lng['emails']['catchall'] = 'Doménový kôš'; +$lng['emails']['iscatchall'] = 'Definovať ako doménový kôš?'; +$lng['emails']['account'] = 'Účet'; +$lng['emails']['account_add'] = 'Vytvoriť účet'; +$lng['emails']['account_delete'] = 'Vymazať účet'; +$lng['emails']['from'] = 'Zdroj'; +$lng['emails']['to'] = 'Cieľ'; +$lng['emails']['forwarders'] = 'Presmerovania'; +$lng['emails']['forwarder_add'] = 'Vytvoriť presmerovanie'; + +/** + * FTP + */ + +$lng['ftp']['description'] = 'Tu môžete vytvoriť a zmeniť Vaše FTP účty.
    Zmeny sú okamžité a účty môžete používať ihneď.'; +$lng['ftp']['account_add'] = 'Vytvoriť FTP účet'; + +/** + * MySQL + */ + +$lng['mysql']['databasename'] = 'Užívateľ/Názov databázy'; +$lng['mysql']['databasedescription'] = 'Popis databázy'; +$lng['mysql']['database_create'] = 'Vytvoriť databázu'; + +/** + * Extras + */ + +$lng['extras']['description'] = 'Tu môžete pridávať ďaľšie doplnky, napríklad ochranu súborov.
    Systém bude potrebovať niekoľko málo minút na uskutočnenie zmien (približne 5 min).'; +$lng['extras']['directoryprotection_add'] = 'Pridať ochranu adresára'; +$lng['extras']['view_directory'] = 'Zobraziť obsah adresára'; +$lng['extras']['pathoptions_add'] = 'Pridať možnosti cesty'; +$lng['extras']['directory_browsing'] = 'Prezeranie obsahu adresáru'; +$lng['extras']['pathoptions_edit'] = 'Upraviť možnosti cesty'; +$lng['extras']['error404path'] = '404'; +$lng['extras']['error403path'] = '403'; +$lng['extras']['error500path'] = '500'; +$lng['extras']['error401path'] = '401'; +$lng['extras']['errordocument404path'] = 'URL pre Chybový Dokument 404'; +$lng['extras']['errordocument403path'] = 'URL pre Chybový Dokument 403'; +$lng['extras']['errordocument500path'] = 'URL pre Chybový Dokument 500'; +$lng['extras']['errordocument401path'] = 'URL pre Chybový Dokument 401'; + +/** + * Errors + */ + +$lng['error']['error'] = 'Chyba'; +$lng['error']['directorymustexist'] = 'Adresár %s musí existovať. Prosím, vytvorte ho použitím FTP klienta.'; +$lng['error']['filemustexist'] = 'Súbor %s musí existovať.'; +$lng['error']['allresourcesused'] = 'Už ste použili všetky Vaše zdroje (možnosti).'; +$lng['error']['domains_cantdeletemaindomain'] = 'Nemôžete vymazať doménu, ktorá sa používa ako E-mailová doména.'; +$lng['error']['domains_canteditdomain'] = 'Nemôžete upraviť túto doménu. Bola zablokovaná admininistrátorom.'; +$lng['error']['domains_cantdeletedomainwithemail'] = 'Nemôžete vymazať doménu, ktorá sa používa ako E-mailová doména. Najskôr zmažte všetky E-mailové adresy.'; +$lng['error']['firstdeleteallsubdomains'] = 'Pred vytvorením wildcard domény najskôr musíte vymazať všetky subdomény.'; +$lng['error']['youhavealreadyacatchallforthisdomain'] = 'Pre túto doménu ste už doménový kôš nadefinovali.'; +$lng['error']['ftp_cantdeletemainaccount'] = 'Nemôžete vymazať Váš hlavný FTP účet'; +$lng['error']['login'] = 'Užívateľské meno alebo heslo, ktoré ste zadali je nesprávne. Prosím, skúste znovu!'; +$lng['error']['login_blocked'] = 'Tento účet bol suspendovaný z dôvodu veľkého množsta chybových prihlasení.
    Prosím, skúste znovu za ' . $settings['login']['deactivatetime'] . ' sekúnd.'; +$lng['error']['notallreqfieldsorerrors'] = 'Nevyplnili ste všetky polia, alebo sú niektoré nesprávne.'; +$lng['error']['oldpasswordnotcorrect'] = 'Stará heslo nie je správne.'; +$lng['error']['youcantallocatemorethanyouhave'] = 'Nemôžete vymedziť viac prostiedkov ako sú povolené pre Vás.'; +$lng['error']['mustbeurl'] = 'Nezadali ste správu alebo kompletnú URL (napr. http://vasa_domena.tlk/error404.htm)'; +$lng['error']['invalidpath'] = 'Nevybrali ste správu URL (možno je problém so zoznamom adresárov)'; +$lng['error']['stringisempty'] = 'Chýbajúce vstupné pole'; +$lng['error']['stringiswrong'] = 'Nesprávne vstupné pole'; +$lng['error']['myloginname'] = '\'' . $lng['login']['username'] . '\''; +$lng['error']['mypassword'] = '\'' . $lng['login']['password'] . '\''; +$lng['error']['oldpassword'] = '\'' . $lng['changepassword']['old_password'] . '\''; +$lng['error']['newpassword'] = '\'' . $lng['changepassword']['new_password'] . '\''; +$lng['error']['newpasswordconfirm'] = '\'' . $lng['changepassword']['new_password_confirm'] . '\''; +$lng['error']['newpasswordconfirmerror'] = 'Nové a potvrdzujúce heslo sa nezhodujú'; +$lng['error']['myname'] = '\'' . $lng['customer']['name'] . '\''; +$lng['error']['myfirstname'] = '\'' . $lng['customer']['firstname'] . '\''; +$lng['error']['emailadd'] = '\'' . $lng['customer']['email'] . '\''; +$lng['error']['mydomain'] = '\'Domain\''; +$lng['error']['mydocumentroot'] = '\'Documentroot\''; +$lng['error']['loginnameexists'] = 'Prihlasovacie meno %s už existuje'; +$lng['error']['emailiswrong'] = 'E-mailová adresa obsahuje %s obsahuje neplatné znaky, alebo je nekompletná'; +$lng['error']['loginnameiswrong'] = 'Prihlasovacie meno %s obsahuje neplatné znaky'; +$lng['error']['userpathcombinationdupe'] = 'Kombinácia užívateľského mena a cesty už existuje'; +$lng['error']['patherror'] = 'Všeobecná chyba! Cesta nemôže byť prázdna'; +$lng['error']['errordocpathdupe'] = 'Možnosť pre cestu %s už existuje'; +$lng['error']['adduserfirst'] = 'Prosím, najskor vytvorte užívateľa'; +$lng['error']['domainalreadyexists'] = 'Doména %s je už priradená užívateľovi'; +$lng['error']['nolanguageselect'] = 'Nebol vybraný jazyk.'; +$lng['error']['nosubjectcreate'] = 'Pre túto E-mailovú šablónu musíte zadefinovať tému.'; +$lng['error']['nomailbodycreate'] = 'Pre túto E-mailovú šablónu musíte zadefinovať text E-mailu.'; +$lng['error']['templatenotfound'] = 'Šablóna nebola nájdená.'; +$lng['error']['alltemplatesdefined'] = 'Nemôžete definovať viac šablón. Všetky jazyky sú už podporované.'; +$lng['error']['wwwnotallowed'] = 'www nie je povolené pre subdomény.'; +$lng['error']['subdomainiswrong'] = 'Subdoména obsahuje %s neplatné znaky.'; +$lng['error']['domaincantbeempty'] = 'Názov domény nemôže byť prázdny.'; +$lng['error']['domainexistalready'] = 'Doména %s už existuje.'; +$lng['error']['domainisaliasorothercustomer'] = 'Zvolený alias domény je buď sám doménový alias alebo patrí inému klientovi.'; +$lng['error']['emailexistalready'] = 'E-maolová adresa %s už existuje.'; +$lng['error']['maindomainnonexist'] = 'Hlavná doména %s neexistuje.'; +$lng['error']['destinationnonexist'] = 'Prosím, vytvorte Vaše presmerovanie v poličku \'Cieľ\'.'; +$lng['error']['destinationalreadyexistasmail'] = 'Presmerovanie na %s už existuje s aktívnou E-mail adresou.'; +$lng['error']['destinationalreadyexist'] = 'Už ste definovali presmerovanie na %s .'; +$lng['error']['destinationiswrong'] = 'Presmerovanie %s obsahuje neplatný(é) znak(y) alebo je nekompletné.'; +$lng['error']['domainname'] = $lng['domains']['domainname']; + +/** + * Questions + */ + +$lng['question']['question'] = 'Otázky bezpečnosti'; +$lng['question']['admin_customer_reallydelete'] = 'Naozaj chcete zmazať klienta %s? Nemožno vrátiť späť!'; +$lng['question']['admin_domain_reallydelete'] = 'Naozaj chcete zmazať doménu %s?'; +$lng['question']['admin_domain_reallydisablesecuritysetting'] = 'Naozaj chcete deaktivovať tieto bezbečnostné nastavenias (OpenBasedir a/alebo SafeMode)?'; +$lng['question']['admin_admin_reallydelete'] = 'Naozaj chcete zmazať admina %s? Každý klient a doména bude preradená hlavnému administrátorovi.'; +$lng['question']['admin_template_reallydelete'] = 'Naozaj chcete zmazať šablónu \'%s\'?'; +$lng['question']['domains_reallydelete'] = 'Naozaj chcete zmazať doménu %s?'; +$lng['question']['email_reallydelete'] = 'Naozaj chcete zmazať E-mailovú adresu %s?'; +$lng['question']['email_reallydelete_account'] = 'Naozaj chcete zmazať E-mailový účet %s?'; +$lng['question']['email_reallydelete_forwarder'] = 'Naozaj chcete zmazať presmerovanie %s?'; +$lng['question']['extras_reallydelete'] = 'Naozaj chcete zmazať ochranu adresára pre %s?'; +$lng['question']['extras_reallydelete_pathoptions'] = 'Naozaj chcete zmazať cestu možností pre %s?'; +$lng['question']['ftp_reallydelete'] = 'Naozaj chcete zmazať FTP účet %s?'; +$lng['question']['mysql_reallydelete'] = 'Naozaj chcete zmazať databázu %s? Nemožno vrátiť späť!'; +$lng['question']['admin_configs_reallyrebuild'] = 'Naozaj chcete pretvoriť Vaše apache a bind (DNS) konfikuračné súbory?'; + +/** + * Mails + */ + +$lng['mails']['pop_success']['mailbody'] = 'Dobrý deň,\n\nVáš E-mail účet {EMAIL}\nbol úspešne založený.\n\nToto je automaticky generovaný E-mail.\n Prosím, neodpovedajte naň!\n\nS pozdravom, Vaš webhostingový partner Iga s.r.o.'; +$lng['mails']['pop_success']['subject'] = 'E-mailový účet bol úspešne založený'; +$lng['mails']['createcustomer']['mailbody'] = 'Dobrý deň {FIRSTNAME} {NAME},\n\ntu sú Vaše informácie o účte:\n\nPrihlasovacie meno: {USERNAME}\nHeslo: {PASSWORD}\n\nĎakujeme,\n Iga s.r.o'; +$lng['mails']['createcustomer']['subject'] = 'Informácie o účte'; + +/** + * Admin + */ + +$lng['admin']['overview'] = 'Prehľad'; +$lng['admin']['ressourcedetails'] = 'Použité prostriedky'; +$lng['admin']['systemdetails'] = 'Systémové údaje'; +$lng['admin']['froxlordetails'] = 'Froxlor údaje'; +$lng['admin']['installedversion'] = 'Inštalovaná verzia'; +$lng['admin']['latestversion'] = 'Najnovšia verzia'; +$lng['admin']['lookfornewversion']['clickhere'] = 'Vyhľadávať pomocou webovej složby'; +$lng['admin']['lookfornewversion']['error'] = 'Chyba počas čítania'; +$lng['admin']['resources'] = 'Prostriedky'; +$lng['admin']['customer'] = 'Klient'; +$lng['admin']['customers'] = 'Klienti'; +$lng['admin']['customer_add'] = 'Vytvoriť klienta'; +$lng['admin']['customer_edit'] = 'Upraviť klienta'; +$lng['admin']['domains'] = 'Domény'; +$lng['admin']['domain_add'] = 'Vytvoriť doménu'; +$lng['admin']['domain_edit'] = 'Upraviť doménu'; +$lng['admin']['subdomainforemail'] = 'Subdomény ako E-mailové domény'; +$lng['admin']['admin'] = 'Administrátor'; +$lng['admin']['admins'] = 'Administrátori'; +$lng['admin']['admin_add'] = 'Vytvoriť administrátora'; +$lng['admin']['admin_edit'] = 'Upraviť administrátora'; +$lng['admin']['customers_see_all'] = 'Môže vidieť všetkých klientov?'; +$lng['admin']['domains_see_all'] = 'Môže vidieť všetky domény?'; +$lng['admin']['change_serversettings'] = 'Môže meniť nastavenia servra?'; +$lng['admin']['server'] = 'Server'; +$lng['admin']['serversettings'] = 'Nastavenia'; +$lng['admin']['rebuildconf'] = 'Pretvoriť konfikuračné súbory'; +$lng['admin']['stdsubdomain'] = 'Štandardné subdomény'; +$lng['admin']['stdsubdomain_add'] = 'Vytvoriť štandardnú subdoménu'; +$lng['admin']['deactivated'] = 'Deaktivové'; +$lng['admin']['deactivated_user'] = 'Dektivovať užívateľa'; +$lng['admin']['sendpassword'] = 'Zaslať heslo'; +$lng['admin']['ownvhostsettings'] = 'Vlastné vHost-Nastavenia'; +$lng['admin']['configfiles']['serverconfiguration'] = 'Nastavenia'; +$lng['admin']['configfiles']['files'] = 'Konfiguračné súbory: Prosím, zmeňte nasledovné súbory alebo ak neexistujú,
    vytvorte v nich nasledujúci obsah.
    Všimnite si: MySQL heslo nemôže byť z bezpečnostných dôvodov zmenené.
    Prosím nahraďte "MYSQL_PASSWORD" Vaším vlastným. Ak ste zabudli Vaše MySQL heslo,
    nájdete ho v "lib/userdata.inc.php".'; +$lng['admin']['configfiles']['commands'] = 'Príkazy: Prosím vykonajte nasledovné príkazy v príkazovom riadku.'; +$lng['admin']['configfiles']['restart'] = 'Reštart: Prosím vykonajte následovné príkazy v príkazovom riadku v presnom poradí, aby sa načítali nové nastavenia.'; +$lng['admin']['templates']['templates'] = 'Šablóny'; +$lng['admin']['templates']['template_add'] = 'Pridať šablónu'; +$lng['admin']['templates']['template_edit'] = 'Upraviť šablónu'; +$lng['admin']['templates']['action'] = 'Akcia'; +$lng['admin']['templates']['email'] = 'E-Mail'; +$lng['admin']['templates']['subject'] = 'Predmet'; +$lng['admin']['templates']['mailbody'] = 'Telo správy'; +$lng['admin']['templates']['createcustomer'] = 'Uvítací E-mail pre nového klienta'; +$lng['admin']['templates']['pop_success'] = 'Uvítací E-mail pre novť E-mailový účet'; +$lng['admin']['templates']['template_replace_vars'] = 'Premenné nahradzované v šablónach:'; +$lng['admin']['templates']['FIRSTNAME'] = 'Nahradiť krstným menom klienta.'; +$lng['admin']['templates']['NAME'] = 'Nahradiť menom klienta.'; +$lng['admin']['templates']['USERNAME'] = 'Nahradiť menom účtu klienta.'; +$lng['admin']['templates']['PASSWORD'] = 'Nahradiť heslom účtu klienta.'; +$lng['admin']['templates']['EMAIL'] = 'Nahradiť adresou POP3/IMAP účtu.'; + +/** + * Serversettings + */ + +$lng['serversettings']['session_timeout']['title'] = 'Časový limit sedenia'; +$lng['serversettings']['session_timeout']['description'] = 'Ako dlho má byť užívateľ neaktívny predtým, ako sa pripojenie stane neplatným (v sekundách)?'; +$lng['serversettings']['accountprefix']['title'] = 'Prefix klienta'; +$lng['serversettings']['accountprefix']['description'] = 'Aký prefix môžu mať klientské účty?'; +$lng['serversettings']['mysqlprefix']['title'] = 'SQL Prefix'; +$lng['serversettings']['mysqlprefix']['description'] = 'Aký prefix majú mať mySQL účty?'; +$lng['serversettings']['ftpprefix']['title'] = 'FTP Prefix'; +$lng['serversettings']['ftpprefix']['description'] = 'Aký prefix majú mať FTP účty?'; +$lng['serversettings']['documentroot_prefix']['title'] = 'Adresár dokumentov'; +$lng['serversettings']['documentroot_prefix']['description'] = 'Kde majú byť ukladané všetky dáta?'; +$lng['serversettings']['logfiles_directory']['title'] = 'Adresár súborov s logmi'; +$lng['serversettings']['logfiles_directory']['description'] = 'Kde majú byť ukladané všetky log súbory?'; +$lng['serversettings']['ipaddress']['title'] = 'IP-Addresy'; +$lng['serversettings']['ipaddress']['description'] = 'Aká je IP adresa tohto servera?'; +$lng['serversettings']['hostname']['title'] = 'Názov hosta'; +$lng['serversettings']['hostname']['description'] = 'Aký je názov hosta tohto servera?'; +$lng['serversettings']['apachereload_command']['title'] = 'Príkaz na pretvorenie (reload) Apache'; +$lng['serversettings']['apachereload_command']['description'] = 'Aký je príkaz na pretvorenie (reload) Apache?'; +$lng['serversettings']['bindconf_directory']['title'] = 'Adresár konfigurácie bind (DNS)'; +$lng['serversettings']['bindconf_directory']['description'] = 'Kde sa nachádzajú konfiguračné súbory pre bind (DNS)?'; +$lng['serversettings']['bindreload_command']['title'] = 'Príkaz na pretvorenie (reload) bind'; +$lng['serversettings']['bindreload_command']['description'] = 'Aký je príkaz na pretvorenie (reload) bind (DNS)?'; +$lng['serversettings']['binddefaultzone']['title'] = 'Predvolená zóna bind (DNS)'; +$lng['serversettings']['binddefaultzone']['description'] = 'Aký je názov predvolenej zóny?'; +$lng['serversettings']['vmail_uid']['title'] = 'Uid E-mailov (Mails-Uid)'; +$lng['serversettings']['vmail_uid']['description'] = 'Ktoré ID užívateľa môžu mať E-mail?'; +$lng['serversettings']['vmail_gid']['title'] = 'Mails-Gid'; +$lng['serversettings']['vmail_gid']['description'] = 'Ktoré ID skupiny môžu mať E-mail?'; +$lng['serversettings']['vmail_homedir']['title'] = 'Domovský adresár pre E-maily'; +$lng['serversettings']['vmail_homedir']['description'] = 'Kde majú byť ukladané všetky E-maily?'; +$lng['serversettings']['adminmail']['title'] = 'Odosielateľ'; +$lng['serversettings']['adminmail']['description'] = 'Aká je adresa odosielateľa pre E-maily odoslané z panela?'; +$lng['serversettings']['phpmyadmin_url']['title'] = 'URL pre phpMyAdmin'; +$lng['serversettings']['phpmyadmin_url']['description'] = 'Aká je URL pre phpMyAdmin? (musí začínať s http://)'; +$lng['serversettings']['webmail_url']['title'] = 'URL pre WebMail'; +$lng['serversettings']['webmail_url']['description'] = 'Aká je URL pre WebMail? (musí začínať s http://)'; +$lng['serversettings']['webftp_url']['title'] = 'URL pre WebFTP'; +$lng['serversettings']['webftp_url']['description'] = 'Aká je URL WebFTP? (musí začínať s http://)'; +$lng['serversettings']['language']['description'] = 'Aký je štandardný jazyk servera?'; +$lng['serversettings']['maxloginattempts']['title'] = 'Maximálny počet pokusov o prihlásenia'; +$lng['serversettings']['maxloginattempts']['description'] = 'Maximálny počet pokusov o prihlásenia po ktorých bude účet deaktivovaný.'; +$lng['serversettings']['deactivatetime']['title'] = 'Dátum/čas deaktivácie'; +$lng['serversettings']['deactivatetime']['description'] = 'Čas v sekundách, za ktorý sa účet deaktivuje po množstve pokusov o prihlásenie.'; +$lng['serversettings']['pathedit']['title'] = 'Zadajte názov vstupu'; +$lng['serversettings']['pathedit']['description'] = 'Môže byť cest zvolená z vyskakovacieho menu alebo zadaná do pola?'; + +/** + * CHANGED BETWEEN 1.2.12 and 1.2.13 + */ + +$lng['mysql']['description'] = 'Tu môžete vytvárať a meniť Vaše MySQL databázy.
    Zmeny sú okamžité a účty môžete používať ihneď.
    Na ľavej strane sa nachádza menu, v ktorom je nástroj phpMyAdmin, cez ktorý môžete rýchlo a jednoducho spravovať Vaše databázy.

    Pre použitie Vaších databáz vo Vaších PHP skriptoch použite nasledujúce nastavenia: (Informácie označené lomeným písmom, musia byť zmenené na Vaše prístupové údaje!)
    Názov hosta: localhost
    Užívateľské meno: Názov_databázy
    Heslo: heslo, ktoré ste si zvolili
    Databáza: Názov_databázy'; + +/** + * ADDED BETWEEN 1.2.12 and 1.2.13 + */ + +$lng['admin']['cronlastrun'] = 'Posledný Cron'; +$lng['serversettings']['paging']['title'] = 'Záznamov na stránku'; +$lng['serversettings']['paging']['description'] = 'Koľko záznamov bude zobrazených na jednej stránke? (0 = zakázané stránkovanie)'; +$lng['error']['ipstillhasdomains'] = 'IP/Port kombinácia ktorú chcete zmazať má stále priradené domenény. Pred zmazaním tejto IP/Port kombinácie prosím znovu priraďte tieto k ostatným IP/Port kombináciam.'; +$lng['error']['cantdeletedefaultip'] = 'Nemôžete zmazať predvolenú reseller IP/Port kombináciu. Pred zmazaním tejto IP/Port kombinácie prosím vytvorte inú predvolenú IP/Port kombináciu pre resellerov.'; +$lng['error']['cantdeletesystemip'] = 'Nemôžete zmazať poslednú IP systému, ani vytvoriť ďaľšiu novú IP/Port kombináciu pre IP systém alebo zmeniť systémovú IP.'; +$lng['error']['myipaddress'] = '\'IP\''; +$lng['error']['myport'] = '\'Port\''; +$lng['error']['myipdefault'] = 'Musíte vybrať kombináciu IP/Port ktorá sa stane predvolenou.'; +$lng['error']['myipnotdouble'] = 'Táto kombinácia IP/Port už existuje.'; +$lng['question']['admin_ip_reallydelete'] = 'Naozaj chcete zmazať IP adresu %s?'; +$lng['admin']['ipsandports']['ipsandports'] = 'IP a Port(y)'; +$lng['admin']['ipsandports']['add'] = 'Pridať IP/Port'; +$lng['admin']['ipsandports']['edit'] = 'Upraviťt IP/Port'; +$lng['admin']['ipsandports']['ipandport'] = 'IP/Port'; +$lng['admin']['ipsandports']['ip'] = 'IP'; +$lng['admin']['ipsandports']['port'] = 'Port'; + +// ADDED IN 1.2.13-rc3 + +$lng['error']['cantchangesystemip'] = 'Nemôžete zmeniť poslednú IP systému, ani vytvoriť ďaľšiu novú IP/Port kombináciu pre IP systém alebo zmeniť systémovú IP.'; +$lng['question']['admin_domain_reallydocrootoutofcustomerroot'] = 'Are you sure, you want the document root for this domain, not being within the customerroot of the customer?'; + +// ADDED IN 1.2.14-rc1 + +$lng['admin']['memorylimitdisabled'] = 'Zakázaný'; +$lng['domain']['openbasedirpath'] = 'OpenBasedir cesta'; +$lng['domain']['docroot'] = 'Cesta z pola vyššie'; +$lng['domain']['homedir'] = 'Domovský adresár'; +$lng['admin']['valuemandatory'] = 'Táto hodnota je povinná'; +$lng['admin']['valuemandatorycompany'] = 'Oboje "meno" a "priezvisko" alebo "spoločnosť" musia byť vyplnené'; +$lng['menue']['main']['username'] = 'Prihlásený ako: '; +$lng['panel']['urloverridespath'] = 'URL (nadradená cesta)'; +$lng['panel']['pathorurl'] = 'Cesta alebo URL'; +$lng['error']['sessiontimeoutiswrong'] = 'Je povolený len číselný "časový limit sedenia".'; +$lng['error']['maxloginattemptsiswrong'] = 'Je povolený len číselný "maximálny počet prihlásení".'; +$lng['error']['deactivatetimiswrong'] = 'Je povolený len číselný "čas deaktivácie".'; +$lng['error']['accountprefixiswrong'] = '"Prefix klienta" je nesprávny.'; +$lng['error']['mysqlprefixiswrong'] = '"SQL prefix" je nesprávny.'; +$lng['error']['ftpprefixiswrong'] = '"FTP prefix" je nesprávny.'; +$lng['error']['ipiswrong'] = '"IP-Adresa" je nesprávna. Je povolená len platná IP-adresa.'; +$lng['error']['vmailuidiswrong'] = '"Mails-uid" je nesprávne. Je povolené len číselné UID.'; +$lng['error']['vmailgidiswrong'] = '"Mails-gid" je nesprávne. Je povolené len číselné GID.'; +$lng['error']['adminmailiswrong'] = '"Adresa odosielateľa" je nesprávna. Je povolená len platná E-mail-adresa.'; +$lng['error']['pagingiswrong'] = 'Hodnota "záznamov na stránku" je neplatná. Sú povolené len číselné znaky.'; +$lng['error']['phpmyadminiswrong'] = 'phpMyAdmin odkaz nie je platným odkazov.'; +$lng['error']['webmailiswrong'] = 'WebMail odkaz nie je platým odkazom.'; +$lng['error']['webftpiswrong'] = 'WebFTP odkaz nie je platým odkazom.'; +$lng['domains']['hasaliasdomains'] = 'Má alias domény(én)'; +$lng['serversettings']['defaultip']['title'] = 'Predvolený IP/Port'; +$lng['serversettings']['defaultip']['description'] = 'Čo je predvolená IP/Port kombinácia?'; +$lng['domains']['statstics'] = 'Použiť štatistiky'; +$lng['panel']['ascending'] = 'Vzostupne'; +$lng['panel']['decending'] = 'Zostupne'; +$lng['panel']['search'] = 'Vyhľadať'; +$lng['panel']['used'] = 'použité'; + +// ADDED IN 1.2.14-rc3 + +$lng['panel']['translator'] = 'Prekladač'; + +// ADDED IN 1.2.14-rc4 + +$lng['error']['stringformaterror'] = 'Hodnota pre pole "%s" nie je v očakávanom formáte.'; + +// ADDED IN 1.2.15-rc1 + +$lng['admin']['serversoftware'] = 'Server software'; +$lng['admin']['phpversion'] = 'PHP verzia'; +$lng['admin']['phpmemorylimit'] = 'PHP Memory Limit'; +$lng['admin']['mysqlserverversion'] = 'MySQL Server verzia'; +$lng['admin']['mysqlclientversion'] = 'MySQL Client verzia'; +$lng['admin']['webserverinterface'] = 'Webserver rozhranie'; +$lng['domains']['isassigneddomain'] = 'Je priradenou doménou'; +$lng['serversettings']['phpappendopenbasedir']['title'] = 'Cesty na pripojenie k OpenBasedir'; +$lng['serversettings']['phpappendopenbasedir']['description'] = 'Tieto cesty (oddelené dvojbodkou) budú pridané do OpenBasedir príkazu (statement) v každom vhost-zázobníku (container).'; + +// CHANGED IN 1.2.15-rc1 + +$lng['error']['loginnameissystemaccount'] = 'Nemôžete vytvoriť účet, ktorý je podobný systémovému účtu (napríklad začnite s "%s"). Prosím, zadajte iný názov účtu.'; + +?> diff --git a/scripts/froxlor_master_cronjob.php b/scripts/froxlor_master_cronjob.php index dcbbdffe..41a8b8b8 100644 --- a/scripts/froxlor_master_cronjob.php +++ b/scripts/froxlor_master_cronjob.php @@ -12,7 +12,7 @@ * @author Froxlor team (2010-) * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @package Cron - * @version $Id: $ + * @version $Id$ */ include_once(dirname(__FILE__) . '/../lib/cron_init.php'); diff --git a/templates/main.css b/templates/main.css index 3dca842f..68c071e3 100644 --- a/templates/main.css +++ b/templates/main.css @@ -1,445 +1,445 @@ -body { - color : #000000; - font-family : Verdana, Arial, Helvetica, sans-serif; - font-size : 12px; -} - -.header { - background-image : url( '../images/header_r.gif' ); - background-repeat : repeat-x; -} - -.footer { - text-align : center; - border-color : #EBECF5; - border-style : solid; - border-width : 1px; - border-right : none; - border-left : none; - background : url('../images/footer.gif') repeat-y #FFFFFF; -} - -a,a:visited,a:active { - color : #000000; - text-decoration : underline; -} - -a:hover { - color : #F89826; - text-decoration : none; -} - -input { - color : black; - text-decoration : none; - font-family : Verdana, Arial, Helvetica, sans-serif; - font-size : 12px; - font-weight : bold; - border : 1px solid #ABC9E8; - background-color : #C6DEFF; -} - -input.text { - color : black; - text-decoration : none; - font-family : Verdana, Arial, Helvetica, sans-serif; - font-size : 12px; - font-weight : bold; - border : 1px solid #ABC9E8; - background-color : #C6DEFF; - width : 95%; -} - -input.textul { - color : black; - text-decoration : none; - font-family : Verdana, Arial, Helvetica, sans-serif; - font-size : 12px; - font-weight : bold; - border : 1px solid #ABC9E8; - background-color : #C6DEFF; - width : 55%; -} - -select,textarea { - color : black; - text-decoration : none; - font-family : Verdana, Arial, Helvetica, sans-serif; - font-size : 12px; - font-weight : bold; - border : 1px solid #B7B7B7; - background-color : #C6DEFF; -} - -input.bottom { - color : black; - text-decoration : none; - font-family : Verdana, Arial, Helvetica, sans-serif; - font-size : 12px; - font-weight : bold; - border : 1px solid #000000; - background-color : #C6DEFF; -} - -.title { - background-color : #ABC9E8; - border-color : #B7B7B7; - border-style : solid; - border-width : 1px; - border-top : none; - text-align : left; -} - -.line_shadow { - background-image : url( '../images/shadow.gif' ); - background-repeat : repeat-y; - background-position : top left; -} - -.section { - height : 25px; - background-image : url( '../images/section.gif' ); -} - -.subsection { - padding-top : 8px; - background-image : url( '../images/subsection.gif' ); -} - -.endsection { - height : 10px; - background-image : url( '../images/endsection.gif' ); - background-position : bottom; -} - -.maintable { - width : 90%; -} - -.maintable_60 { - width : 60%; -} - -.maintable_40 { - width : 40%; -} - -.maintitle { - width : 90%; - background-color : #ABC9E8; - border-color : #000000; - border-style : solid; - border-width : 1px; - text-align : left; - font-size : 1.3em; -} - -.main_field_name { - width : 50%; - background-color : #EBECF5; - border-color : #B7B7B7; - border-style : solid; - border-width : 1px; - text-align : left; -} - -.main_field_confirm { - width : 84%; - background-color : #EBECF5; - border-color : #B7B7B7; - border-style : solid; - border-width : 1px; - text-align : right; -} - -.field_name { - background-color : #EBECF5; - border-color : #B7B7B7; - border-style : solid; - border-width : 1px; - text-align : left; - border-top : none; - border-left : none; -} - -.field_name_foggy { /*nomecampo*/ - color : #555; - text-decoration : line-through; - background-color : #EBECF5; - border-color : #B7B7B7; - border-style : solid; - border-width : 1px; - text-align : left; - border-top : none; - border-left : none; -} - -.field_name_red { /*nomecampo*/ - background-color : #FFA0A0; - border-color : #B7B7B7; - border-style : solid; - border-width : 1px; - text-align : left; - border-top : none; - border-left : none; -} - -.field_name_nobordersmall { - background-color : #EBECF5; - border-color : #B7B7B7; - border-style : solid; - border-width : 1px; - text-align : left; - border-top : none; - border-bottom : none; -} - -.field_name_center { - background-color : #EBECF5; - border-color : #B7B7B7; - border-style : solid; - border-width : 1px; - text-align : center; - border-top : none; -} - -.field_name_center_noborder { - height : 30px; - background-color : #EBECF5; - border-color : #B7B7B7; - border-style : solid; - border-width : 1px; - text-align : center; - border-top : none; - border-right : none; -} - -.field_name_border_left { - background-color : #EBECF5; - border-color : #B7B7B7; - border-style : solid; - border-width : 1px; - text-align : left; - border-top : none; -} - -.field_name_border_left_foggy { /*nomecampo_bordosx*/ - color : #555; - text-decoration : line-through; - background-color : #EBECF5; - border-color : #B7B7B7; - border-style : solid; - border-width : 1px; - text-align : left; - border-top : none; -} - -.field_name_border_left_red { /*nomecampo_bordosx*/ - background-color : #FFA0A0; - border-color : #B7B7B7; - border-style : solid; - border-width : 1px; - text-align : left; - border-top : none; -} - -.field_name_search { - background-color : #EBECF5; - border-color : #B7B7B7; - border-style : solid; - border-width : 1px; - border-top : none; - border-left : none; - text-align : right; -} - -.main_field_display_red { /*install_campodisplay*/ - width : 6%; - background-color : #FFA0A0; - border-color : #B7B7B7; - border-style : solid; - border-width : 1px; -} - -.main_field_display { - width : 50%; - background-color : #C6DEFF; - border-color : #B7B7B7; - border-style : solid; - border-width : 1px; -} - -.main_field_display_small { - width : 25%; - background-color : #C6DEFF; - border-color : #B7B7B7; - border-style : solid; - border-width : 1px; -} - -.field_display { - background-color : #C6DEFF; - border-color : #B7B7B7; - border-style : solid; - border-width : 1px; - border-top : none; - border-left : none; -} - -.field_display_search { - background-color : #C6DEFF; - border-color : #B7B7B7; - border-style : solid; - border-width : 1px; - border-top : none; - border-left : none; - text-align : right; -} - -.field_display_border_left { - background-color : #C6DEFF; - border-color : #B7B7B7; - border-style : solid; - border-width : 1px; - border-top : none; -} - -.field_display_nobordersmall { - background-color : #C6DEFF; - border-color : #B7B7B7; - border-style : solid; - border-width : 1px; - border-top : none; - border-left : none; - border-bottom : none; -} - -select.dropdown_noborder { - color : black; - text-decoration : none; - font-family : Verdana, Arial, Helvetica, sans-serif; - font-size : 12px; - font-weight : bold; - border : 0px solid #B7B7B7; - background-color : #C6DEFF; -} - -textarea.textarea_noborder { - color : black; - text-decoration : none; - font-family : Verdana, Arial, Helvetica, sans-serif; - font-size : 12px; - font-weight : bold; - border : 0px solid #B7B7B7; - background-color : #C6DEFF; -} - -textarea.textarea_border { - width : 95%; - color : black; - text-decoration : none; - font-family : Verdana, Arial, Helvetica, sans-serif; - font-size : 12px; - font-weight : bold; - border : 1px solid #B7B7B7; - background-color : #C6DEFF; -} - -.maintitle_search_left { - background-color : #ABC9E8; - border-color : #000000; - border-style : solid; - border-width : 1px; - border-right-width : 0px; - text-align : left; - font-size : 1.3em; -} - -.maintitle_search_right { - background-color : #ABC9E8; - border-color : #000000; - border-style : solid; - border-width : 1px; - border-left-width : 0px; - text-align : right; -} - - -.maintitle_apply_left { - background-color : #ABC9E8; - border-color : #000000; - border-style : solid; - border-width : 1px; - text-align : left; -} - -.maintitle_apply_right { - background-color : #ABC9E8; - border-color : #000000; - border-style : solid; - border-width : 1px; - text-align : right; -} - -.ticket_high { - color : #ff0000; - font-weight : bold; -} - -.ticket_normal { - color : #ff9a38; - font-weight : bold; -} - -.ticket_low { - color : #5bc949; - font-weight : bold; -} - -TR { - background-color : #EBECF5; -} - -TR.RowOverSelected { - background-color : #FFFFFF; -} - -/* ADDED WITH APS INSTALLER */ - -.dataerror -{ - font-weight: bold; - color: #DD2222; - margin: 15px; - padding: 20px 20px 20px 60px; - background-color: #f1baba; - border: 1px solid #ce1d1d; - background-image: url('../images/error.png'); - background-repeat: no-repeat; - background-position: 15px 50%; -} - -.fielderror -{ - font-weight: bold; - color: #DD2222; - background-color: #f1baba; - border: 1px solid #DD2222; - padding: 8px; - margin: 8px 0 8px 0; -} - -.pageitem -{ - padding: 6px; - border: 1px solid #666666; - margin-right: 3px; - background-color: #C6DEFF; -} - -.update_progess -{ - padding: 2em; - text-align: left; -} - +body { + color : #000000; + font-family : Verdana, Arial, Helvetica, sans-serif; + font-size : 12px; +} + +.header { + background-image : url( '../images/header_r.gif' ); + background-repeat : repeat-x; +} + +.footer { + text-align : center; + border-color : #EBECF5; + border-style : solid; + border-width : 1px; + border-right : none; + border-left : none; + background : url('../images/footer.gif') repeat-y #FFFFFF; +} + +a,a:visited,a:active { + color : #000000; + text-decoration : underline; +} + +a:hover { + color : #F89826; + text-decoration : none; +} + +input { + color : black; + text-decoration : none; + font-family : Verdana, Arial, Helvetica, sans-serif; + font-size : 12px; + font-weight : bold; + border : 1px solid #ABC9E8; + background-color : #C6DEFF; +} + +input.text { + color : black; + text-decoration : none; + font-family : Verdana, Arial, Helvetica, sans-serif; + font-size : 12px; + font-weight : bold; + border : 1px solid #ABC9E8; + background-color : #C6DEFF; + width : 95%; +} + +input.textul { + color : black; + text-decoration : none; + font-family : Verdana, Arial, Helvetica, sans-serif; + font-size : 12px; + font-weight : bold; + border : 1px solid #ABC9E8; + background-color : #C6DEFF; + width : 55%; +} + +select,textarea { + color : black; + text-decoration : none; + font-family : Verdana, Arial, Helvetica, sans-serif; + font-size : 12px; + font-weight : bold; + border : 1px solid #B7B7B7; + background-color : #C6DEFF; +} + +input.bottom { + color : black; + text-decoration : none; + font-family : Verdana, Arial, Helvetica, sans-serif; + font-size : 12px; + font-weight : bold; + border : 1px solid #000000; + background-color : #C6DEFF; +} + +.title { + background-color : #ABC9E8; + border-color : #B7B7B7; + border-style : solid; + border-width : 1px; + border-top : none; + text-align : left; +} + +.line_shadow { + background-image : url( '../images/shadow.gif' ); + background-repeat : repeat-y; + background-position : top left; +} + +.section { + height : 25px; + background-image : url( '../images/section.gif' ); +} + +.subsection { + padding-top : 8px; + background-image : url( '../images/subsection.gif' ); +} + +.endsection { + height : 10px; + background-image : url( '../images/endsection.gif' ); + background-position : bottom; +} + +.maintable { + width : 90%; +} + +.maintable_60 { + width : 60%; +} + +.maintable_40 { + width : 40%; +} + +.maintitle { + width : 90%; + background-color : #ABC9E8; + border-color : #000000; + border-style : solid; + border-width : 1px; + text-align : left; + font-size : 1.3em; +} + +.main_field_name { + width : 50%; + background-color : #EBECF5; + border-color : #B7B7B7; + border-style : solid; + border-width : 1px; + text-align : left; +} + +.main_field_confirm { + width : 84%; + background-color : #EBECF5; + border-color : #B7B7B7; + border-style : solid; + border-width : 1px; + text-align : right; +} + +.field_name { + background-color : #EBECF5; + border-color : #B7B7B7; + border-style : solid; + border-width : 1px; + text-align : left; + border-top : none; + border-left : none; +} + +.field_name_foggy { /*nomecampo*/ + color : #555; + text-decoration : line-through; + background-color : #EBECF5; + border-color : #B7B7B7; + border-style : solid; + border-width : 1px; + text-align : left; + border-top : none; + border-left : none; +} + +.field_name_red { /*nomecampo*/ + background-color : #FFA0A0; + border-color : #B7B7B7; + border-style : solid; + border-width : 1px; + text-align : left; + border-top : none; + border-left : none; +} + +.field_name_nobordersmall { + background-color : #EBECF5; + border-color : #B7B7B7; + border-style : solid; + border-width : 1px; + text-align : left; + border-top : none; + border-bottom : none; +} + +.field_name_center { + background-color : #EBECF5; + border-color : #B7B7B7; + border-style : solid; + border-width : 1px; + text-align : center; + border-top : none; +} + +.field_name_center_noborder { + height : 30px; + background-color : #EBECF5; + border-color : #B7B7B7; + border-style : solid; + border-width : 1px; + text-align : center; + border-top : none; + border-right : none; +} + +.field_name_border_left { + background-color : #EBECF5; + border-color : #B7B7B7; + border-style : solid; + border-width : 1px; + text-align : left; + border-top : none; +} + +.field_name_border_left_foggy { /*nomecampo_bordosx*/ + color : #555; + text-decoration : line-through; + background-color : #EBECF5; + border-color : #B7B7B7; + border-style : solid; + border-width : 1px; + text-align : left; + border-top : none; +} + +.field_name_border_left_red { /*nomecampo_bordosx*/ + background-color : #FFA0A0; + border-color : #B7B7B7; + border-style : solid; + border-width : 1px; + text-align : left; + border-top : none; +} + +.field_name_search { + background-color : #EBECF5; + border-color : #B7B7B7; + border-style : solid; + border-width : 1px; + border-top : none; + border-left : none; + text-align : right; +} + +.main_field_display_red { /*install_campodisplay*/ + width : 6%; + background-color : #FFA0A0; + border-color : #B7B7B7; + border-style : solid; + border-width : 1px; +} + +.main_field_display { + width : 50%; + background-color : #C6DEFF; + border-color : #B7B7B7; + border-style : solid; + border-width : 1px; +} + +.main_field_display_small { + width : 25%; + background-color : #C6DEFF; + border-color : #B7B7B7; + border-style : solid; + border-width : 1px; +} + +.field_display { + background-color : #C6DEFF; + border-color : #B7B7B7; + border-style : solid; + border-width : 1px; + border-top : none; + border-left : none; +} + +.field_display_search { + background-color : #C6DEFF; + border-color : #B7B7B7; + border-style : solid; + border-width : 1px; + border-top : none; + border-left : none; + text-align : right; +} + +.field_display_border_left { + background-color : #C6DEFF; + border-color : #B7B7B7; + border-style : solid; + border-width : 1px; + border-top : none; +} + +.field_display_nobordersmall { + background-color : #C6DEFF; + border-color : #B7B7B7; + border-style : solid; + border-width : 1px; + border-top : none; + border-left : none; + border-bottom : none; +} + +select.dropdown_noborder { + color : black; + text-decoration : none; + font-family : Verdana, Arial, Helvetica, sans-serif; + font-size : 12px; + font-weight : bold; + border : 0px solid #B7B7B7; + background-color : #C6DEFF; +} + +textarea.textarea_noborder { + color : black; + text-decoration : none; + font-family : Verdana, Arial, Helvetica, sans-serif; + font-size : 12px; + font-weight : bold; + border : 0px solid #B7B7B7; + background-color : #C6DEFF; +} + +textarea.textarea_border { + width : 95%; + color : black; + text-decoration : none; + font-family : Verdana, Arial, Helvetica, sans-serif; + font-size : 12px; + font-weight : bold; + border : 1px solid #B7B7B7; + background-color : #C6DEFF; +} + +.maintitle_search_left { + background-color : #ABC9E8; + border-color : #000000; + border-style : solid; + border-width : 1px; + border-right-width : 0px; + text-align : left; + font-size : 1.3em; +} + +.maintitle_search_right { + background-color : #ABC9E8; + border-color : #000000; + border-style : solid; + border-width : 1px; + border-left-width : 0px; + text-align : right; +} + + +.maintitle_apply_left { + background-color : #ABC9E8; + border-color : #000000; + border-style : solid; + border-width : 1px; + text-align : left; +} + +.maintitle_apply_right { + background-color : #ABC9E8; + border-color : #000000; + border-style : solid; + border-width : 1px; + text-align : right; +} + +.ticket_high { + color : #ff0000; + font-weight : bold; +} + +.ticket_normal { + color : #ff9a38; + font-weight : bold; +} + +.ticket_low { + color : #5bc949; + font-weight : bold; +} + +TR { + background-color : #EBECF5; +} + +TR.RowOverSelected { + background-color : #FFFFFF; +} + +/* ADDED WITH APS INSTALLER */ + +.dataerror +{ + font-weight: bold; + color: #DD2222; + margin: 15px; + padding: 20px 20px 20px 60px; + background-color: #f1baba; + border: 1px solid #ce1d1d; + background-image: url('../images/error.png'); + background-repeat: no-repeat; + background-position: 15px 50%; +} + +.fielderror +{ + font-weight: bold; + color: #DD2222; + background-color: #f1baba; + border: 1px solid #DD2222; + padding: 8px; + margin: 8px 0 8px 0; +} + +.pageitem +{ + padding: 6px; + border: 1px solid #666666; + margin-right: 3px; + background-color: #C6DEFF; +} + +.update_progess +{ + padding: 2em; + text-align: left; +} +